[PATCH:bitmap] Call snprintf() directly instead of XmuSnprintf()

Alan Coopersmith alan.coopersmith at oracle.com
Fri Jan 14 14:01:16 PST 2011


All platforms still supported by X.Org have long had snprintf()

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 BitEdit.c |   16 ++++++++--------
 Bitmap.c  |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/BitEdit.c b/BitEdit.c
index 60ef2ab..cc1d640 100644
--- a/BitEdit.c
+++ b/BitEdit.c
@@ -799,7 +799,7 @@ void DoLoad(void)
     case Yes:
       if (BWWriteFile(bitmap_widget, filename, NULL)
 	  != BitmapSuccess) {
-	XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
+	snprintf(message, sizeof(message), "Can't write file: %s", filename);
 	if (PopupDialog(error_dialog, message,
 			NULL, NULL, XtGrabExclusive) == Retry)
 	  goto RetryLoadSave;
@@ -815,7 +815,7 @@ void DoLoad(void)
   if (PopupDialog(input_dialog, "Load file:",
 		  filename, &filename, XtGrabExclusive) == Okay) {
     if (BWReadFile(bitmap_widget, filename, NULL) != BitmapSuccess) {
-      XmuSnprintf(message, sizeof(message), "Can't read file: %s", filename);
+      snprintf(message, sizeof(message), "Can't read file: %s", filename);
       if (PopupDialog(error_dialog, message,
 		      NULL, NULL, XtGrabExclusive) == Retry)
 	goto RetryLoad;
@@ -835,7 +835,7 @@ void DoInsert(void)
   if (PopupDialog(input_dialog, "Insert file:",
 		  filename, &filename, XtGrabExclusive) == Okay) {
     if (BWStoreFile(bitmap_widget, filename, NULL) != BitmapSuccess) {
-      XmuSnprintf(message, sizeof(message), "Can't read file: %s", filename);
+      snprintf(message, sizeof(message), "Can't read file: %s", filename);
       if (PopupDialog(error_dialog, message,
 		      NULL, NULL, XtGrabExclusive) == Retry)
 	goto RetryInsert;
@@ -852,7 +852,7 @@ void DoSave(void)
   if (!strcmp(filename, "")) 
     DoSaveAs();
   else if (BWWriteFile(bitmap_widget, NULL, NULL) != BitmapSuccess) {
-    XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
+    snprintf(message, sizeof(message), "Can't write file: %s", filename);
     if (PopupDialog(error_dialog, message,
 		    NULL, NULL, XtGrabExclusive) == Retry) 
       DoSaveAs();
@@ -869,7 +869,7 @@ void DoSaveAs(void)
   if (PopupDialog(input_dialog, "Save file:",
 		  filename, &filename, XtGrabExclusive) == Okay) {
     if (BWWriteFile(bitmap_widget, filename, NULL) != BitmapSuccess) {
-      XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
+      snprintf(message, sizeof(message), "Can't write file: %s", filename);
       if (PopupDialog(error_dialog, message,
 		      NULL, NULL, XtGrabExclusive) == Retry)
 	goto RetrySave;
@@ -895,7 +895,7 @@ void DoResize(void)
       FixStatus();
     }
     else {
-      XmuSnprintf(message, sizeof(message), "Wrong format: %s", format);
+      snprintf(message, sizeof(message), "Wrong format: %s", format);
       if (PopupDialog(error_dialog, message,
 		      NULL, NULL, XtGrabExclusive) == Retry)
 	goto RetryResize;
@@ -918,7 +918,7 @@ void DoRescale(void)
       FixStatus();
     }
     else {
-      XmuSnprintf(message, sizeof(message), "Wrong format: %s", format);
+      snprintf(message, sizeof(message), "Wrong format: %s", format);
       if (PopupDialog(error_dialog, message,
 		      NULL, NULL, XtGrabExclusive) == Retry)
 	goto RetryRescale;
@@ -956,7 +956,7 @@ void DoQuit(Widget w, XEvent *event, String *params, Cardinal *num_params)
     case Yes:
       if (BWWriteFile(bitmap_widget, filename, NULL) 
 	  != BitmapSuccess) {
-	XmuSnprintf(message, sizeof(message), "Can't write file: %s", filename);
+	snprintf(message, sizeof(message), "Can't write file: %s", filename);
 	if (PopupDialog(error_dialog, message, 
 			NULL, NULL, XtGrabExclusive) == Retry) 
 	  goto RetryQuit;
diff --git a/Bitmap.c b/Bitmap.c
index c2fc30e..39aa72a 100644
--- a/Bitmap.c
+++ b/Bitmap.c
@@ -1023,7 +1023,7 @@ BWUnparseStatus(Widget w)
 {
     BitmapWidget BW = (BitmapWidget) w;
     
-    XmuSnprintf(BW->bitmap.status, sizeof(BW->bitmap.status),
+    snprintf(BW->bitmap.status, sizeof(BW->bitmap.status),
 	    "Filename: %s  Basename: %s  Size: %dx%d",
 	    (strcmp(BW->bitmap.filename, "") ? BW->bitmap.filename : "<none>"),
 	    (strcmp(BW->bitmap.basename, "") ? BW->bitmap.basename : "<none>"),
-- 
1.7.3.2



More information about the xorg-devel mailing list