Skip to content

Commit

Permalink
indent: fix indentation for updated gindent version in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcnamara committed Feb 12, 2025
1 parent a18ee64 commit caf4158
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
1 change: 1 addition & 0 deletions .indent.pro
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
-T SLIST_ENTRY
-T STAILQ_ENTRY
-T TAILQ_ENTRY
-T FILE

/* libxlsxwriter typedefs. */
-T lxw_app
Expand Down
16 changes: 8 additions & 8 deletions include/xlsxwriter/xmlwriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ struct xml_attribute *lxw_new_attribute_dbl(const char *key, double value);
*
* @param xmlfile A FILE pointer to the output XML file.
*/
void lxw_xml_declaration(FILE * xmlfile);
void lxw_xml_declaration(FILE *xmlfile);

/**
* Write an XML start tag with optional attributes.
Expand All @@ -108,7 +108,7 @@ void lxw_xml_declaration(FILE * xmlfile);
* @param tag The XML tag to write.
* @param attributes An optional list of attributes to add to the tag.
*/
void lxw_xml_start_tag(FILE * xmlfile,
void lxw_xml_start_tag(FILE *xmlfile,
const char *tag,
struct xml_attribute_list *attributes);

Expand All @@ -120,7 +120,7 @@ void lxw_xml_start_tag(FILE * xmlfile,
* @param tag The XML tag to write.
* @param attributes An optional list of attributes to add to the tag.
*/
void lxw_xml_start_tag_unencoded(FILE * xmlfile,
void lxw_xml_start_tag_unencoded(FILE *xmlfile,
const char *tag,
struct xml_attribute_list *attributes);

Expand All @@ -130,7 +130,7 @@ void lxw_xml_start_tag_unencoded(FILE * xmlfile,
* @param xmlfile A FILE pointer to the output XML file.
* @param tag The XML tag to write.
*/
void lxw_xml_end_tag(FILE * xmlfile, const char *tag);
void lxw_xml_end_tag(FILE *xmlfile, const char *tag);

/**
* Write an XML empty tag with optional attributes.
Expand All @@ -139,7 +139,7 @@ void lxw_xml_end_tag(FILE * xmlfile, const char *tag);
* @param tag The XML tag to write.
* @param attributes An optional list of attributes to add to the tag.
*/
void lxw_xml_empty_tag(FILE * xmlfile,
void lxw_xml_empty_tag(FILE *xmlfile,
const char *tag,
struct xml_attribute_list *attributes);

Expand All @@ -151,7 +151,7 @@ void lxw_xml_empty_tag(FILE * xmlfile,
* @param tag The XML tag to write.
* @param attributes An optional list of attributes to add to the tag.
*/
void lxw_xml_empty_tag_unencoded(FILE * xmlfile,
void lxw_xml_empty_tag_unencoded(FILE *xmlfile,
const char *tag,
struct xml_attribute_list *attributes);

Expand All @@ -163,12 +163,12 @@ void lxw_xml_empty_tag_unencoded(FILE * xmlfile,
* @param data The data section of the XML element.
* @param attributes An optional list of attributes to add to the tag.
*/
void lxw_xml_data_element(FILE * xmlfile,
void lxw_xml_data_element(FILE *xmlfile,
const char *tag,
const char *data,
struct xml_attribute_list *attributes);

void lxw_xml_rich_si_element(FILE * xmlfile, const char *string);
void lxw_xml_rich_si_element(FILE *xmlfile, const char *string);

uint8_t lxw_has_control_characters(const char *string);
char *lxw_escape_control_characters(const char *string);
Expand Down
8 changes: 4 additions & 4 deletions src/packager.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
#include "xlsxwriter/hash_table.h"
#include "xlsxwriter/utility.h"

STATIC lxw_error _add_file_to_zip(lxw_packager *self, FILE * file,
STATIC lxw_error _add_file_to_zip(lxw_packager *self, FILE *file,
const char *filename);

STATIC lxw_error _add_buffer_to_zip(lxw_packager *self, const char *buffer,
size_t buffer_size, const char *filename);

STATIC lxw_error _add_to_zip(lxw_packager *self, FILE * file,
STATIC lxw_error _add_to_zip(lxw_packager *self, FILE *file,
char **buffer, size_t *buffer_size,
const char *filename);

Expand Down Expand Up @@ -2055,7 +2055,7 @@ _write_root_rels_file(lxw_packager *self)
****************************************************************************/

STATIC lxw_error
_add_file_to_zip(lxw_packager *self, FILE * file, const char *filename)
_add_file_to_zip(lxw_packager *self, FILE *file, const char *filename)
{
int16_t error = ZIP_OK;
size_t size_read;
Expand Down Expand Up @@ -2147,7 +2147,7 @@ _add_buffer_to_zip(lxw_packager *self, const char *buffer, size_t buffer_size,
}

STATIC lxw_error
_add_to_zip(lxw_packager *self, FILE * file, char **buffer,
_add_to_zip(lxw_packager *self, FILE *file, char **buffer,
size_t *buffer_size, const char *filename)
{
/* Flush to ensure buffer is updated when using a memory-backed file. */
Expand Down
24 changes: 12 additions & 12 deletions src/xmlwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ STATIC char *_escape_attributes(struct xml_attribute *attribute);

char *lxw_escape_data(const char *data);

STATIC void _fprint_escaped_attributes(FILE * xmlfile,
STATIC void _fprint_escaped_attributes(FILE *xmlfile,
struct xml_attribute_list *attributes);

STATIC void _fprint_escaped_data(FILE * xmlfile, const char *data);
STATIC void _fprint_escaped_data(FILE *xmlfile, const char *data);

/*
* Write the XML declaration.
*/
void
lxw_xml_declaration(FILE * xmlfile)
lxw_xml_declaration(FILE *xmlfile)
{
fprintf(xmlfile, "<?xml version=\"1.0\" "
"encoding=\"UTF-8\" standalone=\"yes\"?>\n");
Expand All @@ -47,7 +47,7 @@ lxw_xml_declaration(FILE * xmlfile)
* Write an XML start tag with optional attributes.
*/
void
lxw_xml_start_tag(FILE * xmlfile,
lxw_xml_start_tag(FILE *xmlfile,
const char *tag, struct xml_attribute_list *attributes)
{
fprintf(xmlfile, "<%s", tag);
Expand All @@ -62,7 +62,7 @@ lxw_xml_start_tag(FILE * xmlfile,
* This is a minor speed optimization for elements that don't need encoding.
*/
void
lxw_xml_start_tag_unencoded(FILE * xmlfile,
lxw_xml_start_tag_unencoded(FILE *xmlfile,
const char *tag,
struct xml_attribute_list *attributes)
{
Expand All @@ -83,7 +83,7 @@ lxw_xml_start_tag_unencoded(FILE * xmlfile,
* Write an XML end tag.
*/
void
lxw_xml_end_tag(FILE * xmlfile, const char *tag)
lxw_xml_end_tag(FILE *xmlfile, const char *tag)
{
fprintf(xmlfile, "</%s>", tag);
}
Expand All @@ -92,7 +92,7 @@ lxw_xml_end_tag(FILE * xmlfile, const char *tag)
* Write an empty XML tag with optional attributes.
*/
void
lxw_xml_empty_tag(FILE * xmlfile,
lxw_xml_empty_tag(FILE *xmlfile,
const char *tag, struct xml_attribute_list *attributes)
{
fprintf(xmlfile, "<%s", tag);
Expand All @@ -107,7 +107,7 @@ lxw_xml_empty_tag(FILE * xmlfile,
* This is a minor speed optimization for elements that don't need encoding.
*/
void
lxw_xml_empty_tag_unencoded(FILE * xmlfile,
lxw_xml_empty_tag_unencoded(FILE *xmlfile,
const char *tag,
struct xml_attribute_list *attributes)
{
Expand All @@ -128,7 +128,7 @@ lxw_xml_empty_tag_unencoded(FILE * xmlfile,
* Write an XML element containing data with optional attributes.
*/
void
lxw_xml_data_element(FILE * xmlfile,
lxw_xml_data_element(FILE *xmlfile,
const char *tag,
const char *data, struct xml_attribute_list *attributes)
{
Expand All @@ -147,7 +147,7 @@ lxw_xml_data_element(FILE * xmlfile,
* Write an XML <si> element for rich strings, without encoding.
*/
void
lxw_xml_rich_si_element(FILE * xmlfile, const char *string)
lxw_xml_rich_si_element(FILE *xmlfile, const char *string)
{
fprintf(xmlfile, "<si>%s</si>", string);
}
Expand Down Expand Up @@ -370,7 +370,7 @@ lxw_escape_url_characters(const char *string, uint8_t escape_hash)

/* Write out escaped attributes. */
STATIC void
_fprint_escaped_attributes(FILE * xmlfile,
_fprint_escaped_attributes(FILE *xmlfile,
struct xml_attribute_list *attributes)
{
struct xml_attribute *attribute;
Expand All @@ -397,7 +397,7 @@ _fprint_escaped_attributes(FILE * xmlfile,

/* Write out escaped XML data. */
STATIC void
_fprint_escaped_data(FILE * xmlfile, const char *data)
_fprint_escaped_data(FILE *xmlfile, const char *data)
{
/* Escape the data section of the XML element. */
if (!strpbrk(data, "&<>")) {
Expand Down

0 comments on commit caf4158

Please sign in to comment.