Skip to content

Commit

Permalink
chore: Update the .editorconfig files and pacify editorconfig-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
ctruta committed Feb 15, 2024
1 parent 42c8fcb commit 4191872
Show file tree
Hide file tree
Showing 15 changed files with 166 additions and 108 deletions.
23 changes: 19 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,44 @@ trim_trailing_whitespace = true
# Traditionally, the end-of-line character has been platform-specific.
end_of_line = unset

[*.txt]
indent_style = space

[*.[chS]]
indent_style = space
max_doc_length = 80
max_line_length = 81
# FIXME: max_line_length should be 80

[*.{awk,cmake,dfa,in,sh}]
[*.dfa]
indent_style = space
max_doc_length = 80
max_line_length = 80

[*.{awk,cmake}]
indent_style = space
max_doc_length = 80
max_line_length = 100

[*.txt]
[*.{in,sh}]
indent_style = space
max_line_length = unset
max_doc_length = 100
max_line_length = 100

[{Makefile.in,ltmain.sh}]
indent_style = unset
insert_final_newline = unset
max_doc_length = unset
max_line_length = unset
trim_trailing_whitespace = unset

[*~]
end_of_line = unset
indent_style = unset
insert_final_newline = unset
max_line_length = unset
trim_trailing_whitespace = unset

[COMMIT_EDITMSG]
indent_style = space
max_doc_length = unset
max_line_length = 72
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ if(TARGET_ARCH MATCHES "^(loongarch)")
if(COMPILER_SUPPORTS_LSX)
set(libpng_loongarch_sources
loongarch/loongarch_lsx_init.c
loongarch/filter_lsx_intrinsics.c)
loongarch/filter_lsx_intrinsics.c)
set_source_files_properties(${libpng_loongarch_sources}
PROPERTIES
COMPILE_FLAGS "-mlsx")
Expand Down Expand Up @@ -302,7 +302,7 @@ endif()

# Set definitions and sources for LoongArch.
if(TARGET_ARCH MATCHES "^(loongarch)")
add_definitions(-DPNG_LOONGARCH_LSX_OPT=0)
add_definitions(-DPNG_LOONGARCH_LSX_OPT=0)
endif()

endif(PNG_HARDWARE_OPTIMIZATIONS)
Expand Down
8 changes: 1 addition & 7 deletions contrib/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

root = false

[*]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = unset
[*.[ch]]
max_doc_length = unset
max_line_length = unset
trim_trailing_whitespace = unset
4 changes: 2 additions & 2 deletions contrib/examples/iccfrompng.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ extract(FILE *fp, png_uint_32 *proflen)
}

else
result = no_profile;
result = no_profile;
}

png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
Expand Down Expand Up @@ -155,7 +155,7 @@ extract_one_file(const char *filename)
}

else if (verbose && profile == no_profile)
printf("%s has no profile\n", filename);
printf("%s has no profile\n", filename);
}

else
Expand Down
2 changes: 1 addition & 1 deletion contrib/gregbook/rpng-x.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- 1.10: added support for non-default visuals; fixed X pixel-conversion
- 1.11: added extra set of parentheses to png_jmpbuf() macro; fixed
command-line parsing bug
- 1.12: fixed some small X memory leaks (thanks to François Petitjean)
- 1.12: fixed some small X memory leaks (thanks to François Petitjean)
- 1.13: fixed XFreeGC() crash bug (thanks to Patrick Welche)
- 1.14: added support for X resources (thanks to Gerhard Niklasch)
- 2.00: dual-licensed (added GNU GPL)
Expand Down
2 changes: 1 addition & 1 deletion contrib/gregbook/rpng2-x.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
- 1.11: added -usleep option for demos; fixed command-line parsing bug
- 1.12: added -pause option for demos and testing
- 1.20: added runtime MMX-enabling/disabling and new -mmx* options
- 1.21: fixed some small X memory leaks (thanks to François Petitjean)
- 1.21: fixed some small X memory leaks (thanks to François Petitjean)
- 1.22: fixed XFreeGC() crash bug (thanks to Patrick Welche)
- 1.23: added -bgpat 0 mode (std white/gray checkerboard, 8x8 squares)
- 1.30: added -loop option for -bgpat (ifdef FEATURE_LOOP); fixed bpp =
Expand Down
2 changes: 1 addition & 1 deletion contrib/pngminim/decoder/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ZOBJS = adler32$(O) crc32$(O) \
PNGSRCS=png$(C) pngerror$(C) pngget$(C) pngmem$(C) \
pngread$(C) pngrio$(C) pngrtran$(C) pngrutil$(C) \
pngset$(C) pngtrans$(C)

# Standard headers
PNGH =png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h

Expand Down
22 changes: 22 additions & 0 deletions contrib/visupng/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# https://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = unset
indent_style = unset
insert_final_newline = true
max_doc_length = 80
max_line_length = 100
trim_trailing_whitespace = true

[*.rc]
end_of_line = crlf
trim_trailing_whitespace = unset

[*.ds[pw]]
end_of_line = crlf
max_doc_length = unset
max_line_length = unset
trim_trailing_whitespace = unset
1 change: 1 addition & 0 deletions loongarch/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ root = false

# FIXME
[*.[ch]]
max_doc_length = unset
max_line_length = unset
8 changes: 8 additions & 0 deletions mips/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://editorconfig.org

root = false

# FIXME
[*.[ch]]
max_doc_length = unset
max_line_length = unset
14 changes: 7 additions & 7 deletions png.c
Original file line number Diff line number Diff line change
Expand Up @@ -1821,14 +1821,14 @@ png_icc_profile_error(png_const_structrp png_ptr, png_colorspacerp colorspace,
}
# ifdef PNG_WARNINGS_SUPPORTED
else
{
char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */
{
char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */

pos = png_safecat(message, (sizeof message), pos,
png_format_number(number, number+(sizeof number),
PNG_NUMBER_FORMAT_x, value));
pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */
}
pos = png_safecat(message, (sizeof message), pos,
png_format_number(number, number+(sizeof number),
PNG_NUMBER_FORMAT_x, value));
pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */
}
# endif
/* The 'reason' is an arbitrary message, allow +79 maximum 195 */
pos = png_safecat(message, (sizeof message), pos, reason);
Expand Down
1 change: 1 addition & 0 deletions powerpc/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ root = false

# FIXME
[*.[ch]]
max_doc_length = unset
max_line_length = unset
12 changes: 1 addition & 11 deletions projects/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# https://editorconfig.org

root = false

[*]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = unset
max_doc_length = unset
max_line_length = unset
trim_trailing_whitespace = unset
root = true
Loading

0 comments on commit 4191872

Please sign in to comment.