Revision: 6398
          http://playerstage.svn.sourceforge.net/playerstage/?rev=6398&view=rev
Author:   thjc
Date:     2008-05-03 19:12:02 -0700 (Sat, 03 May 2008)

Log Message:
-----------
changes to remove adhoc output to stdout. Debug messages etc should go to 
stderr.

Modified Paths:
--------------
    code/player/branches/release-2-1-patches/client_libs/libplayerc/client.c
    code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_camera.c
    
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_localize.c
    
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_speech_recognition.c
    
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_vectormap.c
    code/player/branches/release-2-1-patches/client_libs/libplayerc/error.h
    
code/player/branches/release-2-1-patches/server/drivers/mixed/mricp/src/mricp_driver.cpp

Modified: 
code/player/branches/release-2-1-patches/client_libs/libplayerc/client.c
===================================================================
--- code/player/branches/release-2-1-patches/client_libs/libplayerc/client.c    
2008-05-03 05:50:09 UTC (rev 6397)
+++ code/player/branches/release-2-1-patches/client_libs/libplayerc/client.c    
2008-05-04 02:12:02 UTC (rev 6398)
@@ -685,7 +685,7 @@
       default:
         playerxdr_cleanup_message(client->data, header.addr.interf, 
header.type, header.subtype);
         PLAYERC_WARN1 ("unexpected message type [%s]", 
msgtype_to_str(header.type));
-        printf("address: %u:%u:%s:%u\nsize: %u",
+        PLAYERC_WARN5 ("address: %u:%u:%s:%u\nsize: %u",
                header.addr.host,
                header.addr.robot,
                interf_to_str(header.addr.interf),

Modified: 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_camera.c
===================================================================
--- 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_camera.c    
    2008-05-03 05:50:09 UTC (rev 6397)
+++ 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_camera.c    
    2008-05-04 02:12:02 UTC (rev 6398)
@@ -201,7 +201,7 @@
     }
     else
     {
-      printf("unsupported image format");
+      fprintf(stderr,"unsupported image format");
       break;
     }
   }

Modified: 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_localize.c
===================================================================
--- 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_localize.c  
    2008-05-03 05:50:09 UTC (rev 6397)
+++ 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_localize.c  
    2008-05-04 02:12:02 UTC (rev 6398)
@@ -133,7 +133,7 @@
                             PLAYER_LOCALIZE_REQ_SET_POSE,
                             &req, NULL) < 0)
   {
-    printf("%s\n", playerc_error_str());
+    PLAYERC_WARN1("%s\n", playerc_error_str());
     return -1;
   }
 

Modified: 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_speech_recognition.c
===================================================================
--- 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_speech_recognition.c
    2008-05-03 05:50:09 UTC (rev 6397)
+++ 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_speech_recognition.c
    2008-05-04 02:12:02 UTC (rev 6398)
@@ -54,7 +54,7 @@
     device->rawText[data->text_count-1] = '\0';
 
     device->wordCount = 1;
-    printf("data->text %s\n",data->text);
+    fprintf(stderr,"data->text %s\n",data->text);
 
     for (ii = 0; ii < data->text_count; ++ii)
     {

Modified: 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_vectormap.c
===================================================================
--- 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_vectormap.c 
    2008-05-03 05:50:09 UTC (rev 6397)
+++ 
code/player/branches/release-2-1-patches/client_libs/libplayerc/dev_vectormap.c 
    2008-05-04 02:12:02 UTC (rev 6398)
@@ -205,11 +205,6 @@
 GEOSGeom playerc_vectormap_get_feature_data(playerc_vectormap_t *device, 
unsigned layer_index, unsigned feature_index)
 {
 #ifdef HAVE_GEOS
-  /*int i;
-  printf("%p %d\n", device->layers[layer_index]->features[feature_index].wkb, 
device->layers[layer_index]->features[feature_index].wkb_count);
-  for(i = 0; i < 
device->layers[layer_index]->features[feature_index].wkb_count; i++)
-    printf("%02x", 
device->layers[layer_index]->features[feature_index].wkb[i]);
-  printf("\n");*/
   if (device->geom)
   {
     GEOSGeom_destroy(device->geom);

Modified: 
code/player/branches/release-2-1-patches/client_libs/libplayerc/error.h
===================================================================
--- code/player/branches/release-2-1-patches/client_libs/libplayerc/error.h     
2008-05-03 05:50:09 UTC (rev 6397)
+++ code/player/branches/release-2-1-patches/client_libs/libplayerc/error.h     
2008-05-04 02:12:02 UTC (rev 6398)
@@ -58,46 +58,30 @@
 char *playerc_error_set_str(void);
 
 // Useful error macros.
-// These print out the error
-/*#define PLAYERC_ERR(msg)         printf("playerc error   : " msg "\n")
-#define PLAYERC_ERR1(msg, a)     printf("playerc error   : " msg "\n", a)
-#define PLAYERC_ERR2(msg, a, b)  printf("playerc error   : " msg "\n", a, b)
-#define PLAYERC_ERR3(msg, a, b, c)  printf("playerc error   : " msg "\n", a, 
b, c)
-#define PLAYERC_ERR4(msg, a, b, c, d)  printf("playerc error   : " msg "\n", 
a, b, c, d)
-
-#define PLAYERC_WARN(msg)        printf("playerc warning : " msg "\n")
-#define PLAYERC_WARN1(msg, a)    printf("playerc warning : " msg "\n", a)
-#define PLAYERC_WARN2(msg, a, b) printf("playerc warning : " msg "\n", a, b)
-#define PLAYERC_WARN3(msg, a, b, c)  printf("playerc warning   : " msg "\n", 
a, b, c)
-#define PLAYERC_WARN4(msg, a, b, c, d)  printf("playerc warning   : " msg 
"\n", a, b, c, d)
-
-#define PLAYERC_MSG3(msg, a, b, c) printf("playerc message : " msg "\n", a, b, 
c)
-*/
-// Useful error macros.
 // These ones store the error message.
-#define PLAYERC_ERR(msg)                               
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg), printf("playerc 
error   : %s\n",playerc_error_str())
-#define PLAYERC_ERR1(msg, a)                           
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg, a), printf("playerc 
error   : %s\n",playerc_error_str())
-#define PLAYERC_ERR2(msg, a, b)                        
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg, a, b), 
printf("playerc error   : %s\n",playerc_error_str())
-#define PLAYERC_ERR3(msg, a, b, c)             
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg, a, b, c), 
printf("playerc error   : %s\n",playerc_error_str())
-#define PLAYERC_ERR4(msg, a, b, c, d)                  
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg, a, b, c, d), 
printf("playerc error   : %s\n",playerc_error_str())
-#define PLAYERC_ERR5(msg, a, b, c, d, e)       
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg, a, b, c, d, e), 
printf("playerc error   : %s\n",playerc_error_str())
-#define PLAYERC_WARN(msg)                              
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg), 
printf("playerc warning   : %s\n",playerc_error_str())
-#define PLAYERC_WARN1(msg, a)                          
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg, a), 
printf("playerc warning   : %s\n",playerc_error_str())
-#define PLAYERC_WARN2(msg, a, b)                       
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg, a, b), 
printf("playerc warning   : %s\n",playerc_error_str())
-#define PLAYERC_WARN3(msg, a, b, c)            
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg, a, b, 
c), printf("playerc warning   : %s\n",playerc_error_str())
-#define PLAYERC_WARN4(msg, a, b, c, d)                 
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg, a, b, 
c, d), printf("playerc warning   : %s\n",playerc_error_str())
-#define PLAYERC_WARN5(msg, a, b, c, d, e)      
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg, a, b, 
c, d, e), printf("playerc warning   : %s\n",playerc_error_str())
+#define PLAYERC_ERR(msg)                               
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg), 
fprintf(stderr,"playerc error   : %s\n",playerc_error_str())
+#define PLAYERC_ERR1(msg, a)                           
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg, a), 
fprintf(stderr,"playerc error   : %s\n",playerc_error_str())
+#define PLAYERC_ERR2(msg, a, b)                        
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg, a, b), 
fprintf(stderr,"playerc error   : %s\n",playerc_error_str())
+#define PLAYERC_ERR3(msg, a, b, c)             
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg, a, b, c), 
fprintf(stderr,"playerc error   : %s\n",playerc_error_str())
+#define PLAYERC_ERR4(msg, a, b, c, d)                  
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg, a, b, c, d), 
fprintf(stderr,"playerc error   : %s\n",playerc_error_str())
+#define PLAYERC_ERR5(msg, a, b, c, d, e)       
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, msg, a, b, c, d, e), 
fprintf(stderr,"playerc error   : %s\n",playerc_error_str())
+#define PLAYERC_WARN(msg)                              
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg), 
fprintf(stderr,"playerc warning   : %s\n",playerc_error_str())
+#define PLAYERC_WARN1(msg, a)                          
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg, a), 
fprintf(stderr,"playerc warning   : %s\n",playerc_error_str())
+#define PLAYERC_WARN2(msg, a, b)                       
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg, a, b), 
fprintf(stderr,"playerc warning   : %s\n",playerc_error_str())
+#define PLAYERC_WARN3(msg, a, b, c)            
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg, a, b, 
c), fprintf(stderr,"playerc warning   : %s\n",playerc_error_str())
+#define PLAYERC_WARN4(msg, a, b, c, d)                 
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg, a, b, 
c, d), fprintf(stderr,"playerc warning   : %s\n",playerc_error_str())
+#define PLAYERC_WARN5(msg, a, b, c, d, e)      
snprintf(playerc_error_set_str(), PLAYERC_ERROR_SIZE, "warning : " msg, a, b, 
c, d, e), fprintf(stderr,"playerc warning   : %s\n",playerc_error_str())
 
 
 // DEBUG macros
 #ifdef DEBUG
-#define PRINT_DEBUG(m)         printf("\rlibplayerc debug : %s %s\n  "m"\n", \
+#define PRINT_DEBUG(m)         fprintf(stderr,"\rlibplayerc debug : %s %s\n  
"m"\n", \
                                      __FILE__, __FUNCTION__)
-#define PRINT_DEBUG1(m, a)     printf("\rlibplayerc debug : %s %s\n  "m"\n", \
+#define PRINT_DEBUG1(m, a)     fprintf(stderr,"\rlibplayerc debug : %s %s\n  
"m"\n", \
                                      __FILE__, __FUNCTION__, a)
-#define PRINT_DEBUG2(m, a, b)  printf("\rlibplayerc debug : %s %s\n  "m"\n", \
+#define PRINT_DEBUG2(m, a, b)  fprintf(stderr,"\rlibplayerc debug : %s %s\n  
"m"\n", \
                                      __FILE__, __FUNCTION__, a, b)
-#define PRINT_DEBUG3(m, a, b, c) printf("\rlibplayerc debug : %s %s\n  "m"\n", 
\
+#define PRINT_DEBUG3(m, a, b, c) fprintf(stderr,"\rlibplayerc debug : %s %s\n  
"m"\n", \
                                      __FILE__, __FUNCTION__, a, b, c)
 #else
 #define PRINT_DEBUG(m)

Modified: 
code/player/branches/release-2-1-patches/server/drivers/mixed/mricp/src/mricp_driver.cpp
===================================================================
--- 
code/player/branches/release-2-1-patches/server/drivers/mixed/mricp/src/mricp_driver.cpp
    2008-05-03 05:50:09 UTC (rev 6397)
+++ 
code/player/branches/release-2-1-patches/server/drivers/mixed/mricp/src/mricp_driver.cpp
    2008-05-04 02:12:02 UTC (rev 6398)
@@ -329,7 +329,6 @@
 
 void MrIcp_Register(DriverTable* table)
 {
-       puts("Driver added to table"); fflush(stdout);
        table->AddDriver("mricp", MrIcp_Init);
 }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to