mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
dtstyle: Resolve format-overflow issues
This commit is contained in:
parent
7641634130
commit
bf266ee14b
11 changed files with 29 additions and 29 deletions
|
@ -714,8 +714,8 @@ saveAudio(
|
|||
x -= vendorExt->vendor.xOffset;
|
||||
y -= vendorExt->vendor.yOffset;
|
||||
|
||||
sprintf(bufr, "%s*audioDlg.x: %d\n", bufr, x);
|
||||
sprintf(bufr, "%s*audioDlg.y: %d\n", bufr, y);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*audioDlg.x: %d\n", bufr, x);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*audioDlg.y: %d\n", bufr, y);
|
||||
if(-1 == write (fd, bufr, strlen(bufr))) {
|
||||
perror(strerror(errno));
|
||||
}
|
||||
|
|
|
@ -1730,8 +1730,8 @@ saveColorEdit(
|
|||
x -= vendorExt->vendor.xOffset;
|
||||
y -= vendorExt->vendor.yOffset;
|
||||
|
||||
sprintf(bufr, "%s*colorEditDlg.x: %d\n", bufr, x);
|
||||
sprintf(bufr, "%s*colorEditDlg.y: %d\n", bufr, y);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*colorEditDlg.x: %d\n", bufr, x);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*colorEditDlg.y: %d\n", bufr, y);
|
||||
/*any other parameter you want to save goes here*/
|
||||
if(-1 == write (fd, bufr, strlen(bufr))) {
|
||||
perror(strerror(errno));
|
||||
|
|
|
@ -2455,11 +2455,11 @@ saveColor(
|
|||
x -= vendorExt->vendor.xOffset;
|
||||
y -= vendorExt->vendor.yOffset;
|
||||
|
||||
sprintf(bufr, "%s*paletteDlg.x: %d\n", bufr, x);
|
||||
sprintf(bufr, "%s*paletteDlg.y: %d\n", bufr, y);
|
||||
sprintf(bufr, "%s*paletteDlg.selected_palette: %s\n", bufr,
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*paletteDlg.x: %d\n", bufr, x);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*paletteDlg.y: %d\n", bufr, y);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*paletteDlg.selected_palette: %s\n", bufr,
|
||||
pCurrentPalette->name);
|
||||
sprintf(bufr, "%s*paletteDlg.selected_button: %d\n", bufr,
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*paletteDlg.selected_button: %d\n", bufr,
|
||||
selected_button);
|
||||
if(-1 == write (fd, bufr, strlen(bufr))) {
|
||||
perror(strerror(errno));
|
||||
|
|
|
@ -982,10 +982,10 @@ saveDtwm(
|
|||
width = XtWidth(style.dtwmDialog);
|
||||
height = XtHeight(style.dtwmDialog);
|
||||
|
||||
sprintf(bufr, "%s*dtwmDlg.x: %d\n", bufr, x);
|
||||
sprintf(bufr, "%s*dtwmDlg.y: %d\n", bufr, y);
|
||||
sprintf(bufr, "%s*dtwmDlg.width: %d\n", bufr, width);
|
||||
sprintf(bufr, "%s*dtwmDlg.height: %d\n", bufr, height);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*dtwmDlg.x: %d\n", bufr, x);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*dtwmDlg.y: %d\n", bufr, y);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*dtwmDlg.width: %d\n", bufr, width);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*dtwmDlg.height: %d\n", bufr, height);
|
||||
if(-1 == write (fd, bufr, strlen(bufr))) {
|
||||
perror(strerror(errno));
|
||||
}
|
||||
|
|
|
@ -754,8 +754,8 @@ saveFonts(
|
|||
x -= vendorExt->vendor.xOffset;
|
||||
y -= vendorExt->vendor.yOffset;
|
||||
|
||||
sprintf(bufr, "%s*Fonts.x: %d\n", bufr, x);
|
||||
sprintf(bufr, "%s*Fonts.y: %d\n", bufr, y);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*Fonts.x: %d\n", bufr, x);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*Fonts.y: %d\n", bufr, y);
|
||||
|
||||
if(-1 == write (fd, bufr, strlen(bufr))) {
|
||||
perror(strerror(errno));
|
||||
|
|
|
@ -1204,10 +1204,10 @@ saveI18n(
|
|||
width = XtWidth(style.i18nDialog);
|
||||
height = XtHeight(style.i18nDialog);
|
||||
|
||||
sprintf(bufr, "%s*i18nDlg.x: %d\n", bufr, x);
|
||||
sprintf(bufr, "%s*i18nDlg.y: %d\n", bufr, y);
|
||||
sprintf(bufr, "%s*i18nDlg.width: %d\n", bufr, width);
|
||||
sprintf(bufr, "%s*i18nDlg.height: %d\n", bufr, height);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*i18nDlg.x: %d\n", bufr, x);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*i18nDlg.y: %d\n", bufr, y);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*i18nDlg.width: %d\n", bufr, width);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*i18nDlg.height: %d\n", bufr, height);
|
||||
if(-1 == write (fd, bufr, strlen(bufr))) {
|
||||
perror(strerror(errno));
|
||||
}
|
||||
|
|
|
@ -633,8 +633,8 @@ saveKeybd(
|
|||
x -= vendorExt->vendor.xOffset;
|
||||
y -= vendorExt->vendor.yOffset;
|
||||
|
||||
sprintf(bufr, "%s*keyboardDlg.x: %d\n", bufr, x);
|
||||
sprintf(bufr, "%s*keyboardDlg.y: %d\n", bufr, y);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*keyboardDlg.x: %d\n", bufr, x);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*keyboardDlg.y: %d\n", bufr, y);
|
||||
|
||||
if(-1 == write (fd, bufr, strlen(bufr))) {
|
||||
perror(strerror(errno));
|
||||
|
|
|
@ -784,8 +784,8 @@ saveMain(
|
|||
/* Get and write out the geometry info for our Window */
|
||||
x = XtX(XtParent(style.mainWindow));
|
||||
y = XtY(XtParent(style.mainWindow));
|
||||
sprintf(bufr, "%s*mainWindow.x: %d\n", bufr, x);
|
||||
sprintf(bufr, "%s*mainWindow.y: %d\n", bufr, y);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*mainWindow.x: %d\n", bufr, x);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*mainWindow.y: %d\n", bufr, y);
|
||||
|
||||
if(-1 == write (fd, bufr, strlen(bufr))) {
|
||||
perror(strerror(errno));
|
||||
|
|
|
@ -1502,7 +1502,7 @@ ButtonCB(
|
|||
Bool do_accel, do_thresh;
|
||||
Bool set;
|
||||
char message1[6], message2[50], message3[6], message4[6];
|
||||
char pointerStr[70];
|
||||
char pointerStr[128];
|
||||
static char dclickRes[40];
|
||||
static char enableBtn1Res[40];
|
||||
int dclick;
|
||||
|
@ -1773,8 +1773,8 @@ saveMouse(
|
|||
x -= vendorExt->vendor.xOffset;
|
||||
y -= vendorExt->vendor.yOffset;
|
||||
|
||||
sprintf(bufr, "%s*Mouse.x: %d\n", bufr, x);
|
||||
sprintf(bufr, "%s*Mouse.y: %d\n", bufr, y);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*Mouse.x: %d\n", bufr, x);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*Mouse.y: %d\n", bufr, y);
|
||||
|
||||
if(-1 == write (fd, bufr, strlen(bufr))) {
|
||||
perror(strerror(errno));
|
||||
|
|
|
@ -2921,8 +2921,8 @@ saveScreen(
|
|||
x -= vendorExt->vendor.xOffset;
|
||||
y -= vendorExt->vendor.yOffset;
|
||||
|
||||
sprintf(bufr, "%s*Screen.x: %d\n", bufr, x);
|
||||
sprintf(bufr, "%s*Screen.y: %d\n", bufr, y);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*Screen.x: %d\n", bufr, x);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*Screen.y: %d\n", bufr, y);
|
||||
|
||||
if(-1 == write (fd, bufr, strlen(bufr))) {
|
||||
perror(strerror(errno));
|
||||
|
|
|
@ -725,8 +725,8 @@ saveStartup(
|
|||
x -= vendorExt->vendor.xOffset;
|
||||
y -= vendorExt->vendor.yOffset;
|
||||
|
||||
sprintf(bufr, "%s*startupDlg.x: %d\n", bufr, x);
|
||||
sprintf(bufr, "%s*startupDlg.y: %d\n", bufr, y);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*startupDlg.x: %d\n", bufr, x);
|
||||
snprintf(bufr, sizeof(style.tmpBigStr), "%s*startupDlg.y: %d\n", bufr, y);
|
||||
|
||||
if(-1 == write (fd, bufr, strlen(bufr))) {
|
||||
perror(strerror(errno));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue