Follow-up janitorial patch.

View: New views
2 Messages — Rating Filter:   Alert me  

Follow-up janitorial patch.

by Lorenzo M. Catucci :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As for Per's request, I'm just moving around the fflush, and inserting one
into the newly enabled packet debug.

Sorry for overlooking last time!

Thank you very much,

  lorenzo

+-------------------------+----------------------------------------------+
|   Lorenzo M.  Catucci   | Centro di Calcolo e Documentazione           |
| catucci@... | Università degli Studi di Roma "Tor Vergata" |
|                         | Via O. Raimondo 18 ** I-00173 ROMA  ** ITALY |
|  Tel. +39 06 7259 2255  | Fax. +39 06 7259 2125                        |
+-------------------------+----------------------------------------------+
[mtk_flush.diff]

diff -r f7451f427952 -r cf086a4a5e91 mtk_logger.c
--- mtk_logger.c Wed Jul 02 10:00:49 2008 +0200
+++ mtk_logger.c Wed Jul 02 10:19:01 2008 +0200
@@ -233,6 +233,7 @@
     va_start(ap, msg);
     if (global_opts.debug_level >= l) {
         vfprintf(stderr,msg, ap);
+        fflush(stderr);
     }
     va_end(ap);
 }
@@ -269,8 +270,7 @@
    if  ( strncmp(cmd, CMD_LOG_ERASE, 12) == 0 ){
       cmd_erase = 1;
       if (global_opts.debug_level > 0 ) {
-         dbg(1, "Erasing    ");
-         fflush(stdout);
+         dbg(1, "Erasing    ");
       }
    }
    // dbg(6, "## Send '%s' -- Expect '%s' in %d sec\n", cmd, expect, timeout_sec);
@@ -561,7 +561,7 @@
          perc = 100 - 100*(addr_max-addr)/addr_max;
          if ( addr >= addr_max )
            perc = 100;
-         dbg(2, "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bReading 0x%.6x %3d %%", addr, perc); fflush(stdout);
+         dbg(2, "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bReading 0x%.6x %3d %%", addr, perc);
       }
   }
   if ( dout != NULL )
@@ -845,6 +845,7 @@
    for(j=0;j<dataLen;j++)
    fprintf(stderr,"%.2x ", data[j]);
    fprintf(stderr,"\n");
+   fflush(stderr);
    }
 
    memset(&itm, 0, sizeof(itm));    


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code

Re: Follow-up janitorial patch.

by Robert Lipe-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanx.  Applied.

2008/7/2 Lorenzo M. Catucci <lorenzo@...>:
As for Per's request, I'm just moving around the fflush, and inserting one
into the newly enabled packet debug.

Sorry for overlooking last time!

Thank you very much,

       lorenzo

+-------------------------+----------------------------------------------+
|   Lorenzo M.  Catucci   | Centro di Calcolo e Documentazione           |
| catucci@... | Università degli Studi di Roma "Tor Vergata" |
|                         | Via O. Raimondo 18 ** I-00173 ROMA  ** ITALY |
|  Tel. +39 06 7259 2255  | Fax. +39 06 7259 2125                        |
+-------------------------+----------------------------------------------+

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@...
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code
LightInTheBox - Buy quality products at wholesale price