[Pkg-jed-commit] r742 - in jed/branches/0.99.19/debian: . patches

Jörg Sommer jo-guest at alioth.debian.org
Fri May 25 16:32:54 UTC 2007


Author: jo-guest
Date: 2007-05-25 16:32:54 +0000 (Fri, 25 May 2007)
New Revision: 742

Added:
   jed/branches/0.99.19/debian/patches/extend-manpage.dpatch
   jed/branches/0.99.19/debian/patches/fix-warnings.dpatch
   jed/branches/0.99.19/debian/patches/slang2.dpatch
   jed/branches/0.99.19/debian/patches/x_toggle_visibility.dpatch
Modified:
   jed/branches/0.99.19/debian/changelog
   jed/branches/0.99.19/debian/patches/00list
Log:
• debian/patches/extend-manpage.dpatch
  · Describes the different modes of Jed.

• debian/patches/x_toggle_visibility.dpatch
  · Adds a new function to XJed for switching the window between visible and
    invisible.

• debian/patches/slang2.dpatch
  · Adaptions of the code on the new SLang 2 syntax.

• debian/patches/fix-warnings.dpatch
  · Removes some compiler warnings.


Modified: jed/branches/0.99.19/debian/changelog
===================================================================
--- jed/branches/0.99.19/debian/changelog	2007-05-25 13:09:29 UTC (rev 741)
+++ jed/branches/0.99.19/debian/changelog	2007-05-25 16:32:54 UTC (rev 742)
@@ -1,3 +1,19 @@
+jed (1:0.99.19~pre78-2) UNRELEASED; urgency=low
+
+  * Added Jörg Sommer to the list of uploaders. [JS]
+
+  * Described the operation modes of jed in the manpage. [JS]
+
+  * Replaced and removed old SLang code that is deprecated since SLang2. [JS]
+
+  * Added a new function x_toggle_visibility to XJed that shows or hides the
+    window. [JS]
+
+  * Fixed some warnings they show up when building with additional compiling
+    checks. [JS]
+
+ -- Rafael Laboissiere <rafael at debian.org>  Fri, 25 May 2007 17:59:08 +0200
+
 jed (1:0.99.19~pre78-1) experimental; urgency=low
 
   * Use an epoch in the package version number, since the unstable branch

Modified: jed/branches/0.99.19/debian/patches/00list
===================================================================
--- jed/branches/0.99.19/debian/patches/00list	2007-05-25 13:09:29 UTC (rev 741)
+++ jed/branches/0.99.19/debian/patches/00list	2007-05-25 16:32:54 UTC (rev 742)
@@ -1,3 +1,5 @@
+extend-manpage
+
 50_README
 50_jed-manpage
 50_jed.tex
@@ -13,4 +15,6 @@
 #endif
 
 fix-multi-key
-
+slang2
+x_toggle_visibility
+fix-warnings

Added: jed/branches/0.99.19/debian/patches/extend-manpage.dpatch
===================================================================
--- jed/branches/0.99.19/debian/patches/extend-manpage.dpatch	                        (rev 0)
+++ jed/branches/0.99.19/debian/patches/extend-manpage.dpatch	2007-05-25 16:32:54 UTC (rev 742)
@@ -0,0 +1,71 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## extend-manpage.dpatch by Jörg Sommer <joerg at alea.gnuu.de>
+##
+## DP: This patch improves the manpage of jed.
+
+ at DPATCH@
+Index: jed/doc/manual/jed.1
+===================================================================
+--- jed~/doc/manual/jed.1	(Revision 60)
++++ jed/doc/manual/jed.1	(Arbeitskopie)
+@@ -7,7 +7,7 @@
+ .SH NAME
+ Jed \- programmers editor
+ .SH SYNOPSIS
+-.B jed [options] 
++.B jed [mode] [options] 
+ .I file
+ .B ...
+ .SH DESCRIPTION
+@@ -29,12 +29,42 @@
+ For complete documentation, see GNU info files, this manual only
+ provides brief tutorial.
+ .SH OPTIONS
++.SS mode
++The
++.B mode
++argument starts Jed is a special mode. Only one of the following can be
++given.
+ .LP
+ .I \-batch
+ .RS
+ run Jed in batch mode.
+ This is a non-interactive mode.
+ .RE
++.I \-secure
++.RS
++run Jed in secure mode, e.g. you can't run any external commands with
++.I system()
++or
++.I run_shell_cmd()
++.RE
++.I \-\-script
++.RS
++this is a mode like
++.I \-\-batch
++but jed does not eval the startup files. It behaves like
++.I slsh.
++You must give the file that should be evaluated as second argument
++.RE
++.I \-\-help
++.RS
++prints usage information
++.RE
++.I \-\-version
++.RS
++prints the version and compiletime variables.
++
++.SS other options
++.RE
+ .I \-n             
+ .RS
+ do not load 
+@@ -87,7 +117,7 @@
+ .RE
+ .LP
+ JED's ability to create new functions using the 
+-.I S\--Lang 
++.I S\-Lang 
+ programming language as well as allowing the user to choose key bindings,
+ makes the emulation of other editors possible. Currently, JED provides
+ reasonable emulation of the

Added: jed/branches/0.99.19/debian/patches/fix-warnings.dpatch
===================================================================
--- jed/branches/0.99.19/debian/patches/fix-warnings.dpatch	                        (rev 0)
+++ jed/branches/0.99.19/debian/patches/fix-warnings.dpatch	2007-05-25 16:32:54 UTC (rev 742)
@@ -0,0 +1,66 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix-warnings.dpatch by Jörg Sommer <joerg at alea.gnuu.de>
+##
+## DP: If compiling the code with gcc -Wformat=2 -Wunused -Wundef -Wextra -Wall
+## DP: some warnings are printed:
+## DP:  src/screen.c: In function ‘display_line_numbers’:
+## DP:  src/screen.c:351: warning: format not a string literal, argument types not checked
+## DP:  src/mouse.c: In function ‘do_mouse_cmd’:
+## DP:  src/mouse.c:403: warning: ‘linenum’ may be used uninitialized in this function
+## DP:  src/xterm.c: In function ‘load_font’:
+## DP:  src/xterm.c:1667: warning: missing sentinel in function call
+
+ at DPATCH@
+diff -urNad 0.99.19~/src/mouse.c 0.99.19/src/mouse.c
+--- 0.99.19~/src/mouse.c	2006-03-26 00:55:45.000000000 +0100
++++ 0.99.19/src/mouse.c	2007-05-25 17:19:40.270248336 +0200
+@@ -400,7 +400,7 @@
+ static int do_mouse_cmd (JMouse_Type *jmouse, unsigned int type) /*{{{*/
+ {
+    int button, shift;
+-   int linenum, column, is_status;
++   int linenum = -1, column, is_status;
+    int ret;
+    SLang_Name_Type *fun, *default_fun;
+    Jed_Buffer_Hook_Type *h = CBuf->buffer_hooks;
+diff -urNad 0.99.19~/src/screen.c 0.99.19/src/screen.c
+--- 0.99.19~/src/screen.c	2007-05-25 16:11:39.000000000 +0200
++++ 0.99.19/src/screen.c	2007-05-25 17:19:40.270248336 +0200
+@@ -298,7 +298,7 @@
+ {
+    unsigned int i, imin, imax, linenum;
+    Line *line_start, *line;
+-   char buf[32], format[32];
++   char buf[32];
+    unsigned int c;
+ 
+    imin = JWindow->sy;
+@@ -328,7 +328,6 @@
+ 	line = line->prev;
+      }
+ 
+-   sprintf (format, "%%%dd ", CBuf->line_num_display_size-1);
+    SLsmg_set_color (JLINENUM_COLOR);
+    c = JWindow->sx;
+ 
+@@ -348,7 +347,7 @@
+ 	  }
+ 
+ 	SLsmg_gotorc (i, c);
+-	sprintf (buf, format, linenum);
++	sprintf (buf, "%*d", CBuf->line_num_display_size-1, linenum);
+ 	SLsmg_write_string (buf);
+ 
+ 	line = line->next;
+diff -urNad 0.99.19~/src/xterm.c 0.99.19/src/xterm.c
+--- 0.99.19~/src/xterm.c	2007-05-25 17:19:39.838248336 +0200
++++ 0.99.19/src/xterm.c	2007-05-25 17:19:54.870248336 +0200
+@@ -1664,7 +1664,7 @@
+ 				    XFT_FAMILY, XftTypeString, font, 
+ 				    XFT_SIZE, XftTypeDouble, XWin->face_size,
+ 				    XFT_SPACING, XftTypeInteger, XFT_MONO,
+-				    0);
++				    NULL);
+ 	if (XWin->xftfont == NULL) return -1;
+ 	XWin->font_name = font;
+ 	XWin->font_height = XWin->xftfont->ascent + XWin->xftfont->descent;

Added: jed/branches/0.99.19/debian/patches/slang2.dpatch
===================================================================
--- jed/branches/0.99.19/debian/patches/slang2.dpatch	                        (rev 0)
+++ jed/branches/0.99.19/debian/patches/slang2.dpatch	2007-05-25 16:32:54 UTC (rev 742)
@@ -0,0 +1,95 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## slang2.dpatch by Jörg Sommer <joerg at alea.gnuu.de>
+##
+## DP: This patch changes old pre‐slang2 language contructs into slang2
+## DP: contructs. The intention of this patch is to help the upstream
+## DP: maintainer John Davis.
+
+ at DPATCH@
+diff -urNad 0.99.19~/lib/emul.sl 0.99.19/lib/emul.sl
+--- 0.99.19~/lib/emul.sl	2006-02-13 18:51:58.000000000 +0100
++++ 0.99.19/lib/emul.sl	1970-01-01 01:00:00.000000000 +0100
+@@ -1,10 +0,0 @@
+-% These functions allow jed to work with older versions of the slang library
+-
+-#ifnexists strtrans
+-% This emulation is not at all complete.  It can only be used with one
+-% one character transformations.
+-define strtrans (a, b, c)
+-{
+-   str_replace_all (a, b, c);
+-}
+-#endif
+diff -urNad 0.99.19~/lib/site.sl 0.99.19/lib/site.sl
+--- 0.99.19~/lib/site.sl	2007-05-23 00:55:09.000000000 +0200
++++ 0.99.19/lib/site.sl	2007-05-25 14:37:42.438248336 +0200
+@@ -1729,13 +1729,13 @@
+ %!%-
+ public define redo ()
+ {
+-   ERROR_BLOCK 
++   try
++     call("kbd_quit");
++   catch AnyError:
+      {
+ 	call("undo");
+-	_clear_error ();
+ 	message ("Undo will now perform the action of redo");
+-     };
+-   call("kbd_quit");
++     }
+ }
+ 
+ %}}}
+@@ -1832,30 +1832,32 @@
+ 
+    widen ();
+ 
+-   EXIT_BLOCK
++   try
++     {
++         if ( strlen(mode) )
++         {
++             variable mstr = "_mode";
++             mode = strtrans (mode, "-", "_");
++             !if (is_substr (mode, mstr)) mode += "_mode"; %mode = strcat (mode, "_mode" );
++
++             if (mode == "c++_mode")
++               mode = "c_mode";
++
++             if (is_defined(mode))
++             {
++                 eval (mode);
++                 1;			       %  mode was defined
++                 return;
++             }
++         }
++         0;
++     }
++   finally
+      {
+ 	mode = ();
+ 	if (extra_hook) (mode + modeline_hook2 ()); else mode;
+ 	pop_spot ();		% restore place
+      }
+-
+-   if ( strlen(mode) )
+-     {
+-	variable mstr = "_mode";
+-	mode = strtrans (mode, "-", "_");
+-	!if (is_substr (mode, mstr)) mode += "_mode"; %mode = strcat (mode, "_mode" );
+-
+-	if (mode == "c++_mode")
+-	  mode = "c_mode";
+-
+-	if (is_defined(mode))
+-	  {
+-	     eval (mode);
+-	     1;			       %  mode was defined
+-	     return;
+-	  }
+-     }
+-   0;
+ }
+ 
+ variable Mode_List_Exts = "h,cc,cpp,hpp,hh,sl,txt,doc,f,for,pro,1,pl,pm,v,verilog,vhd,vhdl,vt,sp,cir,py,cxx,m,bib";

Added: jed/branches/0.99.19/debian/patches/x_toggle_visibility.dpatch
===================================================================
--- jed/branches/0.99.19/debian/patches/x_toggle_visibility.dpatch	                        (rev 0)
+++ jed/branches/0.99.19/debian/patches/x_toggle_visibility.dpatch	2007-05-25 16:32:54 UTC (rev 742)
@@ -0,0 +1,95 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## slang2.dpatch by Jörg Sommer <joerg at alea.gnuu.de>
+##
+## DP: This patch changes old pre‐slang2 language contructs into slang2
+## DP: contructs. The intention of this patch is to help the upstream
+## DP: maintainer John Davis.
+
+ at DPATCH@
+diff -urNad 0.99.19~/doc/hlp/jedfuns.hlp 0.99.19/doc/hlp/jedfuns.hlp
+--- 0.99.19~/doc/hlp/jedfuns.hlp	2007-01-19 16:01:16.000000000 +0100
++++ 0.99.19/doc/hlp/jedfuns.hlp	2007-05-25 17:55:09.514248336 +0200
+@@ -7719,3 +7719,27 @@
+  SEE ALSO
+ 
+ --------------------------------------------------------------
++
++x_toggle_visibility
++
++ SYNOPSIS
++  Shows or hides the window
++
++ USAGE
++  x_toggle_visibility([Integer_Type hide])
++
++ DESCRIPTION
++ Makes the window visible or invisible. If the argument `hide' is not
++ given, the visility of the windows is toggled, e.g. if the window is
++ invisible it becomes visible and vice versa. If the optional argument
++ `hide' is given the state to the window becomes visible if
++ `hide' is non-zero or invisible if `hide' is zero, whether of
++ the current state.
++
++ You can also hide the window by calling `suspend', but you can now show
++ it, if the window doesn't have the focus.
++
++ SEE ALSO
++  suspend
++
++--------------------------------------------------------------
+diff -urNad 0.99.19~/doc/tm/rtl/xjed.tm 0.99.19/doc/tm/rtl/xjed.tm
+--- 0.99.19~/doc/tm/rtl/xjed.tm	2006-03-25 23:47:54.000000000 +0100
++++ 0.99.19/doc/tm/rtl/xjed.tm	2007-05-25 17:55:28.606248336 +0200
+@@ -117,3 +117,18 @@
+ \seealso{}
+ \done
+ 
++\function{x_toggle_visibility}
++\synopsis{Shows or hides the window}
++\usage{x_toggle_visibility([Integer_Type hide])}
++\description
++ Makes the window visible or invisible. If the argument \exmp{hide} is not
++ given, the visility of the windows is toggled, e.g. if the window is
++ invisible it becomes visible and vice versa. If the optional argument
++ \exmp{hide} is given the state to the window becomes visible if
++ \exmp{hide} is non-zero or invisible if \exmp{hide} is zero, whether of
++ the current state.
++
++ You can also hide the window by calling \ifun{suspend}, but you can now show
++ it, if the window doesn't have the focus.
++\seealso{suspend}
++\done
+diff -urNad 0.99.19~/src/xterm.c 0.99.19/src/xterm.c
+--- 0.99.19~/src/xterm.c	2007-05-25 17:52:00.154248336 +0200
++++ 0.99.19/src/xterm.c	2007-05-25 17:52:00.622248336 +0200
+@@ -1605,6 +1605,22 @@
+ 
+ /*}}}*/
+ 
++static void x_toggle_visibility (void) /*{{{*/
++{
++   int hide_win = XWin->visible == VisibilityUnobscured;
++
++   if (SLang_Num_Function_Args == 1 && -1 == SLang_pop_integer (&hide_win))
++      return;
++
++    if (hide_win)
++      /* XIconifyWindow (This_XDisplay, XWin->w, This_XScreen); */
++      XLowerWindow (This_XDisplay, This_XWindow);
++    else
++      XRaiseWindow (This_XDisplay, This_XWindow);
++}
++
++/*}}}*/
++
+ static int get_font_width (XFontStruct *f, int *wp, int *is_dualp)
+ {
+    int w0, w1;
+@@ -3049,6 +3065,7 @@
+ #if SLANG_VERSION < 10404
+    MAKE_INTRINSIC_S("get_termcap_string", get_termcap_string, STRING_TYPE),
+ #endif
++   MAKE_INTRINSIC("x_toggle_visibility", x_toggle_visibility, SLANG_VOID_TYPE, 0),
+    MAKE_INTRINSIC(NULL,NULL,0,0)
+ };
+ 




More information about the Pkg-jed-commit mailing list