Commit Graph

54 Commits

Author SHA1 Message Date
Peter Howkins db779f870e libDtHelp: Cov 87607 2018-08-11 00:21:18 +01:00
Peter Howkins adb9a3d8cd libDtHelp: Coverity 88440 2018-07-04 01:40:12 +01:00
Peter Howkins 1fb5110337 libDtHelp: 88550 2018-07-04 01:38:14 +01:00
Peter Howkins a7e09ae1c3 libDtHelp: Coverity 88665 2018-07-04 01:36:03 +01:00
Peter Howkins 9383267ded libDtHelp: Coverity 88906 2018-07-04 01:34:02 +01:00
Peter Howkins 25c12cad4a libDtHelp: Coverity 88813 2018-07-04 01:32:53 +01:00
Peter Howkins 49b69c257a libDtHelp: Coverity 89548 2018-07-04 01:31:19 +01:00
Peter Howkins 045643d4db libDtHelp: Coverity 88776 2018-07-04 01:29:49 +01:00
Jon Trulson 5b5ac72691 lib/DtHelp: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson 2760adaab3 lib/DtHelp/jpeg: remove register keyword 2018-06-27 21:58:04 -06:00
Jon Trulson e9d0d91cad lib/DtHelp/il: remove register keyword 2018-06-27 21:58:04 -06:00
Peter Howkins e43dbc5460 libDtHelp: Change to ANSI function definitions 2018-06-28 03:53:31 +01:00
chase 809c3d8bb6 Spelling fixes 2018-05-31 22:23:19 -06:00
Ulrich Wilkens 297b6bd845 Fix warnings on FreeBSD 2018-05-31 22:04:08 -06:00
chase 4f5e7fe5e3 Use POSIX macros for linux 2018-05-24 18:22:55 -06:00
chase 164e695cd0 remove OSF1 support 2018-05-24 14:25:26 -06:00
chase 07900bd93b Remove Unixware and openserver support 2018-05-20 12:13:07 -06:00
chase 8a4f389634 Remove UXPDS support 2018-05-15 20:27:22 -06:00
chase 33d2749ea3 Last of the spelling fixed 2018-04-28 12:36:44 -06:00
chase 6d3a19d8f9 Even more spelling fixed 2018-04-28 12:36:33 -06:00
chase 1fe5a550b2 Fix typo in license headers 2018-04-28 12:30:20 -06:00
chase 07722f5c13 More spelling fixes 2018-04-22 12:15:08 -06:00
Jon Trulson f4e3cb8327 dthelp/FormatUtils: fix coredump in dthelpgen due to free() of a bad address 2018-04-10 16:30:25 -06:00
Swift Griggs 1fdcd4c93d Patches from pkgsrc-WIP 2016-08-05 11:21:06 -06:00
Peter Howkins f8f04a5977 libDtHelp: Resolve 11 compiler warnings. 2015-01-14 11:41:38 +00:00
Jon Trulson 17379a3fc0 DtHelp: Coverity (memory corruption, moderate) 2014-12-26 15:50:41 -07:00
Jon Trulson 7887e99477 DtHelp: Coverity (memory corruption, moderate) 2014-12-26 15:49:43 -07:00
Jon Trulson 9751abddff DtHelp: Coverity (memory corruption) 2014-12-26 13:42:23 -07:00
Ulrich Wilkens 01d6c363fa OpenIndiana and Solaris port 2014-10-28 13:40:11 -06:00
Ulrich Wilkens c3f74eec17 FreeBSD 10 clang port 2014-07-27 12:32:35 -06:00
Peter Tribble 468d576030 initial illumos port 2014-03-22 16:33:11 -06:00
Ulrich Wilkens 2712d5f787 NetBSD port 2014-02-22 19:12:19 -07:00
Ulrich Wilkens 6b0da8f335 Introduction of BSDArchitecture 2013-10-20 16:23:40 -06:00
Ulrich Wilkens 2d08153289 correction of message files 2013-09-15 19:35:53 -06:00
Ulrich Wilkens a4ab06ac1e lib/DtHelp: added missing include. 2013-07-25 18:29:33 -06:00
Pascal Stumpf 7e0a9517e3 Silence lots of warnings in lib/DtHelp.
* 64bit warnings
* Missing prototypes
* explicit parentheses / brackets

There's still some work to be done, but, as always, it's a start ...
2013-07-22 17:19:13 -06:00
Peter Howkins 21feacd159 libdthelp: Resolve 65 -Wunused-variable warnings 2012-11-09 17:20:46 +00:00
Peter Howkins cd39eabb18 libdthelp: resolve 46 compiler warnings 2012-10-08 15:34:45 +01:00
Marcin Cieslak 775fb0f0f1 Don't break help with gcc -O2
libDtHelp is unable to read SDL help files
with -ftree-store-ccp optimization which
is enabled by -O2 on gcc 4.2.1.

GifUtils.c and decompress.c didn't work
properly with -ftree-store-ccp enabled.

GifUtils.c was repaired by fixing
those warnings:

GifUtils.c: In function 'create_pixmap':
GifUtils.c:1093: warning: return makes integer from pointer without a cast
GifUtils.c:1110: warning: return makes integer from pointer without a cast
GifUtils.c:1215: warning: return makes integer from pointer without a cast
GifUtils.c: In function 'gif_to_pixmap':
GifUtils.c:1242: warning: return makes integer from pointer without a cast

decompress.c didn't generate warnings, but the
only effect of the -ftree-store-cpp was to introduce
this change:

        addq    $1, %rax
        movq    %rax, (%rbx)
 .L90:
-       cmpl    $157, %edx
+       cmpl    $-99, %edx
        jne     .L86
        movl    8(%rbx), %eax
        subl    $1, %eax

Which corresponds to this source code:

bufioI.h

     57 #define BufFileGet(f)   ((f)->left-- ? *(f)->bufp++ : (*(f)->io) (f))

     42     int     (*io)(/* BufFilePtr f */);

decompress.c
     53 #ifdef NO_UCHAR
     54  typedef char   char_type;
     55 #else
     56  typedef        unsigned char   char_type;
     57 #endif /* UCHAR */
     58
     59 static  char_type magic_header[] = { "\037\235" };      /* 1F 9D */

    131     if ((BufFileGet(f) != (magic_header[0] & 0xFF)) ||
    132         (BufFileGet(f) != (magic_header[1] & 0xFF)))
    133     {
    134         return 0;
    135     }

BufFileGet() returns (int), so the (unsigned char) constants
got promoted to (int) with sign extension; therefore constant
157 decimal (0x9D) became -99 decimal, sign extended
(0xffffff9D), and the comparison was always false.

Tested using:
$ gcc -v
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]

Running on:
FreeBSD 10.0-CURRENT (r240948M)
built Wed Sep 26 23:33:08 CEST 2012
2012-10-01 18:59:14 -06:00
Frederic Koehler 4773d68153 dthelp: Avoid undefined behaviour in strcpy
Technically strcpy's ranges cannot overlap at all,
although in practice this is usually not an issue.
Does quiet a valgrind warning, however.
2012-09-29 19:21:27 -06:00
Marcin Cieslak 917f7da191 157 warnings: remove -DXK_MISCELLANY from Makefiles
Fixes the following warning:

In file included from ../../../imports/x11/include/X11/Xutil.h:54,
                 from ../../../imports/x11/include/X11/Intrinsic.h:54,
                 from Action.c:64:
../../../imports/x11/include/X11/keysym.h:49:1: warning: "XK_MISCELLANY" redefined
<command-line>: warning: this is the location of the previous definition

<keysym.h> which includes all key symbols and loads <keysymdef.h>
is automaticlly included by the X Toolkit.

This patch removes #include <keysymdef.h> whenever not needed,
and adds #define XK_MISCALLANY in the source code where required.
2012-09-24 18:30:21 -06:00
Jon Trulson a29fc20957 message catalogs: fix comment lines, also remove linux hack in merge.c
According to the spec, blank lines in message catalogs or lines
beginning with '$ ' are valid comments.

However, there were many cases where lines in the message catalogs
contained just a single '$', without the required space after it.

Under linux, this caused 126766 error lines (in my builds) of the
form:

... unknown directive `': line ignored

This also causes gencat to exit with a non-0 exit code.  Even though
gencat says it ignores the line, it really doesn't.

An early porting change to programs/localized/util/merge.c was made to
ignore this return value on linux.  This hack has now been removed.

Build logs are a lot smaller and cleaner now.
2012-09-03 15:12:57 -06:00
Peter Howkins 0b623d4b63 lib/DtHelp: Include <stdio.h> to prevent warnings about implicit declartion of free() 2012-08-22 12:10:10 +01:00
Ulrich Wilkens 7bdb847210 Process sgml and man files in doc directory for FreeBSD. 2012-08-15 15:56:03 -06:00
Jon Trulson fa3ad160e4 Fix broken linux builds caused by recent DtHelp/Imakefile jpeg change
A patch from Pascal Stumpf using external jpeg broke linux builds,
since libjpeg needs to be linked in when using a remote jpeg lib.

So, in lnxLib.tmpl, define SharedDtHelpReqs so -ljpeg is used.  Also,
in DtHelp/Imakefile, use proper Arch defines so external jpeg libs are
only used on linux, fbsd, and obsd systems.
2012-08-12 17:31:28 -06:00
Pascal Stumpf 0bbd4ff9aa Get rid of malloc.h.
This is a non-POSIX/ISO-C header.  It is ok to include this on Linux, but it
is obsolete on BSD; FreeBSD even throws an error if you include it with
__STDC__ defined.  Every system should nowadays have malloc() defined in
stdlib.h.

Diff is largely mechanical, replacing malloc.h with stdlib.h where it is not
yet included anyway.
2012-08-12 14:20:58 -06:00
Pascal Stumpf aa9ea72bfb Do not use internal libjpeg.
Nowadays, OpenMotif is itself linked to libjpeg, so pulling in another
version of it causes symbol size mismatches, not to mention the maintenance
burden and security implications arising from keeping our own copy of libjpeg.

We still need some of the header files provided here because they are internal
to libjpeg and not installed on most distributions.
2012-08-12 14:20:57 -06:00
Pascal Stumpf 131c7a9e04 Imakefile diffs for OpenBSD. 2012-08-11 19:23:43 -06:00
Jon Trulson 75f2f96793 libDtHelp: fix up some warnigs and potential overruns 2012-07-12 18:03:54 -06:00
Jon Trulson fff18bf2b7 doc/help localization changes
- by default, do not build any other locale than C for now
- do not try to build the guides.  These require functioning
  dtinfo/docbook
- add a Linux.lcx locale translation db.  Not used yet.
- fix some overflows in dtdocbook/instant
2012-06-18 22:01:02 -06:00