Source-Changes-HG archive

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

[xsrc/trunk]: xsrc/external/mit/bitmap/dist initial import of bitmap-1.1.0



details:   https://anonhg.NetBSD.org/xsrc/rev/032acde4aacd
branches:  trunk
changeset: 7003:032acde4aacd
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Jul 11 08:00:23 2022 +0000

description:
initial import of bitmap-1.1.0

diffstat:

 external/mit/bitmap/dist/BitEdit.c               |    2 +-
 external/mit/bitmap/dist/Bitmap.c                |   30 +-
 external/mit/bitmap/dist/Bitmap.h                |    6 +-
 external/mit/bitmap/dist/BitmapP.h               |    3 +-
 external/mit/bitmap/dist/ChangeLog               |  133 +++++++-
 external/mit/bitmap/dist/Dialog.c                |    4 +-
 external/mit/bitmap/dist/Dialog.h                |    4 +-
 external/mit/bitmap/dist/Makefile.am             |   30 +-
 external/mit/bitmap/dist/Makefile.in             |  400 +++++++++++++++++++++-
 external/mit/bitmap/dist/README.md               |    2 +-
 external/mit/bitmap/dist/ReqMach.c               |    6 +-
 external/mit/bitmap/dist/atobm.c                 |   15 +-
 external/mit/bitmap/dist/bitmaps/Dashes          |    4 +
 external/mit/bitmap/dist/bitmaps/Down            |   13 +
 external/mit/bitmap/dist/bitmaps/Excl            |   17 +
 external/mit/bitmap/dist/bitmaps/FlipHoriz       |   13 +
 external/mit/bitmap/dist/bitmaps/FlipVert        |   13 +
 external/mit/bitmap/dist/bitmaps/Fold            |   13 +
 external/mit/bitmap/dist/bitmaps/Left            |   13 +
 external/mit/bitmap/dist/bitmaps/Right           |   13 +
 external/mit/bitmap/dist/bitmaps/RotateLeft      |   13 +
 external/mit/bitmap/dist/bitmaps/RotateRight     |   13 +
 external/mit/bitmap/dist/bitmaps/Stipple         |    4 +
 external/mit/bitmap/dist/bitmaps/Term            |   14 +
 external/mit/bitmap/dist/bitmaps/Up              |   13 +
 external/mit/bitmap/dist/configure               |   24 +-
 external/mit/bitmap/dist/configure.ac            |    5 +-
 external/mit/bitmap/dist/man/bitmap.man          |    8 +-
 external/mit/bitmap/dist/test-driver             |  148 ++++++++
 external/mit/bitmap/dist/test/round-trip-test.in |   27 +
 30 files changed, 913 insertions(+), 90 deletions(-)

diffs (truncated from 1552 to 300 lines):

diff -r 04bfd75597a0 -r 032acde4aacd external/mit/bitmap/dist/BitEdit.c
--- a/external/mit/bitmap/dist/BitEdit.c        Mon Jul 11 07:32:18 2022 +0000
+++ b/external/mit/bitmap/dist/BitEdit.c        Mon Jul 11 08:00:23 2022 +0000
@@ -226,7 +226,7 @@
 static Pixmap check_mark;
 static Dialog input_dialog, error_dialog, qsave_dialog;
 static Time btime;
-static String filename = NULL, base_name = NULL, format;
+static char *filename = NULL, *base_name = NULL, *format;
 static char message[80];
 
 
diff -r 04bfd75597a0 -r 032acde4aacd external/mit/bitmap/dist/Bitmap.c
--- a/external/mit/bitmap/dist/Bitmap.c Mon Jul 11 07:32:18 2022 +0000
+++ b/external/mit/bitmap/dist/Bitmap.c Mon Jul 11 08:00:23 2022 +0000
@@ -648,7 +648,7 @@
 }
 #endif
 
-static String
+static char *
 StripFilename(_Xconst _XtString filename)
 {
     const char *begin = strrchr(filename, '/');
@@ -688,7 +688,7 @@
        file = fopen(filename, "w+");
 
     if (file) {
-       String new_basename;
+       char *new_basename;
 
        if (!basename || !strcmp(basename, "") || !strcmp(basename, "-"))
            basename = new_basename = StripFilename(filename);
@@ -963,12 +963,14 @@
 
   status = XParseGeometry(size, &x, &y, &w, &h);
 
-  if (status & (WidthValue | HeightValue)) {
+  if (status & WidthValue) {
     *width = (Dimension) w;
-    *height = (Dimension) h;
-    return True;
+    if (status & HeightValue) {
+      *height = (Dimension) h;
+      return True;
+    }
   }
-  else return False;
+  return False;
 
 }
 
@@ -1227,8 +1229,8 @@
     return status;
 }
 
-String
-BWGetFilename(Widget w, String *str)
+_XtString
+BWGetFilename(Widget w, _XtString *str)
 {
     BitmapWidget BW = (BitmapWidget) w;
 
@@ -1237,11 +1239,11 @@
     return *str;
 }
 
-String
-BWGetFilepath(Widget w, String *str)
+_XtString
+BWGetFilepath(Widget w, _XtString *str)
 {
     BitmapWidget BW = (BitmapWidget) w;
-    String end;
+    _XtString end;
 
     *str = XtNewString(BW->bitmap.filename);
     assert(*str);
@@ -1257,8 +1259,8 @@
 }
 
 
-String
-BWGetBasename(Widget w, String *str)
+_XtString
+BWGetBasename(Widget w, _XtString *str)
 {
     BitmapWidget BW = (BitmapWidget) w;
 
@@ -1389,7 +1391,7 @@
     BW->bitmap.mark.to_x = NotSet;
     BW->bitmap.mark.to_y = NotSet;
     BW->bitmap.zooming = True;
-    BW->bitmap.grid = True; /* potencially true, could use a resource here */
+    BW->bitmap.grid = True; /* potentially true, could use a resource here */
 
     FixHotSpot(BW);
 
diff -r 04bfd75597a0 -r 032acde4aacd external/mit/bitmap/dist/Bitmap.h
--- a/external/mit/bitmap/dist/Bitmap.h Mon Jul 11 07:32:18 2022 +0000
+++ b/external/mit/bitmap/dist/Bitmap.h Mon Jul 11 08:00:23 2022 +0000
@@ -227,8 +227,8 @@
 extern int BWReadFile ( Widget w, _Xconst _XtString filename, _Xconst _XtString basename );
 extern int BWWriteFile ( Widget w, _Xconst _XtString filename, _Xconst _XtString basename );
 extern String BWUnparseStatus ( Widget w );
-extern String BWGetFilename ( Widget w, String *str );
-extern String BWGetBasename ( Widget w, String *str );
+extern _XtString BWGetFilename ( Widget w, _XtString *str );
+extern _XtString BWGetBasename ( Widget w, _XtString *str );
 extern void BWChangeBasename ( Widget w, _Xconst _XtString str );
 extern void BWRemoveAllRequests ( Widget w );
 extern void BWClearHotSpot ( Widget w );
@@ -250,7 +250,7 @@
 extern void BWRedrawMark ( Widget w );
 extern Boolean BWQueryAxes ( Widget w );
 extern void BWHighlightAxes ( Widget w );
-extern String BWGetFilepath ( Widget w, String *str );
+extern _XtString BWGetFilepath ( Widget w, _XtString *str );
 extern void BWZoomOut ( Widget w );
 extern void BWZoomMarked ( Widget w );
 extern void BWRescale ( Widget w, Dimension width, Dimension height );
diff -r 04bfd75597a0 -r 032acde4aacd external/mit/bitmap/dist/BitmapP.h
--- a/external/mit/bitmap/dist/BitmapP.h        Mon Jul 11 07:32:18 2022 +0000
+++ b/external/mit/bitmap/dist/BitmapP.h        Mon Jul 11 08:00:23 2022 +0000
@@ -119,7 +119,8 @@
   Dimension        margin, squareW, squareH, width, height;
   XPoint           hot;
   int              button_function[5];
-  String           filename, basename;
+  _XtString        filename;
+  _XtString        basename;
   /* private state */
   String           size;
   Position         horizOffset, vertOffset;
diff -r 04bfd75597a0 -r 032acde4aacd external/mit/bitmap/dist/ChangeLog
--- a/external/mit/bitmap/dist/ChangeLog        Mon Jul 11 07:32:18 2022 +0000
+++ b/external/mit/bitmap/dist/ChangeLog        Mon Jul 11 08:00:23 2022 +0000
@@ -1,3 +1,130 @@
+commit b3e36bd9e5c72f4d8045b13ec066826545560361
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Apr 30 13:22:09 2022 -0700
+
+    bitmap 1.1.0
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 13ac2639c3c88bb6c7ecaae541941203e6344ad0
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Apr 9 16:26:14 2022 -0700
+
+    gitlab CI: stop requiring Signed-off-by in commits
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit b8090d0f5bee66ceb12cee2b63425efd74ad4610
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Apr 9 16:11:45 2022 -0700
+
+    atobm: close memory leaks
+    
+    Fix leaks reported by Oracle Parfait (though they don't last long,
+    since the program exits immediately after leaking):
+    
+    Error: Memory leak
+       Memory leak [memory-leak] (CWE 401):
+          Memory leak of pointer pointer allocated with _new_scan_list(bytes_per_scanline)
+            at line 260 of atobm.c in function 'doit'.
+            calloc called at line 180 in function '_new_scan_list'
+            Allocated value returned to caller at line 193
+              pointer allocated at line 250 in function 'doit' with _new_scan_list(bytes_per_scanline)
+              pointer leaks when (i + 1) >= <unknown> at line 275
+                  and buf[0] != 0 at line 225.
+    
+    Error: Memory leak
+       Memory leak [memory-leak] (CWE 401):
+          Memory leak of pointer pointer allocated with _new_scan_list(bytes_per_scanline)
+            at line 316 of atobm.c in function 'doit'.
+            calloc called at line 180 in function '_new_scan_list'
+            Allocated value returned to caller at line 193
+              pointer allocated at line 250 in function 'doit' with _new_scan_list(bytes_per_scanline)
+              pointer leaks when slist != NULL at line 252
+                  and (i + 1) >= <unknown> at line 275
+                  and (i + 1) >= <unknown> at line 303.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit c6b48ffeb65182bf5989df299c6a7fcccb3cb09a
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Apr 9 15:56:57 2022 -0700
+
+    atobm: accept single character lines
+    
+    Fixes round-trip-test failure on hlines2
+    
+    The previous behavior has been present since the initial checkin of the
+    code to the X Consortium monolith, but no explanation was given for why
+    a single-character line should be skipped.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit fa7241ac10bf9b47c3d20d557fdca0aa0a468484
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Apr 9 15:42:10 2022 -0700
+
+    test: add round-trip-test for atobm & bmtoa
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 7c4196d3218d1afa73c930577beeb579c1e87a38
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Apr 9 12:44:34 2022 -0700
+
+    Move bitmaps into a new bitmaps directory
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 7886e0b78ba317e02d8496fb83432ee9274f7887
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Fri Dec 3 14:35:15 2021 -0800
+
+    Build xz tarballs instead of bzip2
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 14181d27e8ceb6c25051d63698fb34cf28911a5e
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Fri Dec 3 14:35:06 2021 -0800
+
+    gitlab CI: add a basic build test
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit e0adae1b8e19f9bedc4cb1a3798736812cb490a6
+Author: Jeremy Mates <jeremy.mates%gmail.com@localhost>
+Date:   Fri May 14 11:34:42 2021 -0400
+
+    bitmap: Fix a crash with underspecified dimensions
+    
+    From the reporter on #xorg-devel:
+    
+    -!- thrig [thrig@unaffilaited/thrig] has joined #xorg-devel
+    <thrig> where does the code for bitmap live? there's a crash (or who
+            knows on some platforms) if you `bitmap -size 42`
+
+commit f0b589b685cc3d9f684d9423250f798a8f93142f
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Thu Jul 23 10:20:54 2020 -0700
+
+    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 3a2473affe1e15d6e8d252db7ec5e22fd1683978
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Jun 1 19:27:15 2019 -0700
+
+    Use _CONST_X_STRING to make libXt declare String as const char *
+    
+    Clears 169 out of 240 -Wdiscarded-qualifiers warnings from gcc 7.3
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
 commit 6dcc9c8064baeb2f9d853309123cd9736809a4fd
 Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
 Date:   Sun Feb 10 13:01:27 2019 -0800
@@ -944,7 +1071,7 @@
     Add bitmap.icon to EXTRA_DIST
 
 commit c3f282e1aa6176896089ea79be84b7250888a65c
-Author: Kristian Høgsberg <krh%redhat.com@localhost>
+Author: Kristian Høgsberg  <krh%redhat.com@localhost>
 Date:   Thu Sep 29 18:22:01 2005 +0000
 
     Add Bitmap-nocase app default file to APPDEFAULTFILES.
@@ -997,13 +1124,13 @@
         against tempfile race conditions in many places)
 
 commit cc48a5df41c59071eab0f58818366e10cb1ff4ac
-Author: Søren Sandmann Pedersen <sandmann%daimi.au.dk@localhost>
+Author: Søren Sandmann Pedersen  <sandmann%daimi.au.dk@localhost>
 Date:   Fri Jul 15 16:52:07 2005 +0000
 
     Add dependency on xbitmaps
 
 commit c6129c090ad25cd2f8b191f503ac6e8cd452a31d
-Author: Søren Sandmann Pedersen <sandmann%daimi.au.dk@localhost>
+Author: Søren Sandmann Pedersen  <sandmann%daimi.au.dk@localhost>
 Date:   Wed Jul 6 15:47:38 2005 +0000
 
     Build system for bitmap
diff -r 04bfd75597a0 -r 032acde4aacd external/mit/bitmap/dist/Dialog.c
--- a/external/mit/bitmap/dist/Dialog.c Mon Jul 11 07:32:18 2022 +0000
+++ b/external/mit/bitmap/dist/Dialog.c Mon Jul 11 08:00:23 2022 +0000
@@ -127,7 +127,7 @@
 }
 
 void



Home | Main Index | Thread Index | Old Index