labwc/scripts
John Lindgren c9e0a6e125 icon-loader: add a new loader for XPM icons, used by many legacy X11 apps
Adapted from gdk-pixbuf, see the original at:

  https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/blob/master/gdk-pixbuf/io-xpm.c

rgb.txt is from X.org, see:

  https://gitlab.freedesktop.org/xorg/app/rgb/-/blob/master/rgb.txt

Differences from the gdk-pixbuf version:

- GdkPixbuf replaced with struct lab_data_buffer
- Progressive and in-memory loading code removed
- Two functions that had separate BSD copyright rewritten
- Stores colors as ARGB32 earlier in the decoding process for efficiency
- Limited to 1024x1024 px and 1024 colors to prevent abuse
- Uses struct buf to build strings, in place of manual g_new/g_realloc
- Uses xzalloc/xznew_n for other memory allocations
- Uses g_strlcpy in place of banned strcpy/strncpy/strncat
- Uses standard C types (int, bool, etc.) in place of the GLib ones
- Follows labwc coding style (whitespace, braces, letter case, etc.)
- Et cetera ...

v2: add Perl fixes from @domo141
2024-09-30 21:17:19 -04:00
..
ci CI: rewrite smoke test and support LABWC_RUNS env var 2024-03-16 18:42:47 +01:00
helper ci: include scripts/find-banned.sh 2023-12-29 11:47:55 +01:00
.gitignore Add scripts/find-banned.sh 2023-07-06 18:04:55 +01:00
check CI: increase speed of codestyle check 2024-08-04 21:01:50 +02:00
checkpatch.pl icon-loader: add a new loader for XPM icons, used by many legacy X11 apps 2024-09-30 21:17:19 -04:00
find-banned.sh CI: add atof() to banned list 2024-05-13 11:06:04 +02:00
README.md checkpatch: add scripts/check for batch processing 2022-11-03 19:20:23 +00:00

These scripts are intended to be run from the project top-level directory like this: scripts/foo.sh

  • scripts/check: wrapper to check all files in src/ and include/

  • scripts/checkpatch.pl: Quick hack on the Linux kernel checkpatch.pl to lint C files written according to the labwc coding style. Run like this: ./checkpatch.pl --no-tree --terse --strict --file <file>