slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] two small slang2 patches


Hi,

So far there have been no significant problems reported.
Nevertheless,  here are a couple of patches that fix a couple of
problems that I discovered.

The first patch is to modules/png.sl.  An assignment to 'gray' was
missing from the png_gray_to_rgb function.  The second patch is to
slsh/lib/print.sl.  It causes SIGPIPE to be ignored while in the
pager.

Thanks,
--John

diff -ur release/slang-2.0.0/modules/png.sl ./modules/png.sl
--- release/slang-2.0.0/modules/png.sl	Sun Apr 24 12:43:09 2005
+++ ./modules/png.sl	Wed Apr 27 00:25:40 2005
@@ -95,7 +95,7 @@
      return gray_to_rgb_with_cmap ();
 
    gray = ();
-   normalize_gray (gray);
+   gray = normalize_gray (gray);
    return gray + (gray shl 8) + (gray shl 16);
 }
 
diff -ur release/slang-2.0.0/slsh/lib/print.sl ./slsh/lib/print.sl
--- release/slang/slang-2.0.0/slsh/lib/print.sl	Sun Apr 24 12:43:09 2005
+++ ./slsh/lib/print.sl	Wed Apr 27 01:11:41 2005
@@ -3,8 +3,16 @@
 if (Pager == NULL)
   Pager = "more";
 
+#ifexists SIGPIPE
+static variable Sigpipe_Handler;
+#endif
+
 static define open_pager ()
 {
+#ifexists SIGPIPE
+   signal (SIGPIPE, SIG_IGN, &Sigpipe_Handler);
+#endif
+
    return popen (Pager, "w");
 }
 
@@ -12,6 +20,10 @@
 {
    if (fp != NULL)
      () = pclose (fp);
+#ifexists SIGPIPE
+   signal (SIGPIPE, Sigpipe_Handler);
+#endif
+
 }
 
 static define generic_to_string (x)


_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]