Commit Graph

1721 Commits

Author SHA1 Message Date
Thomas Bernard
101438381d utf8 is mandatory for HTML5 so convert to utf8 2020-12-22 23:19:16 +01:00
Thomas Bernard
6f21c7e753 malloc return check in Save_GIF()
also translated comments from French to English
2020-12-20 18:18:30 +01:00
Thomas Bernard
6b6f8790d5 fix the "Screen_size_in_GIF" feature. The canvas must not be smaller than the picture ! 2020-12-20 17:48:07 +01:00
Thomas Bernard
c9b1c8a11e HTTP/HTML charset is ISO-8859-1, not ISO8859-1 2020-12-20 11:38:22 +01:00
Adrien Destugues
32ec828835 Group all copyright statements in a single file.
This gives a much clearer overview of the licensing.

It also shows there are some problems:
- Some files are under GPLv3 only
- Some files have no known license at all.
2020-12-19 21:56:33 +00:00
Jordan Christiansen
ff7e5c9ee2 Prevent a file path buffer overrun
If a filename passed from the command line arguments is ever longer than
the current working directory (and it usually is longer), strcpy will
overrun the working directory buffer. This usually doesn't cause a crash
right away, but it caused weird bugs for me, like an assertion failure
in free() when trying to free the buffer later:

    free(): invalid next size (fast)

Valgrind helped me track down the cause:

    $ valgrind bin/grafx2-sdl ~/Projects/kind-of-longish-directory-name/file.gif

    ...

    ==116375== Invalid write of size 1
    ==116375==    at 0x483DDE6: strcpy (vg_replace_strmem.c:511)
    ==116375==    by 0x1265B2: Init_program (main.c:1104)
    ==116375==    by 0x12704F: main (main.c:1536)
    ==116375==  Address 0x5534a81 is 21 bytes after a block of size 28 alloc'd
    ==116375==    at 0x483CD7B: realloc (vg_replace_malloc.c:834)
    ==116375==    by 0x4E70F3F: getcwd (in /usr/lib/libc-2.32.so)
    ==116375==    by 0x17277E: Get_current_directory (io.c:1096)
    ==116375==    by 0x125B02: Init_program (main.c:655)
    ==116375==    by 0x12704F: main (main.c:1536)
2020-12-15 12:25:15 -06:00
Thomas Bernard
6f94186caf add test for packed CPC SCR 2020-12-13 19:53:42 +01:00
Thomas Bernard
10ebb6da7c compare formats[].format to skip compare 2020-12-13 19:53:42 +01:00
Thomas Bernard
095ad1a1ec Read Packed CPC files from ConvImgCPC 2020-12-13 19:53:41 +01:00
Thomas Bernard
2669ba9b06 win32: FindFirstFile/FindNextFile usage fix
fixes http://pulkomandy.tk/projects/GrafX2/ticket/159
2020-12-13 19:17:36 +01:00
Thomas Bernard
aa19b5e748 Read_dir_callback(): prevent buffer overrun 2020-12-13 19:17:36 +01:00
Thomas Bernard
882a2892cf Win32 Drag&Drop: Make sure we are using WCHAR functions and error handling 2020-12-13 19:17:36 +01:00
Thomas Bernard
0915f86aa3 Log errors of GetShortPathNameW/GetLongPathNameW 2020-12-13 19:17:35 +01:00
Thomas Bernard
100776eca7 Win32 debug: show OEM Code Page as well 2020-12-13 19:17:35 +01:00
Thomas Bernard
890682f353 NSTIFFPboardType is deprecated in favor of NSPasteboardTypeTIFF 2020-12-10 22:17:47 +01:00
Thomas Bernard
fbf8c03a2f macos: fix/workaround for systems without pkg-config 2020-12-10 22:17:47 +01:00
Thomas Bernard
7de6a95291 SDL2: restore window position on startup 2020-12-10 00:13:40 +01:00
Thomas Bernard
58c53c33b8 handle more SDL_WINDOWEVENT_xxxx 2020-12-10 00:09:07 +01:00
Thomas Bernard
bfbeaf4ca8 add directory argument to Load_Surface()
You can pass NULL if filename is an absolute path
2020-12-06 22:57:23 +01:00
Thomas Bernard
bdbf942f18 gfx2.rc: FILEOS, FILETYPE, FILESUBTYPE 2020-12-06 12:46:24 +01:00
Thomas Bernard
ea19619b90 gfx2.rc: fix includes for MinGW32
verrsrc.h, not VerRsrc.h
2020-12-06 12:46:12 +01:00
Thomas Bernard
8c6a502589 get RECOILVER from 3rdparty/Makefile 2020-11-10 11:25:35 +01:00
Thomas Bernard
ef905100c3 recoil 5.1.0 => 5.1.1 2020-10-31 12:14:23 +01:00
Thomas Bernard
4434d37e7d 2020. Recoil 5.0.1 => 5.1.0 2020-10-31 12:04:43 +01:00
Thomas Bernard
e2ff6fd441 improve gfx2.ini is corrupt message 2020-06-20 15:41:36 +02:00
Thomas Bernard
080f9ba921 tests: optimize buffer sizes 2020-06-20 15:41:36 +02:00
Thomas Bernard
eafa5b913c improvements in Load_INI() 2020-06-20 15:41:35 +02:00
Thomas Bernard
8ee549d652 tests: add dummy Get_palette_RGB_scale()
returns 256 as it is the default value
2020-05-25 22:05:48 +02:00
Thomas Bernard
81595172a1 ST formats : only save ST palette when RGB scale is 8 2020-05-25 22:00:22 +02:00
Adrien Destugues
f9b6e40f36 Fix doxygen warnings. 2020-05-21 13:03:10 +02:00
Thomas Bernard
341e9611a2 freetype 2.10.1 => 2.10.2, recoil 5.0.0 => 5.0.1 2020-05-16 19:48:58 +02:00
Thomas Bernard
6934277b04 MSVC : _strdup 2020-05-14 00:20:08 +02:00
Thomas Bernard
d24c3e2ebc Warning() => GFX2_Log() 2020-05-14 00:19:02 +02:00
Thomas Bernard
6367ffa5a9 GFX2_MessageBox(): Doxygen + fix return code 2020-05-06 11:38:38 +02:00
Thomas Bernard
89d0a247fc add MB_ICONINFORMATION to GFX2_MB_INFO 2020-05-06 11:34:30 +02:00
Thomas Bernard
795989c5c3 remove outdated comment 2020-05-06 11:25:36 +02:00
Thomas Bernard
16a32f259c remove 2 warnings 2020-05-06 01:19:07 +02:00
Thomas BERNARD
9c7057eab7 Implementation of GFX2_MessageBox() for SDL1.2.x and Mac OS X 2020-05-05 23:42:49 +02:00
Thomas Bernard
b0f1117bbc GFX2_MessageBox()
Especially useful to display startup errors
2020-05-05 21:39:20 +02:00
Thomas Bernard
80ff6f7dfd update help urls 2020-05-05 21:36:04 +02:00
laikh
bff40ba97a Use GCLP_HICON instead of GCL_HICON for 64-bit Windows compatibility 2020-04-21 13:27:33 +08:00
Thomas Bernard
47485a343e fix generatedoc.c 2020-04-19 18:40:19 +02:00
Thomas Bernard
00323b1942 readline.c: fix 8b2e925c 2020-04-13 01:42:45 +02:00
Thomas Bernard
2c9b79a6af Warning() => GFX2_Log(GFX2_WARNING) 2020-04-13 01:34:12 +02:00
Thomas Bernard
7f08ad5bb9 filesel.c: fewer dependencies to <windows.h> 2020-04-13 00:42:45 +02:00
Thomas Bernard
8b2e925c00 readline.c: remove #include <windows.h> 2020-04-13 00:15:09 +02:00
Thomas Bernard
7caddaee89 factory.c: remove #include <windows.h> 2020-04-12 23:53:59 +02:00
Thomas Bernard
857ae29be8 Directory_create()
remove #include <windows.h> from setup.c
2020-04-12 00:47:15 +02:00
Thomas Bernard
f2e1ea8921 GFX2_GetScreenSize()
remove #include <windows.h> in init.c
2020-04-12 00:47:15 +02:00
Thomas Bernard
776884f0fe GFX2_DiskFreeSpace() 2020-04-12 00:47:12 +02:00