124 Star 0 Fork 18

src-openEuler/motif

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-fix-motif-no-autogen.patch 32.66 KB
一键复制 编辑 原始数据 按行查看 历史
baizg1107 提交于 2021-12-29 16:16 . update to 2.3.8
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044
From 4a8f9e268269b59157d6c87c1ba6aeb9b9cfb3bc Mon Sep 17 00:00:00 2001
From: bzg1107 <preloyalwhite@163.com>
Date: Wed, 29 Dec 2021 14:34:43 +0800
Subject: [PATCH] fix motif no autogen
---
Makefile.am | 3 +-
autogen.sh | 24 +++++++
clients/mwm/WmResParse.c | 2 +-
clients/uil/Makefile.am | 4 +-
configure.ac | 4 +-
doc/man/man1/mwm.1 | 16 ++---
doc/man/man3/VirtualBindings.3 | 2 +-
doc/man/man3/XmColorSelector.3 | 2 +-
doc/man/man4/mwmrc.4 | 12 ++--
lib/Mrm/Mrmhier.c | 4 +-
lib/Mrm/Mrmicon.c | 4 +-
lib/Mrm/Mrmlread.c | 2 +-
lib/Mrm/Mrmwcrw.c | 4 +-
lib/Xm/ColorS.c | 2 +-
lib/Xm/XmosP.h | 2 +-
tools/wml/wmldbcreate.c | 2 +-
tools/wml/wmlouth.c | 124 ++++++++++++++++-----------------
tools/wml/wmloutkey.c | 10 +--
tools/wml/wmloutmm.c | 16 ++---
tools/wml/wmlresolve.c | 22 +++---
20 files changed, 142 insertions(+), 119 deletions(-)
create mode 100755 autogen.sh
diff --git a/Makefile.am b/Makefile.am
index ebd376a..3701667 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,7 +27,6 @@ SUBDIRS = bindings bitmaps \
include \
tools \
clients \
- doc \
- demos
+ doc
AUTOMAKE_OPTIONS = 1.4
ACLOCAL_AMFLAGS = -I .
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..726f927
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+THEDIR="`pwd`"
+cd "$srcdir"
+DIE=0
+
+libtoolize --force --automake
+aclocal -I .
+autoconf
+autoheader
+automake --foreign --include-deps --add-missing
+
+if test -z "$*"; then
+ echo "I am going to run ./configure with no arguments - if you wish "
+ echo "to pass any to it, please specify them on the $0 command line."
+fi
+
+cd "$THEDIR"
+
+$srcdir/configure "$@"
+
diff --git a/clients/mwm/WmResParse.c b/clients/mwm/WmResParse.c
index 14c8f0e..f8726ae 100644
--- a/clients/mwm/WmResParse.c
+++ b/clients/mwm/WmResParse.c
@@ -2388,7 +2388,7 @@ FILE *FopenConfigFile (void)
#endif /* PANELIST */
#ifndef MWMRCDIR
-#define MWMRCDIR "/usr/lib/X11"
+#define MWMRCDIR "/etc/X11/mwm"
#endif
if (LANG != NULL)
{
diff --git a/clients/uil/Makefile.am b/clients/uil/Makefile.am
index c4f6492..b19994b 100644
--- a/clients/uil/Makefile.am
+++ b/clients/uil/Makefile.am
@@ -13,7 +13,7 @@ UilParser.lo: UilParser.c
libUil_la_LIBADD = UilParser.lo ../../lib/Mrm/libMrm.la ../../lib/Xm/libXm.la
-uil_LDADD = ../../lib/Mrm/libMrm.la ../../lib/Xm/libXm.la
+uil_LDADD = libUil.la ../../lib/Mrm/libMrm.la ../../lib/Xm/libXm.la
INCLUDES = -DINCDIR=\"@INCDIR@\" \
-DLIBDIR=\"@LIBDIR@\" \
@@ -42,7 +42,7 @@ COMMON_SRC = UilCmd.c UilDiags.c UilKeyTab.c UilLexAna.c \
UilLstMac.c UilSemVal.c UilSemCSet.c UilDB.c
SRCS = $(COMMON_SRC)
-SRCS2 = $(COMMON_SRC) UilMain.c
+SRCS2 = UilMain.c
HEADERS_1 = Uil.h UilSymGl.h UilSymDef.h \
UilDef.h XmAppl.uil
diff --git a/configure.ac b/configure.ac
index 9d1d11e..3fd70d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -175,13 +175,13 @@ AC_SUBST(CDE_CONFIGURATION_TOP)
LIBDIR="${libdir}/X11"
AC_SUBST(LIBDIR)
-MWMRCDIR="${libdir}/X11"
+MWMRCDIR="/etc/X11/mwm"
AC_SUBST(MWMRCDIR)
INCDIR="${includedir}/X11"
AC_SUBST(INCDIR)
-XMBINDDIR_FALLBACK="${libdir}/X11/bindings"
+XMBINDDIR_FALLBACK="${datadir}/X11/bindings"
AC_SUBST(XMBINDDIR_FALLBACK)
RM="rm -f"
diff --git a/doc/man/man1/mwm.1 b/doc/man/man1/mwm.1
index dd4b3b8..f527e58 100644
--- a/doc/man/man1/mwm.1
+++ b/doc/man/man1/mwm.1
@@ -366,7 +366,7 @@ The \fBmwm\fP command is configured from its resource
database\&. This database is built from the following sources\&. They are listed
in order of precedence, low to high:
.PP
-\fB/usr/X11R6/lib/X11/app-defaults/Mwm\fP
+\fB/usr/share/X11/app-defaults/Mwm\fP
.PP
\fB$HOME/Mwm\fP
.PP
@@ -595,7 +595,7 @@ lw(1.528376i) lw(1.592955i) lw(1.054795i) lw(1.323875i).
NameClassValue TypeDefault
autoKeyFocusAutoKeyFocusT/FT
autoRaiseDelayAutoRaiseDelaymillisec500
-bitmap-Bitmap-directory/usr/X11R6/include-
+bitmap-Bitmap-directory/usr/include-
DirectoryDirectory/X11/bitmaps
clientAutoPlaceClientAutoPlaceT/FT
colormapFocus-ColormapFocus-stringkeyboard
@@ -650,7 +650,7 @@ the keyboard focus\&. The default value of this resource is 500 (ms)\&.
This resource identifies a directory to be searched for bitmaps referenced
by \fBmwm\fP resources\&. This directory is searched if a bitmap
is specified without an absolute pathname\&. The default value for this resource
-is \fB/usr/X11R6/include/X11/bitmaps\fP\&. The directory \fB/usr/X11R6/include/X11/bitmaps\fP
+is \fB/usr/include/X11/bitmaps\fP\&. The directory \fB/usr/include/X11/bitmaps\fP
represents the customary locations for this directory\&. The actual
location of this directory may vary on some systems\&. If the bitmap is not
found in the specified directory, \fBXBMLANGPATH\fP is searched\&.
@@ -678,8 +678,8 @@ is set, \fBmwm\fP looks for \fI$HOME/$LANG\fP/ \fBconfigFile\fP\&. If that file
\fB$HOME\fP/\fBconfigFile\fP\&. If the \fIconfigFile\fP pathname does not begin with "~/" or "/", \fBmwm\fP considers it to be relative to the current working directory\&. If
the \fIconfigFile\fP resource is not specified
or if that file does not exist, \fBmwm\fP uses several default
-paths to find a configuration file\&. The order of the search is shown below: \fB/usr/X11R6/lib/X11/$LANG/system\&.mwmrc\fP\(dg
-\fB/usr/X11R6/lib/X11/system\&.mwmrc\fP\(dg Paths marked with \&'\(dg\&' are
+paths to find a configuration file\&. The order of the search is shown below: \fB/etc/X11/mwm/$LANG/system\&.mwmrc\fP\(dg
+\fB/etc/X11/mwm/system\&.mwmrc\fP\(dg Paths marked with \&'\(dg\&' are
implementation dependent\&.
.IP "\fIdeiconifyKeyFocus\fP\ (class\ \fIDeiconifyKeyFocus\fP)" 10
This resource applies only when the keyboard input focus policy is explicit\&.
@@ -1344,11 +1344,11 @@ the shell to use when executing commands via the \fBf\&.exec\fP
function\&.
.SS "Files"
.PP
-\fB/usr/X11R6/lib/X11/$LANG/system\&.mwmrc\fP
+\fB/etc/X11/mwm/$LANG/system\&.mwmrc\fP
.PP
-\fB/usr/X11R6/lib/X11/system\&.mwmrc\fP
+\fB/etc/X11/mwm/system\&.mwmrc\fP
.PP
-\fB/usr/X11R6/lib/X11/app-defaults/Mwm\fP
+\fB/usr/share/X11/app-defaults/Mwm\fP
.PP
\fB$HOME/Mwm\fP
.PP
diff --git a/doc/man/man3/VirtualBindings.3 b/doc/man/man3/VirtualBindings.3
index e227f0e..8c10e18 100644
--- a/doc/man/man3/VirtualBindings.3
+++ b/doc/man/man3/VirtualBindings.3
@@ -90,7 +90,7 @@ bindings contained in that file\&.
If it has found no bindings, Motif next looks for the file
\fBxmbind\&.alias\fP in the directory specified by the environment
variable \fBXMBINDDIR\fP, if \fBXMBINDDIR\fP is set, or in the directory
-\fB/usr/lib/Xm/bindings\fP if \fBXMBINDDIR\fP is not set\&.
+\fB/usr/share/X11/bindings\fP if \fBXMBINDDIR\fP is not set\&.
If this file exists Motif searches it for a pathname associated with the
vendor string or with the vendor string and vendor release\&.
If it finds such a pathname and if that file exists, Motif loads the
diff --git a/doc/man/man3/XmColorSelector.3 b/doc/man/man3/XmColorSelector.3
index 22e0047..fb43803 100644
--- a/doc/man/man3/XmColorSelector.3
+++ b/doc/man/man3/XmColorSelector.3
@@ -34,7 +34,7 @@ marginWidth%MarginWidth%HorizontalDimension%2
noCellError%NoCellError%XmString%"No Color Cell
%%% Available"
redSliderLabel%SliderLabel%XmString%"Red"
-rgbFile%String%String%/usr/lib/X11/rgb.txt
+rgbFile%String%String%/usr/share/X11/rgb.txt
sliderTogLabel%TogLabel%XmString%"Color Sliders"
.TE
.PP
diff --git a/doc/man/man4/mwmrc.4 b/doc/man/man4/mwmrc.4
index e8de9f9..5d16fca 100644
--- a/doc/man/man4/mwmrc.4
+++ b/doc/man/man4/mwmrc.4
@@ -57,7 +57,7 @@ file that controls much of the behavior of the Motif window manager \fBmwm\fP\&.
It contains descriptions of resources that cannot easily be
written using standard X Window System, Version 11 resource syntax\&. The resource
description file contains entries that are referred to by X resources in
-defaults files (for example, \fB/usr/X11R6/lib/X11/app-defaults/Mwm\fP)
+defaults files (for example, \fB/usr/share/X11/app-defaults/Mwm\fP)
or in the \fBRESOURCE_MANAGER\fP property on the
root window\&. For example, the resource description file enables you to specify
different types of window menus; however, an X resource is used to specify
@@ -72,8 +72,8 @@ on a per-user basis:
.nf
\f(CW$HOME/$LANG/\&.mwmrc
$HOME/\&.mwmrc
-/usr/X11R6/lib/X11/$LANG/system\&.mwmrc
-/usr/X11R6/lib/X11/system\&.mwmrc\fR
+/etc/X11/mwm/$LANG/system\&.mwmrc
+/etc/X11/mwm/system\&.mwmrc\fR
.fi
.PP
.PP
@@ -84,7 +84,7 @@ resource\&. The following shows how a different resource description file can
be specified from the command line:
.PP
.nf
-\f(CW/usr/X11R6/bin/X11/mwm -xrm "mwm*configFile: mymwmrc"\fR
+\f(CW/usr/bin/mwm -xrm "mwm*configFile: mymwmrc"\fR
.fi
.PP
.SS "Resource Types"
@@ -626,8 +626,8 @@ is not what you expect\&.
.nf
\fB$HOME/$LANG/\&.mwmrc
$HOME/\&.mwmrc
-/usr/X11R6/lib/X11/$LANG/system\&.mwmrc
-/usr/X11R6/lib/X11/system\&.mwmrc\fP
+/etc/X11/mwm/$LANG/system\&.mwmrc
+/etc/X11/mwm/system\&.mwmrc\fP
.fi
.SH "RELATED INFORMATION"
.PP
diff --git a/lib/Mrm/Mrmhier.c b/lib/Mrm/Mrmhier.c
index 666854f..e041b49 100644
--- a/lib/Mrm/Mrmhier.c
+++ b/lib/Mrm/Mrmhier.c
@@ -259,10 +259,10 @@ Urm__OpenHierarchy (MrmCount num_files,
case MrmSUCCESS:
break;
case MrmNOT_VALID:
- sprintf (err_stg, _MrmMMsg_0113);
+ sprintf (err_stg, "%s", _MrmMMsg_0113);
break;
default:
- sprintf (err_stg, _MrmMMsg_0114);
+ sprintf (err_stg, "%s", _MrmMMsg_0114);
break;
}
}
diff --git a/lib/Mrm/Mrmicon.c b/lib/Mrm/Mrmicon.c
index f44a73b..ee7db95 100644
--- a/lib/Mrm/Mrmicon.c
+++ b/lib/Mrm/Mrmicon.c
@@ -1170,7 +1170,7 @@ Urm__RealizeColorTable (Screen *screen,
}
break;
default:
- sprintf(err_msg, _MrmMMsg_0040);
+ sprintf(err_msg, "%s", _MrmMMsg_0040);
return Urm__UT_Error ("Urm__RelizeColorTable",
err_msg, NULL, NULL, MrmFAILURE) ;
}
@@ -1246,7 +1246,7 @@ Urm__RealizeColorTable (Screen *screen,
break;
default:
result = MrmFAILURE;
- sprintf (err_msg, _MrmMMsg_0040);
+ sprintf (err_msg, "%s", _MrmMMsg_0040);
Urm__UT_Error ("Urm__RelizeColorTable",
err_msg, NULL, NULL, MrmFAILURE) ;
}
diff --git a/lib/Mrm/Mrmlread.c b/lib/Mrm/Mrmlread.c
index 489b66a..1f3ae43 100644
--- a/lib/Mrm/Mrmlread.c
+++ b/lib/Mrm/Mrmlread.c
@@ -685,7 +685,7 @@ MrmFetchColorLiteral (MrmHierarchy hierarchy_id,
XBlackPixelOfScreen(XDefaultScreenOfDisplay(display)));
break;
default:
- sprintf(err_msg, _MrmMMsg_0040);
+ sprintf(err_msg, "%s", _MrmMMsg_0040);
result = Urm__UT_Error ("MrmFetchColorLiteral",
err_msg, NULL, NULL, MrmFAILURE) ;
_MrmAppUnlock(app);
diff --git a/lib/Mrm/Mrmwcrw.c b/lib/Mrm/Mrmwcrw.c
index ada9aa3..0823928 100644
--- a/lib/Mrm/Mrmwcrw.c
+++ b/lib/Mrm/Mrmwcrw.c
@@ -1385,7 +1385,7 @@ Urm__CW_CreateArglist (Widget parent,
}
break;
default:
- sprintf (err_msg, _MrmMMsg_0040);
+ sprintf (err_msg, "%s", _MrmMMsg_0040);
result = Urm__UT_Error ("Urm__CW_ConvertValue",
err_msg, NULL, NULL, MrmFAILURE) ;
};
@@ -2421,7 +2421,7 @@ Urm__CW_ConvertValue (Widget parent,
}
break;
default:
- sprintf(err_msg, _MrmMMsg_0040);
+ sprintf(err_msg, "%s", _MrmMMsg_0040);
return Urm__UT_Error ("Urm__CW_ConvertValue",
err_msg, NULL, NULL, MrmFAILURE) ;
};
diff --git a/lib/Xm/ColorS.c b/lib/Xm/ColorS.c
index 6baf2e3..22224ae 100644
--- a/lib/Xm/ColorS.c
+++ b/lib/Xm/ColorS.c
@@ -146,7 +146,7 @@ static XtResource resources[] =
{
XmNrgbFile, XmCString, XmRString,
sizeof(String), XtOffsetOf(XmColorSelectorRec, cs.rgb_file),
- XmRString, (XtPointer) "/usr/lib/X11/rgb.txt"
+ XmRString, (XtPointer) "/usr/share/X11/rgb.txt"
},
#endif
{
diff --git a/lib/Xm/XmosP.h b/lib/Xm/XmosP.h
index 66e52af..9cc5ddb 100644
--- a/lib/Xm/XmosP.h
+++ b/lib/Xm/XmosP.h
@@ -169,7 +169,7 @@ extern "C" {
#define XMBINDDIR "XMBINDDIR"
#ifndef XMBINDDIR_FALLBACK
-#define XMBINDDIR_FALLBACK "/usr/lib/Xm/bindings"
+#define XMBINDDIR_FALLBACK "/usr/lib/X11/bindings"
#endif
#define XMBINDFILE "xmbind.alias"
#define MOTIFBIND ".motifbind"
diff --git a/tools/wml/wmldbcreate.c b/tools/wml/wmldbcreate.c
index 878220e..65aecf0 100644
--- a/tools/wml/wmldbcreate.c
+++ b/tools/wml/wmldbcreate.c
@@ -418,7 +418,7 @@ int table_id;
{
fprintf (afile, "%d, ", entry_vec[j]);
}
- fprintf (afile, "\n");
+ fprintf (afile, "%s", "\n");
}
}
}
diff --git a/tools/wml/wmlouth.c b/tools/wml/wmlouth.c
index 62cf682..ead4512 100644
--- a/tools/wml/wmlouth.c
+++ b/tools/wml/wmlouth.c
@@ -219,12 +219,12 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilSymGen.h");
return;
}
-fprintf (outfil, canned_warn);
+fprintf (outfil, "%s", canned_warn);
/*
* Write the sym_k..._object literals
*/
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned1);
for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
{
clsobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ndx].objptr;
@@ -238,7 +238,7 @@ for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
/*
* Define the sym_k_..._reason literals
*/
-fprintf (outfil, canned3);
+fprintf (outfil, "%s", canned3);
for ( ndx=0 ; ndx<wml_obj_reason_ptr->cnt ; ndx++ )
{
resobj = (WmlResourceDefPtr) wml_obj_reason_ptr->hvec[ndx].objptr;
@@ -252,7 +252,7 @@ for ( ndx=0 ; ndx<wml_obj_reason_ptr->cnt ; ndx++ )
/*
* Define the sym_k_..._arg literals
*/
-fprintf (outfil, canned4);
+fprintf (outfil,"%s", canned4);
for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
{
resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr;
@@ -266,7 +266,7 @@ for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
/*
* Define the sym_k_..._enumset structs and literals
*/
-fprintf (outfil, canned5);
+fprintf (outfil, "%s", canned5);
for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
{
enumsetobj = (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objptr;
@@ -280,7 +280,7 @@ for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
/*
* Define the sym_k_..._enumval literals
*/
-fprintf (outfil, canned6);
+fprintf (outfil, "%s", canned6);
for ( ndx=0 ; ndx<wml_obj_enumval_ptr->cnt ; ndx++ )
{
enumvalobj = (WmlEnumValueDefPtr) wml_obj_enumval_ptr->hvec[ndx].objptr;
@@ -295,7 +295,7 @@ for ( ndx=0 ; ndx<wml_obj_enumval_ptr->cnt ; ndx++ )
* Define the sym_k_..._charsize literals
* Define the sym_k_..._charset literals
*/
-fprintf (outfil, canned7);
+fprintf (outfil, "%s", canned7);
for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
{
charsetobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
@@ -309,7 +309,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
/*
* Define the sym_k_..._child literals
*/
-fprintf (outfil, canned8);
+fprintf (outfil, "%s", canned8);
for ( ndx=0 ; ndx<wml_obj_child_ptr->cnt ; ndx++ )
{
childobj = (WmlChildDefPtr) wml_obj_child_ptr->hvec[ndx].objptr;
@@ -373,12 +373,12 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilSymChCL.h");
return;
}
-fprintf (outfil, canned_warn);
+fprintf (outfil, "%s", canned_warn);
/*
* Create table entries, similar to writing sym_k...
*/
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned1);
for ( ndx=0 ; ndx<wml_obj_child_ptr->cnt ; ndx++ )
{
childobj = (WmlChildDefPtr) wml_obj_child_ptr->hvec[ndx].objptr;
@@ -386,7 +386,7 @@ for ( ndx=0 ; ndx<wml_obj_child_ptr->cnt ; ndx++ )
fprintf (outfil, " sym_k_%s_object,\n",
classobj->tkname);
}
-fprintf (outfil, canned1a);
+fprintf (outfil, "%s", canned1a);
/*
* close the output file
@@ -440,12 +440,12 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilSymArTy.h");
return;
}
-fprintf (outfil, canned_warn);
+fprintf (outfil, "%s", canned_warn);
/*
* Create table entries, similar to writing sym_k...
*/
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned1);
for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
{
resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr;
@@ -453,7 +453,7 @@ for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
fprintf (outfil, " sym_k_%s_value,\n",
datobj->tkname);
}
-fprintf (outfil, canned1a);
+fprintf (outfil, "%s", canned1a);
/*
* close the output file
@@ -503,19 +503,19 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilSymRArg.h");
return;
}
-fprintf (outfil, canned_warn);
+fprintf (outfil, "%s", canned_warn);
/*
* Create table entries, similar to writing sym_k...
*/
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned1);
for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
{
resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr;
fprintf (outfil, " %d,\n",
resobj->related_code);
}
-fprintf (outfil, canned1a);
+fprintf (outfil, "%s", canned1a);
/*
* close the output file
@@ -615,12 +615,12 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilUrmClas.h");
return;
}
-fprintf (outfil, canned_warn);
+fprintf (outfil, "%s", canned_warn);
/*
* Write entries for widgets
*/
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned1);
for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
{
clsobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ndx].objptr;
@@ -631,7 +631,7 @@ for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
else
fprintf (outfil, " \"%s\",\t\n", synobj->convfunc);
}
-fprintf (outfil, canned2);
+fprintf (outfil, "%s", canned2);
/*
* Write entries for gadget variants of widget classes
@@ -655,7 +655,7 @@ for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
synobj->name);
}
}
-fprintf (outfil, canned3);
+fprintf (outfil, "%s", canned3);
/*
* Write entries for non-dialog widgets
@@ -679,7 +679,7 @@ for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
synobj->name);
}
}
-fprintf (outfil, canned4);
+fprintf (outfil, "%s", canned4);
/*
* Write entries for the resource a widget's controls map to
@@ -695,7 +695,7 @@ for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
else
fprintf (outfil, " sym_k_%s_arg,\n", mapresobj->tkname);
}
-fprintf (outfil, canned5);
+fprintf (outfil, "%s", canned5);
/*
* Write entries for arguments
@@ -708,7 +708,7 @@ for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
fprintf (outfil, " %s,\n",
synres->resliteral);
}
-fprintf (outfil, canned6);
+fprintf (outfil, "%s", canned6);
/*
* Write entries for reasons
@@ -721,7 +721,7 @@ for ( ndx=0 ; ndx<wml_obj_reason_ptr->cnt ; ndx++ )
fprintf (outfil, " %s,\n",
synres->resliteral);
}
-fprintf (outfil, canned7);
+fprintf (outfil, "%s", canned7);
/*
* close the output file
@@ -775,13 +775,13 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilConst.h");
return;
}
-fprintf (outfil, canned_warn);
+fprintf (outfil, "%s", canned_warn);
/*
* Process the arguments in code order. We start with 1, and write out
* the mask after processing 8 codes.
*/
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned1);
strcpy (maskbuf, "0");
for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
{
@@ -872,8 +872,8 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilSymReas.h");
return;
}
-fprintf (outfil, canned_warn);
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned_warn);
+fprintf (outfil, "%s", canned1);
/*
* Generate the bit vectors for each class. Outer loop on the reason code,
@@ -919,13 +919,13 @@ for ( resndx=0 ; resndx<wml_obj_reason_ptr->cnt ; resndx++ )
/*
* Write the vector of vectors.
*/
-fprintf (outfil, canned2);
+fprintf (outfil, "%s", canned2);
for ( resndx=0 ; resndx<wml_obj_reason_ptr->cnt ; resndx++ )
{
resobj = (WmlResourceDefPtr) wml_obj_reason_ptr->hvec[resndx].objptr;
fprintf (outfil, " reason_class_vec%d,\n", resobj->sym_code);
}
-fprintf (outfil, canned3);
+fprintf (outfil, "%s", canned3);
/*
* close the output file
@@ -998,8 +998,8 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilSymArTa.h");
return;
}
-fprintf (outfil, canned_warn);
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned_warn);
+fprintf (outfil, "%s", canned1);
/*
* Generate the bit vectors for each class. Outer loop on the argument code,
@@ -1039,19 +1039,19 @@ for ( resndx=0 ; resndx<wml_obj_arg_ptr->cnt ; resndx++ )
if ( itemno != 0 )
fprintf (outfil, "%s 0};\n", maskbuf);
else
- fprintf (outfil, "};\n");
+ fprintf (outfil, "%s", "};\n");
}
/*
* Write the vector of vectors.
*/
-fprintf (outfil, canned2);
+fprintf (outfil, "%s", canned2);
for ( resndx=0 ; resndx<wml_obj_arg_ptr->cnt ; resndx++ )
{
resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[resndx].objptr;
fprintf (outfil, " arg_class_vec%d,\n", resobj->sym_code);
}
-fprintf (outfil, canned3);
+fprintf (outfil, "%s", canned3);
/*
* close the output file
@@ -1123,8 +1123,8 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilSymChTa.h");
return;
}
-fprintf (outfil, canned_warn);
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned_warn);
+fprintf (outfil, "%s", canned1);
/*
* Generate the bit vectors for each class. Outer loop on the child code,
@@ -1168,13 +1168,13 @@ for ( childndx=0 ; childndx<wml_obj_child_ptr->cnt ; childndx++ )
/*
* Write the vector of vectors.
*/
-fprintf (outfil, canned2);
+fprintf (outfil, "%s", canned2);
for ( childndx=0 ; childndx<wml_obj_child_ptr->cnt ; childndx++ )
{
childobj = (WmlChildDefPtr) wml_obj_child_ptr->hvec[childndx].objptr;
fprintf (outfil, " child_class_vec%d,\n", childobj->sym_code);
}
-fprintf (outfil, canned3);
+fprintf (outfil, "%s", canned3);
/*
* close the output file
@@ -1245,8 +1245,8 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilSymCtl.h");
return;
}
-fprintf (outfil, canned_warn);
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned_warn);
+fprintf (outfil, "%s", canned1);
/*
* Generate the bit vectors for each class. Outer loop on the class code,
@@ -1284,19 +1284,19 @@ for ( ctlndx=0 ; ctlndx<wml_obj_class_ptr->cnt ; ctlndx++ )
if ( itemno != 0 )
fprintf (outfil, "%s 0};\n", maskbuf);
else
- fprintf (outfil, "};\n");
+ fprintf (outfil, "%s", "};\n");
}
/*
* Write the vector of vectors.
*/
-fprintf (outfil, canned2);
+fprintf (outfil, "%s", canned2);
for ( ctlndx=0 ; ctlndx<wml_obj_class_ptr->cnt ; ctlndx++ )
{
clsobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ctlndx].objptr;
fprintf (outfil, " object_class_vec%d,\n", clsobj->sym_code);
}
-fprintf (outfil, canned3);
+fprintf (outfil, "%s", canned3);
/*
* close the output file
@@ -1432,7 +1432,7 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilSymNam.h");
return;
}
-fprintf (outfil, canned_warn);
+fprintf (outfil, "%s", canned_warn);
/*
* Write entries for widgets
@@ -1511,7 +1511,7 @@ for ( ndx=0 ; ndx<wml_obj_child_ptr->cnt ; ndx++ )
fprintf (outfil, " \"%s\",\n",
synch->name);
}
-fprintf (outfil, canned7);
+fprintf (outfil, "%s", canned7);
/*
* close the output file
@@ -1615,12 +1615,12 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilSymEnum.h");
return;
}
-fprintf (outfil, canned_warn);
+fprintf (outfil, "%s", canned_warn);
/*
* Generate the enumeration value vectors for each enumeration set.
*/
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned1);
for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
{
enumsetobj = (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objptr;
@@ -1631,13 +1631,13 @@ for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
fprintf (outfil, " %d,\n",
evobj->sym_code);
}
- fprintf (outfil, " };\n");
+ fprintf (outfil, "%s", " };\n");
}
/*
* Generate the enumeration set tables
*/
-fprintf (outfil, canned3);
+fprintf (outfil, "%s", canned3);
for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
{
enumsetobj = (WmlEnumSetDefPtr) wml_obj_enumset_ptr->hvec[ndx].objptr;
@@ -1649,12 +1649,12 @@ for ( ndx=0 ; ndx<wml_obj_enumset_ptr->cnt ; ndx++ )
/*
* Create enumset table entries for arguments, similar to writing sym_k...
*/
-fprintf (outfil, canned4);
+fprintf (outfil, "%s", canned4);
for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
{
resobj = (WmlResourceDefPtr) wml_obj_arg_ptr->hvec[ndx].objptr;
if ( resobj->enumset_def == NULL )
- fprintf (outfil, " 0,\n");
+ fprintf (outfil, "%s", " 0,\n");
else
fprintf (outfil, " %d,\n",
resobj->enumset_def->sym_code);
@@ -1663,13 +1663,13 @@ for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
/*
* Create the enumval values table.
*/
-fprintf (outfil, canned5);
+fprintf (outfil, "%s", canned5);
for ( ndx=0 ; ndx<wml_obj_enumval_ptr->cnt ; ndx++ )
{
evobj = (WmlEnumValueDefPtr) wml_obj_enumval_ptr->hvec[ndx].objptr;
fprintf (outfil, " %s,\n", evobj->syndef->enumlit);
}
-fprintf (outfil, canned5a);
+fprintf (outfil, "%s", canned5a);
/*
* close the output file
@@ -1807,12 +1807,12 @@ if ( outfil == (FILE *) NULL )
printf ("\nCouldn't open UilSymCSet.h");
return;
}
-fprintf (outfil, canned_warn);
+fprintf (outfil, "%s", canned_warn);
/*
* Generate the standards name table
*/
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned1);
for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
{
csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
@@ -1830,7 +1830,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
/*
* Generate the writing direction table
*/
-fprintf (outfil, canned2);
+fprintf (outfil, "%s", canned2);
for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
{
csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
@@ -1852,7 +1852,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
/*
* Generate the parsing direction table
*/
-fprintf (outfil, canned3);
+fprintf (outfil, "%s", canned3);
for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
{
csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
@@ -1874,7 +1874,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
/*
* Generate the character size table
*/
-fprintf (outfil, canned4);
+fprintf (outfil, "%s", canned4);
for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
{
csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
@@ -1900,7 +1900,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
/*
* Generate the $LANG name recognition table
*/
-fprintf (outfil, canned5);
+fprintf (outfil, "%s", canned5);
lang_max = 0;
for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
{
@@ -1930,7 +1930,7 @@ for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
/*
* Generate the $LANG code lookup table, in upper case
*/
-fprintf (outfil, canned6);
+fprintf (outfil, "%s", canned6);
for ( ndx=0 ; ndx<wml_obj_charset_ptr->cnt ; ndx++ )
{
csobj = (WmlCharSetDefPtr) wml_obj_charset_ptr->hvec[ndx].objptr;
diff --git a/tools/wml/wmloutkey.c b/tools/wml/wmloutkey.c
index eb90a71..c829b83 100644
--- a/tools/wml/wmloutkey.c
+++ b/tools/wml/wmloutkey.c
@@ -568,16 +568,16 @@ if ( outfil == NULL )
printf ("\nCouldn't open UilKeyTab.h");
return;
}
-fprintf (outfil, canned_warn);
+fprintf (outfil, "%s", canned_warn);
/*
* Print the case sensitive and insensitive tables
*/
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned1);
wmlOutputUilKeyTabBody (outfil, wml_tok_sens_ptr, &maxlen, &maxkey);
fprintf (outfil, canned2, maxlen, maxkey);
wmlOutputUilKeyTabBody (outfil, wml_tok_insens_ptr, &maxlen, &maxkey);
-fprintf (outfil, canned3);
+fprintf (outfil, "%s", canned3);
/*
* close the output file
@@ -806,8 +806,8 @@ if ( outfil == NULL )
printf ("\nCouldn't open UilTokName.h");
return;
}
-fprintf (outfil, canned_warn);
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned_warn);
+fprintf (outfil, "%s", canned1);
/*
* Print the token name entries
diff --git a/tools/wml/wmloutmm.c b/tools/wml/wmloutmm.c
index 6183339..835da80 100644
--- a/tools/wml/wmloutmm.c
+++ b/tools/wml/wmloutmm.c
@@ -203,9 +203,9 @@ int ctlndx; /* to access ordered vector */
/*
* Write out header information
*/
-fprintf (outfil, canned1);
+fprintf (outfil, "%s", canned1);
fprintf (outfil, "%s\n", name);
-fprintf (outfil, canned2);
+fprintf (outfil, "%s", canned2);
/*
* Alphabetize the controls, reason, and argument lists
@@ -258,7 +258,7 @@ while ( ctlref != NULL )
rsnndx = 0;
ctlndx = 0;
if ( mm_ctl_ptr->cnt == 0 )
- fprintf (outfil, "No children are supported");
+ fprintf (outfil, "%s", "No children are supported");
while ( rsnndx<mm_rsn_ptr->cnt || ctlndx<mm_ctl_ptr->cnt )
{
if ( ctlndx < mm_ctl_ptr->cnt )
@@ -269,7 +269,7 @@ while ( rsnndx<mm_rsn_ptr->cnt || ctlndx<mm_ctl_ptr->cnt )
ctlndx += 1;
}
else
- fprintf (outfil, "@");
+ fprintf (outfil, "%s", "@");
if ( rsnndx < mm_rsn_ptr->cnt )
{
@@ -279,9 +279,9 @@ while ( rsnndx<mm_rsn_ptr->cnt || ctlndx<mm_ctl_ptr->cnt )
rsnndx += 1;
}
else
- fprintf (outfil, "\n");
+ fprintf (outfil, "%s", "\n");
}
-fprintf (outfil, canned3);
+fprintf (outfil, "%s", canned3);
/*
* Write out the argument table
@@ -313,11 +313,11 @@ while ( argndx < mm_arg_ptr->cnt )
argref->act_resource->syndef->dflt);
}
else
- fprintf (outfil, " \n");
+ fprintf (outfil, "%s", " \n");
}
argndx += 1;
}
-fprintf (outfil, canned4);
+fprintf (outfil, "%s", canned4);
}
diff --git a/tools/wml/wmlresolve.c b/tools/wml/wmlresolve.c
index 8dc359e..cd3ce3b 100644
--- a/tools/wml/wmlresolve.c
+++ b/tools/wml/wmlresolve.c
@@ -1335,7 +1335,7 @@ for ( ndx=0 ; ndx<wml_obj_allclass_ptr->cnt ; ndx++ )
/*
* close the output file
*/
-fprintf (outfil, "\n\n");
+fprintf (outfil, "%s", "\n\n");
printf ("\nCreated report file wml.report");
fclose (outfil);
@@ -1364,14 +1364,14 @@ fprintf (outfil, "\n\n\nClass %s:", synobj->name);
switch ( synobj->type )
{
case WmlClassTypeMetaclass:
- fprintf (outfil, "\n Type: Metaclass\t");
+ fprintf (outfil, "%s", "\n Type: Metaclass\t");
if ( synobj->superclass != NULL )
fprintf (outfil, "Superclass: %s\t", synobj->superclass);
if ( synobj->parentclass != NULL )
fprintf (outfil, "Parentclass: %s\t", synobj->parentclass);
break;
case WmlClassTypeWidget:
- fprintf (outfil, "\n Type: Widget\t");
+ fprintf (outfil, "%s", "\n Type: Widget\t");
if ( synobj->superclass != NULL )
fprintf (outfil, "Superclass: %s\t", synobj->superclass);
if ( synobj->parentclass != NULL )
@@ -1383,7 +1383,7 @@ switch ( synobj->type )
fprintf (outfil, "Convenience function: %s", synobj->convfunc);
break;
case WmlClassTypeGadget:
- fprintf (outfil, "\n Type: Gadget\t");
+ fprintf (outfil, "%s", "\n Type: Gadget\t");
if ( synobj->superclass != NULL )
fprintf (outfil, "Superclass: %s\t", synobj->superclass);
if ( synobj->parentclass != NULL )
@@ -1409,19 +1409,19 @@ if ( clsobj->nondialog != NULL )
* is intended to match the way resources are printed in the toolkit manual,
* so that checking is as easy as possible.
*/
-fprintf (outfil, "\n Arguments:");
+fprintf (outfil, "%s", "\n Arguments:");
wmlResolvePrintClassArgs (outfil, clsobj);
/*
* Print the reasons valid in the class
*/
-fprintf (outfil, "\n Reasons:");
+fprintf (outfil, "%s", "\n Reasons:");
wmlResolvePrintClassReasons (outfil, clsobj);
/*
* Print the controls valid in the class
*/
-fprintf (outfil, "\n Controls:");
+fprintf (outfil, "%s", "\n Controls:");
for ( ndx=0 ; ndx<wml_obj_class_ptr->cnt ; ndx++ )
{
ctrlobj = (WmlClassDefPtr) wml_obj_class_ptr->hvec[ndx].objptr;
@@ -1507,10 +1507,10 @@ for ( ndx=0 ; ndx<wml_obj_arg_ptr->cnt ; ndx++ )
switch ( resref->exclude )
{
case WmlAttributeTrue:
- fprintf (outfil, "\n\tExclude = True;");
+ fprintf (outfil, "%s", "\n\tExclude = True;");
break;
case WmlAttributeFalse:
- fprintf (outfil, "\n\tExclude = False;");
+ fprintf (outfil, "%s", "\n\tExclude = False;");
break;
}
if ( resref->dflt != NULL )
@@ -1553,10 +1553,10 @@ if ( constr )
switch ( resref->exclude )
{
case WmlAttributeTrue:
- fprintf (outfil, "\n\tExclude = True;");
+ fprintf (outfil, "%s", "\n\tExclude = True;");
break;
case WmlAttributeFalse:
- fprintf (outfil, "\n\tExclude = False;");
+ fprintf (outfil, "%s", "\n\tExclude = False;");
break;
}
if ( resref->dflt != NULL )
--
2.30.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/motif.git
git@gitee.com:src-openeuler/motif.git
src-openeuler
motif
motif
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385