jed-users mailing list

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

RE: wJed patch


Hi!

Oops... I used diff with -w -option. That didn't work with patch.
Included is a new patch file taken with 'diff -u'. Now patch won't
complain. Sorry about that.

--
jussi
 

> -----Original Message-----
> From: ext Johann Gerell [mailto:johann.gerell@xxxxxxxxxx]
> Sent: 24 March, 2002 12:48
> To: Ruotsalainen Juha (NMP/Oulu)
> Subject: RE: wJed patch
> 
> 
> Hi!
> 
> I'm interested in trying out your patch, but I don't know how 
> to apply it. With
> 
>   patch <wterm.patch
> 
> in the JED srd directory, I get this output:
> 
> ~/jed-B0.99-15/src> patch <wterm.patch
> patching file wterm.c
> Reversed (or previously applied) patch detected!  Assume -R? [n] y
> Hunk #2 FAILED at 743.
> 1 out of 4 hunks FAILED -- saving rejects to file wterm.c.rej
> 
> 
> Any idea?
> 
> Thanks!
> 
> /Johann Gerell
> 
--- wterm.c	Mon Oct  8 07:48:16 2001
+++ /opt/jed/src/wterm.c	Tue Mar 19 08:30:12 2002
@@ -104,10 +104,10 @@

 typedef struct
 {
-   HWND hwnd;
-   UINT uiMshMsgMouseWheel,
-        uiMshMsg3DSupport,
-        uiMshMsgScrollLines;
+   HWND hwnd;
+   UINT uiMshMsgMouseWheel,
+        uiMshMsg3DSupport,
+        uiMshMsgScrollLines;
    INT  iScrollLines;
    BOOL fActive;
 }
@@ -214,6 +214,59 @@
 static void set_init_popup_callback(void);
 static void msw_help(void);

+/*
+ * 17-Mar-2002   JRu
+ * Turn on single-instance-code.
+ */
+#define USE_SINGLE_INSTANCE 1
+extern char **_Jed_Startup_Argv;
+static const char* shared_memory_name = "wjed_shared_memory";
+
+/*
+ * Undocumented function from USER32.DLL.
+ */
+BOOL WINAPI AllowSetForegroundWindow( DWORD procid );
+
+/*
+ * This function was ripped off the net.
+ */
+void ReallySetForegroundWindow( HWND ahWnd )
+{
+    DWORD foregroundThreadID; // foreground window thread
+    DWORD ourThreadID; // our active thread
+    static char foo[1024];
+    HWND h = GetForegroundWindow();
+
+    // If the window is in a minimized state, maximize now
+    if (GetWindowLong(ahWnd, GWL_STYLE) & WS_MINIMIZE)
+    {
+        ShowWindow(ahWnd, SW_MAXIMIZE);
+        UpdateWindow(ahWnd);
+    }
+
+    // Check to see if we are the foreground thread
+    foregroundThreadID = GetWindowThreadProcessId(GetForegroundWindow(), NULL);
+    ourThreadID = GetCurrentThreadId();
+
+    // If not, attach our thread's 'input' to the foreground thread's
+    if (foregroundThreadID != ourThreadID)
+    	AttachThreadInput(foregroundThreadID, ourThreadID, TRUE);
+
+    // Bring our window to the foreground
+    SetForegroundWindow(ahWnd);
+
+    // Set focus.
+    SetFocus( ahWnd );
+
+    // If we attached our thread, detach it now
+    if (foregroundThreadID != ourThreadID)
+    	AttachThreadInput(foregroundThreadID, ourThreadID, FALSE);
+
+    // Force our window to redraw
+    InvalidateRect(ahWnd, NULL, TRUE);
+}
+/**/
+
 static HINSTANCE hPrevInst;
 static HINSTANCE hInstance;
 static char *szJedSection = "WJED";
@@ -690,14 +743,119 @@

 static int msw_init_term (void)
 {
+   /*
+    * 17-Mar-2002   JRu
+    */
+   HWND hWjed;
+   /**/
+
    if (Batch) return 0;

    hInstance = _hInstance;
    hPrevInst = _hPrev;

-   if (!hPrevInst) init_application();
+   /*
+    * Single-instance code changes.
+    */
+#ifdef    USE_SINGLE_INSTANCE
+   /*
+    * 17-Mar-2002   JRu
+    * From MSVC docs: in Win32 hPrevInst is always 0.
+    * Do something else to determine whether there already
+    * is another instance running.
+    */
+
+    /*
+     * Allow setting the foreground window.
+     * This is related to ReallySetForegroundWindow().
+     */
+    AllowSetForegroundWindow( GetCurrentProcessId() );
+
+   /*
+    * Find all windows of the class 'wjed'.
+    */
+   hWjed = FindWindow( "wjed", NULL );
+   if( hWjed != NULL )
+   {
+       /*
+        * Create a file mapping object = shared memory.
+        */
+       HANDLE hMem = CreateFileMapping((HANDLE )0xffffffff,
+                                       NULL,
+                                       PAGE_READWRITE,
+                                       0,
+                                       MAX_PATH * _Jed_Startup_Argc,
+                                       shared_memory_name);
+       char *buf = (char* )MapViewOfFile( hMem,
+                                          FILE_MAP_WRITE,
+                                          0,
+                                          0,
+                                          0 );
+       /*
+        * Write the contents of _Jed_Startup_Argv into the memory area.
+        */
+       int pindex;
+       int full_count = 0;
+       int length_increment;
+       char *tmp_ptr;
+       for( pindex = 1; pindex < _Jed_Startup_Argc; pindex++ )
+       {
+           /*
+            * Check for options. Don't pass those to the first wJed instance.
+            */
+           if( _Jed_Startup_Argv[pindex][0] != '-' )
+           {
+               /*
+                * Convert the file name into a full path name, unless there is a '"' in the filename somewhere.
+                * Target buffer is in the shared memory area.
+                */
+               if( NULL == strchr( _Jed_Startup_Argv[pindex], '"' ) )
+               {
+	               length_increment = 1 + GetFullPathName( _Jed_Startup_Argv[pindex], MAX_PATH, &buf[full_count], &tmp_ptr);
+               }
+               else
+               {
+                   strcpy( &buf[full_count], _Jed_Startup_Argv[pindex] );
+                   length_increment = strlen( _Jed_Startup_Argv[pindex] );
+                   buf[full_count + length_increment] = '\0';
+                   length_increment++;
+               }
+               full_count += length_increment;
+           }
+       }
+       /*
+        * Signal the first instance that there is data to be read.
+        * Out of courtesy, tell the recipient how many bytes there are to be read.
+        */
+       SendMessage(hWjed,
+                   0xbaff,
+                   (WPARAM)full_count,
+                   (LPARAM )(_Jed_Startup_Argc - 1));
+       /*
+        * Free the shared memory.
+        */
+       UnmapViewOfFile( buf );
+       CloseHandle( hMem );
+       /*
+        * The first instance now takes care of everything,
+        * we can signal exit.
+        */
+	   return(-1);
+   }
+   else
+   {
+       /*
+        * This is the first instance. Do the normal startup stuff.
+        */
+       init_application();
+       init_instance();
+   }
+#else  /* USE_SINGLE_INSTANCE */
+   if(!hPrevInst) init_application();

    init_instance();
+#endif /* USE_SINGLE_INSTANCE */
+
    return 0;
 }

@@ -722,7 +880,7 @@
 static void blank_rect(int x1, int y1, int x2, int y2)
 {
    char blanks[256];
-
+
    memset (blanks, ' ', sizeof (blanks));

    if (This_Window.cursor_showing) hide_cursor();
@@ -745,7 +903,7 @@
 	     else
 	       dn = n;

-	     (void) TextOut(This_Window.hdc, xx * This_Window.font_width,
+	     (void) TextOut(This_Window.hdc, xx * This_Window.font_width,
 			    y1 * This_Window.font_height, blanks, dn);
 	     n -= dn;
 	     xx += dn;
@@ -797,7 +955,7 @@

    This_Window.cursor_showing = 0;

-   s = VTerm_Display[row] + col;
+   s = VTerm_Display[row] + col;
    ch = *s & 0xFF;

    get_dc();
@@ -1192,7 +1350,7 @@
     * likely that this is started from a menu or something.
     */
    Stdin_Is_TTY = -1;
-
+
    memset ((char *) &tt, 0, sizeof (SLsmg_Term_Type));

    tt.tt_normal_video = msw_normal_video;
@@ -1207,7 +1365,7 @@
    tt.tt_flush_output = msw_flush_output;
    tt.tt_reset_video = msw_reset_video;
    tt.tt_init_video = msw_init_video;
-
+
    tt.tt_screen_rows = &MSW_Screen_Rows;
    tt.tt_screen_cols = &MSW_Screen_Cols;
    tt.tt_term_cannot_scroll = &MSW_Term_Cannot_Scroll;
@@ -1219,20 +1377,20 @@
 {
    unsigned long ul;

-   if ((*c != '#')
+   if ((*c != '#')
        || (7 != strlen (c)))   /* e.g., #RRGGBB */
      return c;
-
+
    if (1 != sscanf (c+1, "%lX", &ul))
      return c;
-
+
    if (ul > 0xFFFFFFUL)
      return c;

    sprintf (buf, "%ld,%ld,%ld", (ul >> 16)&0xFF, (ul >> 8)&0xFF, ul & 0xFF);
    return buf;
 }
-
+

 static void msw_set_color (int i, char *what, char *fg, char *bg)
 {
@@ -1383,7 +1541,7 @@
 	type = JMOUSE_IGNORE_EVENT;
      }
 #endif
-
+
    jm.button = button;

    if ((type == JMOUSE_UP)
@@ -1439,7 +1597,7 @@
       default:
 	return;
      }
-
+
    push_mouse_event (button, x, y, state, type);
 }

@@ -1502,7 +1660,7 @@

    while (!SLKeyBoard_Quit && !Input_Buffer_Len) process_message ();

-   if (SLKeyBoard_Quit)
+   if (SLKeyBoard_Quit)
      {
 	SLKeyBoard_Quit = 0;
 	flush_input ();
@@ -1581,7 +1739,7 @@
 	update((Line *) NULL, 0, 1, 0);
      }

-   if (SLKeyBoard_Quit)
+   if (SLKeyBoard_Quit)
      {
 	SLKeyBoard_Quit = 0;
 	flush_input ();
@@ -1595,6 +1753,10 @@

 static int Ignore_Wchar_Message;

+/*
+ * Disable 'int-to-char'-warning.
+ */
+#pragma warning (disable:4305)
 static char f_keys[4][12] =
 {
      { 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 133, 134 },
@@ -1812,8 +1974,102 @@
    PAINTSTRUCT ps;
    RECT rc;

+   /*
+    * 17-Mar-2002   JRu
+    */
+   static HANDLE hMem;
+   /**/
+
    switch (msg)
      {
+#ifdef    USE_SINGLE_INSTANCE
+         /*
+          * 17-Mar-2002   JRu
+          * These two message handlers are used in single-instance-code.
+          */
+         case 0xbaff:
+         /*
+          * There is data to be read in the shared mem.
+          * wParam tells the total byte count.
+          * lParam tells the count of null-terminated strings.
+          *
+          * Quickly open the shared mem, then post a message to self
+          * to process the data in the shared mem.
+          * This way the second instance won't be left waiting for
+          * 0xbaff-handler to finish.
+          */
+         hMem = OpenFileMapping( FILE_MAP_WRITE,
+                                 FALSE,
+                                 shared_memory_name );
+         PostMessage( hWnd, 0xb0ff, wParam, lParam );
+         break;
+
+         case 0xb0ff:
+         /*
+          * Continue processing where 0xbaff-handler left off.
+          */
+         {
+             /*
+              * Local variable.
+              */
+             int index;
+
+             /*
+              * Get a pointer to the shared memory.
+              */
+             char* buf = (char* )MapViewOfFile( hMem,
+                                                FILE_MAP_WRITE,
+                                                0,
+                                                0,
+                                                wParam );
+             /*
+              * Pointer used for traversing the shared memory.
+              */
+             char* local_copy = buf;
+             /*
+              * Do your stuff on the data.
+              */
+             for(index = 0; index < (int )lParam; index++)
+             {
+                 /*
+                  * Open the file.
+                  */
+                 find_file_in_window( local_copy );
+                 /*
+                  * Update the shared buffer traversal pointer.
+                  */
+                 local_copy = strchr( local_copy, '\0' ) + 1;
+             }
+             /*
+              * Unmap the shared memory.
+              */
+             UnmapViewOfFile( buf );
+             /*
+              * Stop using the shared memory.
+              */
+             CloseHandle( hMem );
+             /*
+              * Bring wJed to top.
+              */
+             ReallySetForegroundWindow( hWnd );
+             /*
+              * If there were no files to be loaded, ask for one.
+              */
+             if( wParam )
+             {
+                 /*
+                  * Force a redraw to get the last loaded file visible.
+                  */
+                 jed_redraw_screen( 1 );
+                }
+             else
+             {
+                 find_file();
+             }
+         }
+         break;
+#endif /* USE_SINGLE_INSTANCE */
+
       case WM_CREATE:
 	This_Window.w = hWnd;
 	mouse_button_down = 0;
@@ -2003,18 +2259,18 @@
        * and translate it into a fake keystroke. This has now been
        * tested on Win95,98,NT4,2000
        */
-        if ((Wheel_Mouse.fActive
+        if ((Wheel_Mouse.fActive
              && (msg == Wheel_Mouse.uiMshMsgMouseWheel))
             || (msg == WM_MOUSEWHEEL))
           {
 	     /* Under X, the wheel mouse produces JMOUSE_BUTTON_4 and
  	      * JMOUSE_BUTTON_5 events.  jed/lib/mouse.sl maps JMOUSE_BUTTON_4
- 	      * events to upward movement and JMOUSE_BUTTON_5 to downward
+ 	      * events to upward movement and JMOUSE_BUTTON_5 to downward
  	      * movement in the buffer.
  	      */
-	     if ((int) wParam < 0)
+	     if ((int) wParam < 0)
 	       push_mouse_event (JMOUSE_BUTTON_5, LOWORD(lParam), HIWORD(lParam), wParam, JMOUSE_DOWN);
-	     else
+	     else
 	       push_mouse_event (JMOUSE_BUTTON_4, LOWORD(lParam), HIWORD(lParam), wParam, JMOUSE_DOWN);

  	     return 0;
@@ -2554,29 +2810,29 @@
 static int init_wheel_mouse (void)
 {
    /* Find the mystery mouse window */
-
+
    Wheel_Mouse.hwnd = FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE);

    /* Register messages to determine mousey information */
-
+
    Wheel_Mouse.uiMshMsgMouseWheel  = RegisterWindowMessage(MSH_MOUSEWHEEL);
    Wheel_Mouse.uiMshMsg3DSupport   = RegisterWindowMessage(MSH_WHEELSUPPORT);
    Wheel_Mouse.uiMshMsgScrollLines = RegisterWindowMessage(MSH_SCROLL_LINES);

    /* If we have a wheel enquiry message, ask about the presence of a wheel */
-
+
    if (Wheel_Mouse.uiMshMsg3DSupport)
      Wheel_Mouse.fActive = (BOOL)SendMessage(Wheel_Mouse.hwnd, Wheel_Mouse.uiMshMsg3DSupport, 0, 0);
    else
-     Wheel_Mouse.fActive = FALSE;
+     Wheel_Mouse.fActive = FALSE;

    /* If we have a scroll line enquiry message ask about that */
-
+
    if (Wheel_Mouse.uiMshMsgScrollLines)
      Wheel_Mouse.iScrollLines = (int)SendMessage(Wheel_Mouse.hwnd, Wheel_Mouse.uiMshMsgScrollLines, 0, 0);
    else
      Wheel_Mouse.iScrollLines = 3;
-
+
    return 0;
 }
 #endif                                 /* HAS_WHEEL_MOUSE_SUPPORT */
@@ -2626,14 +2882,14 @@
      {
 	count++;			       /* this is an argument */
 #ifdef __WIN32__
-      /* If the first character of the argument is a double quote,
+      /* If the first character of the argument is a double quote,
        * search for a matching double-quote to end the argument,
-       * otherwise, find the next space
+       * otherwise, find the next space
        */
 	if (*pt == '"')
 	  {
 	     pt++;		       /* Skip the initial quote */
-	     while ((*pt != '\0')
+	     while ((*pt != '\0')
 		    && (*pt != '"'))
 	       pt++;
 	     if (*pt != '\0')	       /* Skip the end quote */
@@ -2659,14 +2915,14 @@
 	argv[ argc ] = pt;
 	argc++;
 #ifdef __WIN32__
-      /* If the first character of the argument is a double quote,
+      /* If the first character of the argument is a double quote,
        * search for a matching double-quote to end the argument,
-       * otherwise, find the next space
+       * otherwise, find the next space
        */
 	if (*pt == '"')
 	  {
 	     pt++;		       /* Skip the initial quote */
-	     while ((*pt != '\0')
+	     while ((*pt != '\0')
 		    && (*pt != '"'))
 	       pt++;
 	     if (*pt != '\0')	       /* Skip the end quote */
--- wterm.c	Sun Mar 24 21:25:54 2002
+++ /opt/jed/src/wterm.c	Tue Mar 19 08:30:12 2002
@@ -104,10 +104,10 @@
 
 typedef struct
 {
-   HWND hwnd;                 
-   UINT uiMshMsgMouseWheel,   
-        uiMshMsg3DSupport,    
-        uiMshMsgScrollLines;  
+   HWND hwnd;
+   UINT uiMshMsgMouseWheel,
+        uiMshMsg3DSupport,
+        uiMshMsgScrollLines;
    INT  iScrollLines;
    BOOL fActive;
 }
@@ -267,59 +267,6 @@
 }
 /**/
 
-/*
- * 17-Mar-2002   JRu
- * Turn on single-instance-code.
- */
-#define USE_SINGLE_INSTANCE 1
-extern char **_Jed_Startup_Argv;
-static const char* shared_memory_name = "wjed_shared_memory";
-
-/*
- * Undocumented function from USER32.DLL.
- */
-BOOL WINAPI AllowSetForegroundWindow( DWORD procid );
-
-/*
- * This function was ripped off the net.
- */
-void ReallySetForegroundWindow( HWND ahWnd )
-{
-    DWORD foregroundThreadID; // foreground window thread
-    DWORD ourThreadID; // our active thread
-    static char foo[1024];
-    HWND h = GetForegroundWindow();
-
-    // If the window is in a minimized state, maximize now
-    if (GetWindowLong(ahWnd, GWL_STYLE) & WS_MINIMIZE)
-    {
-        ShowWindow(ahWnd, SW_MAXIMIZE);
-        UpdateWindow(ahWnd);
-    }
-
-    // Check to see if we are the foreground thread
-    foregroundThreadID = GetWindowThreadProcessId(GetForegroundWindow(), NULL);
-    ourThreadID = GetCurrentThreadId();
-
-    // If not, attach our thread's 'input' to the foreground thread's
-    if (foregroundThreadID != ourThreadID)
-    	AttachThreadInput(foregroundThreadID, ourThreadID, TRUE);
-
-    // Bring our window to the foreground
-    SetForegroundWindow(ahWnd);
-
-    // Set focus.
-    SetFocus( ahWnd );
-
-    // If we attached our thread, detach it now
-    if (foregroundThreadID != ourThreadID)
-    	AttachThreadInput(foregroundThreadID, ourThreadID, FALSE);
-
-    // Force our window to redraw
-    InvalidateRect(ahWnd, NULL, TRUE);
-}
-/**/
-
 static HINSTANCE hPrevInst;
 static HINSTANCE hInstance;
 static char *szJedSection = "WJED";
@@ -933,7 +880,7 @@
 static void blank_rect(int x1, int y1, int x2, int y2)
 {
    char blanks[256];
-   
+
    memset (blanks, ' ', sizeof (blanks));
 
    if (This_Window.cursor_showing) hide_cursor();
@@ -956,7 +903,7 @@
 	     else
 	       dn = n;
 
-	     (void) TextOut(This_Window.hdc, xx * This_Window.font_width, 
+	     (void) TextOut(This_Window.hdc, xx * This_Window.font_width,
 			    y1 * This_Window.font_height, blanks, dn);
 	     n -= dn;
 	     xx += dn;
@@ -1008,7 +955,7 @@
 
    This_Window.cursor_showing = 0;
 
-   s = VTerm_Display[row] + col; 
+   s = VTerm_Display[row] + col;
    ch = *s & 0xFF;
 
    get_dc();
@@ -1403,7 +1350,7 @@
     * likely that this is started from a menu or something.
     */
    Stdin_Is_TTY = -1;
-   
+
    memset ((char *) &tt, 0, sizeof (SLsmg_Term_Type));
 
    tt.tt_normal_video = msw_normal_video;
@@ -1418,7 +1365,7 @@
    tt.tt_flush_output = msw_flush_output;
    tt.tt_reset_video = msw_reset_video;
    tt.tt_init_video = msw_init_video;
-   
+
    tt.tt_screen_rows = &MSW_Screen_Rows;
    tt.tt_screen_cols = &MSW_Screen_Cols;
    tt.tt_term_cannot_scroll = &MSW_Term_Cannot_Scroll;
@@ -1430,20 +1377,20 @@
 {
    unsigned long ul;
 
-   if ((*c != '#') 
+   if ((*c != '#')
        || (7 != strlen (c)))   /* e.g., #RRGGBB */
      return c;
-   
+
    if (1 != sscanf (c+1, "%lX", &ul))
      return c;
-   
+
    if (ul > 0xFFFFFFUL)
      return c;
 
    sprintf (buf, "%ld,%ld,%ld", (ul >> 16)&0xFF, (ul >> 8)&0xFF, ul & 0xFF);
    return buf;
 }
-   
+
 
 static void msw_set_color (int i, char *what, char *fg, char *bg)
 {
@@ -1594,7 +1541,7 @@
 	type = JMOUSE_IGNORE_EVENT;
      }
 #endif
-   
+
    jm.button = button;
 
    if ((type == JMOUSE_UP)
@@ -1650,7 +1597,7 @@
       default:
 	return;
      }
-   
+
    push_mouse_event (button, x, y, state, type);
 }
 
@@ -1713,7 +1660,7 @@
 
    while (!SLKeyBoard_Quit && !Input_Buffer_Len) process_message ();
 
-   if (SLKeyBoard_Quit) 
+   if (SLKeyBoard_Quit)
      {
 	SLKeyBoard_Quit = 0;
 	flush_input ();
@@ -1792,7 +1739,7 @@
 	update((Line *) NULL, 0, 1, 0);
      }
 
-   if (SLKeyBoard_Quit) 
+   if (SLKeyBoard_Quit)
      {
 	SLKeyBoard_Quit = 0;
 	flush_input ();
@@ -2312,18 +2259,18 @@
        * and translate it into a fake keystroke. This has now been
        * tested on Win95,98,NT4,2000
        */
-        if ((Wheel_Mouse.fActive 
+        if ((Wheel_Mouse.fActive
              && (msg == Wheel_Mouse.uiMshMsgMouseWheel))
             || (msg == WM_MOUSEWHEEL))
           {
 	     /* Under X, the wheel mouse produces JMOUSE_BUTTON_4 and
  	      * JMOUSE_BUTTON_5 events.  jed/lib/mouse.sl maps JMOUSE_BUTTON_4
- 	      * events to upward movement and JMOUSE_BUTTON_5 to downward 
+ 	      * events to upward movement and JMOUSE_BUTTON_5 to downward
  	      * movement in the buffer.
  	      */
-	     if ((int) wParam < 0) 
+	     if ((int) wParam < 0)
 	       push_mouse_event (JMOUSE_BUTTON_5, LOWORD(lParam), HIWORD(lParam), wParam, JMOUSE_DOWN);
-	     else 
+	     else
 	       push_mouse_event (JMOUSE_BUTTON_4, LOWORD(lParam), HIWORD(lParam), wParam, JMOUSE_DOWN);
 
  	     return 0;
@@ -2863,29 +2810,29 @@
 static int init_wheel_mouse (void)
 {
    /* Find the mystery mouse window */
-   
+
    Wheel_Mouse.hwnd = FindWindow(MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE);
 
    /* Register messages to determine mousey information */
-   
+
    Wheel_Mouse.uiMshMsgMouseWheel  = RegisterWindowMessage(MSH_MOUSEWHEEL);
    Wheel_Mouse.uiMshMsg3DSupport   = RegisterWindowMessage(MSH_WHEELSUPPORT);
    Wheel_Mouse.uiMshMsgScrollLines = RegisterWindowMessage(MSH_SCROLL_LINES);
 
    /* If we have a wheel enquiry message, ask about the presence of a wheel */
-   
+
    if (Wheel_Mouse.uiMshMsg3DSupport)
      Wheel_Mouse.fActive = (BOOL)SendMessage(Wheel_Mouse.hwnd, Wheel_Mouse.uiMshMsg3DSupport, 0, 0);
    else
-     Wheel_Mouse.fActive = FALSE;  
+     Wheel_Mouse.fActive = FALSE;
 
    /* If we have a scroll line enquiry message ask about that */
-   
+
    if (Wheel_Mouse.uiMshMsgScrollLines)
      Wheel_Mouse.iScrollLines = (int)SendMessage(Wheel_Mouse.hwnd, Wheel_Mouse.uiMshMsgScrollLines, 0, 0);
    else
      Wheel_Mouse.iScrollLines = 3;
-   
+
    return 0;
 }
 #endif                                 /* HAS_WHEEL_MOUSE_SUPPORT */
@@ -2935,14 +2882,14 @@
      {
 	count++;			       /* this is an argument */
 #ifdef __WIN32__
-      /* If the first character of the argument is a double quote, 
+      /* If the first character of the argument is a double quote,
        * search for a matching double-quote to end the argument,
-       * otherwise, find the next space 
+       * otherwise, find the next space
        */
 	if (*pt == '"')
 	  {
 	     pt++;		       /* Skip the initial quote */
-	     while ((*pt != '\0') 
+	     while ((*pt != '\0')
 		    && (*pt != '"'))
 	       pt++;
 	     if (*pt != '\0')	       /* Skip the end quote */
@@ -2968,14 +2915,14 @@
 	argv[ argc ] = pt;
 	argc++;
 #ifdef __WIN32__
-      /* If the first character of the argument is a double quote, 
+      /* If the first character of the argument is a double quote,
        * search for a matching double-quote to end the argument,
-       * otherwise, find the next space 
+       * otherwise, find the next space
        */
 	if (*pt == '"')
 	  {
 	     pt++;		       /* Skip the initial quote */
-	     while ((*pt != '\0') 
+	     while ((*pt != '\0')
 		    && (*pt != '"'))
 	       pt++;
 	     if (*pt != '\0')	       /* Skip the end quote */

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