Как открыть файл в формате HLP
Потребовалось открыть файл в древнем формате HLP. Оказавается сейчас его ничего не открывает, даже операционная система Виндоуз, под которую он
Возможно существует
diff --ignore-blank-lines --minimal -urd a/winhelpcgi/dib2png.c b/winhelpcgi/dib2png.c
--- winhelpcgi-1.0/winhelpcgi/dib2png.c 2004-06-15 11:38:40.000000000 +0400
+++ winhelpcgi-1.0-patched/winhelpcgi/dib2png.c 2018-11-03 13:59:03.405031382 +0300
@@ -85,7 +85,7 @@
/* Set error handling. REQUIRED if you aren't supplying your own
* error hadnling functions in the png_create_write_struct() call.
*/
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
/* If we get here, we had a problem writing the file */
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
@@ -93,7 +93,7 @@
}
/* Set the I/O callback function to transfer directly to memory */
- png_set_write_fn(png_ptr, (voidp) sbout, user_write_data, NULL);
+ png_set_write_fn(png_ptr, (png_voidp) sbout, user_write_data, NULL);
/* Get access to the windows DIB data */
lpbmi = (LPBITMAPINFOHEADER) GlobalLock(hDIB);Утилита с грехом пополам преобразовала файл в нечитаемый ХТМЛ, который пришлось перекодировать:
/usr/local/bin/winhelpcgi.cgi --tar HELP.HLP |
php -r 'echo mb_convert_encoding(strtr(stream_get_contents(STDIN), ["\0"=>""]),
"CP1252", "HTML-ENTITIES");' > help.htmlПосле этого читать можно, но если
Комментарии 7