summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-01-14 14:00:30 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-01-15 10:08:24 -0800
commitfcfa5f0dee6549994d8c4640fb61612d33369e74 (patch)
treee5181f40c27672e313b06b686800c77a02227fe3
parente3ecaf24ea4187516a1a0679783278e34e56499f (diff)
Call snprintf() directly instead of XmuSnprintf()
All platforms still supported by X.Org have long had snprintf() Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--BitEdit.c17
-rw-r--r--Bitmap.c3
2 files changed, 9 insertions, 11 deletions
diff --git a/BitEdit.c b/BitEdit.c
index 60ef2ab..6e0f307 100644
--- a/BitEdit.c
+++ b/BitEdit.c
@@ -46,7 +46,6 @@ from The Open Group.
#include <X11/Xaw/SimpleMenu.h>
#include <X11/Xaw/SmeLine.h>
#include <X11/Xaw/SmeBSB.h>
-#include <X11/Xmu/SysUtil.h>
#include "Bitmap.h"
#include <X11/bitmaps/xlogo16>
@@ -799,7 +798,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 +814,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 +834,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 +851,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 +868,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 +894,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 +917,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 +955,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..48bc976 100644
--- a/Bitmap.c
+++ b/Bitmap.c
@@ -35,7 +35,6 @@ from The Open Group.
#include <X11/Xaw/XawInit.h>
#include <X11/Xmu/CharSet.h>
#include <X11/Xmu/Drawing.h>
-#include <X11/Xmu/SysUtil.h>
#include <X11/Xatom.h>
#include <X11/Xfuncs.h>
#include <X11/Xos.h>
@@ -1023,7 +1022,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>"),