Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/xditview/dist initial import of xditview-1.0.6



details:   https://anonhg.NetBSD.org/xsrc/rev/b75d41ee5fdf
branches:  trunk
changeset: 7192:b75d41ee5fdf
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Oct 16 22:56:57 2022 +0000

description:
initial import of xditview-1.0.6

diffstat:

 external/mit/xditview/dist/ChangeLog        |   166 +-
 external/mit/xditview/dist/Dvi.c            |     9 +-
 external/mit/xditview/dist/DviChar.c        |    31 +-
 external/mit/xditview/dist/DviChar.h        |     2 +-
 external/mit/xditview/dist/DviP.h           |    29 +-
 external/mit/xditview/dist/Makefile.am      |     1 +
 external/mit/xditview/dist/Makefile.in      |   141 +-
 external/mit/xditview/dist/README.md        |     2 +-
 external/mit/xditview/dist/XFontName.c      |     3 +-
 external/mit/xditview/dist/aclocal.m4       |  2313 +++---
 external/mit/xditview/dist/config.guess     |  1488 +++--
 external/mit/xditview/dist/config.h.in      |    10 +-
 external/mit/xditview/dist/config.sub       |  2885 +++++----
 external/mit/xditview/dist/configure        |  7903 ++++++++++++++------------
 external/mit/xditview/dist/configure.ac     |     6 +-
 external/mit/xditview/dist/depcomp          |    10 +-
 external/mit/xditview/dist/draw.c           |    61 +-
 external/mit/xditview/dist/font.c           |    59 +-
 external/mit/xditview/dist/install-sh       |   172 +-
 external/mit/xditview/dist/man/Makefile.in  |    19 +-
 external/mit/xditview/dist/man/xditview.man |     4 -
 external/mit/xditview/dist/missing          |    16 +-
 external/mit/xditview/dist/parse.c          |     4 +-
 external/mit/xditview/dist/xditview.c       |    11 +-
 24 files changed, 8212 insertions(+), 7133 deletions(-)

diffs (truncated from 21780 to 300 lines):

diff -r 1d357390ce88 -r b75d41ee5fdf external/mit/xditview/dist/ChangeLog
--- a/external/mit/xditview/dist/ChangeLog      Sun Oct 16 22:56:55 2022 +0000
+++ b/external/mit/xditview/dist/ChangeLog      Sun Oct 16 22:56:57 2022 +0000
@@ -1,3 +1,167 @@
+commit 065c42427d137053dd4490b8aaee9bf3ecd81539
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Oct 15 10:08:17 2022 -0700
+
+    xditview 1.0.6
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 4110fd5e57f5b42d37e821cf56ce5fa59728e3f2
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sun Sep 11 13:06:48 2022 -0700
+
+    Declare guesses const
+    
+    As suggested by cppcheck:
+    
+    parse.c:163:19: style: Variable 'guesses' can be declared with const [constVariable]
+           static int guesses[] = { 1, 4, 100, 1000, 1 };
+                      ^
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit f5cb430f246850e8213fe5cd95b4ea44228f3c3b
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sun Sep 11 12:55:15 2022 -0700
+
+    Avoid leak of new_file if we decide not to use it
+    
+    As warned by cppcheck:
+    xditview.c:338:13: error: Resource leak: new_file [resourceLeak]
+                return;
+                ^
+    xditview.c:342:13: error: Resource leak: new_file [resourceLeak]
+                return;
+                ^
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 776e7c4dae63e2541a6f3822c3e9d659f9af101e
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sun Sep 11 12:45:32 2022 -0700
+
+    Use standard strrchr() instead of ancient rindex()
+    
+    As suggested by cppcheck:
+    
+    xditview.c:359:32: style: Obsolescent function 'rindex' called.
+      It is recommended to use 'strrchr' instead. [rindexCalled]
+        if (name[0] != '/' && (n = rindex (name, '/')))
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 0d1e202f83774543aeb6e66a9dc46160e2bfff5d
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sun Sep 11 12:35:40 2022 -0700
+
+    Inline *Move & *Goto functions
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit ca9c5d01c44fe3a67389f3e6e0bcc34bac09c1c0
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sun Sep 11 12:28:28 2022 -0700
+
+    Delete HorizontalMove macro that shadows/duplicates HorizontalMove function
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 05987580ba303f6d25830bb45ce00229cb8118cc
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sun Sep 11 12:11:11 2022 -0700
+
+    Fix -Wsign-compare warnings
+    
+    xditview.c: In function ‘main’:
+    xditview.c:196:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
+         for (int i = 0; i < XtNumber (popupMenuEntries); i++) {
+                           ^
+    xditview.c:211:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
+         for (int i = 0; i < XtNumber (fileMenuEntries); i++) {
+                           ^
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 770fc7881a48b8d81c9b04d99d29059033234af6
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sun Sep 11 12:07:35 2022 -0700
+
+    Clear -Wmissing-field-initializers warnings
+    
+    DviChar.c:392:1: warning: missing initializer for field ‘buckets’ of ‘DviCharNameMap {aka struct _dviCharNameMap}’ [-Wmissing-field-initializers]
+     };
+     ^
+    In file included from DviChar.c:9:0:
+    DviChar.h:34:22: note: ‘buckets’ declared here
+         DviCharNameHash *buckets[DVI_HASH_SIZE];
+                          ^~~~~~~
+    DviChar.c:658:1: warning: missing initializer for field ‘buckets’ of ‘DviCharNameMap {aka struct _dviCharNameMap}’ [-Wmissing-field-initializers]
+     };
+     ^
+    In file included from DviChar.c:9:0:
+    DviChar.h:34:22: note: ‘buckets’ declared here
+         DviCharNameHash *buckets[DVI_HASH_SIZE];
+                          ^~~~~~~
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit f5656f8b21291713f32d2667e4fe2d98a8771436
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sun Sep 11 12:01:16 2022 -0700
+
+    Use _CONST_X_STRING to make libXt declare String as const char *
+    
+    Clears 42 out of 66 -Wdiscarded-qualifiers warnings from gcc
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit d5ec989d9d0259f1b8138ea3fe0b59e12053a796
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sun Sep 11 11:56:06 2022 -0700
+
+    Variable scope reductions as recommended by cppcheck
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit b6f328961cb098ac34df83052d801769fb4a7ff9
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Apr 2 12:50:33 2022 -0700
+
+    man page: remove out-of-date COPYRIGHT section
+    
+    The information previously listed here didn't match what is present in
+    the source code or the COPYING file, and the X(7) man page doesn't list
+    any license information as this had claimed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 987a18597716e83eb808fbf33e7da9d7f1503dc7
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Dec 4 11:35:16 2021 -0800
+
+    Build xz tarballs instead of bzip2
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 703e442fa656a35149df3460c638f79f3d2f0b07
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Dec 4 11:35:13 2021 -0800
+
+    gitlab CI: add a basic build test
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 2ce24da43a5f8bc7d675b3d061c80bff6172a10c
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sun Nov 28 14:08:25 2021 -0800
+
+    Fix spelling/wording issues
+    
+    Found by using:
+        codespell --builtin clear,rare,usage,informal,code,names
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
 commit 9b5e869ac505bf14b0051dbaabe0de38133f5fd5
 Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
 Date:   Sun Mar 3 11:12:25 2019 -0800
@@ -567,7 +731,7 @@
         against tempfile race conditions in many places)
 
 commit a72338b2f0fef721d6388d292ece4b21f19e9def
-Author: Søren Sandmann Pedersen <sandmann%daimi.au.dk@localhost>
+Author: Søren Sandmann Pedersen  <sandmann%daimi.au.dk@localhost>
 Date:   Wed Jul 6 19:53:30 2005 +0000
 
     Build system for xditview
diff -r 1d357390ce88 -r b75d41ee5fdf external/mit/xditview/dist/Dvi.c
--- a/external/mit/xditview/dist/Dvi.c  Sun Oct 16 22:56:55 2022 +0000
+++ b/external/mit/xditview/dist/Dvi.c  Sun Oct 16 22:56:57 2022 +0000
@@ -60,7 +60,7 @@
 
 /* Private Data */
 /* Note: default_font_map was too long a token for some machines...
- *       therefor it has been split in to and assigned to resources
+ *       therefore it has been split in two and assigned to resources
  *       in the ClassInitialize routine.
  */
 static const char *default_font_map_1 =  "\
@@ -483,7 +483,6 @@
 static void
 ShowDvi (DviWidget dw)
 {
-       int     i;
        long    file_position;
 
        if (!dw->dvi.file) 
@@ -500,7 +499,9 @@
                FileSeek(dw, file_position);
                dw->dvi.current_page = dw->dvi.requested_page;
        } else {
-               for (i=dw->dvi.requested_page; i > 0; i--) {
+               int     i;
+
+               for (i = dw->dvi.requested_page; i > 0; i--) {
                        file_position = SearchPagePosition (dw, i);
                        if (file_position != -1)
                                break;
@@ -515,7 +516,7 @@
                while (dw->dvi.current_page != dw->dvi.requested_page) {
                        dw->dvi.current_page = ParseInput (dw);
                        /*
-                        * at EOF, seek back to the begining of this page.
+                        * at EOF, seek back to the beginning of this page.
                         */
                        if (feof (dw->dvi.file)) {
                                file_position = SearchPagePosition (dw,
diff -r 1d357390ce88 -r b75d41ee5fdf external/mit/xditview/dist/DviChar.c
--- a/external/mit/xditview/dist/DviChar.c      Sun Oct 16 22:56:55 2022 +0000
+++ b/external/mit/xditview/dist/DviChar.c      Sun Oct 16 22:56:57 2022 +0000
@@ -26,11 +26,9 @@
 DviCharNameMap *
 DviFindMap (const char *encoding)
 {
-       struct map_list *m;
-
        if (!standard_maps_loaded)
                load_standard_maps ();
-       for (m = world; m; m=m->next)
+       for (struct map_list *m = world; m; m=m->next)
                if (!strcmp (m->map->encoding, encoding))
                        return m->map;
        return NULL;
@@ -60,12 +58,12 @@
 dispose_hash (DviCharNameMap *map)
 {
        DviCharNameHash **buckets;
-       DviCharNameHash *h, *next;
-       int             i;
 
        buckets = map->buckets;
-       for (i = 0; i < DVI_HASH_SIZE; i++) {
-               for (h = buckets[i]; h; h=next) {
+       for (int i = 0; i < DVI_HASH_SIZE; i++) {
+               DviCharNameHash *next;
+
+               for (DviCharNameHash *h = buckets[i]; h; h = next) {
                        next = h->next;
                        XtFree ((char *) h);
                }
@@ -88,14 +86,15 @@
 compute_hash (DviCharNameMap *map)
 {
        DviCharNameHash **buckets;
-       int             c, s, i;
-       DviCharNameHash *h;
 
        buckets = map->buckets;
-       for (i = 0; i < DVI_HASH_SIZE; i++)
+       for (int i = 0; i < DVI_HASH_SIZE; i++)
                buckets[i] = NULL;
-       for (c = 0; c < DVI_MAP_SIZE; c++)
-               for (s = 0; s < DVI_MAX_SYNONYMS; s++) {
+       for (int c = 0; c < DVI_MAP_SIZE; c++) {
+               for (int s = 0; s < DVI_MAX_SYNONYMS; s++) {
+                       DviCharNameHash *h;
+                       int             i;
+
                        if (!map->dvi_names[c][s])
                                break;
                        i = hash_name (map->dvi_names[c][s]) % DVI_HASH_SIZE;
@@ -105,7 +104,7 @@
                        h->name = map->dvi_names[c][s];
                        h->position = c;
                }
-       
+       }
 }
 
 int
@@ -389,7 +388,8 @@
 {   "Fi",          "ffi",   },
 {   "Fl",          "ffl",   },
 {   NULL,          NULL,    },
-}
+},
+{}
 };
 
 static DviCharNameMap Adobe_Symbol_map = {
@@ -655,7 +655,8 @@
 },
 {
 {      NULL,       NULL        },
-}
+},
+{}


Home | Main Index | Thread Index | Old Index