Merge branch 'master' into cde-next
authorJon Trulson <jon@radscan.com>
Fri, 6 Jul 2018 19:19:33 +0000 (13:19 -0600)
committerJon Trulson <jon@radscan.com>
Fri, 6 Jul 2018 19:19:33 +0000 (13:19 -0600)
Need to resync before folding current cde-next into master.

1700 files changed:
cde/config/cf/FreeBSD.cf
cde/config/cf/Imake.cf
cde/config/cf/Imakefile
cde/config/cf/OpenBSD.cf
cde/config/cf/apollo.cf [deleted file]
cde/config/cf/linux.cf
cde/config/cf/macII.cf [deleted file]
cde/config/imake/imake.c
cde/config/imake/imakemdep.h
cde/config/makedepend/cppsetup.c
cde/config/makedepend/def.h
cde/config/makedepend/include.c
cde/config/makedepend/main.c
cde/config/makedepend/parse.c
cde/config/makedepend/pr.c
cde/config/util/lndir.c
cde/config/util/makestrs.c
cde/config/util/mkshadow/Imakefile [deleted file]
cde/config/util/mkshadow/README [deleted file]
cde/config/util/mkshadow/mkshadow.c [deleted file]
cde/config/util/mkshadow/savedir.c [deleted file]
cde/config/util/mkshadow/wildmat.c [deleted file]
cde/doc/util/dbtoman/instant/browse.c
cde/doc/util/dbtoman/instant/info.c
cde/doc/util/dbtoman/instant/main.c
cde/doc/util/dbtoman/instant/tables.c
cde/doc/util/dbtoman/instant/translate.c
cde/doc/util/dbtoman/instant/tranvar.c
cde/examples/dtwsm/occupy.c
cde/examples/dtwsm/wsinfo.c
cde/lib/DtHelp/Access.c
cde/lib/DtHelp/AccessCCDF.c
cde/lib/DtHelp/AsciiSpc.c
cde/lib/DtHelp/Environ_c.c
cde/lib/DtHelp/FileListUtils.c
cde/lib/DtHelp/FileUtils.c
cde/lib/DtHelp/FormatMan.c
cde/lib/DtHelp/FormatSDL.c
cde/lib/DtHelp/FormatTerm.c
cde/lib/DtHelp/GifUtils.c
cde/lib/DtHelp/GlobSearch.c
cde/lib/DtHelp/Graphics.c
cde/lib/DtHelp/HelpDialog.c
cde/lib/DtHelp/HelpQuickD.c
cde/lib/DtHelp/Helpos.c
cde/lib/DtHelp/JpegUtils.c
cde/lib/DtHelp/Layout.c
cde/lib/DtHelp/Resize.c
cde/lib/DtHelp/StringFuncs.c
cde/lib/DtHelp/XInterface.c
cde/lib/DtHelp/XbmUtils.c
cde/lib/DtHelp/decompress.c
cde/lib/DtHelp/il/ilX.c
cde/lib/DtHelp/il/ilXycbcr.c
cde/lib/DtHelp/il/ilbigray.c
cde/lib/DtHelp/il/ilcodec.c
cde/lib/DtHelp/il/ilcompg3g4.c
cde/lib/DtHelp/il/ilcomplzw.c
cde/lib/DtHelp/il/ilcomppackbits.c
cde/lib/DtHelp/il/ilcompressjpeg.c
cde/lib/DtHelp/il/ilcontext.c
cde/lib/DtHelp/il/ilconvert.c
cde/lib/DtHelp/il/ilconvert.h
cde/lib/DtHelp/il/ilcrop.c
cde/lib/DtHelp/il/ildecompg3.c
cde/lib/DtHelp/il/ildecompg4.c
cde/lib/DtHelp/il/ildecompg4.h
cde/lib/DtHelp/il/ildecompjpeg.c
cde/lib/DtHelp/il/ildecomplzw.c
cde/lib/DtHelp/il/ildecomppackbits.c
cde/lib/DtHelp/il/ildither.c
cde/lib/DtHelp/il/ilefs.c
cde/lib/DtHelp/il/ilformat.c
cde/lib/DtHelp/il/ilgraybi.c
cde/lib/DtHelp/il/ilhplrotate.c
cde/lib/DtHelp/il/ilhplrotation.c
cde/lib/DtHelp/il/ilimage.c
cde/lib/DtHelp/il/ilimage.h
cde/lib/DtHelp/il/ilint.h
cde/lib/DtHelp/il/ilinvert.c
cde/lib/DtHelp/il/iljpgdecode.c
cde/lib/DtHelp/il/iljpgdecodejif.c
cde/lib/DtHelp/il/iljpgdedct.c
cde/lib/DtHelp/il/iljpgdehuff.c
cde/lib/DtHelp/il/iljpgencode.c
cde/lib/DtHelp/il/iljpgencodejif.c
cde/lib/DtHelp/il/iljpgendct.c
cde/lib/DtHelp/il/iljpgenhuff.c
cde/lib/DtHelp/il/iljpgint.h
cde/lib/DtHelp/il/iljpgutil.c
cde/lib/DtHelp/il/ilmap.c
cde/lib/DtHelp/il/ilmirror.c
cde/lib/DtHelp/il/ilobject.c
cde/lib/DtHelp/il/ilpalette.c
cde/lib/DtHelp/il/ilpipe.c
cde/lib/DtHelp/il/ilpipeint.h
cde/lib/DtHelp/il/ilpipelem.h
cde/lib/DtHelp/il/ilreadX.c
cde/lib/DtHelp/il/ilreadimage.c
cde/lib/DtHelp/il/ilrotate.c
cde/lib/DtHelp/il/ilrwimage.c
cde/lib/DtHelp/il/ilscale.c
cde/lib/DtHelp/il/ilscalesample.c
cde/lib/DtHelp/il/iltapfeed.c
cde/lib/DtHelp/il/iltiff.c
cde/lib/DtHelp/il/iltiffint.h
cde/lib/DtHelp/il/iltiffread.c
cde/lib/DtHelp/il/iltiffwrite.c
cde/lib/DtHelp/il/iltruegray.c
cde/lib/DtHelp/il/ilupsample.c
cde/lib/DtHelp/il/ilutiljpeg.c
cde/lib/DtHelp/il/ilwriteimage.c
cde/lib/DtHelp/il/ilxpmP.h
cde/lib/DtHelp/il/ilycbcr.c
cde/lib/DtHelp/jpeg/jdcolor.c
cde/lib/DtHelp/jpeg/jdhuff.c
cde/lib/DtHelp/jpeg/jdhuff.h
cde/lib/DtHelp/jpeg/jdmerge.c
cde/lib/DtHelp/jpeg/jdphuff.c
cde/lib/DtHelp/jpeg/jdsample.c
cde/lib/DtHelp/jpeg/jquant1.c
cde/lib/DtHelp/jpeg/jquant2.c
cde/lib/DtHelp/jpeg/jutils.c
cde/lib/DtMrm/DtMrm.c
cde/lib/DtPrint/PrintSetupB.c
cde/lib/DtSearch/Imakefile
cde/lib/DtSearch/bmstrstr.c
cde/lib/DtSearch/dtsrapi.c
cde/lib/DtSearch/dtsrve.c
cde/lib/DtSearch/hdecode.c
cde/lib/DtSearch/hencode.c
cde/lib/DtSearch/isduprec.c
cde/lib/DtSearch/lang.c
cde/lib/DtSearch/msgutil.c
cde/lib/DtSearch/ocf.c
cde/lib/DtSearch/raima/Imakefile
cde/lib/DtSearch/raima/alloc.c
cde/lib/DtSearch/raima/cmstat.c [deleted file]
cde/lib/DtSearch/raima/cmtype.c
cde/lib/DtSearch/raima/connect.c
cde/lib/DtSearch/raima/costat.c [deleted file]
cde/lib/DtSearch/raima/cotype.c
cde/lib/DtSearch/raima/crget.c
cde/lib/DtSearch/raima/crread.c
cde/lib/DtSearch/raima/crset.c
cde/lib/DtSearch/raima/crstat.c [deleted file]
cde/lib/DtSearch/raima/crtype.c
cde/lib/DtSearch/raima/crwrite.c
cde/lib/DtSearch/raima/csmget.c
cde/lib/DtSearch/raima/csmread.c
cde/lib/DtSearch/raima/csmset.c
cde/lib/DtSearch/raima/csmwrite.c
cde/lib/DtSearch/raima/csoget.c
cde/lib/DtSearch/raima/csoread.c
cde/lib/DtSearch/raima/csoset.c
cde/lib/DtSearch/raima/csowrite.c
cde/lib/DtSearch/raima/csstat.c [deleted file]
cde/lib/DtSearch/raima/ctscm.c [deleted file]
cde/lib/DtSearch/raima/ctsco.c [deleted file]
cde/lib/DtSearch/raima/ctscr.c [deleted file]
cde/lib/DtSearch/raima/dbacode.c
cde/lib/DtSearch/raima/dbdpath.c
cde/lib/DtSearch/raima/dbfpath.c
cde/lib/DtSearch/raima/dblfcns.c
cde/lib/DtSearch/raima/dblog.c
cde/lib/DtSearch/raima/dbtaf.c
cde/lib/DtSearch/raima/dbtype.h
cde/lib/DtSearch/raima/dbuserid.c
cde/lib/DtSearch/raima/dbxtrn.h
cde/lib/DtSearch/raima/delete.c
cde/lib/DtSearch/raima/destroy.c
cde/lib/DtSearch/raima/dio.c
cde/lib/DtSearch/raima/discon.c
cde/lib/DtSearch/raima/disdel.c
cde/lib/DtSearch/raima/dproto.h
cde/lib/DtSearch/raima/dtcover.h
cde/lib/DtSearch/raima/fillnew.c
cde/lib/DtSearch/raima/findco.c
cde/lib/DtSearch/raima/findfm.c
cde/lib/DtSearch/raima/findlm.c
cde/lib/DtSearch/raima/findnm.c
cde/lib/DtSearch/raima/findpm.c
cde/lib/DtSearch/raima/gtscm.c [deleted file]
cde/lib/DtSearch/raima/gtsco.c [deleted file]
cde/lib/DtSearch/raima/gtscr.c [deleted file]
cde/lib/DtSearch/raima/gtscs.c [deleted file]
cde/lib/DtSearch/raima/initial.c
cde/lib/DtSearch/raima/inittab.c
cde/lib/DtSearch/raima/inittab.h
cde/lib/DtSearch/raima/ismember.c
cde/lib/DtSearch/raima/isowner.c
cde/lib/DtSearch/raima/keydel.c
cde/lib/DtSearch/raima/keyexist.c
cde/lib/DtSearch/raima/keyfcns.c
cde/lib/DtSearch/raima/keyfind.c
cde/lib/DtSearch/raima/keyfrst.c
cde/lib/DtSearch/raima/keylast.c
cde/lib/DtSearch/raima/keynext.c
cde/lib/DtSearch/raima/keyprev.c
cde/lib/DtSearch/raima/keystore.c
cde/lib/DtSearch/raima/libfcns.c
cde/lib/DtSearch/raima/ll.h
cde/lib/DtSearch/raima/makenew.c
cde/lib/DtSearch/raima/mapchar.c
cde/lib/DtSearch/raima/members.c
cde/lib/DtSearch/raima/ncb.h
cde/lib/DtSearch/raima/netunix.c [deleted file]
cde/lib/DtSearch/raima/opens.c
cde/lib/DtSearch/raima/options.c
cde/lib/DtSearch/raima/pathfcns.c
cde/lib/DtSearch/raima/proto.h
cde/lib/DtSearch/raima/recfcns.c
cde/lib/DtSearch/raima/recfrst.c
cde/lib/DtSearch/raima/reclast.c
cde/lib/DtSearch/raima/recnext.c
cde/lib/DtSearch/raima/recprev.c
cde/lib/DtSearch/raima/recread.c
cde/lib/DtSearch/raima/recset.c
cde/lib/DtSearch/raima/recstat.c [deleted file]
cde/lib/DtSearch/raima/recwrite.c
cde/lib/DtSearch/raima/renfile.c
cde/lib/DtSearch/raima/rwcurr.c
cde/lib/DtSearch/raima/setdb.c
cde/lib/DtSearch/raima/setmm.c
cde/lib/DtSearch/raima/setmo.c
cde/lib/DtSearch/raima/setmr.c
cde/lib/DtSearch/raima/setom.c
cde/lib/DtSearch/raima/setoo.c
cde/lib/DtSearch/raima/setor.c
cde/lib/DtSearch/raima/setrm.c
cde/lib/DtSearch/raima/setro.c
cde/lib/DtSearch/raima/startup.c
cde/lib/DtSearch/raima/stscm.c [deleted file]
cde/lib/DtSearch/raima/stsco.c [deleted file]
cde/lib/DtSearch/raima/stscr.c [deleted file]
cde/lib/DtSearch/raima/stscs.c [deleted file]
cde/lib/DtSearch/raima/task.h
cde/lib/DtSearch/raima/trxlog.h
cde/lib/DtSearch/raima/utscm.c [deleted file]
cde/lib/DtSearch/raima/utsco.c [deleted file]
cde/lib/DtSearch/raima/utscr.c [deleted file]
cde/lib/DtSearch/raima/utscs.c [deleted file]
cde/lib/DtSearch/raima/vista.h
cde/lib/DtSvc/DtCodelibs/filegen.C
cde/lib/DtSvc/DtCodelibs/mbschr.C
cde/lib/DtSvc/DtCodelibs/pathcollapse.C
cde/lib/DtSvc/DtCodelibs/shellscan.C
cde/lib/DtSvc/DtCodelibs/strcase.C
cde/lib/DtSvc/DtCodelibs/strend.C
cde/lib/DtSvc/DtCodelibs/strhash.C
cde/lib/DtSvc/DtCodelibs/stringio.C
cde/lib/DtSvc/DtCodelibs/strtokx.C
cde/lib/DtSvc/DtCodelibs/strwcmp.C
cde/lib/DtSvc/DtEncap/MemoryMgr.c
cde/lib/DtSvc/DtEncap/pty.c
cde/lib/DtSvc/DtEncap/scoop.c
cde/lib/DtSvc/DtEncap/usersig.c
cde/lib/DtSvc/DtUtil1/Action.c
cde/lib/DtSvc/DtUtil1/ActionDb.c
cde/lib/DtSvc/DtUtil1/ActionFind.c
cde/lib/DtSvc/DtUtil1/ActionTt.c
cde/lib/DtSvc/DtUtil1/ActionUtil.c
cde/lib/DtSvc/DtUtil1/CmdMain.c
cde/lib/DtSvc/DtUtil1/CmdUtilityP.c
cde/lib/DtSvc/DtUtil1/DbUtil.c
cde/lib/DtSvc/DtUtil1/Dnd.c
cde/lib/DtSvc/DtUtil1/DtHash.c
cde/lib/DtSvc/DtUtil1/Dts.c
cde/lib/DtSvc/DtUtil1/DtsDb.c
cde/lib/DtSvc/DtUtil1/DtsInit.c
cde/lib/DtSvc/DtUtil1/DtsMM.c
cde/lib/DtSvc/DtUtil1/inttab.c
cde/lib/DtSvc/DtUtil1/strtab.c
cde/lib/DtSvc/DtUtil2/ChkpntClient.c
cde/lib/DtSvc/DtUtil2/CmdUtility.c
cde/lib/DtSvc/DtUtil2/DtEnvMap.c
cde/lib/DtSvc/DtUtil2/DtosP.h
cde/lib/DtSvc/DtUtil2/EnvControl.c
cde/lib/DtSvc/DtUtil2/Hash.c
cde/lib/DtSvc/DtUtil2/HashP.h
cde/lib/DtSvc/DtUtil2/Info.c
cde/lib/DtSvc/DtUtil2/PrintXErr.c
cde/lib/DtSvc/DtUtil2/addToRes.c
cde/lib/DtSvc/include/bms/sbport.h
cde/lib/DtSvc/include/bms/sbstdinc.h
cde/lib/DtSvc/include/codelibs/mbstring.h
cde/lib/DtSvc/include/codelibs/privbuf.h
cde/lib/DtSvc/include/codelibs/stringx.h
cde/lib/DtTerm/TermPrim/TermPrim.c
cde/lib/DtTerm/TermPrim/TermPrimGetPty-svr4.c
cde/lib/DtTerm/TermPrim/TermPrimParser.c
cde/lib/DtTerm/TermPrim/TermPrimSetPty.c
cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c
cde/lib/DtTerm/TermPrim/TermPrimUtil.c
cde/lib/DtTerm/TermView/TermViewGlobalDialog.c
cde/lib/DtTerm/util/lineToData.c
cde/lib/DtWidget/Control.c
cde/lib/DtWidget/DialogBox.c
cde/lib/DtWidget/EditAreaData.c
cde/lib/DtWidget/EditCalls.c
cde/lib/DtWidget/Editor.c
cde/lib/DtWidget/Icon.c
cde/lib/DtWidget/SearchDlg.c
cde/lib/DtWidget/TitleBox.c
cde/lib/csa/agent.c
cde/lib/csa/ansi_c.c
cde/lib/csa/appt4.c
cde/lib/csa/cmcbxdr.c
cde/lib/csa/cmsdata.c
cde/lib/csa/cmxdr.c
cde/lib/csa/hash.c
cde/lib/csa/lutil.c
cde/lib/csa/rescan.c
cde/lib/pam/examples/login/login.c
cde/lib/pam/libpam/pam_framework.c
cde/lib/pam/pam_modules/unix/unix_get_authtokattr.c
cde/lib/pam/pam_modules/unix/unix_headers.h
cde/lib/pam/pam_modules/unix/unix_set_authtokattr.c
cde/lib/pam/pam_modules/unix/unix_update_authtok.c
cde/lib/pam/pam_modules/unix/unix_update_authtok_file.c
cde/lib/pam/pam_modules/unix/unix_utils.c
cde/lib/tt/bin/ttauth/process.c
cde/lib/tt/bin/ttdbserverd/dm_server.C
cde/lib/tt/lib/api/dnd/ttdnd.c
cde/lib/tt/lib/mp/mp_auth_functions.C
cde/lib/tt/lib/util/frozen.tt_trace_gram.c
cde/lib/tt/lib/util/frozen.tt_trace_parse.c
cde/lib/tt/lib/util/tt_object_list.C
cde/lib/tt/lib/util/tt_string.C
cde/lib/tt/mini_isam/isadd1key.c
cde/lib/tt/mini_isam/isaddindex.c
cde/lib/tt/mini_isam/isaddprimary.c
cde/lib/tt/mini_isam/isalloc.c
cde/lib/tt/mini_isam/isam.h
cde/lib/tt/mini_isam/isam_impl.h
cde/lib/tt/mini_isam/isam_prototypes.h [new file with mode: 0644]
cde/lib/tt/mini_isam/isamaddindex.c
cde/lib/tt/mini_isam/isamdelrec.c
cde/lib/tt/mini_isam/isamerror.c
cde/lib/tt/mini_isam/isamhooks.c
cde/lib/tt/mini_isam/isamopen.c
cde/lib/tt/mini_isam/isamwrite.c
cde/lib/tt/mini_isam/isapplmr.c
cde/lib/tt/mini_isam/isapplmw.c
cde/lib/tt/mini_isam/isbsearch.c
cde/lib/tt/mini_isam/isbtree.c
cde/lib/tt/mini_isam/isbtree2.c
cde/lib/tt/mini_isam/isbtree3.c
cde/lib/tt/mini_isam/isbuild.c
cde/lib/tt/mini_isam/isbytearray.c
cde/lib/tt/mini_isam/ischange1key.c
cde/lib/tt/mini_isam/isclose.c
cde/lib/tt/mini_isam/iscntl.c
cde/lib/tt/mini_isam/iscurpos.c
cde/lib/tt/mini_isam/isdatconv.c
cde/lib/tt/mini_isam/isdel1key.c
cde/lib/tt/mini_isam/isdelcurr.c
cde/lib/tt/mini_isam/isdelrec.c
cde/lib/tt/mini_isam/isdiskbufs2.c
cde/lib/tt/mini_isam/isdlink.c
cde/lib/tt/mini_isam/iserase.c
cde/lib/tt/mini_isam/iserror.c
cde/lib/tt/mini_isam/isfab.c
cde/lib/tt/mini_isam/isfcb.c
cde/lib/tt/mini_isam/isfcbindex.c
cde/lib/tt/mini_isam/isfcbwatchfd.c
cde/lib/tt/mini_isam/isfd.c
cde/lib/tt/mini_isam/isfileio.c
cde/lib/tt/mini_isam/isfixrec.c
cde/lib/tt/mini_isam/isfname.c
cde/lib/tt/mini_isam/isindexconv.c
cde/lib/tt/mini_isam/isindexinfo.c
cde/lib/tt/mini_isam/isindfreel.c
cde/lib/tt/mini_isam/iskeyaux.c
cde/lib/tt/mini_isam/iskeycalc.c
cde/lib/tt/mini_isam/iskeycmp.c
cde/lib/tt/mini_isam/iskeyconv.c
cde/lib/tt/mini_isam/iskeyvalid.c
cde/lib/tt/mini_isam/isminmax.c
cde/lib/tt/mini_isam/ismngfcb.c
cde/lib/tt/mini_isam/isopen.c
cde/lib/tt/mini_isam/ispageio.c
cde/lib/tt/mini_isam/isperm.c
cde/lib/tt/mini_isam/isread.c
cde/lib/tt/mini_isam/isrename.c
cde/lib/tt/mini_isam/isrepair.c
cde/lib/tt/mini_isam/isrewcurr.c
cde/lib/tt/mini_isam/isrewrec.c
cde/lib/tt/mini_isam/issignals.c
cde/lib/tt/mini_isam/issort.c
cde/lib/tt/mini_isam/isstart.c
cde/lib/tt/mini_isam/issync.c
cde/lib/tt/mini_isam/isvarrec.c
cde/lib/tt/mini_isam/isvars.c
cde/lib/tt/mini_isam/isversion.c
cde/lib/tt/mini_isam/iswrite.c
cde/lib/tt/mini_isam/iswrrec.c
cde/lib/tt/mini_isam/strdup.ultrix.c [deleted file]
cde/programs/dsdm/dsdm.c
cde/programs/dtaction/Main.c
cde/programs/dtappbuilder/src/ab/ab_utils.c
cde/programs/dtappbuilder/src/ab/abobj_edit.c
cde/programs/dtappbuilder/src/ab/abobj_menu.c
cde/programs/dtappbuilder/src/ab/abobj_select.c
cde/programs/dtappbuilder/src/ab/abobj_set.c
cde/programs/dtappbuilder/src/ab/appfw_stubs.c
cde/programs/dtappbuilder/src/ab/attch_ed_stubs.c
cde/programs/dtappbuilder/src/ab/brws.c
cde/programs/dtappbuilder/src/ab/cgen_utils.c
cde/programs/dtappbuilder/src/ab/color_chooser_stubs.c
cde/programs/dtappbuilder/src/ab/conn_obj.c
cde/programs/dtappbuilder/src/ab/conn_stubs.c
cde/programs/dtappbuilder/src/ab/dnd_ed_stubs.c
cde/programs/dtappbuilder/src/ab/help_ed_stubs.c
cde/programs/dtappbuilder/src/ab/message_ed_stubs.c
cde/programs/dtappbuilder/src/ab/pal.c
cde/programs/dtappbuilder/src/ab/pal_choice.c
cde/programs/dtappbuilder/src/ab/pal_combobox.c
cde/programs/dtappbuilder/src/ab/pal_create.c
cde/programs/dtappbuilder/src/ab/pal_group.c
cde/programs/dtappbuilder/src/ab/pal_list.c
cde/programs/dtappbuilder/src/ab/pal_menu.c
cde/programs/dtappbuilder/src/ab/pal_menubar.c
cde/programs/dtappbuilder/src/ab/pal_panedwin.c
cde/programs/dtappbuilder/src/ab/pal_spinbox.c
cde/programs/dtappbuilder/src/ab/proj.c
cde/programs/dtappbuilder/src/ab/proj_utils.c
cde/programs/dtappbuilder/src/ab/prop.c
cde/programs/dtappbuilder/src/ab/ui_util.c
cde/programs/dtappbuilder/src/ab/vwr.c
cde/programs/dtappbuilder/src/abmf/lib_func_strings.c
cde/programs/dtappbuilder/src/abmf/msg_file.c
cde/programs/dtappbuilder/src/abmf/parse_c.c
cde/programs/dtappbuilder/src/abmf/ui_header_file.c
cde/programs/dtappbuilder/src/libABil/abuil_resource_attr_map.c
cde/programs/dtappbuilder/src/libABil/abuil_widget_obj_map.c
cde/programs/dtappbuilder/src/libABil/bil.c
cde/programs/dtappbuilder/src/libABil/bil_lexer.c
cde/programs/dtappbuilder/src/libABil/bil_loadatt.c
cde/programs/dtappbuilder/src/libABil/bil_loadfile.c
cde/programs/dtappbuilder/src/libABil/gil.c
cde/programs/dtappbuilder/src/libABil/load.c
cde/programs/dtappbuilder/src/libABobj/obj_args.c
cde/programs/dtappbuilder/src/libABobj/obj_notify.c
cde/programs/dtappbuilder/src/libABobj/obj_utils.c
cde/programs/dtappbuilder/src/libABobj/trav.c
cde/programs/dtappbuilder/src/libABobjXm/objxm_args.c
cde/programs/dtappbuilder/src/libABobjXm/objxm_inst.c
cde/programs/dtappbuilder/src/libABobjXm/objxm_strs.c
cde/programs/dtappbuilder/src/libAButil/abio.c
cde/programs/dtappbuilder/src/libAButil/abio_path.c
cde/programs/dtappbuilder/src/libAButil/istr.c
cde/programs/dtappbuilder/src/libAButil/util.c
cde/programs/dtappbuilder/src/libAButil/util_convert.c
cde/programs/dtcalc/motif.c
cde/programs/dtcalc/mp.c
cde/programs/dtcalc/text.c
cde/programs/dtcm/dtcm/RFCMIME.c
cde/programs/dtcm/dtcm/blist.c
cde/programs/dtcm/dtcm/browser.c
cde/programs/dtcm/dtcm/calendarA.c
cde/programs/dtcm/dtcm/cm_insert.c
cde/programs/dtcm/dtcm/dayglance.c
cde/programs/dtcm/dtcm/deskset.c
cde/programs/dtcm/dtcm/dnd.c
cde/programs/dtcm/dtcm/dssw.c
cde/programs/dtcm/dtcm/dtcm_editor.c
cde/programs/dtcm/dtcm/find.c
cde/programs/dtcm/dtcm/format.c
cde/programs/dtcm/dtcm/md5.c
cde/programs/dtcm/dtcm/misc.c
cde/programs/dtcm/dtcm/monthglance.c
cde/programs/dtcm/dtcm/props_pu.c
cde/programs/dtcm/dtcm/reminders.c
cde/programs/dtcm/dtcm/submit.c
cde/programs/dtcm/dtcm/timezone.c
cde/programs/dtcm/dtcm/todo.c
cde/programs/dtcm/dtcm/weekglance.c
cde/programs/dtcm/dtcm/x_graphics.c
cde/programs/dtcm/libDtCmP/cm_tty.c
cde/programs/dtcm/libDtCmP/getdate.y
cde/programs/dtcm/libDtCmP/props.c
cde/programs/dtcm/libDtCmP/timeops.c
cde/programs/dtcm/libDtCmP/util.c
cde/programs/dtcm/server/cmscalendar.c
cde/programs/dtcm/server/cmsconvert.c
cde/programs/dtcm/server/cmsfunc.c
cde/programs/dtcm/server/delete.c
cde/programs/dtcm/server/insert.c
cde/programs/dtcm/server/lexit.c
cde/programs/dtcm/server/list.c
cde/programs/dtcm/server/log.c
cde/programs/dtcm/server/lookup.c
cde/programs/dtcm/server/parser.y
cde/programs/dtcm/server/programtable.c
cde/programs/dtcm/server/reminder.c
cde/programs/dtcm/server/repeat.c
cde/programs/dtcm/server/reutil.c
cde/programs/dtcm/server/rtable2.c
cde/programs/dtcm/server/rtable3.c
cde/programs/dtcm/server/rtable4.c
cde/programs/dtcm/server/svcmain.c
cde/programs/dtcreate/cmnrtns.c
cde/programs/dtdocbook/instant/browse.c
cde/programs/dtdocbook/instant/info.c
cde/programs/dtdocbook/instant/main.c
cde/programs/dtdocbook/instant/tranvar.c
cde/programs/dtdocbook/instant/util.c
cde/programs/dtdocbook/lib/tptregexp/regerror.c
cde/programs/dtdocbook/lib/tptregexp/regexp.c
cde/programs/dtdocbook/lib/tptregexp/regsub.c
cde/programs/dtdocbook/lib/tptregexp/timer.c
cde/programs/dtdocbook/sgmls/getopt.c
cde/programs/dtdocbook/sgmls/pars1.c
cde/programs/dtdocbook/tcl/panic.c
cde/programs/dtdocbook/tcl/regexp.c
cde/programs/dtdocbook/tcl/tclAsync.c
cde/programs/dtdocbook/tcl/tclBasic.c
cde/programs/dtdocbook/tcl/tclCkalloc.c
cde/programs/dtdocbook/tcl/tclClock.c
cde/programs/dtdocbook/tcl/tclCmdAH.c
cde/programs/dtdocbook/tcl/tclCmdIL.c
cde/programs/dtdocbook/tcl/tclCmdMZ.c
cde/programs/dtdocbook/tcl/tclDate.c
cde/programs/dtdocbook/tcl/tclEnv.c
cde/programs/dtdocbook/tcl/tclEvent.c
cde/programs/dtdocbook/tcl/tclExpr.c
cde/programs/dtdocbook/tcl/tclFHandle.c
cde/programs/dtdocbook/tcl/tclFileName.c
cde/programs/dtdocbook/tcl/tclGet.c
cde/programs/dtdocbook/tcl/tclHash.c
cde/programs/dtdocbook/tcl/tclHistory.c
cde/programs/dtdocbook/tcl/tclIO.c
cde/programs/dtdocbook/tcl/tclIOCmd.c
cde/programs/dtdocbook/tcl/tclIOSock.c
cde/programs/dtdocbook/tcl/tclIOUtil.c
cde/programs/dtdocbook/tcl/tclInterp.c
cde/programs/dtdocbook/tcl/tclLink.c
cde/programs/dtdocbook/tcl/tclLoad.c
cde/programs/dtdocbook/tcl/tclLoadNone.c
cde/programs/dtdocbook/tcl/tclMain.c
cde/programs/dtdocbook/tcl/tclNotify.c
cde/programs/dtdocbook/tcl/tclParse.c
cde/programs/dtdocbook/tcl/tclPkg.c
cde/programs/dtdocbook/tcl/tclPosixStr.c
cde/programs/dtdocbook/tcl/tclPreserve.c
cde/programs/dtdocbook/tcl/tclProc.c
cde/programs/dtdocbook/tcl/tclUnixChan.c
cde/programs/dtdocbook/tcl/tclUnixFile.c
cde/programs/dtdocbook/tcl/tclUnixInit.c
cde/programs/dtdocbook/tcl/tclUnixNotfy.c
cde/programs/dtdocbook/tcl/tclUnixPipe.c
cde/programs/dtdocbook/tcl/tclUnixSock.c
cde/programs/dtdocbook/tcl/tclUnixTime.c
cde/programs/dtdocbook/tcl/tclUtil.c
cde/programs/dtdocbook/tcl/tclVar.c
cde/programs/dtdocbook/xlate_locale/xlate_locale.c
cde/programs/dtfile/ChangeDir.c
cde/programs/dtfile/Command.c
cde/programs/dtfile/Desktop.c
cde/programs/dtfile/Directory.c
cde/programs/dtfile/Encaps.c
cde/programs/dtfile/File.c
cde/programs/dtfile/FileManip.c
cde/programs/dtfile/FileMgr.c
cde/programs/dtfile/Find.c
cde/programs/dtfile/IconWindow.c
cde/programs/dtfile/Imakefile
cde/programs/dtfile/Main.c
cde/programs/dtfile/Main.h
cde/programs/dtfile/Menu.c
cde/programs/dtfile/MkDir.c
cde/programs/dtfile/SharedProcs.c
cde/programs/dtfile/SharedProcs.h
cde/programs/dtfile/ToolTalk.c
cde/programs/dtfile/Trash.c
cde/programs/dtfile/dtcopy/copydialog.c
cde/programs/dtfile/dtcopy/utils.c
cde/programs/dthello/Dthello.src
cde/programs/dthello/dthello.c
cde/programs/dthelp/dthelpview/Main.c
cde/programs/dthelp/parser.ccdf/htag/build/build.c
cde/programs/dthelp/parser.ccdf/htag/build/build.h
cde/programs/dthelp/parser.ccdf/htag/build/buildutl.c
cde/programs/dthelp/parser.ccdf/htag/build/except.c
cde/programs/dthelp/parser.ccdf/htag/build/fsa.c
cde/programs/dthelp/parser.ccdf/htag/build/out.c
cde/programs/dthelp/parser.ccdf/htag/build/param.c
cde/programs/dthelp/parser.ccdf/htag/build/proto.h
cde/programs/dthelp/parser.ccdf/htag/build/scan.c
cde/programs/dthelp/parser.ccdf/htag/build/sref.c
cde/programs/dthelp/parser.ccdf/htag/build/tree.c
cde/programs/dthelp/parser.ccdf/htag/eltdef/context.dat
cde/programs/dthelp/parser.ccdf/htag/eltdef/eltdef.c
cde/programs/dthelp/parser.ccdf/htag/eltdef/eltdef.h
cde/programs/dthelp/parser.ccdf/htag/eltdef/eltutil.c
cde/programs/dthelp/parser.ccdf/htag/eltdef/entity.c
cde/programs/dthelp/parser.ccdf/htag/eltdef/proto.h
cde/programs/dthelp/parser.ccdf/htag/eltdef/scan.c
cde/programs/dthelp/parser.ccdf/htag/helptag/custom.c
cde/programs/dthelp/parser.ccdf/htag/helptag/default.c
cde/programs/dthelp/parser.ccdf/htag/helptag/fproto.h
cde/programs/dthelp/parser.ccdf/htag/helptag/global.h
cde/programs/dthelp/parser.ccdf/htag/helptag/help.c
cde/programs/dthelp/parser.ccdf/htag/helptag/help.if
cde/programs/dthelp/parser.ccdf/htag/helptag/make.c
cde/programs/dthelp/parser.ccdf/htag/helptag/option.c
cde/programs/dthelp/parser.ccdf/htag/helptag/out.c
cde/programs/dthelp/parser.ccdf/htag/helptag/xref.c
cde/programs/dthelp/parser.ccdf/htag/parser/actutil.c
cde/programs/dthelp/parser.ccdf/htag/parser/cyclent.c
cde/programs/dthelp/parser.ccdf/htag/parser/entity.c
cde/programs/dthelp/parser.ccdf/htag/parser/eprefix.c
cde/programs/dthelp/parser.ccdf/htag/parser/error.c
cde/programs/dthelp/parser.ccdf/htag/parser/esuffix.c
cde/programs/dthelp/parser.ccdf/htag/parser/exit.c
cde/programs/dthelp/parser.ccdf/htag/parser/findpar.c
cde/programs/dthelp/parser.ccdf/htag/parser/getsign.c
cde/programs/dthelp/parser.ccdf/htag/parser/input.c
cde/programs/dthelp/parser.ccdf/htag/parser/minim.c
cde/programs/dthelp/parser.ccdf/htag/parser/openfrst.c
cde/programs/dthelp/parser.ccdf/htag/parser/param.c
cde/programs/dthelp/parser.ccdf/htag/parser/parser.h
cde/programs/dthelp/parser.ccdf/htag/parser/parutil.c
cde/programs/dthelp/parser.ccdf/htag/parser/parvalok.c
cde/programs/dthelp/parser.ccdf/htag/parser/proto.h
cde/programs/dthelp/parser.ccdf/htag/parser/scan.c
cde/programs/dthelp/parser.ccdf/htag/parser/setopt.c
cde/programs/dthelp/parser.ccdf/htag/parser/startdoc.c
cde/programs/dthelp/parser.ccdf/htag/parser/string.c
cde/programs/dthelp/parser.ccdf/htag/parser/struct.c
cde/programs/dthelp/parser.ccdf/htag/parser/text.c
cde/programs/dthelp/parser.ccdf/htag/util/allwhite.c
cde/programs/dthelp/parser.ccdf/htag/util/basic.h
cde/programs/dthelp/parser.ccdf/htag/util/cont.h
cde/programs/dthelp/parser.ccdf/htag/util/context.c
cde/programs/dthelp/parser.ccdf/htag/util/conutil.c
cde/programs/dthelp/parser.ccdf/htag/util/emptyfil.c
cde/programs/dthelp/parser.ccdf/htag/util/entout.c
cde/programs/dthelp/parser.ccdf/htag/util/error.c
cde/programs/dthelp/parser.ccdf/htag/util/exit.c
cde/programs/dthelp/parser.ccdf/htag/util/fclndir.c
cde/programs/dthelp/parser.ccdf/htag/util/inctest.c
cde/programs/dthelp/parser.ccdf/htag/util/initct.c
cde/programs/dthelp/parser.ccdf/htag/util/itoa.c
cde/programs/dthelp/parser.ccdf/htag/util/letter.c
cde/programs/dthelp/parser.ccdf/htag/util/lower.c
cde/programs/dthelp/parser.ccdf/htag/util/malloc.c
cde/programs/dthelp/parser.ccdf/htag/util/openchk.c
cde/programs/dthelp/parser.ccdf/htag/util/paramu.c
cde/programs/dthelp/parser.ccdf/htag/util/scanutil.c
cde/programs/dthelp/parser.ccdf/htag/util/sparse.h
cde/programs/dthelp/parser.ccdf/htag/util/trie.c
cde/programs/dthelp/parser.ccdf/htag/util/trie.h
cde/programs/dthelp/parser.ccdf/htag/util/triecnt.c
cde/programs/dthelp/parser.ccdf/htag/util/triedump.c
cde/programs/dthelp/parser.ccdf/htag/util/triepdmp.c
cde/programs/dthelp/parser.ccdf/htag/util/trieplk.c
cde/programs/dthelp/parser.ccdf/htag/util/upcmp8.c
cde/programs/dthelp/parser.ccdf/htag/util/upper.c
cde/programs/dthelp/parser.ccdf/htag/util/upstrcmp.c
cde/programs/dthelp/parser.ccdf/htag/util/wchar.c
cde/programs/dthelp/parser.ccdf/htag/util/whitesp.c
cde/programs/dthelp/parser.ccdf/volumegen/Imakefile
cde/programs/dthelp/parser/canon1/build/build.c
cde/programs/dthelp/parser/canon1/build/build.h
cde/programs/dthelp/parser/canon1/build/buildutl.c
cde/programs/dthelp/parser/canon1/build/eltree.c
cde/programs/dthelp/parser/canon1/build/except.c
cde/programs/dthelp/parser/canon1/build/fsa.c
cde/programs/dthelp/parser/canon1/build/out.c
cde/programs/dthelp/parser/canon1/build/param.c
cde/programs/dthelp/parser/canon1/build/proto.h
cde/programs/dthelp/parser/canon1/build/scan.c
cde/programs/dthelp/parser/canon1/build/sref.c
cde/programs/dthelp/parser/canon1/build/tree.c
cde/programs/dthelp/parser/canon1/eltdef/context.dat
cde/programs/dthelp/parser/canon1/eltdef/eltdef.c
cde/programs/dthelp/parser/canon1/eltdef/eltdef.h
cde/programs/dthelp/parser/canon1/eltdef/eltutil.c
cde/programs/dthelp/parser/canon1/eltdef/entity.c
cde/programs/dthelp/parser/canon1/eltdef/proto.h
cde/programs/dthelp/parser/canon1/eltdef/scan.c
cde/programs/dthelp/parser/canon1/helptag/custom.c
cde/programs/dthelp/parser/canon1/helptag/default.c
cde/programs/dthelp/parser/canon1/helptag/fproto.h
cde/programs/dthelp/parser/canon1/helptag/global.h
cde/programs/dthelp/parser/canon1/helptag/help.c
cde/programs/dthelp/parser/canon1/helptag/help.if
cde/programs/dthelp/parser/canon1/helptag/make.c
cde/programs/dthelp/parser/canon1/helptag/option.c
cde/programs/dthelp/parser/canon1/helptag/out.c
cde/programs/dthelp/parser/canon1/helptag/special.c
cde/programs/dthelp/parser/canon1/helptag/xref.c
cde/programs/dthelp/parser/canon1/parser/actutil.c
cde/programs/dthelp/parser/canon1/parser/closent.c
cde/programs/dthelp/parser/canon1/parser/code.c
cde/programs/dthelp/parser/canon1/parser/cyclent.c
cde/programs/dthelp/parser/canon1/parser/dcurelt.c
cde/programs/dthelp/parser/canon1/parser/end.c
cde/programs/dthelp/parser/canon1/parser/entity.c
cde/programs/dthelp/parser/canon1/parser/eprefix.c
cde/programs/dthelp/parser/canon1/parser/error.c
cde/programs/dthelp/parser/canon1/parser/esuffix.c
cde/programs/dthelp/parser/canon1/parser/exit.c
cde/programs/dthelp/parser/canon1/parser/findpar.c
cde/programs/dthelp/parser/canon1/parser/getsign.c
cde/programs/dthelp/parser/canon1/parser/input.c
cde/programs/dthelp/parser/canon1/parser/level.c
cde/programs/dthelp/parser/canon1/parser/lookent.c
cde/programs/dthelp/parser/canon1/parser/minim.c
cde/programs/dthelp/parser/canon1/parser/openfrst.c
cde/programs/dthelp/parser/canon1/parser/optstrg.c
cde/programs/dthelp/parser/canon1/parser/param.c
cde/programs/dthelp/parser/canon1/parser/parent.c
cde/programs/dthelp/parser/canon1/parser/parser.c
cde/programs/dthelp/parser/canon1/parser/parser.h
cde/programs/dthelp/parser/canon1/parser/parutil.c
cde/programs/dthelp/parser/canon1/parser/parvalok.c
cde/programs/dthelp/parser/canon1/parser/pi.c
cde/programs/dthelp/parser/canon1/parser/proto.h
cde/programs/dthelp/parser/canon1/parser/scan.c
cde/programs/dthelp/parser/canon1/parser/setopt.c
cde/programs/dthelp/parser/canon1/parser/setpar.c
cde/programs/dthelp/parser/canon1/parser/start.c
cde/programs/dthelp/parser/canon1/parser/startdoc.c
cde/programs/dthelp/parser/canon1/parser/string.c
cde/programs/dthelp/parser/canon1/parser/struct.c
cde/programs/dthelp/parser/canon1/parser/text.c
cde/programs/dthelp/parser/canon1/util/allwhite.c
cde/programs/dthelp/parser/canon1/util/basic.h
cde/programs/dthelp/parser/canon1/util/cont.h
cde/programs/dthelp/parser/canon1/util/context.c
cde/programs/dthelp/parser/canon1/util/conutil.c
cde/programs/dthelp/parser/canon1/util/emptyfil.c
cde/programs/dthelp/parser/canon1/util/entout.c
cde/programs/dthelp/parser/canon1/util/error.c
cde/programs/dthelp/parser/canon1/util/exit.c
cde/programs/dthelp/parser/canon1/util/fclndir.c
cde/programs/dthelp/parser/canon1/util/inctest.c
cde/programs/dthelp/parser/canon1/util/initct.c
cde/programs/dthelp/parser/canon1/util/itoa.c
cde/programs/dthelp/parser/canon1/util/letter.c
cde/programs/dthelp/parser/canon1/util/lower.c
cde/programs/dthelp/parser/canon1/util/malloc.c
cde/programs/dthelp/parser/canon1/util/openchk.c
cde/programs/dthelp/parser/canon1/util/paramu.c
cde/programs/dthelp/parser/canon1/util/scanutil.c
cde/programs/dthelp/parser/canon1/util/sparse.c
cde/programs/dthelp/parser/canon1/util/sparse.h
cde/programs/dthelp/parser/canon1/util/strstr.c
cde/programs/dthelp/parser/canon1/util/trie.c
cde/programs/dthelp/parser/canon1/util/trie.h
cde/programs/dthelp/parser/canon1/util/triecnt.c
cde/programs/dthelp/parser/canon1/util/triedump.c
cde/programs/dthelp/parser/canon1/util/triepdmp.c
cde/programs/dthelp/parser/canon1/util/trieplk.c
cde/programs/dthelp/parser/canon1/util/trierset.c
cde/programs/dthelp/parser/canon1/util/upcmp8.c
cde/programs/dthelp/parser/canon1/util/upper.c
cde/programs/dthelp/parser/canon1/util/upstrcmp.c
cde/programs/dthelp/parser/canon1/util/wchar.c
cde/programs/dthelp/parser/canon1/util/whitesp.c
cde/programs/dthelp/parser/pass1/build/build.c
cde/programs/dthelp/parser/pass1/build/build.h
cde/programs/dthelp/parser/pass1/build/buildutl.c
cde/programs/dthelp/parser/pass1/build/eltree.c
cde/programs/dthelp/parser/pass1/build/except.c
cde/programs/dthelp/parser/pass1/build/fsa.c
cde/programs/dthelp/parser/pass1/build/out.c
cde/programs/dthelp/parser/pass1/build/param.c
cde/programs/dthelp/parser/pass1/build/proto.h
cde/programs/dthelp/parser/pass1/build/scan.c
cde/programs/dthelp/parser/pass1/build/sref.c
cde/programs/dthelp/parser/pass1/build/tree.c
cde/programs/dthelp/parser/pass1/eltdef/context.dat
cde/programs/dthelp/parser/pass1/eltdef/eltdef.c
cde/programs/dthelp/parser/pass1/eltdef/eltdef.h
cde/programs/dthelp/parser/pass1/eltdef/eltutil.c
cde/programs/dthelp/parser/pass1/eltdef/entity.c
cde/programs/dthelp/parser/pass1/eltdef/proto.h
cde/programs/dthelp/parser/pass1/eltdef/scan.c
cde/programs/dthelp/parser/pass1/helptag/custom.c
cde/programs/dthelp/parser/pass1/helptag/default.c
cde/programs/dthelp/parser/pass1/helptag/fproto.h
cde/programs/dthelp/parser/pass1/helptag/global.h
cde/programs/dthelp/parser/pass1/helptag/help.c
cde/programs/dthelp/parser/pass1/helptag/help.if
cde/programs/dthelp/parser/pass1/helptag/make.c
cde/programs/dthelp/parser/pass1/helptag/option.c
cde/programs/dthelp/parser/pass1/helptag/out.c
cde/programs/dthelp/parser/pass1/helptag/special.c
cde/programs/dthelp/parser/pass1/helptag/xref.c
cde/programs/dthelp/parser/pass1/parser/actutil.c
cde/programs/dthelp/parser/pass1/parser/closent.c
cde/programs/dthelp/parser/pass1/parser/code.c
cde/programs/dthelp/parser/pass1/parser/cyclent.c
cde/programs/dthelp/parser/pass1/parser/dcurelt.c
cde/programs/dthelp/parser/pass1/parser/end.c
cde/programs/dthelp/parser/pass1/parser/entity.c
cde/programs/dthelp/parser/pass1/parser/eprefix.c
cde/programs/dthelp/parser/pass1/parser/error.c
cde/programs/dthelp/parser/pass1/parser/esuffix.c
cde/programs/dthelp/parser/pass1/parser/exit.c
cde/programs/dthelp/parser/pass1/parser/findpar.c
cde/programs/dthelp/parser/pass1/parser/getsign.c
cde/programs/dthelp/parser/pass1/parser/input.c
cde/programs/dthelp/parser/pass1/parser/level.c
cde/programs/dthelp/parser/pass1/parser/lookent.c
cde/programs/dthelp/parser/pass1/parser/minim.c
cde/programs/dthelp/parser/pass1/parser/openfrst.c
cde/programs/dthelp/parser/pass1/parser/optstrg.c
cde/programs/dthelp/parser/pass1/parser/param.c
cde/programs/dthelp/parser/pass1/parser/parent.c
cde/programs/dthelp/parser/pass1/parser/parser.c
cde/programs/dthelp/parser/pass1/parser/parser.h
cde/programs/dthelp/parser/pass1/parser/parutil.c
cde/programs/dthelp/parser/pass1/parser/parvalok.c
cde/programs/dthelp/parser/pass1/parser/pi.c
cde/programs/dthelp/parser/pass1/parser/proto.h
cde/programs/dthelp/parser/pass1/parser/scan.c
cde/programs/dthelp/parser/pass1/parser/setopt.c
cde/programs/dthelp/parser/pass1/parser/setpar.c
cde/programs/dthelp/parser/pass1/parser/start.c
cde/programs/dthelp/parser/pass1/parser/startdoc.c
cde/programs/dthelp/parser/pass1/parser/string.c
cde/programs/dthelp/parser/pass1/parser/struct.c
cde/programs/dthelp/parser/pass1/parser/text.c
cde/programs/dthelp/parser/pass1/util/allwhite.c
cde/programs/dthelp/parser/pass1/util/basic.h
cde/programs/dthelp/parser/pass1/util/cont.h
cde/programs/dthelp/parser/pass1/util/context.c
cde/programs/dthelp/parser/pass1/util/conutil.c
cde/programs/dthelp/parser/pass1/util/emptyfil.c
cde/programs/dthelp/parser/pass1/util/entout.c
cde/programs/dthelp/parser/pass1/util/error.c
cde/programs/dthelp/parser/pass1/util/exit.c
cde/programs/dthelp/parser/pass1/util/fclndir.c
cde/programs/dthelp/parser/pass1/util/inctest.c
cde/programs/dthelp/parser/pass1/util/initct.c
cde/programs/dthelp/parser/pass1/util/itoa.c
cde/programs/dthelp/parser/pass1/util/letter.c
cde/programs/dthelp/parser/pass1/util/lower.c
cde/programs/dthelp/parser/pass1/util/malloc.c
cde/programs/dthelp/parser/pass1/util/openchk.c
cde/programs/dthelp/parser/pass1/util/paramu.c
cde/programs/dthelp/parser/pass1/util/scanutil.c
cde/programs/dthelp/parser/pass1/util/sparse.c
cde/programs/dthelp/parser/pass1/util/sparse.h
cde/programs/dthelp/parser/pass1/util/trie.c
cde/programs/dthelp/parser/pass1/util/trie.h
cde/programs/dthelp/parser/pass1/util/triecnt.c
cde/programs/dthelp/parser/pass1/util/triedump.c
cde/programs/dthelp/parser/pass1/util/triepdmp.c
cde/programs/dthelp/parser/pass1/util/trieplk.c
cde/programs/dthelp/parser/pass1/util/trierset.c
cde/programs/dthelp/parser/pass1/util/upcmp8.c
cde/programs/dthelp/parser/pass1/util/upper.c
cde/programs/dthelp/parser/pass1/util/upstrcmp.c
cde/programs/dthelp/parser/pass1/util/wchar.c
cde/programs/dthelp/parser/pass1/util/whitesp.c
cde/programs/dthelp/parser/pass2/build/build.c
cde/programs/dthelp/parser/pass2/build/build.h
cde/programs/dthelp/parser/pass2/build/buildutl.c
cde/programs/dthelp/parser/pass2/build/eltree.c
cde/programs/dthelp/parser/pass2/build/except.c
cde/programs/dthelp/parser/pass2/build/fsa.c
cde/programs/dthelp/parser/pass2/build/out.c
cde/programs/dthelp/parser/pass2/build/param.c
cde/programs/dthelp/parser/pass2/build/proto.h
cde/programs/dthelp/parser/pass2/build/scan.c
cde/programs/dthelp/parser/pass2/build/sref.c
cde/programs/dthelp/parser/pass2/build/tree.c
cde/programs/dthelp/parser/pass2/eltdef/context.dat
cde/programs/dthelp/parser/pass2/eltdef/eltdef.c
cde/programs/dthelp/parser/pass2/eltdef/eltdef.h
cde/programs/dthelp/parser/pass2/eltdef/eltutil.c
cde/programs/dthelp/parser/pass2/eltdef/entity.c
cde/programs/dthelp/parser/pass2/eltdef/proto.h
cde/programs/dthelp/parser/pass2/eltdef/scan.c
cde/programs/dthelp/parser/pass2/htag2/custom.c
cde/programs/dthelp/parser/pass2/htag2/fproto.h
cde/programs/dthelp/parser/pass2/htag2/global.h
cde/programs/dthelp/parser/pass2/htag2/option.c
cde/programs/dthelp/parser/pass2/htag2/out.c
cde/programs/dthelp/parser/pass2/htag2/sdl.c
cde/programs/dthelp/parser/pass2/parser/actutil.c
cde/programs/dthelp/parser/pass2/parser/closent.c
cde/programs/dthelp/parser/pass2/parser/code.c
cde/programs/dthelp/parser/pass2/parser/cyclent.c
cde/programs/dthelp/parser/pass2/parser/dcurelt.c
cde/programs/dthelp/parser/pass2/parser/end.c
cde/programs/dthelp/parser/pass2/parser/entity.c
cde/programs/dthelp/parser/pass2/parser/eprefix.c
cde/programs/dthelp/parser/pass2/parser/error.c
cde/programs/dthelp/parser/pass2/parser/esuffix.c
cde/programs/dthelp/parser/pass2/parser/exit.c
cde/programs/dthelp/parser/pass2/parser/findpar.c
cde/programs/dthelp/parser/pass2/parser/getsign.c
cde/programs/dthelp/parser/pass2/parser/input.c
cde/programs/dthelp/parser/pass2/parser/level.c
cde/programs/dthelp/parser/pass2/parser/lookent.c
cde/programs/dthelp/parser/pass2/parser/minim.c
cde/programs/dthelp/parser/pass2/parser/openfrst.c
cde/programs/dthelp/parser/pass2/parser/optstrg.c
cde/programs/dthelp/parser/pass2/parser/param.c
cde/programs/dthelp/parser/pass2/parser/parent.c
cde/programs/dthelp/parser/pass2/parser/parser.c
cde/programs/dthelp/parser/pass2/parser/parser.h
cde/programs/dthelp/parser/pass2/parser/parutil.c
cde/programs/dthelp/parser/pass2/parser/parvalok.c
cde/programs/dthelp/parser/pass2/parser/pi.c
cde/programs/dthelp/parser/pass2/parser/proto.h
cde/programs/dthelp/parser/pass2/parser/scan.c
cde/programs/dthelp/parser/pass2/parser/setopt.c
cde/programs/dthelp/parser/pass2/parser/setpar.c
cde/programs/dthelp/parser/pass2/parser/start.c
cde/programs/dthelp/parser/pass2/parser/startdoc.c
cde/programs/dthelp/parser/pass2/parser/string.c
cde/programs/dthelp/parser/pass2/parser/struct.c
cde/programs/dthelp/parser/pass2/parser/text.c
cde/programs/dthelp/parser/pass2/util/allwhite.c
cde/programs/dthelp/parser/pass2/util/basic.h
cde/programs/dthelp/parser/pass2/util/cont.h
cde/programs/dthelp/parser/pass2/util/context.c
cde/programs/dthelp/parser/pass2/util/conutil.c
cde/programs/dthelp/parser/pass2/util/emptyfil.c
cde/programs/dthelp/parser/pass2/util/entout.c
cde/programs/dthelp/parser/pass2/util/error.c
cde/programs/dthelp/parser/pass2/util/exit.c
cde/programs/dthelp/parser/pass2/util/fclndir.c
cde/programs/dthelp/parser/pass2/util/inctest.c
cde/programs/dthelp/parser/pass2/util/initct.c
cde/programs/dthelp/parser/pass2/util/itoa.c
cde/programs/dthelp/parser/pass2/util/letter.c
cde/programs/dthelp/parser/pass2/util/lower.c
cde/programs/dthelp/parser/pass2/util/malloc.c
cde/programs/dthelp/parser/pass2/util/openchk.c
cde/programs/dthelp/parser/pass2/util/paramu.c
cde/programs/dthelp/parser/pass2/util/scanutil.c
cde/programs/dthelp/parser/pass2/util/sparse.c
cde/programs/dthelp/parser/pass2/util/sparse.h
cde/programs/dthelp/parser/pass2/util/trie.c
cde/programs/dthelp/parser/pass2/util/trie.h
cde/programs/dthelp/parser/pass2/util/triecnt.c
cde/programs/dthelp/parser/pass2/util/triedump.c
cde/programs/dthelp/parser/pass2/util/triepdmp.c
cde/programs/dthelp/parser/pass2/util/trieplk.c
cde/programs/dthelp/parser/pass2/util/trierset.c
cde/programs/dthelp/parser/pass2/util/upcmp8.c
cde/programs/dthelp/parser/pass2/util/upper.c
cde/programs/dthelp/parser/pass2/util/upstrcmp.c
cde/programs/dthelp/parser/pass2/util/wchar.c
cde/programs/dthelp/parser/pass2/util/whitesp.c
cde/programs/dticon/dtIconShell.c
cde/programs/dticon/event.c
cde/programs/dticon/main.c
cde/programs/dticon/utils.c
cde/programs/dtimsstart/action.c
cde/programs/dtimsstart/env.c
cde/programs/dtimsstart/file.c
cde/programs/dtimsstart/main.c
cde/programs/dtimsstart/remote.c
cde/programs/dtimsstart/select.c
cde/programs/dtimsstart/start.c
cde/programs/dtimsstart/util.c
cde/programs/dtimsstart/win.c
cde/programs/dtimsstart/ximsfunc.h
cde/programs/dtinfo/DtMmdb/StyleSheet/defParser.C
cde/programs/dtinfo/DtMmdb/StyleSheet/defToken.C
cde/programs/dtinfo/DtMmdb/StyleSheet/style.C
cde/programs/dtinfo/DtMmdb/StyleSheet/tokenStyle.C
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_close.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_conv.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_delete.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_get.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_open.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_overflow.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_page.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_put.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_search.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_seq.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_split.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_stack.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/bt_utils.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/db.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/memmove.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/mktemp.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/mpool.c
cde/programs/dtinfo/DtMmdb/btree_berkeley/realloc.c
cde/programs/dtinfo/DtMmdb/compression/ps.C
cde/programs/dtinfo/DtMmdb/compression/sgml.C
cde/programs/dtinfo/DtMmdb/schema/sheet.C
cde/programs/dtinfo/DtMmdb/schema/token.C
cde/programs/dtinfo/dtinfo/src/Basic/Atomizer.C
cde/programs/dtinfo/dtinfo/src/Basic/HashTbl.C
cde/programs/dtinfo/dtinfo/src/Basic/List.C
cde/programs/dtinfo/dtinfo/src/Basic/StringHash.C
cde/programs/dtinfo/dtinfo/src/Widgets/Panner.c
cde/programs/dtinfo/dtinfo/src/Widgets/Pixmap.c
cde/programs/dtinfo/dtinfo/src/Widgets/Porthole.c
cde/programs/dtinfo/dtinfo/src/Widgets/Simple.c
cde/programs/dtinfo/dtinfo/src/Widgets/Tree.c
cde/programs/dtinfo/dtinfo/src/cgm/cgmcmds.c
cde/programs/dtinfo/dtinfogen/infolib/etc/ContentType.C
cde/programs/dtinfo/dtinfogen/infolib/etc/OL_DataExpr.C
cde/programs/dtinfo/dtinfogen/infolib/etc/RemoteId.C
cde/programs/dtinfo/dtinfogen/infolib/etc/ReplaceIdIdref.C
cde/programs/dtinfo/dtinfogen/infolib/etc/SearchPath.C
cde/programs/dtinfo/dtinfogen/infolib/etc/TKTemplate.nd.c [deleted file]
cde/programs/dtinfo/dtinfogen/infolib/etc/gr_type.C
cde/programs/dtinfo/dtinfogen/infolib/etc/lex.C
cde/programs/dtinfo/tools/misc/dfiles.c
cde/programs/dtinfo/tools/misc/msgsets.C
cde/programs/dtinfo/tools/misc/pmaker.c
cde/programs/dtksh/Imakefile
cde/programs/dtksh/XtCvtrs.c
cde/programs/dtksh/builtins.c
cde/programs/dtksh/docall.c
cde/programs/dtksh/dtkcmds.c
cde/programs/dtksh/dtkcvt.c
cde/programs/dtksh/dtksh.msg
cde/programs/dtksh/exksh_prpar.c
cde/programs/dtksh/exksh_tbls.c
cde/programs/dtksh/extra.c
cde/programs/dtksh/ksh93/ship/shipop.c
cde/programs/dtksh/ksh93/ship/shipproto.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/alarm.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cd_pwd.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cflow.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/getconf.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/getopts.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/hist.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/misc.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/print.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/read.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/sleep.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/test.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/trap.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/typeset.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/ulimit.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/umask.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/whence.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/data/builtins.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/data/msg.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/data/signals.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/data/variables.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/completion.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/edit.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/emacs.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/history.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/vi.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/include/builtins.h
cde/programs/dtksh/ksh93/src/cmd/ksh93/include/variables.h
cde/programs/dtksh/ksh93/src/cmd/ksh93/mamstate.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/apollo.c [deleted file]
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/args.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/arith.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/array.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/deparse.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/dlopen.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/expand.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fault.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fcin.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/init.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/io.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/jobs.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/lex.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/macro.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/main.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/name.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/parse.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/path.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/streval.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/string.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/subshell.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/suid_exec.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/tdump.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/timers.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/trestore.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/vfork.c
cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/xec.c
cde/programs/dtksh/ksh93/src/cmd/pax/bio.c
cde/programs/dtksh/ksh93/src/cmd/pax/convert.c
cde/programs/dtksh/ksh93/src/cmd/pax/copy.c
cde/programs/dtksh/ksh93/src/cmd/pax/delta.c
cde/programs/dtksh/ksh93/src/cmd/pax/fgetline.c
cde/programs/dtksh/ksh93/src/cmd/pax/file.c
cde/programs/dtksh/ksh93/src/cmd/pax/format.c
cde/programs/dtksh/ksh93/src/cmd/pax/misc.c
cde/programs/dtksh/ksh93/src/cmd/pax/nocom.c
cde/programs/dtksh/ksh93/src/cmd/pax/pax.c
cde/programs/dtksh/ksh93/src/lib/lib0ast/hostinfo.sh
cde/programs/dtksh/ksh93/src/lib/libast/comp/atexit.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/getgroups.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/memccpy.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/memchr.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/memcmp.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/memcpy.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/memmove.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/memset.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/mkdir.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/rmdir.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/setlocale.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/spawnveg.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/statvfs.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/strchr.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/strrchr.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/strtod.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/strtol.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/tmpnam.c
cde/programs/dtksh/ksh93/src/lib/libast/comp/waitpid.c
cde/programs/dtksh/ksh93/src/lib/libast/dir/getdents.c
cde/programs/dtksh/ksh93/src/lib/libast/dir/opendir.c
cde/programs/dtksh/ksh93/src/lib/libast/dir/readdir.c
cde/programs/dtksh/ksh93/src/lib/libast/dir/seekdir.c
cde/programs/dtksh/ksh93/src/lib/libast/disc/sfkeyprintf.c
cde/programs/dtksh/ksh93/src/lib/libast/feature/align.c
cde/programs/dtksh/ksh93/src/lib/libast/feature/botch.c
cde/programs/dtksh/ksh93/src/lib/libast/feature/int.c
cde/programs/dtksh/ksh93/src/lib/libast/feature/limits.c
cde/programs/dtksh/ksh93/src/lib/libast/feature/signal.c
cde/programs/dtksh/ksh93/src/lib/libast/features/align.c
cde/programs/dtksh/ksh93/src/lib/libast/features/botch.c
cde/programs/dtksh/ksh93/src/lib/libast/features/int.c
cde/programs/dtksh/ksh93/src/lib/libast/features/limits.c
cde/programs/dtksh/ksh93/src/lib/libast/features/signal.c
cde/programs/dtksh/ksh93/src/lib/libast/hash/hashalloc.c
cde/programs/dtksh/ksh93/src/lib/libast/hash/hashdump.c
cde/programs/dtksh/ksh93/src/lib/libast/hash/hashfree.c
cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlib.h
cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlook.c
cde/programs/dtksh/ksh93/src/lib/libast/hash/hashscan.c
cde/programs/dtksh/ksh93/src/lib/libast/hash/hashsize.c
cde/programs/dtksh/ksh93/src/lib/libast/hash/hashwalk.c
cde/programs/dtksh/ksh93/src/lib/libast/hash/memhash.c
cde/programs/dtksh/ksh93/src/lib/libast/hash/memsum.c
cde/programs/dtksh/ksh93/src/lib/libast/hash/strhash.c
cde/programs/dtksh/ksh93/src/lib/libast/hash/strsum.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/calloc.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdclose.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdkill.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdopen.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/error.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/fastfind.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/fs3d.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwalk.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwflags.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/getcwd.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/getpath.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/getshell.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/getsymlink.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/getuniv.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/hsort.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/magic.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/malloc.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/optget.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/optjoin.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/pathaccess.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/pathcanon.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/pathcat.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/pathkey.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/pathpath.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/pathprobe.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/pathrepl.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/pathtemp.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/procclose.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/procfree.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/procopen.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/putenv.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/putsymlink.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/query.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/setcwd.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/setenv.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/setenviron.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/setuniv.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/sigcrit.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/stack.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/stak.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/stk.c
cde/programs/dtksh/ksh93/src/lib/libast/misc/systrace.c
cde/programs/dtksh/ksh93/src/lib/libast/obsolete/fgetline.c
cde/programs/dtksh/ksh93/src/lib/libast/obsolete/getwinsize.c
cde/programs/dtksh/ksh93/src/lib/libast/obsolete/query.c
cde/programs/dtksh/ksh93/src/lib/libast/obsolete/tablook.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathaccess.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathbin.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathcanon.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathcat.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathcd.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathcheck.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathgetlink.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathkey.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathpath.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathprobe.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathrepl.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathsetlink.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathshell.c
cde/programs/dtksh/ksh93/src/lib/libast/path/pathtemp.c
cde/programs/dtksh/ksh93/src/lib/libast/port/astconf.c
cde/programs/dtksh/ksh93/src/lib/libast/port/astcopy.c
cde/programs/dtksh/ksh93/src/lib/libast/port/astquery.c
cde/programs/dtksh/ksh93/src/lib/libast/port/astwinsize.c
cde/programs/dtksh/ksh93/src/lib/libast/port/fdcopy.c
cde/programs/dtksh/ksh93/src/lib/libast/port/getwinsize.c
cde/programs/dtksh/ksh93/src/lib/libast/preroot/getpreroot.c
cde/programs/dtksh/ksh93/src/lib/libast/preroot/setpreroot.c
cde/programs/dtksh/ksh93/src/lib/libast/re/recomp.c
cde/programs/dtksh/ksh93/src/lib/libast/re/reexec.c
cde/programs/dtksh/ksh93/src/lib/libast/re/ressub.c
cde/programs/dtksh/ksh93/src/lib/libast/re/resub.c
cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclose.c
cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfhdr.h
cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdvsprnt.c
cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdvsscn.c
cde/programs/dtksh/ksh93/src/lib/libast/string/chresc.c
cde/programs/dtksh/ksh93/src/lib/libast/string/chrtoi.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtbase.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtelapsed.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtesc.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtfs.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtgid.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtls.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmatch.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmode.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtperm.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtre.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtsignal.c
cde/programs/dtksh/ksh93/src/lib/libast/string/fmtuid.c
cde/programs/dtksh/ksh93/src/lib/libast/string/mematoe.c
cde/programs/dtksh/ksh93/src/lib/libast/string/memdup.c
cde/programs/dtksh/ksh93/src/lib/libast/string/memetoa.c
cde/programs/dtksh/ksh93/src/lib/libast/string/modei.c
cde/programs/dtksh/ksh93/src/lib/libast/string/modex.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strcopy.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strdup.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strelapsed.c
cde/programs/dtksh/ksh93/src/lib/libast/string/stresc.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strexpr.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strgid.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strlook.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strmatch.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strmode.c
cde/programs/dtksh/ksh93/src/lib/libast/string/stropt.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strperm.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strsignal.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strsort.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strtape.c
cde/programs/dtksh/ksh93/src/lib/libast/string/strton.c
cde/programs/dtksh/ksh93/src/lib/libast/string/struid.c
cde/programs/dtksh/ksh93/src/lib/libast/string/swapget.c
cde/programs/dtksh/ksh93/src/lib/libast/string/swapmem.c
cde/programs/dtksh/ksh93/src/lib/libast/string/swapop.c
cde/programs/dtksh/ksh93/src/lib/libast/string/swapput.c
cde/programs/dtksh/ksh93/src/lib/libast/string/tabindex.c
cde/programs/dtksh/ksh93/src/lib/libast/string/tablook.c
cde/programs/dtksh/ksh93/src/lib/libast/string/tok.c
cde/programs/dtksh/ksh93/src/lib/libast/string/tokline.c
cde/programs/dtksh/ksh93/src/lib/libast/string/tokscan.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmdate.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfix.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfmt.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmgoff.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tminit.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmleap.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmlex.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmmake.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmpoff.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtime.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtype.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmword.c
cde/programs/dtksh/ksh93/src/lib/libast/tm/tmzone.c
cde/programs/dtksh/ksh93/src/lib/libast/vec/vecargs.c
cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfile.c
cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfree.c
cde/programs/dtksh/ksh93/src/lib/libast/vec/vecload.c
cde/programs/dtksh/ksh93/src/lib/libast/vec/vecstring.c
cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmhdr.h
cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmstrdup.c
cde/programs/dtksh/ksh93/src/lib/libcmd/basename.c
cde/programs/dtksh/ksh93/src/lib/libcmd/cat.c
cde/programs/dtksh/ksh93/src/lib/libcmd/chgrp.c
cde/programs/dtksh/ksh93/src/lib/libcmd/chmod.c
cde/programs/dtksh/ksh93/src/lib/libcmd/cmd.h
cde/programs/dtksh/ksh93/src/lib/libcmd/cmdinit.c
cde/programs/dtksh/ksh93/src/lib/libcmd/cmdrecurse.c
cde/programs/dtksh/ksh93/src/lib/libcmd/cmp.c
cde/programs/dtksh/ksh93/src/lib/libcmd/comm.c
cde/programs/dtksh/ksh93/src/lib/libcmd/cut.c
cde/programs/dtksh/ksh93/src/lib/libcmd/dirname.c
cde/programs/dtksh/ksh93/src/lib/libcmd/fold.c
cde/programs/dtksh/ksh93/src/lib/libcmd/getconf.c
cde/programs/dtksh/ksh93/src/lib/libcmd/head.c
cde/programs/dtksh/ksh93/src/lib/libcmd/id.c
cde/programs/dtksh/ksh93/src/lib/libcmd/join.c
cde/programs/dtksh/ksh93/src/lib/libcmd/logname.c
cde/programs/dtksh/ksh93/src/lib/libcmd/mkdir.c
cde/programs/dtksh/ksh93/src/lib/libcmd/mkfifo.c
cde/programs/dtksh/ksh93/src/lib/libcmd/paste.c
cde/programs/dtksh/ksh93/src/lib/libcmd/pathchk.c
cde/programs/dtksh/ksh93/src/lib/libcmd/rev.c
cde/programs/dtksh/ksh93/src/lib/libcmd/revlib.c
cde/programs/dtksh/ksh93/src/lib/libcmd/rmdir.c
cde/programs/dtksh/ksh93/src/lib/libcmd/tail.c
cde/programs/dtksh/ksh93/src/lib/libcmd/tee.c
cde/programs/dtksh/ksh93/src/lib/libcmd/tty.c
cde/programs/dtksh/ksh93/src/lib/libcmd/uname.c
cde/programs/dtksh/ksh93/src/lib/libcmd/uniq.c
cde/programs/dtksh/ksh93/src/lib/libcmd/wc.c
cde/programs/dtksh/ksh93/src/lib/libcmd/wclib.c
cde/programs/dtksh/ksh93/src/lib/libodelta/delta.c
cde/programs/dtksh/ksh93/src/lib/libodelta/mtchstring.c
cde/programs/dtksh/ksh93/src/lib/libodelta/suftree.c
cde/programs/dtksh/ksh93/src/lib/libodelta/update.c
cde/programs/dtksh/ksh93/src/lib/libvdelta/vdelhdr.h
cde/programs/dtksh/msgs.h
cde/programs/dtksh/struct.c
cde/programs/dtksh/variables.c
cde/programs/dtksh/widget.c
cde/programs/dtksh/xmcmds.c
cde/programs/dtksh/xmcvt.c
cde/programs/dtksh/xmwidgets.c
cde/programs/dtlogin/Imakefile
cde/programs/dtlogin/account.c
cde/programs/dtlogin/apollo.c [deleted file]
cde/programs/dtlogin/apollo/des.h [deleted file]
cde/programs/dtlogin/apollo/login.h [deleted file]
cde/programs/dtlogin/apollo/passwd.h [deleted file]
cde/programs/dtlogin/auth.c
cde/programs/dtlogin/bls/validate.c
cde/programs/dtlogin/chooser.c
cde/programs/dtlogin/config/Xservers.src
cde/programs/dtlogin/daemon.c
cde/programs/dtlogin/dm.c
cde/programs/dtlogin/dm.h
cde/programs/dtlogin/dtchooser.c
cde/programs/dtlogin/mitauth.c
cde/programs/dtlogin/netaddr.c
cde/programs/dtlogin/resource.c
cde/programs/dtlogin/session.c
cde/programs/dtlogin/socket.c
cde/programs/dtlogin/sysauth.c
cde/programs/dtlogin/util.c
cde/programs/dtlogin/verify.c
cde/programs/dtlogin/vgapollo.c [deleted file]
cde/programs/dtlogin/vgauth.c
cde/programs/dtlogin/vgcallback.c
cde/programs/dtlogin/vglang.c
cde/programs/dtlogin/vglogo.c
cde/programs/dtlogin/vgmain.c
cde/programs/dtlogin/vgutil.c
cde/programs/dtlogin/xdmauth.c
cde/programs/dtmail/dtmail/DmxUtils.C
cde/programs/dtmail/dtmail/DtMailGenDialog.C
cde/programs/dtmail/dtmail/EncryptedTextFieldUiItem.C
cde/programs/dtmail/dtmail/FindDialog.C
cde/programs/dtmail/dtmail/MsgScrollingList.C
cde/programs/dtmail/dtmail/Sort.C
cde/programs/dtmail/dtmailpr/utils.C
cde/programs/dtmail/libDtMail/Common/DtMailRc.C
cde/programs/dtmail/libDtMail/Common/IO.C
cde/programs/dtmail/libDtMail/Common/str_utils.C
cde/programs/dtmail/libDtMail/RFC/MIMEPartial.C
cde/programs/dtmail/libDtMail/RFC/RFCTransport.C
cde/programs/dtpad/dtpad.c
cde/programs/dtpad/fileDlg.c
cde/programs/dtpad/main.c
cde/programs/dtpad/printJob.c
cde/programs/dtpdm/JobBox.c
cde/programs/dtpdm/Main.c
cde/programs/dtpdm/MainWindow.c
cde/programs/dtpdm/PdmOid.c
cde/programs/dtpdm/PdmXp.c
cde/programs/dtpdm/PrinterBox.c
cde/programs/dtpdmd/dtpdmd.c
cde/programs/dtpdmd/manager.c
cde/programs/dtprintinfo/UI/DtApp.C
cde/programs/dtprintinfo/UI/DtFindSet.C
cde/programs/dtprintinfo/UI/DtMainW.C
cde/programs/dtprintinfo/UI/DtPrinterIcon.C
cde/programs/dtprintinfo/UI/DtPrtJobIcon.C
cde/programs/dtprintinfo/libUI/MotifUI/Debug.c
cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C
cde/programs/dtscreen/dtscreen.c
cde/programs/dtscreen/hsbramp.c
cde/programs/dtscreen/pyro.c
cde/programs/dtscreen/rotor.c
cde/programs/dtsession/SmCommun.c
cde/programs/dtsession/SmGlobals.c
cde/programs/dtsession/SmHelp.c
cde/programs/dtsession/SmRestore.c
cde/programs/dtsession/SmSave.c
cde/programs/dtsession/SmXSMP.c
cde/programs/dtsr/dtsrhan.c
cde/programs/dtsr/dtsrindex.c
cde/programs/dtstyle/Audio.c
cde/programs/dtstyle/Backdrop.c
cde/programs/dtstyle/ColorEdit.c
cde/programs/dtstyle/ColorFile.c
cde/programs/dtstyle/ColorMain.c
cde/programs/dtstyle/ColorPalette.c
cde/programs/dtstyle/Dtwm.c
cde/programs/dtstyle/Font.c
cde/programs/dtstyle/Help.c
cde/programs/dtstyle/I18nEnv.c
cde/programs/dtstyle/I18nMain.c
cde/programs/dtstyle/I18nUtil.c
cde/programs/dtstyle/Keyboard.c
cde/programs/dtstyle/Main.c
cde/programs/dtstyle/Mouse.c
cde/programs/dtstyle/Screen.c
cde/programs/dtstyle/Startup.c
cde/programs/dtterm/DtTermMain.c
cde/programs/dtterm/DtTermSyntax.c
cde/programs/dtterm/sunDtTermServer.c
cde/programs/dtterm/tests/Cborder/Imakefile
cde/programs/dtterm/tests/Cgeomcolor/Imakefile
cde/programs/dtterm/tests/Ciconic/Imakefile
cde/programs/dtterm/tests/Clogging/Imakefile
cde/programs/dtterm/tests/Clogin/Imakefile
cde/programs/dtterm/tests/Csavelines/Imakefile
cde/programs/dtterm/tests/Cscrolltitle/Imakefile
cde/programs/dtterm/tests/Ctm/Imakefile
cde/programs/dtterm/tests/Cvisualbell/Imakefile
cde/programs/dtterm/tests/Rborder/Imakefile
cde/programs/dtterm/tests/Rgeomcolor/Imakefile
cde/programs/dtterm/tests/Riconic/Imakefile
cde/programs/dtterm/tests/Rlogging/Imakefile
cde/programs/dtterm/tests/Rlogin/Imakefile
cde/programs/dtterm/tests/Rpointer/Imakefile
cde/programs/dtterm/tests/Rsavelines/Imakefile
cde/programs/dtterm/tests/Rscrolltitle/Imakefile
cde/programs/dtterm/tests/Rtm/Imakefile
cde/programs/dtterm/tests/Rvisualbell/Imakefile
cde/programs/dtterm/tests/Rwrap/Imakefile
cde/programs/dtterm/tests/charatt/Imakefile
cde/programs/dtterm/tests/curmove/Imakefile
cde/programs/dtterm/tests/edittest/Imakefile
cde/programs/dtterm/tests/erase/Imakefile
cde/programs/dtterm/tests/keypad/Imakefile
cde/programs/dtterm/tests/scroll/Imakefile
cde/programs/dtterm/tests/sgr/Imakefile
cde/programs/dtterm/tests/shared/Imakefile
cde/programs/dtterm/tests/shared/p2c.h
cde/programs/dtterm/tests/tabctrl/Imakefile
cde/programs/dtterm/tests/util/Imakefile
cde/programs/dtudcexch/Imakefile [deleted file]
cde/programs/dtudcexch/README [deleted file]
cde/programs/dtudcexch/dtudcexch.msg [deleted file]
cde/programs/dtudcexch/excutil.c [deleted file]
cde/programs/dtudcexch/excutil.h [deleted file]
cde/programs/dtudcexch/exportbdf.c [deleted file]
cde/programs/dtudcexch/getbdffn.c [deleted file]
cde/programs/dtudcexch/importbdf.c [deleted file]
cde/programs/dtudcexch/selectx.c [deleted file]
cde/programs/dtudcexch/selectxlfd.c [deleted file]
cde/programs/dtudcexch/udcexc.c [deleted file]
cde/programs/dtudcexch/udcexp.c [deleted file]
cde/programs/dtudcexch/udcimp.c [deleted file]
cde/programs/dtudcexch/xlfdutil.c [deleted file]
cde/programs/dtudcfonted/Imakefile [deleted file]
cde/programs/dtudcfonted/README [deleted file]
cde/programs/dtudcfonted/code.c [deleted file]
cde/programs/dtudcfonted/comsub.c [deleted file]
cde/programs/dtudcfonted/cpyw.c [deleted file]
cde/programs/dtudcfonted/cpyx.c [deleted file]
cde/programs/dtudcfonted/dtaddcpf/Imakefile [deleted file]
cde/programs/dtudcfonted/dtaddcpf/addcpf.c [deleted file]
cde/programs/dtudcfonted/dtbdftocpf/Imakefile [deleted file]
cde/programs/dtudcfonted/dtbdftocpf/bdftocpf.c [deleted file]
cde/programs/dtudcfonted/dtcpftobdf/Imakefile [deleted file]
cde/programs/dtudcfonted/dtcpftobdf/cpftobdf.c [deleted file]
cde/programs/dtudcfonted/dtcpftogpf/Imakefile [deleted file]
cde/programs/dtudcfonted/dtcpftogpf/cpftogpf.c [deleted file]
cde/programs/dtudcfonted/dtcpgpf/Imakefile [deleted file]
cde/programs/dtudcfonted/dtcpgpf/cpgpf.c [deleted file]
cde/programs/dtudcfonted/dtgpftobdf/Imakefile [deleted file]
cde/programs/dtudcfonted/dtgpftobdf/bdftosnf.h [deleted file]
cde/programs/dtudcfonted/dtgpftobdf/gpftobdf.c [deleted file]
cde/programs/dtudcfonted/dtgpftobdf/gtobdf.h [deleted file]
cde/programs/dtudcfonted/dtgpftocpf/Imakefile [deleted file]
cde/programs/dtudcfonted/dtgpftocpf/gpftocpf.c [deleted file]
cde/programs/dtudcfonted/dtlsgpf/Imakefile [deleted file]
cde/programs/dtudcfonted/dtlsgpf/lsgpf.c [deleted file]
cde/programs/dtudcfonted/dtudcfonted.1 [deleted file]
cde/programs/dtudcfonted/dtudcfonted.msg [deleted file]
cde/programs/dtudcfonted/fssxeg.h [deleted file]
cde/programs/dtudcfonted/include/FaLib.h [deleted file]
cde/programs/dtudcfonted/include/bdfgpf.h [deleted file]
cde/programs/dtudcfonted/include/snfstruct.h [deleted file]
cde/programs/dtudcfonted/include/udccom.h [deleted file]
cde/programs/dtudcfonted/include/udcopt.h [deleted file]
cde/programs/dtudcfonted/include/udcutil.h [deleted file]
cde/programs/dtudcfonted/libfal/Imakefile [deleted file]
cde/programs/dtudcfonted/libfal/_falQuarks.c [deleted file]
cde/programs/dtudcfonted/libfal/_falSetLocale.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcCT.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcCharSet.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcConv.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcDB.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcDefConv.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcDynamic.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcEuc.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcFile.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcGenConv.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcGeneric.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcGeneric.h [deleted file]
cde/programs/dtudcfonted/libfal/_fallcInit.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcPrTxt.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcPubI.h [deleted file]
cde/programs/dtudcfonted/libfal/_fallcPubWrap.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcPublic.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcPublic.h [deleted file]
cde/programs/dtudcfonted/libfal/_fallcRM.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcSjis.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcStd.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcTxtPr.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcUTF.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcUTF.h [deleted file]
cde/programs/dtudcfonted/libfal/_fallcUtil.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcWrap.c [deleted file]
cde/programs/dtudcfonted/libfal/_fallcint.h [deleted file]
cde/programs/dtudcfonted/libfal/_fallibint.h [deleted file]
cde/programs/dtudcfonted/libfal/_fallocking.h [deleted file]
cde/programs/dtudcfonted/libfal/_falomGeneric.c [deleted file]
cde/programs/dtudcfonted/libfal/_falomGeneric.h [deleted file]
cde/programs/dtudcfonted/libfal/_falrm.c [deleted file]
cde/programs/dtudcfonted/libfal/_falrmI.h [deleted file]
cde/programs/dtudcfonted/libfal/_faludcInf.c [deleted file]
cde/programs/dtudcfonted/libfal/_falutil.h [deleted file]
cde/programs/dtudcfonted/libfal/_falutilbitmap.c [deleted file]
cde/programs/dtudcfonted/libfal/_falvarargs.h [deleted file]
cde/programs/dtudcfonted/libfal/falfont.c [deleted file]
cde/programs/dtudcfonted/libfal/falfont.h [deleted file]
cde/programs/dtudcfonted/libfal/fonts.list.header [deleted file]
cde/programs/dtudcfonted/libfal/include/font.h [deleted file]
cde/programs/dtudcfonted/libfal/include/fontstruct.h [deleted file]
cde/programs/dtudcfonted/libfal/include/misc.h [deleted file]
cde/programs/dtudcfonted/libfal/include/os.h [deleted file]
cde/programs/dtudcfonted/libfal/include/pcf.h [deleted file]
cde/programs/dtudcfonted/libfal/include/servermd.h [deleted file]
cde/programs/dtudcfonted/libfal/readpcf.c [deleted file]
cde/programs/dtudcfonted/libfal/syncx.c [deleted file]
cde/programs/dtudcfonted/libfal/syncx.h [deleted file]
cde/programs/dtudcfonted/libfuty/Imakefile [deleted file]
cde/programs/dtudcfonted/libfuty/getfname.c [deleted file]
cde/programs/dtudcfonted/libfuty/lock.c [deleted file]
cde/programs/dtudcfonted/libfuty/oakfuty.c [deleted file]
cde/programs/dtudcfonted/mtfgui.c [deleted file]
cde/programs/dtudcfonted/pixmaps/Circle.pm [deleted file]
cde/programs/dtudcfonted/pixmaps/Eraser.pm [deleted file]
cde/programs/dtudcfonted/pixmaps/Line.pm [deleted file]
cde/programs/dtudcfonted/pixmaps/Pencil.pm [deleted file]
cde/programs/dtudcfonted/pixmaps/Rectangle.pm [deleted file]
cde/programs/dtudcfonted/pixmaps/SelectArea.pm [deleted file]
cde/programs/dtudcfonted/pixmaps/arrow.pm [deleted file]
cde/programs/dtudcfonted/resource/Dtudcfonted [deleted file]
cde/programs/dtudcfonted/selectx.c [deleted file]
cde/programs/dtudcfonted/selectxlfd.h [deleted file]
cde/programs/dtudcfonted/ufont.c [deleted file]
cde/programs/dtudcfonted/ufontrsrc.h [deleted file]
cde/programs/dtudcfonted/util.c [deleted file]
cde/programs/dtudcfonted/util.h [deleted file]
cde/programs/dtudcfonted/xoakufont.h [deleted file]
cde/programs/dtudcfonted/xutil.c [deleted file]
cde/programs/dtwm/Button.c
cde/programs/dtwm/Button.h
cde/programs/dtwm/ButtonP.h
cde/programs/dtwm/Callback.c
cde/programs/dtwm/Clock.c
cde/programs/dtwm/Clock.h
cde/programs/dtwm/ClockP.h
cde/programs/dtwm/DataBaseLoad.c
cde/programs/dtwm/DataBaseLoad.h
cde/programs/dtwm/Dtwm.defs.src
cde/programs/dtwm/FAQ.wm
cde/programs/dtwm/Imakefile
cde/programs/dtwm/PanelS.c
cde/programs/dtwm/PanelS.h
cde/programs/dtwm/PanelSP.h
cde/programs/dtwm/Parse.c
cde/programs/dtwm/Parse.h
cde/programs/dtwm/PopupMenu.c
cde/programs/dtwm/PopupMenu.h
cde/programs/dtwm/Print.c
cde/programs/dtwm/README
cde/programs/dtwm/Session.c
cde/programs/dtwm/UI.c
cde/programs/dtwm/UI.h
cde/programs/dtwm/WmBackdrop.c
cde/programs/dtwm/WmBackdrop.h
cde/programs/dtwm/WmBitmap.h
cde/programs/dtwm/WmCDInfo.c
cde/programs/dtwm/WmCDInfo.h
cde/programs/dtwm/WmCDecor.c
cde/programs/dtwm/WmCDecor.h
cde/programs/dtwm/WmCEvent.c
cde/programs/dtwm/WmCEvent.h
cde/programs/dtwm/WmCPlace.c
cde/programs/dtwm/WmCPlace.h
cde/programs/dtwm/WmColormap.c
cde/programs/dtwm/WmColormap.h
cde/programs/dtwm/WmError.c
cde/programs/dtwm/WmError.h
cde/programs/dtwm/WmEvent.c
cde/programs/dtwm/WmEvent.h
cde/programs/dtwm/WmFP.c
cde/programs/dtwm/WmFeedback.c
cde/programs/dtwm/WmFeedback.h
cde/programs/dtwm/WmFunction.c
cde/programs/dtwm/WmFunction.h
cde/programs/dtwm/WmGlobal.h
cde/programs/dtwm/WmGraphics.c
cde/programs/dtwm/WmGraphics.h
cde/programs/dtwm/WmHelp.c
cde/programs/dtwm/WmHelp.h
cde/programs/dtwm/WmIBitmap.h
cde/programs/dtwm/WmICCC.h
cde/programs/dtwm/WmIDecor.c
cde/programs/dtwm/WmIDecor.h
cde/programs/dtwm/WmIPC.c
cde/programs/dtwm/WmIPC.h
cde/programs/dtwm/WmIPlace.c
cde/programs/dtwm/WmIPlace.h
cde/programs/dtwm/WmIconBox.c
cde/programs/dtwm/WmIconBox.h
cde/programs/dtwm/WmImage.c
cde/programs/dtwm/WmImage.h
cde/programs/dtwm/WmInitWs.c
cde/programs/dtwm/WmInitWs.h
cde/programs/dtwm/WmKeyFocus.c
cde/programs/dtwm/WmKeyFocus.h
cde/programs/dtwm/WmMain.c
cde/programs/dtwm/WmManage.c
cde/programs/dtwm/WmManage.h
cde/programs/dtwm/WmMenu.c
cde/programs/dtwm/WmMenu.h
cde/programs/dtwm/WmOL.c
cde/programs/dtwm/WmOL.h
cde/programs/dtwm/WmPanelP.h
cde/programs/dtwm/WmParse.c
cde/programs/dtwm/WmParse.h
cde/programs/dtwm/WmParseP.c
cde/programs/dtwm/WmParseP.h
cde/programs/dtwm/WmPresence.c
cde/programs/dtwm/WmPresence.h
cde/programs/dtwm/WmProperty.c
cde/programs/dtwm/WmProperty.h
cde/programs/dtwm/WmProtocol.c
cde/programs/dtwm/WmProtocol.h
cde/programs/dtwm/WmResCvt.c
cde/programs/dtwm/WmResCvt.h
cde/programs/dtwm/WmResNames.h
cde/programs/dtwm/WmResParse.c
cde/programs/dtwm/WmResParse.h
cde/programs/dtwm/WmResource.c
cde/programs/dtwm/WmResource.h
cde/programs/dtwm/WmSignal.c
cde/programs/dtwm/WmSignal.h
cde/programs/dtwm/WmWinConf.c
cde/programs/dtwm/WmWinConf.h
cde/programs/dtwm/WmWinInfo.c
cde/programs/dtwm/WmWinInfo.h
cde/programs/dtwm/WmWinList.c
cde/programs/dtwm/WmWinList.h
cde/programs/dtwm/WmWinState.c
cde/programs/dtwm/WmWinState.h
cde/programs/dtwm/WmWrkspace.c
cde/programs/dtwm/WmWrkspace.h
cde/programs/dtwm/WmXSMP.c
cde/programs/dtwm/WmXSMP.h
cde/programs/dtwm/examples/occupy/occupy.c
cde/programs/dtwm/examples/wsinfo/wsinfo.c
cde/programs/localized/de_DE.ISO8859-1/msg/dtksh.msg
cde/programs/localized/es_ES.ISO8859-1/msg/dtksh.msg
cde/programs/localized/fr_FR.ISO8859-1/msg/dtksh.msg
cde/programs/localized/it_IT.ISO8859-1/msg/dtksh.msg
cde/programs/localized/ja_JP.dt-eucJP/msg/dtksh.msg
cde/programs/localized/ko_KR.dt-eucKR/msg/dtksh.msg
cde/programs/localized/sv_SE.ISO8859-1/msg/dtksh.msg
cde/programs/localized/templates/app-defaults.tmpl
cde/programs/localized/templates/msg.C.tmpl
cde/programs/localized/templates/msg.el_GR.UTF-8.tmpl
cde/programs/localized/util/merge.c
cde/programs/localized/util/mkcatdefs.c
cde/programs/localized/zh_CN.dt-eucCN/msg/dtksh.msg
cde/programs/localized/zh_TW.dt-eucTW/msg/dtksh.msg
cde/programs/nsgmls/Recognizer.C
cde/programs/nsgmls/parseSd.C
cde/programs/ttsnoop/DtTt.C
cde/programs/ttsnoop/callbackChooser_stubs.C.src
cde/programs/ttsnoop/fileChooser_stubs.C.src
cde/programs/ttsnoop/messageProps_stubs.C.src
cde/programs/ttsnoop/patternProps_stubs.C.src
cde/programs/ttsnoop/sessionChooser_stubs.C.src
cde/programs/ttsnoop/stringChooser_stubs.C.src
cde/programs/ttsnoop/ttChooser_stubs.C.src
cde/programs/ttsnoop/ttsnoop.C.src
cde/programs/ttsnoop/ttsnoop_stubs.C.src
cde/programs/util/dttypes/dttypes.c

index 88d224fbdc42012659f9d32b92d7087198c66618..34528bb1fd47e7ac75611e403428ed653f77b51f 100644 (file)
@@ -182,7 +182,7 @@ USE_GCC = UseGcc
 #  if (__clang_major__ > 3) || \
       (__clang_major__ == 3 && __clang_minor__ >= 4)
 #   define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
-           -Wno-unused-result -Wno-deprecated-register
+           -Wno-unused-result 
 #  else
 #   define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
            -Wno-unused-result
index 4b984aecc3ea45a571c04ff116907dcdec30b82e..4aa0814b0e7a7b6707b41c4517cb8a55f01a0722 100644 (file)
@@ -5,7 +5,7 @@ XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $
  *     1.  Identify a machine-specific cpp symbol.  If your preprocessor 
  *         does not have any built in, you will need to add the symbol to the
  *         cpp_argv table in config/imake/imakemdep.h and rebuild imake with
- *         the BOOTSTRAPCFLAGS variable set (see the macII for an example).
+ *         the BOOTSTRAPCFLAGS variable set.
  *
  *     2.  Add all machine-specific cpp symbols (either defined by you or by
  *         the preprocessor or compiler) to the predefs table in 
@@ -270,13 +270,6 @@ XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $
 # define NCRArchitecture
 #endif /* NCR */
 
-#ifdef apollo
-# define MacroIncludeFile <apollo.cf>
-# define MacroFile apollo.cf
-# undef apollo
-# define ApolloArchitecture
-#endif /* apollo */
-
 #ifdef sony
 # define MacroIncludeFile <sony.cf>
 # define MacroFile sony.cf
@@ -317,13 +310,6 @@ XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $
 # define M4330Architecture
 #endif /* M4330 */
 
-#ifdef macII
-# define MacroIncludeFile <macII.cf>
-# define MacroFile macII.cf
-# undef  macII
-# define MacIIArchitecture
-#endif /* macII */
-
 #ifdef _CRAY
 # define MacroIncludeFile <cray.cf>
 # define MacroFile cray.cf
index 01cf9ab7b5e7d0e46eb95583a3338fd68ff0e427..8872406fd96f535b1256dd49456493479945d773 100644 (file)
@@ -62,7 +62,6 @@ Mips.cf \
 NetBSD.cf \
 Oki.cf \
 Win32.cf \
-apollo.cf \
 bsd.cf \
 convex.cf \
 cray.cf \
@@ -72,7 +71,6 @@ ibm.cf \
 isc.cf \
 linux.cf \
 luna.cf \
-macII.cf \
 mach.cf \
 minix.cf \
 moto.cf \
index 9402e199e5d83fd22b1a17c1945192fcc7c41bab..c9e30dce62807fbe2ac5bd1709bb8712587ba769 100644 (file)
@@ -1051,7 +1051,7 @@ CXXDEPENDINCLUDE != CcCmd -v -x c++ /dev/null -fsyntax-only \
 /* Suppress warnings dependant from compiler versions */
 #if !defined(GccWarningOptions)
 # if (defined __clang__)
-#  define GccWarningOptions    -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch -Wno-unused-result -Wno-deprecated-register
+#  define GccWarningOptions    -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch -Wno-unused-result 
 # else
 #  define GccWarningOptions    -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch
 # endif
diff --git a/cde/config/cf/apollo.cf b/cde/config/cf/apollo.cf
deleted file mode 100644 (file)
index a802b1a..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-XCOMM platform:  $XConsortium: apollo.cf /main/34 1996/09/28 16:09:07 rws $
-
-/*
- * Minimally tested, and only in the bsd4.3 environment.  X_NOT_POSIX is not
- * in Xosdefs.h, because we suspect someone might want to try building with
- * POSIX support in the sysv environment (the OS doc seems to imply that
- * POSIX is supported in sysv).
- */
-
-#ifndef OSName
-#define OSName            Domain/OS SR10.3
-#endif
-XCOMM operating system:  OSName
-#ifndef OSMajorVersion
-#define OSMajorVersion    10
-#endif
-#ifndef OSMinorVersion
-#define OSMinorVersion    3
-#endif
-
-#ifndef CCompilerMajorVersion
-#define CCompilerMajorVersion 6
-#endif
-#ifndef CCompilerMinorVersion
-#define CCompilerMinorVersion 8
-#endif
-
-#define StandardDefines -DX_NOT_POSIX
-#define BuildServer    NO
-#define HasNdbm                YES
-#define ConnectionFlags        -DTCPCONN
-
-#define        InstallManPageLong(file,destdir,dest)                           @@\
-install.man:: file.man                                                 @@\
-       MakeDir($(DESTDIR)destdir)                                      @@\
-       $(NROFF) $(MANMACROS) file.man > file.mantxt                            @@\
-       $(INSTALL) -c $(INSTMANFLAGS) file.mantxt $(DESTDIR)destdir/dest.$(MANSUFFIX) @@\
-       $(RM) file.mantxt
index a5d5c93721625f22bcf09c19c470c71317c77732..bca21fb290f412d1504670987c8708e9a47fc417 100644 (file)
@@ -74,7 +74,7 @@ XCOMM binutils:  (LinuxBinUtilsMajorVersion)
 
 #define UseInstalledX11         YES
 
-#define BuildLibPathVar        LD_LIBRARY_PATH
+#define BuildLibPathVar                LD_LIBRARY_PATH
 #define HasGcc                 YES
 #define HasGcc2                        YES
 #define HasGcc2ForCplusplus    YES
@@ -112,7 +112,7 @@ XCOMM binutils:  (LinuxBinUtilsMajorVersion)
 #define SetTtyGroup            YES
 
 #define CcCmd                  gcc -g -pipe
-#define CplusplusCmd           g++ -g -pipe -fpermissive
+#define CplusplusCmd           g++ -g -pipe
 #define AsCmd                  as
 #define LdCmd                  ld
 
diff --git a/cde/config/cf/macII.cf b/cde/config/cf/macII.cf
deleted file mode 100644 (file)
index 90d1c86..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-XCOMM platform:  $XConsortium: macII.cf /main/50 1996/09/28 16:11:19 rws $
-
-#ifndef OSName
-#define OSName            A/UX 3.0.1
-#endif
-#ifndef OSMajorVersion
-#define OSMajorVersion    3
-#endif
-#ifndef OSMinorVersion
-#define OSMinorVersion    0
-#endif
-#ifndef OSTeenyVersion
-#define OSTeenyVersion    1
-#endif
-XCOMM operating system:  OSName
-
-#if HasGcc
-#define BootstrapCFlags   -DmacII
-#endif
-#define SystemV             YES
-#define HasPoll                    NO
-#define NeedBerklib         YES
-#define ExtraLibraries      $(XBSDLIB) -lposix -lm -lmr
-#define Malloc0ReturnsNull  YES
-#define StandardDefines     -DmacII -DSYSV
-#define ExecableScripts     NO
-#define RemoveTargetProgramByMoving YES
-#define ExpandManNames      YES
-#define PexShmIPC           NO
-#define XmacIIServer        YES
-#define XawI18nDefines      -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
-#if MacHasc89
-#define CcCmd c89 -D_POSIX_SOURCE
-#else
-#define HasVoidSignalReturn NO
-#endif
-#if OSMajorVersion <= 2
-#define ServerExtraDefines  -DSUPPORT_2_0
-#endif
-#define InstKmemFlags      -g sys -m 2711
-#define ExtensionOSDefines  -DXTESTEXT1
-
-#if !HasGcc
-#define DefaultCCOptions -A 3
-#define PexCCOptions -A 4
-#endif
-
-/*
- * If you wish to override the man page directories, do so here using just
- * one tab between the parameter name (e.g. ManDirectoryRoot) and the
- * value so that cpp doesn't get confused.
- */
-#define ManDirectoryRoot       /usr/catman/u_man
index e0c5a673fe8bc00e5f97b85d7801b32302faef95..3444c045fadc92536c86e285b82a7f919ded604c 100644 (file)
@@ -226,9 +226,6 @@ typedef union wait  waitType;
 char *malloc(), *realloc();
 void exit();
 #endif
-#if defined(macII) && !defined(__STDC__)  /* stdlib.h fails to define these */
-char *malloc(), *realloc();
-#endif /* macII */
 #ifdef X_NOT_STDC_ENV
 extern char    *getenv();
 #endif
@@ -263,7 +260,7 @@ extern int  errno;
  * This define of strerror is copied from (and should be identical to)
  * Xos.h, which we don't want to include here for bootstrapping reasons.
  */
-#if defined(X_NOT_STDC_ENV) || (defined(sun) && !defined(SVR4)) || defined(macII)
+#if defined(X_NOT_STDC_ENV) || (defined(sun) && !defined(SVR4))
 # ifndef strerror
 extern char *sys_errlist[];
 extern int sys_nerr;
index aa897b4ad84b1ede8224085d1fbe0fb5ac68f711..bad190de04a590623d199d595acf2b65f61bc1ed 100644 (file)
@@ -65,10 +65,6 @@ in this Software without prior written authorization from The Open Group.
 #endif
 #endif
 
-#if defined(macII) || defined(_AUX_SOURCE)
-#define imake_ccflags "-DmacII -DSYSV"
-#endif
-
 #ifdef stellar
 #define imake_ccflags "-DSYSV"
 #endif
@@ -136,10 +132,6 @@ in this Software without prior written authorization from The Open Group.
 #define imake_ccflags "-fn -tm c1"
 #endif
 
-#ifdef apollo
-#define imake_ccflags "-DX_NOT_POSIX"
-#endif
-
 #ifdef WIN32
 #if _MSC_VER < 1000
 #define imake_ccflags "-nologo -batch -D__STDC__"
@@ -237,9 +229,6 @@ in this Software without prior written authorization from The Open Group.
 #define USE_CC_E
 #define DEFAULT_CC "cl"
 #endif
-#ifdef apollo
-#define DEFAULT_CPP "/usr/lib/cpp"
-#endif
 #if defined(_IBMR2) && !defined(DEFAULT_CPP)
 #define DEFAULT_CPP "/usr/ccs/lib/cpp"
 #endif
@@ -354,9 +343,6 @@ char *cpp_argv[ARGUMENTS] = {
 #ifdef M4310
        "-DM4310",      /* Tektronix */
 #endif
-#if defined(macII) || defined(_AUX_SOURCE)
-       "-DmacII",      /* Apple A/UX */
-#endif
 #ifdef sony
        "-Dsony",       /* Sony */
 #if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
@@ -611,9 +597,6 @@ char *cpp_argv[ARGUMENTS] = {
 #define DEF_STRINGIFY(_x) DEF_EVALUATE(_x)
 
 struct symtab  predefs[] = {
-#ifdef apollo
-       {"apollo", "1"},
-#endif
 #ifdef ibm032
        {"ibm032", "1"},
 #endif
index 998b057521781f3d88559c23a279c3e901a75616..005051a2ec74e12097ecfe9d5df570c8e1a972c6 100644 (file)
@@ -77,11 +77,11 @@ struct filepointer  *currentfile;
 struct inclist         *currentinc;
 
 cppsetup(line, filep, inc)
-       register char   *line;
-       register struct filepointer     *filep;
-       register struct inclist         *inc;
+       char    *line;
+       struct filepointer      *filep;
+       struct inclist          *inc;
 {
-       register char *p, savec;
+       char *p, savec;
        static boolean setupdone = FALSE;
        boolean value;
 
@@ -135,7 +135,7 @@ pperror(tag, x0,x1,x2,x3,x4)
 
 
 yyerror(s)
-       register char   *s;
+       char    *s;
 {
        fatalerr("Fatal error: %s\n", s);
 }
@@ -236,9 +236,9 @@ my_eval_variable (ip, var, len)
 
 
 int cppsetup(line, filep, inc)
-       register char   *line;
-       register struct filepointer     *filep;
-       register struct inclist         *inc;
+       char    *line;
+       struct filepointer      *filep;
+       struct inclist          *inc;
 {
     IfParser ip;
     struct _parse_data pd;
index ba172839dd26980b2fa2f817e1d8eeaa3e10d482..066cda33f05daeefcab61fe42591fc6bd293aa7c 100644 (file)
@@ -140,9 +140,6 @@ struct filepointer {
 
 #ifndef X_NOT_STDC_ENV
 #include <stdlib.h>
-#if defined(macII) && !defined(__STDC__)  /* stdlib.h fails to define these */
-char *malloc(), *realloc();
-#endif /* macII */
 #else
 char                   *malloc();
 char                   *realloc();
index ff36ffe166113e9dc843a31db1938a8b7b714d70..64e8b9add9dd21d6eb7c42c4d691c718a770fe76 100644 (file)
@@ -55,7 +55,7 @@ extern boolean warn_multiple;
 
 boolean
 isdot(p)
-       register char   *p;
+       char    *p;
 {
        if(p && *p++ == '.' && *p++ == '\0')
                return(TRUE);
@@ -64,7 +64,7 @@ isdot(p)
 
 boolean
 isdotdot(p)
-       register char   *p;
+       char    *p;
 {
        if(p && *p++ == '.' && *p++ == '.' && *p++ == '\0')
                return(TRUE);
@@ -73,7 +73,7 @@ isdotdot(p)
 
 boolean
 issymbolic(dir, component)
-       register char   *dir, *component;
+       char    *dir, *component;
 {
 #ifdef S_IFLNK
        struct stat     st;
@@ -103,7 +103,7 @@ void
 remove_dotdot(path)
        char    *path;
 {
-       register char   *end, *from, *to, **cp;
+       char    *end, *from, *to, **cp;
        char            *components[ MAXFILES ],
                        newpath[ BUFSIZ ];
        boolean         component_copied;
@@ -173,9 +173,9 @@ remove_dotdot(path)
  * Add an include file to the list of those included by 'file'.
  */
 struct inclist *newinclude(newfile, incstring)
-       register char   *newfile, *incstring;
+       char    *newfile, *incstring;
 {
-       register struct inclist *ip;
+       struct inclist  *ip;
 
        /*
         * First, put this file on the global list of include files.
@@ -195,9 +195,9 @@ struct inclist *newinclude(newfile, incstring)
 
 void
 included_by(ip, newfile)
-       register struct inclist *ip, *newfile;
+       struct inclist  *ip, *newfile;
 {
-       register int i;
+       int i;
 
        if (ip == NULL)
                return;
@@ -247,7 +247,7 @@ included_by(ip, newfile)
 void
 inc_clean ()
 {
-       register struct inclist *ip;
+       struct inclist *ip;
 
        for (ip = inclist; ip < inclistp; ip++) {
                ip->i_flags &= ~MARKED;
@@ -255,13 +255,13 @@ inc_clean ()
 }
 
 struct inclist *inc_path(file, include, dot)
-       register char   *file,
+       char    *file,
                        *include;
        boolean dot;
 {
        static char     path[ BUFSIZ ];
-       register char           **pp, *p;
-       register struct inclist *ip;
+       char            **pp, *p;
+       struct inclist  *ip;
        struct stat     st;
        boolean found = FALSE;
 
index 07be15922b3e65d8460f37b2b338042ead443691..22e5da170df7f70a00be2fb87c9b3fa0e897b573 100644 (file)
@@ -152,10 +152,10 @@ int main(argc, argv)
        int     argc;
        char    **argv;
 {
-       register char   **fp = filelist;
-       register char   **incp = includedirs;
-       register char   *p;
-       register struct inclist *ip;
+       char    **fp = filelist;
+       char    **incp = includedirs;
+       char    *p;
+       struct inclist  *ip;
        char    *makefile = NULL;
        struct filepointer      *filecontent;
        struct symtab *psymp = predefs;
@@ -452,7 +452,7 @@ int main(argc, argv)
 struct filepointer *getfile(file)
        char    *file;
 {
-       register int    fd;
+       int     fd;
        struct filepointer      *content;
        struct stat     st;
 
@@ -487,18 +487,18 @@ freefile(fp)
 }
 
 char *copy(str)
-       register char   *str;
+       char    *str;
 {
-       register char   *p = (char *)malloc(strlen(str) + 1);
+       char    *p = (char *)malloc(strlen(str) + 1);
 
        strncpy(p, str, strlen(str) + 1);
        return(p);
 }
 
 int match(str, list)
-       register char   *str, **list;
+       char    *str, **list;
 {
-       register int    i;
+       int     i;
 
        for (i=0; *list; i++, list++)
                if (strcmp(str, *list) == 0)
@@ -511,12 +511,12 @@ int match(str, list)
  * is all this program is ever interested in.
  */
 char *our_getline(filep)
-       register struct filepointer     *filep;
+       struct filepointer      *filep;
 {
-       register char   *p,     /* walking pointer */
+       char    *p,     /* walking pointer */
                        *eof,   /* end of file pointer */
                        *bol;   /* beginning of line pointer */
-       register int    lineno; /* line number */
+       int     lineno; /* line number */
 
        p = filep->f_p;
        eof = filep->f_end;
@@ -574,7 +574,7 @@ char *our_getline(filep)
                else if (*p == '\n') {
                        lineno++;
                        if (*bol == '#') {
-                               register char *cp;
+                               char *cp;
 
                                *p++ = '\0';
                                /* punt lines with just # (yacc generated) */
@@ -598,9 +598,9 @@ done:
  * It will have objprefix and objsuffix around it.
  */
 char *base_name(file)
-       register char   *file;
+       char    *file;
 {
-       register char   *p;
+       char    *p;
 
        file = copy(file);
        for(p=file+strlen(file); p>file && *p != '.'; p--) ;
index 6e1e9fb1cbc55d037982c275d1df09f57f688e2e..4d9a13f4f1e6fc2f53876c82b5d94742eae47b74 100644 (file)
@@ -54,11 +54,11 @@ extern struct inclist       maininclist;
 
 int
 gobble(filep, file, file_red)
-       register struct filepointer *filep;
+       struct filepointer *filep;
        struct inclist          *file, *file_red;
 {
-       register char   *line;
-       register int    type;
+       char    *line;
+       int     type;
 
        while ((line = our_getline(filep))) {
                switch(type = deftype(line, filep, file_red, file, FALSE)) {
@@ -108,14 +108,14 @@ gobble(filep, file, file_red)
  * Decide what type of # directive this line is.
  */
 int deftype (line, filep, file_red, file, parse_it)
-       register char   *line;
-       register struct filepointer *filep;
-       register struct inclist *file_red, *file;
+       char    *line;
+       struct filepointer *filep;
+       struct inclist *file_red, *file;
        int     parse_it;
 {
-       register char   *p;
+       char    *p;
        char    *directive, savechar, *q;
-       register int    ret;
+       int     ret;
 
        /*
         * Parse the directive...
@@ -257,13 +257,13 @@ int deftype (line, filep, file_red, file, parse_it)
 }
 
 struct symtab **fdefined(symbol, file, srcfile)
-       register char   *symbol;
+       char    *symbol;
        struct inclist  *file;
        struct inclist  **srcfile;
 {
-       register struct inclist **ip;
-       register struct symtab  **val;
-       register int    i;
+       struct inclist  **ip;
+       struct symtab   **val;
+       int     i;
        static int      recurse_lvl = 0;
 
        if (file->i_flags & DEFCHECKED)
@@ -292,11 +292,11 @@ struct symtab **fdefined(symbol, file, srcfile)
 }
 
 struct symtab **isdefined(symbol, file, srcfile)
-       register char   *symbol;
+       char    *symbol;
        struct inclist  *file;
        struct inclist  **srcfile;
 {
-       register struct symtab  **val;
+       struct symtab   **val;
 
        if ((val = slookup(symbol, &maininclist))) {
                debug(1,("%s defined on command line\n", symbol));
@@ -314,9 +314,9 @@ struct symtab **isdefined(symbol, file, srcfile)
  */
 int
 zero_value(exp, filep, file_red)
-       register char   *exp;
-       register struct filepointer *filep;
-       register struct inclist *file_red;
+       char    *exp;
+       struct filepointer *filep;
+       struct inclist *file_red;
 {
        if ((cppsetup(exp, filep, file_red)))
            return(IFFALSE);
@@ -330,7 +330,7 @@ define2(name, val, file)
        struct inclist  *file;
 {
     int first, last, below;
-    register struct symtab **sp = NULL, **dest;
+    struct symtab **sp = NULL, **dest;
     struct symtab *stab;
 
     /* Make space if it's needed */
@@ -353,9 +353,9 @@ define2(name, val, file)
     while (last >= first)
     {
        /* Fast inline binary search */
-       register char *s1;
-       register char *s2;
-       register int middle = (first + last) / 2;
+       char *s1;
+       char *s2;
+       int middle = (first + last) / 2;
 
        /* Fast inline strchr() */
        s1 = name;
@@ -430,18 +430,18 @@ define(def, file)
 }
 
 struct symtab **slookup(symbol, file)
-       register char   *symbol;
-       register struct inclist *file;
+       char    *symbol;
+       struct inclist  *file;
 {
-       register int first = 0;
-       register int last = file->i_ndefs - 1;
+       int first = 0;
+       int last = file->i_ndefs - 1;
 
        if (file) while (last >= first)
        {
            /* Fast inline binary search */
-           register char *s1;
-           register char *s2;
-           register int middle = (first + last) / 2;
+           char *s1;
+           char *s2;
+           int middle = (first + last) / 2;
 
            /* Fast inline strchr() */
            s1 = symbol;
@@ -530,9 +530,9 @@ int merge2defines(file1, file2)
 void
 undefine(symbol, file)
        char    *symbol;
-       register struct inclist *file;
+       struct inclist  *file;
 {
-       register struct symtab **ptr;
+       struct symtab **ptr;
        struct inclist *srcfile;
        while ((ptr = isdefined(symbol, file, &srcfile)) != NULL)
        {
@@ -549,8 +549,8 @@ find_includes(filep, file, file_red, recursion, failOK)
        int                     recursion;
        boolean                 failOK;
 {
-       register char   *line;
-       register int    type;
+       char    *line;
+       int     type;
        boolean recfailOK;
 
        while ((line = our_getline(filep))) {
index c78e5d1886c8a452ff240f2db606f11ce63813e4..b10eb3184d8ebc8ede4d5e95455e23474c0ea52c 100644 (file)
@@ -62,8 +62,8 @@ add_include(filep, file, file_red, include, dot, failOK)
        boolean dot;
        boolean failOK;
 {
-       register struct inclist *newfile;
-       register struct filepointer     *content;
+       struct inclist  *newfile;
+       struct filepointer      *content;
 
        /*
         * First decide what the pathname of this include file really is.
@@ -96,12 +96,12 @@ add_include(filep, file, file_red, include, dot, failOK)
 
 void
 pr(ip, file, base)
-       register struct inclist  *ip;
+       struct inclist  *ip;
        char    *file, *base;
 {
        static char     *lastfile;
        static int      current_len;
-       register int    len, i;
+       int     len, i;
        char    buf[ BUFSIZ ];
 
        printed = TRUE;
@@ -133,10 +133,10 @@ pr(ip, file, base)
 
 void
 recursive_pr_include(head, file, base)
-       register struct inclist *head;
-       register char   *file, *base;
+       struct inclist  *head;
+       char    *file, *base;
 {
-       register int    i;
+       int     i;
 
        if (head->i_flags & MARKED)
                return;
index 11447f97779134de516b916eff0ae029e1d01d46..853c055ca1c62768c7de47b3c21847a6bb30fb3c 100644 (file)
@@ -107,8 +107,7 @@ quit (
 #if NeedVarargsPrototypes
     int code, char * fmt, ...)
 #else
-    code, fmt, a1, a2, a3)
-    char *fmt;
+    int code, char *fmt, int a1, int a2, int a3)
 #endif
 {
 #if NeedVarargsPrototypes
@@ -124,8 +123,7 @@ quit (
 }
 
 void
-quiterr (code, s)
-    char *s;
+quiterr (int code, char *s)
 {
     perror (s);
     exit (code);
@@ -158,8 +156,7 @@ msg (
 }
 
 void
-mperror (s)
-    char *s;
+mperror (char *s)
 {
     if (curdir) {
        fprintf (stderr, "%s:\n", curdir);
@@ -169,9 +166,7 @@ mperror (s)
 }
 
 
-int equivalent(lname, rname)
-    char *lname;
-    char *rname;
+int equivalent(char *lname, char *rname)
 {
     char *s;
 
@@ -188,11 +183,10 @@ int equivalent(lname, rname)
 /* Recursively create symbolic links from the current directory to the "from"
    directory.  Assumes that files described by fs and ts are directories. */
 
-dodir (fn, fs, ts, rel)
-char *fn;                      /* name of "from" directory, either absolute or
-                                  relative to cwd */
-struct stat *fs, *ts;          /* stats for the "from" directory and cwd */
-int rel;                       /* if true, prepend "../" to fn before using */
+/* fn, name of "from" directory, either absolute or relative to cwd */
+/* fs, ts, stats for the "from" directory and cwd */
+/* rel, if true, prepend "../" to fn before using */
+int dodir (char *fn, struct stat *fs, struct stat *ts, int rel)
 {
     DIR *df;
     struct dirent *dp;
@@ -316,9 +310,8 @@ int rel;                    /* if true, prepend "../" to fn before using */
 }
 
 
-main (ac, av)
-int ac;
-char **av;
+int
+main (int ac, char **av)
 {
     char *prog_name = av[0];
     char *fn, *tn;
index 8087b396dbbf9c4e1566d503a3cb5d7de27f240f..13330827ef91c4f03b0de75a27f33621f08f7329 100644 (file)
@@ -53,9 +53,6 @@ in this Software without prior written authorization from The Open Group.
 #else
 char *malloc();
 #endif
-#if defined(macII) && !defined(__STDC__)  /* stdlib.h fails to define these */
-char *malloc();
-#endif /* macII */
 
 typedef struct _TableEnt {
     struct _TableEnt* next;
@@ -102,9 +99,7 @@ static char* externdefstr;
 
 #define X_MAGIC_STRING "<<<STRING_TABLE_GOES_HERE>>>"
 
-static void WriteHeaderProlog (f, phile)
-    FILE* f;
-    File* phile;
+static void WriteHeaderProlog (FILE* f, File* phile)
 {
     Table* t;
     TableEnt* te;
@@ -125,9 +120,7 @@ static void WriteHeaderProlog (f, phile)
     (void) fprintf (f, "%s", "#else\n");
 }
 
-static void IntelABIWriteHeader (f, phile)
-    FILE* f;
-    File* phile;
+static void IntelABIWriteHeader (FILE* f ,File* phile)
 {
     Table* t;
     TableEnt* te;
@@ -146,9 +139,7 @@ static void IntelABIWriteHeader (f, phile)
     (void) fprintf (f, "#endif /* %s */\n", featurestr);
 }
 
-static void SPARCABIWriteHeader (f, phile)
-    FILE* f;
-    File* phile;
+static void SPARCABIWriteHeader (FILE* f, File* phile)
 {
     Table* t;
     TableEnt* te;
@@ -159,9 +150,7 @@ static void SPARCABIWriteHeader (f, phile)
                            prefixstr, te->left, te->right);
 }
 
-static void FunctionWriteHeader (f, phile)
-    FILE* f;
-    File* phile;
+static void FunctionWriteHeader (FILE* f, File* phile)
 {
     Table* t;
     TableEnt* te;
@@ -182,9 +171,7 @@ static void FunctionWriteHeader (f, phile)
     (void) fprintf (f, "#endif /* %s */\n", featurestr);
 }
 
-static void ArrayperWriteHeader (f, phile)
-    FILE* f;
-    File* phile;
+static void ArrayperWriteHeader (FILE* f, File* phile)
 {
     Table* t;
     TableEnt* te;
@@ -202,9 +189,7 @@ static void ArrayperWriteHeader (f, phile)
     (void) fprintf (f, "#endif /* %s */\n", featurestr);
 }
 
-static void DefaultWriteHeader (f, phile)
-    FILE* f;
-    File* phile;
+static void DefaultWriteHeader (FILE* f, File* phile)
 {
     Table* t;
     TableEnt* te;
@@ -225,9 +210,7 @@ static void DefaultWriteHeader (f, phile)
     (void) fprintf (f, "#endif /* %s */\n", featurestr);
 }
 
-static void CopyTmplProlog (tmpl, f)
-    FILE* tmpl;
-    FILE* f;
+static void CopyTmplProlog (FILE* tmpl, FILE* f)
 {
     char buf[1024];
     static char* magic_string = X_MAGIC_STRING;
@@ -241,9 +224,7 @@ static void CopyTmplProlog (tmpl, f)
     }
 }
 
-static void CopyTmplEpilog (tmpl, f)
-    FILE* tmpl;
-    FILE* f;
+static void CopyTmplEpilog (FILE* tmpl, FILE* f)
 {
     char buf[1024];
 
@@ -254,10 +235,7 @@ static void CopyTmplEpilog (tmpl, f)
 static char* abistring[] = {
     "Default", "Array per string", "Intel", "Intel BC", "SPARC", "Function" };
 
-static void WriteHeader (tagline, phile, abi)
-    char* tagline;
-    File* phile;
-    int abi;
+static void WriteHeader (char* tagline, File* phile, int abi)
 {
     FILE* f;
     char* tmp;
@@ -307,10 +285,7 @@ static void WriteHeader (tagline, phile, abi)
     (void) fclose (f);
 }
 
-static void WriteSourceLine (te, abi, fudge)
-    TableEnt* te;
-    int abi;
-    int fudge;
+static void WriteSourceLine (TableEnt* te, int abi, int fudge)
 {
     char* c;
 
@@ -322,8 +297,7 @@ static void WriteSourceLine (te, abi, fudge)
 
 static char* const_string = "%s %sConst char %s[] = {\n";
 
-static void IntelABIWriteSource (abi)
-    int abi;
+static void IntelABIWriteSource (int abi)
 {
     File* phile;
 
@@ -341,8 +315,7 @@ static void IntelABIWriteSource (abi)
     }
 }
 
-static void IntelABIBCWriteSource (abi)
-    int abi;
+static void IntelABIBCWriteSource (int abi)
 {
     File* phile;
 
@@ -369,8 +342,7 @@ static void IntelABIBCWriteSource (abi)
     }
 }
 
-static void FunctionWriteSource (abi)
-    int abi;
+static void FunctionWriteSource (int abi)
 {
     File* phile;
 
@@ -392,8 +364,7 @@ static void FunctionWriteSource (abi)
     }
 }
 
-static void ArrayperWriteSource (abi)
-    int abi;
+static void ArrayperWriteSource (int abi)
 {
     File* phile;
     static int done_atom;
@@ -415,8 +386,7 @@ static void ArrayperWriteSource (abi)
     }
 }
 
-static void DefaultWriteSource (abi)
-    int abi;
+static void DefaultWriteSource (int abi)
 {
     File* phile;
 
@@ -434,9 +404,7 @@ static void DefaultWriteSource (abi)
     }
 }
 
-static void WriteSource(tagline, abi)
-    char* tagline;
-    int abi;
+static void WriteSource(char* tagline, int abi)
 {
     static void (*sourceproc[])() = { 
        DefaultWriteSource, ArrayperWriteSource,
@@ -473,8 +441,7 @@ static void WriteSource(tagline, abi)
     }
 }
 
-static void DoLine(buf)
-    char* buf;
+static void DoLine(char* buf)
 {
 #define X_NO_TOKEN 0
 #define X_FILE_TOKEN 1
@@ -645,8 +612,7 @@ static void DoLine(buf)
     }
 }
 
-static void IntelABIIndexEntries (file)
-    File* file;
+static void IntelABIIndexEntries (File* file)
 {
     Table* t;
     TableEnt* te;
@@ -659,8 +625,7 @@ static void IntelABIIndexEntries (file)
     }
 }
 
-static void DefaultIndexEntries (file)
-    File* file;
+static void DefaultIndexEntries (File* file)
 {
     Table* t;
     TableEnt* te;
@@ -674,9 +639,7 @@ static void DefaultIndexEntries (file)
     }
 }
 
-static void IndexEntries (file,abi)
-    File* file;
-    int abi;
+static void IndexEntries (File* file, int abi)
 {
     switch (abi) {
     case X_SPARC_ABI:
@@ -691,8 +654,7 @@ static void IndexEntries (file,abi)
     }
 }
 
-static char* DoComment (line)
-    char* line;
+static char* DoComment (char* line)
 {
     char* tag;
     char* eol;
@@ -710,9 +672,7 @@ static char* DoComment (line)
     return ret;
 }
 
-int main(argc, argv)
-    int argc;
-    char** argv;
+int main(int argc, char** argv)
 {
     int len, i;
     char* tagline = NULL;
diff --git a/cde/config/util/mkshadow/Imakefile b/cde/config/util/mkshadow/Imakefile
deleted file mode 100644 (file)
index 38b0614..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-XCOMM $XConsortium: Imakefile,v 1.1 94/04/13 18:44:40 rws Exp $
-           SRCS = mkshadow.c savedir.c wildmat.c
-           OBJS = mkshadow.o savedir.o wildmat.o
-
-ComplexProgramTarget(mkshadow)
diff --git a/cde/config/util/mkshadow/README b/cde/config/util/mkshadow/README
deleted file mode 100644 (file)
index eea4b8b..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-The mkshadow programs makes a "shadow tree" of a directory tree.
-It logically copies all of the "MASTER" directory into ".".
-However, ordinary files, and RCS/SCCS directories are "copied"
-by creating a sybolic link to the corresponding file in MASTER.
-
-The wildmat.c file is by Rich Salz, and from comp.sources.misc, volume 17.
-The savedir.c file is lightly modified from the version written
-by David MacKenzie for GNU fileutils; the Free Software Foundation
-has graciously agreed to waive their usual copyright so this
-program can be distributed by the X Consortium.
-
-If you have problems compiling savedir.c, try setting the DIRENT make
-variable as suggested in the Makefile.
-
- * Usage: mkshadow [-X exclude_file] [-x exclude_pattern] ... MASTER
- * Makes the current directory be a "shadow copy" of MASTER.
- * Sort of like a recursive copy of MASTER to .
- * However, symbolic links are used instead of actually
- * copying (non-directory) files.
- * Also, directories named RCS or SCCS are shared (with a symbolic link).
- * Warning messages are printed for files (and directories) in .
- * that don't match a corresponding file in MASTER (though
- * symbolic links are silently removed).
- * Also, a warning message is printed for non-directory files
- * under . that are  not symbolic links.
- *
- * Files and directories can be excluded from the sharing
- * with the -X and -x flags. The flag `-x pattern' (or `-xpattern')
- * means that mkshadow should ignore any file whose name matches
- * the pattern. The pattern is a "globbing" pattern, i.e. the
- * characters *?[^-] are interpreted as by the shell.
- * If the pattern contains a '/' is is matched against the complete
- * current path (relative to '.'); otherwise, it is matched
- * against the last component of the path.
- * A `-X filename' flag means to read a set of exclusion patterns
- * from the named file, one pattern to a line.
-
-Author: Per Bothner. bothner@cygnus.com. November 1990, 1993.
diff --git a/cde/config/util/mkshadow/mkshadow.c b/cde/config/util/mkshadow/mkshadow.c
deleted file mode 100644 (file)
index ffb4ac5..0000000
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: mkshadow.c /main/2 1996/12/04 10:11:51 swick $ */
-/* mkshadow.c - make a "shadow copy" of a directory tree with symlinks.
-   Copyright 1990, 1993 Free Software Foundation, Inc.
-
-   Permission to use, copy, modify, and distribute this program for
-   any purpose and without fee is hereby granted, provided that this
-   copyright and permission notice appear on all copies, and that
-   notice be given that copying and distribution is by permission of
-   the Free Software Foundation.  The Free Software Foundation makes
-   no representations about the suitability of this software for any
-   purpose.  It is provided "as is" without expressed or implied
-   warranty.
-
-   (The FSF has modified its usual distribution terms, for this file,
-   as a courtesy to the X project.)  */
-
-/*
- * Usage: mkshadow [-X exclude_file] [-x exclude_pattern] ... MASTER [SHADOW]
- * Makes SHADOW be a "shadow copy" of MASTER.  SHADOW defaults to the current
- * directory. Sort of like a recursive copy of MASTER to SHADOW.
- * However, symbolic links are used instead of actually
- * copying (non-directory) files.
- * Also, directories named RCS or SCCS are shared (with a symbolic link).
- * Warning messages are printed for files (and directories) in .
- * that don't match a corresponding file in MASTER (though
- * symbolic links are silently removed).
- * Also, a warning message is printed for non-directory files
- * under SHADOW that are not symbolic links.
- *
- * Files and directories can be excluded from the sharing
- * with the -X and -x flags. The flag `-x pattern' (or `-xpattern')
- * means that mkshadow should ignore any file whose name matches
- * the pattern. The pattern is a "globbing" pattern, i.e. the
- * characters *?[^-] are interpreted as by the shell.
- * If the pattern contains a '/' is is matched against the complete
- * current path (relative to '.'); otherwise, it is matched
- * against the last component of the path.
- * A `-X filename' flag means to read a set of exclusion patterns
- * from the named file, one pattern to a line.
- *
- * Originally written by Per Bothner at University of Wisconsin-Madison,
- * inspired by the lndir script distributed with X11.
- * Modified by Per Bothner <bothner@cygnus.com> November 1993
- * to more-or-less follow Posix.
- */
-
-#include <sys/types.h>
-#include <stdio.h>
-#ifdef BSD
-#include <strings.h>
-#define strchr index
-#else
-#include <string.h>
-#endif
-#include <sys/stat.h>
-#if defined(S_IFDIR) && !defined(S_ISDIR)
-#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
-#endif
-#if defined(S_IFLNK) && !defined(S_ISLNK)
-#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
-#endif
-#ifndef S_ISLNK
-#define lstat stat
-#endif
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024
-#endif
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
-extern char * savedir();
-
-fatal(msg)
-     char *msg;
-{
-    if (errno) perror(msg ? msg : "");
-    else if (msg) fprintf(stderr, "mkshadow: %s\n", msg);
-    exit(-1);
-}
-
-/* When handling symbolic links to relative directories,
- * we need to prepend "../" to the "source".
- * We preallocate MAX_DEPTH repetations of "../" using a simple trick.
- */
-#define MAX_DEPTH 20
-#define PREPEND_BUFFER_SIZE (MAX_DEPTH*3)
-char master_buffer[MAXPATHLEN+PREPEND_BUFFER_SIZE] =
-    "../../../../../../../../../../../../../../../../../../../../";
-/* The logical start of the master_buffer is defined by
- * master_start, which skips the fixed prepend area.
- */
-#define master_start (master_buffer+PREPEND_BUFFER_SIZE)
-char shadow_buffer[MAXPATHLEN];
-
-void bad_args(msg)
-{
-    if (msg) fprintf(stderr, "%s\n", msg);
-    fprintf (stderr, "usage: mkshadow [-X exclude_file] [-x exclude_pattern]");
-    fprintf (stderr, " master [shadow]\n");
-    exit(-1);
-}
-
-int exclude_count = 0;
-char **exclude_patterns = NULL;
-int exclude_limit = 0;
-
-void add_exclude(pattern)
-    char *pattern;
-{
-    if (exclude_limit == 0) {
-       exclude_limit = 100;
-       exclude_patterns = (char**)malloc(exclude_limit * sizeof(char*));
-    } else if (exclude_count + 1 >= exclude_limit) {
-       exclude_limit += 100;
-       exclude_patterns = (char**)realloc(exclude_patterns, 
-                                          exclude_limit * sizeof(char*));
-    }
-    exclude_patterns[exclude_count] = pattern;
-    exclude_count++;
-}
-
-void add_exclude_file(name)
-     char *name;
-{
-    char buf[MAXPATHLEN];
-    FILE *file = fopen(name, "r");
-    if (file == NULL) fatal("failed to find -X (exclude) file");
-    for (;;) {
-       int len;
-       char *str = fgets(buf, MAXPATHLEN, file);
-       if (str == NULL) break;
-       len = strlen(str);
-       if (len && str[len-1] == '\n') str[--len] = 0;
-       if (!len) continue;
-       str = (char*)malloc(len+1);
-       strcpy(str, buf);
-       add_exclude(str);
-    }
-    fclose(file);
-}
-
-main(argc, argv)
-     char **argv;
-{
-    char *master_name = NULL;
-    char *shadow_name = NULL;
-    int i;
-    for (i = 1; i < argc; i++) {
-       if (argv[i][0] == '-') {
-           switch(argv[i][1]) {
-             case 'X':
-               if (argv[i][2]) add_exclude_file(&argv[i][2]);
-               else if (++i >= argc) bad_args(NULL);
-               else add_exclude_file(argv[i]);
-               break;
-             case 'x':
-               if (argv[i][2]) add_exclude(&argv[i][2]);
-               else if (++i >= argc) bad_args(NULL);
-               else add_exclude(argv[i]);
-               break;
-             default:
-               bad_args(NULL);
-           }
-       } else if (master_name == NULL)
-           master_name = argv[i];
-       else if (shadow_name == NULL)
-           shadow_name = argv[i];
-       else bad_args (NULL);
-    }
-
-    if (master_name == NULL) bad_args(NULL);
-    if (shadow_name == NULL)
-       shadow_name = ".";
-    else if ((shadow_name[0] != '.' || shadow_name[1])
-            && master_name[0] != '/') {
-       fprintf(stderr, "Shadowing a relative directory pathname to a \n");
-       fprintf(stderr, "shadow other than '.' is not supported!\n");
-       exit(-1);
-    }
-    strcpy(shadow_buffer, shadow_name);
-    strcpy(master_start, master_name);
-    DoCopy(master_start, shadow_buffer, 0);
-    return 0;
-}
-
-int compare_strings(ptr1, ptr2)
-     char **ptr1, **ptr2;
-{
-    return strcmp(*ptr1, *ptr2);
-}
-
-void MakeLink(master, current, depth)
-     char *master;
-     char *current;
-     int depth;
-{
-    if (master[0] != '/') {
-       /* Source directory was specified with a relative pathname. */
-       if (master != master_start) {
-           fatal("Internal bug: bad string buffer use");
-       }
-       /* Pre-pend "../" depth times. This compensates for
-        * the directories we've entered. */
-       master -= 3 * depth;
-    }
-    if (symlink(master, current)) {
-       fprintf(stderr, "Failed to create symbolic link %s->%s\n",
-               current, master);
-       exit (-1);
-    }
-}
-
-
-/* Get a sorted NULL_terminator array of (char*) using 'names'
- * (created by save_dir) as data.
- */
-char ** get_name_pointers(names)
-     char *names;
-{
-    int n_names = 0;
-    int names_buf_size = 64;
-    char *namep;
-    char ** pointers = (char**)malloc(names_buf_size * sizeof(char*));
-    if (!names || !pointers) fatal("virtual memory exhausted");
-
-    for (namep = names; *namep; namep += strlen(namep) + 1) {
-       if (n_names + 1 >= names_buf_size) {
-           names_buf_size *= 2;
-           pointers = (char**)realloc(pointers,
-                                      names_buf_size * sizeof(char*));
-           if (!pointers) fatal("virtual memory exhausted");
-       }
-       pointers[n_names++] = namep;
-    }
-    pointers[n_names] = 0;
-    qsort(pointers, n_names, sizeof(char*), compare_strings);
-    return pointers;
-}
-
-/* Recursively shadow the directory whose name is in MASTER
- * (which is == MASTER_START) into the destination directory named CURRENT.
- */
-
-DoCopy(master, current, depth)
-     char *master; /* The source directory. */
-     char *current; /* The destination directory. */
-     int depth;
-{
-    struct stat stat_master, stat_current;
-    char **master_pointer, **current_pointer;
-    char **master_names, **current_names;
-    char *master_end, *current_end;
-    char *master_name_buf, *current_name_buf;
-    master_end = master + strlen(master);
-    current_end = current + strlen(current);
-
-    /* Get rid of terminal '/' */
-    if (master_end[-1] == '/' && master != master_end - 1)
-       *--master_end = 0;
-    if (current_end[-1] == '/' && current != current_end - 1)
-       *--current_end = 0;
-
-    if (depth >= MAX_DEPTH) {
-       fprintf(stderr,
-               "Nesting too deep (depth %d at %s). Probable circularity.\n",
-               depth, master);
-       exit(-1);
-    }
-
-    master_name_buf = savedir(master, 500);
-    if (master_name_buf == NULL) {
-       fprintf(stderr, "Not enough memory or no such directory: %s\n",
-               master);
-       exit(-1);
-    }
-    current_name_buf = savedir(current, 500);
-    if (current_name_buf == NULL) {
-       fprintf(stderr, "Not enough memory or no such directory: %s\n",
-               current);
-       exit(-1);
-    }
-
-    master_names = get_name_pointers(master_name_buf);
-    current_names = get_name_pointers(current_name_buf);
-
-    master_pointer = master_names;
-    current_pointer = current_names;
-    for (;;) {
-       int cmp, ipat;
-       int in_master, in_current;
-       char *cur_name;
-       if (*master_pointer == NULL && *current_pointer == NULL)
-           break;
-       if (*master_pointer == NULL) cmp = 1;
-       else if (*current_pointer == NULL) cmp = -1;
-       else cmp = strcmp(*master_pointer, *current_pointer);
-       if (cmp < 0) { /* file only exists in master directory */
-           in_master = 1; in_current = 0;
-       } else if (cmp == 0) { /* file exists in both directories */
-           in_master = 1; in_current = 1;
-       } else { /* file only exists in current directory */
-           in_current = 1; in_master = 0;
-       }
-       cur_name = in_master ? *master_pointer : *current_pointer;
-       sprintf(master_end, "/%s", cur_name);
-       sprintf(current_end, "/%s", cur_name);
-       for (ipat = 0; ipat < exclude_count; ipat++) {
-           char *pat = exclude_patterns[ipat];
-           char *cur;
-           if (strchr(pat, '/')) cur = current + 2; /* Skip initial "./" */
-           else cur = cur_name;
-           if (wildmat(cur, pat)) goto skip;
-       }
-       if (in_master)
-           if (lstat(master, &stat_master) != 0) fatal("stat failed");
-       if (in_current)
-           if (lstat(current, &stat_current) != 0) fatal("stat failed");
-       if (in_current && !in_master) {
-           if (S_ISLNK(stat_current.st_mode))
-               if (unlink(current)) {
-                   fprintf(stderr, "Failed to remove symbolic link %s.\n",
-                           current);
-               }
-               else
-                   fprintf(stderr, "Removed symbolic link %s.\n",
-                           current);
-           else {
-               fprintf(stderr,
-                       "The file %s does not exist in the master tree.\n",
-                       current);
-           }
-       }
-       else if (S_ISDIR(stat_master.st_mode)
-                && strcmp(cur_name, "RCS") != 0
-                && strcmp(cur_name, "SCCS") != 0) {
-           if (!in_current) {
-               if (mkdir(current, 0775)) fatal("mkdir failed");
-           }
-           else if (stat(current, &stat_current)) fatal("stat failed");
-           if (!in_current || stat_current.st_dev != stat_master.st_dev
-               || stat_current.st_ino != stat_master.st_ino)
-               DoCopy(master, current, depth+1);
-           else
-               fprintf(stderr, "Link %s is the same as directory %s.\n",
-                       current, master);
-       }
-       else {
-           if (!in_current)
-               MakeLink(master, current, depth);
-           else if (!S_ISLNK(stat_current.st_mode)) {
-               fprintf(stderr, "Existing file %s is not a symbolc link.\n",
-                       current);
-           } else {
-               if (stat(current, &stat_current) || stat(master, &stat_master))
-                   fatal("stat failed");
-               if (stat_current.st_dev != stat_master.st_dev
-                   || stat_current.st_ino != stat_master.st_ino) {
-                   fprintf(stderr, "Fixing incorrect symbolic link %s.\n",
-                           current);
-                   if (unlink(current)) {
-                       fprintf(stderr, "Failed to remove symbolic link %s.\n",
-                               current);
-                   }
-                   else
-                       MakeLink(master, current, depth);
-               }
-           }
-       }
-      skip:
-       if (in_master) master_pointer++;
-       if (in_current) current_pointer++;
-    }
-
-    free(master_names); free(current_names);
-    free(master_name_buf); free(current_name_buf);
-}
diff --git a/cde/config/util/mkshadow/savedir.c b/cde/config/util/mkshadow/savedir.c
deleted file mode 100644 (file)
index 009c849..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: savedir.c,v 1.1 94/04/13 18:26:54 rws Exp $ */
-/* savedir.c -- save the list of files in a directory in a string
-   Copyright 1990, 1993 Free Software Foundation, Inc.
-
-   Permission to use, copy, modify, and distribute this program for
-   any purpose and without fee is hereby granted, provided that this
-   copyright and permission notice appear on all copies, and that
-   notice be given that copying and distribution is by permission of
-   the Free Software Foundation.  The Free Software Foundation makes
-   no representations about the suitability of this software for any
-   purpose.  It is provided "as is" without expressed or implied
-   warranty.
-
-   (The FSF has modified its usual distribution terms, for this file,
-   as a courtesy to the X project.)  */
-
-/* Written by David MacKenzie <djm@ai.mit.edu>.
-   Modified to use <dirent.h> by default.  Per Bothner <bothner@cygnus.com>. */
-
-#include <sys/types.h>
-#if !defined(DIRECT) && !defined(BSD)
-#include <dirent.h>
-#define NLENGTH(direct) (strlen((direct)->d_name))
-#else
-#undef dirent
-#define dirent direct
-#define NLENGTH(direct) ((direct)->d_namlen)
-#ifdef BSD
-#include <sys/dir.h>
-#else
-#ifdef SYSNDIR
-#include <sys/ndir.h>
-#else
-#include <ndir.h>
-#endif
-#endif
-#endif
-
-#if defined(VOID_CLOSEDIR) || defined(BSD)
-/* Fake a return value. */
-#define CLOSEDIR(d) (closedir (d), 0)
-#else
-#define CLOSEDIR(d) closedir (d)
-#endif
-
-#ifdef STDC_HEADERS
-#include <stdlib.h>
-#include <string.h>
-#else
-char *malloc ();
-char *realloc ();
-int strlen ();
-#ifndef NULL
-#define NULL 0
-#endif
-#endif
-
-char *stpcpy ();
-
-/* Return a freshly allocated string containing the filenames
-   in directory DIR, separated by '\0' characters;
-   the end is marked by two '\0' characters in a row.
-   NAME_SIZE is the number of bytes to initially allocate
-   for the string; it will be enlarged as needed.
-   Return NULL if DIR cannot be opened or if out of memory. */
-
-char *
-savedir (dir, name_size)
-     char *dir;
-     unsigned name_size;
-{
-  DIR *dirp;
-  struct dirent *dp;
-  char *name_space;
-  char *namep;
-
-  dirp = opendir (dir);
-  if (dirp == NULL)
-    return NULL;
-
-  name_space = (char *) malloc (name_size);
-  if (name_space == NULL)
-    {
-      closedir (dirp);
-      return NULL;
-    }
-  namep = name_space;
-
-  while ((dp = readdir (dirp)) != NULL)
-    {
-      /* Skip "." and ".." (some NFS filesystems' directories lack them). */
-      if (dp->d_name[0] != '.'
-         || (dp->d_name[1] != '\0'
-             && (dp->d_name[1] != '.' || dp->d_name[2] != '\0')))
-       {
-         unsigned size_needed = (namep - name_space) + NLENGTH (dp) + 2;
-
-         if (size_needed > name_size)
-           {
-             char *new_name_space;
-
-             while (size_needed > name_size)
-               name_size += 1024;
-
-             new_name_space = realloc (name_space, name_size);
-             if (new_name_space == NULL)
-               {
-                 closedir (dirp);
-                 return NULL;
-               }
-             namep += new_name_space - name_space;
-             name_space = new_name_space;
-           }
-         strcpy (namep, dp->d_name);
-         namep += strlen (namep) + 1;
-       }
-    }
-  *namep = '\0';
-  if (CLOSEDIR (dirp))
-    {
-      free (name_space);
-      return NULL;
-    }
-  return name_space;
-}
diff --git a/cde/config/util/mkshadow/wildmat.c b/cde/config/util/mkshadow/wildmat.c
deleted file mode 100644 (file)
index e6b1def..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: wildmat.c,v 1.2 94/04/13 18:40:59 rws Exp $ */
-/*
-**
-**  Do shell-style pattern matching for ?, \, [], and * characters.
-**  Might not be robust in face of malformed patterns; e.g., "foo[a-"
-**  could cause a segmentation violation.  It is 8bit clean.
-**
-**  Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
-**  Rich $alz is now <rsalz@bbn.com>.
-**  April, 1991:  Replaced mutually-recursive calls with in-line code
-**  for the star character.
-**
-**  Special thanks to Lars Mathiesen <thorinn@diku.dk> for the ABORT code.
-**  This can greatly speed up failing wildcard patterns.  For example:
-**     pattern: -*-*-*-*-*-*-12-*-*-*-m-*-*-*
-**     text 1:  -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1
-**     text 2:  -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1
-**  Text 1 matches with 51 calls, while text 2 fails with 54 calls.  Without
-**  the ABORT, then it takes 22310 calls to fail.  Ugh.  The following
-**  explanation is from Lars:
-**  The precondition that must be fulfilled is that DoMatch will consume
-**  at least one character in text.  This is true if *p is neither '*' nor
-**  '\0'.)  The last return has ABORT instead of FALSE to avoid quadratic
-**  behaviour in cases like pattern "*a*b*c*d" with text "abcxxxxx".  With
-**  FALSE, each star-loop has to run to the end of the text; with ABORT
-**  only the last one does.
-**
-**  Once the control of one instance of DoMatch enters the star-loop, that
-**  instance will return either TRUE or ABORT, and any calling instance
-**  will therefore return immediately after (without calling recursively
-**  again).  In effect, only one star-loop is ever active.  It would be
-**  possible to modify the code to maintain this context explicitly,
-**  eliminating all recursive calls at the cost of some complication and
-**  loss of clarity (and the ABORT stuff seems to be unclear enough by
-**  itself).  I think it would be unwise to try to get this into a
-**  released version unless you have a good test data base to try it out
-**  on.
-*/
-
-#define TRUE                   1
-#define FALSE                  0
-#define ABORT                  -1
-
-
-    /* What character marks an inverted character class? */
-#define NEGATE_CLASS           '^'
-    /* Is "*" a common pattern? */
-#define OPTIMIZE_JUST_STAR
-    /* Do tar(1) matching rules, which ignore a trailing slash? */
-#undef MATCH_TAR_PATTERN
-
-
-/*
-**  Match text and p, return TRUE, FALSE, or ABORT.
-*/
-static int
-DoMatch(text, p)
-    register char      *text;
-    register char      *p;
-{
-    register int       last;
-    register int       matched;
-    register int       reverse;
-
-    for ( ; *p; text++, p++) {
-       if (*text == '\0' && *p != '*')
-           return ABORT;
-       switch (*p) {
-       case '\\':
-           /* Literal match with following character. */
-           p++;
-           /* FALLTHROUGH */
-       default:
-           if (*text != *p)
-               return FALSE;
-           continue;
-       case '?':
-           /* Match anything. */
-           continue;
-       case '*':
-           while (*++p == '*')
-               /* Consecutive stars act just like one. */
-               continue;
-           if (*p == '\0')
-               /* Trailing star matches everything. */
-               return TRUE;
-           while (*text)
-               if ((matched = DoMatch(text++, p)) != FALSE)
-                   return matched;
-           return ABORT;
-       case '[':
-           reverse = p[1] == NEGATE_CLASS ? TRUE : FALSE;
-           if (reverse)
-               /* Inverted character class. */
-               p++;
-           for (last = 0400, matched = FALSE; *++p && *p != ']'; last = *p)
-               /* This next line requires a good C compiler. */
-               if (*p == '-' ? *text <= *++p && *text >= last : *text == *p)
-                   matched = TRUE;
-           if (matched == reverse)
-               return FALSE;
-           continue;
-       }
-    }
-
-#ifdef MATCH_TAR_PATTERN
-    if (*text == '/')
-       return TRUE;
-#endif /* MATCH_TAR_ATTERN */
-    return *text == '\0';
-}
-
-
-/*
-**  User-level routine.  Returns TRUE or FALSE.
-*/
-int
-wildmat(text, p)
-    char       *text;
-    char       *p;
-{
-#ifdef OPTIMIZE_JUST_STAR
-    if (p[0] == '*' && p[1] == '\0')
-       return TRUE;
-#endif /* OPTIMIZE_JUST_STAR */
-    return DoMatch(text, p) == TRUE;
-}
-
-\f
-
-#ifdef TEST
-#include <stdio.h>
-
-/* Yes, we use gets not fgets.  Sue me. */
-extern char    *gets();
-
-
-main()
-{
-    char        p[80];
-    char        text[80];
-
-    printf("Wildmat tester.  Enter pattern, then strings to test.\n");
-    printf("A blank line gets prompts for a new pattern; a blank pattern\n");
-    printf("exits the program.\n");
-
-    for ( ; ; ) {
-       printf("\nEnter pattern:  ");
-       (void)fflush(stdout);
-       if (gets(p) == NULL || p[0] == '\0')
-           break;
-       for ( ; ; ) {
-           printf("Enter text:  ");
-           (void)fflush(stdout);
-           if (gets(text) == NULL)
-               exit(0);
-           if (text[0] == '\0')
-               /* Blank line; go back and get a new pattern. */
-               break;
-           printf("      %s\n", wildmat(text, p) ? "YES" : "NO");
-       }
-    }
-
-    exit(0);
-    /* NOTREACHED */
-}
-#endif /* TEST */
index 246ef22d89351d54426406228bfd100ff8e33f8f..6696e420c01c2def34225363225ed9836cee69b6 100644 (file)
@@ -125,7 +125,7 @@ static char *br_help_msg[] = {
 /* ______________________________________________________________________ */
 
 void
-Browse()
+Browse(void)
 {
     char       buf[256], *cmd, **av, **sv, *cmapfile, *sdatafile;
     char       *Prompt;
@@ -186,7 +186,7 @@ Browse()
            if (av[1] && isdigit(*av[1])) {
                n = atoi(av[1]);
                if (n < ce->ndcont) {
-                   printf(ce->dcont[n]);
+                   printf("%s", ce->dcont[n]);
                    fputs("\n", stdout);
                }
                else if (ce->ndcont == 0)
index c8752dcb00ebef1a6acfd4278fced8712d7e7a51..229fac42d7c77d2f7d222b5699f3600a505235bf 100644 (file)
@@ -302,7 +302,7 @@ PrintStats(
  */
 
 void
-PrintIDList()
+PrintIDList(void)
 {
     ID_t       *id;
     Element_t  *ep;
index 811249ecbcc38f4fe493ff43a82f3d2ffc6d1fba..41d3fea0438db52f3702ca4d12b6ee389b68cb43 100644 (file)
@@ -211,7 +211,7 @@ Initialize1(
 /* Initialization stuff done after dealing with args. */
 
 static void
-Initialize2()
+Initialize2(void)
 {
     SetMappingNV(Variables, "transpec", tranfile ? tranfile : "??");
 
@@ -344,7 +344,7 @@ static char *help_msg[] = {
 };
 
 static void
-DoHelpMessage()
+DoHelpMessage(void)
 {
     char       **s = help_msg;
     printf("usage: %s [option ...] [file]", this_prog);
index bb7da760cc08376d319948dd4baef6a8f7c893ad..86c879758d7a2da75cfaf83ae6f9fdb6f44b3c80 100644 (file)
@@ -897,8 +897,8 @@ void
 TblTStart(Element_t * ep,
          FILE * fP)
 {
-       register char * cp;
-       register struct Element_t * ep2;
+       char * cp;
+       struct Element_t * ep2;
 
 
 
@@ -928,7 +928,7 @@ void
 TblTEnd(Element_t * ep,
        FILE * fP)
 {
-       register struct tblformat * ffp, * ffp2;
+       struct tblformat * ffp, * ffp2;
 
 
        if ( tblBOFTCount > 31 )        {
@@ -971,11 +971,11 @@ void
 TblTGroup(Element_t * ep,
          FILE * fP)
 {
-       register int i, j, k;
-       register char * cp, * cp2;
-       register Element_t * ep2, ep3;
-       register struct tblcolspec * tcsp, * tcsp2;
-       register struct tblspanspec * tssp, * tssp2;
+       int i, j, k;
+       char * cp, * cp2;
+       Element_t * ep2, ep3;
+       struct tblcolspec * tcsp, * tcsp2;
+       struct tblspanspec * tssp, * tssp2;
 
 
        tblColSpec = 0;         /* make sure they're clear */
@@ -1116,8 +1116,8 @@ void
 TblTGroupEnd(Element_t * ep,
              FILE * fP)
 {
-       register struct tblcolspec * tcsp, * tcsp2;
-       register struct tblspanspec * tssp, * tssp2;
+       struct tblcolspec * tcsp, * tcsp2;
+       struct tblspanspec * tssp, * tssp2;
 
 
        for ( tcsp=tblColSpec;  tcsp;  tcsp=tcsp2 )     {
@@ -1147,7 +1147,7 @@ void
 TblTFoot(Element_t * ep,
         FILE * fP)
 {
-       register struct tblformat * ffp, * ffp2;
+       struct tblformat * ffp, * ffp2;
        static struct tblformat * tfp, * tfp2;
 
 
@@ -1184,9 +1184,9 @@ TblBuildFormat(Element_t * ep,            /* parent of rows.. */
                                         * building */
               tblsource source)        /* type of record */
 {
-       register int i;
-       register struct tblformat * lfp; /* "current" format */
-       register struct tblformat * nfp; /* the next format */
+       int i;
+       struct tblformat * lfp; /* "current" format */
+       struct tblformat * nfp; /* the next format */
 
 
        for ( lfp= *fp;  lfp && lfp->next;  lfp=lfp->next )
@@ -1225,11 +1225,11 @@ TblBuild1Format(Element_t * rp,         /* the row to deal with */
                bool addinRowsep,       /* insert rowsep into model? */
                tblsource source)       /* type type of row */
 {
-       register int i;
-       register bool allProp;
+       int i;
+       bool allProp;
        float totalProp;
-       register struct tblformat * tfp;
-       register Element_t * ep;        /* entry pointer */
+       struct tblformat * tfp;
+       Element_t * ep; /* entry pointer */
 
 
        Calloc(1, tfp, struct tblformat);
@@ -1279,9 +1279,9 @@ TblGetAlign(short col,                    /* column number */
            Element_t * entry,          /* the entry */
            tblsource   source)         /* context */
 {
-       register struct tblcolspec * tcsp;
-       register struct tblspanspec * tssp;
-       register tblalign talign;
+       struct tblcolspec * tcsp;
+       struct tblspanspec * tssp;
+       tblalign talign;
 
 
        if ( entry && (tssp = TblEntrySpanSpec(col, entry, source)) )   {
@@ -1316,8 +1316,8 @@ TblGetWidth(short col,                    /* column number */
            bool        literal,        /* literal (or proportional) */
            tblsource   source)         /* context */
 {
-       register struct tblcolspec * tcsp;
-       register struct tblspanspec * tssp;
+       struct tblcolspec * tcsp;
+       struct tblspanspec * tssp;
        static char colWidth[10];
 
 
@@ -1350,8 +1350,8 @@ TblGetFont(short col,                     /* column number */
           Element_t * entry,           /* the entry */
           tblsource source)            /* context */
 {
-       register struct tblcolspec * tcsp;
-       register struct tblspanspec * tssp;
+       struct tblcolspec * tcsp;
+       struct tblspanspec * tssp;
 
 
        return "";
@@ -1367,9 +1367,9 @@ TblGetColSep(short col,                   /* column number */
             Element_t * entry,         /* the entry */
             tblsource  source)         /* context */
 {
-       register struct tblcolspec * tcsp;
-       register struct tblspanspec * tssp;
-       register bool colsep;
+       struct tblcolspec * tcsp;
+       struct tblspanspec * tssp;
+       bool colsep;
 
 
        if ( entry && (tssp = TblEntrySpanSpec(col, entry, source)) )   {
@@ -1395,9 +1395,9 @@ TblGetRowSep(short col,                   /* column number */
             Element_t * entry,         /* the entry */
             tblsource  source)         /* context */
 {
-       register struct tblcolspec * tcsp;
-       register struct tblspanspec * tssp;
-       register bool rowsep;
+       struct tblcolspec * tcsp;
+       struct tblspanspec * tssp;
+       bool rowsep;
 
        if ( entry && (tssp = TblEntrySpanSpec(col, entry, source)) )   {
                rowsep = tssp->rowsep;
@@ -1423,7 +1423,7 @@ TblGetMoreRows(short col,         /* column number */
               Element_t * entry,       /* the entry */
               tblsource        source) /* context */
 {
-       register char * cp;
+       char * cp;
 
 
        if ( cp = FindAttValByName(entry, "MOREROWS") )
@@ -1443,8 +1443,8 @@ TblColAdv(short col,              /* the current column */
          struct tblformat * tfp, /* pointer to prevailing format */
          tblsource source)     /* context */
 {
-       register bool bump;
-       register struct tblspanspec * tssp;
+       bool bump;
+       struct tblspanspec * tssp;
 
 
        bump = TRUE;
@@ -1467,10 +1467,10 @@ TblEntryColSpec(short num,              /* column number */
                Element_t * ep,         /* entry */
                tblsource source)       /* context */
 {
-       register int i;
-       register bool throwAway;
-       register char * cp;
-       register struct tblcolspec * tcsp, * tcsp2;
+       int i;
+       bool throwAway;
+       char * cp;
+       struct tblcolspec * tcsp, * tcsp2;
 
 
        tcsp = tcsp2 = 0;
@@ -1505,8 +1505,8 @@ TblEntrySpanSpec(short num,               /* column number */
                 Element_t * ep,        /* entry */
                 tblsource source)      /* context */
 {
-       register char * cp, * cp2;
-       register struct tblspanspec * tssp, * tssp2;
+       char * cp, * cp2;
+       struct tblspanspec * tssp, * tssp2;
 
 
        tssp2 = 0;
@@ -1537,7 +1537,7 @@ bool
 TblFormatMatch(struct tblformat * tf1, /* one row */
               struct tblformat * tf2)  /* the other */
 {
-       register int i;
+       int i;
 
        if ( tf1->cols != tf2->cols )   {
                return FALSE;
@@ -1577,8 +1577,8 @@ void
 TblPrintFormat(FILE * fP,              /* where to print */
               struct tblformat * tfp)  /* the structure */
 {
-       register int i;
-       register struct tblformat * tfp2, * tfp3;
+       int i;
+       struct tblformat * tfp2, * tfp3;
        static char buf[3] = "\000\000";
 
 
@@ -1645,10 +1645,10 @@ void
 TblTRowEnd(Element_t * ep,
           FILE * fP)
 {
-       register int i, k;
-       register tblsource source;
-       register bool startedRow, didSep;
-       register struct tblformat * rfp;
+       int i, k;
+       tblsource source;
+       bool startedRow, didSep;
+       struct tblformat * rfp;
 
 
        OutputString("^", fP, 1);
@@ -1706,9 +1706,9 @@ void
 TblTCellStart(Element_t * ep,
              FILE * fP)
 {
-       register int i;
-       register Element_t * ep2;
-       register bool sawPIorPara;
+       int i;
+       Element_t * ep2;
+       bool sawPIorPara;
 
 
        for ( i=0, sawPIorPara=FALSE;  i < ep->ncont;  i++ )    {
@@ -1738,8 +1738,8 @@ TblTCellStart(Element_t * ep,
 int
 TblCountContent(Element_t * ep)                /* the element to look under */
 {
-       register int i, count;
-       register char * cp;
+       int i, count;
+       char * cp;
 
 
        count = 0;
@@ -1773,7 +1773,7 @@ void
 TblTCellEnd(Element_t * ep,
            FILE * fP)
 {
-       register Element_t * ep2;
+       Element_t * ep2;
 
 
        if ( tblinBOFT )        {
@@ -1804,8 +1804,8 @@ TblDoColSpec(short number,                /* this column number */
             struct tblcolspec * pcsp,  /* prevailing colspec (with defaults) */
             tblsource source)          /* precedence level of the resulting spec */
 {
-       register char * cp;
-       register struct tblcolspec * tcsp;
+       char * cp;
+       struct tblcolspec * tcsp;
 
 
        Calloc(1, tcsp, struct tblcolspec);
@@ -1836,9 +1836,9 @@ TblDoColSpec(short number,                /* this column number */
                tcsp->aligncharoff = ( pcsp ) ? pcsp->aligncharoff : 0;
 
        if ( cp = FindAttValByName(ep, "COLWIDTH") )
-               strcpy(tcsp->colwidth, cp);
+               snprintf(tcsp->colwidth, sizeof(tcsp->colwidth), "%s", cp);
        else
-               strcpy(tcsp->colwidth, ( pcsp ) ? pcsp->colwidth : "");
+               snprintf(tcsp->colwidth, sizeof(tcsp->colwidth), "%s", ( pcsp ) ? pcsp->colwidth : "");
 
        if ( cp = FindAttValByName(ep, "COLSEP") )
                tcsp->colsep = !strcmp(cp, "1");
@@ -1867,14 +1867,16 @@ TblDoSpanSpec(Element_t * ep,           /* element containing spanspec stuff */
              struct tblspanspec * pssp, /* prevailing spanspec (with defaults) */
              tblsource source)         /* precedence level of the resulting spec */
 {
-       register char * cp;
-       register struct tblspanspec * tssp;
-       register struct tblcolspec * tcsp;
+       char * cp;
+       struct tblspanspec * tssp;
+       struct tblcolspec * tcsp;
 
 
        Calloc(1, tssp, struct tblspanspec);
 
-       if ( cp = FindAttValByName(ep, "SPANNAME") ) strcpy(tssp->name, cp);
+       if ( cp = FindAttValByName(ep, "SPANNAME") ) {
+               snprintf(tssp->name, sizeof(tssp->name), "%s", cp);
+       }
        tssp->source = source;
 
        if ( cp = FindAttValByName(ep, "NAMEST") )      {
@@ -1955,7 +1957,7 @@ struct tblcolspec *
 TblFindColSpec(char * name,            /* the name we're looking for */
               tblsource source)        /* the context in which to find it */
 {
-       register struct tblcolspec * tcsp;
+       struct tblcolspec * tcsp;
 
 
     /* first, try to find the one in the right "source" */
@@ -1987,7 +1989,7 @@ struct tblcolspec *
 TblFindColNum(short number,            /* the number we're looking for */
              tblsource source)         /* the context in which to find it */
 {
-       register struct tblcolspec * tcsp;
+       struct tblcolspec * tcsp;
 
 
 
@@ -2022,7 +2024,7 @@ struct tblspanspec *
 TblFindSpanSpec(char * name,           /* the name we're looking for */
                tblsource source)       /* the context in which to find it */
 {
-       register struct tblspanspec * tssp;
+       struct tblspanspec * tssp;
 
 
     /* first, try to find the one in the right "source" */
index 144a9268fd8f6ba36d510fc7b4e877afec667391..c0bd5530a6663b0ff1b8cdecf33d0108283e7626 100644 (file)
@@ -211,7 +211,7 @@ ExpandVariables(
     Element_t  *e
 )
 {
-    register int i, j, k;
+    int i, j, k;
     char       *ip, *vp, *op;
     char       *def_val, *s, *atval, *modifier;
     char       vbuf[500];
index e6533693c3f94d323fa253dbc9a2eb7324954026..6de25d13be66c7179a3f7e668dda262812c68d8a 100644 (file)
@@ -575,7 +575,7 @@ Get_A_C_value(char * name)
  */
 
 void
-GetIDREFnames()
+GetIDREFnames(void)
 {
     char       *cp;
 
@@ -767,7 +767,7 @@ Find(
     else if (StrEq(av[0], "attr")) {
        DS.gi     = av[2];
        DS.gi2    = av[3];
-       strcpy(DS.action, av[4]);
+       snprintf(DS.action, sizeof(DS.action), "%s", av[4]);
        DescendTree(e, tr_find_attr, 0, 0, &DS);
     }
 }
index 2c923aea8073004604093be3a4a03d44b7106e40..21d36c39cd81ee949215b66b185b8e35c43bd405 100644 (file)
@@ -275,8 +275,8 @@ Widget top;
 {
     Window root;
     Arg        args[10]; /*  arg list          */
-    register int n;    /*  arg count           */
-    register int i;
+    int n;     /*  arg count           */
+    int i;
     DtWsmWorkspaceInfo *pWsInfo;
     char *pchWs;
     Widget left = None;
@@ -350,7 +350,7 @@ Widget top;
 static void ShowWorkspaceOccupancy ()
 {
     Arg        args[10]; /*  arg list          */
-    register int n;    /*  arg count           */
+    int n;     /*  arg count           */
     int i,j;
     Atom *paWsIn = NULL;
     unsigned long numWsIn;
index 5a6724a2d9858a775e5c5659a33453b08f951bf3..47a5a19a171ecadb0f6fb15af27a2d7fe5f55014 100644 (file)
@@ -83,8 +83,8 @@ void main (argc,argv)
     Widget  top;
     XtAppContext app_context;
     Arg        args[10];
-    register int n;
-    register int i;
+    int n;
+    int i;
     XmString xms, xmsBlank;
 
     /*  
@@ -442,7 +442,7 @@ void main (argc,argv)
 static void ShowCurrentWorkspaceInfo ()
 {
     Arg        args[10]; /*  arg list          */
-    register int n;    /*  arg count           */
+    int n;     /*  arg count           */
     Atom aWs;
     int rval;
     Display *dpy;
index 49bcded54d8bc8ce14cafcc9bab3bb8c50517daf..5b2ac47508e9728278ce9f9c7b06d1c386b6d347 100644 (file)
@@ -1396,7 +1396,7 @@ _DtHelpCeTracePathName (char *path)
             * for tacking on after the new link path has been
             * dropped into the path.
             */
-           strcpy (tempPath, ptr);
+           snprintf(tempPath, sizeof(tempPath), "%s", ptr);
 
            /*
             * is it an absolute path? Simply replace the path
@@ -1520,7 +1520,7 @@ _DtHelpCeTraceFilenamePath (char *file_path)
            /*
             * copy the new path and free the allocated copy
             */
-           strcpy (newName, newPath);
+           snprintf(newName, sizeof(newName), "%s", newPath);
            free (newPath);
          }
 
index f9b135e31468d3f6f53cd932f1f28eb57876c4fa..c5f5624b27e4ebbf6dc2f6b854f9f58a41ba52a1 100644 (file)
@@ -908,7 +908,7 @@ _DtHelpCeFindCcdfId (
     char       *topicId = NULL;
     int   found = False;
 
-    strcpy (newTarget, target_id);
+    snprintf(newTarget, sizeof(newTarget), "%s", target_id);
     _DtHelpCeUpperCase(newTarget);
 
     /*
@@ -1275,7 +1275,7 @@ _DtHelpCeMapCcdfTargetToId (
     char        newTarget[128];
     CcdfVolumePtr  ccdfVol = GetCcdfVolumePtr(vol);
 
-    strcpy (newTarget, target_id);
+    snprintf(newTarget, sizeof(newTarget), "%s", target_id);
     _DtHelpCeUpperCase(newTarget);
 
     /*
index bf610ee382db4f275b61419399edce9a8f1cfd63..29bf710b6e5fc9ba25e293637758fe2738ab1efb 100644 (file)
@@ -351,7 +351,7 @@ const char *
 _DtHelpCeResolveSpcToAscii (
     const char *spc_symbol)
 {
-    register int          i = 0;
+    int          i = 0;
 
     if (NULL == spc_symbol)
       return NULL;
index 8a6393fc3a465ef56d0f45e97ec46d5e2efa0698..516278db7306759a6a907f80ca54f7ea458bfd9b 100644 (file)
@@ -45,7 +45,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-char * _DtCliSrvGetDtUserSession()
+char * _DtCliSrvGetDtUserSession(void)
 {
   char * envVar = getenv("DTUSERSESSION");
   char * ret_envVar = NULL;
@@ -107,7 +107,7 @@ char * _DtCliSrvGetDtUserSession()
       {
        char * s = strchr(display,':');
        if (s && strlen(s) < (size_t)BUFSIZ) {
-         strcpy(screen,s+1);
+         snprintf(screen, sizeof(screen), "%s", s + 1);
          *s = 0;
          if ((s = strchr(screen,'.')) && *(s+1) == '0')
            *s = 0;
index 5b522780d96c223d745acf7b946bf993ca12cfc7..727a4b15987f94ba525a5e7ab611a6ac78038f18 100644 (file)
@@ -237,8 +237,7 @@ static int ScanDirForFiles(
     if (pDir == NULL) return 0;                        /* RETURN */
 
     /* build the pathname */
-    strcpy (fullName, dirpath);
-    strcat (fullName, DirSlashStr);
+    snprintf(fullName, sizeof(fullName), "%s%s", dirpath, DirSlashStr);
     ptr = fullName + strlen (fullName);
 
     /*
index 201e28f44bf0eb0bc55445cb8fdeaf8e93ad9106..5846dec2a247382e8f4ef6a87be2f9849ad5fd90 100644 (file)
@@ -179,7 +179,7 @@ _DtHelpFileTraceLinks (
    if ( NULL == *pPathName ) return False;         /* RETURN */
 
    /* init */
-   strcpy(buf[0],*pPathName);
+   snprintf(buf[0], sizeof(buf[0]), "%s", *pPathName);
    linkPath = buf[0];        /* will be assigned to filePath below */
    curBuf = 1;               /* next valid buf */
 
index 9e72c2ac43a7bd944b588b78f9b4f760221d2c65..5b54fedb32a5b9b989e983cf6942a28b4a48c017 100644 (file)
@@ -168,7 +168,7 @@ GetNextState (
     char       **ret_str_ptr,
     Boolean      *ret_flag )
 {
-    register int i = len;
+    int i = len;
 
     /* check to see if we have the pattern of a bold + followed by a bold _
        purpose is to eventually convert this to +/-
index 437cd23b14f54b7a11587b814b89d34494794f34..ea8e3b6d2f0dc7eac4c52a183defe2f3083d0095 100644 (file)
@@ -3297,23 +3297,23 @@ static  int MaxSDLElements = sizeof (SdlElementList) / sizeof (SDLElementInfo);
  *****************************************************************************/
 #define        MyFree(x)       if ((char *)(x) != NULL) free(x)
 #define        SaveRestoreMask(x,y) \
-               { register int myI;\
+               { int myI;\
                  for (myI = 0; myI < SDL_MASK_LEN; myI++) \
                      x[myI] = y[myI]; \
                }
 #define        MergeMasks(x,y) \
-               { register int myI;\
+               { int myI;\
                  for (myI = 0; myI < SDL_MASK_LEN; myI++) \
                      x[myI] |= y[myI]; \
                }
 #define        RemoveMasks(x,y) \
-               { register int myI;\
+               { int myI;\
                  for (myI = 0; myI < SDL_MASK_LEN; myI++) \
                      x[myI] &= (~(y[myI])); \
                }
 #define        MaskToValue(x,y) \
-               { register int myI;\
-                 register SDLMask myMask;\
+               { int myI;\
+                 SDLMask myMask;\
                  for (myI = 0, y = 0; myI < SDL_MASK_LEN; myI++) \
                      if (x[myI] == 0) \
                          y += SDL_MASK_SIZE; \
@@ -3475,7 +3475,7 @@ FreeAttributes(
     ElementInfo                *cur_info,
     _DtHelpFontHints   *font_specs)
 {
-    register int i = 0;
+    int i = 0;
     const SDLElementAttrList *myList;
     const SDLAttribute *attrib;
     char               *varOffset;
index 7769f80f506b115c05c6f25da06bc1dd1d283e7f..914fe8236d39c7837c8d3ac555d24370f66df6ae 100644 (file)
@@ -317,7 +317,7 @@ TermStrDraw (
        pTerm->lines[y] = (wchar_t *) malloc (sizeof(wchar_t) * (length + 1));
        if (pTerm->lines[y] != NULL)
          {
-           register int i;
+           int i;
 
            wcStr = pTerm->lines[y];
            _DtHelpProcessLock();
@@ -340,7 +340,7 @@ TermStrDraw (
                                        (sizeof(wchar_t) * (length + 1)));
            if (pTerm->lines[y] != NULL)
              {
-               register int i;
+               int i;
                wcStr = pTerm->lines[y];
                _DtHelpProcessLock();
                for (i = pTerm->wc_num[y]; i < x; i++)
@@ -669,7 +669,7 @@ static      void
 DeallocateHyperArray(
        DtHelpHyperLines        *array_ptr )
 {
-    register DtHelpHyperLines *next = array_ptr;
+    DtHelpHyperLines *next = array_ptr;
 
     if (array_ptr)
       {
index 359cbab6ea2e7e630bfb73d124a7836e85998bbc..003928fe46c9d20578e31dc1dba85cca0e3749c7 100644 (file)
@@ -360,7 +360,7 @@ static int
 LWZReadByte(byte **inbuf, int flag, int input_code_size, GifState *g)
 {
     int        code, incode;
-    register int    i;
+    int    i;
 
     if (flag) {
         g->set_code_size = input_code_size;
index 02ee92cd6d5607298908d36019dfc09b01ad7b86..ef572f4949be334bb7f033534209d1daeab7a269 100644 (file)
@@ -549,7 +549,7 @@ static void AdjustPositionValues(
             NULL != fileList;
             fileList = _DtHelpFileListGetNext(NULL,fileList) )
       {
-         register _DtHelpGlobSrchVol * vol=(_DtHelpGlobSrchVol *)fileList->clientData;
+         _DtHelpGlobSrchVol * vol=(_DtHelpGlobSrchVol *)fileList->clientData;
          if (vol->showVolInList && (vol->hitCnt > 0 || vol->zeroHitsOk) )
             break;                                   /* BREAK */
          vol->nextVolPosition += adjNextAmount;
@@ -564,7 +564,7 @@ static void AdjustPositionValues(
          NULL != fileList;
          fileList = _DtHelpFileListGetNext(NULL,fileList) )
    {
-      register _DtHelpGlobSrchVol * vol = (_DtHelpGlobSrchVol *) fileList->clientData;
+      _DtHelpGlobSrchVol * vol = (_DtHelpGlobSrchVol *) fileList->clientData;
       if (vol)
       {
          vol->startPosition += adjStartAmount;
@@ -888,7 +888,7 @@ static void HitListFree(
         _DtHelpGlobSrchVol * vol,
         Boolean           freeHitsThemselves)
 {
-   register _DtHelpGlobSrchHit * hit;
+   _DtHelpGlobSrchHit * hit;
 
    if (NULL == vol) return;                          /* RETURN */
 
@@ -1129,7 +1129,7 @@ static int HitListAddFound (
            NULL != next; 
            prev = next, next = next->next )
       {
-        register int ret;
+        int ret;
 
         /* do a NLS case insensitive compare using NLS collating */
         if ( (ret = (*strcollfn)(next->indexEntry,indexEntry)) >= 0 )
@@ -1209,7 +1209,7 @@ static int CountSelectedVolumes (
         NULL != volListHead;
         volListHead = _DtHelpFileListGetNext(NULL, volListHead) )
   {
-    register _DtHelpGlobSrchVol * vol;
+    _DtHelpGlobSrchVol * vol;
 
     /* get the volume info */
     vol = (_DtHelpGlobSrchVol *) volListHead->clientData;
@@ -1244,7 +1244,7 @@ static _DtHelpFileEntry GetNextSearchFileAndDisplayCompleted(
           NULL != curFile;
           curFile = _DtHelpFileListGetNext(NULL, curFile) )
     {
-       register _DtHelpGlobSrchVol * vol;
+       _DtHelpGlobSrchVol * vol;
 
        vol = (_DtHelpGlobSrchVol *) curFile->clientData;
        if (NULL == vol) continue;                  /* CONTINUE */
@@ -2187,7 +2187,7 @@ static void DeleteListContents(
          NULL != curFile;
          curFile = _DtHelpFileListGetNext(NULL,curFile) )
    {
-      register _DtHelpGlobSrchVol * vol = (_DtHelpGlobSrchVol *) curFile->clientData;
+      _DtHelpGlobSrchVol * vol = (_DtHelpGlobSrchVol *) curFile->clientData;
       if (NULL == vol) continue;                      /* CONTINUE */
 
       /* if any hits are displayed and any have open topics, 
@@ -2195,7 +2195,7 @@ static void DeleteListContents(
       if (    vol->hitsDisplayed 
            && ((vol->nextVolPosition - vol->startPosition) != vol->hitCnt) )
       {
-         register _DtHelpGlobSrchHit * hit;
+         _DtHelpGlobSrchHit * hit;
          for ( hit = vol->hitListHead;
                NULL != hit;
                hit = hit->next)
@@ -2375,7 +2375,7 @@ static void ResultsListUpdate(
          NULL != testFile;
          testFile = _DtHelpFileListGetNext(NULL,testFile) )
    {
-      register _DtHelpGlobSrchVol * vol;
+      _DtHelpGlobSrchVol * vol;
       vol = (_DtHelpGlobSrchVol *)testFile->clientData;
       if (vol && vol->showVolInList && (vol->hitCnt > 0  || vol->zeroHitsOk))
          break;                                            /* BREAK */
@@ -2923,7 +2923,7 @@ static void SearchFile(
    DtHelpDialogWidget      hw,
    _DtHelpFileEntry        file)
 {
-   register _DtHelpGlobSrchVol * vol;
+   _DtHelpGlobSrchVol * vol;
 
    /* get volume info, adding if necessary */
    vol = (_DtHelpGlobSrchVol *) file->clientData;
@@ -3213,7 +3213,7 @@ static void StartSelectedVolumeSearchCB(
           NULL != file;
           file = _DtHelpFileListGetNext(NULL,file) )
     {
-       register _DtHelpGlobSrchVol * vol;
+       _DtHelpGlobSrchVol * vol;
        vol = (_DtHelpGlobSrchVol *) file->clientData;
        if (NULL == vol) continue;
 
index 0a54056725314cc6b37b2b603cc391f7b75693a6..62251681d33494898a7ba49d017e7751baeb407a 100644 (file)
@@ -322,11 +322,11 @@ static enum _DtGrLoadStatus processXwd(
                                int                   *ret_num_colors,
                                _DtGrContext          *context);
 static void            _swaplong (
-                               register char *bp,
-                               register unsigned n );
+                               char *bp,
+                               unsigned n );
 static void            _swapshort (
-                               register char *bp,
-                               register unsigned n );
+                               char *bp,
+                               unsigned n );
 static int             XwdFileToPixmap (
                                Display  *dpy,
                                int       screen,
@@ -471,11 +471,11 @@ static int new_registry_count = 0;
 
 static void
 _swapshort (
-    register char *bp,
-    register unsigned n )
+    char *bp,
+    unsigned n )
 {
-    register char c;
-    register char *ep = bp + n;
+    char c;
+    char *ep = bp + n;
 
     while (bp < ep) {
        c = *bp;
@@ -487,12 +487,12 @@ _swapshort (
 
 static void
 _swaplong (
-    register char *bp,
-    register unsigned n )
+    char *bp,
+    unsigned n )
 {
-    register char c;
-    register char *ep = bp + n;
-    register char *sp;
+    char c;
+    char *ep = bp + n;
+    char *sp;
 
     while (bp < ep) {
        sp = bp + 3;
@@ -823,8 +823,8 @@ Do_Pseudo(
     unsigned long **ret_colors,
     int  *ret_number )
 {
-    register int i, x, y, colorCount = 0;
-    register XColor *color;
+    int i, x, y, colorCount = 0;
+    XColor *color;
     int      result = 0;
     Pixel    pixel;
 
@@ -921,7 +921,7 @@ Do_Direct(
     unsigned long **ret_colors,
     int  *ret_number )
 {
-    register int x, y;
+    int x, y;
     XColor color;
     unsigned long rmask, gmask, bmask;
     int   rshift = 0, gshift = 0, bshift = 0;
@@ -1092,9 +1092,9 @@ XwdFileToPixmap (
     int      *ret_number )
 {
     int result;
-    register int i;
+    int i;
     XImage in_image, *out_image;
-    register char *buffer;
+    char *buffer;
     unsigned long swaptest = 1;
     int count;
     unsigned buffer_size;
index 52492b61e862fcf82665d95920945d1202549e21..3fdc57dd28b1e09ecad6660276d4430fe408be58 100644 (file)
@@ -1082,9 +1082,9 @@ static void MenuBarFix(
     XmGeoMajorLayout layoutPtr,
     XmKidGeometry rowPtr )
 {
-    register Dimension       marginW ;
-    register Dimension       marginH ;
-    register Dimension       twoMarginW ;
+    Dimension       marginW ;
+    Dimension       marginH ;
+    Dimension       twoMarginW ;
 
 
     marginW = geoSpec->margin_w ;
@@ -1146,8 +1146,8 @@ XmGeoMatrix _DtHelpDialogWidgetGeoMatrixCreate(
 
              DtHelpDialogWidget hw = (DtHelpDialogWidget) wid ;
              XmGeoMatrix     geoSpec ;
-    register XmGeoRowLayout  layoutPtr ;
-    register XmKidGeometry   boxPtr ;
+    XmGeoRowLayout  layoutPtr ;
+    XmKidGeometry   boxPtr ;
 
     geoSpec = _XmGeoMatrixAlloc( TB_MAX_WIDGETS_VERT, TB_MAX_NUM_WIDGETS, 0) ;
     geoSpec->composite = (Widget) hw ;
index 636a9fcae99daa61dfd2f1b7ca2a4fb734307703..db25991f2890ea8d34413a02af22bbc88fea0e6f 100644 (file)
@@ -1164,9 +1164,9 @@ static void MenuBarFix(
 #endif
     XmKidGeometry rowPtr )
 {
-    register Dimension       marginW ;
-    register Dimension       marginH ;
-    register Dimension       twoMarginW ;
+    Dimension       marginW ;
+    Dimension       marginH ;
+    Dimension       twoMarginW ;
 
 
     marginW = geoSpec->margin_w ;
@@ -1231,8 +1231,8 @@ SeparatorFix(
         XmGeoMajorLayout layoutPtr, /* unused */
         XmKidGeometry rowPtr )
 {
-    register Dimension       marginW ;
-    register Dimension       twoMarginW ;
+    Dimension       marginW ;
+    Dimension       twoMarginW ;
 
     marginW = geoSpec->margin_w ;
     twoMarginW = (marginW << 1) ;
@@ -1289,8 +1289,8 @@ XmGeoMatrix _DtHelpQuickDialogWidgetGeoMatrixCreate(
 
              DtHelpQuickDialogWidget qw = (DtHelpQuickDialogWidget) wid ;
              XmGeoMatrix     geoSpec ;
-    register XmGeoRowLayout  layoutPtr ;
-    register XmKidGeometry   boxPtr ;
+    XmGeoRowLayout  layoutPtr ;
+    XmKidGeometry   boxPtr ;
              XmKidGeometry   firstButtonBox ;
 #ifdef NOTDONE
              int fix_menubar = False ;
index 91b11ca376ccdfdad92563ae56196abaa4d5dcee..d88c7a02b10af1f4ae507cb3055b3d1856f5b79e 100644 (file)
@@ -390,7 +390,7 @@ char *_DtHelpGetMessage(
  *                 If that is NULL, returns NULL.
  *
  *****************************************************************************/
-char *_DtHelpGetLocale()
+char *_DtHelpGetLocale(void)
 {
     char *loc;
 
index a80d1cf8fc410bf402498a0712ae4d43c08b0c43..2cf357a9410c5fc382464039a39b978de4755f37 100644 (file)
@@ -350,9 +350,9 @@ static void copy_pixels(
     djpeg_dest_ptr   dinfo,
     JDIMENSION       rows_supplied)
 {
-    register int pixval;
-    register JSAMPROW ptr;
-    register JDIMENSION col;
+    int pixval;
+    JSAMPROW ptr;
+    JDIMENSION col;
     ximg_dest_ptr dest = (ximg_dest_ptr) dinfo;
 
     ptr = dest->pub.buffer[0];
index 1f570d34ba12de67179dd58efb7f1cfe15aa9672..8d262619a0f119cc991398f5b72f2c9704f75944 100644 (file)
@@ -1680,7 +1680,7 @@ ResolveCell(
     int                         max_rows,
     CellInfo           *ret_info)
 {
-    register int i;
+    int i;
     char  *id;
     char  *idRefs;
     char  *ptr;
@@ -1909,7 +1909,7 @@ ResolveCell(
      */
     if (retWidth > cellWidth)
       {
-       register int j;
+       int j;
        _DtCvUnit  cellMax;
        _DtCvUnit  maxSlop;
        _DtCvUnit  value;
@@ -2826,7 +2826,7 @@ DetermineMaxDims(
     _DtCvUnit  *bot_height,
     _DtCvUnit  *max_width)
 {
-    register int       j;
+    int        j;
     _DtCvUnit     topWidth;
     _DtCvUnit     botWidth;
 
index c5d14a21b28ebf608250e77cebbe99943ad404ec..5ca6227909f45c5e58b9dee478f5db4e9df3a63a 100644 (file)
@@ -87,7 +87,7 @@ _DtHelpResizeDisplayArea (
        int                      columns )
 {
     int            count = 0;
-    register int   n;
+    int   n;
     unsigned long  char_width;
     Arg          args[5];
     Dimension    newWidth;
index bbb6419930bd02215dd4c3330375258a4aea1444..8d12e43250f20f5e8e4f20d7aa572faa3a6b6c25 100644 (file)
@@ -487,9 +487,9 @@ _DtHelpCeUpperCase ( char *string )
 int _DtHelpCeStrHashToKey(
         const char * str)
 {
-    register char c;
-    register const char * tstr;
-    register int key = 0;
+    char c;
+    const char * tstr;
+    int key = 0;
 
     if (!str) return 0;                  /* RETURN */
 
index aff1a2b9950ae1627f90b1cbac674be90a42a54a..c6dc351d057bf38e8a63222cd11f992502b0000b 100644 (file)
@@ -1820,7 +1820,7 @@ _DtHelpDAResolveSpc (
     _DtCvUnit          *ret_height,
     _DtCvUnit          *ret_ascent)
 {
-    register int          i = 0;
+    int          i = 0;
     int                          result = -1;
     long                 fontIdx;
     long                 spcTbIdx = 0;
index 1a30ad3ffa37ff49e6b7051ccc73ef36a3995021..2052dfb800a20856d4e858c19b62bcea5c0dd8a0 100644 (file)
@@ -93,7 +93,7 @@ static short hexTable[256];           /* conversion value */
  *     Table index for the hex values. Initialized once, first time.
  *     Used for translation value or delimiter significance lookup.
  */
-static void initHexTable()
+static void initHexTable(void)
 {
     /*
      * We build the table at run time for several reasons:
@@ -124,8 +124,7 @@ static void initHexTable()
 /*
  *     read next hex value in the input stream, return -1 if EOF
  */
-static int NextInt (fstream)
-    _DtGrStream *fstream;
+static int NextInt (_DtGrStream *fstream)
 {
     int        ch;
     int        value = 0;
index ff7ae347edd995b0168eee2fd722b8cabeea054b..0f08b00cd161551b186ff717fcc8c2dbc603961c 100644 (file)
@@ -191,9 +191,9 @@ static int
 BufCompressedFill (BufFilePtr f)
 {
     CompressedFile  *file;
-    register char_type *stackp, *de_stack;
-    register char_type finchar;
-    register code_int code, oldcode, incode;
+    char_type *stackp, *de_stack;
+    char_type finchar;
+    code_int code, oldcode, incode;
     BufChar        *buf, *bufend;
 
     file = (CompressedFile *) f->hidden;
@@ -286,10 +286,10 @@ static char_type rmask[9] = {0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xf
 static code_int
 getcode(CompressedFile  *file)
 {
-    register code_int code;
-    register int r_off, bits;
-    register char_type *bp = file->buf;
-    register BufFilePtr        raw;
+    code_int code;
+    int r_off, bits;
+    char_type *bp = file->buf;
+    BufFilePtr raw;
 
     if ( file->clear_flg > 0 || file->offset >= file->size ||
        file->free_ent > file->maxcode )
index 3121653f33aab354639123e6a5758d1db713d254..367ed3af47a280f67433dcf9178c98348cc266c8 100644 (file)
@@ -124,7 +124,7 @@ typedef ilError   (*executeFunctionType)();
            IL_FREE_XCOLORS/XGRAYS, or ~0 for everything.
         */
 static void ilFreeColorData (
-    register ilXWCPtr   pXWC,
+    ilXWCPtr   pXWC,
     unsigned long       freeMask
     )
 {
@@ -184,7 +184,7 @@ static void ilDestroyXWC (
     )
 {
 ilObject object = (ilObject)pPrivate;
-register ilXWCPtr       pXWC;
+ilXWCPtr       pXWC;
 
     pXWC = (ilXWCPtr)object;
 
@@ -206,7 +206,7 @@ static int ilGammaCorrect (
     int                 maxValue
     )
 {
-register int            allocValue;
+int            allocValue;
 
     if (value == 0) 
         allocValue = 0;
@@ -233,7 +233,7 @@ register int            allocValue;
         */
 static ilBool ilAllocateXDitherColors (
     ilContext               context,
-    register ilXWCPtr       pXWC
+    ilXWCPtr       pXWC
     )
 {
 
@@ -306,7 +306,7 @@ ilImageInfo     imageInfo, *pImageInfo;
     */
 static ilBool ilAllocateXGrays (
     ilContext               context,
-    register ilXWCPtr       pXWC,
+    ilXWCPtr       pXWC,
     int                     nGrays
     )
 {
@@ -392,7 +392,7 @@ double          spreadFactor;
        levels not alloc'd.
     */
 static ilBool ilAllocateXDirectColors (
-    register ilXWCPtr       pXWC,
+    ilXWCPtr       pXWC,
     int                     nLevels
     )
 {
@@ -476,8 +476,8 @@ ilBool ilChangeXWC (
     void                   *pData
     )
 {
-register ilXWCPtr           pXWC;
-register ilContext          context;
+ilXWCPtr           pXWC;
+ilContext          context;
 
     pXWC = (ilXWCPtr)XWC;
     context = pXWC->o.p.context;
@@ -576,7 +576,7 @@ ilBool ilQueryXWC (
     ilXWCInfo              *pInfo
     )
 {
-register ilXWCPtr           pXWC;
+ilXWCPtr           pXWC;
 
     pXWC = (ilXWCPtr)XWC;
     if (pXWC->o.p.objectType != IL_XWC) {
@@ -605,7 +605,7 @@ ilXWC ilCreateXWC (
     unsigned long           mustBeZero2
     )
 {
-register ilXWCPtr       pXWC;
+ilXWCPtr       pXWC;
 XVisualInfo             template, *pVisualInfo;
 int                     notUsed;
 
@@ -772,9 +772,9 @@ static ilError ilWriteXInit (
     ilImageInfo            *pDstImage                   /* ignored */
     )
 {
-register ilXPrivPtr pPriv = (ilXPrivPtr)pPrivate;
-register ilXWCPtr           pXWC;
-register XImage            *pXImage;
+ilXPrivPtr pPriv = (ilXPrivPtr)pPrivate;
+ilXWCPtr           pXWC;
+XImage            *pXImage;
 
         /*  Create a temp buffer for image pixels if requested. */
     if (pPriv->bufferSize > 0) {
@@ -826,7 +826,7 @@ static ilError ilWriteXCleanup (
            XDestroyImage() will try to free the pixels; destroy the image, 
            created by Init().
         */
-    register ilXPrivPtr pPriv = (ilXPrivPtr)pPrivate;
+    ilXPrivPtr pPriv = (ilXPrivPtr)pPrivate;
     if (!aborting)
         XFlush (pPriv->pXWC->i.display);
     if (pPriv->pBuffer)
@@ -844,14 +844,14 @@ static ilError ilWriteXCleanup (
            written *pNLines below this one in the drawable.
         */
 static ilError ilWriteXExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                     dstLine,
     long                    *pNLines,
     float                    ratio
 )
 {
-register ilXPrivPtr         pPriv;
-register XImage            *pXImage;
+ilXPrivPtr         pPriv;
+XImage            *pXImage;
 ilXWCPtr                    pXWC;
 unsigned int                nSrcLines;
 unsigned int                scaledWidth,scaledHeight;
@@ -894,7 +894,7 @@ int                         scaledX, scaledY;
            XPutImage(), then bump linesDone.
         */
 static ilError ilWriteXOptLongExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                     dstLine,
     long                    *pNLines,
     float                    ratio
@@ -906,9 +906,9 @@ XImage                     *pXImage;
 ilXWCPtr                    pXWC;
 ilPtr                       pSrcLine;
 long                        srcRowBytes, width, nSrcLines, nLinesM1;
-register long               nLongsM1;
-register ilPtr              pSrc;
-register CARD32            *pDst, temp;
+long               nLongsM1;
+ilPtr              pSrc;
+CARD32            *pDst, temp;
 unsigned int                scaledWidth,scaledHeight;
 int scaledX, scaledY ;
 
@@ -983,7 +983,7 @@ ilPipeInfo                  info;
 ilImageDes                  des;
 ilImageFormat               format;
 unsigned int                writeType;
-register ilXWCPtr           pXWC;
+ilXWCPtr           pXWC;
 
     /*  Table indexed by [dst visual type], yielding writeType when in raw 
        mode */
@@ -1218,14 +1218,14 @@ ilBool ilWriteXDrawable (
     )
 {
 ilPipeInfo                  info;
-register ilXWCPtr           pXWC;
-register ilXPrivPtr         pPriv;
+ilXWCPtr           pXWC;
+ilXPrivPtr         pPriv;
 ilSrcElementData           *pSrcData, srcData;
 unsigned long               bufferSize;
 /*
 ** We need to use the execute fucntion with the ratio parameter.
 */
-ilError                   (*executeFunction)( register ilExecuteData *,
+ilError                   (*executeFunction)( ilExecuteData *,
                                              long,
                                              long *,
                                              float);
index 31070076515c597b6da4b66bcf7126c324d3bbfc..e74aac864660b67a61d98c269ac9bcbe7b3596c2 100644 (file)
@@ -74,9 +74,9 @@ ilImagePlaneInfo           *pPlane;
 long                        nLinesDiv2, halfWidth;
 long                        CbRowBytes, CrRowBytes;
 ilPtr                       pYLine, pCbLine, pCrLine, pDstLine;
-register unsigned long     *pTable;
-register long               YRowBytes, dstRowBytes, nPixelsDiv2, CbCr, temp0, temp1;
-register ilPtr              pY, pCb, pCr, pDst;
+unsigned long     *pTable;
+long               YRowBytes, dstRowBytes, nPixelsDiv2, CbCr, temp0, temp1;
+ilPtr              pY, pCb, pCr, pDst;
 
         /*  This filter handles a pipe image of YCbCr subsampled by 2 in Cb/Cr only.
             The # of lines of Cb/Cr is therefore 1/2 the # of lines of Y.
@@ -161,11 +161,11 @@ ilImagePlaneInfo           *pPlane;
 long                        nLinesDiv2, halfWidth;
 long                        CbRowBytes, CrRowBytes, dstRowBytes;
 ilPtr                       pYLine, pCbLine, pCrLine;
-register unsigned long     *pTable;
-register long               YRowBytes, nPixelsDiv2, CbCr, temp0, temp1;
-register long               dstRowShorts, dstRowShortsTimes2, dstRowShortsTimes3;
-register ilPtr              pY, pCb, pCr;
-register unsigned short    *pDst;
+unsigned long     *pTable;
+long               YRowBytes, nPixelsDiv2, CbCr, temp0, temp1;
+long               dstRowShorts, dstRowShortsTimes2, dstRowShortsTimes3;
+ilPtr              pY, pCb, pCr;
+unsigned short    *pDst;
 unsigned short             *pDstLine;
 
         /*  This filter handles a pipe image of YCbCr subsampled by 2 in Cb/Cr only.
@@ -257,7 +257,7 @@ unsigned short             *pDstLine;
     /*  Setup *pTable as necessary for the YCbCr to RGB (dither) conversion.
     */
 static void ilSetupYCbCrDitherTables (
-    register ilYCbCrInfo   *pYCbCr,
+    ilYCbCrInfo   *pYCbCr,
     int                     nBitsR,
     int                     nBitsG,
     int                     nBitsB,
@@ -267,7 +267,7 @@ static void ilSetupYCbCrDitherTables (
 {
 int                         nTableEntries, nLevelsY, nLevelsCbCr;
 int                         Y, Cb, Cr, refY, refCb, refCr;
-register int                R, G, B, pixel, i, temp, kernel;
+int                R, G, B, pixel, i, temp, kernel;
 double                      Lr, Lg, Lb;
 double                      ditherR, ditherG, ditherB, ditherY, ditherCbCr;
 
index 956a382dcab4b8f747194fb2e3d346e25e1c6012..56571b51d6532feb413119dab24b817fca651ff0 100644 (file)
@@ -47,7 +47,7 @@
 #include "ilerrors.h"
 
 #ifdef LSB_BIT_ORDER
-extern void flip_bits(register ilPtr start, register unsigned n);
+extern void flip_bits(ilPtr start, unsigned n);
 #else
 # define flip_bits(s,n)          /*EMPTY*/
 #endif
@@ -227,10 +227,10 @@ static ilError ilBiGrayExecute (
 long                        nLines, nLinesWritten;
 ilPtr                       pSrcLine, pDstLine;
 long                        colAcc, nDstBits, dstWidth, bottomLine, line;
-register long               srcBytesAbove, srcBytesBelow;
-register ilBiGrayPrivPtr    pPriv;
-register CARD32             index, *pSrc;
-register int                shift, bitNumber;
+long               srcBytesAbove, srcBytesBelow;
+ilBiGrayPrivPtr    pPriv;
+CARD32             index, *pSrc;
+int                shift, bitNumber;
 
         /*  Point pSrcLine to srcLine: = middle line of 3x3 matrix.
             Set bottomLine to last available line in the buffer.
@@ -434,7 +434,7 @@ IL_PRIVATE void _ilScaleBitonalToGray (
     ilPipeInfo         *pInfo
     )
 {
-register ilBiGrayPrivPtr pPriv;
+ilBiGrayPrivPtr pPriv;
 ilDstElementData        dstData;
 ilImageDes              des;
 
@@ -511,7 +511,7 @@ IL_PRIVATE void _ilAreaScaleBitonal (
     ilPipeInfo         *pInfo
     )
 {
-register ilBiGrayPrivPtr pPriv;
+ilBiGrayPrivPtr pPriv;
 ilDstElementData        dstData;
 #define                 DEFAULT_GRAY_THRESHOLD  128     /* assumes 256 levels */
 
index 52e69f2d3d2bc3242f584b1018e4875e4268dae2..4bdfedfa52736745565317c99a349d1f43ee78c3 100644 (file)
@@ -57,7 +57,7 @@ IL_PRIVATE ilBool _ilReallocCompressedBuffer (
     unsigned long       minNewSize
     )
 {
-register ilImagePlaneInfo *pPlane;
+ilImagePlaneInfo *pPlane;
 
     pPlane = &pImage->plane[plane];
     pPlane->bufferSize = minNewSize + 10000;  /* A GUESS - DO SOMETHING SMARTER !!!!! */
@@ -77,12 +77,12 @@ register ilImagePlaneInfo *pPlane;
         Copies one strip of compressed data.
     */
 static ilError ilCopyCompressedExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                    dstLine,
     long                   *pNLines
     )
 {
-    register ilImagePlaneInfo *pSrcPlane, *pDstPlane;
+    ilImagePlaneInfo *pSrcPlane, *pDstPlane;
     long                    nBytes, dstOffset, requiredBufferSize;
 
     nBytes = pData->compressed.nBytesToRead;        /* # of bytes to write */
index 0fee6aea38c1b10515bc85464877d88b9d8d859b..08d1bff574908069957d5b8d646f733e402955c2 100644 (file)
@@ -390,10 +390,10 @@ int nTimes)
 {
        int rel_diff, abs_diff;
 
-       register unsigned char *bp;
-       register int ini_diff;
-       register int n, fin_diff;
-       register unsigned char *table ;
+       unsigned char *bp;
+       int ini_diff;
+       int n, fin_diff;
+       unsigned char *table ;
 
        bp = sByte;
 
@@ -471,10 +471,10 @@ done:
    ======================================================================== */
 
 static ilBool _ilCompressG3G4ReallocBuffer (
-register ilCompressG3G4PrivPtr  pPriv
+ilCompressG3G4PrivPtr  pPriv
 )
 {
-       register unsigned long  offset;
+       unsigned long  offset;
 
        offset = pPriv->pDstByte - pPriv->pDstImage->plane[0].pPixels;
        if (!_ilReallocCompressedBuffer (pPriv->pDstImage, 0, offset + G3_G4_MAX_BUFFER_WRITE))
@@ -502,18 +502,18 @@ register ilCompressG3G4PrivPtr  pPriv
    ======================================================================== */
 static ilError
 _ilPutData ( 
-register  ilCompressG3G4PrivPtr pPriv)
+ ilCompressG3G4PrivPtr pPriv)
 
 {
 
    /* use local variables here, copy the values from pPriv to local & copy them
       back at the end of the function; this is expected to be faster                */
 
-   register unsigned int         bitCount;       /* # of bits waiting to be output  */
+   unsigned int         bitCount;       /* # of bits waiting to be output  */
 /* compatibility problem with long and unsigned long data fields */
-   register CARD32               bits;           /* bits waiting to be output       */
-   register ilPtr                pDstByte;       /* ptr to spot for next byte in output buffer */
-   register ilBool               Is_Lsb_First;
+   CARD32               bits;           /* bits waiting to be output       */
+   ilPtr                pDstByte;       /* ptr to spot for next byte in output buffer */
+   ilBool               Is_Lsb_First;
 
        /*  Output 3 bytes; check for room in buffer; realloc if not room.
             */
@@ -624,7 +624,7 @@ register  ilCompressG3G4PrivPtr pPriv)
    ======================================================================== */
 static ilError
 _ilGetNdPutNewBits( 
-register  ilCompressG3G4PrivPtr pPriv,
+ ilCompressG3G4PrivPtr pPriv,
 int count,
 ilBool pixelValue
 )
@@ -762,23 +762,23 @@ ilImageInfo            *pDstImage
    ======================================================================== */
 static ilError
 _ilCompressG3Line( 
-register  ilCompressG3G4PrivPtr pPriv,
-register  ilPtr                 pSrc
+ ilCompressG3G4PrivPtr pPriv,
+ ilPtr                 pSrc
 )
 {
-    register int        a0, b2;             /* changing elements pertaining to the pSrcLine   */
-    register ilBool     pixelValue;         /* value of the pixel 0 or 1                      */
+    int        a0, b2;             /* changing elements pertaining to the pSrcLine   */
+    ilBool     pixelValue;         /* value of the pixel 0 or 1                      */
     ilError             error;
-    register long       width;              /* width of the image */
-    register ilBool     white;              /* value of the white pixel */
+    long       width;              /* width of the image */
+    ilBool     white;              /* value of the white pixel */
 #ifndef NOINLINEG3
-       register int ini_diff;
-       register int n, fin_diff;
-       register unsigned char *table ;
-    register ilBool termFlag ;
-    register int    index;
-    register int    tnumBits ;
-    register int    count;
+       int ini_diff;
+       int n, fin_diff;
+       unsigned char *table ;
+    ilBool termFlag ;
+    int    index;
+    int    tnumBits ;
+    int    count;
     CARD32          tnewBits;
 #endif
 
@@ -1345,7 +1345,7 @@ ilImageInfo            *pDstImage
    ======================================================================== */
 ilError
 _ilCompressG4Line( 
-register  ilCompressG3G4PrivPtr pPriv,
+ ilCompressG3G4PrivPtr pPriv,
 ilPtr pSrcLine,
 ilPtr pRefLine
 )
index a545537bd2eb942351acfc4fd64fcc40b9490adb..0c042f364d8584493c7137360e375c3288758483 100644 (file)
@@ -113,10 +113,10 @@ static ilError ilCompLZWCleanup (
         /*  Reallocate the output (compressed) buffer and reset pPriv->pDst(BufferEnd).
         */
 static ilBool ilLZWReallocBuffer (
-    register ilCompLZWPrivPtr pPriv
+    ilCompLZWPrivPtr pPriv
     )
 {
-    register unsigned long  offset;
+    unsigned long  offset;
 
     offset = pPriv->pDst - pPriv->pDstImage->plane[0].pPixels;
     if (!_ilReallocCompressedBuffer (pPriv->pDstImage, 0, offset + LZW_MAX_BUFFER_WRITE))
@@ -149,10 +149,10 @@ static void NewEnnode (
             Initializes the encode table with the first 256 strings (i.e. 0-ff).
         */
 static void ilInitEncodeTable (
-    register ilCompLZWPrivPtr pPriv
+    ilCompLZWPrivPtr pPriv
     )
 {
-    register int        i;
+    int        i;
 
     for (i = 0; i < 256; i++) {
         pPriv->ennodes[i].value = i;
@@ -185,11 +185,11 @@ static ilBool ilStringInTable (
     ilCompLZWPrivPtr        pPriv,
     ilPtr                   string,
     unsigned int            count,
-    register unsigned int  *pCurrentNode
+    unsigned int  *pCurrentNode
     )
 {
-    register unsigned int   byte; /* current character in string */
-    register ilEnnodePtr    ennodes;
+    unsigned int   byte; /* current character in string */
+    ilEnnodePtr    ennodes;
 
     ennodes = pPriv->ennodes;
     byte = string[count-1];
@@ -243,7 +243,7 @@ static ilBool ilStringInTable (
             If the bit stream is longer than 16 bits, two bytes will be written.
         */
 static ilError ilWriteCode (
-    register ilCompLZWPrivPtr pPriv,
+    ilCompLZWPrivPtr pPriv,
     unsigned int        code
     )
 {
@@ -283,7 +283,7 @@ static ilError ilCompLZWExecute (
     unsigned long  *pNLines
     )
 {
-    register ilCompLZWPrivPtr pPriv;
+    ilCompLZWPrivPtr pPriv;
     ilPtr                   pSrcLine, pSrc;
     ilByte                  srcByte;
     long                    nLines, srcRowBytes, nSrcBytes;
index 390b1373e1500e5ec49f7e46003bc87efa1f267f..d14d8f4cdcff926370e091e2fcd25abd5116d09a 100644 (file)
@@ -95,9 +95,9 @@ static ilError ilComppackbitsExecute(
 
     unsigned long       nBytes     = 0;         /* Number of source image bytes to unpack for current strip      */  
     unsigned long       nLines;                 /* Number of lines per source image strip                        */  
-    register ilPtr      pSrcByte;               /* Pointer to source image data first byte                       */  
+    ilPtr      pSrcByte;               /* Pointer to source image data first byte                       */
     ilPtr               pSrcLine;               /* Pointer to source image data first byte of line               */  
-    register ilPtr      pDstByte;               /* Pointer to destination image data                             */  
+    ilPtr      pDstByte;               /* Pointer to destination image data                             */
     ilPtr               pDstBufferEnd;          /* Ptr to byte "PB_MAX_BUFFER_WRITE" from end of compressed buffer  */
     unsigned long       srcNBytes;              /* Number of source image bytes per row                          */  
     ilCompPBPrivPtr       pPriv;                  /* Pointer to private image data                                 */  
@@ -106,9 +106,9 @@ static ilError ilComppackbitsExecute(
     long                    offset;                 /* difference between current dst image address pointer and the
                                                    start address of the dst image buffer                         */
     long                    length;                 /* number of bytes written to dst image                      */
-    register int            count;                     /* run count value                   */
-    register int            start, j;               /* indices into source data          */
-    register int            nBytesM1;               /* bytes per row of data minus one   */
+    int            count;                      /* run count value                   */
+    int            start, j;               /* indices into source data          */
+    int            nBytesM1;               /* bytes per row of data minus one   */
 
 /* ========================================================================
    Set up for execution of compression algorithm code
index 65f8129840b4a538993b5a268fe3bb24bd9e81b8..8840e2ca2cac135437404650d6ba33ba40943776 100644 (file)
@@ -412,9 +412,9 @@ static ilError ilCompressJPEGDestroy (
     ilCompressJPEGPrivPtr   pPriv
     )
 {
-    register int            i;
+    int            i;
     ilPtr                   pTable;
-    register ilJPEGData    *pCompData;
+    ilJPEGData    *pCompData;
 
         /*  Free pCompData and any non-default Q tables */
     if (pCompData = pPriv->pCompData) {
@@ -439,7 +439,7 @@ static ilError ilCompressJPEGExecute (
     unsigned long          *pNLines
     )
 {
-    register ilCompressJPEGPrivPtr pPriv;
+    ilCompressJPEGPrivPtr pPriv;
     ilJPEGEncodeStream      streamRec;
     ilImageInfo            *pImage;
     ilImagePlaneInfo       *pSrcPlane;
@@ -489,13 +489,13 @@ static ilError ilCompressJPEGExecute (
         and return ptr to new table, or null if error.
     */
 static ilPtr _ilScaleQTable (
-    register ilPtr          pSrc,           /* ptr to 64 byte Q table to scale */
+    ilPtr          pSrc,           /* ptr to 64 byte Q table to scale */
     int                     Q               /* IL Q factor: != 0, or no scale needed */
     )
 {
     ilPtr                   pTable;
-    register ilPtr          pDst;
-    register int            i, value;
+    ilPtr          pDst;
+    int            i, value;
 
     if (!(pTable = (ilPtr)IL_MALLOC (64)))
         return (ilPtr)NULL;
index 2a2be64b6ff2b133c06cd2a11b5b5648f7c95c54..3b45bdacab4d0b081ffcee4f5280ffdb90849efe 100644 (file)
@@ -75,7 +75,7 @@ ilError ilInternalCreateContext (
     unsigned long       mustBeZero
     )
 {
-register ilContextPtr   pContext;
+ilContextPtr   pContext;
 
         /*  If internal version # > the version # the library was built with, then
             error; if <, old IL program using new library: supported.
@@ -116,7 +116,7 @@ IL_PRIVATE void *_ilMallocAndInitWithGarbage (
     unsigned long           nBytes
     )
 {
-register ilPtr              p, pMalloc;
+ilPtr              p, pMalloc;
 
     pMalloc = (ilPtr)malloc (nBytes);
     if (p = pMalloc) {
@@ -136,7 +136,7 @@ unsigned int ilGetPrivateType (
     ilContext           context
     )
 {
-register ilContextPtr   pContext;
+ilContextPtr   pContext;
 
         /*  Increment code (but not if it has wrapped to zero! and return it.
         */
@@ -155,7 +155,7 @@ ilBool ilDestroyContext (
     ilContext           context
     )
 {
-register ilContextPtr   pContext;
+ilContextPtr   pContext;
 int                     i;
 
         /*  Destroy all objects associated with this context, then free
@@ -179,8 +179,8 @@ int                     i;
                 Not in this file for any particular reason; no other logical place for it.
         */
 IL_PRIVATE void _ilIntersectRect (
-    register ilRect     *pSrcRect,
-    register ilRect     *pDstRect
+    ilRect     *pSrcRect,
+    ilRect     *pDstRect
     )
 {
 long                    left, top, right, bottom, i;
index 635a1d61387f3ffd940df809d9c450795500e3ac..a102c4d37ff5126f52c338863fd5c442addb1485 100644 (file)
@@ -58,7 +58,7 @@ static ilBool ilAddConversionFilter (
     ilImageDes             *pSrcDes,
     ilImageFormat          *pSrcFormat,
     void                   *pOptionData,
-    register ilConvertPtr   pCvtData
+    ilConvertPtr   pCvtData
     )
 {
 ilPtr                       pPriv;
@@ -146,7 +146,7 @@ static ilBool ilAddFormatFilter (
     ilPipe                  pipe,
     ilPipeInfo             *pInfo,
     const ilImageFormat    *pNewFormat,
-    register ilFormatPtr    pData
+    ilFormatPtr    pData
     )
 {
 ilPtr                       pPriv;
@@ -620,10 +620,10 @@ CantConvert:
     */
 unsigned int ilCheckPipeFormat (
     ilPipe                  pipe,
-    register unsigned long  formatMask,
+    unsigned long  formatMask,
     ilPipeInfo             *pInfo,              /* RETURNED */
-    register ilImageDes    *pDes,               /* RETURNED */
-    register ilImageFormat *pFormat             /* RETURNED */
+    ilImageDes    *pDes,               /* RETURNED */
+    ilImageFormat *pFormat             /* RETURNED */
     )
 {
     ilPipeInfo          localInfo;
index 20e67286366c8c305ff30a990a6986743d03af2a..1a3bc5390896ff1f0fd95dff5e0f9fdd20bc3563 100644 (file)
@@ -123,7 +123,7 @@ IL_EXTERN const unsigned short _ilMul4[];
 IL_EXTERN ilBool _ilConvertRGBToPalette (
     ilPipe                  pipe,
     ilPipeInfo             *pInfo,
-    register ilImageDes    *pDes,
+    ilImageDes    *pDes,
     ilImageFormat          *pFormat,
     int                     option,
     ilConvertToPaletteInfo *pData
@@ -273,7 +273,7 @@ IL_EXTERN ilBool _ilConvertRGBToYCbCr (
     ilPipe                  pipe,
     ilPipeInfo             *pInfo,
     ilImageDes             *pDes,
-    register const ilImageDes *pNewDes,
+    const ilImageDes *pNewDes,
     ilImageFormat          *pFormat
     );
 
index 73eb62ee41c23eb687a86ffabfaf564af714dbb1..52677559b4621c2e89e8d70150ebe6aa4e1ba2e5 100644 (file)
@@ -85,7 +85,7 @@ static ilError ilCropCompExecute (
     long                   *pNLines
     )
 {
-register ilCropCompPrivPtr  pPriv;
+ilCropCompPrivPtr  pPriv;
 
         /*  If this strip is out of range of strips to be written, return 0 for
             # lines written (crops the strip); otherwise pass strip on to next filter.
@@ -117,7 +117,7 @@ static ilBool ilCropCompressed (
     )
 {
 ilRect                  rect;
-register long           stripHeight, bottom;
+long           stripHeight, bottom;
 long                    topStrip, bottomStrip, topLine;
 ilDstElementData        dstData;
 ilCropCompPrivPtr       pPriv;
@@ -212,19 +212,19 @@ static ilError ilCropInit(
 
    ============================================================================================================================= */
 static ilError ilCropBitonalExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
-register CARD32            *psrc, *pdst, *psrcline, *pdstline, srca, srcb;
-register long              srcnwords, dstnwords, nlines;
-register unsigned long     dstwidth;  
-register long              nlongs, firstword;
+CARD32            *psrc, *pdst, *psrcline, *pdstline, srca, srcb;
+long              srcnwords, dstnwords, nlines;
+unsigned long     dstwidth;
+long              nlongs, firstword;
 ilImagePlaneInfo           *pplane;
-register unsigned long     local_noDstLine, Lwordoff, Rwordoff;
-register int               x, y, lastcount, yextent;
-register ilCropPrivptr     pPriv;
+unsigned long     local_noDstLine, Lwordoff, Rwordoff;
+int               x, y, lastcount, yextent;
+ilCropPrivptr     pPriv;
 
 
 
@@ -298,18 +298,18 @@ register ilCropPrivptr     pPriv;
 
    ============================================================================================================================= */
 static ilError ilCrop3ByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes, nlines;
-register unsigned long     dstwidth;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes, nlines;
+unsigned long     dstwidth;
 ilImagePlaneInfo           *pplane;
-register unsigned long     local_noDstLine;
-register int               x, y, lastcount, yextent, xextent;
-register ilCropPrivptr     pPriv;
+unsigned long     local_noDstLine;
+int               x, y, lastcount, yextent, xextent;
+ilCropPrivptr     pPriv;
 
 
    nlines                  =  *pNLines;
@@ -368,18 +368,18 @@ register ilCropPrivptr     pPriv;
 
    ============================================================================================================================= */
 static ilError ilCropByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes, nlines;
-register unsigned long     dstwidth;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes, nlines;
+unsigned long     dstwidth;
 ilImagePlaneInfo           *pplane;
-register unsigned long     local_noDstLine;
-register int               x, y, lastcount, yextent, xextent;
-register ilCropPrivptr     pPriv;
+unsigned long     local_noDstLine;
+int               x, y, lastcount, yextent, xextent;
+ilCropPrivptr     pPriv;
 
 
    nlines                  =  *pNLines;
@@ -440,7 +440,7 @@ ilBool ilCrop (
 {
 unsigned int            state;
 ilPipeInfo              info;
-register ilCropPrivptr  pPriv;
+ilCropPrivptr  pPriv;
 ilDstElementData        dstdata;
 ilImageDes              imdes;
 ilImageFormat           imformat;
index 1f86f143c112666fef3f7297178940bf4940fce9..4caa0733b57a04efc3cc21a527eea2870ff6585b 100644 (file)
@@ -101,7 +101,7 @@ ilImageInfo            *pDstImage
    ======================================================================== */
 
 static ilError   _ilDecompG3Line(
-register ilDecompG3G4PrivPtr  pPriv,
+ilDecompG3G4PrivPtr  pPriv,
 ilPtr                     dstImageP
 )
 {
@@ -117,12 +117,12 @@ ilPtr                     dstImageP
        ilPtr ImageP;
        int srcpos;
 
-    register ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
-    register ilDecompG4HuffTablePtrConst pDecodeTemp;
-    register ilDecompG4HuffTablePtrConst pDecodeBlack = ilArFax1DDecodeBlack;
-    register ilPtr sByte;
-    register int  no_of_ones;
-    register int  startPixel;
+    ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
+    ilDecompG4HuffTablePtrConst pDecodeTemp;
+    ilDecompG4HuffTablePtrConst pDecodeBlack = ilArFax1DDecodeBlack;
+    ilPtr sByte;
+    int  no_of_ones;
+    int  startPixel;
 
        static const unsigned char fillmasks[] =
        { 
@@ -269,8 +269,8 @@ unsigned long      *pNLines
        int                 temp;              /* some temp var..                            */
        ilBool              tag_bit;           /* True or 1 for G3 1D coded line ,else G3 2d */
     long                nLines;            /* no. of lines in the current strip     */
-       register ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
-       register ilDecompG4HuffTablePtrConst pDecodeTemp;
+       ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
+       ilDecompG4HuffTablePtrConst pDecodeTemp;
 
 
        /* ========================================================================
index dfe3dd3663ef57660067495ed73bb4d299317fb0..3413c5ff891ec5d0e616b04343a02ecba5b6ac2e 100644 (file)
@@ -129,9 +129,9 @@ static unsigned char oneruns[256] = {
 
 IL_PRIVATE  void
 _ilPutOnes(
-register char *sByte,
-register int startPixel,
-register int  no_of_ones )
+char *sByte,
+int startPixel,
+int  no_of_ones )
 
 {
        static const unsigned char masks[] =
@@ -186,10 +186,10 @@ int color,
 int nTimes)
 {
 
-       register unsigned char *bp;
-       register int ini_diff;
-       register int n, fin_diff;
-       register unsigned char *table ;
+       unsigned char *bp;
+       int ini_diff;
+       int n, fin_diff;
+       unsigned char *table ;
 
        bp = sByte;
 
@@ -340,7 +340,7 @@ ilImageInfo            *pDstImage
            image by Two dimensional coding.
    ======================================================================== */
 ilError   _ilDecompG4Line(
-register ilDecompG3G4PrivPtr  pPriv,
+ilDecompG3G4PrivPtr  pPriv,
 ilPtr          pRefLine,
 ilPtr          dstImageP
 )
@@ -357,9 +357,9 @@ ilPtr          dstImageP
        ilPtr ImageP;
        int srcpos;
 
-       register ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
-       register ilDecompG4HuffTablePtrConst pDecodeTemp;
-       register ilDecompG4HuffTablePtrConst pDecodeBlack = ilArFax1DDecodeBlack;
+       ilDecompG4HuffTablePtrConst pDecodeWhite = ilArFax1DDecodeWhite;
+       ilDecompG4HuffTablePtrConst pDecodeTemp;
+       ilDecompG4HuffTablePtrConst pDecodeBlack = ilArFax1DDecodeBlack;
 
 
        /*  Deccompression Procedure  ....
index 3c4a4a03b46b985cf5cee53c8b2df1b87a393a58..3048a1e98ff1520fcaa25ed7ff0725c836bece47 100644 (file)
@@ -180,7 +180,7 @@ IL_EXTERN const ilDecompG4HuffTableRec ilArFax1DDecodeBlack[G4K_BlackTableSize];
 IL_EXTERN const ilDecompG4HuffTableRec ilArFax2DDecodeTable[G4K_DecodeTableSize];
 
 IL_EXTERN ilError   _ilDecompG4Line(
-register ilDecompG3G4PrivPtr  pPriv,
+ilDecompG3G4PrivPtr  pPriv,
 ilPtr          pRefLine,
 ilPtr          dstImageP
 );
index 33925c16d30725501eb391e8b5489a7ce4d69cbe..1fd3ab0806aa2f903c467a816070fe4425184394 100644 (file)
@@ -104,14 +104,14 @@ static ilError ilDecompRawExecute (
     unsigned long      *pNLines
     )
 {
-    register ilJPEGPrivPtr pPriv;
+    ilJPEGPrivPtr pPriv;
     ilJPEGDecodeStream  streamRec;
     ilError             error;
     iljpgPtr            pPixels[ILJPG_MAX_COMPS];
     long                nBytesPerRow[ILJPG_MAX_COMPS];
     int                 i;
     ilImagePlaneInfo   *pPlane;
-    register ilImageInfo *pSrcImage, *pDstImage;
+    ilImageInfo *pSrcImage, *pDstImage;
 
     pPriv = (ilJPEGPrivPtr)pData->pPrivate;
     pSrcImage = pData->pSrcImage;
@@ -151,7 +151,7 @@ static ilError ilDecompJIFExecute (
     unsigned long      *pNLines
     )
 {
-    register ilJPEGPrivPtr pPriv;
+    ilJPEGPrivPtr pPriv;
     ilError             error;
     int                 i;
     iljpgPtr            pPixels[ILJPG_MAX_COMPS];
index 488b942718d2e4ce53d90aead6c6be2a48edf490..675fe0de2161485543b42d9a0aa79fb1a449b78e 100644 (file)
@@ -124,7 +124,7 @@ static ilError ilDecompLZWCleanup (
    ======================================================================== */
 
 static int ilCurrentBitsRead (
-    register ilDecompPrivPtr pPriv
+    ilDecompPrivPtr pPriv
     )
 {
     int   retval;
@@ -164,7 +164,7 @@ static void ilStringFromCode(
 {
     unsigned int  index;
     int           node;
-    register ilDenodePtr   denodes = pPriv->denodes;
+    ilDenodePtr   denodes = pPriv->denodes;
 
     if (code > 255) node = code - 2;    /* remove for extra codes */
     else node = code;
@@ -213,7 +213,7 @@ static void ilAddStringToTable (
    ======================================================================== */
 
 static ilError ilInitializeDecodeTable (
-    register ilDecompPrivPtr pPriv
+    ilDecompPrivPtr pPriv
     )
 {
     unsigned int    i;
@@ -263,20 +263,20 @@ static ilError ilDecompLZWExecute(
     long                nLines;                 /* Number of lines per source image strip                        */  
     long                nBytesToGo;             /* Number of source image bytes left to unpack for current strip */  
     long                nDstLineBytesToGo;      /* Number of bytes left to write to this line of destination     */
-    register ilPtr      pSrcByte;               /* Pointer to source image data                                  */  
-    register ilPtr      pDstByte;               /* Pointer to destination image data first byte                  */  
+    ilPtr      pSrcByte;               /* Pointer to source image data                                  */
+    ilPtr      pDstByte;               /* Pointer to destination image data first byte                  */
     ilPtr               pSrcStart;              /* Pointer to initial src (comp) byte                            */
     ilPtr               pDstLine;               /* Pointer to destination image data first byte of each scanline */  
-    register ilDecompPrivPtr pPriv;             /* Pointer to private image data                                 */  
+    ilDecompPrivPtr pPriv;             /* Pointer to private image data                                 */
     ilImagePlaneInfo   *pPlane;
 
     /* Greeley defines */
-    register unsigned int bitCount;
+    unsigned int bitCount;
     unsigned int        numBits;
 /* compatibility problem with long and unsigned long data fields */
     CARD32              bits;
     long                k;
-    register unsigned int code;
+    unsigned int code;
     unsigned int        oldCode;
     unsigned int        stringCount = 0;
     ilError             status      = IL_OK;
index a5d9f3ce3353a90633ed5c23bde85c51f49d8c76..1e43b72d3d8fe770bd994a578bf6b975404286cc 100644 (file)
@@ -72,16 +72,16 @@ static ilError ilDecompPackbitsExecute(
 
     unsigned long           dstNBytes;              /* Number of destination image bytes per row                     */                    
     long                    nLines;                 /* Number of lines per source image strip                        */  
-    register long           nBytesToGo;             /* Number of source image bytes left to unpack for current strip */  
-    register long           nDstLineBytesToGo;      /* Number of bytes left to write to this line of destination     */
-    register ilPtr          pSrcByte;               /* Pointer to source image data                                  */  
-    register ilPtr          pDstByte;               /* Pointer to destination image data first byte                  */  
+    long           nBytesToGo;             /* Number of source image bytes left to unpack for current strip */
+    long           nDstLineBytesToGo;      /* Number of bytes left to write to this line of destination     */
+    ilPtr          pSrcByte;               /* Pointer to source image data                                  */
+    ilPtr          pDstByte;               /* Pointer to destination image data first byte                  */
     ilPtr                   pSrcLine;               /* Pointer to source image data first byte of each scanline      */  
     ilPtr                   pDstLine;               /* Pointer to destination image data first byte of each scanline */  
     ilDecompPBPrivPtr       pPriv;                  /* Pointer to private image data                                 */  
     ilImagePlaneInfo        *pPlane;
-    register int            count;                  /* run-length code value     */
-    register ilByte         repeatbyte;             /* repeated data             */
+    int            count;                  /* run-length code value     */
+    ilByte         repeatbyte;             /* repeated data             */
 
 
 /* ========================================================================
index 06046b006a5888ac3c580ce164a23a025e24f995..94a6f3e6fabaa9b4e472fa93ee7c4d24b9ae0fbc 100644 (file)
@@ -238,11 +238,11 @@ ilDitherPrivPtr             pPriv;
 long                        nLinesM1;
 long                        srcRowBytes, dstRowBytes;
 ilPtr                       pSrcLine, pDstLine;
-register long               x, yMod8Times8, width;
-register const unsigned short *pMulR, *pMulG, *pMulB;
-register ilPtr              pSrc, pDst, pTranslate;
-register unsigned long      pixel, kernel;
-register int                upShiftR, upShiftG;
+long               x, yMod8Times8, width;
+const unsigned short *pMulR, *pMulG, *pMulB;
+ilPtr              pSrc, pDst, pTranslate;
+unsigned long      pixel, kernel;
+int                upShiftR, upShiftG;
 
     pPriv = (ilDitherPrivPtr)pData->pPrivate;
     width = pPriv->width;
@@ -302,10 +302,10 @@ ilDitherPrivPtr             pPriv;
 long                        nLinesM1;
 long                        srcRowBytes, dstRowBytes;
 ilPtr                       pSrcLine, pDstLine;
-register long               x, yMod8Times8, width;
-register const unsigned short    *pMul8, *pMul4;
-register ilPtr              pSrc, pDst, pTranslate;
-register unsigned long      pixel, kernel;
+long               x, yMod8Times8, width;
+const unsigned short    *pMul8, *pMul4;
+ilPtr              pSrc, pDst, pTranslate;
+unsigned long      pixel, kernel;
 
     pPriv = (ilDitherPrivPtr)pData->pPrivate;
     width = pPriv->width;
@@ -364,14 +364,14 @@ static ilError ilExecuteDiffusionRGB (
 ilDitherPrivPtr             pPriv;
 long                        srcRowBytes, dstRowBytes;
 long                        nLinesM1, nPixelsM1, nPixelsM1Init;
-register int                red, green, blue;
-register int                redAboveError, greenAboveError, blueAboveError;
-register int                redAboveLeftError, greenAboveLeftError, blueAboveLeftError;
-register int                redAboveRightError, greenAboveRightError, blueAboveRightError;
+int                red, green, blue;
+int                redAboveError, greenAboveError, blueAboveError;
+int                redAboveLeftError, greenAboveLeftError, blueAboveLeftError;
+int                redAboveRightError, greenAboveRightError, blueAboveRightError;
 int                         redRShift, greenRShift, blueRShift;
-register long               pixel;
-register int               *pError;
-register ilPtr              pSrc;
+long               pixel;
+int               *pError;
+ilPtr              pSrc;
 long                       *pColorTable;
 ilPtr                       pDst, pSrcLine, pDstLine;
 
@@ -495,13 +495,13 @@ static ilError ilExecuteDiffusion484 (
 ilDitherPrivPtr             pPriv;
 long                        srcRowBytes, dstRowBytes;
 long                        nLinesM1, nPixelsM1, nPixelsM1Init;
-register int                red, green, blue;
-register int                redAboveError, greenAboveError, blueAboveError;
-register int                redAboveLeftError, greenAboveLeftError, blueAboveLeftError;
-register int                redAboveRightError, greenAboveRightError, blueAboveRightError;
-register long               pixel;
-register int               *pError;
-register ilPtr              pSrc;
+int                red, green, blue;
+int                redAboveError, greenAboveError, blueAboveError;
+int                redAboveLeftError, greenAboveLeftError, blueAboveLeftError;
+int                redAboveRightError, greenAboveRightError, blueAboveRightError;
+long               pixel;
+int               *pError;
+ilPtr              pSrc;
 long                       *pColorTable;
 ilPtr                       pDst, pSrcLine, pDstLine;
 
@@ -614,12 +614,12 @@ static ilError ilExecuteQuickDiffusionRGB (
 ilDitherPrivPtr             pPriv;
 long                        srcRowBytes, dstRowBytes;
 long                        nLinesM1, nPixelsM1, nPixelsM1Init;
-register int                red, green, blue;
-register int                redRShift, greenRShift, blueRShift;
-register long               pixel;
-register int               *pError;
-register ilPtr              pSrc;
-register long              *pColorTable;
+int                red, green, blue;
+int                redRShift, greenRShift, blueRShift;
+long               pixel;
+int               *pError;
+ilPtr              pSrc;
+long              *pColorTable;
 ilPtr                       pDst, pSrcLine, pDstLine;
 
         /*  Same as regular diffusion above, except spread the errors in a simpler and
@@ -771,9 +771,9 @@ static int ScanBox(
 convertBoxTotalRec          total, part1, part2;
 convertBoxCountRec          count;
 convertBoxRec               slice;
-register convertBoxRec     *pBox = &BoxTable[box];
+convertBoxRec     *pBox = &BoxTable[box];
 double                      temp, ssq1, ssq2;
-register int                axis, plane, rgb, n;
+int                axis, plane, rgb, n;
 
     if ( CountBox( pBox, Ftable, &count ) ) {
 
@@ -848,13 +848,13 @@ static ilError ilChooseColorsExecute (
     long                   *pNLines
     )
 {
-register ilDitherPrivPtr    pPriv;
+ilDitherPrivPtr    pPriv;
 long                        srcRowBytes, dstRowBytes, nRowsM1, nLinesM1;
 long                        width, height;
 ilPtr                       pSrcLine, pDstLine;
-register long               rowCount;
-register ilPtr              pSrc, pDst;
-register unsigned short    *pPalette;
+long               rowCount;
+ilPtr              pSrc, pDst;
+unsigned short    *pPalette;
 int                         nBoxes, nColors;
 int                         index, axis, plane, inner, outer;
 unsigned long              *Ftable;
@@ -886,7 +886,7 @@ convertBoxTotalRec          total[256];
         pSrcLine += srcRowBytes;
         rowCount = nRowsM1;
         do {
-            register ilByte  R, G, B;
+            ilByte  R, G, B;
 
             R = *pSrc++;        /* red */
             G = *pSrc++;        /* green */
@@ -921,8 +921,8 @@ convertBoxTotalRec          total[256];
     }
 
     for ( outer = 0 ; outer < nBoxes ; outer++ ) {
-        register convertBoxRec  *pBox = &box[outer];
-        register int             R, G, B;
+        convertBoxRec  *pBox = &box[outer];
+        int             R, G, B;
         int                      rgb_inner, rgb_outer, rgb_limit;
         unsigned char            multiple, candidate[256];
         double                   ssq_inner, ssq_outer, distance;
@@ -975,7 +975,7 @@ convertBoxTotalRec          total[256];
         pDstLine += dstRowBytes;
         rowCount = nRowsM1;
         do {
-            register ilByte  R, G, B, P;
+            ilByte  R, G, B, P;
 
             R = *pSrc++;        /* red */
             G = *pSrc++;        /* green */
@@ -1010,13 +1010,13 @@ convertBoxTotalRec          total[256];
 IL_PRIVATE ilBool _ilConvertRGBToPalette (
     ilPipe                  pipe,
     ilPipeInfo             *pInfo,
-    register ilImageDes    *pDes,
+    ilImageDes    *pDes,
     ilImageFormat          *pFormat,
     int                     option,
-    register ilConvertToPaletteInfo *pData
+    ilConvertToPaletteInfo *pData
     )
 {
-    register ilDitherPrivPtr pPriv;
+    ilDitherPrivPtr pPriv;
     ilDstElementData        dstData;
     ilSrcElementData        srcData;
     ilError                 (*executeFunction)(), (*cleanupFunction)();
@@ -1155,10 +1155,10 @@ IL_PRIVATE ilBool _ilConvertRGBToPalette (
             with r/g/b/pixel together, instead of 0..65535 and rgb spread apart.
         */
     if (diffusion) {
-        register int            i, index;
+        int            i, index;
         int                     red, green, blue;
         int                     redLevel, greenLevel, blueLevel;
-        register long *pColorTemp;
+        long *pColorTemp;
         pColorTable = (long *)IL_MALLOC (sizeof (long) * 256);
         if (!pColorTable) {
             ilDeclarePipeInvalid (pipe, IL_ERROR_MALLOC);
@@ -1190,9 +1190,9 @@ IL_PRIVATE ilBool _ilConvertRGBToPalette (
             goto cleanup;
             }
        if (!chooseColors) {
-            register int            red, green, blue;
-            register int            redLevel, greenLevel, blueLevel;
-            register unsigned short *pPal;
+            int            red, green, blue;
+            int            redLevel, greenLevel, blueLevel;
+            unsigned short *pPal;
 
             pPal = pPalette;
             for (red = 0; red < pData->levels[0]; red++) {
index d13e7b6a677147aa07fe8ee0df259ed016743b56..b1d5ac6247bfa24bb8291a60427e380a184a648a 100644 (file)
@@ -107,7 +107,7 @@ static ilEFSPrivatePtr ilInitEFS (
     ilContext               context
     )
 {
-register ilEFSPrivatePtr    pPriv;
+ilEFSPrivatePtr    pPriv;
 
         /*  If EFS file type data not present malloc and zero it, and then point
             context pAlloc to it - if not, could recurse forever.
@@ -149,7 +149,7 @@ static ilEFSFileTypePtr ilFindFileType (
     ilEFSFileTypePtr        pListHead
     )
 {
-register ilEFSFileTypePtr   pFileType;
+ilEFSFileTypePtr   pFileType;
 
     pFileType = pListHead->h.pNext;
     while (pFileType != pListHead) {
@@ -167,12 +167,12 @@ register ilEFSFileTypePtr   pFileType;
             checkOrder.
         */
 static void ilAddFileTypeToList (
-    register ilEFSFileTypePtr pFileType,
+    ilEFSFileTypePtr pFileType,
     ilEFSFileTypePtr        pListHead
     )
 {
-register ilEFSFileTypePtr   pListFileType;
-register int                checkOrder;
+ilEFSFileTypePtr   pListFileType;
+int                checkOrder;
 
     checkOrder = pFileType->info.checkOrder;
     pListFileType = pListHead->h.pNext;
@@ -191,11 +191,11 @@ register int                checkOrder;
 
         /*  Object Destroy() function for file type objects. */
 static void ilDestroyFileType (
-    register ilEFSFileTypePtr pFileType
+    ilEFSFileTypePtr pFileType
     )
 {
 ilEFSPrivatePtr             pPriv;
-register ilEFSFileTypePtr   pReplaced;
+ilEFSFileTypePtr   pReplaced;
 
     pPriv = (ilEFSPrivatePtr)
         ((ilContextPtr)(pFileType->h.o.p.context))->pAlloc[IL_CONTEXT_ALLOC_EFS];
@@ -215,14 +215,14 @@ register ilEFSFileTypePtr   pReplaced;
 
 ilEFSFileType ilEFSAddFileType (
     ilContext               context,
-    register ilEFSFileTypeInfo *pInfo,
+    ilEFSFileTypeInfo *pInfo,
     void                   *pOptions
     )
 {
 ilEFSPrivatePtr             pPriv;
 int                         i;
-register ilEFSFileTypePtr   pFileType, pReplace;
-register unsigned long      openModes;
+ilEFSFileTypePtr   pFileType, pReplace;
+unsigned long      openModes;
 
         /* masks for defined bits in ilEFSFileTypeInfo - others invalid */
 #define OPEN_MODE_MASKS (1<<IL_EFS_READ | 1<<IL_EFS_READ_SEQUENTIAL | 1<<IL_EFS_WRITE)
@@ -307,7 +307,7 @@ ilBool ilEFSGetFileTypeInfo (
     ilEFSFileTypeInfo      *pInfo
     )
 {
-register ilEFSFileTypePtr   pFileType;
+ilEFSFileTypePtr   pFileType;
 
     pFileType = (ilEFSFileTypePtr)fileType;
     if (pFileType->h.o.p.objectType != IL_EFS_FILE_TYPE) {
@@ -331,9 +331,9 @@ ilBool ilEFSListFileTypes (
     )
 {
 ilEFSPrivatePtr             pPriv;
-register int                nFileTypes;
-register ilEFSFileTypePtr   pFileType;
-register ilEFSFileType     *pfileType;
+int                nFileTypes;
+ilEFSFileTypePtr   pFileType;
+ilEFSFileType     *pfileType;
 
     *pNFileTypes = 0;
     *pfileTypes = (ilEFSFileType *)NULL;
@@ -386,7 +386,7 @@ static void ilDestroyFile (
     ilEFSFilePtr            pFile
     )
 {
-register ilEFSFileTypePtr   pFileType;
+ilEFSFileTypePtr   pFileType;
 
         /*  Get ptr to file type; if null, file not actually open yet; skip Close() */
     pFileType = (ilEFSFileTypePtr)pFile->info.fileType;
@@ -405,8 +405,8 @@ ilEFSFile ilEFSOpen (
     )
 {
 ilEFSPrivatePtr             pPriv;
-register ilEFSFilePtr       pFile;
-register ilEFSFileTypePtr   pFileType, pListHead;
+ilEFSFilePtr       pFile;
+ilEFSFileTypePtr   pFileType, pListHead;
 ilBool                      readOpen;
 long                        nPages;
 ilPtr                       pOpenPriv;
@@ -466,7 +466,7 @@ char                        extension [IL_EFS_MAX_EXTENSION_CHARS];
         /*  If not found, search for extension if enabled. */
     if (!pFileType && (searchOptions & IL_EFS_BY_EXTENSION)) {
         char                       *pExtension;
-        register ilEFSFileTypePtr   pSearch;
+        ilEFSFileTypePtr   pSearch;
         int                         nChars;
 
         pExtension = strrchr (fileName, '.');
@@ -481,7 +481,7 @@ char                        extension [IL_EFS_MAX_EXTENSION_CHARS];
                 /* Search list for extension match until pFileType found or list done */
             pSearch = pListHead->h.pNext;
             while (!pFileType && (pSearch != pListHead)) {
-                register int nExtensions = pSearch->info.nExtensions;
+                int nExtensions = pSearch->info.nExtensions;
                 while (nExtensions-- > 0)
                     if (STRING_EQUAL (extension, pSearch->info.extensions[nExtensions])) {
                         pFileType = pSearch;            /* extension found; quit */
@@ -510,7 +510,7 @@ char                        extension [IL_EFS_MAX_EXTENSION_CHARS];
             try open if enabled (checkOrder != 0) and openMode supported for file type.
         */
     if (!pFileType && readOpen && (searchOptions & IL_EFS_BY_CHECKING)) {
-        register ilEFSFileTypePtr   pSearch;
+        ilEFSFileTypePtr   pSearch;
 
         pSearch = pListHead->h.pNext;
         while (pSearch != pListHead) {
@@ -569,7 +569,7 @@ ilBool ilEFSGetFileInfo (
     ilEFSFileInfo          *pInfo                   /* RETURNED */
     )
 {
-register ilEFSFilePtr       pFile;
+ilEFSFilePtr       pFile;
 
     pFile = (ilEFSFilePtr)file;
     if (pFile->o.p.objectType != IL_EFS_FILE) {
@@ -594,7 +594,7 @@ ilBool ilEFSSeek (
     void                   *pOptions
     )
 {
-register ilEFSFilePtr       pFile;
+ilEFSFilePtr       pFile;
 
     pFile = (ilEFSFilePtr)file;
     if (pOptions) {
@@ -628,7 +628,7 @@ ilBool ilEFSGetPageInfo (
     ilEFSPageInfo          *pInfo
     )
 {
-register ilEFSFilePtr       pFile;
+ilEFSFilePtr       pFile;
 
     pFile = (ilEFSFilePtr)file;
     if (pFile->o.p.objectType != IL_EFS_FILE) {
@@ -660,7 +660,7 @@ ilBool ilEFSReadImage (
     void                   *pOptions
     )
 {
-register ilEFSFilePtr       pFile;
+ilEFSFilePtr       pFile;
 
     pFile = (ilEFSFilePtr)file;
     if (pOptions) {
@@ -715,7 +715,7 @@ ilBool ilEFSWriteImage (
     void                   *pOptions
     )
 {
-register ilEFSFilePtr       pFile;
+ilEFSFilePtr       pFile;
 
     pFile = (ilEFSFilePtr)file;
     if (pOptions) {
@@ -739,8 +739,8 @@ register ilEFSFilePtr       pFile;
             maskImage = (ilClientImage)NULL;
         else {
             ilImageInfo            *pInfo;
-            register const ilImageDes    *pDes;
-            register const ilImageFormat *pFormat;
+            const ilImageDes    *pDes;
+            const ilImageFormat *pFormat;
 
             if (!ilQueryClientImage (maskImage, &pInfo, 0))
                 return FALSE;
index 8bb52e94235a24a57938b82bb21fca09708e141b..fd5362a4f962e422dff41f9910cf5db1100ffa6f 100644 (file)
@@ -59,8 +59,8 @@ static ilError ilExecuteBitAlign (
 {
 ilImagePlaneInfo           *pImagePlane;
 long                        srcRowBytes, dstRowBytes;
-register long               nLinesM1, nBytes;
-register ilPtr              pSrc, pDst;
+long               nLinesM1, nBytes;
+ilPtr              pSrc, pDst;
 
         /*  Use bcopy to copy each line; copy the lesser of the src/dstRowBytes.
             Exit if no lines or pixels.
@@ -115,9 +115,9 @@ static ilError ilExecute8Bit3PlaneToPixel (
 ilImagePlaneInfo           *pImagePlane;
 long                        src0RowBytes, src1RowBytes, src2RowBytes, dstRowBytes;
 long                        nPixelsM1Init;
-register long               nLinesM1, nPixelsM1;
+long               nLinesM1, nPixelsM1;
 ilPtr                       pSrc0Line, pSrc1Line, pSrc2Line, pDstLine;
-register ilPtr              pSrc0, pSrc1, pSrc2, pDst;
+ilPtr              pSrc0, pSrc1, pSrc2, pDst;
 
         /*  Get ptr to start of 3 src planes and to dst */
     pImagePlane = pData->pSrcImage->plane;
@@ -188,9 +188,9 @@ static ilError ilExecute8Bit3PixelToPlane (
 ilImagePlaneInfo           *pImagePlane;
 long                        dst0RowBytes, dst1RowBytes, dst2RowBytes, srcRowBytes;
 long                        nPixelsM1Init;
-register long               nLinesM1, nPixelsM1;
+long               nLinesM1, nPixelsM1;
 ilPtr                       pDst0Line, pDst1Line, pDst2Line, pSrcLine;
-register ilPtr              pDst0, pDst1, pDst2, pSrc;
+ilPtr              pDst0, pDst1, pDst2, pSrc;
 
         /*  Get ptr to start src plane and to 3 dst planes */
     pImagePlane = pData->pSrcImage->plane;
@@ -265,9 +265,9 @@ ilImagePlaneInfo           *pImagePlane;
 long                        srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
 ilBool                      oddNumberOfNibbles;
 ilPtr                       pSrcLine, pDstLine;
-register long               nBytesM1;
-register ilPtr              pSrc, pDst;
-register ilByte             byte;
+long               nBytesM1;
+ilPtr              pSrc, pDst;
+ilByte             byte;
 
         /*  Exit if no lines or pixels. */
     pSrcImage = pData->pSrcImage;
@@ -341,9 +341,9 @@ ilImagePlaneInfo           *pImagePlane;
 long                        srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
 ilBool                      oddNumberOfNibbles;
 ilPtr                       pSrcLine, pDstLine;
-register long               nBytesM1;
-register ilPtr              pSrc, pDst;
-register ilByte             byte0, byte1;
+long               nBytesM1;
+ilPtr              pSrc, pDst;
+ilByte             byte0, byte1;
 
         /*  Exit if no lines or pixels. */
     pSrcImage = pData->pSrcImage;
@@ -419,9 +419,9 @@ ilImagePlaneInfo           *pImagePlane;
 long                        srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
 ilBool                      oddNumberOfNibbles;
 ilPtr                       pSrcLine, pDstLine;
-register long               nBytesM1;
-register ilPtr              pSrc, pDst;
-register ilByte             byte;
+long               nBytesM1;
+ilPtr              pSrc, pDst;
+ilByte             byte;
 
         /*  Use bcopy to copy each line; copy the lesser of the src/dstRowBytes.
             Exit if no lines or pixels.
@@ -490,9 +490,9 @@ ilImageInfo                *pSrcImage;
 ilImagePlaneInfo           *pImagePlane;
 long                        srcRowBytes, dstRowBytes, nBytesM1Init, nLinesM1;
 ilPtr                       pSrcLine, pDstLine;
-register long               nBytesM1;
-register ilPtr              pSrc, pDst;
-register ilByte             byte;
+long               nBytesM1;
+ilPtr              pSrc, pDst;
+ilByte             byte;
 
         /*  Use bcopy to copy each line; copy the lesser of the src/dstRowBytes.
             Exit if no lines or pixels.
index 911b198a44fa87a94d679fff9b9d236045fb1601..468a18d926e8c4c6013c4fae9b6224d551ad1697 100644 (file)
 #ifndef LSB_BIT_ORDER
 # define flip_bits(start,n)      /*EMPTY*/
 #else
-extern void flip_bits(register ilPtr start, register unsigned n);
+extern void flip_bits(ilPtr start, unsigned n);
 
 extern void
-flip_bits(register ilPtr start,
-          register unsigned n )
+flip_bits(ilPtr start,
+          unsigned n )
 {
-       register int    i;
+       int     i;
        unsigned char   c;
 
        for (i = 0; i < n; i++) {
@@ -136,12 +136,12 @@ static ilError ilExecuteBiDiffusion (
 #endif
 ilBiDiffusionPrivPtr        pPriv;
 long                        nLinesM1, nPixelsM1Init, nPixelsM1;
-register short             *pPrevError, *pError;
-register int                errorAcc, invert;
+short             *pPrevError, *pError;
+int                errorAcc, invert;
 long                        srcRowBytes, dstRowBytes;
 ilPtr                       pSrcLine, pDstLine;
-register ilPtr              pSrc;
-register CARD32             mask, *pDst;
+ilPtr              pSrc;
+CARD32             mask, *pDst;
 CARD32                     outLong;
 
     pPriv = (ilBiDiffusionPrivPtr)pData->pPrivate;
@@ -314,11 +314,11 @@ ilThresholdPrivPtr          pPriv;
 long                        nLinesM1, nPixelsM1Init;
 long                        srcRowBytes, dstRowBytes;
 ilPtr                       pSrcLine, pDstLine;
-register long               nPixelsM1;
-register ilPtr              pSrc;
-register CARD32             mask, *pDst;
+long               nPixelsM1;
+ilPtr              pSrc;
+CARD32             mask, *pDst;
 CARD32                     outLong;
-register ilByte             threshold;
+ilByte             threshold;
 
     pPriv = (ilThresholdPrivPtr)pData->pPrivate;
     threshold = *pPriv->pThreshold;
index b15ff7fc0c665c846706c9f4f400ad220fd59024..d3baf280d3a9e158d22b67a2616fd534b8c2e485 100644 (file)
@@ -107,7 +107,7 @@ short          out_w, out_h;
 
    ============================================================================================================================= */
 static ilError ilRotateCleanup (
-    register ilRotatePrivptr   pPriv,
+    ilRotatePrivptr   pPriv,
     ilBool                  aborting
     )
 {
@@ -124,7 +124,7 @@ static ilError ilRotateCleanup (
 
    ============================================================================================================================= */
 static ilError ilRotateExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
@@ -132,10 +132,10 @@ static ilError ilRotateExecute (
 
 
 
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
 ilImagePlaneInfo           *pplane;
-register ilRotatePrivptr   pPriv;
+ilRotatePrivptr   pPriv;
  int                       nrows, nlines, nlinesout;
 
    if (*pNLines <= 0)  return IL_OK;
@@ -187,7 +187,7 @@ ilBool ilRotate(
 {
 unsigned int              state;
 ilPipeInfo                info;
-register ilRotatePrivptr  pPriv;
+ilRotatePrivptr  pPriv;
 ilDstElementData          dstdata;
 ilImageDes                imdes;
 ilImageFormat             imformat;
index e113df2cfd48383b5ec6da8734a8a24dbe4aeed1..67fbf1b6c10ab55312f755a2a4fc8d1de4473614 100644 (file)
@@ -399,7 +399,7 @@ DATA_OUT_PTR out;
     OPERAND first_pix, last_pix, col;
     float Y, x, y;
     OPERAND ex, ey, dx, dy;
-    register DATA_IN_PTR data;
+    DATA_IN_PTR data;
 
     /* Find coord of first & last pixels in the new image coord. system */
     first_pix = First_Pixel(r_next_row_out);
@@ -491,7 +491,7 @@ DATA_OUT_PTR out;
     OPERAND first_pix, last_pix, col;
     float Y, x, y;
     OPERAND ex, ey, dx, dy;
-    register DATA_IN_PTR data, data2;
+    DATA_IN_PTR data, data2;
     OPERAND val1, val2, x1, y1, t;
     size_t input_row_size;
 
index 12ecc92c47cce812c3aa4ff12f93d0cc683aa674..494ed4a4b1fc1f0c82f5ba4aa7b9debf5fba1011 100644 (file)
@@ -91,12 +91,12 @@ static unsigned long    ilSupportedCompressions [IL_MAX_TYPE+1] = {
         */
 IL_PRIVATE ilError _ilValidateDesFormat (
     ilBool                  allowPrivateTypes,
-    register const ilImageDes     *pDes,
-    register const ilImageFormat  *pFormat
+    const ilImageDes     *pDes,
+    const ilImageFormat  *pFormat
     )
 {
 #define MAX_BITS_PER_SAMPLE     24       /* maximum # of bits/sample supported */
-register unsigned int           i, j, nBits, nLevels, nSamplesPerPixel;
+unsigned int           i, j, nBits, nLevels, nSamplesPerPixel;
 const ilYCbCrSampleInfo              *pSample;
 
         /*  reserved must = 0; # samples must be 1 .. IL_MAX_SAMPLES.
@@ -241,14 +241,14 @@ const ilYCbCrSampleInfo              *pSample;
             format "*pFormat".
         */
 void ilGetBytesPerRow (
-    register const ilImageDes    *pDes,
-    register const ilImageFormat *pFormat,
+    const ilImageDes    *pDes,
+    const ilImageFormat *pFormat,
     long                    width,
     long                   *pnBytesPerRow       /* RETURNED */
     )
 {
-register const unsigned short    *pNBits;
-register int                rowBitAlign, nBits, nSamplesPerPixel, i;
+const unsigned short    *pNBits;
+int                rowBitAlign, nBits, nSamplesPerPixel, i;
 
     pNBits = pFormat->nBitsPerSample;
     rowBitAlign = pFormat->rowBitAlign;
@@ -282,7 +282,7 @@ register int                rowBitAlign, nBits, nSamplesPerPixel, i;
                         * (rowBitAlign / 8);
         }
     else  {
-        register const ilYCbCrSampleInfo *pYCbCr;
+        const ilYCbCrSampleInfo *pYCbCr;
 
             /*  Planar order: each plane is independent; return nSamplesPerPixel rowbytes.
                 Take into account subsampling if YCbCr image.
@@ -319,15 +319,15 @@ register int                rowBitAlign, nBits, nSamplesPerPixel, i;
                 Returns: zero if success, else error code.
         */
 IL_PRIVATE ilError _ilMallocImagePixels (
-    register ilImagePtr pImage
+    ilImagePtr pImage
     )
 {
-register int            plane, nPlanes;
+int            plane, nPlanes;
 int                     MCUMinus1;
-register long           nBytesToAlloc, nBytesPerRow, allocHeight;
+long           nBytesToAlloc, nBytesPerRow, allocHeight;
 ilPtr                   pPixels;
 long                    rowBytesPerPlane [IL_MAX_SAMPLES];
-register ilYCbCrSampleInfo *pYCbCr;
+ilYCbCrSampleInfo *pYCbCr;
 
 
         /*  Get the bytes per row, set into the image. */
@@ -399,7 +399,7 @@ register ilYCbCrSampleInfo *pYCbCr;
             Free the pixels of the image only if the IL owns them.
         */
 IL_PRIVATE void _ilFreeImagePixels (
-    register ilImagePtr pImage
+    ilImagePtr pImage
     )
 {
 int                     plane;
@@ -447,11 +447,11 @@ ilPtr                   pPixels;
         is zero (0).  Locks image to that strip height.
     */
 IL_PRIVATE ilBool _ilAllocStripOffsets (
-    register ilImagePtr pImage,
-    register long       stripHeight
+    ilImagePtr pImage,
+    long       stripHeight
     )
 {
-register long           nStrips;
+long           nStrips;
 
     if (stripHeight <= 0)
         stripHeight = ilRecommendedStripHeight (pImage->i.pDes, pImage->i.pFormat,
@@ -485,7 +485,7 @@ ilInternalImage ilCreateInternalImage (
     unsigned long       mustBeZero
     )
 {
-register ilImagePtr     pImage;
+ilImagePtr     pImage;
 ilError                 error;
 
 
@@ -611,7 +611,7 @@ ilBool ilQueryInternalImage (
     unsigned long       mustBeZero
     )
 {
-register ilImagePtr     pImage;
+ilImagePtr     pImage;
 
 
         /*  Check that given image is an internal image.
@@ -649,7 +649,7 @@ ilClientImage ilCreateClientImage (
     unsigned long       mustBeZero
     )
 {
-register ilImagePtr     pImage;
+ilImagePtr     pImage;
 ilError                 error;
 int                     plane, nPlanes;
 
@@ -771,7 +771,7 @@ ilBool ilQueryClientImage (
     unsigned long       mustBeZero
     )
 {
-register ilImagePtr     pImage;
+ilImagePtr     pImage;
 
         /*  Validate given image of correct type; return false if not realized.
         */
index f443de55a8864ec96adcf1b4744629de65717fd5..535b4f5574b0c90e6a46195f4b7fbc5f4ac57384 100644 (file)
@@ -122,7 +122,7 @@ IL_EXTERN void _ilFreeImagePixels (
         is zero (0).  Locks image to that strip height.
     */
 IL_EXTERN ilBool _ilAllocStripOffsets (
-    register ilImagePtr pImage,
+    ilImagePtr pImage,
     long                stripHeight
     );
 
index ef6d1cf0415610e9f5690435313062b8b374668c..68c8f39bfbb5f882afe2fae55adcff65b317529f 100644 (file)
@@ -168,8 +168,8 @@ IL_EXTERN ilObjectPtr _ilCreateObject (
         */
 IL_EXTERN ilError _ilValidateDesFormat (
     ilBool                  allowPrivateTypes,
-    register const ilImageDes     *pDes,
-    register const ilImageFormat  *pFormat
+    const ilImageDes     *pDes,
+    const ilImageFormat  *pFormat
     );
 
 
index 702b18d40d287445e79be303d4d1799f6319513a..97a74a7a2a5031e0a268ed9eaa206bfb0c7a4ca5 100644 (file)
@@ -94,9 +94,9 @@ static ilError ilExecuteinvert  (
 {
 ilinvertPtr                 pPriv;
 long                        srcnbytes, dstnbytes;
-register ilPtr              psrcline, pdstline;
-register ilPtr              psrc, pdst;
-register long               nLines, nPixels;
+ilPtr              psrcline, pdstline;
+ilPtr              psrc, pdst;
+long               nLines, nPixels;
 
 
 
index 39e629b3320be534e5c8da5e87b6b10993930378..b31a37219192b3a67f56df0c3794fe0e08aa6d26 100644 (file)
     */
     ILJPG_PUBLIC_EXTERN
 iljpgError iljpgDecodeInit (
-    register iljpgDataPtr pData,
+    iljpgDataPtr pData,
     iljpgPtr           *pPrivate                /* RETURNED */
     )
 {
-    register iljpgDecodePrivPtr pPriv;
-    register iljpgCompPtr pComp;
+    iljpgDecodePrivPtr pPriv;
+    iljpgCompPtr pComp;
     int                 comp;
     iljpgCompDataPtr    pCompData;
     iljpgError          error;
@@ -155,10 +155,10 @@ iljpgError iljpgDecodeExecute (
     int                 outHuff[64];
     iljpgByte           outDCT[64];
     int                 restartInterval;
-    register iljpgCompPtr pComp;
+    iljpgCompPtr pComp;
     int                 nBytesInit;
-    register int        nLines, dc;
-    register iljpgPtr   pDstLine;
+    int        nLines, dc;
+    iljpgPtr   pDstLine;
 
 
     pPriv = (iljpgDecodePrivPtr)pPrivate;
@@ -273,8 +273,8 @@ iljpgError iljpgDecodeExecute (
                                }
 
                                 /*  Clip and output 8x8 block to position (bX, bY) */
-                            {   register int    nBytesM1;
-                                register iljpgPtr pSrc, pSrcLine, pDst;
+                            {   int    nBytesM1;
+                                iljpgPtr pSrc, pSrcLine, pDst;
 
                                 if (nBytesInit > 8) 
                                     nBytesInit = 8;
index b34ec449e70c4bcc40cc090dfb720c3bca916664..5c326f8c488007c6316df9e0d532b9468da06b15 100644 (file)
@@ -117,14 +117,14 @@ iljpgError iljpgDecodeJIF (
     iljpgDataPtr       *ppData                  /* RETURNED */
     )
 {
-    register iljpgDataPtr pData;
+    iljpgDataPtr pData;
     iljpgBool           firstMarker, SOSFound, SOF0Found;
     iljpgError          error;
     int                 value, nFrameComps, length;
     iljpgPtr           *ppTable;
     iljpgCompDataPtr    pComp;
-    register int        i, index;
-    register iljpgPtr   pTable;
+    int        i, index;
+    iljpgPtr   pTable;
     struct {
         int             id, horiFactor, vertFactor, QTableIndex;
         }               frameComp[ILJPG_MAX_COMPS], *pFrame;
index d191d84af78945c2cb7f0cd80d55467323f75318..3f4078ef1c8c17ec1b9cb5ee5beed6f16dc15af5 100644 (file)
@@ -62,10 +62,10 @@ static void _il_fwft_rev_scale (
     float   *s                 /* pointer to pointer to descaling matrix */
     )
 {
-  register int   i, j, prevValue, value, QIndex;
+  int   i, j, prevValue, value, QIndex;
   double         a, c0, b[8], pi;
-  register iljpgPtr qptr;
-  register float *sptr;
+  iljpgPtr qptr;
+  float *sptr;
 
   pi = 4.0 * atan(1.0);
   c0 = 1.0 / (2.0 * 0.707106718);
@@ -107,7 +107,7 @@ iljpgError _iljpgDeDCTInit (
     )
 {
     iljpgDataPtr        pData;
-    register int        i;
+    int        i;
 
     pData = pPriv->pData;
 
@@ -135,7 +135,7 @@ iljpgError _iljpgDeDCTCleanup (
     iljpgDecodePrivPtr  pPriv
     )
 {
-    register int        i;
+    int        i;
 
         /*  Free any "rev scale" tables that were allocated in iljpgDeDCTInit() */
     for (i = 0; i < 4; i++) {
@@ -247,27 +247,27 @@ iljpgError _iljpgDeDCTCleanup (
     */
     ILJPG_PRIVATE_EXTERN
 void _iljpgDeDCTFull (
-    register int       *pSrc,
+    int       *pSrc,
     long                nBytesPerRow,
     iljpgPtr            ix,                 /* RETURNED */
-    register float      *pRevScale
+    float      *pRevScale
     )
 {
-  register int   i;
-  register int   *zptr;
+  int   i;
+  int   *zptr;
   float           ox[64];
-  register float in0, in1, in2, in3, in4, in5, in6, in7;
-  register float tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  register float tmp;
-  register int   clipValue;
-  register iljpgPtr ixaddr;
-  register float *oxaddr;
+  float in0, in1, in2, in3, in4, in5, in6, in7;
+  float tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  float tmp;
+  int   clipValue;
+  iljpgPtr ixaddr;
+  float *oxaddr;
   /* Constants needed by the 16 point Winograd Fourier Transform for inv. DCT */
-  register float b1 =  1.41421356;  
-  register float b2 = -2.61312587;
-  register float b3 =  1.41421356;  
-  register float b4 =  1.08239220;  
-  register float b5 =  0.76536686;
+  float b1 =  1.41421356;
+  float b2 = -2.61312587;
+  float b3 =  1.41421356;
+  float b4 =  1.08239220;
+  float b5 =  0.76536686;
   
 
   oxaddr = ox;
@@ -541,27 +541,27 @@ void _iljpgDeDCTFull (
     */
     ILJPG_PRIVATE_EXTERN
 void _iljpgDeDCT4x4 (
-    register int       *pSrc,
+    int       *pSrc,
     long                nBytesPerRow,
     iljpgPtr            ix,                 /* RETURNED */
-    register float      *pRevScale
+    float      *pRevScale
     )
 {
-  register int   i;
-  register int   *zptr;
+  int   i;
+  int   *zptr;
   float           ox[64];
-  register float in0, in2, in3, in4, in5, in7;
-  register float tmp0, tmp1, tmp2, tmp5, tmp6, tmp7;
-  register float tmp;
-  register float *oxaddr;
-  register int   clipValue;
-  register iljpgPtr ixaddr;
+  float in0, in2, in3, in4, in5, in7;
+  float tmp0, tmp1, tmp2, tmp5, tmp6, tmp7;
+  float tmp;
+  float *oxaddr;
+  int   clipValue;
+  iljpgPtr ixaddr;
   /* Constants needed by the 16 point Winograd Fourier Transform for inv. DCT */
-  register float b1 =  1.41421356;  
-  register float b2 = -2.61312587;
-  register float b3 =  1.41421356;  
-  register float b4 =  1.08239220;  
-  register float b5 =  0.76536686;
+  float b1 =  1.41421356;
+  float b2 = -2.61312587;
+  float b3 =  1.41421356;
+  float b4 =  1.08239220;
+  float b5 =  0.76536686;
 
 #ifdef NOTDEF
   orxptr = ox;
@@ -804,12 +804,12 @@ void _iljpgDeDCT4x4 (
 void _iljpgDeDCTDCOnly (
     int                *pSrc,
     long                nBytesPerRow,
-    register iljpgPtr   pDst,               /* RETURNED */
+    iljpgPtr   pDst,               /* RETURNED */
     float              *pRevScale
     )
 {
-  register int   i, dc;
-  register int   j;
+  int   i, dc;
+  int   j;
 
   j       = *pSrc;
   j = (j < -2047) ? -2047 : ((j > 2047) ? 2047 : j);
index 52ba7289ce1a87b6722381fbf6c6d517bba2e1ad..f0e588cd94e36e5882079c63c5bd275456135310 100644 (file)
@@ -492,8 +492,8 @@ iljpgError _iljpgDehuffExecute (
 #define         is_dc   (!coeff_ct)     /* First coefficient is DC */
         int             delta;
         int             len, zrun; 
-        register BITBUF bitbuf, ch, c;
-        register int    bitsleft;
+        BITBUF bitbuf, ch, c;
+        int    bitsleft;
         iljpgError      error = 0;      /* assume no error */
         int             index;
         int             is_fourx4 = 1, is_dconly = 0;
index 74568069480703b0cae0158f72e47548958e20d5..82192c68ca0a66a0a945af4fe74096553ed3b4d7 100644 (file)
     */
     ILJPG_PUBLIC
 iljpgError iljpgEncodeInit (
-    register iljpgDataPtr pData,
+    iljpgDataPtr pData,
     iljpgPtr           *pPrivate                /* RETURNED */
     )
 {
-    register iljpgEncodePrivPtr pPriv;
-    register iljpgECompPtr pComp;
+    iljpgEncodePrivPtr pPriv;
+    iljpgECompPtr pComp;
     iljpgCompDataPtr    pCompData;
     int                 comp;
     iljpgError          error;
-    register unsigned int   index, i;
+    unsigned int   index, i;
 
         /*  Validate *pData: valid hori/vertFactor, tables present, etc. */
     if (!_iljpgValidPars (pData))
@@ -108,8 +108,8 @@ iljpgError iljpgEncodeCleanup (
     iljpgPtr            pPrivate
     )
 {
-    register int        i;
-    register iljpgEncodePrivPtr pPriv;
+    int        i;
+    iljpgEncodePrivPtr pPriv;
     iljpgError          error;
 
         /*  Free any scaled Q tables created by Init() */
@@ -151,7 +151,7 @@ iljpgError iljpgEncodeExecute (
 {
     iljpgEncodePrivPtr  pPriv;
     iljpgDataPtr        pData;
-    register iljpgECompPtr pComp;
+    iljpgECompPtr pComp;
     iljpgPtr            pPixels;
     iljpgError          error;
     long                nBytesPerRow, mcuMaxX, mcuMaxY, bX, bY;
@@ -201,8 +201,8 @@ iljpgError iljpgEncodeExecute (
                                 clipped replicate pixel or above scan line out to 8x8.
                             */
                         {   int             nBytesInit;
-                            register int    nLines, nBytesM1, *pDst, *pDstLine;
-                            register iljpgPtr pSrc, pSrcLine;
+                            int    nLines, nBytesM1, *pDst, *pDstLine;
+                            iljpgPtr pSrc, pSrcLine;
 
                             nLines = pComp->height - bY;
                             if (nLines > 8) 
index 3545a171b567be0af4e7dc6b3cdf2e4b1a49c844..f77d2bcd3895682055c2591ba2a3d0da98e0ae4b 100644 (file)
@@ -91,7 +91,7 @@ static iljpgError iljpgWriteHuffmanTable (
     ILJPG_ENCODE_STREAM stream
     )
 {
-    register int        i, nBytes;
+    int        i, nBytes;
     iljpgError          error;
 
         /*  Huffman tables are: 16 bytes of # occurrences each # bits, followed by
@@ -133,10 +133,10 @@ ILJPG_PUBLIC iljpgError iljpgEncodeJIF (
     iljpgJIFOffsetsPtr  pOffsets
     )
 {
-    register int        index, i;
-    register iljpgPtr   pTable;
-    register iljpgError error;
-    register iljpgCompDataPtr pComp;
+    int        index, i;
+    iljpgPtr   pTable;
+    iljpgError error;
+    iljpgCompDataPtr pComp;
     long                startOffset;
 
 #   define PUT_BYTE(_byte)  {                              \
index 0ca8defdfae28b6abe81b23ad4b8ab9ba46bf416..c2011ad46230c9181caa6dc112ca14fe4422548e 100644 (file)
@@ -128,11 +128,11 @@ ILJPG_PRIVATE iljpgError _iljpgEnDCTScale (
     float              *pDst
     )
 {
-  register int   i, j, k, temp;
+  int   i, j, k, temp;
   double         a, c0, b[8], pi;
-  register float *sptr;
-  register iljpgPtr qptr;
-  register int   *cptr;
+  float *sptr;
+  iljpgPtr qptr;
+  int   *cptr;
    
   pi   = 4.0 * atan(1.0);
   c0   = 1.0 / (2.0 * 0.707106718);
@@ -175,19 +175,19 @@ static void fwfwddct_8x8 (
     float *ox  /* pointer to 8x8 output array containing DCT coefficients */
     )
 {
-  register float in0, in1, in2, in3, in4, in5, in6, in7;
-  register float tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
-  register float tmp;
-  register int   *ixaddr;
-  register float *oxaddr;
+  float in0, in1, in2, in3, in4, in5, in6, in7;
+  float tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
+  float tmp;
+  int   *ixaddr;
+  float *oxaddr;
   int            i;
   int            j;
   /* constants needed by the 16 point Winograd Fourier Transform method */
-  register float a1 =  0.707106718;
-  register float a2 = -0.541196100;
-  register float a3 =  0.707106718;
-  register float a4 =  1.306562963;
-  register float a5 =  0.382683432; 
+  float a1 =  0.707106718;
+  float a2 = -0.541196100;
+  float a3 =  0.707106718;
+  float a4 =  1.306562963;
+  float a5 =  0.382683432;
 
 #ifdef DEBUG
   ixaddr = ix;
@@ -441,12 +441,12 @@ ILJPG_PRIVATE _iljpgEnDCT (
     float      *pScale
     )
 {
-  register int   i, value;
-  register float *sptr;
-  register int   *ixptr;
-  register float *oxptr;
-  register int   *zptr; 
-  register float  fvalue;
+  int   i, value;
+  float *sptr;
+  int   *ixptr;
+  float *oxptr;
+  int   *zptr;
+  float  fvalue;
   float           ox[64];   /* DCT coefficient buffer */
 
 
index 95a7f349b8ea4fa5bc74e1535b2e25d94538cd3f..53cbd172586a42ee4369f8df9606cf187ad401f6 100644 (file)
@@ -89,12 +89,12 @@ typedef struct {
     */
     ILJPG_PRIVATE 
 iljpgError _iljpgBuildEnhuffTable (
-    register iljpgPtr       pTableIn,
+    iljpgPtr       pTableIn,
     iljpgEnhuffTablePtr    *ppTableOut          /* RETURNED */
     )
 {
-    register iljpgEnhuffTablePtr pTable;
-    register int            i, j, nValues, value;
+    iljpgEnhuffTablePtr pTable;
+    int            i, j, nValues, value;
     int                     huffSize[257];      /* called "HUFFSIZE" in JPEG spec */
     int                     huffCode[257];      /* called "HUFFCODE" in JPEG spec */
 
@@ -156,10 +156,10 @@ iljpgError _iljpgEnhuffInit (
     iljpgEncodePrivPtr      pPriv
     )
 {
-    register iljpgEnhuffPtr pHuffPriv;
-    register iljpgDataPtr   pData;
+    iljpgEnhuffPtr pHuffPriv;
+    iljpgDataPtr   pData;
     iljpgError              error;
-    register int            i;
+    int            i;
 
         /*  Allocate Huffman private area and point to it in encode private */
     pData = pPriv->pData;
@@ -227,12 +227,12 @@ iljpgError _iljpgEnhuffCleanup (
     */
 static iljpgError _iljpgPackHuffman (
     iljpgEnhuffPtr      pHuffPriv,
-    register int       *pHuff,
-    register int        nHuff,
+    int       *pHuff,
+    int        nHuff,
     ILJPG_ENCODE_STREAM stream
     )
 {
-    register int        size, value, huffBits, nHuffBits;
+    int        size, value, huffBits, nHuffBits;
     iljpgError          error;
     static int          sizeMasks[9] =     /* masks for lower "i" bits, indexed by i */
                             {0x0, 0x1, 0x3, 0x7, 0x0f, 0x1f, 0x3f, 0x7f, 0x0ff};
@@ -290,10 +290,10 @@ iljpgError _iljpgEnhuffExecute (
     )
 {
     iljpgEnhuffPtr  pHuffPriv;
-    register iljpgEnhuffTablePtr    pTable;
+    iljpgEnhuffTablePtr    pTable;
     int             huff[4 * 64 + 10];  /* room for 64 * 2 pairs plus some slop */
-    register int   *pHuff;
-    register int    size, value, nACLeft, nZeros;
+    int   *pHuff;
+    int    size, value, nACLeft, nZeros;
 #   define ENHUFF(_value) { \
         *pHuff++ = pTable->size[_value]; \
         *pHuff++ = pTable->code[_value]; \
@@ -379,8 +379,8 @@ iljpgError _iljpgEnhuffFlush (
     ILJPG_ENCODE_STREAM stream
     )
 {
-    register iljpgEnhuffPtr pHuffPriv;
-    register int        nHuffBits, huffBits;
+    iljpgEnhuffPtr pHuffPriv;
+    int        nHuffBits, huffBits;
     iljpgError          error;
 
         /*  If any bits left, flush them out.  Pad with binary 1's, and
index 27850a03680dfc71cf9093d7ad198dfd88281cb1..d25fe9f6e7683f3fed1afb4de94d99a59908c1a6 100644 (file)
@@ -85,7 +85,7 @@ int _iljpgZigzagTable[];
     */
     ILJPG_PRIVATE_EXTERN 
 iljpgBool _iljpgValidPars (
-    register iljpgDataPtr pData
+    iljpgDataPtr pData
     );
 
 #endif
index bc8b2bdbe114cefb0166f9db529144ace96e53a1..52212f342ee9a225c529981fddbe7265ea645ea5 100644 (file)
@@ -59,12 +59,12 @@ int _iljpgZigzagTable[64] = {
     */
     ILJPG_PRIVATE
 iljpgBool _iljpgValidPars (
-    register iljpgDataPtr pData
+    iljpgDataPtr pData
     )
 {
     int                 comp;
     iljpgCompDataPtr    pCompData;
-    register unsigned int   index;
+    unsigned int   index;
 #define VALID_FACTOR(_f) ( ((_f) == 1) || ((_f) == 2) || ((_f) == 4) )
 
         /*  Validate *pData: valid hori/vertFactor, tables present, etc. */
index 5eab18350bd305d5a7cc93d325f3c533e97c544c..e281943225e8cb31443fef0bcb150f015394de5c 100644 (file)
@@ -78,8 +78,8 @@ static ilError ilMapByteExecute (
 ilMapPrivPtr                pPriv;
 long                        srcRowBytes, dstRowBytes, nRowsM1, nLinesM1;
 ilPtr                       pSrcLine, pDstLine;
-register long               rowCount;
-register ilPtr              pSrc, pDst, pTranslate;
+long               rowCount;
+ilPtr              pSrc, pDst, pTranslate;
 
         /*  Get data from private, exit if no rows or lines to do.
         */
@@ -127,8 +127,8 @@ static ilError ilMap3ByteExecute (
 ilMapPrivPtr                pPriv;
 long                        srcRowBytes, dstRowBytes, nRowsM1, nLinesM1;
 ilPtr                       pSrcLine, pDstLine;
-register long               rowCount;
-register ilPtr              pSrc, pDst, pTranslate;
+long               rowCount;
+ilPtr              pSrc, pDst, pTranslate;
 
         /*  Get data from private, exit if no rows or lines to do.
         */
@@ -193,8 +193,8 @@ ilBool ilMap (
     ilClientImage       mapImage
     )
 {
-register ilMapPrivPtr   pPriv;
-register ilContext      context;
+ilMapPrivPtr   pPriv;
+ilContext      context;
 ilPipeInfo              info;
 ilImageDes              des;
 ilImageFormat           format;
index d99600ae0c428b86ca8bf1c89fb01c0a67887f36..4304aa6a9ae845a05a708b6b24e5f33f1f8e6110 100644 (file)
@@ -67,7 +67,7 @@ static ilError ilMirrorInit(
     )
 
 {
register unsigned char  *pdstline;
+ unsigned char  *pdstline;
  ilImagePlaneInfo           *pplane;
 
 
@@ -91,17 +91,17 @@ static ilError ilMirrorInit(
 
    ============================================================================================================================= */
 static ilError ilMirrorXBitonalExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
                         
 
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
 ilImagePlaneInfo           *pplane;
-register int               x, y, lastcount, srcnbytes, dstnbytes;
-register ilMirrorPrivptr   pPriv;
+int               x, y, lastcount, srcnbytes, dstnbytes;
+ilMirrorPrivptr   pPriv;
 
 
 
@@ -146,19 +146,19 @@ register ilMirrorPrivptr   pPriv;
 
    ============================================================================================================================= */
 static ilError ilMirrorYBitonalExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
                         
 
-register unsigned char     *psrc, *pdst, *psrcline, *psrcbefore, *pdstline;
-register unsigned char     srcbyte;
+unsigned char     *psrc, *pdst, *psrcline, *psrcbefore, *pdstline;
+unsigned char     srcbyte;
 ilImagePlaneInfo           *pplane;
-register int               x, y, lastcount, loffset, roffset;
-register int               srcnbytes, dstnbytes, widthbytes;
-register ilMirrorPrivptr   pPriv;
+int               x, y, lastcount, loffset, roffset;
+int               srcnbytes, dstnbytes, widthbytes;
+ilMirrorPrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -220,18 +220,18 @@ register ilMirrorPrivptr   pPriv;
 
    ============================================================================================================================= */
 static ilError ilMirrorX3ByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
 
 
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
 ilImagePlaneInfo           *pplane;
-register int               x, y, lastcount;
-register ilMirrorPrivptr   pPriv;
+int               x, y, lastcount;
+ilMirrorPrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -279,18 +279,18 @@ register ilMirrorPrivptr   pPriv;
 
    ============================================================================================================================= */
 static ilError ilMirrorY3ByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
 
 
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
 ilImagePlaneInfo           *pplane;
-register int               x, y, xoffset, lastcount;
-register ilMirrorPrivptr   pPriv;
+int               x, y, xoffset, lastcount;
+ilMirrorPrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -340,18 +340,18 @@ register ilMirrorPrivptr   pPriv;
 
    ============================================================================================================================= */
 static ilError ilMirrorXByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
 
 
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
 ilImagePlaneInfo           *pplane;
-register int               x, y, lastcount;
-register ilMirrorPrivptr   pPriv;
+int               x, y, lastcount;
+ilMirrorPrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -395,18 +395,18 @@ register ilMirrorPrivptr   pPriv;
 
    ============================================================================================================================= */
 static ilError ilMirrorYByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
 
 
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
 ilImagePlaneInfo           *pplane;
-register int               x, y, lastcount;
-register ilMirrorPrivptr   pPriv;
+int               x, y, lastcount;
+ilMirrorPrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -460,7 +460,7 @@ ilBool ilMirror (
 {
 unsigned int              state;
 ilPipeInfo                info;
-register ilMirrorPrivptr  pPriv;
+ilMirrorPrivptr  pPriv;
 ilDstElementData          dstdata;
 ilImageDes                imdes;
 ilImageFormat             imformat;
index 0299e428b2375f191550a275769f893fd3581b7e..d81fa88ecbedfbb65230ec5995b53ec630c2fccb 100644 (file)
@@ -67,8 +67,8 @@ IL_PRIVATE ilObjectPtr _ilCreateObject (
     size_t              sizeInBytes             /* size of object to create */
     )
 {
-register ilContextPtr   pContext;
-register ilObjectPtr    pObject;
+ilContextPtr   pContext;
+ilObjectPtr    pObject;
 
         /*  Allocate object rec, return if failure.
         */
@@ -106,7 +106,7 @@ ilBool ilDestroyObject (
     ilObject            object
     )
 {
-register ilObjectPtr    pObject;
+ilObjectPtr    pObject;
 
         /*  Downcount refCount, exit if not zero - object is still attached to others.
             Call object-specific destroy function, free client private if present, 
@@ -161,7 +161,7 @@ IL_PRIVATE void _ilObjectDestroyContext (
     ilContextPtr        pContext
     )
 {
-register ilObjectPtr    pObject, pNextObject, pObjectHead;
+ilObjectPtr    pObject, pNextObject, pObjectHead;
 
         /*  Loop thru and destroy all objects until list points back to head (done).
         */
index b879dc8bbc779d76560e11c379bd2a78c3de44cb..c1982e3fa7bf888e87ee3297d0065d9ffd0bcc98 100644 (file)
@@ -102,9 +102,9 @@ static void ilInitPackedPalette (
     ilPaletteToRGBPrivPtr pPriv
     )
 {
-register int                i;
-register unsigned long     *pPacked, packed;
-register unsigned short    *pRed, *pGreen, *pBlue, temp;
+int                i;
+unsigned long     *pPacked, packed;
+unsigned short    *pRed, *pGreen, *pBlue, temp;
 
         /*  Pack the upper 8 bits of the rgb value, with blue in the high order bits. */
     pPacked = pPriv->palette;
@@ -138,9 +138,9 @@ static ilError ilExecutePaletteToRGBByte (
 ilPaletteToRGBPrivPtr       pPriv;
 long                        srcRowBytes, dstRowBytes, nPixelsM1;
 ilPtr                       pSrcLine, pDstLine;
-register ilPtr              pSrc, pDst;
-register unsigned long      rgb, *pPackedPalette;
-register long               nLinesM1, nPixelsM1Temp;
+ilPtr              pSrc, pDst;
+unsigned long      rgb, *pPackedPalette;
+long               nLinesM1, nPixelsM1Temp;
 
         /*  If firstStrip, init the packed palette in private */
     pPriv = (ilPaletteToRGBPrivPtr)pData->pPrivate;
index 22b9595a1f04390828a09d0171e2d68a9ced6eab..e78052ffb43d4ad5837627690101cf9d0b1934fe 100644 (file)
@@ -80,7 +80,7 @@ typedef struct _ilElementRec {
     ilError           (*Cleanup)();
     ilError           (*Destroy)();
     ilError           (*ExecuteThree)();
-    ilError           (*ExecuteFour)(register ilExecuteData *,
+    ilError           (*ExecuteFour)(ilExecuteData *,
                                     long,
                                     long *,
                                     float);
@@ -227,10 +227,10 @@ void _ilSetDefaultStripSize (
             structures are not freed; just the pixels.
         */
 static void ilFreeTempImageBuffers (
-    register ilPipePtr  pPipe
+    ilPipePtr  pPipe
     )
 {
-register ilImagePtr     pImage;
+ilImagePtr     pImage;
 
     pImage = (ilImagePtr)pPipe->imageHead.pNext;
     while (pImage != (ilImagePtr)&pPipe->imageHead) {
@@ -245,13 +245,13 @@ register ilImagePtr     pImage;
             height of the image is not set; the caller must do that.
         */
 static ilImagePtr ilAllocTempImage (
-    register ilPipePtr      pPipe,
+    ilPipePtr      pPipe,
     ilPipeInfo             *pInfo,
     ilImageDes             *pDes,
     ilImageFormat          *pFormat
     )
 {
-register ilImagePtr         pImage;
+ilImagePtr         pImage;
 
     pImage = (ilImagePtr)IL_MALLOC (sizeof (ilImageRec));
     if (!pImage)
@@ -290,11 +290,11 @@ register ilImagePtr         pImage;
             The pipe state is set to IL_PIPE_COMPLETE.
         */
 static ilError ilCleanupRunningPipe (
-    register ilPipePtr  pPipe,
+    ilPipePtr  pPipe,
     ilBool              aborting
     )
 {
-register ilElementPtr   pElement, pElementHead;
+ilElementPtr   pElement, pElementHead;
 ilError                 error, prevError;
 
         /*  Run thru the list of elements and call Cleanup function if non-null, then
@@ -336,9 +336,9 @@ ilBool ilEmptyPipe (
     ilPipe              pipe
     )
 {
-register ilPipePtr      pPipe;
-register ilElementPtr   pElement, pNextElement, pElementHead;
-register ilImagePtr     pImage, pNextImage;
+ilPipePtr      pPipe;
+ilElementPtr   pElement, pNextElement, pElementHead;
+ilImagePtr     pImage, pNextImage;
 int                     i;
 ilError                 error;
 
@@ -419,7 +419,7 @@ ilPipe ilCreatePipe (
     unsigned long       mustBeZero
     )
 {
-register ilPipePtr   pPipe;
+ilPipePtr   pPipe;
 
     if (mustBeZero != 0) {
         context->error = IL_ERROR_PAR_NOT_ZERO;
@@ -462,7 +462,7 @@ ilBool ilDeclarePipeInvalid (
     ilError             error
     )
 {
-register ilPipePtr   pPipe;
+ilPipePtr   pPipe;
 
     pPipe = (ilPipePtr)pipe;
     ilEmptyPipe ((ilPipe)pPipe);
@@ -484,7 +484,7 @@ unsigned int ilQueryPipe (
     ilImageDes         *pDes                    /* RETURNED */
     )
 {
-register ilPipePtr   pPipe;
+ilPipePtr   pPipe;
 
     pPipe = (ilPipePtr)pipe;
     if (pPipe->o.p.objectType != IL_PIPE) {
@@ -519,7 +519,7 @@ unsigned int ilGetPipeInfo (
     ilImageFormat      *pFormat
     )
 {
-register ilPipePtr   pPipe;
+ilPipePtr   pPipe;
 
     pPipe = (ilPipePtr)pipe;
     if (pPipe->o.p.objectType != IL_PIPE) {
@@ -560,7 +560,7 @@ long ilRecommendedStripHeight (
     )
 {
 long                    bytesPerRow [IL_MAX_SAMPLES];
-register long           stripHeight, nBytes;
+long           stripHeight, nBytes;
 int                     i;
 
         /*  Get the bytes/row, per plane.  If pixel format, all bytes are in plane 0,
@@ -597,10 +597,10 @@ int                     i;
             pipe height is changed (limits stripHeight to image height).
         */
 static void ilChangeStripHeight (
-    register ilPipePtr  pPipe
+    ilPipePtr  pPipe
     )
 {
-register long           stripHeight;
+long           stripHeight;
 
         /*  Limit stripHeight to pipe height. */
     stripHeight = pPipe->image.info.stripHeight;
@@ -611,7 +611,7 @@ register long           stripHeight;
 
         /*  If uncompressed image, calc recommendedStripHeight else current stripHeight */
     if (pPipe->image.des.compression == IL_UNCOMPRESSED) {
-        register long   i;
+        long   i;
         i = ilRecommendedStripHeight (&pPipe->image.des, &pPipe->image.format, 
                                       pPipe->image.info.width, pPipe->image.info.height);
         pPipe->image.info.recommendedStripHeight = (i > stripHeight) ? stripHeight : i;
@@ -635,7 +635,7 @@ IL_PRIVATE ilBool _ilAddPipeDestroyObject (
     ilObject            object
     )
 {
-register ilPipePtr      pPipe;
+ilPipePtr      pPipe;
 
     pPipe = (ilPipePtr)pipe;
     if (pPipe->nDestroyObjects >= IL_MAX_DESTROY_OBJECTS) {
@@ -657,7 +657,7 @@ register ilPipePtr      pPipe;
         */
 IL_PRIVATE ilBool _ilAddProducerImage (
     ilPipe              pipe,
-    register ilImagePtr pImage,
+    ilImagePtr pImage,
     unsigned int        producerCode,
     long                height,
     long                stripHeight,
@@ -665,7 +665,7 @@ IL_PRIVATE ilBool _ilAddProducerImage (
     ilBool              needProducerThrottle
     )
 {
-register ilPipePtr      pPipe;
+ilPipePtr      pPipe;
 
         /*  Copy image data into pipe info, point to given image as producer. */
     pPipe = (ilPipePtr)pipe;
@@ -714,8 +714,8 @@ IL_PRIVATE ilBool _ilSetFeedPipeData (
     long                nCompBytes
     )
 {
-register ilPipePtr      pPipe;
-register ilImagePtr     pImage;
+ilPipePtr      pPipe;
+ilImagePtr     pImage;
 
     pPipe = (ilPipePtr)pipe;
     if (pPipe->producerCode != IL_PIPE_FEED_IMAGE)
@@ -754,7 +754,7 @@ IL_PRIVATE void _ilSetPipeDesFormat (
     ilImageFormat      *pFormat
     )
 {
-register ilPipePtr      pPipe;
+ilPipePtr      pPipe;
 
     pPipe = (ilPipePtr)pipe;
     if (pDes)
@@ -784,16 +784,16 @@ ilPtr ilAddPipeElement (
 ** parameter which is a floating pointing.
 */
     ilError           (*ExecuteThree)(),
-    ilError           (*ExecuteFour)(register ilExecuteData *,
+    ilError           (*ExecuteFour)(ilExecuteData *,
                                              long,
                                              long *,
                                              float),
     unsigned long       mustBeZero
     )
 {
-register ilPipePtr      pPipe;
+ilPipePtr      pPipe;
 unsigned int            newState;           /* pipe state after this element added */
-register ilElementPtr   pElement;           /* ptr to new element to add to list */
+ilElementPtr   pElement;           /* ptr to new element to add to list */
 ilElementPtr            pPrevElement;
 ilError                 error;
 long                    stripHeight, srcBufferHeight;
@@ -1143,7 +1143,7 @@ ilBool ilAbortPipe (
     ilPipe              pipe
     )
 {
-register ilPipePtr      pPipe;
+ilPipePtr      pPipe;
 
     pPipe = (ilPipePtr)pipe;
     if (pPipe->o.p.objectType != IL_PIPE) {
@@ -1168,8 +1168,8 @@ int ilExecutePipe (
     float               ratio
     )
 {
-register ilPipePtr      pPipe;
-register ilElementPtr   pElement, pExecHead, pElementHead;
+ilPipePtr      pPipe;
+ilElementPtr   pElement, pExecHead, pElementHead;
 ilImagePtr              pImage;
 long                    nLines, initNLines;
 ilError                 error;
index 47c58f68a04fb52720729dda6475900e4f599268..84709d7fd789c9cd3e5725d74980d35b3ef91909 100644 (file)
@@ -63,7 +63,7 @@
     */
 IL_EXTERN ilBool _ilAddProducerImage (
     ilPipe              pipe,
-    register ilImagePtr pImage,
+    ilImagePtr pImage,
     unsigned int        producerCode,
     long                height,
     long                stripHeight,
index 7ad8853a67123ad98e099ecba200678476f69906..39178b6dd8e95035c9dc184e2dfe992430d1bdd2 100644 (file)
@@ -190,7 +190,7 @@ extern ilPtr ilAddPipeElement (
 ** parameter which is a floating pointing.
 */
     ilError           (*ExecuteThree)(),
-    ilError           (*ExecuteFour)( register ilExecuteData *,
+    ilError           (*ExecuteFour)( ilExecuteData *,
                                  long,
                                  long *,
                                  float),
index 0a3ab952419e6f572fb2dd3ab267b5194e0314eb..3baa4620937fd81d417e26db08b7e97b077a2075 100644 (file)
@@ -219,7 +219,7 @@ static ilError ilReadXExecute (
     long                   *pNLines
     )
 {
-register ilReadXPrivPtr     pPriv;
+ilReadXPrivPtr     pPriv;
 Drawable                    readDrawable;
 ilBool                      lastStrip;
 long                        nLines;
@@ -278,9 +278,9 @@ long                        srcRowBytes, dstRowBytes, nBytesToCopy;
         /*  If a long/pixel image, must extract IL RGB bytes from X long/pixel image.
         */
     if (pPriv->isLongImage) {
-        register ilPtr          pDst;
-        register unsigned long  temp, *pSrc;
-        register long           nLongsM1;
+        ilPtr          pDst;
+        unsigned long  temp, *pSrc;
+        long           nLongsM1;
 
         while (nLines-- > 0) {
             pSrc = (unsigned long *)pSrcLine;
@@ -305,8 +305,8 @@ long                        srcRowBytes, dstRowBytes, nBytesToCopy;
                  copy buffer, else one line at a time.
             */
         if ((Ximage->depth == 1) && (Ximage->bitmap_bit_order == LSBFirst)) {
-            register ilPtr          pSrc, pDst;
-            register long           nBytesM1;
+            ilPtr          pSrc, pDst;
+            long           nBytesM1;
 
             if (nBytesToCopy > 0)
                 while (nLines-- > 0) {
@@ -348,7 +348,7 @@ static ilError ilReadXExecuteSlow (
     long                   *pNLines
     )
 {
-register ilReadXPrivPtr     pPriv;
+ilReadXPrivPtr     pPriv;
 ilReadXPrivRec              priv;  
 Drawable                    readDrawable;
 ilBool                      lastStrip;
@@ -408,9 +408,9 @@ long                        srcRowBytes, dstRowBytes, nBytesToCopy;
         /*  If a long/pixel image, must extract IL RGB bytes from X long/pixel image.
         */
     if (pPriv->isLongImage) {
-        register ilPtr          pDst;
-        register unsigned long  temp, *pSrc;
-        register long           nLongsM1;
+        ilPtr          pDst;
+        unsigned long  temp, *pSrc;
+        long           nLongsM1;
         unsigned int            X, Y;
 
        XVisualInfo             *pVisualInfo;
@@ -446,8 +446,8 @@ long                        srcRowBytes, dstRowBytes, nBytesToCopy;
                  copy buffer, else one line at a time.
             */
         if ((Ximage->depth == 1) && (Ximage->bitmap_bit_order == LSBFirst)) {
-            register ilPtr          pSrc, pDst;
-            register long           nBytesM1;
+            ilPtr          pSrc, pDst;
+            long           nBytesM1;
 
             if (nBytesToCopy > 0)
                 while (nLines-- > 0) {
index f3086f15fe22c4048a09ebd4f12f6cfbb6d515fb..1002c9a9251ce714223a3434318a58e135f4d87d 100644 (file)
@@ -70,13 +70,13 @@ static ilError ilRCIInit (
     /*  Execute() for ilReadImage() producer when the image is compressed.
     */
 static ilError ilRCIExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                    dstLine,            /* ignored */
     long                   *pNLines             /* ignored on input */
     )
 {
-register ilRCIPrivPtr       pPriv;
-register ilImagePtr         pImage;
+ilRCIPrivPtr       pPriv;
+ilImagePtr         pImage;
 long                        offset;
 
     pPriv = (ilRCIPrivPtr)pData->pPrivate;
@@ -114,8 +114,8 @@ ilBool ilReadImage (
     ilObject            image
     )
 {
-register ilImagePtr     pImage;
-register ilRCIPrivPtr   pPriv;
+ilImagePtr     pImage;
+ilRCIPrivPtr   pPriv;
 
         /*  Validate that pipe and image are such, have same context and pipe empty */
     pImage = (ilImagePtr)image;
index 2f095be0dc9de5d8376c5e2278e3ce9de0ae9602..6d006ed5d7d98cbff93b89ffcb9768aab2c0f488 100644 (file)
@@ -73,7 +73,7 @@ static ilError ilRotateInit(
     )
 
 {
register unsigned char  *pdstline;
+ unsigned char  *pdstline;
  ilImagePlaneInfo        *pplane;
  int                     bitoff;
 
@@ -115,22 +115,22 @@ static ilError ilRotateInit(
 
    ============================================================================================================================= */
 static ilError ilRotate90BitonalExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
    
 
-register unsigned long     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnwords, dstnwords;
+unsigned long     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnwords, dstnwords;
 ilImagePlaneInfo           *pplane;
-register int               x, y, xoffset, lastcount;
-register ilRotatePrivptr   pPriv;
+int               x, y, xoffset, lastcount;
+ilRotatePrivptr   pPriv;
 
-register unsigned long     srcMask;
-register unsigned long     srcLong;
-register ilBool            shortwidth;
+unsigned long     srcMask;
+unsigned long     srcLong;
+ilBool            shortwidth;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -203,19 +203,19 @@ register ilBool            shortwidth;
 
    ============================================================================================================================= */
 static ilError ilRotate180BitonalExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
                         
 
-register unsigned char     *psrc, *pdst, *psrcline, *psrcbefore, *pdstline;
-register unsigned char     srcbyte;
+unsigned char     *psrc, *pdst, *psrcline, *psrcbefore, *pdstline;
+unsigned char     srcbyte;
 ilImagePlaneInfo           *pplane;
-register int               x, y, lastcount, loffset, roffset;
-register int               srcnbytes, dstnbytes, widthbytes;
-register ilRotatePrivptr   pPriv;
+int               x, y, lastcount, loffset, roffset;
+int               srcnbytes, dstnbytes, widthbytes;
+ilRotatePrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -276,22 +276,22 @@ register ilRotatePrivptr   pPriv;
 
    ============================================================================================================================= */
 static ilError ilRotate270BitonalExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
 
 
-register unsigned long     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnwords, dstnwords;
+unsigned long     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnwords, dstnwords;
 ilImagePlaneInfo           *pplane;
-register int               x, y, xoffset, lastcount;
-register ilRotatePrivptr   pPriv;
+int               x, y, xoffset, lastcount;
+ilRotatePrivptr   pPriv;
 
-register unsigned long     srcMask, dstMask;
-register unsigned long     srcLong, dstLong;
-register ilBool            shortwidth;
+unsigned long     srcMask, dstMask;
+unsigned long     srcLong, dstLong;
+ilBool            shortwidth;
 
 
 
@@ -365,16 +365,16 @@ register ilBool            shortwidth;
 
    ============================================================================================================================= */
 static ilError ilRotate903ByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
 ilImagePlaneInfo           *pplane;
-register int               x, y, xoffset, lastcount;
-register ilRotatePrivptr   pPriv;
+int               x, y, xoffset, lastcount;
+ilRotatePrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -425,18 +425,18 @@ register ilRotatePrivptr   pPriv;
 
    ============================================================================================================================= */
 static ilError ilRotate1803ByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
 
 
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
 ilImagePlaneInfo           *pplane;
-register int               x, y, xoffset, lastcount;
-register ilRotatePrivptr   pPriv;
+int               x, y, xoffset, lastcount;
+ilRotatePrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -486,7 +486,7 @@ register ilRotatePrivptr   pPriv;
 
    ============================================================================================================================= */
 static ilError ilRotate2703ByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
@@ -494,11 +494,11 @@ static ilError ilRotate2703ByteExecute (
 
 
 
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
 ilImagePlaneInfo           *pplane;
-register int               x, y, lastcount, xoffset;
-register ilRotatePrivptr   pPriv;
+int               x, y, lastcount, xoffset;
+ilRotatePrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -544,7 +544,7 @@ register ilRotatePrivptr   pPriv;
 
    ============================================================================================================================= */
 static ilError ilRotate90ByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
@@ -552,12 +552,12 @@ static ilError ilRotate90ByteExecute (
 
 
 
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
 ilImagePlaneInfo           *pplane;
-register int               x, y, xoffset, lastcount;
+int               x, y, xoffset, lastcount;
 unsigned int               dstrowpixels;
-register ilRotatePrivptr   pPriv;
+ilRotatePrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -601,18 +601,18 @@ register ilRotatePrivptr   pPriv;
 
    ============================================================================================================================= */
 static ilError ilRotate180ByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
 
 
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
 ilImagePlaneInfo           *pplane;
-register int               x, y, lastcount;
-register ilRotatePrivptr   pPriv;
+int               x, y, lastcount;
+ilRotatePrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -654,18 +654,18 @@ register ilRotatePrivptr   pPriv;
 
    ============================================================================================================================= */
 static ilError ilRotate270ByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
 
 
-register unsigned char     *psrc, *pdst, *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
+unsigned char     *psrc, *pdst, *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
 ilImagePlaneInfo           *pplane;
-register int               x, y, lastcount, xoffset;
-register ilRotatePrivptr   pPriv;
+int               x, y, lastcount, xoffset;
+ilRotatePrivptr   pPriv;
 
 
    if (*pNLines <= 0)  return IL_OK;
@@ -721,7 +721,7 @@ ilBool ilRotate90 (
 {
 unsigned int              state;
 ilPipeInfo                info;
-register ilRotatePrivptr  pPriv;
+ilRotatePrivptr  pPriv;
 ilDstElementData          dstdata;
 ilImageDes                imdes;
 ilImageFormat             imformat;
index 57ad661b781b2662d8d437294ebda85f228e388f..c3f0afa3fb8efdcb9f94c83e3e58ffdb5c53e870 100644 (file)
@@ -85,12 +85,12 @@ static ilError ilThrottleInit (
             error on last one.
         */
 static ilError ilProducerThrottleExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                    dstLine,            /* ignored */
     long                   *pNLines             /* ignored on input */
     )
 {
-register ilThrottlePrivPtr  pPriv;
+ilThrottlePrivPtr  pPriv;
 
         /*  Set the next elements srcLine to our current line.  Bump srcLine by
             stripHeight (# lines just "written"), but if that is to/past end of image,
@@ -116,12 +116,12 @@ register ilThrottlePrivPtr  pPriv;
             pData->srcLine must be startLine, as passed to ilFeedPipe()
         */
 static ilError ilFeedProducerThrottleExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                    dstLine,            /* ignored */
     long                   *pNLines
     )
 {
-register ilThrottlePrivPtr  pPriv;
+ilThrottlePrivPtr  pPriv;
 long                        nLines;
 
         /*  Point next element to the feed data, set into pData by ilExecutePipe():
@@ -149,12 +149,12 @@ long                        nLines;
         /*  Execute() for when not the producer, but constant strips are not required.
         */
 static ilError ilNonConstantThrottleExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                    dstLine,            /* ignored */
     long                   *pNLines
     )
 {
-register ilThrottlePrivPtr  pPriv;
+ilThrottlePrivPtr  pPriv;
 
 
         /*  Not from a producer, but !constantStrip; easy: caller just wants strips
@@ -203,14 +203,14 @@ register ilThrottlePrivPtr  pPriv;
         /*  Execute() for when not a producer and constant strips are required.
         */
 static ilError ilConstantThrottleExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                    dstLine,            /* ignored */
     long                   *pNLines
     )
 {
-register ilThrottlePrivPtr  pPriv;
+ilThrottlePrivPtr  pPriv;
 long                        nLines, nLinesToWrite;
-register ilError            returnCode;
+ilError            returnCode;
 
     pPriv = (ilThrottlePrivPtr)pData->pPrivate;
     if (pPriv->beingRecalled)
@@ -314,7 +314,7 @@ register ilError            returnCode;
                 Handles uncompressed images only; compressed images handled separately.
         */
 static ilError ilCopyImageExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                    dstLine,
     long                   *pNLines
     )
@@ -326,7 +326,7 @@ long                        srcRowBytes, dstRowBytes;
 long                        nLines, nBytes, srcStart, dstStart;
 int                         nPlanes;
 ilPtr                       pSrcLine, pDstLine;
-register long               lineCount;
+long               lineCount;
 
         /*  Point to src/dst image and first plane of each */
     pSrcImage = pData->pSrcImage;
index 0ae965a8ced7253480fe60ca4bfd32c175c0b4bd..846d850deeb0ae0873f5ece767307a694ebdcfae 100644 (file)
@@ -61,7 +61,7 @@
  } ilScalePriv,  *ilScalePrivptr;
 
 #ifdef LSB_BIT_ORDER
-extern void flip_bits(register ilPtr start, register unsigned n);
+extern void flip_bits(ilPtr start, unsigned n);
 #else
 # define flip_bits(start,n)      /*EMPTY*/
 #endif
@@ -96,16 +96,16 @@ static ilError ilScaleInit(
    ============================================================================================================================= */
 
 static void ilswbitdown(
-    register CARD32 *psrcline,
-    register CARD32 *pdstline,
+    CARD32 *psrcline,
+    CARD32 *pdstline,
     unsigned long   srcwidth,   
     unsigned long   dstwidth
     )
 
 {
-register int            acc, nbits;
-register CARD32                srcMask;
-register CARD32                srcLong;
+int            acc, nbits;
+CARD32         srcMask;
+CARD32         srcLong;
 CARD32                 dstLong;
 ilBool copy;
 ilBool Lastbit;
@@ -215,16 +215,16 @@ ilBool Lastbit;
    ============================================================================================================================= */
 
 static void ilswbitup(
-    register CARD32 *psrcline,
-    register CARD32 *pdstline,
+    CARD32 *psrcline,
+    CARD32 *pdstline,
     unsigned long   srcwidth,   
     unsigned long   dstwidth
     )
 
 {
-register int     acc, nbits;
-register CARD32         srcMask;
-register CARD32         srcLong;
+int     acc, nbits;
+CARD32  srcMask;
+CARD32  srcLong;
 CARD32          dstLong;
 ilBool           Lastbit;
 
@@ -293,14 +293,14 @@ ilBool           Lastbit;
    ============================================================================================================================= */
 
 static void ilsw3bytedown(
-    register unsigned char   *psrcline,
-    register unsigned char   *pdstline,
+    unsigned char   *psrcline,
+    unsigned char   *pdstline,
     unsigned long   srcwidth,   
     unsigned long   dstwidth
     )
 
 {
-register int acc, n3bytes;
+int acc, n3bytes;
 ilBool copy;
 
 
@@ -338,14 +338,14 @@ ilBool copy;
    ============================================================================================================================= */
 
 static void ilsw3byteup(
-    register unsigned char   *psrcline,
-    register unsigned char   *pdstline,
+    unsigned char   *psrcline,
+    unsigned char   *pdstline,
     unsigned long   srcwidth,   
     unsigned long   dstwidth
     )
 
 {
-register int acc, n3bytes;
+int acc, n3bytes;
 
   acc = dstwidth - srcwidth;
   n3bytes = srcwidth;
@@ -373,14 +373,14 @@ register int acc, n3bytes;
    ============================================================================================================================= */
 
 static void ilswbytedown(
-    register unsigned char   *psrcline,
-    register unsigned char   *pdstline,
+    unsigned char   *psrcline,
+    unsigned char   *pdstline,
     unsigned long   srcwidth,   
     unsigned long   dstwidth
     )
 
 {
-register int acc, nbytes;
+int acc, nbytes;
 ilBool copy;
 
 
@@ -412,14 +412,14 @@ ilBool copy;
    ============================================================================================================================= */
 
 static void ilswbyteup(
-    register unsigned char   *psrcline,
-    register unsigned char   *pdstline,
+    unsigned char   *psrcline,
+    unsigned char   *pdstline,
     unsigned long   srcwidth,   
     unsigned long   dstwidth
     )
 
 {
-register int acc, nbytes;
+int acc, nbytes;
 
   acc = dstwidth - srcwidth;
   nbytes = srcwidth;
@@ -447,18 +447,18 @@ register int acc, nbytes;
                                 to scale the width.
    ============================================================================================================================= */
 static ilError ilScaleBitonalExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
-register CARD32                   *psrcline, *pdstline;
-register unsigned long     srcnwords, dstnwords;
-register long              nlines;
-register unsigned long     srcwidth, dstwidth;
+CARD32            *psrcline, *pdstline;
+unsigned long     srcnwords, dstnwords;
+long              nlines;
+unsigned long     srcwidth, dstwidth;
 ilImagePlaneInfo           *pplane;
-register unsigned long     local_noDstLine;
-register ilScalePrivptr    pPriv;
+unsigned long     local_noDstLine;
+ilScalePrivptr    pPriv;
 
 
 
@@ -556,18 +556,18 @@ register ilScalePrivptr    pPriv;
                                 to scale the width.
    ============================================================================================================================= */
 static ilError ilScale3ByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
-register unsigned char     *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
-register long              nlines;
-register unsigned long     srcwidth, dstwidth;
+unsigned char     *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
+long              nlines;
+unsigned long     srcwidth, dstwidth;
 ilImagePlaneInfo           *pplane;
-register unsigned long     local_noDstLine;
-register ilScalePrivptr    pPriv;
+unsigned long     local_noDstLine;
+ilScalePrivptr    pPriv;
 
 
 
@@ -667,18 +667,18 @@ register ilScalePrivptr    pPriv;
                                 to scale the width.
    ============================================================================================================================= */
 static ilError ilScaleByteExecute (
-    register ilExecuteData   *pData,
+    ilExecuteData   *pData,
     unsigned long           dstLine,
     unsigned long          *pNLines
     )
 {
-register unsigned char     *psrcline, *pdstline;
-register unsigned long     srcnbytes, dstnbytes;
-register long              nlines;
-register unsigned long     srcwidth, dstwidth;
+unsigned char     *psrcline, *pdstline;
+unsigned long     srcnbytes, dstnbytes;
+long              nlines;
+unsigned long     srcwidth, dstwidth;
 ilImagePlaneInfo           *pplane;
-register unsigned long     local_noDstLine;
-register ilScalePrivptr    pPriv;
+unsigned long     local_noDstLine;
+ilScalePrivptr    pPriv;
 
 
 
@@ -784,7 +784,7 @@ ilBool ilScale (
 {
 unsigned int             state;
 ilPipeInfo               info;
-register ilScalePrivptr  pPriv;
+ilScalePrivptr  pPriv;
 ilDstElementData         dstdata;
 ilImageDes               imdes;
 ilImageFormat            imformat;
index fad23dfe768966466f019cac7a730bd8b9493ad1..87f995ceaf28503fd11e55fc9105cb12f5610e3f 100644 (file)
@@ -155,11 +155,11 @@ static ilError ilScaleSample3ByteExecute (
     long                   *pNLines
     )
 {
-register ilScaleSamplePtr  pPriv;
-register ilPtr             pSrc, pDst, pSrcTemp;
-register long              pixel, i, j, right;
-register unsigned long    *pCornerTable, *pTopBelowTable;
-register long              colAcc, dstWidth;
+ilScaleSamplePtr  pPriv;
+ilPtr             pSrc, pDst, pSrcTemp;
+long              pixel, i, j, right;
+unsigned long    *pCornerTable, *pTopBelowTable;
+long              colAcc, dstWidth;
 long                       nDstPixels, widthDiff;
 ilPtr                      psrcline, pdstline, pSrcEnd;
 long                       srcnbytes, dstnbytes;
@@ -381,11 +381,11 @@ static ilError ilScaleSampleByteExecute (
     long                   *pNLines
     )
 {
-register ilScaleSamplePtr  pPriv;
-register ilPtr             pSrc, pDst, pSrcTemp;
-register long              pixel, i, j, right;
-register unsigned long    *pCornerTable, *pTopBelowTable;
-register long              colAcc, dstWidth;
+ilScaleSamplePtr  pPriv;
+ilPtr             pSrc, pDst, pSrcTemp;
+long              pixel, i, j, right;
+unsigned long    *pCornerTable, *pTopBelowTable;
+long              colAcc, dstWidth;
 long                       nDstPixels, widthDiff;
 ilPtr                      psrcline, pdstline, pSrcEnd;
 long                       srcnbytes, dstnbytes;
@@ -538,7 +538,7 @@ IL_PRIVATE void _ilScaleSample (
     )
 {
 
-register ilScaleSamplePtr pPriv;
+ilScaleSamplePtr pPriv;
 ilDstElementData          dstdata;
 
 
index 0adf8283779043d81326ec1b611c363dabe9d62e..339b5d932a1608291c53284155d1dd518911e952 100644 (file)
@@ -60,7 +60,7 @@ ilBool ilFeedFromImage (
     ilBool              constantStrip
     )
 {
-register ilImagePtr     pImage;
+ilImagePtr     pImage;
 
         /*  Validate that pipe and image are such, and that they have the same context. */
     pImage = (ilImagePtr)image;
@@ -141,7 +141,7 @@ static ilError ilTapInit (
     ilImageInfo        *pDstImage
     )
 {
-register int            plane;
+int            plane;
 ilImageInfo            *pFeedInfo;
 
     pFeedInfo = pPriv->pFeedInfo;
@@ -168,13 +168,13 @@ static ilError ilTapDestroy (
             Feed the pipe bits entering this filter down the offshoot pipe.
         */
 static ilError ilTapExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                    dstLine,
     long                   *pNLines
     )
 {
-register ilTapPrivPtr   pPriv;
-register int            plane;
+ilTapPrivPtr   pPriv;
+int            plane;
 ilImageInfo            *pFeedInfo, *pSrcImage;
 long                    start, nCompBytes;
 
@@ -213,7 +213,7 @@ long                    start, nCompBytes;
         /*  Public function: see spec.
         */
 ilPipe ilTapPipe (
-    register ilPipe     pipe,
+    ilPipe     pipe,
     unsigned long       mustBeZero,
     void               *mustBeNull
     )
@@ -227,7 +227,7 @@ ilImageFormat           format;
 ilImageInfo             imageInfo, *pFeedInfo;
 ilSrcElementData        srcData;
 ilError                 error;
-register ilTapPrivPtr   pPriv;
+ilTapPrivPtr   pPriv;
 
     context = pipe->context;
     feedImage = (ilClientImage)NULL;
index 61accd064a5da8206900ff52c1ba4aa59d376105..26b6ca0f6d63d8e34e28ab3817b6a3542a0acdcd 100644 (file)
@@ -88,7 +88,7 @@ static void ilFreeFileList (
     ilFilePtr           pFile
     )
 {
-register ilFileImagePtr pFileImage, pAltFileImage, pFileImageTemp;
+ilFileImagePtr pFileImage, pAltFileImage, pFileImageTemp;
 
         /*  Run thru the list of file images; for each: if a mask image destroy it
             (only one); if child images, destroy them - they are linked by pChild.
@@ -148,7 +148,7 @@ ilPtr                   pTagData, pTagAlloc;
 ilFilePtr               pFile;
 ilFileTag              *pTag, **ppTag;
 int                     tagNumber, nFileTags, nItems, nTags, tagType, i;
-register ilBool         bigEndian;
+ilBool         bigEndian;
 
     pFileImage = (ilFileImagePtr)fileImage;
     if (mustBeZero != 0) {
@@ -363,7 +363,7 @@ RFTFatalError:
         */
 static void ilAddImageToList (
     ilFilePtr                   pFile,
-    register ilFileImagePtr     pFileImage,
+    ilFileImagePtr     pFileImage,
     ilFileImagePtr              pPrevFileImage
     )
 {
@@ -431,7 +431,7 @@ static void ilAddImageToList (
 static ilError ilReadTagsAndAddImageToList (
     ilFilePtr                   pFile,
     ilFileImagePtr             *ppPrevFileImage,
-    register ilFileImagePtr     pFileImage
+    ilFileImagePtr     pFileImage
     )
 {
     /*  Indexes into "tagNumbers" below. NOTE: order is important, as tags are checked
@@ -495,11 +495,11 @@ ilFileTag                  *tag [AI_NTAGS];
 ilBool                      present;
 ilError                     error;
 ilPtr                       pTagAlloc;
-register unsigned long      value;
+unsigned long      value;
 int                         i, tagIndex, nBits, resolutionUnit, fillOrder;
 unsigned long               group3CompData;
 unsigned long               group4CompData;
-register ilFileTag         *pTag;
+ilFileTag         *pTag;
 ilYCbCrInfo                *pYCbCr;     /* null if not YCbCr ; else -> des...YCbCr */
 
         /*  Init/zero des and format in *pFileImage.
@@ -815,7 +815,7 @@ ilYCbCrInfo                *pYCbCr;     /* null if not YCbCr ; else -> des...YCb
                     }
                 else {
 /* compatibility problem with long or unsigned long data fields */
-                    register INT32 *pLong = (INT32 *)pTag->pItems;
+                    INT32 *pLong = (INT32 *)pTag->pItems;
                     double          num, denom;
                     if ((pTag->nItems != 3) || (pTag->type != IL_TAG_RATIONAL))
                         AIL_FATAL_ERROR (IL_ERROR_FILE_MALFORMED_TAG);
@@ -858,7 +858,7 @@ ilYCbCrInfo                *pYCbCr;     /* null if not YCbCr ; else -> des...YCb
             */
           case REFERENCE_BLACK_WHITE:
             if (pYCbCr) {
-                register ilYCbCrSampleInfo  *pSample = pYCbCr->sample;
+                ilYCbCrSampleInfo  *pSample = pYCbCr->sample;
                 int                         i;
                 if (!present) {
                     pSample->refBlack = 0; pSample->refWhite = 255; pSample++;
@@ -867,7 +867,7 @@ ilYCbCrInfo                *pYCbCr;     /* null if not YCbCr ; else -> des...YCb
                     }
                 else {
 /* compatibility problem with long and unsigned long data fields */
-                    register INT32 *pLong = (INT32 *)pTag->pItems;
+                    INT32 *pLong = (INT32 *)pTag->pItems;
                     if (pTag->nItems != 6)
                         AIL_FATAL_ERROR (IL_ERROR_FILE_MALFORMED_TAG);
                     if (pTag->type == IL_TAG_LONG) {            /* old type */
@@ -901,7 +901,7 @@ ilYCbCrInfo                *pYCbCr;     /* null if not YCbCr ; else -> des...YCb
             if (present) {
                 if (value & IL_TAG_P0_FLAG_DITHER_LEVELS) {
                     if (pFileImage->p.des.type == IL_PALETTE) {
-                        register short *pLevel = ((short *)pTag->pItems + 1);
+                        short *pLevel = ((short *)pTag->pItems + 1);
                         if ((pTag->nItems < 4) || (pTag->type != IL_TAG_SHORT))
                             AIL_FATAL_ERROR (IL_ERROR_FILE_MALFORMED_TAG);
                         pFileImage->p.des.flags |= IL_DITHERED_PALETTE;
@@ -932,7 +932,7 @@ ilYCbCrInfo                *pYCbCr;     /* null if not YCbCr ; else -> des...YCb
 
         /*  If mask image: must be bitonal or discard it. */
     if (imageType == maskImage) {
-        register ilFileImagePtr pPrevFileImage = *ppPrevFileImage;
+        ilFileImagePtr pPrevFileImage = *ppPrevFileImage;
         if (!pPrevFileImage                                     /* no image before it */
          || pPrevFileImage->p.pMask                             /* already has mask */
          || (pFileImage->p.des.nSamplesPerPixel != 1)
@@ -983,8 +983,8 @@ ilByte                  fourBytes [4];
 ilFileOffset            IFDOffset;
 ilFileImagePtr          pFileImage, pPrevFileImage;
 ilTIFFHeader            header;
-register ilFilePtr      pFile;
-register ilBool         bigEndian;
+ilFilePtr      pFile;
+ilBool         bigEndian;
 
         /*  Check if image list already built - if so, return ptr to it.
         */
index 173a813fe71c72b67df9498725bdb70b0df7ff92..5173924dd792f2bb8b976cbd9980cf5829bb1f15 100644 (file)
@@ -128,7 +128,7 @@ typedef struct _ilFileRec {
     */
 /* compatibility problem with long and unsigned long data fields */
 #define IL_FLIP_LONG(_bigEndian, _4b, _long) {  \
-    register CARD32 _l;                  \
+    CARD32 _l;                  \
     if (_bigEndian) {                           \
         _l = *((ilPtr)(_4b)+0); _l <<= 8;       \
         _l |= *((ilPtr)(_4b)+1); _l <<= 8;      \
@@ -147,7 +147,7 @@ typedef struct _ilFileRec {
     /*  Same for a short.
     */
 #define IL_FLIP_SHORT(_bigEndian, _2b, _short) {\
-    register unsigned short _s;                 \
+    unsigned short _s;                 \
     if (_bigEndian) {                           \
         _s = *((ilPtr)(_2b)+0); _s <<= 8;       \
         _s |= *((ilPtr)(_2b)+1);                \
index 0860dc14eabc747f5f62425524f14444d37c0283..2dff1b907d6be213a817544bdcecbd7ee62365e8 100644 (file)
@@ -86,12 +86,12 @@ static ilError ilReadJPEGTags (
     long               *pQOffsets,          /* array of nComps file offsets to tables */
     long               *pDCOffsets,
     long               *pACOffsets,
-    register ilJPEGData *pCompData          /* ptr to structure to fill in */
+    ilJPEGData *pCompData          /* ptr to structure to fill in */
     )
 {
-    register int        i, c, nBytes;
-    register ilJPEGSampleData *pSample;
-    register ilPtr      pTable;
+    int        i, c, nBytes;
+    ilJPEGSampleData *pSample;
+    ilPtr      pTable;
     ilByte              buffer[16];         /* buffer for DC/AC table prefix (# codes) */
 
         /*  Use sample/component index as table index; load tables based on sample */
@@ -152,10 +152,10 @@ static ilError ilReadFileInit (
     ilImageInfo        *pDstImage
     )
 {
-register ilReadFilePrivPtr pPriv = (ilReadFilePrivPtr)pPrivate;
+ilReadFilePrivPtr pPriv = (ilReadFilePrivPtr)pPrivate;
 ilFileImagePtr          pFileImage;
 ilError                 error;
-register ilFileTag     *pTag;
+ilFileTag     *pTag;
 
     /*  Data for tags to read: "numbers" is the array of tag ids, "nTags" in length.
         "?Index" vars are indices into "numbers" and returned data "tags".
@@ -263,8 +263,8 @@ int                     stripOffsetsIndex, stripByteCountsIndex, colorMapIndex,
             Copy TIFF palette (size = 2 ** nBits)  to pPriv->pPalette (size = 3 * 256).
         */
     if (pPriv->pPalette) {
-        register unsigned short *pPalette, *pFilePalette;
-        register int             nPaletteEntries, i;
+        unsigned short *pPalette, *pFilePalette;
+        int             nPaletteEntries, i;
 
         pTag = tags [colorMapIndex];
         if (!pTag)
@@ -430,7 +430,7 @@ static ilError ilReadFileExecute (
     long                   *pNLines
     )
 {
-register ilReadFilePrivPtr  pPriv;
+ilReadFilePrivPtr  pPriv;
 unsigned long               nBytes, offset;
 ilPtr                       pDst;
 ilImagePlaneInfo           *pDstImagePlane;
@@ -500,8 +500,8 @@ ilBool ilReadFileImage (
     )
 {
 ilDstElementData        dstData;
-register ilFileImagePtr pFileImage;
-register ilReadFilePrivPtr pPriv;
+ilFileImagePtr pFileImage;
+ilReadFilePrivPtr pPriv;
 unsigned short          *pPalette;
 ilPtr                   pCompData;
 
index eb9f980eb07ec53b074ecf043da16b25facc3b10..6816fd7e24605bc2660eb04427ef8d3aa9789262 100644 (file)
@@ -111,7 +111,7 @@ typedef struct {
         /*  Init() function for ilWriteFileImage().
         */
 static ilError ilWriteFileInit (
-    register ilWriteFilePrivPtr pPriv,
+    ilWriteFilePrivPtr pPriv,
     ilImageInfo        *pSrcImage,
     ilImageInfo        *pDstImage
     )
@@ -132,15 +132,15 @@ static ilError ilWriteFileInit (
         /*  Cleanup() function for ilWriteFileImage().
         */
 static ilError ilWriteFileCleanup (
-    register ilWriteFilePrivPtr pPriv,
+    ilWriteFilePrivPtr pPriv,
     ilBool                  aborting
     )
 {
-register ilFilePtr          pFile;
+ilFilePtr          pFile;
 ilFileOffset                position;
 ilByte                      fourBytes[4], nextBytes[4];
 ilPtr                       pBytes, pTag;
-register CARD32            *pTagOffsets, l;
+CARD32            *pTagOffsets, l;
 int                         i;
 
         /*  If aborting pipe, just exit.  The net effect is that if
@@ -230,14 +230,14 @@ static ilError ilWriteFileDestroy (
             into the tag memory buffer, so it will be written out by ilWriteFileCleanup().
         */
 static void ilCopyPalette (
-    register ilWriteFilePrivPtr pPriv,
-    register unsigned short    *pSrcPalette
+    ilWriteFilePrivPtr pPriv,
+    unsigned short    *pSrcPalette
     )
 {
-register unsigned short *pDstPalette;
-register ilPtr          pBytes;
+unsigned short *pDstPalette;
+ilPtr          pBytes;
 /* Since using IL_WRITE_FLIP_SHORT, palEntry should be unsigned short */
-register unsigned short palEntry;
+unsigned short palEntry;
 unsigned long           greenOffset, blueOffset;
 int                     i;
 
@@ -275,7 +275,7 @@ static ilError ilWriteFileExecute (
     long                   *pNLines
     )
 {
-register ilWriteFilePrivPtr pPriv;
+ilWriteFilePrivPtr pPriv;
 ilFilePtr                   pFile;
 unsigned long               nBytes, rowBytes;
 ilPtr                       pBytes;
@@ -336,7 +336,7 @@ long                        position;
         and write a JIF header into the TIFF file.
     */
 static ilError ilWriteJIFData (
-    register ilWriteFilePrivPtr pPriv,
+    ilWriteFilePrivPtr pPriv,
     ilFilePtr               pFile,
     ilImageInfo            *pImage
     )
@@ -349,7 +349,7 @@ static ilError ilWriteJIFData (
     ilJPEGData             *pCompData;
     ilError                 error;
     long                    mcuWidth, mcuHeight;
-    register ilPtr          pBytes;
+    ilPtr          pBytes;
 
 
         /*  Init streamRec so output is written into malloc'd memory, and encode
@@ -452,11 +452,11 @@ static ilError ilWriteJPEGExecute (
     long                   *pNLines
     )
 {
-    register ilWriteFilePrivPtr pPriv;
+    ilWriteFilePrivPtr pPriv;
     ilFilePtr               pFile;
     ilError                 error;
     long                    position, nBytes, i, j;
-    register ilPtr          pBytes;
+    ilPtr          pBytes;
     ilByte                  marker[2];
 
         /*  The overall approach is to write a JIF image into the file plus strips.
@@ -544,13 +544,13 @@ static ilError ilMergeWriteTags (
     ilTagInfoPtr        pInfo)                  /* returned tag info */
 {
 ilFileTag             **ppTagsInit, **ppLastTag;
-register ilFileTag    **ppTag, **ppTagTemp, *pTag;
+ilFileTag    **ppTag, **ppTagTemp, *pTag;
 ilPtr                   pTagData, pFileTags;
 long                    tagArraySize, tagDataSize, l;
 CARD32                 *pTagOffsets, *pLong;
 int                     nTags, i;
 unsigned short          tagType, *pShort;
-register int            tagNumber;
+int            tagNumber;
 
         /*  Allocate and null an array of ptrs to tags, size = # user + std tags, + 1
             so that there is at least one guaranteed null tag ptr, for "end of array".
@@ -729,13 +729,13 @@ static ilBool ilFormatPipeImage (
     unsigned int            compression,
     ilPtr                   pCompData,
     long                   *pStripHeight,
-    register ilPipeInfo    *pInfo,
-    register ilImageDes    *pDes,
-    register ilImageFormat *pFormat
+    ilPipeInfo    *pInfo,
+    ilImageDes    *pDes,
+    ilImageFormat *pFormat
     )
 {
 #define IL_WRITE_TIFF_STRIP_SIZE (16 * 1024)    /* write 16KB strips as default */
-register long               stripHeight;
+long               stripHeight;
 long                        i, nLevels;
 ilBool                      mustConvert;
 unsigned long               g3Flags, g4Flags;
@@ -887,7 +887,7 @@ ilBool ilWriteFileImage (
 
 long                    nStripsPerImage;
 ilFileTag               tags [MAX_WRITE_TAGS];
-register ilFileTag     *pTag;
+ilFileTag     *pTag;
 int                     nTags, i;
 ilTagInfoRec            tagInfo;
 ilFilePtr               pFile;
@@ -1120,7 +1120,7 @@ char                    versionName [VERSION_LENGTH];
             /*  TIFF only allows subsampling as follows: Y = 1, Cr/Cb = 1,2,4 but
                 Cr and CB equal to each other; vert <= horiz.
             */
-        { register ilYCbCrSampleInfo *pSample = des.typeInfo.YCbCr.sample;
+        { ilYCbCrSampleInfo *pSample = des.typeInfo.YCbCr.sample;
 
         if ((pSample[0].subsampleHoriz != 1)
          || (pSample[0].subsampleVert != 1)
index c13046298dca20ec1758a4737a914d565acaea31..94a9bca3ff6ba8dc398422a6420b61a022902e2b 100644 (file)
@@ -91,7 +91,7 @@ static ilError ilAddElementRGBGrayConversions (
     void               *pOptionData         /* not used */
     )
 {
-    register int        i;
+    int        i;
 
         /*  Init tables, index by R/G/B, which effectively multiply each component
             (0..255) by the NTSC conversion formula: 0.30 * R + 0.587 * G + 0.114 * B,
@@ -126,12 +126,12 @@ static ilError ilExecuteRGBToGray  (
     long                   *pNLines
     )
 {
-register ilRGBToGrayRecPtr  pPriv;
+ilRGBToGrayRecPtr  pPriv;
 long                        srcnbytes, dstnbytes;
-register ilPtr              psrcline, pdstline;
-register ilPtr              psrc, pdst;
-register long               nLines, nPixels;
-register INT32             i;
+ilPtr              psrcline, pdstline;
+ilPtr              psrc, pdst;
+long               nLines, nPixels;
+INT32              i;
 
 
 
@@ -200,11 +200,11 @@ static ilError ilExecuteGrayToRGB  (
     )
 {
 ilRGBToGrayRecPtr           pPriv;
-register long               nLinesM1, nPixelsM1;
+long               nLinesM1, nPixelsM1;
 long                        srcRowBytes, dstRowBytes, nPixelsM1Init;
 ilPtr                       pSrcLine, pDstLine;
-register ilPtr              pSrc, pDst;
-register ilByte             byte;
+ilPtr              pSrc, pDst;
+ilByte             byte;
 
     pPriv = (ilRGBToGrayRecPtr)pData->pPrivate;
     nPixelsM1Init = pPriv->nPixels - 1;
index 9ded308d8d23bcb9685499b2972bd81711945ec0..a4cfc23d53ced4eacf6b90d90245206a062c0c78 100644 (file)
@@ -70,15 +70,15 @@ static void ilUpsampleQuadruple (
     long                    nSrcBytes,
     long                    srcRowBytes,
     ilPtr                   pSrcLine,
-    register long           dstRowBytes,
+    long           dstRowBytes,
     ilPtr                   pDstLine
     )
 {
-register int                temp0, temp1, delta;
-register unsigned long      aLong;
+int                temp0, temp1, delta;
+unsigned long      aLong;
 long                        nSrcBytesM1, dstOffset;
-register ilPtr              pSrc, pSrcBelow, pDst;
-register int                left, leftBelow, right, rightBelow;
+ilPtr              pSrc, pSrcBelow, pDst;
+int                left, leftBelow, right, rightBelow;
 
 #define FUPINTER(_start, _delta, _temp, _result) { \
     _result = (_start) << 8; \
@@ -178,9 +178,9 @@ ilImagePlaneInfo           *pSrcPlane, *pDstPlane;
 int                         sample, subsampleShift;
 ilPtr                       pSrcLine, pDstLine;
 long                        width, nLines, nSrcLines, nSrcBytes, srcRowBytes, nSrcBytesM2;
-register long               dstRowBytes;
-register ilPtr              pSrc, pSrcBelow, pDst;
-register int                left, leftBelow, right, rightBelow;
+long               dstRowBytes;
+ilPtr              pSrc, pSrcBelow, pDst;
+int                left, leftBelow, right, rightBelow;
 
         /*  Get width and height of _upsampled_ image; exit if zero. */
     pPriv = (ilUpFastPrivPtr)pData->pPrivate;
@@ -299,7 +299,7 @@ IL_PRIVATE ilBool _ilFastUpsample (
     int                     scaleFactor
     )
 {
-    register ilUpFastPrivPtr pUpPriv;
+    ilUpFastPrivPtr pUpPriv;
     ilUpFastPrivRec         upPriv;
     int                     i, j;
     ilYCbCrSampleInfo      *pSample;
@@ -431,9 +431,9 @@ static void ilUpsampleHorizontal (
     )
 {
 long                        nMidPixels, nEndPixels;
-register long               nPixelsM1;
-register ilPtr              pSrc, pDst;
-register ilByte             pixel, prevPixel;
+long               nPixelsM1;
+ilPtr              pSrc, pDst;
+ilByte             pixel, prevPixel;
 
     if (nLines <= 0)
         return;
@@ -498,7 +498,7 @@ register ilByte             pixel, prevPixel;
                 3 (prevPixel) | (12+3)/4=3   (15+3)/4=4   (18+3)/4=5   6 (src pixel) |
         */
       case 2: {
-        register int delta, temp;
+        int delta, temp;
 
         nMidPixels = (width >> 2) - 1;
         nEndPixels = width - (nMidPixels << 2) - 1;
@@ -547,12 +547,12 @@ static void ilUpsampleVertical (
     unsigned int    shift,          /* 0 = no upsample; 1 = * 2 (doubling); 2 = * 4  */
     long            width,          /* width of _whole_ (un-upsampled) image */
     long            nLines,         /* # of dst lines (after upsampling) */
-    register long   rowBytes,       /* bytes / row in src/dst image */
+    long   rowBytes,       /* bytes / row in src/dst image */
     ilPtr           pLine           /* ptr to first line of src/dst image */
     )
 {
 long                        nPixelsM1Init;
-register long               nPixelsM1;
+long               nPixelsM1;
 
         /*  Return if no pixels or lines to do. */
     if (nLines <= 0)
@@ -572,7 +572,7 @@ register long               nPixelsM1;
             and third lines, filling in the second with the average of the two.
         */
       case 1: {
-        register ilPtr  pDst, pSrc1, pSrc2;
+        ilPtr  pDst, pSrc1, pSrc2;
 
         nLines--;                       /* don't count first line already in buffer */
         while (nLines >= 2) {           /* two src lines, line between to interpolate */
@@ -601,8 +601,8 @@ register long               nPixelsM1;
             0 and 4, interpolating 1..3 - see horizontal upsampling.
         */
       case 2: {
-        register ilPtr  pSrc, pDst;
-        register int    pixel, delta;
+        ilPtr  pSrc, pDst;
+        int    pixel, delta;
         long            rowBytesTimes4 = rowBytes << 2;
 
         nLines--;                       /* don't count first line already in buffer */
@@ -649,7 +649,7 @@ static ilError ilExecuteUpsample (
     long                   *pNLines             /* ignored on input */
     )
 {
-register ilUpsamplePrivPtr pPriv;
+ilUpsamplePrivPtr pPriv;
 ilImagePlaneInfo           *pSrcPlane, *pDstPlane;
 int                         nSamples;
 ilPtr                       pSrcLine, pDstLine;
@@ -724,14 +724,14 @@ IL_PRIVATE ilBool _ilUpsampleYCbCr (
     ilBool                  upSample
     )
 {
-    register ilUpsamplePrivPtr pUpPriv;
+    ilUpsamplePrivPtr pUpPriv;
     ilImageDes              pipeDes;
     ilUpsampleShiftRec     *pShift;
     ilYCbCrSampleInfo      *pSample;
     int                     sample;
     ilDstElementData        dstData;
     ilSrcElementData        srcData;
-    register long           i, j;
+    long           i, j;
 
         /*  Only 8 bit planar YCbCr can currently be upsampled; if not that and upsampling
             needed, error; if no upsampling (only convert to gray) convert to planar.
index c14286cc09248db01a1e4115368d3414494669b0..d9d5cf4aad77b92932880ab12c5f4a2c110c06b6 100644 (file)
         IL JPG package format.
     */
 IL_PRIVATE void _ilJPEGDataIn (
-    register const ilImageDes    *pDes,
+    const ilImageDes    *pDes,
     long                          width,
     long                          height,
-    register iljpgDataPtr         pDst
+    iljpgDataPtr         pDst
     )
 {
     int                     maxSubsample;
@@ -69,7 +69,7 @@ IL_PRIVATE void _ilJPEGDataIn (
             NOTE: currently only YCbCr data in IL is subsampled!
         */
     if (pDes->type == IL_YCBCR) {
-        register const ilYCbCrSampleInfo *pSample = pDes->typeInfo.YCbCr.sample;
+        const ilYCbCrSampleInfo *pSample = pDes->typeInfo.YCbCr.sample;
 
         maxSubsample = pSample[0].subsampleHoriz;
         if (pSample[1].subsampleHoriz > maxSubsample)
@@ -110,8 +110,8 @@ IL_PRIVATE void _ilJPEGDataIn (
         Note: the restartInterval is also copied.
     */
 IL_PRIVATE void _ilJPEGTablesIn (
-    register ilJPEGData    *pSrc,
-    register iljpgDataPtr   pDst
+    ilJPEGData    *pSrc,
+    iljpgDataPtr   pDst
     )
 {
 
@@ -157,10 +157,10 @@ IL_PRIVATE void _ilJPEGTablesIn (
     /*  Free the tables in the given IL JPEG data block, which is not freed.
     */
 IL_PRIVATE void _ilJPEGFreeTables (
-    register ilJPEGData    *pData
+    ilJPEGData    *pData
     )
 {
-    register int            i;
+    int            i;
 
     for (i = 0; i < 4; i++) {
         if (pData->QTables[i]) {
@@ -184,11 +184,11 @@ IL_PRIVATE void _ilJPEGFreeTables (
         to it or null if malloc failed.
     */
 static ilPtr _ilJPEGCopyHuffmanTable (
-    register ilPtr          pSrc
+    ilPtr          pSrc
     )
 {
-    register int            i, nBytes;
-    register ilPtr          pDst;
+    int            i, nBytes;
+    ilPtr          pDst;
 
         /*  Huffman tables are: 16 bytes of # occurrences each # bits, followed by
             bytes for each of those # occurrences.  Size of table = 16 + sum(0..15).
@@ -207,11 +207,11 @@ static ilPtr _ilJPEGCopyHuffmanTable (
         If an error, free all malloc'd tables in dest, null them and return false.
     */
 IL_PRIVATE ilBool _ilJPEGCopyData (
-    register ilJPEGData    *pSrc,
-    register ilJPEGData    *pDst
+    ilJPEGData    *pSrc,
+    ilJPEGData    *pDst
     )
 {
-    register int            i;
+    int            i;
 
         /*  Zero table ptrs in *pDst in case of error; copy index info */
     bzero ((char *)pDst, sizeof (ilJPEGData));
@@ -251,11 +251,11 @@ cdMallocError:
         to be written.  Zero (0) is returned if success else an error code.
     */
 IL_PRIVATE iljpgError _ilReallocJPEGEncode (
-    register ilJPEGEncodeStreamPtr pStream,
+    ilJPEGEncodeStreamPtr pStream,
     long                    nBytes
     )
 {
-    register long           offset;
+    long           offset;
 
         /*  Allocate space so exactly "nBytes" more bytes will fit in output buffer.
             There are "offset" bytes in the buffer now so allocate offset + nBytes.
index 5438d6db0f3ce168a3abf4ccbc664756d1e8949d..7c3f5d824263b9ac33f31fc8afeffea2ea4cca1a 100644 (file)
@@ -97,8 +97,8 @@ static ilError ilWriteCompressedCleanup (
     ilBool              aborting
     )
 {
-register ilImagePlaneInfo *pImagePlane;
-register ilImagePtr     pImage;
+ilImagePlaneInfo *pImagePlane;
+ilImagePtr     pImage;
 ilError                 error;
 
     pImage = pPriv->pImage;
@@ -137,13 +137,13 @@ ilError                 error;
     /*  Execute() function for ilWriteImage(), writing compressed images.
     */
 static ilError ilWriteCompressedExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                dstLine,
     long               *pNLines
     )
 {
-register ilImagePrivPtr pPriv;
-register ilImagePtr     pImage;
+ilImagePrivPtr pPriv;
+ilImagePtr     pImage;
 
     pPriv = (ilImagePrivPtr)pData->pPrivate;
     pImage = pPriv->pImage;
@@ -193,12 +193,12 @@ static ilBool ilWriteCompressedImage (
     ilObject            image
     )
 {
-register ilImagePtr     pImage;
+ilImagePtr     pImage;
 ilPipeInfo              info;                              
 ilImageDes              des;
 ilImageFormat           format;
 ilBool                  mustConvert;
-register ilImagePrivPtr pPriv;
+ilImagePrivPtr pPriv;
 ilSrcElementData        srcData;
 long                    stripHeight;
 ilPtr                   pCompData;
@@ -289,7 +289,7 @@ ilPtr                   pCompData;
         /*  Execute() for WriteImage(): merely bumps srcLine by # lines written.
         */
 static ilError ilWriteImageExecute (
-    register ilExecuteData  *pData,
+    ilExecuteData  *pData,
     long                    dstLine,
     long                   *pNLines
     )
@@ -322,9 +322,9 @@ ilBool ilWriteImage (
     ilObject            image
     )
 {
-register ilImagePtr     pImage;
-register ilImagePrivPtr pPriv;
-register ilContext      context;
+ilImagePtr     pImage;
+ilImagePrivPtr pPriv;
+ilContext      context;
 ilPipeInfo              info;
 ilSrcElementData        srcData;
 
index 917b76b55e72c42294118912f4b1036ec2b1f531..25d6382b81a543afec2ae09328ca18d2568dd013 100644 (file)
@@ -208,10 +208,10 @@ FUNC(xpmGetRgbName, char *, (xpmRgbName * rgbn, int rgbn_max,
                             int red, int green, int blue));
 FUNC(xpmFreeRgbNames, void, (xpmRgbName * rgbn, int rgbn_max));
 
-FUNC(xpm_xynormalizeimagebits, int, (register unsigned char *bp,
-                                    register XImage * img));
-FUNC(xpm_znormalizeimagebits, int, (register unsigned char *bp,
-                                   register XImage * img));
+FUNC(xpm_xynormalizeimagebits, int, (unsigned char *bp,
+                                    XImage * img));
+FUNC(xpm_znormalizeimagebits, int, (unsigned char *bp,
+                                   XImage * img));
 */
 /*
  * Macros
index 0b38f472b5b39c2fc1ee2717e793ed9bb41da81f..b740738486926cb3cc0128e8cb6dcc1928bc2919 100644 (file)
@@ -75,7 +75,7 @@ static ilError ilExecuteSubsample (
     long                   *pNLines             /* ignored on input */
     )
 {
-register ilSubsamplePrivPtr pPriv;
+ilSubsamplePrivPtr pPriv;
 ilImagePlaneInfo           *pSrcPlane, *pDstPlane;
 int                         nSamples;
 ilPtr                       pSrcLine, pDstLine;
@@ -83,9 +83,9 @@ long                        height, width;
 long                        srcRowInc, dstRowBytes;
 long                        nDstLinesM1, nDstPixelsM1Init;
 ilSubsampleShiftPtr          pShift;
-register long               nDstPixelsM1, srcRowBytes, i;
-register ilPtr              pSrc, pDst;
-register unsigned int       pixel;
+long               nDstPixelsM1, srcRowBytes, i;
+ilPtr              pSrc, pDst;
+unsigned int       pixel;
 
         /*  Get width and height of _upsampled_ image; exit if zero. */
     pPriv = (ilSubsamplePrivPtr)pData->pPrivate;
@@ -202,7 +202,7 @@ IL_PRIVATE ilBool _ilSubsampleYCbCr (
     ilImageFormat          *pFormat
     )
 {
-    register ilSubsamplePrivPtr pSubPriv;
+    ilSubsamplePrivPtr pSubPriv;
     ilSubsamplePrivRec       priv;
     ilSubsampleShiftRec     *pShift;
     ilYCbCrSampleInfo      *pSample;
@@ -315,10 +315,10 @@ static ilError ilExecutePlanarYCbCrToRGB (
     )
 {
 ilPtr                       pYLine, pCbLine, pCrLine, pDstLine;
-register ilRGBTransPtr      pTrans;
-register ilPtr              pY, pCb, pCr, pDst;
-register long               YTrans, CbTrans, CrTrans, pixel, nPixelsM1;
-register int                Y;
+ilRGBTransPtr      pTrans;
+ilPtr              pY, pCb, pCr, pDst;
+long               YTrans, CbTrans, CrTrans, pixel, nPixelsM1;
+int                Y;
 long                        nPixelsM1Init, nLinesM1;
 long                        YRowBytes, CbRowBytes, CrRowBytes, dstRowBytes;
 ilImagePlaneInfo           *pPlane;
@@ -408,10 +408,10 @@ static ilError ilExecutePixelYCbCrToRGB (
     )
 {
 ilPtr                       pSrcLine, pDstLine;
-register ilRGBTransPtr      pTrans;
-register ilPtr              pSrc, pDst;
-register long               YTrans, CbTrans, CrTrans, pixel, nPixelsM1;
-register int                Y;
+ilRGBTransPtr      pTrans;
+ilPtr              pSrc, pDst;
+long               YTrans, CbTrans, CrTrans, pixel, nPixelsM1;
+int                Y;
 long                        nPixelsM1Init, nLinesM1;
 long                        srcRowBytes, dstRowBytes;
 ilImagePlaneInfo           *pPlane;
@@ -489,11 +489,11 @@ static ilRGBTransPtr ilGetYCbCrConvertTable (
     ilImageDes             *pDes
     )
 {
-    register ilRGBTransPtr  pTrans;
+    ilRGBTransPtr  pTrans;
     const ilYCbCrInfo      *pYCbCr, *pStdYCbCr;
     double                  Lr, Lg, Lb, scaledY;
-    register double         factor, gFactor;
-    register int            i, refBlack, upper, lower;
+    double         factor, gFactor;
+    int            i, refBlack, upper, lower;
     ilBool                  isStd;
     struct {
         int                 refBlack;
@@ -608,7 +608,7 @@ IL_PRIVATE ilBool _ilConvertYCbCrToRGB (
     ilDstElementData        dstData;
     ilError                 (*executeFunction)(), (*destroyFunction)();
     ilYCbCrToRGBPrivPtr     pPriv;
-    register ilRGBTransPtr  pTrans;
+    ilRGBTransPtr  pTrans;
 
     if ((pFormat->nBitsPerSample[0] != 8)
      || (pFormat->nBitsPerSample[1] != 8)
@@ -717,12 +717,12 @@ ilPtr                       pYLine, pCbLine, pCrLine, pDstLine;
 int                        *pKernelRowEnd;
 long                        nPixelsDiv2M1;
 ilPtr                       pCb, pCr;
-register long               YRowBytes, dstRowBytes;
-register long               Y, Cb, Cr, YTrans, CbTrans, CrTrans, comp, pixel;
-register ilPtr              pY, pDst;
-register ilRGBTransPtr      pTrans;
-register ilPtr              pTranslate;
-register int               *pKernel, kernel;
+long               YRowBytes, dstRowBytes;
+long               Y, Cb, Cr, YTrans, CbTrans, CrTrans, comp, pixel;
+ilPtr              pY, pDst;
+ilRGBTransPtr      pTrans;
+ilPtr              pTranslate;
+int               *pKernel, kernel;
 #define YCBCR2_KERNEL_SIZE  8                   /* size of dither kernel used */
 
         /*  This filter handles a pipe image of YCbCr subsampled by 2 in Cb/Cr only.
@@ -894,14 +894,14 @@ d3ClipB: if (comp > YCBCR2_MAX_B) comp = YCBCR2_MAX_B; else comp = 0;
         with the dither values pre-multiplied into them.
     */
 static void ilSetupYCbCrDitherTable (
-    register ilRGBTransPtr  pTrans,
+    ilRGBTransPtr  pTrans,
     ilImageDes             *pDes
     )
 {
     ilYCbCrInfo            *pYCbCr;
     double                  Lr, Lg, Lb, scaledY;
-    register double         factor, gFactor, rbDither, gDither;
-    register int            i, refBlack, upper, lower;
+    double         factor, gFactor, rbDither, gDither;
+    int            i, refBlack, upper, lower;
     struct {
         int                 refBlack;
         double              scale;
@@ -1033,9 +1033,9 @@ IL_PRIVATE ilBool _ilDitherYCbCr (
         /*  alloc pPalette unless not palette dst; init with ramp if not choosing */
     pPalette = (unsigned short *)NULL;
     if (pData->dstType == IL_PALETTE) {
-        register int            red, green, blue;
-        register int            redLevel, greenLevel, blueLevel;
-        register unsigned short *pPal;
+        int            red, green, blue;
+        int            redLevel, greenLevel, blueLevel;
+        unsigned short *pPal;
 
         pPalette = (unsigned short *)IL_MALLOC_ZERO (3 * 256 * sizeof(unsigned short));
         if (!pPalette)
@@ -1146,15 +1146,15 @@ static ilError ilExecuteRGBToYCbCr (
     long                   *pNLines
     )
 {
-register ilRGBToYCbCrPrivPtr pPriv;
+ilRGBToYCbCrPrivPtr pPriv;
 ilPtr                       pSrcLine, pYLine, pCbLine, pCrLine;
-register ilPtr              pSrc, pY, pCb, pCr;
-register long               nPixelsM1;
-register long               YRefBlack, CbRefBlack, CrRefBlack;
+ilPtr              pSrc, pY, pCb, pCr;
+long               nPixelsM1;
+long               YRefBlack, CbRefBlack, CrRefBlack;
 long                        nPixelsM1Init, nLinesM1;
 long                        YRowBytes, CbRowBytes, CrRowBytes, srcRowBytes;
 ilImagePlaneInfo           *pPlane;
-register long               R, G, B, pixel;
+long               R, G, B, pixel;
 
 
         /*  Set nPixels/LinesM1 to # pixels / lines - 1; exit if either 0. */
@@ -1247,13 +1247,13 @@ CrClip:  if (pixel > 255) pixel = 255; else pixel = 0;
 IL_PRIVATE ilBool _ilConvertRGBToYCbCr (
     ilPipe                  pipe,
     ilPipeInfo             *pInfo,
-    register ilImageDes    *pDes,
-    register const ilImageDes *pNewDes,
+    ilImageDes    *pDes,
+    const ilImageDes *pNewDes,
     ilImageFormat          *pFormat
     )
 {
-    register ilRGBToYCbCrPrivPtr pPriv;
-    register ilYCbCrInfo   *pYCbCr;
+    ilRGBToYCbCrPrivPtr pPriv;
+    ilYCbCrInfo   *pYCbCr;
     ilDstElementData        dstData;
     double                  Lr, Lg, Lb, range;
     long                    YR, YG, YB;
index eefd69a885dcddaaf7ada1b6c11ce03c3e7cd9f6..f1a0c36792ee901da7a2d22603e15587990577a5 100644 (file)
@@ -145,17 +145,17 @@ ycc_rgb_convert (j_decompress_ptr cinfo,
                 JSAMPARRAY output_buf, int num_rows)
 {
   my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int y, cb, cr;
-  register JSAMPROW outptr;
-  register JSAMPROW inptr0, inptr1, inptr2;
-  register JDIMENSION col;
+  int y, cb, cr;
+  JSAMPROW outptr;
+  JSAMPROW inptr0, inptr1, inptr2;
+  JDIMENSION col;
   JDIMENSION num_cols = cinfo->output_width;
   /* copy these pointers into registers if possible */
-  register JSAMPLE * range_limit = cinfo->sample_range_limit;
-  register int * Crrtab = cconvert->Cr_r_tab;
-  register int * Cbbtab = cconvert->Cb_b_tab;
-  register INT32 * Crgtab = cconvert->Cr_g_tab;
-  register INT32 * Cbgtab = cconvert->Cb_g_tab;
+  JSAMPLE * range_limit = cinfo->sample_range_limit;
+  int * Crrtab = cconvert->Cr_r_tab;
+  int * Cbbtab = cconvert->Cb_b_tab;
+  INT32 * Crgtab = cconvert->Cr_g_tab;
+  INT32 * Cbgtab = cconvert->Cb_g_tab;
   SHIFT_TEMPS
 
   while (--num_rows >= 0) {
@@ -193,9 +193,9 @@ null_convert (j_decompress_ptr cinfo,
              JSAMPIMAGE input_buf, JDIMENSION input_row,
              JSAMPARRAY output_buf, int num_rows)
 {
-  register JSAMPROW inptr, outptr;
-  register JDIMENSION count;
-  register int num_components = cinfo->num_components;
+  JSAMPROW inptr, outptr;
+  JDIMENSION count;
+  int num_components = cinfo->num_components;
   JDIMENSION num_cols = cinfo->output_width;
   int ci;
 
@@ -243,17 +243,17 @@ ycck_cmyk_convert (j_decompress_ptr cinfo,
                   JSAMPARRAY output_buf, int num_rows)
 {
   my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int y, cb, cr;
-  register JSAMPROW outptr;
-  register JSAMPROW inptr0, inptr1, inptr2, inptr3;
-  register JDIMENSION col;
+  int y, cb, cr;
+  JSAMPROW outptr;
+  JSAMPROW inptr0, inptr1, inptr2, inptr3;
+  JDIMENSION col;
   JDIMENSION num_cols = cinfo->output_width;
   /* copy these pointers into registers if possible */
-  register JSAMPLE * range_limit = cinfo->sample_range_limit;
-  register int * Crrtab = cconvert->Cr_r_tab;
-  register int * Cbbtab = cconvert->Cb_b_tab;
-  register INT32 * Crgtab = cconvert->Cr_g_tab;
-  register INT32 * Cbgtab = cconvert->Cb_g_tab;
+  JSAMPLE * range_limit = cinfo->sample_range_limit;
+  int * Crrtab = cconvert->Cr_r_tab;
+  int * Cbbtab = cconvert->Cb_b_tab;
+  INT32 * Crgtab = cconvert->Cr_g_tab;
+  INT32 * Cbgtab = cconvert->Cb_g_tab;
   SHIFT_TEMPS
 
   while (--num_rows >= 0) {
index 2d4fc8f12e175a33d3696bc0ea2b866fafe45408..faade7f14cbd7af0825f850212a8fd930121cea6 100644 (file)
@@ -255,14 +255,14 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, JHUFF_TBL * htbl,
 
 GLOBAL(boolean)
 jpeg_fill_bit_buffer (bitread_working_state * state,
-                     register bit_buf_type get_buffer, register int bits_left,
+                     bit_buf_type get_buffer, int bits_left,
                      int nbits)
 /* Load up the bit buffer to a depth of at least nbits */
 {
   /* Copy heavily used state fields into locals (hopefully registers) */
-  register const JOCTET * next_input_byte = state->next_input_byte;
-  register size_t bytes_in_buffer = state->bytes_in_buffer;
-  register int c;
+  const JOCTET * next_input_byte = state->next_input_byte;
+  size_t bytes_in_buffer = state->bytes_in_buffer;
+  int c;
 
   /* Attempt to load at least MIN_GET_BITS bits into get_buffer. */
   /* (It is assumed that no request will be for more than that many bits.) */
@@ -343,11 +343,11 @@ jpeg_fill_bit_buffer (bitread_working_state * state,
 
 GLOBAL(int)
 jpeg_huff_decode (bitread_working_state * state,
-                 register bit_buf_type get_buffer, register int bits_left,
+                 bit_buf_type get_buffer, int bits_left,
                  d_derived_tbl * htbl, int min_bits)
 {
-  register int l = min_bits;
-  register INT32 code;
+  int l = min_bits;
+  INT32 code;
 
   /* HUFF_DECODE has determined that the code is at least min_bits */
   /* bits long, so fetch that many bits in one swoop. */
@@ -460,7 +460,7 @@ METHODDEF(boolean)
 decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {
   huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
-  register int s, k, r;
+  int s, k, r;
   int blkn, ci;
   JBLOCKROW block;
   BITREAD_STATE_VARS;
index 9e05bdb044690d511f6ff0b2d51ff719bd3d6f31..1efc86e62373ae27f3db4dc45a27a3cc4b452fc2 100644 (file)
@@ -121,8 +121,8 @@ typedef struct {            /* Bitreading working state within an MCU */
 
 /* Macros to declare and load/save bitread local variables. */
 #define BITREAD_STATE_VARS  \
-       register bit_buf_type get_buffer;  \
-       register int bits_left;  \
+       bit_buf_type get_buffer;  \
+       int bits_left;  \
        bitread_working_state br_state
 
 #define BITREAD_LOAD_STATE(cinfop,permstate)  \
@@ -176,8 +176,8 @@ typedef struct {            /* Bitreading working state within an MCU */
 
 /* Load up the bit buffer to a depth of at least nbits */
 EXTERN(boolean) jpeg_fill_bit_buffer
-       JPP((bitread_working_state * state, register bit_buf_type get_buffer,
-            register int bits_left, int nbits));
+       JPP((bitread_working_state * state, bit_buf_type get_buffer,
+            int bits_left, int nbits));
 
 
 /*
@@ -198,7 +198,7 @@ EXTERN(boolean) jpeg_fill_bit_buffer
  */
 
 #define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \
-{ register int nb, look; \
+{ int nb, look; \
   if (bits_left < HUFF_LOOKAHEAD) { \
     if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
     get_buffer = state.get_buffer; bits_left = state.bits_left; \
@@ -221,5 +221,5 @@ slowlabel: \
 
 /* Out-of-line case for Huffman code fetching */
 EXTERN(int) jpeg_huff_decode
-       JPP((bitread_working_state * state, register bit_buf_type get_buffer,
-            register int bits_left, d_derived_tbl * htbl, int min_bits));
+       JPP((bitread_working_state * state, bit_buf_type get_buffer,
+            int bits_left, d_derived_tbl * htbl, int min_bits));
index 5df31d9446fc61687125bcd8fadb170038ff4bc5..2dbb6a0f3a247545d6dfdd62439bd0575e2ac079 100644 (file)
@@ -251,13 +251,13 @@ h2v1_merged_upsample (j_decompress_ptr cinfo,
                      JSAMPARRAY output_buf)
 {
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
-  register int y, cred, cgreen, cblue;
+  int y, cred, cgreen, cblue;
   int cb, cr;
-  register JSAMPROW outptr;
+  JSAMPROW outptr;
   JSAMPROW inptr0, inptr1, inptr2;
   JDIMENSION col;
   /* copy these pointers into registers if possible */
-  register JSAMPLE * range_limit = cinfo->sample_range_limit;
+  JSAMPLE * range_limit = cinfo->sample_range_limit;
   int * Crrtab = upsample->Cr_r_tab;
   int * Cbbtab = upsample->Cb_b_tab;
   INT32 * Crgtab = upsample->Cr_g_tab;
@@ -313,13 +313,13 @@ h2v2_merged_upsample (j_decompress_ptr cinfo,
                      JSAMPARRAY output_buf)
 {
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
-  register int y, cred, cgreen, cblue;
+  int y, cred, cgreen, cblue;
   int cb, cr;
-  register JSAMPROW outptr0, outptr1;
+  JSAMPROW outptr0, outptr1;
   JSAMPROW inptr00, inptr01, inptr1, inptr2;
   JDIMENSION col;
   /* copy these pointers into registers if possible */
-  register JSAMPLE * range_limit = cinfo->sample_range_limit;
+  JSAMPLE * range_limit = cinfo->sample_range_limit;
   int * Crrtab = upsample->Cr_r_tab;
   int * Cbbtab = upsample->Cb_b_tab;
   INT32 * Crgtab = upsample->Cr_g_tab;
index 26e64ec3a62f86870a4bf120de8e4a7874825ffe..bae92d182494d6db9af3e97b953ae2c8b637d4ff 100644 (file)
@@ -305,7 +305,7 @@ decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
 {   
   phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
   int Al = cinfo->Al;
-  register int s, r;
+  int s, r;
   int blkn, ci;
   JBLOCKROW block;
   BITREAD_STATE_VARS;
@@ -371,7 +371,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
   phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
   int Se = cinfo->Se;
   int Al = cinfo->Al;
-  register int s, k, r;
+  int s, k, r;
   unsigned int EOBRUN;
   JBLOCKROW block;
   BITREAD_STATE_VARS;
@@ -496,7 +496,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
   int Se = cinfo->Se;
   int p1 = 1 << cinfo->Al;     /* 1 in the bit position being coded */
   int m1 = (-1) << cinfo->Al;  /* -1 in the bit position being coded */
-  register int s, k, r;
+  int s, k, r;
   unsigned int EOBRUN;
   JBLOCKROW block;
   JCOEFPTR thiscoef;
index 0a8c450d9e4b1f8914a177978ea3b56f9beb188f..5ba31cf633b68f722ad27405bffae368c03404ee 100644 (file)
@@ -214,9 +214,9 @@ int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
 {
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
   JSAMPARRAY output_data = *output_data_ptr;
-  register JSAMPROW inptr, outptr;
-  register JSAMPLE invalue;
-  register int h;
+  JSAMPROW inptr, outptr;
+  JSAMPLE invalue;
+  int h;
   JSAMPROW outend;
   int h_expand, v_expand;
   int inrow, outrow;
@@ -257,8 +257,8 @@ h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
               JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
   JSAMPARRAY output_data = *output_data_ptr;
-  register JSAMPROW inptr, outptr;
-  register JSAMPLE invalue;
+  JSAMPROW inptr, outptr;
+  JSAMPLE invalue;
   JSAMPROW outend;
   int inrow;
 
@@ -285,8 +285,8 @@ h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
               JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
   JSAMPARRAY output_data = *output_data_ptr;
-  register JSAMPROW inptr, outptr;
-  register JSAMPLE invalue;
+  JSAMPROW inptr, outptr;
+  JSAMPLE invalue;
   JSAMPROW outend;
   int inrow, outrow;
 
@@ -328,9 +328,9 @@ h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
                     JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
   JSAMPARRAY output_data = *output_data_ptr;
-  register JSAMPROW inptr, outptr;
-  register int invalue;
-  register JDIMENSION colctr;
+  JSAMPROW inptr, outptr;
+  int invalue;
+  JDIMENSION colctr;
   int inrow;
 
   for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
@@ -369,13 +369,13 @@ h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
                     JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
   JSAMPARRAY output_data = *output_data_ptr;
-  register JSAMPROW inptr0, inptr1, outptr;
+  JSAMPROW inptr0, inptr1, outptr;
 #if BITS_IN_JSAMPLE == 8
-  register int thiscolsum, lastcolsum, nextcolsum;
+  int thiscolsum, lastcolsum, nextcolsum;
 #else
-  register INT32 thiscolsum, lastcolsum, nextcolsum;
+  INT32 thiscolsum, lastcolsum, nextcolsum;
 #endif
-  register JDIMENSION colctr;
+  JDIMENSION colctr;
   int inrow, outrow, v;
 
   inrow = outrow = 0;
index d13658fc8409f01032bf93f312ce16d42bba7937..61f6a71fb9dd187b8c297f0cd093374ea7ab22d5 100644 (file)
@@ -485,12 +485,12 @@ color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
   JSAMPARRAY colorindex = cquantize->colorindex;
-  register int pixcode, ci;
-  register JSAMPROW ptrin, ptrout;
+  int pixcode, ci;
+  JSAMPROW ptrin, ptrout;
   int row;
   JDIMENSION col;
   JDIMENSION width = cinfo->output_width;
-  register int nc = cinfo->out_color_components;
+  int nc = cinfo->out_color_components;
 
   for (row = 0; row < num_rows; row++) {
     ptrin = input_buf[row];
@@ -512,8 +512,8 @@ color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
 /* Fast path for out_color_components==3, no dithering */
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  register int pixcode;
-  register JSAMPROW ptrin, ptrout;
+  int pixcode;
+  JSAMPROW ptrin, ptrout;
   JSAMPROW colorindex0 = cquantize->colorindex[0];
   JSAMPROW colorindex1 = cquantize->colorindex[1];
   JSAMPROW colorindex2 = cquantize->colorindex[2];
@@ -540,8 +540,8 @@ quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
 /* General case, with ordered dithering */
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  register JSAMPROW input_ptr;
-  register JSAMPROW output_ptr;
+  JSAMPROW input_ptr;
+  JSAMPROW output_ptr;
   JSAMPROW colorindex_ci;
   int * dither;                        /* points to active row of dither matrix */
   int row_index, col_index;    /* current indexes into dither matrix */
@@ -590,9 +590,9 @@ quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
 /* Fast path for out_color_components==3, with ordered dithering */
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  register int pixcode;
-  register JSAMPROW input_ptr;
-  register JSAMPROW output_ptr;
+  int pixcode;
+  JSAMPROW input_ptr;
+  JSAMPROW output_ptr;
   JSAMPROW colorindex0 = cquantize->colorindex[0];
   JSAMPROW colorindex1 = cquantize->colorindex[1];
   JSAMPROW colorindex2 = cquantize->colorindex[2];
@@ -635,14 +635,14 @@ quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
 /* General case, with Floyd-Steinberg dithering */
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  register LOCFSERROR cur;     /* current error or pixel value */
+  LOCFSERROR cur;      /* current error or pixel value */
   LOCFSERROR belowerr;         /* error for pixel below cur */
   LOCFSERROR bpreverr;         /* error for below/prev col */
   LOCFSERROR bnexterr;         /* error for below/next col */
   LOCFSERROR delta;
-  register FSERRPTR errorptr;  /* => fserrors[] at column before current */
-  register JSAMPROW input_ptr;
-  register JSAMPROW output_ptr;
+  FSERRPTR errorptr;   /* => fserrors[] at column before current */
+  JSAMPROW input_ptr;
+  JSAMPROW output_ptr;
   JSAMPROW colorindex_ci;
   JSAMPROW colormap_ci;
   int pixcode;
index ab27830326a275243f0a9e9603859ec5388f2266..fb483e085a6612a9b0a3479b5c7e433b0ad1050c 100644 (file)
@@ -248,9 +248,9 @@ prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
                  JSAMPARRAY output_buf, int num_rows)
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
-  register JSAMPROW ptr;
-  register histptr histp;
-  register hist3d histogram = cquantize->histogram;
+  JSAMPROW ptr;
+  histptr histp;
+  hist3d histogram = cquantize->histogram;
   int row;
   JDIMENSION col;
   JDIMENSION width = cinfo->output_width;
@@ -297,9 +297,9 @@ find_biggest_color_pop (boxptr boxlist, int numboxes)
 /* Find the splittable box with the largest color population */
 /* Returns NULL if no splittable boxes remain */
 {
-  register boxptr boxp;
-  register int i;
-  register long maxc = 0;
+  boxptr boxp;
+  int i;
+  long maxc = 0;
   boxptr which = NULL;
   
   for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
@@ -317,9 +317,9 @@ find_biggest_volume (boxptr boxlist, int numboxes)
 /* Find the splittable box with the largest (scaled) volume */
 /* Returns NULL if no splittable boxes remain */
 {
-  register boxptr boxp;
-  register int i;
-  register INT32 maxv = 0;
+  boxptr boxp;
+  int i;
+  INT32 maxv = 0;
   boxptr which = NULL;
   
   for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
@@ -450,7 +450,7 @@ median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes,
 {
   int n,lb;
   int c0,c1,c2,cmax;
-  register boxptr b1,b2;
+  boxptr b1,b2;
 
   while (numboxes < desired_colors) {
     /* Select box to split.
@@ -806,12 +806,12 @@ find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,
 {
   int ic0, ic1, ic2;
   int i, icolor;
-  register INT32 * bptr;       /* pointer into bestdist[] array */
+  INT32 * bptr;        /* pointer into bestdist[] array */
   JSAMPLE * cptr;              /* pointer into bestcolor[] array */
   INT32 dist0, dist1;          /* initial distance values */
-  register INT32 dist2;                /* current distance in inner loop */
+  INT32 dist2;         /* current distance in inner loop */
   INT32 xx0, xx1;              /* distance increments */
-  register INT32 xx2;
+  INT32 xx2;
   INT32 inc0, inc1, inc2;      /* initial values for increments */
   /* This array holds the distance to the nearest-so-far color for each cell */
   INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];
@@ -884,8 +884,8 @@ fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2)
   hist3d histogram = cquantize->histogram;
   int minc0, minc1, minc2;     /* lower left corner of update box */
   int ic0, ic1, ic2;
-  register JSAMPLE * cptr;     /* pointer into bestcolor[] array */
-  register histptr cachep;     /* pointer into main cache array */
+  JSAMPLE * cptr;      /* pointer into bestcolor[] array */
+  histptr cachep;      /* pointer into main cache array */
   /* This array lists the candidate colormap indexes. */
   JSAMPLE colorlist[MAXNUMCOLORS];
   int numcolors;               /* number of candidate colors */
@@ -941,9 +941,9 @@ pass2_no_dither (j_decompress_ptr cinfo,
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
   hist3d histogram = cquantize->histogram;
-  register JSAMPROW inptr, outptr;
-  register histptr cachep;
-  register int c0, c1, c2;
+  JSAMPROW inptr, outptr;
+  histptr cachep;
+  int c0, c1, c2;
   int row;
   JDIMENSION col;
   JDIMENSION width = cinfo->output_width;
@@ -975,10 +975,10 @@ pass2_fs_dither (j_decompress_ptr cinfo,
 {
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
   hist3d histogram = cquantize->histogram;
-  register LOCFSERROR cur0, cur1, cur2;        /* current error or pixel value */
+  LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */
   LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */
   LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */
-  register FSERRPTR errorptr;  /* => fserrors[] at column before current */
+  FSERRPTR errorptr;   /* => fserrors[] at column before current */
   JSAMPROW inptr;              /* => current input pixel */
   JSAMPROW outptr;             /* => current output pixel */
   histptr cachep;
@@ -1053,7 +1053,7 @@ pass2_fs_dither (j_decompress_ptr cinfo,
       if (*cachep == 0)
        fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT);
       /* Now emit the colormap index for this cell */
-      { register int pixcode = *cachep - 1;
+      { int pixcode = *cachep - 1;
        *outptr = (JSAMPLE) pixcode;
        /* Compute representation error for this pixel */
        cur0 -= GETJSAMPLE(colormap0[pixcode]);
@@ -1064,7 +1064,7 @@ pass2_fs_dither (j_decompress_ptr cinfo,
        * Add these into the running sums, and simultaneously shift the
        * next-line error sums left by 1 column.
        */
-      { register LOCFSERROR bnexterr, delta;
+      { LOCFSERROR bnexterr, delta;
 
        bnexterr = cur0;        /* Process component 0 */
        delta = cur0 * 2;
index 69b92320d8c7c3635b25132e31036bbb6dbf0020..4ace1e9f20f3949173251b92a39000f4f1fbf87e 100644 (file)
@@ -140,13 +140,13 @@ jcopy_sample_rows (JSAMPARRAY input_array, int source_row,
  * The source and destination arrays must be at least as wide as num_cols.
  */
 {
-  register JSAMPROW inptr, outptr;
+  JSAMPROW inptr, outptr;
 #ifdef FMEMCOPY
-  register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE));
+  size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE));
 #else
-  register JDIMENSION count;
+  JDIMENSION count;
 #endif
-  register int row;
+  int row;
 
   input_array += source_row;
   output_array += dest_row;
@@ -172,8 +172,8 @@ jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row,
 #ifdef FMEMCOPY
   FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF)));
 #else
-  register JCOEFPTR inptr, outptr;
-  register long count;
+  JCOEFPTR inptr, outptr;
+  long count;
 
   inptr = (JCOEFPTR) input_row;
   outptr = (JCOEFPTR) output_row;
@@ -192,8 +192,8 @@ jzero_far (void FAR * target, size_t bytestozero)
 #ifdef FMEMZERO
   FMEMZERO(target, bytestozero);
 #else
-  register char FAR * ptr = (char FAR *) target;
-  register size_t count;
+  char FAR * ptr = (char FAR *) target;
+  size_t count;
 
   for (count = bytestozero; count > 0; count--) {
     *ptr++ = 0;
index cdf296bd3670152b989c40caee76da18c02def70..a642a8dc79cefaf6ca6c5456f9badb00b771bc58 100644 (file)
@@ -137,7 +137,7 @@ static char rcsid[] = "$TOG: DtMrm.c /main/4 1999/10/14 13:35:44 mgreess $"
 static Boolean urm__initialize_complete = FALSE;
 
 \f
-void DtMrmInitialize ()
+void DtMrmInitialize (void)
 
 /*
  *++
index a440af411e9f2e0c07978b6c7ad4f3a1c0beb507..dce502f2e9ca081170697e967e387c2129850029 100644 (file)
@@ -2122,9 +2122,9 @@ MenuBarFixUp(
             XmGeoMajorLayout layoutPtr,
             XmKidGeometry rowPtr)
 {
-    register Dimension      marginW ;
-    register Dimension      marginH ;
-    register Dimension      twoMarginW ;
+    Dimension       marginW ;
+    Dimension       marginH ;
+    Dimension       twoMarginW ;
 
     marginW = geoSpec->margin_w ;
     twoMarginW = (marginW << 1) ;
@@ -2378,8 +2378,8 @@ SeparatorFixUp(
             XmGeoMajorLayout layoutPtr,
             XmKidGeometry rowPtr )
 {
-    register Dimension      marginW ;
-    register Dimension      twoMarginW ;
+    Dimension       marginW ;
+    Dimension       twoMarginW ;
 
     marginW = geoSpec->margin_w ;
     twoMarginW = (marginW << 1) ;
@@ -3138,7 +3138,7 @@ UpdateString(
             XmStringDirection direction)
 {
     Arg                al[3];
-    register int       ac = 0;
+    int        ac = 0;
 
     if (w)
     {
@@ -3242,7 +3242,7 @@ void
 _DtPrintSetupBoxCreateBottomSeparator(DtPrintSetupBoxWidget psub)
 {
     Arg al[10];
-    register int ac = 0;
+    int ac = 0;
 
     XtSetArg(al[ac], XmNhighlightThickness, 0);         ac++;
     PSUB_BottomSeparator(psub) =
@@ -3268,7 +3268,7 @@ void
 _DtPrintSetupBoxCreateButtonSeparator(DtPrintSetupBoxWidget sel)
 {
     Arg al[10];
-    register int ac = 0;
+    int ac = 0;
 
     XtSetArg(al[ac], XmNhighlightThickness, 0);         ac++;
     PSUB_ButtonSeparator(sel) =
@@ -3870,7 +3870,7 @@ void
 _DtPrintSetupBoxCreateTopSeparator(DtPrintSetupBoxWidget psub)
 {
     Arg al[10];
-    register int ac = 0;
+    int ac = 0;
 
     XtSetArg(al[ac], XmNhighlightThickness, 0);         ac++;
     PSUB_TopSeparator(psub) =
@@ -3896,8 +3896,8 @@ _DtPrintSetupBoxGeoMatrixCreate(
 {
     DtPrintSetupBoxWidget psub = (DtPrintSetupBoxWidget) wid ;
     XmGeoMatrix            geoSpec ;
-    register XmGeoRowLayout  layoutPtr ;
-    register XmKidGeometry   boxPtr ;
+    XmGeoRowLayout  layoutPtr ;
+    XmKidGeometry   boxPtr ;
     XmKidGeometry   firstButtonBox ;
     XmKidGeometry   boxMark;
     Dimension      vspace = BB_MarginHeight(psub);
index 4e4bf5805e6f9fcc4bbb9312b4207f2328e1ee56..d6380f6eed58d84ac9a7f8b001e998f975a04556 100644 (file)
@@ -85,18 +85,16 @@ OBJS1 = \
         vestatis.o              vstfunct.o
 
 RAIMA_OBJS = \
-        raima/alloc.o                   raima/cmstat.o \
+        raima/alloc.o \
         raima/cmtype.o                  raima/connect.o \
-        raima/costat.o                  raima/cotype.o \
+        raima/cotype.o \
         raima/crget.o                   raima/crread.o \
-        raima/crset.o                   raima/crstat.o \
+        raima/crset.o \
         raima/crtype.o                  raima/crwrite.o \
         raima/csmget.o                  raima/csmread.o \
         raima/csmset.o                  raima/csmwrite.o \
         raima/csoget.o                  raima/csoread.o \
         raima/csoset.o                  raima/csowrite.o \
-        raima/csstat.o                  raima/ctscm.o \
-        raima/ctsco.o                   raima/ctscr.o \
         raima/dbacode.o                 raima/dbdpath.o \
         raima/dbfpath.o                 raima/dblfcns.o \
         raima/dbswab.o \
@@ -106,8 +104,6 @@ RAIMA_OBJS = \
         raima/fillnew.o                 raima/findco.o \
         raima/findfm.o                  raima/findlm.o \
         raima/findnm.o                  raima/findpm.o \
-        raima/gtscm.o                   raima/gtsco.o \
-        raima/gtscr.o                   raima/gtscs.o \
         raima/initial.o                 raima/inittab.o \
         raima/ismember.o                raima/isowner.o \
         raima/keydel.o                  raima/keyexist.o \
@@ -116,24 +112,20 @@ RAIMA_OBJS = \
         raima/keynext.o                 raima/keyprev.o \
         raima/keystore.o                raima/libfcns.o \
         raima/makenew.o                 raima/mapchar.o \
-        raima/members.o                 raima/netunix.o \
+        raima/members.o \
         raima/oflag.o                   raima/opens.o \
         raima/options.o                 raima/pathfcns.o \
         raima/recfcns.o                 raima/recfrst.o \
         raima/reclast.o                 raima/recnext.o \
         raima/recprev.o                 raima/recread.o \
-        raima/recset.o                  raima/recstat.o \
+        raima/recset.o \
         raima/recwrite.o                raima/renfile.o \
         raima/rwcurr.o                  raima/setdb.o \
         raima/setmm.o                   raima/setmo.o \
         raima/setmr.o                   raima/setom.o \
         raima/setoo.o                   raima/setor.o \
         raima/setrm.o                   raima/setro.o \
-        raima/startup.o                 raima/stscm.o \
-        raima/stsco.o                   raima/stscr.o \
-        raima/stscs.o                   raima/utscm.o \
-        raima/utsco.o                   raima/utscr.o \
-        raima/utscs.o
+        raima/startup.o
 
 OBJS = $(OBJS1) $(RAIMA_OBJS)
 
index 49e64a200a89d7b875f77785e14895e4cde964e7..cf82b624864c1efd93e4008f964cfcab17916a82 100644 (file)
@@ -120,13 +120,13 @@ char           *bmhcore (
                     size_t             patlen,
                     size_t             *bmhtable)
 {
-    register unsigned char
+    unsigned char
                lastchar = pattern[patlen - 1];
-    register unsigned char
+    unsigned char
                textchar;
-    register unsigned char
+    unsigned char
                *cp;
-    register unsigned char     
+    unsigned char
                *last;
     int                savechar;
     int                savechar2;
index 1d65f71094405af339f3c4d8dc3172f75731a8bc..e9be4604b880e6fa7a21a23e91a09ec6aec28ee7 100644 (file)
@@ -826,7 +826,7 @@ int             DtSearchHighlight (
        usrblk.stemcount = stemcount;
        cptr = stems;
        for (i = 0; i < stemcount; i++) {
-           strcpy (usrblk.stems[i], cptr);
+           snprintf(usrblk.stems[i], sizeof(usrblk.stems[i]), "%s", cptr);
            cptr += DtSrMAXWIDTH_HWORD;
        }
     }
index 1f846eb0d3d5f0691162cc03c6384806c2c6f440..e6711972872d31be727116a2f4a833c0069a71da 100644 (file)
@@ -282,8 +282,7 @@ int             ve_initialize (void)
          */
        if (db->dbrec.or_fzkeysz > 0) {
            /* build complete path-file name */
-           strcpy (d9x_fname, db->path);
-           strcat (d9x_fname, db->name);
+           snprintf(d9x_fname, sizeof(d9x_fname), "%s%s", db->path, db->name);
            d9x_fext = d9x_fname + strlen (d9x_fname);
            strcpy (d9x_fext, ".d97");
            if (debugging)
index 06dc3dd2b848763e0a74851b90df021de6aa311c..d843617e07a0ce3196b7190069d628f42300b870 100644 (file)
@@ -122,7 +122,7 @@ void        hc_decode (
 #ifdef DEBUG_DECODE
     static int      first_time = TRUE;
 #endif
-    register int    bitreg;
+    int    bitreg;
     int             i;
     int             bitcount;
     int             tree_index;
index 32695067df51293834dfc4b876d20d4158743a83..5b42a318b4c7b660fb7fec9e76cbeab0a1c60709 100644 (file)
@@ -138,7 +138,7 @@ void            gen_vec (char *fname_huffcode_tab)
                continue;
 
            /* current character has LITERAL CODE */
-           strcpy (temp, huff_code[LITERAL_NUM]);
+           snprintf(temp, sizeof(temp), "%s", huff_code[LITERAL_NUM]);
            *(code_length + i) = *(code_length + LITERAL_NUM) + 8;
            ch = (unsigned char) i;
            for (j = 0; j < 8; j++) {
index b87de0ab829cd20af09a4c33ed691bb64481190d..31d0fad8aace92b877f5cc59a484ddf9f39bbb59 100644 (file)
@@ -169,7 +169,7 @@ int             is_duprec (char *recid)
            duprec_hashsize);
 #endif
 
-       hashtab = malloc ((duprec_hashsize + 2L) * sizeof (HASHNODE **));
+       hashtab = malloc ((duprec_hashsize + 2L) * sizeof (HASHNODE *));
        if (hashtab == NULL)
            return OUT_OF_MEM;
 
index 8d265db827b6a4949a7429c6e6e1461c76448c1f..00672697860ec2644a96316f6c8631b55ae0c651 100644 (file)
@@ -203,7 +203,7 @@ static char *language_name (DtSrINT16 langno)
                "French",               /*  3 = DtSrLaFRA */
                "Italian",              /*  4 = DtSrLaITA */
                "German",               /*  5 = DtSrLaDEU */
-               "Japanese-comp"         /*  6 = DtSrLaJPN */
+               "Japanese-comp",        /*  6 = DtSrLaJPN */
                "Japanese-.knj"         /*  7 = DtSrLaJPN2 */
                };
 
index be66b63716dccb64cb19d296229d4701dcdd14eb..48d27fe9e0f2eae4d8f46052b6c85e22ff37e0f2 100644 (file)
@@ -237,9 +237,12 @@ LLIST          *cutnode_llist (LLIST * node, LLIST ** llistp)
  */
 static LLIST   *split_llist (LLIST * lst)
 {
-    LLIST          *tail = lst->link;
-    if (lst == NULL || tail == NULL)
+    LLIST          *tail;
+    if (lst == NULL || lst->link)
        return lst;
+
+    tail = lst->link;
+
     /* advance 'tail' to end of list, and advance 'lst' only half as often */
     while ((tail != NULL) && ((tail = tail->link) != NULL)) {
        lst = lst->link;
index 3499ea084772096a1864c01dcbd9b08cea4fd5ec..56ce7ae65bb59ce2c33bfd2d901f873e446107a0 100644 (file)
@@ -889,6 +889,7 @@ GOT_FULLNAME:
            "%s Status unavailable for configuration file '%s': %s"),
            PROGNAME"1404", fullname, strerror(errno));
        DtSearchAddMessage (sprintbufp);
+       fclose(fptr);
        return FALSE;
     }
     OE_sitecnfg_mtime = statbuf.st_mtime;
@@ -1055,7 +1056,8 @@ OCFOPEN_OK:
        /* parse KEYWORD */
        if ((token = _XStrtok(inbuf, DELIMITERS, strtok_buf)) == NULL)
            continue;
-       strcpy (uprtoken, token);
+       
+       snprintf(uprtoken, sizeof(uprtoken), "%s", token);
        strupr (uprtoken);
 
        if (strcmp (uprtoken, "PATH") == 0) {
index f4ccc4c7dfa196bf35f6aede0e7cfab5f29f0bfa..3600b2302ed7c650a5b9b299fd344de743f6c499 100644 (file)
@@ -38,7 +38,7 @@ EXTRA_DEFINES = -DBYTE_SWAP -D_XOPEN_SOURCE=500
 DEFINES = DtSvcDefines \
           -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
           -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
-          -DNO_TRANS -DUNIX -DNO_CONST -D_POSIX_SOURCE 
+          -DNO_TRANS -DUNIX -D_POSIX_SOURCE 
 
 INCLUDES = -I.
 
@@ -48,56 +48,52 @@ HEADERS = \
        dblock.h   dbxtrn.h   dtcover.h  ll.h       proto.h    trxlog.h
 
 SRCS = \
-       alloc.c     cmstat.c    cmtype.c   connect.c \
-       costat.c    cotype.c    crget.c    crread.c    crset.c \
-       crstat.c    crtype.c    crwrite.c  csmget.c    csmread.c \
+       alloc.c     cmtype.c   connect.c \
+       cotype.c    crget.c    crread.c    crset.c \
+       crtype.c    crwrite.c  csmget.c    csmread.c \
        csmset.c    csmwrite.c  csoget.c   csoread.c   csoset.c \
-       csowrite.c  csstat.c    ctscm.c    ctsco.c     ctscr.c \
+       csowrite.c \
        dbacode.c   dbdpath.c   dbfpath.c  dblfcns.c \
         dbswab.c    dbuserid.c \
        delete.c    destroy.c   dio.c      discon.c    disdel.c \
        fillnew.c   findco.c    findfm.c   findlm.c    findnm.c \
-       findpm.c    gtscm.c     gtsco.c    gtscr.c     gtscs.c \
+       findpm.c \
        initial.c   inittab.c   ismember.c \
        isowner.c   keydel.c    keyexist.c keyfcns.c \
        keyfind.c   keyfrst.c   keylast.c  keynext.c   keyprev.c \
        keystore.c  libfcns.c   makenew.c  mapchar.c \
-       members.c   netunix.c   oflag.c    opens.c     options.c \
+       members.c   oflag.c    opens.c     options.c \
        pathfcns.c  recfcns.c   recfrst.c  reclast.c   recnext.c \
        recprev.c   recread.c   recset.c \
-       recstat.c   recwrite.c  renfile.c  rwcurr.c    setdb.c \
+       recwrite.c  renfile.c  rwcurr.c    setdb.c \
        setmm.c     setmo.c     setmr.c    setom.c     setoo.c \
-       setor.c     setrm.c     setro.c    startup.c   stscm.c \
-       stsco.c     stscr.c     stscs.c \
-       utscm.c     utsco.c     utscr.c    utscs.c
+       setor.c     setrm.c     setro.c    startup.c
 
 /* WARNING!!!!
  * Any .o's added to this list need to be added to DTUTIL1_OBJS1
  * and SHARED_DTUTIL1_OBJS1 in the DtSearch Imakefile.
  */
 OBJS = \
-       alloc.o     cmstat.o    cmtype.o   connect.o \
-       costat.o    cotype.o    crget.o    crread.o    crset.o \
-       crstat.o    crtype.o    crwrite.o  csmget.o    csmread.o \
+       alloc.o     cmtype.o   connect.o \
+       cotype.o    crget.o    crread.o    crset.o \
+       crtype.o    crwrite.o  csmget.o    csmread.o \
        csmset.o    csmwrite.o  csoget.o   csoread.o   csoset.o \
-       csowrite.o  csstat.o    ctscm.o    ctsco.o     ctscr.o \
+       csowrite.o \
        dbacode.o   dbdpath.o   dbfpath.o  dblfcns.o \
         dbswab.o    dbuserid.o \
        delete.o    destroy.o   dio.o      discon.o    disdel.o \
        fillnew.o   findco.o    findfm.o   findlm.o    findnm.o \
-       findpm.o    gtscm.o     gtsco.o    gtscr.o     gtscs.o \
+       findpm.o \
        initial.o   inittab.o   ismember.o \
        isowner.o   keydel.o    keyexist.o keyfcns.o \
        keyfind.o   keyfrst.o   keylast.o  keynext.o   keyprev.o \
        keystore.o  libfcns.o   makenew.o  mapchar.o \
-       members.o   netunix.o   opens.o    options.o   oflag.o \
+       members.o   opens.o    options.o   oflag.o \
        pathfcns.o  recfcns.o   recfrst.o  reclast.o   recnext.o \
        recprev.o   recread.o   recset.o \
-       recstat.o   recwrite.o  renfile.o  rwcurr.o    setdb.o \
+       recwrite.o  renfile.o  rwcurr.o    setdb.o \
        setmm.o     setmo.o     setmr.o    setom.o     setoo.o \
-       setor.o     setrm.o     setro.o    startup.o   stscm.o \
-       stsco.o     stscr.o     stscs.o \
-       utscm.o     utsco.o     utscr.o    utscs.o
+       setor.o     setrm.o     setro.o    startup.o
 
 #include <Library.tmpl>
 
index 6b44a2dad781fb0b1f474ae73bb604fa943a914d..7303d317cf63bf2ae679bf9d2c1134f7d5cfaacf 100644 (file)
@@ -90,8 +90,7 @@
 
 /* Allocate and clear i*s bytes of memory
 */
-char FAR * d_calloc(i, s)
-unsigned i, s;
+char * d_calloc(unsigned i, unsigned s)
 {
    return (I_CALLOC(cp, i, s));
 }
@@ -99,16 +98,14 @@ unsigned i, s;
 
 /* Allocate b bytes of memory
 */
-char FAR * d_alloc(b)
-unsigned b;
+char * d_alloc(unsigned b)
 {
    return (I_MALLOC(cp, b));
 }
 
 /* Free memory
 */
-void d_free(p)
-CHAR_P FAR *p;
+void d_free(CHAR_P *p)
 {
    if ((p != NULL) && (p->ptr != NULL)) {
       I_FREE(p);
@@ -117,12 +114,11 @@ CHAR_P FAR *p;
 }
 
 
-static int NewInit(P1(LL_P FAR *));
+static int NewInit(P1(LL_P *));
 
 /* Resets pointer to current element and checks for an empty list
 */
-BOOLEAN ll_access(ll)
-llist FAR *ll;
+BOOLEAN ll_access(llist *ll)
 {
    ll->curr = NULL;
    return( ll->head.ptr != NULL && ll->tail.ptr != NULL );
@@ -130,9 +126,7 @@ llist FAR *ll;
 
 /* Appends item to list
 */
-int ll_append(ll, data)
-llist FAR *ll;
-CHAR_P FAR *data;
+int ll_append(llist *ll, CHAR_P *data)
 {
    LL_P item;
    LL_P hold;
@@ -143,18 +137,18 @@ CHAR_P FAR *data;
    if ( ll->head.ptr == NULL ) {
       /* Empty list */
       ll->head = ll->tail = item;
-      ll->curr = (LL_P FAR *)&ll->head;
+      ll->curr = (LL_P *)&ll->head;
       CurrLock(ll);
    }
    else {
       CurrUnlock(ll);
-      ll->curr = (LL_P FAR *)&ll->tail;
+      ll->curr = (LL_P *)&ll->tail;
       CurrLock(ll);
       hold = item;
       MEM_LOCK(&item);
       ll->curr->ptr->next = item;
       CurrUnlock(ll);
-      ll->curr = (LL_P FAR *)&ll->tail;
+      ll->curr = (LL_P *)&ll->tail;
       *ll->curr = hold;
       CurrLock(ll);
    }
@@ -164,33 +158,30 @@ CHAR_P FAR *data;
 
 /* Finds the first element of a list and returns its data 
 */
-CHAR_P FAR *ll_first(ll)
-llist FAR *ll;
+CHAR_P *ll_first(llist *ll)
 {
    if ( ll->head.ptr == NULL ) {
       return( NULL );
    }
    CurrUnlock(ll);
-   ll->curr = (LL_P FAR *)&ll->head;
+   ll->curr = (LL_P *)&ll->head;
    CurrLock(ll);
-   return( (CHAR_P FAR *)&ll->curr->ptr->data );
+   return( (CHAR_P *)&ll->curr->ptr->data );
 }
 
 /* Frees a list
 */
-void ll_free(ll)
-llist FAR *ll;
+void ll_free(llist *ll)
 {
-   LL_P FAR *curr, next, free;
+   LL_P *curr, next, free;
 
-   curr = (LL_P FAR *)&ll->head;
+   curr = (LL_P *)&ll->head;
    while ( TRUE ) {
       MEM_LOCK(curr);
       if ( curr->ptr == NULL )
         break;
       bytecpy(&next, &curr->ptr->next, sizeof(LL_P));
-      if ( curr != NULL )
-        d_free((CHAR_P FAR *)curr);
+      d_free((CHAR_P *)curr);
       bytecpy(&free, &next, sizeof(LL_P));
       curr = &free;
    }
@@ -200,10 +191,9 @@ llist FAR *ll;
 
 /* Finds the next element and returns its data
 */
-CHAR_P FAR *ll_next(ll)
-llist FAR *ll;
+CHAR_P *ll_next(llist *ll)
 {
-   LL_P FAR *next;
+   LL_P *next;
 
    if ( ll->curr == NULL ) {
       return( ll_first(ll) );
@@ -215,14 +205,12 @@ llist FAR *ll;
    CurrUnlock(ll);
    ll->curr = next;
    CurrLock(ll);
-   return( (CHAR_P FAR *)&ll->curr->ptr->data );
+   return( (CHAR_P *)&ll->curr->ptr->data );
 }
 
 /* Prepends (stacks) item 
 */
-int ll_prepend(ll, data)
-llist FAR *ll;
-CHAR_P FAR *data;
+int ll_prepend(llist *ll, CHAR_P *data)
 {
    LL_P item;
 
@@ -232,7 +220,7 @@ CHAR_P FAR *data;
    if ( ll->head.ptr == NULL ) {
       /* Empty list */
       ll->head = ll->tail = item;
-      ll->curr = (LL_P FAR *)&ll->head;
+      ll->curr = (LL_P *)&ll->head;
       CurrLock(ll);
    }
    else {
@@ -240,7 +228,7 @@ CHAR_P FAR *data;
       MEM_LOCK(&item);
       item.ptr->next = ll->head;
       MEM_UNLOCK(&item);
-      ll->curr = (LL_P FAR *)&ll->head;
+      ll->curr = (LL_P *)&ll->head;
       *ll->curr = item;
       CurrLock(ll);
    }
@@ -250,10 +238,9 @@ CHAR_P FAR *data;
 
 /* Allocates and initializes a new list element
 */
-static int NewInit(new)
-LL_P FAR *new;
+static int NewInit(LL_P *new)
 {
-   new->ptr = (ll_elem FAR *)ALLOC(new, sizeof(ll_elem), "new");
+   new->ptr = (ll_elem *)ALLOC(new, sizeof(ll_elem), "new");
    if ( new->ptr == NULL )
       return( dberr(S_NOMEMORY) );
    byteset(new->ptr, '\0', sizeof(ll_elem));
diff --git a/cde/lib/DtSearch/raima/cmstat.c b/cde/lib/DtSearch/raima/cmstat.c
deleted file mode 100644 (file)
index 0691940..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: cmstat.c /main/2 1996/05/09 03:56:07 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_cmstat
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   cmstat.c -- db_VISTA member timestamp status check module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Test timestamp status of current member
-*/
-d_cmstat(set TASK_PARM DBN_PARM)
-int set;
-TASK_DECL
-DBN_DECL
-{
-   ULONG cts, uts;
-   ULONG cmts;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
-   if ( d_ctscm(set, &cts TASK_PARM DBN_PARM) == S_OKAY ) {
-      if ( cts ) {
-        cmts = cm_time[NUM2INT(set - SETMARK, st_offset)];
-        if ( cts > cmts )
-           db_status = S_DELETED;
-        else {
-           d_utscm(set, &uts TASK_PARM DBN_PARM);
-           if ( uts > cmts )
-              db_status = S_UPDATED;
-        }
-      }
-      else
-        dberr(S_TIMESTAMP);
-   }
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin cmstat.c */
index 6cb9d3fcca54b1ab1cdae3087ea2bad783c4ab5e..fa945a27da6ab5c76fe2f3d4f4bd1edc4309c246 100644 (file)
 /* Get current member type
 */
 int
-d_cmtype(set, cmtype TASK_PARM DBN_PARM)
-int set;
-int FAR *cmtype;
-TASK_DECL
-DBN_DECL
+d_cmtype(int set, int *cmtype, int dbn)
 {
-   char FAR *mrec;
+   char *mrec;
    INT crt;
-   SET_ENTRY FAR *set_ptr;
-#ifndef SINGLE_USER
-   int dbopen_sv;
-#endif
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY **)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    if ( ! curr_mem[set] )
       RETURN( dberr( S_NOCM ) );
 
-#ifndef SINGLE_USER
-   /* set up to allow unlocked read */
-   dbopen_sv = dbopen;
-   dbopen = 2;
-#endif
 
    /* Read current member */
-   dio_read(curr_mem[set], (char FAR * FAR *)&mrec, NOPGHOLD);
-#ifndef SINGLE_USER
-   dbopen = dbopen_sv;
-#endif
+   dio_read(curr_mem[set], (char **)&mrec, NOPGHOLD);
    if (db_status != S_OKAY)
       RETURN( db_status );
 
    /* Fetch record type from record header */
    bytecpy(&crt, mrec, sizeof(INT));
-#ifndef SINGLE_USER
-   crt &= ~RLBMASK; /* mask off rlb */
-#endif
    *cmtype = (int)crt + RECMARK;
 
    RETURN( db_status );
index 5b9cd85e6714023a690d71129e504e3f4a7ab39a..4bd9e739e2147a70e12572ce4c0f07ac873a6994 100644 (file)
 #include "dbtype.h"
 
 /* Internal function Prototypes */
-static int sortcmp(P1(SET_ENTRY FAR *) Pi(char FAR *) 
-                                 Pi(char FAR *));
+static int sortcmp(P1(SET_ENTRY *) Pi(char *) 
+                                 Pi(char *));
 
 /* set pointer structure definition */
 typedef struct {
    LONG    total;     /* total number of members in set */
    DB_ADDR first;     /* database address of first member in set */
    DB_ADDR last;      /* database address of last member in set */
-#ifndef         NO_TIMESTAMP
-   ULONG   timestamp; /* set update timestamp - if used */
-#endif
 } SET_PTR;
 
 /* member pointer structure definition */
@@ -74,33 +71,30 @@ typedef struct {
 /* Connect the current record as member of set
 */
 int
-d_connect(set TASK_PARM DBN_PARM)
-int set; /* Set constant */
-TASK_DECL
-DBN_DECL /* Database number */
+d_connect(
+int set, /* Set constant */
+int dbn  /* Database number */
+)
 {
    MEM_PTR crmp;          /* current record's member pointer */
    SET_PTR cosp;          /* current owner's set pointer */
    MEM_PTR cmmp;          /* current member's member pointer */
    MEM_PTR nmmp;          /* next member's member pointer */
-   char FAR *crec;            /* ptr to current record contents in cache */
-   char FAR *orec;            /* ptr to current owner record contents in cache */
-   char FAR *mrec;            /* ptr to current member record contents in cache */
-   char FAR *nrec;            /* ptr to next member record contents in cache */
+   char *crec;            /* ptr to current record contents in cache */
+   char *orec;            /* ptr to current owner record contents in cache */
+   char *mrec;            /* ptr to current member record contents in cache */
+   char *nrec;            /* ptr to next member record contents in cache */
    DB_ADDR mdba;          /* db address of current member record */
    DB_ADDR ndba;          /* db address of next member record */
    INT ordering;          /* set order control variable */
    int stat, compare;     /* status code & sort comparison result */
-#ifndef         NO_TIMESTAMP
-   FILE_NO file;
-#endif
-   SET_ENTRY FAR *set_ptr;
-   DB_ADDR FAR *co_ptr;
-   DB_ADDR FAR *cm_ptr;
+   SET_ENTRY *set_ptr;
+   DB_ADDR *co_ptr;
+   DB_ADDR *cm_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY **)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* make sure we have a current record */
@@ -114,16 +108,16 @@ DBN_DECL /* Database number */
    crec = orec = mrec = nrec = NULL;
 
    /* read current record */
-   if ( dio_read( curr_rec, (char FAR * FAR *)&crec, PGHOLD ) != S_OKAY )
+   if ( dio_read( curr_rec, (char **)&crec, PGHOLD ) != S_OKAY )
       RETURN( db_status );
    
    /* read owner record */
-   if ( (stat = dio_read(*co_ptr, (char FAR * FAR *)&orec, PGHOLD)) != S_OKAY ) {
+   if ( (stat = dio_read(*co_ptr, (char **)&orec, PGHOLD)) != S_OKAY ) {
       dio_release( curr_rec );
       RETURN( stat );
    }
    /* get copy of current record's member ptr for set */
-   if ( (stat = r_gmem(set, crec, (char FAR *)&crmp)) != S_OKAY )
+   if ( (stat = r_gmem(set, crec, (char *)&crmp)) != S_OKAY )
       goto quit;
 
    /* ensure record not already connected to set */
@@ -132,7 +126,7 @@ DBN_DECL /* Database number */
       goto quit;
    }
    /* get set pointer from owner */
-   if ( r_gset(set, orec, (char FAR *)&cosp) != S_OKAY ) {
+   if ( r_gset(set, orec, (char *)&cosp) != S_OKAY ) {
       stat = db_status == S_INVOWN ? dberr(S_SYSERR) : db_status;
       goto quit;
    }
@@ -162,8 +156,8 @@ DBN_DECL /* Database number */
         for (mdba = cosp.first; TRUE; mdba = cmmp.next) {
            /* read member record and get member pointer from member
               record */
-           if (((stat = dio_read(mdba, (char FAR * FAR *)&mrec, NOPGHOLD)) != S_OKAY) ||
-               ((stat = r_gmem(set, mrec, (char FAR *)&cmmp)) != S_OKAY))
+           if (((stat = dio_read(mdba, (char * *)&mrec, NOPGHOLD)) != S_OKAY) ||
+               ((stat = r_gmem(set, mrec, (char *)&cmmp)) != S_OKAY))
               goto quit;
 
            /* compare sort fields of current record with member record */
@@ -190,8 +184,8 @@ DBN_DECL /* Database number */
            member pointer
         */
         mdba = cosp.first;
-        if (((stat = dio_read(mdba, (char FAR * FAR *)&mrec, PGHOLD)) != S_OKAY) ||
-            ((stat = r_gmem(set, mrec, (char FAR *)&cmmp)) != S_OKAY))
+        if (((stat = dio_read(mdba, (char * *)&mrec, PGHOLD)) != S_OKAY) ||
+            ((stat = r_gmem(set, mrec, (char *)&cmmp)) != S_OKAY))
            goto quit;
 
         /* set current member's previous, and current owner's first, to
@@ -210,8 +204,8 @@ DBN_DECL /* Database number */
         /* read current member record and get member pointer from
            current member
         */
-        if (((stat = dio_read(mdba, (char FAR * FAR *)&mrec, PGHOLD)) != S_OKAY) ||
-            ((stat = r_gmem(set, mrec, (char FAR *)&cmmp)) != S_OKAY))
+        if (((stat = dio_read(mdba, (char * *)&mrec, PGHOLD)) != S_OKAY) ||
+            ((stat = r_gmem(set, mrec, (char *)&cmmp)) != S_OKAY))
            goto quit;
 
         /* set current record's next to current member's next */
@@ -231,8 +225,8 @@ DBN_DECL /* Database number */
         }
         /* read next member record and member pointer from next member */
         ndba = crmp.next;
-        if (((stat = dio_read(ndba, (char FAR * FAR *)&nrec, PGHOLD)) != S_OKAY) ||
-            ((stat = r_gmem(set, nrec, (char FAR *)&nmmp)) != S_OKAY))
+        if (((stat = dio_read(ndba, (char * *)&nrec, PGHOLD)) != S_OKAY) ||
+            ((stat = r_gmem(set, nrec, (char *)&nmmp)) != S_OKAY))
            goto quit;
 
         /* set previous pointer in next member to current record */
@@ -251,18 +245,11 @@ DBN_DECL /* Database number */
 inserted:
    /* increment total members in set */
    ++cosp.total;
-#ifndef         NO_TIMESTAMP
-   /* check for timestamp */
-   if ( set_ptr->st_flags & TIMESTAMPED ) {
-      file = NUM2INT((FILE_NO)((*co_ptr >> FILESHIFT) & FILEMASK), ft_offset);
-      cosp.timestamp = dio_pzgetts(file);
-   }
-#endif
    if ( mrec ) { 
       /* put member pointer back into member record and mark member
         record as modified
       */
-      if (((stat = r_pmem(set, mrec, (char FAR *)&cmmp)) != S_OKAY) ||
+      if (((stat = r_pmem(set, mrec, (char *)&cmmp)) != S_OKAY) ||
          ((stat = dio_write(mdba, NULL, PGFREE)) != S_OKAY))
         goto quit;
    }
@@ -270,28 +257,21 @@ inserted:
       /* put member pointer back into next record and mark next record
         as modified
       */
-      if (((stat = r_pmem(set, nrec, (char FAR *)&nmmp)) != S_OKAY) ||
+      if (((stat = r_pmem(set, nrec, (char *)&nmmp)) != S_OKAY) ||
          ((stat = dio_write(ndba, NULL, PGFREE)) != S_OKAY))
         goto quit;
    }
    /* put set pointer back into owner record and mark owner record as
       modified; put member pointer back into current record mark current
       record as modified */
-   if (((stat = r_pset(set, orec, (char FAR *)&cosp)) != S_OKAY) ||
+   if (((stat = r_pset(set, orec, (char *)&cosp)) != S_OKAY) ||
        ((stat = dio_write(*co_ptr, NULL, PGFREE)) != S_OKAY) ||
-       ((stat = r_pmem(set, crec, (char FAR *)&crmp)) != S_OKAY) ||
+       ((stat = r_pmem(set, crec, (char *)&crmp)) != S_OKAY) ||
        ((stat = dio_write(curr_rec, NULL, PGFREE)) != S_OKAY))
       goto quit;
 
    /* set current member to current record */
    *cm_ptr = curr_rec;
-#ifndef         NO_TIMESTAMP
-   /* check and fetch timestamps */
-   if ( db_tsrecs )
-      d_utscr(&cm_time[set] TASK_PARM);
-   if ( db_tssets )
-      cs_time[set] = cosp.timestamp;
-#endif
    RETURN( db_status );
 
 /* error return */
@@ -306,29 +286,28 @@ quit:
 
 /* Compare two sort fields
 */
-static int sortcmp(set_ptr, mem1, mem2)
-SET_ENTRY FAR *set_ptr; /* set table entry */
-char FAR *mem1; /* member record 1 */
-char FAR *mem2; /* member record 2 */
+static int sortcmp(
+SET_ENTRY *set_ptr, /* set table entry */
+char *mem1, /* member record 1 */
+char *mem2  /* member record 2 */
+)
 {
    INT rn1, rn2;  /* record numbers for mem1 & mem2 */
-   MEMBER_ENTRY FAR *mt1, FAR *mt2;
-   register MEMBER_ENTRY FAR *mt;
+   MEMBER_ENTRY *mt1, *mt2;
+   MEMBER_ENTRY *mt;
    int mem, memtot;
    int cmp;       /* fldcmp result */
-   register int maxflds;
-   register SORT_ENTRY FAR *srt1_ptr, FAR *srt2_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   int maxflds;
+   SORT_ENTRY *srt1_ptr, *srt2_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    /* extract record numbers from record header */
    bytecpy(&rn1, mem1, sizeof(INT));
    rn1 &= ~RLBMASK; /* mask off rlb */
    bytecpy(&rn2, mem2, sizeof(INT));
    rn2 &= ~RLBMASK; /* mask off rlb */
-#ifndef         ONE_DB
    rn1 += curr_db_table->rt_offset;
    rn2 += curr_db_table->rt_offset;
-#endif
 
    /* locate member_table entries for these record types */
    mt2 = mt1 = NULL;
diff --git a/cde/lib/DtSearch/raima/costat.c b/cde/lib/DtSearch/raima/costat.c
deleted file mode 100644 (file)
index b1a1b78..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: costat.c /main/2 1996/05/09 03:56:57 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_costat
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   costat.c -- db_VISTA owner timestamp status check module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Test timestamp status of current owner
-*/
-d_costat(set TASK_PARM DBN_PARM)
-int set;
-TASK_DECL
-DBN_DECL
-{
-   ULONG cts, uts;
-   ULONG cots;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
-
-   if ( d_ctsco(set, &cts TASK_PARM DBN_PARM) == S_OKAY ) {
-      if ( cts ) {
-        cots = co_time[NUM2INT(set - SETMARK, st_offset)];
-        if ( cts > cots )
-           db_status = S_DELETED;
-        else {
-           d_utsco(set, &uts TASK_PARM DBN_PARM);
-           if ( uts > cots )
-              db_status = S_UPDATED;
-        }
-      }
-      else
-        dberr(S_TIMESTAMP);
-   }
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin costat.c */
index 1dad100e7f4fe51a831bcd13e979caf4de57408c..51db86462684964a481b2fe9c45019ed4eb07dc6 100644 (file)
 /* Get current owner type
 */
 int
-d_cotype(set, cotype TASK_PARM DBN_PARM)
-int set;
-int FAR *cotype;
-TASK_DECL
-DBN_DECL
+d_cotype(int set, int *cotype, int dbn)
 {
-   char FAR *orec;
+   char *orec;
    INT crt;
-#ifndef SINGLE_USER
-   int dbopen_sv;
-#endif
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    if ( ! curr_own[set] )
       RETURN( dberr( S_NOCO ) );
 
    /* set up to allow unlocked read */
-#ifndef SINGLE_USER
-   dbopen_sv = dbopen;
-   dbopen = 2;
-#endif
 
    /* Read current owner */
-   dio_read(curr_own[set], (char FAR * FAR *)&orec, NOPGHOLD);
-#ifndef SINGLE_USER
-   dbopen = dbopen_sv;
-#endif
+   dio_read(curr_own[set], (char * *)&orec, NOPGHOLD);
    if (db_status != S_OKAY)
       RETURN( db_status );
 
index 978d3b7f5a61abe8b6f0740ac0f32829bbcc8069..cac33561c5eb622a184f53be4f3a02a9a01202e7 100644 (file)
 /* Get current record
 */
 int
-d_crget(dba TASK_PARM DBN_PARM)
-DB_ADDR FAR *dba; /* db address of record to become current */
-TASK_DECL
-DBN_DECL
+d_crget(
+DB_ADDR *dba, /* db address of record to become current */
+int dbn
+)
 {
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO));
 
index b4522166d6e8c6ebb1d980c83e72f5149721d548..59fcd9e7e65d0fdd465d22bd0a9a5dce4e2d2a06 100644 (file)
 /* Read data from field  of current record
 */
 int
-d_crread(field, data TASK_PARM DBN_PARM)
-long field; /* Field constant */
-char FAR *data; /* Data area to contain field contents */
-TASK_DECL
-DBN_DECL    /* database number */
+d_crread(
+long field, /* Field constant */
+char *data, /* Data area to contain field contents */
+int dbn     /* database number */
+)
 {
    int fld, rec;
-#ifndef SINGLE_USER
-   int dbopen_sv;
-#endif
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)
+   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* Make sure we have a current record */
@@ -74,16 +71,9 @@ DBN_DECL    /* database number */
       RETURN( dberr(S_NOCR) );
 
    /* set up to allow unlocked read */
-#ifndef SINGLE_USER
-   dbopen_sv = dbopen;
-   dbopen = 2;
-#endif
 
    /* Read current record */
-   dio_read( curr_rec, (char FAR * FAR *)&crloc , NOPGHOLD);
-#ifndef SINGLE_USER
-   dbopen = dbopen_sv;
-#endif
+   dio_read( curr_rec, (char * *)&crloc , NOPGHOLD);
    if (db_status != S_OKAY)
       RETURN( db_status );
   
index 90ceff9e5ab3f26ba50f54ad189441cf687f24df..a27af515ca138908758218171b8b138cc532ed2e 100644 (file)
 /* Set current record
 */
 int
-d_crset(dba TASK_PARM DBN_PARM)
-DB_ADDR FAR *dba; /* db address of record to become current */
-TASK_DECL
-DBN_DECL
+d_crset(
+DB_ADDR *dba, /* db address of record to become current */
+int dbn
+)
 {
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
diff --git a/cde/lib/DtSearch/raima/crstat.c b/cde/lib/DtSearch/raima/crstat.c
deleted file mode 100644 (file)
index bd36071..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: crstat.c /main/2 1996/05/09 03:58:12 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_crstat
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   crstat.c -- db_VISTA current record timestamp status check module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Test timestamp status of current record
-*/
-d_crstat(TASK_ONLY)
-TASK_DECL
-{
-   ULONG cts, uts;
-
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(RECORD_IO));
-
-   if ( d_ctscr(&cts TASK_PARM) == S_OKAY ) {
-      if ( cts ) {
-        d_utscr(&uts TASK_PARM);
-        if ( cts > cr_time )
-           db_status = S_DELETED;
-        else if ( uts > cr_time )
-           db_status = S_UPDATED;
-      }
-      else
-        dberr(S_TIMESTAMP);
-   }
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin crstat.c */
index 1f1f9b369ec8a9a3a86382d717928f6094f644ca..97969c41dbeca1a475ad6a659b749855c526e22e 100644 (file)
 /* Get current record type
 */
 int
-d_crtype(crtype TASK_PARM DBN_PARM)
-int FAR *crtype;
-TASK_DECL
-DBN_DECL
+d_crtype(
+int *crtype,
+int dbn
+)
 {
    INT crt;
-#ifndef SINGLE_USER
-   int dbopen_sv;
-#endif
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
@@ -68,16 +65,9 @@ DBN_DECL
       RETURN( dberr( S_NOCR ) );
 
    /* set up to allow unlocked read */
-#ifndef SINGLE_USER
-   dbopen_sv = dbopen;
-   dbopen = 2;
-#endif
 
    /* Read current record */
-   dio_read(curr_rec, (char FAR * FAR *)&crloc, NOPGHOLD);
-#ifndef SINGLE_USER
-   dbopen = dbopen_sv;
-#endif
+   dio_read(curr_rec, (char * *)&crloc, NOPGHOLD);
    if (db_status != S_OKAY)
       RETURN( db_status );
    
index ad7aa0dd5b9b25a1f2f88b5552f3cb17f0a9236d..516b4e3ad8cce010c5b2860357520c3d717fcaa3 100644 (file)
 /* Write data to a field  in the current record
 */
 int
-d_crwrite(field, data TASK_PARM DBN_PARM)
-long field; /* field constant */
-char FAR *data; /* data area to contain field contents */
-TASK_DECL
-DBN_DECL    /* database number */
+d_crwrite(
+long field, /* field constant */
+char *data, /* data area to contain field contents */
+int dbn     /* database number */
+)
 {
-#ifndef         NO_TIMESTAMP
-   ULONG timestamp;
-#endif
    int stat, fld, rec;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
    
-   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)
+   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* compound keys cannot be updated directly */
@@ -82,7 +79,7 @@ DBN_DECL    /* database number */
       RETURN( dberr(S_NOCR) );
 
    /* Read current record */
-   if ( dio_read( curr_rec, (char FAR * FAR *)&crloc , PGHOLD) != S_OKAY )
+   if ( dio_read( curr_rec, (char * *)&crloc , PGHOLD) != S_OKAY )
       RETURN( db_status );
            
    /* check out the field */
@@ -93,18 +90,7 @@ DBN_DECL    /* database number */
    /* put data into record and return */
    if ( r_pfld(fld, fld_ptr, crloc, data, &curr_rec) != S_OKAY )
       RETURN( db_status );
-#ifndef         NO_TIMESTAMP
-   /* check for timestamp */
-   if ( rec_ptr->rt_flags & TIMESTAMPED ) {
-      timestamp = dio_pzgetts(rec_ptr->rt_file);
-      bytecpy( crloc + RECUPTIME, &timestamp, sizeof(LONG));
-   }
-#endif
    dio_write(curr_rec, NULL, PGFREE);
-#ifndef         NO_TIMESTAMP
-   if (( db_status == S_OKAY ) && ( rec_ptr->rt_flags & TIMESTAMPED ))
-      cr_time = timestamp;
-#endif
    RETURN( db_status );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin crwrite.c */
index 9d2f99a23076f260ca34b629737c262543c4eac8..b10b127c37f82905f01be28808b093c77476c7fa 100644 (file)
 /* Get current set member
 */
 int
-d_csmget(set, dba TASK_PARM DBN_PARM)
-int set;      /* Set table entry */
-DB_ADDR FAR *dba; /* db address of record to become current */
-TASK_DECL
-DBN_DECL      /* database number */
+d_csmget(
+int set,      /* Set table entry */
+DB_ADDR *dba, /* db address of record to become current */
+int dbn       /* database number */
+)
 {
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO));
 
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    if ( ! (*dba = curr_mem[set]) )
index d0858d558069a38ddea4d2bb3ae1de899883a4cf..c516225b2ed599d522e5b25b1320b660aabf9573 100644 (file)
 /* Read data from field of current set member
 */
 int
-d_csmread(set, field, data TASK_PARM DBN_PARM)
-int set;    /* Set constant */
-long field; /* Field constant */
-char FAR *data; /* Data area to contain field contents */
-TASK_DECL
-DBN_DECL    /* database number */
+d_csmread(
+int set,    /* Set constant */
+long field, /* Field constant */
+char *data, /* Data area to contain field contents */
+int dbn     /* database number */
+)
 {
    int fld, rec;
-#ifndef SINGLE_USER
-   int dbopen_sv;
-#endif
-   char FAR *recp;
-   SET_ENTRY FAR *set_ptr;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   char *recp;
+   SET_ENTRY *set_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if ((nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) ||
-       (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY))
+   if ((nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) ||
+       (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY))
       RETURN( db_status );
 
    /* Make sure we have a current member */
@@ -78,16 +75,9 @@ DBN_DECL    /* database number */
       RETURN( dberr(S_NOCM) );
 
    /* set up to allow unlocked read */
-#ifndef SINGLE_USER
-   dbopen_sv = dbopen;
-   dbopen = 2;
-#endif
 
    /* Read current member */
-   dio_read( curr_mem[set], (char FAR * FAR *)&recp , NOPGHOLD);
-#ifndef SINGLE_USER
-   dbopen = dbopen_sv;
-#endif
+   dio_read( curr_mem[set], (char * *)&recp , NOPGHOLD);
    if (db_status != S_OKAY)
       RETURN( db_status );
 
index bd008d70c7db5d29dbcedc391e14fe900016e136..6155802fa39ff279e1b8629add54f782b24a12a4 100644 (file)
 /* Set current set member
 */
 int
-d_csmset(set, dba TASK_PARM DBN_PARM)
-int set;      /* Set table entry */
-DB_ADDR FAR *dba; /* db address of record to become current */
-TASK_DECL
-DBN_DECL      /* database number */
+d_csmset(
+int set,      /* Set table entry */
+DB_ADDR *dba, /* db address of record to become current */
+int dbn       /* database number */
+)
 {
    INT type;
-   char FAR *ptr;
-   SET_ENTRY FAR *set_ptr;
-   MEMBER_ENTRY FAR *mem_ptr;
+   char *ptr;
+   SET_ENTRY *set_ptr;
+   MEMBER_ENTRY *mem_ptr;
    int mem, memtot;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    if ( dba == NULL ) {
@@ -72,12 +72,10 @@ DBN_DECL      /* database number */
    }
    else if ( check_dba(*dba) == S_OKAY ) {
       /* get the record type */
-      if ( dio_read( *dba, (char FAR * FAR *)&ptr, NOPGHOLD ) ) RETURN( db_status );
+      if ( dio_read( *dba, (char * *)&ptr, NOPGHOLD ) ) RETURN( db_status );
       bytecpy( &type, ptr, sizeof(INT) );
       type &= ~RLBMASK;
-#ifndef         ONE_DB
       type += curr_db_table->rt_offset;
-#endif
 
       for (mem = set_ptr->st_members, memtot = mem + set_ptr->st_memtot,
                                                mem_ptr = &member_table[mem];
index 8340f067993489b931dbef65d5dafb99e4832215..1f4656fb567ee3a546e9d05d17527e177b81f8a4 100644 (file)
 /* Write data to a field in the current set member
 */
 int
-d_csmwrite(set, field, data TASK_PARM DBN_PARM)
-int set;    /* Set constant */
-long field; /* Field constant */
-CONST char FAR *data; /* Data area to contain field contents */
-TASK_DECL
-DBN_DECL    /* database number */
+d_csmwrite(
+int set,    /* Set constant */
+long field, /* Field constant */
+const char *data, /* Data area to contain field contents */
+int dbn     /* database number */
+)
 {
-#ifndef         NO_TIMESTAMP
-   ULONG timestamp;
-#endif
    int stat, fld, rec;
-   char FAR *recp;
-   SET_ENTRY FAR *set_ptr;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
-   DB_ADDR FAR *cm_ptr;
+   char *recp;
+   SET_ENTRY *set_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
+   DB_ADDR *cm_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if ((nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) ||
-       (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY))
+   if ((nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) ||
+       (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY))
       RETURN( db_status );
 
    /* compound keys cannot be updated directly */
@@ -87,7 +84,7 @@ DBN_DECL    /* database number */
       RETURN( dberr(S_NOCM) );
 
    /* Read current member */
-   if ( dio_read( *cm_ptr, (char FAR * FAR *)&recp , PGHOLD) != S_OKAY )
+   if ( dio_read( *cm_ptr, (char * *)&recp , PGHOLD) != S_OKAY )
       RETURN( db_status );
   
    /* check out the field */
@@ -98,18 +95,7 @@ DBN_DECL    /* database number */
    /* Put data into record */
    if ( r_pfld(fld, fld_ptr, recp, data, cm_ptr) != S_OKAY )
       RETURN( db_status );
-#ifndef         NO_TIMESTAMP
-   /* check for timestamp */
-   if ( rec_ptr->rt_flags & TIMESTAMPED ) {
-      timestamp = dio_pzgetts(rec_ptr->rt_file);
-      bytecpy( recp + RECUPTIME, &timestamp, sizeof(LONG));
-   }
-#endif
    dio_write(*cm_ptr, NULL, PGFREE);
-#ifndef         NO_TIMESTAMP
-   if (( db_status == S_OKAY ) && ( rec_ptr->rt_flags & TIMESTAMPED ))
-      cm_time[set] = timestamp;
-#endif
    RETURN( db_status );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin csmwrite.c */
index 060c9491baba14291d6581837df5f22da7a34c15..844684199d201a981cf0df2aa90a77885737f823 100644 (file)
 /* Get current set owner
 */
 int
-d_csoget(set, dba TASK_PARM DBN_PARM)
-int set;      /* Set table entry */
-DB_ADDR FAR *dba; /* db address of record to become current */
-TASK_DECL
-DBN_DECL      /* database number */
+d_csoget(
+int set,      /* Set table entry */
+DB_ADDR *dba, /* db address of record to become current */
+int dbn       /* database number */
+)
 {
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO));
 
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    if ( ! (*dba = curr_own[set]) )
index 6a3445d86cd5a81ec44b0c0ed2137c12645a0b81..533388e872a5e386330c246dde50c3043e393d4a 100644 (file)
 /* Read data from field  of current set owner
 */
 int
-d_csoread(set, field, data TASK_PARM DBN_PARM)
-int set;    /* Set constant */
-long field; /* Field constant */
-char FAR *data; /* Data area to contain field contents */
-TASK_DECL
-DBN_DECL    /* database number */
+d_csoread(
+int set,    /* Set constant */
+long field, /* Field constant */
+char *data, /* Data area to contain field contents */
+int dbn     /* database number */
+)
 {
    int fld, rec;
-#ifndef SINGLE_USER
-   int dbopen_sv;
-#endif
-   char FAR *recp;
-   SET_ENTRY FAR *set_ptr;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   char *recp;
+   SET_ENTRY *set_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if ((nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) ||
-       (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY))
+   if ((nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) ||
+       (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY))
       RETURN( db_status );
 
    /* Make sure we have a current owner */
@@ -78,16 +75,9 @@ DBN_DECL    /* database number */
       RETURN( dberr(S_NOCO) );
 
    /* set up to allow unlocked read */
-#ifndef SINGLE_USER
-   dbopen_sv = dbopen;
-   dbopen = 2;
-#endif
 
    /* Read current owner */
-   dio_read( curr_own[set], (char FAR * FAR *)&recp , NOPGHOLD);
-#ifndef SINGLE_USER
-   dbopen = dbopen_sv;
-#endif
+   dio_read( curr_own[set], (char * *)&recp , NOPGHOLD);
    if (db_status != S_OKAY)
       RETURN( db_status );
   
index 63d15a40a44afe90227777e1ce13d1c5c9774063..f8eb91364c242f74d5e8c65d3270df6ebc1f95fd 100644 (file)
 /* Set current set owner
 */
 int
-d_csoset(set, dba TASK_PARM DBN_PARM)
-int set;      /* Set table entry */
-DB_ADDR FAR *dba; /* db address of record to become current */
-TASK_DECL
-DBN_DECL      /* database number */
+d_csoset(
+int set,      /* Set table entry */
+DB_ADDR *dba, /* db address of record to become current */
+int dbn       /* database number */
+)
 {
    INT type;
-   char FAR *ptr;
-   SET_ENTRY FAR *set_ptr;
+   char *ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    if ( dba == NULL ) {
@@ -71,12 +71,10 @@ DBN_DECL      /* database number */
    }
    else if ( check_dba(*dba) == S_OKAY ) {
       /* get the record type */
-      if ( dio_read( *dba, (char FAR * FAR *)&ptr , NOPGHOLD) ) RETURN( db_status );
+      if ( dio_read( *dba, (char * *)&ptr , NOPGHOLD) ) RETURN( db_status );
       bytecpy( &type, ptr, sizeof(INT) );
       type &= ~RLBMASK;
-#ifndef         ONE_DB
       type += curr_db_table->rt_offset;
-#endif
 
       if (set_ptr->st_own_rt != type)
         RETURN( dberr( S_INVOWN ) );
index 1e4eba14954346d16429d9adcc0e6b1ffd27c8b4..f469b652cacc3750e76caf5a80b7753201cbf10b 100644 (file)
 /* Write data to a field in the current set owner
 */
 int
-d_csowrite(set, field, data TASK_PARM DBN_PARM)
-int set;    /* Set constant */
-long field; /* Field constant */
-CONST char FAR *data; /* Data area to contain field contents */
-TASK_DECL
-DBN_DECL    /* database number */
+d_csowrite(
+int set    /* Set constant */
+long field /* Field constant */
+const char *data,  /* Data area to contain field contents */
+int dbn     /* database number */
+)
 {
-#ifndef         NO_TIMESTAMP
-   ULONG timestamp;
-#endif
    int stat, fld, rec;
-   char FAR *recp;
-   SET_ENTRY FAR *set_ptr;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
-   DB_ADDR FAR *co_ptr;
+   char *recp;
+   SET_ENTRY *set_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
+   DB_ADDR *co_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if ((nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) ||
-       (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY))
+   if ((nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) ||
+       (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY))
       RETURN( db_status );
 
    /* compound keys cannot be updated directly */
@@ -87,7 +84,7 @@ DBN_DECL    /* database number */
       RETURN( dberr(S_NOCO) );
 
    /* Read current owner */
-   if ( dio_read( *co_ptr, (char FAR * FAR *)&recp , PGHOLD) != S_OKAY )
+   if ( dio_read( *co_ptr, (char * *)&recp , PGHOLD) != S_OKAY )
       RETURN( db_status );
   
    /* check out the field */
@@ -98,18 +95,7 @@ DBN_DECL    /* database number */
    /* Put data into record */
    if ( r_pfld(fld, fld_ptr, recp, data, co_ptr) != S_OKAY )
       RETURN( db_status );
-#ifndef         NO_TIMESTAMP
-   /* check for timestamp */
-   if ( rec_ptr->rt_flags & TIMESTAMPED ) {
-      timestamp = dio_pzgetts(rec_ptr->rt_file);
-      bytecpy( recp + RECUPTIME, &timestamp, sizeof(LONG));
-   }
-#endif
-   dio_write(*co_ptr, (char FAR *)NULL, PGFREE);
-#ifndef         NO_TIMESTAMP
-   if (( db_status == S_OKAY ) && ( rec_ptr->rt_flags & TIMESTAMPED ))
-      co_time[set] = timestamp;
-#endif
+   dio_write(*co_ptr, (char *)NULL, PGFREE);
    RETURN( db_status );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin csowrite.c */
diff --git a/cde/lib/DtSearch/raima/csstat.c b/cde/lib/DtSearch/raima/csstat.c
deleted file mode 100644 (file)
index 4e6ffaa..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: csstat.c /main/2 1996/05/09 04:00:57 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_csstat
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   csstat.c -- db_VISTA current set timestamp status check module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Test timestamp status of current set
-*/
-d_csstat(set TASK_PARM DBN_PARM)
-int set;
-TASK_DECL
-DBN_DECL
-{
-   ULONG uts;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
-
-   if ( d_utscs(set, &uts TASK_PARM DBN_PARM) == S_OKAY ) {
-      if ( uts ) {
-        if ( uts > cs_time[NUM2INT(set - SETMARK, st_offset)] )
-           db_status = S_UPDATED;
-      }
-      else
-        dberr(S_TIMESTAMP);
-   }
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin csstat.c */
diff --git a/cde/lib/DtSearch/raima/ctscm.c b/cde/lib/DtSearch/raima/ctscm.c
deleted file mode 100644 (file)
index 505cef0..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: ctscm.c /main/2 1996/05/09 04:01:14 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_ctscm
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   ctscm.c -- db_VISTA current member creation timestamp get module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Get creation timestamp of current member
-*/
-d_ctscm(set, timestamp TASK_PARM DBN_PARM)
-int set;
-ULONG FAR *timestamp;
-TASK_DECL
-DBN_DECL
-{
-   INT rec;
-   char FAR *rptr;
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   /* make sure we have a current member */
-   if ( ! curr_mem[set] )
-      RETURN( dberr(S_NOCM) );
-
-   /* read current member */
-   if ( dio_read( curr_mem[set], (char FAR * FAR *)&rptr , NOPGHOLD) != S_OKAY )
-      RETURN( db_status );
-
-   /* get record id */
-   bytecpy(&rec, rptr, sizeof(INT));
-   if ( rec >= 0 ) {
-      rec &= ~RLBMASK; /* mask off rlb */
-      if (record_table[NUM2INT(rec, rt_offset)].rt_flags & TIMESTAMPED)
-        bytecpy(timestamp, rptr + RECCRTIME, sizeof(ULONG));
-      else
-        *timestamp = 0L;
-   }
-   else
-      db_status = S_DELETED;
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin ctscm.c */
diff --git a/cde/lib/DtSearch/raima/ctsco.c b/cde/lib/DtSearch/raima/ctsco.c
deleted file mode 100644 (file)
index c8f1cef..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: ctsco.c /main/2 1996/05/09 04:01:31 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_ctsco
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   ctsco.c -- db_VISTA current owner creation timestamp get module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Get creation timestamp of current owner
-*/
-d_ctsco(set, timestamp TASK_PARM DBN_PARM)
-int set;
-ULONG FAR *timestamp;
-TASK_DECL
-DBN_DECL
-{
-   INT rec;
-   char FAR *rptr;
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   /* make sure we have a current owner */
-   if ( ! curr_own[set] )
-      RETURN( dberr(S_NOCO) );
-
-   /* read current owner */
-   if ( dio_read( curr_own[set], (char FAR * FAR *)&rptr , NOPGHOLD) != S_OKAY )
-      RETURN( db_status );
-
-   /* get record id */
-   bytecpy(&rec, rptr, sizeof(INT));
-   if ( rec >= 0 ) {
-      rec &= ~RLBMASK; /* mask off rlb */
-      if (record_table[NUM2INT(rec, rt_offset)].rt_flags & TIMESTAMPED)
-        bytecpy(timestamp, rptr + RECCRTIME, sizeof(ULONG));
-      else
-        *timestamp = 0L;
-   } 
-   else 
-      db_status = S_DELETED;
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin ctsco.c */
diff --git a/cde/lib/DtSearch/raima/ctscr.c b/cde/lib/DtSearch/raima/ctscr.c
deleted file mode 100644 (file)
index b4bc205..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: ctscr.c /main/2 1996/05/09 04:01:47 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_ctscr
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   ctscr.c -- db_VISTA current record creation timestamp get module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Get creation timestamp of current record
-*/
-d_ctscr(timestamp TASK_PARM)
-ULONG FAR *timestamp;
-TASK_DECL
-{
-   INT rec;
-
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(RECORD_IO));
-
-   /* make sure we have a current record */
-   if ( ! curr_rec )
-      RETURN( dberr(S_NOCR) );
-
-   /* read current record */
-   if ( dio_read( curr_rec, (char FAR * FAR *)&crloc , NOPGHOLD) != S_OKAY )
-      RETURN( db_status );
-
-   /* get record id */
-   bytecpy(&rec, crloc, sizeof(INT));
-   if ( rec >= 0 ) {
-      rec &= ~RLBMASK; /* mask off rlb */
-      if (record_table[NUM2INT(rec, rt_offset)].rt_flags & TIMESTAMPED)
-        bytecpy(timestamp, crloc + RECCRTIME, sizeof(ULONG));
-      else
-        *timestamp = 0L;
-   }
-   else
-      db_status = S_DELETED;
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin ctscr.c */
index 73215a33a2ac685415d13623222c4c89049629f8..c6ad3144345f643027f62a2278972ea0036fd856 100644 (file)
 /* Decode file and slot number from a database address
 */
 int
-d_decode_dba(dba, file, slot)
-DB_ADDR dba;  /* database address */
-int FAR *file;    /* returned file number */
-long FAR *slot;   /* returned slot number */
+d_decode_dba(
+DB_ADDR dba,  /* database address */
+int *file,    /* returned file number */
+long *slot    /* returned slot number */
+)
 {
    *file = (int)(FILEMASK & (dba >> FILESHIFT));
    *slot = ADDRMASK & dba;
@@ -59,10 +60,11 @@ long FAR *slot;   /* returned slot number */
 /* Encode database address from file and slot number
 */
 int
-d_encode_dba(file, slot, dba)
-int file;      /* returned file number */
-long slot;     /* returned slot number */
-DB_ADDR FAR *dba;  /* database address */
+d_encode_dba(
+int file,      /* returned file number */
+long slot,     /* returned slot number */
+DB_ADDR *dba   /* database address */
+)
 {
    *dba = ((FILEMASK & file) << FILESHIFT) | slot;
    return ( db_status = S_OKAY );
index 07e50af9b6723ad88cd3d746b97546a033ce9556..a569e4b2690e68fa0e7a4d377cc010551bdc4973 100644 (file)
@@ -50,9 +50,7 @@
 /* Set Database Dictionary Path
 */
 int
-d_dbdpath(path TASK_PARM)
-CONST char FAR *path;
-TASK_DECL
+d_dbdpath(const char *path)
 {
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE));
 
index 7185859843e1ae916e08a8a2ae089814a3769aae..4871a36d63f5d2d28411f69c76cb89d4bd6c2a25 100644 (file)
@@ -50,9 +50,7 @@
 /* Set Database Files Path
 */
 int
-d_dbfpath(path TASK_PARM)
-CONST char FAR *path;
-TASK_DECL
+d_dbfpath(const char *path)
 {
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE));
 
index 04886a6fdea2abff05379321251391aaa49535c8..3753c9800f124e8a21eb9f5fc791dc0bf2ee389d 100644 (file)
@@ -170,13 +170,6 @@ int db_glob_init = 0;
    calls would complete before a new task is run.  If this assumption is
    ever "broken" then lock_reply will need to be placed back within db_global
    again */
-#ifndef SINGLE_USER
-static LR_LOCK lock_reply;             /* This used to be in db_global */
-#endif
-
-#ifdef MULTI_TASK
-DB_TASK Currtask = {POINTER_ASSIGN((TASK FAR *)&db_global), POINTER_ASSIGN((char FAR *)NULL)};
-#endif
 
 extern CHAR_P Dbpgbuff;  /* allocated by dio_init used by o_update */
 extern LOOKUP_ENTRY_P Db_lookup; /* database page lookup table */
@@ -195,92 +188,22 @@ int db_txtest = 0;          /* transaction commit failure testing flag */
 #define FL_LIST_ACCESS(ld_ptr)   (FILE_NO *)(ld_ptr)->fl_list.ptr
 #define FL_LIST_DEACCESS(ld_ptr) /**/
 
-#ifndef NO_TRANS
-#ifndef SINGLE_USER
-int rlb_status;
-static char type[5];        /* open type (s or x) */
-#endif
-#endif
 
-#ifndef NO_TRANS
-#ifndef GENERAL
-/* transaction activity file info */
-extern INT  taf_count;
-extern char taf_files[TAFLIMIT][FILENMLEN];
-#endif
-#endif
 
 /* Internal function prototypes */
-#ifndef SINGLE_USER
-static void pr_lock_descr(P1(struct lock_descr FAR *) Pi(int) 
-                                           Pi(CONST char FAR *));
-static int process_lock(P1(struct lock_descr FAR *) Pi(char));
-static int keep_locks(P1(struct lock_descr FAR *));
-static int free_files(P1(struct lock_descr FAR *));
-#endif
-static int bld_lock_tables(P0);
-static int initses(P0);
-static int lock_files(P1(int) Pi(LOCK_REQUEST FAR *));
-static int send_lock(P0);
-static int send_free(P0);
-static void reset_locks(P0);
-static int recovery_check(P0);
-
-
-
-
-#ifndef NO_TRANS
-/* Set the number of lock request retries
-*/
-d_retries(num TASK_PARM)
-int num;
-TASK_DECL
-{
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE));
-
-#ifndef SINGLE_USER
-   lock_tries = num;
-#endif
-   RETURN( db_status = S_OKAY );
-}
-#endif
-
-
-#ifndef NO_TRANS
-/* Set the lock request timeout value
-*/
-d_timeout(secs TASK_PARM)
-int secs;
-TASK_DECL
-{
-#ifdef SINGLE_USER
-   return(db_status = S_OKAY);
-#else
-   LM_SETTIME sto;  /* send timeout packet */
-
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL));
-   if ( !dbopen ) RETURN( dberr(S_DBOPEN) );
-
-   if ( dbopen == 1 ) {
-      sto.fcn  = L_SETTIME;
-      sto.secs = secs;
-      if ( nw_send(lsn, (MESSAGE FAR *)&sto, sizeof(LM_SETTIME)) )
-        RETURN( neterr() );
-      db_timeout = secs;
-   }
-   RETURN( db_status = S_OKAY );
-#endif
-}
-#endif
+static int bld_lock_tables(void);
+static int initses(void);
+static int lock_files(int, LOCK_REQUEST *);
+static int send_lock(void);
+static int send_free(void);
+static void reset_locks(void);
+static int recovery_check(void);
 
 
 /* Open db_VISTA database
 */
 int
-d_open(dbnames, opentype TASK_PARM)
-CONST char FAR *dbnames;
-CONST char FAR *opentype;
-TASK_DECL
+d_open(const char *dbnames, const char *opentype)
 {
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL));
 #ifdef DEBUG_DBLF
@@ -290,50 +213,16 @@ TASK_DECL
    }
 #endif
 
-   if ( dbopen ) d_close(TASK_ONLY);
+   if ( dbopen ) d_close();
 
-#ifndef SINGLE_USER
-   if ( opentype ) {
-      switch ( *opentype ) {
-        case 's':
-        case 'x':
-#ifndef GENERAL
-           if ( netbios_chk() == 0 )
-               RETURN( dberr( S_NONETBIOS ) );
-#endif
-           db_lockmgr = 1;
-           strcpy(type, opentype);
-           break;
-        case 'n':
-        case 't':
-        case 'o':
-           db_lockmgr = 0;
-           strcpy(type, "x");
-           break;
-        default:
-           RETURN( dberr(S_BADTYPE) );
-      }
-   }
-   else
-      strcpy(type, "x");
-#endif
 
 
 #ifdef MIKER /**@@@***/
-#ifndef NO_COUNTRY
    /* initialize the country table if "vista.ctb" exists */
    if ( ctb_init() != S_OKAY )
       RETURN( db_status );
 #endif
-#endif
 
-#ifndef NO_TRANS
-#ifndef GENERAL
-   /* open transaction activity file */
-   if ( taf_open() != S_OKAY ) 
-      RETURN( db_status );
-#endif
-#endif
 
    /* initialize multi-db tables */
    if ( initdbt(dbnames) != S_OKAY ) RETURN( db_status );
@@ -349,49 +238,7 @@ TASK_DECL
 #endif
    if ( renfiles() != S_OKAY ) RETURN( db_status );
 
-#ifndef SINGLE_USER
-
-   if ( db_lockmgr ) { /* [637] Only alloc file_refs for shared open */
-      /* Macro references must be on one line for some compilers */ 
-      if (ALLOC_TABLE(&db_global.File_refs, size_ft*sizeof(FILE_NO),old_size_ft*sizeof(FILE_NO), "file_refs")
-               !=  S_OKAY) {
-        RETURN( db_status );
-      }
-   }
-
-   if ( *type == 's' ) {
-      /* build application file lock tables */
-      if ( bld_lock_tables() != S_OKAY )
-        RETURN( db_status );
-      dbopen = 1;
-   }
-   else
-#endif
       dbopen = 2;
-#ifndef SINGLE_USER
-#ifndef GENERAL
-   if ( db_lockmgr ) {
-#endif
-      if ( initses() != S_OKAY ) {
-        dbopen = 0;
-        RETURN( db_status );
-      }
-#ifndef GENERAL
-   }   /* [713] perform external recovery in one-user mode */
-   else
-      if ( recovery_check() != S_OKAY ) RETURN(db_status);
-#endif
-#else
-#ifndef NO_TRANS
-   /* [713] perform external recovery in single-user mode */
-   if ( recovery_check() != S_OKAY ) RETURN(db_status);
-#endif
-#endif
-#ifndef NO_TRANS
-   if ( use_ovfl ) {
-      if ( o_setup() != S_OKAY ) RETURN( db_status );
-   }
-#endif
 
 #ifdef DEBUG_DBLF
    if (debugging_dopen) {
@@ -419,24 +266,11 @@ TASK_DECL
 
 /* Initialize a task structure
 */
-int taskinit(tsk)
-TASK FAR *tsk;
+int taskinit(TASK *tsk)
 {
    byteset(tsk, '\0', sizeof(TASK));
-#ifndef ONE_DB
    tsk->No_of_dbs = 1;
-#endif
-#ifndef SINGLE_USER
-   tsk->Lock_tries = 5;
-   tsk->Dbwait_time = 1;
-   tsk->Db_timeout = TIMEOUT_DEF;
-   tsk->Db_lockmgr = 1;
-#endif
-#ifndef NO_TRANS
-   tsk->Dboptions = DCHAINUSE | TRLOGGING;
-#else
    tsk->Dboptions = DCHAINUSE;
-#endif
    return( db_status );
 }
 
@@ -444,18 +278,14 @@ TASK FAR *tsk;
 /* Initialize multiple database table entries
 */
 int
-initdbt(dbnames )
-CONST char FAR *dbnames;
+initdbt(const char *dbnames)
 {
-   register int dbt_lc;                        /* loop control */
+   int dbt_lc;                 /* loop control */
    char dbfile [DtSrFILENMLEN];
-   char FAR *ptr;
-#ifndef         ONE_DB
-   CONST char FAR *cp;
-   register int i;
-#endif
+   char *ptr;
+   const char *cp;
+   int i;
 
-#ifndef         ONE_DB
    /* compute number of databases to be opened */
    old_no_of_dbs = (( no_of_dbs == 1 ) ? 0 : no_of_dbs);
    for ( cp = dbnames; *cp; ++cp )
@@ -502,9 +332,6 @@ CONST char FAR *dbnames;
       for ( i = 0; *cp && *cp != ';'; ++cp, ++i )
         dbfile[i] = *cp;
       dbfile[i] = '\0';
-#else
-      strcpy(dbfile, dbnames);
-#endif
       if ( (ptr = strrchr(dbfile, DIRCHAR)) == NULL ) 
         ptr = strrchr(dbfile, ':');
       if ( ptr ) {
@@ -518,383 +345,16 @@ CONST char FAR *dbnames;
         strcpy(DB_REF(db_path), "");
         strcpy(DB_REF(db_name), dbfile);
       }
-#ifndef         ONE_DB
    }
-#endif
    return( db_status = S_OKAY );
 } /* initdbt() */
 
 
 
-#ifndef NO_TRANS
-/* Check for possible recovery
-*/
-static recovery_check()
-{
-#ifndef SINGLE_USER
-   LM_TREND trend_pkt;
-#ifndef GENERAL
-   register int tn;     /* transaction number */
-   register int tc;     /* transaction count */
-#endif
-#endif
 
-#ifndef GENERAL
-   /* open tr activity file */
-   if ( taf_access() == S_OKAY ) {
-      taf_release();
-#endif
-#ifdef SINGLE_USER
-      if (taf_count != 0) {
-        if (d_recover(taf_files[0] CURRTASK_PARM) != S_OKAY)
-           return( db_status );
-        taf_count = 0;
-      }
-#else
-#ifndef GENERAL
-      if ( tc = taf_count ) {
-        /* perform recovery on each file */
-        for ( tn = 0; tn < tc; ++tn ) {
-           if ( d_recover(taf_files[0] CURRTASK_PARM) != S_OKAY ) return( db_status );
-        }
-        taf_count = 0;
-      }
-#endif
-#endif
-#ifndef GENERAL
-   }
-#endif
-#ifndef SINGLE_USER
-   if ( db_lockmgr ) {
-      /* tell lock manager that we're done */
-      trend_pkt.fcn = L_RECDONE;
-      if ( nw_send(lsn, (MESSAGE FAR *)&trend_pkt, sizeof(LM_TREND)) )
-        neterr();
-   }
-#endif
-
-   return( db_status );
-}
-#endif
-
-
-
-#ifndef        SINGLE_USER
-/* Initial lock manager session
-*/
-static int initses()
-{
-   LM_DBOPEN_P Send_pkt;
-   LR_DBOPEN_P Recv_pkt;
-   register int ft_lc;                 /* loop control */
-   LM_TREND trend_pkt;
-   int send_size, recv_size, recvd_sz;
-   struct stat stbuf;
-   LM_FILEID *fi_ptr;
-   register FILE_ENTRY FAR *file_ptr;
-   FILE_NO FAR *fref_ptr;
-   INT FAR *rcv_fref_ptr;
-
-   if ( (net_status=nw_addnm(dbuserid, (int *)NULL) ) != N_OKAY )
-      if ( net_status == N_DUPNAME ) {
-        /* It is okay to reuse this name, but first be sure that all
-           sessions are hung up.
-        */
-        nw_cleanup(dbuserid);
-      }
-      else
-        return( neterr() );
-
-   if ( nw_call("lockmgr", dbuserid, &lsn) ) {
-      return( neterr() );
-   }
-   db_timeout = TIMEOUT_DEF;  /* reset default timeout value */
-
-#ifdef GENERAL
-
-   /* This section of code MUST be identical to else (DOS) below */
-   send_size = 0;
-   for (ft_lc = size_ft - old_size_ft, file_ptr = &file_table[old_size_ft];
-       --ft_lc >= 0; ++file_ptr) 
-      send_size += strlen(file_ptr->ft_name) + 1;
-   send_size += sizeof(LM_DBOPEN);
-   send_size += send_size % 2;
-#else                          /* GENERAL */
-   send_size = sizeof(LM_DBOPEN) + (size_ft-1)*sizeof(LM_FILEID);
-#endif                         /* GENERAL */
-   send_pkt = (LM_DBOPEN FAR *)ALLOC(&Send_pkt, send_size, "send_pkt");
-   recv_size = sizeof(LR_DBOPEN) + (size_ft-1)*sizeof(INT);
-   recv_pkt = (LR_DBOPEN FAR *)ALLOC(&Recv_pkt, recv_size, "recv_pkt");
-   if (send_pkt == NULL || recv_pkt == NULL) {
-      nw_hangup(lsn);
-      return(dberr(S_NOMEMORY));
-   }
-
-   send_pkt->fcn = L_DBOPEN;
-   send_pkt->nfiles = size_ft;
-   send_pkt->type = type[0];
-   for (ft_lc = size_ft - old_size_ft, file_ptr = &file_table[old_size_ft],
-                                               fi_ptr = send_pkt->fnames;
-#ifdef GENERAL
-        --ft_lc >= 0;  fi_ptr += strlen(file_ptr->ft_name)+1,++file_ptr) {
-#else
-       --ft_lc >= 0;  ++fi_ptr,++file_ptr) {
-#endif
-      if (stat(file_ptr->ft_name, &stbuf) == -1) {
-        nw_hangup(lsn);
-        return(dberr(S_NOFILE));
-      }
-#ifndef GENERAL
-      fi_ptr->inode = stbuf.st_ino;
-      fi_ptr->device = stbuf.st_dev;
-#else
-      strcpy(fi_ptr,file_ptr->ft_name);
-#endif
-   }
-send_open:
-   if (nw_send(lsn, (MESSAGE FAR *)send_pkt, send_size) ||
-       nw_rcvmsg(lsn, (MESSAGE FAR *)recv_pkt, recv_size, &recvd_sz)) {
-      nw_hangup(lsn);
-      return(neterr());
-   }
 
-   if ( recv_pkt->status == L_RECOVER )  {
-      /* perform auto-recovery */
-      d_recover( (CONST char FAR *)recv_pkt->logfile CURRTASK_PARM );
 
-      /* tell lock mgr we're done */
-      trend_pkt.fcn = L_RECDONE;
-      if ( nw_send(lsn, (MESSAGE FAR *)&trend_pkt, sizeof(LM_TREND)) ) {
-        nw_hangup(lsn);
-        return(neterr());
-      }
-      /* re-issue open request */
-      goto send_open;
-   }
-   if ( recv_pkt->fcn != L_DBOPEN ) {
-      nw_hangup(lsn);
-      return(dberr(S_NETSYNC));
-   }
-   if ( recv_pkt->status != L_OKAY ) {
-      nw_hangup(lsn);
-      nw_sestat();
-#ifndef GENERAL
-      taf_close();
-#endif
-      termfree();
-      MEM_UNLOCK(&Send_pkt);
-      FREE(&Send_pkt);
-      MEM_UNLOCK(&Recv_pkt);
-      FREE(&Recv_pkt);
-      dbopen = 0;
-      return(db_status = S_UNAVAIL);
-   }
-   if ( recv_pkt->nusers == 1 ) 
-      if ( recovery_check() != S_OKAY ) {
-        nw_hangup(lsn);
-        return(db_status);
-      }
-
-   /* [656] perform initialization if not general lockmgr */
-   if ( db_lockmgr ) {
-      for (ft_lc = size_ft - old_size_ft, fref_ptr = &file_refs[old_size_ft],
-                                             rcv_fref_ptr = recv_pkt->frefs;
-          --ft_lc >= 0; ++fref_ptr, ++rcv_fref_ptr) {
-        *fref_ptr = *rcv_fref_ptr;
-      }
-   }
-   MEM_UNLOCK(&Send_pkt);
-   FREE(&Send_pkt);
-   MEM_UNLOCK(&Recv_pkt);
-   FREE(&Recv_pkt);
-
-   session_active = TRUE;
-   return(db_status = S_OKAY);
-}
-#endif
-
-#ifndef NO_TRANS
-/* Build application file lock tables
-*/
-static int bld_lock_tables()
-{
-#ifndef SINGLE_USER
-   register int fd_lc;         /* loop control */
-   register int st_lc;         /* loop control */
-   INT_P File_used;
-#define file_used File_used.ptr
-   int rec;
-   int mem, memtot;
-   register FILE_NO i;
-   FILE_NO fl_cnt;
-   struct lock_descr FAR *ld_ptr;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
-   SET_ENTRY FAR *set_ptr;
-   MEMBER_ENTRY FAR *mem_ptr;
-   register int FAR *fu_ptr;
-   FILE_NO FAR *fl_ptr;
-   unsigned new_size;
-   unsigned old_size;
-   int old_keyl_cnt;
-
-   old_size = old_size_ft*sizeof(int);
-   new_size = size_ft*sizeof(int);
-   File_used.ptr = NULL;
-   /* Macro references must be on one line for some compilers */ 
-   if ((ALLOC_TABLE(&db_global.App_locks, new_size, old_size, "app_locks")
-                                                               != S_OKAY) ||
-       (ALLOC_TABLE(&db_global.Excl_locks, new_size, old_size, "excl_locks")
-                                                               != S_OKAY) ||
-       (ALLOC_TABLE(&db_global.Kept_locks, new_size, old_size, "kept_locks")
-                                                               != S_OKAY) ||
-       (ALLOC_TABLE(&File_used, new_size, old_size, "file_used")
-                                                               != S_OKAY)) {
-      return( db_status );
-   }
-
-   old_size = old_size_rt * sizeof(struct lock_descr);
-   new_size = size_rt * sizeof(struct lock_descr);
-   if ((ALLOC_TABLE(&db_global.Rec_locks, new_size, old_size, "rec_locks")
-                                                               != S_OKAY)) {
-      return( db_status );
-   }
-
-   if ( size_st ) {
-      new_size = size_st * sizeof(struct lock_descr);
-      old_size = old_size_st * sizeof(struct lock_descr);
-      /* Macro references must be on one line for some compilers */ 
-      if (ALLOC_TABLE(&db_global.Set_locks, new_size, old_size, "set_locks")
-                                                               != S_OKAY ) {
-        return( db_status );
-      }
-   }
-
-   /* build rec_locks table */
-   for (rec = old_size_rt, rec_ptr = &record_table[old_size_rt], 
-          ld_ptr = rec_locks;
-       rec < size_rt;
-       ++rec, ++rec_ptr, ++ld_ptr) {
-      ld_ptr->fl_type = 'f'; 
-      ld_ptr->fl_prev = 'f';                   /*[367] init to free */
-      ld_ptr->fl_kept = FALSE;
-
-      /* put record's data file in list */
-      file_used[rec_ptr->rt_file] = TRUE;
-
-      /* add any key files to list */
-      fl_cnt = 1;  /* count of used files */
-      for (fd_lc = size_fd - rec_ptr->rt_fields,
-             fld_ptr = &field_table[rec_ptr->rt_fields];
-          (--fd_lc >= 0) && (fld_ptr->fd_rec == rec);
-          ++fld_ptr) {
-        if ( fld_ptr->fd_key != NOKEY )  {
-           fu_ptr = &file_used[fld_ptr->fd_keyfile];
-           if (!*fu_ptr) {
-              *fu_ptr = TRUE;
-              ++fl_cnt;
-           }
-        }
-      }
-      ld_ptr->fl_cnt = fl_cnt;
-      ld_ptr->fl_list.ptr =
-               /* Macro references must be on one line for some compilers */ 
-    (FILE_NO FAR *)ALLOC(&ld_ptr->fl_list, fl_cnt*sizeof(FILE_NO), db_avname);
-      if ( ld_ptr->fl_list.ptr == NULL ) return( dberr(S_NOMEMORY) );
-      fl_ptr = ld_ptr->fl_list.ptr;
-      for (i = 0, fu_ptr = file_used; i < size_ft; ++i, ++fu_ptr) {
-        if (*fu_ptr) {
-           *fu_ptr = FALSE;
-           *fl_ptr++ = i;
-        }
-      }
-      FL_LIST_DEACCESS(ld_ptr);
-   }
-   /* build set_locks table */
-   if ( size_st ) {
-      for (st_lc = size_st - old_size_st, set_ptr = &set_table[old_size_st],
-                                                          ld_ptr = set_locks;
-          --st_lc >= 0; ++set_ptr, ++ld_ptr) {
-        /* add owner's data file */
-        file_used[record_table[set_ptr->st_own_rt].rt_file] = TRUE;
-        ld_ptr->fl_type = 'f'; 
-        ld_ptr->fl_prev = 'f';                 /*[367] init to free */
-        ld_ptr->fl_kept = FALSE;
-
-        /* add member record data files to list */
-        fl_cnt = 1; /* count of used files */
-        for (mem = set_ptr->st_members, memtot = mem + set_ptr->st_memtot,
-                                                  mem_ptr = &member_table[mem];
-             mem < memtot;
-             ++mem, ++mem_ptr) {
-           fu_ptr = &file_used[record_table[mem_ptr->mt_record].rt_file];
-           if (!*fu_ptr) {
-              *fu_ptr = TRUE;
-              ++fl_cnt;
-           }
-        }
-        ld_ptr->fl_cnt = fl_cnt;
-        ld_ptr->fl_list.ptr =
-                  /* Macro references must be on one line for some compilers */ 
-       (FILE_NO FAR *)ALLOC(&ld_ptr->fl_list, fl_cnt*sizeof(FILE_NO), db_avname);
-        if ( ld_ptr->fl_list.ptr == NULL ) return( dberr(S_NOMEMORY) );
-        fl_ptr = ld_ptr->fl_list.ptr;
-        for (i = 0, fu_ptr = file_used; i < size_ft; ++i, ++fu_ptr) {
-           if (*fu_ptr) {
-              *fu_ptr = FALSE;
-              *fl_ptr++ = i;
-           }
-        }
-        FL_LIST_DEACCESS(ld_ptr);
-      }
-   }
-   /* build key_locks table */
-   keyl_cnt = 0;
-   old_keyl_cnt = keyl_cnt;
-   for (fd_lc = size_fd - old_size_fd, fld_ptr = &field_table[old_size_fd];
-       --fd_lc >= 0; ++fld_ptr) {
-      /* count number of keys */
-      if (fld_ptr->fd_key != NOKEY)
-        ++keyl_cnt;
-   }
-   if ( keyl_cnt ) {
-      old_size = old_keyl_cnt*sizeof(struct lock_descr);
-      new_size = keyl_cnt*sizeof(struct lock_descr);
-      /* Macro references must be on one line for some compilers */ 
-      if (ALLOC_TABLE(&db_global.Key_locks, new_size, old_size, "key_locks")
-                                                                  != S_OKAY) {
-        return( db_status );
-      }
-      for (fd_lc = size_fd - old_size_fd, fld_ptr = &field_table[old_size_fd],
-                                                          ld_ptr = key_locks;
-          --fd_lc >= 0; ++fld_ptr) {
-        if (fld_ptr->fd_key != NOKEY) {
-           ld_ptr->fl_type = 'f';
-           ld_ptr->fl_prev = 'f';                      /*[367] init to free */
-           ld_ptr->fl_kept = FALSE;
-           ld_ptr->fl_cnt = 1;
-           ld_ptr->fl_list.ptr = (FILE_NO FAR *)ALLOC(&ld_ptr->fl_list, ld_ptr->fl_cnt*sizeof(FILE_NO), "fl_list");
-           if ( ld_ptr->fl_list.ptr == NULL ) return( dberr(S_NOMEMORY) );
-           *(ld_ptr->fl_list.ptr) = fld_ptr->fd_keyfile;
-           FL_LIST_DEACCESS(ld_ptr);
-           ++ld_ptr;
-        }
-      }
-   }
-   lp_size = sizeof(LM_LOCK) + (size_ft-1)*sizeof(LM_LOCKREQ);
-   fp_size = sizeof(LM_FREE) + (size_ft-1)*sizeof(INT);
-   lock_pkt = (LM_LOCK FAR *)ALLOC(&db_global.Lock_pkt, lp_size, "lock_pkt");
-   free_pkt = (LM_FREE FAR *)ALLOC(&db_global.Free_pkt, fp_size, "free_pkt");
-   if ( !lock_pkt || !free_pkt ) return( dberr(S_NOMEMORY) );
-   lock_pkt->fcn = L_LOCK;
-   free_pkt->fcn = L_FREE;
-   MEM_UNLOCK(&File_used);
-   FREE(&File_used);
-#endif
 
-   return( db_status = S_OKAY );
-}
-#endif
 
 
 /****************************************/
@@ -905,24 +365,14 @@ static int bld_lock_tables()
 /* Close database
 */
 int
-d_close(TASK_ONLY)
-TASK_DECL
+d_close(void)
 {
-   register int i;
+   int i;
 
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL));
 
    if ( dbopen ) {
       db_status = S_OKAY;
-#ifndef NO_TRANS
-      /* in case they forgot to end the transaction */
-      if ( trans_id ) 
-        d_trabort(TASK_ONLY);
-      else
-#ifndef SINGLE_USER
-        if ( dbopen >= 2 )
-#endif
-#endif
            dio_flush(); 
 
       for (i = 0; i < size_ft; ++i) {
@@ -931,55 +381,20 @@ TASK_DECL
       }
 
 #ifdef MIKER /**@@@***/
-#ifndef NO_COUNTRY
    /* free the country table */
    if ( db_global.ctbl_activ )
       ctbl_free();
 #endif
-#endif
 
-#ifndef NO_TRANS
-#ifndef GENERAL
-      taf_close();
-#endif
-#endif
-#ifndef SINGLE_USER
-      d_freeall(TASK_ONLY);
-#endif
-#ifndef NO_TRANS
-      if ( use_ovfl ) o_free();
-#endif
 /*    termfree();
       key_close();
       sk_free();
       dio_free(); */
-#ifndef SINGLE_USER
-      if ( db_lockmgr ) {
-        termses();
-      }
-#endif
    }
    if ( dbopen ) {
-#ifndef NO_TIMESTAMP
-      cr_time = 0;
-#endif
-#ifndef ONE_DB
       setdb_on = FALSE;
       curr_db = 0;
       no_of_dbs = 1;
-#endif
-#ifndef SINGLE_USER
-      lock_tries = 5;
-      dbwait_time = 1;
-      db_lockmgr = 1;
-      session_active = FALSE;
-#endif
-#ifndef NO_TRANS
-      cache_ovfl = FALSE;
-      ov_initaddr = 0L;
-      ov_rootaddr = 0L;
-      ov_nextaddr = 0L;
-#endif
       db_status = S_OKAY;
       curr_rec = NULL_DBA;
       size_ft = 0;
@@ -991,61 +406,19 @@ TASK_DECL
       size_kt = 0;
       no_of_keys = 0;
       dbopen = 0;
-#ifdef MULTI_TASK
-      bytecpy(task.v.ptr, &db_global, sizeof(TASK));
-#endif
    }
    RETURN( db_status );
 } /* d_close() */
 
 
 
-#ifndef SINGLE_USER
-/* Terminate lock manager session
-*/
-termses()
-{
-   LM_DBCLOSE_P Send_pkt;
-   register int ft_lc;                 /* loop control */
-   int send_size;
-   register FILE_NO FAR *fref_ptr;
-   register INT FAR *snd_fref_ptr;
-
-   if ( session_active ) {
-      send_size = sizeof(LM_DBCLOSE) + (size_ft-1)*sizeof(INT);
-      send_pkt = (LM_DBCLOSE FAR *)ALLOC(&Send_pkt, send_size, "send_pkt");
-      if ( send_pkt == NULL ) return( dberr(S_NOMEMORY) );
-      send_pkt->fcn = L_DBCLOSE;
-      send_pkt->nfiles = size_ft;
-      for (ft_lc = size_ft, fref_ptr = file_refs,
-                                               snd_fref_ptr = send_pkt->frefs;
-          --ft_lc >= 0; ++fref_ptr, ++snd_fref_ptr)
-        *snd_fref_ptr = *fref_ptr;
-      if ( nw_send(lsn, (MESSAGE FAR *)send_pkt, send_size) )
-        return( neterr() );
-
-      nw_hangup(lsn);
-      nw_sestat();
-      MEM_UNLOCK(&Send_pkt);
-      FREE(&Send_pkt);
-      MEM_UNLOCK(&db_global.File_refs);
-      FREE(&db_global.File_refs);
-      session_active = FALSE;
-   }
-   return( db_status = S_OKAY );
-}
-#endif
 
 
 
 /* Free all allocated memory upon termination
 */
-void termfree()
+void termfree(void)
 {
-#ifndef SINGLE_USER
-   register int i;
-   register struct lock_descr FAR *ld_ptr;
-#endif
 
    /* free all allocated memory */
    if ( curr_mem ) {
@@ -1056,20 +429,6 @@ void termfree()
       MEM_UNLOCK(&db_global.Curr_own);
       FREE(&db_global.Curr_own);
    }
-#ifndef         NO_TIMESTAMP
-   if ( co_time ) {
-      MEM_UNLOCK(&db_global.Co_time);
-      FREE(&db_global.Co_time);
-   }
-   if ( cm_time ) {
-      MEM_UNLOCK(&db_global.Cm_time);
-      FREE(&db_global.Cm_time);
-   }
-   if ( cs_time ) {
-      MEM_UNLOCK(&db_global.Cs_time);
-      FREE(&db_global.Cs_time);
-   }
-#endif
    if ( sort_table ) {
       MEM_UNLOCK(&db_global.Sort_table);
       FREE(&db_global.Sort_table);
@@ -1098,53 +457,6 @@ void termfree()
       MEM_UNLOCK(&db_global.File_table);
       FREE(&db_global.File_table);
    }
-#ifndef SINGLE_USER
-   if ( app_locks ) {
-      MEM_UNLOCK(&db_global.App_locks);
-      FREE(&db_global.App_locks);
-   }
-   if ( excl_locks ) {
-      MEM_UNLOCK(&db_global.Excl_locks);
-      FREE(&db_global.Excl_locks);
-   }
-   if ( kept_locks ) {
-      MEM_UNLOCK(&db_global.Kept_locks);
-      FREE(&db_global.Kept_locks);
-   }
-   if ( rec_locks ) {
-      for (i = 0, ld_ptr = rec_locks; i < size_rt; ++i, ++ld_ptr) {
-        MEM_UNLOCK(&ld_ptr->fl_list);
-        FREE(&ld_ptr->fl_list);
-      }
-      MEM_UNLOCK(&db_global.Rec_locks);
-      FREE(&db_global.Rec_locks);
-   }
-   if ( set_locks ) {
-      for (i = 0, ld_ptr = set_locks; i < size_st; ++i, ++ld_ptr) {
-        MEM_UNLOCK(&ld_ptr->fl_list);
-        FREE(&ld_ptr->fl_list);
-      }
-      MEM_UNLOCK(&db_global.Set_locks);
-      FREE(&db_global.Set_locks);
-   }
-   if ( key_locks ) {
-      for (i = 0, ld_ptr = key_locks; i < keyl_cnt; ++i, ++ld_ptr) { /*[637]*/
-        MEM_UNLOCK(&ld_ptr->fl_list);
-        FREE(&ld_ptr->fl_list);
-      }
-      MEM_UNLOCK(&db_global.Key_locks);
-      FREE(&db_global.Key_locks);
-   }
-   if ( lock_pkt ) {
-      MEM_UNLOCK(&db_global.Lock_pkt);
-      FREE(&db_global.Lock_pkt);
-   }
-   if ( free_pkt ) {
-      MEM_UNLOCK(&db_global.Free_pkt);
-      FREE(&db_global.Free_pkt);
-   }
-#endif
-#ifndef         ONE_DB
    if ( db_table ) {
       MEM_UNLOCK(&db_global.Db_table);
       FREE(&db_global.Db_table);
@@ -1153,1196 +465,14 @@ void termfree()
       MEM_UNLOCK(&db_global.Rn_table);
       FREE(&db_global.Rn_table);
    }
-#endif
-}
-
-#ifndef NO_TRANS
-/* Establish record file locks
-*/
-d_reclock(rec, lock_type TASK_PARM DBN_PARM)
-int rec;
-char FAR *lock_type;
-TASK_DECL
-DBN_DECL
-{
-#ifdef SINGLE_USER
-   return(db_status = S_OKAY);
-#else
-   LOCK_REQUEST lr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   lr.item = rec;
-   lr.type = *lock_type;
-
-   RETURN( d_lock(1, &lr TASK_PARM DBN_PARM) );
-#endif
-}
-#endif
-
-
-#ifndef NO_TRANS
-/* Establish set file locks
-*/
-d_setlock(set, lock_type TASK_PARM DBN_PARM)
-int  set;
-char FAR *lock_type;
-TASK_DECL
-DBN_DECL
-{
-#ifdef SINGLE_USER
-   return (db_status = S_OKAY);
-#else
-   LOCK_REQUEST lr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   lr.item = set;
-   lr.type = *lock_type;
-
-   RETURN( d_lock(1, &lr TASK_PARM DBN_PARM) );
-#endif
-}
-#endif
-
-#ifndef NO_TRANS
-/* Lock key file 
-*/
-d_keylock(key, lock_type TASK_PARM DBN_PARM)
-long key;  /* field number of key */
-char FAR *lock_type;
-TASK_DECL
-DBN_DECL
-{
-#ifdef SINGLE_USER
-   return (db_status = S_OKAY);
-#else
-   int fld, rec;
-   LOCK_REQUEST lr;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   if (nfld_check(key, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   if (fld_ptr->fd_key == NOKEY)
-      RETURN( dberr(S_NOTKEY) );
-
-   /* KEYMARK allows 'fld' to be recognized as a key file.  It is already
-      adjusted (in nfld_check) to INTernal format.  Don't play with it in
-      d_lock and lock_files.
-   */
-   lr.item = fld + KEYMARK;
-   lr.type = *lock_type;
-
-   RETURN( d_lock(1, &lr TASK_PARM DBN_PARM) );
-#endif
-}
-#endif
-
-#ifndef NO_TRANS
-/* Return lock status for record type
-*/
-d_reclstat(rec, lstat TASK_PARM DBN_PARM)
-int rec;
-char FAR *lstat;
-TASK_DECL
-DBN_DECL
-{
-#ifdef SINGLE_USER
-   *lstat = 'f';
-   return( db_status = S_OKAY );
-#else
-   RECORD_ENTRY FAR *rec_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_NOIO));
-
-   if (nrec_check(rec, &rec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   if ( dbopen >= 2 )
-      *lstat = 'f';
-   else {
-      if (rec_ptr->rt_flags & STATIC)
-        *lstat = 's';
-      else
-        *lstat = rec_locks[rec].fl_type;
-   }
-   RETURN( db_status = S_OKAY );
-#endif
-}
-#endif
-
-#ifndef NO_TRANS
-/* Return lock status for set type
-*/
-d_setlstat(set, lstat TASK_PARM DBN_PARM)
-int set;
-char FAR *lstat;
-TASK_DECL
-DBN_DECL
-{
-#ifdef SINGLE_USER
-   *lstat = 'f';
-   return (db_status = S_OKAY);
-#else
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_NOIO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   if ( dbopen >= 2 )
-      *lstat = 'f';
-   else
-      *lstat = set_locks[set].fl_type;
-
-   RETURN( db_status = S_OKAY );
-#endif
-}
-#endif
-
-#ifndef NO_TRANS
-/* Return lock status for key type
-*/
-d_keylstat(key, lstat TASK_PARM DBN_PARM)
-long key;
-char FAR *lstat;
-TASK_DECL
-DBN_DECL
-{
-#ifdef SINGLE_USER
-   *lstat = 'f';
-   return (db_status = S_OKAY);
-#else
-   int fld, rec;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_NOIO));
-
-   if (nfld_check(key, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   if (fld_ptr->fd_key == NOKEY)
-      RETURN( dberr(S_NOTKEY) );
-
-   if ( dbopen >= 2 )
-      *lstat = 'f';
-   else {
-      if ( file_table[fld_ptr->fd_keyfile].ft_flags & STATIC )
-        *lstat = 's';
-      else
-        *lstat = key_locks[fld_ptr->fd_keyno].fl_type;
-   }
-   RETURN( db_status = S_OKAY );
-#endif
-}
-#endif
-
-#ifndef NO_TRANS
-/* Lock a group of records and/or sets
-*/
-d_lock(count, lrpkt TASK_PARM DBN_PARM)
-int count;
-LOCK_REQUEST FAR *lrpkt;
-TASK_DECL
-DBN_DECL
-{
-#ifdef SINGLE_USER
-   return (db_status = S_OKAY);
-#else
-   register int item;
-   register int i;
-   register LOCK_REQUEST FAR *lrpkt_ptr;
-   struct lock_descr FAR *ld_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   if ( dbopen >= 2 )
-      RETURN( db_status = S_OKAY );
-
-   lock_pkt->nfiles = 0;
-   for (i = 0, lrpkt_ptr = lrpkt;
-       (db_status == S_OKAY) && (i < count);
-       ++i, ++lrpkt_ptr) {
-      if ( lrpkt_ptr->item >= KEYMARK ) {
-        /* do not adjust lrpkt->item (see comment in d_keylock) */
-        item = field_table[lrpkt_ptr->item - KEYMARK].fd_keyno;
-        process_lock(&key_locks[item], lrpkt_ptr->type);
-      }
-      else if ( lrpkt_ptr->item >= SETMARK ) {
-        item = NUM2INT(lrpkt_ptr->item - SETMARK, st_offset);
-        process_lock(&set_locks[item], lrpkt_ptr->type);
-      }
-      else if ( lrpkt_ptr->item >= RECMARK ) {
-        item = NUM2INT(lrpkt_ptr->item - RECMARK, rt_offset);
-        if ( record_table[item].rt_flags & STATIC )
-           dberr(S_STATIC);
-        else
-           process_lock(&rec_locks[item], lrpkt_ptr->type);
-      }
-      else
-        dberr( S_INVNUM );
-   }
-   if ( db_status == S_OKAY )
-      lock_files(count, lrpkt);
-
-   if ( db_status != S_OKAY ) {
-      /* reset lock descriptor tables to previous state */
-      for (i = 0, lrpkt_ptr = lrpkt; i < count; ++i, ++lrpkt_ptr) {
-        /* do not adjust lrpkt->item (see comment in d_keylock) */
-        if ( lrpkt_ptr->item >= KEYMARK ) {
-           item = field_table[lrpkt_ptr->item - KEYMARK].fd_keyno;
-           ld_ptr = &key_locks[item];
-        }
-        else if ( lrpkt_ptr->item >= SETMARK ) {
-           item = NUM2INT(lrpkt_ptr->item - SETMARK, st_offset);
-           ld_ptr = &set_locks[item];
-        }
-        else if ( lrpkt_ptr->item >= RECMARK ) {
-           item = NUM2INT(lrpkt_ptr->item - RECMARK, rt_offset);
-           ld_ptr = &rec_locks[item];
-        }
-        else
-           continue;
-        ld_ptr->fl_type = ld_ptr->fl_prev;
-      }
-   }
-   RETURN( db_status );
-#endif
-}
-#endif
-
-
-#ifndef SINGLE_USER
-/* Process set/record lock
-*/
-static process_lock(ld_ptr, type )
-struct lock_descr FAR *ld_ptr;
-char type;
-{
-   register int fl_lc;                 /* loop control */
-   int fno;
-   register int i;
-   register LM_LOCKREQ FAR *lockreq_ptr;
-   FILE_NO FAR *fl_ptr, fref;
-
-   db_status = S_OKAY;
-   ld_ptr->fl_prev = ld_ptr->fl_type;
-   switch( type ) {
-      case 'k':
-        if ( !trans_id )  
-           dberr( S_TRNOTACT );
-        else if ( ld_ptr->fl_prev == 'f' ) 
-           dberr( S_NOTLOCKED );
-        else if ( ld_ptr->fl_prev != 'x' ) 
-           return( keep_locks(ld_ptr) );
-        break;
-      case 'r':
-        if( ld_ptr->fl_prev != 'f' ) 
-           dberr( S_NOTFREE );
-        else 
-           ld_ptr->fl_type = 'r';
-        break;
-      case 'w':
-        if ( !trans_id )
-           dberr( S_TRNOTACT );
-        else if ( ld_ptr->fl_prev != 'f' && ld_ptr->fl_prev != 'r' ) 
-           dberr( S_NOTFREE );
-        else
-           ld_ptr->fl_type = 'w';
-        break;
-      case 'x':
-        if ( ld_ptr->fl_prev != 'f' && ld_ptr->fl_prev != 'r' ) 
-           dberr(S_NOTFREE);
-        else
-           ld_ptr->fl_type = 'x';
-        break;
-      default:  
-        dberr( S_BADTYPE );
-   }
-   if ( db_status == S_OKAY ) {
-      /* build lock request packet */
-      for (fl_lc = ld_ptr->fl_cnt, fl_ptr = FL_LIST_ACCESS(ld_ptr);
-          --fl_lc >= 0; ++fl_ptr) {
-        fref = file_refs[fno = *fl_ptr];
-        for (i = 0, lockreq_ptr = lock_pkt->locks;
-             (i < lock_pkt->nfiles) && (lockreq_ptr->fref != fref);
-             ++i, ++lockreq_ptr)
-           ;                           /* null statement */
-
-        if (i < lock_pkt->nfiles) {
-           /* file already is in lock request packet */
-           if ( lockreq_ptr->type == 'r' || ld_ptr->fl_type == 'x' )
-              lockreq_ptr->type = ld_ptr->fl_type;
-        }
-        else if ( !excl_locks[fno] && ( !app_locks[fno] || 
-             (ld_ptr->fl_type == 'w' && app_locks[fno] > 0) ||
-             (ld_ptr->fl_type == 'x') ) ) {
-           /* add to lock request packet */
-           ++lock_pkt->nfiles;
-           lockreq_ptr->fref = fref;
-           lockreq_ptr->type = ld_ptr->fl_type;
-        }
-      }
-      FL_LIST_DEACCESS(ld_ptr);
-   }
-   return( db_status );
-}
-#endif
-
-
-#ifndef NO_TRANS
-/* Lock database files
-*/
-static lock_files(count, lrpkt )
-int count;
-LOCK_REQUEST FAR *lrpkt;
-{
-#ifndef SINGLE_USER
-   register int fl_lc;                 /* loop control */
-   struct lock_descr FAR *ld_ptr;
-   FILE_NO fno;
-   register int item;
-   int l;
-   LOCK_REQUEST FAR *lrpkt_ptr;
-   int FAR *appl_ptr, FAR *excl_ptr;
-   FILE_NO FAR *fl_ptr;
-   
-   lock_reply.status = L_OKAY;
-   if ( lock_pkt->nfiles == 0 ) goto skip_send;
-
-   if ( send_lock() != S_OKAY )
-      return( db_status );
-
-skip_send:
-   switch ( lock_reply.status ) {
-      case L_OKAY:
-        /* update app_locks and excl_lock tables */
-        for (l = 0, lrpkt_ptr = lrpkt; l < count; ++l, ++lrpkt_ptr) {
-           if (lrpkt_ptr->type == 'k')
-              continue; /* skip keep lock requests */
-           /* process each record/set lock */
-           /* do not adjust lrpkt->item (see comment in d_keylock) */
-           if ( lrpkt_ptr->item >= KEYMARK ) {
-              item = field_table[lrpkt_ptr->item - KEYMARK].fd_keyno;
-              ld_ptr = &key_locks[item];
-           }
-           else if ( lrpkt_ptr->item >= SETMARK ) {
-              item = NUM2INT(lrpkt_ptr->item - SETMARK, st_offset);
-              ld_ptr = &set_locks[item];
-           }
-           else {
-              item = NUM2INT(lrpkt_ptr->item - RECMARK, rt_offset);
-              ld_ptr = &rec_locks[item];
-           }
-           for (fl_lc = ld_ptr->fl_cnt, fl_ptr = FL_LIST_ACCESS(ld_ptr);
-                --fl_lc >= 0; ++fl_ptr) {
-              /* process each file for each record/set lock */
-              fno = *fl_ptr;
-              appl_ptr = &app_locks[fno];
-              excl_ptr = &excl_locks[fno];
-              if ( !*appl_ptr && !*excl_ptr ) {
-                 /* clear file's pages from cache */
-                 dio_clrfile(fno);
-              }
-              if ( ld_ptr->fl_type == 'r' ) {
-                 if ( *appl_ptr >= 0 ) 
-                    /* increment if file free or read-locked */
-                    ++*appl_ptr;
-              }
-              else {
-                 if ( ld_ptr->fl_type == 'w' ) 
-                    *appl_ptr = -1;
-                 else if ( ld_ptr->fl_type == 'x' ) {
-                    ++*excl_ptr;
-                    if ( ld_ptr->fl_prev == 'r' ) {
-                       /* read to excl lock upgrade */
-                       --*appl_ptr;
-                    }
-                 }
-              }
-           }
-           FL_LIST_DEACCESS(ld_ptr);
-        }
-        break;
-      case L_UNAVAIL:
-      case L_TIMEOUT:
-        return( db_status = S_UNAVAIL );
-      default:
-        return( dberr(S_SYSERR) );
-   }
-#endif
-
-   return( db_status = S_OKAY );
-}
-#endif
-
-
-#ifndef NO_TRANS
-/* Send lock request 
-*/
-static int send_lock()
-{
-#ifndef SINGLE_USER
-   LM_TREND trend_pkt;
-   int send_size, recv_size;
-
-   if ( lock_pkt->nfiles ) {
-      /* send lock request */
-      send_size = sizeof(LM_LOCK) + (lock_pkt->nfiles-1)*sizeof(LM_LOCKREQ);
-      if ( send_size > lp_size )
-        return( dberr(S_SYSERR) );
-      
-req_locks:
-#ifdef MONITOR
-      printf("nw_send(lsn,lock_pkt->fcn=%ld,size=%d\n",lock_pkt->fcn,send_size);
-#endif
-      if ( nw_send(lsn, (MESSAGE FAR *)lock_pkt, send_size) )
-        return( neterr() );
-
-      if ( nw_rcvmsg(lsn, (MESSAGE FAR *)&lock_reply, sizeof(LR_LOCK), &recv_size) )
-        return( neterr() );
-#ifdef MONITOR
-      printf("nw_rcvmsg(lock_reply.fcn=%ld,lock_reply.status=%d\n",
-        lock_reply.fcn,lock_reply.status);
-#endif
-
-      /* request must always be granted */
-      if ( lock_reply.fcn != L_LOCK )
-        return( dberr(S_NETSYNC) );
-
-      if (lock_reply.status == L_RECOVER) {
-        /* perform auto-recovery */
-        d_recover(lock_reply.logfile CURRTASK_PARM);
-
-        /* tell lock mgr we're done */
-        trend_pkt.fcn = L_RECDONE;
-        if (nw_send(lsn, (MESSAGE FAR *)&trend_pkt, sizeof(LM_TREND)))
-           return( neterr() );
-
-        /* re-issue lock request */
-        goto req_locks;
-      }
-      if (lock_reply.status == L_QUEUEFULL) {
-        sleep(dbwait_time);
-        goto req_locks;
-      }
-   }
-#endif
-
-   return( db_status = S_OKAY );
-}
-#endif
-
-
-#ifndef NO_TRANS
-/* Free key lock
-*/
-d_keyfree(key TASK_PARM DBN_PARM)
-long key;
-TASK_DECL
-DBN_DECL
-{
-#ifdef SINGLE_USER
-   return (db_status = S_OKAY);
-#else
-   int fld, rec;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
-   struct lock_descr FAR *ld_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   if (nfld_check(key, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   if ( fld_ptr->fd_key == NOKEY )
-      RETURN( dberr(S_NOTKEY) );
-
-   if ( dbopen >= 2 )  /* exclusive access needs no locks */
-      RETURN( db_status = S_OKAY );
-
-   ld_ptr = &key_locks[fld_ptr->fd_keyno];
-   if ( trans_id )
-      RETURN( dberr(S_TRFREE) );
-
-   if ( ld_ptr->fl_type == 'f' )
-      RETURN( dberr(S_NOTLOCKED) );
-
-   free_files(ld_ptr);
-   ld_ptr->fl_type = 'f';
-
-   RETURN( db_status );
-#endif
-}
-#endif
-
-
-#ifndef SINGLE_USER
-/* Setup table to keep locks after transaction end
-*/
-static keep_locks( ld_ptr )
-struct lock_descr FAR *ld_ptr;      /* Lock descriptor */
-{
-   register int fl_lc;                 /* loop control */
-   register FILE_NO FAR *fl_ptr;
-
-   /* Mark lock as kept */
-   ld_ptr->fl_kept = TRUE;                
-
-   for (fl_lc = ld_ptr->fl_cnt, fl_ptr = FL_LIST_ACCESS(ld_ptr);
-       --fl_lc >= 0; ++fl_ptr)
-      ++kept_locks[*fl_ptr];
-   FL_LIST_DEACCESS(ld_ptr);
-
-   return( db_status = S_OKAY );
-}
-#endif
-
-#ifndef NO_TRANS
-/* Free record lock
-*/
-d_recfree(rec TASK_PARM DBN_PARM)
-int rec;
-TASK_DECL
-DBN_DECL
-{
-#ifdef SINGLE_USER
-   return (db_status = S_OKAY);
-#else
-   RECORD_ENTRY FAR *rec_ptr;
-   struct lock_descr FAR *ld_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   if (nrec_check(rec, &rec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   if ( dbopen >= 2 )  /* exclusive access needs no locks */
-      RETURN( db_status = S_OKAY );
-
-   ld_ptr = &rec_locks[rec];
-
-   if ( trans_id )
-      RETURN( dberr(S_TRFREE) );
-
-   if ( ld_ptr->fl_type == 'f' )
-      RETURN( dberr(S_NOTLOCKED) );
-
-   free_files(ld_ptr);
-   ld_ptr->fl_type = 'f';
-
-   RETURN( db_status );
-#endif
-}
-#endif
-
-#ifndef NO_TRANS
-/* Free set lock
-*/
-d_setfree(set TASK_PARM DBN_PARM)
-int set;
-TASK_DECL
-DBN_DECL
-{
-#ifdef SINGLE_USER
-   return (db_status = S_OKAY);
-#else
-   SET_ENTRY FAR *set_ptr;
-   struct lock_descr FAR *ld_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   if ( dbopen >= 2 )  /* exclusive access needs no locks */
-      RETURN( db_status = S_OKAY );
-
-   ld_ptr = &set_locks[set];
-
-   if ( trans_id )
-      RETURN( dberr(S_TRFREE) );
-
-   if ( ld_ptr->fl_type == 'f' )
-      RETURN( dberr(S_NOTLOCKED) );
-
-   free_files(ld_ptr);
-   ld_ptr->fl_type = 'f';
-
-   RETURN( db_status );
-#endif
-}
-#endif
-
-
-
-#ifndef SINGLE_USER
-/* Free read-locked files associated with record or set
-*/
-static int free_files(ld_ptr)
-struct lock_descr FAR *ld_ptr;
-{
-   register int fl_lc;                 /* loop control */
-   FILE_NO fno;
-   LM_LOCKREQ FAR *lockreq_ptr;
-   int FAR *appl_ptr;
-   FILE_NO fref;
-   register FILE_NO FAR *fl_ptr;
-
-   /* fill free packet */
-   lock_pkt->nfiles = free_pkt->nfiles = 0; 
-   for (fl_lc = ld_ptr->fl_cnt, fl_ptr = FL_LIST_ACCESS(ld_ptr);
-       --fl_lc >= 0; ++fl_ptr) {
-      fno = *fl_ptr;
-      appl_ptr = &app_locks[fno];
-      fref = file_refs[fno];
-      if ( ld_ptr->fl_type == 'r' && *appl_ptr > 0 ) {
-        /* free read lock */
-        if ( --*appl_ptr == 0 && excl_locks[fno] == 0 ) {
-           free_pkt->frefs[free_pkt->nfiles++] = fref;
-           /* reset key scan position */
-           if ( file_table[fno].ft_type == 'k' )
-              key_reset(fno);
-        }
-      }
-      else if ( --excl_locks[fno] == 0 ) {
-        /* free exclusive access lock */
-        if ( *appl_ptr > 0 ) {
-           /* downgrade to read-lock */
-           lockreq_ptr = &lock_pkt->locks[lock_pkt->nfiles++];
-           lockreq_ptr->type = 'r';
-           lockreq_ptr->fref = fref;
-        }
-        else {
-           /* free excl-lock */
-           free_pkt->frefs[free_pkt->nfiles++] = fref;
-           dio_flush();
-           /* reset key scan position */
-           if ( file_table[fno].ft_type == 'k' )
-              key_reset(fno);
-        }
-      }
-      if ( ld_ptr->fl_kept ) {             
-        /* Remove hold on lock */
-        if ( --kept_locks[fno] < 0 ) return( dberr(S_BADLOCKS) );
-        ld_ptr->fl_kept = FALSE; 
-      }
-   }
-   FL_LIST_DEACCESS(ld_ptr);
-   /* send any downgrades */
-   if ( send_lock() == S_OKAY ) {
-      /* free any files */
-      send_free();
-   }
-   return( db_status );
-}
-#endif
-
-#ifndef NO_TRANS
-/* free all locked files 
-*/
-d_freeall(TASK_ONLY)
-TASK_DECL
-{
-#ifdef SINGLE_USER
-   return (db_status = S_OKAY);
-#else
-   register int i;
-   register FILE_NO FAR *fref_ptr;
-   register int FAR *appl_ptr;
-
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   if ( ! dbopen ) RETURN( dberr(S_DBOPEN) );
-
-   if ( dbopen >= 2 )  /* exclusive access needs no locks */
-      RETURN( db_status = S_OKAY );
-
-   if ( trans_id ) RETURN( dberr(S_TRFREE) );
-
-   free_pkt->nfiles = 0;
-   for (i = 0, fref_ptr = file_refs, appl_ptr = app_locks;
-       i < size_ft;
-       ++i, ++fref_ptr, ++appl_ptr) {
-      if (*appl_ptr) {
-        *appl_ptr = FALSE;
-        if (!excl_locks[i])
-           free_pkt->frefs[free_pkt->nfiles++] = *fref_ptr;
-      }
-   }
-   /* send free files packet */
-   if ( send_free() != S_OKAY )
-      RETURN( db_status );
-   
-   /* reset all lock descriptors */
-   reset_locks();
-
-   /* reset all key file positions */
-   key_reset(size_ft);
-
-   /* Clear cache pages and return */
-   RETURN( dio_clear() );
-#endif
-}
-#endif
-
-
-#ifndef SINGLE_USER
-/* Reset lock descriptor tables
-*/
-static void reset_locks()
-{
-   int beg, end;
-   register int i;
-   register struct lock_descr FAR *ld_ptr;
-
-   /* reset record lock descriptors */
-   beg = 0;
-   end = size_rt;
-   for (i = beg, ld_ptr = &rec_locks[i]; i < end; ++i, ++ld_ptr) {
-      if ( ld_ptr->fl_kept ) {
-        ld_ptr->fl_type = 'r';
-        ld_ptr->fl_kept = FALSE;
-      }
-      else if ( ld_ptr->fl_type != 'x' )
-        ld_ptr->fl_type = 'f';
-   }
-   /* reset set lock descriptors */
-   beg = 0;
-   end = size_st;
-   for (i = beg, ld_ptr = &set_locks[i]; i < end; ++i, ++ld_ptr) {
-      if ( ld_ptr->fl_kept ) {
-        ld_ptr->fl_type = 'r';
-        ld_ptr->fl_kept = FALSE;
-      }
-      else if ( ld_ptr->fl_type != 'x' )
-        ld_ptr->fl_type = 'f';
-   }
-   /* reset key lock descriptors */
-   beg = 0;
-   end = keyl_cnt;
-   for (i = beg, ld_ptr = &key_locks[i]; i < end; ++i, ++ld_ptr) {
-      if ( ld_ptr->fl_kept ) {
-        ld_ptr->fl_type = 'r';
-        ld_ptr->fl_kept = FALSE;
-      }
-      else if ( ld_ptr->fl_type != 'x' )
-        ld_ptr->fl_type = 'f';
-   }
-}
-#endif
-
-#ifndef NO_TRANS
-/* Send free files packet
-*/
-static int send_free()
-{
-#ifndef SINGLE_USER
-   int send_size;
-
-   /* send any free packets */
-   if ( free_pkt->nfiles ) {
-      send_size = sizeof(LM_FREE) + (free_pkt->nfiles-1)*sizeof(INT);
-      if ( send_size > fp_size )
-        return ( dberr(S_SYSERR) );
-
-      if ( nw_send(lsn, (MESSAGE FAR *)free_pkt, send_size) ) 
-        return( neterr() );
-   }
-#endif
-   return( db_status = S_OKAY );
-}
-#endif
-
-
-#ifndef NO_TRANS
-/*------------------------------------------------------------------------
-   Record Lock Bit Functions
-------------------------------------------------------------------------*/
-
-/* Set record lock bit of current record
-*/
-d_rlbset(TASK_ONLY)
-TASK_DECL
-{
-#ifndef SINGLE_USER
-   FILE_NO file;
-   INT rid;
-   int record_lock;
-#endif
-
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   if ( ! curr_rec ) RETURN( dberr(S_NOCR) );
-   
-#ifndef SINGLE_USER
-   file = NUM2INT((FILE_NO)((curr_rec >> FILESHIFT) & FILEMASK), ft_offset);
-
-   if ( dbopen == 1 && 
-       (record_lock = (app_locks[file] >= 0 && !excl_locks[file])) ) {
-      /* request record-lock on file */
-      lock_pkt->nfiles = 1;
-      lock_pkt->locks[0].type = 'R';
-      lock_pkt->locks[0].fref = file_refs[file];
-      if ( send_lock() != S_OKAY ) RETURN( db_status );
-      if ( lock_reply.status != L_OKAY ) 
-        RETURN( db_status = S_UNAVAIL );
-   }
-   if ( dio_rrlb(curr_rec, &rid) != S_OKAY )
-      RETURN( db_status );
-   if ( rid & RLBMASK )
-      rlb_status = S_LOCKED;
-   else {
-      rid |= RLBMASK;
-      rlb_status = dio_wrlb(curr_rec, rid);
-   }
-   if ( dbopen == 1 && record_lock ) {
-      /* free or downgrade record-lock on file */
-      if ( app_locks[file] ) {
-        lock_pkt->nfiles = 1;
-        lock_pkt->locks[0].type = 'r';
-        lock_pkt->locks[0].fref = file_refs[file];
-        if ( send_lock() != S_OKAY ) RETURN( db_status );
-      }
-      else {
-        free_pkt->nfiles = 1;
-        free_pkt->frefs[0] = file_refs[file];
-        if ( send_free() != S_OKAY ) RETURN( db_status );
-      }
-   }
-   RETURN( db_status = rlb_status );
-#else
-   RETURN( db_status = S_OKAY );
-#endif
-}
-#endif
-
-#ifndef NO_TRANS
-/* Clear record lock bit of current record
-*/
-d_rlbclr(TASK_ONLY)
-TASK_DECL
-{
-#ifndef SINGLE_USER
-   FILE_NO file;
-   INT rid;
-#endif
-
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   if ( ! curr_rec ) RETURN( dberr(S_NOCR) );
-
-#ifndef SINGLE_USER
-   file = NUM2INT((FILE_NO)((curr_rec >> FILESHIFT) & FILEMASK), ft_offset);   
-
-   /* ensure that changes are allowed */
-   if (dbopen == 1 && trans_id && app_locks[file] >= 0 && !excl_locks[file]) 
-      RETURN( dberr(S_NOTLOCKED) );
-   
-   if ( dbopen == 1 && ! trans_id ) {
-      /* request record-lock on file */
-      lock_pkt->nfiles = 1;
-      lock_pkt->locks[0].type = 'R';
-      lock_pkt->locks[0].fref = file_refs[file];
-      if ( send_lock() != S_OKAY ) RETURN( db_status );
-      if ( lock_reply.status != L_OKAY ) 
-        RETURN( db_status = S_UNAVAIL );
-   }
-
-   /* read rlb */
-   if ( dio_rrlb(curr_rec, &rid) != S_OKAY )
-      RETURN( db_status );
-
-   /* clear rlb */
-   rid &= ~RLBMASK;
-   rlb_status = S_UNLOCKED;
-   dio_wrlb(curr_rec, rid);
-
-   if ( dbopen == 1 && ! trans_id ) {
-      /* free or downgrade record-lock on file */
-      if ( app_locks[file] ) {
-        lock_pkt->nfiles = 1;
-        lock_pkt->locks[0].type = 'r';
-        lock_pkt->locks[0].fref = file_refs[file];
-        if ( send_lock() != S_OKAY ) RETURN( db_status );
-      }
-      else {
-        free_pkt->nfiles = 1;
-        free_pkt->frefs[0] = file_refs[file];
-        if ( send_free() != S_OKAY ) RETURN( db_status );
-      }
-   }
-#else
-   db_status = S_OKAY;
-#endif
-   RETURN( db_status );
-}
-#endif
-
-
-#ifndef NO_TRANS
-/* Test record lock bit of current record
-*/
-d_rlbtst(TASK_ONLY)
-TASK_DECL
-{
-#ifndef SINGLE_USER
-   INT rid;
-#endif
-
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   if ( ! curr_rec ) RETURN( dberr(S_NOCR) );
-   
-#ifndef SINGLE_USER
-   if ( dio_rrlb(curr_rec, &rid) != S_OKAY )
-      RETURN( db_status );
-
-   if ( rid & RLBMASK )
-      db_status = S_LOCKED;
-   else
-      db_status = S_UNLOCKED;
-
-   RETURN( rlb_status = db_status );
-#else
-   RETURN( db_status = S_UNLOCKED );
-#endif
-
 }
-#endif
-
-
 
-#ifndef NO_TRANS
-/*------------------------------------------------------------------------
-   Database Transaction Processing Functions
-------------------------------------------------------------------------*/
-
-/* Begin transaction
-*/
-d_trbegin(tid TASK_PARM)
-CONST char FAR *tid;
-TASK_DECL
-{
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   db_status = S_OKAY;
-
-   if ( ! dbopen ) RETURN( dberr(S_DBOPEN) );
-
-   if ( tid == NULL ) RETURN( dberr(S_TRANSID) );
-   
-
-   if ( trans_id ) RETURN( dberr(S_TRACTIVE) );
-
-   /* changes were possible outside a transaction */
-   dio_flush(); 
-
-   if ( use_ovfl ) {
-      o_init();
-   }
-   trans_id = tid;
-   RETURN( db_status );
-}
-#endif
-
-
-#ifndef NO_TRANS
-/* End transaction
-*/
-d_trend(TASK_ONLY)
-TASK_DECL
-{
-#ifndef SINGLE_USER
-   register int ft_lc;                 /* loop control */
-   LM_TRCOMMIT trcom_pkt;
-   LM_TREND trend_pkt;
-   LM_LOCKREQ FAR *lockreq_ptr;
-   register FILE_NO FAR *fref_ptr;
-   register int FAR *appl_ptr, FAR *keptl_ptr, FAR *excl_ptr;
-#endif
-
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   db_status = S_OKAY;
-   if( ! trans_id ) RETURN( dberr(S_TRNOTACT) );
-
-   if( trlog_flag ) 
-      /* mark start of trx in archive log file */
-      d_trmark(); 
-
-   /* flush data to database or overflow */
-   if ( dio_flush() != S_OKAY ) RETURN( db_status );
-
-   if ( (dboptions & TRLOGGING) && use_ovfl ) {
-      /* End trx using overflow file */
-
-      /* flush recovery data to overflow file */
-      if ( o_flush() != S_OKAY ) RETURN( db_status );
-
-#ifndef SINGLE_USER
-      trcom_pkt.fcn = L_TRCOMMIT;
-      strcpy(trcom_pkt.logfile, dblog);
-      if ( nw_send(lsn, (MESSAGE FAR *)&trcom_pkt, sizeof(LM_TRCOMMIT)) )
-        RETURN( neterr() );
-#endif
-      trcommit = TRUE;
-
-#ifndef GENERAL
-      if ( taf_add(dblog) != S_OKAY ) RETURN( db_status ); /* after nw_send */
-#endif
-
-      /* allow for user interrupt to test recovery */
-      if ( db_txtest ) dberr(S_DEBUG);
-
-      if( cache_ovfl ) {
-        /* update db from overflow file */
-        if ( o_update() != S_OKAY ) RETURN( db_status );
-      }
-
-      /* flush modified cache data to database */
-      if ( dio_flush() != S_OKAY ) RETURN( db_status );
-
-#ifndef GENERAL
-      if ( taf_del(dblog) != S_OKAY ) RETURN( db_status ); /* before nw_send */
-#endif
-   }
-#ifndef SINGLE_USER
-      trend_pkt.fcn = L_TREND;
-      if ( nw_send(lsn, (MESSAGE FAR *)&trend_pkt, sizeof(LM_TREND)) )
-        RETURN( neterr() );
-#endif
-      trcommit = FALSE;
-
-   if( trlog_flag ) 
-      /* mark end of trx in archive log file */
-      d_trbound(); 
-
-   trans_id = NULL;
-   o_init();                   /*[305] clear cache_ovfl flag */
-
-#ifndef SINGLE_USER
-   if ( dbopen == 1 ) {
-      /* free unkept, non-exclusive file locks */
-      lock_pkt->nfiles = free_pkt->nfiles = 0;
-      for (ft_lc = size_ft, fref_ptr = file_refs, appl_ptr = app_locks,
-                               keptl_ptr = kept_locks, excl_ptr = excl_locks;
-          --ft_lc >= 0; ++fref_ptr, ++appl_ptr, ++keptl_ptr, ++excl_ptr) {
-        if (*excl_ptr)
-           *appl_ptr = *keptl_ptr;
-        else if ( *appl_ptr == -1 ) {
-           if ( (*appl_ptr = *keptl_ptr) > 0 ) {
-              lockreq_ptr = &lock_pkt->locks[lock_pkt->nfiles++];
-              lockreq_ptr->type = 'r';
-              lockreq_ptr->fref = *fref_ptr;
-           }
-           else
-              free_pkt->frefs[free_pkt->nfiles++] = *fref_ptr;
-        }
-        else if ( *appl_ptr && (*appl_ptr = *keptl_ptr) == 0 )
-           free_pkt->frefs[free_pkt->nfiles++] = *fref_ptr;
-        *keptl_ptr = 0;
-      }
-      /* send lock downgrade request */
-      if ( send_lock() != S_OKAY || send_free() != S_OKAY ) 
-        RETURN( db_status );
-
-      /* clear lock descriptors */
-      reset_locks();
-
-      /* reset all key file positions */
-      key_reset(size_ft);
-
-      /* clear page buffers */
-      dio_clear();
-   }
-#endif
-   RETURN( db_status );
-}
-#endif
-
-
-#ifndef NO_TRANS
-/* Abort transaction
-*/
-d_trabort(TASK_ONLY)
-TASK_DECL
-{
-#ifdef SINGLE_USER
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO));
-   if (!trans_id)
-      RETURN (dberr(S_TRNOTACT));
-   trans_id = NULL;
-   dio_pzclr();                        /*[425] clear page zero BEFORE dio_clear */
-   dio_clear();                                /*[353] clear cache */
-   RETURN (db_status = S_OKAY);
-#else
-   register int i;
-   register int FAR *keptl_ptr;
-   register struct lock_descr FAR *ld_ptr;
-
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_IO));
-
-   db_status = S_OKAY;
-   if ( ! trans_id ) RETURN( dberr(S_TRNOTACT) );
-
-   if ( dbopen == 1 ) {
-      /* Revert any kept locks to unkept status */
-      for (i = 0, keptl_ptr = kept_locks; i < size_ft; ++i, ++keptl_ptr)
-        *keptl_ptr = 0;
-      for (i = 0, ld_ptr = rec_locks; i < size_rt; ++i, ++ld_ptr)
-        ld_ptr->fl_kept = FALSE;
-      for (i = 0, ld_ptr = set_locks; i < size_st; ++i, ++ld_ptr)
-        ld_ptr->fl_kept = FALSE;
-      for (i = 0, ld_ptr = key_locks; i < keyl_cnt; ++i, ++ld_ptr)
-        ld_ptr->fl_kept = FALSE;
-   }
-   trans_id = NULL;
-   o_init();           /*[305] clear cache_ovfl flag */
-
-   dio_pzclr();                /*[425] clear page zero BEFORE d_freeall */
-   if ( dbopen == 1 ) d_freeall(TASK_ONLY);
-   dio_clear();
-
-   RETURN( db_status = S_OKAY );
-#endif
-}
-#endif
-
-#ifndef SINGLE_USER
-/* Report a network error
-*/
-neterr()
-{
-    switch ( net_status ) {
-       case N_OPENREJ:
-           db_status = dberr( S_LMBUSY );
-           break;
-       case N_CALLNAME:
-           db_status = dberr( S_NOLOCKMGR );
-           break;
-       case N_NAMEUSED:
-           db_status = dberr( S_DUPUSERID );
-           break;
-       default:
-           db_status = dberr( S_NETERR );
-           break;
-    }
-    return( db_status );
-}
-#endif
-
-int alloc_table(Table, new_size, old_size )
-CHAR_P FAR *Table;
+int alloc_table(
+CHAR_P *Table,
 #define table Table->ptr
-unsigned new_size;
-unsigned old_size;
+unsigned new_size,
+unsigned old_size
+)
 {
    CHAR_P Temp_table;
 
@@ -2351,13 +481,11 @@ unsigned old_size;
       return( dberr(S_NOMEMORY) );
    }
    byteset(&Temp_table.ptr[old_size], 0, new_size - old_size);
-#ifndef ONE_DB
    if ( old_size ) {
       bytecpy(Temp_table.ptr, table, old_size);
       MEM_UNLOCK(Table);
       FREE(Table);
    }
-#endif
    *Table = Temp_table;
    return( db_status );
 }
index 2716dc4421553be47e7dbb3a17b1924e682862f1..86c5aff3753eb4b969dbe929bbf78f6ef783c5c4 100644 (file)
@@ -49,9 +49,7 @@
 
 /* Set database log file name/path
 */
-d_dblog(log TASK_PARM)
-CONST char FAR *log;
-TASK_DECL
+d_dblog(const char *log)
 {
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE));
 
index aeb1564f2896b933f8eedfda836910959fc703e3..edfe11a28ddadfec79283040cfe28b527472e823 100644 (file)
@@ -52,9 +52,7 @@ static char VISTATAF[] = "vista.taf";
 
 /* Set database transaction activity file name/path
 */
-d_dbtaf(taf TASK_PARM)
-CONST char FAR *taf;
-TASK_DECL
+d_dbtaf(const char *taf)
 {
    char dbtaf[FILENMLEN];
    int len;
index 2ce2d5bfb2944fb07c61fbe44418ba2af92eee19..71da9fb3701f5b7b035505badd21d9a1a16b15ab 100644 (file)
@@ -107,12 +107,6 @@ Failure to do so will produce compilation errors.
    HHS     = Harris H-series
 */
 
-#ifdef NO_TRANS
-#define SINGLE_USER
-#endif
-#ifdef SINGLE_USER
-#define NO_TIMESTAMP
-#endif
 
 #define PGHOLD 1
 #define NOPGHOLD 0
@@ -193,10 +187,6 @@ Failure to do so will produce compilation errors.
 #define SP_FIRST   4  
 /* Offset to last member ptr in set ptr = 2+DB_ADDR_SIZE */
 #define SP_LAST    8  
-#ifndef         NO_TIMESTAMP
-/* Offset to timestamp in set ptr */
-#define SP_UTIME   12
-#endif
 /* Size of member pointer = 3*DB_ADDR_SIZE */
 #define MEMPSIZE   12 
 /* Offset to owner ptr in member ptr */
@@ -320,7 +310,6 @@ typedef struct KEY_ENTRY_S {
    INT  kt_sort;   /* 'a' = ascending, 'd' = descending */
 } KEY_ENTRY;
 
-#ifndef         ONE_DB
 /* database table entry declaration */
 typedef struct DB_ENTRY_S {
    char db_name[DBNMLEN];   /* name of this database */
@@ -355,48 +344,8 @@ typedef struct RN_ENTRY_S {
 #define         NUM2INT(num, offset)    ((num) + db_global.Curr_db_table->offset)
 #define         NUM2EXT(num, offset)    ((num) - db_global.Curr_db_table->offset)
 #define         ORIGIN(offset)          (curr_db_table->offset)
-#ifndef NO_DBN
-#define         CURR_DB_PARM            , curr_db
-#define         DBN_PARM                , dbn
-#define  DBN_ONLY               dbn
-#define         DBN_DECL                int dbn;
-#else
-#define         CURR_DB_PARM            /**/
-#define         DBN_PARM                /**/
-#define  DBN_ONLY               /**/
-#define         DBN_DECL                /**/
-#endif
-#else
-#define         DB_REF(item)            (db_global.item)
-#define  RN_REF(item)           (db_global.item)
-#define         NUM2INT(num, offset)    (num)
-#define         NUM2EXT(num, offset)    (num)
-#define         ORIGIN(offset)          (0)
-#define         CURR_DB_PARM            /**/
-#define         DBN_PARM                /**/
-#define  DBN_ONLY               /**/
-#define         DBN_DECL                /**/
-#endif
 #define         TABLE_SIZE(size)        DB_REF(size)
 
-/* DBN_PARM... and TASK_PARM... are used for function interfaces */
-#ifdef MULTI_TASK
-#define  TASK_PARM              , task
-#define  TASK_PARM_DBN          task ,
-#define  TASK_ONLY              task
-#define  TASK_DECL              DB_TASK task;
-#define  TASK_PTR_DECL          DB_TASK FAR *task;
-#define  TASK_DBN_ONLY          task DBN_PARM
-#else
-#define  TASK_PARM              /**/
-#define  TASK_PARM_DBN          /**/
-#define  TASK_ONLY              /**/
-#define  TASK_DECL              /**/
-#define  TASK_PTR_DECL          /**/
-#define  TASK_DBN_ONLY          DBN_ONLY
-#endif
-
-#ifndef NO_COUNTRY
 /* Country code table definition */
 typedef struct CNTRY_TBL_S {
    unsigned char out_chr;
@@ -404,7 +353,6 @@ typedef struct CNTRY_TBL_S {
    unsigned char sort_as2;
    unsigned char sub_sort;
 } CNTRY_TBL;
-#endif
 
 /* names lists structure declaration */
 typedef struct OBJNAMES_S {
@@ -433,42 +381,32 @@ typedef struct OBJNAMES_S {
 #define DB_WRITE write
 #define DB_READ  read
 
-typedef struct {FILE_NO FAR *ptr; LOCK_DESC} FILE_NO_P;
-typedef struct {int FAR *ptr; LOCK_DESC} INT_P;
-typedef struct {struct NODE_PATH_S FAR *ptr; LOCK_DESC} NODE_PATH_P;
-#ifndef SINGLE_USER
-typedef struct {struct lock_descr FAR *ptr; LOCK_DESC} LOCK_DESCR_P;
-typedef struct {struct LM_LOCK_S FAR *ptr; LOCK_DESC} LM_LOCK_P;
-typedef struct {struct LM_FREE_S FAR *ptr; LOCK_DESC} LM_FREE_P;
-typedef struct {struct LM_DBOPEN_S FAR *ptr; LOCK_DESC} LM_DBOPEN_P;
-typedef struct {struct LM_DBCLOSE_S FAR *ptr; LOCK_DESC} LM_DBCLOSE_P;
-typedef struct {struct LR_DBOPEN_S FAR *ptr; LOCK_DESC} LR_DBOPEN_P;
-#endif
-typedef struct {struct KEY_INFO_S FAR *ptr; LOCK_DESC} KEY_INFO_P;
-typedef struct {struct ren_entry FAR *ptr; LOCK_DESC} REN_ENTRY_P;
-typedef struct {struct RN_ENTRY_S FAR *ptr; LOCK_DESC} RN_ENTRY_P;
-typedef struct {struct LOOKUP_ENTRY_S FAR *ptr; LOCK_DESC} LOOKUP_ENTRY_P;
-typedef struct {struct page_entry FAR *ptr; LOCK_DESC} PAGE_ENTRY_P;
-typedef struct {struct DB_ENTRY_S FAR *ptr; LOCK_DESC} DB_ENTRY_P;
-typedef struct {struct FILE_ENTRY_S FAR *ptr; LOCK_DESC} FILE_ENTRY_P;
-typedef struct {struct RECORD_ENTRY_S FAR *ptr; LOCK_DESC} RECORD_ENTRY_P;
-typedef struct {struct SET_ENTRY_S FAR *ptr; LOCK_DESC} SET_ENTRY_P;
-typedef struct {struct MEMBER_ENTRY_S FAR *ptr; LOCK_DESC} MEMBER_ENTRY_P;
-typedef struct {struct SORT_ENTRY_S FAR *ptr; LOCK_DESC} SORT_ENTRY_P;
-typedef struct {struct FIELD_ENTRY_S FAR *ptr; LOCK_DESC} FIELD_ENTRY_P;
-typedef struct {struct KEY_ENTRY_S FAR *ptr; LOCK_DESC} KEY_ENTRY_P;
-typedef struct {struct PGZERO_S FAR *ptr; LOCK_DESC} PGZERO_P;
-typedef struct {struct RI_ENTRY_S FAR *ptr; LOCK_DESC} RI_ENTRY_P;
-typedef struct {ULONG FAR *ptr; LOCK_DESC} ULONG_P;
-typedef struct {LONG FAR *ptr; LOCK_DESC} LONG_P;
-#ifndef NO_COUNTRY
-typedef struct {struct CNTRY_TBL_S FAR *ptr; LOCK_DESC} CNTRY_TBL_P;
-#endif
+typedef struct {FILE_NO *ptr; LOCK_DESC} FILE_NO_P;
+typedef struct {int *ptr; LOCK_DESC} INT_P;
+typedef struct {struct NODE_PATH_S *ptr; LOCK_DESC} NODE_PATH_P;
+typedef struct {struct KEY_INFO_S *ptr; LOCK_DESC} KEY_INFO_P;
+typedef struct {struct ren_entry *ptr; LOCK_DESC} REN_ENTRY_P;
+typedef struct {struct RN_ENTRY_S *ptr; LOCK_DESC} RN_ENTRY_P;
+typedef struct {struct LOOKUP_ENTRY_S *ptr; LOCK_DESC} LOOKUP_ENTRY_P;
+typedef struct {struct page_entry *ptr; LOCK_DESC} PAGE_ENTRY_P;
+typedef struct {struct DB_ENTRY_S *ptr; LOCK_DESC} DB_ENTRY_P;
+typedef struct {struct FILE_ENTRY_S *ptr; LOCK_DESC} FILE_ENTRY_P;
+typedef struct {struct RECORD_ENTRY_S *ptr; LOCK_DESC} RECORD_ENTRY_P;
+typedef struct {struct SET_ENTRY_S *ptr; LOCK_DESC} SET_ENTRY_P;
+typedef struct {struct MEMBER_ENTRY_S *ptr; LOCK_DESC} MEMBER_ENTRY_P;
+typedef struct {struct SORT_ENTRY_S *ptr; LOCK_DESC} SORT_ENTRY_P;
+typedef struct {struct FIELD_ENTRY_S *ptr; LOCK_DESC} FIELD_ENTRY_P;
+typedef struct {struct KEY_ENTRY_S *ptr; LOCK_DESC} KEY_ENTRY_P;
+typedef struct {struct PGZERO_S *ptr; LOCK_DESC} PGZERO_P;
+typedef struct {struct RI_ENTRY_S *ptr; LOCK_DESC} RI_ENTRY_P;
+typedef struct {ULONG *ptr; LOCK_DESC} ULONG_P;
+typedef struct {LONG *ptr; LOCK_DESC} LONG_P;
+typedef struct {struct CNTRY_TBL_S *ptr; LOCK_DESC} CNTRY_TBL_P;
 struct sk {
    INT sk_fld;
    CHAR_P sk_val;
 } __SK__;
-typedef struct { struct sk FAR *ptr; LOCK_DESC } SK_P;
+typedef struct { struct sk *ptr; LOCK_DESC } SK_P;
 
 /* node key search path stack entry: one per level per key field */
 typedef struct NODE_PATH_S {
@@ -524,63 +462,29 @@ typedef struct MESSAGE_S {
 #endif                         /* GENERAL */
 } MESSAGE;
 
-#ifdef ONE_DB
-#define NO_DBN
-#endif
-
-#ifndef NO_DBN                    /* NO_DBN */
 #ifdef COMMA                            /* COMMA */
 #define DB_ID , dbn
 #define NO_DB_ID , -1
-#define DBN_PARAM , b
 #else                                   /* COMMA */
 #define DB_ID dbn
 #define NO_DB_ID -1
-#define DBN_PARAM b
 #define COMMA
 #endif                                  /* COMMA */
-#else                              /* NO_DBN */
-#define DBN_PARAM /**/
-#define DB_ID /**/
-#define DB_PARM /**/
-#define NO_DB_ID /**/
-#endif                            /* NO_DBN */
-
-#ifdef MULTI_TASK
-#ifdef COMMA
-#define TASK_ID , &task
-#define TASK_PTR_ID , task
-#define NO_TASK_ID , NULL
-#define TASK_PARAM , c
-#else
-#define TASK_ID &task
-#define TASK_PTR_ID task
-#define NO_TASK_ID NULL
-#define TASK_PARAM c
-#define COMMA
-#endif
-#else
-#define TASK_PARAM /**/
+
 #define TASK_ID /**/
-#define TASK_PTR_ID /**/
-#define NO_TASK_ID /**/
-#endif
 
-#define LOCK_PARAM /**/
-#define LOCK_PARM /**/
-#define LOCK_DECL /**/
 #define LOCK_SET(a) /**/
 
-#define TDTL_PARAM DBN_PARAM TASK_PARAM LOCK_PARAM
+#define TDTL_PARAM
 
 #define DB_ENTER(TDTL_PARAM) if ( startup(TDTL_PARAM) != S_OKAY ) { return( db_status ); } else
 
 #define RETURN(x) return( x )
 #define ALLOC(l, b, v) d_alloc(b)
 #define CALLOC(l, i, s, v) d_calloc(i, s)
-#define MEM_LOCK(cp)   d_memlock((CHAR_P FAR *)(cp))
-#define MEM_UNLOCK(cp)         d_memunlock((CHAR_P FAR *)(cp))
-#define FREE(cp)       d_free((CHAR_P FAR *)(cp))
+#define MEM_LOCK(cp)   d_memlock((CHAR_P *)(cp))
+#define MEM_UNLOCK(cp)         d_memunlock((CHAR_P *)(cp))
+#define FREE(cp)       d_free((CHAR_P *)(cp))
 
 /* Lock sets are defined in dblfcns.c */
 #define LOCK_NONE      -1
@@ -606,9 +510,6 @@ typedef struct MESSAGE_S {
 #include "dbxtrn.h"
 
 typedef struct LOOKUP_ENTRY_S {
-#ifdef MULTI_TASK
-   TASK FAR *task;           /* task pointer */
-#endif
    FILE_NO file;              /* file table entry number (0..size_ft-1) */
    F_ADDR  pageno;            /* database page number */
    short   pg_slot;          /* page table slot pointing to this entry */
@@ -620,9 +521,6 @@ typedef struct page_entry {
    BOOLEAN modified;          /* TRUE if page has been modified */
    INT     holdcnt;           /* "hold-in-cache" counter */
    short   lu_slot;           /* lookup table slot pointing to this entry */
-#ifndef NO_TRANS
-   F_ADDR  ovfl_addr;         /* overflow file address of page */
-#endif
    CHAR_P Buff;             /* page buffer pointer */
 } PAGE_ENTRY;
 #define buff Buff.ptr
@@ -632,21 +530,5 @@ typedef struct page_entry {
 #define _STRING_H
 #endif
 #include "proto.h"
-#ifdef MULTI_TASK
-#ifdef NO_DT_COVER
-#include "dtcover.h"
-#endif
-#endif
 
-#ifndef SINGLE_USER
-/* record/set lock descriptor */
-struct lock_descr {  
-   FILE_NO_P fl_list;      /* array of files used by record/set */
-   int      fl_cnt;    /* Number of elements in fl_list */
-   BOOLEAN   fl_kept;   /* Is lock kept after transaction? */
-   char      fl_type;   /* lock type: 'r' = read, 'w' = write, 
-                                    'x' = exclusive, 'f' = free */ 
-   char      fl_prev;   /* previous lock type */
-};
-#endif
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC dbtype.h */
index 6ee207bb6bb663ff1e2db919eae801344e4f4a01..028bf05828d633e2d7102276ae4e7e9705bb6ce3 100644 (file)
 /* Set Database User Identifier
 */
 int
-d_dbuserid(id TASK_PARM)
-CONST char FAR *id;
-TASK_DECL
+d_dbuserid(const char *id)
 {
-   CONST char FAR *chk_id;
+   const char *chk_id;
 
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_NONE));
 
index abc39bf4aae9ea7999f6ab83def0521fb15d85f7..8ab04110e57de2c3e843e7a5a76a4ab222427d06 100644 (file)
@@ -53,7 +53,6 @@
 /* Database Dictionary Tables */
 extern INT largest_page;
 
-#ifndef ONE_DB
 extern INT old_size_ft;
 extern INT old_size_fd;
 extern INT old_size_st;
@@ -62,53 +61,17 @@ extern INT old_size_srt;
 extern INT old_size_kt;
 extern INT old_size_rt;
 extern INT old_no_of_dbs;
-#else
-#define old_size_ft 0
-#define old_size_fd 0
-#define old_size_st 0
-#define old_size_mt 0
-#define old_size_srt 0
-#define old_size_kt 0
-#define old_size_rt 0
-#define old_no_of_dbs 0
-#endif
 
-extern char FAR *crloc;          /* location in page buffer of current record */
+extern char *crloc;          /* location in page buffer of current record */
 
 typedef struct TASK_S {
    /* The following global variables came from dblfcns.c */
-#ifndef SINGLE_USER
-   int Lock_tries;            /* lock_tries = 5 */
-   int Dbwait_time;           /* dbwait_time = 1 */
-   int Db_timeout;            /* db_timeout = TIMEOUT_DEF */
-#endif
    int Dbopen;                /* dbopen = 0 */
-#ifndef SINGLE_USER
-   int Db_lockmgr;            /* db_lockmgr = 1 */
-#endif
    char Dbuserid[FILENMLEN];  /* dbuserid = "" */
    char Dbdpath[FILENMLEN*2]; /* dbdpath = "" */
    char Dbfpath[FILENMLEN*2]; /* dbdpath = "" */
-#ifndef SINGLE_USER
-   INT_P App_locks;           /* app_locks = NULL */
-   INT_P Excl_locks;          /* excl_locks = NULL */
-   INT_P Kept_locks;          /* kept_locks = NULL */
-#endif
-   CONST char FAR *Trans_id;  /* trans_id = NULL */
+   const char *Trans_id;  /* trans_id = NULL */
    char Dblog[FILENMLEN];     /* dblog = "" */
-#ifndef SINGLE_USER
-   LOCK_DESCR_P Rec_locks;    /* rec_locks = NULL */
-   LOCK_DESCR_P Set_locks;    /* set_locks = NULL */
-   LOCK_DESCR_P Key_locks;    /* key_locks = NULL */
-   int Keyl_cnt;
-   int Lp_size;
-   int Fp_size;
-   LM_LOCK_P Lock_pkt;        /* lock_pkt = NULL */
-   LM_FREE_P Free_pkt;        /* free_pkt = NULL */
-   FILE_NO_P File_refs;
-   int Lsn;
-   BOOLEAN Session_active;    /* session_active = FALSE */
-#endif
    /* The following global variables came from dio.c */
    BOOLEAN Cache_ovfl;        /* cache_ovfl = FALSE */
    PGZERO_P Pgzero;          /* database file page 0 array */
@@ -132,39 +95,17 @@ typedef struct TASK_S {
    llist Ren_list;           /* Ren_list = LLIST_INIT() */
    /* The following global variables came from inittab.h */
    INT Page_size;
-#ifndef ONE_DB
    int     Curr_db;
-   DB_ENTRY FAR *Curr_db_table;
-#endif
+   DB_ENTRY *Curr_db_table;
    DB_ADDR Curr_rec;          /* current record address */
    DB_ADDR_P Curr_own;        /* current set owners array */
    DB_ADDR_P Curr_mem;        /* current set members array */
-#ifndef         NO_TIMESTAMP
-   ULONG   Cr_time;
-   ULONG_P Co_time;          /* co_time = NULL */
-   ULONG_P Cm_time;          /* cm_time = NULL */
-   ULONG_P Cs_time;          /* cs_time = NULL */
-   BOOLEAN Db_tsrecs;
-   BOOLEAN Db_tssets;
-#endif
    FILE_NO Ov_file;
-#ifndef ONE_DB
    BOOLEAN Setdb_on;
    INT No_of_dbs;
    RN_ENTRY_P Rn_table;
-   RN_ENTRY FAR *Curr_rn_table;
-#else
-   DB_ADDR rn_dba;      /* last computed dba by recfrst/recset/recnext */
-   INT     rn_type;     /* last record type supplied to recfrst/recset */
-   INT     Ft_offset;
-#endif
-#ifndef         ONE_DB
+   RN_ENTRY *Curr_rn_table;
    DB_ENTRY_P Db_table;
-#else
-   char db_name[DBNMLEN];   /* name of this database */
-   char db_path[PATHLEN];   /* name of path to this database */
-   DB_ADDR sysdba;  /* database address of system record */
-#endif
    FILE_ENTRY_P File_table;
    INT Size_ft;
    RECORD_ENTRY_P Record_table;
@@ -182,11 +123,9 @@ typedef struct TASK_S {
    int Lock_lvl;
 #define LOCK_STACK_SIZE                10
    int Lock_stack[LOCK_STACK_SIZE];
-#ifndef NO_COUNTRY
    CNTRY_TBL_P country_tbl;
    int ctbl_activ;
    char ctbpath[FILENMLEN];
-#endif
    llist Sk_list;
 } TASK;
 
@@ -214,11 +153,6 @@ typedef struct TASK_S {
 #define key_table db_global.Key_table.ptr
 #define pgzero db_global.Pgzero.ptr
 #define root_ix db_global.Root_ix.ptr
-#ifndef NO_TIMESTAMP
-#define co_time db_global.Co_time.ptr
-#define cm_time db_global.Cm_time.ptr
-#define cs_time db_global.Cs_time.ptr
-#endif
 /* Used in DIO.C and OVFCNS.C */
 #define ixpg_table Ixpg_table.ptr
 #define dbpgbuff Dbpgbuff.ptr
@@ -252,17 +186,10 @@ typedef struct TASK_S {
 #define curr_db db_global.Curr_db
 #define curr_db_table db_global.Curr_db_table
 #define curr_rec db_global.Curr_rec
-#ifndef        NO_TIMESTAMP
-#define cr_time db_global.Cr_time
-#define db_tsrecs db_global.Db_tsrecs
-#define db_tssets db_global.Db_tssets
-#endif
 #define ov_file db_global.Ov_file
-#ifndef ONE_DB
 #define setdb_on db_global.Setdb_on
 #define no_of_dbs db_global.No_of_dbs
 #define curr_rn_table db_global.Curr_rn_table
-#endif
 #define size_ft db_global.Size_ft
 #define size_rt db_global.Size_rt
 #define size_st db_global.Size_st
@@ -277,12 +204,5 @@ typedef struct TASK_S {
 
 extern TASK db_global;
 extern int db_glob_init;
-#ifdef MULTI_TASK
-extern DB_TASK Currtask;
-#endif
 
-
-#ifdef MULTI_TASK
-extern int task_count;
-#endif
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin dbxtrn.h */
index d8f99c533ca502d577136fbd2dae2e0b385968b0..f70f5b9a723626430a9278525afbb8df39384dc8 100644 (file)
@@ -53,19 +53,14 @@ static DB_ADDR zap_dba = NULL_DBA;
 /* Delete the current record, with error checking
 */
 int
-d_delete(TASK_DBN_ONLY)
-TASK_DECL
-DBN_DECL
+d_delete(int dbn)
 {
-   register int st_lc, mt_lc;          /* loop control */
+   int st_lc, mt_lc;           /* loop control */
    INT i, rt;
-   char FAR *ptr;
-   SET_ENTRY FAR *set_ptr;
-   MEMBER_ENTRY FAR *mem_ptr;
-   DB_ADDR FAR *co_ptr, FAR *cm_ptr;
-#ifndef         NO_TIMESTAMP
-   ULONG FAR *cots_ptr, FAR *cmts_ptr, FAR *sts_ptr;
-#endif
+   char *ptr;
+   SET_ENTRY *set_ptr;
+   MEMBER_ENTRY *mem_ptr;
+   DB_ADDR *co_ptr, *cm_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
@@ -74,15 +69,13 @@ DBN_DECL
    if ( ! curr_rec )  RETURN( dberr( S_NOCR ) );
 
    /* get the record type of the current record */
-   if ( dio_read( curr_rec, (char FAR * FAR *)&ptr , NOPGHOLD) != S_OKAY )
+   if ( dio_read( curr_rec, (char * *)&ptr , NOPGHOLD) != S_OKAY )
       RETURN( db_status );
    bytecpy( &rt, ptr, sizeof(INT) );
    if (rt < 0)
       RETURN( dberr(S_INVADDR) );
    rt &= ~RLBMASK; /* mask off rlb */
-#ifndef         ONE_DB
    rt += curr_db_table->rt_offset;
-#endif
 
    /* make sure this is not the system record */
    if ( record_table[rt].rt_fdtot == -1 )
@@ -105,34 +98,17 @@ DBN_DECL
    /* delete record */
    if ( r_delrec( rt, curr_rec ) == S_OKAY ) {
       /* nullify any currency containing deleted record */
-#ifndef         NO_TIMESTAMP
-      for (i = 0, co_ptr = curr_own, cm_ptr = curr_mem, cots_ptr = co_time,
-                                      cmts_ptr = cm_time, sts_ptr = cs_time;
-          i < size_st;
-          ++i, ++co_ptr, ++cm_ptr, ++cots_ptr, ++cmts_ptr, ++sts_ptr) {
-#else
       for (i = 0, co_ptr = curr_own, cm_ptr = curr_mem;
           i < size_st;
           ++i, ++co_ptr, ++cm_ptr) {
-#endif
         if ( ADDRcmp(&curr_rec, co_ptr) == 0 ) {
            *co_ptr = NULL_DBA;
-#ifndef         NO_TIMESTAMP
-           if ( db_tsrecs ) *cots_ptr = 0L;
-           if ( db_tssets ) *sts_ptr = 0L;
-#endif
         }
         if ( ADDRcmp(&curr_rec, cm_ptr) == 0 ) {
            *cm_ptr = NULL_DBA;
-#ifndef         NO_TIMESTAMP
-           if ( db_tsrecs ) *cmts_ptr = 0L;
-#endif
         }
       }
       curr_rec = NULL_DBA;
-#ifndef         NO_TIMESTAMP
-      cr_time  = 0L;
-#endif
    }
    RETURN( db_status );
 }
index 250c1231d201518c03ceaff62e53d4162b8ff86f..017cd68c41f4d98bf2c9461e777d81eed725d5d9 100644 (file)
    of the database
 */
 int
-d_destroy(dbname TASK_PARM)
-CONST char FAR *dbname;
-TASK_DECL
+d_destroy(const char *dbname)
 {
-   register int ft_lc;                 /* loop control */
-   register FILE_ENTRY FAR *file_ptr;
-#ifndef NO_TRANS
-   int ovfl_save;
-#endif
+   int ft_lc;                  /* loop control */
+   FILE_ENTRY *file_ptr;
 
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL));
 
    /* database must be closed (might be multiple databases open) */
-   if ( dbopen ) d_close(TASK_ONLY);
-#ifndef NO_TRANS
-
-   ovfl_save = use_ovfl;
-   use_ovfl = NO;
-#endif
+   if ( dbopen ) d_close();
 
    /* prepare for the inittab and read in the database tables */
    if ((initdbt(dbname) != S_OKAY) || (inittab() != S_OKAY))
@@ -86,10 +76,6 @@ TASK_DECL
 
    /* free all residual memory */
    termfree();
-#ifndef NO_TRANS
-
-   use_ovfl = ovfl_save;
-#endif
 
    RETURN( db_status );
 }
index 3c36bf7720830fa437ccadd949f437f33c971a87..0f730c6e97f6ad77861d9fc84552d3b3105edbdc 100644 (file)
@@ -128,50 +128,8 @@ int        debugging_dio_init = FALSE;
 int    debugging_dio_close = FALSE;
 #endif
 
-#ifndef NO_TRANS
-
-/* On MS-DOS networks, files must be closed whenever a lock is freed.
-   Function dio_clrfile is called whenever a lock is freed to clear
-   from the cache the pages of the file whose lock is being freed.
-   CLosing and opening files on Unix, VMS and other host computers, 
-   however, is very slow and is not necessary for database integrity.
-   The following constant definition specifies whether or not the files
-   need to be closed.   A definition per supported MS-DOS compiler is 
-   required.
-*/
-#ifdef MSC
-#define CLOSE_FILES
-#endif
-#ifdef LAT
-#define CLOSE_FILES
-#endif
-#ifdef WIZ
-#define CLOSE_FILES
-#endif
-#ifdef TURBO
-#define CLOSE_FILES
-#endif
-/*------------ transaction logging data ------------*/
-#define DEFIXPAGES 4          /* default number of index cache pages */
-#define MINIXPAGES 2          /* minimum number of index cache pages */
-int ix_pgtab_sz = DEFIXPAGES;
-LOOKUP_ENTRY_P Ix_lookup = POINTER_INIT(); /* index page lookup table */
-PAGE_ENTRY_P Ixpg_table = POINTER_INIT(); /* index page table */
-static int ixpg_lru_slot;     /* least recently accessed ix page */
-
-/* transaction logging enabled flag */
-int trlog_flag = 0;  /* set only by user implemented functions */
-
-BOOLEAN use_ovfl = YES;        /* Default to using overflow */
-CHAR_P Dbpgbuff = POINTER_INIT();  /* allocated by dio_init used by o_update */
-/*------------ end of transaction logging data ------------*/
-#endif         /* NO_TRANS */
-
-#ifndef SINGLE_USER
-#define EXCL_OPEN()    (dbopen >= 2)
-#else
+
 #define EXCL_OPEN()    (TRUE)
-#endif
 
 #define DEFDBPAGES 16         /* default number of database cache pages */
 #define MINDBPAGES 8          /* minimum number of database cache pages */
@@ -184,9 +142,6 @@ LOOKUP_ENTRY_P Db_lookup = POINTER_INIT(); /* database page lookup table */
 PAGE_ENTRY_P Dbpg_table = POINTER_INIT(); /* database page table */
 static struct
 {
-#ifdef MULTI_TASK
-   TASK FAR *task;
-#endif
    FILE_NO file;
    F_ADDR pageno;
    int slot;
@@ -209,17 +164,11 @@ static int dbpg_lru_slot;      /* least recently accessed db page */
 static int no_modheld;         /* number of modified or held db pages */
 static FILE_NO working_file;   /* current key file being processed */
 
-static void cache_init(P1(int) Pi(LOOKUP_ENTRY FAR *)
-                                     Pi(PAGE_ENTRY FAR *) Pi(int));
-static int dio_pzinit(P0);
-static int clear_cache(P1(FILE_NO) Pi(FILE_NO));
-static int dio_pzflush(P0);
-#ifdef NO_TRANS
-static int dio_in(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *));
-#else
-static int dio_in(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *)
-                                Pi(BOOLEAN));
-#endif
+static void cache_init(int, LOOKUP_ENTRY *, PAGE_ENTRY *, int);
+static int dio_pzinit(void);
+static int clear_cache(FILE_NO, FILE_NO);
+static int dio_pzflush(void);
+static int dio_in(PAGE_ENTRY *, LOOKUP_ENTRY *);
 
 #define used_files Used_files.ptr
 #define db_lookup Db_lookup.ptr
@@ -230,8 +179,7 @@ static int dio_in(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *)
 /* Set the maximum number of open db_VISTA files
 */
 int
-d_setfiles(num)
-int num;
+d_setfiles(int num)
 {
    if ( dbpg_table ) return( dberr(S_DBCLOSE) );
 
@@ -245,19 +193,15 @@ int num;
 /* Set number of virtual memory pages
 */
 int
-d_setpages(dbpgs, ixpgs)
-int dbpgs; /* # of db cache pages */
-int ixpgs; /* # of index cache pages - ignored in single-user version */
+d_setpages(
+int dbpgs, /* # of db cache pages */
+int ixpgs  /* # of index cache pages - ignored in single-user version */
+)
 {
    if ( dbpg_table ) return( dberr(S_SETPAGES) );
 
    db_pgtab_sz = (dbpgs <= MINDBPAGES) ? MINDBPAGES : dbpgs;
 
-#ifndef NO_TRANS
-   if ( use_ovfl ) {
-      ix_pgtab_sz = (ixpgs <= MINIXPAGES) ? MINIXPAGES : ixpgs;
-   }
-#endif
    return( db_status = S_OKAY );
 }
 
@@ -270,11 +214,10 @@ int ixpgs; /* # of index cache pages - ignored in single-user version */
 /* Open a database file
 */
 int
-dio_open( fno )
-FILE_NO fno;
+dio_open(FILE_NO fno)
 {
-   FILE_ENTRY FAR *file_ptr, FAR *lru_file_ptr;
-   register int FAR *uf_ptr;
+   FILE_ENTRY *file_ptr, *lru_file_ptr;
+   int *uf_ptr;
 
    file_ptr = &file_table[fno];
    if ( file_ptr->ft_status == CLOSED ) {
@@ -318,10 +261,9 @@ FILE_NO fno;
 /* Close a database file
 */
 int
-dio_close( fno )
-FILE_NO fno;
+dio_close(FILE_NO fno)
 {
-   FILE_ENTRY FAR *file_ptr;
+   FILE_ENTRY *file_ptr;
 
    file_ptr = &file_table[fno];
    if ( file_ptr->ft_status == OPEN ) {
@@ -341,7 +283,7 @@ FILE_NO fno;
 /* Initialize database I/O
 */
 int
-dio_init()
+dio_init(void)
 {
    CHAR_P Tempbuff;
 #define tempbuff Tempbuff.ptr
@@ -361,11 +303,6 @@ dio_init()
       if ( page_size > largest_page ) {
         if ( (tempbuff = ALLOC(&Tempbuff, page_size, "tempbuff")) == NULL )
            return( dberr(S_NOMEMORY) );
-#ifndef NO_TRANS
-        MEM_UNLOCK(&Dbpgbuff);
-        FREE(&Dbpgbuff);
-        Dbpgbuff = Tempbuff;
-#endif
         largest_page = page_size;
       }
 #ifdef DEBUG_DIO
@@ -381,14 +318,14 @@ dio_init()
 
    used_files =
        /* Macro references must be on one line for some compilers */ 
-       (int FAR *)ALLOC(&Used_files, (size_ft+1)*sizeof(int), "used_files");
+       (int *)ALLOC(&Used_files, (size_ft+1)*sizeof(int), "used_files");
    db_lookup =
        /* Macro references must be on one line for some compilers */ 
-       (LOOKUP_ENTRY FAR *)
+       (LOOKUP_ENTRY *)
        ALLOC(&Db_lookup, db_pgtab_sz*sizeof(LOOKUP_ENTRY), "db_lookup");
    dbpg_table =
        /* Macro references must be on one line for some compilers */ 
-       (PAGE_ENTRY FAR *)
+       (PAGE_ENTRY *)
        ALLOC(&Dbpg_table, db_pgtab_sz*sizeof(PAGE_ENTRY), "dbpg_table");
 #ifdef DEBUG_DIO
    if (debugging_dio_init) {
@@ -401,9 +338,6 @@ dio_init()
       return( dberr(S_NOMEMORY) );
    byteset(used_files, 0, (size_ft + 1)*sizeof(*used_files));
 
-#ifdef MULTI_TASK
-   last_dblu.task = NULL;
-#endif
    last_dblu.file = -1;
    last_dblu.pageno = -1L;
    last_dblu.slot = -1;
@@ -412,29 +346,6 @@ dio_init()
    cache_init((int)db_pgtab_sz, db_lookup, dbpg_table, (int)page_size);
    /***cache_init(db_pgtab_sz, db_lookup, dbpg_table, page_size);****/
    if (db_status != S_OKAY) return(db_status);
-#ifndef NO_TRANS
-   if ( use_ovfl ) {
-      ix_lookup =
-       /* Macro references must be on one line for some compilers */ 
-       (LOOKUP_ENTRY FAR *)
-       ALLOC(&Ix_lookup, ix_pgtab_sz*sizeof(LOOKUP_ENTRY),"ix_lookup");
-      ixpg_table = 
-       /* Macro references must be on one line for some compilers */ 
-       (PAGE_ENTRY FAR *)
-       ALLOC(&Ixpg_table, ix_pgtab_sz*sizeof(PAGE_ENTRY), "ixpg_table");
-      if ( !ix_lookup || !ixpg_table )
-        return( dberr(S_NOMEMORY) );
-
-      cache_init(ix_pgtab_sz, ix_lookup, ixpg_table, IX_PAGESIZE);
-      if (db_status != S_OKAY)
-         return (db_status);
-
-      if ( (dbpgbuff = ALLOC(&Dbpgbuff, page_size, "dbpgbuff")) == NULL )
-        return( dberr(S_NOMEMORY) );
-
-      ixpg_lru_slot = 0;
-   }
-#endif                 /* NO_TRANS */
    last_file = 0;
    dbpg_lru_slot = 0;
    no_modheld  = 0;
@@ -452,13 +363,10 @@ dio_init()
 } /* dio_init() */
 
 
-static void    cache_init (pg_cnt, lu_ptr, pg_ptr, pgsize)
-int                pg_cnt;
-LOOKUP_ENTRY FAR *  lu_ptr;
-PAGE_ENTRY FAR *    pg_ptr;
-int                pgsize;
+static void
+cache_init (int pg_cnt, LOOKUP_ENTRY *lu_ptr, PAGE_ENTRY * pg_ptr, int pgsize)
 {
-   register int pg_no;
+   int pg_no;
 
 #ifdef DEBUG_DIO
    if (debugging_dio_init) {
@@ -470,9 +378,6 @@ int             pgsize;
 
    for (pg_no = 0; pg_no < pg_cnt; ++pg_no, ++lu_ptr, ++pg_ptr)
    {
-#ifdef MULTI_TASK
-      lu_ptr->task = NULL;
-#endif
       lu_ptr->file = -1;
       lu_ptr->pageno = -1L;
       lu_ptr->pg_slot = pg_no;
@@ -481,9 +386,6 @@ int             pgsize;
       pg_ptr->recently_used = FALSE;
       pg_ptr->modified = FALSE;
       pg_ptr->holdcnt = 0;
-#ifndef NO_TRANS
-      pg_ptr->ovfl_addr = 0L;
-#endif
       pg_ptr->buff = ALLOC(&pg_ptr->Buff, pgsize, db_avname);
       if (pg_ptr->buff == NULL) {
 #ifdef DEBUG_DIO
@@ -509,16 +411,11 @@ int                   pgsize;
 /****************************************/
 /* Free the memory allocated for pages
 */
-void dio_free()
+void dio_free(void)
 {
-   register int pgt_lc;                        /* loop control */
-   register PAGE_ENTRY FAR *pg_ptr;
+   int pgt_lc;                 /* loop control */
+   PAGE_ENTRY *pg_ptr;
 
-#ifdef MULTI_TASK
-   if ( task_count > 1 ) {
-      return;
-   }
-#endif
    MEM_UNLOCK(&db_global.Pgzero);
    FREE(&db_global.Pgzero);
    MEM_UNLOCK(&Used_files);
@@ -531,20 +428,6 @@ void dio_free()
    }
    MEM_UNLOCK(&Dbpg_table);
    FREE(&Dbpg_table);
-#ifndef NO_TRANS
-   if ( use_ovfl ) {
-      MEM_UNLOCK(&Ix_lookup);
-      FREE(&Ix_lookup);
-      for (pgt_lc = ix_pgtab_sz, pg_ptr = ixpg_table; --pgt_lc >= 0; ++pg_ptr) {
-        MEM_UNLOCK(&pg_ptr->Buff);
-        FREE(&pg_ptr->Buff);
-      }
-      MEM_UNLOCK(&Ixpg_table);
-      FREE(&Ixpg_table);
-      MEM_UNLOCK(&Dbpgbuff);
-      FREE(&Dbpgbuff);
-   }
-#endif
 } /* dio_free() */
 
 
@@ -556,8 +439,7 @@ void dio_free()
 /* Clear pages for a single file.
 */
 int
-dio_clrfile(fno )
-register FILE_NO fno;
+dio_clrfile(FILE_NO fno)
 {
    return( clear_cache(fno, fno+1) );
 }
@@ -572,7 +454,7 @@ register FILE_NO fno;
 /* Clear all pages for *all* files from I/O buffer
 */
 int
-dio_clear()
+dio_clear(void)
 {
    return( clear_cache(0, size_ft) );
 }
@@ -587,41 +469,24 @@ dio_clear()
  * Clears all pages for a range of specified files.
  * Subroutine of dio_clrfile and dio_clear.
  */
-static int clear_cache(fr_file, to_file )
-FILE_NO fr_file;   /* clear from file "fr_file" */
-FILE_NO to_file;   /* ..to (not thru) file "to_file" */
+static int clear_cache(
+FILE_NO fr_file,   /* clear from file "fr_file" */
+FILE_NO to_file    /* ..to (not thru) file "to_file" */
+)
 {
    FILE_NO s_file;   /* start file to be cleared */
    FILE_NO e_file;   /* end file (+1) to be cleared */
-   register int i;
-   LOOKUP_ENTRY FAR *lu_ptr, FAR *lu2_ptr;
+   int i;
+   LOOKUP_ENTRY *lu_ptr, *lu2_ptr;
    int pg_slot;
-   PAGE_ENTRY FAR *pg_ptr;
-   PGZERO FAR *pgzero_ptr;
-   FILE_ENTRY FAR *file_ptr;
-#ifndef SINGLE_USER
-   int FAR *appl_ptr, FAR *excl_ptr;
-#endif
+   PAGE_ENTRY *pg_ptr;
+   PGZERO *pgzero_ptr;
+   FILE_ENTRY *file_ptr;
 
-#ifndef SINGLE_USER
-   /* 
-      We only clear pages which are not from static files and are
-      not still locked.  The check on app_locks is made to implement 
-      the ability to hold locks after the end of a transaction 
-   */
-   for (s_file = e_file = fr_file, file_ptr = &file_table[e_file],
-               appl_ptr = &app_locks[e_file], excl_ptr = &excl_locks[e_file];
-       s_file < to_file;
-       ++file_ptr, ++appl_ptr, ++excl_ptr) {
-#else
    for (s_file = e_file = fr_file, file_ptr = &file_table[e_file];
        s_file < to_file;
        ++file_ptr) {
-#endif
       if ((e_file < to_file) &&
-#ifndef SINGLE_USER
-         ((dbopen >= 2) || (!*appl_ptr && !*excl_ptr)) && 
-#endif
          !(file_ptr->ft_flags & STATIC)) 
         ++e_file;
       else {
@@ -630,9 +495,6 @@ FILE_NO to_file;   /* ..to (not thru) file "to_file" */
            dio_findpg(s_file, 0L, NULL, NULL, &lu_ptr);
            dio_findpg(e_file, 0L, NULL, NULL, &lu2_ptr);
 
-#ifdef MULTI_TASK
-           last_dblu.task = NULL;
-#endif
            last_dblu.file = -1;
            last_dblu.pageno = -1L;
            last_dblu.slot = -1;
@@ -642,9 +504,6 @@ FILE_NO to_file;   /* ..to (not thru) file "to_file" */
               while ((lu_ptr > db_lookup) && ((--lu_ptr)->file >= 0)) {
                  --lu2_ptr;
 
-#ifdef MULTI_TASK
-                 lu2_ptr->task = lu_ptr->task;
-#endif
                  lu2_ptr->file = lu_ptr->file;
                  lu2_ptr->pageno = lu_ptr->pageno;
                  /* exchange page slot numbers */
@@ -660,9 +519,6 @@ FILE_NO to_file;   /* ..to (not thru) file "to_file" */
 
               while (lu_ptr < lu2_ptr) {
 
-#ifdef MULTI_TASK
-                 lu_ptr->task = NULL;
-#endif
                  lu_ptr->file = -1;
                  lu_ptr->pageno = -1L;
                   pg_ptr = &dbpg_table[lu_ptr->pg_slot];
@@ -672,9 +528,6 @@ FILE_NO to_file;   /* ..to (not thru) file "to_file" */
                  }
                  pg_ptr->recently_used = FALSE;
                  pg_ptr->holdcnt = 0;
-#ifndef NO_TRANS
-                 pg_ptr->ovfl_addr = 0L;
-#endif
                  ++lu_ptr;
               }
            }
@@ -705,14 +558,11 @@ FILE_NO to_file;   /* ..to (not thru) file "to_file" */
  * Writes out all modified cache pages to respective files (dio_out),
  * then writes out page zero (dio_pzflush).
  */
-int dio_flush()
+int dio_flush(void)
 {
-   register int pgt_lc;                        /* loop control */
-#ifndef NO_TRANS
-   int fno;
-#endif
-   PAGE_ENTRY FAR *pg_ptr;
-   LOOKUP_ENTRY FAR *lu_ptr;
+   int pgt_lc;                 /* loop control */
+   PAGE_ENTRY *pg_ptr;
+   LOOKUP_ENTRY *lu_ptr;
 
 #ifdef DEBUG_DIO
     if (debugging_dio_close) {
@@ -725,33 +575,10 @@ int dio_flush()
 
    for (pgt_lc = db_pgtab_sz, pg_ptr = dbpg_table; --pgt_lc >= 0; ++pg_ptr) {
       if (!pg_ptr->modified) {
-#ifndef NO_TRANS
-        pg_ptr->ovfl_addr = 0L;                /*[612]*/
-#endif
         continue;
       }
       lu_ptr = &db_lookup[pg_ptr->lu_slot];
-#ifdef MULTI_TASK
-      if ( lu_ptr->task != Currtask.v.ptr ) {
-        continue;
-      }
-#endif
-#ifndef NO_TRANS
-      if ((dboptions & TRLOGGING) && trans_id && !trcommit && use_ovfl) {
-        /* flush to overflow/log file -- before tr commit */
-        if (o_write(pg_ptr, lu_ptr) != S_OKAY) return( db_status );
-        if ( lu_ptr->pageno > o_pages(lu_ptr->file) ) {
-           /* no need to rewrite this page at trcommit time */
-           pg_ptr->holdcnt = 0;
-           pg_ptr->modified = FALSE;
-           --no_modheld;
-        }
-        continue;
-      }
-      pg_ptr->ovfl_addr = 0L;
-#endif
       /* write directly to database */
-#ifdef NO_TRANS
 #ifdef DEBUG_DIO
        if (debugging_dio_close) {
            printf (__FILE__"723 dio_flush: write modified pg#%d @ %p\n",
@@ -760,21 +587,9 @@ int dio_flush()
        }
 #endif
       if (dio_out(pg_ptr, lu_ptr) != S_OKAY) return( db_status );
-#else
-      if (dio_out(pg_ptr, lu_ptr, 1) != S_OKAY) return( db_status );
-#endif
       pg_ptr->holdcnt = 0;
       pg_ptr->modified = FALSE;
       --no_modheld;
-#ifndef NO_TRANS
-      if ( trlog_flag ) {
-        fno = lu_ptr->file;
-        MEM_LOCK(&pg_ptr->Buff);
-        d_trlog(fno, (int)lu_ptr->pageno, pg_ptr->buff,
-                file_table[fno].ft_pgsize);
-        MEM_UNLOCK(&pg_ptr->Buff);
-      }
-#endif
    }
    /* store the page zero values in the data file and return */
    return( dio_pzflush() );
@@ -784,8 +599,7 @@ int dio_flush()
 
 /* Set the default file number
 */
-void dio_setdef( file_no )
-FILE_NO file_no;
+void dio_setdef(FILE_NO file_no)
 {
    working_file = file_no;
 }
@@ -800,20 +614,10 @@ FILE_NO file_no;
 /* Database I/O page get
 */
 int
-dio_get( page_no, page_ptr, hold )
-F_ADDR page_no;
-char FAR * FAR *page_ptr;
-int hold;
+dio_get(F_ADDR page_no, char **page_ptr, int hold)
 {
-   PAGE_ENTRY FAR *pg_ptr;
+   PAGE_ENTRY *pg_ptr;
 
-#ifndef SINGLE_USER
-   if ( dbopen == 1 ) {
-      if ( !app_locks[working_file] && !excl_locks[working_file] &&
-          !(file_table[working_file].ft_flags & STATIC) )
-        return( dberr(S_NOTLOCKED) );
-   }
-#endif
    if ( pgzero[working_file].pz_next == 0L )
       if ( dio_pzread(working_file) != S_OKAY )
         RETURN( db_status );
@@ -843,26 +647,10 @@ int hold;
 /* Set modified flag for a page
 */
 int
-dio_touch( page_no )
-F_ADDR page_no;
+dio_touch(F_ADDR page_no)
 {
-   PAGE_ENTRY FAR *pg_ptr;
+   PAGE_ENTRY *pg_ptr;
 
-#ifndef NO_TRANS
-   /* ensure overflow data is initialized when exclusive db access */
-   if ((trans_id && (dboptions & TRLOGGING) && use_ovfl) &&
-       (o_fileinit(working_file) != S_OKAY))
-      return( db_status );
-#endif
-#ifndef SINGLE_USER
-   if ( dbopen == 1 ) { 
-      /* check shared access privileges */
-      if ( !trans_id && !excl_locks[working_file] )  
-        return( dberr(S_NOTRANS) );
-      if ( app_locks[working_file] >= 0 && !excl_locks[working_file] )
-        return( dberr( S_NOTLOCKED ) );
-   }
-#endif
    if (dio_findpg(working_file, page_no, dbpg_table, &pg_ptr, NULL) == S_OKAY ) {
       pg_ptr->recently_used = TRUE;
       used_files[working_file] = TRUE;
@@ -894,16 +682,13 @@ F_ADDR page_no;
  * unless a page swap is necessary.
  */
 int
-dio_read( dba, recptr, hold )
-DB_ADDR dba;
-char FAR * FAR *recptr;
-int hold;
+dio_read(DB_ADDR dba, char * *recptr, int hold)
 {
    FILE_NO file;
    int offset;
    F_ADDR us1, us2;
-   FILE_ENTRY FAR *file_ptr;
-   PAGE_ENTRY FAR *pg_ptr;
+   FILE_ENTRY *file_ptr;
+   PAGE_ENTRY *pg_ptr;
 
    file = NUM2INT((FILE_NO)((dba >> FILESHIFT) & FILEMASK), ft_offset);
    file_ptr = &file_table[file];
@@ -912,15 +697,6 @@ int hold;
       if ( dio_pzread(file) != S_OKAY )
         RETURN( db_status );
 
-#ifndef SINGLE_USER
-   if ( dbopen == 1 ) {
-      /* check shared access privileges */
-      if (!app_locks[file] &&
-         !excl_locks[file] &&
-         !(file_ptr->ft_flags & STATIC))
-        return( dberr(S_NOTLOCKED) );
-   }
-#endif
    us1 = ADDRMASK & dba;
    us2 = (us1 - 1)/file_ptr->ft_slots;
    if (dio_findpg(file, us2 + 1, dbpg_table, &pg_ptr, NULL) == S_OKAY ) {
@@ -951,35 +727,16 @@ int hold;
  * If recptr not NULL, copies rec to page cache.
  */
 int
-dio_write( dba, recptr, release )
-DB_ADDR dba;
-CONST char FAR *recptr;
-int release;
+dio_write(DB_ADDR dba, const char *recptr, int release)
 {
    FILE_NO file;
    F_ADDR us1, us2;
    int offset;
-   FILE_ENTRY FAR *file_ptr;
-   PAGE_ENTRY FAR *pg_ptr;
+   FILE_ENTRY *file_ptr;
+   PAGE_ENTRY *pg_ptr;
 
    file = NUM2INT((FILE_NO)((dba >> FILESHIFT) & FILEMASK), ft_offset);
 
-#ifndef NO_TRANS
-   /* ensure overflow data is initialized when exclusive db access */
-   if ((trans_id && (dboptions & TRLOGGING) && use_ovfl) &&
-       (o_fileinit(file) != S_OKAY))
-      return( db_status );
-#endif
-#ifndef SINGLE_USER
-   if (dbopen == 1) {
-      if (!trans_id && !excl_locks[file])  
-        return( dberr(S_NOTRANS) );
-
-      /* check shared access privileges */
-      if ( app_locks[file] >= 0 && !excl_locks[file] )
-        return( dberr(S_NOTLOCKED) );
-   }
-#endif
    file_ptr = &file_table[file];
    us1 = ADDRMASK & dba;
    us2 = (us1 - 1)/file_ptr->ft_slots;
@@ -1011,12 +768,11 @@ int release;
 /* Release database page hold
 */
 int
-dio_release( dba )
-DB_ADDR dba;
+dio_release(DB_ADDR dba)
 {
    FILE_NO file;
    F_ADDR us1, us2;
-   PAGE_ENTRY FAR *pg_ptr;
+   PAGE_ENTRY *pg_ptr;
 
    file = NUM2INT((FILE_NO)((dba >> FILESHIFT) & FILEMASK), ft_offset);
    us1 = ADDRMASK & dba;
@@ -1035,109 +791,6 @@ DB_ADDR dba;
 
 
 
-#ifndef SINGLE_USER
-/* Read record lock bit
-*/
-dio_rrlb(dba, rid )
-DB_ADDR dba;
-INT *rid;
-{
-   FILE_NO file;   /* file number */
-   F_ADDR page;    /* page number */
-   F_ADDR sno;     /* slot number */
-   F_ADDR spp;     /* slots per page */
-   F_ADDR offset;  /* lseek address - offset from start of file */
-   FILE_ENTRY FAR *file_ptr;
-
-   file = NUM2INT((FILE_NO)((dba >> FILESHIFT) & FILEMASK), ft_offset);
-   if ( dio_open(file) == S_OKAY ) {
-      file_ptr = &file_table[file];
-      sno = ADDRMASK & dba;
-      spp = file_ptr->ft_slots;
-      page = (sno - 1)/spp + 1;
-      offset = PGHDRSIZE + page*file_ptr->ft_pgsize +
-                                (sno - 1 - (page - 1)*spp)*file_ptr->ft_slsize;
-      DB_LSEEK(file_ptr->ft_desc, (off_t)offset, 0);
-      if ( DB_READ(file_ptr->ft_desc, (char FAR *)rid, sizeof(INT))
-               != sizeof(INT) ) {
-        dberr(S_BADREAD);
-      }
-      NTOHS (*rid);
-   }
-   return( db_status );
-} /* dio_rrlb() */
-
-
-/* Write record lock bit
-*/
-dio_wrlb(dba, rid )
-DB_ADDR dba;
-INT rid;
-{
-   FILE_NO file;   /* file number */
-   F_ADDR page;    /* page number */
-   F_ADDR sno;     /* slot number */
-   F_ADDR spp;     /* slots per page */
-   F_ADDR offset;  /* offset from start of page or file */
-   int clr_in_tx;  /* true if called from d_rlbclr in trx */
-   INT trid;           /* [333] working rid */
-   FILE_ENTRY FAR *file_ptr;
-   PAGE_ENTRY FAR *pg_ptr;
-
-   file = NUM2INT((FILE_NO)((dba >> FILESHIFT) & FILEMASK), ft_offset);
-   file_ptr = &file_table[file];
-   sno = ADDRMASK & dba;
-   spp = file_ptr->ft_slots;
-   page = ((sno - 1)/spp) + 1;
-   offset = PGHDRSIZE + (sno - 1 - (page - 1)*spp)*file_ptr->ft_slsize;
-   clr_in_tx = !(rid & RLBMASK) && trans_id;
-
-   if ( dbopen > 1 || (app_locks[file] || excl_locks[file]) ) {
-      /* file is locked - check if record in cache */
-      if (dio_findpg(file, page, dbpg_table, &pg_ptr, NULL) == S_OKAY) {
-        MEM_LOCK(&pg_ptr->Buff);
-        /* record in cache - update only rlb in rid */
-        bytecpy(&trid, &pg_ptr->buff[offset], sizeof(INT));
-        MEM_UNLOCK(&pg_ptr->Buff);
-        rid = (trid & ~((INT)RLBMASK)) | (rid & RLBMASK);
-        bytecpy(&pg_ptr->buff[offset], &rid, sizeof(INT));
-        if ( clr_in_tx ) {
-           /* clearing within a transaction requires touching page */
-           if ( ! pg_ptr->modified ) {
-              pg_ptr->modified = TRUE;
-              if ( ! pg_ptr->holdcnt )
-                 ++no_modheld;
-           }
-        }
-      }
-      else
-        clr_in_tx = FALSE;
-   }
-   if ( ! clr_in_tx ) {
-      /* update only rlb directly to disk */
-      if ( dio_open(file) == S_OKAY ) {
-        offset += page*file_ptr->ft_pgsize;
-
-        /* read rid from disk, and set/clear rlb accordingly */
-        DB_LSEEK(file_ptr->ft_desc, (off_t)offset, 0);
-        if ( DB_READ(file_ptr->ft_desc, (char FAR *)&trid, sizeof(INT))
-               != sizeof(INT) ) {
-           dberr(S_BADREAD);
-        }
-         NTOHS (trid);
-        rid = (trid & ~((INT)RLBMASK)) | (rid & RLBMASK);
-
-        /* write original rid out with modified rlb */
-         trid = htons (rid); /* make a copy in trid for byte swap */
-        DB_LSEEK(file_ptr->ft_desc, (off_t)offset, 0); /* reseek */
-        if ( DB_WRITE(file_ptr->ft_desc, (char FAR *)&trid, sizeof(INT)) !=
-             sizeof(INT) )
-           dberr(S_BADWRITE);
-      }
-   }
-   return( db_status );
-} /* dio_wrlb() */
-#endif                 /* SINGLE_USER */
 
 
 /****************************************/
@@ -1148,42 +801,27 @@ INT rid;
 /* Search a cache for page
 */
 int
-dio_findpg(file, page, pg_table, xpg_ptr, xlu_ptr )
-FILE_NO      file;       /* file number = 0..size_ft-1 */
-F_ADDR       page;       /* database page number */
-PAGE_ENTRY FAR *pg_table;   /* = dbpg_table, ixpg_table, or NULL */
-PAGE_ENTRY FAR * FAR *xpg_ptr;  /* pointer to page table entry for found page */
-LOOKUP_ENTRY FAR * FAR *xlu_ptr;/* pointer to lookup table slot for found page*/
+dio_findpg(
+FILE_NO      file,       /* file number = 0..size_ft-1 */
+F_ADDR       page,       /* database page number */
+PAGE_ENTRY *pg_table,   /* = dbpg_table, ixpg_table, or NULL */
+PAGE_ENTRY * *xpg_ptr,  /* pointer to page table entry for found page */
+LOOKUP_ENTRY * *xlu_ptr /* pointer to lookup table slot for found page*/
+)
 {
-#ifdef MULTI_TASK
-   CHAR_P Tempbuff;
-#define tempbuff Tempbuff.ptr
-#endif
-   LOOKUP_ENTRY FAR *lookup;  /* = db_lookup or ix_lookup */
+   LOOKUP_ENTRY *lookup;  /* = db_lookup or ix_lookup */
    int pgtab_sz;          /* = db_pgtab_sz or ix_pgtab_sz */
    long cmp;
    int cnt;
-   register int lu_slot, l, u;
-   LOOKUP_ENTRY FAR *lu_ptr, FAR *replu_ptr;
-   PAGE_ENTRY FAR *pg_ptr;
+   int lu_slot, l, u;
+   LOOKUP_ENTRY *lu_ptr, *replu_ptr;
+   PAGE_ENTRY *pg_ptr;
    int *lru_ptr;
    int pg_slot;
-#ifndef NO_TRANS
-   BOOLEAN db_cache;      /* TRUE if currently using dbpg_table */
-   F_ADDR ovfl_addr;
-#endif
-#ifdef MULTI_TASK
-   INT pgsize;
-#endif
 
-#ifdef NO_TRANS
 
    /* check if desired page was last one */
-#ifdef MULTI_TASK
-   if ((Currtask.v.ptr == last_dblu.task) && (file == last_dblu.file) && (page == last_dblu.pageno)) {
-#else
    if ((file == last_dblu.file) && (page == last_dblu.pageno)) {
-#endif
       if (xlu_ptr != NULL)
          *xlu_ptr = &db_lookup[last_dblu.slot];
       if (xpg_ptr != NULL)
@@ -1192,37 +830,11 @@ LOOKUP_ENTRY FAR * FAR *xlu_ptr;/* pointer to lookup table slot for found page*/
    }
    lookup = db_lookup;
    pgtab_sz = db_pgtab_sz;
-#else                  /* NO_TRANS */
-   if (db_cache = (!pg_table || (pg_table == dbpg_table))) {
-      /* check if desired page was last one */
-#ifdef MULTI_TASK
-      if ((Currtask.v.ptr == last_dblu.task) && (file == last_dblu.file) &&
-            (page == last_dblu.pageno)) {
-#else
-      if ((file == last_dblu.file) && (page == last_dblu.pageno)) {
-#endif
-         if (xlu_ptr != NULL)
-            *xlu_ptr = &db_lookup[last_dblu.slot];
-         if (xpg_ptr != NULL)
-            *xpg_ptr = &dbpg_table[db_lookup[last_dblu.slot].pg_slot];
-        return( db_status = S_OKAY );
-      }
-      lookup = db_lookup;
-      pgtab_sz = db_pgtab_sz;
-   }
-   else {
-      lookup = ix_lookup;
-      pgtab_sz = ix_pgtab_sz;
-   }
-#endif                 /* NO_TRANS */
    /* perform binary search of sorted lookup table */
    l = 0;
    u = pgtab_sz - 1;
    while (u >= l) {
       lu_ptr = &lookup[lu_slot = (l + u)/2];
-#ifdef MULTI_TASK
-      if ((cmp = Currtask.v.ptr - lu_ptr->task) == 0)
-#endif
         if ((cmp = file - lu_ptr->file) == 0)
            cmp = page - lu_ptr->pageno;
       if (cmp < 0)
@@ -1230,19 +842,9 @@ LOOKUP_ENTRY FAR * FAR *xlu_ptr;/* pointer to lookup table slot for found page*/
       else if (cmp > 0)
          l = lu_slot + 1;
       else {
-#ifndef NO_TRANS
-         if (db_cache)
-         {
-#endif
-#ifdef MULTI_TASK
-            last_dblu.task = lu_ptr->task;
-#endif
             last_dblu.file = lu_ptr->file;
             last_dblu.pageno = lu_ptr->pageno;
             last_dblu.slot = lu_slot;
-#ifndef NO_TRANS
-         }
-#endif
          if (xlu_ptr != NULL)
             *xlu_ptr = lu_ptr;
          if (xpg_ptr != NULL)
@@ -1259,30 +861,8 @@ LOOKUP_ENTRY FAR * FAR *xlu_ptr;/* pointer to lookup table slot for found page*/
       return( db_status = S_NOTFOUND );
    }
    /* page not found - read into cache */
-#ifndef NO_TRANS
-   if( !use_ovfl && trans_id && (no_modheld == pgtab_sz) )
-      return( db_status =  S_TRCHANGES );
-
-   /* check to see if page is in overflow file */
-   ovfl_addr = 0L;
-   if ( cache_ovfl && file != ov_file ) {
-      if ( o_search( file, page, &ovfl_addr ) != S_OKAY )
-        return( db_status );
-   }
-   /* check for overflow */
-   if ( db_cache && trans_id && (no_modheld == pgtab_sz) && !cache_ovfl ) {
-      cache_ovfl = TRUE;
-   }
-   /* select a page to replace */
-   if (db_cache) {
-      lru_ptr = &dbpg_lru_slot;
-   } else {
-      lru_ptr = &ixpg_lru_slot;
-   }
-#else
    /* select a page to replace */
    lru_ptr = &dbpg_lru_slot;
-#endif                 /* NO_TRANS */
    for (cnt = 2*pgtab_sz, pg_slot = *lru_ptr, pg_ptr = &pg_table[pg_slot];
         --cnt >= 0;
         ++pg_slot, ++pg_ptr) {
@@ -1293,49 +873,11 @@ LOOKUP_ENTRY FAR * FAR *xlu_ptr;/* pointer to lookup table slot for found page*/
       }
       replu_ptr = &lookup[pg_ptr->lu_slot];
       if (!pg_ptr->recently_used && (pg_ptr->holdcnt == 0)) {
-#ifdef NO_TRANS
         if (pg_ptr->modified) {
            dio_out(pg_ptr, replu_ptr);
            pg_ptr->modified = FALSE;
            --no_modheld;
         }
-#else
-        if (pg_ptr->modified) {
-           /* allow updates outside transactions for single-user mode */
-#ifdef SINGLE_USER
-           if (!db_cache || (EXCL_OPEN() && !trans_id)) {
-#else
-#ifdef MULTI_TASK
-           MEM_LOCK(&replu_ptr->task->Excl_locks);
-#endif
-           if (!db_cache || ((EXCL_OPEN() ||
-#ifdef MULTI_TASK
-               ( replu_ptr->task == Currtask.v.ptr ) ?
-                  excl_locks[lookup[pg_ptr->lu_slot].file] :
-                  replu_ptr->task->Excl_locks.ptr[replu_ptr->file]) && 
-               !trans_id)) {
-#else
-               excl_locks[lookup[pg_ptr->lu_slot].file]) && !trans_id)) {
-#endif         /* MULTI_TASK */
-#endif         /* SINGLE_USER */
-              /* ix page swapping occurs here */
-              dio_out(pg_ptr, replu_ptr, db_cache);
-              pg_ptr->modified = FALSE;
-              if ( db_cache ) --no_modheld;
-           }
-           else { 
-              if (!use_ovfl || !cache_ovfl) continue; /* skip modified pages */
-              /* Write out modified page */
-              pg_ptr->modified = FALSE;
-              --no_modheld;  /* must be in db cache */
-              if (o_write(pg_ptr, replu_ptr) != S_OKAY) return( db_status );
-           }
-#ifdef MULTI_TASK
-           MEM_UNLOCK(&replu_ptr->task->Excl_locks);
-#endif
-        }
-        pg_ptr->ovfl_addr = ovfl_addr;
-#endif                 /* NO_TRANS */
         pg_ptr->recently_used = TRUE;
          if ((*lru_ptr = (pg_slot + 1)) >= pgtab_sz)
             *lru_ptr = 0;
@@ -1372,37 +914,7 @@ LOOKUP_ENTRY FAR * FAR *xlu_ptr;/* pointer to lookup table slot for found page*/
         --replu_ptr;
       }
    }
-#ifdef MULTI_TASK
-
-#ifdef NO_TRANS
-   pgsize = file_table[( lu_ptr->file > -1 ) ? lu_ptr->file : file].ft_pgsize;
-#else
-   pgsize = ( db_cache )
-           ? file_table[( lu_ptr->file > -1 ) ? lu_ptr->file : file].ft_pgsize
-           : file_table[ov_file].ft_pgsize;
-#endif
-
-   if ( ! pgsize ) {
-      pgsize = page_size;
-   }
-   if ( pgsize != file_table[file].ft_pgsize ) {
-      Tempbuff.ptr = NULL;
-      tempbuff = ALLOC(&Tempbuff, file_table[file].ft_pgsize, "dbpgbuff");
-      if ( ! tempbuff ) {
-        return( dberr(S_NOMEMORY) );
-      }
-      if ( pg_ptr->buff ) {
-        MEM_UNLOCK(&pg_ptr->Buff);
-        FREE(&pg_ptr->Buff);
-      }
-      MEM_UNLOCK(&Tempbuff);
-      pg_ptr->Buff = Tempbuff;
-   }
-#endif /* MULTI_TASK */
 
-#ifdef MULTI_TASK
-   lu_ptr->task = Currtask.v.ptr;
-#endif
    lu_ptr->file = file;
    lu_ptr->pageno = page;
    lu_ptr->pg_slot = pg_slot;
@@ -1411,25 +923,10 @@ LOOKUP_ENTRY FAR * FAR *xlu_ptr;/* pointer to lookup table slot for found page*/
       *xlu_ptr = lu_ptr;
    if (xpg_ptr != NULL)
       *xpg_ptr = pg_ptr;
-#ifdef NO_TRANS
-#ifdef MULTI_TASK
-   last_dblu.task = lu_ptr->task;
-#endif
    last_dblu.file = lu_ptr->file;
    last_dblu.pageno = lu_ptr->pageno;
    last_dblu.slot = lu_slot;
    dio_in(pg_ptr, lu_ptr);
-#else
-   if (db_cache) {
-#ifdef MULTI_TASK
-      last_dblu.task = lu_ptr->task;
-#endif
-      last_dblu.file = lu_ptr->file;
-      last_dblu.pageno = lu_ptr->pageno;
-      last_dblu.slot = lu_slot;
-   }
-   dio_in(pg_ptr, lu_ptr, db_cache);
-#endif
 
    return( db_status );
 #undef tempbuff
@@ -1454,16 +951,10 @@ LOOKUP_ENTRY FAR * FAR *xlu_ptr;/* pointer to lookup table slot for found page*/
  * page swap function.
  */
 int
-#ifndef NO_TRANS
-dio_out(pg_ptr, lu_ptr, db_cache)
-#else
-dio_out(pg_ptr, lu_ptr)
-#endif
-PAGE_ENTRY FAR *pg_ptr;    /* page table entry to be output */
-LOOKUP_ENTRY FAR *lu_ptr;  /* corresponding lookup table entry */
-#ifndef NO_TRANS
-   BOOLEAN db_cache;      /* TRUE if pg_ptr is in db page cache */
-#endif
+dio_out(
+PAGE_ENTRY *pg_ptr,    /* page table entry to be output */
+LOOKUP_ENTRY *lu_ptr   /* corresponding lookup table entry */
+)
 {
    int         desc;   /* file descriptor */
    int         fno;    /* file number */
@@ -1481,30 +972,10 @@ LOOKUP_ENTRY FAR *lu_ptr;  /* corresponding lookup table entry */
    netorder_timestamp = (ULONG) host_timestamp;
    HTONL (netorder_timestamp);
 
-#ifdef NO_TRANS
    fno = lu_ptr->file;
    pgsize = file_table[fno].ft_pgsize;
    addr = lu_ptr->pageno * (long)pgsize;
    memcpy (pg_ptr->buff, &netorder_timestamp, sizeof(ULONG));
-#else
-   if ( db_cache ) {
-      fno = lu_ptr->file;
-      pgsize = file_table[fno].ft_pgsize;
-   }
-   else
-      pgsize = file_table[ov_file].ft_pgsize;
-
-   if ( pg_ptr->ovfl_addr == 0L ) {
-      /* write to database */
-      addr = lu_ptr->pageno * (long)pgsize;
-      memcpy (pg_ptr->buff, &netorder_timestamp, sizeof(ULONG));
-   }
-   else {
-      /* write to overflow file */
-      fno = ov_file;
-      addr = pg_ptr->ovfl_addr;
-   }
-#endif
    if ( dio_open(fno) == S_OKAY ) {
       swab_page (pg_ptr->buff, &file_table[fno], HTON);
       desc = file_table[fno].ft_desc;
@@ -1522,48 +993,24 @@ LOOKUP_ENTRY FAR *lu_ptr;  /* corresponding lookup table entry */
 /*              dio_in                 */
 /*                                     */
 /****************************************/
-#ifdef NO_TRANS
 /* Read in a page to the buffer
 */
-static int dio_in(pg_ptr, lu_ptr)
-PAGE_ENTRY FAR *pg_ptr; /* page table entry to be input */
-LOOKUP_ENTRY FAR *lu_ptr; /* corresponding to pg_ptr */
-#else
-/* Read in a page to the buffer
-*/
-static int dio_in(pg_ptr, lu_ptr, db_cache )
-PAGE_ENTRY FAR *pg_ptr; /* page table entry to be input */
-LOOKUP_ENTRY FAR *lu_ptr; /* corresponding to pg_ptr */
-BOOLEAN db_cache;  /* TRUE if pg_ptr in db cache */
-#endif
+static int dio_in(
+PAGE_ENTRY *pg_ptr, /* page table entry to be input */
+LOOKUP_ENTRY *lu_ptr  /* corresponding to pg_ptr */
+)
 {
    int desc;   /* file descriptor */
    int fno;    /* file number */
    int pgsize; /* page size */
    long addr;  /* file address */
-   PGZERO FAR *pgzero_ptr;
-   FILE_ENTRY FAR *file_ptr;
+   PGZERO *pgzero_ptr;
+   FILE_ENTRY *file_ptr;
    int r;
 
    file_ptr = &file_table[fno = lu_ptr->file];
-#ifdef NO_TRANS
    pgsize = file_ptr->ft_pgsize;
    addr = lu_ptr->pageno*pgsize;
-#else
-   pgsize = db_cache ? file_ptr->ft_pgsize : file_table[ov_file].ft_pgsize;
-
-   if (pg_ptr->ovfl_addr == 0L) {
-      /* read from database file */
-      /* if !db_cache, overflow address not set on initial read */
-      addr = db_cache ? lu_ptr->pageno*pgsize :
-                       (pg_ptr->ovfl_addr = lu_ptr->pageno);
-   }
-   else {
-      /* read from overflow file */
-      file_ptr = &file_table[fno = ov_file];
-      addr = pg_ptr->ovfl_addr;
-   }
-#endif
    if ( dio_open(fno) == S_OKAY ) {
       desc = file_ptr->ft_desc;
       DB_LSEEK(desc, (off_t)addr, 0);
@@ -1593,46 +1040,13 @@ BOOLEAN db_cache;  /* TRUE if pg_ptr in db cache */
    Page zero handling functions for data and key files
 ***********************************************************************/
 
-#ifndef         NO_TIMESTAMP
-/* Increment and return file timestamp
-*/
-ULONG dio_pzsetts(fno )
-FILE_NO fno;
-{
-   ULONG ts;
-   PGZERO FAR *pgzero_ptr;
-
-   if ( db_tsrecs || db_tssets ) {
-      pgzero_ptr = &pgzero[fno];
-      pgzero_ptr->pz_modified = TRUE;
-      ts = ++pgzero_ptr->pz_timestamp;
-   }
-   else
-      ts = 0;
-
-   return( ts );
-}
-
-
-/* Return file timestamp
-*/
-ULONG dio_pzgetts(fno)
-FILE_NO fno;
-{
-   if ( pgzero[fno].pz_next == 0L )
-      dio_pzread(fno);
-   o_fileinit(fno);
-   return ( pgzero[fno].pz_timestamp );
-}
-
-#endif
 
 /* Initialize page zero table
 */
-static int dio_pzinit()
+static int dio_pzinit(void)
 {
-   register FILE_NO i;
-   PGZERO FAR *pgzero_ptr;
+   FILE_NO i;
+   PGZERO *pgzero_ptr;
 
 #ifdef DEBUG_DIO
    if (debugging_dio_init) {
@@ -1676,26 +1090,16 @@ static int dio_pzinit()
 /* Flush page zero table
  * Complement to dio_out which writes all pages except page zero.
  */
-static int dio_pzflush()
+static int dio_pzflush(void)
 {
-   register FILE_NO i;
+   FILE_NO i;
    int desc;
-   register PGZERO FAR *pgzero_ptr;
-   register FILE_ENTRY FAR *file_ptr;
+   PGZERO *pgzero_ptr;
+   FILE_ENTRY *file_ptr;
    LONG                align_LONG;
    char                *cptr;
    int         j;
 
-#ifndef NO_TRANS
-   if ( (dboptions & TRLOGGING) && trans_id && !trcommit && use_ovfl ) {
-      /* flush to overflow/log file -- before tx commit */
-      for (i = 0, pgzero_ptr = pgzero; i < size_ft; ++i, ++pgzero_ptr) {
-        if (pgzero_ptr->pz_modified ) 
-           if ( o_pzwrite( i ) != S_OKAY ) return( db_status );
-      }
-   }
-   else {
-#endif
       /* flush modified page zeroes to database files */
       for (i = 0, pgzero_ptr = pgzero, file_ptr = file_table; i < size_ft; 
           ++i, ++pgzero_ptr, ++file_ptr) {
@@ -1715,21 +1119,14 @@ static int dio_pzflush()
            }
            desc = file_ptr->ft_desc;
            DB_LSEEK(desc, (off_t)0L, 0);
-           if (DB_WRITE(desc, (char FAR *)pgzero_ptr, PGZEROSZ) != PGZEROSZ) 
+           if (DB_WRITE(desc, (char *)pgzero_ptr, PGZEROSZ) != PGZEROSZ) 
               return( dberr(S_BADWRITE) );
            pgzero_ptr->pz_modified = FALSE;
-#ifndef NO_TRANS
-           if ( trlog_flag )
-              d_trlog(i, 0, (char FAR *)pgzero_ptr,  PGZEROSZ);
-#endif
         }
 #ifdef  CLOSE_FILES
         dio_close(i);
 #endif
       }
-#ifndef NO_TRANS
-   }
-#endif
    return( db_status = S_OKAY );
 } /* dio_pzflush() */
 
@@ -1742,11 +1139,12 @@ static int dio_pzflush()
 /* Read a file's page zero
 */
 int
-dio_pzread(fno)
-FILE_NO fno;  /* file number */
+dio_pzread(
+FILE_NO fno  /* file number */
+)
 {
-   FILE_ENTRY FAR *file_ptr;
-   PGZERO FAR *pgzero_ptr;
+   FILE_ENTRY *file_ptr;
+   PGZERO *pgzero_ptr;
 
    pgzero_ptr = &pgzero[fno];
    file_ptr = &file_table[fno];
@@ -1763,7 +1161,7 @@ FILE_NO fno;  /* file number */
 
    /* seek to and read page zero */
    DB_LSEEK(file_ptr->ft_desc, (off_t)0L, 0);
-   if ( DB_READ(file_ptr->ft_desc, (char FAR *)pgzero_ptr, PGZEROSZ) 
+   if ( DB_READ(file_ptr->ft_desc, (char *)pgzero_ptr, PGZEROSZ) 
                                                        != PGZEROSZ ) {
       return( dberr(S_BADREAD) );
    }
@@ -1785,20 +1183,16 @@ FILE_NO fno;  /* file number */
  * Returns memory address of the free slot into 'loc'.
  */
 int
-dio_pzalloc(fno, loc )
-FILE_NO fno;    /* file number */
-F_ADDR *loc;    /* pointer to allocated location */
+dio_pzalloc(
+FILE_NO fno,    /* file number */
+F_ADDR *loc     /* pointer to allocated location */
+)
 {
    DB_ADDR dba;
    F_ADDR pg;
-   char FAR *ptr;
-   PGZERO FAR *pgzero_ptr;
+   char *ptr;
+   PGZERO *pgzero_ptr;
 
-#ifndef SINGLE_USER
-   /* check shared access privileges */
-   if ( dbopen == 1 && !trans_id && !excl_locks[fno] )
-      return( dberr(S_NOTRANS) );
-#endif
 
    pgzero_ptr = &pgzero[fno];
    if ( pgzero_ptr->pz_next == 0L )
@@ -1814,7 +1208,7 @@ F_ADDR *loc;    /* pointer to allocated location */
       }
       else {
         pg = pgzero_ptr->pz_dchain;
-        if ( dio_get( pg, (char FAR * FAR *)&ptr, NOPGHOLD ) != S_OKAY )
+        if ( dio_get( pg, (char * *)&ptr, NOPGHOLD ) != S_OKAY )
            return( db_status );
        /* Get the first key node on the delete chain.
         * (sizeof external timestamp set to 4 bytes)
@@ -1834,7 +1228,7 @@ F_ADDR *loc;    /* pointer to allocated location */
       else {
         pg = pgzero_ptr->pz_dchain;
         dba = ((NUM2EXT(fno, ft_offset) & FILEMASK) << FILESHIFT) | pg;
-        if ( dio_read(dba, (char FAR * FAR *)&ptr, NOPGHOLD) != S_OKAY )
+        if ( dio_read(dba, (char * *)&ptr, NOPGHOLD) != S_OKAY )
            return( db_status );
         bytecpy(&pgzero_ptr->pz_dchain, ptr+sizeof(INT), sizeof(F_ADDR));
       }
@@ -1853,20 +1247,16 @@ F_ADDR *loc;    /* pointer to allocated location */
 /* Delete record slot or key node from page zero
 */
 int
-dio_pzdel(fno, loc )
-FILE_NO fno;  /* file number */
-F_ADDR  loc;  /* location to be freed */
+dio_pzdel(
+FILE_NO fno,  /* file number */
+F_ADDR  loc   /* location to be freed */
+)
 {
    DB_ADDR dba;
    INT recnum;
-   char FAR *ptr;
-   PGZERO FAR *pgzero_ptr;
+   char *ptr;
+   PGZERO *pgzero_ptr;
 
-#ifndef SINGLE_USER
-   /* check shared access privileges */
-   if ( dbopen == 1 && !trans_id && !excl_locks[fno] )
-      return( dberr(S_NOTRANS) );
-#endif
 
    pgzero_ptr = &pgzero[fno];
    if ( pgzero_ptr->pz_next == 0L )
@@ -1875,7 +1265,7 @@ F_ADDR  loc;  /* location to be freed */
    if ( file_table[fno].ft_type == KEY ) {
       if ( working_file != fno )
         return( dberr(S_NOWORK) );
-      if ( dio_get( loc, (char FAR * FAR *)&ptr, PGHOLD ) != S_OKAY )
+      if ( dio_get( loc, (char * *)&ptr, PGHOLD ) != S_OKAY )
         return( db_status );
       /*********************************************
        * Delete chain ptr in key node page is in location
@@ -1892,7 +1282,7 @@ F_ADDR  loc;  /* location to be freed */
    }
    else {
       dba = ((NUM2EXT(fno, ft_offset) & FILEMASK) << FILESHIFT) | loc;
-      if ( dio_read( dba, (char FAR * FAR *)&ptr , NOPGHOLD) != S_OKAY )
+      if ( dio_read( dba, (char * *)&ptr , NOPGHOLD) != S_OKAY )
         return( db_status );
       bytecpy(&recnum, ptr, sizeof(INT));
       recnum = ~recnum;  /* indicates deleted record */
@@ -1914,8 +1304,7 @@ F_ADDR  loc;  /* location to be freed */
 /****************************************/
 /* Return pz_next for file fno
 */
-F_ADDR dio_pznext(fno)
-FILE_NO fno;
+F_ADDR dio_pznext(FILE_NO fno)
 {
    if ( pgzero[fno].pz_next == 0L )
       dio_pzread(fno);
@@ -1929,10 +1318,10 @@ FILE_NO fno;
 /****************************************/
 /* Clear page zero cache
 */
-void dio_pzclr()
+void dio_pzclr(void)
 {
-   register FILE_NO i;
-   register PGZERO FAR *pgzero_ptr;
+   FILE_NO i;
+   PGZERO *pgzero_ptr;
 
    for (i = 0, pgzero_ptr = pgzero; i < size_ft; i++, pgzero_ptr++) {
       if (pgzero_ptr->pz_modified) {
index 83321e9bde18253af165f329fee9801351f43eeb..d148b2644ef5b48a476757940df4424efc13869b 100644 (file)
@@ -52,9 +52,6 @@ typedef struct {
    LONG    total;     /* total number of members in set */
    DB_ADDR first;     /* database address of first member in set */
    DB_ADDR last;      /* database address of last member in set */
-#ifndef         NO_TIMESTAMP
-   ULONG   timestamp; /* set update timestamp - if used */
-#endif
 } SET_PTR;
 
 /* member pointer structure definition */
@@ -68,30 +65,27 @@ typedef struct {
 /* Disconnect the current member of set
 */
 int
-d_discon(nset TASK_PARM DBN_PARM)
-int nset; /* set number */
-TASK_DECL
-DBN_DECL  /* database number */
+d_discon(
+int nset, /* set number */
+int dbn   /* database number */
+)
 {
    SET_PTR cosp;          /* current owner's set pointer */
    MEM_PTR cmmp;          /* member's member pointer */
    MEM_PTR npmp;          /* next or previous member's member pointer */
-   char FAR *orec;            /* ptr to current owner record contents in cache */
-   char FAR *mrec = NULL;     /* ptr to member record contents in cache */
-   char FAR *nprec = NULL;    /* ptr to next or prev record contents in cache */
+   char *orec;            /* ptr to current owner record contents in cache */
+   char *mrec = NULL;     /* ptr to member record contents in cache */
+   char *nprec = NULL;    /* ptr to next or prev record contents in cache */
    DB_ADDR mdba;          /* db address of member record */
    DB_ADDR npdba;         /* db address of next or previous member */
    int set;               /* set_table entry */
    int stat;              /* status code variable */
-#ifndef         NO_TIMESTAMP
-   FILE_NO file;          /* file containing owner record */
-#endif
-   SET_ENTRY FAR *set_ptr;
-   DB_ADDR FAR *co_ptr, FAR *cm_ptr;
+   SET_ENTRY *set_ptr;
+   DB_ADDR *co_ptr, *cm_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* make sure we have a current owner */
@@ -104,22 +98,22 @@ DBN_DECL  /* database number */
 
    /* read member record */
    mdba = *cm_ptr;
-   if ( dio_read(mdba, (char FAR * FAR *)&mrec, PGHOLD) != S_OKAY )
+   if ( dio_read(mdba, (char * *)&mrec, PGHOLD) != S_OKAY )
       RETURN( db_status );
 
    /* ensure record is connected */
-   if ( (stat = r_gmem(set, mrec, (char FAR *)&cmmp)) != S_OKAY )
+   if ( (stat = r_gmem(set, mrec, (char *)&cmmp)) != S_OKAY )
       goto quit_b;
    if ( cmmp.owner == NULL_DBA ) { /* checks owner pointer */
       stat = S_NOTCON;
       goto quit_b;
    }
    /* read owner record */
-   if ( (stat = dio_read(*co_ptr, (char FAR * FAR *)&orec, PGHOLD)) != S_OKAY )
+   if ( (stat = dio_read(*co_ptr, (char * *)&orec, PGHOLD)) != S_OKAY )
       goto quit_b;
 
    /* get set pointer from owner */
-   if ( r_gset(set, orec, (char FAR *)&cosp) != S_OKAY )
+   if ( r_gset(set, orec, (char *)&cosp) != S_OKAY )
       goto quit_a;
 
    if ( cmmp.next == NULL_DBA )
@@ -128,11 +122,11 @@ DBN_DECL  /* database number */
    else {
       /* set next record's prev to current member's prev */
       npdba = cmmp.next;
-      if ((dio_read(npdba, (char FAR * FAR *)&nprec, NOPGHOLD) != S_OKAY) ||
-         (r_gmem(set, nprec, (char FAR *)&npmp) != S_OKAY))
+      if ((dio_read(npdba, (char * *)&nprec, NOPGHOLD) != S_OKAY) ||
+         (r_gmem(set, nprec, (char *)&npmp) != S_OKAY))
         goto quit_a;
       npmp.prev = cmmp.prev;
-      if ((r_pmem(set, nprec, (char FAR *)&npmp) != S_OKAY) ||
+      if ((r_pmem(set, nprec, (char *)&npmp) != S_OKAY) ||
          (dio_write(npdba, NULL, NOPGFREE) != S_OKAY))
         goto quit_a;
    }
@@ -142,26 +136,19 @@ DBN_DECL  /* database number */
    else {
       /* set previous record's next to current member's next */
       npdba = cmmp.prev;
-      if ((dio_read(npdba, (char FAR * FAR *)&nprec, NOPGHOLD) != S_OKAY) ||
-         (r_gmem(set, nprec, (char FAR *)&npmp) != S_OKAY))
+      if ((dio_read(npdba, (char * *)&nprec, NOPGHOLD) != S_OKAY) ||
+         (r_gmem(set, nprec, (char *)&npmp) != S_OKAY))
         goto quit_a;
       npmp.next = cmmp.next;
-      if ((r_pmem(set, nprec, (char FAR *)&npmp) != S_OKAY) ||
+      if ((r_pmem(set, nprec, (char *)&npmp) != S_OKAY) ||
          (dio_write(npdba, NULL, NOPGFREE) != S_OKAY))
         goto quit_a;
    }
-#ifndef         NO_TIMESTAMP
-   /* check for timestamp */
-   if ( set_ptr->st_flags & TIMESTAMPED ) {
-      file = NUM2INT((FILE_NO)((*co_ptr >> FILESHIFT) & FILEMASK), ft_offset);
-      cosp.timestamp = dio_pzgetts(file);
-   }
-#endif
    /* update membership count */
    --cosp.total;
 
    /* update owner record's set pointer */
-   if ((r_pset(set, orec, (char FAR *)&cosp) != S_OKAY) ||
+   if ((r_pset(set, orec, (char *)&cosp) != S_OKAY) ||
        (dio_write(*co_ptr, NULL, PGFREE) != S_OKAY))
       RETURN( db_status );
 
@@ -173,20 +160,9 @@ DBN_DECL  /* database number */
    cmmp.owner = cmmp.prev = cmmp.next = NULL_DBA;
    
    /* update member record */
-   if ((r_pmem(set, mrec, (char FAR *)&cmmp) != S_OKAY) ||
+   if ((r_pmem(set, mrec, (char *)&cmmp) != S_OKAY) ||
        (dio_write(mdba, NULL, PGFREE) != S_OKAY))
       RETURN( db_status );
-#ifndef         NO_TIMESTAMP
-   /* note timestamps */
-   if ( db_tsrecs )
-      d_utscr( &cr_time TASK_PARM );
-   if ( db_tsrecs && *cm_ptr )
-      d_utscm(nset, &cm_time[set] TASK_PARM DBN_PARM);
-
-   /* check for timestamp */
-   if ( set_ptr->st_flags & TIMESTAMPED )
-      cs_time[set] = cosp.timestamp;
-#endif
    RETURN( db_status = *cm_ptr ? S_OKAY : S_EOS );
 
 quit_a:
index 82c7c33a2014d2dd93b35fb771494ed208a62e2b..7eed532ffaa7552e409f610a9d58f265d249e23b 100644 (file)
 /* Disconnect from all sets (owner and member) and delete record
 */
 int
-d_disdel(TASK_DBN_ONLY)
-TASK_DECL
-DBN_DECL
+d_disdel(int dbn)
 {
    int rectype, nset, cset;
-   register int set, mem;
+   int set, mem;
    DB_ADDR dba, odba, mdba;
-   DB_ADDR FAR *co_ptr, FAR *cm_ptr;
-   register SET_ENTRY FAR *set_ptr;
-   register MEMBER_ENTRY FAR *mem_ptr;
+   DB_ADDR *co_ptr, *cm_ptr;
+   SET_ENTRY *set_ptr;
+   MEMBER_ENTRY *mem_ptr;
    int memtot;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if ( d_crtype(&rectype TASK_PARM DBN_PARM) != S_OKAY )
+   if ( d_crtype(&rectype , dbn) != S_OKAY )
       RETURN( db_status );
    rectype += NUM2INT(-RECMARK, rt_offset);
 
-   d_crget(&dba TASK_PARM DBN_PARM);
+   d_crget(&dba , dbn);
    for (set = 0, set_ptr = &set_table[ORIGIN(st_offset)];
        set < TABLE_SIZE(Size_st);
        ++set, ++set_ptr) {
@@ -81,11 +79,11 @@ DBN_DECL
       mdba = *cm_ptr;
       if (set_ptr->st_own_rt == rectype) {
         /* disconnect all member records from set s */
-        d_setor(nset TASK_PARM DBN_PARM);
-        while (d_findfm(nset TASK_PARM DBN_PARM) == S_OKAY)
-           if (d_discon(nset TASK_PARM DBN_PARM) < S_OKAY)
+        d_setor(nset , dbn);
+        while (d_findfm(nset , dbn) == S_OKAY)
+           if (d_discon(nset , dbn) < S_OKAY)
                  RETURN (db_status);
-        d_setro(nset TASK_PARM DBN_PARM);
+        d_setro(nset , dbn);
       }
       for (mem = set_ptr->st_members, memtot = mem + set_ptr->st_memtot,
                                                mem_ptr = &member_table[mem];
@@ -93,9 +91,9 @@ DBN_DECL
           ++mem, ++mem_ptr) {
         if (mem_ptr->mt_record == rectype) {
            /* disconnect current record from set */
-           if (d_ismember(nset TASK_PARM DBN_PARM) == S_OKAY) {
-              d_csmset(nset, &dba TASK_PARM DBN_PARM);
-              if (d_discon(nset TASK_PARM DBN_PARM) < S_OKAY)
+           if (d_ismember(nset , dbn) == S_OKAY) {
+              d_csmset(nset, &dba , dbn);
+              if (d_discon(nset , dbn) < S_OKAY)
                  RETURN (db_status);
            }
         }
@@ -113,6 +111,6 @@ DBN_DECL
       else
         *cm_ptr = mdba;
    }
-   RETURN( d_delete(TASK_DBN_ONLY) );
+   RETURN( d_delete(dbn) );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin disdel.c */
index dba2dc5cbc0310b11f1a235eae5196edf74c4e32..ec2040440936f89b017ff2d93a7e31140110841f 100644 (file)
 */
 
 
-int d_setfiles(P1(int));                               /* dio.c */
-int d_setpages(P1(int) Pi(int));                       /* dio.c */
-int d_trbound(P0);                             /* trlog.c */
-int d_trlog(P1(int) Pi(int) Pi(CONST char FAR *) Pi(int)); 
+int d_setfiles(int);                           /* dio.c */
+int d_setpages(int, int);                      /* dio.c */
+int d_trbound(void);                           /* trlog.c */
+int d_trlog(int, int, const char *, int); 
                                                                /* trlog.c */
-int d_trmark(P0);                              /* trlog.c */
-int d_tron(P0);                                        /* trlog.c */
-int d_troff(P0);                                       /* trlog.c */
-int d_decode_dba(P1(DB_ADDR) Pi(int FAR *) Pi(long FAR *)); 
+int d_trmark(void);                            /* trlog.c */
+int d_tron(void);                                      /* trlog.c */
+int d_troff(void);                                     /* trlog.c */
+int d_decode_dba(DB_ADDR, int *, long *); 
                                                                /* dbacode.c */
-int d_encode_dba(P1(int) Pi(long) Pi(DB_ADDR FAR *)); 
+int d_encode_dba(int, long, DB_ADDR *); 
                                                                /* dbacode.c */
 
 #define d_memlock(p)           /**/
 #define d_memlock_group(lg)    S_OKAY
 #define d_memunlock(p)         /**/
 #define d_memunlock_group(lg)  /**/
-char FAR * d_alloc(P1(unsigned));              /* alloc.c */
-char FAR * d_calloc(P1(unsigned) Pi(unsigned));        /* alloc.c */
-void d_free(P1(CHAR_P FAR *));                 /* alloc.c */
+char * d_alloc(unsigned);              /* alloc.c */
+char * d_calloc(unsigned, unsigned);   /* alloc.c */
+void d_free(CHAR_P *);                 /* alloc.c */
 
-#ifndef MULTI_TASK                     /* MULTI_TASK */
 #define dt_opentask(a) S_OKAY
 #define dt_closetask(a) S_OKAY
 
-int d_close(P0);                                       /* dblfcns.c */
-int d_cmstat(P1(int) DBN_Dn);                  /* cmstat.c */
-int d_cmtype(P1(int) Pi(int FAR *) DBN_Dn);    /* cmtype.c */
-int d_connect(P1(int) DBN_Dn);                 /* connect.c */
-#ifndef NO_TIMESTAMP                      /* NO_TIMESTAMP */
-int d_costat(P1(int) DBN_Dn);                  /* costat.c */
-#endif                                    /* NO_TIMESTAMP */
-int d_cotype(P1(int) Pi(int FAR *) DBN_Dn);    /* cotype.c */
-int d_crget(P1(DB_ADDR FAR *) DBN_Dn);         /* crget.c */
-int d_crread(P1(long) Pi(char FAR *) DBN_Dn);  /* crread.c */
-int d_crset(P1(DB_ADDR FAR *) DBN_Dn);         /* crset.c */
-#ifndef NO_TIMESTAMP                      /* NO_TIMESTAMP */
-int d_crstat(P0);                              /* crstat.c */
-#endif                                    /* NO_TIMESTAMP */
-int d_crtype(P1(int FAR *) DBN_Dn);            /* crtype.c */
-int d_crwrite(P1(long) Pi(char FAR *) DBN_Dn);         /* crwrite.c */
-int d_csmget(P1(int) Pi(DB_ADDR FAR *) DBN_Dn);        /* csmget.c */
-int d_csmread(P1(int) Pi(long) Pi(char FAR *) DBN_Dn); 
+int d_close(void);                                     /* dblfcns.c */
+int d_cmstat(int, int);                        /* cmstat.c */
+int d_cmtype(int, int *, int);         /* cmtype.c */
+int d_connect(int, int);                       /* connect.c */
+int d_cotype(int, int *, int);         /* cotype.c */
+int d_crget(DB_ADDR *, int);           /* crget.c */
+int d_crread(long, char *, int);       /* crread.c */
+int d_crset(DB_ADDR *, int);           /* crset.c */
+int d_crtype(int *, int);              /* crtype.c */
+int d_crwrite(long, char *, int);      /* crwrite.c */
+int d_csmget(int, DB_ADDR *, int);     /* csmget.c */
+int d_csmread(int, long, char *, int); 
                                                                /* csmread.c */
-int d_csmset(P1(int) Pi(DB_ADDR FAR *) DBN_Dn);        /* csmset.c */
-int d_csmwrite(P1(int) Pi(long) Pi(CONST char FAR *) DBN_Dn); 
+int d_csmset(int, DB_ADDR *, int);     /* csmset.c */
+int d_csmwrite(int, long, const char *, int); 
                                                                /* csmwrite.c */
-int d_csoget(P1(int) Pi(DB_ADDR FAR *) DBN_Dn);        /* csoget.c */
-int d_csoread(P1(int) Pi(long) Pi(char FAR *) DBN_Dn); 
+int d_csoget(int, DB_ADDR *, int);     /* csoget.c */
+int d_csoread(int, long, char *, int); 
                                                                /* csoread.c */
-int d_csoset(P1(int) Pi(DB_ADDR FAR *) DBN_Dn);        /* csoset.c */
-int d_csowrite(P1(int) Pi(long) Pi(CONST char FAR *) DBN_Dn); 
+int d_csoset(int, DB_ADDR *, int);     /* csoset.c */
+int d_csowrite(int, long, const char *, int); 
                                                                /* csowrite.c */
-#ifndef NO_TIMESTAMP                      /* NO_TIMESTAMP */
-int d_csstat(P1(int) DBN_Dn);                  /* csstat.c */
-int d_ctscm(P1(int) Pi(ULONG FAR *) DBN_Dn);   /* ctscm.c */
-int d_ctsco(P1(int) Pi(ULONG FAR *) DBN_Dn);   /* ctsco.c */
-int d_ctscr(P1(ULONG FAR *));                  /* ctscr.c */
-#endif                                    /* NO_TIMESTAMP */
-#ifndef NO_COUNTRY
-int d_ctbpath(P1(CONST char FAR *));           /* pathfcns.c */
-#endif                                    /* NO_COUNTRY */
-int d_dbdpath(P1(CONST char FAR *));           /* dbdpath.c */
-int d_dbfpath(P1(CONST char FAR *));           /* dbfpath.c */
-int d_dblog(P1(CONST char FAR *));             /* dblog.c */
-int d_dbtaf(P1(CONST char FAR *));             /* dbtaf.c */
-int d_dbuserid(P1(CONST char FAR *));          /* dbuserid.c */
-int d_delete(DBN_D1);                          /* delete.c */
-int d_disdel(DBN_D1);                          /* disdel.c */
-int d_recnext(DBN_D1);                         /* recnext.c */
-int d_recprev(DBN_D1);                         /* recprev.c */
-int d_destroy(P1(CONST char FAR *));           /* destroy.c */
-int d_discon(P1(int) DBN_Dn);                  /* discon.c */
-int d_fillnew(P1(int) Pi(CONST char FAR *) DBN_Dn); /* fillnew.c */
-int d_findco(P1(int) DBN_Dn);                  /* findco.c */
-int d_findfm(P1(int) DBN_Dn);                  /* findfm.c */
-int d_findlm(P1(int) DBN_Dn);                  /* findlm.c */
-int d_findnm(P1(int) DBN_Dn);                  /* findnm.c */
-int d_findpm(P1(int) DBN_Dn);                  /* findpm.c */
-int d_freeall(P0);                             /* dblfcns.c */
-#ifndef NO_TIMESTAMP                      /* NO_TIMESTAMP */
-int d_gtscm(P1(int) Pi(ULONG FAR *) DBN_Dn);   /* gtscm.c */
-int d_gtsco(P1(int) Pi(ULONG FAR *) DBN_Dn);   /* gtsco.c */
-int d_gtscr(P1(ULONG FAR *));                  /* gtscr.c */
-int d_gtscs(P1(int) Pi(ULONG FAR *) DBN_Dn);   /* gtscs.c */
-#endif                                    /* NO_TIMESTAMP */
-int d_initialize(DBN_D1);                              /* initial.c */
-int d_initfile(P1(FILE_NO) DBN_Dn);            /* initial.c */
-int d_ismember(P1(int) DBN_Dn);                        /* ismember.c */
-int d_isowner(P1(int) DBN_Dn);                 /* isowner.c */
-int d_keydel(P1(long) DBN_Dn);                 /* keydel.c */
-int d_keyexist(P1(long) DBN_Dn);                       /* keyexist.c */
-int d_keyfind(P1(long) Pi(CONST char FAR *) DBN_Dn); 
+int d_ctbpath(const char *);           /* pathfcns.c */
+int d_dbdpath(const char *);           /* dbdpath.c */
+int d_dbfpath(const char *);           /* dbfpath.c */
+int d_dblog(const char *);             /* dblog.c */
+int d_dbtaf(const char *);             /* dbtaf.c */
+int d_dbuserid(const char *);          /* dbuserid.c */
+int d_delete(int);                             /* delete.c */
+int d_disdel(int);                             /* disdel.c */
+int d_recnext(int);                            /* recnext.c */
+int d_recprev(int);                            /* recprev.c */
+int d_destroy(const char *);           /* destroy.c */
+int d_discon(int, int);                        /* discon.c */
+int d_fillnew(int, const char *, int); /* fillnew.c */
+int d_findco(int, int);                        /* findco.c */
+int d_findfm(int, int);                        /* findfm.c */
+int d_findlm(int, int);                        /* findlm.c */
+int d_findnm(int, int);                        /* findnm.c */
+int d_findpm(int, int);                        /* findpm.c */
+int d_freeall(void);                           /* dblfcns.c */
+int d_initialize(int);                         /* initial.c */
+int d_initfile(FILE_NO, int);                  /* initial.c */
+int d_ismember(int, int);                      /* ismember.c */
+int d_isowner(int, int);                       /* isowner.c */
+int d_keydel(long, int);                       /* keydel.c */
+int d_keyexist(long, int);                     /* keyexist.c */
+int d_keyfind(long, const char *, int); 
                                                                /* keyfind.c */
-int d_keyfree(P1(long) DBN_Dn);                        /* dblfcns.c */
-int d_keyfrst(P1(long) DBN_Dn);                        /* keyfrst.c */
-int d_keylast(P1(long) DBN_Dn);                        /* keylast.c */
-int d_keylock(P1(long) Pi(char FAR *) DBN_Dn);         /* dblfcns.c */
-int d_keylstat(P1(long) Pi(char FAR *) DBN_Dn);        /* dblfcns.c */
-int d_keynext(P1(long) DBN_Dn);                        /* keynext.c */
-int d_keyprev(P1(long) DBN_Dn);                        /* keyprev.c */
-int d_keyread(P1(char FAR *));                 /* keyfcns.c */
-int d_keystore(P1(long) DBN_Dn);                       /* keystore.c */
-int d_lock(P1(int) Pi(LOCK_REQUEST FAR *) DBN_Dn); /* dblfcns.c */
-int d_makenew(P1(int) DBN_Dn);                 /* makenew.c */
-int d_mapchar(P1(unsigned char) Pi(unsigned char) 
-                     Pi(CONST char FAR *) Pi(unsigned char));  /* mapchar.c */
-int d_members(P1(int) Pi(LONG FAR *) DBN_Dn);  /* members.c */
-int d_off_opt(P1(int));                                /* options.c */
-int d_on_opt(P1(int));                         /* options.c */
-int d_open(P1(CONST char FAR *) Pi(CONST char FAR *)); 
+int d_keyfree(long, int);                      /* dblfcns.c */
+int d_keyfrst(long, int);                      /* keyfrst.c */
+int d_keylast(long, int);                      /* keylast.c */
+int d_keylock(long, char *, int);      /* dblfcns.c */
+int d_keylstat(long, char *, int);     /* dblfcns.c */
+int d_keynext(long, int);                      /* keynext.c */
+int d_keyprev(long, int);                      /* keyprev.c */
+int d_keyread(char *);                 /* keyfcns.c */
+int d_keystore(long, int);                     /* keystore.c */
+int d_lock(int, LOCK_REQUEST *, int); /* dblfcns.c */
+int d_makenew(int, int);                       /* makenew.c */
+int d_mapchar(unsigned char, unsigned char, const char *, unsigned char);  /* mapchar.c */
+int d_members(int, LONG *, int);       /* members.c */
+int d_off_opt(int);                            /* options.c */
+int d_on_opt(int);                             /* options.c */
+int d_open(const char *, const char *); 
                                                                /* dblfcns.c */
-int d_rerdcurr(P1(DB_ADDR FAR **));            /* rwcurr.c */
-int d_rdcurr(P1(DB_ADDR FAR **) Pi(int FAR *));        /* rwcurr.c */
-int d_wrcurr(P1(DB_ADDR FAR *));                       /* rwcurr.c */
-int d_recfree(P1(int) DBN_Dn);                 /* dblfcns.c */
-int d_recfrst(P1(int) DBN_Dn);                 /* recfrst.c */
-int d_reclast(P1(int) DBN_Dn);                 /* reclast.c */
-int d_reclock(P1(int) Pi(char FAR *) DBN_Dn);  /* dblfcns.c */
-int d_reclstat(P1(int) Pi(char FAR *) DBN_Dn);         /* dblfcns.c */
-int d_recover(P1(CONST char FAR *));           /* recover.c */
-int d_recread(P1(char FAR *) DBN_Dn);          /* recread.c */
-int d_recset(P1(int) DBN_Dn);                          /* recset.c */
-#ifndef NO_TIMESTAMP                      /* NO_TIMESTAMP */
-int d_recstat(P1(DB_ADDR) Pi(ULONG));          /* recstat.c */
-#endif                                    /* NO_TIMESTAMP */
-int d_recwrite(P1(CONST char FAR *) DBN_Dn);   /* recwrite.c */
-int d_renfile(P1(CONST char FAR *) Pi(FILE_NO) 
-                               Pi(CONST char FAR *));          /* renfile.c */
-int d_retries(P1(int));                                /* dblfcns.c */
-int d_rlbclr(P0);                              /* dblfcns.c */
-int d_rlbset(P0);                              /* dblfcns.c */
-int d_rlbtst(P0);                              /* dblfcns.c */
-int d_set_dberr(P1(FARPROC));                  /* dberr.c */
-#ifndef ONE_DB                            /* ONE_DB */
-int d_setdb(P1(int));                          /* setdb.c */
-#endif                                    /* ONE_DB */
-int d_setfree(P1(int) DBN_Dn);                 /* dblfcns.c */
-int d_setkey(P1(long) Pi(CONST char FAR *) DBN_Dn); /* makenew.c */
-int d_setlock(P1(int) Pi(char FAR *) DBN_Dn);  /* dblfcns.c */
-int d_setlstat(P1(int) Pi(char FAR *) DBN_Dn);         /* dblfcns.c */
-int d_setmm(P1(int) Pi(int) DBN_Dn);           /* setmm.c */
-int d_setmo(P1(int) Pi(int) DBN_Dn);           /* setmo.c */
-int d_setmr(P1(int) DBN_Dn);                   /* setmr.c */
-int d_setom(P1(int) Pi(int) DBN_Dn);           /* setom.c */
-int d_setoo(P1(int) Pi(int) DBN_Dn);           /* setoo.c */
-int d_setor(P1(int) DBN_Dn);                   /* setor.c */
-int d_setrm(P1(int) DBN_Dn);                   /* setrm.c */
-int d_setro(P1(int) DBN_Dn);                   /* setro.c */
-#ifndef NO_TIMESTAMP                      /* NO_TIMESTAMP */
-int d_stscm(P1(int) Pi(ULONG) DBN_Dn);                 /* stscm.c */
-int d_stsco(P1(int) Pi(ULONG) DBN_Dn);                 /* stsco.c */
-int d_stscr(P1(ULONG));                                /* stscr.c */
-int d_stscs(P1(int) Pi(ULONG) DBN_Dn);                 /* stscs.c */
-#endif                                    /* NO_TIMESTAMP */
-int d_timeout(P1(int));                                /* dblfcns.c */
-int d_trabort(P0);                             /* dblfcns.c */
-int d_trbegin(P1(CONST char FAR *));           /* dblfcns.c */
-int d_trend(P0);                                       /* dblfcns.c */
-#ifndef NO_TIMESTAMP                      /* NO_TIMESTAMP */
-int d_utscm(P1(int) Pi(ULONG FAR *) DBN_Dn);   /* utscm.c */
-int d_utsco(P1(int) Pi(ULONG FAR *) DBN_Dn);   /* utsco.c */
-int d_utscr(P1(ULONG FAR *));                  /* utscr.c */
-int d_utscs(P1(int) Pi(ULONG FAR *) DBN_Dn);   /* utscs.c */
-#endif                                    /* NO_TIMESTAMP */
+int d_rerdcurr(DB_ADDR **);            /* rwcurr.c */
+int d_rdcurr(DB_ADDR **, int *);       /* rwcurr.c */
+int d_wrcurr(DB_ADDR *);                       /* rwcurr.c */
+int d_recfree(int, int);                       /* dblfcns.c */
+int d_recfrst(int, int);                       /* recfrst.c */
+int d_reclast(int, int);                       /* reclast.c */
+int d_reclock(int, char *, int);       /* dblfcns.c */
+int d_reclstat(int, char *, int);      /* dblfcns.c */
+int d_recover(const, char *);          /* recover.c */
+int d_recread(char *, int);            /* recread.c */
+int d_recset(int, int);                        /* recset.c */
+int d_recwrite(const char *, int);     /* recwrite.c */
+int d_renfile(const char *dbn, FILE_NO fno, const char *fnm);          /* renfile.c */
+int d_retries(int);                            /* dblfcns.c */
+int d_rlbclr(void);                            /* dblfcns.c */
+int d_rlbset(void);                            /* dblfcns.c */
+int d_rlbtst(void);                            /* dblfcns.c */
+int d_set_dberr(FARPROC);                      /* dberr.c */
+int d_setdb(int);                              /* setdb.c */
+int d_setfree(int, int);                       /* dblfcns.c */
+int d_setkey(long, const char *, int); /* makenew.c */
+int d_setlock(int, char *, int);       /* dblfcns.c */
+int d_setlstat(int, char *, int);      /* dblfcns.c */
+int d_setmm(int, int, int);            /* setmm.c */
+int d_setmo(int, int, int);            /* setmo.c */
+int d_setmr(int, int);                 /* setmr.c */
+int d_setom(int, int, int);            /* setom.c */
+int d_setoo(int, int, int);            /* setoo.c */
+int d_setor(int, int);                 /* setor.c */
+int d_setrm(int, int);                 /* setrm.c */
+int d_setro(int, int);                 /* setro.c */
+int d_timeout(int);                            /* dblfcns.c */
+int d_trabort(void);                           /* dblfcns.c */
+int d_trbegin(const char *);           /* dblfcns.c */
+int d_trend(void);                                     /* dblfcns.c */
 
-#endif                                 /* MULTI_TASK */
-
-int dberr(P1(int));                            /* dberr.c */
+int dberr(int);                        /* dberr.c */
 
 #define D_FUNCTIONS_H
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin dproto.h */
index 09314786f0b4119911b6e29f54db9ed82a962797..f28a25a379aff5b518737bfafae51bb4b9aee8a6 100644 (file)
 #define d_cmstat               dt_cmstat
 #define d_cmtype               dt_cmtype
 #define d_connect              dt_connect
-#ifndef NO_TIMESTAMP
-#define d_costat               dt_costat
-#endif
 #define d_cotype               dt_cotype
 #define d_crget                        dt_crget
 #define d_crread               dt_crread
 #define d_crset                        dt_crset
-#ifndef NO_TIMESTAMP
-#define d_crstat               dt_crstat
-#endif
 #define d_crtype               dt_crtype
 #define d_crwrite              dt_crwrite
 #define d_csmget               dt_csmget
 #define d_csoread              dt_csoread
 #define d_csoset               dt_csoset
 #define d_csowrite             dt_csowrite
-#ifndef NO_TIMESTAMP
-#define d_csstat               dt_csstat
-#define d_ctscm                        dt_ctscm
-#define d_ctsco                        dt_ctsco
-#define d_ctscr                        dt_ctscr
-#endif
-#ifndef NO_COUNTRY
 #define d_ctbpath              dt_ctbpath
-#endif
 #define d_dbdpath              dt_dbdpath
 #define d_dbfpath              dt_dbfpath
 #define d_dblog                        dt_dblog
 #define d_findnm               dt_findnm
 #define d_findpm               dt_findpm
 #define d_freeall              dt_freeall
-#ifndef NO_TIMESTAMP
-#define d_gtscm                        dt_gtscm
-#define d_gtsco                        dt_gtsco
-#define d_gtscr                        dt_gtscr
-#define d_gtscs                        dt_gtscs
-#endif
 #define d_initialize           dt_initialize
 #define d_initfile             dt_initfile
 #define d_ismember             dt_ismember
 #define d_recover              dt_recover
 #define d_recread              dt_recread
 #define d_recset               dt_recset
-#ifndef NO_TIMESTAMP
-#define d_recstat              dt_recstat
-#endif
 #define d_recwrite             dt_recwrite
 #define d_renfile              dt_renfile
 #define d_retries              dt_retries
 #define d_setor                        dt_setor
 #define d_setrm                        dt_setrm
 #define d_setro                        dt_setro
-#ifndef NO_TIMESTAMP
-#define d_stscm                        dt_stscm
-#define d_stsco                        dt_stsco
-#define d_stscr                        dt_stscr
-#define d_stscs                        dt_stscs
-#endif
 #define d_timeout              dt_timeout
 #define d_trabort              dt_trabort
 #define d_trbegin              dt_trbegin
 #define d_trend                        dt_trend
-#ifndef NO_TIMESTAMP
-#define d_utscm                        dt_utscm
-#define d_utsco                        dt_utsco
-#define d_utscr                        dt_utscr
-#define d_utscs                        dt_utscs
-#endif
 #define d_wrcurr               dt_wrcurr
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC dtcover.h */
index 66e33c1273177835bc618d21b90e09af7c8081ba..c52bb07cc3fb4991a7da00c995644acd44ec43cc 100644 (file)
 /* Create and fill a new record
 */
 int
-d_fillnew( nrec, recval TASK_PARM DBN_PARM )
-int nrec;       /* record number */
-CONST char FAR *recval; /* record value */
-TASK_DECL
-DBN_DECL      /* database number */
+d_fillnew(
+int nrec,       /* record number */
+const char *recval, /* record value */
+int dbn       /* database number */
+)
 {
-#ifndef         NO_TIMESTAMP
-   ULONG timestamp;
-#endif
    DB_ADDR db_addr;
    INT recnum, stat;
    FILE_NO file;
    F_ADDR rec_addr;
-   char FAR *ptr;
+   char *ptr;
    char key[256];
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
    int fld, fldtot;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if (nrec_check(nrec, &nrec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY)
+   if (nrec_check(nrec, &nrec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY)
       RETURN( db_status );
    recnum = NUM2EXT(nrec, rt_offset);
 
@@ -88,11 +85,11 @@ DBN_DECL      /* database number */
        ++fld, ++fld_ptr) {
       if ((fld_ptr->fd_key == UNIQUE) && !(fld_ptr->fd_flags & OPTKEYMASK)) {
         if (fld_ptr->fd_type != COMKEY)
-           ptr = (char FAR *)recval + fld_ptr->fd_ptr - rec_ptr->rt_data;
+           ptr = (char *)recval + fld_ptr->fd_ptr - rec_ptr->rt_data;
         else
-           key_bldcom(fld, (char FAR *)recval, ptr = key, FALSE); /* Don't complement */
+           key_bldcom(fld, (char *)recval, ptr = key, FALSE); /* Don't complement */
         d_keyfind(FLDMARK*(long)recnum + (fld - rec_ptr->rt_fields), ptr 
-                     TASK_PARM DBN_PARM);
+                     , dbn);
         curr_rec = db_addr;
         if ( db_status == S_OKAY ) 
            RETURN( db_status = S_DUPLICATE );
@@ -109,7 +106,7 @@ DBN_DECL      /* database number */
    db_addr |= rec_addr;
 
    /* read record */
-   if (dio_read(db_addr, (char FAR * FAR *)&ptr, PGHOLD) != S_OKAY)
+   if (dio_read(db_addr, (char * *)&ptr, PGHOLD) != S_OKAY)
       RETURN( db_status );
 
    /* zero fill the record */
@@ -118,15 +115,6 @@ DBN_DECL      /* database number */
    /* place the record number and db_addr at the start of the record */
    bytecpy( ptr, &recnum, sizeof(INT) );
    bytecpy( ptr+sizeof(INT), &db_addr, DB_ADDR_SIZE );
-#ifndef         NO_TIMESTAMP
-   /* check for timestamp */
-   if ( rec_ptr->rt_flags & TIMESTAMPED ) {
-      timestamp = dio_pzgetts(file);
-      bytecpy( ptr + RECCRTIME, &timestamp, sizeof(LONG));
-      bytecpy( ptr + RECUPTIME, &timestamp, sizeof(LONG));
-   }
-   else timestamp = 0;
-#endif
    /* copy the record value into place */
    bytecpy( ptr+rec_ptr->rt_data, recval, rec_ptr->rt_len-rec_ptr->rt_data );
 
@@ -137,9 +125,9 @@ DBN_DECL      /* database number */
        ++fld, ++fld_ptr) {
       if ((fld_ptr->fd_key != 'n') && !(fld_ptr->fd_flags & OPTKEYMASK)) {
         if ( fld_ptr->fd_type != COMKEY )
-           ptr = (char FAR *)recval + fld_ptr->fd_ptr - rec_ptr->rt_data;
+           ptr = (char *)recval + fld_ptr->fd_ptr - rec_ptr->rt_data;
         else
-           key_bldcom(fld, (char FAR *)recval, ptr = key, TRUE);
+           key_bldcom(fld, (char *)recval, ptr = key, TRUE);
         if ((stat = key_insert(fld, ptr, db_addr)) != S_OKAY) {
            r_delrec( nrec, db_addr );
            dio_write(db_addr, NULL, PGFREE);
@@ -151,9 +139,6 @@ DBN_DECL      /* database number */
    if ( dio_write(db_addr, NULL, PGFREE) == S_OKAY ) {
       curr_rec = db_addr;
 
-#ifndef         NO_TIMESTAMP
-      if ( db_tsrecs ) cr_time = timestamp;
-#endif
    }
    RETURN( db_status );
 }
index de5cb9ee62b7a6c2e5aade176699e08d7c4c9716..3760309c3e67896ad17a3447c31dc87d60477973 100644 (file)
 /* Find owner of current record
 */
 int
-d_findco(nset TASK_PARM DBN_PARM)
-int nset;
-TASK_DECL
-DBN_DECL
+d_findco(int nset, int dbn)
 {
    int set;
    char mem[MEMPSIZE];
    DB_ADDR own;
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* Make sure we have a current record */
@@ -70,7 +67,7 @@ DBN_DECL
       RETURN( dberr(S_NOCR) );
 
    /* Read current record */
-   if ( dio_read(curr_rec, (char FAR * FAR *)&crloc, NOPGHOLD) != S_OKAY )
+   if ( dio_read(curr_rec, (char * *)&crloc, NOPGHOLD) != S_OKAY )
       RETURN( db_status );
    
    /* Get the member ptr for this set */
@@ -86,16 +83,6 @@ DBN_DECL
    curr_own[set] = own;
    curr_mem[set] = curr_rec;
    curr_rec      = own;
-#ifndef         NO_TIMESTAMP
-   /* set any timestamps */
-   if ( db_tsrecs ) {
-      d_utscr( &cr_time TASK_PARM );
-      d_utscm(nset, &cm_time[set] TASK_PARM DBN_PARM);
-      co_time[set] = cr_time;
-   }
-   if ( db_tssets )
-      d_utscs(nset, &cs_time[set] TASK_PARM DBN_PARM);
-#endif
    RETURN( db_status = S_OKAY );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin findco.c */
index adfbdba0199e15c4e5359ca672c1a658793a42ab..4212105169251845a6cc8f944efd599fd741d0a3 100644 (file)
 /* Find first member of set
 */
 int
-d_findfm(nset TASK_PARM DBN_PARM)
-int nset;
-TASK_DECL
-DBN_DECL
+d_findfm(int nset, int dbn)
 {
    char setp[SETPSIZE];
    DB_ADDR mem;
-   char FAR *recp;
+   char *recp;
    int set;
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* make sure we have a current owner */
@@ -71,7 +68,7 @@ DBN_DECL
       RETURN( dberr(S_NOCO) );
 
    /* read current owner of set */
-   if ( dio_read(curr_own[set], (char FAR * FAR *)&recp, NOPGHOLD) != S_OKAY )
+   if ( dio_read(curr_own[set], (char * *)&recp, NOPGHOLD) != S_OKAY )
       RETURN( db_status );
 
    /* get set pointer from record */
@@ -88,16 +85,6 @@ DBN_DECL
       RETURN( db_status = S_EOS );
 
    curr_rec  = mem;
-#ifndef         NO_TIMESTAMP
-   /* set timestamps */
-   if ( db_tsrecs ) {
-      d_utscr( &cr_time TASK_PARM );
-      cm_time[set] = cr_time;
-   }
-   if ( db_tssets )
-      /* only needed for system record support */
-      d_utscs(nset, &cs_time[set] TASK_PARM DBN_PARM);
-#endif
    RETURN( db_status = S_OKAY );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin findfm.c */
index 2b9af23d2449f18b1582864c4bd6f49f36eb2153..42c07a37d34c87697dc42238414a7a7621b7d91e 100644 (file)
 /* Find last member of set
 */
 int
-d_findlm(nset TASK_PARM DBN_PARM)
-int nset;
-TASK_DECL
-DBN_DECL
+d_findlm(int nset, int dbn)
 {
    char setp[SETPSIZE];
    DB_ADDR mem;
-   char FAR *recp;
+   char *recp;
    int set;
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* make sure we have a current owner */
@@ -71,7 +68,7 @@ DBN_DECL
       RETURN( dberr(S_NOCO) );
 
    /* read current owner of set */
-   if ( dio_read(curr_own[set], (char FAR * FAR *)&recp, NOPGHOLD) != S_OKAY )
+   if ( dio_read(curr_own[set], (char * *)&recp, NOPGHOLD) != S_OKAY )
       RETURN( db_status );
 
    /* get set pointer from record */
@@ -88,16 +85,6 @@ DBN_DECL
       RETURN( db_status = S_EOS );
 
    curr_rec  = mem;
-#ifndef         NO_TIMESTAMP
-   /* set timestamps */
-   if ( db_tsrecs ) {
-      d_utscr( &cr_time TASK_PARM );
-      cm_time[set] = cr_time;
-   }
-   if ( db_tssets )
-      /* only needed for system record support */
-      d_utscs(nset, &cs_time[set] TASK_PARM DBN_PARM);
-#endif
    RETURN( db_status = S_OKAY );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin findlm.c */
index 0797633032f10b098149a7242f9a41e36a6e53d6..662f9e2a379b875faa7789b439e30c554f6122a9 100644 (file)
 /* Find next member of set
 */
 int
-d_findnm(nset TASK_PARM DBN_PARM)
-int nset;
-TASK_DECL
-DBN_DECL
+d_findnm(int nset, int dbn)
 {
    int set;
    char memp[MEMPSIZE];
    DB_ADDR mem;
-   char FAR *recp;
-   DB_ADDR FAR *cm_ptr;
-   SET_ENTRY FAR *set_ptr;
+   char *recp;
+   DB_ADDR *cm_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* make sure we have a current owner */
@@ -73,10 +70,10 @@ DBN_DECL
 
    /* find first member if no current member */
    if ( !*(cm_ptr = &curr_mem[set]) )
-      RETURN( d_findfm(nset TASK_PARM DBN_PARM) );
+      RETURN( d_findfm(nset , dbn) );
 
    /* read current member of set and get member pointer from record */
-   if ((dio_read(*cm_ptr, (char FAR * FAR *)&recp, NOPGHOLD) != S_OKAY) ||
+   if ((dio_read(*cm_ptr, (char * *)&recp, NOPGHOLD) != S_OKAY) ||
        (r_gmem(set, recp, memp) != S_OKAY))
       RETURN( db_status );
 
@@ -90,13 +87,6 @@ DBN_DECL
       RETURN( db_status = S_EOS );
 
    curr_rec  = mem;
-#ifndef         NO_TIMESTAMP
-   /* set timestamps */
-   if ( db_tsrecs ) {
-      d_utscr( &cr_time TASK_PARM );
-      cm_time[set] = cr_time;
-   }
-#endif
    RETURN( db_status = S_OKAY );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin findnm.c */
index 26d94735499014155f15c48d6f11ba2136efc653..4c4c223090b1468c3b5bfa1ad59e6f6cf5154d7a 100644 (file)
 /* Find previous member of set
 */
 int
-d_findpm(nset TASK_PARM DBN_PARM)
-int nset;
-TASK_DECL
-DBN_DECL
+d_findpm(int nset, int dbn)
 {
    int set;
    char memp[MEMPSIZE];
    DB_ADDR mem;
-   char FAR *recp;
-   DB_ADDR FAR *cm_ptr;
-   SET_ENTRY FAR *set_ptr;
+   char *recp;
+   DB_ADDR *cm_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* make sure we have a current owner */
@@ -73,10 +70,10 @@ DBN_DECL
 
    /* find last member if no current member */
    if ( !*(cm_ptr = &curr_mem[set]) )
-      RETURN( d_findlm(nset TASK_PARM DBN_PARM) );
+      RETURN( d_findlm(nset , dbn) );
 
    /* read current member of set and get member pointer from record */
-   if ((dio_read(*cm_ptr, (char FAR * FAR *)&recp, NOPGHOLD) != S_OKAY) ||
+   if ((dio_read(*cm_ptr, (char * *)&recp, NOPGHOLD) != S_OKAY) ||
        (r_gmem(set, recp, memp) != S_OKAY))
       RETURN( db_status );
 
@@ -90,13 +87,6 @@ DBN_DECL
       RETURN( db_status = S_EOS );
 
    curr_rec = mem;
-#ifndef         NO_TIMESTAMP
-   /* set timestamps */
-   if ( db_tsrecs ) {
-      d_utscr( &cr_time TASK_PARM );
-      cm_time[set] = cr_time;
-   }
-#endif
    RETURN( db_status = S_OKAY );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin findpm.c */
diff --git a/cde/lib/DtSearch/raima/gtscm.c b/cde/lib/DtSearch/raima/gtscm.c
deleted file mode 100644 (file)
index e6b9afe..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: gtscm.c /main/2 1996/05/09 04:07:14 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_gtscm
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   gtscm.c -- db_VISTA current member timestamp get module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Get timestamp of current member
-*/
-d_gtscm(set, timestamp TASK_PARM DBN_PARM)
-int set;
-ULONG FAR *timestamp;
-TASK_DECL
-DBN_DECL
-{
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   /* make sure we have a current member */
-   if ( curr_mem[set] ) {
-      if ( db_tsrecs )
-        *timestamp = cm_time[set];
-      else
-        dberr(S_TIMESTAMP);
-   }
-   else
-      dberr(S_NOCM);
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin gtscm.c */
diff --git a/cde/lib/DtSearch/raima/gtsco.c b/cde/lib/DtSearch/raima/gtsco.c
deleted file mode 100644 (file)
index 4e7fd7e..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: gtsco.c /main/2 1996/05/09 04:07:28 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_gtsco
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   gtsco.c -- db_VISTA current owner timestamp get module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Get timestamp of current owner
-*/
-d_gtsco(set, timestamp TASK_PARM DBN_PARM)
-int set;
-ULONG FAR *timestamp;
-TASK_DECL
-DBN_DECL
-{
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   /* make sure we have a current owner */
-   if ( curr_own[set] ) {
-      if ( db_tsrecs )
-        *timestamp = co_time[set];
-      else
-        dberr(S_TIMESTAMP);
-   }
-   else
-      dberr(S_NOCO);
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin gtsco.c */
diff --git a/cde/lib/DtSearch/raima/gtscr.c b/cde/lib/DtSearch/raima/gtscr.c
deleted file mode 100644 (file)
index 5b4261b..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: gtscr.c /main/2 1996/05/09 04:07:42 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_gtscr
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   gtscr.c -- db_VISTA current record timestamp get module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Get timestamp of current record
-*/
-d_gtscr(timestamp TASK_PARM)
-ULONG FAR *timestamp;
-TASK_DECL
-{
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(RECORD_NOIO));
-
-   db_status = S_OKAY;
-
-   /* make sure we have a current record */
-   if ( curr_rec ) {
-      if ( db_tsrecs )
-        *timestamp = cr_time;
-      else
-        dberr(S_TIMESTAMP);
-   }
-   else
-      dberr(S_NOCR);
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin gtscr.c */
diff --git a/cde/lib/DtSearch/raima/gtscs.c b/cde/lib/DtSearch/raima/gtscs.c
deleted file mode 100644 (file)
index 0de6b81..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: gtscs.c /main/2 1996/05/09 04:07:58 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_gtscs
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   gtscs.c -- db_VISTA set timestamp get module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Get timestamp of set
-*/
-d_gtscs(set, timestamp TASK_PARM DBN_PARM)
-int set;
-ULONG FAR *timestamp;
-TASK_DECL
-DBN_DECL
-{
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   /* make sure we have a current owner */
-   if ( curr_own[set] ) {
-      if ( db_tssets )
-        *timestamp = cs_time[set];
-      else
-        dberr(S_TIMESTAMP);
-   }
-   else
-      dberr(S_NOCO);
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin gtscs.c */
index fb2464024cb833fe2fb0327b69cc3362160ad55d..edd3325c4608264de4f5bd6c94306e3921dfee33 100644 (file)
@@ -78,7 +78,7 @@ typedef union INIT_PAGE_U {
    } pg1;
 } INIT_PAGE;
 
-typedef struct {union INIT_PAGE_U FAR *ptr; LOCK_DESC} INIT_PAGE_P;
+typedef struct {union INIT_PAGE_U *ptr; LOCK_DESC} INIT_PAGE_P;
 
 static char nulls[5] = "\0\0\0\0";
 static int dbfile;
@@ -89,9 +89,7 @@ extern int max_open_files;            /* see dio.c */
 /* Database initialization function
 */
 int
-d_initialize(TASK_DBN_ONLY)
-TASK_DECL
-DBN_DECL
+d_initialize(int dbn)
 {
    FILE_NO fno;
 
@@ -102,7 +100,7 @@ DBN_DECL
    else {
       /* initialize db files in file_table */
       for (fno = 0; fno < DB_REF(Size_ft); ++fno) {
-        if ( d_initfile(fno TASK_PARM DBN_PARM) != S_OKAY )
+        if ( d_initfile(fno , dbn) != S_OKAY )
            break;
       }
    }
@@ -114,18 +112,18 @@ DBN_DECL
 /* Initialize database file
 */
 int
-d_initfile(fno TASK_PARM DBN_PARM)
-FILE_NO fno; /* file table entry of file to be initialized */
-TASK_DECL
-DBN_DECL
+d_initfile(
+FILE_NO fno, /* file table entry of file to be initialized */
+int dbn
+)
 {
    INIT_PAGE_P Page;
 #define page (Page.ptr)
    F_ADDR addr;
    ULONG ts;
    INT rno, rec;
-   FILE_ENTRY FAR *file_ptr;
-   RECORD_ENTRY FAR *rec_ptr;
+   FILE_ENTRY *file_ptr;
+   RECORD_ENTRY *rec_ptr;
    time_t      local_timestamp;
    LONG                extern_timestamp;
 
@@ -137,9 +135,7 @@ DBN_DECL
    time (&local_timestamp);
    extern_timestamp = htonl ((LONG) local_timestamp);
 
-#ifndef         ONE_DB
    fno += curr_db_table->ft_offset;
-#endif
    file_ptr = &file_table[fno];
 
    /* If file is open - close it */
@@ -154,7 +150,7 @@ DBN_DECL
    if ((dbfile = DB_OPEN(file_ptr->ft_name, O_RDWR | O_CREAT | O_TRUNC)) < 0)
       RETURN( dberr(S_NOFILE) );
    
-   page = (INIT_PAGE FAR *)ALLOC(&Page, file_ptr->ft_pgsize, "page");
+   page = (INIT_PAGE *)ALLOC(&Page, file_ptr->ft_pgsize, "page");
    if ( page == NULL ) RETURN( dberr(S_NOMEMORY) );
 
    /*--------- Init PAGE 0 ---------*/
@@ -169,7 +165,7 @@ DBN_DECL
       page->pg0.dchain =       htonl ((LONG) NONE);
       page->pg0.next =         htonl (2);
       page->pg0.timestamp =    0; /* not really used by key file */
-      DB_WRITE(dbfile, (char FAR *)page, (int)file_ptr->ft_pgsize);
+      DB_WRITE(dbfile, (char *)page, (int)file_ptr->ft_pgsize);
 
       /*--------- Write KEY FILE PAGE 1 ---------*/
       byteset(page, '\0', file_ptr->ft_pgsize);
@@ -179,7 +175,7 @@ DBN_DECL
       /* node 1, NONE page pointer */
       addr =                   -1;
       bytecpy(page->pg1.init_addr, &addr, sizeof(F_ADDR));
-      DB_WRITE(dbfile, (char FAR *)page, (int)file_ptr->ft_pgsize);
+      DB_WRITE(dbfile, (char *)page, (int)file_ptr->ft_pgsize);
    }
    else {
       /*--------- Init DATA PAGE 0 ---------
@@ -194,7 +190,7 @@ DBN_DECL
 
            /*---Write special DATA FILE PAGE 0 for system record file ---*/
            page->pg0.next =    htonl (2);
-           DB_WRITE(dbfile, (char FAR *)page, (int)file_ptr->ft_pgsize);
+           DB_WRITE(dbfile, (char *)page, (int)file_ptr->ft_pgsize);
 
            /*--------- Write DATA FILE PAGE 1 for system record ---------*/
            byteset(page, '\0', file_ptr->ft_pgsize);
@@ -217,7 +213,7 @@ DBN_DECL
               bytecpy(page->pg1.init_crts, &ts, sizeof(ULONG));
               bytecpy(page->pg1.init_upts, &ts, sizeof(ULONG));
            }
-           DB_WRITE(dbfile, (char FAR *)page, (int)file_ptr->ft_pgsize);
+           DB_WRITE(dbfile, (char *)page, (int)file_ptr->ft_pgsize);
            break;
         }
       }
@@ -227,7 +223,7 @@ DBN_DECL
        */
       if (rec == size_rt) {
         page->pg0.next =       htonl (1);
-        DB_WRITE(dbfile, (char FAR *)page, (int)file_ptr->ft_pgsize);
+        DB_WRITE(dbfile, (char *)page, (int)file_ptr->ft_pgsize);
       }
    }
    /* close database file */
index 24ea4fa2f8f16d67ca859806f8ae888bad894d41..b0a67b951d0aa6b026708fb9c47bf5baf70476fa 100644 (file)
@@ -86,8 +86,8 @@ int   dump_init_tables =      FALSE;
 
 
 /* Internal function prototypes */
-static int alloc_dict(P0);
-static int initcurr(P0);
+static int alloc_dict(void);
+static int initcurr(void);
 
 
 
@@ -95,46 +95,31 @@ static int initcurr(P0);
 /* Initialize database tables
 */
 int
-inittab()
+inittab(void)
 {
-   register int dbt_lc;                        /* loop control */
-   register INT i, j;
+   int dbt_lc;                 /* loop control */
+   INT i, j;
    int key_offset = 0, key_count;
    char dbfile[DtSrFILENMLEN], dbd_ver[DBD_COMPAT_LEN + 1];
    char dbname[FILENMLEN];     /* Temporary working space */
    int dbf;
-   FILE_ENTRY FAR *file_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
-#ifndef         ONE_DB
+   FILE_ENTRY *file_ptr;
+   FIELD_ENTRY *fld_ptr;
 #define         DB_ENABLE   1
-#else
-#define         DB_ENABLE   0
-#endif
-#ifndef         NO_TIMESTAMP
-#define         TS_ENABLE   1
-#else
 #define         TS_ENABLE   0
-#endif
 #if   DB_ENABLE | TS_ENABLE
-   RECORD_ENTRY FAR *rec_ptr;
-   SET_ENTRY FAR *set_ptr;
-#endif
-#ifndef         ONE_DB
-   MEMBER_ENTRY FAR *mem_ptr;
-   SORT_ENTRY FAR *srt_ptr;
-   KEY_ENTRY FAR *key_ptr;
+   RECORD_ENTRY *rec_ptr;
+   SET_ENTRY *set_ptr;
 #endif
+   MEMBER_ENTRY *mem_ptr;
+   SORT_ENTRY *srt_ptr;
+   KEY_ENTRY *key_ptr;
 
-#ifndef         NO_TIMESTAMP
-   db_tsrecs = db_tssets = FALSE;
-#endif
    size_ft = size_rt = size_st = size_mt = size_srt = size_fd = size_kt = 0;
 
    /* compute individual dictionary sizes and offsets */
-#ifndef         ONE_DB
    for (dbt_lc = 0, curr_db_table = &db_table[old_no_of_dbs]; 
        dbt_lc < no_of_dbs; ++dbt_lc, ++curr_db_table) {
-#endif
 
       /* form database dictionary name */
       if ( DB_REF(db_path[0]) )
@@ -175,23 +160,23 @@ inittab()
 goodver:
 
       /* Read in database page size */
-      DB_READ(dbf, (char FAR *)&DB_REF(Page_size), sizeof(INT));
+      DB_READ(dbf, (char *)&DB_REF(Page_size), sizeof(INT));
       NTOHS (DB_REF(Page_size));
 
       /* Read in table sizes */
-      DB_READ(dbf, (char FAR *)&DB_REF(Size_ft), sizeof(INT));
+      DB_READ(dbf, (char *)&DB_REF(Size_ft), sizeof(INT));
       NTOHS (DB_REF(Size_ft));
-      DB_READ(dbf, (char FAR *)&DB_REF(Size_rt), sizeof(INT));
+      DB_READ(dbf, (char *)&DB_REF(Size_rt), sizeof(INT));
       NTOHS (DB_REF(Size_rt));
-      DB_READ(dbf, (char FAR *)&DB_REF(Size_fd), sizeof(INT));
+      DB_READ(dbf, (char *)&DB_REF(Size_fd), sizeof(INT));
       NTOHS (DB_REF(Size_fd));
-      DB_READ(dbf, (char FAR *)&DB_REF(Size_st), sizeof(INT));
+      DB_READ(dbf, (char *)&DB_REF(Size_st), sizeof(INT));
       NTOHS (DB_REF(Size_st));
-      DB_READ(dbf, (char FAR *)&DB_REF(Size_mt), sizeof(INT));
+      DB_READ(dbf, (char *)&DB_REF(Size_mt), sizeof(INT));
       NTOHS (DB_REF(Size_mt));
-      DB_READ(dbf, (char FAR *)&DB_REF(Size_srt), sizeof(INT));
+      DB_READ(dbf, (char *)&DB_REF(Size_srt), sizeof(INT));
       NTOHS (DB_REF(Size_srt));
-      DB_READ(dbf, (char FAR *)&DB_REF(Size_kt), sizeof(INT));
+      DB_READ(dbf, (char *)&DB_REF(Size_kt), sizeof(INT));
       NTOHS (DB_REF(Size_kt));
       close(dbf);      /* end of PASS 1 */
 
@@ -214,7 +199,6 @@ goodver:
 
       DB_REF(sysdba) = NULL_DBA;
 
-#ifndef         ONE_DB
       /* update merged dictionary offsets and sizes */
       if ( curr_db_table->Page_size > page_size ) {
            page_size = curr_db_table->Page_size;
@@ -242,16 +226,13 @@ goodver:
       curr_db_table->kt_offset = size_kt;
       size_kt += curr_db_table->Size_kt;
    }
-#endif
    /* allocate dictionary space */
    if ( alloc_dict() != S_OKAY ) return( db_status );
 
    /* read in and adjust dictionary entries for each database */
-#ifndef         ONE_DB
    for (dbt_lc = 0, curr_db_table = &db_table[old_no_of_dbs]; 
        dbt_lc < no_of_dbs; 
        ++dbt_lc, ++curr_db_table) {
-#endif
 
       /* form database dictionary name */
       if ( DB_REF(db_path[0]) )
@@ -278,7 +259,7 @@ goodver:
       DB_LSEEK(dbf, (off_t)(DBD_COMPAT_LEN + 8L*sizeof(INT)), 0);
 
       /*----------------- FILE TABLE -------------------*/
-      DB_READ(dbf, (char FAR *)&file_table[ORIGIN(ft_offset)],
+      DB_READ(dbf, (char *)&file_table[ORIGIN(ft_offset)],
            (DB_REF(Size_ft)*sizeof(FILE_ENTRY)));
       /* Invalid if sizeof(xxxx_ENTRY) diff on each machine */
       for (    i = 0, file_ptr = &file_table[ORIGIN(ft_offset)];
@@ -304,7 +285,7 @@ goodver:
       }
 
       /*----------------- RECORD TABLE -------------------*/
-      DB_READ(dbf, (char FAR *)&record_table[ORIGIN(rt_offset)],
+      DB_READ(dbf, (char *)&record_table[ORIGIN(rt_offset)],
           (DB_REF(Size_rt)*sizeof(RECORD_ENTRY)));
       for (    i = 0, rec_ptr = &record_table[ORIGIN(rt_offset)];
                i < DB_REF(Size_rt);
@@ -332,7 +313,7 @@ goodver:
       }
 
       /*----------------- FIELD TABLE -------------------*/
-      DB_READ(dbf, (char FAR *)&field_table[ORIGIN(fd_offset)],
+      DB_READ(dbf, (char *)&field_table[ORIGIN(fd_offset)],
           (DB_REF(Size_fd)*sizeof(FIELD_ENTRY)));
       for (    i = 0, fld_ptr = &field_table[ORIGIN(fd_offset)];
                i < DB_REF(Size_fd);
@@ -371,7 +352,7 @@ goodver:
       }
 
       /*----------------- SET TABLE -------------------*/
-      DB_READ(dbf, (char FAR *)&set_table[ORIGIN(st_offset)],
+      DB_READ(dbf, (char *)&set_table[ORIGIN(st_offset)],
           (DB_REF(Size_st)*sizeof(SET_ENTRY)));
       for (    i = 0, set_ptr = &set_table[ORIGIN(st_offset)];
                i < DB_REF(Size_st);
@@ -399,7 +380,7 @@ goodver:
       }
 
       /*----------------- MEMBER TABLE -------------------*/
-      DB_READ(dbf, (char FAR *)&member_table[ORIGIN(mt_offset)],
+      DB_READ(dbf, (char *)&member_table[ORIGIN(mt_offset)],
           (DB_REF(Size_mt)*sizeof(MEMBER_ENTRY)));
       for (    i = 0, mem_ptr = &member_table[ORIGIN(mt_offset)];
                i < DB_REF(Size_mt);
@@ -424,7 +405,7 @@ goodver:
       }
 
 
-      DB_READ(dbf, (char FAR *)&sort_table[ORIGIN(srt_offset)],
+      DB_READ(dbf, (char *)&sort_table[ORIGIN(srt_offset)],
           (DB_REF(Size_srt)*sizeof(SORT_ENTRY)));
       /* Member sort tables not used by DtSearch @@@ */
       if (DB_REF(Size_srt)) {
@@ -434,7 +415,7 @@ goodver:
            NTOHS (srt_ptr->se_set);
       }
 
-      DB_READ(dbf, (char FAR *)&key_table[ORIGIN(kt_offset)],
+      DB_READ(dbf, (char *)&key_table[ORIGIN(kt_offset)],
           (DB_REF(Size_kt)*sizeof(KEY_ENTRY)));
       /* Compound key tables not used by DtSearch @@@ */
       if (DB_REF(Size_kt)) {
@@ -450,9 +431,7 @@ goodver:
 #ifdef DEBUG_INITTAB
       dump_init_tables = FALSE;
 #endif
-#ifndef         ONE_DB
       curr_db_table->key_offset = key_offset;
-#endif
 
       /* update file table path entries */
       if ( DB_REF(db_path[0]) || dbfpath[0] ) {
@@ -481,18 +460,8 @@ goodver:
       for (i = ORIGIN(rt_offset), rec_ptr = &record_table[ORIGIN(rt_offset)];
           i < ORIGIN(rt_offset) + DB_REF(Size_rt);
           ++i, ++rec_ptr) {
-#ifndef         ONE_DB
         rec_ptr->rt_file += curr_db_table->ft_offset;
         rec_ptr->rt_fields += curr_db_table->fd_offset;
-#endif
-#ifndef         NO_TIMESTAMP
-        if ( rec_ptr->rt_flags & TIMESTAMPED ) {
-           db_tsrecs = TRUE;
-#ifdef ONE_DB
-           break;
-#endif
-        }
-#endif
       }
 #endif
       /* adjust field table entries */
@@ -500,17 +469,13 @@ goodver:
              fld_ptr = &field_table[ORIGIN(fd_offset)];
           i < ORIGIN(fd_offset) + DB_REF(Size_fd);
           ++i, ++fld_ptr) {
-#ifndef         ONE_DB
         fld_ptr->fd_rec += curr_db_table->rt_offset;
-#endif
         if ( fld_ptr->fd_key != NOKEY ) {
            fld_ptr->fd_keyno += key_offset;
            ++key_count;
-#ifndef         ONE_DB
            fld_ptr->fd_keyfile += curr_db_table->ft_offset;
            if ( fld_ptr->fd_type == 'k' )
               fld_ptr->fd_ptr += curr_db_table->kt_offset;
-#endif
         }
       }
       key_offset += key_count;
@@ -520,22 +485,11 @@ goodver:
       for (i = ORIGIN(st_offset), set_ptr = &set_table[ORIGIN(st_offset)];
           i < ORIGIN(st_offset) + DB_REF(Size_st);
           ++i, ++set_ptr) {
-#ifndef         ONE_DB
         set_ptr->st_own_rt += curr_db_table->rt_offset;
         set_ptr->st_members += curr_db_table->mt_offset;
-#endif
-#ifndef         NO_TIMESTAMP
-        if ( set_ptr->st_flags & TIMESTAMPED ) {
-           db_tssets = TRUE;
-#ifdef ONE_DB
-           break;
-#endif
-        }
-#endif
       }
 #endif
 
-#ifndef         ONE_DB
       /* adjust member table entries */
       for (i = curr_db_table->mt_offset, 
              mem_ptr = &member_table[curr_db_table->mt_offset];
@@ -563,7 +517,6 @@ goodver:
         key_ptr->kt_field += curr_db_table->fd_offset;
       }
    }  /* end loop for each database */
-#endif
    initcurr();
    return( db_status );
 }
@@ -572,23 +525,15 @@ goodver:
 
 /* Allocate space for dictionary
 */
-static int alloc_dict()
+static int alloc_dict(void)
 {
    int old_size;
    int new_size;
    int extra_file = 0;
-#ifndef ONE_DB
-   DB_ENTRY FAR *db_ptr;
-#endif
+   DB_ENTRY *db_ptr;
 
    /* allocate and initialize file_table */
-#ifndef NO_TRANS
-   if ( use_ovfl ) {
-      extra_file = 1;
-   }
-#endif
 
-#ifndef ONE_DB
    if ( old_no_of_dbs == 0 ) {
       old_size_ft = 0;
       old_size_fd = 0;
@@ -608,7 +553,6 @@ static int alloc_dict()
       old_size_kt = db_ptr->Size_kt + db_ptr->kt_offset;
       old_size_rt = db_ptr->Size_rt + db_ptr->rt_offset;
    }
-#endif
 
    new_size = (size_ft + extra_file) * sizeof(FILE_ENTRY);
    old_size = old_size_ft * sizeof(FILE_ENTRY);
@@ -678,28 +622,24 @@ static int alloc_dict()
 
 /* Initialize currency tables 
 */
-static int initcurr()
+static int initcurr(void)
 {
-   register int dbt_lc;                        /* loop control */
-   register int rec, i;
-   RECORD_ENTRY FAR *rec_ptr;
-   SET_ENTRY FAR *set_ptr;
-   DB_ADDR FAR *co_ptr;
+   int dbt_lc;                 /* loop control */
+   int rec, i;
+   RECORD_ENTRY *rec_ptr;
+   SET_ENTRY *set_ptr;
+   DB_ADDR *co_ptr;
    int old_size;
    int new_size;
 
    /* Initialize current record and type */
-#ifndef         ONE_DB
    for (dbt_lc = no_of_dbs, curr_db_table = &db_table[old_no_of_dbs],
                                curr_rn_table = &rn_table[old_no_of_dbs];
        --dbt_lc >= 0; ++curr_db_table, ++curr_rn_table) {
       DB_REF(curr_dbt_rec) = NULL_DBA;
-#endif
       RN_REF(rn_dba)   = NULL_DBA;
       RN_REF(rn_type)  = -1;
-#ifndef ONE_DB
    }
-#endif
 
    if ( size_st ) {
       new_size = size_st * sizeof(DB_ADDR);
@@ -712,31 +652,9 @@ static int initcurr()
                                                                != S_OKAY ) {
         return( db_status );
       }
-#ifndef         NO_TIMESTAMP
-      new_size = size_st * sizeof(ULONG);
-      old_size = old_size_st * sizeof(ULONG);
-      if ( db_tsrecs ) {
-        if ( ALLOC_TABLE(&db_global.Co_time, new_size, old_size, "co_time")
-                                                               != S_OKAY ) {
-           return( db_status );
-        }
-        if ( ALLOC_TABLE(&db_global.Cm_time, new_size, old_size, "cm_time")
-                                                               != S_OKAY ) {
-           return( db_status );
-        }
-      }
-      if ( db_tssets ) {
-        if ( ALLOC_TABLE(&db_global.Cs_time, new_size, old_size, "cs_time")
-                                                               != S_OKAY ) {
-           return( db_status );
-        }
-      }
-#endif
       /* for each db make system record as curr_own of its sets */
-#ifndef         ONE_DB
       for (dbt_lc = no_of_dbs, curr_db_table = &db_table[old_no_of_dbs]; 
           --dbt_lc >= 0; ++curr_db_table) {
-#endif
         for (rec = ORIGIN(rt_offset), 
                 rec_ptr = &record_table[ORIGIN(rt_offset)];
              rec < ORIGIN(rt_offset) + DB_REF(Size_rt);
@@ -756,21 +674,16 @@ static int initcurr()
                  }
               }
               DB_REF(sysdba) = curr_rec;
-#ifndef ONE_DB
               DB_REF(curr_dbt_rec) = curr_rec;
-#endif
               break;
            }
         }
-#ifndef         ONE_DB
       }
-#endif
    }
    else {
       curr_own = NULL;
       curr_mem = NULL;
    }
-#ifndef         ONE_DB
    curr_db = 0;
    MEM_LOCK(&db_global.Db_table);
    curr_db_table = db_table;
@@ -778,7 +691,6 @@ static int initcurr()
    curr_rn_table = rn_table;
    setdb_on = FALSE;
    curr_rec = DB_REF(curr_dbt_rec);
-#endif
    return( db_status = S_OKAY );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin inittab.c */
index 54ed576aa8654f9113c8db995d9294d4827c0339..f1aa1eb1ffa0001ad520aee1c2868095c7cf34e9 100644 (file)
@@ -67,9 +67,8 @@ int db_status = 0;
 /* database dictionary tables */
 INT largest_page = 0;
 
-char FAR *crloc = NULL;
+char *crloc = NULL;
 
-#ifndef ONE_DB
 INT old_size_ft = 0;
 INT old_size_fd = 0;
 INT old_size_st = 0;
@@ -78,7 +77,6 @@ INT old_size_srt = 0;
 INT old_size_kt = 0;
 INT old_size_rt = 0;
 INT old_no_of_dbs = 0;
-#endif
 
 /* Compatible dictionary versions */
 char *compat_dbd[] = {
index c8dc3585ceec7cd848719b4baf9d3e9e1559a52d..5b37a1946aa20825ae66a7e33862cd89389ef9fa 100644 (file)
 /* Check to see if current record is a connected member of SET
 */
 int
-d_ismember(set TASK_PARM DBN_PARM)
-int set;  /* set table entry */
-TASK_DECL
-DBN_DECL  /* database number */
+d_ismember(
+int set,  /* set table entry */
+int dbn   /* database number */
+)
 {
    char crmp[MEMPSIZE];   /* current record's member pointer */
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
    
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* Make sure we have a current record */
@@ -69,7 +69,7 @@ DBN_DECL  /* database number */
       RETURN( dberr(S_NOCR) );
 
    /* Read current record and check connection */
-   if ((dio_read( curr_rec, (char FAR * FAR *)&crloc , NOPGHOLD) == S_OKAY) &&
+   if ((dio_read( curr_rec, (char * *)&crloc , NOPGHOLD) == S_OKAY) &&
        (r_gmem(set, crloc, crmp) == S_OKAY) &&
        null_dba(crmp + MP_OWNER))
       db_status = S_EOS; /* end-of-set if curr rec not owned */
index c4d608bc47bbb339cf6a706f0f370963b37ff317..79878df5b772c5cf4223cd76de60273ebd7e16ed 100644 (file)
 /* Check to see if current record is a owner of non-empty SET
 */
 int
-d_isowner(set TASK_PARM DBN_PARM)
-int set;  /* set table entry */
-TASK_DECL
-DBN_DECL  /* database number */
+d_isowner(
+int set,  /* set table entry */
+int dbn   /* database number */
+)
 {
    char crsp[SETPSIZE];   /* current record's set pointer */
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
    
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* Make sure we have a current record */
@@ -69,7 +69,7 @@ DBN_DECL  /* database number */
       RETURN( dberr(S_NOCR) );
 
    /* Read current record and check for members */
-   if ((dio_read( curr_rec, (char FAR * FAR *)&crloc, NOPGHOLD) == S_OKAY) &&
+   if ((dio_read( curr_rec, (char * *)&crloc, NOPGHOLD) == S_OKAY) &&
        (r_gset(set, crloc, crsp) == S_OKAY) &&
        null_dba(crsp + SP_FIRST))
       db_status = S_EOS; /* end-of-set if curr rec not owner */
index e1a82bd5de1da99344c4dadb9791b10ae207458c..bd3d1c65fa2ac7c796d14813fc0dd72331f749da 100644 (file)
 /* Delete optional key value
 */
 int
-d_keydel(field TASK_PARM DBN_PARM)
-long field; /* key field constant */
-TASK_DECL
-DBN_DECL    /* database number */
+d_keydel(
+long field, /* key field constant */
+int dbn     /* database number */
+)
 {
    int fld;        /* field number */
    int rec, rn;    /* record type of current record */
-   char FAR *rptr;     /* pointer to current record */
-   CONST char FAR *fptr;     /* pointer to field contents */
+   char *rptr;     /* pointer to current record */
+   const char *fptr;     /* pointer to field contents */
    char ckey[256]; /* compound key data */
    int stat;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)
+   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* ensure current record is valid for this field */
-   d_crtype(&rn TASK_PARM DBN_PARM);
+   d_crtype(&rn , dbn);
 
    if (rec != NUM2INT(rn - RECMARK, rt_offset))
       RETURN( dberr(S_BADFIELD) );
@@ -84,7 +84,7 @@ DBN_DECL    /* database number */
       RETURN( dberr(S_NOTOPTKEY) );
 
    /* read current record */
-   if ( (stat = dio_read(curr_rec, (char FAR * FAR *)&rptr, PGHOLD)) == S_OKAY )  {
+   if ( (stat = dio_read(curr_rec, (char * *)&rptr, PGHOLD)) == S_OKAY )  {
       /* Make sure that the key has been stored */
       if ( r_tstopt( fld_ptr, rptr ) == S_OKAY ) {
         if ( dio_release( curr_rec ) != S_OKAY )
index a64365c88550c2e75396e1cc4f1ad492b1abcf53..350220b8213365f3021cf9b6a15eaaf0e06872a6 100644 (file)
 /* Check for optional key existence
 */
 int
-d_keyexist(field TASK_PARM DBN_PARM)
-long field; /* key field constant */
-TASK_DECL
-DBN_DECL    /* database number */
+d_keyexist(
+long field, /* key field constant */
+int dbn     /* database number */
+)
 {
    int fld;        /* field number */
    int rec, rn;    /* record type of current record */
-   char FAR *rptr;     /* pointer to current record */
+   char *rptr;     /* pointer to current record */
    int stat;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)
+   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* ensure current record is valid for this field */
-   d_crtype(&rn TASK_PARM DBN_PARM);
+   d_crtype(&rn , dbn);
 
    if (rec != NUM2INT(rn - RECMARK, rt_offset))
       RETURN( dberr(S_BADFIELD) );
@@ -74,7 +74,7 @@ DBN_DECL    /* database number */
       RETURN( dberr(S_NOTOPTKEY) );
 
    /* read current record */
-   if ( (stat = dio_read(curr_rec, (char FAR * FAR *)&rptr, NOPGHOLD)) == S_OKAY )  {
+   if ( (stat = dio_read(curr_rec, (char * *)&rptr, NOPGHOLD)) == S_OKAY )  {
       /* Check the bit map and return S_OKAY if already stored,
         else S_NOTFOUND */
       if ((stat = r_tstopt(fld_ptr, rptr)) == S_OKAY)
index ffb8f7a7c287ebe71a1b35b95490c2c61dd1768d..9e0257f9a965ca59bb08b66721b5745a411c1801 100644 (file)
@@ -114,24 +114,18 @@ typedef struct {
 #define KEYREPOS 3
 
 /* Internal function prototypes */
-static int node_search(P1(CONST char FAR *) Pi(DB_ADDR FAR *) 
-                                     Pi(NODE FAR *) Pi(int *) Pi(int *) 
-                                     Pi(F_ADDR *));
-static int keycmp(P1(CONST char FAR *) Pi(KEY_SLOT FAR *) 
-                                   Pi(DB_ADDR FAR *));
-static int expand(P1(CONST char FAR *) Pi(DB_ADDR) Pi(F_ADDR));
-static int split_root(P1(NODE FAR *));
-static int split_node(P1(F_ADDR) Pi(NODE FAR *));
-static int delete(P0);
-static void open_slots(P1(NODE FAR *) Pi(int) Pi(int));
-static void close_slots(P1(NODE FAR *) Pi(int) Pi(int));
-static void key_found(P1(DB_ADDR *));
-
-#ifdef  ONE_DB
-#define         prefix   keyno
-#endif
-
-static KEY_INFO FAR *curkey;
+static int node_search(const char *, DB_ADDR *, NODE *, int *, int *, F_ADDR *);
+static int keycmp(const char *, KEY_SLOT *, DB_ADDR *);
+static int expand(const char *, DB_ADDR, F_ADDR);
+static int split_root(NODE *);
+static int split_node(F_ADDR, NODE *);
+static int delete(void);
+static void open_slots(NODE *, int, int);
+static void close_slots(NODE *, int, int);
+static void key_found(DB_ADDR *);
+
+
+static KEY_INFO *curkey;
 static int key_len;
 static int key_data;
 static int slot_len;
@@ -139,26 +133,24 @@ static int max_slots;
 static int mid_slot;
 static int keyfile;
 static INT fldno;
-static FIELD_ENTRY FAR *cfld_ptr;
+static FIELD_ENTRY *cfld_ptr;
 static INT keyno;
-#ifndef         ONE_DB
 static INT prefix;
-#endif
 static int unique;
 
 
 /* Open B-tree key field index processing
 */
 int
-key_open()
+key_open(void)
 {
-   register int fd_lc;                 /* loop control */
+   int fd_lc;                  /* loop control */
    long t;               /* total keys thru level l */
    int  l;               /* level number */
-   register int i;       /* field subscript */
-   register FIELD_ENTRY FAR *fld_ptr;
-   register KEY_INFO FAR *ki_ptr;
-   FILE_ENTRY FAR *file_ptr;
+   int i;       /* field subscript */
+   FIELD_ENTRY *fld_ptr;
+   KEY_INFO *ki_ptr;
+   FILE_ENTRY *file_ptr;
 
    /*           child ptr      key number   */
    key_data = sizeof(F_ADDR) + sizeof(INT);
@@ -173,7 +165,7 @@ key_open()
    if ( no_of_keys ) {
       key_info =
        /* Macro references must be on one line for some compilers */ 
-       (KEY_INFO FAR *)
+       (KEY_INFO *)
        ALLOC(&db_global.Key_info, no_of_keys*sizeof(KEY_INFO), "key_info");
       if ( ! key_info )
         return( dberr(S_NOMEMORY) );
@@ -198,7 +190,7 @@ key_open()
               t *= file_ptr->ft_slots;
            ki_ptr->max_lvls = ++l;
            ki_ptr->node_path =
-               (NODE_PATH FAR *)
+               (NODE_PATH *)
                ALLOC(&ki_ptr->Node_path, l*sizeof(NODE_PATH), db_avname);
            if ( ! ki_ptr->node_path )
               return( dberr(S_NOMEMORY) );
@@ -214,10 +206,10 @@ key_open()
 
 /* Close key field processing
 */
-void key_close()
+void key_close(void)
 {
-   register int k;
-   KEY_INFO FAR *ki_ptr;
+   int k;
+   KEY_INFO *ki_ptr;
 
    if ( key_info ) {
       /* free memory allocated for key functions */
@@ -236,11 +228,12 @@ void key_close()
 /* Initialize key function operation
 */
 int
-key_init(field )
-int field;  /* field number to be processed */
+key_init(
+int field  /* field number to be processed */
+)
 {
-   FIELD_ENTRY FAR *fld_ptr;
-   FILE_ENTRY FAR *file_ptr;
+   FIELD_ENTRY *fld_ptr;
+   FILE_ENTRY *file_ptr;
 
    fld_ptr = &field_table[field];
    if ( fld_ptr->fd_key == NOKEY )
@@ -249,9 +242,7 @@ int field;  /* field number to be processed */
    fldno     = field;
    cfld_ptr  = fld_ptr;
    keyno     = fld_ptr->fd_keyno;
-#ifndef         ONE_DB
    prefix    = keyno - curr_db_table->key_offset;
-#endif
    key_len   = fld_ptr->fd_len;
    keyfile   = fld_ptr->fd_keyfile;
    file_ptr  = &file_table[keyfile];
@@ -270,11 +261,10 @@ int field;  /* field number to be processed */
 /* Reset key_info last status to reposition keys on file "fno" 
 */
 int
-key_reset(fno )
-FILE_NO fno;
+key_reset(FILE_NO fno)
 {
-   register int i;
-   register KEY_INFO FAR *ki_ptr;
+   int i;
+   KEY_INFO *ki_ptr;
 
    for (i = 0, ki_ptr = key_info; i < no_of_keys; ++i, ++ki_ptr) {
       if (((fno == size_ft) || (ki_ptr->keyfile == fno)) && 
@@ -289,18 +279,19 @@ FILE_NO fno;
 /* Locate proper key position on B-tree
 */
 int
-key_locpos(key_val, dba)
-CONST char FAR *key_val; /* key search value */
-DB_ADDR FAR *dba;        /* database address of located key */
+key_locpos(
+const char *key_val, /* key search value */
+DB_ADDR *dba         /* database address of located key */
+)
 {
-   NODE FAR *node;   /* pointer to current node */
+   NODE *node;   /* pointer to current node */
    F_ADDR child;     /* page number of child node */
    F_ADDR pg;        /* page number of current node */
    int stat;         /* saves node search status */
    int slot, slot_pos;
    int match_lvl;    /* lowest level with duplicate key */
-   NODE_PATH FAR *np_ptr;
-   char FAR *node_slot_ptr;
+   NODE_PATH *np_ptr;
+   char *node_slot_ptr;
 
    match_lvl = -1;
    MEM_LOCK(&curkey->Node_path);
@@ -308,7 +299,7 @@ DB_ADDR FAR *dba;        /* database address of located key */
        TRUE;
        ++curkey->level, ++np_ptr, pg = child) {
       /* read in next node */
-      if ( dio_get(pg, (char FAR * FAR *)&node, NOPGHOLD) != S_OKAY ) {
+      if ( dio_get(pg, (char * *)&node, NOPGHOLD) != S_OKAY ) {
          MEM_UNLOCK(&curkey->Node_path);
         return( db_status );
       }
@@ -380,17 +371,17 @@ DB_ADDR FAR *dba;        /* database address of located key */
 
 /* Search node for key value
 */
-static int node_search(key_val, dba, node, slotno, slot_offset, 
-                                        child)
-CONST char FAR *key_val; /* key being searched */
-DB_ADDR FAR *dba;    /* database address included in comparison if not null */
-NODE    FAR *node;   /* node being searched */
-int     *slotno; /* slot number of key position in node */
-int     *slot_offset; /* slot position offset */
-F_ADDR  *child;  /* child ptr of located key */
+static int node_search(
+const char *key_val, /* key being searched */
+DB_ADDR *dba,    /* database address included in comparison if not null */
+NODE    *node,   /* node being searched */
+int     *slotno, /* slot number of key position in node */
+int     *slot_offset, /* slot position offset */
+F_ADDR  *child   /* child ptr of located key */
+)
 {
-   register int cmp, i, l, u, slot_pos;
-   char FAR *node_slot_ptr;
+   int cmp, i, l, u, slot_pos;
+   char *node_slot_ptr;
 
    /* perform binary search on node */
    l = 0;
@@ -398,13 +389,13 @@ F_ADDR  *child;  /* child ptr of located key */
    while ( u >= l ) {
       i = (l + u)/2;
       node_slot_ptr = &node->slots[slot_pos = i*slot_len];
-      if ( (cmp = keycmp(key_val, (KEY_SLOT FAR *)node_slot_ptr, dba)) < 0 )
+      if ( (cmp = keycmp(key_val, (KEY_SLOT *)node_slot_ptr, dba)) < 0 )
         u = i - 1;
       else if ( cmp > 0 )
         l = i + 1;
       else if ( i && !unique && !dba ) {
         /* backup to lowest duplicate in node */
-        while (keycmp(key_val, (KEY_SLOT FAR *)(node_slot_ptr -= slot_len),
+        while (keycmp(key_val, (KEY_SLOT *)(node_slot_ptr -= slot_len),
                       dba) == 0) {
            slot_pos -= slot_len;
            if (--i == 0) goto have_slot;
@@ -435,22 +426,23 @@ have_slot:
 
 /* Compare key value
 */
-static int keycmp(key_val, slot, dba)
-CONST char FAR *key_val;  /* key value */
-KEY_SLOT FAR *slot;    /* pointer to key slot to be compared */
-DB_ADDR FAR *dba;     /* database address included in comparison if not null */
+static int keycmp(
+const char *key_val,  /* key value */
+KEY_SLOT *slot,    /* pointer to key slot to be compared */
+DB_ADDR *dba      /* database address included in comparison if not null */
+)
 {
 /* 
    returns < 0 if key_val < slot
           > 0 if key_val > slot
           = 0 if key_val == slot
 */
-   register int cmp;
+   int cmp;
 
-   if (((cmp = INTcmp((char FAR *)&prefix, (char FAR *)&slot->keyno)) == 0) &&
+   if (((cmp = INTcmp((char *)&prefix, (char *)&slot->keyno)) == 0) &&
        ((cmp = fldcmp(cfld_ptr, key_val, slot->data)) == 0) &&
        dba)
-      cmp = ADDRcmp(dba, (DB_ADDR FAR *)&slot->data[key_len]);
+      cmp = ADDRcmp(dba, (DB_ADDR *)&slot->data[key_len]);
 
    return( cmp );
 }
@@ -459,14 +451,15 @@ DB_ADDR FAR *dba;     /* database address included in comparison if not null */
 /* Scan thru key field
 */
 int
-key_scan(fcn, dba )
-int fcn;       /* next or prev */
-DB_ADDR *dba;  /* db address of scanned record */
+key_scan(
+int fcn,       /* next or prev */
+DB_ADDR *dba   /* db address of scanned record */
+)
 {
    F_ADDR child;
-   NODE FAR *node;
-   NODE_PATH FAR *np_ptr;
-   char FAR *node_slot_ptr;
+   NODE *node;
+   NODE_PATH *np_ptr;
+   char *node_slot_ptr;
 
    /* locate next key on file */
    switch ( curkey->lstat ) {
@@ -488,7 +481,7 @@ DB_ADDR *dba;  /* db address of scanned record */
    }
    MEM_LOCK(&curkey->Node_path);
    np_ptr = &curkey->node_path[curkey->level];
-   if (dio_get(np_ptr->node, (char FAR * FAR *)&node, NOPGHOLD) != S_OKAY) {
+   if (dio_get(np_ptr->node, (char * *)&node, NOPGHOLD) != S_OKAY) {
       MEM_UNLOCK(&curkey->Node_path);
       return( db_status );
    }
@@ -509,7 +502,7 @@ DB_ADDR *dba;  /* db address of scanned record */
         }
         --curkey->level;
         node_slot_ptr = NULL;
-        if (dio_get((--np_ptr)->node, (char FAR * FAR *)&node,
+        if (dio_get((--np_ptr)->node, (char * *)&node,
                     NOPGHOLD) != S_OKAY) {
            MEM_UNLOCK(&curkey->Node_path);
            return( db_status );
@@ -521,7 +514,7 @@ DB_ADDR *dba;  /* db address of scanned record */
         node_slot_ptr = &node->slots[np_ptr->slot*slot_len];
    }
    else do { /* move down to leaf node */
-      if ( dio_get(child, (char FAR * FAR *)&node, NOPGHOLD) != S_OKAY ) {
+      if ( dio_get(child, (char * *)&node, NOPGHOLD) != S_OKAY ) {
         MEM_UNLOCK(&curkey->Node_path);
         return( db_status );
       }
@@ -557,8 +550,7 @@ DB_ADDR *dba;  /* db address of scanned record */
 
 /* Key has been found.  Save appropriate information
 */
-static void key_found(dba)
-DB_ADDR *dba;
+static void key_found(DB_ADDR *dba)
 {
    MEM_LOCK(&curkey->Keyval);
    /* save key value and database address for possible repositioning */
@@ -577,18 +569,19 @@ DB_ADDR *dba;
 /* Find key boundary
 */
 int
-key_boundary(fcn, dba )
-int  fcn;     /* KEYFRST or KEYLAST */
-DB_ADDR *dba; /* to get dba of first or last key */
+key_boundary(
+int  fcn,     /* KEYFRST or KEYLAST */
+DB_ADDR *dba  /* to get dba of first or last key */
+)
 {
    F_ADDR pg;         /* node number */
-   NODE FAR *node;        /* pointer to node contents in cache */
-   int cmp;           /* keycmp result */
+   NODE *node;        /* pointer to node contents in cache */
+   int cmp = 0;       /* keycmp result */
    int match_lvl;     /* lowest level containing matched key */
-   register int lvl;  /* node_path level variable */
-   register int slot; /* slot position in node */
-   register NODE_PATH FAR *np_ptr;
-   register char FAR *node_slot_ptr;
+   int lvl;  /* node_path level variable */
+   int slot; /* slot position in node */
+   NODE_PATH *np_ptr;
+   char *node_slot_ptr;
 
    if ( fcn == KEYFIND ) {
       curkey->lstat = KEYINIT;
@@ -602,7 +595,7 @@ DB_ADDR *dba; /* to get dba of first or last key */
    MEM_LOCK(&curkey->Node_path);
    for (lvl = 0; TRUE; ++lvl) {
       /* read next node */
-      if ( dio_get(pg, (char FAR * FAR *)&node, NOPGHOLD) != S_OKAY ) {
+      if ( dio_get(pg, (char * *)&node, NOPGHOLD) != S_OKAY ) {
         MEM_UNLOCK(&curkey->Node_path);
         return( db_status );
       }
@@ -616,8 +609,8 @@ DB_ADDR *dba; /* to get dba of first or last key */
         for (slot = 0, node_slot_ptr = node->slots;
              slot < node->used_slots;
              ++slot, node_slot_ptr += slot_len) {
-           if ((cmp = INTcmp((char FAR *)&prefix,
-                          (char FAR *)(node_slot_ptr + sizeof(F_ADDR)))) <= 0)
+           if ((cmp = INTcmp((char *)&prefix,
+                          (char *)(node_slot_ptr + sizeof(F_ADDR)))) <= 0)
               break;
         }
       }
@@ -626,8 +619,8 @@ DB_ADDR *dba; /* to get dba of first or last key */
                                 node_slot_ptr = &node->slots[slot*slot_len];
              slot >= 0;
              --slot, node_slot_ptr -= slot_len) {
-           if ((cmp = INTcmp((char FAR *)&prefix,
-                          (char FAR *)(node_slot_ptr + sizeof(F_ADDR)))) >= 0)
+           if ((cmp = INTcmp((char *)&prefix,
+                          (char *)(node_slot_ptr + sizeof(F_ADDR)))) >= 0)
               break;
         }
       }
@@ -667,10 +660,11 @@ DB_ADDR *dba; /* to get dba of first or last key */
 /* Insert key field into B-tree
 */
 int
-key_insert(fld, key_val, dba )
-int fld;      /* key field number */
-CONST char FAR *key_val; /* key value */
-DB_ADDR dba;  /* record's database address */
+key_insert(
+int fld,      /* key field number */
+const char *key_val, /* key value */
+DB_ADDR dba   /* record's database address */
+)
 {
    int stat;
 
@@ -702,21 +696,22 @@ DB_ADDR dba;  /* record's database address */
 
 /* Expand node for new key
 */
-static int expand(key_val, dba, brother )
-CONST char FAR *key_val;    /* key value */
-DB_ADDR dba;     /* record's database address */
-F_ADDR brother;  /* page number of brother node */
+static int expand(
+const char *key_val,    /* key value */
+DB_ADDR dba,     /* record's database address */
+F_ADDR brother   /* page number of brother node */
+)
 {
    F_ADDR pg;
-   NODE FAR *node;
-   NODE_PATH FAR *np_ptr;
+   NODE *node;
+   NODE_PATH *np_ptr;
    int slot_pos;
-   register char FAR *node_slot_ptr;
+   char *node_slot_ptr;
 
    MEM_LOCK(&curkey->Node_path);
    np_ptr = &curkey->node_path[curkey->level];
 
-   if (dio_get(pg = np_ptr->node, (char FAR * FAR *)&node, PGHOLD) != S_OKAY) {
+   if (dio_get(pg = np_ptr->node, (char * *)&node, PGHOLD) != S_OKAY) {
       MEM_UNLOCK(&curkey->Node_path);
       return( db_status );
    }
@@ -762,22 +757,21 @@ F_ADDR brother;  /* page number of brother node */
 
 /* Split node into two nodes
 */
-static int split_node(l_pg, l_node )
-F_ADDR l_pg;  /* left node's page number */
-NODE FAR *l_node; /* left node buffer */
+static int split_node(
+F_ADDR l_pg,  /* left node's page number */
+NODE *l_node  /* left node buffer */
+)
 {
    F_ADDR r_pg;
-   NODE FAR *r_node;
+   NODE *r_node;
    char key_val[256];
    DB_ADDR dba;
-   char FAR *l_node_slot_ptr;
+   char *l_node_slot_ptr;
 
    /* extract middle key */
    l_node_slot_ptr = &l_node->slots[mid_slot*slot_len];
    bytecpy(&prefix, l_node_slot_ptr + sizeof(F_ADDR), sizeof(INT));
-#ifndef         ONE_DB
    keyno = prefix + curr_db_table->key_offset;
-#endif
    fldno = key_info[keyno].fldno;
    cfld_ptr = &field_table[fldno];
    key_len = cfld_ptr->fd_len;
@@ -789,7 +783,7 @@ NODE FAR *l_node; /* left node buffer */
 
    /* allocate new right node */
    if ((dio_pzalloc(keyfile, &r_pg) != S_OKAY) ||
-       (dio_get(r_pg, (char FAR * FAR *)&r_node, PGHOLD) != S_OKAY))
+       (dio_get(r_pg, (char * *)&r_node, PGHOLD) != S_OKAY))
       return( db_status );
 
    /* copy slots from left node at slot mid_slot+1 into right node */
@@ -809,19 +803,18 @@ NODE FAR *l_node; /* left node buffer */
 
 /* Split root node
 */
-static int split_root(node )
-NODE FAR *node;
+static int split_root(NODE *node)
 {
    F_ADDR l_pg, r_pg;
-   NODE FAR *l_node, FAR *r_node;
-   register int slot_pos;
-   char FAR *node_slot_ptr;
+   NODE *l_node, *r_node;
+   int slot_pos;
+   char *node_slot_ptr;
 
    /* allocate two new nodes */
    if ((dio_pzalloc(keyfile, &l_pg) != S_OKAY) ||
        (dio_pzalloc(keyfile, &r_pg) != S_OKAY) ||
-       (dio_get(l_pg, (char FAR * FAR *)&l_node, PGHOLD) != S_OKAY) ||
-       (dio_get(r_pg, (char FAR * FAR *)&r_node, PGHOLD) != S_OKAY))
+       (dio_get(l_pg, (char * *)&l_node, PGHOLD) != S_OKAY) ||
+       (dio_get(r_pg, (char * *)&r_node, PGHOLD) != S_OKAY))
       return( db_status );
 
    /* copy 0..max_slots/2-1 keys from root into left node */
@@ -858,10 +851,7 @@ NODE FAR *node;
 /* Delete key from B-tree
 */
 int
-key_delete(fld, key_val, dba )
-int fld;
-char CONST FAR *key_val;
-DB_ADDR dba;
+key_delete(int fld, char const *key_val, DB_ADDR dba)
 {
    int stat;
 
@@ -888,25 +878,25 @@ DB_ADDR dba;
 
 /* Delete key at current node_path position
 */
-static int delete()
+static int delete(void)
 {
    F_ADDR pg, p_pg, l_pg, r_pg;
-   NODE FAR *node;
-   NODE FAR *p_node;
-   NODE FAR *l_node;
-   NODE FAR *r_node;
+   NODE *node;
+   NODE *p_node;
+   NODE *l_node;
+   NODE *r_node;
    int amt, slot_pos;
-   NODE_PATH FAR *np_ptr;
-   char FAR *node_slot_ptr;
-   char FAR *p_node_slot_ptr;
-   char FAR *l_node_slot_ptr;
-   char FAR *r_node_slot_ptr;
+   NODE_PATH *np_ptr;
+   char *node_slot_ptr;
+   char *p_node_slot_ptr;
+   char *l_node_slot_ptr;
+   char *r_node_slot_ptr;
 
    MEM_LOCK(&curkey->Node_path);
    np_ptr = &curkey->node_path[curkey->level];
 
    /* read node containing key to be deleted */
-   if (dio_get(pg = np_ptr->node, (char FAR * FAR *)&node, PGHOLD) != S_OKAY) {
+   if (dio_get(pg = np_ptr->node, (char * *)&node, PGHOLD) != S_OKAY) {
       MEM_UNLOCK(&curkey->Node_path);
       return( db_status );
    }
@@ -919,7 +909,7 @@ static int delete()
       /* find leftmost descendent of right sub-tree */
       ++np_ptr->slot;
       do {
-        if ( dio_get(r_pg, (char FAR * FAR *)&r_node, NOPGHOLD) != S_OKAY ) {
+        if ( dio_get(r_pg, (char * *)&r_node, NOPGHOLD) != S_OKAY ) {
            MEM_UNLOCK(&curkey->Node_path);
            return( db_status );
         }
@@ -940,7 +930,7 @@ static int delete()
       /* (this is more efficient than a recursive call) */
       slot_pos = 0;
       node_slot_ptr = node->slots;
-      if (dio_get(pg = np_ptr->node, (char FAR * FAR *)&node, PGHOLD) != S_OKAY) {
+      if (dio_get(pg = np_ptr->node, (char * *)&node, PGHOLD) != S_OKAY) {
         MEM_UNLOCK(&curkey->Node_path);
         return( db_status );
       }
@@ -951,7 +941,7 @@ shrink: /* delete key from leaf (shrink node ) */
    /* check if necessary to adjust nodes */
    if ((curkey->level > 0) && (node->used_slots < mid_slot)) {
       /* read in parent node */
-      if (dio_get(p_pg = (np_ptr - 1)->node, (char FAR * FAR *)&p_node,
+      if (dio_get(p_pg = (np_ptr - 1)->node, (char * *)&p_node,
                  PGHOLD) != S_OKAY) {
         MEM_UNLOCK(&curkey->Node_path);
         return( db_status );
@@ -970,7 +960,7 @@ shrink: /* delete key from leaf (shrink node ) */
         /* read left node */
         p_node_slot_ptr = &p_node->slots[slot_pos];
         bytecpy(&l_pg, p_node_slot_ptr, sizeof(F_ADDR));
-        if ( dio_get(l_pg, (char FAR * FAR *)&l_node, PGHOLD) != S_OKAY ) {
+        if ( dio_get(l_pg, (char * *)&l_node, PGHOLD) != S_OKAY ) {
            MEM_UNLOCK(&curkey->Node_path);
            return( db_status );
         }
@@ -983,7 +973,7 @@ shrink: /* delete key from leaf (shrink node ) */
         /* read right node */
         p_node_slot_ptr = &p_node->slots[slot_pos + slot_len];
         bytecpy(&r_pg, p_node_slot_ptr, sizeof(F_ADDR));
-        if (dio_get(r_pg, (char FAR * FAR *)&r_node, PGHOLD) != S_OKAY) {
+        if (dio_get(r_pg, (char * *)&r_node, PGHOLD) != S_OKAY) {
            MEM_UNLOCK(&curkey->Node_path);
            return( db_status );
         }
@@ -1102,13 +1092,10 @@ shrink: /* delete key from leaf (shrink node ) */
 
 /* Open n slots in node
 */
-static void open_slots(node, slot_pos, n)
-NODE FAR *node;
-int slot_pos;
-int n;
+static void open_slots(NODE *node, int slot_pos, int n)
 {
-   register char FAR *dst, FAR *src;
-   register int amt, w, nw;
+   char *dst, *src;
+   int amt, w, nw;
 
    nw = NODE_WIDTH(node);
    w = n*slot_len;
@@ -1125,13 +1112,10 @@ int n;
 
 /* Close n slots in node
 */
-static void close_slots(node, slot_pos, n)
-NODE FAR *node;
-int slot_pos;
-int n;
+static void close_slots(NODE *node, int slot_pos, int n)
 {
-   register char FAR *dst, FAR *src;
-   register int w, amt;
+   char *dst, *src;
+   int w, amt;
 
    node->used_slots -= n;
 
@@ -1149,19 +1133,17 @@ int n;
 /* Read value of last key scanned
 */
 int
-d_keyread(key_val TASK_PARM)
-char FAR *key_val;
-TASK_DECL
+d_keyread(char *key_val)
 {
-   register int kt_lc;                 /* loop control */
+   int kt_lc;                  /* loop control */
 #ifndef         NO_FLOAT
    float fv;
    double dv;
 #endif
-   char FAR *fptr;
-   char FAR *kptr;
-   FIELD_ENTRY FAR *fld_ptr;
-   register KEY_ENTRY FAR *key_ptr;
+   char *fptr;
+   char *kptr;
+   FIELD_ENTRY *fld_ptr;
+   KEY_ENTRY *key_ptr;
 
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
@@ -1224,20 +1206,21 @@ TASK_DECL
 /* Build compound key value from record
 */
 int
-key_bldcom(fld, rec, key, cflag )
-int   fld; /* compound key field number */
-char FAR *rec; /* ptr to record data */
-char FAR *key; /* ptr to array to recv constructed key */
-int cflag; /* TRUE to compliment compound descending keys */
+key_bldcom(
+int   fld, /* compound key field number */
+char *rec, /* ptr to record data */
+char *key, /* ptr to array to recv constructed key */
+int cflag  /* TRUE to compliment compound descending keys */
+)
 {
-   register int kt_lc;                 /* loop control */
+   int kt_lc;                  /* loop control */
 #ifndef         NO_FLOAT
    float fv;
    double dv;
 #endif
-   char FAR *fptr;
-   FIELD_ENTRY FAR *fld_ptr, FAR *kfld_ptr;
-   register KEY_ENTRY FAR *key_ptr;
+   char *fptr;
+   FIELD_ENTRY *fld_ptr, *kfld_ptr;
+   KEY_ENTRY *key_ptr;
 
    /* clear key area */
    fld_ptr = &field_table[fld];
@@ -1288,10 +1271,7 @@ int cflag; /* TRUE to compliment compound descending keys */
 
 /* Complement and copy bytes
 */
-void key_cmpcpy(s1, s2, n)
-register char FAR *s1;
-register char FAR *s2;
-register INT n;
+void key_cmpcpy(char *s1, char *s2, INT n)
 {
    while ( n-- ) {
       *s1++ = ~(*s2++);
index 0c377bf4677e0cfdd68d89746a2ba2bea0b5edd1..ee878fb45744d9ec1b7afddda956bde0cd983814 100644 (file)
 #include "dbtype.h"
 
 /* Internal function prototypes */
-static void chk_desc_key(P1(int) Pi(FIELD_ENTRY FAR *) 
-                                       Pi(CONST char FAR *) Pi(char FAR *));
+static void chk_desc_key(P1(int) Pi(FIELD_ENTRY *) 
+                                       Pi(const char *) Pi(char *));
 
 /* Find record thru key field
 */
 int
-d_keyfind(field, fldval TASK_PARM DBN_PARM)
-long  field;  /* field constant */
-CONST char FAR *fldval; /* value of the data field */
-TASK_DECL
-DBN_DECL      /* database number */
+d_keyfind(
+long  field,  /* field constant */
+const char *fldval, /* value of the data field */
+int dbn       /* database number */
+)
 {
    int fld, rec;
    DB_ADDR dba;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
    char ckey[256];
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) ||
+   if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) ||
        /* initialize key function operation */
        (key_init(fld) != S_OKAY))
       RETURN( db_status );
@@ -91,39 +91,30 @@ DBN_DECL      /* database number */
       /* set current record to found db addr */
       curr_rec = dba;
    }
-#ifndef         NO_TIMESTAMP
-   /* set timestamp */
-   if ( curr_rec && db_tsrecs )
-      d_utscr( &cr_time TASK_PARM );
-#endif
    RETURN( db_status = S_OKAY );
 }
 
 
 /* Check compound key value for descending fields
 */
-static void chk_desc_key(fld, fld_ptr, fldval, ckey)
-int fld;
-FIELD_ENTRY FAR *fld_ptr;
-CONST char FAR *fldval;
-char FAR *ckey;
+static void chk_desc_key(int fld, FIELD_ENTRY *fld_ptr, const char *fldval, char *ckey)
 {
-   register int kt_lc;                 /* loop control */
+   int kt_lc;                  /* loop control */
 #ifndef         NO_FLOAT
    float fv;
    double dv;
 #endif
-   char FAR *fptr;
-   char FAR *tptr;
-   FIELD_ENTRY FAR *kfld_ptr;
-   register KEY_ENTRY FAR *key_ptr;
+   char *fptr;
+   char *tptr;
+   FIELD_ENTRY *kfld_ptr;
+   KEY_ENTRY *key_ptr;
 
    /* complement descending compound key values */
    for (kt_lc = size_kt - fld_ptr->fd_ptr,
                                        key_ptr = &key_table[fld_ptr->fd_ptr];
        (--kt_lc >= 0) && (key_ptr->kt_key == fld); ++key_ptr) {
       kfld_ptr = &field_table[key_ptr->kt_field];
-      fptr = (char FAR *)fldval + key_ptr->kt_ptr;
+      fptr = (char *)fldval + key_ptr->kt_ptr;
       tptr = ckey + key_ptr->kt_ptr;
       if ( key_ptr->kt_sort == 'd' ) {
         switch ( kfld_ptr->fd_type ) {
index 7890c7158afb1820c69a4e398ae3000e789a3c3e..439225f7572dfff2f3658b495cd0b29ac95092fd 100644 (file)
 /* Find first key 
 */
 int
-d_keyfrst(field TASK_PARM DBN_PARM)
-long field;   /* field constant */
-TASK_DECL
-DBN_DECL      /* database number */
+d_keyfrst(
+long field,   /* field constant */
+int dbn       /* database number */
+)
 {
    int fld, rec;
    DB_ADDR dba;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) ||
+   if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) ||
        /* initialize key function operation */
        (key_init(fld) != S_OKAY))
       RETURN( db_status );
 
    if ( key_boundary(KEYFRST, &dba) == S_OKAY ) {
       curr_rec = dba;
-#ifndef         NO_TIMESTAMP
-      /* set timestamp */
-      if ( db_tsrecs )
-        d_utscr( &cr_time TASK_PARM );
-#endif
    }
    RETURN( db_status );
 }
index 8f924fb1eab4baa8c008969384fac8c1a81e4995..e86325e2ccfd48b0a67541e5d94b32f2b62a69f2 100644 (file)
 /* Find last key 
 */
 int
-d_keylast(field TASK_PARM DBN_PARM)
-long field;   /* field constant */
-TASK_DECL
-DBN_DECL     /* database number */
+d_keylast(
+long field,   /* field constant */
+int dbn      /* database number */
+)
 {
    int fld, rec;
    DB_ADDR dba;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) ||
+   if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) ||
        /* initialize key function operation */
        (key_init(fld) != S_OKAY))
       RETURN( db_status );
 
    if ( key_boundary(KEYLAST, &dba) == S_OKAY ) {
       curr_rec = dba;
-#ifndef         NO_TIMESTAMP
-      /* set timestamp */
-      if ( db_tsrecs )
-        d_utscr( &cr_time TASK_PARM );
-#endif
    }
    RETURN( db_status );
 }
index 8f04edaccefb62fc4483aac7a69d8d41eac1fa67..7dc1c3e35f4d14a71d6b9ab49f50bef9c28f73cd 100644 (file)
 /* Find next record thru key field
 */
 int
-d_keynext(field TASK_PARM DBN_PARM)
-long field;  /* field constant */
-TASK_DECL
-DBN_DECL     /* database number */
+d_keynext(
+long field,  /* field constant */
+int dbn      /* database number */
+)
 {
    int fld, rec;
    DB_ADDR dba;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) ||
+   if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) ||
        /* initialize key function operation */
        (key_init(fld) != S_OKAY))
       RETURN( db_status );
 
    if ( key_scan(KEYNEXT, &dba) == S_OKAY ) {
       curr_rec = dba;
-#ifndef         NO_TIMESTAMP
-      /* set timestamp */
-      if ( db_tsrecs )
-        d_utscr( &cr_time TASK_PARM );
-#endif
    }
    RETURN( db_status );
 }
index 86cdd25ca7c5e51102bf8f2ec1f17ea792a4e244..1334c99065066e7da52c6dc72e4fb2b29384e789 100644 (file)
 /* Find previous record thru key field
 */
 int
-d_keyprev(field TASK_PARM DBN_PARM)
-long field;   /* field constant */
-TASK_DECL
-DBN_DECL     /* database number */
+d_keyprev(
+long field,   /* field constant */
+int dbn      /* database number */
+)
 {
    int fld, rec;
    DB_ADDR dba;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY) ||
+   if ((nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY) ||
        /* initialize key function operation */
        (key_init(fld) != S_OKAY))
       RETURN( db_status );
 
    if ( key_scan(KEYPREV, &dba) == S_OKAY ) {
       curr_rec = dba;
-#ifndef         NO_TIMESTAMP
-      /* set timestamp */
-      if ( db_tsrecs )
-        d_utscr( &cr_time TASK_PARM );
-#endif
    }
    RETURN( db_status );
 }
index 09c32ce11a77fa5379c5a01da15a84b8539b67d8..9327d9f14073b9849eb5f678430101dd3c77ec78 100644 (file)
 /* Store optional key value
 */
 int
-d_keystore(field TASK_PARM DBN_PARM)
-long field; /* key field constant */
-TASK_DECL
-DBN_DECL    /* database number */
+d_keystore(
+long field, /* key field constant */
+int dbn     /* database number */
+)
 {
    int fld;        /* field number */
    int rec, rn;    /* record type of current record */
-   char FAR *rptr;     /* pointer to current record */
-   char FAR *fptr;     /* pointer to field contents */
+   char *rptr;     /* pointer to current record */
+   char *fptr;     /* pointer to field contents */
    char ckey[256]; /* compound key */
    int stat;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)
+   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* Make sure we have a current record */
@@ -77,7 +77,7 @@ DBN_DECL    /* database number */
       RETURN( dberr(S_NOCR) );
 
    /* ensure current record is valid for this field */
-   d_crtype(&rn TASK_PARM DBN_PARM);
+   d_crtype(&rn , dbn);
 
    if (rec != NUM2INT(rn - RECMARK, rt_offset))
       RETURN( dberr(S_BADFIELD) );
@@ -87,7 +87,7 @@ DBN_DECL    /* database number */
       RETURN( dberr(S_NOTOPTKEY) );
 
    /* read current record */
-   if ( (stat = dio_read(curr_rec, (char FAR * FAR *)&rptr, PGHOLD)) == S_OKAY )  {
+   if ( (stat = dio_read(curr_rec, (char * *)&rptr, PGHOLD)) == S_OKAY )  {
       /* Make sure that the key has not already been stored */
       if ( (stat = r_tstopt( fld_ptr, rptr )) != S_OKAY ) {
         if ( dio_release( curr_rec ) != S_OKAY )
index 16e2672fbfb21f21d107247b9ab1b51c8033b1ea..6f2d5e02018026a61b91291c677eb757f6116b41 100644 (file)
 
 /* Internal function prototypes */
 static int rec_okay(P1(int) Pi(int *) 
-                                  Pi(RECORD_ENTRY FAR * FAR *));
-static int ctblcmp(P1(CONST unsigned char FAR*)
-                                  Pi(CONST unsigned char FAR*) Pi(int));
+                                  Pi(RECORD_ENTRY * *));
+static int ctblcmp(P1(const unsigned char FAR*)
+                                  Pi(const unsigned char FAR*) Pi(int));
 
-#ifndef         ONE_DB
 /* Check for valid db number and set curr_db, curr_db_table and curr_rn_table
 */
 int
-dbn_check(dbn)
-int dbn;
+dbn_check(int dbn)
 {
    if ( ! dbopen ) 
       return( dberr(S_DBOPEN) );
@@ -88,17 +86,13 @@ int dbn;
    }
    return( db_status = S_OKAY );
 }
-#endif
 
 
 /* Check for valid (external) set number and return (internal) set number
    and set_table pointer.
 */
 int
-nset_check(nset, set, set_ptr )
-register int nset;
-int *set;
-SET_ENTRY FAR * FAR *set_ptr;
+nset_check(int nset, int *set, SET_ENTRY **set_ptr)
 {
    nset -= SETMARK;
    if ((nset < 0) || (nset >= TABLE_SIZE(Size_st)))
@@ -113,17 +107,13 @@ SET_ENTRY FAR * FAR *set_ptr;
    and field numbers and pointers.
 */
 int
-nfld_check(nfld, rec, fld, rec_ptr, fld_ptr )
-long nfld;
-int *rec;
-int *fld;
-RECORD_ENTRY FAR * FAR *rec_ptr;
-FIELD_ENTRY FAR * FAR *fld_ptr;
+nfld_check(long nfld, int *rec, int *fld, RECORD_ENTRY **rec_ptr,
+           FIELD_ENTRY **fld_ptr)
 {
    int trec;
    int tfld;
 
-   if (!rec_okay(trec = (int)(nfld/FLDMARK), rec, (RECORD_ENTRY FAR * FAR *)rec_ptr) ||
+   if (!rec_okay(trec = (int)(nfld/FLDMARK), rec, (RECORD_ENTRY * *)rec_ptr) ||
        ((tfld = (int)(nfld - trec*FLDMARK)) < 0) ||
        (tfld >= TABLE_SIZE(Size_fd)))
       return( dberr(S_INVFLD) );
@@ -138,12 +128,9 @@ FIELD_ENTRY FAR * FAR *fld_ptr;
    number and pointer.
 */
 int
-nrec_check(nrec, rec, rec_ptr)
-int nrec;
-int *rec;
-RECORD_ENTRY FAR * FAR *rec_ptr;
+nrec_check(int nrec, int *rec, RECORD_ENTRY **rec_ptr)
 {
-   if (rec_okay(nrec - RECMARK, rec, (RECORD_ENTRY FAR * FAR *)rec_ptr))
+   if (rec_okay(nrec - RECMARK, rec, (RECORD_ENTRY * *)rec_ptr))
       db_status = S_OKAY;
    else
       dberr(S_INVREC);
@@ -153,10 +140,7 @@ RECORD_ENTRY FAR * FAR *rec_ptr;
 
 /* Internal record number check
 */
-static int rec_okay(nrec, rec, rec_ptr)
-register int nrec;
-int *rec;
-RECORD_ENTRY FAR * FAR *rec_ptr;
+static int rec_okay(int nrec, int *rec, RECORD_ENTRY **rec_ptr)
 {
    if ((nrec < 0) || (nrec >= TABLE_SIZE(Size_rt)))
       return (FALSE);
@@ -168,18 +152,19 @@ RECORD_ENTRY FAR * FAR *rec_ptr;
 
 /* Compare values of two db_VISTA data fields
 */
-int fldcmp(fld_ptr, f1, f2)
-FIELD_ENTRY FAR *fld_ptr;
-CONST char FAR *f1;   /* pointer to field 1 */
-CONST char FAR *f2;   /* pointer to field 2 */
+int fldcmp(
+FIELD_ENTRY *fld_ptr,
+const char *f1,   /* pointer to field 1 */
+const char *f2    /* pointer to field 2 */
+)
 /*
    returns < 0 if f1 < f2,
           = 0 if f1 == f2,
           > 0 if f1 > f2
 */
 {
-   register int kt_lc;                 /* loop control */
-   int i, k, elt, result, len, cur_len, sub_len, entries;
+   int kt_lc;                  /* loop control */
+   int i, k, elt, result = 0, len, cur_len, sub_len, entries;
 #ifdef DS
    int ui1, ui2;
    long ul1, ul2;
@@ -196,10 +181,10 @@ CONST char FAR *f2;   /* pointer to field 2 */
    float F1, F2;
    double d1, d2;
 #endif
-   FIELD_ENTRY FAR *fld_max;
-   FIELD_ENTRY FAR *sfld_ptr;
-   KEY_ENTRY FAR *key_ptr;
-   INT FAR *dim_ptr;
+   FIELD_ENTRY *fld_max;
+   FIELD_ENTRY *sfld_ptr;
+   KEY_ENTRY *key_ptr;
+   INT *dim_ptr;
 
    len = fld_ptr->fd_len;
 
@@ -216,12 +201,8 @@ CONST char FAR *f2;   /* pointer to field 2 */
            return ( bytecmp(f1, f2, len) );
         else if ( fld_ptr->fd_dim[0] )
         {
-#ifdef NO_COUNTRY
-           return ( strncmp(f1, f2, len) );
-#else
            if ( db_global.ctbl_activ ) return ( ctblcmp(f1, f2, len) );
            else return ( strncmp(f1, f2, len) );
-#endif
         }
         else
            return ( (int)(*f1) - (int)(*f2) );
@@ -293,8 +274,8 @@ CONST char FAR *f2;   /* pointer to field 2 */
 #endif
       case DBADDR:
         for ( result = elt = 0; result == 0 && elt < entries; ++elt ) {
-           result = ADDRcmp((DB_ADDR FAR *)(f1+(elt*sizeof(DB_ADDR))),
-                            (DB_ADDR FAR *)(f2+(elt*sizeof(DB_ADDR))));
+           result = ADDRcmp((DB_ADDR *)(f1+(elt*sizeof(DB_ADDR))),
+                            (DB_ADDR *)(f2+(elt*sizeof(DB_ADDR))));
         }
         break;
       case GROUPED:
@@ -327,8 +308,7 @@ CONST char FAR *f2;   /* pointer to field 2 */
 
 /* compare the INT variables
 */
-int INTcmp( i1, i2 )
-CONST char FAR *i1, FAR *i2;
+int INTcmp(const char *i1, const char *i2)
 {
    INT I1, I2;
 
@@ -340,8 +320,7 @@ CONST char FAR *i1, FAR *i2;
 
 /* compare two DB_ADDR variables 
 */
-int ADDRcmp( d1, d2 )
-CONST DB_ADDR FAR *d1, FAR *d2;
+int ADDRcmp(const DB_ADDR *d1, const DB_ADDR *d2)
 {
    DB_ADDR a1, a2;
    FILE_NO f1, f2;
@@ -370,8 +349,7 @@ CONST DB_ADDR FAR *d1, FAR *d2;
 /* check for empty DB_ADDR
 */
 int
-null_dba( db_addr )
-CONST char FAR *db_addr;
+null_dba(const char *db_addr)
 {
    DB_ADDR dba;
 
@@ -383,8 +361,7 @@ CONST char FAR *db_addr;
 /* check for valid DB_ADDR
 */
 int
-check_dba( dba )
-DB_ADDR dba;
+check_dba(DB_ADDR dba)
 {
    FILE_NO fno;
    F_ADDR  rno, last;
@@ -405,13 +382,13 @@ DB_ADDR dba;
    return( db_status );
 }
 
-#ifndef NO_COUNTRY
 /* Compare two strings with sorting according to char-table
 */
-static int ctblcmp(s, t, n)
-CONST unsigned char FAR *s;  /* String 1 */
-CONST unsigned char FAR *t;  /* String 2 */
-int    n;   /* Max. String length */
+static int ctblcmp(
+const unsigned char *s,  /* String 1 */
+const unsigned char *t,  /* String 2 */
+int    n   /* Max. String length */
+)
 {
    int x;
    unsigned char   f1, f2, x1, x2;
@@ -467,5 +444,4 @@ int    n;   /* Max. String length */
    }
    return(0);
 }
-#endif
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin libfcns.c */
index fae91c7497e21cfa631eec69faad699238bffb2e..49e71c4161354061fe902b16adbfbee7ea38748e 100644 (file)
@@ -39,7 +39,7 @@
  */
 /* The functions in this file are defined in alloc.c */
 
-typedef struct {struct ll_elem FAR *ptr; LOCK_DESC} LL_P;
+typedef struct {struct ll_elem *ptr; LOCK_DESC} LL_P;
 
 typedef struct ll_elem {
    LL_P next;
@@ -51,16 +51,16 @@ typedef struct ll_elem {
 typedef struct {
    LL_P head;
    LL_P tail;
-   LL_P FAR *curr;
+   LL_P *curr;
 } llist;
 
 #define LLIST_INIT()    { POINTER_INIT(), POINTER_INIT(), NULL }
 
-BOOLEAN ll_access(P1(llist FAR *));
-int ll_append(P1(llist FAR *) Pi(CHAR_P FAR *));
+BOOLEAN ll_access(P1(llist *));
+int ll_append(P1(llist *) Pi(CHAR_P *));
 #define ll_deaccess(ll)            /**/
-CHAR_P FAR *ll_first(P1(llist FAR *));
-void ll_free(P1(llist FAR *));
-CHAR_P FAR *ll_next(P1(llist FAR *));
-int ll_prepend(P1(llist FAR *) Pi(CHAR_P FAR *));
+CHAR_P *ll_first(P1(llist *));
+void ll_free(P1(llist *));
+CHAR_P *ll_next(P1(llist *));
+int ll_prepend(P1(llist *) Pi(CHAR_P *));
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin ll.h */
index 94e60eec97121fd900ee2a370cd90766cff410b4..84aca043d1441e3d06aaba73ea0a63a7f6b507ef 100644 (file)
 /* Set the value of a key field
 */
 int
-d_setkey( field, fldvalue TASK_PARM DBN_PARM )
-long field;
-CONST char FAR *fldvalue;
-TASK_DECL
-DBN_DECL
+d_setkey(long field, const char *fldvalue, int dbn)
 {
-   SK_P FAR *sk_ptr;
+   SK_P *sk_ptr;
    SK_P sk_p;
    int fld, rec;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO));
 
-   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY FAR * FAR *)&rec_ptr, (FIELD_ENTRY FAR * FAR *)&fld_ptr) != S_OKAY)
+   if (nfld_check(field, &rec, &fld, (RECORD_ENTRY * *)&rec_ptr, (FIELD_ENTRY * *)&fld_ptr) != S_OKAY)
       RETURN( db_status );
 
    if ( fld_ptr->fd_key == 'n' )
       RETURN( dberr(S_NOTKEY) );
 
    ll_access(&sk_list);
-   while ((sk_ptr = (SK_P FAR *)ll_next(&sk_list)) != NULL) {
+   while ((sk_ptr = (SK_P *)ll_next(&sk_list)) != NULL) {
       if ( sk_ptr->ptr->sk_fld == fld ) {
          MEM_LOCK(&sk_ptr->ptr->sk_val);
         if ( fld_ptr->fd_type != CHARACTER || fld_ptr->fd_dim[1] )
@@ -90,10 +86,10 @@ DBN_DECL
       }
    }
    /* need to allocate a slot for a new fld */
-   sk_p.ptr = (struct sk FAR *)ALLOC(&sk_p, sizeof(struct sk), "sk_ptr->ptr");
+   sk_p.ptr = (struct sk *)ALLOC(&sk_p, sizeof(struct sk), "sk_ptr->ptr");
    if ( sk_p.ptr == NULL )
       RETURN( dberr( S_NOMEMORY ) );
-   if ( ll_prepend(&sk_list, (CHAR_P FAR *)&sk_p) != S_OKAY ) {
+   if ( ll_prepend(&sk_list, (CHAR_P *)&sk_p) != S_OKAY ) {
       RETURN( db_status );
    }
    sk_p.ptr->sk_fld = fld;
@@ -118,12 +114,12 @@ DBN_DECL
 
 /* Free the memory allocated for the sk_list
 */
-int sk_free()
+int sk_free(void)
 {
-   SK_P FAR *sk_ptr;
+   SK_P *sk_ptr;
 
    ll_access(&sk_list);
-   while ((sk_ptr = (SK_P FAR *)ll_next(&sk_list)) != NULL) {
+   while ((sk_ptr = (SK_P *)ll_next(&sk_list)) != NULL) {
       MEM_UNLOCK(&sk_ptr->ptr->sk_val);
       FREE(&sk_ptr->ptr->sk_val);
    }
@@ -136,27 +132,21 @@ int sk_free()
 /* Create a new empty record
 */
 int
-d_makenew( nrec TASK_PARM DBN_PARM )
-int nrec;
-TASK_DECL
-DBN_DECL
+d_makenew(int nrec, int dbn)
 {
-#ifndef         NO_TIMESTAMP
-   ULONG timestamp;
-#endif
    DB_ADDR db_addr;
    INT recnum, fld, stat;
    FILE_NO file;
    F_ADDR rec_addr;
-   char FAR *ptr;
-   SK_P FAR *sk_ptr;
-   RECORD_ENTRY FAR *rec_ptr;
-   FIELD_ENTRY FAR *fld_ptr;
+   char *ptr;
+   SK_P *sk_ptr;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
    int fldtot;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if (nrec_check(nrec, &nrec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY)
+   if (nrec_check(nrec, &nrec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY)
       RETURN( db_status );
 
    recnum = NUM2EXT(nrec, rt_offset);
@@ -172,7 +162,7 @@ DBN_DECL
       if ((fld_ptr->fd_key == UNIQUE) && !(fld_ptr->fd_flags & OPTKEYMASK)) {
         /* locate the key value in the set_key table */
         ll_access(&sk_list);
-        while (((sk_ptr = (SK_P FAR *)ll_next(&sk_list)) != NULL) &&
+        while (((sk_ptr = (SK_P *)ll_next(&sk_list)) != NULL) &&
                (sk_ptr->ptr->sk_fld != fld))
            ;                           /* NOP */
         if (sk_ptr == NULL) {
@@ -181,7 +171,7 @@ DBN_DECL
         }
         MEM_LOCK(&sk_ptr->ptr->sk_val);
         d_keyfind(FLDMARK*(long)recnum + (long)(fld - rec_ptr->rt_fields),
-                  sk_ptr->ptr->sk_val.ptr TASK_PARM DBN_PARM);
+                  sk_ptr->ptr->sk_val.ptr , dbn);
         MEM_UNLOCK(&sk_ptr->ptr->sk_val);
         curr_rec = db_addr;
          ll_deaccess(&sk_list);
@@ -198,7 +188,7 @@ DBN_DECL
    db_addr |= rec_addr;
 
    /* read record */
-   if ( dio_read( db_addr, (char FAR * FAR *)&ptr, PGHOLD) != S_OKAY )
+   if ( dio_read( db_addr, (char * *)&ptr, PGHOLD) != S_OKAY )
       RETURN( db_status );
 
    /* zero fill the record */
@@ -207,15 +197,6 @@ DBN_DECL
    /* place the record number and db_addr at the start of the record */
    bytecpy( ptr, &recnum, sizeof(INT) );
    bytecpy( ptr+sizeof(INT), &db_addr, DB_ADDR_SIZE);
-#ifndef         NO_TIMESTAMP
-   /* check for timestamp */
-   if ( rec_ptr->rt_flags & TIMESTAMPED ) {
-      timestamp = dio_pzgetts(file);
-      bytecpy( ptr + RECCRTIME, &timestamp, sizeof(LONG));
-      bytecpy( ptr + RECUPTIME, &timestamp, sizeof(LONG));
-   }
-   else timestamp = 0L;
-#endif
    /* for each keyed field, enter the key value into the key file */
    for (fld = rec_ptr->rt_fields, fldtot = fld + rec_ptr->rt_fdtot,
                                                   fld_ptr = &field_table[fld];
@@ -224,7 +205,7 @@ DBN_DECL
       if ((fld_ptr->fd_key != 'n') && !(fld_ptr->fd_flags & OPTKEYMASK)) {
         /* locate the key value in the set_key table */
          ll_access(&sk_list);
-        sk_ptr = (SK_P FAR *)ll_first(&sk_list);
+        sk_ptr = (SK_P *)ll_first(&sk_list);
         while (sk_ptr != NULL) {
            if ( sk_ptr->ptr->sk_fld == fld ) {
               MEM_LOCK(&sk_ptr->ptr->sk_val);
@@ -245,7 +226,7 @@ DBN_DECL
               MEM_UNLOCK(&sk_ptr->ptr->sk_val);
               break;
            }
-           sk_ptr = (SK_P FAR *)ll_next(&sk_list);
+           sk_ptr = (SK_P *)ll_next(&sk_list);
         }
         ll_deaccess(&sk_list);
         if ( sk_ptr == NULL ) RETURN( dberr( S_KEYREQD ) );
@@ -253,10 +234,6 @@ DBN_DECL
    }
    if ( dio_write(db_addr, NULL, PGFREE) == S_OKAY ) {
       curr_rec = db_addr;
-#ifndef         NO_TIMESTAMP
-      if ( db_tsrecs )
-        cr_time = timestamp;
-#endif
    }
    RETURN( db_status );
 }
index be1f67a72eb38965e51289563e44816696f696bb..e6f4f00609bc0601ee65b879d9a4342dd6923218 100644 (file)
@@ -35,7 +35,6 @@
  *
  *   OBJECT CODE ONLY SOURCE MATERIALS
  */
-#ifndef NO_COUNTRY
 /*-----------------------------------------------------------------------
 
    mapchar.c -- db_VISTA character map module.
@@ -76,13 +75,13 @@ static int nextc(P1(int));
 
 /* Map ASCII-Characters for output and sorting
 */
-int d_mapchar(inchar,outchar,sort_str,subsort TASK_PARM)
-unsigned char  inchar;     /* value of character to be mapped */
-unsigned char  outchar;    /* output character as    ... */
-CONST char FAR *sort_str;  /* sort string (max. len = 2) */
-unsigned char  subsort;    /* subsort value, to distinguish between two */
+int d_mapchar(
+unsigned char  inchar,     /* value of character to be mapped */
+unsigned char  outchar,    /* output character as    ... */
+const char *sort_str,       /* sort string (max. len = 2) */
+unsigned char  subsort     /* subsort value, to distinguish between two */
                            /* equal values (e.g. 'a' and 'A', if necessary) */
-TASK_DECL
+)
 {
    int indx;
 
@@ -110,7 +109,7 @@ TASK_DECL
 
 /* read MAP_FILE and make appropriate d_mapchar-calls
 */
-int ctb_init()
+int ctb_init(void)
 {
    int map_fd;
    unsigned char inchar, outchar, subsort;
@@ -141,9 +140,7 @@ int ctb_init()
 }
 
 /* do an fgets from a binary file */
-static void bgets( s, len, fd )
-char *s;
-int len, fd;
+static void bgets(char *s, int len, int fd)
 {
     int c;
 
@@ -162,8 +159,7 @@ eof:
 }
 
 /* get one character from the file */
-static int nextc( fd )
-int fd;
+static int nextc(int fd)
 {
     int n;
 
@@ -182,9 +178,9 @@ int fd;
 
 /* Allocate and initialize country_table
 */
-int ctbl_alloc()
+int ctbl_alloc(void)
 {
-   if ((db_global.country_tbl.ptr = (CNTRY_TBL FAR *)
+   if ((db_global.country_tbl.ptr = (CNTRY_TBL *)
           ALLOC(&db_global.country_tbl,256*sizeof(CNTRY_TBL)+1,"country_tbl")) 
           == NULL ) return( dberr(S_NOMEMORY) );
 
@@ -196,12 +192,11 @@ int ctbl_alloc()
 
 /* Free country table
 */
-void ctbl_free()
+void ctbl_free(void)
 {
    MEM_UNLOCK( &db_global.country_tbl );
    FREE( &db_global.country_tbl );
    db_global.ctbl_activ = FALSE;
 }
 
-#endif /* NO_COUNTRY */
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin mapchar.c */
index 47df8529048c4991148c964b336686832210cadf..7e28149e4c5383d50150157bbbcc721cdba6f130 100644 (file)
 /* Get number of members of the current set owner
 */
 int
-d_members(set, tot TASK_PARM DBN_PARM)
-int set;     /* Set table entry */
-LONG FAR *tot;   /* total members of set */
-TASK_DECL
-DBN_DECL     /* database number */
+d_members(
+int set,     /* Set table entry */
+LONG *tot,   /* total members of set */
+int dbn      /* database number */
+)
 {
    char setp[SETPSIZE];
-   char FAR *recp;
+   char *recp;
    LONG total;
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* Make sure we have a current owner */
@@ -72,7 +72,7 @@ DBN_DECL     /* database number */
       RETURN( dberr(S_NOCO) );
 
    /* Read owner record */
-   if ( dio_read( curr_own[set], (char FAR * FAR *)&recp, NOPGHOLD) != S_OKAY )
+   if ( dio_read( curr_own[set], (char * *)&recp, NOPGHOLD) != S_OKAY )
       RETURN( db_status );
 
    /* Get set pointer from owner record */
index 12554e56daf596378aaee474c6e8bf56d7d9a764..e985ae828bf04e04ada4a7944ee225ac79805e7d 100644 (file)
@@ -88,7 +88,7 @@ typedef struct {
        char  retcode;  /* Return value (some enumerated below) */
        char  lsn;      /* Local session number */
        char  num;      /* Name number */
-       char FAR *buffer_off; /* Message buffer offset */
+       char *buffer_off; /* Message buffer offset */
 #ifdef SMALL_DATA
        int   buffer_seg; /* Message buffer segment */
 #endif
@@ -97,7 +97,7 @@ typedef struct {
        char  name[NETNAME_LEN];     /* My name */
        char  rto;      /* Receive timeout (500ms units) */
        char  sto;      /* Send timeout (500ms units) */
-       char FAR *post_off; /* Post function offset */
+       char *post_off; /* Post function offset */
 #ifdef SMALL_DATA
        int   post_seg; /* Post function segment */
 #endif
diff --git a/cde/lib/DtSearch/raima/netunix.c b/cde/lib/DtSearch/raima/netunix.c
deleted file mode 100644 (file)
index 9843ea2..0000000
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: netunix.c /main/4 1996/11/01 10:13:29 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: netbios_chk
- *             nw_addnm
- *             nw_call
- *             nw_cleanup
- *             nw_delnm
- *             nw_hangup
- *             nw_rcvmsg
- *             nw_send
- *             nw_sestat
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*------------------------------------------------------------------------
-   netunix.c -- db_VISTA System-V/BSD Interface Module
-
-   The "nw_" prefix specifies that the function will not return
-   until the command has completed. For example, nw_send will return
-   when the sent message has been received.
-
-   NOTES FOR UNIX SYS V/BSD ARE EMBEDDED BELOW.  RUNTIME FUNCTIONS WILL USE
-   THESE FUNCTIONS IN THE SAME WAY ON DOS OR UNIX.
-
-   These functions are used by the db_VISTA runtime.
-
-   nw_addnm      -- Adds user id name to network.
-                   DO NOTHING.
-   nw_delnm      -- Deletes user id name from network.
-                   DO NOTHING.
-   nw_call       -- Calls a user id to establish communication session.
-                    SYS V:
-                      CREATE THE TOKEN FILE, AND MAKE SURE THAT THE LOCK
-                      MANAGER'S EXISTS.
-                      CREATE AND SET VALUE OF SEMAPHORE.
-                      CREATE AN INCOMING MESSAGE QUEUE.
-                    BSD:
-                       MAKE SURE THAT THE LOCK MANAGER EXISTS.
-                       OPEN A BIDIRECTIONAL COMMUNICATION SOCKET TO IT.
-                   SEND FIRST MESSAGE TO LOCK MANAGER.  MESSAGE WILL INCLUDE
-                   DBUSERID (RECEIVED BY nw_addnm()), AND PROCESS ID.
-   nw_hangup     -- Disconnects session.
-                   SYS V:
-                      REMOVE THE TOKEN FILE.
-                      DELETE THE SEMAPHORE.
-                      DELETE THE INCOMING MESSAGE QUEUE.
-                   BSD:
-                      CLOSE THE SOCKET.
-   nw_send       -- Sends message to specific user.
-                   SEND THE MESSAGE, AS IS, TO LOCK MANAGER.
-   nw_rcvmsg     -- Receives message from specific user.
-                   RECEIVE THE MESSAGE, AS IS, FROM LOCK MANAGER.
-
-------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-  310 10-Aug-88 RSC Cleanup function prototype (put MESSAGE in dbtype.h)
-  368 25-Aug-88 RSC Fix BSD integration
-  423 08-Sep-88 RSC Change for compatibility with Multi-tasking
-  423 10-Sep-88 RSC Change dbpush to use new calling convention
-      08-Feb-90 WLW In nw_hangup, unlink file after deleting queue (SYSV)
-*/
-
-#include <sys/errno.h>
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/msg.h>
-#include <sys/sem.h>
-
-#ifndef SINGLE_USER
-# include <X11/Xos.h>
-# include <errno.h>
-# ifdef X_NOT_STDC_ENV
-extern int errno;
-# endif
-
-static char tokfile[80];
-static int inqid;
-static int outqid;
-static int semid;
-static int mypid;
-static char tmpdir[] = "/tmp/";
-
-
-
-/* Check for the existence of NetBIOS on this machine
-*/
-int netbios_chk()
-{
-    /* On UNIX, indicate that there is no problem */
-    return( 1 );
-}
-
-/* Issue ADD NAME command - wait 
-*/
-/*ARGSUSED*/
-int nw_addnm(name, ncb_num)
-char *name;
-int *ncb_num;
-{
-    return( net_status = N_OKAY );
-}
-
-
-
-/* Issue DELETE NAME command - wait 
-*/
-/*ARGSUSED*/
-int nw_delnm(name)
-char *name;
-{
-    return( net_status = N_OKAY );
-}
-
-
-
-
-/* Cleanup any dirty sessions
-*/
-/*ARGSUSED*/
-int nw_cleanup(dbusrid)
-   char *dbusrid;
-{
-    return( net_status = N_OKAY );
-}
-
-
-/* Issue a session status call
-*/
-int nw_sestat()
-{
-    return( net_status = N_OKAY );
-}
-
-
-
-/* Issue CALL command - wait 
-*/
-int nw_call(them, me, ncb_lsn)
-char *them;
-char *me;
-int *ncb_lsn;
-{
-    key_t key;
-    FILE *fp;
-    struct sembuf sops[1];
-    LM_LOGIN login;
-    int tokpos;
-
-    if ( ! db_lockmgr )
-       RETURN( net_status = N_OKAY );
-
-    /* create the token file for the lock manager */
-    strcpy(tokfile, tmpdir);
-    tokpos = sizeof(tmpdir) - 1;
-    strcpy(&tokfile[tokpos], them);
-
-    if ( ( key = ftok( tokfile, 1 ) ) == -1 )
-       /* /tmp/lockmgr file non-existant */
-       RETURN( net_status = N_CALLNAME );
-    
-    /* obtain the id to the lock manager's input queue and check the
-       value of the semaphore
-    */
-    if (((outqid = msgget(key, PERMISSION | IPC_CREAT)) == -1) ||
-       ((semid = semget(key, 1, PERMISSION)) == -1))
-       RETURN( net_status = N_TIMEOUT );
-
-    if ( semctl( semid, 0, GETVAL, NULL ) != 1 ) {
-       /* the lockmgr has terminated, but has not been cleared */
-       RETURN( net_status = N_CALLNAME );
-    }
-
-    /* create the token file for this dbuserid */
-    strcpy(&tokfile[tokpos], me);
-
-    /* get a key that is unique for the token file */
-    if ( ( key = ftok( tokfile, 1 ) ) != -1 ) {
-       /* The token file exists.  Is it because there is another active
-          process which is using the id?
-       */
-       /* check the value of the semaphore */
-       if ( ( semid = semget( key, 1, PERMISSION | IPC_CREAT ) ) == -1 )
-           RETURN( net_status = N_TIMEOUT );
-       if ( semctl( semid, 0, GETVAL, NULL ) == 1 ) {
-           /* this dbuserid is already active */
-           RETURN( net_status = N_NAMEUSED );
-       }
-       /* just in case this process formerly aborted with message remaining
-          in its input queue, delete the queue
-       */
-       if (((inqid = msgget(key, PERMISSION | IPC_CREAT)) == -1) ||
-           (msgctl(inqid, IPC_RMID, (struct msqid_ds *)NULL) == -1))
-           RETURN( net_status = N_TIMEOUT );
-    }
-    else {
-       /* create the token file */
-       if ( ( fp = fopen( tokfile, "w" ) ) == NULL )
-           RETURN( net_status = N_TIMEOUT );
-       fclose( fp );
-
-       /* get the key value for the token file */
-       if ( ( key = ftok( tokfile, 1 ) ) == -1 ) {
-           RETURN( net_status = N_TIMEOUT );
-       }
-    }
-
-    /* create and set the value of a semaphore */
-    if ( ( semid = semget( key, 1, PERMISSION | IPC_CREAT ) ) == -1 )
-       RETURN( net_status = N_TIMEOUT );
-    sops[0].sem_num = 0;
-    sops[0].sem_op = 1;
-    sops[0].sem_flg = SEM_UNDO;
-    while ( semop( semid, sops, 1 ) == -1 ) {
-       if ( errno == EINTR ) continue;
-       RETURN( net_status = N_TIMEOUT );
-    }
-
-    /* create my incoming message queue */
-    if ( ( inqid = msgget( key, PERMISSION | IPC_CREAT ) ) == -1 )
-       RETURN( net_status = N_TIMEOUT );
-
-    /* send the message to the lock manager */
-    login.fcn = L_LOGIN;
-    strcpy( login.dbusrid, me );
-    login.pid = getpid();
-    mypid = login.pid;
-    while ( msgsnd(outqid, (struct msgbuf *)&login,
-                  sizeof(LM_LOGIN)-sizeof(LONG), 0) == -1 ) {
-       if ( errno == EINTR ) continue;
-       RETURN( net_status = N_TIMEOUT );
-    }
-    *ncb_lsn = 0;
-    RETURN( net_status = N_OKAY );
-}
-
-
-/* Issue HANGUP command - wait 
-*/
-/*ARGSUSED*/
-int nw_hangup(lsn)
-int lsn;
-{
-    if ( ! db_lockmgr )
-       RETURN( net_status = N_OKAY );
-
-    /* delete the incoming message queue */
-    msgctl( inqid, IPC_RMID, (struct msqid_ds *)NULL );
-
-    /* delete the semaphore */
-    semctl( semid, 0, IPC_RMID, NULL );
-
-    /* delete the token file */
-    unlink( tokfile );
-    RETURN( net_status = N_OKAY );
-}
-
-
-
-/* Issue SEND command - wait 
-*/
-/*ARGSUSED*/
-int nw_send(lsn, msgtxt, msglen)
-int lsn;
-MESSAGE *msgtxt;
-int msglen;
-{
-
-    if ( ! db_lockmgr ) {
-       last_mtype = msgtxt->mtype;
-       RETURN( net_status = N_OKAY );
-    }
-    msgtxt->pid = mypid;
-
-    /* everything should be ready, just send it */
-    while ( msgsnd(outqid, (struct msgbuf *)msgtxt, msglen-sizeof(LONG),
-                  0) == -1 ) {
-       if ( errno == EINTR ) continue;
-       RETURN( net_status = N_TIMEOUT );
-    }
-
-    RETURN( net_status = N_OKAY );
-}
-
-
-
-/* Issue RECEIVE command - wait 
-*/
-/*ARGSUSED*/
-int nw_rcvmsg(lsn, msgtxt, msglen, ncb_len)
-int lsn;
-MESSAGE *msgtxt;
-int msglen;
-int *ncb_len;
-{
-    LR_DBOPEN *dp;
-    LR_LOCK *lp;
-
-    if ( ! db_lockmgr ) {
-       if ( last_mtype == L_LOCK ) {
-         lp = (LR_LOCK *)msgtxt;
-         lp->fcn = L_LOCK;
-         lp->status = L_OKAY;
-       }
-       else {
-         dp = (LR_DBOPEN *)msgtxt;
-         dp->fcn = L_DBOPEN;
-         dp->status = L_OKAY;
-         dp->nusers = 1;
-       }
-       RETURN( net_status = N_OKAY );
-    }
-    while ( ( *ncb_len = msgrcv(inqid, (struct msgbuf *)msgtxt,
-                               msglen-sizeof(LONG), (LONG)0, 0) ) == -1 ) {
-       if ( errno == EINTR ) continue;
-       RETURN( net_status = N_TIMEOUT );
-    }
-
-    RETURN( net_status = N_OKAY );
-}
-
-/* The remaining functions are BSD only */
-
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin netunix.c */
index 139de630a3eb9e3a3c817454606cfc0cfb817983..eba2c5ebb6c68fd024aa704fe9be7ab93f3c48ef 100644 (file)
@@ -60,9 +60,7 @@
 
 /* Open a binary file for shared access
 */
-int open_b(filenm, flags)
-CONST char FAR *filenm;
-int flags;  
+int open_b(const char *filenm, int flags)
 {
    int desc;
 
index a3187cffb6d9113eb8ff444ad2445873618e4f9c..5b7caa58b7f4a18da8c4fd86e444d3356ab520b8 100644 (file)
 /* Turn on db_VISTA runtime options
 */
 int
-d_on_opt(optflag TASK_PARM)
-int optflag;
-TASK_DECL
+d_on_opt(int optflag)
 {
    int i;
 
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL));
    dboptions |= optflag;
 
-#ifndef NO_TRANS
-   if ( optflag & ARCLOGGING ) d_tron();
-#endif
 
-#ifndef NO_COUNTRY
    if ( optflag & IGNORECASE ) {
       if ( !db_global.ctbl_activ) {
         if (ctbl_alloc() != S_OKAY )
@@ -68,7 +62,6 @@ TASK_DECL
         /* map lower to upper */
         db_global.country_tbl.ptr[i].sort_as1 = (char)(i-32);
    }
-#endif
 
    RETURN( db_status = S_OKAY );
 }
@@ -77,20 +70,14 @@ TASK_DECL
 /* Turn off db_VISTA runtime options
 */
 int
-d_off_opt(optflag TASK_PARM)
-int optflag;
-TASK_DECL
+d_off_opt(int optflag)
 {
    int i;
 
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(LOCK_ALL));
    dboptions &= ~optflag;
 
-#ifndef NO_TRANS
-   if ( optflag & ARCLOGGING ) d_troff();
-#endif
 
-#ifndef NO_COUNTRY
    if ( optflag & IGNORECASE ) {
       if ( db_global.ctbl_activ) {
         for ( i = 97; i < 123; i++)
@@ -98,7 +85,6 @@ TASK_DECL
            db_global.country_tbl.ptr[i].sort_as1 = (char)i;
       }
    }
-#endif
 
    RETURN( db_status = S_OKAY );
 }
index 7e8bd26f9e8edb0ab299ab803dc3131f1fa65305..d1b3d6f441cf9ba2ec40acbdb6ec8beb2c3e48d4 100644 (file)
 
 /* ********************** FUNCTION PROTOTYPES ************************ */
 
-static int isabs(P1(char FAR *));
+static int isabs(P1(char *));
                                        /* TRUE if path is absolute */
-static char FAR * remdrv(P1(char FAR *));
+static char * remdrv(P1(char *));
                                        /* Removes drive spec from path */
-static char FAR * remfile(P1(char FAR *));
+static char * remfile(P1(char *));
                                        /* Removes file from path */
 
 /* ======================================================================
    Construct the full path to the dictionary.
 */
-int con_dbd(path_str,dbname,dbdpath)
-char FAR *path_str;    /* (output) string to receive the full path to the
+int con_dbd(
+char *path_str,        /* (output) string to receive the full path to the
                           dictionary */
-char FAR *dbname;      /* contains the filename of the dictionary preceded
+char *dbname,  /* contains the filename of the dictionary preceded
                           optionally by a path preceded optionally (DOS only)
                           by a drive spec. */
-char FAR *dbdpath;     /* contains one element of the environment variable
+char *dbdpath  /* contains one element of the environment variable
                           DBDPATH.  NULL means no DBDPATH defined. */
+)
 {
 /*
    RETURNS: db_status, S_OKAY means no errors
@@ -142,11 +143,12 @@ char FAR *dbdpath;        /* contains one element of the environment variable
 /* ======================================================================
    Construct full path to data/key files
 */
-int con_dbf(path_str, dbfile, dbname, dbfpath)
-char FAR *path_str;    /* (output) receives full path to dictionary */
-char FAR *dbfile;      /* path to database file (defn in schema) */
-char FAR *dbname;      /* d_open dbname argument - path to dictionary */
-char FAR *dbfpath;     /* one element from DBFPATH, or NULL for no path */
+int con_dbf(
+char *path_str,        /* (output) receives full path to dictionary */
+char *dbfile,  /* path to database file (defn in schema) */
+char *dbname,  /* d_open dbname argument - path to dictionary */
+char *dbfpath  /* one element from DBFPATH, or NULL for no path */
+)
 {
 /*
    RETURNS: db_status, S_OKAY means no error.
@@ -180,8 +182,7 @@ char FAR *dbfpath;  /* one element from DBFPATH, or NULL for no path */
    }
    if (strlen(path_str) + strlen(dbfpath) >= FILENMLEN)
       return (db_status = S_NAMELEN);
-   strcpy(filespec,dbfpath);
-   strcat(filespec,remdrv(path_str));
+   snprintf(filespec, sizeof(filespec), "%s%s", dbfpath, remdrv(path_str));
    strcpy(path_str,filespec);
    return (db_status = S_OKAY);
 
@@ -190,11 +191,12 @@ char FAR *dbfpath;        /* one element from DBFPATH, or NULL for no path */
 /* ======================================================================
    extracts a single element from DBxPATH type variables
 */
-char FAR * get_element(dbxpath,num)
-char FAR *dbxpath;     /* DBxPATH, elements separated by semicolons
+char * get_element(
+char *dbxpath, /* DBxPATH, elements separated by semicolons
                           NULL causes get_element to return NULL.
                           A NULL string also causes a NULL return */
-int num;               /* Element to extract (0 = first) */
+int num                        /* Element to extract (0 = first) */
+)
 {
 /*
    RETURNS: Pointer to string with element.  NULL if no such element
@@ -205,11 +207,11 @@ int num;          /* Element to extract (0 = first) */
 
    static char element[FILENMLEN+1];   /* return value */
    int i;
-   char FAR *save;
+   char *save;
 
    if (dbxpath == NULL) return (NULL);
    if (dbxpath[0] == '\0') return (NULL);      /* NULL string? */
-   strcpy(element,dbxpath);
+   snprintf(element, sizeof(element), "%s", dbxpath);
 
    /* If there is only one element, always return that */
    if (strchr(element,';') == NULL) {
@@ -227,7 +229,7 @@ int num;            /* Element to extract (0 = first) */
       if ((dbxpath = strchr(dbxpath+1,';')) == NULL) return (NULL);
    dbxpath++;
    if ((save = strchr(dbxpath+1,';')) != NULL) *save = '\0';
-   i = (dbxpath - (char FAR *)element) + strlen((CONST char FAR *)dbxpath);
+   i = (dbxpath - (char *)element) + strlen((const char *)dbxpath);
    if (element[i-1] != DIRCHAR && element[i-1] != ':') {
       element[i++] = DIRCHAR;
       element[i] = '\0';
@@ -238,14 +240,15 @@ int num;          /* Element to extract (0 = first) */
 /* ======================================================================
    Returns TRUE of path is absolute
 */
-static int isabs(path_str)
-char FAR *path_str;    /* path to test, NULL causes iabs to return FALSE */
+static int isabs(
+char *path_str /* path to test, NULL causes iabs to return FALSE */
+)
 {
 /*
    RETURNS: TRUE if path is absolute
    ASSUMES: None.
 */
-   char FAR *path;                     /* Points to path w/o drive spec */
+   char *path;                 /* Points to path w/o drive spec */
 
    if (path_str == NULL) return (FALSE);
    path = remdrv(path_str);
@@ -256,15 +259,16 @@ char FAR *path_str;       /* path to test, NULL causes iabs to return FALSE */
 /* ======================================================================
    Removes drive specifier from path
 */
-static char FAR * remdrv(path_str)
-char FAR *path_str;            /* path to remove drive from */
+static char * remdrv(
+char *path_str         /* path to remove drive from */
+)
 {
 /*
    RETURNS:       Pointer to string w/o drive specification.  Note that
                  this simply points further into path_str.
    ASSUMES: None.
 */
-   char FAR *path;                     /* Return value */
+   char *path;                 /* Return value */
 
    if ((path = strrchr(path_str,':')) == NULL) return (path_str);
    return (path+1);
@@ -273,8 +277,9 @@ char FAR *path_str;         /* path to remove drive from */
 /* ======================================================================
    Removes file from a path.
 */
-static char FAR * remfile(path_str)
-char FAR *path_str;            /* Path to remove filename from */
+static char * remfile(
+char *path_str         /* Path to remove filename from */
+)
 {
 /*
    RETURNS: Pointer to the path with the filename removed (a static
@@ -288,19 +293,16 @@ char FAR *path_str;               /* Path to remove filename from */
    /* There is only a filename if string does not contain a DIRCHAR or
       ':' which separates drive spec from path. */
    if (path_str == NULL) return (NULL);
-   strcpy(dirpath,path_str);           /* Copy into output string */
+   snprintf(dirpath, sizeof(dirpath), "%s", path_str); /* Copy into output string */
    if ((path_str = strrchr(dirpath,DIRCHAR)) == NULL)
       if ((path_str = strrchr(dirpath,':')) == NULL) return (NULL);
    path_str[1] = '\0';                 /* Truncate string */
    return (dirpath);
 }
 
-#ifndef NO_COUNTRY
 /* Set Country Table path
 */
-int d_ctbpath(ctb TASK_PARM)
-CONST char FAR *ctb;
-TASK_DECL
+int d_ctbpath(const char *ctb)
 {
    int i;
 
@@ -326,5 +328,4 @@ TASK_DECL
 
    RETURN( db_status );
 }
-#endif
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin pathfcns.c */
index 1cd1d4eb9e50b0ff381dfd363643950adcff1ac3..9a3cfc023345a0a6fdde60979287ba364b0c8502 100644 (file)
 */
 
 /* From dberr.c: */
-void dbautorec(P0);
+void dbautorec(void);
 
 /* From dblfcns.c: */
-int taskinit(P1(TASK FAR *));
-int initdbt(P1(CONST char FAR *));
-int alloc_table(P1(CHAR_P FAR *) Pi(unsigned) Pi(unsigned));
-#define ALLOC_TABLE(t, n, o, v)        alloc_table((CHAR_P FAR *)(t), n, o)
-#ifndef SINGLE_USER
-int  termses(P0);
-#endif
-void termfree(P0);
-#ifndef SINGLE_USER
-int neterr(P0);
-#endif
+int taskinit(TASK *);
+int initdbt(const char *);
+int alloc_table(CHAR_P *, unsigned, unsigned);
+#define ALLOC_TABLE(t, n, o, v)        alloc_table((CHAR_P *)(t), n, o)
+void termfree(void);
 
 /* From dio.c: */
-int dio_open(P1(FILE_NO));
-int dio_close(P1(FILE_NO));
-int dio_init(P0);
-void dio_free(P0);
-int dio_clrfile(P1(FILE_NO));
-int dio_clear(P0);
-int dio_flush(P0);
-void dio_setdef(P1(FILE_NO));
-int dio_get(P1(F_ADDR) Pi(char FAR * FAR *) Pi(int));
-int dio_touch(P1(F_ADDR));
-int dio_read(P1(DB_ADDR) Pi(char FAR * FAR *) Pi(int));
-int dio_write(P1(DB_ADDR) Pi(CONST char FAR *) Pi(int));
-int dio_release(P1(DB_ADDR));
-int dio_rrlb(P1(DB_ADDR) Pi(INT *));
-int dio_wrlb(P1(DB_ADDR) Pi(INT));
-int dio_findpg(P1(FILE_NO) Pi(F_ADDR) Pi(PAGE_ENTRY FAR *)
-                             Pi(PAGE_ENTRY FAR * FAR *) 
-                             Pi(LOOKUP_ENTRY FAR * FAR *));
-#ifdef NO_TRANS
-int dio_out(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *));
-#else
-int dio_out(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *) 
-                          Pi(BOOLEAN));
-#endif
-#ifndef  NO_TIMESTAMP
-ULONG dio_pzsetts(P1(FILE_NO));
-ULONG dio_pzgetts(P1(FILE_NO));
-#endif
-int dio_pzread(P1(FILE_NO));
-int dio_pzalloc(P1(FILE_NO) Pi(F_ADDR *));
-int dio_pzdel(P1(FILE_NO) Pi(F_ADDR));
-F_ADDR dio_pznext(P1(FILE_NO));
-void dio_pzclr(P0);
+int dio_open(FILE_NO);
+int dio_close(FILE_NO);
+int dio_init(void);
+void dio_free(void);
+int dio_clrfile(FILE_NO);
+int dio_clear(void);
+int dio_flush(void);
+void dio_setdef(FILE_NO);
+int dio_get(F_ADDR, char **, int);
+int dio_touch(F_ADDR);
+int dio_read(DB_ADDR, char **, int);
+int dio_write(DB_ADDR, const char *, int);
+int dio_release(DB_ADDR);
+int dio_rrlb(DB_ADDR, INT *);
+int dio_wrlb(DB_ADDR, INT);
+int dio_findpg(FILE_NO, F_ADDR, PAGE_ENTRY *, PAGE_ENTRY **, LOOKUP_ENTRY **);
+int dio_out(PAGE_ENTRY *, LOOKUP_ENTRY *);
+int dio_pzread(FILE_NO);
+int dio_pzalloc(FILE_NO, F_ADDR *);
+int dio_pzdel(FILE_NO, F_ADDR);
+F_ADDR dio_pznext(FILE_NO);
+void dio_pzclr(void);
 
 /* From initenv.c: */
-int initenv(P0);
+int initenv(void);
 
 /* From inittab.c: */
-int inittab(P0);
+int inittab(void);
 
 /* From keyfcns.c: */
-int key_open(P0);
-void key_close(P0);
-int key_init(P1(int));
-int key_reset(P1(FILE_NO));
-int key_locpos(P1(CONST char FAR *) Pi(DB_ADDR FAR *));
-int key_scan(P1(int) Pi(DB_ADDR *));
-int key_boundary(P1(int) Pi(DB_ADDR *));
-int key_insert(P1(int) Pi(CONST char FAR *) Pi(DB_ADDR));
-int key_delete(P1(int) Pi(CONST char FAR *) Pi(DB_ADDR));
+int key_open(void);
+void key_close(void);
+int key_init(int);
+int key_reset(FILE_NO);
+int key_locpos(const char *, DB_ADDR *);
+int key_scan(int, DB_ADDR *);
+int key_boundary(int, DB_ADDR *);
+int key_insert(int, const char *, DB_ADDR);
+int key_delete(int, const char *, DB_ADDR);
 /* Due to a problem with MSC 5.1, we couldn't declare the 2nd parm
    of key_bldcom as const (see keyfcns.c) */
-int key_bldcom(P1(int) Pi(char FAR *) Pi(char FAR *) Pi(int));
+int key_bldcom(int, char *, char *, int);
 /* Because of a "problem" with the MSC 5.1 compiler, we couldn't declare
    the second argument to key_cmpcpy with a const attribute.  Hence we
    were not able to define the 2nd argument of key_bldcom as const.  */
-void key_cmpcpy(P1(char FAR *) Pi(char FAR *) Pi(INT));
+void key_cmpcpy(char *, char *, INT);
 
 /* From libfcns.c: */
-#ifndef ONE_DB
-int dbn_check(P1(int));
-#endif
-int nset_check(P1(int) Pi(int *) Pi(SET_ENTRY FAR * FAR *));
-int nfld_check(P1(long) Pi(int *) Pi(int *) 
-                             Pi(RECORD_ENTRY FAR * FAR *) 
-                             Pi(FIELD_ENTRY FAR * FAR *));
-int nrec_check(P1(int) Pi(int *) Pi(RECORD_ENTRY FAR * FAR *));
-int fldcmp(P1(FIELD_ENTRY FAR *) Pi(CONST char FAR *) 
-                            Pi(CONST char FAR *));
-int INTcmp(P1(CONST char FAR *) Pi(CONST char FAR *));
-int ADDRcmp(P1(CONST DB_ADDR FAR *) Pi(CONST DB_ADDR FAR *));
-int null_dba(P1(CONST char FAR *));
-int check_dba(P1(DB_ADDR));
+int dbn_check(int);
+int nset_check(int, int *, SET_ENTRY **);
+int nfld_check(long, int *, int *, RECORD_ENTRY **, FIELD_ENTRY **);
+int nrec_check(int, int *, RECORD_ENTRY **);
+int fldcmp(FIELD_ENTRY *, const char *, const char *);
+int INTcmp(const char *, const char *);
+int ADDRcmp(const DB_ADDR *, const DB_ADDR *);
+int null_dba(const char *);
+int check_dba(DB_ADDR);
 
 /* From makenew.c: */
-int sk_free(P0);
+int sk_free(void);
 
 /* From netwdos.c: */
-int netbios_chk(P0);
-int nw_reset(P1(int) Pi(int));
-int nw_addnm(P1(char FAR *) Pi(int *));
-int nw_cleanup(P1(char FAR *));
-int nw_sestat(P0);
-int nw_delnm(P1(char FAR *));
-int nw_call(P1(char FAR *) Pi(char FAR *) Pi(int *));
-int nw_hangup(P1(int));
-int nw_send(P1(int) Pi(MESSAGE FAR *) Pi(int));
-int nw_rcvmsg(P1(int) Pi(MESSAGE FAR *) Pi(int) Pi(int *));
+int netbios_chk(void);
+int nw_reset(int, int);
+int nw_addnm(char *, int *);
+int nw_cleanup(char *);
+int nw_sestat(void);
+int nw_delnm(char *);
+int nw_call(char *, char *, int *);
+int nw_hangup(int);
+int nw_send(int, MESSAGE *, int);
+int nw_rcvmsg(int, MESSAGE *, int, int *);
 
 /* From opens.c: */
-int open_b(P1(CONST char FAR *) Pi(int));
+int open_b(const char *, int);
 
 /* From ovfcns.c: */
-int o_setup(P0);
-int o_init(P0);
-int o_fileinit(P1(FILE_NO));
-int o_search(P1(FILE_NO) Pi(F_ADDR) Pi(F_ADDR *));
-int o_write(P1(PAGE_ENTRY FAR *) Pi(LOOKUP_ENTRY FAR *));
-int o_pzwrite(P1(FILE_NO));
-int o_flush(P0);
-int o_update(P0);
-long o_pages(P1(FILE_NO));
-void o_free(P0);
+int o_setup(void);
+int o_init(void);
+int o_fileinit(FILE_NO);
+int o_search(FILE_NO, F_ADDR, F_ADDR *);
+int o_write(PAGE_ENTRY *, LOOKUP_ENTRY *);
+int o_pzwrite(FILE_NO);
+int o_flush(void);
+int o_update(void);
+long o_pages(FILE_NO);
+void o_free(void);
 
 /* From recfcns.c: */
-int r_chkfld(P1(INT) Pi(FIELD_ENTRY FAR *) Pi(char FAR *)
-            Pi(CONST char FAR *));
-int r_delrec(P1(INT) Pi(DB_ADDR));
-int r_gfld(P1(FIELD_ENTRY FAR *) Pi(char FAR *) Pi(char FAR *));
-int r_gmem(P1(int) Pi(char FAR *) Pi(char FAR *));
-int r_gset(P1(int) Pi(char FAR *) Pi(char FAR *));
-int r_pfld(P1(INT) Pi(FIELD_ENTRY FAR *) Pi(char FAR *) 
-                            Pi(CONST char FAR *) Pi(DB_ADDR FAR *));
-int r_pmem(P1(int) Pi(char FAR *) Pi(char FAR *));
-int r_pset(P1(int) Pi(char FAR *) Pi(char FAR *));
-int r_smem(P1(DB_ADDR FAR *) Pi(INT));
-int r_setopt(P1(FIELD_ENTRY FAR *) Pi(char FAR *));
-int r_clropt(P1(FIELD_ENTRY FAR *) Pi(char FAR *));
-int r_tstopt(P1(FIELD_ENTRY FAR *) Pi(char FAR *));
+int r_chkfld(INT, FIELD_ENTRY *, char *, const char *);
+int r_delrec(INT, DB_ADDR);
+int r_gfld(FIELD_ENTRY *, char *, char *);
+int r_gmem(int, char *, char *);
+int r_gset(int, char *, char *);
+int r_pfld(INT, FIELD_ENTRY *, char *, const char *, DB_ADDR *);
+int r_pmem(int, char *, char *);
+int r_pset(int, char *, char *);
+int r_smem(DB_ADDR *, INT);
+int r_setopt(FIELD_ENTRY *, char *);
+int r_clropt(FIELD_ENTRY *, char *);
+int r_tstopt(FIELD_ENTRY *, char *);
 
 /* From pathfcns.c */
-int con_dbd(P1(char FAR *) Pi(char FAR *) Pi(char FAR *));
-int con_dbf(P1(char FAR *) Pi(char FAR *) Pi(char FAR *) 
-                          Pi(char FAR *));
-char FAR * get_element(P1(char FAR *) Pi(int));
+int con_dbd(char *, char *, char *);
+int con_dbf(char *, char *, char *, char *);
+char * get_element(char *, int);
 
 /* From renfile.c: */
-int renfiles(P0);
+int renfiles(void);
 
 /* From startup.c: */
-#ifndef NO_DBN_PARM
 int startup(DBN_FIX_D1 TASK_PTR_Di LOCK_Di);
-#else
-#ifdef MULTI_TASK
-int startup(TASK_PTR_D1 LOCK_Di);
-#else
-#define startup() S_OKAY
-#endif
-#endif
 
 /* From taffcns.c: */
-int taf_open(P0);
-int taf_close(P0);
-int taf_access(P0);
-int taf_release(P0);
-int taf_add(P1(CONST char FAR *));
-int taf_del(P1(CONST char FAR *) );
-
-/* From task.c */
-#ifdef MULTI_TASK
-void task_switch(P1(DB_TASK FAR *));
-#endif
+int taf_open(void);
+int taf_close(void);
+int taf_access(void);
+int taf_release(void);
+int taf_add(const char *);
+int taf_del(const char *);
 
 /* From mapchar.c */
-int  ctb_init(P0);
-int  ctbl_alloc(P0);
-void ctbl_free(P0);
+int  ctb_init(void);
+int  ctbl_alloc(void);
+void ctbl_free(void);
 
 /* System functions */
 #ifndef _STRING_H
 #ifndef linux
-  void CDECL memcpy(P1(char *) Pi(char *) Pi(int));
+  void CDECL memcpy(char *, char *, int);
 #endif
-  int  CDECL memcmp(P1(char *) Pi(char *) Pi(int));
-  void CDECL memset(P1(char *) Pi(char) Pi(int));
+  int  CDECL memcmp(char *, char *, int);
+  void CDECL memset(char *, char, int);
 
-  int CDECL strcmp(P1(CONST char *) Pi(CONST char *));
-  char * CDECL strcpy(P1(char *) Pi(CONST char *));
-  char * CDECL strcat(P1(char *) Pi(CONST char *));
-  int CDECL strlen(P1(CONST char *));
-  int CDECL strncmp(P1(CONST char *) Pi(CONST char *) Pi(int));
-  char * CDECL strncpy(P1(char *) Pi(CONST char *) Pi(int));
-  char * CDECL strchr(P1(CONST char *) Pi(int));
-  char * CDECL strrchr(P1(CONST char *) Pi(int));
+  int CDECL strcmp(const char *, const char *);
+  char * CDECL strcpy(char *, const char *);
+  char * CDECL strcat(char *, const char *);
+  int CDECL strlen(const char *);
+  int CDECL strncmp(const char *, const char *, int);
+  char * CDECL strncpy(char *, const char *, int);
+  char * CDECL strchr(const char *, int);
+  char * CDECL strrchr(const char *, int);
 #endif
 
-void CDECL free(P1(void FAR *));  /* AIXV3 - DPG 07/05/90 */
-time_t CDECL time(P1(long *));
-int CDECL write(P1(int) Pi(char *) Pi(unsigned int));
-int CDECL read(P1(int) Pi(char *) Pi(unsigned int));
-long CDECL lseek(P1(int) Pi(long) Pi(int));
-int CDECL close(P1(int));
-void CDECL exit(P1(int));
-char * CDECL getenv(P1(CONST char *));
-int CDECL locking(P1(int) Pi(int) Pi(long));
-int CDECL unlink(P1(CONST char *));
+void CDECL free(void *);  /* AIXV3 - DPG 07/05/90 */
+time_t CDECL time(long *);
+int CDECL write(int, char *, unsigned int);
+int CDECL read(int, char *, unsigned int);
+long CDECL lseek(int, long, int);
+int CDECL close(int);
+void CDECL exit(int);
+char * CDECL getenv(const char *);
+int CDECL locking(int, int, long);
+int CDECL unlink(const char *);
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin proto.h */
index 82aaac4ea85243ef33274ea5f12333cbb3c1d89e..4c1229ed97fbd112d89d87482ec8bb0652fe499f 100644 (file)
@@ -71,19 +71,20 @@ static int struct_key_chk = 1;
 /* Check a field for permission to change it
 */
 int
-r_chkfld(field, fld_ptr, rec, data )
-INT field;  /* field_table entry number */
-FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */
-char FAR *rec;  /* pointer to record slot */
-CONST char FAR *data; /* pointer to data area containing field contents */
+r_chkfld(
+INT field,  /* field_table entry number */
+FIELD_ENTRY *fld_ptr, /* corresponds to field */
+char *rec,  /* pointer to record slot */
+const char *data /* pointer to data area containing field contents */
+)
 {
    DB_ADDR dba;
    long fld;
    INT rn;
-   char FAR *fptr, ckey[256];
+   char *fptr, ckey[256];
    int i;
-   FIELD_ENTRY FAR *sfld_ptr;
-   RECORD_ENTRY FAR *rec_ptr;
+   FIELD_ENTRY *sfld_ptr;
+   RECORD_ENTRY *rec_ptr;
 
    bytecpy(&rn, rec, sizeof(INT));
    rn &= ~RLBMASK; /* mask off rlb */
@@ -115,7 +116,7 @@ CONST char FAR *data; /* pointer to data area containing field contents */
       dba = curr_rec;
       /* If the key field is not optional, or optional and stored */
       if ((!(fld_ptr->fd_flags & OPTKEYMASK) || r_tstopt(fld_ptr, rec)) &&
-         (d_keyfind(fld, data CURRTASK_PARM CURR_DB_PARM) == S_OKAY)) {
+         (d_keyfind(fld, data CURRTASK_PARM , curr_db) == S_OKAY)) {
         /* another record is already using this key value */
         db_status = S_DUPLICATE;
       }
@@ -140,23 +141,18 @@ CONST char FAR *data; /* pointer to data area containing field contents */
 /* Delete the current record
 */
 int
-r_delrec( rt, db_addr )
-INT rt;
-DB_ADDR db_addr;
+r_delrec(INT rt, DB_ADDR db_addr)
 {
-   char FAR *rec;       /* ptr to record slot */
-   char FAR *fptr;      /* field data ptr */
+   char *rec;       /* ptr to record slot */
+   char *fptr;      /* field data ptr */
    char ckey[256];  /* compound key data */
-#ifndef         NO_TIMESTAMP
-   ULONG timestamp;
-#endif
    FILE_NO fno;
    F_ADDR rno;
-   register int fld;
-   RECORD_ENTRY FAR *rec_ptr;
-   register FIELD_ENTRY FAR *fld_ptr;
+   int fld;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
-   if ( dio_read( db_addr, (char FAR * FAR *)&rec, PGHOLD) != S_OKAY )
+   if ( dio_read( db_addr, (char * *)&rec, PGHOLD) != S_OKAY )
       return( db_status );
 
    rec_ptr = &record_table[rt];
@@ -180,14 +176,6 @@ DB_ADDR db_addr;
    }
    fno = NUM2INT((FILE_NO)((db_addr >> FILESHIFT) & FILEMASK), ft_offset);
    rno = ADDRMASK & db_addr;
-#ifndef         NO_TIMESTAMP
-   /* update timestamp, if necessary */
-   if ( rec_ptr->rt_flags & TIMESTAMPED ) {
-      timestamp = dio_pzgetts(fno);
-      bytecpy( rec + RECCRTIME, &timestamp, sizeof(ULONG));
-      bytecpy( rec + RECUPTIME, &timestamp, sizeof(ULONG));
-   }
-#endif
    dio_write(db_addr, NULL, PGFREE);
 
    /* place this record onto the delete chain */
@@ -200,32 +188,22 @@ DB_ADDR db_addr;
 /* Get data field from record
 */
 int
-r_gfld(fld_ptr, rec, data )
-FIELD_ENTRY FAR *fld_ptr;
-char FAR *rec;  /* pointer to record */
-char FAR *data; /* pointer to data area to contain field contents */
+r_gfld(
+FIELD_ENTRY *fld_ptr,
+char *rec,  /* pointer to record */
+char *data /* pointer to data area to contain field contents */
+)
 {
-   register int kt_lc;                 /* loop control */
+   int kt_lc;                  /* loop control */
    INT rn;
-   register FIELD_ENTRY FAR *kfld_ptr;
-   register KEY_ENTRY FAR *key_ptr;
+   FIELD_ENTRY *kfld_ptr;
+   KEY_ENTRY *key_ptr;
 
    bytecpy(&rn, rec, sizeof(INT));
    if ( rn < 0 )
       return( db_status = S_DELETED );
 
-#ifndef SINGLE_USER
-   if ( rn & RLBMASK ) {
-      rn &= ~RLBMASK; /* mask off rlb */
-      rlb_status = S_LOCKED;
-   }
-   else {
-      rlb_status = S_UNLOCKED;
-   }
-#endif
-#ifndef         ONE_DB
    rn += curr_db_table->rt_offset;
-#endif
 
    if ( fld_ptr->fd_rec != rn )
       return( dberr(S_INVFLD) );
@@ -254,15 +232,16 @@ char FAR *data; /* pointer to data area to contain field contents */
 /* Get member pointer from record
 */
 int
-r_gmem(set, rec, mem_addr )
-int set;    /* set table entry number */
-char FAR *rec;  /* pointer to record */
-char FAR *mem_addr; /* pointer to member pointer */
+r_gmem(
+int set,    /* set table entry number */
+char *rec,  /* pointer to record */
+char *mem_addr /* pointer to member pointer */
+)
 {
    INT rt;
-   register int mem, memtot;
-   SET_ENTRY FAR *set_ptr;
-   register MEMBER_ENTRY FAR *mem_ptr;
+   int mem, memtot;
+   SET_ENTRY *set_ptr;
+   MEMBER_ENTRY *mem_ptr;
 
    /* search member list of set for record */
    set_ptr = &set_table[set];
@@ -286,23 +265,19 @@ char FAR *mem_addr; /* pointer to member pointer */
 /* Get set pointer from record
 */
 int
-r_gset(set, rec, setptr )
-int set;      /* set table entry number */
-char FAR *rec;    /* pointer to record */
-char FAR *setptr; /* pointer to set pointer */
+r_gset(
+int set,      /* set table entry number */
+char *rec,    /* pointer to record */
+char *setptr  /* pointer to set pointer */
+)
 {
    INT rt;
    int len;
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    set_ptr = &set_table[set];
    bytecpy(&rt, rec, sizeof(INT));
    if (NUM2EXT(set_ptr->st_own_rt, rt_offset) == (rt & ~RLBMASK)) {
-#ifndef NO_TIMESTAMP
-      if ( set_ptr->st_flags & TIMESTAMPED )
-        len = SETPSIZE;
-      else
-#endif
         len = SETPSIZE - sizeof(ULONG);
       bytecpy(setptr, rec + set_ptr->st_own_ptr, len);
       return( db_status = S_OKAY );
@@ -314,22 +289,23 @@ char FAR *setptr; /* pointer to set pointer */
 /* Put data field into record
 */
 int
-r_pfld(field, fld_ptr, rec, data, db_addr )
-INT field;  /* field_table entry number */
-FIELD_ENTRY FAR *fld_ptr; /* corresponds to field */
-char FAR *rec;  /* pointer to existing record */
-CONST char FAR *data; /* pointer to data area containing new field contents */
-DB_ADDR FAR *db_addr;
+r_pfld(
+INT field,  /* field_table entry number */
+FIELD_ENTRY *fld_ptr, /* corresponds to field */
+char *rec,  /* pointer to existing record */
+const char *data, /* pointer to data area containing new field contents */
+DB_ADDR *db_addr
+)
 {
    DB_ADDR mdba, odba, dba;
    int set, sn;
    char memp[MEMPSIZE];
-   register char FAR *fptr;
-   register CONST char FAR *tfptr;
-   register int s, i, strfld;
-   register FIELD_ENTRY FAR *sfld_ptr;
-   register SORT_ENTRY FAR *srt_ptr;
-   DB_ADDR FAR *co_ptr, FAR *cm_ptr;
+   char *fptr;
+   const char *tfptr;
+   int s, i, strfld;
+   FIELD_ENTRY *sfld_ptr;
+   SORT_ENTRY *srt_ptr;
+   DB_ADDR *co_ptr, *cm_ptr;
 
    db_status = S_OKAY;
    fptr = rec + fld_ptr->fd_ptr;
@@ -416,8 +392,8 @@ DB_ADDR FAR *db_addr;
               set = NUM2EXT(sn + SETMARK, st_offset);
 
               /* disconnect from prior order set and reconnect in new order */
-              d_discon(set CURRTASK_PARM CURR_DB_PARM);
-              d_connect(set CURRTASK_PARM CURR_DB_PARM);
+              d_discon(set CURRTASK_PARM , curr_db);
+              d_connect(set CURRTASK_PARM , curr_db);
 
               /* reset currency */
               *co_ptr = odba;
@@ -438,15 +414,16 @@ DB_ADDR FAR *db_addr;
 /* Put member pointer into record
 */
 int
-r_pmem(set, rec, mem_addr )
-int set;    /* set table entry number */
-char FAR *rec;  /* pointer to record */
-char FAR *mem_addr; /* pointer to member pointer */
+r_pmem(
+int set,    /* set table entry number */
+char *rec,  /* pointer to record */
+char *mem_addr /* pointer to member pointer */
+)
 {
    INT rt;
-   register int mem, memtot;
-   SET_ENTRY FAR *set_ptr;
-   register MEMBER_ENTRY FAR *mem_ptr;
+   int mem, memtot;
+   SET_ENTRY *set_ptr;
+   MEMBER_ENTRY *mem_ptr;
 
    /* search member list of set for record */
    set_ptr = &set_table[set];
@@ -470,23 +447,19 @@ char FAR *mem_addr; /* pointer to member pointer */
 /* Put set pointer into record
 */
 int
-r_pset(set, rec, setptr )
-int set;       /* set table entry number */
-char FAR *rec;     /* pointer to record */
-char FAR *setptr;  /* pointer to set pointer */
+r_pset(
+int set,       /* set table entry number */
+char *rec,     /* pointer to record */
+char *setptr   /* pointer to set pointer */
+)
 {
    INT rt;
    int len;
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    set_ptr = &set_table[set];
    bytecpy(&rt, rec, sizeof(INT));
    if (NUM2EXT(set_ptr->st_own_rt, rt_offset) == (rt & ~RLBMASK)) {
-#ifndef NO_TIMESTAMP
-      if ( set_ptr->st_flags & TIMESTAMPED )
-        len = SETPSIZE;
-      else
-#endif
         len = SETPSIZE - sizeof(ULONG);
       bytecpy(rec + set_ptr->st_own_ptr, setptr, len);
       return( db_status = S_OKAY );
@@ -500,20 +473,15 @@ char FAR *setptr;  /* pointer to set pointer */
 /* Set the current set member from record
 */
 int
-r_smem( db_addr, set )
-DB_ADDR FAR *db_addr;
-INT set;
+r_smem(DB_ADDR *db_addr, INT set)
 {
-#ifndef         NO_TIMESTAMP
-   int nset;
-#endif
-   char mem[MEMPSIZE], FAR *ptr;
+   char mem[MEMPSIZE], *ptr;
    DB_ADDR dba;
 
    bytecpy(&dba, db_addr, DB_ADDR_SIZE);
 
    /* make sure record is owned */
-   if ((dio_read(dba, (char FAR * FAR *)&ptr, NOPGHOLD) != S_OKAY) ||
+   if ((dio_read(dba, (char * *)&ptr, NOPGHOLD) != S_OKAY) ||
        (r_gmem(set, ptr, mem) != S_OKAY))
       return( db_status );
 
@@ -523,24 +491,15 @@ INT set;
 
    /* ownership okay, set the member */
    curr_mem[set] = dba;
-#ifndef         NO_TIMESTAMP
-   nset = NUM2EXT(set + SETMARK, st_offset);
-   /* set timestamps */
-   if ( db_tsrecs ) {
-      d_utsco( nset, &co_time[set] CURRTASK_PARM CURR_DB_PARM );
-      d_utscm( nset, &cm_time[set] CURRTASK_PARM CURR_DB_PARM );
-   }
-   if ( db_tssets )
-      d_utscs( nset, &cs_time[set] CURRTASK_PARM CURR_DB_PARM );
-#endif
    return( db_status = S_OKAY );
 }
 
 /* Set the optional key field "stored" bit */
 int
-r_setopt( fld_ptr, rec )
-FIELD_ENTRY FAR *fld_ptr; /* field table entry of optional key */
-char FAR *rec; /* Pointer to record */
+r_setopt(
+FIELD_ENTRY *fld_ptr, /* field table entry of optional key */
+char *rec      /* Pointer to record */
+)
 {
    int offset; /* offset to the bit map */
    int keyndx; /* index into bit map of this key */
@@ -566,9 +525,10 @@ char FAR *rec;     /* Pointer to record */
 
 /* Clear the optional key field "stored" bit */
 int
-r_clropt( fld_ptr, rec )
-FIELD_ENTRY FAR *fld_ptr;      /* Field table entry of optional key */
-char FAR *rec; /* Pointer to record */
+r_clropt(
+FIELD_ENTRY *fld_ptr,  /* Field table entry of optional key */
+char *rec      /* Pointer to record */
+)
 {
    int offset; /* offset to the bit map */
    int keyndx; /* index into bit map of this key */
@@ -594,9 +554,10 @@ char FAR *rec;     /* Pointer to record */
 
 /* Test the optional key field "stored" bit */
 int
-r_tstopt( fld_ptr, rec )
-FIELD_ENTRY FAR *fld_ptr;      /* Field table entry of optional key */
-char FAR *rec; /* Pointer to record */
+r_tstopt(
+FIELD_ENTRY *fld_ptr,  /* Field table entry of optional key */
+char *rec      /* Pointer to record */
+)
 {
    int offset; /* offset to the bit map */
    int keyndx; /* index into bit map of this key */
index bb0fc2da4c286c434880bc78cbc46973df6c3839..8f8bb12ffc3d32c9be98ccca4e2058e5d4c67444 100644 (file)
 /* Find first record of type
 */
 int
-d_recfrst( rec TASK_PARM DBN_PARM )
-int rec;       /* record type/table entry */
-TASK_DECL
-DBN_DECL
+d_recfrst(
+int rec,       /* record type/table entry */
+int dbn
+)
 {
    INT rectype;
    FILE_NO ftype;
    DB_ADDR dba;
-   char FAR *recptr;
-#ifndef SINGLE_USER
-   int dbopen_sv;
-#endif
+   char *recptr;
    F_ADDR rno, last;
-   RECORD_ENTRY FAR *rec_ptr;
+   RECORD_ENTRY *rec_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
-   if (nrec_check(rec, &rec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY)
+   if (nrec_check(rec, &rec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY)
       RETURN( db_status );
-#ifndef         ONE_DB
    rec -= curr_db_table->rt_offset;
-#endif
 
    /* get the normalized number of file containing this record type */
    ftype = NUM2EXT(rec_ptr->rt_file, ft_offset);
@@ -87,24 +82,14 @@ DBN_DECL
       dba = ( (FILEMASK & ftype) << FILESHIFT ) | (ADDRMASK & rno);
 
       /* set up to allow unlocked read */
-#ifndef SINGLE_USER
-      dbopen_sv = dbopen;
-      dbopen = 2;
-#endif
 
       /* read the record */
-      dio_read( dba, (char FAR * FAR *)&recptr, NOPGHOLD );
-#ifndef SINGLE_USER
-      dbopen = dbopen_sv;
-#endif
+      dio_read( dba, (char * *)&recptr, NOPGHOLD );
       if ( db_status != S_OKAY )
         RETURN( db_status );
 
       /* get the record type out of the record */
       bytecpy( &rectype, recptr, sizeof(INT) );
-#ifndef SINGLE_USER
-      rectype &= ~RLBMASK;
-#endif
 
       ++rno;
    } while ( (int)rectype != rec );
index ef6bbc24505ca692c915b7570a0bfdd901b0f435..b05aee1f696eadb63a233a238d7141ec8f66fdd3 100644 (file)
 /* ======================================================================
    d_reclast - find last record occurrence in database
 */
-int d_reclast( rec TASK_PARM DBN_PARM )
-int rec;                       /* record # to find last occurrence of */
-TASK_DECL
-DBN_DECL                       /* optional database number */
+int d_reclast(
+int rec,                       /* record # to find last occurrence of */
+int dbn                                /* optional database number */
+)
 {
 /*
    RETURNS: db_status.  Sets current record to last record, if found.
@@ -85,19 +85,16 @@ DBN_DECL                    /* optional database number */
    DB_ADDR dba;                        /* current database addr we're scanning */
    FILE_NO ftype;              /* file desc for file holding rec */
    F_ADDR last;                        /* last slot in file */
-   char FAR *recptr;           /* record from database */
-   RECORD_ENTRY FAR *rec_ptr;  /* RECORD ENTRY for this record */
+   char *recptr;               /* record from database */
+   RECORD_ENTRY *rec_ptr;      /* RECORD ENTRY for this record */
    INT rectype;                        /* record type from record */
    F_ADDR rno;                 /* current slot we're scanning */
 
-#ifndef SINGLE_USER
-   int dbopen_sv;              /* saved copy of dbopen */
-#endif
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
    /* validate and convert record number */
-   if ( nrec_check(rec, &rec, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY)
+   if ( nrec_check(rec, &rec, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY)
       RETURN( db_status );
 
    /* get the last record # for this file */
@@ -113,22 +110,12 @@ DBN_DECL                  /* optional database number */
       
       /* create the database address, and read this record */
       dba = ((FILEMASK & ftype) << FILESHIFT) | (ADDRMASK & rno);
-#ifndef SINGLE_USER
-      dbopen_sv = dbopen;
-      dbopen = 2;              /* setup to allow unlocked read */
-#endif
-      dio_read(dba, (char FAR * FAR *)&recptr, NOPGHOLD);
-#ifndef SINGLE_USER
-      dbopen = dbopen_sv;
-#endif
+      dio_read(dba, (char * *)&recptr, NOPGHOLD);
       if ( db_status != S_OKAY )
         RETURN( db_status );
       
       /* See if this record is of the type we're looking for */
       bytecpy(&rectype, recptr, sizeof(INT));
-#ifndef SINGLE_USER
-      rectype &= ~((INT)RLBMASK);      /* remove rlb */
-#endif
       rno--;
    } while ( (int)rectype != rec );
 
index fd21436bc71d173f6762a7e08ccdef1786a2f743..dc5f7f6c42e7a6b28152f118c7a68ddb05e82fba 100644 (file)
 /* Find next record of type
 */
 int
-d_recnext(TASK_DBN_ONLY)
-TASK_DECL
-DBN_DECL
+d_recnext(int dbn)
 {
    INT rectype;
    FILE_NO fno;
    FILE_NO ft;
    DB_ADDR dba;
-#ifndef SINGLE_USER
-   int dbopen_sv;
-#endif
    int rec_ndx;                        /* Index into record table */
-   RECORD_ENTRY FAR *rec_ptr;  /* Pointer to record table */
-   char FAR *recptr;
+   RECORD_ENTRY *rec_ptr;      /* Pointer to record table */
+   char *recptr;
    F_ADDR rno, last;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
@@ -77,7 +72,7 @@ DBN_DECL
       rno = RN_REF(rn_dba) & ADDRMASK;
    }
    else {                      /* No current rec - get fno from rn_type */
-      nrec_check(RN_REF(rn_type) + RECMARK, &rec_ndx, (RECORD_ENTRY FAR * FAR *)&rec_ptr);
+      nrec_check(RN_REF(rn_type) + RECMARK, &rec_ndx, (RECORD_ENTRY * *)&rec_ptr);
       fno = (FILE_NO)NUM2EXT(rec_ptr->rt_file, ft_offset);
       fno = (int)((fno >> FILESHIFT) & FILEMASK);
       rno = 1;
@@ -97,24 +92,14 @@ DBN_DECL
        dba = ( (FILEMASK & fno) << FILESHIFT ) | (ADDRMASK & rno);
 
        /* set up to allow unlocked read */
-#ifndef SINGLE_USER
-       dbopen_sv = dbopen;
-       dbopen = 2;
-#endif
 
        /* read the record */
-       dio_read( dba, (char FAR * FAR *)&recptr, NOPGHOLD );
-#ifndef SINGLE_USER
-       dbopen = dbopen_sv;
-#endif
+       dio_read( dba, (char * *)&recptr, NOPGHOLD );
        if ( db_status != S_OKAY )
            RETURN( db_status );
 
        /* get the record type out of the record */
        bytecpy( &rectype, recptr, sizeof(INT) );
-#ifndef SINGLE_USER
-       rectype &= ~RLBMASK;
-#endif
 
        ++rno;
    } while ( rectype != RN_REF(rn_type) );
index a1ed8adabd0cdc291c83a62492093d843ebc437a..29297638be2060a1ea848be0128307b6ee82264e 100644 (file)
@@ -73,9 +73,7 @@
 /* ======================================================================
    d_recprev - find previous record via database address
 */
-int d_recprev( TASK_DBN_ONLY )
-TASK_DECL
-DBN_DECL
+int d_recprev(int dbn)
 {
 /*
    RETURNS: db_status.  Also sets current record to previous matched record.
@@ -85,15 +83,12 @@ DBN_DECL
    FILE_NO fno;                        /* current file we're scanning */
    F_ADDR last;                        /* last slot in file */
    int rec_ndx;                        /* index of RECORD ENTRY (not used) */
-   char FAR *recptr;           /* record from database */
-   RECORD_ENTRY FAR *rec_ptr;  /* RECORD ENTRY for this record */
+   char *recptr;               /* record from database */
+   RECORD_ENTRY *rec_ptr;      /* RECORD ENTRY for this record */
    INT rectype;                        /* record type from record */
    F_ADDR rno;                 /* current slot we're scanning */
    FILE_NO ft;                 /* normalized file */
 
-#ifndef SINGLE_USER
-   int dbopen_sv;              /* saved copy of dbopen */
-#endif
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
@@ -104,7 +99,7 @@ DBN_DECL
       rno = RN_REF(rn_dba) & ADDRMASK;
    }
    else {              /* no current rec, get fno from rn_type */
-      nrec_check(RN_REF(rn_type) + RECMARK, &rec_ndx, (RECORD_ENTRY FAR * FAR *)&rec_ptr);
+      nrec_check(RN_REF(rn_type) + RECMARK, &rec_ndx, (RECORD_ENTRY * *)&rec_ptr);
       fno = NUM2EXT(rec_ptr->rt_file, ft_offset);
       fno = (int)((fno >> FILESHIFT) & FILEMASK);
 
@@ -121,21 +116,11 @@ DBN_DECL
    do {
       if (rno < 1) RETURN( db_status = S_NOTFOUND );
       dba = ((fno & FILEMASK) << FILESHIFT) | (rno & ADDRMASK);
-#ifndef SINGLE_USER
-      dbopen_sv = dbopen;
-      dbopen = 2;              /* setup to allow for unlocked read */
-#endif
-      dio_read(dba, (char FAR * FAR *)&recptr, NOPGHOLD);
-#ifndef SINGLE_USER
-      dbopen = dbopen_sv;
-#endif
+      dio_read(dba, (char * *)&recptr, NOPGHOLD);
       if (db_status != S_OKAY) RETURN( db_status );
 
       /* see if we've found a match */
       bytecpy(&rectype, recptr, sizeof(INT));
-#ifndef SINGLE_USER
-      rectype &= ~((INT)RLBMASK);
-#endif
       rno--;
    } while ( rectype != RN_REF(rn_type) );
 
index d35a192b9c2768d5204afc4d5353e07929d6f6e2..427a8731fdf824f3ec0050446fa6788c6b738e8c 100644 (file)
 /* Read contents of current record
 */
 int
-d_recread(rec TASK_PARM DBN_PARM)
-char FAR *rec; /* ptr to record area */
-TASK_DECL
-DBN_DECL
+d_recread(
+char *rec, /* ptr to record area */
+int dbn
+)
 {
    INT  rt;     /* record type */
    DB_ADDR dba;
-#ifndef SINGLE_USER
-   int dbopen_sv;
-#endif
-   RECORD_ENTRY FAR *rec_ptr;
+   RECORD_ENTRY *rec_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_IO));
 
@@ -73,16 +70,9 @@ DBN_DECL
       RETURN( dberr(S_NOCR) );
 
    /* set up to allow unlocked read access */
-#ifndef SINGLE_USER
-   dbopen_sv = dbopen;
-   dbopen = 2;
-#endif
 
    /* read current record */
-   dio_read( curr_rec, (char FAR * FAR *)&crloc, NOPGHOLD);
-#ifndef SINGLE_USER
-   dbopen = dbopen_sv;
-#endif
+   dio_read( curr_rec, (char * *)&crloc, NOPGHOLD);
    if ( db_status != S_OKAY )
       RETURN( db_status );
 
@@ -91,15 +81,6 @@ DBN_DECL
    if ( rt < 0 )
       RETURN( db_status = S_DELETED );
 
-#ifndef SINGLE_USER
-   if ( rt & RLBMASK ) {
-      rt &= ~RLBMASK; /* mask off rlb */
-      rlb_status = S_LOCKED;
-   }
-   else {
-      rlb_status = S_UNLOCKED;
-   }
-#endif
    rec_ptr = &record_table[NUM2INT(rt, rt_offset)];
 
    /* Copy db_addr from record and check with curr_rec */
index 716e1673d4685ac9054d710a284da5a8c17d7eef..effdeb95ad6faf5e53affdf66740dfd79485dd5a 100644 (file)
 /* ======================================================================
    set record type and database address to current
 */
-int d_recset( rec TASK_PARM DBN_PARM )
-int rec;                       /* record type */
-TASK_DECL
-DBN_DECL
+int d_recset(
+int rec,                       /* record type */
+int dbn
+)
 {
 /*
    RETURNS: db_status return code.
@@ -83,12 +83,12 @@ DBN_DECL
    FILE_NO rfile;              /* file containing user specified rec */
    FILE_NO fno;                        /* file containing current record */
    int rec_ndx;                        /* Index into record table */
-   RECORD_ENTRY FAR *rec_ptr;  /* Pointer to record table */
+   RECORD_ENTRY *rec_ptr;      /* Pointer to record table */
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO));
 
    /* Check rec parameter user passed */
-   if (nrec_check(rec, &rec_ndx, (RECORD_ENTRY FAR * FAR *)&rec_ptr) != S_OKAY)
+   if (nrec_check(rec, &rec_ndx, (RECORD_ENTRY * *)&rec_ptr) != S_OKAY)
       RETURN( db_status );
    
    /* Check to make sure current record is in this file */
diff --git a/cde/lib/DtSearch/raima/recstat.c b/cde/lib/DtSearch/raima/recstat.c
deleted file mode 100644 (file)
index eef89bc..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: recstat.c /main/2 1996/05/09 04:15:50 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_recstat
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   recstat.c -- db_VISTA record timestamp status check module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Test timestamp status of record
-*/
-d_recstat(dba, rts TASK_PARM)
-DB_ADDR dba;
-ULONG   rts;
-TASK_DECL
-{
-   INT rec;
-   char FAR *ptr;
-   ULONG cts, uts;
-
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(RECORD_IO));
-
-   if ((check_dba(dba) != S_OKAY) || (dio_read(dba, (char FAR * FAR *)&ptr, NOPGHOLD) != S_OKAY))
-      RETURN( db_status );
-
-   /* get record id */
-   bytecpy(&rec, ptr, sizeof(INT));
-   if ( rec >= 0 ) {
-      rec &= ~RLBMASK; /* mask off rlb */
-#ifndef         ONE_DB
-      rec += curr_db_table->rt_offset;
-#endif
-      if ( record_table[rec].rt_flags & TIMESTAMPED ) {
-        bytecpy(&cts, ptr + RECCRTIME, sizeof(ULONG));
-        if ( cts > rts )
-           db_status = S_DELETED;
-        else {
-           bytecpy(&uts, ptr + RECUPTIME, sizeof(ULONG));
-           if ( uts > rts )
-              db_status = S_UPDATED;
-        }
-      }
-      else
-        dberr(S_TIMESTAMP);
-   }
-   else
-      db_status = S_DELETED;
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin recstat.c */
index f7e2ef9d034099bd28bba6e5bfba0467b7f3258f..34a092cf92246b0e7e36a7b882a1e72551c60d0a 100644 (file)
 /* Write contents to current record
 */
 int
-d_recwrite(rec TASK_PARM DBN_PARM)
-CONST char FAR *rec; /* ptr to record area */
-TASK_DECL
-DBN_DECL
+d_recwrite(
+const char *rec, /* ptr to record area */
+int dbn
+)
 {
-#ifndef         NO_TIMESTAMP
-   ULONG timestamp;
-#endif
    INT  rt;        /* record type */
-   char FAR *fptr;     /* field data pointer */
+   char *fptr;     /* field data pointer */
    char ckey[256]; /* current compound key data */
    char nkey[256]; /* new compound key data */
    int stat;
-   register int fld;
-   RECORD_ENTRY FAR *rec_ptr;
-   register FIELD_ENTRY FAR *fld_ptr;
+   int fld;
+   RECORD_ENTRY *rec_ptr;
+   FIELD_ENTRY *fld_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
@@ -78,15 +75,13 @@ DBN_DECL
       RETURN( dberr(S_NOCR) );
 
    /* Read current record */
-   if ( dio_read( curr_rec, (char FAR * FAR *)&crloc, PGHOLD) != S_OKAY )
+   if ( dio_read( curr_rec, (char * *)&crloc, PGHOLD) != S_OKAY )
       RETURN( db_status );
 
    /* Copy record type from record */
    bytecpy(&rt, crloc, sizeof(INT));
    rt &= ~RLBMASK; /* mask off rlb */
-#ifndef         ONE_DB
    rt += curr_db_table->rt_offset;
-#endif
    rec_ptr = &record_table[rt];
 
    /* Check out each field before they are changed */
@@ -97,11 +92,11 @@ DBN_DECL
       /* Build compound key for new data supplied by user.  Note: cflag
         must be the same here as in the 1st key_bldcom for r_chkfld */
       if ( fld_ptr->fd_type == COMKEY ) {
-        key_bldcom(fld, (char FAR *)rec, nkey, FALSE);
+        key_bldcom(fld, (char *)rec, nkey, FALSE);
         fptr = nkey;
       }
       else
-        fptr = (char FAR *)rec + fld_ptr->fd_ptr - rec_ptr->rt_data;
+        fptr = (char *)rec + fld_ptr->fd_ptr - rec_ptr->rt_data;
 
       if ( ! (fld_ptr->fd_flags & STRUCTFLD) ) {
         if ( (stat = r_chkfld(fld, fld_ptr, crloc, fptr)) != S_OKAY ) {
@@ -120,7 +115,7 @@ DBN_DECL
       if ( fld_ptr->fd_type == COMKEY ) {
         /* build old and new keys */
         key_bldcom(fld, crloc + rec_ptr->rt_data, ckey, TRUE);
-        key_bldcom(fld, (char FAR *)rec, nkey, TRUE);
+        key_bldcom(fld, (char *)rec, nkey, TRUE);
 
         /* make sure value has changed */
         if ((fldcmp(fld_ptr, ckey, nkey) != 0) &&
@@ -147,21 +142,8 @@ DBN_DECL
         }
       }
    }
-#ifndef         NO_TIMESTAMP
-   /* check for timestamp */
-   if ( rec_ptr->rt_flags & TIMESTAMPED ) {
-      timestamp = dio_pzgetts(rec_ptr->rt_file);
-      bytecpy( crloc + RECUPTIME, &timestamp, sizeof(LONG));
-   }
-   else
-      timestamp = 0L;
-#endif
    /* write current record to page */
    dio_write(curr_rec, NULL, PGFREE);
-#ifndef         NO_TIMESTAMP
-   if (( db_status == S_OKAY ) && db_tsrecs )
-      cr_time = timestamp;
-#endif
    RETURN( db_status );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin recwrite.c */
index 102d761a7c844eda873356e688804bdd29c56f8c..de3de2ef7a578e5a6d73a9c9621e1c69092a6ffe 100644 (file)
 /* Rename database file
 */
 int
-d_renfile(dbn, fno, fnm TASK_PARM)
-CONST char FAR *dbn;  /* database containing file to be renamed */
-FILE_NO fno;  /* file id number for file to be renamed */
-CONST char FAR *fnm;  /* new file name */
-TASK_DECL
+d_renfile(
+const char *dbn,  /* database containing file to be renamed */
+FILE_NO fno,  /* file id number for file to be renamed */
+const char *fnm   /* new file name */
+)
 {
    REN_ENTRY_P r;
 
@@ -59,11 +59,11 @@ TASK_DECL
 
    if ( dbopen ) RETURN( dberr(S_DBOPEN) );
 
-   r.ptr = (REN_ENTRY FAR *)ALLOC(&r, sizeof(REN_ENTRY), "r");
+   r.ptr = (REN_ENTRY *)ALLOC(&r, sizeof(REN_ENTRY), "r");
    if ( r.ptr == NULL )
       RETURN( dberr(S_NOMEMORY) );
    ll_access(&ren_list);
-   if ( ll_append(&ren_list, (CHAR_P FAR *)&r) != S_OKAY ) {
+   if ( ll_append(&ren_list, (CHAR_P *)&r) != S_OKAY ) {
       RETURN( db_status );
    }
    r.ptr->Ren_db_name.ptr = 
@@ -88,25 +88,19 @@ TASK_DECL
 /* Process renamed file table
 */
 int
-renfiles()
+renfiles(void)
 {
-   register int dbt_lc;                        /* loop control */
-   REN_ENTRY_P FAR *rp;
-#ifndef         ONE_DB
-   DB_ENTRY FAR *db_ptr;
-#endif
+   int dbt_lc;                 /* loop control */
+   REN_ENTRY_P *rp;
+   DB_ENTRY *db_ptr;
 
    if ( ll_access(&ren_list) ) {
-#ifndef         ONE_DB
       db_ptr = curr_db_table;          /* Have to save it because of macros */
-#endif
-      while ((rp = (REN_ENTRY_P FAR *)ll_next(&ren_list)) != NULL) {
+      while ((rp = (REN_ENTRY_P *)ll_next(&ren_list)) != NULL) {
         MEM_LOCK(&rp->ptr->Ren_db_name);
         MEM_LOCK(&rp->ptr->File_name);
-#ifndef         ONE_DB
         for (dbt_lc = no_of_dbs, curr_db_table = db_table;
              --dbt_lc >= 0; ++curr_db_table) {
-#endif
            if (strcmp(rp->ptr->Ren_db_name.ptr, DB_REF(db_name)) == 0) {
               if ( rp->ptr->file_no < 0 || rp->ptr->file_no >= DB_REF(Size_ft) ) {
                  MEM_UNLOCK(&rp->ptr->Ren_db_name);
@@ -116,23 +110,17 @@ renfiles()
                  ll_deaccess(&ren_list);
                  return( dberr(S_RENAME) );
               }
-              strcpy(file_table[NUM2INT(rp->ptr->file_no, ft_offset)].ft_name,
+              snprintf(file_table[NUM2INT(rp->ptr->file_no, ft_offset)].ft_name, FILENMLEN, "%s",
                      rp->ptr->File_name.ptr);
-#ifndef         ONE_DB
               break;
-#endif
            }
-#ifndef         ONE_DB
         }
-#endif
         MEM_UNLOCK(&rp->ptr->Ren_db_name);
         MEM_UNLOCK(&rp->ptr->File_name);
         FREE(&rp->ptr->Ren_db_name);
         FREE(&rp->ptr->File_name);
       }
-#ifndef         ONE_DB
       curr_db_table = db_ptr;
-#endif
    }
    ll_deaccess(&ren_list);
    ll_free(&ren_list);
index 4f2f23878295c5a494c3b5c166fbfb275cde4fd6..07cd84c44012a9e26050b6847f33a4e2038a383f 100644 (file)
 /* Read currency table
 */
 int
-d_rdcurr(currbuff, currsize TASK_PARM)
-DB_ADDR **currbuff;
-int FAR *currsize;
-TASK_DECL
+d_rdcurr(DB_ADDR **currbuff, int *currsize)
 {
    int cs;
 
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(SET_NOIO));
 
    cs = 2*size_st + 1;
-#ifndef         NO_TIMESTAMP
-   if ( db_tsrecs ) cs *= 2;
-   if ( db_tssets ) cs += size_st;
-#endif
    *currbuff = (DB_ADDR *)ALLOC(NULL, cs*sizeof(DB_ADDR), "currbuff");
    if ( *currbuff == NULL ) RETURN( dberr(S_NOMEMORY) );
    *currsize = cs * sizeof(DB_ADDR);
-   RETURN( d_rerdcurr(currbuff TASK_PARM) );
+   RETURN( d_rerdcurr(currbuff) );
 }
 
-int d_rerdcurr(currbuff TASK_PARM)
-DB_ADDR **currbuff;
-TASK_DECL
+int d_rerdcurr(DB_ADDR **currbuff)
 {
-   DB_ADDR FAR *cb_ptr;
+   DB_ADDR *cb_ptr;
 
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(SET_NOIO));
 
    *(cb_ptr = *currbuff) = curr_rec;
    bytecpy(++cb_ptr, curr_own, size_st*sizeof(*cb_ptr));
    bytecpy(cb_ptr += size_st, curr_mem, size_st*sizeof(*cb_ptr));
-#ifndef         NO_TIMESTAMP
-   if ( db_tsrecs ) {
-      *(cb_ptr += size_st) = cr_time;
-      bytecpy(++cb_ptr, co_time, size_st*sizeof(*cb_ptr));
-      bytecpy(cb_ptr += size_st, cm_time, size_st*sizeof(*cb_ptr));
-   }
-   if ( db_tssets ) {
-      bytecpy(cb_ptr + size_st, cs_time, size_st*sizeof(*cb_ptr));
-   }
-#endif
    MEM_UNLOCK(currbuff);
    RETURN( db_status = S_OKAY );
 }
@@ -105,11 +86,9 @@ TASK_DECL
 /* Write currency table
 */
 int
-d_wrcurr(currbuff TASK_PARM)
-DB_ADDR *currbuff;
-TASK_DECL
+d_wrcurr(DB_ADDR *currbuff)
 {
-   DB_ADDR FAR *cb_ptr;
+   DB_ADDR *cb_ptr;
 
    DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(SET_NOIO));
 
@@ -117,16 +96,6 @@ TASK_DECL
       curr_rec = *cb_ptr;
       bytecpy(curr_own, ++cb_ptr, size_st*sizeof(*cb_ptr));
       bytecpy(curr_mem, cb_ptr += size_st, size_st*sizeof(*cb_ptr));
-#ifndef         NO_TIMESTAMP
-      if ( db_tsrecs ) {
-        cr_time = *(cb_ptr += size_st);
-        bytecpy(co_time, ++cb_ptr, size_st*sizeof(*cb_ptr));
-        bytecpy(cm_time, cb_ptr += size_st, size_st*sizeof(*cb_ptr));
-      }
-      if ( db_tssets ) {
-        bytecpy(cs_time, cb_ptr + size_st, size_st*sizeof(*cb_ptr));
-      }
-#endif
    }
    free(currbuff);
    RETURN( db_status = S_OKAY );
index 4360f0d4eff6e9cd982ced11926632b0c5ecf34d..291b8ae79b06d64f7fdea48898c2fb594af62236 100644 (file)
 #include "vista.h"
 #include "dbtype.h"
 
-#ifndef         ONE_DB
 /* Set current database
 */
 int
-d_setdb(dbn TASK_PARM)
-int dbn;   /* database number */
-TASK_DECL
+d_setdb(
+int dbn   /* database number */
+)
 {
    DB_ENTER(DB_ID TASK_ID LOCK_SET(RECORD_NOIO));
 
@@ -72,5 +71,4 @@ TASK_DECL
 
    RETURN( db_status = S_OKAY );
 }
-#endif
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin setdb.c */
index 8701c4465e50075bfc5c73e1e61b591b10be21ba..258a2188fa17d4b88d675b56e53ee22bcf002f24 100644 (file)
 /* Set current member to current member
 */
 int
-d_setmm(sett, sets TASK_PARM DBN_PARM)
-int sett;   /* set table entry number of target member */
-int sets;   /* set table entry number of source member */
-TASK_DECL
-DBN_DECL    /* database number */
+d_setmm(
+int sett,   /* set table entry number of target member */
+int sets,   /* set table entry number of source member */
+int dbn     /* database number */
+)
 {
    int cmtype; /* current member type */
-   register int mem;
-   SET_ENTRY FAR *set_ptr;
-   register MEMBER_ENTRY FAR *mem_ptr;
+   int mem;
+   SET_ENTRY *set_ptr;
+   MEMBER_ENTRY *mem_ptr;
    int memtot;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if ((d_cmtype(sets, &cmtype TASK_PARM DBN_PARM) != S_OKAY) ||
-       (nset_check(sett, &sett, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY))
+   if ((d_cmtype(sets, &cmtype , dbn) != S_OKAY) ||
+       (nset_check(sett, &sett, (SET_ENTRY * *)&set_ptr) != S_OKAY))
       RETURN( db_status );
 
    cmtype += NUM2INT(-RECMARK, rt_offset);
index a8b70c0bb5873c3c462dce25d55fe9624414a78e..c4ac376b4186c8565c586bb8309d94e1a45ee466 100644 (file)
 /* Set current member to current owner
 */
 int
-d_setmo(setm, seto TASK_PARM DBN_PARM)
-int setm;   /* set table entry number of member */
-int seto;   /* set table entry number of owner */
-TASK_DECL
-DBN_DECL    /* database number */
+d_setmo(
+int setm,   /* set table entry number of member */
+int seto,   /* set table entry number of owner */
+int dbn     /* database number */
+)
 {
-   register int mem;
-   SET_ENTRY FAR *setm_ptr, FAR *seto_ptr;
-   register MEMBER_ENTRY FAR *mem_ptr;
+   int mem;
+   SET_ENTRY *setm_ptr, *seto_ptr;
+   MEMBER_ENTRY *mem_ptr;
    int memtot;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if ((nset_check(seto, &seto, (SET_ENTRY FAR * FAR *)&seto_ptr) != S_OKAY) ||
-       (nset_check(setm, &setm, (SET_ENTRY FAR * FAR *)&setm_ptr) != S_OKAY))
+   if ((nset_check(seto, &seto, (SET_ENTRY * *)&seto_ptr) != S_OKAY) ||
+       (nset_check(setm, &setm, (SET_ENTRY * *)&setm_ptr) != S_OKAY))
       RETURN( db_status );
 
-   if (null_dba((char FAR *)&curr_own[seto])) RETURN( dberr(S_NOCO) );
+   if (null_dba((char *)&curr_own[seto])) RETURN( dberr(S_NOCO) );
 
    for (mem = setm_ptr->st_members, memtot = mem + setm_ptr->st_memtot,
                                                mem_ptr = &member_table[mem];
index 7b61e18509632ff2ae6b597e966d4babd85a7b75..8c85d0acaa59c4c91c0bbca75bc9f93d6478f53a 100644 (file)
 /* Set current member to current record
 */
 int
-d_setmr(set TASK_PARM DBN_PARM)
-int set;   /* set table entry number */
-TASK_DECL
-DBN_DECL   /* database number */
+d_setmr(
+int set,   /* set table entry number */
+int dbn    /* database number */
+)
 {
    int crtype; /* current record type */
-   register int mem;
-   SET_ENTRY FAR *set_ptr;
-   register MEMBER_ENTRY FAR *mem_ptr;
+   int mem;
+   SET_ENTRY *set_ptr;
+   MEMBER_ENTRY *mem_ptr;
    int memtot;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    if ( ! curr_rec )
       RETURN( dberr( S_NOCR ) );
 
-   if ( d_crtype(&crtype TASK_PARM DBN_PARM) != S_OKAY )
+   if ( d_crtype(&crtype , dbn) != S_OKAY )
       RETURN( db_status );
    crtype += NUM2INT(-RECMARK, rt_offset);
 
index d81f061e74668bc5eeae09691aac004c8893f7b4..f2075b97d0a2248a1b3e638ddbf32e1351277a90 100644 (file)
 /* Set current owner to current member
 */
 int
-d_setom(nseto, nsetm TASK_PARM DBN_PARM)
-int nseto;   /* set table entry number of owner */
-int nsetm;   /* set table entry number of member */
-TASK_DECL
-DBN_DECL    /* database number */
+d_setom(
+int nseto,   /* set table entry number of owner */
+int nsetm,   /* set table entry number of member */
+int dbn     /* database number */
+)
 {
    int seto, setm;
    int cmtype; /* current record type */
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if ((d_cmtype(nsetm, &cmtype TASK_PARM DBN_PARM) != S_OKAY) ||
-       (nset_check(nseto, &seto, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY))
+   if ((d_cmtype(nsetm, &cmtype , dbn) != S_OKAY) ||
+       (nset_check(nseto, &seto, (SET_ENTRY * *)&set_ptr) != S_OKAY))
       RETURN( db_status );
    cmtype += NUM2INT(-RECMARK, rt_offset);
    setm = NUM2INT(nsetm - SETMARK, st_offset);
@@ -74,16 +74,6 @@ DBN_DECL    /* database number */
       
    curr_own[seto] = curr_mem[setm];
    curr_mem[seto] = NULL_DBA;
-#ifndef         NO_TIMESTAMP
-   /* set timestamps */
-   if ( db_tsrecs ) {
-      co_time[seto] = cm_time[setm];
-      cm_time[seto] = 0L;
-   }
-   if ( db_tssets ) {
-      d_utscs( nseto, &cs_time[seto] TASK_PARM DBN_PARM );
-   }
-#endif
    RETURN( db_status );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin setom.c */
index 849e6d8dff81f03fb994c7fb406e2193eab1be0a..5d67898363f4e82c3fd8b4532385a7c00ae09970 100644 (file)
 /* Set current owner to current owner
 */
 int
-d_setoo(nsett, nsets TASK_PARM DBN_PARM)
-int nsett;   /* set table entry number of target owner */
-int nsets;   /* set table entry number of source owner */
-TASK_DECL
-DBN_DECL    /* database number */
+d_setoo(
+int nsett,   /* set table entry number of target owner */
+int nsets,   /* set table entry number of source owner */
+int dbn     /* database number */
+)
 {
    int sett, sets;
-   SET_ENTRY FAR *sett_ptr, FAR *sets_ptr;
+   SET_ENTRY *sett_ptr, *sets_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if ((nset_check(nsett, &sett, (SET_ENTRY FAR * FAR *)&sett_ptr) != S_OKAY) ||
-       (nset_check(nsets, &sets, (SET_ENTRY FAR * FAR *)&sets_ptr) != S_OKAY))
+   if ((nset_check(nsett, &sett, (SET_ENTRY * *)&sett_ptr) != S_OKAY) ||
+       (nset_check(nsets, &sets, (SET_ENTRY * *)&sets_ptr) != S_OKAY))
       RETURN( db_status );
 
    if ( sett_ptr->st_own_rt != sets_ptr->st_own_rt )
       RETURN( dberr( S_INVOWN ) );
       
-   if (null_dba((char FAR *)&curr_own[sets]))
+   if (null_dba((char *)&curr_own[sets]))
       RETURN( dberr(S_NOCO) );
 
    curr_own[sett] = curr_own[sets];
    curr_mem[sett] = NULL_DBA;
-#ifndef         NO_TIMESTAMP
-   /* set timestamps */
-   if ( db_tsrecs ) {
-      co_time[sett] = co_time[sets];
-      cm_time[sett] = 0L;
-   }
-   if ( db_tssets ) {
-      d_utscs( nsett, &cs_time[sett] TASK_PARM DBN_PARM );
-   }
-#endif
    RETURN( db_status = S_OKAY );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin setoo.c */
index 8533a3a47bf451957f12a19e8e5240e9d0e7c5dc..41d60d84fa8ef185b22c66f542156893cba110c4 100644 (file)
 /* Set current owner to current record
 */
 int
-d_setor(nset TASK_PARM DBN_PARM)
-int nset;  /* set number */
-TASK_DECL
-DBN_DECL   /* database number */
+d_setor(
+int nset,  /* set number */
+int dbn    /* database number */
+)
 {
    int set;
    int crtype; /* current record type */
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
 
-   if ((nset_check(nset, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY) ||
-       (d_crtype(&crtype TASK_PARM DBN_PARM) != S_OKAY))
+   if ((nset_check(nset, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY) ||
+       (d_crtype(&crtype , dbn) != S_OKAY))
       RETURN( db_status );
 
    crtype += NUM2INT(-RECMARK, rt_offset);
@@ -72,16 +72,6 @@ DBN_DECL   /* database number */
       
    curr_own[set] = curr_rec;
    curr_mem[set] = NULL_DBA;
-#ifndef         NO_TIMESTAMP
-   /* set timestamps */
-   if ( db_tsrecs ) {
-      co_time[set] = cr_time;
-      cm_time[set] = 0L;
-   }
-   if ( db_tssets ) {
-      d_utscs( nset, &cs_time[set] TASK_PARM DBN_PARM );
-   }
-#endif
    RETURN( db_status );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin setor.c */
index 9087b28b0858ef9bc6c42d8a94325d139ed68fb9..eb6d21b3d3571666c09b3499540c5a440909f34b 100644 (file)
 /* Set current record to current member
 */
 int
-d_setrm(set TASK_PARM DBN_PARM)
-int set;   /* set table entry number */
-TASK_DECL
-DBN_DECL   /* database number */
+d_setrm(
+int set,   /* set table entry number */
+int dbn    /* database number */
+)
 {
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO));
    
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    if ( ! curr_mem[set] ) 
       RETURN( dberr( S_NOCM ) );
 
    curr_rec = curr_mem[set];
-#ifndef         NO_TIMESTAMP
-   /* set timestamp */
-   if ( db_tsrecs )
-      cr_time = cm_time[set];
-#endif
    RETURN( db_status = S_OKAY );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin setrm.c */
index 400a1b1aa11788d9ca4a3bd5408b94c48a37b3b2..a25250f29c1e456980ca4f7e501c3b2b0f867bf9 100644 (file)
 /* Set current record to current owner
 */
 int
-d_setro(set TASK_PARM DBN_PARM)
-int set;   /* set table entry number */
-TASK_DECL
-DBN_DECL   /* database number */
+d_setro(
+int set,   /* set table entry number */
+int dbn    /* database number */
+)
 {
-   SET_ENTRY FAR *set_ptr;
+   SET_ENTRY *set_ptr;
 
    DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO));
    
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
+   if (nset_check(set, &set, (SET_ENTRY * *)&set_ptr) != S_OKAY)
       RETURN( db_status );
 
    if ( ! curr_own[set] ) 
       RETURN( dberr( S_NOCO ) );
 
    curr_rec = curr_own[set];
-#ifndef         NO_TIMESTAMP
-   /* set timestamp */
-   if ( db_tsrecs )
-      cr_time = co_time[set];
-#endif
    RETURN( db_status = S_OKAY );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin setro.c */
index 3569d74ed50665c8aed5c661760941387f0fcb80..573035492746572cc5e0a4c8c8f2d483dfee3266 100644 (file)
 
 /* Called once at the beginning of each external function
 */
-int startup(DB_ID TASK_PTR_ID LOCK_PARM)
-DBN_DECL
-TASK_PTR_DECL
-LOCK_DECL
+int startup(int dbn)
 {
    db_status = S_OKAY;
    if ( ! db_glob_init ) {
-#ifdef MULTI_TASK
-      Currtask.v.ptr = (TASK FAR *)&db_global;
-#endif
       taskinit(&db_global);
       db_glob_init = 1;
    }
-#ifdef MULTI_TASK
-   if ( task != 0 ) {
-      task_switch(task);
-   }
-#endif
-#ifndef NO_DBN_PARM
-#ifndef ONE_DB
-   if ( dbn >= 0 && dbn_check(dbn) != S_OKAY ) {
-      return( db_status );
-   }
-#endif
-#endif
+
    return( db_status );
 }
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin startup.c */
diff --git a/cde/lib/DtSearch/raima/stscm.c b/cde/lib/DtSearch/raima/stscm.c
deleted file mode 100644 (file)
index f725f77..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: stscm.c /main/2 1996/05/09 04:19:24 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_stscm
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   stscm.c -- db_VISTA current member timestamp set module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Set timestamp of current member
-*/
-d_stscm(set, timestamp TASK_PARM DBN_PARM)
-int set;
-ULONG timestamp;
-TASK_DECL
-DBN_DECL
-{
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   /* make sure we have a current member */
-   if ( curr_mem[set] ) {
-      if ( db_tsrecs )
-        cm_time[set] = timestamp;
-      else
-        dberr(S_TIMESTAMP);
-   }
-   else
-      dberr(S_NOCM);
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin stscm.c */
diff --git a/cde/lib/DtSearch/raima/stsco.c b/cde/lib/DtSearch/raima/stsco.c
deleted file mode 100644 (file)
index b74be17..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: stsco.c /main/2 1996/05/09 04:19:40 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_stsco
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   stsco.c -- db_VISTA current owner timestamp set module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Set timestamp of current owner
-*/
-d_stsco(set, timestamp TASK_PARM DBN_PARM)
-int set;
-ULONG timestamp;
-TASK_DECL
-DBN_DECL
-{
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   /* make sure we have a current owner */
-   if ( curr_own[set] ) {
-      if ( db_tsrecs )
-        co_time[set] = timestamp;
-      else
-        dberr(S_TIMESTAMP);
-   }
-   else
-      dberr(S_NOCO);
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin stsco.c */
diff --git a/cde/lib/DtSearch/raima/stscr.c b/cde/lib/DtSearch/raima/stscr.c
deleted file mode 100644 (file)
index 3c8dd8a..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: stscr.c /main/2 1996/05/09 04:19:54 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_stscr
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   stscr.c -- db_VISTA current record timestamp set module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Set timestamp of current record
-*/
-d_stscr(timestamp TASK_PARM)
-ULONG timestamp;
-TASK_DECL
-{
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(RECORD_NOIO));
-
-   db_status = S_OKAY;
-
-   /* make sure we have a current record */
-   if ( curr_rec ) {
-      if ( db_tsrecs )
-        cr_time = timestamp;
-      else
-        dberr(S_TIMESTAMP);
-   }
-   else
-      dberr(S_NOCR);
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin stscr.c */
diff --git a/cde/lib/DtSearch/raima/stscs.c b/cde/lib/DtSearch/raima/stscs.c
deleted file mode 100644 (file)
index 6b63226..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: stscs.c /main/2 1996/05/09 04:20:12 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_stscs
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   stscs.c -- db_VISTA set timestamp set module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Set timestamp of set
-*/
-d_stscs(set, timestamp TASK_PARM DBN_PARM)
-int set;
-ULONG timestamp;
-TASK_DECL
-DBN_DECL
-{
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_NOIO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   /* make sure we have a current owner */
-   if ( curr_own[set] ) {
-      if ( db_tssets )
-        cs_time[set] = timestamp;
-      else
-        dberr(S_TIMESTAMP);
-   }
-   else
-      dberr(S_NOCO);
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin stscs.c */
index 5fb1c4c7eae6b1febdae3c946f41b1dfb6656101..1567fb9afaa69d2912e308994c4f6b317ce3d705 100644 (file)
 */
 
 
-int EXTERNAL_FIXED dt_opentask(P1(DB_TASK FAR *));
+int EXTERNAL_FIXED dt_opentask(P1(DB_TASK *));
 int EXTERNAL_FIXED dt_closetask(P1(DB_TASK));
 
 int EXTERNAL_FIXED dt_close(TASK_D1);                          /* dblfcns.c */
 int EXTERNAL_DBN   dt_cmstat(P1(int) TASK_Di DBN_Dn);          /* cmstat.c */
-int EXTERNAL_DBN   dt_cmtype(P1(int) Pi(int FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_cmtype(P1(int) Pi(int *) TASK_Di DBN_Dn); 
                                                                /* cmtype.c */
 int EXTERNAL_DBN   dt_connect(P1(int) TASK_Di DBN_Dn);         /* connect.c */
-#ifndef NO_TIMESTAMP
-int EXTERNAL_DBN   dt_costat(P1(int) TASK_Di DBN_Dn);          /* costat.c */
-#endif
-int EXTERNAL_DBN   dt_cotype(P1(int) Pi(int FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_cotype(P1(int) Pi(int *) TASK_Di DBN_Dn); 
                                                                /* cotype.c */
-int EXTERNAL_DBN   dt_crget(P1(DB_ADDR FAR *) TASK_Di DBN_Dn); /* crget.c */
-int EXTERNAL_DBN   dt_crread(P1(long) Pi(char FAR *) TASK_Di DBN_Dn);
+int EXTERNAL_DBN   dt_crget(P1(DB_ADDR *) TASK_Di DBN_Dn);     /* crget.c */
+int EXTERNAL_DBN   dt_crread(P1(long) Pi(char *) TASK_Di DBN_Dn);
                                                                /* crread.c */
-int EXTERNAL_DBN   dt_crset(P1(DB_ADDR FAR *) TASK_Di DBN_Dn); /* crset.c */
-#ifndef NO_TIMESTAMP
-int EXTERNAL_FIXED dt_crstat(TASK_D1);                         /* crstat.c */
-#endif
-int EXTERNAL_DBN   dt_crtype(P1(int FAR *) TASK_Di DBN_Dn);    /* crtype.c */
-int EXTERNAL_DBN   dt_crwrite(P1(long) Pi(char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_crset(P1(DB_ADDR *) TASK_Di DBN_Dn);     /* crset.c */
+int EXTERNAL_DBN   dt_crtype(P1(int *) TASK_Di DBN_Dn);        /* crtype.c */
+int EXTERNAL_DBN   dt_crwrite(P1(long) Pi(char *) TASK_Di DBN_Dn); 
                                                                /* crwrite.c */
-int EXTERNAL_DBN   dt_csmget(P1(int) Pi(DB_ADDR FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_csmget(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn); 
                                                                /* csmget.c */
-int EXTERNAL_DBN   dt_csmread(P1(int) Pi(long) Pi(char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_csmread(P1(int) Pi(long) Pi(char *) TASK_Di DBN_Dn); 
                                                                /* csmread.c */
-int EXTERNAL_DBN   dt_csmset(P1(int) Pi(DB_ADDR FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_csmset(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn); 
                                                                /* csmset.c */
-int EXTERNAL_DBN   dt_csmwrite(P1(int) Pi(long) Pi(CONST char FAR *) TASK_Di 
+int EXTERNAL_DBN   dt_csmwrite(P1(int) Pi(long) Pi(const char *) TASK_Di 
                                  DBN_Dn);                      /* csmwrite.c */
-int EXTERNAL_DBN   dt_csoget(P1(int) Pi(DB_ADDR FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_csoget(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn); 
                                                                /* csoget.c */
-int EXTERNAL_DBN   dt_csoread(P1(int) Pi(long) Pi(char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_csoread(P1(int) Pi(long) Pi(char *) TASK_Di DBN_Dn); 
                                                                /* csoread.c */
-int EXTERNAL_DBN   dt_csoset(P1(int) Pi(DB_ADDR FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_csoset(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn); 
                                                                /* csoset.c */
-int EXTERNAL_DBN   dt_csowrite(P1(int) Pi(long) Pi(CONST char FAR *) TASK_Di 
+int EXTERNAL_DBN   dt_csowrite(P1(int) Pi(long) Pi(const char *) TASK_Di 
                                  DBN_Dn);                      /* csowrite.c */
-#ifndef NO_TIMESTAMP
-int EXTERNAL_DBN   dt_csstat(P1(int) TASK_Di DBN_Dn);          /* csstat.c */
-int EXTERNAL_DBN   dt_ctscm(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); 
-                                                               /* ctscm.c */
-int EXTERNAL_DBN   dt_ctsco(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); 
-                                                               /* ctsco.c */
-int EXTERNAL_FIXED dt_ctscr(P1(ULONG FAR *) TASK_Di );         /* ctscr.c */
-#endif
-#ifndef NO_COUNTRY
-int EXTERNAL_FIXED dt_ctbpath(P1(CONST char FAR *) TASK_Di);   /* pathfcns.c */
-#endif
-int EXTERNAL_FIXED dt_dbdpath(P1(CONST char FAR *) TASK_Di );  /* dbdpath.c */
-int EXTERNAL_FIXED dt_dbfpath(P1(CONST char FAR *) TASK_Di );  /* dbfpath.c */
-int EXTERNAL_FIXED dt_dblog(P1(CONST char FAR *) TASK_Di );    /* dblog.c */
-int EXTERNAL_FIXED dt_dbuserid(P1(CONST char FAR *) TASK_Di ); /* dbuserid.c */
+int EXTERNAL_FIXED dt_ctbpath(P1(const char *) TASK_Di);       /* pathfcns.c */
+int EXTERNAL_FIXED dt_dbdpath(P1(const char *) TASK_Di );      /* dbdpath.c */
+int EXTERNAL_FIXED dt_dbfpath(P1(const char *) TASK_Di );      /* dbfpath.c */
+int EXTERNAL_FIXED dt_dblog(P1(const char *) TASK_Di );        /* dblog.c */
+int EXTERNAL_FIXED dt_dbuserid(P1(const char *) TASK_Di );     /* dbuserid.c */
 int EXTERNAL_DBN   dt_delete(TASK_D1 DBN_Dn);                  /* delete.c */
 int EXTERNAL_DBN   dt_disdel(TASK_D1 DBN_Dn);                  /* disdel.c */
 int EXTERNAL_DBN   dt_recnext(TASK_D1 DBN_Dn);                 /* recnext.c */
 int EXTERNAL_DBN   dt_recprev(TASK_D1 DBN_Dn);                 /* recprev.c */
-int EXTERNAL_FIXED dt_destroy(P1(CONST char FAR *) TASK_Di );  /* destroy.c */
+int EXTERNAL_FIXED dt_destroy(P1(const char *) TASK_Di );      /* destroy.c */
 int EXTERNAL_DBN   dt_discon(P1(int) TASK_Di DBN_Dn);          /* discon.c */
-int EXTERNAL_DBN   dt_fillnew(P1(int) Pi(CONST char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_fillnew(P1(int) Pi(const char *) TASK_Di DBN_Dn); 
                                                                /* fillnew.c */
 int EXTERNAL_DBN   dt_findco(P1(int) TASK_Di DBN_Dn);          /* findco.c */
 int EXTERNAL_DBN   dt_findfm(P1(int) TASK_Di DBN_Dn);          /* findfm.c */
@@ -323,81 +307,67 @@ int EXTERNAL_DBN   dt_findlm(P1(int) TASK_Di DBN_Dn);             /* findlm.c */
 int EXTERNAL_DBN   dt_findnm(P1(int) TASK_Di DBN_Dn);          /* findnm.c */
 int EXTERNAL_DBN   dt_findpm(P1(int) TASK_Di DBN_Dn);          /* findpm.c */
 int EXTERNAL_FIXED dt_freeall(TASK_D1);                                /* dblfcns.c */
-#ifndef NO_TIMESTAMP
-int EXTERNAL_DBN   dt_gtscm(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); 
-                                                               /* gtscm.c */
-int EXTERNAL_DBN   dt_gtsco(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); 
-                                                               /* gtsco.c */
-int EXTERNAL_FIXED dt_gtscr(P1(ULONG FAR *) TASK_Di );         /* gtscr.c */
-int EXTERNAL_DBN   dt_gtscs(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); 
-                                                               /* gtscs.c */
-#endif
 int EXTERNAL_DBN   dt_initialize(TASK_D1 DBN_Dn);              /* initial.c */
 int EXTERNAL_DBN   dt_initfile(P1(FILE_NO) TASK_Di DBN_Dn);    /* initial.c */
 int EXTERNAL_DBN   dt_ismember(P1(int) TASK_Di DBN_Dn);                /* ismember.c */
 int EXTERNAL_DBN   dt_isowner(P1(int) TASK_Di DBN_Dn);         /* isowner.c */
 int EXTERNAL_DBN   dt_keydel(P1(long) TASK_Di DBN_Dn);         /* keydel.c */
 int EXTERNAL_DBN   dt_keyexist(P1(long) TASK_Di DBN_Dn);       /* keyexist.c */
-int EXTERNAL_DBN   dt_keyfind(P1(long) Pi(CONST char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_keyfind(P1(long) Pi(const char *) TASK_Di DBN_Dn); 
                                                                /* keyfind.c */
 int EXTERNAL_DBN   dt_keyfree(P1(long) TASK_Di DBN_Dn);                /* dblfcns.c */
 int EXTERNAL_DBN   dt_keyfrst(P1(long) TASK_Di DBN_Dn);                /* keyfrst.c */
 int EXTERNAL_DBN   dt_keylast(P1(long) TASK_Di DBN_Dn);                /* keylast.c */
-int EXTERNAL_DBN   dt_keylock(P1(long) Pi(char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_keylock(P1(long) Pi(char *) TASK_Di DBN_Dn); 
                                                                /* dblfcns.c */
-int EXTERNAL_DBN   dt_keylstat(P1(long) Pi(char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_keylstat(P1(long) Pi(char *) TASK_Di DBN_Dn); 
                                                                /* dblfcns.c */
 int EXTERNAL_DBN   dt_keynext(P1(long) TASK_Di DBN_Dn);                /* keynext.c */
 int EXTERNAL_DBN   dt_keyprev(P1(long) TASK_Di DBN_Dn);                /* keyprev.c */
-int EXTERNAL_FIXED dt_keyread(P1(char FAR *) TASK_Di );                /* keyfcns.c */
+int EXTERNAL_FIXED dt_keyread(P1(char *) TASK_Di );            /* keyfcns.c */
 int EXTERNAL_DBN   dt_keystore(P1(long) TASK_Di DBN_Dn);       /* keystore.c */
-int EXTERNAL_DBN   dt_lock(P1(int) Pi(LOCK_REQUEST FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_lock(P1(int) Pi(LOCK_REQUEST *) TASK_Di DBN_Dn); 
                                                                /* dblfcns.c */
 int EXTERNAL_DBN   dt_makenew(P1(int) TASK_Di DBN_Dn);         /* makenew.c */
 int EXTERNAL_FIXED dt_mapchar(P1(unsigned char) Pi(unsigned char) 
-                     Pi(CONST char FAR *) Pi(unsigned char) TASK_Di);
+                     Pi(const char *) Pi(unsigned char) TASK_Di);
                                                                /* mapchar.c */
-int EXTERNAL_DBN   dt_members(P1(int) Pi(LONG FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_members(P1(int) Pi(LONG *) TASK_Di DBN_Dn); 
                                                                /* members.c */
 int EXTERNAL_FIXED dt_off_opt(P1(int) TASK_Di );               /* options.c */
 int EXTERNAL_FIXED dt_on_opt(P1(int) TASK_Di );                        /* options.c */
-int EXTERNAL_FIXED dt_open(P1(CONST char FAR *) Pi(CONST char FAR *) TASK_Di);
+int EXTERNAL_FIXED dt_open(P1(const char *) Pi(const char *) TASK_Di);
                                                                /* dblfcns.c */
-int EXTERNAL_FIXED dt_rdcurr(P1(DB_ADDR FAR **) Pi(int FAR *) TASK_Di); 
+int EXTERNAL_FIXED dt_rdcurr(P1(DB_ADDR **) Pi(int *) TASK_Di); 
                                                                /* rwcurr.c */
-int EXTERNAL_FIXED dt_rerdcurr(P1(DB_ADDR FAR **) TASK_Di);    /* rwcurr.c */
-int EXTERNAL_FIXED dt_wrcurr(P1(DB_ADDR FAR *) TASK_Di);       /* rwcurr.c */
+int EXTERNAL_FIXED dt_rerdcurr(P1(DB_ADDR **) TASK_Di);        /* rwcurr.c */
+int EXTERNAL_FIXED dt_wrcurr(P1(DB_ADDR *) TASK_Di);   /* rwcurr.c */
 int EXTERNAL_DBN   dt_recfree(P1(int) TASK_Di DBN_Dn);         /* dblfcns.c */
 int EXTERNAL_DBN   dt_recfrst(P1(int) TASK_Di DBN_Dn);         /* recfrst.c */
 int EXTERNAL_DBN   dt_reclast(P1(int) TASK_Di DBN_Dn);         /* reclast.c */
-int EXTERNAL_DBN   dt_reclock(P1(int) Pi(char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_reclock(P1(int) Pi(char *) TASK_Di DBN_Dn); 
                                                                /* dblfcns.c */
-int EXTERNAL_DBN   dt_reclstat(P1(int) Pi(char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_reclstat(P1(int) Pi(char *) TASK_Di DBN_Dn); 
                                                                /* dblfcns.c */
-int EXTERNAL_FIXED dt_recover(P1(CONST char FAR *) TASK_Di );  /* recover.c */
-int EXTERNAL_DBN   dt_recread(P1(char FAR *) TASK_Di DBN_Dn);  /* recread.c */
+int EXTERNAL_FIXED dt_recover(P1(const char *) TASK_Di );      /* recover.c */
+int EXTERNAL_DBN   dt_recread(P1(char *) TASK_Di DBN_Dn);      /* recread.c */
 int EXTERNAL_DBN   dt_recset(P1(int) TASK_Di DBN_Dn);          /* recset.c */
-#ifndef NO_TIMESTAMP
-int EXTERNAL_FIXED dt_recstat(P1(DB_ADDR) Pi(ULONG) TASK_Di ); /* recstat.c */
-#endif
-int EXTERNAL_DBN   dt_recwrite(P1(CONST char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_recwrite(P1(const char *) TASK_Di DBN_Dn); 
                                                                /* recwrite.c */
-int EXTERNAL_FIXED dt_renfile(P1(CONST char FAR *) Pi(FILE_NO) 
-                                Pi(CONST char FAR *) TASK_Di); /* renfile.c */
+int EXTERNAL_FIXED dt_renfile(P1(const char *) Pi(FILE_NO) 
+                                Pi(const char *) TASK_Di); /* renfile.c */
 int EXTERNAL_FIXED dt_retries(P1(int) TASK_Di );               /* dblfcns.c */
 int EXTERNAL_FIXED dt_rlbclr(TASK_D1);                         /* dblfcns.c */
 int EXTERNAL_FIXED dt_rlbset(TASK_D1);                         /* dblfcns.c */
 int EXTERNAL_FIXED dt_rlbtst(TASK_D1);                         /* dblfcns.c */
 int EXTERNAL_FIXED dt_set_dberr(P1(FARPROC) TASK_Di);          /* dberr.c */
-#ifndef ONE_DB
 int EXTERNAL_FIXED dt_setdb(P1(int) TASK_Di);                  /* setdb.c */
-#endif
 int EXTERNAL_DBN   dt_setfree(P1(int) TASK_Di DBN_Dn);         /* dblfcns.c */
-int EXTERNAL_DBN   dt_setkey(P1(long) Pi(CONST char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_setkey(P1(long) Pi(const char *) TASK_Di DBN_Dn); 
                                                                /* makenew.c */
-int EXTERNAL_DBN   dt_setlock(P1(int) Pi(char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_setlock(P1(int) Pi(char *) TASK_Di DBN_Dn); 
                                                                /* dblfcns.c */
-int EXTERNAL_DBN   dt_setlstat(P1(int) Pi(char FAR *) TASK_Di DBN_Dn); 
+int EXTERNAL_DBN   dt_setlstat(P1(int) Pi(char *) TASK_Di DBN_Dn); 
                                                                /* dblfcns.c */
 int EXTERNAL_DBN   dt_setmm(P1(int) Pi(int) TASK_Di DBN_Dn);   /* setmm.c */
 int EXTERNAL_DBN   dt_setmo(P1(int) Pi(int) TASK_Di DBN_Dn);   /* setmo.c */
@@ -407,25 +377,10 @@ int EXTERNAL_DBN   dt_setoo(P1(int) Pi(int) TASK_Di DBN_Dn);      /* setoo.c */
 int EXTERNAL_DBN   dt_setor(P1(int) TASK_Di DBN_Dn);           /* setor.c */
 int EXTERNAL_DBN   dt_setrm(P1(int) TASK_Di DBN_Dn);           /* setrm.c */
 int EXTERNAL_DBN   dt_setro(P1(int) TASK_Di DBN_Dn);           /* setro.c */
-#ifndef NO_TIMESTAMP
-int EXTERNAL_DBN   dt_stscm(P1(int) Pi(ULONG) TASK_Di DBN_Dn);         /* stscm.c */
-int EXTERNAL_DBN   dt_stsco(P1(int) Pi(ULONG) TASK_Di DBN_Dn);         /* stsco.c */
-int EXTERNAL_FIXED dt_stscr(P1(ULONG) TASK_Di );               /* stscr.c */
-int EXTERNAL_DBN   dt_stscs(P1(int) Pi(ULONG) TASK_Di DBN_Dn);         /* stscs.c */
-#endif
 int EXTERNAL_FIXED dt_timeout(P1(int) TASK_Di );               /* dblfcns.c */
 int EXTERNAL_FIXED dt_trabort(TASK_D1);                                /* dblfcns.c */
-int EXTERNAL_FIXED dt_trbegin(P1(CONST char FAR *) TASK_Di);   /* dblfcns.c */
+int EXTERNAL_FIXED dt_trbegin(P1(const char *) TASK_Di);       /* dblfcns.c */
 int EXTERNAL_FIXED dt_trend(TASK_D1);                          /* dblfcns.c */
-#ifndef NO_TIMESTAMP
-int EXTERNAL_DBN   dt_utscm(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); 
-                                                               /* utscm.c */
-int EXTERNAL_DBN   dt_utsco(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); 
-                                                               /* utsco.c */
-int EXTERNAL_FIXED dt_utscr(P1(ULONG FAR *) TASK_Di );         /* utscr.c */
-int EXTERNAL_DBN   dt_utscs(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn); 
-                                                               /* utscs.c */
-#endif
 
 #ifndef NO_DT_COVER
 
@@ -445,213 +400,80 @@ int EXTERNAL_DBN   dt_utscs(P1(int) Pi(ULONG FAR *) TASK_Di DBN_Dn);
 #define d_renfile(a, b, c)           dt_renfile(a, b, c CURRTASK_PARM)
 #define d_retries(a)                 dt_retries(a CURRTASK_PARM)
 #define d_set_dberr(a, b)            dt_set_dberr(a, b, CURRTASK_PARM)
-#ifndef ONE_DB
 #define d_setdb(a)                   dt_setdb(a CURRTASK_PARM)
-#endif
 #define d_timeout(a)                 dt_timeout(a CURRTASK_PARM)
 #define d_trabort()                  dt_trabort(CURRTASK_ONLY)
 #define d_trbegin(a)                 dt_trbegin(a CURRTASK_PARM)
 #define d_trend()                    dt_trend(CURRTASK_ONLY)
 #define d_wrcurr(a)                  dt_wrcurr(a CURRTASK_PARM)
-#ifndef NO_TIMESTAMP
-#define d_crstat()                   dt_crstat(CURRTASK_ONLY)
-#define d_gtscr(a)                   dt_gtscr(a CURRTASK_PARM)
-#define d_recstat(a, b)              dt_recstat(a, b CURRTASK_PARM)
-#define d_rlbclr()                   dt_rlbclr(CURRTASK_ONLY)
-#define d_rlbset()                   dt_rlbset(CURRTASK_ONLY)
-#define d_rlbtst()                   dt_rlbtst(CURRTASK_ONLY)
-#define d_utscr(a)                   dt_utscr(a CURRTASK_PARM)
-#endif
 
-#ifdef NO_DBN_PARM
-#define d_cmstat(a)                  dt_cmstat(a CURRTASK_PARM)
-#define d_cmtype(a, b)               dt_cmtype(a, b CURRTASK_PARM)
-#define d_connect(a)                 dt_connect(a CURRTASK_PARM)
-#ifndef NO_TIMESTAMP
-#define d_costat(a)                  dt_costat(a CURRTASK_PARM)
-#endif
-#define d_cotype(a, b)               dt_cotype(a, b CURRTASK_PARM)
-#define d_crget(a)                   dt_crget(a CURRTASK_PARM)
-#define d_crread(a, b)               dt_crread(a, b CURRTASK_PARM)
-#define d_crset(a)                   dt_crset(a CURRTASK_PARM)
-#define d_crtype(a)                  dt_crtype(a CURRTASK_PARM)
-#define d_crwrite(a, b)              dt_crwrite(a, b CURRTASK_PARM)
-#define d_csmget(a, b)               dt_csmget(a, b CURRTASK_PARM)
-#define d_csmread(a, b, c)           dt_csmread(a, b, c CURRTASK_PARM)
-#define d_csmset(a, b)               dt_csmset(a, b CURRTASK_PARM)
-#define d_csmwrite(a, b, c)          dt_csmwrite(a, b, c CURRTASK_PARM)
-#define d_csoget(a, b)               dt_csoget(a, b CURRTASK_PARM)
-#define d_csoread(a, b, c)           dt_csoread(a, b, c CURRTASK_PARM)
-#define d_csoset(a, b)               dt_csoset(a, b CURRTASK_PARM)
-#define d_csowrite(a, b, c)          dt_csowrite(a, b, c CURRTASK_PARM)
-#ifndef NO_TIMESTAMP
-#define d_csstat(a)                  dt_csstat(a CURRTASK_PARM)
-#define d_ctscm(a, b)                dt_ctscm(a, b CURRTASK_PARM)
-#define d_ctsco(a, b)                dt_ctsco(a, b CURRTASK_PARM)
-#define d_ctscr(a)                   dt_ctscr(a CURRTASK_PARM)
-#endif
-#define d_delete()                   dt_delete(CURRTASK_ONLY)
-#define d_disdel()                   dt_disdel(CURRTASK_ONLY)
-#define d_recnext()                  dt_recnext(CURRTASK_ONLY)
-#define d_recprev()                  dt_recprev(CURRTASK_ONLY)
-#define d_discon(a)                  dt_discon(a CURRTASK_PARM)
-#define d_fillnew(a, b)              dt_fillnew(a, b CURRTASK_PARM)
-#define d_findco(a)                  dt_findco(a CURRTASK_PARM)
-#define d_findfm(a)                  dt_findfm(a CURRTASK_PARM)
-#define d_findlm(a)                  dt_findlm(a CURRTASK_PARM)
-#define d_findnm(a)                  dt_findnm(a CURRTASK_PARM)
-#define d_findpm(a)                  dt_findpm(a CURRTASK_PARM)
-#ifndef NO_TIMESTAMP
-#define d_gtscm(a, b)                dt_gtscm(a, b CURRTASK_PARM)
-#define d_gtsco(a, b)                dt_gtsco(a, b CURRTASK_PARM)
-#define d_gtscs(a, b)                dt_gtscs(a, b CURRTASK_PARM)
-#endif
-#define d_initialize()               dt_initialize(CURRTASK_ONLY)
-#define d_initfile(a)                dt_initfile(a CURRTASK_PARM)
-#define d_ismember(a)                dt_ismember(a CURRTASK_PARM)
-#define d_isowner(a)                 dt_isowner(a CURRTASK_PARM)
-#define d_keydel(a)                  dt_keydel(a CURRTASK_PARM)
-#define d_keyexist(a)                dt_keyexist(a CURRTASK_PARM)
-#define d_keyfind(a, b)              dt_keyfind(a, b CURRTASK_PARM)
-#define d_keyfree(a)                 dt_keyfree(a CURRTASK_PARM)
-#define d_keyfrst(a)                 dt_keyfrst(a CURRTASK_PARM)
-#define d_keylast(a)                 dt_keylast(a CURRTASK_PARM)
-#define d_keylock(a, b)              dt_keylock(a, b CURRTASK_PARM)
-#define d_keylstat(a, b)             dt_keylstat(a, b CURRTASK_PARM)
-#define d_keynext(a)                 dt_keynext(a CURRTASK_PARM)
-#define d_keyprev(a)                 dt_keyprev(a CURRTASK_PARM)
-#define d_keyread(a)                 dt_keyread(a CURRTASK_PARM)
-#define d_keystore(a)                dt_keystore(a CURRTASK_PARM)
-#define d_lock(a, b)                 dt_lock(a, b CURRTASK_PARM)
-#define d_makenew(a)                 dt_makenew(a CURRTASK_PARM)
-#define d_members(a, b)              dt_members(a, b CURRTASK_PARM)
-#define d_recfree(a)                 dt_recfree(a CURRTASK_PARM)
-#define d_recfrst(a)                 dt_recfrst(a CURRTASK_PARM)
-#define d_reclast(a)                 dt_reclast(a CURRTASK_PARM)
-#define d_reclock(a, b)              dt_reclock(a, b CURRTASK_PARM)
-#define d_reclstat(a, b)             dt_reclstat(a, b CURRTASK_PARM)
-#define d_recread(a)                 dt_recread(a CURRTASK_PARM)
-#define d_recset(a)                  dt_recset(a CURRTASK_PARM)
-#define d_recwrite(a)                dt_recwrite(a CURRTASK_PARM)
-#define d_setfree(a)                 dt_setfree(a CURRTASK_PARM)
-#define d_setkey(a, b)               dt_setkey(a, b CURRTASK_PARM)
-#define d_setlock(a, b)              dt_setlock(a, b CURRTASK_PARM)
-#define d_setlstat(a, b)             dt_setlstat(a, b CURRTASK_PARM)
-#define d_setmm(a, b)                dt_setmm(a, b CURRTASK_PARM)
-#define d_setmo(a, b)                dt_setmo(a, b CURRTASK_PARM)
-#define d_setmr(a)                   dt_setmr(a CURRTASK_PARM)
-#define d_setom(a, b)                dt_setom(a, b CURRTASK_PARM)
-#define d_setoo(a, b)                dt_setoo(a, b CURRTASK_PARM)
-#define d_setor(a)                   dt_setor(a CURRTASK_PARM)
-#define d_setrm(a)                   dt_setrm(a CURRTASK_PARM)
-#define d_setro(a)                   dt_setro(a CURRTASK_PARM)
-#ifndef NO_TIMESTAMP
-#define d_stscm(a, b)                dt_stscm(a, b CURRTASK_PARM)
-#define d_stsco(a, b)                dt_stsco(a, b CURRTASK_PARM)
-#define d_stscr(a)                   dt_stscr(a CURRTASK_PARM)
-#define d_stscs(a, b)                dt_stscs(a, b CURRTASK_PARM)
-#endif
-#ifndef NO_TIMESTAMP
-#define d_utscm(a, b)                dt_utscm(a, b CURRTASK_PARM)
-#define d_utsco(a, b)                dt_utsco(a, b CURRTASK_PARM)
-#define d_utscs(a, b)                dt_utscs(a, b CURRTASK_PARM)
-#endif
-
-#else /* NO_DBN_PARM */
-
-#define d_cmstat(a DBN_PARM)         dt_cmstat(a CURRTASK_PARM DBN_PARM)
-#define d_cmtype(a, b DBN_PARM)      dt_cmtype(a, b CURRTASK_PARM DBN_PARM)
-#define d_connect(a DBN_PARM)        dt_connect(a CURRTASK_PARM DBN_PARM)
-#ifndef NO_TIMESTAMP
-#define d_costat(a DBN_PARM)         dt_costat(a CURRTASK_PARM DBN_PARM)
-#endif
-#define d_cotype(a, b DBN_PARM)      dt_cotype(a, b CURRTASK_PARM DBN_PARM)
-#define d_crget(a DBN_PARM)          dt_crget(a CURRTASK_PARM DBN_PARM)
-#define d_crread(a, b DBN_PARM)      dt_crread(a, b CURRTASK_PARM DBN_PARM)
-#define d_crset(a DBN_PARM)          dt_crset(a CURRTASK_PARM DBN_PARM)
-#define d_crtype(a DBN_PARM)         dt_crtype(a CURRTASK_PARM DBN_PARM)
-#define d_crwrite(a, b DBN_PARM)     dt_crwrite(a, b CURRTASK_PARM DBN_PARM)
-#define d_csmget(a, b DBN_PARM)      dt_csmget(a, b CURRTASK_PARM DBN_PARM)
-#define d_csmread(a, b, c DBN_PARM)  dt_csmread(a, b, c CURRTASK_PARM DBN_PARM)
-#define d_csmset(a, b DBN_PARM)      dt_csmset(a, b CURRTASK_PARM DBN_PARM)
-#define d_csmwrite(a, b, c DBN_PARM) dt_csmwrite(a, b, c CURRTASK_PARM DBN_PARM)
-#define d_csoget(a, b DBN_PARM)      dt_csoget(a, b CURRTASK_PARM DBN_PARM)
-#define d_csoread(a, b, c DBN_PARM)  dt_csoread(a, b, c CURRTASK_PARM DBN_PARM)
-#define d_csoset(a, b DBN_PARM)      dt_csoset(a, b CURRTASK_PARM DBN_PARM)
-#define d_csowrite(a, b, c DBN_PARM) dt_csowrite(a, b, c CURRTASK_PARM DBN_PARM)
-#ifndef NO_TIMESTAMP
-#define d_csstat(a DBN_PARM)         dt_csstat(a CURRTASK_PARM DBN_PARM)
-#define d_ctscm(a, b DBN_PARM)       dt_ctscm(a, b CURRTASK_PARM DBN_PARM)
-#define d_ctsco(a, b DBN_PARM)       dt_ctsco(a, b CURRTASK_PARM DBN_PARM)
-#define d_ctscr(a DBN_PARM)          dt_ctscr(a CURRTASK_PARM)
-#endif
-#define d_delete(DBN_PARM)           dt_delete(CURRTASK_ONLY DBN_PARM)
-#define d_disdel(DBN_PARM)           dt_disdel(CURRTASK_ONLY DBN_PARM)
-#define d_recnext(DBN_PARM)          dt_recnext(CURRTASK_ONLY DBN_PARM)
-#define d_recprev(DBN_PARM)          dt_recprev(CURRTASK_ONLY DBN_PARM)
-#define d_discon(a DBN_PARM)         dt_discon(a CURRTASK_PARM DBN_PARM)
-#define d_fillnew(a, b DBN_PARM)     dt_fillnew(a, b CURRTASK_PARM DBN_PARM)
-#define d_findco(a DBN_PARM)         dt_findco(a CURRTASK_PARM DBN_PARM)
-#define d_findfm(a DBN_PARM)         dt_findfm(a CURRTASK_PARM DBN_PARM)
-#define d_findlm(a DBN_PARM)         dt_findlm(a CURRTASK_PARM DBN_PARM)
-#define d_findnm(a DBN_PARM)         dt_findnm(a CURRTASK_PARM DBN_PARM)
-#define d_findpm(a DBN_PARM)         dt_findpm(a CURRTASK_PARM DBN_PARM)
-#ifndef NO_TIMESTAMP
-#define d_gtscm(a, b DBN_PARM)       dt_gtscm(a, b CURRTASK_PARM DBN_PARM)
-#define d_gtsco(a, b DBN_PARM)       dt_gtsco(a, b CURRTASK_PARM DBN_PARM)
-#define d_gtscs(a, b DBN_PARM)       dt_gtscs(a, b CURRTASK_PARM DBN_PARM)
-#endif
-#define d_initialize(DBN_PARM)       dt_initialize(CURRTASK_ONLY DBN_PARM)
-#define d_initfile(a DBN_PARM)       dt_initfile(a CURRTASK_PARM DBN_PARM)
-#define d_ismember(a DBN_PARM)       dt_ismember(a CURRTASK_PARM DBN_PARM)
-#define d_isowner(a DBN_PARM)        dt_isowner(a CURRTASK_PARM DBN_PARM)
-#define d_keydel(a DBN_PARM)         dt_keydel(a CURRTASK_PARM DBN_PARM)
-#define d_keyexist(a DBN_PARM)       dt_keyexist(a CURRTASK_PARM DBN_PARM)
-#define d_keyfind(a, b DBN_PARM)     dt_keyfind(a, b CURRTASK_PARM DBN_PARM)
-#define d_keyfree(a DBN_PARM)        dt_keyfree(a CURRTASK_PARM DBN_PARM)
-#define d_keyfrst(a DBN_PARM)        dt_keyfrst(a CURRTASK_PARM DBN_PARM)
-#define d_keylast(a DBN_PARM)        dt_keylast(a CURRTASK_PARM DBN_PARM)
-#define d_keylock(a, b DBN_PARM)     dt_keylock(a, b CURRTASK_PARM DBN_PARM)
-#define d_keylstat(a, b DBN_PARM)    dt_keylstat(a, b CURRTASK_PARM DBN_PARM)
-#define d_keynext(a DBN_PARM)        dt_keynext(a CURRTASK_PARM DBN_PARM)
-#define d_keyprev(a DBN_PARM)        dt_keyprev(a CURRTASK_PARM DBN_PARM)
-#define d_keyread(a DBN_PARM)        dt_keyread(a CURRTASK_PARM)
-#define d_keystore(a DBN_PARM)       dt_keystore(a CURRTASK_PARM DBN_PARM)
-#define d_lock(a, b DBN_PARM)        dt_lock(a, b CURRTASK_PARM DBN_PARM)
-#define d_makenew(a DBN_PARM)        dt_makenew(a CURRTASK_PARM DBN_PARM)
-#define d_members(a, b DBN_PARM)     dt_members(a, b CURRTASK_PARM DBN_PARM)
-#define d_recfree(a DBN_PARM)        dt_recfree(a CURRTASK_PARM DBN_PARM)
-#define d_recfrst(a DBN_PARM)        dt_recfrst(a CURRTASK_PARM DBN_PARM)
-#define d_reclast(a DBN_PARM)        dt_reclast(a CURRTASK_PARM DBN_PARM)
-#define d_reclock(a, b DBN_PARM)     dt_reclock(a, b CURRTASK_PARM DBN_PARM)
-#define d_reclstat(a, b DBN_PARM)    dt_reclstat(a, b CURRTASK_PARM DBN_PARM)
-#define d_recread(a DBN_PARM)        dt_recread(a CURRTASK_PARM DBN_PARM)
-#define d_recset(a DBN_PARM)         dt_recset(a CURRTASK_PARM DBN_PARM)
-#define d_recwrite(a DBN_PARM)       dt_recwrite(a CURRTASK_PARM DBN_PARM)
-#define d_setfree(a DBN_PARM)        dt_setfree(a CURRTASK_PARM DBN_PARM)
-#define d_setkey(a, b DBN_PARM)      dt_setkey(a, b CURRTASK_PARM DBN_PARM)
-#define d_setlock(a, b DBN_PARM)     dt_setlock(a, b CURRTASK_PARM DBN_PARM)
-#define d_setlstat(a, b DBN_PARM)    dt_setlstat(a, b CURRTASK_PARM DBN_PARM)
-#define d_setmm(a, b DBN_PARM)       dt_setmm(a, b CURRTASK_PARM DBN_PARM)
-#define d_setmo(a, b DBN_PARM)       dt_setmo(a, b CURRTASK_PARM DBN_PARM)
-#define d_setmr(a DBN_PARM)          dt_setmr(a CURRTASK_PARM DBN_PARM)
-#define d_setom(a, b DBN_PARM)       dt_setom(a, b CURRTASK_PARM DBN_PARM)
-#define d_setoo(a, b DBN_PARM)       dt_setoo(a, b CURRTASK_PARM DBN_PARM)
-#define d_setor(a DBN_PARM)          dt_setor(a CURRTASK_PARM DBN_PARM)
-#define d_setrm(a DBN_PARM)          dt_setrm(a CURRTASK_PARM DBN_PARM)
-#define d_setro(a DBN_PARM)          dt_setro(a CURRTASK_PARM DBN_PARM)
-#ifndef NO_TIMESTAMP
-#define d_stscm(a, b DBN_PARM)       dt_stscm(a, b CURRTASK_PARM DBN_PARM)
-#define d_stsco(a, b DBN_PARM)       dt_stsco(a, b CURRTASK_PARM DBN_PARM)
-#define d_stscr(a DBN_PARM)          dt_stscr(a CURRTASK_PARM DBN_PARM)
-#define d_stscs(a, b DBN_PARM)       dt_stscs(a, b CURRTASK_PARM DBN_PARM)
-#endif
-#ifndef NO_TIMESTAMP
-#define d_utscm(a, b DBN_PARM)       dt_utscm(a, b CURRTASK_PARM DBN_PARM)
-#define d_utsco(a, b DBN_PARM)       dt_utsco(a, b CURRTASK_PARM DBN_PARM)
-#define d_utscs(a, b DBN_PARM)       dt_utscs(a, b CURRTASK_PARM DBN_PARM)
-#endif
-#endif /* NO_DBN_PARM */
+#define d_cmstat(a , dbn)         dt_cmstat(a CURRTASK_PARM , dbn)
+#define d_cmtype(a, b , dbn)      dt_cmtype(a, b CURRTASK_PARM , dbn)
+#define d_connect(a , dbn)        dt_connect(a CURRTASK_PARM , dbn)
+#define d_cotype(a, b , dbn)      dt_cotype(a, b CURRTASK_PARM , dbn)
+#define d_crget(a , dbn)          dt_crget(a CURRTASK_PARM , dbn)
+#define d_crread(a, b , dbn)      dt_crread(a, b CURRTASK_PARM , dbn)
+#define d_crset(a , dbn)          dt_crset(a CURRTASK_PARM , dbn)
+#define d_crtype(a , dbn)         dt_crtype(a CURRTASK_PARM , dbn)
+#define d_crwrite(a, b , dbn)     dt_crwrite(a, b CURRTASK_PARM , dbn)
+#define d_csmget(a, b , dbn)      dt_csmget(a, b CURRTASK_PARM , dbn)
+#define d_csmread(a, b, c , dbn)  dt_csmread(a, b, c CURRTASK_PARM , dbn)
+#define d_csmset(a, b , dbn)      dt_csmset(a, b CURRTASK_PARM , dbn)
+#define d_csmwrite(a, b, c , dbn) dt_csmwrite(a, b, c CURRTASK_PARM , dbn)
+#define d_csoget(a, b , dbn)      dt_csoget(a, b CURRTASK_PARM , dbn)
+#define d_csoread(a, b, c , dbn)  dt_csoread(a, b, c CURRTASK_PARM , dbn)
+#define d_csoset(a, b , dbn)      dt_csoset(a, b CURRTASK_PARM , dbn)
+#define d_csowrite(a, b, c , dbn) dt_csowrite(a, b, c CURRTASK_PARM , dbn)
+#define d_delete(, dbn)           dt_delete(CURRTASK_ONLY , dbn)
+#define d_disdel(, dbn)           dt_disdel(CURRTASK_ONLY , dbn)
+#define d_recnext(, dbn)          dt_recnext(CURRTASK_ONLY , dbn)
+#define d_recprev(, dbn)          dt_recprev(CURRTASK_ONLY , dbn)
+#define d_discon(a , dbn)         dt_discon(a CURRTASK_PARM , dbn)
+#define d_fillnew(a, b , dbn)     dt_fillnew(a, b CURRTASK_PARM , dbn)
+#define d_findco(a , dbn)         dt_findco(a CURRTASK_PARM , dbn)
+#define d_findfm(a , dbn)         dt_findfm(a CURRTASK_PARM , dbn)
+#define d_findlm(a , dbn)         dt_findlm(a CURRTASK_PARM , dbn)
+#define d_findnm(a , dbn)         dt_findnm(a CURRTASK_PARM , dbn)
+#define d_findpm(a , dbn)         dt_findpm(a CURRTASK_PARM , dbn)
+#define d_initialize(, dbn)       dt_initialize(CURRTASK_ONLY , dbn)
+#define d_initfile(a , dbn)       dt_initfile(a CURRTASK_PARM , dbn)
+#define d_ismember(a , dbn)       dt_ismember(a CURRTASK_PARM , dbn)
+#define d_isowner(a , dbn)        dt_isowner(a CURRTASK_PARM , dbn)
+#define d_keydel(a , dbn)         dt_keydel(a CURRTASK_PARM , dbn)
+#define d_keyexist(a , dbn)       dt_keyexist(a CURRTASK_PARM , dbn)
+#define d_keyfind(a, b , dbn)     dt_keyfind(a, b CURRTASK_PARM , dbn)
+#define d_keyfree(a , dbn)        dt_keyfree(a CURRTASK_PARM , dbn)
+#define d_keyfrst(a , dbn)        dt_keyfrst(a CURRTASK_PARM , dbn)
+#define d_keylast(a , dbn)        dt_keylast(a CURRTASK_PARM , dbn)
+#define d_keylock(a, b , dbn)     dt_keylock(a, b CURRTASK_PARM , dbn)
+#define d_keylstat(a, b , dbn)    dt_keylstat(a, b CURRTASK_PARM , dbn)
+#define d_keynext(a , dbn)        dt_keynext(a CURRTASK_PARM , dbn)
+#define d_keyprev(a , dbn)        dt_keyprev(a CURRTASK_PARM , dbn)
+#define d_keyread(a , dbn)        dt_keyread(a CURRTASK_PARM)
+#define d_keystore(a , dbn)       dt_keystore(a CURRTASK_PARM , dbn)
+#define d_lock(a, b , dbn)        dt_lock(a, b CURRTASK_PARM , dbn)
+#define d_makenew(a , dbn)        dt_makenew(a CURRTASK_PARM , dbn)
+#define d_members(a, b , dbn)     dt_members(a, b CURRTASK_PARM , dbn)
+#define d_recfree(a , dbn)        dt_recfree(a CURRTASK_PARM , dbn)
+#define d_recfrst(a , dbn)        dt_recfrst(a CURRTASK_PARM , dbn)
+#define d_reclast(a , dbn)        dt_reclast(a CURRTASK_PARM , dbn)
+#define d_reclock(a, b , dbn)     dt_reclock(a, b CURRTASK_PARM , dbn)
+#define d_reclstat(a, b , dbn)    dt_reclstat(a, b CURRTASK_PARM , dbn)
+#define d_recread(a , dbn)        dt_recread(a CURRTASK_PARM , dbn)
+#define d_recset(a , dbn)         dt_recset(a CURRTASK_PARM , dbn)
+#define d_recwrite(a , dbn)       dt_recwrite(a CURRTASK_PARM , dbn)
+#define d_setfree(a , dbn)        dt_setfree(a CURRTASK_PARM , dbn)
+#define d_setkey(a, b , dbn)      dt_setkey(a, b CURRTASK_PARM , dbn)
+#define d_setlock(a, b , dbn)     dt_setlock(a, b CURRTASK_PARM , dbn)
+#define d_setlstat(a, b , dbn)    dt_setlstat(a, b CURRTASK_PARM , dbn)
+#define d_setmm(a, b , dbn)       dt_setmm(a, b CURRTASK_PARM , dbn)
+#define d_setmo(a, b , dbn)       dt_setmo(a, b CURRTASK_PARM , dbn)
+#define d_setmr(a , dbn)          dt_setmr(a CURRTASK_PARM , dbn)
+#define d_setom(a, b , dbn)       dt_setom(a, b CURRTASK_PARM , dbn)
+#define d_setoo(a, b , dbn)       dt_setoo(a, b CURRTASK_PARM , dbn)
+#define d_setor(a , dbn)          dt_setor(a CURRTASK_PARM , dbn)
+#define d_setrm(a , dbn)          dt_setrm(a CURRTASK_PARM , dbn)
+#define d_setro(a , dbn)          dt_setro(a CURRTASK_PARM , dbn)
 
 #endif /* NO_DT_COVER */
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC task.h */
index 0ba6423ddafa8903fef4f87766d886c18d784bc9..bdc8ce1bfa78d3f73dcc91d963938d3e760f6381 100644 (file)
 /* (BITS(unsigned int)) */
 #define BUI (8*sizeof(unsigned int))
 
-#ifndef NO_TRANS
-/* ((((256*sizeof(F_ADDR))+D_BLKSZ-1) / D_BLKSZ)*D_BLKSZ) */
-#define IX_PAGESIZE 1024
-
-/* (IX_PAGESIZE / sizeof(F_ADDR)) */
-#define IX_EPP 256
-
-#define BITMAP_SIZE(pcnt) ((int)((IX_SIZE(pcnt)+(BUI-1)) / BUI))
-
-#define IX_SIZE(pcnt) ((long)( ((pcnt) + (IX_EPP-1)) / IX_EPP))
-
-/* Next define the base file offsets for entries in the overflow file */
-
-#define BM_BASE( file ) ( root_ix[file].base )
-#define IX_BASE(file, pcnt) ((long)(BM_BASE(file) + (BITMAP_SIZE(pcnt)*sizeof(unsigned int))))
-#define PZ_BASE(file, pcnt) ((long)(IX_BASE(file, pcnt) + (IX_SIZE(pcnt)*IX_PAGESIZE)))
-
-/*
-==========================================================================
-*/
-
-/* The following typedef'ed structure defines a single entry in the
-   root index data.  */
-
-typedef struct RI_ENTRY_S {
-   LONG     pg_cnt;           /* Number of pages currently in file */
-   F_ADDR   base;             /* Base of data stored in overflow */
-   BOOLEAN  pz_modified;      /* Was page zero written to overflow? */
-   INT_P    Bitmap;           /* Used index page bitmap */
-} RI_ENTRY;
-#define bitmap Bitmap.ptr
-#define RI_ENTRY_IOSIZE (sizeof(RI_ENTRY)-sizeof(INT_P)+sizeof(INT *))
-#endif
 
 /*
 ==========================================================================
@@ -111,19 +78,9 @@ typedef struct PGZERO_S {
 
 /* binary search lookup table entry */
 
-#ifndef NO_TRANS
-/* External declarations */
-extern int trlog_flag;        /* Transaction logging enabled flag */
-extern int trcommit;          /* Transaction commit in progress flag */
-extern BOOLEAN use_ovfl;      /* Do we use the overflow file ? */
-#endif
 
 /* Maximum number of transactions which can commit a time */
-#ifndef SINGLE_USER
-#define TAFLIMIT 5
-#else
 #define TAFLIMIT 1
-#endif
 
 #define TRXLOG_H
 /* End - trxlog.h */
diff --git a/cde/lib/DtSearch/raima/utscm.c b/cde/lib/DtSearch/raima/utscm.c
deleted file mode 100644 (file)
index a6946a8..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: utscm.c /main/2 1996/05/09 04:20:56 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_utscm
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   utscm.c -- db_VISTA current member update timestamp get module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Get update timestamp of current member
-*/
-d_utscm(set, timestamp TASK_PARM DBN_PARM)
-int set;
-ULONG FAR *timestamp;
-TASK_DECL
-DBN_DECL
-{
-   INT rec;
-   char FAR *rptr;
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   /* make sure we have a current member */
-   if ( ! curr_mem[set] )
-      RETURN( dberr(S_NOCM) );
-
-   /* read current member */
-   if ( dio_read( curr_mem[set], (char FAR * FAR *)&rptr , NOPGHOLD) != S_OKAY )
-      RETURN( db_status );
-
-   /* get record id */
-   bytecpy(&rec, rptr, sizeof(INT));
-   if ( rec >= 0 ) {
-      rec &= ~RLBMASK; /* mask off rlb */
-#ifndef         ONE_DB
-      rec += curr_db_table->rt_offset;
-#endif
-      if ( record_table[rec].rt_flags & TIMESTAMPED )
-        bytecpy(timestamp, rptr + RECUPTIME, sizeof(ULONG));
-      else
-        *timestamp = 0L;
-      db_status = S_OKAY;
-   }
-   else
-      db_status = S_DELETED;
-
-   RETURN( db_status = S_OKAY );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin utscm.c */
diff --git a/cde/lib/DtSearch/raima/utsco.c b/cde/lib/DtSearch/raima/utsco.c
deleted file mode 100644 (file)
index 5a2cf44..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: utsco.c /main/2 1996/05/09 04:21:13 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_utsco
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   utsco.c -- db_VISTA current owner update timestamp get module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Get update timestamp of current owner
-*/
-d_utsco(set, timestamp TASK_PARM DBN_PARM)
-int set;
-ULONG FAR *timestamp;
-TASK_DECL
-DBN_DECL
-{
-   INT rec;
-   char FAR *rptr;
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   /* make sure we have a current owner */
-   if ( ! curr_own[set] )
-      RETURN( dberr(S_NOCO) );
-
-   /* read current owner */
-   if ( dio_read( curr_own[set], (char FAR * FAR *)&rptr , NOPGHOLD) != S_OKAY )
-      RETURN( db_status );
-
-   /* get record id */
-   bytecpy(&rec, rptr, sizeof(INT));
-   if ( rec >= 0 ) {
-      rec &= ~RLBMASK; /* mask off rlb */
-#ifndef         ONE_DB
-      rec += curr_db_table->rt_offset;
-#endif
-      if ( record_table[rec].rt_flags & TIMESTAMPED )
-        bytecpy(timestamp, rptr + RECUPTIME, sizeof(ULONG));
-      else
-        *timestamp = 0L;
-      db_status = S_OKAY;
-   }
-   else
-      db_status = S_DELETED;
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin utsco.c */
diff --git a/cde/lib/DtSearch/raima/utscr.c b/cde/lib/DtSearch/raima/utscr.c
deleted file mode 100644 (file)
index 59d6638..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: utscr.c /main/2 1996/05/09 04:21:29 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_utscr
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   utscr.c -- db_VISTA current record update timestamp get module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Get update timestamp of current record
-*/
-d_utscr(timestamp TASK_PARM)
-ULONG FAR *timestamp;
-TASK_DECL
-{
-   INT rec;
-   int dbopen_sv;
-
-   DB_ENTER(NO_DB_ID TASK_ID LOCK_SET(RECORD_IO));
-
-   /* make sure we have a current record */
-   if ( ! curr_rec )
-      RETURN( dberr(S_NOCR) );
-
-   /* set up to allow unlocked read access */
-   dbopen_sv = dbopen;
-   dbopen = 2;
-   /* read current record */
-   if ( dio_read( curr_rec, (char FAR * FAR *)&crloc , NOPGHOLD) != S_OKAY )
-      RETURN( db_status );
-   dbopen = dbopen_sv;
-
-   /* get record id */
-   bytecpy(&rec, crloc, sizeof(INT));
-   if ( rec >= 0 ) {
-      rec &= ~RLBMASK; /* mask off rlb */
-#ifndef         ONE_DB
-      rec += curr_db_table->rt_offset;
-#endif
-      if ( record_table[rec].rt_flags & TIMESTAMPED )
-        bytecpy(timestamp, crloc + RECUPTIME, sizeof(ULONG));
-      else
-        *timestamp = 0L;
-      db_status = S_OKAY;
-   }
-   else
-      db_status = S_DELETED;
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin utscr.c */
diff --git a/cde/lib/DtSearch/raima/utscs.c b/cde/lib/DtSearch/raima/utscs.c
deleted file mode 100644 (file)
index 23dfd43..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: utscs.c /main/2 1996/05/09 04:21:42 drk $ */
-/*
- *   COMPONENT_NAME: austext
- *
- *   FUNCTIONS: d_utscs
- *
- *   ORIGINS: 157
- *
- *   OBJECT CODE ONLY SOURCE MATERIALS
- */
-/*-----------------------------------------------------------------------
-   utscs.c -- db_VISTA set update timestamp get module.
-
-   (C) Copyright 1987 by Raima Corporation.
------------------------------------------------------------------------*/
-
-/* ********************** EDIT HISTORY *******************************
-
- SCR    DATE    INI                   DESCRIPTION
------ --------- --- -----------------------------------------------------
-      04-Aug-88 RTK MULTI_TASK changes
-*/
-
-#include <stdio.h>
-#include "vista.h"
-#include "dbtype.h"
-
-
-#ifndef         NO_TIMESTAMP
-/* Get update timestamp of set
-*/
-d_utscs(set, timestamp TASK_PARM DBN_PARM)
-int set;
-ULONG FAR *timestamp;
-TASK_DECL
-DBN_DECL
-{
-   INT rec;
-   char FAR *rptr;
-   SET_ENTRY FAR *set_ptr;
-
-   DB_ENTER(DB_ID TASK_ID LOCK_SET(SET_IO));
-
-   if (nset_check(set, &set, (SET_ENTRY FAR * FAR *)&set_ptr) != S_OKAY)
-      RETURN( db_status );
-
-   /* make sure we have a current owner */
-   if ( ! curr_own[set] )
-      RETURN( dberr(S_NOCO) );
-
-   /* read current owner */
-   if ( dio_read( curr_own[set], (char FAR * FAR *)&rptr , NOPGHOLD) != S_OKAY )
-      RETURN( db_status );
-
-   /* get record id to ensure record not deleted */
-   bytecpy(&rec, rptr, sizeof(INT));
-   if ( rec >= 0 ) {
-      if (set_ptr->st_flags & TIMESTAMPED) {
-        bytecpy(timestamp, rptr + set_ptr->st_own_ptr + SP_UTIME, sizeof(ULONG));
-      }
-      else
-        *timestamp = 0L;
-
-      db_status = S_OKAY;
-   }
-   else
-      db_status = S_DELETED;
-
-   RETURN( db_status );
-}
-#endif
-/* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin utscs.c */
index ee9a39fedb8d656619292100a4a3d6f8f0da564e..a0ace5376f43c5cda9c13eac668e1a7dfd4f93b4 100644 (file)
@@ -246,9 +246,6 @@ typedef LONG        BOOLEAN;
 
 /* grouped lock request packet */
 extern int db_status;
-#ifndef NO_TRANS
-extern int rlb_status;
-#endif
 
 /* Mike Russell's custom open() flag.  Default is O_RDWR.
  * Change to O_RDONLY prior to d_open() if not updating
@@ -260,13 +257,6 @@ extern int rlb_status;
  */
 extern int db_oflag;
 
-/* Use the 'const' keyword unless told otherwise */
-#ifndef NO_CONST
-#define CONST const
-#else
-#define CONST /**/
-#endif
-
 #ifndef GENERAL                        /* GENERAL lockmgr */
 #ifdef MSC                     /* MSC */
 #ifndef NO_EXT_KEYWORDS                   /* NO_EXT_KEYWORDS */
@@ -280,10 +270,6 @@ extern int db_oflag;
 #endif                         /* MSC */
 #endif                         /* GENERAL lockmgr */
 
-#ifndef FAR
-#define FAR /**/
-#endif
-
 #ifndef PASCAL
 #define PASCAL /**/
 #endif
@@ -292,38 +278,20 @@ extern int db_oflag;
 #define CDECL /**/
 #endif
 
-#define EXTERNAL_FIXED    FAR PASCAL
-#define EXTERNAL_VARIABLE FAR CDECL
+#define EXTERNAL_FIXED    PASCAL
+#define EXTERNAL_VARIABLE CDECL
 #define INTERNAL_FIXED    PASCAL
 #define INTERNAL_VARIABLE CDECL
 
-typedef int (FAR PASCAL *FARPROC)();
+typedef int (PASCAL *FARPROC)();
 typedef char *HANDLE;
 
-#ifdef NO_DBN_PARM
-#ifdef DBN_IN_LIB
-#define EXTERNAL_DBN EXTERNAL_VARIABLE
-#else
-#define EXTERNAL_DBN EXTERNAL_FIXED
-#endif
-#else
-#define EXTERNAL_DBN EXTERNAL_VARIABLE
-#endif
-
 #define LOCK_DESC /**/
 #define POINTER_INIT()         {  NULL  }
 #define POINTER_ASSIGN(a)      {  a  }
 
-typedef struct {char FAR *ptr; LOCK_DESC} CHAR_P;
-typedef struct {DB_ADDR FAR *ptr; LOCK_DESC} DB_ADDR_P;
-#ifdef MULTI_TASK
-typedef struct {struct TASK_S FAR *ptr; LOCK_DESC} TASK_P;
-typedef struct {char FAR *ptr; LOCK_DESC} QFAKE_P;
-typedef struct {
-   TASK_P v;
-   QFAKE_P q;
-} DB_TASK;
-#endif
+typedef struct {char *ptr; LOCK_DESC} CHAR_P;
+typedef struct {DB_ADDR *ptr; LOCK_DESC} DB_ADDR_P;
 
 
 /* Allow for function prototyping */
@@ -346,33 +314,12 @@ typedef struct {
 #define Pv(t)  /**/
 #endif
 
-#ifdef  ONE_DB
-#define NO_DBN
-#endif
 
-#ifdef NO_DBN_PARM 
-#define NO_DBN
-#endif
 
-#ifndef NO_DBN
 #define DBN_D1 Pv(int)
 #define DBN_FIX_D1 P1(int)
 #define DBN_Dn Piv(int)
-#else
-#define DBN_D1 P0
-#define DBN_FIX_D1 /**/
-#define DBN_Dn /**/
-#endif
 
-#ifdef MULTI_TASK
-#define TASK_DBN_D1 P1(DB_TASK) DBN_Dn
-#define TASK_D1 P1(DB_TASK)
-#define TASK_Di Pi(DB_TASK)
-#define TASK_PTR_D1 P1(DB_TASK FAR *)
-#define TASK_PTR_Di Pi(DB_TASK FAR *)
-#define CURRTASK_PARM            , Currtask
-#define CURRTASK_ONLY            Currtask
-#else
 #define TASK_DBN_D1 DBN_D1
 #define TASK_D1 P0
 #define TASK_Di /**/
@@ -380,7 +327,6 @@ typedef struct {
 #define TASK_PTR_Di /**/
 #define CURRTASK_PARM            /**/
 #define CURRTASK_ONLY            /**/
-#endif
 
 #define LOCK_D1 /**/
 #define LOCK_Di /**/
@@ -392,8 +338,5 @@ typedef struct {
 
 
 #include "dproto.h"
-#ifdef MULTI_TASK
-#include "task.h"
-#endif
 
 /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC vista.h */
index 2e9c59b1dd52810f0a6e840868639d598e5dca80..e2276dec40a0c8d94efeee3a3169178f4ae7d7f2 100644 (file)
@@ -279,8 +279,8 @@ _SHXbuf::filegen()
 
        for (i = 1; i < vec.size(); i++)
        {
-           register char *ref = filebuf;
-           register char *ptr = &bufptr[long(vec[i])];
+           char *ref = filebuf;
+           char *ptr = &bufptr[long(vec[i])];
            while (*ref == *ptr && *ref != '\0' && *ptr != '\0')
                ref++, ptr++;
 
@@ -292,7 +292,7 @@ _SHXbuf::filegen()
        // make room.
        for (i = vec.size(); i > 0; --i)
        {
-           register char *val = vec[i - 1];
+           char *val = vec[i - 1];
            vec[i] = val;
        }
        vec[0] = (char *)buf.size();
index f86655ef86c97a19c1ded7302c933785014cba7d..4b2b0f2630ccfea17bb0960148cf41afb879f0fe 100644 (file)
@@ -44,8 +44,8 @@ _mb_schr(const char *str, wchar_t ch)
 #else
 char *
 _mb_schr(str, ch)
-register unsigned char *str;
-register wchar_t ch;
+unsigned char *str;
+wchar_t ch;
 #endif
 {
     wchar_t __nlh_char[1];
index 6a8856f52f707bfe754619daeb45554a46f6c509..3b1d49fda2b7d9106fb42c5d1c5a84c0e16e6f4e 100644 (file)
@@ -31,9 +31,6 @@
  * (c) Copyright 1996 FUJITSU LIMITED.
  * (c) Copyright 1996 Hitachi.
  */
-#ifdef DOMAIN_ALLOW_MALLOC_OVERRIDE
-#include "/usr/include/apollo/shlib.h"
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -60,9 +57,6 @@ pathcollapse(const char *src, char *dst, boolean show_dir)
     char **comp = components;
     int length = src == NULL ? 0 : strlen(src);
     int dir_comp;              /* TRUE if last component was . or .. */
-#ifdef apollo
-    int double_slash = 0;
-#endif
     wchar_t __nlh_char[1];
 
     if (length == 0 || length > MAXPATHLEN)
@@ -75,19 +69,6 @@ pathcollapse(const char *src, char *dst, boolean show_dir)
        if ((dst = (char *)malloc(length + 1)) == NULL)
            return NULL;
 
-#ifdef apollo
-    /*
-     * On apollo, a leading double-slash must be preserved, so we
-     * copy the first slash and hide it from the rest of the code.
-     */
-    if (CHARAT(src) == '/' && CHARAT(src + 1) == '/')
-    {
-       *dst++ = '/';
-       src++;
-       double_slash = 1;
-    }
-#endif
-
     srcp = src;
     dstp = dst;
 
@@ -175,10 +156,5 @@ pathcollapse(const char *src, char *dst, boolean show_dir)
     else if (sep > dst)
        *sep = '\0';            /* remove trailing '/' */
 
-#ifdef apollo
-    if (double_slash)
-       dst--;
-#endif
-
     return dst;
 }
index 3d69ae48e126d5fd0cb010f6ea66fea1bf99aa94..6dd1a0545e1ca7169500d6e56a142cd3a41164b3 100644 (file)
  * (c) Copyright 1996 FUJITSU LIMITED.
  * (c) Copyright 1996 Hitachi.
  */
-# if defined(apollo) && !defined(___GID_T)
-// This kludge is needed for the include conflicts mentioned below
-// Remove when no longer necessary
-#  define _NEED___PID_T
-# endif
-
-#ifdef DOMAIN_ALLOW_MALLOC_OVERRIDE
-#include "/usr/include/apollo/shlib.h"
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <X11/Xos_r.h>
 #include <codelibs/nl_hack.h>
 
-#ifdef apollo
-// This kludge because of include conflicts between stdlib.h and unistd.h
-// Remove when problem is fixed
-
-# ifdef __cplusplus
-    extern "C" {
-# endif
-    _DECL_FUNC(__pid_t,    getpid,   (void))
-# ifdef __cplusplus
-    }
-# endif
-#else /* not apollo */
 # include <unistd.h>
-#endif /* not apollo */
 
 #include "stringio.h"
 #include "buf.h"
@@ -231,7 +209,7 @@ pushvar(_StringIO &in, char *buff)
 static boolean
 pushenv(_StringIO &in, char const *name)
 {
-    register char *str = getenv(name);
+    char *str = getenv(name);
     if (str == NULL || *str == '\0')
        return FALSE;
     else
index ee1802d3a14e20a14e4e4bd447a2bdb5db78bdd3..cab1d031f3020a7e2111d38c7301264e1ffa18d9 100644 (file)
@@ -41,7 +41,7 @@ char *strupper(char *str)
 
     if (str != NULL)
       {
-       for (register char *s = str; *s != '\0'; s++)
+       for (char *s = str; *s != '\0'; s++)
          if ((len = mblen(s, MB_CUR_MAX)) > 1)
            s += len;
          else
@@ -57,7 +57,7 @@ char *strlower(char *str)
 
     if (str != NULL)
       {
-       for (register char *s = str; *s != '\0'; s++)
+       for (char *s = str; *s != '\0'; s++)
          if ((len = mblen(s, MB_CUR_MAX)) > 1)
            s += len;
          else
index 2e1d4a016a3e6234ab69545899520ea005638f9f..cad12ce9334ea6a3a2ca469b4cc3f8f26bbcab65 100644 (file)
@@ -34,7 +34,7 @@
 #include <codelibs/stringx.h>
 
 char *
-strend(register const char *str)
+strend(const char *str)
 {
        if (str == NULL)
                return NULL;
index 863b1007577a71e2bfb300343355ec11cda8b9be..b04f8fc5fac8e9fbaef1b3ff3afbc2ba57312fce 100644 (file)
@@ -38,9 +38,9 @@
 
 /**************************************************
 // This is quick but does a pretty crummy job
-unsigned strhash(register const unsigned char *key)
+unsigned strhash(const unsigned char *key)
 {
-       register unsigned hash = 0;
+       unsigned hash = 0;
        while (*key != '\0')
                hash = (hash << 3) + *key++;
        return hash;
@@ -55,10 +55,10 @@ unsigned strhash(register const unsigned char *key)
 // This is from the "dragon" Compilers book.
 // It is much better than the above but somewhat slower.
 //
-unsigned strhash(register const char *p)
+unsigned strhash(const char *p)
 {
-       register unsigned h = 0;
-       register unsigned g;
+       unsigned h = 0;
+       unsigned g;
        wchar_t __nlh_char[1];
 
        if (p != NULL)
@@ -77,10 +77,10 @@ unsigned strhash(register const char *p)
 // Same as above but case insensitive.  Returns the same value as the
 // above function if there are no upper case letters in the string.
 //
-unsigned strhashi(register const char *p)
+unsigned strhashi(const char *p)
 {
-       register unsigned h = 0;
-       register unsigned g;
+       unsigned h = 0;
+       unsigned g;
        wchar_t __nlh_char[1];
 
        if (p != NULL)
@@ -110,12 +110,12 @@ unsigned strhashi(register const char *p)
 
 unsigned int
 hashfunc(buf, len)
-register unsigned char *buf;
-register int len;
+unsigned char *buf;
+int len;
 {
-       register unsigned int in;
-       register unsigned int xor;
-       register unsigned int t;
+       unsigned int in;
+       unsigned int xor;
+       unsigned int t;
 
        xor = len << 8;
        in = 0;
index 7c5994973cea977a4d80419dba696afb6b055d00..32b215ee0ef67e8ec907d3c398dbff7a10baaab5 100644 (file)
 #include "stringio.h"
 
 int
-_StringIO::doit(register int commit)
+_StringIO::doit(int commit)
 {
-    register wchar_t ch;
-    register int cu = curr;
-    register char *ccp;
+    wchar_t ch;
+    int cu = curr;
+    char *ccp;
     wchar_t __nlh_char[1];
 
     for (; cu >= 0; cu--)
index 67c0ad23c01aa24a2ef87c46483be97d84e40aea..ee608c35eda55b4ec88238f855772831b758c622 100644 (file)
 #include <codelibs/stringx.h>
 
 char *
-strtokx(register char *&ptr, register const char *sep)
+strtokx(char *&ptr, const char *sep)
 {
     if (ptr == NULL)
        return NULL;
 
     // find the beginning of the token
-    register char *ret = ptr;
+    char *ret = ptr;
     while (*ret != '\0' && _mb_schr(sep, *ret) != NULL)
        ADVANCE(ret);
 
     // find the end of the token
-    register char *end = ret;
+    char *end = ret;
     while (*end != '\0' && _mb_schr(sep, *end) == NULL)
        ADVANCE(end);
 
index d2db009774d37dc9b34ec743126cd1aa0b17bc60..431051a1201ad6c29948b060ae40dd7b32e07c90 100644 (file)
@@ -63,9 +63,9 @@ static int match_class(const char *, char);
 
 /* INLINE */
 static int
-next_char(register const char *pattern, const char **cpp = NULL)
+next_char(const char *pattern, const char **cpp = NULL)
 {
-    register int ret;
+    int ret;
     wchar_t __nlh_char[1];
 
     ret = pattern ? (int)CHARAT(pattern) : '\0';
@@ -98,10 +98,10 @@ strwcmp(const char *pattern, const char *string)
 // stwpat returns a pointer to the first meta-character if the string
 // is a pattern, else NULL
 char *
-strwpat(register const char *pattern)
+strwpat(const char *pattern)
 {
-    register int ch;
-    register char *prev_pattern = (char *)pattern;
+    int ch;
+    char *prev_pattern = (char *)pattern;
     wchar_t __nlh_char[1];
 
     while ((ch = next_char(pattern, &pattern)) != '\0')
@@ -113,7 +113,7 @@ strwpat(register const char *pattern)
        case '?': 
            return prev_pattern;
        case '[': {
-           register const char *eop = next_patt(prev_pattern, 0);
+           const char *eop = next_patt(prev_pattern, 0);
            if (CHARAT(eop) == ']')
                return prev_pattern;
            break;
@@ -131,7 +131,7 @@ strwpat(register const char *pattern)
  * the beginning of string.
  */
 static int 
-match(register const char *pattern, register const char *string, int depth)
+match(const char *pattern, const char *string, int depth)
 {
 #ifdef DEBUG
     printf("%smatch(\"%s\", \"%s\")\n", TABS, pattern, string);
@@ -143,7 +143,7 @@ match(register const char *pattern, register const char *string, int depth)
     while ((ch = next_char(pattern, &cp)) != '\0')
     {
        const char *laststr = string;
-       register int testchar = (int)CHARADV(string);
+       int testchar = (int)CHARADV(string);
 
        switch (ch)
        {
@@ -184,7 +184,7 @@ match(register const char *pattern, register const char *string, int depth)
 }
 
 static int
-match_class(register const char *clss, register char testchar)
+match_class(const char *clss, char testchar)
 /*
  *     pattern is a pointer to the leading [ of
  *     a shell-type class.  testchar is the character to match against
@@ -195,7 +195,7 @@ match_class(register const char *clss, register char testchar)
     wchar_t __nlh_char[1];
 
     /* find end of class, ie an un-escaped ']' */
-    register const char *eop = next_patt(clss, 0);
+    const char *eop = next_patt(clss, 0);
     ADVANCE(clss);
 
     if (CHARAT(eop) != ']')
@@ -209,7 +209,7 @@ match_class(register const char *clss, register char testchar)
 
     while (clss < eop)
     {
-       register int ch = next_char(clss, &clss);
+       int ch = next_char(clss, &clss);
        char const *clss_end = clss;
        int sep = next_char(clss_end, &clss_end);
        int ch2 = next_char(clss_end, &clss_end);
@@ -252,7 +252,7 @@ match_class(register const char *clss, register char testchar)
 }
 
 static const char *
-next_patt(register const char *pattern, int advance)
+next_patt(const char *pattern, int advance)
 {
     wchar_t __nlh_char[1];
 
index b5ef0a1473b97f4e4f8db2d2a0acb3e3e7db0b94..7934a000d35ff06a96b7c373ce7769c5a7048987 100644 (file)
  * (c) Copyright 1993, 1994 Novell, Inc.                               *
  */
 
-#ifdef DOMAIN_ALLOW_MALLOC_OVERRIDE
-#include "/usr/include/apollo/shlib.h"
-#endif
-
 #include <Dt/UserMsg.h>
 
 #include <bms/sbport.h> /* NOTE: sbport.h must be the first include. */
index a754bdfdb655e2321bb548ef9d00c73a6059a99a..a26d3db0d67bd8215cda233b94c6eab3c8a99d09 100644 (file)
 #include <sys/ptyio.h>
 #endif
 
-#if defined(__apollo) && !defined(ONLCR) 
-# define ONLCR 0               /* This guy (XPG3), not on apollo yet */
-#endif
-
 #ifdef __bsd
 #include <sys/file.h>
 #include <sgtty.h>
index 2e08af09e866876385d60601e23c5479f62eac1a..a83ab2cf03c885ac79fe735a65ab76c683a182fb 100644 (file)
  * (c) Copyright 1993, 1994 Novell, Inc.                               *
  */
 
-#ifdef DOMAIN_ALLOW_MALLOC_OVERRIDE
-#include "/usr/include/apollo/shlib.h"
-#endif
-
 #include <bms/sbport.h>  /* This must be the first file included */
 #include <bms/scoop.h>
 
@@ -154,11 +150,11 @@ static void root_object_init (object * UNUSED_PARM(p))
 static object *root_clone (object *this_ptr, object *clone)
 /*--------------------------------------------------------------------------+*/
 {
-  register XeString orig = (XeString) this_ptr ;
-  register XeString copy ;
+  XeString orig = (XeString) this_ptr ;
+  XeString copy ;
   
-  register object_clasp o_class =      this_ptr->class_ptr ;
-  register OSizeType   size =          o_class->object_size ;
+  object_clasp o_class =       this_ptr->class_ptr ;
+  OSizeType    size =          o_class->object_size ;
 
   if ( ! clone )
     clone = (*(o_class->new_obj))(o_class) ;
index a53cc3bc795a6461878380ce037c6b8cb4875c6f..c5e2ab957bf042f5fd78da084ed1a211bce05f42 100644 (file)
@@ -90,55 +90,55 @@ static void Xe_init_sig_table(void)
     /* Now add signals that may or may not be around on a given platform */    
 
 #   ifdef SIGIO    
-    Xe_addsig((XeString)"SIGIO", SIGIO);               /*  hpux sun apollo */
+    Xe_addsig((XeString)"SIGIO", SIGIO);               /*  hpux sun */
 #   else
 #       ifdef SIGPOLL
-           Xe_addsig((XeString)"SIGIO", SIGPOLL);      /*  hpux sun apollo */
+           Xe_addsig((XeString)"SIGIO", SIGPOLL);      /*  hpux sun */
 #       endif
 #    endif
 
 #   ifdef SIGPOLL    
-    Xe_addsig((XeString)"SIGPOLL", SIGPOLL);           /*  hpux sun apollo */
+    Xe_addsig((XeString)"SIGPOLL", SIGPOLL);           /*  hpux sun */
 #   else
 #       ifdef SIGIO
-           Xe_addsig((XeString)"SIGPOLL", SIGIO);      /*  hpux sun apollo */
+           Xe_addsig((XeString)"SIGPOLL", SIGIO);      /*  hpux sun */
 #       endif
 #   endif
 
 #   ifdef SIGEMT    
-    Xe_addsig((XeString)"SIGEMT", SIGEMT);             /*  hpux sun apollo */
+    Xe_addsig((XeString)"SIGEMT", SIGEMT);             /*  hpux sun */
 #   endif
 
 #   ifdef SIGBUS    
-    Xe_addsig((XeString)"SIGBUS", SIGBUS);             /*  hpux sun apollo */
+    Xe_addsig((XeString)"SIGBUS", SIGBUS);             /*  hpux sun */
 #   endif
 
 #   ifdef SIGIOT    
-    Xe_addsig((XeString)"SIGIOT", SIGIOT);             /*  hpux sun apollo */
+    Xe_addsig((XeString)"SIGIOT", SIGIOT);             /*  hpux sun */
 #   endif
 
 #   ifdef SIGURG    
-    Xe_addsig((XeString)"SIGURG", SIGURG);             /*  hpux sun apollo */
+    Xe_addsig((XeString)"SIGURG", SIGURG);             /*  hpux sun */
 #   endif
 
 #   ifdef SIGSYS    
-    Xe_addsig((XeString)"SIGSYS", SIGSYS);             /*  hpux sun apollo */
+    Xe_addsig((XeString)"SIGSYS", SIGSYS);             /*  hpux sun */
 #   endif
 
 #   ifdef SIGTRAP    
-    Xe_addsig((XeString)"SIGTRAP", SIGTRAP);           /*  hpux sun apollo */
+    Xe_addsig((XeString)"SIGTRAP", SIGTRAP);           /*  hpux sun */
 #   endif
 
 #   ifdef SIGPROF    
-    Xe_addsig((XeString)"SIGPROF", SIGPROF);           /*  hpux sun apollo */
+    Xe_addsig((XeString)"SIGPROF", SIGPROF);           /*  hpux sun */
 #   endif
 
 #   ifdef SIGCLD    
-    Xe_addsig((XeString)"SIGCLD", SIGCLD);             /*  hpux sun apollo */
+    Xe_addsig((XeString)"SIGCLD", SIGCLD);             /*  hpux sun */
 #   endif
 
 #   ifdef SIGVTALRM    
-    Xe_addsig((XeString)"SIGVTALRM", SIGVTALRM);       /*  hpux sun apollo */
+    Xe_addsig((XeString)"SIGVTALRM", SIGVTALRM);       /*  hpux sun */
 #   endif
 
 #   ifdef SIGWINCH
@@ -204,60 +204,60 @@ XeString XeSignalToName(int sig)
     /*       code to the stuff in Xe_init_sig_table() above, you see a one   */
     /*       to one correspondance.                                         */
      
-#   ifdef SIGIO                                /*  hpux sun apollo */
+#   ifdef SIGIO                                /*  hpux sun */
                                                /*  (SIGPOLL, SIGTINT are aliases) */
     case SIGIO:                return (XeString)"SIGIO"; 
 #   endif
 
-#   ifdef SIGPOLL                              /*  hpux sun apollo */
+#   ifdef SIGPOLL                              /*  hpux sun */
 /*  ----> Duplicated by SIGIO above
     case SIGPOLL:      return (XeString)"SIGPOLL";     
 */
 #   endif
 
 
-#   ifdef SIGEMT                               /*  hpux sun apollo */
+#   ifdef SIGEMT                               /*  hpux sun */
     case SIGEMT:       return (XeString)"SIGEMT";      
 #   endif
 
-#   ifdef SIGBUS                               /*  hpux sun apollo */
+#   ifdef SIGBUS                               /*  hpux sun */
     case SIGBUS:       return (XeString)"SIGBUS";      
 #   endif
 
-#   ifdef SIGIOT                               /*  hpux sun apollo */
+#   ifdef SIGIOT                               /*  hpux sun */
 /*  ----> Duplicated by SIGABRT above
 
     case SIGIOT:       return (XeString)"SIGIOT";      
 */
 #   endif
 
-#   ifdef SIGURG                               /*  hpux sun apollo */
+#   ifdef SIGURG                               /*  hpux sun */
     case SIGURG:       return (XeString)"SIGURG";      
 #   endif
 
-#   ifdef SIGSYS                               /*  hpux sun apollo */
+#   ifdef SIGSYS                               /*  hpux sun */
     case SIGSYS:       return (XeString)"SIGSYS";      
 #   endif
 
-#   ifdef SIGTRAP                              /*  hpux sun apollo */
+#   ifdef SIGTRAP                              /*  hpux sun */
     case SIGTRAP:      return (XeString)"SIGTRAP";     
 #   endif
 
-#   ifdef SIGPROF                              /*  hpux sun apollo */
+#   ifdef SIGPROF                              /*  hpux sun */
     case SIGPROF:      return (XeString)"SIGPROF";     
 #   endif
 
-#   ifdef SIGCLD                               /*  hpux sun apollo */
+#   ifdef SIGCLD                               /*  hpux sun */
 /*  ----> Duplicated by SIGCHLD above
     case SIGCLD:       return (XeString)"SIGCLD";      
 */
 #   endif
 
-#   ifdef SIGVTALRM                                    /*  hpux sun apollo */
+#   ifdef SIGVTALRM                                    /*  hpux sun */
     case SIGVTALRM:    return (XeString)"SIGVTALRM";   
 #   endif
 
-#   ifdef SIGWINCH                             /*  sun apollo */
+#   ifdef SIGWINCH                             /* sun */
     case SIGWINCH:     return (XeString)"SIGWINCH";    
 #   endif
 
index e63d066b153f6919bc035fc3e090837e0d1cd9de..a69918e9217fb21b97cd734c037ffe0391ea767a 100644 (file)
@@ -131,7 +131,7 @@ Boolean _DtCompileMessagePiece(
 ActionRequest * _DtCloneRequest (
                         ActionRequest * request) ;
 void _DtFreeRequest( 
-                        register ActionRequest *request) ;
+                        ActionRequest *request) ;
 
 char * _DtFindCwd( void ) ;
 
@@ -222,9 +222,9 @@ static void AddFailedHostToList (
                         ActionRequest * request,
                         char * badHost) ;
 static int _DtAddEntry( 
-                        register char * string,
-                        register char * **arrayPtr,
-                        register int *sizePtr) ;
+                        char * string,
+                        char * **arrayPtr,
+                        int *sizePtr) ;
 static void TryToTypeFile( 
                         ObjectData *obj,
                         char * host,
@@ -255,10 +255,10 @@ static Boolean ParseFileArgument(
                         char * filetype,
                         Boolean typeFile) ;
 static void AddPrompt( 
-                        register int argNum,
+                        int argNum,
                         char * prompt,
-                        register int *numPrompts,
-                        register PromptEntry **prompts) ;
+                        int *numPrompts,
+                        PromptEntry **prompts) ;
 static int MatchParamsToAction( 
                         ActionRequest *request,
                         int *numPrompts,
@@ -273,33 +273,33 @@ static void ProcessOneSegment(
                        int * unused,
                        Boolean * paramUsed) ;
 static ActionPtr CloneActionDBEntry( 
-                        register ActionPtr action) ;
+                        ActionPtr action) ;
 static void CloneParsedMessage(
-                        register parsedMsg * old_pmsg,
-                        register parsedMsg * new_pmsg ) ;
+                        parsedMsg * old_pmsg,
+                        parsedMsg * new_pmsg ) ;
 static void FreeParsedMessage(
-                        register parsedMsg * parsedMessage) ;
+                        parsedMsg * parsedMessage) ;
 static parsedMsg * CloneParsedMessageArray(
-                        register parsedMsg * pmsgArray,
-                        register int count ) ;
+                        parsedMsg * pmsgArray,
+                        int count ) ;
 static void FreeParsedMessageArray(
-                        register parsedMsg * parsedMessageArray,
+                        parsedMsg * parsedMessageArray,
                         int count ) ;
 static Boolean InsertArgumentString(
                         Widget w,
-                        register char **bufPtr,
+                        char **bufPtr,
                         int * bufSizePtr,
                         ActionRequest *request,
-                        register ObjectData *object,
+                        ObjectData *object,
                         unsigned long mask,
                         char * relPathHost,
                         char * relPathDir,
                         Boolean addLeadingSpace,
                         unsigned long processingMask ) ;
 static void InsertUnmappedArgumentString(
-                        register char **bufPtr,
+                        char **bufPtr,
                         int * bufSizePtr,
-                        register ObjectData *object,
+                        ObjectData *object,
                         Boolean addLeadingSpace ) ;
 static char * GrowMsgBuffer( 
                         char * buffer,
@@ -324,9 +324,9 @@ static void InitiateDtNotifyMessage(
                         ActionRequest *request ) ;
 static void PrepareAndExecuteAction( 
                         Widget w,
-                        register ActionRequest *request);
+                        ActionRequest *request);
 static void __ExtractCWD(
-                        register ActionRequest *request,
+                        ActionRequest *request,
                         char ** hostPtr,
                         char ** dirPtr,
                         Boolean useObjectInfo) ;
@@ -342,29 +342,29 @@ static void CreateContinueDialog(
                         Widget w,
                         ActionRequest *request,
                         int numPrompts,
-                        register PromptEntry *prompts) ;
+                        PromptEntry *prompts) ;
 static void CancelPromptDialog( 
                         Widget widget,
                         PromptDialog *dialog,
                         XtPointer call_data) ;
 static void ProcessPromptDialog( 
                         Widget widget,
-                        register PromptDialog *dialog,
+                        PromptDialog *dialog,
                         XtPointer call_data) ;
 static void ChangePromptTraversal( 
                         Widget widget,
-                        register PromptDialog *dialog,
+                        PromptDialog *dialog,
                         XtPointer call_data) ;
 static void CreatePromptDialog( 
                         Widget w,
                         ActionRequest *request,
-                        register int numPrompts,
-                        register PromptEntry *prompts) ;
+                        int numPrompts,
+                        PromptEntry *prompts) ;
 static Boolean MoreArgumentsToProcess( 
-                        register ActionRequest *request) ;
+                        ActionRequest *request) ;
 static Boolean ProcessRequest( 
                         Widget w,
-                        register ActionRequest *request) ;
+                        ActionRequest *request) ;
 static void InitLocalizedStrings( void ) ;
 static int LinkToTypeQuark(
                         char * host,
@@ -485,7 +485,7 @@ DtActionInvoke(
         DtActionCallbackProc statusUpdateCb,
         XtPointer       client_data)
 {
-    register int       i;
+    int        i;
     ActionRequest      *request;
     char               *contextHost= NULL;/* dummy to replace old parameter */
     _DtActInvRecT      *invp;          /* pointer to invocation record */
@@ -1281,11 +1281,11 @@ CreateActionRequest(
         _DtActInvRecT *invp )
 
 {
-   register int i, j;
+   int i, j;
    int numObjects = 0;
    ObjectData * objectDataArray;
    ObjectData objectData;
-   register ActionRequest * request;
+   ActionRequest * request;
 
 
    /* Allocate a new request structure -- zero filled */
@@ -1453,7 +1453,7 @@ CreateInvocationRecord(
        DtActionArg     *aap,
        int             aac)
 {
-    register int       i;
+    int        i;
     _DtActInvRecT      *invp;  /* pointer to invocation record */
     char               *tmp;
 
@@ -1720,7 +1720,7 @@ ParseFileArgument(
         Boolean typeFile )
 
 {
-   register int i, j;
+   int i, j;
    String dirName;
    String host;
    String dir;
@@ -1890,12 +1890,12 @@ _DtFindCwd( void )
 
 static int 
 _DtAddEntry(
-        register String string,
-        register String **arrayPtr,
-        register int *sizePtr )
+        String string,
+        String **arrayPtr,
+        int *sizePtr )
 
 {
-   register int i;
+   int i;
 
    /* See if the string is already in the array */
    for (i = 0; i < *sizePtr; i++)
@@ -2050,11 +2050,11 @@ LinkToTypeQuark(
 static Boolean 
 ProcessRequest(
         Widget w,
-        register ActionRequest *request )
+        ActionRequest *request )
 
 {
    int unused;
-   register ActionPtr action;
+   ActionPtr action;
    int numPrompts;
    PromptEntry * prompts;
    DtShmBoson actionQuark;
@@ -2239,13 +2239,13 @@ ProcessRequest(
 static void 
 PrepareAndExecuteAction(
         Widget w,
-        register ActionRequest *request )
+        ActionRequest *request )
 
 {
    char * relPathHost;
    char * relPathDir;
-   register int i;
-   register ActionPtr action = request->clonedAction;
+   int i;
+   ActionPtr action = request->clonedAction;
    int     argNum;
    _DtActInvRecT *invp;        /* pointer to invocation record */
    _DtActChildRecT *childrecp; /* pointer to child record */
@@ -2423,7 +2423,7 @@ PrepareAndExecuteAction(
  */
 static void 
 __ExtractCWD(
-        register ActionRequest *request,
+        ActionRequest *request,
         char ** hostPtr,
         char ** dirPtr,
         Boolean useObjectInfo )
@@ -2432,7 +2432,7 @@ __ExtractCWD(
    String msg;
    String lastCh;
    int lastChLen;
-   register ActionPtr action = request->clonedAction;
+   ActionPtr action = request->clonedAction;
 
    /* Only dropped objects will have been 'typed' at this point */
    if (useObjectInfo && (IS_CMD(action->mask)) && (request->numObjects > 0) && 
@@ -2534,10 +2534,10 @@ __ExtractCWD(
 
 static Boolean 
 MoreArgumentsToProcess(
-        register ActionRequest *request )
+        ActionRequest *request )
 
 {
-   register int i;
+   int i;
    char * path;
    char * dtype;
 
@@ -2761,10 +2761,10 @@ _DtCloneRequest (
 
 void 
 _DtFreeRequest(
-        register ActionRequest *request )
+        ActionRequest *request )
 
 {
-   register int i;
+   int i;
 
    XtFree(request->actionName);
 
@@ -2826,11 +2826,11 @@ _DtFreeRequest(
 
 static ActionPtr 
 CloneActionDBEntry(
-        register ActionPtr action )
+        ActionPtr action )
 
 {
-   register ActionPtr newAction = (ActionPtr)XtMalloc((Cardinal)sizeof(Action));
-   register int i;
+   ActionPtr newAction = (ActionPtr)XtMalloc((Cardinal)sizeof(Action));
+   int i;
 
    /* Clone each field */
    newAction->action = action->action;
@@ -2928,10 +2928,10 @@ CloneActionDBEntry(
 
 void 
 _DtFreeActionStruct(
-        register ActionPtr action )
+        ActionPtr action )
 
 {
-   register int i;
+   int i;
 
    if (action == NULL)
       return;
@@ -2975,13 +2975,13 @@ _DtFreeActionStruct(
 
 static void
 CloneParsedMessage(
-        register parsedMsg * old_pmsg,
-        register parsedMsg * new_pmsg )
+        parsedMsg * old_pmsg,
+        parsedMsg * new_pmsg )
 
 {
    int i;
-   register MsgComponent * piece;
-   register MsgComponent * newPiece;
+   MsgComponent * piece;
+   MsgComponent * newPiece;
 
    new_pmsg->numMsgParts = old_pmsg->numMsgParts;
    if (old_pmsg->compiledMessage)
@@ -3041,7 +3041,7 @@ CloneParsedMessage(
  */
 static void 
 FreeParsedMessage(
-        register parsedMsg * parsedMessage )
+        parsedMsg * parsedMessage )
 
 {
    int i;
@@ -3067,8 +3067,8 @@ FreeParsedMessage(
  */
 static parsedMsg *
 CloneParsedMessageArray(
-        register parsedMsg * pmsgArray,
-        register int count )
+        parsedMsg * pmsgArray,
+        int count )
 
 {
    parsedMsg * newArray;
@@ -3092,7 +3092,7 @@ CloneParsedMessageArray(
  */
 static void 
 FreeParsedMessageArray(
-        register parsedMsg * parsedMessageArray,
+        parsedMsg * parsedMessageArray,
         int count )
 
 {
@@ -3135,9 +3135,9 @@ _DtCompileMessagePiece(
        int * promptDataIndex )
 
 {
-   register int i, j;
+   int i, j;
    Boolean firstParmUsed;
-   register MsgComponent * segment;
+   MsgComponent * segment;
    char * compiledMsg = NULL;
    int    compiledMsgSize = 0;
    ObjectData tmpObjData;
@@ -3393,10 +3393,10 @@ _DtCompileMessagePiece(
 static Boolean 
 InsertArgumentString(
         Widget w,
-        register char **bufPtr,
+        char **bufPtr,
         int * bufSizePtr,
         ActionRequest *request,
-        register ObjectData *object,
+        ObjectData *object,
         unsigned long mask,
         char * relPathHost,
         char * relPathDir,
@@ -3568,9 +3568,9 @@ InsertArgumentString(
 
 static void 
 InsertUnmappedArgumentString(
-        register char **bufPtr,
+        char **bufPtr,
         int * bufSizePtr,
-        register ObjectData *object,
+        ObjectData *object,
         Boolean addLeadingSpace )
 
 {
@@ -3645,13 +3645,13 @@ GrowMsgBuffer(
 
 static void 
 AddPrompt(
-        register int argNum,
+        int argNum,
         String prompt,
-        register int *numPrompts,
-        register PromptEntry **prompts )
+        int *numPrompts,
+        PromptEntry **prompts )
 
 {
-   register int i;
+   int i;
 
    /*
     * Standard arguments only want their prompts entered once.
@@ -3697,7 +3697,7 @@ MatchParamsToAction(
    Boolean * paramUsed = NULL;
    int unused;
    Boolean argsOptionFound;
-   register int i;
+   int i;
    int lastArgReferenced;
    ActionPtr action = request->clonedAction;
 
@@ -3966,7 +3966,7 @@ CancelPromptDialog(
 static void 
 ChangePromptTraversal(
         Widget widget,
-        register PromptDialog *dialog,
+        PromptDialog *dialog,
         XtPointer call_data )
 {
    XmProcessTraversal (widget, XmTRAVERSE_NEXT_TAB_GROUP);
@@ -3982,11 +3982,11 @@ ChangePromptTraversal(
 static void 
 ProcessPromptDialog(
         Widget widget,
-        register PromptDialog *dialog,
+        PromptDialog *dialog,
         XtPointer call_data )
 
 {
-   register int i, j;
+   int i, j;
    String value;
 
    /* Unpost the dialog */
@@ -4114,18 +4114,18 @@ static void
 CreatePromptDialog(
         Widget w,
         ActionRequest *request,
-        register int numPrompts,
-        register PromptEntry *prompts )
+        int numPrompts,
+        PromptEntry *prompts )
 
 {
-   register PromptDialog * dialog;
-   register DialogPromptEntry * promptDes;
+   PromptDialog * dialog;
+   DialogPromptEntry * promptDes;
    XmString pt1;
    String title;
    Widget shell, bboard, frame, form, label;
    Widget promptLabel, topAttach;
    Widget separator, ok, cancel;
-   register int count;
+   int count;
    int n, i;
    Arg args[20];
    XmString labelString;
@@ -4411,8 +4411,8 @@ ContinueRequest(
         XtPointer call_data )
 
 {
-   register int i;
-   register ContinueDialog *dialog = (ContinueDialog *)user_data;
+   int i;
+   ContinueDialog *dialog = (ContinueDialog *)user_data;
 
    /* Destroy the dialog */
    XtDestroyWidget(XtParent(dialog->topLevel));
@@ -4478,8 +4478,8 @@ CancelRequest(
         XtPointer call_data )
 
 {
-   register int i;
-   register ContinueDialog *dialog = (ContinueDialog *)user_data;
+   int i;
+   ContinueDialog *dialog = (ContinueDialog *)user_data;
    unsigned long evalStatus;
    unsigned long userStatus;
    _DtActInvRecT *invp;
@@ -4529,13 +4529,13 @@ CreateContinueDialog(
         Widget w,
         ActionRequest *request,
         int numPrompts,
-        register PromptEntry *prompts )
+        PromptEntry *prompts )
 
 {
-   register ContinueDialog * dialog;
+   ContinueDialog * dialog;
    String title;
    XmString label;
-   register int i; 
+   int i;
    int n;
    Arg args[10];
    XmString ok, cancel;
index 8d6497b4e1996c08b71882f76e81dbe9d7fa9bfb..9716d21a18ab8b24c20dfed868dfd7c08224a870 100644 (file)
@@ -230,7 +230,7 @@ static
 unsigned long
 _DtActFieldBitLookup(char *name)
 {
-       register int j;
+       int j;
        char *np = name;
 #ifdef _DT_ALLOW_DT_MSGS
        char dtnamebuf[sizeof(_DtPFX) + sizeof(_DtACTION_DTN_VALUE)] = _DtPFX;
@@ -290,7 +290,7 @@ _DtActFieldBitLookup(char *name)
 static char *
 _DtActFieldNameLookup(long bitmask)
 {
-       register int j;
+       int j;
 
        if ( !bitmask )
                return NULL;
@@ -312,7 +312,7 @@ _DtActFieldNameLookup(long bitmask)
 static Boolean
 _DtActDupFieldNameCheck(DtDtsDbField **fields,int numFields,XrmQuark name)
 {
-       register int i;
+       int i;
 
        for ( i = 0; i < numFields; i++ ) 
        {
@@ -998,7 +998,7 @@ _DtActionConverter(DtDtsDbField * fields,
        DtDtsDbDatabase *act_db;
        DtDtsDbRecord   *act_rec;
        DtDtsDbField    *fld;
-       register int    i;
+       int    i;
        unsigned int    mask = 0;
        char            bigBuf[_DtAct_MAX_BUF_SIZE];
        char            *buf = bigBuf;
index 365a6214bfae688808f72983911d323e0590a620..46d2c4f72d9b33f8c49f2c2307ffeb6721cda462 100644 (file)
@@ -106,9 +106,9 @@ static void _DtActionGetRecordWeight(
                     long * primaryWeightPtr,
                     long * secondaryWeightPtr );
 static void ParseMessage( 
-                        register ActionPtr action,
-                        register char * str,
-                        register parsedMsg * msg) ;
+                        ActionPtr action,
+                        char * str,
+                        parsedMsg * msg) ;
 static Boolean ValidKeyword(
                        char *start,
                        char *end,
@@ -2273,18 +2273,18 @@ _DtActionFindDBEntry(   ActionRequest *reqp,
 
 static void 
 ParseMessage(
-        register ActionPtr action,
-        register char * str,
-        register parsedMsg * msg )
+        ActionPtr action,
+        char * str,
+        parsedMsg * msg )
 
 {
    char *start; 
-   register char *string;
+   char *string;
    char *keywordStart, *keywordEnd;
    char *prompt;
    int keyword, argNum;
    Boolean isFile;
-   register MsgComponent *newBlock;
+   MsgComponent *newBlock;
 
    /* Initialize all fields */
    msg->parsedMessage = NULL;
index 1a666b45155e12bd6db675458b8d5bc2f827e95f..02de219683e7e411447e9649e0d41b6436569e0a 100644 (file)
@@ -136,7 +136,7 @@ extern Boolean _DtCompileMessagePiece(
 extern ActionRequest * _DtCloneRequest (
                         ActionRequest * request) ;
 extern void _DtFreeRequest( 
-                        register ActionRequest *request) ;
+                        ActionRequest *request) ;
 /********    End Public Function Declarations    ********/
 
 
index d86e004a71ca4aff79ddfa2b471da770c54b72b7..3a4c7667df237c2bdc77ab659c76d2fc66330be0 100644 (file)
@@ -886,7 +886,7 @@ _DtActGenerateTmpFile(char *dir,char *format,mode_t mode,int *fd)
 void
 _DtRemoveTrailingBlanksInPlace(char **s)
 {
-       register char *p;
+       char *p;
 
        if (!s || !strlen(*s))
                 return;
@@ -989,7 +989,7 @@ _DtExecuteAccess( const char *path )
  * Allocate an unused DtActionInvocationID
  * between 1..INT_MAX
  */
-DtActionInvocationID _DtActAllocID()
+DtActionInvocationID _DtActAllocID(void)
 {
     extern _DtActInvRecT   **_DtActInvRecArray;                /* global */
     extern int             _actInvRecArraySize;                /* global */
@@ -1030,7 +1030,7 @@ DtActionInvocationID _DtActAllocID()
  *
  * Allocate an Invocation Record
  */
-_DtActInvRecT *_DtActAllocInvRec()
+_DtActInvRecT *_DtActAllocInvRec(void)
 {
     extern _DtActInvRecT   **_DtActInvRecArray;                /* global */
     extern int             _actInvRecArraySize;                /* global */
@@ -1182,7 +1182,7 @@ _DtActFreeChildRec( _DtActChildRecT *childRecP)
  ******************************************************************************/
 int _DtActDeleteChildRec( _DtActInvRecT *invp, _DtActChildRecT *childp)
 {
-       register int i,j;
+       int i,j;
 
        if ( !invp || !childp )
                return 0;
@@ -1222,7 +1222,7 @@ int _DtActDeleteChildRec( _DtActInvRecT *invp, _DtActChildRecT *childp)
  ******************************************************************************/
 int _DtActDeleteInvRec( DtActionInvocationID id )
 {
-    register int i;
+    int i;
     CallbackData *data;
 
     _DtSvcProcessLock();
@@ -1394,7 +1394,7 @@ _DtActChildRecT *_DtActFindChildRec(
 static void
 _DtActFreeInvRec( _DtActInvRecT *invp )
 {
-    register int i;
+    int i;
 
 
     /*
@@ -1880,7 +1880,7 @@ _DtActGetCmdReturnArgs(
     _DtActChildRecT *childp,
     DtActionArg     **aargv )
 {
-    register int i;
+    int i;
     _DtActInvRecT      *invp;
     DtActionArg                *newArgp;
 
index 5e362e9aab224ba6317b5cdac95b51ebe868b793..2635b961e86e1f1582b85479f8eaf816c1452002 100644 (file)
 #include <Dt/CmdInv.h>
 
 #include <fcntl.h>
-#ifdef __apollo
-#include "/sys5/usr/include/sys/termio.h"
-#else
 #include <termios.h>
-#endif
 #include <errno.h>
 #include <unistd.h>
 #include <sys/stat.h>
index 9e5f2c8a74aee6b56dfea92598485f3f00fa930a..c35137ac6d6dff68cd23c6176a1c030eac1e45b7 100644 (file)
 
 #include <stdio.h>
 #include <sys/param.h>
-
-#ifdef __apollo
-#include "/sys5/usr/include/unistd.h"
-#else
 #include <unistd.h>
-#endif
 #include <limits.h>
 #include <sys/stat.h>
 
index ff88e3f88c4bb264e19511d28f756832bacfc258..7e05bf380fd7c1954c737ba5b6bb0f10e42939e9 100644 (file)
@@ -618,20 +618,20 @@ _DtFindMatchingFiles(
 {
 /* LOCAL VARIABLES */
    
-   register DtDirPaths *files; /* An array of pointers to the filenames which 
+   DtDirPaths *files;  /* An array of pointers to the filenames which
                                have been found. */
    int max_files;      /* The total number of filenames that can be 
                           stored in the "files" array before it must
                           be reallocd. */
    int num_found;      /* The number of files which have been found. */
-   register DIR *dirp;         /* Variables for walking through the directory
+   DIR *dirp;          /* Variables for walking through the directory
                                entries. */
    char * next_file;
    struct dirent *dp = NULL;
    char *file_suffix;
    int suffixLen, nameLen;
    int nextIndex;
-   register char * next_path;
+   char * next_path;
    int files_in_this_directory;
    int base;
 
index 826e0dae4a91618538ba9ad8d516138375767fe7..b8decc50fb87a33b0549e6a521f483313c49e526 100644 (file)
@@ -468,7 +468,7 @@ _DtDndArgListFromVarArgs(
  * Returns the network node/host name.
  */
 String
-_DtDndGetHostName()
+_DtDndGetHostName(void)
 {
         static char *nodename;
 
index b61339263672cf3d546e82bc0bdd800d825fde56..2bb59c7728db0fe318ed16b3f27aa647222c4917 100644 (file)
@@ -146,8 +146,8 @@ DtHashTbl _DtUtilMakeIHash(int size)
 void ** _DtUtilGetHash(DtHashTbl t, const unsigned char * key)
 {      
   hash * tbl = (hash *) t;
-  register int bucket;
-  register hash_entry * tmp;
+  int bucket;
+  hash_entry * tmp;
   hash_entry * new;
 
   if(tbl->hash_type == String_Key)
@@ -194,8 +194,8 @@ void ** _DtUtilGetHash(DtHashTbl t, const unsigned char * key)
 
 void ** _DtUtilFindHash(DtHashTbl t, const unsigned char * key)
 {
-  register hash * tbl = (hash *) t;
-  register hash_entry * tmp;
+  hash * tbl = (hash *) t;
+  hash_entry * tmp;
 
   if(tbl->hash_type == String_Key)
     {
@@ -217,10 +217,10 @@ void ** _DtUtilFindHash(DtHashTbl t, const unsigned char * key)
 
 void * _DtUtilDelHash(DtHashTbl t, const unsigned char * key)
 {
-  register hash * tbl = (hash *) t;
+  hash * tbl = (hash *) t;
 
-  register int bucket;
-  register hash_entry * tmp, * prev = NULL;
+  int bucket;
+  hash_entry * tmp, * prev = NULL;
 
   if(tbl->hash_type == String_Key)
     bucket = hash_string(key, tbl->size);
@@ -277,7 +277,7 @@ void * _DtUtilDelHash(DtHashTbl t, const unsigned char * key)
 int _DtUtilOperateHash(DtHashTbl t, void (*ptr)(), void * usr_arg)
 {
   hash * tbl = (hash *) t;
-  register hash_entry * tmp = tbl->start;
+  hash_entry * tmp = tbl->start;
   int c = 0;
 
   while(tmp)
@@ -292,7 +292,7 @@ int _DtUtilOperateHash(DtHashTbl t, void (*ptr)(), void * usr_arg)
 void _DtUtilDestroyHash(DtHashTbl t, int (*ptr)(), void * usr_arg)
 {
   hash * tbl = (hash *) t;
-  register hash_entry * tmp = tbl->start, * prev;
+  hash_entry * tmp = tbl->start, * prev;
 
   while(tmp)
     {
@@ -309,10 +309,10 @@ void _DtUtilDestroyHash(DtHashTbl t, int (*ptr)(), void * usr_arg)
   free(tbl);
 }
 
-static int hash_string(register const unsigned char * s, int modulo)
+static int hash_string(const unsigned char * s, int modulo)
 {
-       register unsigned result = 0;
-       register int i=1;
+       unsigned result = 0;
+       int i=1;
 
        while(*s!=0)
          result += (*s++ << i++);
index d3a61a7f565faf6d555e4072c521de04492e415b..c5160af308546b24d9e6807a3e723a8f73152584 100644 (file)
@@ -742,7 +742,7 @@ get_buff_size(type_info_t *info)
        return(info->buff_size);
 }
 static DtDtsMMDatabase *
-get_dc_db()
+get_dc_db(void)
 {
        DtDtsMMDatabase *dc_db = 0;
 
@@ -782,7 +782,7 @@ _DtDtsMMPrint(stdout);
 }
 
 static DtDtsMMDatabase *
-get_da_db()
+get_da_db(void)
 {
        DtDtsMMDatabase *da_db = 0;
        if(!da_db)
@@ -2227,10 +2227,10 @@ name_list(type_info_t *linfo, DtDtsMMDatabase   *db, DtDtsMMRecord *rec_ptr)
  * which does the trick.
  */
 static int
-strcasecmp(register const char *s1,
-          register const char *s2)
+strcasecmp(const char *s1,
+          const char *s2)
 {
-    register int c1, c2;
+    int c1, c2;
 
     while (*s1 && *s2) {
        c1 = isupper(*s1) ? tolower(*s1) : *s1;
index 1d55cb71123e1f8d2e1faccc1d1e413ab114dcba..ba7c30865a5b621be1b94b3e41d7d5e4f5e39e8a 100644 (file)
@@ -181,7 +181,7 @@ _DtDtsDbInit(void)
 }
 
 char **
-_DtsDbListDb()
+_DtsDbListDb(void)
 {
        int     i;
        char    **list = 0;
@@ -338,7 +338,7 @@ _DtDtsDbRecordSort(DtDtsDbDatabase *db, _DtDtsDbRecordCompare compare)
 DtDtsDbField *
 _DtDtsDbGetField(DtDtsDbRecord *rec, char *name)
 {
-       register int i;
+       int i;
 
        /*
         * Field names have been quarked so quark 'name' and
@@ -379,7 +379,7 @@ _DtDtsDbGetRecordByName(DtDtsDbDatabase *db, char *name)
        DtDtsDbRecord   srch;
        DtDtsDbRecord   **result;
        DtDtsDbRecord   *s = &srch;
-       register int i;
+       int i;
        XrmQuark        name_quark = XrmStringToQuark(name);
 
        /*
index f28fe90fcdc56581598a3626907a4a51136b2c3f..7d67657f2a7e377fd4ccba4823cc1729f14838de 100644 (file)
@@ -82,7 +82,7 @@ static int      cur_da_count = 0;
 #define        _DtFT_NUM_FIELDS        20
 
 int
-_DtDtsNextDCSeq()
+_DtDtsNextDCSeq(void)
 {
        int nextDCSeq;
 
@@ -94,7 +94,7 @@ _DtDtsNextDCSeq()
 }
 
 int
-_DtDtsNextDASeq()
+_DtDtsNextDASeq(void)
 {
        int nextDASeq;
 
@@ -106,7 +106,7 @@ _DtDtsNextDASeq()
 }
 
 void
-_DtDtsSeqReset()
+_DtDtsSeqReset(void)
 {
         _DtSvcProcessLock();
        cur_dc_count = 0;
index b06244ff251dd28236c48156050533bbcc0119d5..99965b0eb8e113c7d89a39a373e833f3d74fc71b 100644 (file)
@@ -362,7 +362,7 @@ _DtDtsMMInit(int override)
 }
 
 char **
-_DtsMMListDb()
+_DtsMMListDb(void)
 {
        int     i;
        char    **list;
@@ -414,7 +414,7 @@ _DtDtsMMGet(const char *name)
 DtDtsMMField *
 _DtDtsMMGetField(DtDtsMMRecord *rec, const char *name)
 {
-       register int i;
+       int i;
        int             fld;
        DtDtsMMField    *fld_ptr;
        DtDtsMMField    *fld_ptr_list;
@@ -460,7 +460,7 @@ _DtDtsMMGetRecordByName(DtDtsMMDatabase *db, const char *name)
        DtDtsMMRecord   srch;
        DtDtsMMRecord   *result;
        DtDtsMMRecord   *s = &srch;
-       register int i;
+       int i;
        DtShmBoson      name_quark = _DtDtsMMStringToBoson(name);
        DtDtsMMRecord   *rec_ptr;
        DtDtsMMRecord   *rec_ptr_list;
@@ -717,7 +717,7 @@ _DtDtsMMIsMemory(const char *value)
 }
 
 int
-_DtDtsMMUnLoad()
+_DtDtsMMUnLoad(void)
 {
        int     error = 0;
 
index b7dd2737a043a523df70d308df8dc51677274093..bc1de38a3cbdce096b4c6c1df7cd0427dc3ec785 100644 (file)
@@ -73,9 +73,9 @@ typedef struct builder {
 const int *
 _DtShmFindIntTabEntry(DtShmInttab inttab, unsigned int key)
 {
-  register const inttab_t * ptr = (const inttab_t *) inttab;
+  const inttab_t * ptr = (const inttab_t *) inttab;
   
-  register int i;
+  int i;
   
   if ( !ptr->key)
        return(0);
index 34969776a5408db3f6fc924b761228f4935bfb18..dda9589ecfc684e3b2309fd470b532ecd9f1f851 100644 (file)
@@ -89,9 +89,9 @@ const char *    _DtShmBosonToString(DtShmStrtab strtab, int boson)
 
 DtShmBoson _DtShmStringToBoson(DtShmStrtab strtab, const char * string)
 {
-  register unsigned int i,j;
-  register unsigned const char * s;
-  register strtab_entry_t * ptr = (strtab_entry_t *) ((unsigned char *) strtab  + 
+  unsigned int i,j;
+  unsigned const char * s;
+  strtab_entry_t * ptr = (strtab_entry_t *) ((unsigned char *) strtab  +
                                                      ((strtab_t *) strtab) -> st_taboffset);
  
   /*
@@ -260,10 +260,10 @@ _DtShmProtoCopyStrtab(DtShmProtoStrtab in, void * destination)
 
 static void build_it(int a, struct strtab_build * ptr, unsigned char * key)
 {
-  register unsigned int i,j;
-  register unsigned char * s;
-  register strtab_entry_t * e;
-  register unsigned short * add_ptr;
+  unsigned int i,j;
+  unsigned char * s;
+  strtab_entry_t * e;
+  unsigned short * add_ptr;
 
   strcpy((char *) ptr->strstart + a, (const char *)key);
 
index aa132fdacdcc9ba9c609e1cf532d517a0dca2653..4b7ebb8edb7a1179ecff6a4a4ddd6c9985bca5c3 100644 (file)
@@ -312,7 +312,7 @@ _DtPerfChkpntMsgSend(char *message)
  * myDtPerfChkpntEnd --- End the checkpointing message delivery
  */
 int
-_DtPerfChkpntEnd() 
+_DtPerfChkpntEnd(void
 {
     myDtChkpntMsgSend("End checkpoint delivery", DT_PERF_CHKPNT_MSG_END);
     return(1);
index dce59977947059cf332550c8b652d471dc54e710..a034119d4348949823720eda3b893c22665d2859 100644 (file)
 #include <string.h>
 #include <sys/param.h>
 
-#ifdef __apollo
-#include "/sys5/usr/include/unistd.h"
-#else
 #include <unistd.h>
-#endif
 #include <limits.h>
 #include <sys/stat.h>
 
index 13404acc361eaba5ea77ac20995579f091f89f2e..b01669bed901f222e369ea29ae89e19339233ade 100644 (file)
@@ -1429,7 +1429,7 @@ void _DtEnvMapForRemote (char *targetHost)
  * restores the original envirnment settings for a number of
  * environment variables.
  */
-void _DtEnvRestoreLocal ()
+void _DtEnvRestoreLocal (void)
 {
     extern char   *mostRecentRemoteHostG;
     cacheForTargetHost  *targetCache;
index 09b526568bf31fe01598b5664e0e041967eb842c..62163b35e91ba0a593db8119236f39e3e25e0b69 100644 (file)
@@ -160,7 +160,7 @@ static char SCCSID[] = "OSF/Motif: @(#)_DtosP.h     4.16 91/09/12";
 /*
  * warning: mips alloca is unsuitable, do not use.
  */
-#  if defined(vax) || defined(sun) || defined(apollo) || defined(stellar)
+#  if defined(vax) || defined(sun) || defined(stellar)
 /*
  * Some System V boxes extract alloca.o from /lib/libPW.a; if you
  * decide that you don't want to use alloca, you might want to fix it here.
index 13ca8c1e41025242664d0c30665d7dfc6753d1c1..7d5d0038c7b5a47fca7814ee3c6532a891993fef 100644 (file)
@@ -207,7 +207,7 @@ makeDefaultIconPath(
  * Construct a default value for XMICONSEARCHPATH into outbuf.
  */
 static char *
-makeDefaultIconPmPath()
+makeDefaultIconPmPath(void)
 {
     static char *defaultIconPmPath = NULL;
 
@@ -223,7 +223,7 @@ makeDefaultIconPmPath()
  * Construct a default value for XMICONBMSEARCHPATH into outbuf.
  */
 static char *
-makeDefaultIconBmPath()
+makeDefaultIconBmPath(void)
 {
     static char *defaultIconBmPath = NULL;
 
@@ -254,7 +254,7 @@ makeDefaultIconBmPath()
  * 
  *****************************<->***********************************/
 void
-_DtEnvSessionManager()
+_DtEnvSessionManager(void)
 {
 #define SESSION_MANAGER        "SESSION_MANAGER"
     char *session_manager = getenv(SESSION_MANAGER);
@@ -825,7 +825,7 @@ static void _EnvAdd
       setenv(envVar, envVarSetting + strlen(envVar) + 1, 1);
 #else
 
-      register int i;
+      int i;
       size_t envVarLen = strlen(envVar);
       char *envPtr = NULL;
 
index deff6a936ff4e4c478d19a29e99ef1b5e296195b..cc2b78c04b47da097a89e741b44759ac130d7b41 100644 (file)
@@ -57,15 +57,15 @@ SOFTWARE.
 /********    Static Function Declarations    ********/
 
 static unsigned int GetTableIndex( 
-                        register DtHashTable tab,
-                        register DtHashKey key,
+                        DtHashTable tab,
+                        DtHashKey key,
 #if NeedWidePrototypes
-                        register int new) ;
+                        int new) ;
 #else
-                        register Boolean new) ;
+                        Boolean new) ;
 #endif /* NeedWidePrototypes */
 static void ExpandHashTable( 
-                        register DtHashTable tab) ;
+                        DtHashTable tab) ;
 
 /********    End Static Function Declarations    ********/
 
@@ -101,19 +101,19 @@ static DtHashEntryRec DtHashfake; /* placeholder for deletions */
 
 static unsigned int 
 GetTableIndex(
-             register DtHashTable tab,
-             register DtHashKey key,
+             DtHashTable tab,
+             DtHashKey key,
 #if NeedWidePrototypes
-             register int new)
+             int new)
 #else
-              register Boolean new)
+              Boolean new)
 #endif /* NeedWidePrototypes */
 {
-    register DtHashEntry       *entries = tab->entries;
-    register int               len, idx, i, rehash = 0;
-    register char              c;
-    register Signature                 sig = 0;
-    register DtHashEntry       entry;
+    DtHashEntry        *entries = tab->entries;
+    int                len, idx, i, rehash = 0;
+    char               c;
+    Signature          sig = 0;
+    DtHashEntry        entry;
     String                     s1, s2;
     DtHashKey                  compKey;
 
@@ -168,9 +168,9 @@ nomatch:
 
 void 
 _DtRegisterHashEntry(
-        register DtHashTable tab,
-        register DtHashKey key,
-        register DtHashEntry entry )
+        DtHashTable tab,
+        DtHashKey key,
+        DtHashEntry entry )
 {
     unsigned int idx;
 
@@ -186,11 +186,11 @@ _DtRegisterHashEntry(
 
 void 
 _DtUnregisterHashEntry(
-        register DtHashTable tab,
-        register DtHashEntry entry )
+        DtHashTable tab,
+        DtHashEntry entry )
 {
-    register int               idx, rehash;
-    register DtHashEntry       *entries = tab->entries;
+    int                idx, rehash;
+    DtHashEntry        *entries = tab->entries;
     DtHashKey                  key = KEY(tab, entry);
 
     idx = GetTableIndex(tab, key, False);
@@ -203,13 +203,13 @@ _DtUnregisterHashEntry(
 
 static void 
 ExpandHashTable(
-        register DtHashTable tab )
+        DtHashTable tab )
 {
     unsigned int oldmask;
-    register DtHashEntry *oldentries, *entries;
-    register int oldidx, newidx, rehash, len;
-    register DtHashEntry entry;
-    register DtHashKey key;
+    DtHashEntry *oldentries, *entries;
+    int oldidx, newidx, rehash, len;
+    DtHashEntry entry;
+    DtHashKey key;
 
     oldmask = tab->mask;
     oldentries = tab->entries;
@@ -232,11 +232,11 @@ ExpandHashTable(
 
 DtHashEntry 
 _DtEnumerateHashTable(
-        register DtHashTable tab,
-       register DtHashEnumerateFunc enumFunc,
-        register XtPointer clientData )
+        DtHashTable tab,
+       DtHashEnumerateFunc enumFunc,
+        XtPointer clientData )
 {
-    register unsigned int i;
+    unsigned int i;
 
     for (i = 0; i <= tab->mask; i++)
       if (tab->entries[i] && 
@@ -249,11 +249,11 @@ _DtEnumerateHashTable(
 
 DtHashEntry 
 _DtKeyToHashEntry(
-        register DtHashTable tab,
-        register DtHashKey key )
+        DtHashTable tab,
+        DtHashKey key )
 {
-    register int idx, rehash, len;
-    register DtHashEntry entry, *entries = tab->entries;
+    int idx, rehash, len;
+    DtHashEntry entry, *entries = tab->entries;
 
     if (!key) return NULL;
     idx = GetTableIndex(tab, key, False);
@@ -269,7 +269,7 @@ _DtAllocHashTable(DtHashEntryType   *hashEntryTypes,
                    Boolean             keyIsString)
 #endif /* NeedWidePrototypes */
 {
-    register DtHashTable tab;
+    DtHashTable tab;
 
     tab = (DtHashTable) XtMalloc(sizeof(struct _DtHashTableRec));
     tab->types = hashEntryTypes;
index bd32755dd34d67d714985b81f18cb296e96e7594..0c4b60680396442e62549a29d8e2d64a03b999a8 100644 (file)
@@ -142,19 +142,19 @@ typedef struct _DtHashTableRec *DtHashTable;
 /********    Private Function Declarations for Hash.c    ********/
 
 extern void _DtRegisterHashEntry( 
-                        register DtHashTable tab,
-                        register DtHashKey key,
-                        register DtHashEntry entry) ;
+                        DtHashTable tab,
+                        DtHashKey key,
+                        DtHashEntry entry) ;
 extern void _DtUnregisterHashEntry( 
-                        register DtHashTable tab,
-                        register DtHashEntry entry) ;
+                        DtHashTable tab,
+                        DtHashEntry entry) ;
 extern DtHashEntry _DtEnumerateHashTable( 
-                        register DtHashTable tab,
-                        register DtHashEnumerateFunc enumFunc,
-                        register XtPointer clientData) ;
+                        DtHashTable tab,
+                        DtHashEnumerateFunc enumFunc,
+                        XtPointer clientData) ;
 extern DtHashEntry _DtKeyToHashEntry( 
-                        register DtHashTable tab,
-                        register DtHashKey key) ;
+                        DtHashTable tab,
+                        DtHashKey key) ;
 extern DtHashTable _DtAllocHashTable( 
                         DtHashEntryType *hashEntryTypes,
                         Cardinal numHashEntryTypes,
index ada065f370658ab111c0c18b1c4aab00a857c32d..d3b169e812e08ccb898c7d8f0c802fc6d86c9415 100644 (file)
@@ -143,7 +143,7 @@ DtInfoShowTopic (
 
 
 static DtInfoShowStatus
-ConnectToMessageServer ()
+ConnectToMessageServer (void)
 {
        char                    * procid;
        Tt_status               status;
index 8c3d71142776ac8deb0d1bb1b90a611b7bac2542..d7dcd5633a027b1889164a7ddc5921b9cf096100 100644 (file)
@@ -81,7 +81,7 @@ _DtPrintDefaultErrorSafe(
     char number[32];
     char *mtype = "XlibMessage";
     int nbytes = bytes-1;
-    register _XExtension *ext = (_XExtension *)NULL;
+    _XExtension *ext = (_XExtension *)NULL;
 
     memset(msg, 0, bytes);
 
index eab95f6513c1f7be18c479b43b83ea734eef6514..7b9161328e4c663aa190249f23fd5069da583529 100644 (file)
@@ -111,26 +111,26 @@ typedef struct _Entries {
 static Buffer * _DtAllocBuffer(const char **buff);
 static void _DtFreeBuffer(Buffer *b);
 static void _DtAppendToBuffer( 
-                        register Buffer *b,
+                        Buffer *b,
                         char *str,
-                        register int len) ;
+                        int len) ;
 static void _DtAppendEntryToBuffer( 
-                        register Buffer *buffer,
+                        Buffer *buffer,
                         Entry entry) ;
 
 static Entries * _DtAllocEntries( void) ;
 static  void _DtFreeEntries( Entries *) ;
 static void _DtAddEntry( 
-                        register Entries *e,
+                        Entries *e,
                         Entry entry) ;
 static int _DtCompareEntries( 
                         Entry *e1,
                         Entry *e2) ;
 static char * _DtFindFirst( 
-                        register char *string,
-                        register char dest) ;
+                        char *string,
+                        char dest) ;
 static void _DtGetEntries( 
-                        register Entries *entries,
+                        Entries *entries,
                         Buffer *buff,
                         int dosort) ;
 static void _DtMergeEntries( 
@@ -176,9 +176,9 @@ _DtFreeBuffer(
 
 static void 
 _DtAppendToBuffer(
-        register Buffer *b,
+        Buffer *b,
         char *str,
-        register int len )
+        int len )
 {
     while (b->used + len > b->room) {
         b->buff = (char *)realloc(b->buff, 2*b->room*(sizeof(char)));
@@ -216,10 +216,10 @@ _DtFreeEntries(
 
 static void 
 _DtAddEntry(
-        register Entries *e,
+        Entries *e,
         Entry entry )
 {
-    register int n;
+    int n;
 
     for (n = 0; n < e->used; n++)
     {
@@ -250,7 +250,7 @@ _DtCompareEntries(
 
 static void 
 _DtAppendEntryToBuffer(
-        register Buffer *buffer,
+        Buffer *buffer,
         Entry entry )
 {
     _DtAppendToBuffer(buffer, entry.tag, strlen(entry.tag));
@@ -261,8 +261,8 @@ _DtAppendEntryToBuffer(
 
 static char * 
 _DtFindFirst(
-        register char *string,
-        register char dest )
+        char *string,
+        char dest )
 {
     int len;
 
@@ -285,13 +285,13 @@ _DtFindFirst(
 
 static void 
 _DtGetEntries(
-        register Entries *entries,
+        Entries *entries,
         Buffer *buff,
         int dosort )
 {
-    register char *line, *colon, *temp, *str, *temp2;
+    char *line, *colon, *temp, *str, *temp2;
     Entry entry;
-    register int length;
+    int length;
     int lineno = 0;
 
     str = buff->buff;
index a9587002ed491da14d4fd86f8ef52b129eeb290d..8f26b028ef4d2e5b8170feb8cf9e57a6cfea60fa 100644 (file)
@@ -46,7 +46,6 @@
 
  __hpux                - Will be set for HP-UX systems
  __sun                 - Will be set for SUN systems
- __apollo              - Will be set for APOLLO (domain) systems
  __aix                  - Will be set for IBM (AIX) systems
 
   __sysv               - Set when using SYSV semantics (e.g. HP, SUN)
  __sparc               - Set for SUN sparc machines
  __sun68k              - Set for SUN m68k machines
 
-
- __apollo88k           - Set for apollo (domain) risc (PRISM) machines
- __apollo68k           - Set for apollo (domain) m68k machines
- __apollo_null         - Set to allow null pointer dereferences on domain
-
- __apollo_paths                - Set to have "//<host>" converted to "host:" 
-
  __identification_strings - Set when RCS header strings are to be in code
  __recursive_includes  - Set to have .h files #includes prerequisite files
  __char_ptr_yytext      - Set if the lex/yacc variable yytext is defined
 #   define __sun
 #endif
 
-#if defined(apollo) && !defined(__apollo)
-#   define __apollo
-#endif
-
 #if defined(hpux) && !defined(__hpux)
 #   define __hpux
 #endif
 #   define __c_callable         /* Set so VUE can link with libbms. */
 #endif
 
-#ifdef __apollo
-#   ifndef __bsd
-#       define __sysv  /* NOTE: not bsd!!! */
-#   endif
-#   ifndef __apollo_paths
-#       define __apollo_paths
-#   endif
-#   ifndef __apollo_null
-#       define __apollo_null
-#   endif
-#   if defined(a88k) && !defined(__apollo88k)
-#      define __apollo88k
-#   endif
-#   if defined(_ISP__A88K) && !defined(__apollo88k)
-#      define __apollo88k
-#   endif
-#   if defined(m68k) && !defined(__apollo68k)
-#      define __apollo68k
-#   endif
-#   if defined(_ISP__M68K) && !defined(__apollo68k)
-#      define __apollo68k
-#   endif
-#   define __hp_color_object
-#   define __unsigned_char_ptr_yytext
-#endif
-
 #ifdef __aix
 #       define __sysv
 #endif
 #   define  KEEP_DEADWOOD FALSE                /* all sorts of unknown problems.    */
 #endif
 
-#ifndef __apollo_paths
-#   define __apollo_paths              /* We always want this feature */
-#endif
-
-
 #ifdef __cplusplus
 
 #define UNUSED_PARM(_parm)
 /* ----------------------------------------------------------------- */
 
 #if defined(__need_timeval)            /* Get "struct timeval" */
-#   ifdef __sun
-#      include <sys/time.h>
-#   endif
-#   ifdef __apollo
-#      include <sys/time.h>
-#   endif
-#   ifdef __aix
+#   if defined(__sun) || defined(__aix)
 #      include <sys/time.h>
 #   endif
 #endif /* __need_timeval */
 
 
 #if defined(__need_fd_set)             /* Get "typedef struct fd_set" */
-#   ifdef __apollo
-#       define _INCLUDE_BSD_SOURCE
-#       include "/bsd4.3/usr/include/sys/types.h"
-#   endif
 #   ifdef _AIX
 #       include <sys/select.h>
 #   endif
 #endif /* __need_fd_st */
 
-
-#if defined(__need_S_IF)               /* Get S_IFNWK, S_IFLNK */
-#   ifdef __apollo
-#      define _APOLLO_SOURCE
-#   endif
-#endif /* __need_S_IF */
-
-#if defined(__need_all_errors)
-#   ifdef __apollo
-#      define _APOLLO_SOURCE
-#      undef _SYS_STDSYMS_INCLUDED /* So we can include <sys/stdsyms.h> again */
-#   endif
-#endif
-
-#if defined(__need_all_signals)                /* Get all SIGxxx values */
-#   ifdef __apollo
-#      define _APOLLO_SOURCE
-#      include "/bsd4.3/usr/include/sys/types.h"
-#   endif
-#endif /* __need_all_signal */
-
 /* We also use the following non XPG3 types.  However, they may be   */
 /* defined when we relax the XPG3 compliance to get the stuff talked */
 /* about above.  So, declare them only if we don't already have them */
index 10c15be2923ed6092468e7913ca34082ca340c6d..17dc5209307ecbe0cb1a7c57794aeab9093f591a 100644 (file)
@@ -58,8 +58,8 @@
 /* Routines not defined in include files (yet).                                */
 /************************************************************************/
 
-/* Domain/OS BSD has bzero(), bcmp(), and bcopy() defined. */
-#if !(defined(apollo) && defined(__bsd)) && !defined(CSRG_BASED)
+/* BSD has bzero(), bcmp(), and bcopy() defined. */
+#if !defined(__bsd) && !defined(CSRG_BASED)
 
 #if defined(__STDC__)
 #if !defined(__linux__) && !defined(_XFUNCS_H_) && !defined(sun)
index 3c6859534275d28dc3366c3fe0002e560dd7847c..52f77bdd136d61c8359615bee6d1c5e25d7a941f 100644 (file)
 
 #include <stddef.h>
 
-#ifdef apollo
-#define _NEED_WCHAR_T
-#include <sys/stdtypes.h>
-#endif
-
 #ifdef __cplusplus
 extern "C"
 {
index ad88b9c05fe9a1eb2db316253dcc5f023056148e..b692dda572e64893cc88a58c326d3d582b548526 100644 (file)
 #ifndef __PRIVBUF_H_
 #define __PRIVBUF_H_
 
-#ifdef DOMAIN_ALLOW_MALLOC_OVERRIDE
-#include "/usr/include/apollo/shlib.h"
-#endif
-#ifdef apollo
-#include <stdlib.h>
-#endif
-
 typedef void (*privbuf_func)(void *v);
 
 #ifdef __PRIVATE_
index e243ddddadd59bdf8b0302ffcccddb09c7be52e3..78a8ddc2b9d9602f0062d8016648fb6233679134 100644 (file)
 #ifndef __STRINGX_H_
 #define __STRINGX_H_
 
-#ifdef DOMAIN_ALLOW_MALLOC_OVERRIDE
-#include "/usr/include/apollo/shlib.h"
-#endif
-#ifdef apollo
-#include <stdlib.h>
-#endif
-
 #include <stddef.h>
 #include <string.h>
 #include <codelibs/boolean.h>
@@ -119,11 +112,11 @@ extern size_t     nl_strlen();            /* __OBSOLETE */
 #if defined(__cplusplus)
 }
 
-#if defined(apollo) || defined(__aix) || defined(__linux__) || defined(CSRG_BASED)
+#if defined(__aix) || defined(__linux__) || defined(CSRG_BASED)
 #include <stdlib.h>
 #else
 #include <malloc.h>
-#endif /* apollo */
+#endif /* aix linux CSRG_BASED */
 
 inline char *strnew(size_t len) { return (char*)malloc(len + 1); }
 #if defined(sun) || defined(__sun)
index 16e0b1729d036b8bfaf44cf9d2c9595c76fc3ee0..b1398709155451d1c0c79b486bea27435bb676d9 100644 (file)
@@ -3716,7 +3716,7 @@ ManagerConstraintInitializePatch(Widget request, Widget new_w, ArgList args,
 }
 
 void
-DtTermInitialize()
+DtTermInitialize(void)
 {
     XmManagerClassRec *mw = (XmManagerClassRec *) xmManagerWidgetClass;
     CoreClassRec *core = (CoreClassRec *) coreWidgetClass;
index 5a00d59d2db44963f0977d456c8acc3905959f80..fbe2f3dc2bd3415f74b51c4a308f6e899bbcc2d7 100644 (file)
@@ -320,7 +320,7 @@ _DtTermPrimReleasePty(char *ptySlave)
 }
 
 void
-_DtTermPrimPtyCleanup()
+_DtTermPrimPtyCleanup(void)
 {
     /* dummy function for STREAMS... */
     return;
index 0e0fcc9a76e4111a517d2f361bb4139f247ed01d..667e2df5f7c3a5c84a8785b57a82dd35b7362ed2 100644 (file)
@@ -59,7 +59,7 @@ static char rcs_id[] = "$TOG: TermPrimParser.c /main/2 1999/10/15 12:23:41 mgree
 #pragma        BBA_IGNORE
 #endif /*BBA*/
 static void
-ParseTrap()
+ParseTrap(void)
 {
     static int count = 0;
 
index e59e382135f826391901795964c3aa600fa48544..02448bdd1ea48d24564161c6ee9c3f08e0655f61 100644 (file)
@@ -340,8 +340,7 @@ void _DtTermPrimPtySendBreak(int pty, int msec)
 #elif  defined(USE_TCSENDBREAK)
     (void) tcsendbreak(pty, 0);
 #else  /* none specified... */
-    There is no RS232 break code specified for this architecture.  See
-    TermPrimOSDepI.h for a list of #defines...
+    #error "There is no RS232 break code specified for this architecture.  See TermPrimOSDepI.h for a list of #defines..."
 #endif /* rs232 break definition... */
 }
 
@@ -368,7 +367,7 @@ static eucioc_t refWp;
 #endif   /* (USE_CSWIDTH) */
 
 void
-_DtTermPrimPtyGetDefaultModes()
+_DtTermPrimPtyGetDefaultModes(void)
 {
     int tty = -1;
     int refTty = -1;
index b37d7e8a7780f3503a71269f1f19e7b179ef9298..96ec48117e229d709e69e2798db22fd15d89e5b1 100644 (file)
@@ -562,7 +562,7 @@ _DtTermPrimUtmpEntryDestroy(Widget w, char *utmpLine)
 }
 
 void
-_DtTermPrimUtmpCleanup()
+_DtTermPrimUtmpCleanup(void)
 {
     DebugF('s', 10, fprintf(stderr, ">>_DtTermPrimUtmpCleanup() starting\n"));
     _DtTermProcessLock();
index 4ab578129f56c21503766018ca8b7da0957ea622..66bdc12edd43cd1b90a355eee6f29e9479c74f7c 100644 (file)
@@ -559,7 +559,7 @@ static gid_t gid_user;
 static gid_t gid_root;
 
 static void
-suidInit()
+suidInit(void)
 {
     _DtTermProcessLock();
     if (first) {
@@ -575,7 +575,7 @@ suidInit()
 }
 
 void
-_DtTermPrimRemoveSuidRoot()
+_DtTermPrimRemoveSuidRoot(void)
 {
     (void) suidInit();
 #if    defined(HAS_SETRESUID)
index d1b2208b8a6395b4714b1c9b3148103db172a9e8..5f8766f148039bf9bd02083b5ff44ae6d35f3822 100644 (file)
@@ -65,9 +65,7 @@ static void HelpTerminalOptionsCallback(Widget w, XtPointer client_data,
 
 
 _DtTermViewLineupList *
-_DtTermViewLineupListCreate
-(
-)
+_DtTermViewLineupListCreate(void)
 {
     _DtTermViewLineupList *list;
 
index 8a42c7e45dcc2a65e2de490ac3275bae27d704b3..7c8803b1ce682a3fbcfd7e271df8b7b06b4a5078 100644 (file)
@@ -57,15 +57,13 @@ static void order(char *p1, char *p2, signed char *offset1, signed char *offset2
 static char *vis(char val);
 
 int
-main(argc, argv)
-int argc;
-char **argv;
+main(int argc, char **argv)
 {
     char buffer[BUFSIZ];
     char *bufPtr;
     char orig[BUFSIZ];
-    register int i;
-    register char *c;
+    int i;
+    char *c;
     FILE *f;
     extern char *optarg;
     char *prefix = "_Term";
@@ -303,7 +301,7 @@ char **argv;
 int
 ParseChar(char **str)
 {
-    register char *c = *str;
+    char *c = *str;
     char *ptr;
     int ret = 0;
 
@@ -389,7 +387,7 @@ ParseChar(char **str)
 int
 parseCoord(char **str, char *val, signed char *offset)
 {
-    register char *c = *str;
+    char *c = *str;
     char *ptr;
     int sign = 1;
 
@@ -444,7 +442,7 @@ parseCoord(char **str, char *val, signed char *offset)
 char *
 parseToken(char **str)
 {
-    register char *c = *str;
+    char *c = *str;
     char *ret;
 
     /* skip white space... */
@@ -471,7 +469,7 @@ parseToken(char **str)
 void
 displayErrorString(FILE *f, char *orig, char *remain)
 {
-    register int col;
+    int col;
 
     (void) fprintf(f, "        %s\n", orig);
     if (!remain || !*remain) {
index 2c74b973fcd7e4a72769683105d99885034c76f9..82ad592eeb1926b4e812c4e6cd6a8e25934c5701 100644 (file)
 */
 
 #include <stdio.h>
-#ifdef __apollo
-#include <sys/types.h>           /* needed for sys/stat.h on bsd4.3 */
-#else
 #include <stdlib.h>
-#endif
 #include <sys/stat.h>
 #define X_INCLUDE_STRING_H
 #define X_INCLUDE_TIME_H
index f5e67f01e1e200e055eb883b8eb525cf9d0f993b..476341bf41c6c16863d15e5d2fe7dd7abee3a89d 100644 (file)
@@ -507,7 +507,7 @@ InsertChild(
        XmManagerWidgetClass    mc = (XmManagerWidgetClass)xmManagerWidgetClass;
        Dimension               s_t = M_ShadowThickness (w);
        Arg             al[20];         /*  arg list            */
-       register int    ac;             /*  arg count           */
+       int     ac;             /*  arg count           */
        XtWidgetProc    insert_child;
 
        _DtProcessLock();
@@ -628,7 +628,7 @@ GetSize(
        Widget                  work_area =     M_WorkArea (mgr),
                                separator =     M_Separator (mgr);
        Widget *                button =        M_Button (mgr);
-       register int            button_count =  M_ButtonCount (mgr),
+       int             button_count =  M_ButtonCount (mgr),
                                i;                    
        Boolean                 min_btns =      M_MinimizeButtons (mgr);
        Dimension               sep_h = 0,
@@ -717,7 +717,7 @@ CreateChildren(
        char            button_name[100];
 
        Arg             al[20];         /*  arg list            */
-       register int    ac;             /*  arg count           */
+       int     ac;             /*  arg count           */
 
 /*     Compute position factors.
 */
index f2b5ae468cd56647f2231e80e7e467eb7e2fdd63..758bc3d0b79f14f6ce285138a4b9ca5afaf868f0 100644 (file)
@@ -84,9 +84,9 @@ static DtEditorErrorCode LoadFile(
  */
 static int
 strcasecmp(s1, s2)
-    register char *s1, *s2;
+    char *s1, *s2;
 {
-    register int c1, c2;
+    int c1, c2;
 
     while (*s1 && *s2) {
        c1 = isupper(*s1) ? tolower(*s1) : *s1;
@@ -1386,7 +1386,7 @@ CopySubstring(
         char *buf,
         Boolean addNewlines)
 {
-    register XmTextLineTable line_table = widget->text.line_table;
+    XmTextLineTable line_table = widget->text.line_table;
     int currLine, firstLine;
     char *pString, *pCurrChar, *pLastChar;
     int numToCopy;
index 8020107c4171e7d3a98327c83158cd735dc00ebe..36356072168b9605ec482140c0400d3ccfa85b57 100644 (file)
@@ -389,7 +389,7 @@ _DtEditorModifyVerifyCB(
         caddr_t client_data,
         caddr_t call_data )
 {
-  register XmTextVerifyCallbackStruct * cb = 
+  XmTextVerifyCallbackStruct * cb =
                                (XmTextVerifyCallbackStruct *) call_data;
   DtEditorWidget editor = (DtEditorWidget) client_data;
 
index 983d61e7000f3af140dbddc6593bf20cb18cd306..7bd42a993e29720cc21b7d316a9ce910b4c28393 100644 (file)
@@ -1607,7 +1607,7 @@ static Widget
 CreateText(
         DtEditorWidget parent)
 {
-    register            int ac;         /* arg count */
+               int ac;         /* arg count */
     Arg                al[21];         /* arg list */
     Widget             text;
 
@@ -2102,7 +2102,7 @@ SetValues(
 {
   Boolean         redisplay_flag = False;
   Arg          al[15];         /*  arg list            */
-  register int    ac;          /*  arg count           */
+  int    ac;           /*  arg count           */
 
   Boolean      resetSpellTitle = False,
                resetFormatTitle = False,
@@ -3726,8 +3726,8 @@ static unsigned int
 GetModeSwitchModifier(
                 Display *dpy)
 {
-    register XModifierKeymap *pMap;
-    register int mapIndex, keyCol, mapSize;
+    XModifierKeymap *pMap;
+    int mapIndex, keyCol, mapSize;
     KeySym keySym;
     unsigned int modeSwitchModMask = 0;
     pMap = XGetModifierMapping(dpy);
@@ -4549,7 +4549,7 @@ UpdateOverstrikeIndicator(
        Boolean         overstrikeOn )
 {
     Arg           al[10];
-    register      int ac;
+    int ac;
     DtEditorWidget ew = (DtEditorWidget) widget;
  
     /*
@@ -4639,7 +4639,7 @@ SetStatusLine(
        Boolean statusLineOn)
 {
    Arg                 al[10];
-   register int        ac;
+   int ac;
    int currentLine;
    XmTextPosition cursorPos;
 
@@ -5188,16 +5188,16 @@ extern int _nl_space_alt;
 /*
  * Forward declarations
  */
-static int DoLine (FormatData *data, register FILE *filep);
+static int DoLine (FormatData *data, FILE *filep);
 static void Center (FormatData *data, 
-                   wint_t *in_line, register wint_t *inlinelim);
-static void Fill (FormatData *data, wint_t *in_line, register wint_t *inlinelim);
+                   wint_t *in_line, wint_t *inlinelim);
+static void Fill (FormatData *data, wint_t *in_line, wint_t *inlinelim);
 static void FillWord (FormatData *data);
 static void Dump (FormatData *data, int endpara);
 static void PrintIndent (FormatData *data, int indent);
 static void PrintTag (FormatData *data, WORD *wordpast);
 static void PrintWords (FormatData *data, WORD *wordpast);
-static void Justify (FormatData *data, register int blanks, WORD *wordpast);
+static void Justify (FormatData *data, int blanks, WORD *wordpast);
 static int CompareWords (const void *, const void *);
 static int EkinBekinProc(FormatData *data, WORD **wordpast);
 static void postEkinBekinProc(FormatData *data, int *poutchars, WORD *wordpast);
@@ -5353,8 +5353,8 @@ fixLeftMarginAndNewlines(
        int endPos)
 {
     Widget widget = M_text(editor);
-    register XmTextLineTable lineTable;
-    register int i;
+    XmTextLineTable lineTable;
+    int i;
     int lineIndex, lineLen, nextLen, lineIndent, lastIndex,
         lineByteLen, total_lines;
     Boolean newPara = True;
@@ -5541,7 +5541,7 @@ FormatText (
 
 { 
   long         maxmargin;      /* max allowed */ 
-  register FILE        *filep;         /* file to read */ 
+  FILE *filep;         /* file to read */
   int          retVal;
   FormatData   data;
 
@@ -5648,12 +5648,12 @@ CleanUp:
 
 static int 
 DoLine (FormatData     *data,
-       register FILE   *filep)                 /* open file to read    */
+       FILE    *filep)                 /* open file to read    */
 {
        wint_t  in_line [LINESIZE];             /* after reading in     */
-       register wint_t *incp    = in_line;     /* place in in_line     */
-       register wint_t *incplim = in_line + LINESIZE;  /* limit of in_line */
-       register wint_t   c;
+       wint_t  *incp    = in_line;     /* place in in_line     */
+       wint_t  *incplim = in_line + LINESIZE;  /* limit of in_line */
+       wint_t   c;
 
 /*
  * READ LINE WITH BACKSPACE CRUNCHING:
@@ -5713,17 +5713,17 @@ DoLine (FormatData      *data,
 static void
 Center (FormatData *data, 
        wint_t  *in_line,                       /* start of input line  */
-       register wint_t *inlinelim)             /* end of line + 1      */
+       wint_t  *inlinelim)             /* end of line + 1      */
 {
-       register wint_t *incp;          /* pointer in in_line   */
+       wint_t  *incp;          /* pointer in in_line   */
        wint_t  outline [LINESIZE + MAXTABSIZE];  /* after generic work */
-       register wint_t *outcp      = outline;    /* place in outline   */
-       register wint_t *outlinelim = outline + LINESIZE; /* limit of outline*/
+       wint_t  *outcp      = outline;    /* place in outline   */
+       wint_t  *outlinelim = outline + LINESIZE; /* limit of outline*/
 
        int     haveword  = False;      /* hit word in in_line? */
-       register wint_t ch;             /* current working char */
-       register int    needsp;         /* spaces need for tab  */
-       register int    indent = 0;     /* size of indentation  */
+       wint_t  ch;             /* current working char */
+       int     needsp;         /* spaces need for tab  */
+       int     indent = 0;     /* size of indentation  */
        int     textwidth;              /* size of text part    */
        int     extwidth = 0;           /* additional width for MBCS */
 
@@ -5875,12 +5875,12 @@ Center (FormatData *data,
 static void
 Fill (FormatData *data,
       wint_t   *in_line,               /* start of input line  */
-      register wint_t  *inlinelim)     /* end of line + 1      */
+      wint_t   *inlinelim)     /* end of line + 1      */
 {
-       register wint_t *incp;          /* place in in_line     */
-       register wint_t ch;             /* current working char */
+       wint_t  *incp;          /* place in in_line     */
+       wint_t  ch;             /* current working char */
        int     haveword = False;       /* hit word in in_line? */
-       register int    inword   = False;       /* currently in a word? */
+       int     inword   = False;       /* currently in a word? */
 /*
  * SCAN INPUT LINE:
  */
@@ -6017,7 +6017,7 @@ FillWord (FormatData *data)
 {
   int  wordlen;                /* length of word to fill */
   int  blanks = 1;             /* trailing blanks needed */
-  register wint_t      ch1, ch2, ch3;          /* last chars of word     */
+  wint_t       ch1, ch2, ch3;          /* last chars of word     */
 
   data->wordat->length = (data->incolumn - data->wordat->incolumn);
   wordlen = data->wordat->wclen;
@@ -6094,9 +6094,9 @@ Dump (FormatData *data,
   int  startpara;                      /* start of paragraph?  */
   int  normal;                         /* non-tagged line?     */
   WORD *wordpast = data->wordfirst;            /* past last to dump    */
-  register int wordlen;                /* length of one word   */
+  int  wordlen;                /* length of one word   */
   int  indent;                         /* local value          */
-  register int outneed;                /* chars need to dump   */
+  int  outneed;                /* chars need to dump   */
   int  outchars;                       /* chars found to dump  */
 
 /*
@@ -6274,10 +6274,10 @@ static void
 PrintTag (FormatData *data, 
          WORD  *wordpast)              /* past last to print */
 {
-   register WORD       *wordat = data->wordfirst;      /* local value    */
-   register int        outcol = data->indent1 + 1;     /* next column    */
+   WORD        *wordat = data->wordfirst;      /* local value    */
+   int outcol = data->indent1 + 1;     /* next column    */
    int wordcol;                /* desired column */
-   register wint_t     *wordcp;                /* place in word  */
+   wint_t      *wordcp;                /* place in word  */
    wint_t      *wordcplim;             /* limit of word  */
 
    while (True)                                /* till break */
@@ -6318,10 +6318,10 @@ static void
 PrintWords (FormatData *data,
            WORD       *wordpast)               /* past last to print */
 {
-   register WORD       *wordat = data->wordfirst;      /* local value   */
-   register wint_t     *wordcp;                /* place in word */
+   WORD        *wordat = data->wordfirst;      /* local value   */
+   wint_t      *wordcp;                /* place in word */
    wint_t      *wordcplim;             /* limit of word */
-   register int        blanks;                 /* after a word  */
+   int blanks;                 /* after a word  */
 
    while (True)                                /* till break */
    {
@@ -6363,13 +6363,13 @@ PrintWords (FormatData *data,
 
 static void
 Justify (FormatData *data, 
-        register int blanks,                   /* blanks to insert   */
+        int blanks,                    /* blanks to insert   */
         WORD   *wordpast)              /* past last to print */
 {
-   register WORD       *wordat;                /* local value          */
-   register int        sortat;                 /* place in sort[]      */
-   register int        wordlen;                /* size of this word    */
-   register int        nextlen;                /* size of next word    */
+   WORD        *wordat;                /* local value          */
+   int sortat;                 /* place in sort[]      */
+   int wordlen;                /* size of this word    */
+   int nextlen;                /* size of next word    */
    int level;                  /* current blanks level */
 
    WORD        *sort [WORDMAX];        /* sorted pointers */
@@ -7041,7 +7041,7 @@ ComputeRightMargin(
               margin_width;
     int        rightMargin;
     Arg al[5];             /* arg list */
-    register   int ac;    /* arg count */
+    int ac;    /* arg count */
 
     ac=0;
     XtSetArg(al[ac], XmNwidth, &text_width); ac++;
@@ -7177,7 +7177,7 @@ CreateFormatDialog(
        DtEditorWidget editor)
 {
     Arg                al[15];        /* arg list */
-    register   int ac;        /* arg count */
+    int ac;        /* arg count */
     Pixel      textBackground, textForeground;
     XmString   tempString = (XmString)NULL;
 
@@ -8072,7 +8072,7 @@ DtEditorGetSizeHints(
     XSizeHints *pHints) /* Return */
 {
     Arg al[10];                 /* arg list */
-    register int ac;            /* arg count */
+    int ac;            /* arg count */
     Dimension FormWidth, FormHeight, 
              Twidth, Theight, statusHeight,
              highlightThickness, shadowThickness,
index 6623ee79b0bbad500ece96528ba67f2d5691ea2a..8a234b5c8901425358d31fb07dd834d502bc3492 100644 (file)
@@ -47,9 +47,6 @@
 */
 
 #include <stdio.h>
-#ifdef __apollo
-#include <sys/types.h>
-#endif
 #include <sys/stat.h>
 #include <X11/Xatom.h>
 #include <Xm/XmP.h>
@@ -2671,8 +2668,8 @@ SetValues(
 static void 
 BorderHighlight( DtIconGadget g)
 {
-   register int width;
-   register int height;
+   int width;
+   int height;
    CallCallbackProc call_callback;
 
    width = g->rectangle.width;
@@ -2702,9 +2699,9 @@ static void
 BorderUnhighlight( DtIconGadget g)
 {
 
-   register int window_width;
-   register int window_height;
-   register int highlight_width;
+   int window_width;
+   int window_height;
+   int highlight_width;
    CallCallbackProc    call_callback;
 
    window_width = g->rectangle.width;
index 92b4e2d19a1ee95c84b96fb3b648d27d8b609480..4b608a2f3d596d9838bfffd1f89d28e4f7f0cfc5 100644 (file)
@@ -66,7 +66,7 @@ ManageFind(
         DtEditorWidget pPriv)
 {
     Arg al[10];
-    register int ac;
+    int ac;
 
     ac = 0;
     XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
@@ -83,7 +83,7 @@ UnmanageFind(
         DtEditorWidget pPriv)
 {
     Arg al[10];
-    register int ac;
+    int ac;
 
     XtUnmanageChild(M_search_findLbl(pPriv));
     XtUnmanageChild(M_findText(pPriv));
@@ -109,7 +109,7 @@ _DtEditorSearch(
         Boolean createonly )
 {
     Arg al[10];             /* arg list */
-    register int ac;        /* arg count */
+    int ac;        /* arg count */
 
     /* create the dialog if it is the first time */
     if ( !M_search_dialog(pPriv) ) 
@@ -274,7 +274,7 @@ CreateSearchDialog(
         DtEditorWidget pPriv)
 {
     Arg             al[10];         /* arg list */
-    register int ac;         /* arg count */
+    int ac;         /* arg count */
     Pixel    textBackground, textForeground;
     XmString tmpStr1;
 
index e60113a6777b612af7415b7e21a402c74c79cd73..2bf1e93451c65e7879839c2d54e7eb705a759ac1 100644 (file)
@@ -498,7 +498,7 @@ GetTitleString(
         XtArgVal *value )
 {
        Arg             al[10];         /*  arg list            */
-       register int    ac;             /*  arg count           */
+       int     ac;             /*  arg count           */
        Widget          title_area = M_TitleArea (manager);
        XmString        string = NULL;
 
@@ -558,7 +558,7 @@ Initialize(
         DtTitleBoxWidget new )
 {
        Arg             al[10];         /*  arg list            */
-       register int    ac;             /*  arg count           */
+       int     ac;             /*  arg count           */
        Widget          title = NULL;
        XmString        title_string = NULL;
 
@@ -823,7 +823,7 @@ SetValues(
                        new_title = False,
                        new_font = False;
        Arg             al[10];         /*  arg list            */
-       register int    ac;             /*  arg count           */
+       int     ac;             /*  arg count           */
 
 /*     Validate title position.
 */
index 888bdf39401c4daecabe46434cd29651e99ffae4..1f521aa5f0c104fe9869a1a21dcb3da8c56d81d3 100644 (file)
@@ -100,7 +100,7 @@ static void _FreeCallbackInfo(_CallbackInfo *ptr);
  * Register rpc service for server callback
  */
 extern void
-_DtCm_init_agent()
+_DtCm_init_agent(void)
 {
        int             s = RPC_ANYSOCK;
 
@@ -178,7 +178,7 @@ _DtCm_init_agent()
  * Unregister with the rpc service.
  */
 extern void
-_DtCm_destroy_agent()
+_DtCm_destroy_agent(void)
 {
        if (mapped == 0)
                return;
@@ -198,7 +198,7 @@ _DtCm_destroy_agent()
 }
 
 extern void
-_DtCm_process_updates()
+_DtCm_process_updates(void)
 {
 #if defined(CSRG_BASED) || defined(__linux__)
         int     i, nfd;
@@ -460,7 +460,7 @@ gettransient (int proto, u_long vers, int *sockp)
 #endif /* not SunOS */
 
 static void
-_DtCm_handle_callback()
+_DtCm_handle_callback(void)
 {
        _CallbackInfo           *ptr, *prev;
        boolean_t               keep = B_FALSE;
index 339a782dc8a080a74e21adfacded9c58fa042d01..5e4d93f569e9f1f14cac603c7abdfe514acbb4b9 100644 (file)
  */
 
 int
-strcasecmp(register const char *s1,
-          register const char *s2)
+strcasecmp(const char *s1,
+          const char *s2)
 {
-    register int c1, c2;
+    int c1, c2;
 
     while (*s1 && *s2) {
        c1 = isupper(*s1) ? tolower(*s1) : *s1;
@@ -59,11 +59,11 @@ strcasecmp(register const char *s1,
 
 
 int
-strncasecmp(register const char *s1,
-           register const char *s2,
-           register size_t count)
+strncasecmp(const char *s1,
+           const char *s2,
+           size_t count)
 {
-    register int c1, c2;
+    int c1, c2;
 
     if (!count)
       return 0;
index b5922bbd10af8bdb70e19480833e7abc79718774..cba01533c8c653ab15d41c423c771d62fdb776b4 100644 (file)
@@ -339,7 +339,7 @@ _DtCm_free_abbrev_appt4(Abb_Appt_4 *a)
 }
 
 Attribute_4 *
-_DtCm_make_attr4()
+_DtCm_make_attr4(void)
 {
        Attribute_4 *a;
        
index e9b27d625617261c90f24e26074795593e5eea7e..86dbf91e2e3c1b3356530be2a1950864468e6b9d 100644 (file)
@@ -42,7 +42,7 @@
  */
 
 bool_t
-xdr_cmcb_cal_attr_data(register XDR *xdrs, cmcb_cal_attr_data *objp)
+xdr_cmcb_cal_attr_data(XDR *xdrs, cmcb_cal_attr_data *objp)
 {
        if (!xdr_array(xdrs, (char **)&objp->names, (u_int *) &objp->num_names,
            ~0, sizeof (cms_name), (xdrproc_t) xdr_cms_name))
@@ -55,7 +55,7 @@ xdr_cmcb_cal_attr_data(register XDR *xdrs, cmcb_cal_attr_data *objp)
  */
 
 bool_t
-xdr_cmcb_add_entry_data(register XDR *xdrs, cmcb_add_entry_data *objp)
+xdr_cmcb_add_entry_data(XDR *xdrs, cmcb_add_entry_data *objp)
 {
        if (!xdr_string(xdrs, &objp->id, ~0))
                return (FALSE);
@@ -67,7 +67,7 @@ xdr_cmcb_add_entry_data(register XDR *xdrs, cmcb_add_entry_data *objp)
  */
 
 bool_t
-xdr_cmcb_delete_entry_data(register XDR *xdrs, cmcb_delete_entry_data *objp)
+xdr_cmcb_delete_entry_data(XDR *xdrs, cmcb_delete_entry_data *objp)
 {
        if (!xdr_string(xdrs, &objp->id, ~0))
                return (FALSE);
@@ -85,7 +85,7 @@ xdr_cmcb_delete_entry_data(register XDR *xdrs, cmcb_delete_entry_data *objp)
  */
 
 bool_t
-xdr_cmcb_update_entry_data(register XDR *xdrs, cmcb_update_entry_data *objp)
+xdr_cmcb_update_entry_data(XDR *xdrs, cmcb_update_entry_data *objp)
 {
        if (!xdr_string(xdrs, &objp->newid, ~0))
                return (FALSE);
@@ -99,7 +99,7 @@ xdr_cmcb_update_entry_data(register XDR *xdrs, cmcb_update_entry_data *objp)
 }
 
 bool_t
-xdr_cmcb_update_data(register XDR *xdrs, cmcb_update_data *objp)
+xdr_cmcb_update_data(XDR *xdrs, cmcb_update_data *objp)
 {
        if (!xdr_int(xdrs, &objp->reason))
                return (FALSE);
@@ -134,7 +134,7 @@ xdr_cmcb_update_data(register XDR *xdrs, cmcb_update_data *objp)
 }
 
 bool_t
-xdr_cmcb_update_callback_args(register XDR *xdrs, cmcb_update_callback_args *objp)
+xdr_cmcb_update_callback_args(XDR *xdrs, cmcb_update_callback_args *objp)
 {
        if (!xdr_string(xdrs, &objp->calendar, ~0))
                return (FALSE);
index 4581f180c9a0e53e5f75669daaecda427aa103d2..947a0de6c1cc44a6791f7af608502f6d6e16b3fa 100644 (file)
@@ -130,7 +130,7 @@ _DtCm_free_cms_entries(cms_entry *entry)
 }
 
 extern void
-_DtCm_init_hash()
+_DtCm_init_hash(void)
 {
        static  boolean_t       done = B_FALSE;
 
index f33b913da85bb9ba1893aeed77cc10f38bc79ca7..5e6b012899978a83c220d563bcb179f6eb2028c7 100644 (file)
@@ -42,7 +42,7 @@
  * time_t is a typedef which is system dependent
  */
 bool_t
-xdr_time_t(register XDR *xdrs, time_t *objp)
+xdr_time_t(XDR *xdrs, time_t *objp)
 {
        if (!xdr_long(xdrs, objp))
                return (FALSE);
@@ -56,7 +56,7 @@ xdr_time_t(register XDR *xdrs, time_t *objp)
  */
 
 bool_t
-xdr_cms_name(register XDR *xdrs, cms_name *objp)
+xdr_cms_name(XDR *xdrs, cms_name *objp)
 {
        if (!xdr_string(xdrs, objp, ~0))
                return (FALSE);
@@ -68,7 +68,7 @@ xdr_cms_name(register XDR *xdrs, cms_name *objp)
  */
 
 bool_t
-xdr_cms_access_entry(register XDR *xdrs, cms_access_entry *objp)
+xdr_cms_access_entry(XDR *xdrs, cms_access_entry *objp)
 {
        if (!xdr_string(xdrs, &objp->user, ~0))
                return (FALSE);
@@ -86,7 +86,7 @@ xdr_cms_access_entry(register XDR *xdrs, cms_access_entry *objp)
  */
 
 bool_t
-xdr_cms_key(register XDR *xdrs, cms_key *objp)
+xdr_cms_key(XDR *xdrs, cms_key *objp)
 {
        if (!xdr_time_t(xdrs, &objp->time))
                return (FALSE);
@@ -96,7 +96,7 @@ xdr_cms_key(register XDR *xdrs, cms_key *objp)
 }
 
 bool_t
-xdr_CSA_opaque_data(register XDR *xdrs, CSA_opaque_data *objp)
+xdr_CSA_opaque_data(XDR *xdrs, CSA_opaque_data *objp)
 {
        if (!xdr_bytes(xdrs, (char **)&objp->data, (u_int *) &objp->size, ~0))
                return (FALSE);
@@ -104,7 +104,7 @@ xdr_CSA_opaque_data(register XDR *xdrs, CSA_opaque_data *objp)
 }
 
 bool_t
-xdr_CSA_reminder(register XDR *xdrs, CSA_reminder *objp)
+xdr_CSA_reminder(XDR *xdrs, CSA_reminder *objp)
 {
        if (!xdr_string(xdrs, &objp->lead_time, ~0))
                return (FALSE);
@@ -118,7 +118,7 @@ xdr_CSA_reminder(register XDR *xdrs, CSA_reminder *objp)
 }
 
 bool_t
-xdr_CSA_date_time_entry(register XDR *xdrs, CSA_date_time_entry *objp)
+xdr_CSA_date_time_entry(XDR *xdrs, CSA_date_time_entry *objp)
 {
        if (!xdr_string(xdrs, &objp->date_time, ~0))
                return (FALSE);
@@ -129,7 +129,7 @@ xdr_CSA_date_time_entry(register XDR *xdrs, CSA_date_time_entry *objp)
 }
 
 bool_t
-xdr_cms_attribute_value(register XDR *xdrs, cms_attribute_value *objp)
+xdr_cms_attribute_value(XDR *xdrs, cms_attribute_value *objp)
 {
        if (!xdr_int(xdrs, &objp->type))
                return (FALSE);
@@ -189,7 +189,7 @@ xdr_cms_attribute_value(register XDR *xdrs, cms_attribute_value *objp)
  */
 
 bool_t
-xdr_cms_attr_name(register XDR *xdrs, cms_attr_name *objp)
+xdr_cms_attr_name(XDR *xdrs, cms_attr_name *objp)
 {
        if (!xdr_short(xdrs, &objp->num))
                return (FALSE);
@@ -203,7 +203,7 @@ xdr_cms_attr_name(register XDR *xdrs, cms_attr_name *objp)
  */
 
 bool_t
-xdr_cms_attribute(register XDR *xdrs, cms_attribute *objp)
+xdr_cms_attribute(XDR *xdrs, cms_attribute *objp)
 {
        if (!xdr_cms_attr_name(xdrs, &objp->name))
                return (FALSE);
@@ -220,7 +220,7 @@ xdr_cms_attribute(register XDR *xdrs, cms_attribute *objp)
  */
 
 bool_t
-xdr_cms_entry(register XDR *xdrs, cms_entry *objp)
+xdr_cms_entry(XDR *xdrs, cms_entry *objp)
 {
        if (!xdr_cms_key(xdrs, &objp->key))
                return (FALSE);
@@ -241,7 +241,7 @@ xdr_cms_entry(register XDR *xdrs, cms_entry *objp)
  */
 
 bool_t
-xdr_cms_enumerate_calendar_attr_res(register XDR *xdrs, cms_enumerate_calendar_attr_res *objp)
+xdr_cms_enumerate_calendar_attr_res(XDR *xdrs, cms_enumerate_calendar_attr_res *objp)
 {
        if (!xdr_u_long(xdrs, &objp->stat))
                return (FALSE);
@@ -259,7 +259,7 @@ xdr_cms_enumerate_calendar_attr_res(register XDR *xdrs, cms_enumerate_calendar_a
  */
 
 bool_t
-xdr_cms_list_calendars_res(register XDR *xdrs, cms_list_calendars_res *objp)
+xdr_cms_list_calendars_res(XDR *xdrs, cms_list_calendars_res *objp)
 {
        if (!xdr_u_long(xdrs, &objp->stat))
                return (FALSE);
@@ -275,7 +275,7 @@ xdr_cms_list_calendars_res(register XDR *xdrs, cms_list_calendars_res *objp)
  */
 
 bool_t
-xdr_cms_open_args(register XDR *xdrs, cms_open_args *objp)
+xdr_cms_open_args(XDR *xdrs, cms_open_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -297,7 +297,7 @@ xdr_cms_open_args(register XDR *xdrs, cms_open_args *objp)
  */
 
 bool_t
-xdr_cms_open_res(register XDR *xdrs, cms_open_res *objp)
+xdr_cms_open_res(XDR *xdrs, cms_open_res *objp)
 {
        if (!xdr_u_long(xdrs, &objp->stat))
                return (FALSE);
@@ -319,7 +319,7 @@ xdr_cms_open_res(register XDR *xdrs, cms_open_res *objp)
  */
 
 bool_t
-xdr_cms_create_args(register XDR *xdrs, cms_create_args *objp)
+xdr_cms_create_args(XDR *xdrs, cms_create_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -339,7 +339,7 @@ xdr_cms_create_args(register XDR *xdrs, cms_create_args *objp)
  */
 
 bool_t
-xdr_cms_remove_args(register XDR *xdrs, cms_remove_args *objp)
+xdr_cms_remove_args(XDR *xdrs, cms_remove_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -354,7 +354,7 @@ xdr_cms_remove_args(register XDR *xdrs, cms_remove_args *objp)
  */
 
 bool_t
-xdr_cms_register_args(register XDR *xdrs, cms_register_args *objp)
+xdr_cms_register_args(XDR *xdrs, cms_register_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -379,7 +379,7 @@ xdr_cms_register_args(register XDR *xdrs, cms_register_args *objp)
  */
 
 bool_t
-xdr_cms_get_cal_attr_res(register XDR *xdrs, cms_get_cal_attr_res *objp)
+xdr_cms_get_cal_attr_res(XDR *xdrs, cms_get_cal_attr_res *objp)
 {
        if (!xdr_u_long(xdrs, &objp->stat))
                return (FALSE);
@@ -395,7 +395,7 @@ xdr_cms_get_cal_attr_res(register XDR *xdrs, cms_get_cal_attr_res *objp)
  */
 
 bool_t
-xdr_cms_get_cal_attr_args(register XDR *xdrs, cms_get_cal_attr_args *objp)
+xdr_cms_get_cal_attr_args(XDR *xdrs, cms_get_cal_attr_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -411,7 +411,7 @@ xdr_cms_get_cal_attr_args(register XDR *xdrs, cms_get_cal_attr_args *objp)
  */
 
 bool_t
-xdr_cms_set_cal_attr_args(register XDR *xdrs, cms_set_cal_attr_args *objp)
+xdr_cms_set_cal_attr_args(XDR *xdrs, cms_set_cal_attr_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -431,7 +431,7 @@ xdr_cms_set_cal_attr_args(register XDR *xdrs, cms_set_cal_attr_args *objp)
  */
 
 bool_t
-xdr_cms_archive_res(register XDR *xdrs, cms_archive_res *objp)
+xdr_cms_archive_res(XDR *xdrs, cms_archive_res *objp)
 {
        if (!xdr_u_long(xdrs, &objp->stat))
                return (FALSE);
@@ -446,7 +446,7 @@ xdr_cms_archive_res(register XDR *xdrs, cms_archive_res *objp)
  */
 
 bool_t
-xdr_cms_archive_args(register XDR *xdrs, cms_archive_args *objp)
+xdr_cms_archive_args(XDR *xdrs, cms_archive_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -469,7 +469,7 @@ xdr_cms_archive_args(register XDR *xdrs, cms_archive_args *objp)
  */
 
 bool_t
-xdr_cms_restore_args(register XDR *xdrs, cms_restore_args *objp)
+xdr_cms_restore_args(XDR *xdrs, cms_restore_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -492,7 +492,7 @@ xdr_cms_restore_args(register XDR *xdrs, cms_restore_args *objp)
  */
 
 bool_t
-xdr_cms_reminder_ref(register XDR *xdrs, cms_reminder_ref *objp)
+xdr_cms_reminder_ref(XDR *xdrs, cms_reminder_ref *objp)
 {
        if (!xdr_string(xdrs, &objp->reminder_name, ~0))
                return (FALSE);
@@ -516,7 +516,7 @@ xdr_cms_reminder_ref(register XDR *xdrs, cms_reminder_ref *objp)
  */
 
 bool_t
-xdr_cms_reminder_res(register XDR *xdrs, cms_reminder_res *objp)
+xdr_cms_reminder_res(XDR *xdrs, cms_reminder_res *objp)
 {
        if (!xdr_u_long(xdrs, &objp->stat))
                return (FALSE);
@@ -532,7 +532,7 @@ xdr_cms_reminder_res(register XDR *xdrs, cms_reminder_res *objp)
  */
 
 bool_t
-xdr_cms_reminder_args(register XDR *xdrs, cms_reminder_args *objp)
+xdr_cms_reminder_args(XDR *xdrs, cms_reminder_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -552,7 +552,7 @@ xdr_cms_reminder_args(register XDR *xdrs, cms_reminder_args *objp)
  */
 
 bool_t
-xdr_cms_entries_res(register XDR *xdrs, cms_entries_res *objp)
+xdr_cms_entries_res(XDR *xdrs, cms_entries_res *objp)
 {
        if (!xdr_u_long(xdrs, &objp->stat))
                return (FALSE);
@@ -568,7 +568,7 @@ xdr_cms_entries_res(register XDR *xdrs, cms_entries_res *objp)
  */
 
 bool_t
-xdr_cms_lookup_entries_args(register XDR *xdrs, cms_lookup_entries_args *objp)
+xdr_cms_lookup_entries_args(XDR *xdrs, cms_lookup_entries_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -589,7 +589,7 @@ xdr_cms_lookup_entries_args(register XDR *xdrs, cms_lookup_entries_args *objp)
  */
 
 bool_t
-xdr_cms_enumerate_args(register XDR *xdrs, cms_enumerate_args *objp)
+xdr_cms_enumerate_args(XDR *xdrs, cms_enumerate_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -609,7 +609,7 @@ xdr_cms_enumerate_args(register XDR *xdrs, cms_enumerate_args *objp)
 
 bool_t
 xdr_cms_get_entry_attr_res_item(
-       register XDR                    *xdrs,
+       XDR                     *xdrs,
        cms_get_entry_attr_res_item     *objp)
 {
        if (!xdr_u_long(xdrs, &objp->stat))
@@ -635,7 +635,7 @@ xdr_cms_get_entry_attr_res_item(
  */
 
 bool_t
-xdr_cms_get_entry_attr_res(register XDR *xdrs, cms_get_entry_attr_res *objp)
+xdr_cms_get_entry_attr_res(XDR *xdrs, cms_get_entry_attr_res *objp)
 {
        if (!xdr_u_long(xdrs, &objp->stat))
                return (FALSE);
@@ -652,7 +652,7 @@ xdr_cms_get_entry_attr_res(register XDR *xdrs, cms_get_entry_attr_res *objp)
  */
 
 bool_t
-xdr_cms_get_entry_attr_args(register XDR *xdrs, cms_get_entry_attr_args *objp)
+xdr_cms_get_entry_attr_args(XDR *xdrs, cms_get_entry_attr_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -673,7 +673,7 @@ xdr_cms_get_entry_attr_args(register XDR *xdrs, cms_get_entry_attr_args *objp)
  */
 
 bool_t
-xdr_cms_entry_res(register XDR *xdrs, cms_entry_res *objp)
+xdr_cms_entry_res(XDR *xdrs, cms_entry_res *objp)
 {
        if (!xdr_u_long(xdrs, &objp->stat))
                return (FALSE);
@@ -689,7 +689,7 @@ xdr_cms_entry_res(register XDR *xdrs, cms_entry_res *objp)
  */
 
 bool_t
-xdr_cms_insert_args(register XDR *xdrs, cms_insert_args *objp)
+xdr_cms_insert_args(XDR *xdrs, cms_insert_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -707,7 +707,7 @@ xdr_cms_insert_args(register XDR *xdrs, cms_insert_args *objp)
  */
 
 bool_t
-xdr_cms_update_args(register XDR *xdrs, cms_update_args *objp)
+xdr_cms_update_args(XDR *xdrs, cms_update_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
@@ -729,7 +729,7 @@ xdr_cms_update_args(register XDR *xdrs, cms_update_args *objp)
  */
 
 bool_t
-xdr_cms_delete_args(register XDR *xdrs, cms_delete_args *objp)
+xdr_cms_delete_args(XDR *xdrs, cms_delete_args *objp)
 {
        if (!xdr_string(xdrs, &objp->cal, ~0))
                return (FALSE);
index c8e8ef88e04a40ab9eddb54f00d04d75c90eea38..826112be8f170c84e31555781b1feb47b4e281d4 100644 (file)
@@ -136,8 +136,8 @@ void * _DtCmMakeHash(int size)
 void ** _DtCmGetHash(void * t, const unsigned char * key)
 {      
   hash * tbl = (hash *) t;
-  register int bucket;
-  register hash_entry * tmp;
+  int bucket;
+  hash_entry * tmp;
   hash_entry * new;
 
   if(tbl->hash_type == String_Key)
@@ -184,8 +184,8 @@ void ** _DtCmGetHash(void * t, const unsigned char * key)
 
 void ** _DtCmFindHash(void * t, const unsigned char * key)
 {
-  register hash * tbl = (hash *) t;
-  register hash_entry * tmp;
+  hash * tbl = (hash *) t;
+  hash_entry * tmp;
 
   if(tbl->hash_type == String_Key)
     {
@@ -208,7 +208,7 @@ void ** _DtCmFindHash(void * t, const unsigned char * key)
 void _DtCmDestroyHash(void * t, int (*ptr)(), void * usr_arg)
 {
   hash * tbl = (hash *) t;
-  register hash_entry * tmp = tbl->start, * prev;
+  hash_entry * tmp = tbl->start, * prev;
 
   while(tmp)
     {
@@ -225,12 +225,10 @@ void _DtCmDestroyHash(void * t, int (*ptr)(), void * usr_arg)
   free(tbl);
 }
 
-static int hash_string(s,modulo)
-register char *s;
-int modulo;
+static int hash_string(char *s, int modulo)
 {
-       register unsigned result = 0;
-       register int i=1;
+       unsigned result = 0;
+       int i=1;
 
        while(*s!=0)
          result += (*s++ << i++);
index c7eb6b510ea64b1cc3e8ba9764085c8775321fab..0ec4a31ebd5b1dac57854ea0dea4a837450bfcfa 100644 (file)
@@ -75,7 +75,7 @@ _DtCmGetPrefix(char *str, char sep)
 }
 
 extern char *
-_DtCmGetLocalHost()
+_DtCmGetLocalHost(void)
 {
        static char *host = NULL;
 
@@ -136,7 +136,7 @@ _DtCmGetLocalDomain(char *hostname)
 }
 
 extern char *
-_DtCmGetHostAtDomain()
+_DtCmGetHostAtDomain(void)
 {
        static char     *hostname = NULL;
        char            *host;
@@ -157,7 +157,7 @@ _DtCmGetHostAtDomain()
 }
 
 extern char *
-_DtCmGetUserName()
+_DtCmGetUserName(void)
 {
         static char *name = NULL;
        _Xgetpwparams   pwd_buf;
index 369dc618721164e14d9f6fa8a6f4ac84d0b9c715..623d0cb4b89e14a39d0ba093ac497d4a9d7b561c 100644 (file)
@@ -68,7 +68,7 @@ char     *_DtCm_rule_buf;
 char      _DtCm_yytext[128];
 
 int
-_DtCm_yylex()
+_DtCm_yylex(void)
 {
        int       token = 0;
        int       yylen = 128;
index 178fd4d69a2b972b2d0cfdce4cb78447bcba68ec..0570a5f9cdd6b732f8804c9ba338a8cf7f31c29e 100644 (file)
@@ -874,7 +874,7 @@ verify_passwd()
 static int
 quotec(void)
 {
-       register int c, i, num;
+       int c, i, num;
 
        switch (c = getc(stdin)) {
 
@@ -936,8 +936,8 @@ getargs(char *in_line)
 {
        static char envbuf[MAXLINE];
        static char *args[MAXARGS];
-       register char *ptr, **answer;
-       register int c;
+       char *ptr, **answer;
+       int c;
        int state;
 
        for (ptr = envbuf; ptr < &envbuf[sizeof (envbuf)]; /* cstyle */)
@@ -1103,7 +1103,7 @@ static char *illegal[] = {
 static int
 legalenvvar(char *s)
 {
-       register char **p;
+       char **p;
 
        for (p = illegal; *p; p++)
                if (strncmp(s, *p, strlen(*p)) == 0)
@@ -1177,8 +1177,8 @@ static void
 defaults(void)
 {
        extern int defcntl();
-       register int  flags;
-       register char *ptr;
+       int  flags;
+       char *ptr;
 
        if (defopen(Pndefault) == 0) {
                /*
@@ -1378,7 +1378,7 @@ static void
 doremoteterm(char *term)
 {
        struct termios tp;
-       register char *cp = strchr(term, '/'), **cpp;
+       char *cp = strchr(term, '/'), **cpp;
        char *speed;
 
        (void) ioctl(0, TCGETS, &tp);
index f16ea4ba25e671308db949c5486d4077a66e58be..8a20ed2ea5fc557c86192004fb5667f17f8f6bcf 100644 (file)
@@ -1696,7 +1696,7 @@ mal_formed:
 static char *
 read_next_token(char **cpp)
 {
-       register char *cp = *cpp;
+       char *cp = *cpp;
        char *start;
 
        while (*cp == ' ' || *cp == '\t')
index ed7ea1545bf242339f1084c4a13cdedf3f18e2c5..7db4840e10521bbfcdf17a3774267d88628725b8 100644 (file)
@@ -70,7 +70,7 @@ __get_authtoken_attr(
        int                     argc,
        const char              **argv)
 {
-       register int            k;
+       int             k;
        char                    value[PAM_MAX_ATTR_SIZE];
        int                     retcode;
        long                    lstchg;
index dbf48715ada8e66bf10149f84e5c867b612bd792..e1df1c0e8115f08f8c8f981ffd9c00085a388522 100644 (file)
@@ -180,7 +180,7 @@ extern int          key_setnet();
 extern int             ck_perm(pam_handle_t *, int,
                                char *, struct passwd **, struct spwd **,
                                int *, void **, uid_t, int, int);
-extern char            *attr_match(register char *, register char *);
+extern char            *attr_match(char *, char *);
 extern char            *getloginshell(pam_handle_t *, char *, int, int);
 extern char            *gethomedir(pam_handle_t *, char *, int);
 extern char            *getfingerinfo(pam_handle_t *, char *, int);
index 70057e1a92e12940bacd4f9aa47af957163b849a..774c68e4ce94a59b3d2e1cd34838aa3a377f7360 100644 (file)
@@ -52,7 +52,7 @@ __set_authtoken_attr(
        int             argc,
        const char      **argv)
 {
-       register int    i;
+       int     i;
        int             retcode;
        char            *usrname;
        char            *prognamep;
index 72b35864099d26aa25c666e10f3a93f51efa9e16..a843f7989fb1400afc6913a452394c6db1a834d8 100644 (file)
@@ -516,7 +516,7 @@ verify_old_passwd(pamh, repository, real_rep, domain,
        int debug;
        int nowarn;
 {
-       register int            now;
+       int             now;
        int                     done = 0;
        int                     retcode;
        char                    *prognamep;
index 9108355f1163f03b9399bcf4867fd90d37371c4f..95b9778826532cb988816de8d3258b663c78906f 100644 (file)
@@ -61,7 +61,7 @@ update_authtok_file(pamh, field, data, unix_pwd, privileged, nowarn)
        char *prognamep;
        char *usrname;
        struct stat     buf;
-       register int    found = 0;
+       int     found = 0;
        FILE            *tsfp, *spfp;
        struct spwd     unix_sp;
        char            spbuf[1024];
index e96a85e1a76ad13c85d3839cfdd8ea330f35c2ea..eb2ae75dc84b890cbb8f5168397b2b2ac28a669b 100644 (file)
@@ -384,7 +384,7 @@ ck_perm(pamh, repository, domain, pwd, shpwd, privileged, passwd_res, uid,
 
 char *
 attr_match(s1, s2)
-       register char *s1, *s2;
+       char *s1, *s2;
 {
        while (*s1 == *s2++)
                if (*s1++ == '=')
@@ -407,7 +407,7 @@ attr_match(s1, s2)
 
 int
 attr_find(s1, s2)
-       register char *s1, *s2[];
+       char *s1, *s2[];
 {
        int     i;
        char    *sa, *sb;
@@ -467,7 +467,7 @@ setup_attr(dest_attr, k, attr, value)
 #ifdef PAM_NISPLUS
 static char *
 spskip(p)
-       register char *p;
+       char *p;
 {
        while (*p && *p != ':' && *p != '\n')
                ++p;
index e483d8b6d089876a9c3246a871a9260a59a4b54a..626428c12301439add3187b63305776777fcea2a 100644 (file)
@@ -1085,7 +1085,7 @@ do_list(char *inputfilename, int lineno, int argc, char *argv[])
     ld.fp = stdout;
 
     if (argc == 1) {
-       register _tt_AuthFileEntryList *l;
+       _tt_AuthFileEntryList *l;
 
        if (ttauth_head) {
            for (l = ttauth_head; l; l = l->next) {
index f2aebf54008b8dd3f3e4f693b5cc29060acfa5a9..e5b022d545e83e086d611852ae1302041b999014 100644 (file)
@@ -1924,7 +1924,7 @@ _tt_gettype_1(_Tt_spec_props *argp, SVCXPRT * /* transp */)
 void
 isgarbage_collect()
 {
-       register int    offset;
+       int     offset;
        _Tt_string      dbName;
 
        for (offset = 0; offset < _TT_MAX_ISFD; offset++) {
index 048735700798775b9e833826c7cd763c9a3be5b8..18a4b9972ac7db24f5723bdf664863394abdaf3b 100644 (file)
@@ -172,9 +172,7 @@ _ttdnd_get_contents(
  * callback, and sends a message for the next chunk if necessary.
  */
 static Tt_callback_action
-_ttdnd_continue_transfer(m,p)
-     Tt_message m;
-     Tt_pattern p;
+_ttdnd_continue_transfer(Tt_message m, Tt_pattern p)
 {
        Ttdnd_receive_data_func *receivefunc;
        int sourceXid;
@@ -233,9 +231,7 @@ _ttdnd_continue_transfer(m,p)
  * from the user's send routine, and fills it into the message.
  */
 static Tt_callback_action
-_ttdnd_get_contents_callback(m, p)
-     Tt_message m; 
-     Tt_pattern p;
+_ttdnd_get_contents_callback(Tt_message m, Tt_pattern p)
 {
        int chunknumber;
        int maxchunk;
@@ -282,7 +278,7 @@ _ttdnd_get_contents_callback(m, p)
  * tt messages whenever the tt filedescriptor has input.
  */
 void
-_ttdnd_receive()
+_ttdnd_receive(void)
 {
        Tt_message m;
        m = tt_message_receive();
index 9e4d177b22cc540d959e8a8533f8d2759f35faf1..5ddd9af9a48b36bda6691ebaf48806790c7e2c0d 100644 (file)
@@ -112,8 +112,8 @@ _tt_AuthFileName ()
     if (!name)
     {
 #ifdef WIN32
-    register char *ptr1;
-    register char *ptr2;
+    char *ptr1;
+    char *ptr2;
     int len1 = 0, len2 = 0;
 
     if ((ptr1 = getenv("HOMEDRIVE")) && (ptr2 = getenv("HOMEDIR"))) {
index 473be14aa5382d858d9664a7eb893d85bd39c181..d9abaffc08e265377dc1ae4ed59223e5ede642d5 100644 (file)
@@ -427,7 +427,7 @@ int tt_trace_parse(void)
 int tt_trace_parse()
 #endif
 {
-       register TT_TRACE_STYPE *tt_trace_pvt;  /* top of value stack for $vars */
+       TT_TRACE_STYPE *tt_trace_pvt;   /* top of value stack for $vars */
 
 #if defined(__cplusplus) || defined(lint)
 /*
@@ -466,10 +466,10 @@ int tt_trace_parse()
 #endif
 
        {
-               register TT_TRACE_STYPE *tt_trace__pv;  /* top of value stack */
-               register int *tt_trace__ps;             /* top of state stack */
-               register int tt_trace__state;           /* current state */
-               register int  tt_trace__n;              /* internal state number info */
+               TT_TRACE_STYPE *tt_trace__pv;   /* top of value stack */
+               int *tt_trace__ps;              /* top of state stack */
+               int tt_trace__state;            /* current state */
+               int  tt_trace__n;               /* internal state number info */
        goto tt_trace_stack;    /* moved from 6 lines above to here to please C++ */
 
                /*
@@ -507,7 +507,7 @@ int tt_trace_parse()
                */
                if ( tt_trace_debug )
                {
-                       register int tt_trace__i;
+                       int tt_trace__i;
 
                        printf( "State %d, token ", tt_trace__state );
                        if ( tt_trace_char == 0 )
@@ -591,7 +591,7 @@ int tt_trace_parse()
 #if TT_TRACE_DEBUG
                if ( tt_trace_debug && tt_trace_tmp )
                {
-                       register int tt_trace__i;
+                       int tt_trace__i;
 
                        printf( "Received token " );
                        if ( tt_trace_char == 0 )
@@ -633,7 +633,7 @@ int tt_trace_parse()
 #if TT_TRACE_DEBUG
                        if ( tt_trace_debug && tt_trace_tmp )
                        {
-                               register int tt_trace__i;
+                               int tt_trace__i;
 
                                printf( "Received token " );
                                if ( tt_trace_char == 0 )
@@ -660,7 +660,7 @@ int tt_trace_parse()
                        ** look through exception table
                        */
                        {
-                               register int *tt_trace_xi = tt_trace_exca;
+                               int *tt_trace_xi = tt_trace_exca;
 
                                while ( ( *tt_trace_xi != -1 ) ||
                                        ( tt_trace_xi[1] != tt_trace__state ) )
@@ -746,7 +746,7 @@ int tt_trace_parse()
                                */
                                if ( tt_trace_debug )
                                {
-                                       register int tt_trace__i;
+                                       int tt_trace__i;
 
                                        printf( "Error recovery discards " );
                                        if ( tt_trace_char == 0 )
@@ -806,7 +806,7 @@ int tt_trace_parse()
                */
                {
                        /* length of production doubled with extra bit */
-                       register int tt_trace__len = tt_trace_r2[ tt_trace__n ];
+                       int tt_trace__len = tt_trace_r2[ tt_trace__n ];
 
                        if ( !( tt_trace__len & 01 ) )
                        {
index 53d8fb65eb26ca9ad115e067822e1ab10720f078..d1037c3a4ed8115128d5ba8400b4abfb44585633 100644 (file)
@@ -3993,8 +3993,8 @@ int tt_trace_look(void)
 tt_trace_look()
 #endif
 {
-       register struct tt_trace_svf *tt_trace_state, **lsp;
-       register struct tt_trace_work *tt_trace_t;
+       struct tt_trace_svf *tt_trace_state, **lsp;
+       struct tt_trace_work *tt_trace_t;
        struct tt_trace_svf *tt_trace_z;
        int tt_trace_ch, tt_trace_first;
        struct tt_trace_work *tt_trace_r;
index 883522d497629acb8372faea00cec3034f02762c..7e94902eff4bd699ef29f5a3d012b8f4efdd8499 100644 (file)
@@ -609,7 +609,7 @@ _Tt_object_list_cursor& _Tt_object_list_cursor::
 remove()
 {
        ASSERT(current,"No current element to delete");
-       register _Tt_object_list_element *p = current;
+       _Tt_object_list_element *p = current;
        listhdr->_count--;
        if (p->next != 0)
          p->next->prev = p->prev;
index 23113d47a13b35fbac1c4bc81c3823ccb55be000..cf372075f96500bc34da405f43b8634aa0ae87ac 100644 (file)
@@ -605,8 +605,8 @@ unquote_nulls() const
        int l;
        unsigned char *result;
        _Tt_string r;
-       register unsigned char *p;
-       register unsigned char *q;
+       unsigned char *p;
+       unsigned char *q;
 
        l = len();
        if (l==0) {
@@ -746,9 +746,9 @@ replace(const char *old, const _Tt_string &with) const
 int _Tt_string::
 cmp(const char *q, int qlen) const
 {
-       register char *p = (*this)->content;
-       register int plen = len();
-       register int pcmp;
+       char *p = (*this)->content;
+       int plen = len();
+       int pcmp;
 
        if (0==p && 0==q) return 0;
        if (0==p) return -1;
@@ -769,9 +769,9 @@ cmp(const char *q, int qlen) const
 /* XXX: old definition of cmp
  * {   
  * 
- *     register char *p = (*this)->content;
- *     register char *end;
- *     register int plen = len();
+ *     char *p = (*this)->content;
+ *     char *end;
+ *     int plen = len();
  *     
  *     // null pointers are treated as null strings, ignoring length.
  *     if (0==p && 0==q) return 0;
@@ -815,8 +815,8 @@ index(char c) const
                return -1;
        }
 
-       register char *p = (*this)->content;
-       register char *end = p+len();
+       char *p = (*this)->content;
+       char *end = p+len();
        
        while (p<end && *p!=c) ++p;
        if (p==end) {
@@ -873,8 +873,8 @@ rindex(char c) const
                return -1;
        }
 
-       register char *beg = (*this)->content;
-       register char *p = beg+len()-1;
+       char *beg = (*this)->content;
+       char *p = beg+len()-1;
 
        while (p>=beg && *p!=c) --p;
        if (p<beg) {
index 9f22fbaea2e141e18660fbdac4523c77851711a8..b4218323a4cdd8a1c054c42b8f82cc7d626b70a2 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isadd1key.c /main/3 1995/10/23 11:33:17 rswiston $                                                          */
-#ifndef lint
-    static char sccsid[] = "@(#)isadd1key.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
 extern long *ismaxlong;
 
 int
-_add1key(fcb, pkeydesc2, record, recnum, newkey)
-    Fcb                        *fcb;   
-    Keydesc2           *pkeydesc2;
-    char               *record;
-    Recno              recnum;
-    char               *newkey;
+_add1key(Fcb *fcb, Keydesc2 *pkeydesc2, char *record, Recno recnum, char *newkey)
 {
     char               keybuf[MAXKEYSIZE];
     Btree              *btree;
index d44e3474601ee6226bafa4710d0aa73031b63076..64a910d7e8881d366deceb61f151aac9b685b4f9 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isaddindex.c /main/3 1995/10/23 11:33:26 rswiston $                                                         */
-#ifndef lint
-static char sccsid[] = "@(#)isaddindex.c 1.8 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -59,12 +56,10 @@ static char sccsid[] = "@(#)isaddindex.c 1.8 89/07/17 Copyr 1988 Sun Micro";
  */
 
 int 
-isaddindex(isfd, keydesc)
-    int                        isfd;
-    struct keydesc     *keydesc;
+isaddindex(int isfd, struct keydesc *keydesc)
 {
     int                        _amaddindex();
-    register Fab       *fab;
+    Fab        *fab;
     int                        ret;
 
     /*
index df424018176122e1c60b1eaa252ee845408ff813..9d8869d20851622fb4cefe10690e520b10f87d4e 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isaddprimary.c /main/3 1995/10/23 11:33:35 rswiston $                                                       */
-#ifndef lint
-static char sccsid[] = "@(#)isaddprimary.c 1.8 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /* @(#)isaddprimary.c  1.7 93/09/07
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -65,11 +62,9 @@ Static int _am_addprimary();
  */
 
 int 
-isaddprimary(isfd, keydesc)
-    int                        isfd;
-    struct keydesc     *keydesc;
+isaddprimary(int isfd, struct keydesc *keydesc)
 {
-    register Fab       *fab;
+    Fab        *fab;
     int                        ret;
 
     /*
@@ -94,9 +89,7 @@ isaddprimary(isfd, keydesc)
     return (ret);                           /* Successful write */
 }
 
-Static int _am_addprimary(fab, keydesc)
-    register Fab       *fab;
-    struct keydesc     *keydesc;
+Static int _am_addprimary(Fab *fab, struct keydesc *keydesc)
 {
     return (_amaddprimary(&fab->isfhandle, keydesc, &fab->errcode));
 }
index 765e7ec2db50cbde8c3e4360c5e34b66b1a5c2e8..2084ca3b227540e53337dbc5bec34f45acc55a8f 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isalloc.c /main/3 1995/10/23 11:33:43 rswiston $                                                    */
-#ifndef lint
-static char sccsid[] = "@(#)isalloc.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -42,13 +39,7 @@ static char sccsid[] = "@(#)isalloc.c 1.3 89/07/17 Copyr 1988 Sun Micro";
 
 #include "isam_impl.h"
 #include <stdlib.h>
-
-/* strdup is not defined in Ultrix' string.h, so it is implemented in a separate
- * file named strdup.ultrix.c
- */
-#ifdef __ultrix__
-extern char *strdup();
-#endif
+#include <string.h>
 
 /*
  * _ismalloc(nbytes)
@@ -56,10 +47,9 @@ extern char *strdup();
  * Allocate nbytes.
  */
 
-char *_ismalloc(nbytes)
-    unsigned int       nbytes;
+char *_ismalloc(unsigned int nbytes)
 {
-    register char      *p;
+    char       *p;
     
     if ((p = (char *) malloc (nbytes)) == NULL)
        _isfatal_error("malloc() failed");
@@ -67,11 +57,9 @@ char *_ismalloc(nbytes)
     return (p);
 }
 
-char *_isrealloc(oldaddr, nbytes)
-    char               *oldaddr;
-    unsigned int       nbytes;
+char *_isrealloc(char *oldaddr, unsigned int nbytes)
 {
-    register char      *p;
+    char       *p;
     
     if ((p = (char *) realloc (oldaddr, nbytes)) == NULL)
        _isfatal_error("realloc() failed");
@@ -87,10 +75,9 @@ char *_isrealloc(oldaddr, nbytes)
  */
 
 char *
-_isallocstring(str)
-    char       *str;
+_isallocstring(char *str)
 {
-    register char      *p;
+    char       *p;
 
     if ((p = strdup(str)) == NULL) 
        _isfatal_error("strdup() failed");
@@ -105,8 +92,7 @@ _isallocstring(str)
  */
 
 void
-_isfreestring(str)
-    char       *str;
+_isfreestring(char *str)
 {
     assert(str != NULL);
     free(str);
index 438c902baea514fe8e75470c41afe8d737fba188..eeb1e6e53136dece98304dd989f67970230d964e 100644 (file)
@@ -57,7 +57,10 @@ extern long ldlong();
 extern float ldfloat();
 extern double lddbl();
 extern short ldshort();
-extern int ldchar(), stchar(), stlong(), stint(), stdbl(), stfloat();
+extern int ldchar(), stchar(), stlong(), stdbl();
+extern int stint(short val, char *p);
+extern int stfloat(float f, char *p);
+
 
 extern int     iserrno;                     /* isam error number code */
 extern long    isrecnum;                    /* record number of last call */
index 4e3a1e2825969ebd6b5fdf8e5859b54b78d169e8..8172077dafdd38de2afa239b90a71803c2b35337 100644 (file)
@@ -162,7 +162,8 @@ typedef struct bytearray {
     char       *data;
 } Bytearray;
 
-extern Bytearray _bytearr_getempty(), _bytearr_dup(), _bytearr_new();
+extern Bytearray _bytearr_getempty(), _bytearr_dup();
+extern Bytearray _bytearr_new(u_short len, char *data);
 extern void _bytearr_free();
 
 
@@ -451,14 +452,6 @@ struct export_opts {
 };
 
 
-extern Fcb *_isfcb_create();
-extern Fcb *_isfcb_open();
-extern void _isfcb_remove();
-extern void _isfcb_close();
-extern void _isfcb_setreclength();
-extern void _isfcb_setprimkey();
-extern int _isfcb_cntlpg_w();
-
 
 #define DAT_SUFFIX     ".rec"
 #define IND_SUFFIX     ".ind"
@@ -473,77 +466,8 @@ extern int _isfcb_cntlpg_w();
 #define VL_RECDELETED  ((long ) -1L)
 #define VL_RECNOTAIL   ((long ) -2L)
 
-
-/* extern long lseek(); */
-
-extern char *_ismalloc(), *_isrealloc(), *_isallocstring();
-extern void _isfree(), _isfreestring();
-extern void _isfatal_error(), _setiserrno2(), _seterr_errcode();
-extern void _makedat_isfname();
-extern void _makeind_isfname();
-extern void _makevar_isfname();
-extern void _amseterrcode();
-
-extern void _isseekpg(), _isreadpg(), _iswritepg();
-
-extern Bufhdr *_isdisk_fix(), *_isdisk_refix();
-extern void _isdisk_commit(), _isdisk_sync(), _isdisk_inval(), 
-    _isdisk_commit1(), _isdisk_unfix();
-extern void _isdisk_rollback();
-extern void _cp_tofile(), _cp_fromfile();
-Blkno  _extend_file();
-
-extern void _isdln_base_insert(), _isdln_base_remove(), _isdln_base_append(), 
-    _isdln_base_makeempty();
-extern struct dlink *_isdln_base_prev(), *_isdln_base_next(), *_isdln_base_first();
-
-extern void _mngfcb_insert(), _mngfcb_delete();
-extern Fcb *_mngfcb_find();
-extern Bytearray *_mngfcb_victim();
-extern char *_getisfname();
-extern Bytearray _makeisfhandle();
-
-extern Bytearray _makeisfhandle();
-extern Fcb *_openfcb();
-
-extern Time _amtime_set(), _amtime_get();
-
-extern void _islock_closefile(), _islock_unlockfile();
-
-extern Keydesc2 *_isfcb_findkey(), *_isfcb_indfindkey();
-extern void stkey(), ldkey();
-
-extern Issort *_issort_create();
-extern char *_issort_read();
-extern void _issort_destroy(), _issort_insert(), _issort_sort(), 
-    _issort_rewind();
-
-extern void _iskeycmp_set();
-extern int _iskeycmp();
-
-extern char *_isbsearch();
-
-extern void _iskey_extract();
-extern Blkno _isindfreel_alloc();
-extern void _isindfreel_free();
-extern long _fl_getpos();
-
-extern Btree *_isbtree_create();
-extern void _isbtree_destroy(), _isbtree_search(), _isbtree_insert(),
-    _isbtree_remove();
-extern char *_isbtree_current(), *_isbtree_next();
-
-extern void _iskey_fillmin(), _iskey_fillmax();
-
-extern Bufhdr *_allockpage();
-
-extern void _del1key();
-extern int _add1key(), _change1key();
-extern void _delkeys();
-extern char *_ismap_getaddr();
-extern void _ismap_endop(), _ismap_unmapfcb();
-
-extern void _isam_entryhook(), _isam_exithook();
+/*------------ Prototype definitions ---------------------------------------*/
+#include "isam_prototypes.h"
 
 #define stshort(n,p) stint((n), (p))
 #define ldshort(p) ldint(p)
@@ -554,10 +478,6 @@ extern void _isam_entryhook(), _isam_exithook();
 #define stblkno(n,p) stlong((long)(n), (p))
 #define ldblkno(p) ((Blkno)ldlong(p))
 
-extern int _flrec_read(), _flrec_write(), _flrec_rewrite(), _flrec_delete(),
-    _flrec_wrrec();
-extern int _vlrec_read(), _vlrec_write(), _vlrec_rewrite(), _vlrec_delete(),
-    _vlrec_wrrec();
 
 /*------------ UNIX file formats ---------------------------------------------*/
 
diff --git a/cde/lib/tt/mini_isam/isam_prototypes.h b/cde/lib/tt/mini_isam/isam_prototypes.h
new file mode 100644 (file)
index 0000000..7e91e40
--- /dev/null
@@ -0,0 +1,343 @@
+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these libraries and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
+
+/* JET: This code was generated using cproto, plus some fixes that
+ * having proper prototype definitions pointed out.
+ */
+
+/* isadd1key.c */
+int _add1key(Fcb *fcb, Keydesc2 *pkeydesc2, char *record, Recno recnum, char *newkey);
+
+/* isaddindex.c */
+int isaddindex(int isfd, struct keydesc *keydesc);
+
+/* isaddprimary.c */
+int isaddprimary(int isfd, struct keydesc *keydesc);
+
+/* isalloc.c */
+char *_ismalloc(unsigned int nbytes);
+char *_isrealloc(char *oldaddr, unsigned int nbytes);
+char *_isallocstring(char *str);
+void _isfreestring(char *str);
+
+/* isamaddindex.c */
+int _amaddindex(Bytearray *isfhandle, struct keydesc *keydesc, struct errcode *errcode);
+int _amaddprimary(Bytearray *isfhandle, struct keydesc *keydesc, struct errcode *errcode);
+int _create_index(Fcb *fcb, Keydesc2 *pkeydesc2);
+
+/* isamdelcurr.c */
+
+/* isamdelrec.c */
+int _amdelrec(Bytearray *isfhandle, Recno recnum, struct errcode *errcode);
+void _delkeys(Fcb *fcb, char *record, Recno recnum);
+
+/* isamerror.c */
+void _amseterrcode(struct errcode *errcode, int is_errno);
+
+/* isamhooks.c */
+void _isam_entryhook(void);
+void _isam_exithook(void);
+
+/* isamopen.c */
+int _amopen(char *isfname, enum openmode openmode, Bool *varflag, int *minlen, int *maxlen, Bytearray *isfhandle, Bytearray *curpos, struct errcode *errcode);
+Fcb *_openfcb(Bytearray *isfhandle, struct errcode *errcode);
+char *_getisfname(Bytearray *isfhandle);
+Bytearray _makeisfhandle(char *isfname);
+
+/* isamwrite.c */
+int _amwrite(Bytearray *isfhandle, char *record, int reclen, Bytearray *curpos, Recno *recnum, struct errcode *errcode);
+int _addkeys(Fcb *fcb, char *record, Recno recnum);
+
+/* isapplmr.c */
+int _isapplmr(int isfd, char *buffer);
+
+/* isapplmw.c */
+int _isapplmw(int isfd, char *magicstring);
+
+/* isbsearch.c */
+char *_isbsearch(char *key, char *table, int nelems, int keylen,
+                 int (*cmpf)(char *, char *));
+
+/* isbtree2.c */
+void _isbtree_insert(Btree *btree, char *key);
+void leftkey_up(Btree *btree, int level);
+
+/* isbtree3.c */
+void _isbtree_remove(Btree *btree);
+
+/* isbtree.c */
+Btree *_isbtree_create(Fcb *fcb, Keydesc2 *pkeydesc2);
+void _isbtree_destroy(Btree *btree);
+void _isbtree_search(Btree *btree, char *key);
+char *_isbtree_current(Btree *btree);
+char *_isbtree_next(Btree *btree);
+
+/* isbuild.c */
+int isbuild(char *isfname, int recordlength, struct keydesc *primkey, int mode);
+
+/* isbytearray.c */
+Bytearray _bytearr_getempty(void);
+Bytearray _bytearr_new(u_short len, char *data);
+Bytearray _bytearr_dup(Bytearray *old);
+void _bytearr_free(Bytearray *barray);
+int _bytearr_cmp(Bytearray *l, Bytearray *r);
+
+/* ischange1key.c */
+int _change1key(Fcb *fcb, Keydesc2 *pkeydesc2, char *record, char *oldrecord, Recno recnum, char *newkey);
+
+/* isclose.c */
+int isclose(int isfd);
+
+/* iscntl.c */
+int iscntl(int isfd, int func, ...);
+
+/* iscurpos.c */
+int isgetcurpos(int isfd, int *len, char **buf);
+int issetcurpos(int isfd, char *buf);
+
+/* isdatconv.c */
+long ldlong(char *p);
+int stlong(long val, char *p);
+short ldint(char *p);
+u_short ldunshort(char *p);
+int stint(short val, char *p);
+int ldchar(char *src, int len, char *dst);
+int stchar(char *src, char *dst, int len);
+int ldchar2(char *src, int len, char *dst);
+int stchar2(char *src, char *dst, int len);
+float ldfloat(char *p);
+int stfloat(float f, char *p);
+double lddbl(char *p);
+int stdbl(double val, char *p);
+
+/* isdel1key.c */
+void _del1key(Fcb *fcb, Keydesc2 *pkeydesc2, char *record, Recno recnum);
+
+/* isdelcurr.c */
+int isdelcurr(int isfd);
+
+/* isdelrec.c */
+int isdelrec(int isfd, long recnum);
+
+/* isdiskbufs2.c */
+Bufhdr *_isdisk_fix(Fcb *fcb, int unixfd, Blkno blkno, int mode);
+void _isdisk_unfix(Bufhdr *p);
+void _isdisk_commit1(Bufhdr *p);
+void _isdisk_commit(void);
+void _isdisk_rollback(void);
+Bufhdr *_isdisk_refix(Bufhdr *p, int newmode);
+void _isdisk_sync(void);
+void _isdisk_inval(void);
+
+/* isdlink.c */
+void _isdln_base_insert(char *base, struct dlink *l, struct dlink *e);
+void _isdln_base_append(char *base, struct dlink *l, struct dlink *e);
+void _isdln_base_remove(char *base, struct dlink *e);
+struct dlink *_isdln_base_first(char *base, struct dlink *l);
+struct dlink *_isdln_base_next(char *base, struct dlink *l);
+struct dlink *_isdln_base_prev(char *base, struct dlink *l);
+void _isdln_base_makeempty(char *base, struct dlink *l);
+int _isdln_base_isempty(char *base, struct dlink *l);
+
+/* iserase.c */
+int iserase(char *isfname);
+
+/* iserror.c */
+void _isfatal_error(char *msg);
+void _isfatal_error1(char *msg);
+void _isam_warning(char *msg);
+int _isfatal_error_set_func(int (*func)(void));
+void _setiserrno2(int error, int is1, int is2);
+void _seterr_errcode(struct errcode *errcode);
+
+/* isfab.c */
+Fab *_fab_new(char *isfname, enum openmode openmode, Bool varlen, int minreclen, int maxreclen);
+void _fab_destroy(Fab *fab);
+
+/* isfcb.c */
+Fcb *_isfcb_create(char *isfname, int crdat, int crind, int crvar, int owner, int group, int u_mask, struct errcode *errcode);
+void _isfcb_setreclength(Fcb *fcb, Bool varflag, int minreclen, int maxreclen);
+Fcb *_isfcb_open(char *isfname, struct errcode *errcode);
+int _isfcb_nfds(Fcb *fcb);
+void _isfcb_remove(Fcb *fcb);
+void _isfcb_close(Fcb *fcb);
+int _isfcb_cntlpg_w(Fcb *fcb);
+int _isfcb_cntlpg_w2(Fcb *fcb);
+int _isfcb_cntlpg_r(Fcb *fcb);
+int _isfcb_cntlpg_r2(Fcb *fcb);
+int _check_isam_magic(Fcb *fcb);
+int _open2_indfile(Fcb *fcb);
+
+/* isfcbindex.c */
+int _isfcb_primkeyadd(Fcb *fcb, Keydesc2 *keydesc2);
+int _isfcb_primkeydel(Fcb *fcb);
+int _isfcb_altkeyadd(Fcb *fcb, Keydesc2 *keydesc2);
+Keydesc2 *_isfcb_findkey(Fcb *fcb, Keydesc2 *keydesc2);
+int _isfcb_altkeydel(Fcb *fcb, Keydesc2 *keydesc2);
+Keydesc2 *_isfcb_indfindkey(Fcb *fcb, int keyid);
+
+/* isfcbwatchfd.c */
+int _watchfd_incr(int n);
+int _watchfd_decr(int n);
+int _watchfd_check(void);
+int _watchfd_max_set(int n);
+int _watchfd_max_get(void);
+
+/* isfd.c */
+Isfd _isfd_insert(Fab *fab);
+Fab *_isfd_find(Isfd isfd);
+void _isfd_delete(Isfd isfd);
+
+/* isfileio.c */
+void _cp_tofile(Fcb *fcb, int unixfd, char *data, long pos, int len);
+void _cp_fromfile(Fcb *fcb, int unixfd, char *data, long pos, int len);
+Blkno _extend_file(Fcb *fcb, int unixfd, Blkno oldsize);
+
+/* isfixrec.c */
+int _flrec_write(Fcb *fcb, char *record, Recno *recnum, int reclen);
+int _flrec_read(Fcb *fcb, char *record, Recno recnum, int *reclen);
+long _fl_getpos(Fcb *fcb, Recno recnum);
+int _flrec_rewrite(Fcb *fcb, char *record, Recno recnum, int reclen);
+int _flrec_delete(Fcb *fcb, Recno recnum);
+int _flrec_wrrec(Fcb *fcb, char *record, Recno recnum, int reclen);
+
+/* isfname.c */
+void _makedat_isfname(char *isfname);
+void _makeind_isfname(char *isfname);
+void _makevar_isfname(char *isfname);
+void _removelast(char *path);
+char *_lastelement(char *path);
+
+/* isgarbage.c */
+int isgarbage(char *isfname);
+
+/* isindexconv.c */
+void stkey(Keydesc2 *pkeydesc2, char *p);
+void ldkey(struct keydesc2 *pkeydesc2, char *p);
+
+/* isindexinfo.c */
+int isindexinfo(int isfd, struct keydesc *buffer, int number);
+
+/* isindfreel.c */
+Blkno _isindfreel_alloc(Fcb *fcb);
+void _isindfreel_free(Fcb *fcb, Blkno blkno);
+
+/* iskeyaux.c */
+void _iskey_extract(Keydesc2 *pkeydesc2, char *recp, char *keyp);
+Bufhdr *_allockpage(Fcb *fcb, int capac, int level, Blkno *blkno);
+
+/* iskeycalc.c */
+int getkeysperleaf(int keylen);
+int getkeyspernode(int keylen);
+int le_odd(int n);
+
+/* iskeycmp.c */
+void _iskeycmp_set(Keydesc2 *pkeydesc2, int nparts);
+int _iskeycmp(char *lkey, char *rkey);
+
+/* iskeyconv.c */
+void _iskey_itox(struct keydesc2 *pikdesc, struct keydesc *pxkdesc);
+void _iskey_xtoi(struct keydesc2 *pikdesc, struct keydesc *pxkdesc);
+
+/* iskeyvalid.c */
+int _validate_keydesc(struct keydesc *keydesc, int minreclen);
+
+/* isminmax.c */
+void _iskey_fillmax(struct keydesc2 *pkeydesc2, char *keybuf);
+void _iskey_fillmin(struct keydesc2 *pkeydesc2, char *keybuf);
+
+/* ismngfcb.c */
+void _mngfcb_insert(Fcb *fcb, Bytearray *isfhandle);
+Fcb *_mngfcb_find(Bytearray *isfhandle);
+void _mngfcb_delete(Bytearray *isfhandle);
+Bytearray *_mngfcb_victim(void);
+
+/* isopen.c */
+int isopen(char *isfname, int mode);
+
+/* ispageio.c */
+void _isseekpg(int fd, Blkno pgno);
+void _isreadpg(int fd, char *buf);
+void _iswritepg(int fd, char *buf);
+
+/* isperm.c */
+enum openmode _getopenmode(int mode);
+enum readmode _getreadmode(int mode);
+
+/* isread.c */
+int isread(int isfd, char *record, int mode);
+
+/* isrename.c */
+int isrename(char *oldname, char *newname);
+
+/* isrepair.c */
+int isrepair(char *isfname, int verbose);
+
+/* isrewcurr.c */
+int isrewcurr(int isfd, char *record);
+
+/* isrewrec.c */
+int isrewrec(int isfd, long recnum, char *record);
+
+/* issignals.c */
+int _issignals_cntl(int opt);
+void _issignals_mask(void);
+void _issignals_unmask(void);
+
+/* issort.c */
+Issort *_issort_create(int reclen, int nrecs, int (*compfunc)(char *, char *));
+void _issort_destroy(Issort *srt);
+void _issort_insert(Issort *srt, char *record);
+void _issort_sort(Issort *srt);
+void _issort_rewind(Issort *srt);
+char *_issort_read(Issort *srt);
+
+/* isstart.c */
+int isstart(int isfd, struct keydesc *keydesc, int length, char *record, int mode);
+
+/* issync.c */
+int issync(void);
+int isfsync(int isfd);
+int _issync(void);
+int _isfsync(int isfd);
+
+/* isvarrec.c */
+int _vlrec_write(Fcb *fcb, char *record, Recno *recnum, int reclen);
+int _vlrec_read(Fcb *fcb, char *record, Recno recnum, int *reclen);
+long _vl_getpos(Fcb *fcb, Recno recnum);
+int _vlrec_rewrite(Fcb *fcb, char *record, Recno recnum, int reclen);
+int _vlrec_delete(Fcb *fcb, Recno recnum);
+int _vlrec_wrrec(Fcb *fcb, char *record, Recno recnum, int reclen);
+long _istail_insert(Fcb *fcb, char *tailp, int taillen);
+int _istail_modify(Fcb *fcb, long offset, char *tailp, int taillen);
+
+/* isvars.c */
+
+/* isversion.c */
+
+/* iswrite.c */
+int iswrite(int isfd, char *record);
+
+/* iswrrec.c */
+int iswrrec(int isfd, long recnum, char *record);
+
index 3b9828a646f5565d035c8ec668aec009d0efcd33..f9adb67571d48f83b4df29cf47bdf350235da89a 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isamaddindex.c /main/3 1995/10/23 11:34:12 rswiston $                                                       */
-#ifndef lint
-static char sccsid[] = "@(#)isamaddindex.c 1.14 89/09/14 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -68,10 +65,7 @@ static void checkavailfd(void);
 
 /*ARGSUSED*/
 int
-_amaddindex(isfhandle, keydesc, errcode)
-    Bytearray          *isfhandle;
-    struct keydesc     *keydesc;
-    struct errcode     *errcode;
+_amaddindex(Bytearray *isfhandle, struct keydesc *keydesc, struct errcode *errcode)
 {
     Fcb                        *fcb = NULL;
     Keydesc2           keydesc2;
@@ -195,10 +189,7 @@ _amaddindex(isfhandle, keydesc, errcode)
 
 /*ARGSUSED*/
 int
-_amaddprimary(isfhandle, keydesc, errcode)
-    Bytearray          *isfhandle;
-    struct keydesc     *keydesc;
-    struct errcode     *errcode;
+_amaddprimary(Bytearray *isfhandle, struct keydesc *keydesc, struct errcode *errcode)
 {
     Fcb                        *fcb = NULL;
     Keydesc2           keydesc2;
@@ -319,9 +310,7 @@ _amaddprimary(isfhandle, keydesc, errcode)
  * Check unique constraint, create duplicate serial numbers.
  */
 
-int _create_index(fcb, pkeydesc2)
-    Fcb                        *fcb;
-    Keydesc2           *pkeydesc2;
+int _create_index(Fcb *fcb, Keydesc2 *pkeydesc2)
 {
     Issort             *srt;
     int                        keylength = pkeydesc2->k2_len;
@@ -391,10 +380,7 @@ int _create_index(fcb, pkeydesc2)
  */
 
 Static void
-_readallrecords(fcb, srt, pkeydesc2)
-    Fcb                        *fcb;   
-    Issort             *srt;
-    Keydesc2           *pkeydesc2;
+_readallrecords(Fcb *fcb, Issort *srt, Keydesc2 *pkeydesc2)
 {
        char            record [ISMAXRECLEN];
        char            keybuf [MAXKEYSIZE];
@@ -436,9 +422,7 @@ _readallrecords(fcb, srt, pkeydesc2)
  */
 
 Static void
-_attach_dups_serial(srt, pkeydesc2)
-    Issort             *srt;
-    Keydesc2           *pkeydesc2;
+_attach_dups_serial(Issort *srt, Keydesc2 *pkeydesc2)
 {
     int                        netkeylength = pkeydesc2->k2_len - RECNOSIZE - DUPIDSIZE;
     char               *curkey;
@@ -447,7 +431,7 @@ _attach_dups_serial(srt, pkeydesc2)
 
     _issort_rewind(srt);
 
-    while (curkey = _issort_read(srt)) {
+    while ((curkey = _issort_read(srt))) {
        if (lastkey && memcmp(lastkey + RECNOSIZE + DUPIDSIZE,
                              curkey + RECNOSIZE + DUPIDSIZE,
                               netkeylength) == 0)
@@ -471,10 +455,7 @@ _attach_dups_serial(srt, pkeydesc2)
  */
 
 Static Blkno 
-_buildbtree(fcb, pkeydesc2, srt)
-    Fcb                        *fcb;
-    Keydesc2           *pkeydesc2;
-    Issort             *srt;
+_buildbtree(Fcb *fcb, Keydesc2 *pkeydesc2, Issort *srt)
 {
     Bufhdr             *_allockpage();
     int                        depth;
@@ -628,9 +609,7 @@ _buildbtree(fcb, pkeydesc2, srt)
  * Return 1 if there are duplicates in the sorted key object. 
  */
 
-Static int _duplicate_exist(srt, keylength)
-    Issort     *srt;
-    int                keylength;
+Static int _duplicate_exist(Issort *srt, int keylength)
 {
     char       *curkey;
     char       *lastkey = (char *) 0;
@@ -638,7 +617,7 @@ Static int _duplicate_exist(srt, keylength)
 
     _issort_rewind(srt);
 
-    while (curkey = _issort_read(srt)) {
+    while ((curkey = _issort_read(srt))) {
            if (lastkey && memcmp(lastkey + RECNOSIZE, curkey + RECNOSIZE,
                                  netkeylength) == 0) 
                    return 1;                /* Duplicate key found */
index 68a77c23e3c6c0a446d105f6f95b0fa3319aebc6..7f3537d14195d553ef55dd3b313e4f35e994c53c 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isamdelrec.c /main/3 1995/10/23 11:34:30 rswiston $                                                         */
-#ifndef lint
-static char sccsid[] = "@(#)isamdelrec.c 1.6 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -60,10 +57,7 @@ void _delkeys();
  */
 
 int
-_amdelrec(isfhandle, recnum, errcode)
-    Bytearray          *isfhandle;
-    Recno              recnum;
-    struct errcode     *errcode;
+_amdelrec(Bytearray *isfhandle, Recno recnum, struct errcode *errcode)
 {
     Fcb                        *fcb = NULL;
     char               recbuf[ISMAXRECLEN];
@@ -145,13 +139,10 @@ _amdelrec(isfhandle, recnum, errcode)
  */
 
 void
-_delkeys(fcb, record, recnum)
-    register Fcb       *fcb;
-    char                *record;
-    Recno              recnum;
+_delkeys(Fcb *fcb, char *record, Recno recnum)
 {
     int                         nkeys = fcb->nkeys;
-    register int                i;
+    int                i;
 
     for (i = 0; i < nkeys; i++) {
         _del1key(fcb, fcb->keys + i, record, recnum);
index 56ec810ab3bacfd4a3578a3bda004afea5ecfe48..a04e533e57da4667fae33614822853e1c5e194dd 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isamerror.c /main/3 1995/10/23 11:34:39 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)isamerror.c 1.4 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -86,11 +83,9 @@ static struct errstattab {
  */
 
 void
-_amseterrcode(errcode, is_errno)
-    struct errcode             *errcode;
-    int                                is_errno;
+_amseterrcode(struct errcode *errcode, int is_errno)
 {
-    register struct errstattab         *p;
+    struct errstattab  *p;
     errcode->iserrno = is_errno;
 
     /*
index 6d5b939495cd5acf127248d5e81c12c7ffaee1b4..01ccd1be81e749f46935fc28b3ba44b42fa5e97f 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isamhooks.c /main/3 1995/10/23 11:34:48 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)isamhooks.c 1.7 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -50,7 +47,7 @@ extern struct dlink  *pavail;
  */
 
 void
-_isam_entryhook()
+_isam_entryhook(void)
 {
     isdupl = 0;                                     /* Reset duplicate indicator */
     _setiserrno2(0, '0', '0');
@@ -62,7 +59,7 @@ _isam_entryhook()
  */
 
 void
-_isam_exithook()
+_isam_exithook(void)
 {
     _isdisk_inval();                        /* Invalidate all buffers */
 }
index ea62581272c46f9c3d7163972de1d01abfa006aa..680c7dd53deb3533dfc7beca33e104fe64a5cd60 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $TOG: isamopen.c /main/5 1998/04/10 08:03:57 mgreess $                                                    */
-#ifndef lint
-static char sccsid[] = "@(#)isamopen.c 1.10 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -65,20 +62,13 @@ static char sccsid[] = "@(#)isamopen.c 1.10 89/07/17 Copyr 1988 Sun Micro";
 
 /* ARGSUSED */
 int
-_amopen(isfname, openmode, varflag, minlen, maxlen,
-       isfhandle, curpos, errcode)
-    char               *isfname;
-    enum openmode      openmode;
-    Bool               *varflag;
-    int                        *minlen, *maxlen;
-    Bytearray          *isfhandle;
-    Bytearray          *curpos;
-    struct errcode     *errcode;
+_amopen(char *isfname, enum openmode openmode, Bool *varflag,
+        int *minlen, int *maxlen, Bytearray *isfhandle,
+        Bytearray *curpos, struct errcode *errcode)
 {
     Fcb                        *fcb;
     Bytearray          isfhandle0;
     Crp                        *crp;
-    int                        err;
 
 
     _isam_entryhook();
@@ -182,9 +172,7 @@ _amopen(isfname, openmode, varflag, minlen, maxlen,
 
 #define FDNEEDED       3                    /* Needs 3 UNIX fd to open a file*/
 Fcb *
-_openfcb(isfhandle, errcode)
-    Bytearray          *isfhandle;
-    struct errcode     *errcode;
+_openfcb(Bytearray *isfhandle, struct errcode *errcode)
 {
     Fcb                        *fcb;
     Bytearray          *isfhandle2;
@@ -300,8 +288,7 @@ _openfcb(isfhandle, errcode)
  */
 
 char *
-_getisfname(isfhandle)
-    Bytearray          *isfhandle;
+_getisfname(Bytearray *isfhandle)
 {
     return (isfhandle->data);
 }
@@ -314,8 +301,7 @@ _getisfname(isfhandle)
  */
 
 Bytearray 
-_makeisfhandle(isfname)
-    char       *isfname;
+_makeisfhandle(char *isfname)
 {
     return (_bytearr_new((u_short)(strlen(isfname) + 1), isfname));
 }
index f28f319e3e6dd367e3b2cf4df2a43ae19c0a18bb..b2922a721f9124541ea27170e515997c38ba5963 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isamwrite.c /main/3 1995/10/23 11:35:14 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)isamwrite.c 1.6 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -66,13 +63,8 @@ extern long *ismaxlong;
  */
 
 int
-_amwrite(isfhandle, record, reclen, curpos, recnum, errcode)
-    Bytearray          *isfhandle;
-    char               *record;
-    int                        reclen;
-    Bytearray          *curpos;
-    Recno              *recnum;
-    struct errcode     *errcode;
+_amwrite(Bytearray *isfhandle, char *record, int reclen,
+         Bytearray *curpos, Recno *recnum, struct errcode *errcode)
 {
     Fcb                        *fcb = NULL;
     Recno              recnum2;
@@ -166,13 +158,10 @@ _amwrite(isfhandle, record, reclen, curpos, recnum, errcode)
  * Returns ISOK, or EDUPS.
  */
 
-int _addkeys (fcb, record, recnum)
-    register Fcb       *fcb;
-    char                *record;
-    Recno              recnum;
+int _addkeys (Fcb *fcb, char *record, Recno recnum)
 {
     int                         nkeys = fcb->nkeys;
-    register int                i;
+    int                i;
     int                                err;
 
     for (i = 0; i < nkeys; i++) {
@@ -185,14 +174,10 @@ int _addkeys (fcb, record, recnum)
 }      
 
 Static int
-_addkeys2 (fcb, record, recnum, curpos)
-    Fcb                        *fcb;
-    char                *record;
-    Recno              recnum;
-    Bytearray          *curpos;
+_addkeys2 (Fcb *fcb, char *record, Recno recnum, Bytearray *curpos)
 {
     int                        nkeys = fcb->nkeys;
-    register int        i;
+    int        i;
     int                        err;
     Crp                        *crp;
     int                        keyid;
index ff009aca1ecec4cb485a94566f43d9401342d309..1c210b99ba68a2085c18c1d126dbd5a31645127f 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isapplmr.c /main/3 1995/10/23 11:35:25 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)isapplmr.c 1.5 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -41,6 +38,7 @@ static char sccsid[] = "@(#)isapplmr.c 1.5 89/07/17 Copyr 1988 Sun Micro";
 
 
 #include "isam_impl.h"
+#include <unistd.h>
 #include <sys/file.h>
 #include <sys/time.h>
 #include "isam_impl.h"
@@ -55,11 +53,9 @@ static char sccsid[] = "@(#)isapplmr.c 1.5 89/07/17 Copyr 1988 Sun Micro";
  */
 
 int 
-_isapplmr(isfd, buffer)
-    int                        isfd;
-    char               *buffer;
+_isapplmr(int isfd, char *buffer)
 {
-    register Fab       *fab;
+    Fab        *fab;
     Fcb                 *fcb = NULL;
     char                cntl_page[CP_NKEYS_OFF];
 
index bdf70abd8d9db9f65ecb0387fd7937f75dbd23a8..87f356ba7a0d2ca591849a1a045f0f85530e903a 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isapplmw.c /main/3 1995/10/23 11:35:35 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)isapplmw.c 1.5 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -41,6 +38,7 @@ static char sccsid[] = "@(#)isapplmw.c 1.5 89/07/17 Copyr 1988 Sun Micro";
 
 
 #include "isam_impl.h"
+#include <unistd.h>
 #include <sys/file.h>
 #include <sys/time.h>
 
@@ -54,11 +52,9 @@ static char sccsid[] = "@(#)isapplmw.c 1.5 89/07/17 Copyr 1988 Sun Micro";
  */
 
 int 
-_isapplmw(isfd, magicstring)
-    int                        isfd;
-    char               *magicstring;
+_isapplmw(int isfd, char *magicstring)
 {
-    register Fab       *fab;
+    Fab        *fab;
     int                        ret;
     Fcb                 *fcb;
     char                cntl_page[CP_NKEYS_OFF];
index d6aca7bc735abd3acb52adcb9dd66856b8c946d9..2fae98df969800e06912aaa57924dc920995876d 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isbsearch.c /main/3 1995/10/23 11:35:44 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)isbsearch.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
@@ -45,15 +42,10 @@ static char sccsid[] = "@(#)isbsearch.c 1.3 89/07/17 Copyr 1988 Sun Micro";
  */
 
 
-char *_isbsearch (key,table,nelems,keylen,cmpf)
-    char *key;
-    char *table;
-    int nelems;
-    int keylen;
-    int (*cmpf) ();
+char *_isbsearch (char *key, char *table, int nelems, int keylen, int (*cmpf) ())
 {
-    register int len,l1,result;                     /* current length of array to search */
-    register char *p,*low;
+    int len,l1,result;              /* current length of array to search */
+    char *p,*low;
     
     if (nelems <= 0) return (char *) 0;
 
index eda087527dbd33ccbde17caa93ce146ea9a9388b..7839ce66b5bade3907006f57938fad21dc2317fa 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isbtree.c /main/3 1995/10/23 11:35:52 rswiston $                                                    */
-#ifndef lint
-    static char sccsid[] = "@(#)isbtree.c 1.4 89/07/17 Copyr 1988 Sun Micro";
-#endif
 
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  *
  * Description:
  *     B-tree operations: SEARCH
- *     
+ *
  */
 #include <stdlib.h>
 
 #include "isam_impl.h"
 
-extern int _iskeycmp();
 
-/* 
- * _isbtree_create() 
+/*
+ * _isbtree_create()
  *
  * Create a B-tree path object that will used in subsequent operations.
  */
 
 Btree *
-    _isbtree_create(fcb, pkeydesc2)
-Fcb                    *fcb;
-Keydesc2               *pkeydesc2;
+    _isbtree_create(Fcb *fcb, Keydesc2 *pkeydesc2)
 {
-    register Btree     *p;
-    
+    Btree      *p;
+
     p = (Btree *) _ismalloc(sizeof(*p));
     memset((char *)p, 0, sizeof(*p));
-    
+
     p->fcb = fcb;
-    p->keydesc2 = pkeydesc2;   
-    
+    p->keydesc2 = pkeydesc2;
+
     return (p);
 }
 
 
-/* 
- * _isbtr_destroy() 
+/*
+ * _isbtr_destroy()
  *
- * Destroy B-tree path object 
+ * Destroy B-tree path object
  */
 
 void
-_isbtree_destroy(btree)
-    register Btree *btree;
+_isbtree_destroy(Btree *btree)
 {
-    register int       i;
-    
+    int        i;
+
     for (i = 0; i < btree->depth;i++) {
        _isdisk_unfix(btree->bufhdr[i]);
     }
@@ -88,16 +81,14 @@ _isbtree_destroy(btree)
 }
 
 
-/* 
- * _isbtree_search() 
+/*
+ * _isbtree_search()
  *
  * Descend the B-tree, position pointer on or before the matched key.
  */
 
 void
-_isbtree_search(btree, key)
-    register Btree     *btree;
-char           *key;                /* Search for this key */
+_isbtree_search( Btree *btree, char *key)
 {
     Keydesc2           *pkeydesc2 = btree->keydesc2;
     Blkno              rootblkno = pkeydesc2->k2_rootnode;
@@ -105,113 +96,110 @@ char             *key;                /* Search for this key */
     int                        index;               /* Index to tables in btree */
     /* Has value of 1, next 2, etc. */
     int                        elevation;           /* Level - leaves have value 0 */
-    register char      *p;                  /* Pointer to key page */
+    char       *p;                  /* Pointer to key page */
     int                        nkeys;               /* Number of keys in the page */
     char               *key2;               /* Equal or next lower key */
     int                        curpos;              /* index of key2 in key page */
     Blkno              blkno;
-    
+
     /* Set comparison function. */
     _iskeycmp_set(pkeydesc2, pkeydesc2->k2_nparts + 1);        /* +1 for recno field */
-    
+
     index = 0;
     blkno = rootblkno;
     do {
-       btree->bufhdr[index] = 
+       btree->bufhdr[index] =
            _isdisk_fix(btree->fcb,  btree->fcb->indfd, blkno, ISFIXREAD);
        p = btree->bufhdr[index]->isb_buffer; /* pointer to buffer */
-       
+
        /* Load some fields from the key page. */
        nkeys = ldshort(p+BT_NKEYS_OFF);     /* Number of keys in the page */
        elevation = ldshort(p+BT_LEVEL_OFF); /* Level of the page */
-       
+
        /* Binary search in the key page to find equal or next lowere key. */
        key2 = _isbsearch(key, p+BT_KEYS_OFF, nkeys, keylength, _iskeycmp);
-       
+
        curpos = (key2) ? ((key2 - p - BT_NKEYS_OFF) / keylength) : 0;
-       
-       btree->curpos[index] = 
+
+       btree->curpos[index] =
            (key2 == (char *)0 && elevation==0)? -1 : curpos;
-       
-       if (elevation > 0) 
+
+       if (elevation > 0)
            blkno = ldblkno(p + ISPAGESIZE - (curpos + 1) * BLKNOSIZE);
-       
+
        index++;
     } while (elevation > 0);
-    
+
     btree->depth = index;
 }
 
-/* 
- * _isbtree_current() 
+/*
+ * _isbtree_current()
  *
- * Get pointer to the current key 
+ * Get pointer to the current key
  */
 
 char *
-_isbtree_current(btree)
-    register Btree     *btree;
+_isbtree_current(Btree *btree)
 {
     int                        curpos;
-    
+
     assert(btree->depth > 0);
     if ((curpos = btree->curpos[btree->depth - 1]) == -1)
        return (NULL);
     else
-       return (btree->bufhdr[btree->depth - 1]->isb_buffer 
+       return (btree->bufhdr[btree->depth - 1]->isb_buffer
                + BT_KEYS_OFF + curpos * btree->keydesc2->k2_len);
 }
 
-/* 
+/*
  * _isbtree_next()
  *
- * Get pointer to the next key 
+ * Get pointer to the next key
  */
 
 char *
-_isbtree_next(btree)
-    register Btree     *btree;
+_isbtree_next(Btree *btree)
 {
     int                        curpos;
     int                        depth = btree->depth;
-    register char      *p;
-    register int       level;
+    char       *p;
+    int        level;
     Blkno              blkno;
-    
+
     assert(depth > 0);
-    
-    /* 
+
+    /*
      * Move up along the path, find first block where we can move to the right.
      */
     for (level = depth - 1; level >= 0; level--) {
        p = btree->bufhdr[level]->isb_buffer;
-       
+
        if (btree->curpos[level] < ldshort(p + BT_NKEYS_OFF) - 1)
            break;
     }
-    
+
     if (level < 0) {
        /* Logical end of the index file. No next record. */
        return (NULL);
     }
-    
+
     curpos = ++(btree->curpos[level]);
-    
+
     while (++level < depth) {
-       
+
        /* Get block number to block in next lower level. */
        if (level > 0)
            blkno = ldblkno(p + ISPAGESIZE - (curpos + 1) * BLKNOSIZE);
-       
+
        /* Unfix page in this level, fetch its right brother. */
        _isdisk_unfix(btree->bufhdr[level]);
-       btree->bufhdr[level] = 
+       btree->bufhdr[level] =
            _isdisk_fix(btree->fcb, btree->fcb->indfd, blkno, ISFIXREAD);
        p = btree->bufhdr[level]->isb_buffer;
-       
+
        curpos = btree->curpos[level] = 0;
     }
-    
+
     return (p + BT_KEYS_OFF + curpos * btree->keydesc2->k2_len);
 }
-
index b819753ebca9adeecdf2b046769d340c51381546..2ce2396c300db6989eaa879019dfa3ba675525df 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isbtree2.c /main/3 1995/10/23 11:36:02 rswiston $                                                   */
-#ifndef lint
-    static char sccsid[] = "@(#)isbtree2.c 1.5 89/07/17 Copyr 1988 Sun Micro";
-#endif
 
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
@@ -61,7 +58,7 @@ _isbtree_insert(Btree *btree, char *key)
     int                        nkeys;               /* Number of keys in the page */
     int                        capac;
     char               keybuf[MAXKEYSIZE];
-    register int       i;
+    int        i;
     Blkno              blkno;
     char               *pkp, *pkp2, *pkp3;
     Bufhdr             *kp2bhdr, *kp3bhdr;
index d5bd26964e16a5e1f1dc7957c349a371ba1db77f..adb6c4c48b3f6911f45937064ef74766325d7110 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isbtree3.c /main/3 1995/10/23 11:36:12 rswiston $                                                   */
-#ifndef lint
-    static char sccsid[] = "@(#)isbtree3.c 1.5 89/07/17 Copyr 1988 Sun Micro";
-#endif
 
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
@@ -56,7 +53,7 @@ _isbtree_remove(Btree *btree)
 {
     struct keydesc2    *pkeydesc2 = btree->keydesc2;
     int                        nkeys;               /* Number of keys in the page */
-    register int       i;
+    int        i;
     char               *pkp, *pkp2, *pkp3;
     struct bufhdr      *kp2bhdr;
     Blkno              blkno2;
index 949422eb0a4c09f7466a361c13a5e63ffd8124d6..875468a71deaab37c541f34116e7ead7c10c84fc 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isbuild.c /main/3 1995/10/23 11:36:21 rswiston $                                                    */
-#ifndef lint
-static char sccsid[] = "@(#)isbuild.c 1.12 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -41,14 +38,19 @@ static char sccsid[] = "@(#)isbuild.c 1.12 89/07/17 Copyr 1988 Sun Micro";
 
 
 #include "isam_impl.h"
+#include <unistd.h>
 #include <netdb.h>
 #include <sys/file.h>
 #include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
 
-extern char _isam_version[];
-static char *_version_ = _isam_version;
-
-static int _ambuild();
+static int
+_ambuild(char *isfname, enum openmode openmode, Bool varflag,
+         int minlen, int maxlen, struct keydesc *primkey,
+         int owner, int group, int umask,
+         Bytearray *isfhandle, Bytearray *curpos,
+         struct errcode *errcode);
 
 /*
  * isfd = isbuild(isfname, recordlength, primkey, mode)
@@ -81,11 +83,7 @@ static int _ambuild();
  */
 
 int
-isbuild(isfname, recordlength, primkey, mode)
-    char               *isfname;
-    int                        recordlength;
-    struct keydesc     *primkey;
-    int                        mode;
+isbuild(char *isfname, int recordlength, struct keydesc *primkey, int mode)
 {
     Fab                        *fab;
     Isfd               isfd;
@@ -191,18 +189,12 @@ isbuild(isfname, recordlength, primkey, mode)
 
 /* ARGSUSED */
 static int
-_ambuild(isfname, openmode, varflag, minlen, maxlen, primkey, 
-        owner, group, umask, isfhandle, curpos, errcode)
-    char               *isfname;
-    enum openmode      openmode;
-    Bool               varflag;
-    int                        minlen, maxlen;
-    struct keydesc     *primkey;
-    int                        owner, group;
-    Bytearray          *isfhandle;
-    Bytearray          *curpos;
-    struct errcode     *errcode;
-    int                        umask;
+_ambuild(char *isfname, enum openmode openmode, Bool varflag,
+         int minlen, int maxlen, struct keydesc *primkey,
+         int owner, int group, int umask,
+         Bytearray *isfhandle, Bytearray *curpos,
+         struct errcode *errcode)
+    
 {
     Fcb                        *fcb = NULL;
     Bytearray          *isfhandle2;
index e7bbce36b489f699b220bf58e98495fa847cf71d..70de388f2dbc391b7cf77ebc553925771708be2d 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isbytearray.c /main/3 1995/10/23 11:36:32 rswiston $                                                        */
-#ifndef lint
-static char sccsid[] = "@(#)isbytearray.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -51,7 +48,7 @@ static char sccsid[] = "@(#)isbytearray.c 1.3 89/07/17 Copyr 1988 Sun Micro";
  */
 
 Bytearray 
-_bytearr_getempty()
+_bytearr_getempty(void)
 {
     static Bytearray   empty_bytearray = { 0, NULL};
 
@@ -65,9 +62,7 @@ _bytearr_getempty()
  */
 
 Bytearray
-_bytearr_new(len, data)
-    u_short            len;
-    char               *data;
+_bytearr_new(u_short len, char *data)
 {
     Bytearray          bytearray;
 
@@ -85,8 +80,7 @@ _bytearr_new(len, data)
  */
 
 Bytearray
-_bytearr_dup(old)
-    Bytearray          *old;
+_bytearr_dup(Bytearray *old)
 {
     return (_bytearr_new(old->length, old->data));
 }
@@ -98,8 +92,7 @@ _bytearr_dup(old)
  */
 
 void
-_bytearr_free(barray)
-    register Bytearray *barray;
+_bytearr_free(Bytearray *barray)
 {
     if (barray->data)
        free(barray->data);
@@ -115,8 +108,7 @@ _bytearr_free(barray)
  */
 
 int
-_bytearr_cmp(l,r)
-    register Bytearray *l, *r;
+_bytearr_cmp(Bytearray *l, Bytearray *r)
 {
     if (l->length == r->length)
        return (memcmp(l->data, r->data, (int)l->length));
index 22bebbfcd7f80912cfcc17c01da7e320a7302ebf..bae1e990a29a088eaf7b69951e9b89202581e078 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: ischange1key.c /main/3 1995/10/23 11:36:41 rswiston $                                                       */
-#ifndef lint
-static char sccsid[] = "@(#)ischange1key.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -46,13 +43,8 @@ static char sccsid[] = "@(#)ischange1key.c 1.3 89/07/17 Copyr 1988 Sun Micro";
 extern long *ismaxlong;
 
 int
-_change1key(fcb, pkeydesc2, record, oldrecord, recnum, newkey)
-    Fcb                        *fcb;   
-    Keydesc2           *pkeydesc2;
-    char               *record;
-    char               *oldrecord;
-    Recno              recnum;
-    char               *newkey;
+_change1key(Fcb *fcb, Keydesc2 *pkeydesc2, char *record,
+            char *oldrecord, Recno recnum, char *newkey)
 {
     char               keybuf1[MAXKEYSIZE];
     char               keybuf2[MAXKEYSIZE];
index b08563f4ee06357226fd589b9929956c5d4f79bb..acb4ab11b9ca6a5329e707107e5b1a0f83b6f95a 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isclose.c /main/3 1995/10/23 11:36:50 rswiston $                                                    */
-#ifndef lint
-static char sccsid[] = "@(#)isclose.c 1.8 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -57,8 +54,7 @@ static char sccsid[] = "@(#)isclose.c 1.8 89/07/17 Copyr 1988 Sun Micro";
  */
 
 int
-isclose(isfd)
-    int                isfd;
+isclose(int isfd)
 {
     Fab                *fab;
     Fcb         *fcb;
index 780eec56c3f62f5da185153efa335e97cdacb263..f243e534562aaa7be194ccc2beb97d026bc937e9 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: iscntl.c /main/3 1995/10/23 11:36:59 rswiston $                                                     */
-#ifndef lint
-static char sccsid[] = "@(#)iscntl.c   1.8 94/11/17";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -90,7 +87,6 @@ iscntl(isfd, func, va_alist)
     va_dcl
 #endif
 {
-    extern             int ( *_isfatal_error_set_func)();
     va_list            pvar;
     int                        ret;
 
index 41c7fa064039e630e3b6234e1ce6b10f282bbb94..e1ca4628cc2253c3170eece966f5b5f83169a756 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                    */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                              */
 /*%%  $XConsortium: iscurpos.c /main/3 1995/10/23 11:37:08 rswiston $                                                       */
-#ifndef lint
-static char sccsid[] = "@(#)iscurpos.c 1.5 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -53,10 +50,7 @@ static char sccsid[] = "@(#)iscurpos.c 1.5 89/07/17 Copyr 1988 Sun Micro";
  */
 
 int 
-isgetcurpos(isfd, len, buf)
-    int                isfd;
-    int                *len;
-    char       **buf;
+isgetcurpos(int isfd, int *len, char **buf)
 {
     Fab                *fab;
     u_short    total_len;
@@ -94,9 +88,7 @@ isgetcurpos(isfd, len, buf)
  */
 
 int 
-issetcurpos(isfd, buf)
-    int                isfd;
-    char       *buf;
+issetcurpos(int isfd, char *buf)
 {
     Fab                *fab;
     u_short    len;
index d3167f2d15adb0ba3262fab65b158608a7985541..44d311148ae6e632532f380e3b7359e7e36e7355 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isdatconv.c /main/3 1995/10/23 11:37:16 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)isdatconv.c 1.5 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -36,7 +33,7 @@ static char sccsid[] = "@(#)isdatconv.c 1.5 89/07/17 Copyr 1988 Sun Micro";
  * isdatconv.c
  *
  * Description:
- *      Conversion function between machine dependent and the X/OPEN 
+ *      Conversion function between machine dependent and the X/OPEN
  *     machine independent formats.
  *
  * Some pieces of code may not be very "structured", but they result in
@@ -52,30 +49,27 @@ static char sccsid[] = "@(#)isdatconv.c 1.5 89/07/17 Copyr 1988 Sun Micro";
 
 /* ldlong() - Load a long integer from a potentially  unaligned address */
 
-long 
-ldlong(p)
-    register char      *p;
+long
+ldlong(char *p)
 {
     int i;
 #if LONG_BIT == 64
-    register unsigned long val;
+    unsigned long val;
 #else
-    register unsigned int val;
+    unsigned int val;
 #endif
 
     val = 0;
-    for (i=0; i<LONGSIZE ; i++)  
+    for (i=0; i<LONGSIZE ; i++)
         val = (val << 8) + *((unsigned char *)p++);
-    
+
     return ((long)val);
 }
 
 /* stlong() - Store a long integer at a potentially unaligned address */
 
 int
-stlong(val, p)
-    register long      val;
-    register char      *p;
+stlong(long val, char *p)
 {
     int i;
     p += LONGSIZE;
@@ -89,10 +83,9 @@ stlong(val, p)
 /* ldint() - Load a short integer from a potentially  unaligned address */
 
 short
-ldint(p)
-    register char      *p;
+ldint(char *p)
 {
-    register unsigned int val;
+    unsigned int val;
 
     val = *((unsigned char *)p++);
     val = (val << 8) + *((unsigned char *)p++);
@@ -104,10 +97,9 @@ ldint(p)
 /* ldunshort - load a unshort integer : for 64K record length */
 
 u_short
-ldunshort(p)
-    register char      *p;
+ldunshort(char *p)
 {
-    register unsigned int val;
+    unsigned int val;
 
     val = *((unsigned char *)p++);
     val = (val << 8) + *((unsigned char *)p++);
@@ -118,9 +110,7 @@ ldunshort(p)
 /* stint() - Store a short integer at a potentially unaligned address */
 
 int
-stint(val, p)
-    register short     val;
-    register char      *p;
+stint(short val, char *p)
 {
     p += SHORTSIZE;
     *--p = val & 255;
@@ -132,12 +122,9 @@ stint(val, p)
 /* ldchar() - Load character field */
 
 int
-ldchar(src, len, dst)
-    char               *src;
-    register char      *dst;
-    int                        len;
+ldchar(char *src, int len, char *dst)
 {
-    register char      *p;
+    char       *p;
 
     if (len <= 0)
        return 0;
@@ -158,23 +145,20 @@ ldchar(src, len, dst)
 }
 
 int
-stchar(src, dst, len)
-    register char      *src;
-    register char      *dst;
-    register int       len;
+stchar(char *src, char *dst, int len)
 {
-    register char      c;
+    char       c;
 
     if (len <= 0)
        return 0;
 
     /* Copy up to NULL character. */
     do {
-       if ((c = *src++) == '\0') 
+       if ((c = *src++) == '\0')
            break;
        *dst++ = c;
     } while (--len > 0);
-    
+
     /* Pad with blanks. */
     if (len > 0)
        (void) memset((void *) dst, BLANK, len);
@@ -182,42 +166,35 @@ stchar(src, dst, len)
 }
 
 /* ldchar2() - Load character field (C style, NULL padded) */
+
 int
-ldchar2(src, len, dst)
-    char                *src;
-    register char       *dst;
-    int                 len;
+ldchar2(char *src, int len, char *dst)
 {
-    register char       *p;
+
     if (len <= 0)
         return 0;
+
     /* Load the entire string. */
     memcpy((void *) dst, (const void *) src, len);
     *(dst + len) = '\0';
     return 0;
 }
+
 int
-stchar2(src, dst, len)
-    register char       *src;
-    register char       *dst;
-    register int        len;
+stchar2(char *src, char *dst, int len)
 {
-    register char       c;
+    char       c;
+
     if (len <= 0)
         return 0;
+
     /* Copy up to a NULL character. */
     do {
         if ((c = *src++) == '\0')
             break;
         *dst++ = c;
     } while (--len > 0);
-    
+
     /* Pad with NULLs. */
     if (len > 0)
         memset(dst, 0, len);
@@ -227,14 +204,13 @@ stchar2(src, dst, len)
 /* ldfloat() - Load a float number from a potentially  unaligned address */
 
 float
-ldfloat(p)
-    register char      *p;
+ldfloat(char *p)
 {
     union {
        float fval;
        int   ival;
     } uval;
-    register unsigned int val;
+    unsigned int val;
 
     val = *((unsigned char *)p++);
     val = (val << 8) + *((unsigned char *)p++);
@@ -247,12 +223,11 @@ ldfloat(p)
 
 /* stfloat() - Store a float number at a potentially unaligned address */
 
+/* f, Bug - it is passed as double */
 int
-stfloat(f, p)
-    float              f;                   /* Bug - it is passed as double */
-    register char      *p;
+stfloat(float f, char *p)
 {
-    register unsigned          val;
+    unsigned   val;
     union {
        float fval;
        int   ival;
@@ -275,8 +250,7 @@ stfloat(f, p)
 /* ldbld() - Load a double float number from a potentially unaligned address */
 
 double
-lddbl(p)
-    register char      *p;
+lddbl(char *p)
 {
     double val;
 
@@ -287,9 +261,7 @@ lddbl(p)
 /* stdbl() - Store a double float number at a potentially unaligned address */
 
 int
-stdbl(val, p)
-    double             val;
-    register char      *p;
+stdbl(double val, char *p)
 {
     memcpy ( p,(char *)&val, DOUBLESIZE);
     return 0;
@@ -300,8 +272,7 @@ stdbl(val, p)
 /* ldbld() - Load a double float number from a potentially unaligned address */
 
 double
-lddbl(p)
-    register char      *p;
+lddbl(char *p)
 {
     union {
         double rval;
@@ -313,7 +284,7 @@ lddbl(p)
 
     q  =  x.sval;
     p +=  DOUBLESIZE;
-   
+
     for (i=0; i<DOUBLESIZE; i++)
        *q++ = *--p;
     return (x.rval);
@@ -322,9 +293,7 @@ lddbl(p)
 /* stdbl() - Store a double float number at a potentially unaligned address */
 
 int
-stdbl(val, p)
-    double             val;
-    register char      *p;
+stdbl(double val, char *p)
 {
     union {
         double rval;
@@ -337,7 +306,7 @@ stdbl(val, p)
     x.rval = val;
     q  =  x.sval;
     p +=  DOUBLESIZE;
-   
+
     for (i=0; i<DOUBLESIZE; i++)
        *--p = *q++ ;
 
@@ -346,5 +315,3 @@ stdbl(val, p)
 
 
 #endif    /* sparc */
-
-
index 38a25cc2f6a0135c03a0b0b0a6d575f025a2c241..3c10f468019ddbd995927953f9d98d0d341d319c 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isdel1key.c /main/3 1995/10/23 11:37:24 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)isdel1key.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -44,11 +41,7 @@ static char sccsid[] = "@(#)isdel1key.c 1.3 89/07/17 Copyr 1988 Sun Micro";
 #include "isam_impl.h"
 
 void
-_del1key(fcb, pkeydesc2, record, recnum)
-    Fcb                        *fcb;   
-    Keydesc2           *pkeydesc2;
-    char               *record;
-    Recno              recnum;
+_del1key(Fcb *fcb, Keydesc2 *pkeydesc2, char *record, Recno recnum)
 {
     char               keybuf[MAXKEYSIZE];
     Btree              *btree;
index 815befdc1cda2cdad148dfaf98e159d4fc1f251e..9f9382a1ea65ce8648c18b1f079c9b9bff52a4c3 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isdelcurr.c /main/3 1995/10/23 11:37:32 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)isdelcurr.c 1.8 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -65,11 +62,10 @@ static int _amdelcurr();
  */
 
 int 
-isdelcurr(isfd)
-    int                        isfd;
+isdelcurr(int isfd)
 {
     int                        _am_delcurr();
-    register Fab       *fab;
+    Fab        *fab;
     int                        ret;
     int                        recnum;
 
@@ -115,11 +111,8 @@ isdelcurr(isfd)
  */
 
 static int
-_amdelcurr(isfhandle, curpos, recnum, errcode)
-    Bytearray          *isfhandle;
-    Bytearray          *curpos;
-    Recno              *recnum;
-    struct errcode     *errcode;
+_amdelcurr(Bytearray *isfhandle, Bytearray *curpos, Recno *recnum,
+           struct errcode *errcode)
 {
     Fcb                        *fcb = NULL;
     Crp                        *crp;
index a54928681fb0abdba7d9055b60b5f5153da2d079..49fe8a6da844743ca41d8a382fcd243c710dfe06 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isdelrec.c /main/3 1995/10/23 11:37:39 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)isdelrec.c 1.8 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -63,12 +60,10 @@ static char sccsid[] = "@(#)isdelrec.c 1.8 89/07/17 Copyr 1988 Sun Micro";
  */
 
 int 
-isdelrec(isfd, recnum)
-    int                        isfd;
-    long               recnum;
+isdelrec(int isfd, long recnum)
 {
     int                        _amdelrec();
-    register Fab       *fab;
+    Fab        *fab;
     int                        ret;
 
     /*
index 1929b186894c52fd56bb834dca6edbf2ddac99db..f54520424bc8d0ab55a433936d8786696ba112cc 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isdiskbufs2.c /main/3 1995/10/23 11:37:47 rswiston $                                                        */
-#ifndef lint
-static char sccsid[] = "@(#)isdiskbufs2.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
@@ -94,14 +91,11 @@ static int    maxavailn;                 /* Stop flushing when
 
 
 
+/* unixfd, .rec, .ind., .var */
 Bufhdr *
-_isdisk_fix(fcb, unixfd, blkno, mode)
-    Fcb                *fcb;
-    int                unixfd;                      /* .rec, .ind., .var */
-    Blkno      blkno;
-    int                mode;
+_isdisk_fix(Fcb *fcb, int unixfd, Blkno blkno, int mode)
 {
-    register Bufhdr *p, *p2;
+    Bufhdr *p, *p2;
     struct dlink          *hashl;
 
     /*
@@ -199,8 +193,7 @@ _isdisk_fix(fcb, unixfd, blkno, mode)
 }
 
 void
-_isdisk_unfix (p)
-    register Bufhdr    *p;
+_isdisk_unfix (Bufhdr *p)
 {
     if (!(p->isb_flags & ISB_FIXED))
     assert(p->isb_flags & ISB_FIXED);
@@ -221,16 +214,15 @@ _isdisk_unfix (p)
 }
 
 void
-_isdisk_commit1 (p)
-    Bufhdr     *p;
+_isdisk_commit1 (Bufhdr *p)
 {
     _commit1buffer(p);
 }
 
 void
-_isdisk_commit()
+_isdisk_commit(void)
 {
-    register Bufhdr *p;
+    Bufhdr *p;
     struct dlink          *e;
     
     while ((e = _isdln_first(pfixl)) != pfixl) {
@@ -241,9 +233,9 @@ _isdisk_commit()
 }
 
 void
-_isdisk_rollback()
+_isdisk_rollback(void)
 {
-    register Bufhdr    *p;
+    Bufhdr     *p;
     struct dlink          *e;
     
     while ((e = _isdln_first(pfixl)) != pfixl) {
@@ -257,9 +249,7 @@ _isdisk_rollback()
 }
 
 Bufhdr *
-_isdisk_refix(p, newmode)
-    Bufhdr     *p;
-    int                        newmode;
+_isdisk_refix(Bufhdr *p, int newmode)
 {
     Blkno      blkno = p->isb_blkno;
     Fcb                *fcb = p->isb_fcb;
@@ -276,10 +266,10 @@ _isdisk_refix(p, newmode)
 }
 
 void
-_isdisk_sync()
+_isdisk_sync(void)
 {
     extern time_t _istimeget();
-    register Bufhdr *p;
+    Bufhdr *p;
     struct dlink          *e;
     
     while ((e = _isdln_first(pchangl)) != pchangl) {
@@ -291,10 +281,10 @@ _isdisk_sync()
 }
 
 void
-_isdisk_inval()
+_isdisk_inval(void)
 {
     extern time_t _istimeget();
-    register Bufhdr *p;
+    Bufhdr *p;
     struct dlink          *e;
     
     /* ensure pavail is initialized before using it */
@@ -318,9 +308,9 @@ _isdisk_inval()
 
 
 #if ISDEBUG
-_isdisk_dumphd()
+_isdisk_dumphd(void)
 {
-    register Bufhdr *p;
+    Bufhdr *p;
     int                            i;
     
     (void)printf("\nInd isfd   blkno mode temp oldcopy\n");
@@ -332,10 +322,9 @@ _isdisk_dumphd()
                          p->isb_oldcopy?(p->isb_oldcopy - bufhdrs):-1);
 }
 
-aclistdump(lh)
-    struct dlink          *lh;
+aclistdump(struct dlink *lh)
 {
-    register Bufhdr *p;
+    Bufhdr *p;
     struct dlink          *e;
     
     for (e = _isdln_first(lh); e != lh; e = _isdln_next(e)) {
@@ -347,10 +336,9 @@ aclistdump(lh)
     }
 }
 
-flistdump(lh)
-    struct dlink          *lh;
+flistdump(struct dlink *lh)
 {
-    register Bufhdr *p;
+    Bufhdr *p;
     struct dlink          *e;
     
     for (e = _isdln_first(lh); e != lh; e = _isdln_next(e)) {
@@ -368,10 +356,10 @@ flistdump(lh)
 /*------------------------ Local functions ---------------------------------*/
 
 Static void
-_disk_init()
+_disk_init(void)
 {
     static Bool  initialized = FALSE;
-    register int       i;
+    int        i;
     
     if (initialized == TRUE)
        return;
@@ -403,10 +391,10 @@ _disk_init()
 
 /* _getavail() - get available buffer in disk */
 Static Bufhdr *
-_getavail()
+_getavail(void)
 {
-    register Bufhdr *p;
-    register struct dlink  *q;
+    Bufhdr *p;
+    struct dlink  *q;
     
     if ((q = _isdln_first(pavail)) == pavail) {
        _isfatal_error("No buffer in pool available");
@@ -424,12 +412,9 @@ _getavail()
 
 /* _findblock() - Find block in buffer pool */
 Static Bufhdr *
-_findblock(fcb, unixfd, blkno)
-    Fcb                *fcb;
-    int                unixfd;
-    Blkno      blkno;
+_findblock(Fcb *fcb, int unixfd, Blkno blkno)
 {
-    register Bufhdr *p;
+    Bufhdr *p;
     struct dlink          *lh, *e;
     int                           hashval;
     
@@ -449,8 +434,7 @@ _findblock(fcb, unixfd, blkno)
 
 /* _commit1buffer() - Commit changes to buffer */
 Static void
-_commit1buffer(p)
-    register Bufhdr    *p;
+_commit1buffer(Bufhdr *p)
 {
     assert(p->isb_flags & ISB_WFIXED);      /* Fixed for read buffers should */
     /* go through _isdisk_unfix() */
@@ -470,10 +454,9 @@ _commit1buffer(p)
 
 /* _rollback1buffer() - Rollback changes to buffer */
 Static void
-_rollback1buffer(p)
-    register Bufhdr    *p;
+_rollback1buffer(Bufhdr *p)
 {
-    register Bufhdr    *p2;
+    Bufhdr     *p2;
     
     assert(p->isb_flags & ISB_WFIXED);      /* Fixed for read buffers should */
     /* go through _isdisk_unfix() */
@@ -501,8 +484,7 @@ _rollback1buffer(p)
 
 /* _makenodata() - make buffer available with no data in it*/
 Static void
-_makenodata(p)
-    register Bufhdr    *p;
+_makenodata(Bufhdr *p)
 {
     assert(p->isb_flags & ISB_READ);
     
@@ -513,8 +495,7 @@ _makenodata(p)
 
 /* _flush1buffer() - flush buffer to disk */
 Static void
-_flush1buffer(p)
-    register Bufhdr    *p;
+_flush1buffer(Bufhdr *p)
 {
     assert(p->isb_flags & ISB_CHANGE);
     
index 2b2be78951df5fbb53f0d7aeb162827d5f177838..348224db4e21ae5a11d720316f9bdbcebe7b1772 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $TOG: isdlink.c /main/4 1999/09/29 15:03:15 mgreess $                                                     */
-#ifndef lint
-       static char sccsid[] = "@(#)isdlink.c 1.4 89/09/01 Copyr 1988 Sun Micro";
-#endif
 
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
@@ -43,9 +40,8 @@
 #include "isam_impl.h"
 
 /* _isdln_base_insert () - Insert element into list (at the front) -----------*/
-void _isdln_base_insert (base,l,e)
-       register char           *base;
-       register struct dlink   *l,*e;
+void _isdln_base_insert (char *base, struct dlink *l,
+                         struct dlink *e)
 {
        e->dln_forward = l->dln_forward;
        l->dln_forward = (char *)e - base;
@@ -55,9 +51,8 @@ void _isdln_base_insert (base,l,e)
 }
 
 /* _isdln_base_append () - Append element to list (at the end) -------------*/
-void _isdln_base_append (base,l,e)
-       register char           *base;
-       register struct dlink   *l,*e;
+void _isdln_base_append (char *base, struct dlink *l,
+                         struct dlink *e)
 {
        e->dln_backward = l->dln_backward;
        l->dln_backward = (char *)e - base;
@@ -67,18 +62,14 @@ void _isdln_base_append (base,l,e)
 }
 
 /* _isdln_base_remove () - Remove element from list -------------------------*/
-void _isdln_base_remove (base,e)
-       register char           *base;
-       register struct dlink   *e;
+void _isdln_base_remove (char *base, struct dlink *e)
 {
        ((struct dlink *)(base + e->dln_backward))->dln_forward = e->dln_forward;
        ((struct dlink *)(base + e->dln_forward))->dln_backward = e->dln_backward;
 }
 
 /* _isdln_base_first () - Return first element of the list -------------------*/
-struct dlink * _isdln_base_first(base,l)
-       register char           *base;
-       register struct dlink           *l;
+struct dlink * _isdln_base_first(char *base, struct dlink *l)
 {
        struct dlink *val = (struct dlink *)(base + l->dln_forward);
 
@@ -92,33 +83,25 @@ struct dlink * _isdln_base_first(base,l)
 }
 
 /* _isdln_base_next () - Return next element in the list --------------------*/
-struct dlink * _isdln_base_next(base,l)
-       register char           *base;
-       register struct dlink           *l;
+struct dlink * _isdln_base_next(char *base, struct dlink *l)
 {
        return (((struct dlink *)(base + l->dln_forward))); 
 }
 
 /* _isdln_base_prev () - Return previous element in the list ----------------*/
-struct dlink * _isdln_base_prev(base,l)
-       register char           *base;
-       register struct dlink           *l;
+struct dlink * _isdln_base_prev(char *base, struct dlink *l)
 {
        return  (((struct dlink *)(base + l->dln_backward))); 
 }
 
 /* _isdln_base_makeempty () - Make head of empty list -----------------------*/
-void _isdln_base_makeempty(base,l)
-       register char           *base;
-       register struct dlink           *l;
+void _isdln_base_makeempty(char *base, struct dlink *l)
 {
        l->dln_forward = l->dln_backward = (char *)l - base;
 }
 
 /* _isdln_base_isempty () - Test if list is empty---------------------------*/
-int _isdln_base_isempty(base,l)
-       register char           *base;
-       register struct dlink           *l;
+int _isdln_base_isempty(char *base, struct dlink *l)
 {
        return (l->dln_forward == (char *)l - base &&
                l->dln_backward == (char *)l - base);
index 56bdc3a9ea755e6ee3f963cc9d45bf35d85e6a14..ce13c2a1783ee0d089668c23ef4d42fa4ec7f820 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: iserase.c /main/3 1995/10/23 11:38:08 rswiston $                                                    */
-#ifndef lint
-static char sccsid[] = "@(#)iserase.c 1.8 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -41,6 +38,7 @@ static char sccsid[] = "@(#)iserase.c 1.8 89/07/17 Copyr 1988 Sun Micro";
 
 
 #include "isam_impl.h"
+#include <unistd.h>
 #include <sys/time.h>
 
 static void _unlink_datfile(), _unlink_indfile(), _unlink_varfile();
@@ -65,11 +63,10 @@ static int _amerase();
  */
 
 int 
-iserase(isfname)
-    char               *isfname;
+iserase(char *isfname)
 {
-    Isfd               isfd, isfd_nfs;
-    Fab                        *fab, *fab_nfs;
+    Isfd               isfd;
+    Fab                        *fab;
 
     /*
      * Open the file
@@ -113,9 +110,7 @@ iserase(isfname)
  */
 
 static int
-_amerase(isfhandle, errcode)
-    Bytearray          *isfhandle;
-    struct errcode     *errcode;
+_amerase(Bytearray *isfhandle, struct errcode *errcode)
 {
     Fcb                        *fcb;
     char               *isfname = _getisfname(isfhandle);
@@ -154,8 +149,7 @@ _amerase(isfhandle, errcode)
 
 
 Static void
-_unlink_datfile(isfname)
-    char       *isfname;
+_unlink_datfile(char *isfname)
 {
     char       namebuf[MAXPATHLEN];
 
@@ -167,8 +161,7 @@ _unlink_datfile(isfname)
 
 
 Static void
-_unlink_indfile(isfname)
-    char       *isfname;
+_unlink_indfile(char *isfname)
 {
     char       namebuf[MAXPATHLEN];
 
@@ -180,8 +173,7 @@ _unlink_indfile(isfname)
 
 
 Static void
-_unlink_varfile(isfname)
-    char       *isfname;
+_unlink_varfile(char *isfname)
 {
     char       namebuf[MAXPATHLEN];
 
index e07b5b4c3cf7fb8944243a86e409e51a74623b64..e739a1f0d2683287fa445a058088a5c9f3a80e4d 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: iserror.c /main/3 1995/10/23 11:38:16 rswiston $                                                    */
-#ifndef lint
-static char sccsid[] = "@(#)iserror.c 1.10 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -41,6 +38,7 @@ static char sccsid[] = "@(#)iserror.c 1.10 89/07/17 Copyr 1988 Sun Micro";
  */
 
 #include "isam_impl.h"
+#include <unistd.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <syslog.h>
@@ -84,8 +82,6 @@ _isfatal_error(char *msg)
 void 
 _isfatal_error1(char *msg)
 {
-  extern int   _is_rpcnetisamd; /* is 1 if this is rpc.netisamd */
-  extern int   _is_netisamlockd; /* is 1 if this is netisamlockd */
   int          logerr;
 
   if (fatal_error_user_handler) {
@@ -116,15 +112,17 @@ _isam_warning(char *msg)
 }
 
 /* Set user specified fatal_error handler */
-int  (*_isfatal_error_set_func(func))()
-    int                (*func)();
+int  _isfatal_error_set_func(int(*func)())
 {
+#if 0
     int                (*oldfunc)();
 
     oldfunc = fatal_error_user_handler;
+#endif
+
     fatal_error_user_handler = func;
 
-    return (oldfunc);
+    return (0);
 }
 
 /*
index fd297497178617d1e354b5896c96c8a882c23045..487c2f78e1a5d3b09cf887fe477de1d9fff3cc1f 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isfab.c /main/3 1995/10/23 11:38:24 rswiston $                                                      */
-#ifndef lint
-static char sccsid[] = "@(#)isfab.c 1.8 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -50,17 +47,15 @@ static char sccsid[] = "@(#)isfab.c 1.8 89/07/17 Copyr 1988 Sun Micro";
  * Fab_new() creates an File access block (fab object) that is used
  * for all subsequent operations in this file. Return a pointer to 
  * the fab object, or NULL in the case of an error.
+ * isfname, Local path on the host 
+ * varlen, 0/1 flag
  */
 
 Fab *
-_fab_new(isfname, openmode,
-        varlen, minreclen, maxreclen)
-    char               *isfname;            /* Local path on the host */
-    enum openmode      openmode;
-    Bool               varlen;              /* 0/1 flag */
-    int                        minreclen, maxreclen;
+_fab_new(char *isfname, enum openmode openmode, Bool varlen, int minreclen, int maxreclen)
 {
-    register Fab       *fab;
+    Fab        *fab;
 
     /* Allocate memory for the fab object. */
     fab = (Fab *) _ismalloc(sizeof(*fab));
@@ -88,8 +83,7 @@ _fab_new(isfname, openmode,
 }
 
 void
-_fab_destroy(fab)
-    register Fab       *fab;
+_fab_destroy(Fab *fab)
 {
     assert(fab != NULL);
     assert(fab->isfname != NULL);
index 2f6c72fd7e9315a2d9fae9b193557f434ec06475..fc63373773df0c278bb8405c0ee0d463519bad75 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isfcb.c /main/3 1995/10/23 11:38:34 rswiston $                                                      */
-#ifndef lint
-static char sccsid[] = "@(#)isfcb.c 1.9 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -40,6 +37,7 @@ static char sccsid[] = "@(#)isfcb.c 1.9 89/07/17 Copyr 1988 Sun Micro";
  *     
  *
  */
+#include <unistd.h>
 #include <stdlib.h>
 #include "isam_impl.h"
 #include <sys/stat.h>
@@ -56,17 +54,17 @@ Static int _open_datfile(), _open_indfile(), _open_varfile();
  *
  * Return 0 if create is successful, or -1 if any error. In the case of 
   *an error, the errcode block is set.
+ *
+ * crdat, 0/1 flag
+ * crind, 0/1 flag
+ * crvar, 0/1 flag
  */
 
 Fcb *
-_isfcb_create(isfname, crdat, crind, crvar, owner, group, u_mask, errcode)
-    char               *isfname;
-    int                        crdat, crind, crvar; /* 0/1 flags */
-    int                        owner, group;
-    struct errcode     *errcode;
-    int                        u_mask;
+_isfcb_create(char *isfname, int crdat, int crind, int crvar,
+              int owner, int group, int u_mask, struct errcode *errcode)
 {
-    register Fcb       *fcb;
+    Fcb        *fcb;
     int                        dat_fd = -1;
     int                        ind_fd = -1;
     int                        var_fd = -1;
@@ -156,10 +154,7 @@ _isfcb_create(isfname, crdat, crind, crvar, owner, group, u_mask, errcode)
  */
 
 void
-_isfcb_setreclength(fcb, varflag, minreclen, maxreclen)
-    register Fcb       *fcb;
-    Bool                       varflag;
-    int                        minreclen, maxreclen;
+_isfcb_setreclength(Fcb *fcb, Bool varflag, int minreclen, int maxreclen)
 {
     fcb->varflag = varflag;
     fcb->minreclen = minreclen;
@@ -183,11 +178,9 @@ _isfcb_setreclength(fcb, varflag, minreclen, maxreclen)
  */
 
 Fcb *
-_isfcb_open(isfname, errcode)
-    char               *isfname;
-    struct errcode     *errcode;
+_isfcb_open(char *isfname, struct errcode *errcode)
 {
-    register Fcb       *fcb;
+    Fcb        *fcb;
     int                        dat_fd = -1;
     int                        ind_fd = -1;
     int                        var_fd = -1;
@@ -242,10 +235,9 @@ _isfcb_open(isfname, errcode)
  */
 
 int
-_isfcb_nfds(fcb)
-    register Fcb       *fcb;
+_isfcb_nfds(Fcb *fcb)
 {
-    register int       count = 0;
+    int        count = 0;
 
     if (fcb->datfd != -1)
        count++;
@@ -267,8 +259,7 @@ _isfcb_nfds(fcb)
  */
 
 void
-_isfcb_remove(fcb)
-    register Fcb       *fcb;
+_isfcb_remove(Fcb *fcb)
 {
     if (fcb->datfd)
        _remove_datfile(fcb->isfname);
@@ -287,8 +278,7 @@ _isfcb_remove(fcb)
  */
 
 void
-_isfcb_close(fcb)
-    register Fcb       *fcb;
+_isfcb_close(Fcb *fcb)
 {
     assert (fcb != NULL);
     assert (fcb->isfname != NULL);
@@ -312,8 +302,7 @@ _isfcb_close(fcb)
  */
 
 int
-_isfcb_cntlpg_w(fcb)
-    register Fcb       *fcb;
+_isfcb_cntlpg_w(Fcb *fcb)
 {
     char               cntl_page[ISCNTLSIZE];
     int                        dat_fd = fcb->datfd;
@@ -402,8 +391,7 @@ _isfcb_cntlpg_w(fcb)
  */
 
 int
-_isfcb_cntlpg_w2(fcb)
-    register Fcb       *fcb;
+_isfcb_cntlpg_w2(Fcb *fcb)
 {
     char               cntl_page[CP_VAREND_OFF+CP_VAREND_LEN];
     int                        dat_fd = fcb->datfd;
@@ -462,8 +450,7 @@ _isfcb_cntlpg_w2(fcb)
  */
 
 int
-_isfcb_cntlpg_r(fcb)
-    register Fcb       *fcb;
+_isfcb_cntlpg_r(Fcb *fcb)
 {
     char               cntl_page[ISCNTLSIZE];
     int                        dat_fd = fcb->datfd;
@@ -563,8 +550,7 @@ _isfcb_cntlpg_r(fcb)
  */
 
 int
-_isfcb_cntlpg_r2(fcb)
-    register Fcb       *fcb;
+_isfcb_cntlpg_r2(Fcb *fcb)
 {
     char               cntl_page[CP_VAREND_OFF+CP_VAREND_LEN];
     int                        dat_fd = fcb->datfd;
@@ -637,8 +623,7 @@ _isfcb_cntlpg_r2(fcb)
  */
 
 Static int
-_create_datfile(isfname)
-    char       *isfname;
+_create_datfile(char *isfname)
 {
        int     fd;
        char    namebuf[MAXPATHLEN];
@@ -664,8 +649,7 @@ _create_datfile(isfname)
  */
 
 Static int
-_create_indfile(isfname)
-    char       *isfname;
+_create_indfile(char *isfname)
 {
        int     fd;
        char    namebuf[MAXPATHLEN];
@@ -691,8 +675,7 @@ _create_indfile(isfname)
  */
 
 Static int
-_create_varfile(isfname)
-    char       *isfname;
+_create_varfile(char *isfname)
 {
        int     fd;
        char    namebuf[MAXPATHLEN];
@@ -719,8 +702,7 @@ _create_varfile(isfname)
  */
 
 Static void
-_remove_datfile(isfname)
-    char       *isfname;
+_remove_datfile(char *isfname)
 {
     char       namebuf[MAXPATHLEN];
 
@@ -737,8 +719,7 @@ _remove_datfile(isfname)
  */
 
 Static void
-_remove_indfile(isfname)
-    char       *isfname;
+_remove_indfile(char *isfname)
 {
     char       namebuf[MAXPATHLEN];
 
@@ -755,8 +736,7 @@ _remove_indfile(isfname)
  */
 
 Static void
-_remove_varfile(isfname)
-    char       *isfname;
+_remove_varfile(char *isfname)
 {
     char       namebuf[MAXPATHLEN];
 
@@ -774,9 +754,7 @@ _remove_varfile(isfname)
  */
 
 Static int
-_open_datfile(isfname, rdonly)
-    char       *isfname;
-    Bool       *rdonly;
+_open_datfile(char *isfname, Bool *rdonly)
 {
     char       namebuf[MAXPATHLEN];
     int                ret;
@@ -813,9 +791,7 @@ _open_datfile(isfname, rdonly)
  */
 
 Static int
-_open_indfile(isfname, rdonly)
-    char       *isfname;
-    Bool       rdonly;
+_open_indfile(char *isfname, Bool rdonly)
 {
        int     fd;
        char    namebuf[MAXPATHLEN];
@@ -841,9 +817,7 @@ _open_indfile(isfname, rdonly)
  */
 
 Static int
-_open_varfile(isfname, rdonly)
-    char       *isfname;
-    Bool       rdonly;
+_open_varfile(char *isfname, Bool rdonly)
 {
        int     fd;
        char    namebuf[MAXPATHLEN];
@@ -863,16 +837,15 @@ _open_varfile(isfname, rdonly)
 }
 
 int
-_check_isam_magic(fcb)
-    Fcb                *fcb;
+_check_isam_magic(Fcb *fcb)
 {
     char               magicbuffer[CP_MAGIC_LEN];
 
     (void)lseek(fcb->datfd, 0L, 0);
-    if (read(fcb->datfd, magicbuffer, CP_MAGIC_LEN) < CP_MAGIC_LEN ||
+    if ((read(fcb->datfd, magicbuffer, CP_MAGIC_LEN) < CP_MAGIC_LEN) ||
        /* The following test for compatibilty with `SunISAM 1.0 Beta files. */
-       strncmp(magicbuffer, "SunISAM", strlen(ISMAGIC)) != 0 &&
-       strncmp(magicbuffer, ISMAGIC, strlen(ISMAGIC)) != 0) {
+       ((strncmp(magicbuffer, "SunISAM", strlen(ISMAGIC)) != 0) &&
+         (strncmp(magicbuffer, ISMAGIC, strlen(ISMAGIC))) != 0)) {
        return ISERROR;
     }
     else
@@ -888,8 +861,7 @@ _check_isam_magic(fcb)
  */
 
 int
-_open2_indfile(fcb)
-    Fcb                *fcb;
+_open2_indfile(Fcb *fcb)
 {
     char       namebuf[MAXPATHLEN];
     struct stat buf;
index 92ceb5c308f8dcd9ce4803964a428b01abc4dfa6..8068c7ef7955e76d6410539104b408f54088b8b2 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isfcbindex.c /main/3 1995/10/23 11:38:43 rswiston $                                                         */
-#ifndef lint
-static char sccsid[] = "@(#)isfcbindex.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -52,9 +49,7 @@ Static int _keypart2cmp();
  */
 
 int
-_isfcb_primkeyadd(fcb, keydesc2)
-    Fcb                        *fcb;
-    Keydesc2           *keydesc2;
+_isfcb_primkeyadd(Fcb *fcb, Keydesc2 *keydesc2)
 {
     /*
      * Assign keyid.
@@ -74,8 +69,7 @@ _isfcb_primkeyadd(fcb, keydesc2)
  */
 
 int
-_isfcb_primkeydel(fcb)
-    Fcb                        *fcb;
+_isfcb_primkeydel(Fcb *fcb)
 {
     if (FCB_NOPRIMARY_KEY(fcb))
        return (EBADARG);
@@ -93,9 +87,7 @@ _isfcb_primkeydel(fcb)
  */
 
 int
-_isfcb_altkeyadd(fcb, keydesc2)
-    Fcb                        *fcb;
-    Keydesc2           *keydesc2;
+_isfcb_altkeyadd(Fcb *fcb, Keydesc2 *keydesc2)
 {
     assert (fcb->nkeys < MAXNKEYS); 
 
@@ -126,13 +118,11 @@ _isfcb_altkeyadd(fcb, keydesc2)
  */
 
 Keydesc2 *
-_isfcb_findkey(fcb, keydesc2)
-    register Fcb       *fcb;
-    Keydesc2           *keydesc2;
+_isfcb_findkey(Fcb *fcb, Keydesc2 *keydesc2)
 {
     int                 nkeys = fcb->nkeys;
-    register Keydesc2  *kp2;
-    register int       j, i;
+    Keydesc2   *kp2;
+    int        j, i;
     int                        nparts;
 
     for (i = 0; i < nkeys; i++) {
@@ -162,13 +152,11 @@ _isfcb_findkey(fcb, keydesc2)
  */
 
 int
-_isfcb_altkeydel(fcb, keydesc2)
-    register Fcb       *fcb;
-    Keydesc2           *keydesc2;
+_isfcb_altkeydel(Fcb *fcb, Keydesc2 *keydesc2)
 {
     int                 nkeys = fcb->nkeys;
-    register int        i, j;
-    register Keydesc2  *kp2;
+    int        i, j;
+    Keydesc2   *kp2;
     int                        nparts;
 
     for (i = 0; i < nkeys; i++) {
@@ -209,8 +197,7 @@ _isfcb_altkeydel(fcb, keydesc2)
 
 /* compare key parts */
 Static int
-_keypart2cmp(l,r)
-    register struct keypart2 *l, *r;
+_keypart2cmp(struct keypart2 *l, struct keypart2 *r)
 {
     return !(l->kp2_type == r->kp2_type && l->kp2_start == r->kp2_start &&
             l->kp2_leng == r->kp2_leng);
@@ -224,13 +211,11 @@ _keypart2cmp(l,r)
  */
 
 Keydesc2 *
-_isfcb_indfindkey(fcb, keyid)
-    register Fcb       *fcb;
-    int                        keyid;
+_isfcb_indfindkey(Fcb *fcb, int keyid)
 {
     int                 nkeys = fcb->nkeys;
-    register Keydesc2  *keys = fcb->keys;
-    register int       i;
+    Keydesc2   *keys = fcb->keys;
+    int        i;
     
     for (i = 0; i < nkeys; i++) {
        if (keys[i].k2_keyid == keyid)
index bca1dc0b584e988a3ebf65c8aaabbd4728031836..6dc97d4a750ee4dc9bb1e0f088348e86250dd30e 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isfcbwatchfd.c /main/3 1995/10/23 11:38:51 rswiston $                                                       */
-#ifndef lint
-static char sccsid[] = "@(#)isfcbwatchfd.c     1.8 93/09/07 Copyr 1988-1993 Sun Microsystems, Inc";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -68,7 +65,7 @@ static int _in_use = 0;                            /* Current number of
  */
 
 int
-_watchfd_incr(n)
+_watchfd_incr(int n)
 {
     _in_use += n;
     assert(_in_use <= _limit);
@@ -85,7 +82,7 @@ _watchfd_incr(n)
  */
 
 int
-_watchfd_decr(n)
+_watchfd_decr(int n)
 {
     _in_use -= n;
     assert(_in_use >= 0);
@@ -100,7 +97,7 @@ _watchfd_decr(n)
  */
 
 int
-_watchfd_check()
+_watchfd_check(void)
 {
     return (_limit - _in_use);
 }
@@ -113,8 +110,7 @@ _watchfd_check()
  */
 
 int
-_watchfd_max_set(n)
-    int                n;
+_watchfd_max_set(int n)
 {
     int                oldlimit = _limit;
 
@@ -143,7 +139,7 @@ _watchfd_max_set(n)
  */
 
 int
-_watchfd_max_get()
+_watchfd_max_get(void)
 {
     return (_limit);
 }
index d6e400da0d370276153dc6e96cbf22a426c7beda..88b2fa473cd35cb4e75c6b712622942b5f4cdb68 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isfd.c /main/3 1995/10/23 11:39:10 rswiston $                                                       */
-#ifndef lint
-static char sccsid[] = "@(#)isfd.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -55,10 +52,9 @@ static Fab *isfdtab[MAXISFD];                     /* Table of pointers */
  */
 
 Isfd
-_isfd_insert(fab)
-    Fab                        *fab;
+_isfd_insert(Fab *fab)
 {
-    register Isfd      i;
+    Isfd       i;
 
     for (i = 0; i < MAXISFD; i++) {
        if (isfdtab[i] == NULL)              /* Empty entry found */
@@ -82,8 +78,7 @@ _isfd_insert(fab)
  */
 
 Fab *
-_isfd_find(isfd)
-    register Isfd      isfd;
+_isfd_find(Isfd isfd)
 {
     if (isfd < 0 || isfd >= MAXISFD || isfdtab[isfd] == NULL)
        return (NULL);
@@ -98,8 +93,7 @@ _isfd_find(isfd)
  */
 
 void
-_isfd_delete(isfd)
-    register Isfd      isfd;
+_isfd_delete(Isfd isfd)
 {
     if (isfd >= 0 && isfd < MAXISFD)
        isfdtab[isfd] = NULL;
index 3edd09ee7939f58a1d65c2b1cf7bc009642de976..2f7da8818d997bba04bc9709bfd32637c25731ac 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isfileio.c /main/3 1995/10/23 11:39:26 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)isfileio.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -54,12 +51,7 @@ static Blkno _getblkno();
  */
 
 void
-_cp_tofile(fcb, unixfd, data, pos, len)
-    Fcb                *fcb;
-    int                unixfd;
-    char       *data;
-    long       pos;
-    int                len;
+_cp_tofile(Fcb *fcb, int unixfd, char *data, long pos, int len)
 {
     int                offset;                      /* Offset within a page */
     Blkno      blkno;
@@ -93,12 +85,7 @@ _cp_tofile(fcb, unixfd, data, pos, len)
  */
 
 void
-_cp_fromfile(fcb, unixfd, data, pos, len)
-    Fcb                *fcb;
-    int                unixfd;
-    char       *data;
-    long       pos;
-    int                len;
+_cp_fromfile(Fcb *fcb, int unixfd, char *data, long pos, int len)
 {
     int                offset;                      /* Offset within a page */
     Blkno      blkno;
@@ -130,10 +117,7 @@ _cp_fromfile(fcb, unixfd, data, pos, len)
  */
 
 Blkno 
-_extend_file(fcb, unixfd, oldsize)
-    Fcb                        *fcb;
-    int                        unixfd;
-    Blkno              oldsize;
+_extend_file(Fcb *fcb, int unixfd, Blkno oldsize)
 {
     Bufhdr             *bufhdr;
     char               buf[ISPAGESIZE];
@@ -158,8 +142,7 @@ _extend_file(fcb, unixfd, oldsize)
  */
 
 Static int
-_getoffset(pos)
-    long               pos;
+_getoffset(long pos)
 {
     return ((int)(pos % ISPAGESIZE));
 }
@@ -171,8 +154,7 @@ _getoffset(pos)
  */
 
 Static Blkno
-_getblkno(pos)
-    long               pos;
+_getblkno(long pos)
 {
     return ((int)(pos / ISPAGESIZE));
 }
index b0d16dd0ab5b8d79eddfa263e615f152b71d7521..13de4b35e6ede41b2225e68f0c8811333ec362a3 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isfixrec.c /main/3 1995/10/23 11:39:42 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)isfixrec.c 1.5 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -64,11 +61,7 @@ static void remove_from_chain();          /* used by _flrec_wrrec() */
 
 /*ARGSUSED*/
 int
-_flrec_write(fcb, record, recnum, reclen)
-    register Fcb       *fcb;
-    char               *record;
-    Recno              *recnum;
-    int                        reclen;
+_flrec_write(Fcb *fcb, char *record, Recno *recnum, int reclen)
 {
     Recno              recnum2;
     long               rec_position;
@@ -131,11 +124,7 @@ _flrec_write(fcb, record, recnum, reclen)
  */
 
 int
-_flrec_read(fcb, record, recnum, reclen)
-    register Fcb       *fcb;
-    char               *record;
-    Recno              recnum;
-    int                        *reclen;
+_flrec_read(Fcb *fcb, char *record, Recno recnum, int *reclen)
 {
     long               rec_position;
     char               delflag;
@@ -173,9 +162,7 @@ _flrec_read(fcb, record, recnum, reclen)
  */
 
 long
-_fl_getpos(fcb, recnum)
-    Fcb                        *fcb;
-    Recno              recnum;
+_fl_getpos(Fcb *fcb, Recno recnum)
 {
     return ((long)(ISCNTLSIZE + (fcb->minreclen + 1) * (recnum -1)));
 }
@@ -196,11 +183,7 @@ _fl_getpos(fcb, recnum)
 
 /*ARGSUSED*/
 int
-_flrec_rewrite(fcb, record, recnum, reclen)
-    register Fcb       *fcb;
-    char               *record;
-    Recno              recnum;
-    int                        reclen;
+_flrec_rewrite(Fcb *fcb, char *record, Recno recnum, int reclen)
 {
     long               rec_position;
     char               delflag;
@@ -242,9 +225,7 @@ _flrec_rewrite(fcb, record, recnum, reclen)
  */
 
 int
-_flrec_delete(fcb, recnum)
-    register Fcb       *fcb;
-    Recno              recnum;
+_flrec_delete(Fcb *fcb, Recno recnum)
 {
     long               rec_position;
     char               delflag;
@@ -301,11 +282,7 @@ _flrec_delete(fcb, recnum)
 
 /*ARGSUSED*/
 int
-_flrec_wrrec(fcb, record, recnum, reclen)
-    register Fcb       *fcb;
-    char               *record;
-    Recno              recnum;
-    int                        reclen;
+_flrec_wrrec(Fcb *fcb, char *record, Recno recnum, int reclen)
 {
     long               rec_position;
     char               delflag;
@@ -392,9 +369,7 @@ _flrec_wrrec(fcb, record, recnum, reclen)
  */
 
 static void
-remove_from_chain(fcb, recnum)
-    Fcb                        *fcb;
-    Recno              recnum;
+remove_from_chain(Fcb *fcb, Recno recnum)
 {
     char               recnobuf1 [RECNOSIZE] , recnobuf2 [RECNOSIZE];
     long               pos1, pos2;
index c3a5146201b20ab1f763afe771b429afa5a2c637..4db5a265772d7c73da2b5b1cc9f351dfdf2fb3de 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isfname.c /main/3 1995/10/23 11:40:04 rswiston $                                                    */
-#ifndef lint
-static char sccsid[] = "@(#)isfname.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -54,8 +51,7 @@ char *_lastelement();
  */
 
 void
-_makedat_isfname(isfname)
-    char       *isfname;
+_makedat_isfname(char *isfname)
 {
     /* Append .rec */
     (void) strcat(isfname, DAT_SUFFIX);
@@ -69,8 +65,7 @@ _makedat_isfname(isfname)
  */
 
 void
-_makeind_isfname(isfname)
-    char       *isfname;
+_makeind_isfname(char *isfname)
 {
     /* Append .ind */
     (void) strcat(isfname, IND_SUFFIX);
@@ -84,8 +79,7 @@ _makeind_isfname(isfname)
  */
 
 void
-_makevar_isfname(isfname)
-    char       *isfname;
+_makevar_isfname(char *isfname)
 {
     /* Append .var */
     (void) strcat(isfname, VAR_SUFFIX);
@@ -99,10 +93,9 @@ _makevar_isfname(isfname)
  */
 
 void
-_removelast(path)
-    char               *path;
+_removelast(char *path)
 {
-    register char      *p;
+    char       *p;
 
     for (p = path + strlen(path); *--p != '/' && p >= path; ) 
        *p = '\0';
@@ -116,8 +109,7 @@ _removelast(path)
  */
 
 char *
-_lastelement(path)
-    char       *path;
+_lastelement(char *path)
 {
     register   char    *p;
     
index ba369afb38f1f7229f9f801eec46e66493ab8dca..cf2156bdc6374d5ae2de4dda86fab722f97e88fe 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isindexconv.c /main/3 1995/10/23 11:40:48 rswiston $                                                        */
-#ifndef lint
-static char sccsid[] = "@(#)isindexconv.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -42,13 +39,11 @@ static char sccsid[] = "@(#)isindexconv.c 1.3 89/07/17 Copyr 1988 Sun Micro";
 #include "isam_impl.h"
 
 void
-stkey(pkeydesc2, p)
-    Keydesc2           *pkeydesc2;
-    char               *p;
+stkey(Keydesc2 *pkeydesc2, char *p)
 {
     int                         i;
-    register struct keypart2           *ppart;
-    register char               *pp;
+    struct keypart2    *ppart;
+    char               *pp;
     int                         nparts;
 
     stshort(pkeydesc2->k2_flags, p + K2_FLAGS_OFF);
@@ -82,13 +77,11 @@ stkey(pkeydesc2, p)
 }      
 
 void
-ldkey(pkeydesc2,p)
-    register struct keydesc2    *pkeydesc2;
-    register char               *p;
+ldkey(struct keydesc2 *pkeydesc2, char *p)
 {
     int                         i;
-    register struct keypart2    *ppart;
-    register char               *pp;
+    struct keypart2    *ppart;
+    char               *pp;
     int                         nparts;
 
     memset ((char *) pkeydesc2, 0, sizeof (*pkeydesc2));
index 9fdbed0bf82c1160fa14218304e392d780fb3d2f..a23a0ce37b9ce4aa4e0ef2243caf6f17edf83c90 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isindexinfo.c /main/3 1995/10/23 11:40:56 rswiston $                                                        */
-#ifndef lint
-static char sccsid[] = "@(#)isindexinfo.c 1.2 91/05/16 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -61,12 +58,9 @@ static char sccsid[] = "@(#)isindexinfo.c 1.2 91/05/16 Copyr 1988 Sun Micro";
 #define dibuf ((struct dictinfo *)buffer)
 
 int
-isindexinfo(isfd, buffer, number)
-    int                        isfd;
-    struct keydesc     *buffer;
-    int                        number;
+isindexinfo(int isfd, struct keydesc *buffer, int number)
 {
-    register Fab       *fab;
+    Fab        *fab;
     int                        ret;
     Fcb                        *fcb = NULL;
 
index 8b0f95b4f79b56730d72742ce459ec53366eafd4..116d166e22d0a2cd5b9d24a92efe559eebd7f09f 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isindfreel.c /main/3 1995/10/23 11:41:03 rswiston $                                                         */
-#ifndef lint
-static char sccsid[] = "@(#)isindfreel.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
@@ -51,8 +48,7 @@ extern Bufhdr *_isdisk_fix();
  */
 
 Blkno 
-_isindfreel_alloc(fcb)
-    Fcb                        *fcb;
+_isindfreel_alloc(Fcb *fcb)
 {
     Bufhdr             *pbhdr;
     char               *p;
@@ -97,9 +93,7 @@ _isindfreel_alloc(fcb)
  */
 
 void
-_isindfreel_free(fcb, blkno)
-    Fcb                        *fcb;
-    Blkno              blkno;
+_isindfreel_free(Fcb *fcb, Blkno blkno)
 {
     Bufhdr             *pbhdr;
     char               *p;
index 63ab9ad6de5cc497a4aae797d234eb0a1d6fccb1..43d6b85fc6e161bddb55dc6ca170d02de48b1711 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: iskeyaux.c /main/3 1995/10/23 11:41:11 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)iskeyaux.c 1.7 89/07/27 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -51,13 +48,10 @@ Blkno _isgetfreekpage();
  */
 
 void
-_iskey_extract (pkeydesc2, recp, keyp) 
-    Keydesc2   *       pkeydesc2;
-    char               *recp;  
-    char               *keyp;
+_iskey_extract (Keydesc2 *pkeydesc2, char *recp, char *keyp)
 {
-    register int       i;
-    register struct keypart2 *ppart;
+    int        i;
+    struct keypart2 *ppart;
     int                nparts;
 
     nparts = pkeydesc2->k2_nparts;
@@ -86,14 +80,12 @@ _iskey_extract (pkeydesc2, recp, keyp)
  * _allockpage()
  *
  * Allocate an initialize new key page.
+ * 
+ * blkno, Output parameter
  */
 
 Bufhdr *
-_allockpage(fcb, capac, level, blkno)
-    Fcb                        *fcb;
-    int                        capac;
-    int                        level;
-    Blkno              *blkno;              /* Output parameter */
+_allockpage(Fcb *fcb, int capac, int level, Blkno *blkno)
 {
     Bufhdr             *pbufhdr;
     char               *p;
index d4fc8146932c58750d0f80f3d4d610d4daabc9be..84845808325a4b15613c9d35ec1681fdda1732c3 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: iskeycalc.c /main/3 1995/10/23 11:41:29 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)iskeycalc.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -44,8 +41,7 @@ static char sccsid[] = "@(#)iskeycalc.c 1.3 89/07/17 Copyr 1988 Sun Micro";
 
 /* getkeysperleaf() - Calculate number of keys per leaf node */
 int 
-getkeysperleaf (keylen)
-    int                keylen;
+getkeysperleaf (int keylen)
 {
     int        n;
 
@@ -56,8 +52,7 @@ getkeysperleaf (keylen)
 
 /* getkeyspernode() - Calculate number of keys per non-leaf node */
 int 
-getkeyspernode (keylen)
-    int                keylen;
+getkeyspernode (int keylen)
 {
     int        n;
 
@@ -69,8 +64,7 @@ getkeyspernode (keylen)
 
 /* le_odd(n) - Get next lower or equal odd number */
 int 
-le_odd(n)
-    int                n;
+le_odd(int n)
 {
     return ((n - 1) | 1);
 }
index 0691349ababa7bd692502abdd6b09ba4f11a3253..486683adc1416173fc628e3600e55214f2656972 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: iskeycmp.c /main/3 1995/10/23 11:41:41 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)iskeycmp.c 1.5 89/07/17 Copyr 1988 Sun Micro";
-#endif
 
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
@@ -50,12 +47,11 @@ static int _ncurtab;                             /* Number of entries */
  * _iskeycmp_set()
  *
  * Set key decriptor and number of parts for subsequent key comparison.s
+ * nparts, Use only so many parts
  */
 
 void
-_iskeycmp_set (pkeydesc2, nparts)
-    Keydesc2           *pkeydesc2;     
-    int                        nparts;              /* Use only so many parts */
+_iskeycmp_set (Keydesc2 *pkeydesc2, int nparts)
 {
     _ncurtab = nparts;
     _curtab = pkeydesc2->k2_part;
@@ -69,13 +65,12 @@ _iskeycmp_set (pkeydesc2, nparts)
  */
 
 int
-_iskeycmp(lkey, rkey)
-    char    *lkey, *rkey;
+_iskeycmp(char *lkey, char *rkey)
 {
     int                             i, ret;
-    register struct keypart2 *p;
-    register   char         *l, *r;
-    register long           llong, rlong;
+    struct keypart2 *p;
+      char          *l, *r;
+    long            llong, rlong;
     double                  ldouble, rdouble;
 
     ret = 0;
index dc630296b31730705d8bb4216a11903c2192d615..1c69c16ce21000696f9feaabf8cf9d4bbf307d08 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: iskeyconv.c /main/3 1995/10/23 11:41:54 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)iskeyconv.c 1.4 89/07/17 Copyr 1988 Sun Micro";
-#endif
 
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
@@ -55,7 +52,7 @@ void
 _iskey_itox(struct keydesc2 *pikdesc, struct keydesc *pxkdesc)
 {
     int                nparts;
-    register int       i;
+    int        i;
 
     memset ((char *)pxkdesc, 0, sizeof (*pxkdesc));
 
@@ -82,7 +79,7 @@ void
 _iskey_xtoi(struct keydesc2 *pikdesc, struct keydesc *pxkdesc)
 {
     int                nparts;
-    register int       i;
+    int        i;
     int                        offset;              /* Keep track of offset in key */
 
     memset ((char *)pikdesc, 0, sizeof (*pikdesc));
index 57aa9f02dc90055a41a020e1cf66e5b6c5db75fd..65f457284b4f1d02c8ae3db51b05b5488d54c1eb 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: iskeyvalid.c /main/3 1995/10/23 11:42:06 rswiston $                                                         */
-#ifndef lint
-static char sccsid[] = "@(#)iskeyvalid.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -54,12 +51,10 @@ static int _check_typelen();
  */
 
 int
-_validate_keydesc(keydesc, minreclen)
-    register struct keydesc    *keydesc;
-    int                                minreclen;
+_validate_keydesc(struct keydesc *keydesc, int minreclen)
 {
     int                nparts;
-    register int       i;
+    int        i;
     int                        type, start, length;
     int                        keylen = 0;
 
@@ -99,9 +94,7 @@ _validate_keydesc(keydesc, minreclen)
  */
 
 static int
-_check_typelen(type, length)
-    int                type;
-    int                length;
+_check_typelen(int type, int length)
 {
     switch (type) {
     case INTTYPE:
index 71be79a04339645398a14d710457304038825751..23a119a13298ebe44d480b1437426e7989a829ec 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isminmax.c /main/3 1995/10/23 11:42:16 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)isminmax.c 1.4 89/07/17 Copyr 1988 Sun Micro";
-#endif
 
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
@@ -75,12 +72,10 @@ static float *isminfloat = (float *)isminfloatarr;
  */
 
 void
-_iskey_fillmax(pkeydesc2, keybuf)
-    struct keydesc2    *pkeydesc2;
-    register char      *keybuf;
+_iskey_fillmax(struct keydesc2 *pkeydesc2, char *keybuf)
 {
-    register int       i;
-    register struct keypart2 *ppart;
+    int        i;
+    struct keypart2 *ppart;
     int                nparts;
 
     nparts = pkeydesc2->k2_nparts;
@@ -143,12 +138,10 @@ _iskey_fillmax(pkeydesc2, keybuf)
  */
 
 void
-_iskey_fillmin(pkeydesc2, keybuf)
-    struct keydesc2    *pkeydesc2;
-    register char      *keybuf;
+_iskey_fillmin(struct keydesc2 *pkeydesc2, char *keybuf)
 {
-    register int       i;
-    register struct keypart2 *ppart;
+    int        i;
+    struct keypart2 *ppart;
     int                nparts;
 
     nparts = pkeydesc2->k2_nparts;
index bfec60ff26e055351c2ad88135dddc70fc47eb47..23550029affa0a05172fcf943da097d815b2328a 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: ismngfcb.c /main/3 1995/10/23 11:42:28 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)ismngfcb.c 1.4 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -65,7 +62,7 @@ struct hashtable {
 
 static int _hashisfhandle();
 
-static mrused_last = 0;                             /* stamp generator */
+static int mrused_last = 0;                         /* stamp generator */
 
 
 /*
@@ -75,12 +72,10 @@ static mrused_last = 0;                          /* stamp generator */
  */
 
 void
-_mngfcb_insert(fcb, isfhandle)
-    Fcb                *fcb;
-    Bytearray  *isfhandle;
+_mngfcb_insert(Fcb *fcb, Bytearray *isfhandle)
 {
     int                        hashval = _hashisfhandle(isfhandle);
-    register int       ind;
+    int        ind;
     int                        ntries;
 
     /* Try to find an unused entry in the hash table. */
@@ -114,11 +109,10 @@ _mngfcb_insert(fcb, isfhandle)
  */
 
 Fcb *
-_mngfcb_find(isfhandle)
-    Bytearray  *isfhandle;
+_mngfcb_find(Bytearray *isfhandle)
 {
     int                        hashval = _hashisfhandle(isfhandle);
-    register int       ind;
+    int        ind;
     int                        ntries;
 
     /* Find the entry. */
@@ -150,11 +144,10 @@ _mngfcb_find(isfhandle)
  */
 
 void
-_mngfcb_delete(isfhandle)
-    Bytearray  *isfhandle;
+_mngfcb_delete(Bytearray *isfhandle)
 {
     int                        hashval = _hashisfhandle(isfhandle);
-    register int       ind;
+    int        ind;
     int                        ntries;
 
     /* Find the entry */
@@ -187,11 +180,11 @@ _mngfcb_delete(isfhandle)
  */
 
 Bytearray *
-_mngfcb_victim()
+_mngfcb_victim(void)
 {
     int                        victim_ind = -1;
     long               victim_time = 0;     /* Assign to shut up lint */
-    register int       i;
+    int        i;
 
     for (i = 0; i < FCBHASHSIZE; i++) {
 
@@ -214,12 +207,11 @@ _mngfcb_victim()
  */
 
 Static int
-_hashisfhandle(isfhandle)
-    Bytearray          *isfhandle;
+_hashisfhandle(Bytearray *isfhandle)
 {
-    register char      *p;
-    register unsigned  h, g;
-    register int       len;
+    char       *p;
+    unsigned   h, g;
+    int        len;
 
     len = isfhandle->length;
     p = isfhandle->data;
@@ -227,7 +219,7 @@ _hashisfhandle(isfhandle)
 
     while (len-- > 0) {
        h = (h << 4) + (*p++);
-       if (g = h&0xf0000000) {
+       if ((g = (h & 0xf0000000))) {
            h = h ^ (g >> 24);
            h = h ^ g;
        }
index 95487d8adee102bad297cf925bc9d73c5c292f97..44b1a3d10aa126eeff995ef8fd26254191731588 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isopen.c /main/3 1995/10/23 11:42:40 rswiston $                                                     */
-#ifndef lint
-static char sccsid[] = "@(#)isopen.c 1.12 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -44,9 +41,6 @@ static char sccsid[] = "@(#)isopen.c 1.12 89/07/17 Copyr 1988 Sun Micro";
 #include <sys/file.h>
 #include <sys/time.h>
 
-extern char _isam_version[];
-static char *_version_ = _isam_version;
-
 static int _am_open();
 /*
  * isfd = isopen(isfname, mode)
@@ -72,9 +66,7 @@ static int _am_open();
  */
 
 int 
-isopen(isfname, mode)
-    char               *isfname;
-    int                        mode;
+isopen(char *isfname, int mode)
 {
     Fab                        *fab;
     Isfd               isfd;
@@ -119,8 +111,7 @@ isopen(isfname, mode)
     return ((int)isfd);                             /* Successful isopen() */
 }
 
-Static int _am_open(fab)
-    register Fab       *fab;
+Static int _am_open(Fab *fab)
 {
     return (_amopen(fab->isfname, fab->openmode, &fab->varlength,
                    &fab->minreclen, &fab->maxreclen, &fab->isfhandle,
index 0e43164f909f3cca093131dbdabf03046953d78c..774ff235411a14322fb4b31e134a724879e66002 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: ispageio.c /main/3 1995/10/23 11:42:51 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)ispageio.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -42,6 +39,7 @@ static char sccsid[] = "@(#)ispageio.c 1.3 89/07/17 Copyr 1988 Sun Micro";
  */
 
 #include "isam_impl.h"
+#include <unistd.h>
 
 /*
  * _isseekpg(fd, pgno)
@@ -50,9 +48,7 @@ static char sccsid[] = "@(#)ispageio.c 1.3 89/07/17 Copyr 1988 Sun Micro";
  */
 
 void
-_isseekpg(fd, pgno)
-    int                fd;
-    Blkno      pgno;
+_isseekpg(int fd, Blkno pgno)
 {
     long       offset = pgno * ISPAGESIZE;
 
@@ -67,9 +63,7 @@ _isseekpg(fd, pgno)
  */
 
 void
-_isreadpg(fd, buf)
-    int                fd;
-    char       *buf;
+_isreadpg(int fd, char *buf)
 {
     if (read(fd, buf, ISPAGESIZE) != ISPAGESIZE)
        _isfatal_error("read failed");
@@ -82,9 +76,7 @@ _isreadpg(fd, buf)
  */
 
 void
-_iswritepg(fd, buf)
-    int                fd;
-    char       *buf;
+_iswritepg(int fd, char *buf)
 {
     if (write(fd, buf, ISPAGESIZE) != ISPAGESIZE)
        _isfatal_error("write failed");
index 2b3cf6d12e9b1ae6645bec38baf67fd7d7a301f9..69baee6e8ee1a105ff41b0ba9f8f7b6a94672a0e 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isperm.c /main/3 1995/10/23 11:43:03 rswiston $                                                     */
-#ifndef lint
-static char sccsid[] = "@(#)isperm.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -49,8 +46,7 @@ static char sccsid[] = "@(#)isperm.c 1.3 89/07/17 Copyr 1988 Sun Micro";
  */
 
 enum openmode
-_getopenmode(mode)
-    int                mode;
+_getopenmode(int mode)
 {
     switch (mode & ISOPENMODE) {
     case ISINPUT:
@@ -71,8 +67,7 @@ _getopenmode(mode)
  */
 
 enum readmode
-_getreadmode(mode)
-    int                mode;
+_getreadmode(int mode)
 {
     switch (mode & ISREADMODE) {
     case ISFIRST:
index 1813fb19a5b104a92336baf36f0759d3332d3c39..262fea70f37691f8f359c3f39847e14809d2e317 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isread.c /main/3 1995/10/23 11:43:35 rswiston $                                                     */
-#ifndef lint
-static char sccsid[] = "@(#)isread.c 1.9 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -71,12 +68,9 @@ static int _amread();
  */
 
 int 
-isread(isfd, record, mode)
-    int                        isfd;
-    char               *record;
-    int                        mode;
+isread(int isfd, char *record, int mode)
 {
-    register Fab       *fab;
+    Fab        *fab;
     int                        reclen;
     Recno              recnum;
     int                        ret;
@@ -150,14 +144,9 @@ isread(isfd, record, mode)
  */
 
 static int
-_amread(isfhandle, record, reclen, readmode, curpos, recnum, errcode)
-    Bytearray          *isfhandle;
-    enum readmode              readmode;
-    char               *record;
-    int                        *reclen;
-    Bytearray          *curpos;
-    Recno              *recnum;
-    struct errcode     *errcode;
+_amread(Bytearray *isfhandle, char *record, int *reclen,
+        enum readmode readmode, Bytearray *curpos, Recno *recnum,
+        struct errcode *errcode)
 {
     Fcb                        *fcb = NULL;
     Recno              recnum2;
index 810a2144562d98188cfcb476ecfc6c865d458501..81436611155b4b2ddaff39357790481e97aa96ba 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isrename.c /main/3 1995/10/23 11:43:48 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)isrename.c 1.10 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -41,6 +38,7 @@ static char sccsid[] = "@(#)isrename.c 1.10 89/07/17 Copyr 1988 Sun Micro";
 
 
 #include "isam_impl.h"
+#include <unistd.h>
 #include <sys/time.h>
 
 void _removelast();
@@ -68,8 +66,7 @@ static int _amrename();
  */
 
 int 
-isrename(oldname, newname)
-    char               *oldname, *newname;
+isrename(char *oldname, char *newname)
 {
     Isfd               isfd, isfd2;
     Fab                        *fab;
@@ -145,10 +142,9 @@ isrename(oldname, newname)
  */
 
 Static void
-_removelast2(path)
-    char               *path;
+_removelast2(char *path)
 {
-    register char      *p;
+    char       *p;
 
     for (p = path + strlen(path); *--p != '/' && p >= path; ) 
        *p = '\0';
@@ -169,10 +165,7 @@ _removelast2(path)
 
 
 static int
-_amrename(isfhandle, newname, errcode)
-    Bytearray          *isfhandle;
-    char               *newname;
-    struct errcode     *errcode;
+_amrename(Bytearray *isfhandle, char *newname, struct errcode *errcode)
 {
     Fcb                        *fcb;
     char               *isfname = _getisfname(isfhandle);
@@ -210,10 +203,9 @@ _amrename(isfhandle, newname, errcode)
 }
 
 
+/* newname, with no prefix */
 Static void
-_rename_datfile(isfname, newname)
-    char       *isfname;
-    char       *newname;                    /* with no prefix */
+_rename_datfile(char *isfname, char *newname)     
 {
     char       namebuf[MAXPATHLEN];
     char       newbuf[MAXPATHLEN];
@@ -239,10 +231,9 @@ _rename_datfile(isfname, newname)
     (void)rename(namebuf, newbuf);
 }
 
+/* newname, with no prefix */
 Static void
-_rename_indfile(isfname, newname)
-    char       *isfname;
-    char       *newname;                    /* with no prefix */
+_rename_indfile(char *isfname, char *newname)     
 {
     char       namebuf[MAXPATHLEN];
     char       newbuf[MAXPATHLEN];
@@ -268,10 +259,9 @@ _rename_indfile(isfname, newname)
     (void)rename(namebuf, newbuf);
 }
 
+/* newname, with no prefix */
 Static void
-_rename_varfile(isfname, newname)
-    char       *isfname;
-    char       *newname;                    /* with no prefix */
+_rename_varfile(char *isfname, char *newname) 
 {
     char       namebuf[MAXPATHLEN];
     char       newbuf[MAXPATHLEN];
index 041b3e003996039a1383f14cf6252920f4b399d4..d7388eda07ea3d7fb539080bad0b182e5a9e06b7 100644 (file)
@@ -38,6 +38,7 @@
 
 
 #include "isam_impl.h"
+#include <unistd.h>
 #include <stdlib.h>
 #include <signal.h>
 #include <stdio.h>
@@ -66,12 +67,10 @@ Static      char *rp_readrecord_v(), *rp_readrecord_f();
 Static int printkey(int, struct keydesc *, int (*)(const char *, ...));
 Static void cmd_error(const char *, int (*)(const char *, ...));
 Static int typeletter();
-Static rp_readcntlpg();
+Static int rp_readcntlpg();
 static int  isnoprintf(const char *, ...);
 
-isrepair(isfname, verbose)
-    char       *isfname;
-    int                verbose;
+int isrepair(char *isfname, int verbose)
 {
   extern      char *rp_readrecord_v(), *rp_readrecord_f();
   char       cntlpg[ISCNTLSIZE];
@@ -344,10 +343,8 @@ isrepair(isfname, verbose)
 static char    recordbuffer[ISMAXRECLEN + LONGSIZE];
 
 /* rp_readcntlpg() - Read the control page */
-Static 
-rp_readcntlpg(datfd, cntlpg)
-    int                datfd;
-    char       *cntlpg;
+Static int
+rp_readcntlpg(int datfd, char *cntlpg)
 {
     if (read (datfd, cntlpg, ISCNTLSIZE) != ISCNTLSIZE)
        return (ISERROR);
@@ -357,10 +354,7 @@ rp_readcntlpg(datfd, cntlpg)
 
 /* rp_readrecord_f() - Read a record from .rec file */
 Static char *
-rp_readrecord_f(datfd, offset, reclen)
-    int                datfd;
-    long       offset;
-    int                reclen;
+rp_readrecord_f(int datfd, long offset, int reclen)
 {
     if (lseek(datfd, offset, 0) != offset)
        return ((char *) NULL);
@@ -376,10 +370,7 @@ rp_readrecord_f(datfd, offset, reclen)
 
 /* rp_readrecord_v() - Read a record from .rec file */
 Static char *
-rp_readrecord_v(datfd, varfd, offset, minreclen, maxreclen)
-    int                datfd, varfd;
-    long       offset;
-    int                minreclen, maxreclen;
+rp_readrecord_v(int datfd, int varfd, long offset, int minreclen, int maxreclen)
 {
     long       tailoff;
     char       frameheadbuf [2 * SHORTSIZE];
@@ -462,8 +453,7 @@ cmd_error(const char *str, int (*print)(const char *, ...))
 }
 
 static int
-typeletter(type)
-    int        type;
+typeletter(int type)
 {
     switch (type) {
     case INTTYPE:
index c0e4dda8c24850124f6d4bf0f4bbc2a9cc4828af..2eca61dd7195a71aa9de4285491f3a3cd74e9e13 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isrewcurr.c /main/3 1995/10/23 11:44:15 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)isrewcurr.c 1.8 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -71,11 +68,9 @@ static int _amrewcurr(), _changekeys2();
  */
 
 int 
-isrewcurr(isfd, record)
-    int                        isfd;
-    char               *record;
+isrewcurr(int isfd, char *record)
 {
-    register Fab       *fab;
+    Fab        *fab;
     int                        reclen;
     int                        ret;
     int                        recnum;
@@ -134,13 +129,8 @@ isrewcurr(isfd, record)
  */
 
 static int
-_amrewcurr(isfhandle, record, reclen, curpos, recnum, errcode)
-    Bytearray          *isfhandle;
-    char               *record;
-    int                        reclen;
-    Recno              *recnum;
-    Bytearray          *curpos;
-    struct errcode     *errcode;
+_amrewcurr(Bytearray *isfhandle, char *record, int reclen,
+           Bytearray *curpos, Recno *recnum, struct errcode *errcode)
 {
     Fcb                        *fcb;
     Crp                        *crp;
@@ -242,15 +232,11 @@ _amrewcurr(isfhandle, record, reclen, curpos, recnum, errcode)
 }
 
 Static int
-_changekeys2(fcb, record, oldrecord, recnum, curpos)
-    Fcb                        *fcb;
-    char                *record;
-    char                *oldrecord;
-    Recno              recnum;
-    Bytearray          *curpos;
+_changekeys2(Fcb *fcb, char *record, char *oldrecord,
+             Recno recnum, Bytearray *curpos)
 {
     int                        nkeys = fcb->nkeys;
-    register int        i;
+    int        i;
     int                        err;
     Crp                        *crp;
     int                        keyid;
index dd55349d6758066bfc8b88c2dc2a84eaca32da4f..bf77da4de3c44fa56a20046d6c53bbfc0de38b1f 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isrewrec.c /main/3 1995/10/23 11:44:28 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)isrewrec.c 1.8 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -70,12 +67,9 @@ static int _amrewrec(), _changekeys();
  */
 
 int 
-isrewrec(isfd, recnum, record)
-    int                        isfd;
-    long               recnum;
-    char               *record;
+isrewrec(int isfd, long recnum, char *record)
 {
-    register Fab       *fab;
+    Fab        *fab;
     int                        reclen;
     int                        ret;
 
@@ -131,12 +125,8 @@ isrewrec(isfd, recnum, record)
  */
 
 static int
-_amrewrec(isfhandle, record, reclen, recnum, errcode)
-    Bytearray          *isfhandle;
-    char               *record;
-    int                        reclen;
-    Recno              recnum;
-    struct errcode     *errcode;
+_amrewrec(Bytearray *isfhandle, char *record, int reclen, Recno recnum,
+          struct errcode *errcode)
 {
     Fcb                        *fcb;
     char               oldrecbuf[ISMAXRECLEN];
@@ -214,14 +204,10 @@ _amrewrec(isfhandle, record, reclen, recnum, errcode)
 }
 
 static int
-_changekeys (fcb, record, oldrecord, recnum)
-    Fcb                        *fcb;
-    char                *record;
-    char                *oldrecord;
-    Recno              recnum;
+_changekeys (Fcb *fcb, char *record, char *oldrecord, Recno recnum)
 {
     int                        nkeys = fcb->nkeys;
-    register int        i;
+    int        i;
     int                        err;
 
     for (i = 0; i < nkeys; i++) {
index 3e06c0a443748b4e3af376f765652daf2f067be4..4d470903f96406fdfdda77e9753dcc3a695cbcb3 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: issignals.c /main/3 1995/10/23 11:44:41 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)issignals.c 1.7 89/08/30 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -65,9 +62,8 @@ static sigset_t oldmask;
 static sigset_t allsignals;
 
 
-_issignals_cntl(opt)
-    int                opt;                         /* 1 will enable masking */
-                                            /* 0 will disable masking */
+/* opt, 1 will enable masking, 0 will disable masking */
+int _issignals_cntl(int opt)
 {
     int                oldmask = do_mask;
 
index c4a7380a62190f7b907d487b99f967ca0d79f07d..f5a3e43d9943175e1b015c061da72c095d0b64ce 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: issort.c /main/3 1995/10/23 11:44:55 rswiston $                                                     */
-#ifndef lint
-static char sccsid[] = "@(#)issort.c 1.3 89/07/17 Copyr 1988 Sun Micro";
-#endif
 
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
@@ -52,10 +49,7 @@ extern char *_isunix_malloc();
  */
 
 Issort *
-_issort_create(reclen,nrecs,compfunc)
-    int                reclen;
-    int                nrecs;
-    int                (*compfunc)();
+_issort_create(int reclen, int nrecs, int (*compfunc)(char *, char *))
 {      
     Issort     *p;
 
@@ -66,7 +60,7 @@ _issort_create(reclen,nrecs,compfunc)
     p->ist_allocrecs = nrecs;               /* Maximum number of records */
                                             /* that can inserted */
     p->ist_nrecs = 0;                       /* Current number of records */
-    p->ist_currec;                          /* Current position */
+    p->ist_currec = 0;                      /* Current position */
     p->ist_compf = compfunc;                /* Comparison function */
 
     p->ist_array = _ismalloc((unsigned)(reclen * nrecs)); /* Allocate array */
@@ -82,8 +76,7 @@ _issort_create(reclen,nrecs,compfunc)
  */
 
 void
-_issort_destroy(srt)
-    Issort     *srt;
+_issort_destroy(Issort *srt)
 {
     assert(srt->ist_array != (char *) 0);
 
@@ -98,9 +91,7 @@ _issort_destroy(srt)
  */
 
 void
-_issort_insert(srt,record)
-    register Issort    *srt;
-    char               *record;
+_issort_insert(Issort *srt, char *record)
 {
     assert(srt->ist_nrecs < srt->ist_allocrecs);
 
@@ -117,8 +108,7 @@ _issort_insert(srt,record)
  */
 
 void
-_issort_sort(srt)
-    Issort     *srt;
+_issort_sort(Issort *srt)
 {
     if (srt->ist_nrecs > 1)
        qsort(srt->ist_array,srt->ist_nrecs,srt->ist_reclength,srt->ist_compf);
@@ -133,8 +123,7 @@ _issort_sort(srt)
  */
 
 void
-_issort_rewind(srt)
-    Issort     *srt;
+_issort_rewind(Issort *srt)
 {
     srt->ist_currec = 0;
 }
@@ -146,8 +135,7 @@ _issort_rewind(srt)
  */
 
 char *
-_issort_read(srt)
-    register Issort    *srt;
+_issort_read(Issort *srt)
 {
     return((srt->ist_currec < srt->ist_nrecs) ?
        (srt->ist_array + srt->ist_currec++ * srt->ist_reclength) :
index 161ada2a9665ac00feca895ee5fb6129990c30ad..d390c534aa6d778e2833e76ea2dafd594a723d0c 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isstart.c /main/3 1995/10/23 11:45:08 rswiston $                                                    */
-#ifndef lint
-static char sccsid[] = "@(#)isstart.c 1.9 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -67,14 +64,10 @@ static int _amstart();
  */
 
 int 
-isstart(isfd, keydesc, length, record, mode)
-    int                        isfd;
-    struct keydesc     *keydesc;
-    int                        length;
-    char               *record;
-    int                        mode;
+isstart(int isfd, struct keydesc *keydesc, int length, char *record,
+        int mode)
 {
-    register Fab       *fab;
+    Fab        *fab;
     int                        reclen;
     Recno              recnum;
     int                        ret;
@@ -160,17 +153,9 @@ isstart(isfd, keydesc, length, record, mode)
 
 /* ARGSUSED */
 static int
-_amstart(isfhandle, record, reclen, readmode,
-        keydesc, keylen, curpos, recnum, errcode)
-    Bytearray          *isfhandle;
-    enum readmode              readmode;
-    char               *record;
-    int                        *reclen;
-    Bytearray          *curpos;
-    Recno              *recnum;
-    struct errcode     *errcode;
-    struct keydesc     *keydesc;
-    int                        keylen;
+_amstart(Bytearray *isfhandle, char *record, int *reclen,
+         enum readmode readmode, struct keydesc *keydesc, int keylen,
+         Bytearray *curpos, Recno *recnum, struct errcode *errcode)
 {
     Fcb                        *fcb;
     Recno              recnum2;
index 7a6c60ccd370b801b9f52de07d3566e998b1114a..f1c1b6937f3b2c272703fcbacf2048032d08e87e 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: issync.c /main/3 1995/10/23 11:45:20 rswiston $                                                     */
-#ifndef lint
-static char sccsid[] = "@(#)issync.c 1.7 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -45,6 +42,7 @@ static char sccsid[] = "@(#)issync.c 1.7 89/07/17 Copyr 1988 Sun Micro";
  */
 
 #include "isam_impl.h"
+#include <unistd.h>
 #include <sys/file.h>
 #include <sys/time.h>
 
@@ -53,7 +51,7 @@ static char sccsid[] = "@(#)issync.c 1.7 89/07/17 Copyr 1988 Sun Micro";
  */
 
 int 
-issync()
+issync(void)
 {
     return iscntl(ALLISFD, ISCNTL_FSYNC);
 }
@@ -63,14 +61,13 @@ issync()
  */
 
 int 
-isfsync(isfd)
-    int                isfd;
+isfsync(int isfd)
 {
     return iscntl(isfd, ISCNTL_FSYNC);
 }
 
 
-_issync()
+int _issync(void)
 {
     int                i;
 
@@ -80,10 +77,9 @@ _issync()
     return (ISOK);
 }
 
-_isfsync(isfd)
-    int                isfd;
+int _isfsync(int isfd)
 {
-    register Fab       *fab;
+    Fab        *fab;
     Fcb                 *fcb;
     int                        ret;
 
index f84336737895570773902eabad1e58ea1fd109aa..68878a0b897a2fc9ea3d39f1b1cf96c26d962aa5 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isvarrec.c /main/3 1995/10/23 11:45:36 rswiston $                                                   */
-#ifndef lint
-static char sccsid[] = "@(#)isvarrec.c 1.8 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -47,7 +44,7 @@ int  _vl_deleted();                        /* 0/1 returns 1 if record is deleted */
 static void remove_from_chain2();           /* used by _vlrec_wrrec() */
 long _istail_insert();
 static void _istail_delete();
-static _istail_read();
+static int _istail_read();
 
 /*
  * _vlrec_write(fcb, record, recnum, reclen)
@@ -67,11 +64,7 @@ static _istail_read();
 
 /*ARGSUSED*/
 int
-_vlrec_write(fcb, record, recnum, reclen)
-    register Fcb       *fcb;
-    char               *record;
-    Recno              *recnum;
-    int                        reclen;
+_vlrec_write(Fcb *fcb, char *record, Recno *recnum, int reclen)
 {
     Recno              recnum2;
     long               rec_position;
@@ -141,11 +134,7 @@ _vlrec_write(fcb, record, recnum, reclen)
  */
 
 int
-_vlrec_read(fcb, record, recnum, reclen)
-    register Fcb       *fcb;
-    char               *record;
-    Recno              recnum;
-    int                        *reclen;
+_vlrec_read(Fcb *fcb, char *record, Recno recnum, int *reclen)
 {
     long               rec_position;
     long               tailoff;
@@ -193,9 +182,7 @@ _vlrec_read(fcb, record, recnum, reclen)
  */
 
 long
-_vl_getpos(fcb, recnum)
-    Fcb                        *fcb;
-    Recno              recnum;
+_vl_getpos(Fcb *fcb, Recno recnum)
 {
     return ((long)(ISCNTLSIZE + (fcb->minreclen + LONGSIZE) * (recnum -1)));
 }
@@ -216,11 +203,7 @@ _vl_getpos(fcb, recnum)
 
 /*ARGSUSED*/
 int
-_vlrec_rewrite(fcb, record, recnum, reclen)
-    register Fcb       *fcb;
-    char               *record;
-    Recno              recnum;
-    int                        reclen;
+_vlrec_rewrite(Fcb *fcb, char *record, Recno recnum, int reclen)
 {
     long               rec_position;
     long               tailoff;
@@ -272,9 +255,7 @@ _vlrec_rewrite(fcb, record, recnum, reclen)
  */
 
 int
-_vlrec_delete(fcb, recnum)
-    register Fcb       *fcb;
-    Recno              recnum;
+_vlrec_delete(Fcb *fcb, Recno recnum)
 {
     long               rec_position;
     long               tailoff;
@@ -338,11 +319,7 @@ _vlrec_delete(fcb, recnum)
 
 /*ARGSUSED*/
 int
-_vlrec_wrrec(fcb, record, recnum, reclen)
-    register Fcb       *fcb;
-    char               *record;
-    Recno              recnum;
-    int                        reclen;
+_vlrec_wrrec(Fcb *fcb, char *record, Recno recnum, int reclen)
 {
     long               rec_position;
     long               tailoff;
@@ -437,9 +414,7 @@ _vlrec_wrrec(fcb, record, recnum, reclen)
  */
 
 static void
-remove_from_chain2(fcb, recnum)
-    Fcb                        *fcb;
-    Recno              recnum;
+remove_from_chain2(Fcb *fcb, Recno recnum)
 {
     char               recnobuf1 [RECNOSIZE] , recnobuf2 [RECNOSIZE];
     long               pos1, pos2;
@@ -474,10 +449,7 @@ remove_from_chain2(fcb, recnum)
 
 /* Insert tail into .var file. Return offset in .var file */
 
-long _istail_insert(fcb, tailp, taillen)
-    Fcb                        *fcb;
-    char               *tailp;
-    int                        taillen;
+long _istail_insert(Fcb *fcb, char *tailp, int taillen)
 {
     char               frameheadbuf [2 * SHORTSIZE];
     int                        framelen;
@@ -518,9 +490,7 @@ long _istail_insert(fcb, tailp, taillen)
 /* Remove tail from .var file */
 
 /* ARGSUSED */
-Static void _istail_delete(fcb, offset)
-    Fcb                        *fcb;
-    long               offset;
+Static void _istail_delete(Fcb *fcb, long offset)
 {
     /* 
      * Don't do anything in NetISAM 1.0. The tails are lost, the space
@@ -531,10 +501,7 @@ Static void _istail_delete(fcb, offset)
 
 /* Read tail from .var file */
 
-Static _istail_read(fcb, offset, buffer)
-    Fcb                        *fcb;
-    long               offset;
-    char               *buffer;
+Static int _istail_read(Fcb *fcb, long offset, char *buffer)
 {
     char               frameheadbuf [2 * SHORTSIZE];
     int                        taillen;
@@ -556,11 +523,7 @@ Static _istail_read(fcb, offset, buffer)
     
 /* Rewrite tail. Returns -1 if the new tail is longer than the original frame */
 
-int _istail_modify(fcb, offset, tailp, taillen)
-    Fcb                        *fcb;
-    long               offset;
-    int                        taillen;
-    char               *tailp;
+int _istail_modify(Fcb *fcb, long offset, char *tailp, int taillen)
 {
     char               frameheadbuf [2 * SHORTSIZE];
     int                        framelen;
index bcc3cf07b9511300a18d7f5fec46ca505ae40c61..74e0b211652099cb9f23c79a431c0198404a5014 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isvars.c /main/3 1995/10/23 11:45:48 rswiston $                                                     */
-#ifndef lint
-static char sccsid[] = "@(#)isvars.c 1.7 90/08/15 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
index 956c1695a5b8c85f8bf745493c202035a601c067..536aa1326daee703ec5cfb75c0aa59f08f8dcc2b 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: isversion.c /main/3 1995/10/23 11:46:03 rswiston $                                                          */
-#ifndef lint
-static char sccsid[] = "@(#)isversion.c 1.5 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988, 1992 by Sun Microsystems, Inc.
  */
index 93b03fbe5bf5514aa81c63f45d1b5d832020f9fb..46726799fb26d0d88a002ca5e0551966431c7539 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: iswrite.c /main/3 1995/10/23 11:46:15 rswiston $                                                    */
-#ifndef lint
-static char sccsid[] = "@(#)iswrite.c 1.8 89/07/17 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -71,12 +68,10 @@ static int _am_write();
  */
 
 int 
-iswrite(isfd, record)
-    int                        isfd;
-    char               *record;
+iswrite(int isfd, char *record)
 {
     int                        _am_write();
-    register Fab       *fab;
+    Fab        *fab;
     int                        reclen;
     Recno              recnum;
     Bytearray          curpos;
@@ -123,12 +118,8 @@ iswrite(isfd, record)
 }
 
 
-Static int _am_write(fab, record, reclen, curpos, recnum)
-    register Fab       *fab;
-    char               *record;
-    int                        reclen;
-    Bytearray          *curpos;
-    Recno              *recnum;
+Static int _am_write(Fab *fab, char *record, int reclen,
+                     Bytearray *curpos, Recno *recnum)
 {
     return (_amwrite(&fab->isfhandle, record, reclen,
                     curpos, recnum, &fab->errcode));
index 2844b09ffc7362f2dcab092b9f026443b3472793..c0f98628805063d97ef577605f16b3001bd2f8bb 100644 (file)
@@ -25,9 +25,6 @@
 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
 /*%%  $XConsortium: iswrrec.c /main/3 1995/10/23 11:46:30 rswiston $                                                    */
-#ifndef lint
-static char sccsid[] = "@(#)iswrrec.c 1.7 89/06/07 Copyr 1988 Sun Micro";
-#endif
 /*
  * Copyright (c) 1988 by Sun Microsystems, Inc.
  */
@@ -70,12 +67,9 @@ static int _amwrrec();
  */
 
 int 
-iswrrec(isfd, recnum, record)
-    int                        isfd;
-    long               recnum;
-    char               *record;
+iswrrec(int isfd, long recnum, char *record)
 {
-    register Fab       *fab;
+    Fab        *fab;
     int                        reclen;
     int                        ret;
 
@@ -131,12 +125,8 @@ iswrrec(isfd, recnum, record)
  */
 
 static int
-_amwrrec(isfhandle, record, reclen, recnum, errcode)
-    Bytearray          *isfhandle;
-    char               *record;
-    int                        reclen;
-    Recno              recnum;
-    struct errcode     *errcode;
+_amwrrec(Bytearray *isfhandle, char *record, int reclen, Recno recnum,
+         struct errcode *errcode)
 {
     Fcb                        *fcb = NULL;
     int                        err;
diff --git a/cde/lib/tt/mini_isam/strdup.ultrix.c b/cde/lib/tt/mini_isam/strdup.ultrix.c
deleted file mode 100644 (file)
index 934fe9c..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*%%  (c) Copyright 1993, 1994 Hewlett-Packard Company                  */
-/*%%  (c) Copyright 1993, 1994 International Business Machines Corp.    */
-/*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   */
-/*%%  (c) Copyright 1993, 1994 Novell, Inc.                             */
-/*%%  $XConsortium: strdup.ultrix.c /main/3 1995/10/23 11:46:57 rswiston $                                                      */
-/* strdup - make duplicate of string s */
-#include <string.h>
-#include <malloc.h>
-
-char *
-strdup(char *s)
-{
-    char *p;
-
-    p = (char *)malloc(strlen(s) + 1);  /* + 1 for '\0' character */
-    if (p != NULL) 
-        strcpy(p,s);
-    return p;
-}
index b6dbb7f39dc54f6a14c576f7991837b0880d4161..5d13780036452f59bd9de86c1e07b03ac4c8bc4d 100644 (file)
@@ -408,14 +408,9 @@ SubtractWindowFromVisibleRegion(Display *dpy, Window win, Region visrgn)
 
 
 void
-ProcessInterestProperty(dpy, win, screen, data, datalen, visrgn, xoff, yoff)
-       Display *       dpy;
-    Window win;
-    int screen;
-    void *data;
-    unsigned long datalen;
-    Region visrgn;
-    int xoff, yoff;
+ProcessInterestProperty(Display * dpy, Window win, int screen,
+                        void *data, unsigned long datalen, Region visrgn,
+                        int xoff, int yoff)
 {
     unsigned long *array = (unsigned long *)data;
     int cur = 0;
index 34da1dc311b89dcb0419df269e1f93cf4fa59847..f262a5eeeb7457ea4c4dee1c14806d96efb26505 100644 (file)
@@ -151,8 +151,8 @@ extern char *_DtGetMessage(char *filename, int set, int n, char *s);
 #endif
 
 Boolean _DtWmStringsAreEqual( 
-                        register char *in_str,
-                        register char *test_str) ;
+                        char *in_str,
+                        char *test_str) ;
 void CheckForDone( 
                         XtPointer clientData,
                         XtIntervalId id) ;
@@ -590,7 +590,7 @@ AddSuLog(
     char        *toString;
     struct tm  *localtime ();
 
-    register    FILE * f;
+       FILE * f;
     struct stat st;
     time_t    timenow;
     struct tm  *now;
@@ -626,8 +626,9 @@ AddSuLog(
      * take away write access from SULog
      */
 
-    if (stat (SULog, &st) == 0)
-       chmod (SULog, (int) (st.st_mode & 07777) & ~0222);
+    if(chmod (SULog, (int) (st.st_mode & 07777) & ~0222) == -1) {
+        fprintf(stderr, "Error on chmod of '%s', %s\n", SULog, strerror(errno));
+    }
 
     return;
 }
@@ -658,8 +659,8 @@ CleanPath(
         char *Path )
 
 {
-    register char  *StrippedPath;
-    register char  *PathHead;
+    char  *StrippedPath;
+    char  *PathHead;
 
     StrippedPath = PathHead = Path;
 
index 31ae4197edc418a65d05bca4dd85f17a4a5f9ee6..520056de66cdf6b18d7f1364258f5fd71b56cb28 100644 (file)
@@ -307,8 +307,7 @@ ab_position_window(
 }
 
 BOOL
-ab_window_leader_iconified(
-)
+ab_window_leader_iconified(void)
 {
     return(AB_win_leader->state & WindowIconified);
 }
@@ -677,15 +676,13 @@ set_windows_visibility(
 }
 
 void
-ab_takedown_windows(
-)
+ab_takedown_windows(void)
 {
     set_windows_visibility(False);
 }
 
 void
-ab_putback_windows(
-)
+ab_putback_windows(void)
 {
     set_windows_visibility(True);
 }
@@ -1222,7 +1219,7 @@ ab_palette_set_active(
 }
 
 void
-ab_exit_dtbuilder()
+ab_exit_dtbuilder(void)
 {
     static DTB_MODAL_ANSWER     answer;
     XtAppContext                app;
index d1b4bf62944aac4140d969afe4be0c3588a006cc..bd9c4c54d22085774a1221644892c97d55692596 100644 (file)
@@ -226,8 +226,7 @@ BOOL                        in_undo = FALSE;
  * Called from main()...
  */
 void
-abobj_edit_init(
-)
+abobj_edit_init(void)
 {
     obj_add_destroy_callback(edit_destroyOCB, "ATTCH_ED");
 }
@@ -401,8 +400,7 @@ edit_destroyOCB(
  * Initializes the clipboard
  */
 static void
-init_clipboard(
-)
+init_clipboard(void)
 {
     if (!ABClipboard)
     {
@@ -1452,8 +1450,7 @@ init_undo_rec(
  * Initializes undo buffer
  */
 static void
-init_undo(
-)
+init_undo(void)
 {
     init_undo_rec(&ABUndo);
 }
@@ -2124,8 +2121,7 @@ clear_undo_rec(
  */
 
 int
-abobj_cut(
-)
+abobj_cut(void)
 {
     ABObj      project = proj_get_project();
     ABObj      newObj = NULL;
@@ -2171,8 +2167,7 @@ abobj_cut(
 }
 
 int
-abobj_copy(
-)
+abobj_copy(void)
 {
     ABObj      project = proj_get_project(),
                newObj;
@@ -2807,8 +2802,7 @@ abobj_paste(
 }
 
 int
-abobj_delete(
-)
+abobj_delete(void)
 {
     ABObj              project = proj_get_project(),
                        parent = NULL;
@@ -2862,8 +2856,7 @@ abobj_delete(
 }
 
 int
-abobj_undo(
-)
+abobj_undo(void)
 {
     int                iRet = 0;
 
@@ -2929,16 +2922,14 @@ abobj_set_undo(
 }
 
 int
-abobj_cancel_undo(
-)
+abobj_cancel_undo(void)
 {
     clear_undo_rec(&ABUndo);
     return 0;
 }
 
 BOOL
-abobj_undo_active(
-)
+abobj_undo_active(void)
 {
     BOOL               i;
 
@@ -2956,8 +2947,7 @@ abobj_undo_active(
  * Is clipboard empty ?
  */
 BOOL
-abobj_clipboard_is_empty(
-)
+abobj_clipboard_is_empty(void)
 {
     return(!ABClipboard || (ABClipboard->count == 0));
 }
@@ -2990,8 +2980,7 @@ abobj_in_clipboard(
  * Clears the clipboard
  */
 void
-abobj_clipboard_clear(
-)
+abobj_clipboard_clear(void)
 {
     int                i;
 
index eaf5111f88fa591dbc64ae68a5e866d53b284c33..e34ad8f1d157ebaf39beeb89d5cb1af62dddcf78 100644 (file)
@@ -1200,8 +1200,7 @@ abobj_set_menu_item_state(
 }
 
 void
-abobj_strings_init(
-)
+abobj_strings_init(void)
 {
     char       *props_str;
     char       *undo_str;
index cd98fb759593c5c0d66f8e1e016f20a8010e545d..80b9ae580a7c09825e89dac31d0ae1d1981a205d 100644 (file)
@@ -506,7 +506,7 @@ draw_select_feedback(
     Widget               selWidget;
     Dimension     width = 0;
     Dimension     height = 0;
-    register int  x0,y0,x1,y1;
+    int  x0,y0,x1,y1;
     int                  border_w;
     Display       *display;
     Drawable      drawable;
index 3b46479824c0d9576a2764131c8febe125245b6d..868bb1a47150de8ecc2d39814f72d69ac8abae3b 100644 (file)
@@ -2112,22 +2112,19 @@ abobj_set_save_needed(
 }
 
 void
-abobj_disable_save_needed(
-)
+abobj_disable_save_needed(void)
 {
     save_needed_enabled = FALSE;
 }
 
 void
-abobj_enable_save_needed(
-)
+abobj_enable_save_needed(void)
 {
     save_needed_enabled = TRUE;
 }
 
 BOOL
-abobj_save_needed_enabled(
-)
+abobj_save_needed_enabled(void)
 {
     return (save_needed_enabled);
 }
index 05015a03339d2c796be60a35bf967d2a254d8393..81287465cd9638fb74859853e092331dc6de49e3 100644 (file)
@@ -531,8 +531,7 @@ appfw_editor_apply(
 }
 
 static void
-turnoff_changebars(
-)
+turnoff_changebars(void)
 {
 
     prop_set_changebar(afs->vendor.changebar,          PROP_CB_OFF);
@@ -621,8 +620,7 @@ obj_destroyedOCB(
  * the Application Framework Editor
  */
 static BOOL
-appfw_editor_pending(
-)
+appfw_editor_pending(void)
 {
     if (afs && prop_changebars_pending(afs->prop_sheet))
        return TRUE;
index 1156e2199e5ea6e8547a51e4bada6d4418423c71..c31445b8296d1627ddb27ad462102afa8c3d6b64 100644 (file)
@@ -387,8 +387,7 @@ attch_ed_get_parent(
 }
 
 void
-attch_ed_init(
-)
+attch_ed_init(void)
 {
     obj_add_destroy_callback(attch_obj_destroyCB, "ATTCH_ED");
     obj_add_reparent_callback(attch_obj_reparentCB, "ATTCH_ED");
@@ -1189,8 +1188,7 @@ attch_editor_apply(
 }
 
 static BOOL
-attch_edP_pending(
-)
+attch_edP_pending(void)
 {
     AttchEditorSettingsRec *ats = &attch_editor_settings_rec;
 
@@ -1218,8 +1216,7 @@ attch_editor_activate(
 }
 
 static void
-turnoff_changebars(
-)
+turnoff_changebars(void)
 {
     AttchEditorSettingsRec *ats = &attch_editor_settings_rec;
 
@@ -3345,8 +3342,7 @@ attach_obj_changed(
 
 
 static void 
-attch_ed_view_child_attachments(
-)
+attch_ed_view_child_attachments(void)
 {
     AttchEditorSettingsRec     *ats = &attch_editor_settings_rec;
     ABObj                      cur_obj,
@@ -3377,8 +3373,7 @@ attch_ed_view_child_attachments(
 
 
 static void 
-attch_ed_view_parent_attachments(
-)
+attch_ed_view_parent_attachments(void)
 {
     AttchEditorSettingsRec     *ats = &attch_editor_settings_rec;
     ABObj                      cur_obj,
@@ -3410,8 +3405,7 @@ attch_ed_view_parent_attachments(
 }
 
 static void
-attch_ed_activate_parent_child_button(
-)
+attch_ed_activate_parent_child_button(void)
 {
     AttchEditorSettingsRec     *ats = &attch_editor_settings_rec;
     DtbAttchEdAttchEdDialogInfo attch_ed_cgen
@@ -3663,8 +3657,7 @@ print_attach_type(
 }
 
 static BOOL
-attch_ed_verify_props(
-)
+attch_ed_verify_props(void)
 {
     AttchEditorSettingsRec     *ats = &attch_editor_settings_rec;
     ATTCH_ED_ATTACH_TYPE       attach_type = ATTCH_ED_NONE;
index 4a30a2f8ed6c129ea92d8699deb146e39315c6b3..85a5ee89eb3c2b43f59c463ca22c8002491293a8 100644 (file)
@@ -1591,10 +1591,7 @@ brws_delete_objects
 /*
  * create_browser_window - creates a new browser main window
  */
-ABBrowser
-brws_create
-(
-)
+ABBrowser brws_create(void)
 {
     ABBrowser  b;
 
@@ -2160,7 +2157,7 @@ aob_proj_init_state
  * Initialize the object browser.
  */
 static ABBrowser
-create_browser_struct()
+create_browser_struct(void)
 {
     ABBrowser          b;
 
@@ -2290,10 +2287,7 @@ draw_viewer(Viewer *v)
 /*
  * Create (malloc) structure to hold browser UI objects
  */
-BrowserUiObj   
-aob_create_ui_obj
-(
-)
+BrowserUiObj aob_create_ui_obj(void)
 {
     BrowserUiObj       ui;
 
@@ -2317,9 +2311,7 @@ aob_create_ui_obj
  * Create (malloc) structure to hold browser properties
  */
 static BrowserProps   
-aob_create_props
-(
-)
+aob_create_props(void)
 {
     BrowserProps       props;
 
@@ -2952,8 +2944,7 @@ brws_show_browser(
 }
 
 void
-brws_init(
-)
+brws_init(void)
 {
     obj_add_rename_callback(brwsP_obj_renameOCB, "BRWS");
     obj_add_destroy_callback(brwsP_obj_destroyOCB, "BRWS");
index 537f9ae7bf3433d12d7a97ed60c2ecc70050d9be..f7cd2fe5634ff5bc3abe713cd0aae9aea7a6856e 100644 (file)
@@ -452,7 +452,7 @@ cgen_notify_new_directory(STRING dir)
 
 
 int
-cgen_abort()
+cgen_abort(void)
 {
     public_entry_point();
     return cgenP_abort();
@@ -501,8 +501,7 @@ cgenP_init_props_module_list(
  *      Add callbacks for object rename & destroy
  */
 void
-cgenP_prop_init(
-)
+cgenP_prop_init(void)
 {
     obj_add_rename_callback(obj_renamedOCB, "cgen_prop_init");
     obj_add_update_callback(obj_updateOCB, "cgen_prop_init");
@@ -584,7 +583,7 @@ print_to_term(STRING msg)
  * Sends stdout and stderr to term window
  */
 static int
-send_output_to_term()
+send_output_to_term(void)
 {
     static BOOL         done = FALSE;
     int                 rc = 0;
@@ -859,7 +858,7 @@ term_execute_command(CG_SUBCOMMAND cmd_code, STRING cmd, STRING argv[])
  * Gets the slave device name and puts it into the file variable
  */
 static int
-get_slave_device_name()
+get_slave_device_name(void)
 {
     String              deviceName = NULL;
 
@@ -889,7 +888,7 @@ get_slave_device_name()
 *************************************************************************/
 
 static int
-exec_generate_code()
+exec_generate_code(void)
 {
     ABObj      project= proj_get_project();
     STRING     project_name= NULL;
@@ -929,7 +928,7 @@ exec_generate_code()
 }
 
 static int
-exec_generate_main()
+exec_generate_main(void)
 {
     int                rc = 0;         /* return code */
     ABObj       project= proj_get_project();
@@ -967,7 +966,7 @@ exec_generate_main()
 }
  
 static int
-exec_generate_proj()
+exec_generate_proj(void)
 {
     int                rc = 0;         /* return code */
     ABObj       project= proj_get_project();
@@ -1004,7 +1003,7 @@ exec_generate_proj()
 }
  
 static int
-exec_generate_specific_files()
+exec_generate_specific_files(void)
 {
     int                returnValue = 0;
     int                rc = 0;         /* return code */
@@ -1055,7 +1054,7 @@ epilogue:
 }
  
 static int
-exec_generate_specific_files_and_main()
+exec_generate_specific_files_and_main(void)
 {
     int                returnValue = 0;
     int                rc = 0;         /* return code */
@@ -1172,7 +1171,7 @@ epilogue:
 
 
 static int
-exec_make()
+exec_make(void)
 {
     int                        rc = 0;         /* return code */
     STRING             cmd = NULL;
@@ -1200,7 +1199,7 @@ exec_make()
 
 
 static int
-exec_run()
+exec_run(void)
 {
     ABObj      project= NULL;
     char       executable_name[1024];
@@ -1373,7 +1372,7 @@ exec_next_command_for_build_and_run(CG_SUBCOMMAND cmd_code, int exit_code)
 
 
 static int
-exec_first_build_and_run_command()
+exec_first_build_and_run_command(void)
 {
     int        return_value= 0;
     if (!util_file_exists("Makefile"))
@@ -1470,7 +1469,7 @@ subprocess_exit(int exit_code)
 
 
 static int
-print_internal_err_message()
+print_internal_err_message(void)
 {
     print_to_term("****> UNSUCCESSFUL (Internal failure occurred).\n");
     return 0;
@@ -1492,7 +1491,7 @@ print_failure_message(CG_SUBCOMMAND cmd_code, int exit_code)
 
 
 static int
-print_success_message()
+print_success_message(void)
 {
     print_to_term("====> Completed successfully.\n");
     user_goal= CG_GOAL_UNDEF;
@@ -1545,7 +1544,7 @@ print_exit_message(int exitCode)
 
 
 static int
-print_abort_message()
+print_abort_message(void)
 {
     print_to_term("\n====> Command aborted.\n");
     user_goal= CG_GOAL_UNDEF;
@@ -1659,7 +1658,7 @@ epilogue:
  * We are running a process - desensitize most buttons.
  */
 static int
-goto_busy_state()
+goto_busy_state(void)
 {
     XtSetSensitive(abort_button, True);
     XtSetSensitive(abort_item, True);
@@ -1681,7 +1680,7 @@ goto_busy_state()
  * We are waiting for user input
  */
 static int
-goto_ready_state()
+goto_ready_state(void)
 {
     XtSetSensitive(abort_button, False);
     XtSetSensitive(abort_item, False);
@@ -2135,8 +2134,7 @@ obj_updateOCB(
 }
 
 int
-cgenP_sync_up_dir(
-)
+cgenP_sync_up_dir(void)
 {
     STRING     cmd = NULL;
     STRING     request_dir = NULL;
@@ -2289,7 +2287,7 @@ save_done_cb(int status)
 
 
 static int
-check_path()
+check_path(void)
 {
     int                return_value = 0;
     int                rc = 0;         /* return code */
@@ -2688,7 +2686,7 @@ epilogue:
 
 
 static int
-destroy_makefile()
+destroy_makefile(void)
 {
     destroy_links_to_file("makefile");
     destroy_links_to_file("Makefile");
index ecbc4ae80eba4eb84d524df59852c6634b7a67ef..08746a6065503b2f76fb5d7c92d6c05a04c492c7 100644 (file)
@@ -140,8 +140,7 @@ static Widget CacheAnchor;  /* Dummy widget used to control caching of color
                                   objxm_name_to_pixel (via XtConvertAndStore). */
 
 char *
-display_color_chooser(
-)
+display_color_chooser(void)
 {
     extern Widget      AB_toplevel;
     static int                 first_time = 1;
@@ -187,8 +186,7 @@ display_color_chooser(
 }
 
 void
-create_color_chooser(
-)
+create_color_chooser(void)
 {
     extern Widget      AB_toplevel;
     XmString           label;
index a9e49d0bca3b7cb641e50b4248ae4c5f59057602..1d267ecd34def6b27a68a43435c1e7edf30cfb43 100644 (file)
@@ -720,7 +720,7 @@ connP_get_when_labels(
 
     if (when_label_list == NULL)
     {
-       register int    i;
+       int     i;
 
        when_label_list = (STRING *)XtMalloc(
                            sizeof(STRING) * ((int)AB_WHEN_NUM_VALUES - 1));
@@ -741,7 +741,7 @@ connP_get_act_labels(
 
     if (stdact_label_list == NULL)
     {
-       register int    i;
+       int     i;
 
        stdact_label_list = (STRING *)XtMalloc(
                        sizeof(STRING) * ((int)AB_BUILTIN_ACTION_NUM_VALUES - 1));
@@ -856,8 +856,7 @@ conn_set_source(
 }
 
 extern ABObj
-connP_get_source(
-)
+connP_get_source(void)
 {
     return cur_source;
 }
@@ -882,8 +881,7 @@ conn_set_target(
 }
 
 extern ABObj
-connP_get_target(
-)
+connP_get_target(void)
 {
     return cur_target;
 }
@@ -925,7 +923,7 @@ connP_make_conn_string(
     ABObj      action_obj
 )
 {
-    register int       i;
+    int        i;
     long               si;
     static char                conn_string[BUFSIZ];
     char               buf[BUFSIZ];
@@ -1047,7 +1045,7 @@ connP_get_obj_type_index(
     int                        ab_subtype
 )
 {
-    register long      i;
+    long       i;
 
     if (connP_objtype_needs_subtype(ab_type, ab_subtype))
     {
@@ -1270,7 +1268,7 @@ connP_objtype_needs_subtype(
     int                        obj_subtype
 )
 {
-    register   int     i;
+    int        i;
 
     for (i = 0; i < ConnP_num_conn_objs; i++)
     {
@@ -1521,8 +1519,7 @@ connP_make_help_vol_conn(
  * Initializes strings used in connections editor
  */
 extern void
-conn_strings_init(
-)
+conn_strings_init(void)
 {
       unknown_str = 
        XtNewString(catgets(Dtb_project_catd, 100, 158, "??unknown??"));
index 15618ea7e194c767c1f68f8b8e2da6e50ee69651..5b2370c00def8eff4308175a765df11b1887cd2f 100644 (file)
@@ -297,8 +297,7 @@ static void                 set_ctrls_for_target(
 
 
 extern void
-conn_init(
-)
+conn_init(void)
 {
     conn_strings_init();
 
@@ -801,7 +800,7 @@ populate_connection_list(
     for (trav_open(&trav, project, AB_TRAV_ACTIONS);
         (obj = trav_next(&trav)) != NULL; )
     {
-       register XmString       xm_item_str;
+       XmString        xm_item_str;
        
        if (is_action_type(obj, ConnP_view_filter))
        {
@@ -1354,7 +1353,7 @@ get_cur_when(
     Widget     label_wid = XmOptionButtonGadget(when_menu);
     XmString   xm_when_label   = (XmString)NULL;
     char       *when_label = NULL;
-    register int       i;
+    int        i;
 
     XtVaGetValues(label_wid, XmNlabelString, &xm_when_label, NULL);
     if (xm_when_label != NULL) {
@@ -1383,7 +1382,7 @@ get_cur_act(
     Widget     label_wid = XmOptionButtonGadget(action_menu);
     XmString   xm_act_label    = (XmString)NULL;
     char       *act_label = NULL;
-    register int       i;
+    int        i;
 
     XtVaGetValues(label_wid, XmNlabelString, &xm_act_label, NULL);
     if (xm_act_label != NULL) {
@@ -1409,7 +1408,7 @@ set_cur_when(
     AB_WHEN    new_when
 )
 {
-    register int       i;
+    int        i;
 
     for (i = 0; i < ConnP_num_conn_whens; i++)
     {
@@ -1431,7 +1430,7 @@ set_cur_act(
     AB_BUILTIN_ACTION  new_act
 )
 {
-    register int       i;
+    int        i;
 
     for (i = 0; i < ConnP_num_conn_acts; i++)
        if (new_act == ConnP_conn_acts[i].act_type)
@@ -1883,7 +1882,7 @@ connP_update_on_show_status(
 
 
 BOOL
-connP_conn_is_possible()
+connP_conn_is_possible(void)
 {
     BOOL        ConnIsPossible = FALSE;
     ABObj      source = NULL,
@@ -3873,7 +3872,7 @@ get_cur_func_type(void)
     Widget      label_wid = XmOptionButtonGadget(action_type_opmenu);
     XmString    xm_act_label    = (XmString)NULL;
     char        *act_label = NULL;
-    register int        i;
+    int        i;
     AB_FUNC_TYPE       func_type = AB_FUNC_UNDEF;
  
     XtVaGetValues(label_wid, XmNlabelString, &xm_act_label, NULL);
index d7da2bdf9b1490995bde93d00c1684cfbdf0a99f..2c19af762797886723dd45098ab70ca0ba768b63 100644 (file)
@@ -186,8 +186,7 @@ static DndEditorSettingsRec dndEdInfo;
  */
 
 void
-dnd_ed_show_dialog(
-)
+dnd_ed_show_dialog(void)
 {
     /* If there is no DragAndDrop Editor, create it */
     if (AB_dnd_dialog == (Widget)NULL)
@@ -540,8 +539,7 @@ dnd_ed_editor_apply(void)
 
 
 static void
-dnd_turnoff_changebars(
-)
+dnd_turnoff_changebars(void)
 {
     DndEditorSettings  dds = &dndEdInfo;
     prop_set_changebar(dds->drag_ops_checkbox.changebar,PROP_CB_OFF);
@@ -720,8 +718,7 @@ do_auto_apply(
        
 
 static void
-clear_editor_fields(
-)
+clear_editor_fields(void)
 {
     DndEditorSettingsRec       *dds = &dndEdInfo;
 
index 8661747958a40ab941ed4a16e0018382b8b8d768..224cafc0c2688a18425fac378aecde22f1d0e520 100644 (file)
@@ -595,8 +595,7 @@ do_auto_apply(
 }
 
 static void
-clear_editor_fields(
-)
+clear_editor_fields(void)
 {
     HelpEditorSettingsRec      *hes = &Help_Editor_Settings_Rec;
 
@@ -982,7 +981,7 @@ help_dispatchCB(Widget widget, XtPointer clientData, XtPointer callData)
 ** apps built with App Builder will use as well.)
 */
 static void
-help_test_onitem_help()
+help_test_onitem_help(void)
 {
     ABObj      obj, root_obj, help_obj;
     Widget     target;
@@ -1183,7 +1182,7 @@ update_object_menu_from_obj(
 ** if there are no base or popup windows.
 */
 static ABObj
-find_toplevel_obj()
+find_toplevel_obj(void)
 {
     ABObj              obj, bwobj, pwobj, fcobj;
     AB_TRAVERSAL       trav;
index adb7b81c814b461436322f7778f8e81f8d48c3a0..b002c8a6a9651a2a67fecc39794d82237a8e9e63 100644 (file)
@@ -249,8 +249,7 @@ static void     change_msg_moduleCB(
 ******************************************************************/
 
 void
-msgEd_show_dialog(
-)
+msgEd_show_dialog(void)
 {
     int                numMods = 0;
     ABObj      current_module = proj_get_cur_module();
@@ -340,8 +339,7 @@ msgEd_show_dialog(
  *      Add callbacks for object rename & destroy
  */
 static void
-msgEdP_init(
-)
+msgEdP_init(void)
 {
     /*
      * Initialize static strings used in message editor
@@ -521,8 +519,7 @@ msg_editor_init(
 }
 
 static int
-msg_editor_clear(
-)
+msg_editor_clear(void)
 {
     MsgEditorSettingsRec       *mes = &msg_editor_settings_rec;
     int                                sel_pos = 0;
@@ -717,14 +714,13 @@ msg_editor_load(
 
 
 static BOOL
-msg_editor_pending(
-)
+msg_editor_pending(void)
 {
     return(prop_changebars_pending(msg_editor_settings_rec.prop_sheet));
 }
 
 static BOOL
-verify_name()
+verify_name(void)
 {
     BOOL                retVal = TRUE; 
     MsgEditorSettingsRec *mes = &msg_editor_settings_rec;
@@ -739,8 +735,7 @@ verify_name()
 }
 
 static void
-turnoff_changebars(
-)
+turnoff_changebars(void)
 {
     MsgEditorSettingsRec *mes = &msg_editor_settings_rec;
 
@@ -1610,7 +1605,7 @@ objlist_test_func(
 
 
 static BOOL
-verify_default_btn()
+verify_default_btn(void)
 {
     MsgEditorSettingsRec *mes = &msg_editor_settings_rec;
     AB_DEFAULT_BUTTON   default_btn = AB_DEFAULT_BTN_UNDEF;
@@ -1679,7 +1674,7 @@ verify_default_btn()
 }
 
 static BOOL
-verify_label()
+verify_label(void)
 {
     MsgEditorSettingsRec *mes = &msg_editor_settings_rec;
     BOOL                validLabel = TRUE;
@@ -1731,7 +1726,7 @@ verify_label()
 }
 
 static BOOL
-verify_buttons()
+verify_buttons(void)
 {
     MsgEditorSettingsRec *mes = &msg_editor_settings_rec;
     BOOL                 hasButtons = TRUE;
@@ -2555,8 +2550,7 @@ update_mod_opmenu(
 }
 
 static void
-msgEdP_strings_init(
-)
+msgEdP_strings_init(void)
 {
     msgEd_strings[MSG_ED_RETRY_STR] = 
        XtNewString(catgets(Dtb_project_catd, 100, 202, "Retry"));
index c550daeca8ca158e508d9db2398f6b9669d82ab9..296e009262b1cacde29340620361776d70e70948 100644 (file)
@@ -88,10 +88,10 @@ static PalEditableObjInfo   *pal_ed_obj_head = NULL;
  * which does the trick.
  */
 static int
-strcasecmp(register const char *s1,
-          register const char *s2)
+strcasecmp(const char *s1,
+          const char *s2)
 {
-    register int c1, c2;
+    int c1, c2;
 
     while (*s1 && *s2) {
        c1 = isupper(*s1) ? tolower(*s1) : *s1;
index ddd7f6336f8aa191796dd12dab0940aeaa55155c..bd5af6dd00fc66b40ae136a7aa768996b1bb18c5 100644 (file)
@@ -843,7 +843,7 @@ typeCB(
  * Object destroy callback
  */
 static int
-prop_choice_install_obj_destroy_CB()
+prop_choice_install_obj_destroy_CB(void)
 {
     static BOOL        callback_installed = False;
 
index 24fcb1089fcbf8438cb48865a81e4eff99cc33b1..f637de9aa52b6fd9fa70f3ad1da98d9696373a22 100644 (file)
@@ -736,7 +736,7 @@ turnoff_changebars(
 }
 
 static int
-combobox_install_obj_destroy_CB()
+combobox_install_obj_destroy_CB(void)
 {
     static BOOL        callback_installed = False;
 
index 4f6e35d99dc09eaafa14b65783d8f777b11eaf2e..68c00d3b3e85acb149c212fb8630972bd2e5d358 100644 (file)
@@ -786,7 +786,7 @@ image_copy(
     int     put_x
 )
 {
-    register int    i, j, k, pix;
+    int    i, j, k, pix;
     Pixel          background;
     Pixel          foreground;
     Pixel           bshadow, tshadow;
index ce734215e5706e026a1fdbf9bc017f0bbe85c70b..8e6e61a980fcf50b11b719f636fbb8033fff3ae4 100644 (file)
@@ -312,8 +312,7 @@ PropGroupSettingsRec prop_group_settings_rec[AB_PROP_TYPE_NUM_VALUES];
  * Create a group object out of the selected group of objects.
  */
 void
-abobj_group_selected_objects(
-)
+abobj_group_selected_objects(void)
 {
     ABObj        project = proj_get_project();
     ABObj        obj;
@@ -429,8 +428,7 @@ group_objects(
  * them after all groups have been ungrouped.
  */
 void
-abobj_ungroup_selected_objects(
-)
+abobj_ungroup_selected_objects(void)
 {
     ABObj        project = proj_get_project();
     ABSelectedRec sel;
index 99de8a04033d37e31c88c4b173e146921f638ad5..7e993ab147d39c2323767982f2c85fe82eea26c9 100644 (file)
@@ -870,7 +870,7 @@ turnoff_changebars(
  * Object destroy callback
  */
 static int
-prop_list_install_obj_destroy_CB()
+prop_list_install_obj_destroy_CB(void)
 {
     static BOOL        callback_installed = False;
 
index dd9cd2fd92c82e5ccf2f7a9eee430b97769ab1ca..2c62da00d39de06025e1f3d8d4a89778892cd25a 100644 (file)
@@ -931,7 +931,7 @@ menu_editCB(
  * Object destroy callback
  */
 static int
-prop_menu_install_obj_destroy_CB()
+prop_menu_install_obj_destroy_CB(void)
 {
     static BOOL        callback_installed = False;
 
index bb133d5f8012af7d6306332e14f884ecce440453..5049a29e384e41b3eb0244f556d3f54d240863c9 100644 (file)
@@ -597,7 +597,7 @@ turnoff_changebars(
  * Object destroy callback
  */
 static int
-prop_menubar_install_obj_destroy_CB()
+prop_menubar_install_obj_destroy_CB(void)
 {
     static BOOL        callback_installed = False;
 
index 8097de3e8fe298c760e98f0b75dd1c83d47a1c37..1adcda1cf8aa5adf50fcbd4e5e8366b2ea86090e 100644 (file)
@@ -814,7 +814,7 @@ pw_obj_reparentedOCB(
 }
 
 static void
-panedwinEdP_init()
+panedwinEdP_init(void)
 {
     obj_add_reparent_callback(pw_obj_reparentedOCB, "panedwinEdP_init");
     obj_add_rename_callback(pw_obj_renamedOCB, "panedwinEdP_init");
@@ -826,8 +826,7 @@ panedwinEdP_init()
  * Create a paned window out of the selected group of objects.
  */
 void
-abobj_make_panedwin(
-)
+abobj_make_panedwin(void)
 {
     ABObj              project = proj_get_project();
     ABObj              obj = (ABObj) NULL;
@@ -1076,8 +1075,7 @@ west_compare(
  * paned window and delete the paned window object.
  */
 void
-abobj_unmake_panedwin(
-)
+abobj_unmake_panedwin(void)
 {
     ABObj              project = proj_get_project();
     ABObj              pw_obj = NULL;
index b2ad4259f1569c6abfae53896c4705746649502a..4c2ad8a64a6b07ec34fd782bafb6c647e7ef15d4 100644 (file)
@@ -916,7 +916,7 @@ setup_content_settings(
 }
 
 static int
-spinbox_install_obj_destroy_CB()
+spinbox_install_obj_destroy_CB(void)
 {
     static BOOL        callback_installed = False;
 
index af5e9b656455040098621a96ed91b05c0eb502de..cb319f5912b8ba82c325725748599c49bfe9642f 100644 (file)
@@ -248,7 +248,7 @@ static int  select_fn(
  * Dialog shell.
  */
 void
-proj_show_dialog()
+proj_show_dialog(void)
 {
     ABObj              proj = proj_get_project();
     BrowserUiObj       ui;
@@ -320,7 +320,7 @@ projP_store_viewer(
  * Create viewer data structure for project window
  */
 static Vwr
-create_proj_struct()
+create_proj_struct(void)
 {
     Vwr                        v;
     extern VMethods    projP_methods;
@@ -893,8 +893,7 @@ mult_module_selected(
 }
 
 int
-proj_init(
-)
+proj_init(void)
 {
     obj_add_rename_callback(projP_obj_renameOCB, "PROJ");
     obj_add_destroy_callback(projP_obj_destroyOCB, "PROJ");
@@ -948,8 +947,7 @@ proj_set_project(
 }
 
 ABObj
-proj_get_project(
-)
+proj_get_project(void)
 {
     return AB_project;
 }
@@ -972,8 +970,7 @@ proj_set_cur_module(
 }
 
 ABObj
-proj_get_cur_module(
-)
+proj_get_cur_module(void)
 {
     return AB_cur_module;
 }
index 9879e6dd831a184d84b1125b1e8936e69ea144be..ad74deedc8e4140a3b2999f8304fbf840dfc5aa7 100644 (file)
@@ -1837,7 +1837,7 @@ proj_show_proj_dir(void)
 }
 
 void
-proj_name_proj()
+proj_name_proj(void)
 {
     STRING              proj_name = NULL;
     UI_MODAL_ANSWER     answer = UI_ANSWER_NONE;
index bc938c54c11f2c539116f8057411065153532355..b44752c1786cd450c22a67e69b8e695e5894f426 100644 (file)
@@ -4475,8 +4475,7 @@ obj_options_buildCB(
 }
 
 void
-strings_init(
-)
+strings_init(void)
 {
     LabelForString =
        XtNewString(catgets(Dtb_project_catd, 100, 215, "Label:"));
index 2f4e0a9619c09270b4399e67d7fde119246925c2..40e6967497f0acd22a1ffbf99c8105ac8aff614c 100644 (file)
@@ -823,9 +823,7 @@ ui_set_busy_cursor(
  * Initialize object pixmaps
  */
 static void
-init_obj_pixmaps
-(
-)
+init_obj_pixmaps(void)
 {
     Display            *dpy;
     Pixmap             tmp;
index c6aee71b9c87765821492b7512adb3d4d079e0fe..65554335f5ff6764aadd6f2b5223a8e5c7000a29 100644 (file)
@@ -170,7 +170,7 @@ vwr_destroy_tree
 }
 
 VNode
-vwr_create_node()
+vwr_create_node(void)
 {
     VNode      bnode;
 
index 422ad905d5894b2cdd5f9ed8957915ce96b3aa93..77d514b9e748af1097b0c9c02624b4e257fcce16 100644 (file)
@@ -792,11 +792,11 @@ static LibFuncRec abmfP_lrc_get_toplevel_widget =
     "dtb_get_toplevel_widget",
     
     /* proto */
-    "Widget dtb_get_toplevel_widget();",
+    "Widget dtb_get_toplevel_widget(void);",
     
     /* def */
     "Widget\n"
-    "dtb_get_toplevel_widget()\n"
+    "dtb_get_toplevel_widget(void)\n"
     "{\n"
     "  return(dtb_project_toplevel_widget);\n"
     "}"
@@ -894,11 +894,11 @@ static LibFuncRec abmfP_lrc_get_command =
     "dtb_get_command",
     
     /* proto */
-    "char *  dtb_get_command();",
+    "char *  dtb_get_command(void);",
     
     /* def */
     "char * \n"
-    "dtb_get_command() \n"
+    "dtb_get_command(void) \n"
     "{\n"
     "    return(dtb_save_command_str); \n"
     "}"
@@ -1174,7 +1174,7 @@ static LibFuncRec abmfP_lrc_do_onitem_help =
     "dtb_do_onitem_help",
     
     /* proto */
-    "void dtb_do_onitem_help();",
+    "void dtb_do_onitem_help(void);",
     
     /* def */
     "/*\n"
@@ -1183,7 +1183,7 @@ static LibFuncRec abmfP_lrc_do_onitem_help =
     "** main menubar's \"Help\" menu.\n"
     "*/\n"
     "void\n"
-    "dtb_do_onitem_help()\n"
+    "dtb_do_onitem_help(void)\n"
     "{\n"
     "    Widget        target;\n"
     "\n"
@@ -1456,14 +1456,14 @@ static LibFuncRec abmfP_lrc_get_client_session_saveCB =
     "dtb_get_client_session_saveCB",
     
     /* proto */
-    "DtbClientSessionSaveCB dtb_get_client_session_saveCB();",
+    "DtbClientSessionSaveCB dtb_get_client_session_saveCB(void);",
     
     /* def */
     "/*\n"
     " * dtb_get_client_session_saveCB()\n"
     " */\n"
     "DtbClientSessionSaveCB\n"
-    "dtb_get_client_session_saveCB()\n"
+    "dtb_get_client_session_saveCB(void)\n"
     "{\n"
     "    return(dtb_client_session_saveCB);\n"
     "\n"
@@ -1603,14 +1603,14 @@ static LibFuncRec abmfP_lrc_get_client_session_restoreCB =
     "dtb_get_client_session_restoreCB",
     
     /* proto */
-    "DtbClientSessionRestoreCB dtb_get_client_session_restoreCB();",
+    "DtbClientSessionRestoreCB dtb_get_client_session_restoreCB(void);",
     
     /* def */
     "/*\n"
     " * dtb_get_client_session_restoreCB()\n"
     " */\n"
     "DtbClientSessionRestoreCB\n"
-    "dtb_get_client_session_restoreCB()\n"
+    "dtb_get_client_session_restoreCB(void)\n"
     "{\n"
     "    return(dtb_client_session_restoreCB);\n"
     "\n"
@@ -4854,14 +4854,14 @@ static LibFuncRec abmfP_lrc_get_tt_msg_quitCB =
     "dtb_get_tt_msg_quitCB",
     
     /* proto */
-    "static DtbTTMsgHandlerCB dtb_get_tt_msg_quitCB();",
+    "static DtbTTMsgHandlerCB dtb_get_tt_msg_quitCB(void);",
     
     /* def */
     "/*\n"
     " * dtb_get_tt_msg_quitCB()\n"
     " */\n"
     "static DtbTTMsgHandlerCB\n"
-    "dtb_get_tt_msg_quitCB()\n"
+    "dtb_get_tt_msg_quitCB(void)\n"
     "{\n"
     "    return(dtb_tt_msg_quitCB);\n"
     "}"
@@ -4940,14 +4940,14 @@ static LibFuncRec abmfP_lrc_get_tt_msg_do_commandCB =
     "dtb_get_tt_msg_do_commandCB",
     
     /* proto */
-    "static DtbTTMsgHandlerCB dtb_get_tt_msg_do_commandCB();",
+    "static DtbTTMsgHandlerCB dtb_get_tt_msg_do_commandCB(void);",
     
     /* def */
     "/* \n"
     " * dtb_get_tt_msg_do_commandCB()\n"
     " */ \n"
     "static DtbTTMsgHandlerCB\n"
-    "dtb_get_tt_msg_do_commandCB()\n"
+    "dtb_get_tt_msg_do_commandCB(void)\n"
     "{ \n"
     "    return(dtb_tt_msg_do_commandCB);\n"
     "}"
@@ -5026,14 +5026,14 @@ static LibFuncRec abmfP_lrc_get_tt_msg_get_statusCB =
     "dtb_get_tt_msg_get_statusCB",
     
     /* proto */
-    "static DtbTTMsgHandlerCB dtb_get_tt_msg_get_statusCB();",
+    "static DtbTTMsgHandlerCB dtb_get_tt_msg_get_statusCB(void);",
     
     /* def */
     "/* \n"
     " * dtb_get_tt_msg_get_statusCB()\n"
     " */ \n"
     "static DtbTTMsgHandlerCB\n"
-    "dtb_get_tt_msg_get_statusCB()\n"
+    "dtb_get_tt_msg_get_statusCB(void)\n"
     "{ \n"
     "    return(dtb_tt_msg_get_statusCB);\n"
     "}"
@@ -5112,14 +5112,14 @@ static LibFuncRec abmfP_lrc_get_tt_msg_pause_resumeCB =
     "dtb_get_tt_msg_pause_resumeCB",
     
     /* proto */
-    "static DtbTTMsgHandlerCB dtb_get_tt_msg_pause_resumeCB();",
+    "static DtbTTMsgHandlerCB dtb_get_tt_msg_pause_resumeCB(void);",
     
     /* def */
     "/* \n"
     " * dtb_get_tt_msg_pause_resumeCB()\n"
     " */ \n"
     "static DtbTTMsgHandlerCB\n"
-    "dtb_get_tt_msg_pause_resumeCB()\n"
+    "dtb_get_tt_msg_pause_resumeCB(void)\n"
     "{ \n"
     "    return(dtb_tt_msg_pause_resumeCB);\n"
     "}"
@@ -5245,7 +5245,7 @@ static LibFuncRec abmfP_lrc_tt_close =
     "dtb_tt_close",
     
     /* proto */
-    "void dtb_tt_close();",
+    "void dtb_tt_close(void);",
     
     /* def */
     "/*\n"
@@ -5253,7 +5253,7 @@ static LibFuncRec abmfP_lrc_tt_close =
     " * Close ToolTalk Connection\n"
     " */\n"
     "void\n"
-    "dtb_tt_close()\n"
+    "dtb_tt_close(void)\n"
     "{\n"
     "    ttdt_close(NULL, NULL, True);\n"
     "}"
index f33f0fa7d92c2b5294c57a6c681b81ceb503f63d..657383bc7d8c3a9fa948e3540c7ee09b7f817065 100644 (file)
@@ -204,7 +204,7 @@ MsgSet_destroy(
 
     if (that->is_generated && that->msgs != (Msg *)NULL)
     {
-        register int   i;
+        int    i;
 
         for (i = 0; i < that->num_msgs; i++)
             msg_destroy(that->msgs[i]);
@@ -257,7 +257,7 @@ MsgSet_just_find_msg(
     )
 {
     int                        ret_val = -1;
-    register int       i;
+    int        i;
 
     if (that == NULL || string == (char *)NULL)
         goto cret;
@@ -317,7 +317,7 @@ MsgSet_set_msg_is_referenced(
     BOOL       msg_is_referenced
 )
 {
-    register int       i;
+    int        i;
 
     if (that == (MsgSet)NULL)
         goto cret;
@@ -413,7 +413,7 @@ MsgFile_destroy(
     
     if (that->msg_sets != (MsgSet *)NULL)
     {
-        register int   i;
+        int    i;
 
         for (i = 0; i < that->num_msg_sets; i++)
             MsgSet_destroy(that->msg_sets[i]);
@@ -439,7 +439,7 @@ MsgFile_save(
 {
     int                        ret_val = 0;
     FILE               *fp = NULL;
-    register int       i;
+    int        i;
 
     *msgFileOutPtr = NULL;
 
@@ -547,7 +547,7 @@ MsgFile_just_find_msg_set(
     )
 {
     MsgSet             ret_val = (MsgSet)NULL;
-    register int       i;
+    int        i;
 
     if (that == (MsgFile)NULL)
         goto cret;
@@ -725,7 +725,7 @@ msgFile_get_msg_set_by_num(
     )
 {
     MsgSet             ret_val = (MsgSet)NULL;
-    register int       i;
+    int        i;
 
     if (that == NULL)
         goto cret;
@@ -794,7 +794,7 @@ msgFile_max_set_number(
     )
 {
     int                        ret_val = 0;
-    register int       i;
+    int        i;
 
     if (that == NULL)
         goto cret;
@@ -904,7 +904,7 @@ msgSet_output(
     )
 {
     char       *set_name;
-    register int       i;
+    int        i;
         
     if (that == (MsgSet)NULL)
         goto cret;
@@ -1001,7 +1001,7 @@ msgSet_max_msg_number(
     )
 {
     int                        ret_val = 0;
-    register int       i;
+    int        i;
 
     if (that == NULL)
         goto cret;
index 98905a374c1e9a067b37a2ad5828ccdb6c234469..83c82d1f2f7e7416cc11eaf22cd0f5b8b129b6ee 100644 (file)
@@ -1681,7 +1681,7 @@ epilogue:
 
 
 CSegArray
-cseg_array_create()
+cseg_array_create(void)
 {
     CSegArray  newArray = (CSegArray)util_malloc(sizeof(CSegArrayRec));
     if (newArray != NULL)
@@ -1869,7 +1869,7 @@ main(int argc, char *argv[])
 /* DTB_USER_CODE_START */
 
 static int
-myfunc()
+myfunc(void)
 {
     return 0;
 }
index bbf56df19f07dcbacdddee6bc2c98e5a99f7188c..7d1723c005a321a5371229502a12435c5b5f7a4f 100644 (file)
@@ -270,7 +270,7 @@ abmfP_obj_get_widget_specific_includes(StringList includesList, ABObj obj)
     int                        return_value = 0;
     int                                num_includes = 0;
     BOOL                       objHasScrollbar = FALSE;
-    register IncludeForClass   include = class_includes;
+    IncludeForClass    include = class_includes;
 
     /*
      * Get optional widget parts
index 29a80dca9f09e6effc60a719a1522462d87d5f10..0b6642b11eb9d2f002e9b4ed464179d03d751895 100644 (file)
@@ -3168,7 +3168,7 @@ abuilP_store_attr_in_abobj(
        AB_OBJECT_TYPE  ab_type = obj_get_type(obj);
        unsigned long   obj_mask = BMASK(ab_type);
        AttrMap         *maps = match->attr_maps;
-       register int    i;
+       int     i;
 
        /* REMIND: fprintf(stderr,"Searching matched maps\n"); */
        for (i = 0; i < match->num_maps; i++)
index 6dc5c9904a9339942bf0cf14a1957abd87e20e3f..3430d3045eb684cecc0ff5195ed36b3799970ab4 100644 (file)
@@ -278,7 +278,7 @@ abuilP_entry_for_uil_widget(
 
     if (b_type > sym_k_error_object)
     {
-       register int    i;
+       int     i;
        STRING          widget_class_name = uil_widget_names[b_type];
 
        for (i = 0; i < XtNumber(widget_abobj_map); i++)
index feca036279bee550ae548c15023bc023895decea..575a64455d953a65874d51a6e86a94dc134a4778 100644 (file)
@@ -1295,7 +1295,7 @@ bil_token_key_compare(const void *voidIstr, const void *voidEntry)
 
 
 static int
-bil_token_table_init()
+bil_token_table_init(void)
 {
 #define btt bil_token_table
 #define off ((int)BIL_TOKEN_MIN_VALUE) /* offset to 1st token */
@@ -1720,8 +1720,8 @@ BIL_TOKEN
 bilP_string_to_token(STRING strToken)
 {
     ISTRING             istrToken = istr_create(strToken);
-    register long      midDiff;
-    register long      midIndex; 
+    long       midDiff;
+    long       midIndex;
     long               minIndex, maxIndex;
     bil_token_table_check_init();
 
index 0b2712db59c46068ca7ea9d75ca1c0c654bc7083..95eb04eec2a460dac5ce0ccf2b62854aa07c83b6 100644 (file)
@@ -120,7 +120,7 @@ AByylex(void)
 static int
 get_token(FILE *file)
 {
-    register int               c;      /* static for speed */
+    int                c;      /* static for speed */
     
     while (TRUE)
     {
@@ -404,7 +404,7 @@ yywrap()
  *************************************************************************/
 
 int
-bilP_load_reset()
+bilP_load_reset(void)
 {
        line_number= 1;
        last_token= AB_BIL_UNDEF;
@@ -414,7 +414,7 @@ bilP_load_reset()
 }
 
 int
-bilP_load_get_token()
+bilP_load_get_token(void)
 {
        return last_token;
 }
@@ -432,13 +432,13 @@ bilP_load_get_value(void)
 }
 
 int
-bilP_load_get_length()
+bilP_load_get_length(void)
 {
        return tokenTextLen;
 }
 
 int
-bilP_load_get_line_number()
+bilP_load_get_line_number(void)
 {
     return line_number;
 }
index b7772daec7966d9c631709f1ff461710651b83b3..bea8c284f87b6620ce2b03e4a3731cb9062bc60d 100644 (file)
@@ -78,7 +78,7 @@ typedef LOADATT_FUNC *LOADATT_FUNC_PTR;
 /*
  */
 ISTRING
-bilP_get_string()
+bilP_get_string(void)
 {
     STRING              tmp_str = NULL;
     ISTRING             value1;
@@ -133,7 +133,7 @@ bilP_get_string()
 /*
  */
 STRING
-bilP_load_att()
+bilP_load_att(void)
 {
 
     return NULL;
@@ -432,14 +432,14 @@ bilP_load_att_drag_enabled(BIL_TOKEN valueToken)
 }
 
 STRING
-bilP_load_att_drag_ops_begin()
+bilP_load_att_drag_ops_begin(void)
 {
     nset_att(AB_BIL_DRAG_OPS);
     return NULL;
 }
 
 STRING
-bilP_load_att_drag_ops_end()
+bilP_load_att_drag_ops_end(void)
 {
     clear_att();
     return NULL;
@@ -456,14 +456,14 @@ bilP_load_att_drag_to_root_allowed(BIL_TOKEN valueToken)
 }
 
 STRING
-bilP_load_att_drag_types_begin()
+bilP_load_att_drag_types_begin(void)
 {
     nset_att(AB_BIL_DRAG_TYPES);
     return NULL;
 }
 
 STRING
-bilP_load_att_drag_types_end()
+bilP_load_att_drag_types_end(void)
 {
     clear_att();
     return NULL;
@@ -489,42 +489,42 @@ bilP_load_att_drop_site_child_allowed(BIL_TOKEN valueToken)
 }
 
 STRING
-bilP_load_att_drop_ops_begin()
+bilP_load_att_drop_ops_begin(void)
 {
     nset_att(AB_BIL_DROP_OPS);
     return NULL;
 }
 
 STRING
-bilP_load_att_drop_ops_end()
+bilP_load_att_drop_ops_end(void)
 {
     clear_att();
     return NULL;
 }
 
 STRING
-bilP_load_att_drop_types_begin()
+bilP_load_att_drop_types_begin(void)
 {
     nset_att(AB_BIL_DROP_TYPES);
     return NULL;
 }
 
 STRING
-bilP_load_att_drop_types_end()
+bilP_load_att_drop_types_end(void)
 {
     clear_att();
     return NULL;
 }
 
 STRING
-bilP_load_att_files_begin()
+bilP_load_att_files_begin(void)
 {
     nset_att(AB_BIL_FILES);
     return NULL;
 }
 
 STRING
-bilP_load_att_files_end()
+bilP_load_att_files_end(void)
 {
     clear_att();
     return NULL;
index 9da3c65355581ef06ddc2d5e49609e0d81420978..12185d2e09ce974a06e0a3e871df608ce833e4d8 100644 (file)
@@ -392,7 +392,7 @@ epilogue:
  */
 
 int
-bilP_load_end_of_file()
+bilP_load_end_of_file(void)
 {
     bilP_reset_token_text();
     return 0;
@@ -400,7 +400,7 @@ bilP_load_end_of_file()
 
 
 int
-bilP_load_end_of_data()
+bilP_load_end_of_data(void)
 {
     fseek(AByyin, 0, SEEK_END);                /* move to end of file */
     return 0;
index fa71dd4eeebe719ff0badd7375391ba31f8fe78d..cc9a8f96ae9e7445b855cac28ca12a72bcd75765 100644 (file)
@@ -89,7 +89,7 @@ static BOOL         align_tab_inited = FALSE;
 #define align_tab_check_init() (align_tab_inited? 0:align_tab_init())
 
 static int
-align_tab_init()
+align_tab_init(void)
 {
 #define at align_tab
     align_tab_inited = TRUE;
@@ -122,7 +122,7 @@ static BOOL         arg_type_tab_inited = FALSE;
 #define arg_type_tab_check_init() (arg_type_tab_inited? 0:arg_type_tab_init())
 
 static int
-arg_type_tab_init()
+arg_type_tab_init(void)
 {
 #define att arg_type_tab
     arg_type_tab_inited = TRUE;
@@ -152,7 +152,7 @@ static BOOL         gat_inited = FALSE;
 #define gat_check_init() (gat_inited? 0:gat_init())
 
 static int
-gat_init()
+gat_init(void)
 {
     convert_fill_table(gat, AB_GIL_ATTRIBUTE_NUM_VALUES, istr_const(NULL));
 
@@ -316,7 +316,7 @@ static ISTRING      builtin_action_table[AB_BUILTIN_ACTION_NUM_VALUES] = {NULL};
        (builtin_action_table_inited? 0:builtin_action_table_init())
 
 static int
-builtin_action_table_init()
+builtin_action_table_init(void)
 {
 #define bat builtin_action_table
     builtin_action_table_inited = TRUE;
@@ -379,7 +379,7 @@ static BOOL         button_type_tab_inited = FALSE;
                (button_type_tab_inited? 0:button_type_tab_init())
 
 static int
-button_type_tab_init()
+button_type_tab_init(void)
 {
 #define btt button_type_tab
     button_type_tab_inited = TRUE;
@@ -411,7 +411,7 @@ static BOOL         compass_tab_inited = FALSE;
 #define cp_tab_check_init() (compass_tab_inited? 0:compass_tab_init())
 
 static int
-compass_tab_init()
+compass_tab_init(void)
 {
 #define cpt compass_tab
     compass_tab_inited = TRUE;
@@ -488,7 +488,7 @@ static BOOL         label_type_tab_inited = FALSE;
                (label_type_tab_inited? 0:label_type_tab_init())
 
 static int
-label_type_tab_init()
+label_type_tab_init(void)
 {
 #define ltt label_type_tab
     label_type_tab_inited = TRUE;
@@ -590,7 +590,7 @@ static ISTRING      obj_type_table[AB_OBJECT_TYPE_NUM_VALUES + 1] = {NULL};
        (obj_type_table_inited? 0:obj_type_table_init())
 
 static int
-obj_type_table_init()
+obj_type_table_init(void)
 {
 #define ott obj_type_table
     obj_type_table_inited = TRUE;
@@ -714,7 +714,7 @@ static BOOL         when_table_inited = FALSE;
                if (!when_table_inited) {when_table_init();}
 
 static int
-when_table_init()
+when_table_init(void)
 {
 #define wt when_table
     int                 i = 0;
index 5d3f3128cd4fbaef872ae81153e5bb1984da70b9..3b75ff4d245bf0a14761ae5c6acfe44389f69a9f 100644 (file)
@@ -287,7 +287,7 @@ abil_print_custom_load_err(STRING errmsgstr)
 
 /* Load the BIL error message table with message set and default text */
 static int
-abil_load_errmsg_table()
+abil_load_errmsg_table(void)
 {
     int i;
 
index af44593eff4906c727ed13b36a0888415ed0674f..c420b3d6a650f63096efe0e08b42801650fd9962 100644 (file)
@@ -215,9 +215,9 @@ obj_set_typed_arg_if_new(
 ABTypedArg 
 obj_get_typed_arg(ABObj obj, char *name)
 {
-       register int            num_args;
-       register int            i;
-       register ABTypedArg     arg_list= NULL;
+       int             num_args;
+       int             i;
+       ABTypedArg      arg_list= NULL;
        ABTypedArg              arg= NULL;
        ISTRING                 iname= istr_get_existing(name);
 
@@ -246,9 +246,9 @@ obj_get_typed_arg(ABObj obj, char *name)
 ABArg
 obj_get_arg(ABObj obj, char *name)
 {
-       register int    num_args;
-       register int    i;
-       register ABArg  arg_list;
+       int     num_args;
+       int     i;
+       ABArg   arg_list;
        ABArg           arg= NULL;
        ISTRING         iname= istr_get_existing(name);
 
@@ -324,9 +324,9 @@ MergeTypedArgLists(ABTypedArg args1, int num_args1,
 int
 obj_remove_arg(ABObj obj, STRING name)
 {
-       register int            i;
-       register ABArgList      args;
-       register int            nargs;
+       int             i;
+       ABArgList       args;
+       int             nargs;
        ISTRING                 iname= istr_get_existing(name);
 
        if ((obj == NULL) || (obj->args == NULL) )
@@ -412,8 +412,8 @@ abo_merge_typed_args(ABObj obj, ABTypedArg arg)
 int
 obj_get_num_args(ABObj obj)
 {
-       register ABArgList args= obj->args;
-       register int n = 0;
+       ABArgList args= obj->args;
+       int n = 0;
 
         for ( ; (args != (ABArgList)NULL) && (args->name != NULL);
              args++, n++)
@@ -429,8 +429,8 @@ obj_get_num_args(ABObj obj)
 int
 obj_get_num_typed_args(ABObj obj)
 {
-       register ABTypedArg args = obj->typed_args;
-       register int n = 0;
+       ABTypedArg args = obj->typed_args;
+       int n = 0;
 
         for ( ; (args != NULL) && (args->name != NULL); args++, n++)
        {
index 59f2f8291c10b9ea03877db8bfc5538b5d23fd3b..7540f2a19de6dfe788d3e63c78c68460cacb53e9 100644 (file)
@@ -263,7 +263,7 @@ obj_add_update_with_data_callback(ObjUpdateWithDataCallback cb,
 **************************************************************************/
 
 int
-objP_notify_push_mode()
+objP_notify_push_mode(void)
 {
     if (modeStackIndex >= (MAX_MODE_DEPTH-1))
     {
@@ -294,7 +294,7 @@ objP_notify_clear_mode(OBJ_EVENT_MODE deadMode)
  * the notify queue is flushed.
  */
 int
-objP_notify_pop_mode()
+objP_notify_pop_mode(void)
 {
     objP_notify_pop_mode_dont_flush();
 
@@ -311,7 +311,7 @@ objP_notify_pop_mode()
 
 
 OBJ_EVENT_MODE
-objP_notify_get_mode()
+objP_notify_get_mode(void)
 {
     return current_notify_mode();
 }
@@ -698,7 +698,7 @@ epilogue:
  *             generated while sending.  Guarantees empty queue on return.
  */
 static int
-flush_queue()
+flush_queue(void)
 {
     int                iReturn= 0;
     int                numEventsProcessed= 0;
@@ -1056,7 +1056,7 @@ event_print(OBJ_EVENT *event, FILE *outFile, BOOL addNewline, STRING name)
 
 
 static int
-event_queue_print()
+event_queue_print(void)
 {
     int                oldFirst= firstEventIndex;
     int                oldLast= lastEventIndex;
index 407eb3d85020bd7fc374d8c3a337525e9c7487a0..95083f31afb521f4fb0d83f62ed5b20d366bbfeb 100644 (file)
@@ -644,8 +644,8 @@ ab_make_valid_c_ident(STRING label)
     static char         name[MAXPATHLEN];
     static int          ith = 0;
     int                 lastchar = -1;
-    register char      *oldPtr = label;
-    register char      *newPtr = name;
+    char      *oldPtr = label;
+    char      *newPtr = name;
 
     if (isdigit(*oldPtr))
     {
@@ -1602,7 +1602,7 @@ sig_fault_handler_uninstall(void)
 
 
 static void
-sig_fault_handler()
+sig_fault_handler(void)
 {
     if (mem_fault_occurred)
     {
index 4e4e7f009d405fa3458ccfa163345fd678b25d82..2de1969f980f1b86df6809a55db89e904a7c6a63 100644 (file)
@@ -478,8 +478,8 @@ find_first_ancestor_sibling_child(ABObj obj, ABTraversal trav)
 static BOOL
 travP_qualifies(ABTraversal trav)
 {
-       register ABObj  curObj = trav->curObj;
-       register BOOL   qualifies= TRUE;
+       ABObj   curObj = trav->curObj;
+       BOOL    qualifies= TRUE;
 
        if (obj_has_impl_flags(curObj, ObjFlagDestroyed))
        {
index ae51e0dca316b382b04c750c33dab574c82ef64a..0f79fd0e7db3bc458a0b529cc0a3747d68c693ae 100644 (file)
@@ -268,8 +268,8 @@ objxm_get_arg(
     char        *name
 )
 {
-    register int        num_args;
-    register int        i;
+    int        num_args;
+    int        i;
     Arg                 *argptr = NULL;
 
     num_args = objxm_get_num_args(arglist);
@@ -422,8 +422,8 @@ objxm_get_num_args(
    ArgList arglist 
 )
 {
-    register ArgList args = arglist;
-    register int     n = 0;
+    ArgList args = arglist;
+    int     n = 0;
 
     for ( ; (args != (ArgList)NULL) && (args->name != NULL);
              args++, n++)
@@ -441,9 +441,9 @@ objxm_remove_arg(
     STRING  name
 )
 {
-    register int       i;
-    register ArgList   args;
-    register int       nargs;
+    int       i;
+    ArgList   args;
+    int       nargs;
 
     if (*p_arglist == NULL)
     {
index 601e9fc49bb0b7aa0465cbf061956bc8151b941c..230cd42857c538dd6bc54ae5c33fff575ef1cf0f 100644 (file)
@@ -1478,8 +1478,7 @@ formlist_append(
  * resize requests after they've been already managed.
  */
 static int
-formlist_force_resize(
-)
+formlist_force_resize(void)
 {
     Dimension  f_width, f_height;
     int        i;
index deeede9f3182d07aad74b9c0f8ae242995abeff1..6ae61774700bc588e8c01b71bbecf4a849160549 100644 (file)
@@ -159,8 +159,7 @@ static XtArgVal     resize_default(WidgetClass wclass);
  * Initialize all Xm string tables
  */
 void
-objxm_strs_init(
-)
+objxm_strs_init(void)
 {
     load_enum_table();
     load_res_table();
@@ -606,8 +605,7 @@ xm_reg_res(
  * Load the resource table with known Motif/Xt resource names
  */
 static void
-load_res_table(
-)
+load_res_table(void)
 {
 #define REG(xmn_, strn_, type_, enumt_, defv_, deff_) \
          (objxm_register_res(xmn_, strn_, type_, AB_ARG_CLASS_UNDEF, enumt_, defv_, deff_));
@@ -1100,10 +1098,10 @@ build_xm_res_table_xmname_index(void)
 static ObjxmRes *
 find_res_entry_by_xmname(ISTRING istr_xmname)
 {
-    register int        midDiff;
-    register int        midIndex;
-    register int       minIndex, maxIndex;
-    register ObjxmRes  *entry;
+    int        midDiff;
+    int        midIndex;
+    int        minIndex, maxIndex;
+    ObjxmRes   *entry;
 
     /*
      * Perform binary search for ISTRING value
@@ -1164,8 +1162,7 @@ find_res_entry_by_strname(ISTRING strname)
  * Load the enum table with known Motif/Xt enum definition/strings
  */ 
 static void
-load_enum_table(
-)
+load_enum_table(void)
 {
 #define XM_REG_ENUM(tbl_, i_, xmd_, strd_) \
               {  (tbl_).enums[i_].xmdef = (xmd_); \
@@ -1473,8 +1470,7 @@ load_enum_table(
  * Load the xmcreate table with known Motif/Xt create routines/strings
  */
 static void
-load_xmcreate_table(
-)
+load_xmcreate_table(void)
 {
 #define XM_REG_XMCREATE(i_, ftn_, fstr_) \
               {  xm_xmcreate_table[i_].ftn = (ftn_); \
index 55407ab7771f94d8dae44118d1614ee6c44194c7..31f64e9a3ac3cc939ce08687832752acacb06d46 100644 (file)
@@ -1859,7 +1859,7 @@ abio_put_string(FILE * outFile, STRING s)
 int
 abio_put_string_to_file(FILE * outFile, STRING string)
 {
-    register STRING     ptr;
+    STRING     ptr;
     char               strEndChar = *(abio_string_end_string());
     char               curChar = 0;
 
@@ -1971,7 +1971,7 @@ abioP_build_indent_string(
                        int     new_indent_level
 )
 {
-    register int        i;
+    int        i;
     int                        indent_length = 0;
     out_file = out_file;       /* avoid warning */
 
@@ -2426,7 +2426,7 @@ int
 abio_put_string_to_buffer(STRING string, STRING outBuf, int size)
 {
 #define INC             32
-    register STRING     ptr;
+    STRING     ptr;
     char               strEndChar = *(abio_string_end_string());
     char               curChar = 0;
     int                        i = 0;
index ebe390a70a39100c1b0a056b0d1d8b46de998302..afaaaef5b2592a7aba86e2dbddb5e7b454bd9bb5 100644 (file)
@@ -275,10 +275,10 @@ util_file_name_is_bil_encapsulated(
 static void
 expand_path(char *nm, char *buf)
 {
-       register char  *s, *d;
+       char  *s, *d;
        char            lnm[MAXPATHLEN];
        int             q;
-       register char  *trimchars = "\n \t";
+       char  *trimchars = "\n \t";
 
        /* Strip off leading & trailing whitespace and cr */
        while (strchr(trimchars, *nm) != NULL)
@@ -303,9 +303,9 @@ expand_path(char *nm, char *buf)
                                break;
                }
                else if (*s++ == '$') {
-                       register char  *start = d;
-                       register        braces = *s == '{';
-                       register char  *value;
+                       char  *start = d;
+                       char  braces = *s == '{';
+                       char  *value;
                        while (*d++ = *s)
                                if (braces ? *s == '}' : !isalnum(*s))
                                        break;
@@ -336,8 +336,8 @@ expand_path(char *nm, char *buf)
                }
                else
                {       /* ~user/filename */
-                       register char  *nnm;
-                       register struct passwd *pw;
+                       char  *nnm;
+                       struct passwd *pw;
                        for (s = nm; *s && *s != '/'; s++);
                        nnm = *s ? s + 1 : s;
                        *s = 0;
index 6f79b7c50f75810b59b344a74c7f67cc953e97d7..4148c2aca99752cad0d221f3ec32ea106358c3be 100644 (file)
@@ -861,7 +861,7 @@ hashing(
        STRING  string
 )
 {
-    register unsigned hash_val = 0;
+    unsigned hash_val = 0;
 
     for (hash_val = 0; *string; ++string)
         hash_val = hash_val * 65599 + *string;
@@ -881,8 +881,8 @@ hash_and_lookupstr(
 {
 #define fast_streq(s1,s2) (((s1)[0] == (s2)[0]) && (strcmp(s1,s2) == 0))
 
-    register unsigned hash_val = 0;
-    register char      *stringPtr;
+    unsigned hash_val = 0;
+    char       *stringPtr;
     Bucket     entry;
     int                *valuePtr;
     int                *valuePtrEnd;
index 0ae627ef17c144def0f5a443240697690b214ead..e9ea84942bcfa1fcd9f52941a087dc4e0fe39de1 100644 (file)
@@ -211,7 +211,7 @@ util_get_program_name(void)
  * the ones that don't we'll do a normal fork.
  */
 pid_t
-util_vfork()
+util_vfork(void)
 {
     return fork();
 }
index fe9d2be7ad11d3e2fbc9e373a2463d37409b3557..c319d39b5dfd0650be0f26b00b6e7d325b4e7357 100644 (file)
@@ -121,7 +121,7 @@ static ISTRING      builtin_action_table[AB_BUILTIN_ACTION_NUM_VALUES]= {NULL};
        (builtin_action_table_inited? 0:builtin_action_table_init())
 
 static int
-builtin_action_table_init()
+builtin_action_table_init(void)
 {
 #define bat builtin_action_table
        builtin_action_table_inited= TRUE;
@@ -176,7 +176,7 @@ static ISTRING obj_type_table[AB_OBJECT_TYPE_NUM_VALUES+1]= {NULL};
        (obj_type_table_inited? 0:obj_type_table_init())
 
 static int
-obj_type_table_init()
+obj_type_table_init(void)
 {
 #define ott obj_type_table
     obj_type_table_inited= TRUE;
@@ -248,7 +248,7 @@ static ISTRING browser_obj_type_table[AB_OBJECT_TYPE_NUM_VALUES+1]= {NULL};
        (browser_obj_type_table_inited? 0:browser_obj_type_table_init())
 
 static int
-browser_obj_type_table_init()
+browser_obj_type_table_init(void)
 {
 #define bott browser_obj_type_table
     browser_obj_type_table_inited= TRUE;
@@ -316,7 +316,7 @@ static ISTRING      when_table[AB_WHEN_NUM_VALUES];
 static BOOL    when_table_inited= FALSE;
 
 static int
-when_table_init()
+when_table_init(void)
 {
 #define wt when_table
        int     i= 0;
@@ -389,7 +389,7 @@ static BOOL align_tab_inited= FALSE;
 #define align_tab_check_init() (align_tab_inited? 0:align_tab_init())
 
 static int
-align_tab_init()
+align_tab_init(void)
 {
 #define at align_tab
     align_tab_inited= TRUE;
@@ -429,7 +429,7 @@ static BOOL label_type_tab_inited= FALSE;
                (label_type_tab_inited? 0:label_type_tab_init())
 
 static int
-label_type_tab_init()
+label_type_tab_init(void)
 {
 #define ltt label_type_tab
        label_type_tab_inited= TRUE;
@@ -469,7 +469,7 @@ static BOOL button_type_tab_inited= FALSE;
                (button_type_tab_inited? 0:button_type_tab_init())
 
 static int
-button_type_tab_init()
+button_type_tab_init(void)
 {
 #define btt button_type_tab
     button_type_tab_inited= TRUE;
@@ -504,7 +504,7 @@ static BOOL arg_class_tab_inited= FALSE;
                (arg_class_tab_inited? 0:arg_class_tab_init())
 
 static int
-arg_class_tab_init()
+arg_class_tab_init(void)
 {
 #define att arg_class_tab
     arg_class_tab_inited= TRUE;
@@ -585,7 +585,7 @@ static BOOL arg_type_tab_inited= FALSE;
 #define arg_type_tab_check_init() (arg_type_tab_inited? 0:arg_type_tab_init())
 
 static int
-arg_type_tab_init()
+arg_type_tab_init(void)
 {
 #define att arg_type_tab
     arg_type_tab_inited= TRUE;
@@ -703,7 +703,7 @@ static BOOL     container_tab_inited= FALSE;
 #define container_tab_check_init() (container_tab_inited? 0:container_tab_init())
  
 static int
-container_tab_init()
+container_tab_init(void)
 {
 #define cont container_tab
     container_tab_inited= TRUE;
@@ -747,7 +747,7 @@ static BOOL     item_tab_inited= FALSE;
 #define item_tab_check_init() (item_tab_inited? 0:item_tab_init())
  
 static int
-item_tab_init()
+item_tab_init(void)
 {
 #define it item_tab
     item_tab_inited= TRUE;
index 792d2e9d47cfc759556f23f1c55472ea0b6fdcc0..7225747766e8e74d305befb6a62490f563556df3 100644 (file)
@@ -3316,7 +3316,7 @@ modelineValueChanged(Widget widget, XtPointer client_data, XtPointer call_data)
 static void
 create_menu_bar(Widget parent)
 {
-   register int n;
+   int n;
    int count;
    Widget WidgList[10];
    Arg args[5];
index d107ff68311244b364eb2e8960c15dfbecc6e35a..8e7b9e29243db79c33c912a3659af3d04b50c95e 100644 (file)
@@ -1633,8 +1633,7 @@ L130:
 
 
 void
-mpdiv(x, y, z)
-int *x, *y, *z ;
+mpdiv(int *x, int *y, int *z)
 {
   static int i, i2, ie, iz3 ;
 
index 147ce8b3816dd8a525bf7af6c33ea1135258a204..bd64772048d0a0cf3fc0cf7bb0680170b74e8788 100644 (file)
@@ -65,7 +65,7 @@ char *vstrs[MAXVMESS] ;
 
 
 void
-init_cmdline_opts()      /* Initialize command line option strings. */
+init_cmdline_opts(void)      /* Initialize command line option strings. */
 {
   cmdstr[(int) CMD_ACC]      = "-a" ;
   cmdstr[(int) CMD_MODE]      = "-m" ;
@@ -78,7 +78,7 @@ init_cmdline_opts()      /* Initialize command line option strings. */
 
 
 void
-init_text()   /* Setup text strings depending upon language. */
+init_text(void)   /* Setup text strings depending upon language. */
 {
   int i ;
 
@@ -640,7 +640,7 @@ init_text()   /* Setup text strings depending upon language. */
 }
 
 void
-init_mess()   /* Setup text strings depending upon language. */
+init_mess(void)   /* Setup text strings depending upon language. */
 {
   int i ;
 
index d2932bbf15575d34722ac3370cbbd5f3b95ce69b..b0291d8bb2ad4fed43767589c9b8c2c679622192 100644 (file)
@@ -225,7 +225,7 @@ DtXlateStdToOpLocale (
     }
 }
 char *
-targetTagName()
+targetTagName(void)
 {
    char *ret_locale = NULL;
    char *ret_lang = NULL;
@@ -250,6 +250,10 @@ targetTagName()
           NULL,
           &ret_codeset);
 
+   free(ret_locale);
+   free(ret_target);
+   free(ret_lang);
+
    return ret_codeset;
 }
 
@@ -262,6 +266,7 @@ getCharSet(char * charset)
 
     if (mimeCS) {
        strcpy(charset, mimeCS);
+       free(mimeCS);
     } else {
            strcpy(charset, "us-ascii");   /* default MIME codeset */
     }
@@ -514,6 +519,9 @@ CvtStr( char *charSet, void *from, unsigned long from_len,
                                &InterChCodeSet );
        } else {
            /* Convert charSet to StdInterChangeCodeSet */
+           free(ret_locale);
+           free(ret_lang);
+           free(ret_codeset);
            ret_locale = ret_lang = ret_codeset = NULL;
            DtXlateOpToStdLocale( DtLCX_OPER_MIME,
                                charSet,
@@ -551,6 +559,9 @@ CvtStr( char *charSet, void *from, unsigned long from_len,
 #endif /* _AIX */
            {
                /* Convert InterChCodeSet to StdCodeSet */
+               free(ret_locale);
+               free(ret_lang);
+               free(ret_codeset);
                ret_locale = ret_lang = ret_codeset = NULL;
                DtXlateOpToStdLocale( DtLCX_OPER_INTERCHANGE_CODESET,
                                InterChCodeSet,
@@ -579,6 +590,9 @@ CvtStr( char *charSet, void *from, unsigned long from_len,
                                &from_codeset );
        } else {
            /* Convert charSet to StdInterChangeCodeSet */
+           free(ret_locale);
+           free(ret_lang);
+           free(ret_codeset);
            ret_locale = ret_lang = ret_codeset = NULL;
            DtXlateOpToStdLocale( DtLCX_OPER_MIME,
                                charSet,
@@ -606,6 +620,9 @@ CvtStr( char *charSet, void *from, unsigned long from_len,
                                &InterChCodeSet );
        } else {
            /* Convert charSet to StdInterChangeCodeSet */
+           free(ret_locale);
+           free(ret_lang);
+           free(ret_codeset);
            ret_locale = ret_lang = ret_codeset = NULL;
            DtXlateOpToStdLocale( DtLCX_OPER_MIME,
                                charSet,
@@ -623,6 +640,10 @@ CvtStr( char *charSet, void *from, unsigned long from_len,
                                &to_codeset );
     }
 
+    free(ret_locale);
+    free(ret_lang);
+    free(ret_codeset);
+
     *to = NULL;
     *to_len = 0;
 
@@ -1498,6 +1519,8 @@ rfc1522cpy(char * buf, const char * value)
             */
                char *_tmp1_;
                char *_tmp2_;
+               free(ret_locale);
+               free(ret_lang);
                ret_locale = ret_lang = _tmp1_ = NULL;
                DtXlateOpToStdLocale( DtLCX_OPER_INTERCHANGE_CODESET,
                                        ret_codeset,
@@ -1514,6 +1537,9 @@ rfc1522cpy(char * buf, const char * value)
                strncat(buf,"=?", 2);
                strncat(buf,_tmp2_, strlen(_tmp2_));
                strncat(buf,"?q?", 3);
+
+               free(_tmp1_);
+               free(_tmp2_);
            } else if ( !strncasecmp( ret_codeset, "ISO-2022-JP", 11 ) ) {
            /*
             * According to RFC1468, in the Header Field, we should use
@@ -1561,5 +1587,9 @@ rfc1522cpy(char * buf, const char * value)
        }
     }
 
+    free(ret_codeset);
+    free(ret_locale);
+    free(ret_lang);
+
     crlf(buf);
 }
index aee694e494ec897a0d6d90b9e639d98d0be744da..98139a739ba6be50ffa8f37f4a71d2e519b6e3c1 100644 (file)
@@ -453,8 +453,14 @@ blist_init_names(Calendar *c) {
        blist_name_append(c, get_char_prop(p, CP_DEFAULTCAL), BLIST_ACTIVE);
 
         namelist = cm_strdup(get_char_prop(p, CP_DAYCALLIST));
-        if (namelist == NULL || *namelist == '\0' )
+       if(namelist == NULL) {
                return;
+       }
+
+       if(*namelist == '\0') {
+               free(namelist);
+               return;
+       }
 
        name = strtok(namelist, " ");
        while (name) {
index 75fe69a13366133f0d73262e4617d1fd2e616494..f0b60186719274e033207069ec1f01b836dfcbf9 100644 (file)
@@ -941,7 +941,11 @@ nt */
 
        scrub_attr_list(appt);
  
-        appointment_buf = parse_attrs_to_string(appt, p, attrs_to_string(appt->attrs, appt->count));
+       {
+           char *attrstring = attrs_to_string(appt->attrs, appt->count);
+           appointment_buf = parse_attrs_to_string(appt, p, attrstring);
+           free(attrstring);
+       }
 
        free_appt_struct(&appt);
 
index ecb32f8a6b9fb37f94c02b1df6e33e945b1b33d8..c588ff4cf601c3f4f7176740240dbe3323552126 100644 (file)
@@ -1853,6 +1853,8 @@ reset_timer(Calendar *c) {
                _csa_iso8601_to_tick(reminders[0].run_time, &reminder_tick);
                c->view->next_alarm_id = XtAppAddTimeOut(c->xcontext->app,
                        (max(reminder_tick - now(), 1) * 1000), reminder_driver, c);
+       } else {
+               free(reminders);
        }
 
        return stat;
@@ -1904,8 +1906,7 @@ move_to_new_day(XtPointer data, XtIntervalId *dummy)
 }
 
 static void
-setup_new_day_handler(c)
-       Calendar *c;
+setup_new_day_handler(Calendar *c)
 {
        Tick midnight;
         unsigned long next_day;
@@ -1985,9 +1986,7 @@ sig_int_handler(
        exit(0);
 }
 
-static int myabort(dpy, event)
-        Display *dpy;
-        XErrorEvent  *event;
+static int myabort(Display *dpy, XErrorEvent  *event)
 {
 /*
 char buffer[MAXNAMELEN];
@@ -2223,7 +2222,7 @@ open_initial_calendar(
        Calendar        *c,
        CSA_return_code *status)
 {
-       char            buf[MAXNAMELEN], *loc, *user;
+       char            buf[MAXNAMELEN], *loc, *user = NULL;
        CSA_flags       flags = 0;
        CSA_extension   cb_ext;
        CSA_extension   logon_ext;
@@ -2236,6 +2235,7 @@ open_initial_calendar(
 
        if ((loc = cm_target2location(c->view->current_calendar)) == NULL) {
                error_noloc(c, c->view->current_calendar);
+               free(user);
                return False;
        }
 
@@ -2328,7 +2328,7 @@ view_event(Widget w, XtPointer client_data, XtPointer cbs)
 }
 
 static void
-cm_usage()
+cm_usage(void)
 {
        (void)fprintf(stderr, "Usage: dtcm [ -c calendar ] [-v view ]");
        (void)fprintf(stderr, " [ -p printer ] [ generic-tool-arguments ]\n" );
@@ -2452,7 +2452,7 @@ static XtResource resources[] = {
  * to the local host.
  */
 char *
-get_user_calendar()
+get_user_calendar(void)
 {
        char    *name, *uname, *loc;
        Boolean needfree = False;
@@ -2474,12 +2474,11 @@ get_user_calendar()
 }
 
 static void
-init_calendar(argc, argv)
-       int argc; char **argv;
+init_calendar(int argc, char **argv)
 {
        int start, stop;
-       register int i;
-       register char *s_ptr, *d_ptr;
+       int i;
+       char *s_ptr, *d_ptr;
        Props *p;
        Tick today;
        char bind_home[MAXPATHLEN];
@@ -2956,7 +2955,7 @@ today_inrange(Calendar *c, time_t day_in_range) {
        return inrange;
 }
 void
-init_strings()
+init_strings(void)
 {
        char *display_lang="C";
 
index 614e001fd6b43790b729233da7cdc4f68fb5aae9..f445141beb97948879df1297e56ea6da83c9b0ca 100644 (file)
@@ -212,7 +212,7 @@ prompt_for_insert(Props *p) {
                prompt_for_line(
                        catgets(DT_catd, 1, 199, "End (%s): "), "None", cm_end);
 
-       strcpy(cm_repeatstr, catgets(DT_catd, 1, 200, "One Time"));
+       snprintf(cm_repeatstr, sizeof(cm_repeatstr), "%s", catgets(DT_catd, 1, 200, "One Time"));
 
        prompt_for_line(catgets(DT_catd, 1, 201, 
                        "Repeat (%s): "), cm_repeatstr, cm_repeatstr);
index 294ff0c7753178fe02fc626ff46b0b8edaa5e1e9..1e5cf9520c4c673744e1863ee5939fe76d86cf02 100644 (file)
@@ -765,7 +765,7 @@ extern void
 print_day_range(Calendar *c, Tick start_tick, Tick end_tick)
 {
        int             n;
-       register Tick   first_date = start_tick;
+       Tick    first_date = start_tick;
         Boolean        done = False, first = True;
         int            num_page = 1;
        Props           *pr = (Props*)c->properties;
index 527ed4aefa2c0145877e99bd4a6fabfab12b0f00..e89dca2a557e51d85ad1de4a4e3d71eef983c354 100644 (file)
@@ -85,7 +85,7 @@ static  char sccsid[] = "@(#)deskset.c 1.11 94/12/22 Copyr 1993 Sun Microsystems
 **
 ******************************************************************************/
 extern char *
-ds_relname()
+ds_relname(void)
 {
        static char     buf[MAXNAMELEN];
 
index 8c71090f1177b7a4a619f43585c17a15e3d6918b..212c4c70ff8b181e10bb771dcd3cde77b69d34f1 100644 (file)
@@ -83,7 +83,7 @@ static Boolean
 validate_dropped_appt(char *filename, Calendar *c) {
        Props                   *p = (Props *)c->properties;
        Props_pu                *pu = (Props_pu *)c->properties_pu;
-       CmDataList              *list = CmDataListCreate();
+       CmDataList              *list = NULL;
        Validate_op             op;
        int                     i;
        Dtcm_appointment        *a;
@@ -91,6 +91,8 @@ validate_dropped_appt(char *filename, Calendar *c) {
        if (!filename || *filename == '\0')
                return(False);
 
+       list = CmDataListCreate();
+
        op = parse_appt_from_file(c->DT_catd, filename, list, p, query_user, 
                                  (void *)c, c->general->version);
 
@@ -396,7 +398,7 @@ extern int
 drag_load_proc(char *filename, Calendar *c) {
        int                     ret_val, i = 1;
        char                    buf[MAXNAMELEN * 2];
-       CmDataList              *list = CmDataListCreate();
+       CmDataList              *list = NULL;
        Props                   *p = (Props *)c->properties;
        Props_pu                *pu = (Props_pu *)c->properties_pu;
        Validate_op             op;
@@ -406,6 +408,8 @@ drag_load_proc(char *filename, Calendar *c) {
        if (!filename || *filename == '\0')
                return -1;
 
+       list = CmDataListCreate();
+
        op = parse_appt_from_file(c->DT_catd, filename, list, p, query_user, 
                                  (void *)c, c->general->version);
        if (list->count <= 0) {
@@ -924,9 +928,14 @@ ApptDragStart(
          free(context);
          return;
        }
-       apptstr = parse_attrs_to_string(appt, (Props *)calendar->properties, 
-                                       attrs_to_string(appt->attrs,
-                                                       appt->count));
+
+       {
+               char *attr_string = attrs_to_string(appt->attrs, appt->count);
+               apptstr = parse_attrs_to_string(appt, (Props *)calendar->properties,
+                                       attr_string);
+
+               free(attr_string);
+       }
        free_appt_struct(&appt);
 
        context->data = apptstr;
index b1440fea643ecbddbb760806e7c1baffbb70cae1..ca3b6af626d6c6391053eade443881db12d15f68 100644 (file)
@@ -89,6 +89,7 @@ dssw_get_non_times(DSSW *dssw, time_t t) {
 
        str = XmTextGetString(dssw->what_text);
        strcpy(dssw->what_val, str);
+       snprintf(dssw->what_val, sizeof(dssw->what_val), "%s", str);
        XtFree(str);
 }
 
@@ -861,7 +862,7 @@ get_dssw_times(DSSW *dssw) {
                XmToggleButtonGetState(dssw->start_am) ? TIME_AM : TIME_PM;
 
        str = XmTextGetString(dssw->stop_text);
-       strcpy(dssw->stop_val.val, str);
+       snprintf(dssw->stop_val.val, sizeof(dssw->stop_val.val), "%s", str);
        XtFree(str);
        dssw->stop_val.block =
                XmToggleButtonGetState(dssw->stop_am) ? TIME_AM : TIME_PM;
index ecf81fcf84fdb0a5ef612f8deaee04aacdfef65d..8a6b3e0810cb09b1e8cf775345c6916421a28d30 100644 (file)
@@ -343,6 +343,7 @@ StandaloneApptDragStart(
        int             old_attr_count;
         char            *apptstr;
        int             preDsswFlags, preRfpFlags;
+       char            *attrstring = NULL;
 
        /* Convert appointment into string.  If not successful, don't start drag. */
        appt = allocate_appt_struct(appt_write, DATAVER_ARCHIVE, NULL);
@@ -368,8 +369,9 @@ StandaloneApptDragStart(
 
        old_attr_count = appt->count;
        merge_old_values(de->orig_appt, appt);
-       apptstr = parse_attrs_to_string(appt, de->p,
-                                       attrs_to_string(appt->attrs, appt->count));
+       attrstring = attrs_to_string(appt->attrs, appt->count);
+       apptstr = parse_attrs_to_string(appt, de->p, attrstring);
+       free(attrstring);
        appt->count = old_attr_count;
        free_appt_struct(&appt);
 
@@ -564,6 +566,7 @@ de_apply_proc(Widget w, XtPointer client_data, XtPointer data) {
        Dtcm_appointment        *appt;
        int                     old_attr_count;
        Display                 *dpy = XtDisplayOfObject(w);
+       char                    *attrstring = NULL;
 
        appt = allocate_appt_struct(appt_write, 
                                        DATAVER_ARCHIVE,
@@ -580,12 +583,16 @@ de_apply_proc(Widget w, XtPointer client_data, XtPointer data) {
 
        old_attr_count = appt->count;
        merge_old_values(de->orig_appt, appt);
-       str = parse_attrs_to_string(appt, de->p, attrs_to_string(appt->attrs, appt->count));
+       attrstring = attrs_to_string(appt->attrs, appt->count);
+       str = parse_attrs_to_string(appt, de->p, attrstring);
+       free(attrstring);
        appt->count = old_attr_count;
        de->modified = False;
 
-       if (!str)
+       if (!str) {
+               free_appt_struct(&appt);
                return;
+       }
 
        /* we need to distinguish between whether the data is being 
           saved as part of application termination, or as part of 
@@ -614,6 +621,8 @@ de_apply_proc(Widget w, XtPointer client_data, XtPointer data) {
 
                                if (!fp) {
                                        XBell(dpy, 50);
+                                       free(str);
+                                       free_appt_struct(&appt);
                                        return;
                                }
 
@@ -638,6 +647,8 @@ de_apply_proc(Widget w, XtPointer client_data, XtPointer data) {
 
                        if (!fp) {
                                XBell(dpy, 50);
+                               free(str);
+                               free_appt_struct(&appt);
                                return;
                        }
 
@@ -680,7 +691,8 @@ de_reset_proc(Widget w, XtPointer client_data, XtPointer data) {
 }
 
 static void
-display_command_usage() {
+display_command_usage(void)
+{
        fprintf(stderr, "\ndtcm_editor Usage:  dtcm [filename]\n\n");
        exit(0);
 }
index 6b767c16aa740bea8213f6946616366eb3169b4c..10742709a578f28020f6a4f7d75bdbf9b74e3902 100644 (file)
@@ -68,8 +68,7 @@
 static void layout_labels(Widget, Widget, Widget, Widget);
 
 extern caddr_t
-make_find(c)
-Calendar *c;
+make_find(Calendar *c)
 {
        Find            *f;
        Widget           separator1, separator2, button_form;
@@ -549,15 +548,15 @@ fmt_time_what(
         lines = text_to_lines(appt->what->value->item.string_value, 1);
         if (lines != NULL && lines->s != NULL) {
                 (void) cm_strcat(buf, lines->s);
+        }
+
+        if (lines != NULL) {
                 destroy_lines(lines);
         }
 }
 
 void
-find_appts(widget, client_data, cbs)
-Widget widget;
-XtPointer client_data;
-XmPushButtonCallbackStruct *cbs;
+find_appts(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs)
 {
        Calendar *c = calendar;
        Props *p = (Props*)c->properties;
@@ -766,10 +765,7 @@ XmPushButtonCallbackStruct *cbs;
 }
 
 void
-show_appt(widget, client_data, cbs)
-Widget widget;
-XtPointer client_data;
-XmPushButtonCallbackStruct *cbs;
+show_appt(Widget widget, XtPointer client_data, XmPushButtonCallbackStruct *cbs)
 {
        Calendar *c = calendar;
 
index 467354728c13f3a5bd36ed7d6dddafcd08378e1b..6c7c3f2dd30a239775f14713b1fe10ebe977b692 100644 (file)
@@ -420,6 +420,9 @@ format_abbrev_appt(Dtcm_appointment *appt, char *b, Boolean show_am,
         lines = text_to_lines(appt->what->value->item.string_value, 1);
         if (lines != NULL && lines->s != NULL) {
                 (void) cm_strcat(b, lines->s);
+        }
+
+        if(lines != NULL) {
                 destroy_lines(lines);
         }
 }
@@ -435,7 +438,7 @@ format_appt(Dtcm_appointment *appt, char *b, DisplayType display, int max) {
         int            hr, mn, len, i = 0, j = 0;
        Tick            tick;
        struct tm       *tm;
-       register char           *what_ptr;
+       char            *what_ptr;
        _Xltimeparams localtime_buf;
  
        if (!appt || !b)
index 34adc25ba27164acaee1962ab4387014075e6255..a2ae1b8f5f34ee290f11a15fb4bd8752192102fd 100644 (file)
@@ -168,8 +168,7 @@ static unsigned char PADDING[64] = {
 
 /* MD5 initialization. Begins an MD5 operation, writing a new context.
  */
-void MD5Init (context)
-MD5_CTX *context;                                        /* context */
+void MD5Init (MD5_CTX *context)
 {
     context->count[0] = context->count[1] = 0;
     /* Load magic initialization constants.
@@ -183,11 +182,12 @@ MD5_CTX *context;                                        /* context */
 /* MD5 block update operation. Continues an MD5 message-digest
    operation, processing another message block, and updating the
    context.
+
+   context, context
+   input, input block
+   inputLen, length of input block
    */
-void MD5Update (context, input, inputLen)
-MD5_CTX *context;                                        /* context */
-unsigned char *input;                                /* input block */
-unsigned int inputLen;                     /* length of input block */
+void MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen)
 {
     unsigned int i, index, partLen;
     
@@ -225,10 +225,11 @@ unsigned int inputLen;                     /* length of input block */
 
 /* MD5 finalization. Ends an MD5 message-digest operation, writing the
    the message digest and zeroizing the context.
+
+   digest, message digest
+   context, context
    */
-void MD5Final (digest, context)
-unsigned char digest[16];                         /* message digest */
-MD5_CTX *context;                                       /* context */
+void MD5Final (unsigned char digest[16], MD5_CTX *context)
 {
     unsigned char bits[8];
     unsigned int index, padLen;
@@ -255,9 +256,7 @@ MD5_CTX *context;                                       /* context */
 
 /* MD5 basic transformation. Transforms state based on block.
  */
-static void MD5Transform (state, block)
-UINT4 state[4];
-unsigned char block[64];
+static void MD5Transform (UINT4 state[4], unsigned char block[64])
 {
     UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
     
@@ -348,10 +347,7 @@ unsigned char block[64];
 /* Encodes input (UINT4) into output (unsigned char). Assumes len is
    a multiple of 4.
    */
-static void Encode (output, input, len)
-unsigned char *output;
-UINT4 *input;
-unsigned int len;
+static void Encode (unsigned char *output, UINT4 *input, unsigned int len)
 {
     unsigned int i, j;
     
@@ -366,10 +362,7 @@ unsigned int len;
 /* Decodes input (unsigned char) into output (UINT4). Assumes len is
    a multiple of 4.
    */
-static void Decode (output, input, len)
-UINT4 *output;
-unsigned char *input;
-unsigned int len;
+static void Decode (UINT4 *output, unsigned char *input, unsigned int len)
 {
     unsigned int i, j;
     
@@ -381,20 +374,14 @@ unsigned int len;
 /* Note: Replace "for loop" with standard memcpy if possible.
  */
 
-static void MD5_memcpy (output, input, len)
-POINTER output;
-POINTER input;
-unsigned int len;
+static void MD5_memcpy (POINTER output, POINTER input, unsigned int len)
 {
     memcpy(output, input, len);
 }
 
 /* Note: Replace "for loop" with standard memset if possible.
  */
-static void MD5_memset (output, value, len)
-POINTER output;
-int value;
-unsigned int len;
+static void MD5_memset (POINTER output, int value, unsigned int len)
 {
     memset(output, value, len);
 }
index f76aeb742d3a4b9ec99d49b1c3312208a4e70f50..55d563a2555a64b4654a75ab67567cd1cbf8eb03 100644 (file)
@@ -1161,9 +1161,7 @@ setup_quit_handler(Widget w, XtCallbackProc cb, caddr_t user_data) {
 }
 
 int
-ds_is_double_click(last_event, event )
-XEvent           *last_event;
-XEvent           *event;
+ds_is_double_click(XEvent *last_event, XEvent *event)
 {
         static  int             time_threshold;
         static  int             dist_threshold;
index cc3134b725a4c7b62c1cdf2db223ce5dc3c246bd..72facdf4ed9dd9d2c712f97b37fdf50b221f8d9f 100644 (file)
@@ -844,7 +844,7 @@ extern void
 print_month_range(Calendar *c, Tick start_tick, Tick end_tick)
 {
         Props          *p = (Props *)c->properties;
-        register Tick  end, first_date = start_tick;
+        Tick   end, first_date = start_tick;
         int            n;
         Boolean        done = False, first = True;
         int            num_page = 1;
index 55708a0d637d33db2acf85ba131ee11fb71987e9..b3b0f5cff41befdc197a490685c804d278e30d6c 100644 (file)
@@ -3093,7 +3093,10 @@ set_editor_vals_on_ui(Props_pu *pu, Props *p) {
        val->selected = convert_boolean_str(get_char_prop(p, CP_MAILON));
        val->scope = convert_time_scope_str(get_char_prop(p, CP_MAILUNIT));
        val->scope_val = get_int_prop(p, CP_MAILADV);
-       strcpy(pu->ep_reminders.mailto_val, get_char_prop(p, CP_MAILTO));
+       snprintf(pu->ep_reminders.mailto_val,
+                sizeof(pu->ep_reminders.mailto_val),
+                "%s",
+                get_char_prop(p, CP_MAILTO));
 
        set_reminders_vals(&pu->ep_reminders, False);
 
index 8f8778a3054e1e9c1216b7a3cf28cc8a608c0318..6735c2b457cb1a6037e158b13e84078eab8d041f 100644 (file)
@@ -860,7 +860,7 @@ set_reminders_defaults(Reminders *r) {
        val->selected = convert_boolean_str(get_char_prop(p, CP_MAILON));
        val->scope = convert_time_scope_str(get_char_prop(p, CP_MAILUNIT));
        val->scope_val = get_int_prop(p, CP_MAILADV);
-       strcpy(r->mailto_val, get_char_prop(p, CP_MAILTO));
+       snprintf(r->mailto_val, sizeof(r->mailto_val), "%s", get_char_prop(p, CP_MAILTO));
 
        set_reminders_vals(r, False);
 }
@@ -931,7 +931,7 @@ reminders_init(
         val->scope = convert_time_scope_str(get_char_prop(p, CP_MAILUNIT));
         val->scope_val = convert_time_val(get_int_prop(p, CP_MAILADV), 
                                          val->scope);
-        strcpy(r->mailto_val, get_char_prop(p, CP_MAILTO));
+        snprintf(r->mailto_val, sizeof(r->mailto_val), "%s", get_char_prop(p, CP_MAILTO));
 
 }
 
index 173b0957056ae36738a42b8a5ec29492f780e15f..04f17466e343db0fa620c172bd98a6a4de45955a 100644 (file)
@@ -64,8 +64,8 @@
 static char **
 arpaPhrase(const char * name)
 {
-    register char c;
-    register const char *cp;
+    char c;
+    const char *cp;
     char * cp2;
     int gotlt, lastsp, didq;
     int nesting;
@@ -347,6 +347,9 @@ formatMessage(char ** addrs, const char * subject, const char * body)
                }
        }
 
+    free(ret_codeset);
+    free(ret_lang);
+    free(ret_locale);
 
     return(msg);
 }
index 236bcc95e4381a5a6da262ce777e3b20ecc5d5ba..e7dfa4a156bfeaf8f220003a671df5c81e6a855b 100644 (file)
@@ -61,8 +61,7 @@
 #include "help.h"
 
 extern caddr_t
-make_timezone(c)
-Calendar *c;
+make_timezone(Calendar *c)
 {
        Timezone *t;
        Widget text, separator, button_form;
@@ -326,8 +325,7 @@ Calendar *c;
 }
 
 extern void
-refresh_timezone(t)
-Timezone *t;
+refresh_timezone(Timezone *t)
 {
     XmToggleButtonSetState(t->mytime, t->timezone_type == mytime, FALSE);
     XmToggleButtonSetState(t->customtime, t->timezone_type == customtime,FALSE);
index 0cd3c346e4bab9c29073995f04f7d59eba2fefc8..ffda2397f8db2db10d820d9ae8fdba788f84b4bf 100644 (file)
@@ -1982,12 +1982,15 @@ add_to_todo_list(CSA_entry_handle entry, ToDo *t) {
        if (lines && lines->s) {
                buf = (char *)ckalloc(cm_strlen(lines->s) + 1);
                strcpy(buf, lines->s);
-               destroy_lines(lines);
        } else {
                buf = (char *)ckalloc(1);
                buf[0] = '\0';
        }
 
+       if(lines) {
+               destroy_lines(lines);
+       }
+
        str = XmStringCreateLocalized(buf);
        XmListAddItem(t->todo_list, str, 0);
        free_appt_struct(&appt);
index 8fe06bcf642dde403624545f524b473be207bd60..95554a995d7e4f8718c2ffe7370f9f1ba5fe0d0b 100644 (file)
@@ -291,7 +291,7 @@ print_week_range(Calendar * c, Tick start_tick, Tick end_tick)
 {
 
         Props          *p = (Props *)c->properties;
-        register Tick  first_date = start_tick;
+        Tick   first_date = start_tick;
         int            num_weeks;
         Boolean        done = False, first = True;
         int            num_page = 1;
@@ -793,8 +793,8 @@ resize_weekview(
        Calendar        *c,
        Boundary        *boundary)
 {
-        register int     x, y;
-       register int     n;
+        int     x, y;
+       int      n;
        Week            *w = (Week *)c->view->week_info;
 
        /* allocate weekview storage if it's never been used before */
@@ -829,9 +829,9 @@ static void
 draw_week(Calendar *c, XRectangle *rect, Boundary boundary)
 {
         Week *w = (Week *)c->view->week_info;
-        register int    current_day;
-        register int    n;
-        register int    x, y;
+        int    current_day;
+        int    n;
+        int    x, y;
         int             char_height;
         int             start_date;
         char            **day_names;
@@ -1132,10 +1132,10 @@ fill_day(Calendar *c, Week *w, int x, int y, int day,
 {
        CSA_return_code stat;
        Dtcm_appointment *appt;
-        register int    lower = (int)lowerbound(day);
-        register int    upper = (int)next_ndays(day, 1);
-        register int    i, loop, n;
-        register int    nlines = 0;
+        int    lower = (int)lowerbound(day);
+        int    upper = (int)next_ndays(day, 1);
+        int    i, loop, n;
+        int    nlines = 0;
        XFontSetExtents fontextents;
         int    char_width;
        int     char_height;
@@ -1180,9 +1180,9 @@ fill_day(Calendar *c, Week *w, int x, int y, int day,
 } 
  
 static void
-draw_chart(Calendar *c, register Week *w, XRectangle *rect)
+draw_chart(Calendar *c, Week *w, XRectangle *rect)
 {
-        register int    x, y;
+        int    x, y;
         int     n;
        XFontSetExtents fontextents;
        int     char_height;
index 130d69fd81996e1bf7cba844ecc8482c4b6f57b2..61434aabf8fbca13203bf9601ed837af4fa2ff49 100644 (file)
@@ -2973,8 +2973,8 @@ x_print_list_range(Calendar *c, CSA_sint32 appt_type, int item_data,
        time_t          start, end;
         CSA_return_code stat;
         CSA_entry_handle *list;
-        CSA_attribute *range_attrs;
-       CSA_enum *ops;
+        CSA_attribute *range_attrs = NULL;
+       CSA_enum *ops = NULL;
         int i;
        CSA_uint32 a_total;
 
@@ -3009,6 +3009,8 @@ x_print_list_range(Calendar *c, CSA_sint32 appt_type, int item_data,
                    0, B_FALSE, c->general->version);
        stat = csa_list_entries(c->cal_handle, i, range_attrs,
                                ops, &a_total, &list, NULL);
+       free(ops);
+       free(range_attrs);
        if (stat != CSA_SUCCESS) {
                return;
        }
index 385ef451469933fb545d680301fba6e71a07ea5b..a18a457089a17dd330dbf8d33da61db41cdafac6 100644 (file)
@@ -168,14 +168,14 @@ extern int _csa_duration_to_iso8601(int, char *);
 **
 *******************************************************************************/
 static void
-copy_and_pad_newlines(register char *dest, register char *source) {
+copy_and_pad_newlines(char *dest, char *source) {
        while (*source)
                if ((*dest++ = *source++) == '\n')
                        *dest++ =  '\t';
 }
 
 static int
-count_newlines(register char *string) {
+count_newlines(char *string) {
        int count = 0;
 
        if (string == NULL)
@@ -1213,12 +1213,13 @@ read_new_appt(FILE *fp, Dtcm_appointment **appt, Props *p, int version)
                                          a_name, a_tag, a_value);
                        ++attrs_written;
                }
-
-               free(a_name);
-               free(a_tag);
-               free(a_value);
        }
 
+       free(a_name);
+       free(a_tag);
+       free(a_value);
+
+
        avlist->count = attrs_written;
        set_appt_links(avlist);
        *appt = avlist;
@@ -1632,10 +1633,11 @@ parse_appt_from_file(nl_catd catd, char *file, CmDataList *list, Props *p,
                valid_op = validate_appt(catd, appt, s_buf, e_buf, d_buf, dur, 
                                         w_buf, r_buf, f_buf, query, key_data, 
                                         version);
-               if (w_buf)
-                       free(w_buf);
        }
 
+       free(w_buf);
+
+
        scrub_attr_list(appt);
 
        fclose(fp);
@@ -1652,10 +1654,10 @@ growcat(char **source, char *new)
 void
 cat_indented_string(char **catbuf, char *string)
 {
-       register char   *p_str = string;
+       char    *p_str = string;
        int             nl_count = 0;
        char            *buf;
-       register char   *b_ptr;
+       char    *b_ptr;
 
        nl_count = count_newlines(string);
 
@@ -2095,8 +2097,10 @@ appointments_to_file(CSA_session_handle target, CSA_entry_handle *appointment_li
        if (f_ptr == NULL)
                return(B_FALSE);
 
-       if (num_appts == 0)
+       if (num_appts == 0) {
+               fclose(f_ptr);
                return(B_FALSE);
+       }
 
        fprintf(f_ptr, "DTCM Archive 1.0\n");
        for (i = 0; i < num_appts; i++) {
@@ -2185,10 +2189,12 @@ str_to_period(char *ps, CSA_sint32 *repeat_type, int *repeat_nth) {
                        unit++;
                 ps2 = cm_strdup(unit);
                 ptr = strchr(ps2, ' ');
-               if (ptr != NULL)
+               if (ptr != NULL) {
                        *ptr = '\0';
-               else
+               } else {
+                       free(ps2);
                        return;
+               }
 
                ptr++;
                while (*ptr == ' ')
@@ -2417,7 +2423,7 @@ time_scope_str_i18n(
 extern boolean_t
 valid_time(Props *p, char *time_str) {
        char            *ptr;
-       register int    num_minutes = 0, num_colons = 0;
+       int     num_minutes = 0, num_colons = 0;
        boolean_t       after_colon = B_FALSE;
        DisplayType     dt = get_int_prop(p, CP_DEFAULTDISP);
  
index e42b8ee88b79076b1ddacd72f30cde7be3a2d157..c25bfbe8d1d4bbd20ace3492a4c37631d6e95139 100644 (file)
@@ -166,7 +166,7 @@ time_t dateconv(int mm,
     int dayflag)
 {
        time_t tod, jdate;
-       register int i;
+       int i;
 
        if (yy < 0) yy = -yy;
 
@@ -203,7 +203,7 @@ time_t dateconv(int mm,
 
 time_t dayconv(int ord, int day, time_t now)
 {
-       register struct tm *loctime;
+       struct tm *loctime;
        time_t tod;
 
        tod = now;
@@ -213,7 +213,7 @@ time_t dayconv(int ord, int day, time_t now)
        return daylcorr(tod, now);
 }
 
-time_t timeconv(register int hh, int mm, int ss, int mer)
+time_t timeconv(int hh, int mm, int ss, int mer)
 {
        if (mm < 0 || mm > 59 || ss < 0 || ss > 59) return (DATE_BMIN);
        switch (mer) {
@@ -410,8 +410,8 @@ lookup(char *id)
 #define getid for(j=idvar, k=id; (*j++ = *k++); )
 
        char idvar[20];
-       register char *j, *k;
-       register struct table *i;
+       char *j, *k;
+       struct table *i;
        int abbrev;
 
        getid;
@@ -464,12 +464,12 @@ lookup(char *id)
 
 static char *lptr;
 
-int yylex()
+int yylex(void)
 {
        extern int yylval;
        int sign;
-       register char c;
-       register char *p;
+       char c;
+       char *p;
        char idbuf[20];
        int pcnt;
 
index e889e251d24539d4c5222a9a3a896e9ab2669443..930a40c2a65e91361ccfb1b5dbc6756b2acd21a6 100644 (file)
@@ -327,7 +327,7 @@ props_clean_up(Props *p) {
 }
 
 static void
-init_props()
+init_props(void)
 {
 #define LIBDTCM_CAT "libdtcm"
     static int         is_inited = 0;
index 06393be5851e4db5509bc31c42fbd61c01bad5fe..67c2e078e6170f41823ff43ad19084c815f25563 100644 (file)
@@ -147,14 +147,14 @@ ntimes_this_week(u_int weekmask, int firstday)
 
 /* Return beginning of time */
 extern Tick
-get_bot()
+get_bot(void)
 {
        return bot;
 }
 
 /* Return end of time */
 extern Tick
-get_eot()
+get_eot(void)
 {
        return eot;
 }
@@ -255,8 +255,7 @@ year(Tick t)
 }
 
 extern int
-month(t)
-       Tick t;
+month(Tick t)
 {
        struct tm *tm;
        _Xltimeparams localtime_buf;
@@ -945,7 +944,7 @@ xytoclock(int x, int y, Tick t)
 }
 
 extern Tick
-now()
+now(void)
 {
        return(time(0));
 }
@@ -972,7 +971,7 @@ set_timezone(char *tzname)
 }
  
 extern long
-gmt_off()
+gmt_off(void)
 {
         struct tm tm;
         Tick t;
@@ -1001,7 +1000,7 @@ gmt_off()
  * of the routines in this file and the caller of these routines.
  */
 extern void
-init_time()
+init_time(void)
 {
        struct tm tm, gm;
        Tick    t;
index 2ad7aaf38a348e9de253cbb79bfe4bb2f997f687..d33b8ba11f5f87cf507202e5d94333f5b2676d83 100644 (file)
@@ -102,7 +102,7 @@ extern int          pclose(FILE *);
  *
  */
 extern char*
-cm_def_printer()
+cm_def_printer(void)
 {
         FILE *fp;
         char message[257];
@@ -174,7 +174,7 @@ cm_def_printer()
  *--------------------------------------------------------------------------*/
 
 extern char *
-cm_strcpy(register char *s1, register char *s2)
+cm_strcpy(char *s1, char *s2)
 {
        if (s1==NULL || s2==NULL) return(NULL);
        strcpy(s1, s2); 
@@ -182,9 +182,9 @@ cm_strcpy(register char *s1, register char *s2)
 }
 
 extern int 
-cm_strlen(register char *s)
+cm_strlen(char *s)
 {
-        register int n;
+        int n;
  
        if (s==NULL) return 0;
        return (strlen(s));
@@ -291,8 +291,7 @@ cr_to_str(char *s)
 
 /* VARARGS1 */
 extern void
-syserr(msg, a1, a2, a3)
-       char *msg;
+syserr(char *msg, int a1, int a2, int a3)
 {
        /* Taken from Unix World, July 1989, p. 66 */
        int saveerr;
@@ -329,7 +328,7 @@ syserr(msg, a1, a2, a3)
 extern char *
 ckalloc(unsigned int size)
 {
-       register char *p;
+       char *p;
 
        /* try to get the memory */
        p = (char *)calloc(1, size);
@@ -525,7 +524,7 @@ get_tail(char *str, char sep)
 }
 
 extern char *
-cm_get_credentials()
+cm_get_credentials(void)
 {
        char *name, *host;
        static char *login = NULL;
@@ -541,7 +540,7 @@ cm_get_credentials()
 }
 
 extern char *
-cm_get_local_host()
+cm_get_local_host(void)
 {
        static char *local_host;
 
@@ -558,7 +557,7 @@ cm_get_local_host()
 }
 
 extern char *
-cm_get_uname()
+cm_get_uname(void)
 {
         static char *name;
         struct passwd *pw; 
@@ -574,7 +573,7 @@ cm_get_uname()
 }
 
 extern char *
-cm_get_local_domain()
+cm_get_local_domain(void)
 {
        static char *local_domain;
 
@@ -873,8 +872,11 @@ same_user(char *user1, char *user2)
        str1 = get_head(user1, '@');
        str2 = get_head(user2, '@');
 
-       if (str1 == NULL || str2 == NULL)
+       if (str1 == NULL || str2 == NULL) {
+               free(str1);
+               free(str2); /* Handle if only one alloc success */
                return(B_FALSE);
+       }
 
        if (strcmp(str1, str2)) {
                free(str1);
index e04b621a02ce62edf91b25f48f7f13bb3bafe12b..8daeb5394d8c7ff620386ffadb573230baefa6dd 100644 (file)
@@ -612,7 +612,7 @@ _DtCmsRbToCsaStat(Rb_Status rb_stat)
 }
 
 extern void
-garbage_collect()
+garbage_collect(void)
 {
        unsigned remain;
        _DtCmsCalendar *clist = calendar_list;
@@ -644,7 +644,7 @@ garbage_collect()
 }
 
 extern void
-debug_switch()
+debug_switch(void)
 {
        _DtCmsCalendar *clist = calendar_list;
        Access_Entry_4 *l;
@@ -1008,7 +1008,7 @@ get_file_owner(char *calname, char **owner)
                if (res == 0) {
 
                        if (pw = getpwuid(info.st_uid))
-                               strcpy(buf, pw->pw_name);
+                               snprintf(buf, sizeof(buf), "%s", pw->pw_name);
                        else
                                return (CSA_E_FAILURE);
                } else
@@ -1130,10 +1130,13 @@ _GetAccessList(_DtCmsCalendar *cal, int index, cms_attribute *attr)
                        tmpattr.value = &tmpval;
                        tmpval.type = CSA_VALUE_ACCESS_LIST;
 
+                       free(alist);
                        return (_DtCm_copy_cms_attribute(attr, &tmpattr,
                                B_TRUE));
-               } else
+               } else {
+                       free(alist);
                        return (stat);
+               }
        }
 }
 
index 7aa8450e61b48cc7b8072e3f1e40882c25362999..bf4ce237784189761c6b29a0d82c07077f28abd8 100644 (file)
@@ -839,7 +839,7 @@ _AttrsToAbbrAppt(uint size, cms_attribute *attrs, Abb_Appt_4 *appt)
 }
 
 static Abb_Appt_4 *
-_MakeAbbrAppt()
+_MakeAbbrAppt(void)
 {
        Abb_Appt_4 *a;
 
index fcccefd8c3ba82a16dadedec454ec835f693c3ff..787fa4bd281b89be9f47fceef8743f6e5b4fc22d 100644 (file)
@@ -473,7 +473,7 @@ cms_set_calendar_attr_5_svc(cms_set_cal_attr_args *args, struct svc_req *svcrq)
                }
        } else {
                int             i;
-               Access_Entry_4  *v4list;
+               Access_Entry_4  *v4list = NULL;
 
                /* for old format file, the only settable calendar attribute
                 * is access list
@@ -490,7 +490,10 @@ cms_set_calendar_attr_5_svc(cms_set_cal_attr_args *args, struct svc_req *svcrq)
                        if ((res = _DtCmsCmsAccessToV4Access(
                            args->attrs[i].value->item.access_list_value,
                            &v4list)) == CSA_SUCCESS)
+                       {
                                res = _DtCmsSetV4AccessListAndLog(cal, v4list);
+                       }
+                       free(v4list);
                }
 
                if (res != CSA_SUCCESS)
@@ -1014,8 +1017,10 @@ cms_update_entry_5_svc(cms_update_args *args, struct svc_req *svcrq)
 
        if (res.stat == CSA_SUCCESS)
                cal->modified = B_TRUE;
-       else
+       else {
+               free(appt);
                return (&res);
+       }
 
        /* do callback */
        cal->rlist = _DtCmsDoV1CbForV4Data(cal->rlist, user, args->pid,
@@ -1320,6 +1325,8 @@ _ListCalendarNames(uint *num_names, char ***names)
                }
        }
 
+       closedir(dirp);
+
        if (num > 0) {
                *num_names = num;
                *names = names_r;
index bafeeca237235cf2ab3e5f4d6a26b6221fd72beb..83e67e40c540a0f7281af31847266d0936a6220c 100644 (file)
@@ -327,7 +327,7 @@ _InSequence(List_node *node, time_t time)
 {
        time_t          tick;
        cms_entry       *entry = (cms_entry *)node->data;
-       RepeatEventState *restate;
+       RepeatEventState *restate = NULL;
 
        for (tick = ClosestTick(time, entry->key.time, node->re, &restate);
            tick <= node->lasttick;
@@ -336,10 +336,14 @@ _InSequence(List_node *node, time_t time)
                if (tick <= 0 || tick > node->lasttick)
                        break;
 
-               if (tick == time)
+               if (tick == time) {
+                       free(restate);
                        return (B_TRUE);
+               }
        }
 
+       free(restate);
+
        return (B_FALSE);
 }
 
index 4adb74e92d7c1bae961b0ccad090c10119852998..4179a771e2b27a7809241605cd6b95f548553b64 100644 (file)
@@ -90,7 +90,7 @@ _DtCmsInsertEntry(_DtCmsCalendar *cal, cms_entry *entry)
        CSA_opaque_data opq;
        cms_attribute   *aptr;
        RepeatEvent     *re = NULL;
-       RepeatEventState *res;
+       RepeatEventState *res = NULL;
        extern          void _DtCm_rule_parser();
        uint            count;
        int             i;
@@ -176,6 +176,9 @@ _DtCmsInsertEntry(_DtCmsCalendar *cal, cms_entry *entry)
                }
        }
 
+       /* Tidy unused variable */
+       free(res);
+
        if ((stat = _DtCmsCheckStartEndTime(entry)) != CSA_SUCCESS)
                return (stat);
 
index a59393b385e773c0c33ea82f3fce9e2083e7ccf6..afd6c6e43cf698a8d8f53af98aa858d7e316a67d 100644 (file)
@@ -58,7 +58,7 @@ Appt_Status_4 externApptStatus;
 Tag_4 externTag;
 Privacy_Level_4 externPrivacy;
 
-static int     hash_string     P((register char *));
+static int     hash_string     P((char *));
 static char    *strescapes     P((char *));
 
 static int len;
@@ -193,7 +193,7 @@ static u_int  sendit_value[255];
 */
 
 static void
-init()
+init(void)
 {
   int i;
 
@@ -264,7 +264,7 @@ init()
 }
 
 extern int
-yyylex()
+yyylex(void)
 {
   static int first_time=1;
 
@@ -274,8 +274,8 @@ yyylex()
   }
 
   while(1) {
-    register u_char * ptr = parse_buffer;
-    register u_char c;
+    u_char * ptr = parse_buffer;
+    u_char c;
 
     switch(initial_mask[ *ptr = input_char()]) {
 
@@ -312,8 +312,8 @@ yyylex()
 
     case ALPHA:
       {
-       register int bucket;
-       register token_data_t * t;
+       int bucket;
+       token_data_t * t;
 
        while(initial_mask[*(++ptr)=input_char()] == ALPHA)
          ;
@@ -443,10 +443,10 @@ setinput (FILE* f)
 
 
 static int 
-hash_string(register char *s)
+hash_string(char *s)
 {
-  register unsigned result = 0;
-  register int sum;
+  unsigned result = 0;
+  int sum;
   
   while(sum = *s++)
     result = (result << 4) + sum;
@@ -478,7 +478,7 @@ hash_string(register char *s)
 static char * 
 strescapes(char *s)
 {
-  register char * in=s, * out=s;
+  char * in=s, * out=s;
   
   while(*in)
     {
@@ -509,7 +509,7 @@ strescapes(char *s)
            break;
          case '0':  /* a octal constant */
            {
-             register int i,result;
+             int i,result;
              in++;
              for(result=i=0; (i<=3) && (*in >='0') && (*in <= '7') ; )
                {
index f8b14a5658dc7a7f74efa162075c22b3067b80d0..bdb13ad40383062da29fbe8236ccd57b4bfc6585 100644 (file)
@@ -48,8 +48,8 @@ extern        List_node *
 hc_lookup_node (Hc_list        *hc_list, caddr_t key)
 {
        Private         *private;
-       register List_node      *p_node;
-       register _DtCmsComparisonResult result;
+       List_node       *p_node;
+       _DtCmsComparisonResult  result;
 
        p_node = hc_list->root;
        private = (Private *) hc_list->private;
@@ -87,7 +87,7 @@ extern        int
 hc_size (Hc_list *hc_list)
 {
        int             n = 0;
-       register List_node      *p_node;
+       List_node       *p_node;
 
        p_node = hc_list->root;
        while (p_node != NULL)
@@ -145,10 +145,10 @@ hc_destroy(Hc_list *hc_list, Destroy_proc destroy_func)
 }
 
 extern Rb_Status
-hc_insert_node (Hc_list *hc_list, register List_node *p_node, caddr_t key)
+hc_insert_node (Hc_list *hc_list, List_node *p_node, caddr_t key)
 {
        Private *private;
-       register List_node      *p_curr;
+       List_node       *p_curr;
 
        if (hc_list == NULL)
                return (rb_notable);
@@ -229,8 +229,8 @@ hc_delete_node (Hc_list *hc_list, List_node *p_node)
 extern List_node *
 hc_delete (Hc_list *hc_list, caddr_t key)
 {
-       register List_node      *p_node;
-       register Private *private;
+       List_node       *p_node;
+       Private *private;
 
        p_node = hc_list->root;
        private = (Private *) hc_list->private;
@@ -257,8 +257,8 @@ hc_lookup_smallest (Hc_list *hc_list)
 extern caddr_t
 hc_lookup_next_larger (Hc_list *hc_list, caddr_t key)
 {
-       register List_node      *p_node;
-       register Private *private;
+       List_node       *p_node;
+       Private *private;
 
        p_node = hc_list->root;
        private = (Private *) hc_list->private;
@@ -274,7 +274,7 @@ hc_lookup_next_larger (Hc_list *hc_list, caddr_t key)
 extern caddr_t
 hc_lookup_largest (Hc_list *hc_list)
 {
-       register List_node      *p_node;
+       List_node       *p_node;
 
        if ((hc_list == NULL) || (hc_list->root == NULL))
                return (NULL);
@@ -288,8 +288,8 @@ hc_lookup_largest (Hc_list *hc_list)
 extern caddr_t
 hc_lookup_next_smaller (Hc_list *hc_list, caddr_t key)
 {
-       register List_node      *p_node;
-       register Private *private;
+       List_node       *p_node;
+       Private *private;
 
        p_node = hc_list->root;
        private = (Private *) hc_list->private;
@@ -319,7 +319,7 @@ hc_check_list (Hc_list *hc_list)
 extern void
 hc_enumerate_down(Hc_list *hc_list, _DtCmsEnumerateProc doit)
 {
-       register List_node      *p_node;
+       List_node       *p_node;
 
        p_node = hc_list->root;
        while (p_node != NULL)
@@ -333,7 +333,7 @@ hc_enumerate_down(Hc_list *hc_list, _DtCmsEnumerateProc doit)
 extern Rb_Status
 hc_enumerate_up(Hc_list *hc_list, _DtCmsEnumerateProc doit)
 {
-       register List_node      *p_node;
+       List_node       *p_node;
 
        p_node = hc_list->root;
        while (p_node != NULL)
index dc1da3c634f75bdb15e6cafb888354259e587e12..4ccd3925055a6a939924c767d4452e3047148cf8 100644 (file)
@@ -651,6 +651,7 @@ _DtCmsTruncateFile(char *calendar, int size)
                if(-1 == ftruncate(f, size)) {
                        perror(strerror(errno));
                }
+               close(f);
         }
 
        free(log);
@@ -1300,8 +1301,6 @@ get_date_time_list_string(CSA_date_time_list list)
 
        /* do the first one */
        sprintf(buf, "%s", list->date_time);
-       if ((ptr = strdup(buf)) == NULL)
-               return (NULL);
 
        if ((ptr = malloc(BUFSIZ+1)) == NULL) return (NULL);
        tcount = BUFSIZ;
index 92d231b5515d15efe2ee7110532997babaab1b4a..0ac58d102826b6689e8a12cbd511d5e09e4e3991 100644 (file)
@@ -401,9 +401,10 @@ _DtCmsGetEntryAttrByKey(
                }
        }
 
-       if (entry_r)
+       if (entry_r) {
+               free(res);
                stat = _DtCmsGetCmsEntryForClient(entry, entry_r,B_FALSE);
-       else {
+       else {
                if (num_names == 0)
                        stat = _GetAllEntryAttrs(entry, &res->num_attrs,
                                &res->attrs);
@@ -498,7 +499,7 @@ _EnumerateSequence(
        CSA_return_code stat2 = CSA_SUCCESS;
        cms_entry       *eptr;
        time_t          fsttick, tick;
-       RepeatEventState *restate;
+       RepeatEventState *restate = NULL;
 
        eptr = (cms_entry *)lnode->data;
        fsttick = eptr->key.time;
@@ -562,6 +563,7 @@ _EnumerateSequence(
                        eptr->attrs[CSA_ENTRY_ATTR_END_DATE_I].value->\
                                item.date_time_value = etime;
        }
+       free(restate);
 
        return (stat);
 }
index 0b8646f59ae70d6a2b492a6b2a0219f363a742fb..1095f2de8d6c1cd62564b4aa90595c3abd0ee245 100644 (file)
@@ -767,7 +767,7 @@ convert_2_tick(char *datestr)
 
        memset((void *)&tmstr, 0, sizeof(struct tm));
 
-       strcpy(datebuf, datestr);
+       snprintf(datebuf, sizeof(datebuf), "%s", datestr);
 
        /* get week day */
        ptr = strtok(datebuf, " ");
@@ -1080,7 +1080,7 @@ static CSA_return_code
 get_date_time_list_value(char *valstr, cms_attribute_value **attrval)
 {
        char *ptr;
-       CSA_date_time_entry *a, *head, *prev;
+       CSA_date_time_entry *a = NULL, *head, *prev;
        CSA_return_code stat = CSA_SUCCESS;
        cms_attribute_value *val;
 
@@ -1123,8 +1123,10 @@ get_date_time_list_value(char *valstr, cms_attribute_value **attrval)
                                head = a;
                        else
                                prev->next = a;
-               } else
+               } else {
+                       free(a);
                        stat = CSA_E_INSUFFICIENT_MEMORY;
+               }
        }
 
        if (stat == CSA_SUCCESS) {
index fa2ca07395d1d96a7836713e3321fe434c2c6415..0051ca5375908bed02f2cf44723f612547c80634 100644 (file)
@@ -56,7 +56,7 @@ program_object po = {
        
 program_handle program = &po;
 
-program_handle newph() 
+program_handle newph(void
 {
        extern void initrtable2();
        extern void initrtable3();
@@ -71,7 +71,7 @@ program_handle newph()
        return(program);
 }
 
-program_handle getph() 
+program_handle getph(void
 {
        return(program);
 }
index d1de38de985843f4ed7745372b53d9153b890ed3..91166f1e9154a04ce0704d35b77b9cd591e6c15d 100644 (file)
@@ -729,6 +729,7 @@ _RemoveReminderFromQ(
        } else {
                tick = ClosestTick(entry->key.time, entry->key.time, lnode->re,
                        &restate);
+               free(restate);
                if (do_old = (tick - lead < remq->cutoff))
                        rptr1 = _RemoveReminderFromList(&remq->oldhead[qindex],
                                entry, starttime, delfwd);
@@ -807,7 +808,7 @@ _UpdateReminderQ(_DtCmsRemQueue *remq, int qindex)
        _DtCmsRemInfo   *rptr, *nptr;
        cms_entry       *entry;
        time_t          lead, tick;
-       RepeatEventState *restate;
+       RepeatEventState *restate = NULL;
 
        for (; (rptr = remq->active[qindex]) != NULL &&
            rptr->runtime < remq->cutoff; ) {
@@ -824,6 +825,8 @@ _UpdateReminderQ(_DtCmsRemQueue *remq, int qindex)
                        tick = ClosestTick(entry->key.time, entry->key.time,
                                rptr->lnode->re, &restate);
 
+                       free(restate);
+
                        if (tick == rptr->starttime) {
                                /* add this to old queue */
                                _InsertReminder(&remq->oldhead[qindex], rptr);
@@ -857,7 +860,7 @@ _GetNextActiveTick(
        time_t          lasttick,
        RepeatEvent     *re)
 {
-       RepeatEventState        *restate;
+       RepeatEventState        *restate = NULL;
        time_t                  tick;
 
        for (tick = ClosestTick(target, entry->key.time, re, &restate);
@@ -867,6 +870,8 @@ _GetNextActiveTick(
                if (tick <= 0 || !_DtCmsInExceptionList(entry, tick))
                        break;
        }
+
+       free(restate);
        return (tick);
 }
 
index e0b5672525463c4e5cdc25d4b59f1f9b64788c7b..c6b1951e258bc3e9c4fb51e8dd731a97d3938e18 100644 (file)
@@ -123,7 +123,7 @@ static time_t prevdaysofweek(time_t t, int weekmask);
  * of the routines in this file and the caller of these routines.
  */
 extern void
-init_time()
+init_time(void)
 {
        struct tm tm, gm;
        time_t  t;
index dfc0fc2f4dcd409beddb3e0775ade354048d71a2..1d7f3520fe8e4eab4828b5e631e2c0643e3461a1 100644 (file)
@@ -285,7 +285,7 @@ DeriveNewStartTime(
        Tick             end_date;
        Tick             an_event;
        int              num_events;
-       RepeatEventState *res;
+       RepeatEventState *res = NULL;
 
        /* Count the number of events from the start time to the current time */
        end_date = old_re->re_end_date;
@@ -309,6 +309,8 @@ DeriveNewStartTime(
               ;
        }
 
+       free(res);
+
        return an_event;
 }
 
index 05a16aea34add38cf0da3725a7d9a0151375dc2b..90945751bb5a5dfeea75c5b732d65bc2d67de2a6 100644 (file)
 
 /*************** V2 PROTOCOL IMPLEMENTATION PROCS *****************/
 extern void *
-_DtCm_rtable_ping_2_svc(args, svcrq)
-void *args;
-struct svc_req *svcrq;
+_DtCm_rtable_ping_2_svc(void *args, struct svc_req *svcrq)
 {
        return(NULL); /* for RPC reply */
 }
 
 /*     PROC #1         */
 extern Table_Res_2 *
-_DtCm_rtable_lookup_2_svc (args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_lookup_2_svc (Table_Args_2 *args, struct svc_req *svcrq)
 {
        static Table_Res_2 *res = NULL;
        Table_Args_4 *newargs;
@@ -81,9 +77,7 @@ struct svc_req *svcrq;
 
 /*     PROC #2         */
 extern Table_Res_2 *
-_DtCm_rtable_lookup_next_larger_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_lookup_next_larger_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Res_2 *res = NULL;
         Table_Args_4 *newargs;   
@@ -104,9 +98,7 @@ struct svc_req *svcrq;
 
 /*     PROC #3         */
 extern Table_Res_2 *
-_DtCm_rtable_lookup_next_smaller_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_lookup_next_smaller_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Res_2 *res = NULL; 
         Table_Args_4 *newargs;    
@@ -127,9 +119,7 @@ struct svc_req *svcrq;
 
 /*     PROC #4         */
 extern Table_Res_2 *
-_DtCm_rtable_lookup_range_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_lookup_range_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Res_2 *res = NULL;  
         Table_Args_4 *newargs;     
@@ -149,9 +139,7 @@ struct svc_req *svcrq;
 
 /*     PROC #5         */
 extern Table_Res_2 *
-_DtCm_rtable_abbreviated_lookup_range_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_abbreviated_lookup_range_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Res_2 *res = NULL;   
         Table_Args_4 *newargs;      
@@ -171,9 +159,7 @@ struct svc_req *svcrq;
 
 /*     PROC #6         */
 extern Table_Res_2 *
-_DtCm_rtable_insert_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_insert_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Res_2 *res = NULL;
         Table_Args_4 *newargs;
@@ -193,9 +179,7 @@ struct svc_req *svcrq;
 
 /*     PROC #7 */
 extern Table_Res_2 *
-_DtCm_rtable_delete_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_delete_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Res_2 *res = NULL; 
         Table_Args_4 *newargs;
@@ -214,9 +198,7 @@ struct svc_req *svcrq;
 
 /*     PROC #8         */
 extern Table_Res_2 *
-_DtCm_rtable_delete_instance_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_delete_instance_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Res_2 *res = NULL; 
         Table_Args_4 *newargs;  
@@ -235,9 +217,7 @@ struct svc_req *svcrq;
 
 /*     PROC #9 */
 extern Table_Res_2 *
-_DtCm_rtable_change_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_change_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Res_2 *res = NULL;
         Table_Args_4 *newargs; 
@@ -257,9 +237,7 @@ struct svc_req *svcrq;
 
 /*     PROC #10        */
 extern Table_Res_2 *
-_DtCm_rtable_change_instance_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_change_instance_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Res_2 *res = NULL; 
         Table_Args_4 *newargs;   
@@ -279,9 +257,7 @@ struct svc_req *svcrq;
 
 /*     PROC #11        */
 extern Table_Res_2 *
-_DtCm_rtable_lookup_next_reminder_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_lookup_next_reminder_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Res_2 *res = NULL; 
         Table_Args_4 *newargs;    
@@ -301,9 +277,7 @@ struct svc_req *svcrq;
 
 /*     PROC #12        */
 extern Table_Status_2 *
-_DtCm_rtable_check_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_check_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Status_2 res; 
         Table_Args_4 *newargs;     
@@ -321,9 +295,7 @@ struct svc_req *svcrq;
 
 /*     PROC #13        */
 extern Table_Status_2 *
-_DtCm_rtable_flush_table_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_flush_table_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static Table_Status_2 res;  
         Table_Args_4 *newargs;     
@@ -341,9 +313,7 @@ struct svc_req *svcrq;
 
 /*     PROC #14        */
 extern int *
-_DtCm_rtable_size_2_svc(args, svcrq)
-Table_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_size_2_svc(Table_Args_2 *args, struct svc_req *svcrq)
 {
         static int size;   
         Table_Args_4 *newargs;      
@@ -358,9 +328,7 @@ struct svc_req *svcrq;
 
 /*     PROC #15        */
 Registration_Status_2 *
-_DtCm_register_callback_2_svc(r, svcrq)
-Registration_2 *r;
-struct svc_req *svcrq;
+_DtCm_register_callback_2_svc(Registration_2 *r, struct svc_req *svcrq)
 {
         static Registration_Status_2 stat;    
         Registration_4 *newreg;       
@@ -377,9 +345,7 @@ struct svc_req *svcrq;
 
 /*     PROC #16        */
 Registration_Status_2 *
-_DtCm_deregister_callback_2_svc(r, svcrq)
-Registration_2 *r;
-struct svc_req *svcrq;
+_DtCm_deregister_callback_2_svc(Registration_2 *r, struct svc_req *svcrq)
 {
         static Registration_Status_2 stat;     
         Registration_4 *newreg;          
@@ -396,9 +362,7 @@ struct svc_req *svcrq;
 
 /*     PROC #17        */
 extern Access_Status_2 *
-_DtCm_rtable_set_access_2_svc(args, svcrq)
-Access_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_set_access_2_svc(Access_Args_2 *args, struct svc_req *svcrq)
 {
        static Access_Status_2 stat;
        Access_Args_4 *newargs;
@@ -415,9 +379,7 @@ struct svc_req *svcrq;
 
 /*     PROC #18        */
 extern Access_Args_2 *
-_DtCm_rtable_get_access_2_svc(args, svcrq)
-Access_Args_2 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_get_access_2_svc(Access_Args_2 *args, struct svc_req *svcrq)
 {
         static Access_Args_2 *res = NULL;
         Access_Args_4 *newargs;
@@ -435,8 +397,7 @@ struct svc_req *svcrq;
         return(res); 
 }
 
-void initrtable2(ph)
-        program_handle ph;
+void initrtable2(program_handle ph)
 {
        int ver = TABLEVERS_2;
         ph->program_num = TABLEPROG;
index ba856d3b66df878dedb2259e94a5a07415775ab5..61e57614cacc1add10ea3b513fd051f44ddc6f76 100644 (file)
 
 /*************** V3 PROTOCOL IMPLEMENTATION PROCS *****************/
 extern void *
-_DtCm_rtable_ping_3_svc(args, svcrq)
-void *args;
-struct svc_req *svcrq;
+_DtCm_rtable_ping_3_svc(void *args, struct svc_req *svcrq)
 {
        return(NULL); /* for RPC reply */
 }
 
 /*     PROC #1         */
 extern Table_Res_3 *
-_DtCm_rtable_lookup_3_svc (args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_lookup_3_svc (Table_Args_3 *args, struct svc_req *svcrq)
 {
        static Table_Res_3 *res = NULL;
        Table_Args_4 *newargs;
@@ -80,9 +76,7 @@ struct svc_req *svcrq;
 
 /*     PROC #2         */
 extern Table_Res_3 *
-_DtCm_rtable_lookup_next_larger_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_lookup_next_larger_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
        static Table_Res_3 *res = NULL;
        Table_Args_4 *newargs;   
@@ -101,9 +95,7 @@ struct svc_req *svcrq;
 
 /*     PROC #3         */
 extern Table_Res_3 *
-_DtCm_rtable_lookup_next_smaller_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_lookup_next_smaller_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
        static Table_Res_3 *res = NULL; 
        Table_Args_4 *newargs;    
@@ -122,9 +114,7 @@ struct svc_req *svcrq;
 
 /*     PROC #4         */
 extern Table_Res_3 *
-_DtCm_rtable_lookup_range_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_lookup_range_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static Table_Res_3 *res = NULL;  
         Table_Args_4 *newargs;     
@@ -143,9 +133,7 @@ struct svc_req *svcrq;
 
 /*     PROC #5         */
 extern Table_Res_3 *
-_DtCm_rtable_abbreviated_lookup_range_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_abbreviated_lookup_range_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static Table_Res_3 *res = NULL;   
         Table_Args_4 *newargs;      
@@ -164,9 +152,7 @@ struct svc_req *svcrq;
 
 /*     PROC #6         */
 extern Table_Res_3 *
-_DtCm_rtable_insert_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_insert_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static Table_Res_3 *res = NULL;
         Table_Args_4 *newargs;
@@ -185,9 +171,7 @@ struct svc_req *svcrq;
 
 /*     PROC #7 */
 extern Table_Res_3 *
-_DtCm_rtable_delete_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_delete_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static Table_Res_3 *res = NULL; 
         Table_Args_4 *newargs;
@@ -206,9 +190,7 @@ struct svc_req *svcrq;
 
 /*     PROC #8         */
 extern Table_Res_3 *
-_DtCm_rtable_delete_instance_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_delete_instance_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static Table_Res_3 *res = NULL; 
         Table_Args_4 *newargs;  
@@ -227,9 +209,7 @@ struct svc_req *svcrq;
 
 /*     PROC #9 */
 extern Table_Res_3 *
-_DtCm_rtable_change_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_change_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static Table_Res_3 *res = NULL;
         Table_Args_4 *newargs; 
@@ -249,9 +229,7 @@ struct svc_req *svcrq;
 
 /*     PROC #10        */
 extern Table_Res_3 *
-_DtCm_rtable_change_instance_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_change_instance_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static Table_Res_3 *res = NULL; 
         Table_Args_4 *newargs;   
@@ -271,9 +249,7 @@ struct svc_req *svcrq;
 
 /*     PROC #11        */
 extern Table_Res_3 *
-_DtCm_rtable_lookup_next_reminder_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_lookup_next_reminder_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static Table_Res_3 *res = NULL; 
         Table_Args_4 *newargs;    
@@ -292,9 +268,7 @@ struct svc_req *svcrq;
 
 /*     PROC #12        */
 extern Table_Status_3 *
-_DtCm_rtable_check_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_check_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static Table_Status_3 res; 
         Table_Args_4 *newargs;     
@@ -311,9 +285,7 @@ struct svc_req *svcrq;
 
 /*     PROC #13        */
 extern Table_Status_3 *
-_DtCm_rtable_flush_table_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_flush_table_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static Table_Status_3 res;  
         Table_Args_4 *newargs;     
@@ -330,9 +302,7 @@ struct svc_req *svcrq;
 
 /*     PROC #14        */
 extern int *
-_DtCm_rtable_size_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_size_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static int size;   
         Table_Args_4 *newargs;      
@@ -347,9 +317,7 @@ struct svc_req *svcrq;
 
 /*     PROC #15        */
 Registration_Status_3 *
-_DtCm_register_callback_3_svc(r, svcrq)
-Registration_3 *r;
-struct svc_req *svcrq;
+_DtCm_register_callback_3_svc(Registration_3 *r, struct svc_req *svcrq)
 {
         static Registration_Status_3 stat;    
         Registration_4 *newreg;       
@@ -365,9 +333,7 @@ struct svc_req *svcrq;
 
 /*     PROC #16        */
 Registration_Status_3 *
-_DtCm_deregister_callback_3_svc(r, svcrq)
-Registration_3 *r;
-struct svc_req *svcrq;
+_DtCm_deregister_callback_3_svc(Registration_3 *r, struct svc_req *svcrq)
 {
         static Registration_Status_3 stat;     
         Registration_4 *newreg;          
@@ -383,9 +349,7 @@ struct svc_req *svcrq;
 
 /*     PROC #17        */
 extern Access_Status_3 *
-_DtCm_rtable_set_access_3_svc(args, svcrq)
-Access_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_set_access_3_svc(Access_Args_3 *args, struct svc_req *svcrq)
 {
        static Access_Status_3 stat;
        Access_Args_4 *newargs;
@@ -401,9 +365,7 @@ struct svc_req *svcrq;
 
 /*     PROC #18        */
 extern Access_Args_3 *
-_DtCm_rtable_get_access_3_svc(args, svcrq)
-Access_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_get_access_3_svc(Access_Args_3 *args, struct svc_req *svcrq)
 {
         static Access_Args_3 *res = NULL;
         Access_Args_4 *newargs;
@@ -421,9 +383,7 @@ struct svc_req *svcrq;
 
 /*     PROC #19        */
 extern Table_Res_3 *
-_DtCm_rtable_abbreviated_lookup_key_range_3_svc(args, svcrq)
-Table_Args_3 *args;
-struct svc_req *svcrq;
+_DtCm_rtable_abbreviated_lookup_key_range_3_svc(Table_Args_3 *args, struct svc_req *svcrq)
 {
         static Table_Res_3 *res = NULL;
         Table_Args_4 *newargs;   
@@ -441,9 +401,7 @@ struct svc_req *svcrq;
 
 /*     PROC #20        */
 extern long *
-_DtCm_rtable_gmtoff_3_svc(args, svcrq)
-void *args;
-struct svc_req *svcrq;
+_DtCm_rtable_gmtoff_3_svc(void *args, struct svc_req *svcrq)
 {
        static long gmtoff;
 
@@ -452,8 +410,7 @@ struct svc_req *svcrq;
        return(&gmtoff);
 }
 
-void initrtable3(ph)
-        program_handle ph;
+void initrtable3(program_handle ph)
 {
         ph->program_num = TABLEPROG;
         ph->prog[TABLEVERS_3].vers = &tableprog_3_table[0];
index 551750d04f8e29bec733d1f120ae3f3a3505fd15..cbde26215efca7d403c4346ffbacea74cd2ef278 100644 (file)
@@ -1465,6 +1465,7 @@ _DtCm_rtable_create_4_svc(Table_Op_Args_4 *args, struct svc_req *svcrq)
                                free(domain);
                                return(&res);
                        }
+                       free(domain);
                }
        }
 
index e4b329856683f86d9bff2c7ee5decbb734df0fc1..8b9b27fa7ba8727c8a8a7c68ebeef6ca34a75d14 100644 (file)
@@ -201,7 +201,7 @@ error:
 }
 
 static void
-init_dir()
+init_dir(void)
 {
        char *dir = _DtCMS_DEFAULT_DIR;
        char msgbuf[BUFSIZ];
@@ -282,7 +282,7 @@ init_dir()
  * send a SIGHUP signal to the rpc.cmsd that is already running
  */
 static void
-send_hup()
+send_hup(void)
 {
        FILE    *fp = NULL;
        char    buf[BUFSIZ];
@@ -313,7 +313,7 @@ send_hup()
  * We only allow one rpc.cmsd to run on each machine.
  */
 static int
-lock_it()
+lock_it(void)
 {
        char *dir = _DtCMS_DEFAULT_DIR;
        char    buff [MAXPATHLEN];
@@ -327,14 +327,11 @@ lock_it()
        locker.l_len = 0;
 #endif /* SVR4 */
 
-       strcpy (buff, dir);
-       strcat (buff, "/.lock.");
-
        /* 
         * /var/spool might be mounted.  Use .lock.hostname to
         * prevent more than one cms running in each host.
         */
-       strcat(buff, _DtCmGetLocalHost());
+       snprintf(buff, sizeof(buff), "%s/.lock.%s", dir, _DtCmGetLocalHost());
 
        fd = open(buff, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
        if (fd < 0)
@@ -377,7 +374,7 @@ lock_it()
 }
 
 static void
-program(struct svc_req *rqstp, register SVCXPRT *transp)
+program(struct svc_req *rqstp, SVCXPRT *transp)
 {
         char *result;
         char *argument = NULL;
@@ -467,7 +464,7 @@ sighup_handler(int sig_num)
  * time and now so that the calling routine can set the alarm.
  */
 static int
-_GetFirstGarbageCollectionTime()
+_GetFirstGarbageCollectionTime(void)
 {
        int n=0, midnight=0, gtime=0;
 
@@ -487,7 +484,7 @@ _GetFirstGarbageCollectionTime()
 }
 
 static void
-init_alarm()
+init_alarm(void)
 {
        int next;
        extern void garbage_collect();
@@ -508,6 +505,7 @@ init_alarm()
        alarm((unsigned) next);
 }
 
+int
 main(int argc, char **argv)
 {
         u_long version;
index 3e1d016eed9211f4a7c3f9f982bbeeacb6c50380..56e7272ae9cb0037095cd9b77f6f0acc7274eb12 100644 (file)
@@ -597,7 +597,7 @@ void FreeIconSearchPathList(char **pplist)
 /* OUTPUT: none                                                               */
 /*                                                                            */
 /******************************************************************************/
-void TurnOnHourGlassAllWindows()
+void TurnOnHourGlassAllWindows(void)
 {
   _DtTurnOnHourGlass(CreateActionAppShell);
   if ( (AddFiletype) &&
@@ -630,7 +630,7 @@ void TurnOnHourGlassAllWindows()
 /* OUTPUT: none                                                               */
 /*                                                                            */
 /******************************************************************************/
-void TurnOffHourGlassAllWindows()
+void TurnOffHourGlassAllWindows(void)
 {
   _DtTurnOffHourGlass(CreateActionAppShell);
   if ( (AddFiletype) &&
index db025854e581ac4805f1b598000c645a5368a9b0..cef5a7596c648979e029b53acc8f316ebd07c82e 100644 (file)
@@ -101,7 +101,7 @@ static char *br_help_msg[] = {
 /* ______________________________________________________________________ */
 
 void
-Browse()
+Browse(void)
 {
     char       buf[256], *cmd, **av, **sv, *cmapfile, *sdatafile;
     char       *Prompt;
index 3c0ba14fc79307c68d929bef4d0dabdb83e6a8f9..33f4310e010f6a67fc0b297ac71efee676c01075 100644 (file)
@@ -279,7 +279,7 @@ PrintStats(
  */
 
 void
-PrintIDList()
+PrintIDList(void)
 {
     ID_t       *id;
     Element_t  *ep;
index c9c64cc9e48ff41f24797834a7c8e959c8ca6097..09554a490882896786aab7f709a83c1b26fbada3 100644 (file)
@@ -127,7 +127,7 @@ static int TclReadLocaleStrings(ClientData clientData,
 char           *GetOutFileBaseName();
 
 char *
-GetCLocale()
+GetCLocale(void)
 {
 _DtXlateDb   myDb = NULL;
 char         myPlatform[_DtPLATFORM_MAX_LEN+1];
@@ -552,7 +552,7 @@ Initialize1(
 /* Initialization stuff done after dealing with args. */
 
 static void
-Initialize2()
+Initialize2(void)
 {
     SetMappingNV(Variables, "transpec", tranfile ? tranfile : "??");
 
@@ -582,7 +582,7 @@ Initialize2()
  *  Arguments:
  *
  */
-char *GetOutFileBaseName()
+char *GetOutFileBaseName(void)
 {
 char *prefix, *suffix, *cp;
 static char nameBuf[_MAXNAMLEN+1] = "";
@@ -621,7 +621,7 @@ CmdLineSetVariable(
     int                n;
 
     /* Turn '=' into a space, to isolate the name.  Then set variable. */
-    strcpy(buf, var);
+    snprintf(buf, sizeof(buf), "%s", var);
     if ((cp=strchr(buf, '='))) {
        /* we have "var=value" */
        *cp = ' ';
@@ -761,7 +761,7 @@ static char *help_msg[] = {
 };
 
 static void
-DoHelpMessage()
+DoHelpMessage(void)
 {
     char       **s = help_msg;
     printf("usage: %s [option ...] [file]", this_prog);
index 4c7a6712db397dea4d1cff21325fa26c697b3b87..f2c23f5e281cbc379ca12815e4ec3c490a96e01d 100644 (file)
@@ -601,7 +601,7 @@ if (cp->type == CMD_DATA)
  */
 
 void
-GetIDREFnames()
+GetIDREFnames(void)
 {
     char       *cp;
 
index 248857b438591839e6327907d1d976c76cb80664..fa726e0f77660a2ee7a77f95fddd96af1bda0285 100644 (file)
@@ -353,7 +353,7 @@ SetMapping(
        fprintf(stderr, "SetMapping: Map not initialized.\n");
        return;
     }
-    strcpy(buf, s);
+    snprintf(buf, sizeof(buf), "%s", s);
     name = val = buf;
     while (*val && !IsWhite(*val)) val++;      /* point past end of name */
     if (*val) {
@@ -608,7 +608,7 @@ OutputString(
 /* ______________________________________________________________________ */
 /* resets the output buffer
  */
-void ClearOutputBuffer()
+void ClearOutputBuffer(void)
 {
 outputBuffer.current = outputBuffer.base;
 }
@@ -617,7 +617,7 @@ outputBuffer.current = outputBuffer.base;
 /* determines if there is already some text in the output buffer,
  * returns 1 if so, else 0
  */
-int OutputBufferActive()
+int OutputBufferActive(void)
 {
 return (outputBuffer.current != outputBuffer.base);
 }
@@ -625,7 +625,7 @@ return (outputBuffer.current != outputBuffer.base);
 /* ______________________________________________________________________ */
 /* terminates output buffer with a null char and returns the buffer
  */
-char *GetOutputBuffer()
+char *GetOutputBuffer(void)
 {
 if (CheckOutputBuffer(1))
     *(outputBuffer.current)++ = '\0';
index 2fa48ae1222eba6c87e5c6a4d176843cbff055c2..f6c5bab09e5f777d59847d2a6a4fd715c872a204 100644 (file)
@@ -25,8 +25,7 @@
 #include <stdlib.h>
 
 void
-tpt_regerror(s)
-char *s;
+tpt_regerror(char *s)
 {
 #ifdef ERRAVAIL
        error("tpt_regexp: %s", s);
index 816aa20d5c961c30177c95204ad63e831bcd57b1..63a5d7954ec2d8eacd97c3499a10f2ad7453d2f9 100644 (file)
@@ -186,10 +186,10 @@ STATIC char *reg();
 STATIC char *regbranch();
 STATIC char *regpiece();
 STATIC char *regatom();
-STATIC char *regnode();
+STATIC char *regnode(char op);
 STATIC char *regnext();
-STATIC void regc();
-STATIC void reginsert();
+STATIC void regc(char b);
+STATIC void reginsert(char op, char *opnd);
 STATIC void regtail();
 STATIC void regoptail();
 #ifdef STRCSPN
@@ -212,13 +212,12 @@ STATIC int strcspn();
  * of the structure of the compiled regexp.
  */
 regexp *
-tpt_regcomp(exp)
-char *exp;
+tpt_regcomp(char *exp)
 {
-       register regexp *r;
-       register char *scan;
-       register char *longest;
-       register int len;
+       regexp *r;
+       char *scan;
+       char *longest;
+       int len;
        int flags;
 
        if (exp == NULL)
@@ -299,14 +298,15 @@ char *exp;
  * follows makes it hard to avoid.
  */
 static char *
-reg(paren, flagp)
-int paren;                     /* Parenthesized? */
-int *flagp;
+reg(
+int paren,                     /* Parenthesized? */
+int *flagp
+)
 {
-       register char *ret;
-       register char *br;
-       register char *ender;
-       register int parno;
+       char *ret;
+       char *br;
+       char *ender;
+       int parno;
        int flags;
 
        *flagp = HASWIDTH;      /* Tentatively. */
@@ -371,12 +371,11 @@ int *flagp;
  * Implements the concatenation operator.
  */
 static char *
-regbranch(flagp)
-int *flagp;
+regbranch(int *flagp)
 {
-       register char *ret;
-       register char *chain;
-       register char *latest;
+       char *ret;
+       char *chain;
+       char *latest;
        int flags;
 
        *flagp = WORST;         /* Tentatively. */
@@ -410,12 +409,11 @@ int *flagp;
  * endmarker role is not redundant.
  */
 static char *
-regpiece(flagp)
-int *flagp;
+regpiece(int *flagp)
 {
-       register char *ret;
-       register char op;
-       register char *next;
+       char *ret;
+       char op;
+       char *next;
        int flags;
 
        ret = regatom(&flags);
@@ -474,10 +472,9 @@ int *flagp;
  * separate node; the code is simpler that way and it's not worth fixing.
  */
 static char *
-regatom(flagp)
-int *flagp;
+regatom(int *flagp)
 {
-       register char *ret;
+       char *ret;
        int flags;
 
        *flagp = WORST;         /* Tentatively. */
@@ -494,8 +491,8 @@ int *flagp;
                *flagp |= HASWIDTH|SIMPLE;
                break;
        case '[': {
-                       register int class;
-                       register int classend;
+                       int class;
+                       int classend;
 
                        if (*regparse == '^') { /* Complement of range. */
                                ret = regnode(ANYBUT);
@@ -553,8 +550,8 @@ int *flagp;
                *flagp |= HASWIDTH|SIMPLE;
                break;
        default: {
-                       register int len;
-                       register char ender;
+                       int len;
+                       char ender;
 
                        regparse--;
                        len = strcspn(regparse, META);
@@ -583,11 +580,10 @@ int *flagp;
  - regnode - emit a node
  */
 static char *                  /* Location. */
-regnode(op)
-char op;
+regnode(char op)
 {
-       register char *ret;
-       register char *ptr;
+       char *ret;
+       char *ptr;
 
        ret = regcode;
        if (ret == &regdummy) {
@@ -608,8 +604,7 @@ char op;
  - regc - emit (if appropriate) a byte of code
  */
 static void
-regc(b)
-char b;
+regc(char b)
 {
        if (regcode != &regdummy)
                *regcode++ = b;
@@ -623,13 +618,11 @@ char b;
  * Means relocating the operand.
  */
 static void
-reginsert(op, opnd)
-char op;
-char *opnd;
+reginsert(char op, char *opnd)
 {
-       register char *src;
-       register char *dst;
-       register char *place;
+       char *src;
+       char *dst;
+       char *place;
 
        if (regcode == &regdummy) {
                regsize += 3;
@@ -652,13 +645,11 @@ char *opnd;
  - regtail - set the next-pointer at the end of a node chain
  */
 static void
-regtail(p, val)
-char *p;
-char *val;
+regtail(char *p, char *val)
 {
-       register char *scan;
-       register char *temp;
-       register int offset;
+       char *scan;
+       char *temp;
+       int offset;
 
        if (p == &regdummy)
                return;
@@ -684,9 +675,7 @@ char *val;
  - regoptail - regtail on operand of first argument; nop if operandless
  */
 static void
-regoptail(p, val)
-char *p;
-char *val;
+regoptail(char *p, char *val)
 {
        /* "Operandless" and "op != BRANCH" are synonymous in practice. */
        if (p == NULL || p == &regdummy || OP(p) != BRANCH)
@@ -723,11 +712,9 @@ STATIC char *regprop();
  - regexec - match a regexp against a string
  */
 int
-tpt_regexec(prog, string)
-register regexp *prog;
-register char *string;
+tpt_regexec(regexp *prog, char *string)
 {
-       register char *s;
+       char *s;
 
        /* Be paranoid... */
        if (prog == NULL || string == NULL) {
@@ -784,13 +771,11 @@ register char *string;
  - regtry - try match at specific point
  */
 static int                     /* 0 failure, 1 success */
-regtry(prog, string)
-regexp *prog;
-char *string;
+regtry(regexp *prog, char *string)
 {
-       register int i;
-       register char **sp;
-       register char **ep;
+       int i;
+       char **sp;
+       char **ep;
 
        reginput = string;
        regstartp = prog->startp;
@@ -821,10 +806,9 @@ char *string;
  * by recursion.
  */
 static int                     /* 0 failure, 1 success */
-regmatch(prog)
-char *prog;
+regmatch(char *prog)
 {
-       register char *scan;    /* Current node. */
+       char *scan;     /* Current node. */
        char *next;             /* Next node. */
 
        scan = prog;
@@ -854,8 +838,8 @@ char *prog;
                        reginput++;
                        break;
                case EXACTLY: {
-                               register int len;
-                               register char *opnd;
+                               int len;
+                               char *opnd;
 
                                opnd = OPERAND(scan);
                                /* Inline the first character, for speed. */
@@ -890,8 +874,8 @@ char *prog;
                case OPEN+7:
                case OPEN+8:
                case OPEN+9: {
-                               register int no;
-                               register char *save;
+                               int no;
+                               char *save;
 
                                no = OP(scan) - OPEN;
                                save = reginput;
@@ -918,8 +902,8 @@ char *prog;
                case CLOSE+7:
                case CLOSE+8:
                case CLOSE+9: {
-                               register int no;
-                               register char *save;
+                               int no;
+                               char *save;
 
                                no = OP(scan) - CLOSE;
                                save = reginput;
@@ -938,7 +922,7 @@ char *prog;
                        }
                        break;
                case BRANCH: {
-                               register char *save;
+                               char *save;
 
                                if (OP(next) != BRANCH)         /* No choice. */
                                        next = OPERAND(scan);   /* Avoid recursion. */
@@ -957,10 +941,10 @@ char *prog;
                        break;
                case STAR:
                case PLUS: {
-                               register char nextch;
-                               register int no;
-                               register char *save;
-                               register int min;
+                               char nextch;
+                               int no;
+                               char *save;
+                               int min;
 
                                /*
                                 * Lookahead to avoid useless match attempts
@@ -1008,12 +992,11 @@ char *prog;
  - regrepeat - repeatedly match something simple, report how many
  */
 static int
-regrepeat(p)
-char *p;
+regrepeat(char *p)
 {
-       register int count = 0;
-       register char *scan;
-       register char *opnd;
+       int count = 0;
+       char *scan;
+       char *opnd;
 
        scan = reginput;
        opnd = OPERAND(p);
@@ -1054,10 +1037,9 @@ char *p;
  - regnext - dig the "next" pointer out of a node
  */
 static char *
-regnext(p)
-register char *p;
+regnext(char *p)
 {
-       register int offset;
+       int offset;
 
        if (p == &regdummy)
                return(NULL);
@@ -1080,12 +1062,11 @@ STATIC char *regprop();
  - regdump - dump a regexp onto stdout in vaguely comprehensible form
  */
 void
-regdump(r)
-regexp *r;
+regdump(regexp *r)
 {
-       register char *s;
-       register char op = EXACTLY;     /* Arbitrary non-END op. */
-       register char *next;
+       char *s;
+       char op = EXACTLY;      /* Arbitrary non-END op. */
+       char *next;
 
 
        s = r->program + 1;
@@ -1123,10 +1104,9 @@ regexp *r;
  - regprop - printable representation of opcode
  */
 static char *
-regprop(op)
-char *op;
+regprop(char *op)
 {
-       register char *p;
+       char *p;
        static char buf[50];
 
        (void) strcpy(buf, ":");
@@ -1215,13 +1195,11 @@ char *op;
  */
 
 static int
-strcspn(s1, s2)
-char *s1;
-char *s2;
+strcspn(char *s1, char *s2)
 {
-       register char *scan1;
-       register char *scan2;
-       register int count;
+       char *scan1;
+       char *scan2;
+       int count;
 
        count = 0;
        for (scan1 = s1; *scan1 != '\0'; scan1++) {
index 33bd0e8d46028c5fa33f4c43c551b7fc5b6fc727..b637fa885bbe25b486dc81f25e0931e4022ad2e4 100644 (file)
  - regsub - perform substitutions after a regexp match
  */
 void
-tpt_regsub(prog, source, dest)
-regexp *prog;
-char *source;
-char *dest;
+tpt_regsub(regexp *prog, char *source, char *dest)
 {
-       register char *src;
-       register char *dst;
-       register char c;
-       register int no;
-       register int len;
+       char *src;
+       char *dst;
+       char c;
+       int no;
+       int len;
        extern char *strncpy();
 
        if (prog == NULL || source == NULL || dest == NULL) {
index 86cc4784d2eed8685c03acca2537f7355c68e23f..bc0ec2d21659d4c951a5b6e8949b5d71d63614f1 100644 (file)
@@ -135,7 +135,7 @@ int lineno = 0;
 multiple(ncomp, nexec, nsub)
 int ncomp, nexec, nsub;
 {
-       register int i;
+       int i;
        extern char *strchr();
 
        errreport = 1;
@@ -151,7 +151,7 @@ int ncomp, nexec, nsub;
 {
        regexp *r;
        char dbuf[BUFSIZ];
-       register int i;
+       int i;
 
        errseen = NULL;
        r = tpt_regcomp(fields.re);
index 2f313920884921f42de815344614941cf9c1fa54..6d70d33b463b7d0d034244931dd65fb7279b8ef0 100644 (file)
@@ -58,8 +58,8 @@ char *opts;
        static char switchar = '\0';
 #endif
        static int sp = 1;
-       register int c;
-       register char *cp;
+       int c;
+       char *cp;
        char *message;
 #ifdef SWITCHAR
        if (switchar == '\0') {
index 79560b727d9e0f33b6d2313ca39f1c4437b51386..ccfb16d2421393b1e493fb21e4b234da0f0330a6 100644 (file)
@@ -923,9 +923,9 @@ int etag()
 */
 VOID destack()
 {
-     register int ecode = 0;  /* Error code (0=o.k.). */
+     int ecode = 0;  /* Error code (0=o.k.). */
      UNCH *eparm2 = NULL;     /* Second parameter of error message. */
-     register int minmsgsw;   /* 1=message if tag omitted; 0=no message. */
+     int minmsgsw;   /* 1=message if tag omitted; 0=no message. */
 
      /* If element has a content model (i.e., not a keyword) and there
         are required tags left, and no CONREF attribute was specified,
index cebc70ca332ef39a6c4fdc05be025855fd02a84b..7a2064e224aa71ca0bd6ca5f0931d413302e7ca2 100644 (file)
@@ -72,8 +72,7 @@ void (*panicProc) _ANSI_ARGS_(TCL_VARARGS(char *,format)) = NULL;
  */
 
 void
-Tcl_SetPanicProc(proc)
-    void (*proc) _ANSI_ARGS_(TCL_VARARGS(char *,format));
+Tcl_SetPanicProc(void (*proc) _ANSI_ARGS_(TCL_VARARGS(char *,format)))
 {
     panicProc = proc;
 }
@@ -96,12 +95,9 @@ Tcl_SetPanicProc(proc)
 
        /* VARARGS ARGSUSED */
 void
-panic(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
-    char *format;              /* Format string, suitable for passing to
-                                * fprintf. */
-    char *arg1, *arg2, *arg3;  /* Additional arguments (variable in number)
-                                * to pass to fprintf. */
-    char *arg4, *arg5, *arg6, *arg7, *arg8;
+panic(char *format /* Format string, suitable for passing to fprintf. */,
+      char *arg1, char *arg2, char *arg3 /* Additional arguments (variable in number) to pass to fprintf. */,
+      char *arg4, char *arg5, char *arg6, char *arg7, char *arg8)
 {
     if (panicProc != NULL) {
        (void) (*panicProc)(format, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
index 51e26d54f8f29f08b4eb414de56d1eab6276cc63..9933eff00c8cbd5f2a4b3f410681146f5fcd50b0 100644 (file)
@@ -258,13 +258,12 @@ static int strcspn _ANSI_ARGS_((char *s1, char *s2));
  * of the structure of the compiled regexp.
  */
 regexp *
-TclRegComp(exp)
-char *exp;
+TclRegComp(char *exp)
 {
-       register regexp *r;
-       register char *scan;
-       register char *longest;
-       register int len;
+       regexp *r;
+       char *scan;
+       char *longest;
+       int len;
        int flags;
        struct regcomp_state state;
        struct regcomp_state *rcstate= &state;
@@ -347,15 +346,12 @@ char *exp;
  * follows makes it hard to avoid.
  */
 static char *
-reg(paren, flagp, rcstate)
-int paren;                     /* Parenthesized? */
-int *flagp;
-struct regcomp_state *rcstate;
+reg(int paren /* Parenthesized? */, int *flagp, struct regcomp_state *rcstate)
 {
-       register char *ret;
-       register char *br;
-       register char *ender;
-       register int parno = 0;
+       char *ret;
+       char *br;
+       char *ender;
+       int parno = 0;
        int flags;
 
        *flagp = HASWIDTH;      /* Tentatively. */
@@ -420,13 +416,11 @@ struct regcomp_state *rcstate;
  * Implements the concatenation operator.
  */
 static char *
-regbranch(flagp, rcstate)
-int *flagp;
-struct regcomp_state *rcstate;
+regbranch(int *flagp, struct regcomp_state *rcstate)
 {
-       register char *ret;
-       register char *chain;
-       register char *latest;
+       char *ret;
+       char *chain;
+       char *latest;
        int flags;
 
        *flagp = WORST;         /* Tentatively. */
@@ -461,13 +455,11 @@ struct regcomp_state *rcstate;
  * endmarker role is not redundant.
  */
 static char *
-regpiece(flagp, rcstate)
-int *flagp;
-struct regcomp_state *rcstate;
+regpiece(int *flagp, struct regcomp_state *rcstate)
 {
-       register char *ret;
-       register char op;
-       register char *next;
+       char *ret;
+       char op;
+       char *next;
        int flags;
 
        ret = regatom(&flags,rcstate);
@@ -526,11 +518,9 @@ struct regcomp_state *rcstate;
  * separate node; the code is simpler that way and it's not worth fixing.
  */
 static char *
-regatom(flagp, rcstate)
-int *flagp;
-struct regcomp_state *rcstate;
+regatom(int *flagp, struct regcomp_state *rcstate)
 {
-       register char *ret;
+       char *ret;
        int flags;
 
        *flagp = WORST;         /* Tentatively. */
@@ -547,8 +537,8 @@ struct regcomp_state *rcstate;
                *flagp |= HASWIDTH|SIMPLE;
                break;
        case '[': {
-                       register int clss;
-                       register int classend;
+                       int clss;
+                       int classend;
 
                        if (*rcstate->regparse == '^') {        /* Complement of range. */
                                ret = regnode(ANYBUT,rcstate);
@@ -608,8 +598,8 @@ struct regcomp_state *rcstate;
                *flagp |= HASWIDTH|SIMPLE;
                break;
        default: {
-                       register int len;
-                       register char ender;
+                       int len;
+                       char ender;
 
                        rcstate->regparse--;
                        len = strcspn(rcstate->regparse, META);
@@ -638,12 +628,10 @@ struct regcomp_state *rcstate;
  - regnode - emit a node
  */
 static char *                  /* Location. */
-regnode(op, rcstate)
-int op;
-struct regcomp_state *rcstate;
+regnode(int op, struct regcomp_state *rcstate)
 {
-       register char *ret;
-       register char *ptr;
+       char *ret;
+       char *ptr;
 
        ret = rcstate->regcode;
        if (ret == &regdummy) {
@@ -664,9 +652,7 @@ struct regcomp_state *rcstate;
  - regc - emit (if appropriate) a byte of code
  */
 static void
-regc(b, rcstate)
-int b;
-struct regcomp_state *rcstate;
+regc(int b, struct regcomp_state *rcstate)
 {
        if (rcstate->regcode != &regdummy)
                *rcstate->regcode++ = (char)b;
@@ -680,14 +666,11 @@ struct regcomp_state *rcstate;
  * Means relocating the operand.
  */
 static void
-reginsert(op, opnd, rcstate)
-int op;
-char *opnd;
-struct regcomp_state *rcstate;
+reginsert(int op, char *opnd, struct regcomp_state *rcstate)
 {
-       register char *src;
-       register char *dst;
-       register char *place;
+       char *src;
+       char *dst;
+       char *place;
 
        if (rcstate->regcode == &regdummy) {
                rcstate->regsize += 3;
@@ -710,13 +693,11 @@ struct regcomp_state *rcstate;
  - regtail - set the next-pointer at the end of a node chain
  */
 static void
-regtail(p, val)
-char *p;
-char *val;
+regtail(char *p, char *val)
 {
-       register char *scan;
-       register char *temp;
-       register int offset;
+       char *scan;
+       char *temp;
+       int offset;
 
        if (p == &regdummy)
                return;
@@ -742,9 +723,7 @@ char *val;
  - regoptail - regtail on operand of first argument; nop if operandless
  */
 static void
-regoptail(p, val)
-char *p;
-char *val;
+regoptail(char *p, char *val)
 {
        /* "Operandless" and "op != BRANCH" are synonymous in practice. */
        if (p == NULL || p == &regdummy || OP(p) != BRANCH)
@@ -786,12 +765,9 @@ static char *regprop _ANSI_ARGS_((char *op));
  - TclRegExec - match a regexp against a string
  */
 int
-TclRegExec(prog, string, start)
-register regexp *prog;
-register char *string;
-char *start;
+TclRegExec(regexp *prog, char *string, char *start)
 {
-       register char *s;
+       char *s;
        struct regexec_state state;
        struct regexec_state *restate= &state;
 
@@ -851,14 +827,11 @@ char *start;
  - regtry - try match at specific point
  */
 static int                     /* 0 failure, 1 success */
-regtry(prog, string, restate)
-regexp *prog;
-char *string;
-struct regexec_state *restate;
+regtry(regexp *prog, char *string, struct regexec_state *restate)
 {
-       register int i;
-       register char **sp;
-       register char **ep;
+       int i;
+       char **sp;
+       char **ep;
 
        restate->reginput = string;
        restate->regstartp = prog->startp;
@@ -889,11 +862,9 @@ struct regexec_state *restate;
  * by recursion.
  */
 static int                     /* 0 failure, 1 success */
-regmatch(prog, restate)
-char *prog;
-struct regexec_state *restate;
+regmatch(char *prog, struct regexec_state *restate)
 {
-    register char *scan;       /* Current node. */
+    char *scan;        /* Current node. */
     char *next;                /* Next node. */
 
     scan = prog;
@@ -926,8 +897,8 @@ struct regexec_state *restate;
                restate->reginput++;
                break;
            case EXACTLY: {
-               register int len;
-               register char *opnd;
+               int len;
+               char *opnd;
 
                opnd = OPERAND(scan);
                /* Inline the first character, for speed. */
@@ -969,8 +940,8 @@ struct regexec_state *restate;
            case OPEN+7:
            case OPEN+8:
            case OPEN+9: {
-               register int no;
-               register char *save;
+               int no;
+               char *save;
 
        doOpen:
                no = OP(scan) - OPEN;
@@ -998,8 +969,8 @@ struct regexec_state *restate;
            case CLOSE+7:
            case CLOSE+8:
            case CLOSE+9: {
-               register int no;
-               register char *save;
+               int no;
+               char *save;
 
        doClose:
                no = OP(scan) - CLOSE;
@@ -1019,7 +990,7 @@ struct regexec_state *restate;
                }
            }
            case BRANCH: {
-               register char *save;
+               char *save;
 
                if (OP(next) != BRANCH) { /* No choice. */
                    next = OPERAND(scan); /* Avoid recursion. */
@@ -1037,10 +1008,10 @@ struct regexec_state *restate;
            }
            case STAR:
            case PLUS: {
-               register char nextch;
-               register int no;
-               register char *save;
-               register int min;
+               char nextch;
+               int no;
+               char *save;
+               int min;
 
                /*
                 * Lookahead to avoid useless match attempts
@@ -1090,13 +1061,11 @@ struct regexec_state *restate;
  - regrepeat - repeatedly match something simple, report how many
  */
 static int
-regrepeat(p, restate)
-char *p;
-struct regexec_state *restate;
+regrepeat(char *p, struct regexec_state *restate)
 {
-       register int count = 0;
-       register char *scan;
-       register char *opnd;
+       int count = 0;
+       char *scan;
+       char *opnd;
 
        scan = restate->reginput;
        opnd = OPERAND(p);
@@ -1137,10 +1106,9 @@ struct regexec_state *restate;
  - regnext - dig the "next" pointer out of a node
  */
 static char *
-regnext(p)
-register char *p;
+regnext(char *p)
 {
-       register int offset;
+       int offset;
 
        if (p == &regdummy)
                return(NULL);
@@ -1163,12 +1131,11 @@ static char *regprop();
  - regdump - dump a regexp onto stdout in vaguely comprehensible form
  */
 void
-regdump(r)
-regexp *r;
+regdump(regexp *r)
 {
-       register char *s;
-       register char op = EXACTLY;     /* Arbitrary non-END op. */
-       register char *next;
+       char *s;
+       char op = EXACTLY;      /* Arbitrary non-END op. */
+       char *next;
 
 
        s = r->program + 1;
@@ -1206,10 +1173,9 @@ regexp *r;
  - regprop - printable representation of opcode
  */
 static char *
-regprop(op)
-char *op;
+regprop(char *op)
 {
-       register char *p;
+       char *p;
        static char buf[50];
 
        (void) strcpy(buf, ":");
@@ -1307,13 +1273,11 @@ char *op;
  */
 
 static int
-strcspn(s1, s2)
-char *s1;
-char *s2;
+strcspn(char *s1, char *s2)
 {
-       register char *scan1;
-       register char *scan2;
-       register int count;
+       char *scan1;
+       char *scan2;
+       int count;
 
        count = 0;
        for (scan1 = s1; *scan1 != '\0'; scan1++) {
@@ -1345,14 +1309,13 @@ char *s2;
  */
 
 void
-TclRegError(string)
-    char *string;                      /* Error message. */
+TclRegError(char *string /* Error message. */)
 {
     errMsg = string;
 }
 
 char *
-TclGetRegError()
+TclGetRegError(void)
 {
     return errMsg;
 }
index 2f0235fa8e41ad5681eba4794bf7fa9b3a5805a0..0dc6c0fa5e4a1de708ea59f6614a5217b480a3e5 100644 (file)
@@ -102,10 +102,8 @@ static int asyncActive = 0;
  */
 
 Tcl_AsyncHandler
-Tcl_AsyncCreate(proc, clientData)
-    Tcl_AsyncProc *proc;               /* Procedure to call when handler
-                                        * is invoked. */
-    ClientData clientData;             /* Argument to pass to handler. */
+Tcl_AsyncCreate(Tcl_AsyncProc *proc /* Procedure to call when handler is invoked. */,
+                ClientData clientData /* Argument to pass to handler. */)
 {
     AsyncHandler *asyncPtr;
 
@@ -143,8 +141,7 @@ Tcl_AsyncCreate(proc, clientData)
  */
 
 void
-Tcl_AsyncMark(async)
-    Tcl_AsyncHandler async;            /* Token for handler. */
+Tcl_AsyncMark(Tcl_AsyncHandler async /* Token for handler. */)
 {
     ((AsyncHandler *) async)->ready = 1;
     if (!asyncActive) {
@@ -170,16 +167,13 @@ Tcl_AsyncMark(async)
  *
  *----------------------------------------------------------------------
  */
+/* interp, If invoked from Tcl_Eval just after completing a command,
+ * points to interpreter.  Otherwise it is NULL. */
+/* code, If interp is non-NULL, this gives completion code from command
+ * that just completed. */
 
 int
-Tcl_AsyncInvoke(interp, code)
-    Tcl_Interp *interp;                        /* If invoked from Tcl_Eval just after
-                                        * completing a command, points to
-                                        * interpreter.  Otherwise it is
-                                        * NULL. */
-    int code;                          /* If interp is non-NULL, this gives
-                                        * completion code from command that
-                                        * just completed. */
+Tcl_AsyncInvoke(Tcl_Interp *interp, int code)
 {
     AsyncHandler *asyncPtr;
 
@@ -238,8 +232,7 @@ Tcl_AsyncInvoke(interp, code)
  */
 
 void
-Tcl_AsyncDelete(async)
-    Tcl_AsyncHandler async;            /* Token for handler to delete. */
+Tcl_AsyncDelete(Tcl_AsyncHandler async /* Token for handler to delete. */)
 {
     AsyncHandler *asyncPtr = (AsyncHandler *) async;
     AsyncHandler *prevPtr;
@@ -282,7 +275,7 @@ Tcl_AsyncDelete(async)
  */
 
 int
-Tcl_AsyncReady()
+Tcl_AsyncReady(void)
 {
     return asyncReady;
 }
index 3187c2e0df661fdf8ca07ff68f5e8100cae3ab12..ba16ba1fa33f34808642e356d0eab326d6d54c71 100644 (file)
@@ -188,11 +188,11 @@ static CmdInfo builtInCmds[] = {
  */
 
 Tcl_Interp *
-Tcl_CreateInterp()
+Tcl_CreateInterp(void)
 {
-    register Interp *iPtr;
-    register Command *cmdPtr;
-    register CmdInfo *cmdInfoPtr;
+    Interp *iPtr;
+    Command *cmdPtr;
+    CmdInfo *cmdInfoPtr;
     Tcl_Channel chan;
     int i;
 
@@ -335,13 +335,12 @@ Tcl_CreateInterp()
  *
  *--------------------------------------------------------------
  */
+/* interp, Interpreter to watch. */
+/* proc,  Procedure to call when interpreter is about to be deleted. */
+/* clientData, One-word value to pass to proc. */
 
 void
-Tcl_CallWhenDeleted(interp, proc, clientData)
-    Tcl_Interp *interp;                /* Interpreter to watch. */
-    Tcl_InterpDeleteProc *proc;        /* Procedure to call when interpreter
-                                * is about to be deleted. */
-    ClientData clientData;     /* One-word value to pass to proc. */
+Tcl_CallWhenDeleted(Tcl_Interp *interp, Tcl_InterpDeleteProc *proc, ClientData clientData)
 {
     Interp *iPtr = (Interp *) interp;
     static int assocDataCounter = 0;
@@ -382,13 +381,12 @@ Tcl_CallWhenDeleted(interp, proc, clientData)
  *
  *--------------------------------------------------------------
  */
+/* interp, Interpreter to watch. */
+/* proc, Procedure to call when interpreter is about to be deleted. */
+/* clientData,  One-word value to pass to proc. */
 
 void
-Tcl_DontCallWhenDeleted(interp, proc, clientData)
-    Tcl_Interp *interp;                /* Interpreter to watch. */
-    Tcl_InterpDeleteProc *proc;        /* Procedure to call when interpreter
-                                * is about to be deleted. */
-    ClientData clientData;     /* One-word value to pass to proc. */
+Tcl_DontCallWhenDeleted(Tcl_Interp *interp, Tcl_InterpDeleteProc *proc, ClientData clientData)
 {
     Interp *iPtr = (Interp *) interp;
     Tcl_HashTable *hTablePtr;
@@ -431,12 +429,12 @@ Tcl_DontCallWhenDeleted(interp, proc, clientData)
  */
 
 void
-Tcl_SetAssocData(interp, name, proc, clientData)
-    Tcl_Interp *interp;                /* Interpreter to associate with. */
-    char *name;                        /* Name for association. */
-    Tcl_InterpDeleteProc *proc;        /* Proc to call when interpreter is
-                                 * about to be deleted. */
-    ClientData clientData;     /* One-word value to pass to proc. */
+Tcl_SetAssocData(
+Tcl_Interp *interp /* Interpreter to associate with. */,
+char *name /* Name for association. */,
+Tcl_InterpDeleteProc *proc /* Proc to call when interpreter is about to be deleted. */,
+ClientData clientData /* One-word value to pass to proc. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     AssocData *dPtr;
@@ -477,9 +475,10 @@ Tcl_SetAssocData(interp, name, proc, clientData)
  */
 
 void
-Tcl_DeleteAssocData(interp, name)
-    Tcl_Interp *interp;                        /* Interpreter to associate with. */
-    char *name;                                /* Name of association. */
+Tcl_DeleteAssocData(
+    Tcl_Interp *interp                 /* Interpreter to associate with. */,
+    char *name                         /* Name of association. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     AssocData *dPtr;
@@ -519,11 +518,12 @@ Tcl_DeleteAssocData(interp, name)
  */
 
 ClientData
-Tcl_GetAssocData(interp, name, procPtr)
-    Tcl_Interp *interp;                        /* Interpreter associated with. */
-    char *name;                                /* Name of association. */
-    Tcl_InterpDeleteProc **procPtr;    /* Pointer to place to store address
+Tcl_GetAssocData(
+    Tcl_Interp *interp                 /* Interpreter associated with. */,
+    char *name                         /* Name of association. */,
+    Tcl_InterpDeleteProc **procPtr     /* Pointer to place to store address
                                         * of current deletion callback. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     AssocData *dPtr;
@@ -565,8 +565,9 @@ Tcl_GetAssocData(interp, name, procPtr)
  */
 
 static void
-DeleteInterpProc(interp)
-    Tcl_Interp *interp;                        /* Interpreter to delete. */
+DeleteInterpProc(
+    Tcl_Interp *interp                 /* Interpreter to delete. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     Tcl_HashEntry *hPtr;
@@ -720,8 +721,7 @@ DeleteInterpProc(interp)
  */
 
 int
-Tcl_InterpDeleted(interp)
-    Tcl_Interp *interp;
+Tcl_InterpDeleted(Tcl_Interp *interp)
 {
     return (((Interp *) interp)->flags & DELETED) ? 1 : 0;
 }
@@ -750,9 +750,10 @@ Tcl_InterpDeleted(interp)
  */
 
 void
-Tcl_DeleteInterp(interp)
-    Tcl_Interp *interp;                /* Token for command interpreter (returned
+Tcl_DeleteInterp(
+    Tcl_Interp *interp         /* Token for command interpreter (returned
                                 * by a previous call to Tcl_CreateInterp). */
+)
 {
     Interp *iPtr = (Interp *) interp;
 
@@ -800,16 +801,17 @@ Tcl_DeleteInterp(interp)
  */
 
 Tcl_Command
-Tcl_CreateCommand(interp, cmdName, proc, clientData, deleteProc)
-    Tcl_Interp *interp;                /* Token for command interpreter (returned
+Tcl_CreateCommand(
+    Tcl_Interp *interp,                /* Token for command interpreter (returned
                                 * by a previous call to Tcl_CreateInterp). */
-    char *cmdName;             /* Name of command. */
-    Tcl_CmdProc *proc;         /* Command procedure to associate with
+    char *cmdName,             /* Name of command. */
+    Tcl_CmdProc *proc,         /* Command procedure to associate with
                                 * cmdName. */
-    ClientData clientData;     /* Arbitrary one-word value to pass to proc. */
-    Tcl_CmdDeleteProc *deleteProc;
+    ClientData clientData,     /* Arbitrary one-word value to pass to proc. */
+    Tcl_CmdDeleteProc *deleteProc
                                /* If not NULL, gives a procedure to call when
                                 * this command is deleted. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     Command *cmdPtr;
@@ -901,12 +903,13 @@ Tcl_CreateCommand(interp, cmdName, proc, clientData, deleteProc)
  */
 
 int
-Tcl_SetCommandInfo(interp, cmdName, infoPtr)
-    Tcl_Interp *interp;                        /* Interpreter in which to look
+Tcl_SetCommandInfo(
+    Tcl_Interp *interp,                        /* Interpreter in which to look
                                         * for command. */
-    char *cmdName;                     /* Name of desired command. */
-    Tcl_CmdInfo *infoPtr;              /* Where to store information about
+    char *cmdName,                     /* Name of desired command. */
+    Tcl_CmdInfo *infoPtr               /* Where to store information about
                                         * command. */
+)
 {
     Tcl_HashEntry *hPtr;
     Command *cmdPtr;
@@ -943,12 +946,13 @@ Tcl_SetCommandInfo(interp, cmdName, infoPtr)
  */
 
 int
-Tcl_GetCommandInfo(interp, cmdName, infoPtr)
-    Tcl_Interp *interp;                        /* Interpreter in which to look
+Tcl_GetCommandInfo(
+    Tcl_Interp *interp,                        /* Interpreter in which to look
                                         * for command. */
-    char *cmdName;                     /* Name of desired command. */
-    Tcl_CmdInfo *infoPtr;              /* Where to store information about
+    char *cmdName,                     /* Name of desired command. */
+    Tcl_CmdInfo *infoPtr               /* Where to store information about
                                         * command. */
+)
 {
     Tcl_HashEntry *hPtr;
     Command *cmdPtr;
@@ -984,11 +988,12 @@ Tcl_GetCommandInfo(interp, cmdName, infoPtr)
  */
 
 char *
-Tcl_GetCommandName(interp, command)
-    Tcl_Interp *interp;                /* Interpreter containing the command. */
-    Tcl_Command command;       /* Token for the command, returned by a
+Tcl_GetCommandName(
+    Tcl_Interp *interp,                /* Interpreter containing the command. */
+    Tcl_Command command                /* Token for the command, returned by a
                                 * previous call to Tcl_CreateCommand.
                                 * The command must not have been deleted. */
+)
 {
     Command *cmdPtr = (Command *) command;
     Interp *iPtr = (Interp *) interp;
@@ -1026,10 +1031,11 @@ Tcl_GetCommandName(interp, command)
  */
 
 int
-Tcl_DeleteCommand(interp, cmdName)
-    Tcl_Interp *interp;                /* Token for command interpreter (returned
+Tcl_DeleteCommand(
+    Tcl_Interp *interp,                /* Token for command interpreter (returned
                                 * by a previous call to Tcl_CreateInterp). */
-    char *cmdName;             /* Name of command to remove. */
+    char *cmdName              /* Name of command to remove. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     Tcl_HashEntry *hPtr, *tkErrorHPtr;
@@ -1137,10 +1143,11 @@ Tcl_DeleteCommand(interp, cmdName)
  */
 
 int
-Tcl_Eval(interp, cmd)
-    Tcl_Interp *interp;                /* Token for command interpreter (returned
+Tcl_Eval(
+    Tcl_Interp *interp,                /* Token for command interpreter (returned
                                 * by a previous call to Tcl_CreateInterp). */
-    char *cmd;                 /* Pointer to TCL command to interpret. */
+    char *cmd                  /* Pointer to TCL command to interpret. */
+)
 {
     /*
      * The storage immediately below is used to generate a copy
@@ -1165,7 +1172,7 @@ Tcl_Eval(interp, cmd)
     int argc;
     int argSize = NUM_ARGS;
 
-    register char *src;                        /* Points to current character
+    char *src;                 /* Points to current character
                                         * in cmd. */
     char termChar;                     /* Return when this character is found
                                         * (either ']' or '\0').  Zero means
@@ -1173,7 +1180,7 @@ Tcl_Eval(interp, cmd)
     int flags;                         /* Interp->evalFlags value when the
                                         * procedure was called. */
     int result;                                /* Return value. */
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
     Tcl_HashEntry *hPtr;
     Command *cmdPtr;
     char *termPtr;                     /* Contains character just after the
@@ -1186,7 +1193,7 @@ Tcl_Eval(interp, cmd)
                                         * all of offending command is included
                                         * in errorInfo.  "" means that the
                                         * command is all there. */
-    register Trace *tracePtr;
+    Trace *tracePtr;
     int oldCount = iPtr->cmdCount;     /* Used to tell whether any commands
                                         * at all were executed. */
 
@@ -1264,7 +1271,7 @@ Tcl_Eval(interp, cmd)
         */
 
        while (1) {
-           register char c = *src;
+           char c = *src;
 
            if ((CHAR_TYPE(c) != TCL_SPACE) && (c != ';') && (c != '\n')) {
                break;
@@ -1493,7 +1500,7 @@ Tcl_Eval(interp, cmd)
 
     if ((result == TCL_ERROR) && !(iPtr->flags & ERR_ALREADY_LOGGED)) {
        int numChars;
-       register char *p;
+       char *p;
 
        /*
         * Compute the line number where the error occurred.
@@ -1583,16 +1590,17 @@ Tcl_Eval(interp, cmd)
  */
 
 Tcl_Trace
-Tcl_CreateTrace(interp, level, proc, clientData)
-    Tcl_Interp *interp;                /* Interpreter in which to create the trace. */
-    int level;                 /* Only call proc for commands at nesting level
+Tcl_CreateTrace(
+    Tcl_Interp *interp,                /* Interpreter in which to create the trace. */
+    int level,                 /* Only call proc for commands at nesting level
                                 * <= level (1 => top level). */
-    Tcl_CmdTraceProc *proc;    /* Procedure to call before executing each
+    Tcl_CmdTraceProc *proc,    /* Procedure to call before executing each
                                 * command. */
-    ClientData clientData;     /* Arbitrary one-word value to pass to proc. */
+    ClientData clientData      /* Arbitrary one-word value to pass to proc. */
+)
 {
-    register Trace *tracePtr;
-    register Interp *iPtr = (Interp *) interp;
+    Trace *tracePtr;
+    Interp *iPtr = (Interp *) interp;
 
     tracePtr = (Trace *) ckalloc(sizeof(Trace));
     tracePtr->level = level;
@@ -1622,14 +1630,15 @@ Tcl_CreateTrace(interp, level, proc, clientData)
  */
 
 void
-Tcl_DeleteTrace(interp, trace)
-    Tcl_Interp *interp;                /* Interpreter that contains trace. */
-    Tcl_Trace trace;           /* Token for trace (returned previously by
+Tcl_DeleteTrace(
+    Tcl_Interp *interp,                /* Interpreter that contains trace. */
+    Tcl_Trace trace            /* Token for trace (returned previously by
                                 * Tcl_CreateTrace). */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
-    register Trace *tracePtr = (Trace *) trace;
-    register Trace *tracePtr2;
+    Interp *iPtr = (Interp *) interp;
+    Trace *tracePtr = (Trace *) trace;
+    Trace *tracePtr2;
 
     if (iPtr->tracePtr == tracePtr) {
        iPtr->tracePtr = tracePtr->nextPtr;
@@ -1666,12 +1675,13 @@ Tcl_DeleteTrace(interp, trace)
  */
 
 void
-Tcl_AddErrorInfo(interp, message)
-    Tcl_Interp *interp;                /* Interpreter to which error information
+Tcl_AddErrorInfo(
+    Tcl_Interp *interp,                /* Interpreter to which error information
                                 * pertains. */
-    char *message;             /* Message to record. */
+    char *message              /* Message to record. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
 
     /*
      * If an error is already being logged, then the new errorInfo
@@ -1773,11 +1783,12 @@ Tcl_VarEval TCL_VARARGS_DEF(Tcl_Interp *, arg1)
  */
 
 int
-Tcl_GlobalEval(interp, command)
-    Tcl_Interp *interp;                /* Interpreter in which to evaluate command. */
-    char *command;             /* Command to evaluate. */
+Tcl_GlobalEval(
+    Tcl_Interp *interp,                /* Interpreter in which to evaluate command. */
+    char *command              /* Command to evaluate. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
     int result;
     CallFrame *savedVarFramePtr;
 
@@ -1806,10 +1817,11 @@ Tcl_GlobalEval(interp, command)
  */
 
 int
-Tcl_SetRecursionLimit(interp, depth)
-    Tcl_Interp *interp;                        /* Interpreter whose nesting limit
+Tcl_SetRecursionLimit(
+    Tcl_Interp *interp,                        /* Interpreter whose nesting limit
                                         * is to be set. */
-    int depth;                         /* New value for maximimum depth. */
+    int depth                          /* New value for maximimum depth. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     int old;
@@ -1842,8 +1854,9 @@ Tcl_SetRecursionLimit(interp, depth)
  */
 
 void
-Tcl_AllowExceptions(interp)
-    Tcl_Interp *interp;                /* Interpreter in which to set flag. */
+Tcl_AllowExceptions(
+    Tcl_Interp *interp         /* Interpreter in which to set flag. */
+)
 {
     Interp *iPtr = (Interp *) interp;
 
index c2d0254f554ba3b4d12c87e6bec11fcf7c6e1a59..123db466a7a9148a1c85c56ef1a7ea398424b0c7 100644 (file)
@@ -646,8 +646,7 @@ Tcl_CreateCommand (interp, "memory", MemoryCmd, (ClientData) NULL,
  *----------------------------------------------------------------------
  */
 VOID *
-Tcl_Ckalloc (size)
-    unsigned int size;
+Tcl_Ckalloc (unsigned int size)
 {
         char *result;
 
@@ -659,10 +658,7 @@ Tcl_Ckalloc (size)
 \f
 
 char *
-Tcl_DbCkalloc(size, file, line)
-    unsigned int size;
-    char        *file;
-    int          line;
+Tcl_DbCkalloc(unsigned int size, char *file, int line)
 {
     char *result;
 
@@ -677,11 +673,7 @@ Tcl_DbCkalloc(size, file, line)
 }
 
 char *
-Tcl_DbCkrealloc(ptr, size, file, line)
-    char *ptr;
-    unsigned int size;
-    char *file;
-    int line;
+Tcl_DbCkrealloc(char *ptr, unsigned int size, char *file, int line)
 {
     char *result;
 
@@ -705,17 +697,13 @@ Tcl_DbCkrealloc(ptr, size, file, line)
  *----------------------------------------------------------------------
  */
 void
-Tcl_Ckfree (ptr)
-    char *ptr;
+Tcl_Ckfree (char *ptr)
 {
         free (ptr);
 }
 
 int
-Tcl_DbCkfree(ptr, file, line)
-    char *  ptr;
-    char     *file;
-    int       line;
+Tcl_DbCkfree(char *ptr, char *file, int line)
 {
     free (ptr);
     return 0;
@@ -732,8 +720,7 @@ Tcl_DbCkfree(ptr, file, line)
  */
        /* ARGSUSED */
 void
-Tcl_InitMemory(interp)
-    Tcl_Interp *interp;
+Tcl_InitMemory(Tcl_Interp *interp)
 {
 }
 
@@ -745,16 +732,13 @@ extern void               Tcl_ValidateAllMemory _ANSI_ARGS_((char *file,
                            int line));
 
 int
-Tcl_DumpActiveMemory (fileName)
-    char *fileName;
+Tcl_DumpActiveMemory (char *fileName)
 {
     return TCL_OK;
 }
 
 void
-Tcl_ValidateAllMemory (file, line)
-    char  *file;
-    int    line;
+Tcl_ValidateAllMemory (char *file, int line)
 {
 }
 
index f25062bae4dd51ff6caaa46cd12b7125ae100c1f..c495c489628ef90eca660c0e99a476825eca7182 100644 (file)
@@ -69,11 +69,12 @@ static int          ParseTime _ANSI_ARGS_((Tcl_Interp *interp,
  */
 
 int
-Tcl_ClockCmd (dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ClockCmd (
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int c;
     size_t length;
@@ -224,10 +225,7 @@ Tcl_ClockCmd (dummy, interp, argc, argv)
  */
 
 static int
-ParseTime(interp, string, timePtr)
-    Tcl_Interp *interp;
-    char *string;
-    unsigned long *timePtr;
+ParseTime(Tcl_Interp *interp, char *string, unsigned long *timePtr)
 {
     char *end, *p;
     unsigned long  i;
@@ -290,11 +288,12 @@ ParseTime(interp, string, timePtr)
  */
 
 static int
-FormatClock(interp, clockVal, useGMT, format)
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    unsigned long clockVal;            /* Time in seconds. */
-    int useGMT;                                /* Boolean */
-    char *format;                      /* Format string */
+FormatClock(
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    unsigned long clockVal,            /* Time in seconds. */
+    int useGMT,                                /* Boolean */
+    char *format                       /* Format string */
+)
 {
     struct tm *timeDataPtr;
     Tcl_DString buffer;
index 640aae3250db7645c0e2791a591970ce5723ad46..19f62d9e844fa1e0c7c7bebc29cd292ef77a6162 100644 (file)
@@ -67,11 +67,12 @@ static int          StoreStatData _ANSI_ARGS_((Tcl_Interp *interp,
 
        /* ARGSUSED */
 int
-Tcl_BreakCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_BreakCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     if (argc != 1) {
        Tcl_AppendResult(interp, "wrong # args: should be \"",
@@ -100,11 +101,12 @@ Tcl_BreakCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_CaseCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_CaseCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int i, result;
     int body;
@@ -145,7 +147,7 @@ Tcl_CaseCmd(dummy, interp, argc, argv)
     for (i = 0; i < caseArgc; i += 2) {
        int patArgc, j;
        char **patArgv;
-       register char *p;
+       char *p;
 
        if (i == (caseArgc-1)) {
            interp->result = "extra case pattern with no body";
@@ -240,11 +242,12 @@ Tcl_CaseCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_CatchCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_CatchCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int result;
 
@@ -285,11 +288,12 @@ Tcl_CatchCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_CdCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_CdCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     char *dirName;
     Tcl_DString buffer;
@@ -334,11 +338,12 @@ Tcl_CdCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ConcatCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ConcatCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     if (argc >= 2) {
        interp->result = Tcl_Concat(argc-1, argv+1);
@@ -366,11 +371,12 @@ Tcl_ConcatCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ContinueCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ContinueCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     if (argc != 1) {
        Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
@@ -399,11 +405,12 @@ Tcl_ContinueCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ErrorCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ErrorCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Interp *iPtr = (Interp *) interp;
 
@@ -444,11 +451,12 @@ Tcl_ErrorCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_EvalCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_EvalCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int result;
     char *cmd;
@@ -498,11 +506,12 @@ Tcl_EvalCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ExitCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ExitCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int value;
 
@@ -540,11 +549,12 @@ Tcl_ExitCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ExprCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ExprCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_DString buffer;
     int i, result;
@@ -588,11 +598,12 @@ Tcl_ExprCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_FileCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_FileCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     char *fileName, *extension;
     int c, statOp, result;
@@ -1005,12 +1016,13 @@ Tcl_FileCmd(dummy, interp, argc, argv)
  */
 
 static int
-StoreStatData(interp, varName, statPtr)
-    Tcl_Interp *interp;                        /* Interpreter for error reports. */
-    char *varName;                     /* Name of associative array variable
+StoreStatData(
+    Tcl_Interp *interp,                        /* Interpreter for error reports. */
+    char *varName,                     /* Name of associative array variable
                                         * in which to store stat results. */
-    struct stat *statPtr;              /* Pointer to buffer containing
+    struct stat *statPtr               /* Pointer to buffer containing
                                         * stat data to store in varName. */
+)
 {
     char string[30];
 
@@ -1089,8 +1101,7 @@ StoreStatData(interp, varName, statPtr)
  */
 
 static char *
-GetTypeFromMode(mode)
-    int mode;
+GetTypeFromMode(int mode)
 {
     if (S_ISREG(mode)) {
        return "file";
@@ -1129,11 +1140,12 @@ GetTypeFromMode(mode)
 
        /* ARGSUSED */
 int
-Tcl_ForCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ForCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int result, value;
 
@@ -1205,11 +1217,12 @@ Tcl_ForCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ForeachCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ForeachCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int result = TCL_OK;
     int i;                     /* i selects a value list */
@@ -1363,13 +1376,14 @@ errorReturn:
 
        /* ARGSUSED */
 int
-Tcl_FormatCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_FormatCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
-    register char *format;     /* Used to read characters from the format
+    char *format;      /* Used to read characters from the format
                                 * string. */
     char newFormat[40];                /* A new format specifier is generated here. */
     int width;                 /* Field width from field specifier, or 0 if
@@ -1431,7 +1445,7 @@ Tcl_FormatCmd(dummy, interp, argc, argv)
     }
     argIndex = 2;
     for (format = argv[1]; *format != 0; ) {
-       register char *newPtr = newFormat;
+       char *newPtr = newFormat;
 
        width = precision = noPercent = useShort = 0;
        whichValue = PTR_VALUE;
@@ -1441,7 +1455,7 @@ Tcl_FormatCmd(dummy, interp, argc, argv)
         */
 
        if (*format != '%') {
-           register char *p;
+           char *p;
 
            ptrValue = p = format;
            while ((*format != '%') && (*format != 0)) {
index 7fbaa90cb05a06f7dd169de7d1a3ddfaf653d014..87bb5d45dcd41ea95058e584d1e49e5e281d92bf 100644 (file)
@@ -102,11 +102,12 @@ static int                SortCompareProc _ANSI_ARGS_((CONST VOID *first,
 
        /* ARGSUSED */
 int
-Tcl_IfCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_IfCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int i, result, value;
 
@@ -195,11 +196,12 @@ Tcl_IfCmd(dummy, interp, argc, argv)
 
     /* ARGSUSED */
 int
-Tcl_IncrCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_IncrCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int value;
     char *oldString, *result;
@@ -260,13 +262,14 @@ Tcl_IncrCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_InfoCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_InfoCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
     size_t length;
     int c;
     Arg *argPtr;
@@ -697,11 +700,12 @@ Tcl_InfoCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_JoinCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_JoinCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     char *joinString;
     char **listArgv;
@@ -750,11 +754,12 @@ Tcl_JoinCmd(dummy, interp, argc, argv)
 
     /* ARGSUSED */
 int
-Tcl_LindexCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_LindexCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     char *p, *element, *next;
     int index, size, parenthesized, result, returnLast;
@@ -822,11 +827,12 @@ Tcl_LindexCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_LinsertCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_LinsertCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     char *p, *element, savedChar;
     int i, index, count, result, size;
@@ -909,11 +915,12 @@ Tcl_LinsertCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ListCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ListCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     if (argc >= 2) {
        interp->result = Tcl_Merge(argc-1, argv+1);
@@ -941,11 +948,12 @@ Tcl_ListCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_LlengthCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_LlengthCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int count, result;
     char *element, *p;
@@ -988,11 +996,12 @@ Tcl_LlengthCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_LrangeCmd(notUsed, interp, argc, argv)
-    ClientData notUsed;                        /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_LrangeCmd(
+    ClientData notUsed,                        /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int first, last, result;
     char *begin, *end, c, *dummy, *next;
@@ -1093,11 +1102,12 @@ Tcl_LrangeCmd(notUsed, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_LreplaceCmd(notUsed, interp, argc, argv)
-    ClientData notUsed;                        /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_LreplaceCmd(
+    ClientData notUsed,                        /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     char *p1, *p2, *element, savedChar, *dummy, *next;
     int i, first, last, count, result, size, firstIsEnd;
@@ -1222,11 +1232,12 @@ Tcl_LreplaceCmd(notUsed, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_LsearchCmd(notUsed, interp, argc, argv)
-    ClientData notUsed;                        /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_LsearchCmd(
+    ClientData notUsed,                        /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
 #define EXACT  0
 #define GLOB   1
@@ -1303,11 +1314,12 @@ Tcl_LsearchCmd(notUsed, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_LsortCmd(notUsed, interp, argc, argv)
-    ClientData notUsed;                        /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_LsortCmd(
+    ClientData notUsed,                        /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int listArgc, i, c;
     size_t length;
@@ -1421,8 +1433,7 @@ Tcl_LsortCmd(notUsed, interp, argc, argv)
  */
 
 static int
-SortCompareProc(first, second)
-    CONST VOID *first, *second;                /* Elements to be compared. */
+SortCompareProc(CONST VOID *first, CONST VOID *second)         /* Elements to be compared. */
 {
     int order;
     char *firstString = *((char **) first);
index 7e2a68cd3a3402d1aef0d87d56475531f3cf445b..574e7fb34389ec3f295c98263124d45ad7691475 100644 (file)
@@ -85,11 +85,12 @@ static char *               TraceVarProc _ANSI_ARGS_((ClientData clientData,
 
        /* ARGSUSED */
 int
-Tcl_PwdCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_PwdCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     char *dirName;
 
@@ -126,11 +127,12 @@ Tcl_PwdCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_RegexpCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_RegexpCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int noCase = 0;
     int indices = 0;
@@ -177,7 +179,7 @@ Tcl_RegexpCmd(dummy, interp, argc, argv)
      */
 
     if (noCase) {
-       register char *p;
+       char *p;
 
        Tcl_DStringInit(&patternDString);
        Tcl_DStringAppend(&patternDString, argPtr[0], -1);
@@ -279,18 +281,19 @@ Tcl_RegexpCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_RegsubCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_RegsubCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int noCase = 0, all = 0;
     Tcl_RegExp regExpr;
     char *string, *pattern, *p, *firstChar, *newValue, **argPtr;
     int match, flags, code, numMatches;
     char *start, *end, *subStart, *subEnd;
-    register char *src, c;
+    char *src, c;
     Tcl_DString stringDString, patternDString;
 
     if (argc < 5) {
@@ -529,13 +532,14 @@ Tcl_RegsubCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_RenameCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_RenameCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
-    register Command *cmdPtr;
+    Command *cmdPtr;
     Interp *iPtr = (Interp *) interp;
     Tcl_HashEntry *hPtr;
     int new;
@@ -646,11 +650,12 @@ Tcl_RenameCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ReturnCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ReturnCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     int c, code;
@@ -723,11 +728,12 @@ Tcl_ReturnCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ScanCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ScanCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
 #   define MAX_FIELDS 20
     typedef struct {
@@ -738,7 +744,7 @@ Tcl_ScanCmd(dummy, interp, argc, argv)
     } Field;
     Field fields[MAX_FIELDS];          /* Info about all the fields in the
                                         * format string. */
-    register Field *curField;
+    Field *curField;
     int numFields = 0;                 /* Number of fields actually
                                         * specified. */
     int suppress;                      /* Current field is assignment-
@@ -749,7 +755,7 @@ Tcl_ScanCmd(dummy, interp, argc, argv)
                                         * Malloced; NULL means not allocated
                                         * yet. */
     int numScanned;                    /* sscanf's result. */
-    register char *fmt;
+    char *fmt;
     int i, widthSpecified, length, code;
 
     /*
@@ -760,7 +766,7 @@ Tcl_ScanCmd(dummy, interp, argc, argv)
 
 #   define STATIC_SIZE 5
     char copyBuf[STATIC_SIZE], *fmtCopy;
-    register char *dst;
+    char *dst;
 
     if (argc < 3) {
        Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
@@ -1018,11 +1024,12 @@ Tcl_ScanCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_SourceCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_SourceCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                        /* Argument strings. */
+)
 {
     if (argc != 2) {
        Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
@@ -1051,14 +1058,15 @@ Tcl_SourceCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_SplitCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_SplitCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     char *splitChars;
-    register char *p, *p2;
+    char *p, *p2;
     char *elementStart;
 
     if (argc == 2) {
@@ -1127,14 +1135,15 @@ Tcl_SplitCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_StringCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_StringCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     size_t length;
-    register char *p;
+    char *p;
     int match, c, first;
     int left = 0, right = 0;
 
@@ -1273,7 +1282,7 @@ Tcl_StringCmd(dummy, interp, argc, argv)
        return TCL_OK;
     } else if ((c == 't') && (strncmp(argv[1], "tolower", length) == 0)
            && (length >= 3)) {
-       register char *p;
+       char *p;
 
        if (argc != 3) {
            Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
@@ -1289,7 +1298,7 @@ Tcl_StringCmd(dummy, interp, argc, argv)
        return TCL_OK;
     } else if ((c == 't') && (strncmp(argv[1], "toupper", length) == 0)
            && (length >= 3)) {
-       register char *p;
+       char *p;
 
        if (argc != 3) {
            Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
@@ -1306,7 +1315,7 @@ Tcl_StringCmd(dummy, interp, argc, argv)
     } else if ((c == 't') && (strncmp(argv[1], "trim", length) == 0)
            && (length == 4)) {
        char *trimChars;
-       register char *p, *checkPtr;
+       char *p, *checkPtr;
 
        left = right = 1;
 
@@ -1456,11 +1465,12 @@ Tcl_StringCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_SubstCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_SubstCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     Tcl_DString result;
@@ -1594,11 +1604,12 @@ Tcl_SubstCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_SwitchCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_SwitchCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
 #define EXACT  0
 #define GLOB   1
@@ -1750,11 +1761,12 @@ Tcl_SwitchCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_TimeCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_TimeCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int count, i, result;
     double timePer;
@@ -1811,11 +1823,12 @@ Tcl_TimeCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_TraceCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_TraceCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int c;
     size_t length;
@@ -1989,14 +2002,15 @@ Tcl_TraceCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 static char *
-TraceVarProc(clientData, interp, name1, name2, flags)
-    ClientData clientData;     /* Information about the variable trace. */
-    Tcl_Interp *interp;                /* Interpreter containing variable. */
-    char *name1;               /* Name of variable or array. */
-    char *name2;               /* Name of element within array;  NULL means
+TraceVarProc(
+    ClientData clientData,     /* Information about the variable trace. */
+    Tcl_Interp *interp,                /* Interpreter containing variable. */
+    char *name1,               /* Name of variable or array. */
+    char *name2,               /* Name of element within array;  NULL means
                                 * scalar variable is being referenced. */
-    int flags;                 /* OR-ed bits giving operation and other
+    int flags                          /* OR-ed bits giving operation and other
                                 * information. */
+)
 {
     TraceVarInfo *tvarPtr = (TraceVarInfo *) clientData;
     char *result;
@@ -2087,11 +2101,12 @@ TraceVarProc(clientData, interp, name1, name2, flags)
 
        /* ARGSUSED */
 int
-Tcl_WhileCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_WhileCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int result, value;
 
index 3e1ab35a52994e5d61f7271991a95f62236a2515..17cee4b19f0f491b6ec1f20793c205a34b66b3fd 100644 (file)
@@ -408,18 +408,13 @@ static TABLE    MilitaryTable[] = {
  * Dump error messages in the bit bucket.
  */
 static void
-TclDateerror(s)
-    char  *s;
+TclDateerror(char  *s)
 {
 }
 
 
 static time_t
-ToSeconds(Hours, Minutes, Seconds, Meridian)
-    time_t      Hours;
-    time_t      Minutes;
-    time_t      Seconds;
-    MERIDIAN    Meridian;
+ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian)
 {
     if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 59)
         return -1;
@@ -442,16 +437,9 @@ ToSeconds(Hours, Minutes, Seconds, Meridian)
 
 
 static int
-Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode, TimePtr)
-    time_t      Month;
-    time_t      Day;
-    time_t      Year;
-    time_t      Hours;
-    time_t      Minutes;
-    time_t      Seconds;
-    MERIDIAN    Meridian;
-    DSTMODE     DSTmode;
-    time_t     *TimePtr;
+Convert(time_t Month, time_t Day, time_t Year,
+        time_t Hours, time_t Minutes, time_t Seconds,
+        MERIDIAN Meridian, DSTMODE DSTmode, time_t *TimePtr)
 {
     static int  DaysInMonth[12] = {
         31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
@@ -494,9 +482,7 @@ Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode, TimePtr)
 
 
 static time_t
-DSTcorrect(Start, Future)
-    time_t      Start;
-    time_t      Future;
+DSTcorrect(time_t Start, time_t Future)
 {
     time_t      StartDay;
     time_t      FutureDay;
@@ -508,10 +494,7 @@ DSTcorrect(Start, Future)
 
 
 static time_t
-RelativeDate(Start, DayOrdinal, DayNumber)
-    time_t      Start;
-    time_t      DayOrdinal;
-    time_t      DayNumber;
+RelativeDate(time_t Start, time_t DayOrdinal, time_t DayNumber)
 {
     struct tm   *tm;
     time_t      now;
@@ -525,10 +508,7 @@ RelativeDate(Start, DayOrdinal, DayNumber)
 
 
 static int
-RelativeMonth(Start, RelMonth, TimePtr)
-    time_t      Start;
-    time_t      RelMonth;
-    time_t     *TimePtr;
+RelativeMonth(time_t Start, time_t RelMonth, time_t *TimePtr)
 {
     struct tm   *tm;
     time_t      Month;
@@ -553,12 +533,11 @@ RelativeMonth(Start, RelMonth, TimePtr)
 
 
 static int
-LookupWord(buff)
-    char                *buff;
+LookupWord(char *buff)
 {
-    register char       *p;
-    register char       *q;
-    register TABLE      *tp;
+    char       *p;
+    char       *q;
+    TABLE      *tp;
     int                 i;
     int                 abbrev;
 
@@ -673,10 +652,10 @@ LookupWord(buff)
 
 
 static int
-TclDatelex()
+TclDatelex(void)
 {
-    register char       c;
-    register char       *p;
+    char       c;
+    char       *p;
     char                buff[20];
     int                 Count;
     int                 sign;
@@ -739,11 +718,7 @@ TclDatelex()
  */
 
 int
-TclGetDate(p, now, zone, timePtr)
-    char          *p;
-    unsigned long  now;
-    long           zone;
-    unsigned long *timePtr;
+TclGetDate(char *p, unsigned long now, long zone, unsigned long *timePtr)
 {
     struct tm           *tm;
     time_t              Start;
@@ -1064,7 +1039,7 @@ int TclDateparse(void)
 int TclDateparse()
 #endif
 {
-       register YYSTYPE *TclDatepvt;   /* top of value stack for $vars */
+       YYSTYPE *TclDatepvt;    /* top of value stack for $vars */
 
 #if defined(__cplusplus) || defined(lint)
 /*
@@ -1103,10 +1078,10 @@ int TclDateparse()
 #endif
 
        {
-               register YYSTYPE *TclDate_pv;   /* top of value stack */
-               register int *TclDate_ps;               /* top of state stack */
-               register int TclDate_state;             /* current state */
-               register int  TclDate_n;                /* internal state number info */
+               YYSTYPE *TclDate_pv;    /* top of value stack */
+               int *TclDate_ps;                /* top of state stack */
+               int TclDate_state;              /* current state */
+               int  TclDate_n;         /* internal state number info */
        goto TclDatestack;      /* moved from 6 lines above to here to please C++ */
 
                /*
@@ -1143,7 +1118,7 @@ int TclDateparse()
                */
                if ( TclDatedebug )
                {
-                       register int TclDate_i;
+                       int TclDate_i;
 
                        printf( "State %d, token ", TclDate_state );
                        if ( TclDatechar == 0 )
@@ -1227,7 +1202,7 @@ int TclDateparse()
 #if YYDEBUG
                if ( TclDatedebug && TclDatetmp )
                {
-                       register int TclDate_i;
+                       int TclDate_i;
 
                        printf( "Received token " );
                        if ( TclDatechar == 0 )
@@ -1269,7 +1244,7 @@ int TclDateparse()
 #if YYDEBUG
                        if ( TclDatedebug && TclDatetmp )
                        {
-                               register int TclDate_i;
+                               int TclDate_i;
 
                                printf( "Received token " );
                                if ( TclDatechar == 0 )
@@ -1296,7 +1271,7 @@ int TclDateparse()
                        ** look through exception table
                        */
                        {
-                               register int *TclDatexi = TclDateexca;
+                               int *TclDatexi = TclDateexca;
 
                                while ( ( *TclDatexi != -1 ) ||
                                        ( TclDatexi[1] != TclDate_state ) )
@@ -1381,7 +1356,7 @@ int TclDateparse()
                                */
                                if ( TclDatedebug )
                                {
-                                       register int TclDate_i;
+                                       int TclDate_i;
 
                                        printf( "Error recovery discards " );
                                        if ( TclDatechar == 0 )
@@ -1441,7 +1416,7 @@ int TclDateparse()
                */
                {
                        /* length of production doubled with extra bit */
-                       register int TclDate_len = TclDater2[ TclDate_n ];
+                       int TclDate_len = TclDater2[ TclDate_n ];
 
                        if ( !( TclDate_len & 01 ) )
                        {
index e15a0cb407f1b57b4aed7110beb37b02d9cc29a4..d45992d32b4af11e8497f2baa523771311bcf346 100644 (file)
@@ -114,9 +114,10 @@ void                       TclUnsetEnv _ANSI_ARGS_((CONST char *name));
  */
 
 void
-TclSetupEnv(interp)
-    Tcl_Interp *interp;                /* Interpreter whose "env" array is to be
+TclSetupEnv(
+    Tcl_Interp *interp         /* Interpreter whose "env" array is to be
                                 * managed. */
+)
 {
     EnvInterp *eiPtr;
     int i;
@@ -186,15 +187,16 @@ TclSetupEnv(interp)
  */
 
 static int
-FindVariable(name, lengthPtr)
-    CONST char *name;          /* Name of desired environment variable. */
-    int *lengthPtr;            /* Used to return length of name (for
+FindVariable(
+    CONST char *name,          /* Name of desired environment variable. */
+    int *lengthPtr             /* Used to return length of name (for
                                 * successful searches) or number of non-NULL
                                 * entries in environ (for unsuccessful
                                 * searches). */
+)
 {
     int i;
-    register CONST char *p1, *p2;
+    CONST char *p1, *p2;
 
     for (i = 0, p1 = environ[i]; p1 != NULL; i++, p1 = environ[i]) {
        for (p2 = name; *p2 == *p1; p1++, p2++) {
@@ -230,8 +232,9 @@ FindVariable(name, lengthPtr)
  */
 
 char *
-TclGetEnv(name)
-    char *name;                        /* Name of desired environment variable. */
+TclGetEnv(
+    char *name                 /* Name of desired environment variable. */
+)
 {
     int i;
     size_t len;
@@ -274,10 +277,11 @@ TclGetEnv(name)
  */
 
 void
-TclSetEnv(name, value)
-    CONST char *name;          /* Name of variable whose value is to be
+TclSetEnv(
+    CONST char *name,          /* Name of variable whose value is to be
                                 * set. */
-    CONST char *value;         /* New value for variable. */
+    CONST char *value          /* New value for variable. */
+)
 {
     int index, length, nameLength;
     char *p;
@@ -376,9 +380,10 @@ TclSetEnv(name, value)
  */
 
 int
-Tcl_PutEnv(string)
-    CONST char *string;                /* Info about environment variable in the
+Tcl_PutEnv(
+    CONST char *string         /* Info about environment variable in the
                                 * form NAME=value. */
+)
 {
     int nameLength;
     char *name, *value;
@@ -429,8 +434,9 @@ Tcl_PutEnv(string)
  */
 
 void
-TclUnsetEnv(name)
-    CONST char *name;                  /* Name of variable to remove. */
+TclUnsetEnv(
+    CONST char *name                   /* Name of variable to remove. */
+)
 {
     int index, dummy;
     char **envPtr;
@@ -496,14 +502,15 @@ TclUnsetEnv(name)
 
        /* ARGSUSED */
 static char *
-EnvTraceProc(clientData, interp, name1, name2, flags)
-    ClientData clientData;     /* Not used. */
-    Tcl_Interp *interp;                /* Interpreter whose "env" variable is
+EnvTraceProc(
+    ClientData clientData,     /* Not used. */
+    Tcl_Interp *interp,                /* Interpreter whose "env" variable is
                                 * being modified. */
-    char *name1;               /* Better be "env". */
-    char *name2;               /* Name of variable being modified, or
+    char *name1,               /* Better be "env". */
+    char *name2,               /* Name of variable being modified, or
                                 * NULL if whole array is being deleted. */
-    int flags;                 /* Indicates what's happening. */
+    int flags                  /* Indicates what's happening. */
+)
 {
     /*
      * First see if the whole "env" variable is being deleted.  If
@@ -511,7 +518,7 @@ EnvTraceProc(clientData, interp, name1, name2, flags)
      */
 
     if (name2 == NULL) {
-       register EnvInterp *eiPtr, *prevPtr;
+       EnvInterp *eiPtr, *prevPtr;
 
        if ((flags & (TCL_TRACE_UNSETS|TCL_TRACE_DESTROYED))
                != (TCL_TRACE_UNSETS|TCL_TRACE_DESTROYED)) {
@@ -570,7 +577,7 @@ EnvTraceProc(clientData, interp, name1, name2, flags)
  */
 
 static void
-EnvInit()
+EnvInit(void)
 {
 #ifdef MAC_TCL
     environSize = TclMacCreateEnv();
@@ -615,8 +622,9 @@ EnvInit()
  */
 
 static void
-EnvExitProc(clientData)
-    ClientData clientData;             /* Not  used. */
+EnvExitProc(
+    ClientData clientData              /* Not  used. */
+)
 {
     char **p;
 
index acd224c009ccc4637db9901ee90d67a1258b885d..2f2bdaeadeae2b573b395c57717c336a2780429a 100644 (file)
@@ -329,17 +329,18 @@ static char *             VwaitVarProc _ANSI_ARGS_((ClientData clientData,
  */
 
 void
-Tcl_CreateFileHandler(file, mask, proc, clientData)
-    Tcl_File file;             /* Handle of stream to watch. */
-    int mask;                  /* OR'ed combination of TCL_READABLE,
+Tcl_CreateFileHandler(
+    Tcl_File file,             /* Handle of stream to watch. */
+    int mask,                  /* OR'ed combination of TCL_READABLE,
                                 * TCL_WRITABLE, and TCL_EXCEPTION:
                                 * indicates conditions under which
                                 * proc should be called. */
-    Tcl_FileProc *proc;                /* Procedure to call for each
+    Tcl_FileProc *proc,                /* Procedure to call for each
                                 * selected event. */
-    ClientData clientData;     /* Arbitrary data to pass to proc. */
+    ClientData clientData      /* Arbitrary data to pass to proc. */
+)
 {
-    register FileHandler *filePtr;
+    FileHandler *filePtr;
 
     if (!fileEventSourceCreated) {
        fileEventSourceCreated = 1;
@@ -397,9 +398,10 @@ Tcl_CreateFileHandler(file, mask, proc, clientData)
  */
 
 void
-Tcl_DeleteFileHandler(file)
-    Tcl_File file;             /* Stream id for which to remove
+Tcl_DeleteFileHandler(
+    Tcl_File file              /* Stream id for which to remove
                                 * callback procedure. */
+)
 {
     FileHandler *filePtr, *prevPtr;
 
@@ -449,8 +451,9 @@ Tcl_DeleteFileHandler(file)
 
        /* ARGSUSED */
 static void
-FileHandlerExitProc(clientData)
-    ClientData clientData;             /* Not used. */
+FileHandlerExitProc(
+    ClientData clientData              /* Not used. */
+)
 {
     Tcl_DeleteEventSource(FileHandlerSetupProc, FileHandlerCheckProc,
             (ClientData) NULL);
@@ -475,12 +478,13 @@ FileHandlerExitProc(clientData)
  */
 
 static void
-FileHandlerSetupProc(clientData, flags)
-    ClientData clientData;             /* Not used. */
-    int flags;                         /* Flags passed to Tk_DoOneEvent:
+FileHandlerSetupProc(
+    ClientData clientData,             /* Not used. */
+    int flags                          /* Flags passed to Tk_DoOneEvent:
                                         * if it doesn't include
                                         * TCL_FILE_EVENTS then we do
                                         * nothing. */
+)
 {
     FileHandler *filePtr;
 
@@ -515,12 +519,13 @@ FileHandlerSetupProc(clientData, flags)
  */
 
 static void
-FileHandlerCheckProc(clientData, flags)
-    ClientData clientData;             /* Not used. */
-    int flags;                         /* Flags passed to Tk_DoOneEvent:
+FileHandlerCheckProc(
+    ClientData clientData,             /* Not used. */
+    int flags                          /* Flags passed to Tk_DoOneEvent:
                                         * if it doesn't include 
                                         * TCL_FILE_EVENTS then we do
                                         * nothing. */
+)
 {
     FileHandler *filePtr;
     FileHandlerEvent *fileEvPtr;
@@ -566,10 +571,11 @@ FileHandlerCheckProc(clientData, flags)
  */
 
 static int
-FileHandlerEventProc(evPtr, flags)
-    Tcl_Event *evPtr;          /* Event to service. */
-    int flags;                 /* Flags that indicate what events to
+FileHandlerEventProc(
+    Tcl_Event *evPtr,          /* Event to service. */
+    int flags                  /* Flags that indicate what events to
                                 * handle, such as TCL_FILE_EVENTS. */
+)
 {
     FileHandler *filePtr;
     FileHandlerEvent *fileEvPtr = (FileHandlerEvent *) evPtr;
@@ -634,13 +640,14 @@ FileHandlerEventProc(evPtr, flags)
  */
 
 Tcl_TimerToken
-Tcl_CreateTimerHandler(milliseconds, proc, clientData)
-    int milliseconds;          /* How many milliseconds to wait
+Tcl_CreateTimerHandler(
+    int milliseconds,          /* How many milliseconds to wait
                                 * before invoking proc. */
-    Tcl_TimerProc *proc;       /* Procedure to invoke. */
-    ClientData clientData;     /* Arbitrary data to pass to proc. */
+    Tcl_TimerProc *proc,       /* Procedure to invoke. */
+    ClientData clientData      /* Arbitrary data to pass to proc. */
+)
 {
-    register TimerHandler *timerHandlerPtr, *tPtr2, *prevPtr;
+    TimerHandler *timerHandlerPtr, *tPtr2, *prevPtr;
     static int id = 0;
 
     if (!timerEventSourceCreated) {
@@ -715,11 +722,12 @@ Tcl_CreateTimerHandler(milliseconds, proc, clientData)
  */
 
 void
-Tcl_DeleteTimerHandler(token)
-    Tcl_TimerToken token;      /* Result previously returned by
+Tcl_DeleteTimerHandler(
+    Tcl_TimerToken token       /* Result previously returned by
                                 * Tcl_DeleteTimerHandler. */
+)
 {
-    register TimerHandler *timerHandlerPtr, *prevPtr;
+    TimerHandler *timerHandlerPtr, *prevPtr;
 
     for (timerHandlerPtr = firstTimerHandlerPtr, prevPtr = NULL;
            timerHandlerPtr != NULL; prevPtr = timerHandlerPtr,
@@ -756,11 +764,12 @@ Tcl_DeleteTimerHandler(token)
  */
 
 void
-Tcl_CreateModalTimeout(milliseconds, proc, clientData)
-    int milliseconds;          /* How many milliseconds to wait
+Tcl_CreateModalTimeout(
+    int milliseconds,          /* How many milliseconds to wait
                                 * before invoking proc. */
-    Tcl_TimerProc *proc;       /* Procedure to invoke. */
-    ClientData clientData;     /* Arbitrary data to pass to proc. */
+    Tcl_TimerProc *proc,       /* Procedure to invoke. */
+    ClientData clientData      /* Arbitrary data to pass to proc. */
+)
 {
     TimerHandler *timerHandlerPtr;
 
@@ -815,9 +824,10 @@ Tcl_CreateModalTimeout(milliseconds, proc, clientData)
  */
 
 void
-Tcl_DeleteModalTimeout(proc, clientData)
-    Tcl_TimerProc *proc;       /* Callback procedure for the timeout. */
-    ClientData clientData;     /* Arbitrary data to pass to proc. */
+Tcl_DeleteModalTimeout(
+    Tcl_TimerProc *proc,       /* Callback procedure for the timeout. */
+    ClientData clientData      /* Arbitrary data to pass to proc. */
+)
 {
     TimerHandler *timerHandlerPtr;
 
@@ -849,12 +859,13 @@ Tcl_DeleteModalTimeout(proc, clientData)
  */
 
 static void
-TimerHandlerSetupProc(clientData, flags)
-    ClientData clientData;             /* Not used. */
-    int flags;                         /* Flags passed to Tk_DoOneEvent:
+TimerHandlerSetupProc(
+    ClientData clientData,             /* Not used. */
+    int flags                          /* Flags passed to Tk_DoOneEvent:
                                         * if it doesn't include
                                         * TCL_TIMER_EVENTS then we only
                                         * consider modal timers. */
+)
 {
     TimerHandler *timerHandlerPtr, *tPtr2;
     Tcl_Time blockTime;
@@ -917,12 +928,13 @@ TimerHandlerSetupProc(clientData, flags)
  */
 
 static void
-TimerHandlerCheckProc(clientData, flags)
-    ClientData clientData;             /* Not used. */
-    int flags;                         /* Flags passed to Tk_DoOneEvent:
+TimerHandlerCheckProc(
+    ClientData clientData,             /* Not used. */
+    int flags                          /* Flags passed to Tk_DoOneEvent:
                                         * if it doesn't include 
                                         * TCL_TIMER_EVENTS then we only
                                         * consider modal timeouts. */
+)
 {
     TimerHandler *timerHandlerPtr;
     TimerEvent *timerEvPtr;
@@ -980,8 +992,9 @@ TimerHandlerCheckProc(clientData, flags)
 
        /* ARGSUSED */
 static void
-TimerHandlerExitProc(clientData)
-    ClientData clientData;             /* Not used. */
+TimerHandlerExitProc(
+    ClientData clientData              /* Not used. */
+)
 {
     Tcl_DeleteEventSource(TimerHandlerSetupProc, TimerHandlerCheckProc,
             (ClientData) NULL);
@@ -1010,10 +1023,11 @@ TimerHandlerExitProc(clientData)
  */
 
 static int
-TimerHandlerEventProc(evPtr, flags)
-    Tcl_Event *evPtr;          /* Event to service. */
-    int flags;                 /* Flags that indicate what events to
+TimerHandlerEventProc(
+    Tcl_Event *evPtr,          /* Event to service. */
+    int flags                  /* Flags that indicate what events to
                                 * handle, such as TCL_FILE_EVENTS. */
+)
 {
     TimerHandler *timerHandlerPtr;
     TimerEvent *timerEvPtr = (TimerEvent *) evPtr;
@@ -1083,11 +1097,12 @@ TimerHandlerEventProc(evPtr, flags)
  */
 
 void
-Tcl_DoWhenIdle(proc, clientData)
-    Tcl_IdleProc *proc;                /* Procedure to invoke. */
-    ClientData clientData;     /* Arbitrary value to pass to proc. */
+Tcl_DoWhenIdle(
+    Tcl_IdleProc *proc,                /* Procedure to invoke. */
+    ClientData clientData      /* Arbitrary value to pass to proc. */
+)
 {
-    register IdleHandler *idlePtr;
+    IdleHandler *idlePtr;
 
     idlePtr = (IdleHandler *) ckalloc(sizeof(IdleHandler));
     idlePtr->proc = proc;
@@ -1121,11 +1136,12 @@ Tcl_DoWhenIdle(proc, clientData)
  */
 
 void
-Tcl_CancelIdleCall(proc, clientData)
-    Tcl_IdleProc *proc;                /* Procedure that was previously registered. */
-    ClientData clientData;     /* Arbitrary value to pass to proc. */
+Tcl_CancelIdleCall(
+    Tcl_IdleProc *proc,                /* Procedure that was previously registered. */
+    ClientData clientData      /* Arbitrary value to pass to proc. */
+)
 {
-    register IdleHandler *idlePtr, *prevPtr;
+    IdleHandler *idlePtr, *prevPtr;
     IdleHandler *nextPtr;
 
     for (prevPtr = NULL, idlePtr = idleList; idlePtr != NULL;
@@ -1166,7 +1182,7 @@ Tcl_CancelIdleCall(proc, clientData)
  */
 
 int
-TclIdlePending()
+TclIdlePending(void)
 {
     return (idleList == NULL) ? 0 : 1;
 }
@@ -1189,7 +1205,7 @@ TclIdlePending()
  */
 
 int
-TclServiceIdle()
+TclServiceIdle(void)
 {
     IdleHandler *idlePtr;
     int oldGeneration;
@@ -1259,9 +1275,10 @@ TclServiceIdle()
  */
 
 void
-Tcl_BackgroundError(interp)
-    Tcl_Interp *interp;                /* Interpreter in which an error has
+Tcl_BackgroundError(
+    Tcl_Interp *interp         /* Interpreter in which an error has
                                 * occurred. */
+)
 {
     BgError *errPtr;
     char *varValue;
@@ -1339,8 +1356,9 @@ Tcl_BackgroundError(interp)
  */
 
 static void
-HandleBgErrors(clientData)
-    ClientData clientData;     /* Pointer to ErrAssocData structure. */
+HandleBgErrors(
+    ClientData clientData      /* Pointer to ErrAssocData structure. */
+)
 {
     Tcl_Interp *interp;
     char *command;
@@ -1458,9 +1476,10 @@ HandleBgErrors(clientData)
  */
 
 static void
-BgErrorDeleteProc(clientData, interp)
-    ClientData clientData;     /* Pointer to ErrAssocData structure. */
-    Tcl_Interp *interp;                /* Interpreter being deleted. */
+BgErrorDeleteProc(
+    ClientData clientData,     /* Pointer to ErrAssocData structure. */
+    Tcl_Interp *interp         /* Interpreter being deleted. */
+)
 {
     ErrAssocData *assocPtr = (ErrAssocData *) clientData;
     BgError *errPtr;
@@ -1496,9 +1515,10 @@ BgErrorDeleteProc(clientData, interp)
  */
 
 void
-Tcl_CreateExitHandler(proc, clientData)
-    Tcl_ExitProc *proc;                /* Procedure to invoke. */
-    ClientData clientData;     /* Arbitrary value to pass to proc. */
+Tcl_CreateExitHandler(
+    Tcl_ExitProc *proc,                /* Procedure to invoke. */
+    ClientData clientData      /* Arbitrary value to pass to proc. */
+)
 {
     ExitHandler *exitPtr;
 
@@ -1529,9 +1549,10 @@ Tcl_CreateExitHandler(proc, clientData)
  */
 
 void
-Tcl_DeleteExitHandler(proc, clientData)
-    Tcl_ExitProc *proc;                /* Procedure that was previously registered. */
-    ClientData clientData;     /* Arbitrary value to pass to proc. */
+Tcl_DeleteExitHandler(
+    Tcl_ExitProc *proc,                /* Procedure that was previously registered. */
+    ClientData clientData      /* Arbitrary value to pass to proc. */
+)
 {
     ExitHandler *exitPtr, *prevPtr;
 
@@ -1568,9 +1589,10 @@ Tcl_DeleteExitHandler(proc, clientData)
  */
 
 void
-Tcl_Exit(status)
-    int status;                        /* Exit status for application;  typically
+Tcl_Exit(
+    int status                 /* Exit status for application;  typically
                                 * 0 for normal return, 1 for error return. */
+)
 {
     ExitHandler *exitPtr;
 
@@ -1613,13 +1635,14 @@ Tcl_Exit(status)
 
        /* ARGSUSED */
 int
-Tcl_AfterCmd(clientData, interp, argc, argv)
-    ClientData clientData;     /* Points to the "tclAfter" assocData for
+Tcl_AfterCmd(
+    ClientData clientData,     /* Points to the "tclAfter" assocData for
                                 * this interpreter, or NULL if the assocData
                                 * hasn't been created yet.*/
-    Tcl_Interp *interp;                /* Current interpreter. */
-    int argc;                  /* Number of arguments. */
-    char **argv;               /* Argument strings. */
+    Tcl_Interp *interp,                /* Current interpreter. */
+    int argc,                  /* Number of arguments. */
+    char **argv                        /* Argument strings. */
+)
 {
     /*
      * The variable below is used to generate unique identifiers for
@@ -1809,11 +1832,12 @@ Tcl_AfterCmd(clientData, interp, argc, argv)
  */
 
 static AfterInfo *
-GetAfterEvent(assocPtr, string)
-    AfterAssocData *assocPtr;  /* Points to "after"-related information for
+GetAfterEvent(
+    AfterAssocData *assocPtr,  /* Points to "after"-related information for
                                 * this interpreter. */
-    char *string;              /* Textual identifier for after event, such
+    char *string               /* Textual identifier for after event, such
                                 * as "after#6". */
+)
 {
     AfterInfo *afterPtr;
     int id;
@@ -1857,8 +1881,9 @@ GetAfterEvent(assocPtr, string)
  */
 
 static void
-AfterProc(clientData)
-    ClientData clientData;     /* Describes command to execute. */
+AfterProc(
+    ClientData clientData      /* Describes command to execute. */
+)
 {
     AfterInfo *afterPtr = (AfterInfo *) clientData;
     AfterAssocData *assocPtr = afterPtr->assocPtr;
@@ -1923,8 +1948,9 @@ AfterProc(clientData)
  */
 
 static void
-FreeAfterPtr(afterPtr)
-    AfterInfo *afterPtr;               /* Command to be deleted. */
+FreeAfterPtr(
+    AfterInfo *afterPtr                        /* Command to be deleted. */
+)
 {
     AfterInfo *prevPtr;
     AfterAssocData *assocPtr = afterPtr->assocPtr;
@@ -1961,10 +1987,11 @@ FreeAfterPtr(afterPtr)
 
        /* ARGSUSED */
 static void
-AfterCleanupProc(clientData, interp)
-    ClientData clientData;     /* Points to AfterAssocData for the
+AfterCleanupProc(
+    ClientData clientData,     /* Points to AfterAssocData for the
                                 * interpreter. */
-    Tcl_Interp *interp;                /* Interpreter that is being deleted. */
+    Tcl_Interp *interp         /* Interpreter that is being deleted. */
+)
 {
     AfterAssocData *assocPtr = (AfterAssocData *) clientData;
     AfterInfo *afterPtr;
@@ -2002,11 +2029,12 @@ AfterCleanupProc(clientData, interp)
 
        /* ARGSUSED */
 int
-Tcl_VwaitCmd(clientData, interp, argc, argv)
-    ClientData clientData;     /* Not used. */
-    Tcl_Interp *interp;                /* Current interpreter. */
-    int argc;                  /* Number of arguments. */
-    char **argv;               /* Argument strings. */
+Tcl_VwaitCmd(
+    ClientData clientData,     /* Not used. */
+    Tcl_Interp *interp,                /* Current interpreter. */
+    int argc,                  /* Number of arguments. */
+    char **argv                        /* Argument strings. */
+)
 {
     int done, foundEvent;
 
@@ -2043,12 +2071,13 @@ Tcl_VwaitCmd(clientData, interp, argc, argv)
 
        /* ARGSUSED */
 static char *
-VwaitVarProc(clientData, interp, name1, name2, flags)
-    ClientData clientData;     /* Pointer to integer to set to 1. */
-    Tcl_Interp *interp;                /* Interpreter containing variable. */
-    char *name1;               /* Name of variable. */
-    char *name2;               /* Second part of variable name. */
-    int flags;                 /* Information about what happened. */
+VwaitVarProc(
+    ClientData clientData,     /* Pointer to integer to set to 1. */
+    Tcl_Interp *interp,                /* Interpreter containing variable. */
+    char *name1,               /* Name of variable. */
+    char *name2,               /* Second part of variable name. */
+    int flags                  /* Information about what happened. */
+)
 {
     int *donePtr = (int *) clientData;
 
@@ -2075,11 +2104,12 @@ VwaitVarProc(clientData, interp, name1, name2, flags)
 
        /* ARGSUSED */
 int
-Tcl_UpdateCmd(clientData, interp, argc, argv)
-    ClientData clientData;     /* Not used. */
-    Tcl_Interp *interp;                /* Current interpreter. */
-    int argc;                  /* Number of arguments. */
-    char **argv;               /* Argument strings. */
+Tcl_UpdateCmd(
+    ClientData clientData,     /* Not used. */
+    Tcl_Interp *interp,                /* Current interpreter. */
+    int argc,                  /* Number of arguments. */
+    char **argv                        /* Argument strings. */
+)
 {
     int flags = 0;             /* Initialization needed only to stop
                                 * compiler warnings. */
@@ -2137,16 +2167,17 @@ Tcl_UpdateCmd(clientData, interp, argc, argv)
  */
 
 int
-TclWaitForFile(file, mask, timeout)
-    Tcl_File file;             /* Handle for file on which to wait. */
-    int mask;                  /* What to wait for: OR'ed combination of
+TclWaitForFile(
+    Tcl_File file,             /* Handle for file on which to wait. */
+    int mask,                  /* What to wait for: OR'ed combination of
                                 * TCL_READABLE, TCL_WRITABLE, and
                                 * TCL_EXCEPTION. */
-    int timeout;               /* Maximum amount of time to wait for one
+    int timeout                        /* Maximum amount of time to wait for one
                                 * of the conditions in mask to occur, in
                                 * milliseconds.  A value of 0 means don't
                                 * wait at all, and a value of -1 means
                                 * wait forever. */
+)
 {
     Tcl_Time abortTime, now, blockTime;
     int present;
index f6ab338904e5957e9f2e70b95e2c7610d9ace674..85f4832d9b92da19c90b1b0e392f286cce7e3fee 100644 (file)
@@ -340,11 +340,12 @@ static BuiltinFunc funcTable[] = {
  */
 
 static int
-ExprParseString(interp, string, valuePtr)
-    Tcl_Interp *interp;                /* Where to store error message. */
-    char *string;              /* String to turn into value. */
-    Value *valuePtr;           /* Where to store value information. 
+ExprParseString(
+    Tcl_Interp *interp,                /* Where to store error message. */
+    char *string,              /* String to turn into value. */
+    Value *valuePtr            /* Where to store value information. 
                                 * Caller must have initialized pv field. */
+)
 {
     char *term, *p, *start;
 
@@ -454,16 +455,17 @@ ExprParseString(interp, string, valuePtr)
  */
 
 static int
-ExprLex(interp, infoPtr, valuePtr)
-    Tcl_Interp *interp;                        /* Interpreter to use for error
+ExprLex(
+    Tcl_Interp *interp,                        /* Interpreter to use for error
                                         * reporting. */
-    register ExprInfo *infoPtr;                /* Describes the state of the parse. */
-    register Value *valuePtr;          /* Where to store value, if that is
+    ExprInfo *infoPtr,         /* Describes the state of the parse. */
+    Value *valuePtr            /* Where to store value, if that is
                                         * what's parsed from string.  Caller
                                         * must have initialized pv field
                                         * correctly. */
+)
 {
-    register char *p;
+    char *p;
     char *var, *term;
     int result;
 
@@ -731,19 +733,20 @@ ExprLex(interp, infoPtr, valuePtr)
  */
 
 static int
-ExprGetValue(interp, infoPtr, prec, valuePtr)
-    Tcl_Interp *interp;                        /* Interpreter to use for error
+ExprGetValue(
+   Tcl_Interp *interp,                 /* Interpreter to use for error
                                         * reporting. */
-    register ExprInfo *infoPtr;                /* Describes the state of the parse
+    ExprInfo *infoPtr,         /* Describes the state of the parse
                                         * just before the value (i.e. ExprLex
                                         * will be called to get first token
                                         * of value). */
-    int prec;                          /* Treat any un-parenthesized operator
+    int prec,                          /* Treat any un-parenthesized operator
                                         * with precedence <= this as the end
                                         * of the expression. */
-    Value *valuePtr;                   /* Where to store the value of the
+    Value *valuePtr                    /* Where to store the value of the
                                         * expression.   Caller must have
                                         * initialized pv field. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     Value value2;                      /* Second operand for current
@@ -1339,10 +1342,11 @@ ExprGetValue(interp, infoPtr, prec, valuePtr)
  */
 
 static void
-ExprMakeString(interp, valuePtr)
-    Tcl_Interp *interp;                        /* Interpreter to use for precision
+ExprMakeString(
+    Tcl_Interp *interp,                        /* Interpreter to use for precision
                                         * information. */
-    register Value *valuePtr;          /* Value to be converted. */
+    Value *valuePtr            /* Value to be converted. */
+)
 {
     int shortfall;
 
@@ -1382,12 +1386,13 @@ ExprMakeString(interp, valuePtr)
  */
 
 static int
-ExprTopLevel(interp, string, valuePtr)
-    Tcl_Interp *interp;                        /* Context in which to evaluate the
+ExprTopLevel(
+    Tcl_Interp *interp,                        /* Context in which to evaluate the
                                         * expression. */
-    char *string;                      /* Expression to evaluate. */
-    Value *valuePtr;                   /* Where to store result.  Should
+    char *string,                      /* Expression to evaluate. */
+    Value *valuePtr                    /* Where to store result.  Should
                                         * not be initialized by caller. */
+)
 {
     ExprInfo info;
     int result;
@@ -1459,11 +1464,12 @@ ExprTopLevel(interp, string, valuePtr)
  */
 
 int
-Tcl_ExprLong(interp, string, ptr)
-    Tcl_Interp *interp;                        /* Context in which to evaluate the
+Tcl_ExprLong(
+    Tcl_Interp *interp,                        /* Context in which to evaluate the
                                         * expression. */
-    char *string;                      /* Expression to evaluate. */
-    long *ptr;                         /* Where to store result. */
+    char *string,                      /* Expression to evaluate. */
+    long *ptr                          /* Where to store result. */
+)
 {
     Value value;
     int result;
@@ -1486,11 +1492,12 @@ Tcl_ExprLong(interp, string, ptr)
 }
 
 int
-Tcl_ExprDouble(interp, string, ptr)
-    Tcl_Interp *interp;                        /* Context in which to evaluate the
+Tcl_ExprDouble(
+    Tcl_Interp *interp,                        /* Context in which to evaluate the
                                         * expression. */
-    char *string;                      /* Expression to evaluate. */
-    double *ptr;                       /* Where to store result. */
+    char *string,                      /* Expression to evaluate. */
+    double *ptr                                /* Where to store result. */
+)
 {
     Value value;
     int result;
@@ -1513,11 +1520,12 @@ Tcl_ExprDouble(interp, string, ptr)
 }
 
 int
-Tcl_ExprBoolean(interp, string, ptr)
-    Tcl_Interp *interp;                        /* Context in which to evaluate the
+Tcl_ExprBoolean(
+    Tcl_Interp *interp,                        /* Context in which to evaluate the
                                         * expression. */
-    char *string;                      /* Expression to evaluate. */
-    int *ptr;                          /* Where to store 0/1 result. */
+    char *string,                      /* Expression to evaluate. */
+    int *ptr                           /* Where to store 0/1 result. */
+)
 {
     Value value;
     int result;
@@ -1558,10 +1566,11 @@ Tcl_ExprBoolean(interp, string, ptr)
  */
 
 int
-Tcl_ExprString(interp, string)
-    Tcl_Interp *interp;                        /* Context in which to evaluate the
+Tcl_ExprString(
+    Tcl_Interp *interp,                        /* Context in which to evaluate the
                                         * expression. */
-    char *string;                      /* Expression to evaluate. */
+    char *string                       /* Expression to evaluate. */
+)
 {
     Value value;
     int result;
@@ -1607,18 +1616,19 @@ Tcl_ExprString(interp, string)
  */
 
 void
-Tcl_CreateMathFunc(interp, name, numArgs, argTypes, proc, clientData)
-    Tcl_Interp *interp;                        /* Interpreter in which function is
+Tcl_CreateMathFunc(
+    Tcl_Interp *interp,                        /* Interpreter in which function is
                                         * to be available. */
-    char *name;                                /* Name of function (e.g. "sin"). */
-    int numArgs;                       /* Nnumber of arguments required by
+    char *name,                                /* Name of function (e.g. "sin"). */
+    int numArgs,                       /* Nnumber of arguments required by
                                         * function. */
-    Tcl_ValueType *argTypes;           /* Array of types acceptable for
+    Tcl_ValueType *argTypes,           /* Array of types acceptable for
                                         * each argument. */
-    Tcl_MathProc *proc;                        /* Procedure that implements the
+    Tcl_MathProc *proc,                        /* Procedure that implements the
                                         * math function. */
-    ClientData clientData;             /* Additional value to pass to the
+    ClientData clientData              /* Additional value to pass to the
                                         * function. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     Tcl_HashEntry *hPtr;
@@ -1665,17 +1675,18 @@ Tcl_CreateMathFunc(interp, name, numArgs, argTypes, proc, clientData)
  */
 
 static int
-ExprMathFunc(interp, infoPtr, valuePtr)
-    Tcl_Interp *interp;                        /* Interpreter to use for error
+ExprMathFunc(
+    Tcl_Interp *interp,                        /* Interpreter to use for error
                                         * reporting. */
-    register ExprInfo *infoPtr;                /* Describes the state of the parse.
+    ExprInfo *infoPtr,         /* Describes the state of the parse.
                                         * infoPtr->expr must point to the
                                         * first character of the function's
                                         * name. */
-    register Value *valuePtr;          /* Where to store value, if that is
+    Value *valuePtr            /* Where to store value, if that is
                                         * what's parsed from string.  Caller
                                         * must have initialized pv field
                                         * correctly. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     MathFunc *mathFuncPtr;             /* Info about math function. */
@@ -1838,10 +1849,11 @@ ExprMathFunc(interp, infoPtr, valuePtr)
  */
 
 void
-TclExprFloatError(interp, value)
-    Tcl_Interp *interp;                /* Where to store error message. */
-    double value;              /* Value returned after error;  used to
+TclExprFloatError(
+    Tcl_Interp *interp,                /* Where to store error message. */
+    double value               /* Value returned after error;  used to
                                 * distinguish underflows from overflows. */
+)
 {
     char buf[20];
 
@@ -1888,13 +1900,14 @@ TclExprFloatError(interp, value)
  */
 
 static int
-ExprUnaryFunc(clientData, interp, args, resultPtr)
-    ClientData clientData;             /* Contains address of procedure that
+ExprUnaryFunc(
+    ClientData clientData,             /* Contains address of procedure that
                                         * takes one double argument and
                                         * returns a double result. */
-    Tcl_Interp *interp;
-    Tcl_Value *args;
-    Tcl_Value *resultPtr;
+    Tcl_Interp *interp,
+    Tcl_Value *args,
+    Tcl_Value *resultPtr
+)
 {
     double (*func) _ANSI_ARGS_((double)) = (double (*)_ANSI_ARGS_((double))) clientData;
 
@@ -1909,13 +1922,14 @@ ExprUnaryFunc(clientData, interp, args, resultPtr)
 }
 
 static int
-ExprBinaryFunc(clientData, interp, args, resultPtr)
-    ClientData clientData;             /* Contains address of procedure that
+ExprBinaryFunc(
+    ClientData clientData,             /* Contains address of procedure that
                                         * takes two double arguments and
                                         * returns a double result. */
-    Tcl_Interp *interp;
-    Tcl_Value *args;
-    Tcl_Value *resultPtr;
+    Tcl_Interp *interp,
+    Tcl_Value *args,
+    Tcl_Value *resultPtr
+)
 {
     double (*func) _ANSI_ARGS_((double, double))
        = (double (*)_ANSI_ARGS_((double, double))) clientData;
@@ -1932,11 +1946,12 @@ ExprBinaryFunc(clientData, interp, args, resultPtr)
 
        /* ARGSUSED */
 static int
-ExprAbsFunc(clientData, interp, args, resultPtr)
-    ClientData clientData;
-    Tcl_Interp *interp;
-    Tcl_Value *args;
-    Tcl_Value *resultPtr;
+ExprAbsFunc(
+    ClientData clientData,
+    Tcl_Interp *interp,
+    Tcl_Value *args,
+    Tcl_Value *resultPtr
+)
 {
     resultPtr->type = TCL_DOUBLE;
     if (args[0].type == TCL_DOUBLE) {
@@ -1965,11 +1980,12 @@ ExprAbsFunc(clientData, interp, args, resultPtr)
 
        /* ARGSUSED */
 static int
-ExprDoubleFunc(clientData, interp, args, resultPtr)
-    ClientData clientData;
-    Tcl_Interp *interp;
-    Tcl_Value *args;
-    Tcl_Value *resultPtr;
+ExprDoubleFunc(
+    ClientData clientData,
+    Tcl_Interp *interp,
+    Tcl_Value *args,
+    Tcl_Value *resultPtr
+)
 {
     resultPtr->type = TCL_DOUBLE;
     if (args[0].type == TCL_DOUBLE) {
@@ -1982,11 +1998,12 @@ ExprDoubleFunc(clientData, interp, args, resultPtr)
 
        /* ARGSUSED */
 static int
-ExprIntFunc(clientData, interp, args, resultPtr)
-    ClientData clientData;
-    Tcl_Interp *interp;
-    Tcl_Value *args;
-    Tcl_Value *resultPtr;
+ExprIntFunc(
+    ClientData clientData,
+    Tcl_Interp *interp,
+    Tcl_Value *args,
+    Tcl_Value *resultPtr
+)
 {
     resultPtr->type = TCL_INT;
     if (args[0].type == TCL_INT) {
@@ -2012,11 +2029,12 @@ ExprIntFunc(clientData, interp, args, resultPtr)
 
        /* ARGSUSED */
 static int
-ExprRoundFunc(clientData, interp, args, resultPtr)
-    ClientData clientData;
-    Tcl_Interp *interp;
-    Tcl_Value *args;
-    Tcl_Value *resultPtr;
+ExprRoundFunc(
+    ClientData clientData,
+    Tcl_Interp *interp,
+    Tcl_Value *args,
+    Tcl_Value *resultPtr
+)
 {
     resultPtr->type = TCL_INT;
     if (args[0].type == TCL_INT) {
@@ -2063,8 +2081,9 @@ ExprRoundFunc(clientData, interp, args, resultPtr)
  */
 
 static int
-ExprLooksLikeInt(p)
-    char *p;                   /* Pointer to string. */
+ExprLooksLikeInt(
+    char *p                    /* Pointer to string. */
+)
 {
     while (isspace(UCHAR(*p))) {
        p++;
index d77882d023c63e4092a4faf3b6f0ef6719053435..f6794beea3e832a61579ba069e67f4f3d0a7b127 100644 (file)
@@ -85,9 +85,10 @@ static void          FileExitProc _ANSI_ARGS_((ClientData clientData));
  */
 
 Tcl_File
-Tcl_GetFile(osHandle, type)
-    ClientData osHandle;       /* Platform specific file handle. */
-    int type;                  /* Type of file handle. */
+Tcl_GetFile(
+    ClientData osHandle,       /* Platform specific file handle. */
+    int type                   /* Type of file handle. */
+)
 {
     FileHashKey key;
     Tcl_HashEntry *entryPtr;
@@ -130,8 +131,9 @@ Tcl_GetFile(osHandle, type)
  */
 
 void
-Tcl_FreeFile(handle)
-    Tcl_File handle;
+Tcl_FreeFile(
+    Tcl_File handle
+)
 {
     Tcl_HashEntry *entryPtr;
     FileHandle *handlePtr = (FileHandle *) handle;
@@ -170,9 +172,10 @@ Tcl_FreeFile(handle)
  */
 
 ClientData
-Tcl_GetFileInfo(handle, typePtr)
-    Tcl_File handle;
-    int *typePtr;
+Tcl_GetFileInfo(
+    Tcl_File handle,
+    int *typePtr
+)
 {
     FileHandle *handlePtr = (FileHandle *) handle;
 
@@ -201,10 +204,11 @@ Tcl_GetFileInfo(handle, typePtr)
  */
 
 void
-Tcl_SetNotifierData(handle, proc, data)
-    Tcl_File handle;
-    Tcl_FileFreeProc *proc;
-    ClientData data;
+Tcl_SetNotifierData(
+    Tcl_File handle,
+    Tcl_FileFreeProc *proc,
+    ClientData data
+)
 {
     FileHandle *handlePtr = (FileHandle *) handle;
     handlePtr->proc = proc;
@@ -231,9 +235,10 @@ Tcl_SetNotifierData(handle, proc, data)
  */
 
 ClientData
-Tcl_GetNotifierData(handle, procPtr)
-    Tcl_File handle;
-    Tcl_FileFreeProc **procPtr;
+Tcl_GetNotifierData(
+    Tcl_File handle,
+    Tcl_FileFreeProc **procPtr
+)
 {
     FileHandle *handlePtr = (FileHandle *) handle;
     if (procPtr != NULL) {
@@ -260,8 +265,9 @@ Tcl_GetNotifierData(handle, procPtr)
  */
 
 static void
-FileExitProc(clientData)
-    ClientData clientData;     /* Not used. */
+FileExitProc(
+    ClientData clientData      /* Not used. */
+)
 {
     Tcl_HashSearch search;
     Tcl_HashEntry *entryPtr;
index 444ad93ff78436976f3ad1d47c9b150181866082..f9ffbbdfdea32b36711059bce61adc5b825b9a9f 100644 (file)
@@ -113,8 +113,9 @@ static char *               SplitUnixPath _ANSI_ARGS_((char *path,
  */
 
 static void
-FileNameCleanup(clientData)
-    ClientData clientData;     /* Not used. */
+FileNameCleanup(
+    ClientData clientData      /* Not used. */
+)
 {
     if (winRootPatternPtr != NULL) {
        ckfree((char *)winRootPatternPtr);
@@ -145,11 +146,12 @@ FileNameCleanup(clientData)
  */
 
 static char *
-ExtractWinRoot(path, resultPtr, offset)
-    char *path;                        /* Path to parse. */
-    Tcl_DString *resultPtr;    /* Buffer to hold result. */
-    int offset;                        /* Offset in buffer where result should be
+ExtractWinRoot(
+    char *path,                        /* Path to parse. */
+    Tcl_DString *resultPtr,    /* Buffer to hold result. */
+    int offset                 /* Offset in buffer where result should be
                                 * stored. */
+)
 {
     int length;
 
@@ -214,8 +216,9 @@ ExtractWinRoot(path, resultPtr, offset)
  */
 
 Tcl_PathType
-Tcl_GetPathType(path)
-    char *path;
+Tcl_GetPathType(
+    char *path
+)
 {
     Tcl_PathType type = TCL_PATH_ABSOLUTE;
 
@@ -311,12 +314,13 @@ Tcl_GetPathType(path)
  */
 
 void
-Tcl_SplitPath(path, argcPtr, argvPtr)
-    char *path;                        /* Pointer to string containing a path. */
-    int *argcPtr;              /* Pointer to location to fill in with
+Tcl_SplitPath(
+    char *path,                        /* Pointer to string containing a path. */
+    int *argcPtr,              /* Pointer to location to fill in with
                                 * the number of elements in the path. */
-    char ***argvPtr;           /* Pointer to place to store pointer to array
+    char ***argvPtr            /* Pointer to place to store pointer to array
                                 * of pointers to path elements. */
+)
 {
     int i, size;
     char *p;
@@ -404,9 +408,10 @@ Tcl_SplitPath(path, argcPtr, argvPtr)
  */
 
 static char *
-SplitUnixPath(path, bufPtr)
-    char *path;                        /* Pointer to string containing a path. */
-    Tcl_DString *bufPtr;       /* Pointer to DString to use for the result. */
+SplitUnixPath(
+    char *path,                        /* Pointer to string containing a path. */
+    Tcl_DString *bufPtr                /* Pointer to DString to use for the result. */
+)
 {
     int length;
     char *p, *elementStart;
@@ -466,9 +471,10 @@ SplitUnixPath(path, bufPtr)
  */
 
 static char *
-SplitWinPath(path, bufPtr)
-    char *path;                        /* Pointer to string containing a path. */
-    Tcl_DString *bufPtr;       /* Pointer to DString to use for the result. */
+SplitWinPath(
+    char *path,                        /* Pointer to string containing a path. */
+    Tcl_DString *bufPtr                /* Pointer to DString to use for the result. */
+)
 {
     int length;
     char *p, *elementStart;
@@ -524,9 +530,10 @@ SplitWinPath(path, bufPtr)
  */
 
 static char *
-SplitMacPath(path, bufPtr)
-    char *path;                        /* Pointer to string containing a path. */
-    Tcl_DString *bufPtr;       /* Pointer to DString to use for the result. */
+SplitMacPath(
+    char *path,                        /* Pointer to string containing a path. */
+    Tcl_DString *bufPtr                /* Pointer to DString to use for the result. */
+)
 {
     int isMac = 0;             /* 1 if is Mac-style, 0 if Unix-style path. */
     int i, length;
@@ -703,10 +710,11 @@ SplitMacPath(path, bufPtr)
  */
 
 char *
-Tcl_JoinPath(argc, argv, resultPtr)
-    int argc;
-    char **argv;
-    Tcl_DString *resultPtr;    /* Pointer to previously initialized DString. */
+Tcl_JoinPath(
+    int argc,
+    char **argv,
+    Tcl_DString *resultPtr     /* Pointer to previously initialized DString. */
+)
 {
     int oldLength, length, i, needsSep;
     Tcl_DString buffer;
@@ -927,18 +935,19 @@ Tcl_JoinPath(argc, argv, resultPtr)
  *---------------------------------------------------------------------- */
 
 char *
-Tcl_TranslateFileName(interp, name, bufferPtr)
-    Tcl_Interp *interp;                /* Interpreter in which to store error
+Tcl_TranslateFileName(
+    Tcl_Interp *interp,                /* Interpreter in which to store error
                                 * message (if necessary). */
-    char *name;                        /* File name, which may begin with "~"
+    char *name,                        /* File name, which may begin with "~"
                                 * (to indicate current user's home directory)
                                 * or "~<user>" (to indicate any user's
                                 * home directory). */
-    Tcl_DString *bufferPtr;    /* May be used to hold result.  Must not hold
+    Tcl_DString *bufferPtr     /* May be used to hold result.  Must not hold
                                 * anything at the time of the call, and need
                                 * not even be initialized. */
+)
 {
-    register char *p;
+    char *p;
 
     /*
      * Handle tilde substitutions, if needed.
@@ -1011,8 +1020,9 @@ Tcl_TranslateFileName(interp, name, bufferPtr)
  */
 
 char *
-TclGetExtension(name)
-    char *name;                        /* File name to parse. */
+TclGetExtension(
+    char *name                 /* File name to parse. */
+)
 {
     char *p, *lastSep;
 
@@ -1073,14 +1083,15 @@ TclGetExtension(name)
  */
 
 static char *
-DoTildeSubst(interp, user, resultPtr)
-    Tcl_Interp *interp;                /* Interpreter in which to store error
+DoTildeSubst(
+    Tcl_Interp *interp,                /* Interpreter in which to store error
                                 * message (if necessary). */
-    char *user;                        /* Name of user whose home directory should be
+    char *user,                        /* Name of user whose home directory should be
                                 * substituted, or "" for current user. */
-    Tcl_DString *resultPtr;    /* May be used to hold result.  Must not hold
+    Tcl_DString *resultPtr     /* May be used to hold result.  Must not hold
                                 * anything at the time of the call, and need
                                 * not even be initialized. */
+)
 {
     char *dir;
 
@@ -1127,11 +1138,12 @@ DoTildeSubst(interp, user, resultPtr)
 
        /* ARGSUSED */
 int
-Tcl_GlobCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_GlobCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int i, noComplain, firstArg;
     char c;
@@ -1283,12 +1295,13 @@ done:
  */
 
 static int
-SkipToChar(stringPtr, match)
-    char **stringPtr;                  /* Pointer string to check. */
-    char *match;                       /* Pointer to character to find. */
+SkipToChar(
+    char **stringPtr,                  /* Pointer string to check. */
+    char *match                                /* Pointer to character to find. */
+)
 {
     int quoted, level;
-    register char *p;
+    char *p;
 
     quoted = 0;
     level = 0;
@@ -1338,14 +1351,15 @@ SkipToChar(stringPtr, match)
  */
 
 int
-TclDoGlob(interp, separators, headPtr, tail)
-    Tcl_Interp *interp;                /* Interpreter to use for error reporting
+TclDoGlob(
+    Tcl_Interp *interp,                /* Interpreter to use for error reporting
                                 * (e.g. unmatched brace). */
-    char *separators;          /* String containing separator characters
+    char *separators,          /* String containing separator characters
                                 * that should be used to identify globbing
                                 * boundaries. */
-    Tcl_DString *headPtr;      /* Completely expanded prefix. */
-    char *tail;                        /* The unexpanded remainder of the path. */
+    Tcl_DString *headPtr,      /* Completely expanded prefix. */
+    char *tail                 /* The unexpanded remainder of the path. */
+)
 {
     int level, baseLength, quoted, count;
     int result = TCL_OK;
index be9a4759e845691a0a2640ed107039f14bec9cab..38954ac7a3eaeb5c09b59fff47bd1b5bbe6a6f01 100644 (file)
  */
 
 int
-Tcl_GetInt(interp, string, intPtr)
-    Tcl_Interp *interp;                /* Interpreter to use for error reporting. */
-    char *string;              /* String containing a (possibly signed)
+Tcl_GetInt(
+    Tcl_Interp *interp,                /* Interpreter to use for error reporting. */
+    char *string,              /* String containing a (possibly signed)
                                 * integer in a form acceptable to strtol. */
-    int *intPtr;               /* Place to store converted result. */
+    int *intPtr                        /* Place to store converted result. */
+)
 {
     char *end, *p;
     int i;
@@ -136,11 +137,12 @@ Tcl_GetInt(interp, string, intPtr)
  */
 
 int
-Tcl_GetDouble(interp, string, doublePtr)
-    Tcl_Interp *interp;                /* Interpreter to use for error reporting. */
-    char *string;              /* String containing a floating-point number
+Tcl_GetDouble(
+    Tcl_Interp *interp,                /* Interpreter to use for error reporting. */
+    char *string,              /* String containing a floating-point number
                                 * in a form acceptable to strtod. */
-    double *doublePtr;         /* Place to store converted result. */
+    double *doublePtr          /* Place to store converted result. */
+)
 {
     char *end;
     double d;
@@ -193,13 +195,14 @@ Tcl_GetDouble(interp, string, doublePtr)
  */
 
 int
-Tcl_GetBoolean(interp, string, boolPtr)
-    Tcl_Interp *interp;                /* Interpreter to use for error reporting. */
-    char *string;              /* String containing a boolean number
+Tcl_GetBoolean(
+    Tcl_Interp *interp,                /* Interpreter to use for error reporting. */
+    char *string,              /* String containing a boolean number
                                 * specified either as 1/0 or true/false or
                                 * yes/no. */
-    int *boolPtr;              /* Place to store converted result, which
+    int *boolPtr               /* Place to store converted result, which
                                 * will be 0 or 1. */
+)
 {
     int i;
     char lowerCase[10], c;
index 672f784eda6b659a5322d3da2b79aa91ad1fcd4e..646f11d5ef3254a6691d9300e0170256b5b2c63a 100644 (file)
@@ -99,12 +99,13 @@ static Tcl_HashEntry *      OneWordCreate _ANSI_ARGS_((Tcl_HashTable *tablePtr,
  */
 
 void
-Tcl_InitHashTable(tablePtr, keyType)
-    register Tcl_HashTable *tablePtr;  /* Pointer to table record, which
+Tcl_InitHashTable(
+    Tcl_HashTable *tablePtr,   /* Pointer to table record, which
                                         * is supplied by the caller. */
-    int keyType;                       /* Type of keys to use in table:
+    int keyType                                /* Type of keys to use in table:
                                         * TCL_STRING_KEYS, TCL_ONE_WORD_KEYS,
                                         * or an integer >= 2. */
+)
 {
     tablePtr->buckets = tablePtr->staticBuckets;
     tablePtr->staticBuckets[0] = tablePtr->staticBuckets[1] = 0;
@@ -147,10 +148,11 @@ Tcl_InitHashTable(tablePtr, keyType)
  */
 
 void
-Tcl_DeleteHashEntry(entryPtr)
-    Tcl_HashEntry *entryPtr;
+Tcl_DeleteHashEntry(
+    Tcl_HashEntry *entryPtr
+)
 {
-    register Tcl_HashEntry *prevPtr;
+    Tcl_HashEntry *prevPtr;
 
     if (*entryPtr->bucketPtr == entryPtr) {
        *entryPtr->bucketPtr = entryPtr->nextPtr;
@@ -187,10 +189,11 @@ Tcl_DeleteHashEntry(entryPtr)
  */
 
 void
-Tcl_DeleteHashTable(tablePtr)
-    register Tcl_HashTable *tablePtr;          /* Table to delete. */
+Tcl_DeleteHashTable(
+    Tcl_HashTable *tablePtr            /* Table to delete. */
+)
 {
-    register Tcl_HashEntry *hPtr, *nextPtr;
+    Tcl_HashEntry *hPtr, *nextPtr;
     int i;
 
     /*
@@ -246,10 +249,11 @@ Tcl_DeleteHashTable(tablePtr)
  */
 
 Tcl_HashEntry *
-Tcl_FirstHashEntry(tablePtr, searchPtr)
-    Tcl_HashTable *tablePtr;           /* Table to search. */
-    Tcl_HashSearch *searchPtr;         /* Place to store information about
+Tcl_FirstHashEntry(
+    Tcl_HashTable *tablePtr,           /* Table to search. */
+    Tcl_HashSearch *searchPtr          /* Place to store information about
                                         * progress through the table. */
+)
 {
     searchPtr->tablePtr = tablePtr;
     searchPtr->nextIndex = 0;
@@ -277,11 +281,12 @@ Tcl_FirstHashEntry(tablePtr, searchPtr)
  */
 
 Tcl_HashEntry *
-Tcl_NextHashEntry(searchPtr)
-    register Tcl_HashSearch *searchPtr;        /* Place to store information about
+Tcl_NextHashEntry(
+    Tcl_HashSearch *searchPtr  /* Place to store information about
                                         * progress through the table.  Must
                                         * have been initialized by calling
                                         * Tcl_FirstHashEntry. */
+)
 {
     Tcl_HashEntry *hPtr;
 
@@ -318,13 +323,14 @@ Tcl_NextHashEntry(searchPtr)
  */
 
 char *
-Tcl_HashStats(tablePtr)
-    Tcl_HashTable *tablePtr;           /* Table for which to produce stats. */
+Tcl_HashStats(
+    Tcl_HashTable *tablePtr            /* Table for which to produce stats. */
+)
 {
 #define NUM_COUNTERS 10
     int count[NUM_COUNTERS], overflow, i, j;
     double average, tmp;
-    register Tcl_HashEntry *hPtr;
+    Tcl_HashEntry *hPtr;
     char *result, *p;
 
     /*
@@ -389,11 +395,12 @@ Tcl_HashStats(tablePtr)
  */
 
 static unsigned int
-HashString(string)
-    register char *string;     /* String from which to compute hash value. */
+HashString(
+    char *string       /* String from which to compute hash value. */
+)
 {
-    register unsigned int result;
-    register int c;
+    unsigned int result;
+    int c;
 
     /*
      * I tried a zillion different hash functions and asked many other
@@ -442,12 +449,13 @@ HashString(string)
  */
 
 static Tcl_HashEntry *
-StringFind(tablePtr, key)
-    Tcl_HashTable *tablePtr;   /* Table in which to lookup entry. */
-    char *key;                 /* Key to use to find matching entry. */
+StringFind(
+    Tcl_HashTable *tablePtr,   /* Table in which to lookup entry. */
+    char *key                  /* Key to use to find matching entry. */
+)
 {
-    register Tcl_HashEntry *hPtr;
-    register char *p1, *p2;
+    Tcl_HashEntry *hPtr;
+    char *p1, *p2;
     int index;
 
     index = HashString(key) & tablePtr->mask;
@@ -492,15 +500,16 @@ StringFind(tablePtr, key)
  */
 
 static Tcl_HashEntry *
-StringCreate(tablePtr, key, newPtr)
-    Tcl_HashTable *tablePtr;   /* Table in which to lookup entry. */
-    char *key;                 /* Key to use to find or create matching
+StringCreate(
+    Tcl_HashTable *tablePtr,   /* Table in which to lookup entry. */
+    char *key,                 /* Key to use to find or create matching
                                 * entry. */
-    int *newPtr;               /* Store info here telling whether a new
+    int *newPtr                        /* Store info here telling whether a new
                                 * entry was created. */
+)
 {
-    register Tcl_HashEntry *hPtr;
-    register char *p1, *p2;
+    Tcl_HashEntry *hPtr;
+    char *p1, *p2;
     int index;
 
     index = HashString(key) & tablePtr->mask;
@@ -567,11 +576,12 @@ StringCreate(tablePtr, key, newPtr)
  */
 
 static Tcl_HashEntry *
-OneWordFind(tablePtr, key)
-    Tcl_HashTable *tablePtr;   /* Table in which to lookup entry. */
-    register char *key;                /* Key to use to find matching entry. */
+OneWordFind(
+    Tcl_HashTable *tablePtr,   /* Table in which to lookup entry. */
+    char *key          /* Key to use to find matching entry. */
+)
 {
-    register Tcl_HashEntry *hPtr;
+    Tcl_HashEntry *hPtr;
     int index;
 
     index = RANDOM_INDEX(tablePtr, key);
@@ -611,14 +621,15 @@ OneWordFind(tablePtr, key)
  */
 
 static Tcl_HashEntry *
-OneWordCreate(tablePtr, key, newPtr)
-    Tcl_HashTable *tablePtr;   /* Table in which to lookup entry. */
-    register char *key;                /* Key to use to find or create matching
+OneWordCreate(
+    Tcl_HashTable *tablePtr,   /* Table in which to lookup entry. */
+    char *key,         /* Key to use to find or create matching
                                 * entry. */
-    int *newPtr;               /* Store info here telling whether a new
+    int *newPtr                        /* Store info here telling whether a new
                                 * entry was created. */
+)
 {
-    register Tcl_HashEntry *hPtr;
+    Tcl_HashEntry *hPtr;
     int index;
 
     index = RANDOM_INDEX(tablePtr, key);
@@ -679,13 +690,14 @@ OneWordCreate(tablePtr, key, newPtr)
  */
 
 static Tcl_HashEntry *
-ArrayFind(tablePtr, key)
-    Tcl_HashTable *tablePtr;   /* Table in which to lookup entry. */
-    char *key;                 /* Key to use to find matching entry. */
+ArrayFind(
+    Tcl_HashTable *tablePtr,   /* Table in which to lookup entry. */
+    char *key                  /* Key to use to find matching entry. */
+)
 {
-    register Tcl_HashEntry *hPtr;
+    Tcl_HashEntry *hPtr;
     int *arrayPtr = (int *) key;
-    register int *iPtr1, *iPtr2;
+    int *iPtr1, *iPtr2;
     int index, count;
 
     for (index = 0, count = tablePtr->keyType, iPtr1 = arrayPtr;
@@ -735,16 +747,17 @@ ArrayFind(tablePtr, key)
  */
 
 static Tcl_HashEntry *
-ArrayCreate(tablePtr, key, newPtr)
-    Tcl_HashTable *tablePtr;   /* Table in which to lookup entry. */
-    register char *key;                /* Key to use to find or create matching
+ArrayCreate(
+    Tcl_HashTable *tablePtr,   /* Table in which to lookup entry. */
+    char *key,         /* Key to use to find or create matching
                                 * entry. */
-    int *newPtr;               /* Store info here telling whether a new
+    int *newPtr                        /* Store info here telling whether a new
                                 * entry was created. */
+)
 {
-    register Tcl_HashEntry *hPtr;
+    Tcl_HashEntry *hPtr;
     int *arrayPtr = (int *) key;
-    register int *iPtr1, *iPtr2;
+    int *iPtr1, *iPtr2;
     int index, count;
 
     for (index = 0, count = tablePtr->keyType, iPtr1 = arrayPtr;
@@ -820,9 +833,10 @@ ArrayCreate(tablePtr, key, newPtr)
 
        /* ARGSUSED */
 static Tcl_HashEntry *
-BogusFind(tablePtr, key)
-    Tcl_HashTable *tablePtr;   /* Table in which to lookup entry. */
-    char *key;                 /* Key to use to find matching entry. */
+BogusFind(
+    Tcl_HashTable *tablePtr,   /* Table in which to lookup entry. */
+    char *key                  /* Key to use to find matching entry. */
+)
 {
     panic("called Tcl_FindHashEntry on deleted table");
     return NULL;
@@ -848,12 +862,13 @@ BogusFind(tablePtr, key)
 
        /* ARGSUSED */
 static Tcl_HashEntry *
-BogusCreate(tablePtr, key, newPtr)
-    Tcl_HashTable *tablePtr;   /* Table in which to lookup entry. */
-    char *key;                 /* Key to use to find or create matching
+BogusCreate(
+    Tcl_HashTable *tablePtr,   /* Table in which to lookup entry. */
+    char *key,                 /* Key to use to find or create matching
                                 * entry. */
-    int *newPtr;               /* Store info here telling whether a new
+    int *newPtr                        /* Store info here telling whether a new
                                 * entry was created. */
+)
 {
     panic("called Tcl_CreateHashEntry on deleted table");
     return NULL;
@@ -880,13 +895,14 @@ BogusCreate(tablePtr, key, newPtr)
  */
 
 static void
-RebuildTable(tablePtr)
-    register Tcl_HashTable *tablePtr;  /* Table to enlarge. */
+RebuildTable(
+    Tcl_HashTable *tablePtr    /* Table to enlarge. */
+)
 {
     int oldSize, count, index;
     Tcl_HashEntry **oldBuckets;
-    register Tcl_HashEntry **oldChainPtr, **newChainPtr;
-    register Tcl_HashEntry *hPtr;
+    Tcl_HashEntry **oldChainPtr, **newChainPtr;
+    Tcl_HashEntry *hPtr;
 
     oldSize = tablePtr->numBuckets;
     oldBuckets = tablePtr->buckets;
@@ -919,7 +935,7 @@ RebuildTable(tablePtr)
            } else if (tablePtr->keyType == TCL_ONE_WORD_KEYS) {
                index = RANDOM_INDEX(tablePtr, hPtr->key.oneWordValue);
            } else {
-               register int *iPtr;
+               int *iPtr;
                int count;
 
                for (index = 0, count = tablePtr->keyType,
index 4f605bd9512db0032ec834cd026f8c7a8e721133..374c5bc1ed2ad648142056b41795f7d20aad2d86 100644 (file)
@@ -138,8 +138,9 @@ static int          SubsAndEval _ANSI_ARGS_((Interp *iPtr, char *cmd,
  */
 
 static void
-InitHistory(iPtr)
-    register Interp *iPtr;             /* Interpreter to initialize. */
+InitHistory(
+    Interp *iPtr               /* Interpreter to initialize. */
+)
 {
     int i;
 
@@ -182,17 +183,18 @@ InitHistory(iPtr)
  */
 
 int
-Tcl_RecordAndEval(interp, cmd, flags)
-    Tcl_Interp *interp;                /* Token for interpreter in which command
+Tcl_RecordAndEval(
+    Tcl_Interp *interp,                /* Token for interpreter in which command
                                 * will be executed. */
-    char *cmd;                 /* Command to record. */
-    int flags;                 /* Additional flags.  TCL_NO_EVAL means
+    char *cmd,                 /* Command to record. */
+    int flags                  /* Additional flags.  TCL_NO_EVAL means
                                 * only record: don't execute command.
                                 * TCL_EVAL_GLOBAL means use Tcl_GlobalEval
                                 * instead of Tcl_Eval. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
-    register HistoryEvent *eventPtr;
+    Interp *iPtr = (Interp *) interp;
+    HistoryEvent *eventPtr;
     int length, result;
 
     if (iPtr->numEvents == 0) {
@@ -273,14 +275,15 @@ Tcl_RecordAndEval(interp, cmd, flags)
 
        /* ARGSUSED */
 int
-Tcl_HistoryCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_HistoryCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
-    register HistoryEvent *eventPtr;
+    Interp *iPtr = (Interp *) interp;
+    HistoryEvent *eventPtr;
     size_t length;
     int c;
 
@@ -554,9 +557,10 @@ Tcl_HistoryCmd(dummy, interp, argc, argv)
  */
 
 static void
-MakeSpace(hPtr, size)
-    HistoryEvent *hPtr;
-    int size;                  /* # of bytes needed in hPtr. */
+MakeSpace(
+    HistoryEvent *hPtr,
+    int size                   /* # of bytes needed in hPtr. */
+)
 {
     if (hPtr->bytesAvl < size) {
        ckfree(hPtr->command);
@@ -585,12 +589,13 @@ MakeSpace(hPtr, size)
  */
 
 static void
-InsertRev(iPtr, revPtr)
-    Interp *iPtr;                      /* Interpreter to use. */
-    register HistoryRev *revPtr;       /* Revision to add to iPtr's list. */
+InsertRev(
+    Interp *iPtr,                      /* Interpreter to use. */
+    HistoryRev *revPtr         /* Revision to add to iPtr's list. */
+)
 {
-    register HistoryRev *curPtr;
-    register HistoryRev *prevPtr;
+    HistoryRev *curPtr;
+    HistoryRev *prevPtr;
 
     for (curPtr = iPtr->revPtr, prevPtr = NULL; curPtr != NULL;
            prevPtr = curPtr, curPtr = curPtr->nextPtr) {
@@ -653,12 +658,13 @@ InsertRev(iPtr, revPtr)
  */
 
 static void
-RevCommand(iPtr, string)
-    register Interp *iPtr;     /* Interpreter in which to perform the
+RevCommand(
+    Interp *iPtr,      /* Interpreter in which to perform the
                                 * substitution. */
-    char *string;              /* String to substitute. */
+    char *string               /* String to substitute. */
+)
 {
-    register HistoryRev *revPtr;
+    HistoryRev *revPtr;
 
     if ((iPtr->evalFirst == NULL) || (iPtr->revDisables > 0)) {
        return;
@@ -691,12 +697,13 @@ RevCommand(iPtr, string)
  */
 
 static void
-RevResult(iPtr, string)
-    register Interp *iPtr;     /* Interpreter in which to perform the
+RevResult(
+    Interp *iPtr,      /* Interpreter in which to perform the
                                 * substitution. */
-    char *string;              /* String to substitute. */
+    char *string               /* String to substitute. */
+)
 {
-    register HistoryRev *revPtr;
+    HistoryRev *revPtr;
     char *evalFirst, *evalLast;
     char *argv[2];
 
@@ -757,12 +764,13 @@ RevResult(iPtr, string)
  */
 
 static void
-DoRevs(iPtr)
-    register Interp *iPtr;     /* Interpreter whose history is to
+DoRevs(
+    Interp *iPtr       /* Interpreter whose history is to
                                 * be modified. */
+)
 {
-    register HistoryRev *revPtr;
-    register HistoryEvent *eventPtr;
+    HistoryRev *revPtr;
+    HistoryEvent *eventPtr;
     char *newCommand, *p;
     unsigned int size;
     int bytesSeen, count;
@@ -835,12 +843,13 @@ DoRevs(iPtr)
  */
 
 static HistoryEvent *
-GetEvent(iPtr, string)
-    register Interp *iPtr;     /* Interpreter in which to look. */
-    char *string;              /* Description of event. */
+GetEvent(
+    Interp *iPtr,      /* Interpreter in which to look. */
+    char *string               /* Description of event. */
+)
 {
     int eventNum, index;
-    register HistoryEvent *eventPtr;
+    HistoryEvent *eventPtr;
     int length;
 
     /*
@@ -917,12 +926,13 @@ GetEvent(iPtr, string)
  */
 
 static int
-SubsAndEval(iPtr, cmd, old, new)
-    register Interp *iPtr;     /* Interpreter in which to execute
+SubsAndEval(
+    Interp *iPtr,      /* Interpreter in which to execute
                                 * new command. */
-    char *cmd;                 /* Command in which to substitute. */
-    char *old;                 /* String to search for in command. */
-    char *new;                 /* Replacement string for "old". */
+    char *cmd,                 /* Command in which to substitute. */
+    char *old,                 /* String to search for in command. */
+    char *new                  /* Replacement string for "old". */
+)
 {
     char *src, *dst, *newCmd;
     int count, oldLength, newLength, length, result;
@@ -999,17 +1009,18 @@ SubsAndEval(iPtr, cmd, old, new)
  */
 
 static char *
-GetWords(iPtr, command, words)
-    register Interp *iPtr;     /* Tcl interpreter in which to place
+GetWords(
+    Interp *iPtr,      /* Tcl interpreter in which to place
                                 * an error message if needed. */
-    char *command;             /* Command string. */
-    char *words;               /* Description of which words to extract
+    char *command,             /* Command string. */
+    char *words                        /* Description of which words to extract
                                 * from the command.  Either num[-num] or
                                 * a pattern. */
+)
 {
     char *result;
     char *start, *end, *dst;
-    register char *next;
+    char *next;
     int first;                 /* First word desired. -1 means last word
                                 * only. */
     int last;                  /* Last word desired.  -1 means use everything
index 97ef34cf84e5ad2009cb98f84cadf88110aeb334..7bd23777024f78b4bae234a80ce2c7350c999364 100644 (file)
@@ -390,9 +390,10 @@ static int         ScanInputForEOL _ANSI_ARGS_((Channel *chanPtr,
  */
 
 void
-Tcl_SetStdChannel(channel, type)
-    Tcl_Channel channel;
-    int type;                  /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR. */
+Tcl_SetStdChannel(
+    Tcl_Channel channel,
+    int type                   /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR. */
+)
 {
     switch (type) {
        case TCL_STDIN:
@@ -428,8 +429,9 @@ Tcl_SetStdChannel(channel, type)
  */
 
 Tcl_Channel
-Tcl_GetStdChannel(type)
-    int type;                  /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR. */
+Tcl_GetStdChannel(
+    int type                   /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR. */
+)
 {
     Tcl_Channel channel = NULL;
 
@@ -486,13 +488,14 @@ Tcl_GetStdChannel(type)
  */
 
 void
-Tcl_CreateCloseHandler(chan, proc, clientData)
-    Tcl_Channel chan;          /* The channel for which to create the
+Tcl_CreateCloseHandler(
+    Tcl_Channel chan,          /* The channel for which to create the
                                  * close callback. */
-    Tcl_CloseProc *proc;       /* The callback routine to call when the
+    Tcl_CloseProc *proc,       /* The callback routine to call when the
                                  * channel will be closed. */
-    ClientData clientData;     /* Arbitrary data to pass to the
+    ClientData clientData      /* Arbitrary data to pass to the
                                  * close callback. */
+)
 {
     Channel *chanPtr;
     CloseCallback *cbPtr;
@@ -527,13 +530,14 @@ Tcl_CreateCloseHandler(chan, proc, clientData)
  */
 
 void
-Tcl_DeleteCloseHandler(chan, proc, clientData)
-    Tcl_Channel chan;          /* The channel for which to cancel the
+Tcl_DeleteCloseHandler(
+    Tcl_Channel chan,          /* The channel for which to cancel the
                                  * close callback. */
-    Tcl_CloseProc *proc;       /* The procedure for the callback to
+    Tcl_CloseProc *proc,       /* The procedure for the callback to
                                  * remove. */
-    ClientData clientData;     /* The callback data for the callback
+    ClientData clientData      /* The callback data for the callback
                                  * to remove. */
+)
 {
     Channel *chanPtr;
     CloseCallback *cbPtr, *cbPrevPtr;
@@ -575,8 +579,9 @@ Tcl_DeleteCloseHandler(chan, proc, clientData)
 
        /* ARGSUSED */
 static void
-CloseChannelsOnExit(clientData)
-    ClientData clientData;             /* NULL - unused. */
+CloseChannelsOnExit(
+    ClientData clientData              /* NULL - unused. */
+)
 {
     Channel *chanPtr;                  /* Iterates over open channels. */
     Channel *nextChanPtr;              /* Iterates over open channels. */
@@ -628,8 +633,9 @@ CloseChannelsOnExit(clientData)
  */
 
 static Tcl_HashTable *
-GetChannelTable(interp)
-    Tcl_Interp *interp;
+GetChannelTable(
+    Tcl_Interp *interp
+)
 {
     Tcl_HashTable *hTblPtr;    /* Hash table of channels. */
     Tcl_Channel stdinChannel, stdoutChannel, stderrChannel;
@@ -690,9 +696,10 @@ GetChannelTable(interp)
  */
 
 static void
-DeleteChannelTable(clientData, interp)
-    ClientData clientData;     /* The per-interpreter data structure. */
-    Tcl_Interp *interp;                /* The interpreter being deleted. */
+DeleteChannelTable(
+    ClientData clientData,     /* The per-interpreter data structure. */
+    Tcl_Interp *interp         /* The interpreter being deleted. */
+)
 {
     Tcl_HashTable *hTblPtr;    /* The hash table. */
     Tcl_HashSearch hSearch;    /* Search variable. */
@@ -778,9 +785,10 @@ DeleteChannelTable(clientData, interp)
  */
 
 int
-Tcl_UnregisterChannel(interp, chan)
-    Tcl_Interp *interp;                /* Interpreter in which channel is defined. */
-    Tcl_Channel chan;          /* Channel to delete. */
+Tcl_UnregisterChannel(
+    Tcl_Interp *interp,                /* Interpreter in which channel is defined. */
+    Tcl_Channel chan           /* Channel to delete. */
+)
 {
     Tcl_HashTable *hTblPtr;    /* Hash table of channels. */
     Tcl_HashEntry *hPtr;       /* Search variable. */
@@ -828,10 +836,11 @@ Tcl_UnregisterChannel(interp, chan)
  */
 
 void
-Tcl_RegisterChannel(interp, chan)
-    Tcl_Interp *interp;                /* Interpreter in which to add the channel. */
-    Tcl_Channel chan;          /* The channel to add to this interpreter
+Tcl_RegisterChannel(
+    Tcl_Interp *interp,                /* Interpreter in which to add the channel. */
+    Tcl_Channel chan           /* The channel to add to this interpreter
                                  * channel table. */
+)
 {
     Tcl_HashTable *hTblPtr;    /* Hash table of channels. */
     Tcl_HashEntry *hPtr;       /* Search variable. */
@@ -876,14 +885,15 @@ Tcl_RegisterChannel(interp, chan)
  */
 
 Tcl_Channel
-Tcl_GetChannel(interp, chanName, modePtr)
-    Tcl_Interp *interp;                /* Interpreter in which to find or create
+Tcl_GetChannel(
+    Tcl_Interp *interp,                /* Interpreter in which to find or create
                                  * the channel. */
-    char *chanName;            /* The name of the channel. */
-    int *modePtr;              /* Where to store the mode in which the
+    char *chanName,            /* The name of the channel. */
+    int *modePtr               /* Where to store the mode in which the
                                  * channel was opened? Will contain an ORed
                                  * combination of TCL_READABLE and
                                  * TCL_WRITABLE, if non-NULL. */
+)
 {
     Channel *chanPtr;          /* The actual channel. */
     Tcl_HashTable *hTblPtr;    /* Hash table of channels. */
@@ -948,12 +958,13 @@ Tcl_GetChannel(interp, chanName, modePtr)
  */
 
 Tcl_Channel
-Tcl_CreateChannel(typePtr, chanName, inFile, outFile, instanceData)
-    Tcl_ChannelType *typePtr;  /* The channel type record. */
-    char *chanName;            /* Name of channel to record. */
-    Tcl_File inFile;           /* File to use for input, or NULL. */
-    Tcl_File outFile;          /* File to use for output, or NULL. */
-    ClientData instanceData;   /* Instance specific data. */
+Tcl_CreateChannel(
+    Tcl_ChannelType *typePtr,  /* The channel type record. */
+    char *chanName,            /* Name of channel to record. */
+    Tcl_File inFile,           /* File to use for input, or NULL. */
+    Tcl_File outFile,          /* File to use for output, or NULL. */
+    ClientData instanceData    /* Instance specific data. */
+)
 {
     Channel *chanPtr;          /* The channel structure newly created. */
 
@@ -1053,8 +1064,9 @@ Tcl_CreateChannel(typePtr, chanName, inFile, outFile, instanceData)
  */
 
 char *
-Tcl_GetChannelName(chan)
-    Tcl_Channel chan;          /* The channel for which to return the name. */
+Tcl_GetChannelName(
+    Tcl_Channel chan           /* The channel for which to return the name. */
+)
 {
     Channel *chanPtr;          /* The actual channel. */
 
@@ -1079,8 +1091,9 @@ Tcl_GetChannelName(chan)
  */
 
 Tcl_ChannelType *
-Tcl_GetChannelType(chan)
-    Tcl_Channel chan;          /* The channel to return type for. */
+Tcl_GetChannelType(
+    Tcl_Channel chan           /* The channel to return type for. */
+)
 {
     Channel *chanPtr;          /* The actual channel. */
 
@@ -1106,9 +1119,10 @@ Tcl_GetChannelType(chan)
  */
 
 Tcl_File
-Tcl_GetChannelFile(chan, direction)
-    Tcl_Channel chan;          /* The channel to get file from. */
-    int direction;             /* TCL_WRITABLE or TCL_READABLE. */
+Tcl_GetChannelFile(
+    Tcl_Channel chan,          /* The channel to get file from. */
+    int direction              /* TCL_WRITABLE or TCL_READABLE. */
+)
 {
     Channel *chanPtr;          /* The actual channel. */
 
@@ -1140,8 +1154,9 @@ Tcl_GetChannelFile(chan, direction)
  */
 
 ClientData
-Tcl_GetChannelInstanceData(chan)
-    Tcl_Channel chan;          /* Channel for which to return client data. */
+Tcl_GetChannelInstanceData(
+    Tcl_Channel chan           /* Channel for which to return client data. */
+)
 {
     Channel *chanPtr;          /* The actual channel. */
 
@@ -1170,11 +1185,12 @@ Tcl_GetChannelInstanceData(chan)
  */
 
 static void
-RecycleBuffer(chanPtr, bufPtr, mustDiscard)
-    Channel *chanPtr;          /* Channel for which to recycle buffers. */
-    ChannelBuffer *bufPtr;     /* The buffer to recycle. */
-    int mustDiscard;           /* If nonzero, free the buffer to the
+RecycleBuffer(
+    Channel *chanPtr,          /* Channel for which to recycle buffers. */
+    ChannelBuffer *bufPtr,     /* The buffer to recycle. */
+    int mustDiscard            /* If nonzero, free the buffer to the
                                  * OS, always. */
+)
 {
     /*
      * Do we have to free the buffer to the OS?
@@ -1242,8 +1258,9 @@ keepit:
  */
 
 static void
-DiscardOutputQueued(chanPtr)
-    Channel *chanPtr;          /* The channel for which to discard output. */
+DiscardOutputQueued(
+    Channel *chanPtr           /* The channel for which to discard output. */
+)
 {
     ChannelBuffer *bufPtr;
     
@@ -1278,12 +1295,13 @@ DiscardOutputQueued(chanPtr)
  */
 
 static int
-FlushChannel(interp, chanPtr, calledFromAsyncFlush)
-    Tcl_Interp *interp;                        /* For error reporting during close. */
-    Channel *chanPtr;                  /* The channel to flush on. */
-    int calledFromAsyncFlush;          /* If nonzero then we are being
+FlushChannel(
+    Tcl_Interp *interp,                        /* For error reporting during close. */
+    Channel *chanPtr,                  /* The channel to flush on. */
+    int calledFromAsyncFlush           /* If nonzero then we are being
                                          * called from an asynchronous
                                          * flush callback. */
+)
 {
     ChannelBuffer *bufPtr;             /* Iterates over buffered output
                                          * queue. */
@@ -1482,10 +1500,11 @@ FlushChannel(interp, chanPtr, calledFromAsyncFlush)
  */
 
 static int
-CloseChannel(interp, chanPtr, errorCode)
-    Tcl_Interp *interp;                        /* For error reporting. */
-    Channel *chanPtr;                  /* The channel to close. */
-    int errorCode;                     /* Status of operation so far. */
+CloseChannel(
+    Tcl_Interp *interp,                        /* For error reporting. */
+    Channel *chanPtr,                  /* The channel to close. */
+    int errorCode                      /* Status of operation so far. */
+)
 {
     int result;                                /* Of calling driver close
                                          * operation. */
@@ -1615,11 +1634,12 @@ CloseChannel(interp, chanPtr, errorCode)
 
        /* ARGSUSED */
 int
-Tcl_Close(interp, chan)
-    Tcl_Interp *interp;                        /* Interpreter for errors. */
-    Tcl_Channel chan;                  /* The channel being closed. Must
+Tcl_Close(
+    Tcl_Interp *interp,                        /* Interpreter for errors. */
+    Tcl_Channel chan                   /* The channel being closed. Must
                                          * not be referenced in any
                                          * interpreter. */
+)
 {
     ChannelHandler *chPtr, *chNext;    /* Iterate over channel handlers. */
     CloseCallback *cbPtr;              /* Iterate over close callbacks
@@ -1742,9 +1762,10 @@ Tcl_Close(interp, chan)
  */
 
 static int
-ChannelEventDeleteProc(evPtr, clientData)
-    Tcl_Event *evPtr;          /* The event to check for a match. */
-    ClientData clientData;     /* The channel to check for. */
+ChannelEventDeleteProc(
+    Tcl_Event *evPtr,          /* The event to check for a match. */
+    ClientData clientData      /* The channel to check for. */
+)
 {
     ChannelHandlerEvent *cEvPtr;
     Channel *chanPtr;
@@ -1782,12 +1803,13 @@ ChannelEventDeleteProc(evPtr, clientData)
  */
 
 int
-Tcl_Write(chan, srcPtr, slen)
-    Tcl_Channel chan;                  /* The channel to buffer output for. */
-    char *srcPtr;                      /* Output to buffer. */
-    int slen;                          /* Its length. Negative means
+Tcl_Write(
+    Tcl_Channel chan,                  /* The channel to buffer output for. */
+    char *srcPtr,                      /* Output to buffer. */
+    int slen                           /* Its length. Negative means
                                          * the output is null terminated
                                          * and we must compute its length. */
+)
 {
     Channel *chanPtr;                  /* The actual channel. */
     ChannelBuffer *outBufPtr;          /* Current output buffer. */
@@ -1971,8 +1993,9 @@ Tcl_Write(chan, srcPtr, slen)
  */
 
 int
-Tcl_Flush(chan)
-    Tcl_Channel chan;                  /* The Channel to flush. */
+Tcl_Flush(
+    Tcl_Channel chan                   /* The Channel to flush. */
+)
 {
     int result;                                /* Of calling FlushChannel. */
     Channel *chanPtr;                  /* The actual channel. */
@@ -2034,11 +2057,12 @@ Tcl_Flush(chan)
  */
 
 static void
-DiscardInputQueued(chanPtr, discardSavedBuffers)
-    Channel *chanPtr;          /* Channel on which to discard
+DiscardInputQueued(
+    Channel *chanPtr,          /* Channel on which to discard
                                  * the queued input. */
-    int discardSavedBuffers;   /* If non-zero, discard all buffers including
+    int discardSavedBuffers    /* If non-zero, discard all buffers including
                                  * last one. */
+)
 {
     ChannelBuffer *bufPtr, *nxtPtr;    /* Loop variables. */
 
@@ -2080,8 +2104,9 @@ DiscardInputQueued(chanPtr, discardSavedBuffers)
  */
 
 static int
-GetInput(chanPtr)
-    Channel *chanPtr;                  /* Channel to read input from. */
+GetInput(
+    Channel *chanPtr                   /* Channel to read input from. */
+)
 {
     int toRead;                                /* How much to read? */
     int result;                                /* Of calling driver. */
@@ -2194,11 +2219,12 @@ GetInput(chanPtr)
  */
 
 static int
-CopyAndTranslateBuffer(chanPtr, result, space)
-    Channel *chanPtr;          /* The channel from which to read input. */
-    char *result;              /* Where to store the copied input. */
-    int space;                 /* How many bytes are available in result
+CopyAndTranslateBuffer(
+    Channel *chanPtr,          /* The channel from which to read input. */
+    char *result,              /* Where to store the copied input. */
+    int space                  /* How many bytes are available in result
                                  * to store the copied input? */
+)
 {
     int bytesInBuffer;         /* How many bytes are available to be
                                  * copied in the current input buffer? */
@@ -2445,14 +2471,14 @@ CopyAndTranslateBuffer(chanPtr, result, space)
  */
 
 static int
-ScanBufferForEOL(chanPtr, bufPtr, translation, eofChar, bytesToEOLPtr,
-                 crSeenPtr)
-    Channel *chanPtr;
-    ChannelBuffer *bufPtr;             /* Buffer to scan for EOL. */
-    Tcl_EolTranslation translation;    /* Translation mode to use. */
-    int eofChar;                       /* EOF char to look for. */
-    int *bytesToEOLPtr;                        /* Running counter. */
-    int *crSeenPtr;                    /* Has "\r" been seen? */
+ScanBufferForEOL(
+    Channel *chanPtr,
+    ChannelBuffer *bufPtr,             /* Buffer to scan for EOL. */
+    Tcl_EolTranslation translation,    /* Translation mode to use. */
+    int eofChar,                       /* EOF char to look for. */
+    int *bytesToEOLPtr,                        /* Running counter. */
+    int *crSeenPtr                     /* Has "\r" been seen? */
+)
 {
     char *rPtr;                                /* Iterates over input string. */
     char *sPtr;                                /* Where to stop search? */
@@ -2585,12 +2611,13 @@ ScanBufferForEOL(chanPtr, bufPtr, translation, eofChar, bytesToEOLPtr,
  */
 
 static int
-ScanInputForEOL(chanPtr, bytesQueuedPtr)
-    Channel *chanPtr;  /* Channel for which to scan queued
+ScanInputForEOL(
+    Channel *chanPtr,  /* Channel for which to scan queued
                                  * input for end of line. */
-    int *bytesQueuedPtr;       /* Where to store the number of bytes
+    int *bytesQueuedPtr                /* Where to store the number of bytes
                                  * currently queued if no end of line
                                  * was found. */
+)
 {
     ChannelBuffer *bufPtr;     /* Iterates over queued buffers. */
     int bytesToEOL;            /* How many bytes to end of line? */
@@ -2633,8 +2660,9 @@ ScanInputForEOL(chanPtr, bytesQueuedPtr)
  */
 
 static int
-GetEOL(chanPtr)
-    Channel *chanPtr;  /* Channel to queue input on. */
+GetEOL(
+    Channel *chanPtr   /* Channel to queue input on. */
+)
 {
     int result;                        /* Of getting another buffer from the
                                  * channel. */
@@ -2691,10 +2719,11 @@ GetEOL(chanPtr)
  */
 
 int
-Tcl_Read(chan, bufPtr, toRead)
-    Tcl_Channel chan;          /* The channel from which to read. */
-    char *bufPtr;              /* Where to store input read. */
-    int toRead;                        /* Maximum number of characters to read. */
+Tcl_Read(
+    Tcl_Channel chan,          /* The channel from which to read. */
+    char *bufPtr,              /* Where to store input read. */
+    int toRead                 /* Maximum number of characters to read. */
+)
 {
     Channel *chanPtr;          /* The real IO channel. */
     int copied;                        /* How many characters were copied into
@@ -2781,14 +2810,15 @@ Tcl_Read(chan, bufPtr, toRead)
  */
 
 int
-Tcl_Gets(chan, lineRead)
-    Tcl_Channel chan;          /* Channel from which to read. */
-    Tcl_DString *lineRead;     /* The characters of the line read
+Tcl_Gets(
+    Tcl_Channel chan,          /* Channel from which to read. */
+    Tcl_DString *lineRead      /* The characters of the line read
                                  * (excluding the terminating newline if
                                  * present) will be appended to this
                                  * DString. The caller must have initialized
                                  * it and is responsible for managing the
                                  * storage. */
+)
 {
     Channel *chanPtr;          /* The channel to read from. */
     char *buf;                 /* Points into DString where data
@@ -2879,10 +2909,11 @@ Tcl_Gets(chan, lineRead)
  */
 
 int
-Tcl_Seek(chan, offset, mode)
-    Tcl_Channel chan;          /* The channel on which to seek. */
-    int offset;                        /* Offset to seek to. */
-    int mode;                  /* Relative to which location to seek? */
+Tcl_Seek(
+    Tcl_Channel chan,          /* The channel on which to seek. */
+    int offset,                        /* Offset to seek to. */
+    int mode                   /* Relative to which location to seek? */
+)
 {
     Channel *chanPtr;  /* The real IO channel. */
     ChannelBuffer *bufPtr;     /* Iterates over queued input
@@ -3070,8 +3101,9 @@ Tcl_Seek(chan, offset, mode)
  */
 
 int
-Tcl_Tell(chan)
-    Tcl_Channel chan;                  /* The channel to return pos for. */
+Tcl_Tell(
+    Tcl_Channel chan                   /* The channel to return pos for. */
+)
 {
     Channel *chanPtr;          /* The actual channel to tell on. */
     ChannelBuffer *bufPtr;             /* Iterates over queued input
@@ -3170,8 +3202,9 @@ Tcl_Tell(chan)
  */
 
 int
-Tcl_Eof(chan)
-    Tcl_Channel chan;                  /* Does this channel have EOF? */
+Tcl_Eof(
+    Tcl_Channel chan                   /* Does this channel have EOF? */
+)
 {
     Channel *chanPtr;          /* The real channel structure. */
 
@@ -3198,8 +3231,9 @@ Tcl_Eof(chan)
  */
 
 int
-Tcl_InputBlocked(chan)
-    Tcl_Channel chan;                  /* Is this channel blocked? */
+Tcl_InputBlocked(
+    Tcl_Channel chan                   /* Is this channel blocked? */
+)
 {
     Channel *chanPtr;          /* The real channel structure. */
 
@@ -3226,8 +3260,9 @@ Tcl_InputBlocked(chan)
  */
 
 int
-Tcl_InputBuffered(chan)
-    Tcl_Channel chan;                  /* The channel to query. */
+Tcl_InputBuffered(
+    Tcl_Channel chan                   /* The channel to query. */
+)
 {
     Channel *chanPtr;
     int bytesBuffered;
@@ -3260,10 +3295,11 @@ Tcl_InputBuffered(chan)
  */
 
 void
-Tcl_SetChannelBufferSize(chan, sz)
-    Tcl_Channel chan;                  /* The channel whose buffer size
+Tcl_SetChannelBufferSize(
+    Tcl_Channel chan,                  /* The channel whose buffer size
                                          * to set. */
-    int sz;                            /* The size to set. */
+    int sz                             /* The size to set. */
+)
 {
     Channel *chanPtr;
     
@@ -3300,9 +3336,10 @@ Tcl_SetChannelBufferSize(chan, sz)
  */
 
 int
-Tcl_GetChannelBufferSize(chan)
-    Tcl_Channel chan;          /* The channel for which to find the
+Tcl_GetChannelBufferSize(
+    Tcl_Channel chan           /* The channel for which to find the
                                  * buffer size. */
+)
 {
     Channel *chanPtr;
 
@@ -3332,10 +3369,11 @@ Tcl_GetChannelBufferSize(chan)
  */
 
 int
-Tcl_GetChannelOption(chan, optionName, dsPtr)
-    Tcl_Channel chan;          /* Channel on which to get option. */
-    char *optionName;          /* Option to get. */
-    Tcl_DString *dsPtr;                /* Where to store value(s). */
+Tcl_GetChannelOption(
+    Tcl_Channel chan,          /* Channel on which to get option. */
+    char *optionName,          /* Option to get. */
+    Tcl_DString *dsPtr         /* Where to store value(s). */
+)
 {
     Channel *chanPtr;          /* The real IO channel. */
     size_t len;                        /* Length of optionName string. */
@@ -3498,11 +3536,12 @@ Tcl_GetChannelOption(chan, optionName, dsPtr)
  */
 
 int
-Tcl_SetChannelOption(interp, chan, optionName, newValue)
-    Tcl_Interp *interp;                /* For error reporting - can be NULL. */
-    Tcl_Channel chan;          /* Channel on which to set mode. */
-    char *optionName;          /* Which option to set? */
-    char *newValue;            /* New value for option. */
+Tcl_SetChannelOption(
+    Tcl_Interp *interp,                /* For error reporting - can be NULL. */
+    Tcl_Channel chan,          /* Channel on which to set mode. */
+    char *optionName,          /* Which option to set? */
+    char *newValue             /* New value for option. */
+)
 {
     int result;                        /* Result of channel type operation. */
     int newMode;               /* New (numeric) mode to sert. */
@@ -3809,8 +3848,9 @@ Tcl_SetChannelOption(interp, chan, optionName, newValue)
 
        /* ARGSUSED */
 static void
-ChannelEventSourceExitProc(clientData)
-    ClientData clientData;             /* Not used. */
+ChannelEventSourceExitProc(
+    ClientData clientData              /* Not used. */
+)
 {
     Tcl_DeleteEventSource(ChannelHandlerSetupProc, ChannelHandlerCheckProc,
             (ClientData) NULL);
@@ -3837,12 +3877,13 @@ ChannelEventSourceExitProc(clientData)
  */
 
 static void
-ChannelHandlerSetupProc(clientData, flags)
-    ClientData clientData;             /* Not used. */
-    int flags;                         /* Flags passed to Tk_DoOneEvent:
+ChannelHandlerSetupProc(
+    ClientData clientData,             /* Not used. */
+    int flags                          /* Flags passed to Tk_DoOneEvent:
                                         * if it doesn't include
                                         * TCL_FILE_EVENTS then we do
                                         * nothing. */
+)
 {
     Tcl_Time dontBlock;
     Channel *chanPtr, *nextChanPtr;
@@ -3904,12 +3945,13 @@ ChannelHandlerSetupProc(clientData, flags)
  */
 
 static void
-ChannelHandlerCheckProc(clientData, flags)
-    ClientData clientData;             /* Not used. */
-    int flags;                         /* Flags passed to Tk_DoOneEvent:
+ChannelHandlerCheckProc(
+    ClientData clientData,             /* Not used. */
+    int flags                          /* Flags passed to Tk_DoOneEvent:
                                         * if it doesn't include 
                                         * TCL_FILE_EVENTS then we do
                                         * nothing. */
+)
 {
     Channel *chanPtr, *nextChanPtr;
     ChannelHandlerEvent *ePtr;
@@ -4026,9 +4068,10 @@ ChannelHandlerCheckProc(clientData, flags)
  */
 
 static void
-FlushEventProc(clientData, mask)
-    ClientData clientData;             /* Channel to produce output on. */
-    int mask;                          /* Not used. */
+FlushEventProc(
+    ClientData clientData,             /* Channel to produce output on. */
+    int mask                           /* Not used. */
+)
 {
     (void) FlushChannel(NULL, (Channel *) clientData, 1);
 }
@@ -4061,10 +4104,11 @@ FlushEventProc(clientData, mask)
  */
 
 static int
-ChannelHandlerEventProc(evPtr, flags)
-    Tcl_Event *evPtr;          /* Event to service. */
-    int flags;                 /* Flags that indicate what events to
+ChannelHandlerEventProc(
+    Tcl_Event *evPtr,          /* Event to service. */
+    int flags                  /* Flags that indicate what events to
                                  * handle, such as TCL_FILE_EVENTS. */
+)
 {
     Channel *chanPtr;
     ChannelHandler *chPtr;
@@ -4131,16 +4175,17 @@ ChannelHandlerEventProc(evPtr, flags)
  */
 
 void
-Tcl_CreateChannelHandler(chan, mask, proc, clientData)
-    Tcl_Channel chan;          /* The channel to create the handler for. */
-    int mask;                  /* OR'ed combination of TCL_READABLE,
+Tcl_CreateChannelHandler(
+    Tcl_Channel chan,          /* The channel to create the handler for. */
+    int mask,                  /* OR'ed combination of TCL_READABLE,
                                 * TCL_WRITABLE, and TCL_EXCEPTION:
                                 * indicates conditions under which
                                 * proc should be called. Use 0 to
                                  * disable a registered handler. */
-    Tcl_ChannelProc *proc;     /* Procedure to call for each
+    Tcl_ChannelProc *proc,     /* Procedure to call for each
                                 * selected event. */
-    ClientData clientData;     /* Arbitrary data to pass to proc. */
+    ClientData clientData      /* Arbitrary data to pass to proc. */
+)
 {
     ChannelHandler *chPtr;
     Channel *chanPtr;
@@ -4224,13 +4269,13 @@ Tcl_CreateChannelHandler(chan, mask, proc, clientData)
  */
 
 void
-Tcl_DeleteChannelHandler(chan, proc, clientData)
-    Tcl_Channel chan;          /* The channel for which to remove the
+Tcl_DeleteChannelHandler(
+    Tcl_Channel chan,          /* The channel for which to remove the
                                  * callback. */
-    Tcl_ChannelProc *proc;     /* The procedure in the callback to delete. */
-    ClientData clientData;     /* The client data in the callback
+    Tcl_ChannelProc *proc,     /* The procedure in the callback to delete. */
+    ClientData clientData      /* The client data in the callback
                                  * to delete. */
-    
+)
 {
     ChannelHandler *chPtr, *prevChPtr;
     Channel *chanPtr;
@@ -4310,13 +4355,14 @@ Tcl_DeleteChannelHandler(chan, proc, clientData)
  */
 
 static void
-ReturnScriptRecord(interp, chanPtr, mask)
-    Tcl_Interp *interp;                /* The interpreter in which the script
+ReturnScriptRecord(
+    Tcl_Interp *interp,                /* The interpreter in which the script
                                  * is to be executed. */
-    Channel *chanPtr;          /* The channel for which the script is
+    Channel *chanPtr,          /* The channel for which the script is
                                  * stored. */
-    int mask;                  /* Events in mask must overlap with events
+    int mask                   /* Events in mask must overlap with events
                                  * for which this script is stored. */
+)
 {
     EventScriptRecord *esPtr;
     
@@ -4348,13 +4394,14 @@ ReturnScriptRecord(interp, chanPtr, mask)
  */
 
 static void
-DeleteScriptRecord(interp, chanPtr, mask)
-    Tcl_Interp *interp;                /* Interpreter in which script was to be
+DeleteScriptRecord(
+    Tcl_Interp *interp,                /* Interpreter in which script was to be
                                  * executed. */
-    Channel *chanPtr;          /* The channel for which to delete the
+    Channel *chanPtr,          /* The channel for which to delete the
                                  * script record (if any). */
-    int mask;                  /* Events in mask must exactly match mask
+    int mask                   /* Events in mask must exactly match mask
                                  * of script to delete. */
+)
 {
     EventScriptRecord *esPtr, *prevEsPtr;
 
@@ -4398,15 +4445,16 @@ DeleteScriptRecord(interp, chanPtr, mask)
  */
 
 static void
-CreateScriptRecord(interp, chanPtr, mask, script)
-    Tcl_Interp *interp;                        /* Interpreter in which to execute
+CreateScriptRecord(
+    Tcl_Interp *interp,                        /* Interpreter in which to execute
                                          * the stored script. */
-    Channel *chanPtr;                  /* Channel for which script is to
+    Channel *chanPtr,                  /* Channel for which script is to
                                          * be stored. */
-    int mask;                          /* Set of events for which script
+    int mask,                          /* Set of events for which script
                                          * will be invoked. */
-    char *script;                      /* A copy of this script is stored
+    char *script                       /* A copy of this script is stored
                                          * in the newly created record. */
+)
 {
     EventScriptRecord *esPtr;
 
@@ -4453,9 +4501,10 @@ CreateScriptRecord(interp, chanPtr, mask, script)
  */
 
 static void
-ChannelEventScriptInvoker(clientData, mask)
-    ClientData clientData;     /* The script+interp record. */
-    int mask;                  /* Not used. */
+ChannelEventScriptInvoker(
+    ClientData clientData,     /* The script+interp record. */
+    int mask                   /* Not used. */
+)
 {
     Tcl_Interp *interp;                /* Interpreter in which to eval the script. */
     Channel *chanPtr;          /* The channel for which this handler is
@@ -4519,13 +4568,14 @@ ChannelEventScriptInvoker(clientData, mask)
 
        /* ARGSUSED */
 int
-Tcl_FileEventCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Not used. */
-    Tcl_Interp *interp;                        /* Interpreter in which the channel
+Tcl_FileEventCmd(
+    ClientData clientData,             /* Not used. */
+    Tcl_Interp *interp,                        /* Interpreter in which the channel
                                          * for which to create the handler
                                          * is found. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Channel *chanPtr;                  /* The channel to create
                                          * the handler for. */
@@ -4617,11 +4667,12 @@ Tcl_FileEventCmd(clientData, interp, argc, argv)
 
        /* ARGSUSED */
 int
-TclTestChannelCmd(clientData, interp, argc, argv)
-    ClientData clientData;     /* Not used. */
-    Tcl_Interp *interp;                /* Interpreter for result. */
-    int argc;                  /* Count of additional args. */
-    char **argv;               /* Additional arg strings. */
+TclTestChannelCmd(
+    ClientData clientData,     /* Not used. */
+    Tcl_Interp *interp,                /* Interpreter for result. */
+    int argc,                  /* Count of additional args. */
+    char **argv                        /* Additional arg strings. */
+)
 {
     char *cmdName;             /* Sub command. */
     Tcl_HashTable *hTblPtr;    /* Hash table of channels. */
@@ -4935,11 +4986,12 @@ TclTestChannelCmd(clientData, interp, argc, argv)
 
        /* ARGSUSED */
 int
-TclTestChannelEventCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+TclTestChannelEventCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Channel *chanPtr;
     EventScriptRecord *esPtr, *prevEsPtr, *nextEsPtr;
index 03c83eba2b602fdc651da123c7db11ea50859387..de3de4f425aa0d0ac7bc870c85f74464113b9d13 100644 (file)
@@ -85,11 +85,12 @@ static void UnregisterTcpServerInterpCleanupProc _ANSI_ARGS_((
 
        /* ARGSUSED */
 int
-Tcl_PutsCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_PutsCmd(
+    ClientData clientData,             /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Channel chan;                  /* The channel to puts on. */
     int i;                             /* Counter. */
@@ -175,11 +176,12 @@ error:
 
        /* ARGSUSED */
 int
-Tcl_FlushCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_FlushCmd(
+    ClientData clientData,             /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Channel chan;                  /* The channel to flush on. */
     int result;                                /* Result of call to channel
@@ -228,11 +230,12 @@ Tcl_FlushCmd(clientData, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_GetsCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_GetsCmd(
+    ClientData clientData,             /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Channel chan;                  /* The channel to read from. */
     char *varName;                     /* Assign to this variable? */
@@ -312,11 +315,12 @@ Tcl_GetsCmd(clientData, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ReadCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ReadCmd(
+    ClientData clientData,             /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Channel chan;                  /* The channel to read from. */
     int newline, i;                    /* Discard newline at end? */
@@ -450,12 +454,13 @@ argerror:
  */
 
 int
-TclUnsupported0Cmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Not used. */
-    Tcl_Interp *interp;                        /* Interpreter in which both channels
+TclUnsupported0Cmd(
+    ClientData clientData,             /* Not used. */
+    Tcl_Interp *interp,                        /* Interpreter in which both channels
                                          * are defined. */
-    int argc;                          /* How many arguments? */
-    char **argv;                       /* The argument strings. */
+    int argc,                          /* How many arguments? */
+    char **argv                                /* The argument strings. */
+)
 {
     Tcl_Channel inChan, outChan;
     int requested;
@@ -555,11 +560,12 @@ TclUnsupported0Cmd(clientData, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_SeekCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_SeekCmd(
+    ClientData clientData,             /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Channel chan;                  /* The channel to tell on. */
     int offset, mode;                  /* Where to seek? */
@@ -626,11 +632,12 @@ Tcl_SeekCmd(clientData, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_TellCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_TellCmd(
+    ClientData clientData,             /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Channel chan;                  /* The channel to tell on. */
 
@@ -672,11 +679,12 @@ Tcl_TellCmd(clientData, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_CloseCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_CloseCmd(
+    ClientData clientData,             /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Channel chan;                  /* The channel to close. */
     int len;                           /* Length of error output. */
@@ -732,11 +740,12 @@ Tcl_CloseCmd(clientData, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_FconfigureCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_FconfigureCmd(
+    ClientData clientData,             /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Channel chan;                  /* The channel to set a mode on. */
     int result;                                /* Of Tcl_Set/GetChannelOption. */
@@ -808,11 +817,12 @@ Tcl_FconfigureCmd(clientData, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_EofCmd(unused, interp, argc, argv)
-    ClientData unused;                 /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_EofCmd(
+    ClientData unused,                 /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Channel chan;                  /* The channel to query for EOF. */
     int mode;                          /* Mode in which channel is opened. */
@@ -849,11 +859,12 @@ Tcl_EofCmd(unused, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ExecCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ExecCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
 #ifdef MAC_TCL
     Tcl_AppendResult(interp, "exec not implemented under Mac OS",
@@ -992,11 +1003,12 @@ Tcl_ExecCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_FblockedCmd(unused, interp, argc, argv)
-    ClientData unused;                 /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_FblockedCmd(
+    ClientData unused,                 /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Channel chan;                  /* The channel to query for blocked. */
     int mode;                          /* Mode in which channel was opened. */
@@ -1039,11 +1051,12 @@ Tcl_FblockedCmd(unused, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_OpenCmd(notUsed, interp, argc, argv)
-    ClientData notUsed;                        /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_OpenCmd(
+    ClientData notUsed,                        /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int pipeline, prot;
     char *modeString;
@@ -1139,10 +1152,11 @@ Tcl_OpenCmd(notUsed, interp, argc, argv)
 
        /* ARGSUSED */
 static void
-TcpAcceptCallbacksDeleteProc(clientData, interp)
-    ClientData clientData;     /* Data which was passed when the assocdata
+TcpAcceptCallbacksDeleteProc(
+    ClientData clientData,     /* Data which was passed when the assocdata
                                  * was registered. */
-    Tcl_Interp *interp;                /* Interpreter being deleted - not used. */
+    Tcl_Interp *interp         /* Interpreter being deleted - not used. */
+)
 {
     Tcl_HashTable *hTblPtr;
     Tcl_HashEntry *hPtr;
@@ -1181,13 +1195,14 @@ TcpAcceptCallbacksDeleteProc(clientData, interp)
  */
 
 static void
-RegisterTcpServerInterpCleanup(interp, acceptCallbackPtr)
-    Tcl_Interp *interp;                /* Interpreter for which we want to be
+RegisterTcpServerInterpCleanup(
+    Tcl_Interp *interp,                /* Interpreter for which we want to be
                                  * informed of deletion. */
-    AcceptCallback *acceptCallbackPtr;
+    AcceptCallback *acceptCallbackPtr
                                /* The accept callback record whose
                                  * interp field we want set to NULL when
                                  * the interpreter is deleted. */
+)
 {
     Tcl_HashTable *hTblPtr;    /* Hash table for accept callback
                                  * records to smash when the interpreter
@@ -1231,12 +1246,13 @@ RegisterTcpServerInterpCleanup(interp, acceptCallbackPtr)
  */
 
 static void
-UnregisterTcpServerInterpCleanupProc(interp, acceptCallbackPtr)
-    Tcl_Interp *interp;                /* Interpreter in which the accept callback
+UnregisterTcpServerInterpCleanupProc(
+    Tcl_Interp *interp,                /* Interpreter in which the accept callback
                                  * record was registered. */
-    AcceptCallback *acceptCallbackPtr;
+    AcceptCallback *acceptCallbackPtr
                                /* The record for which to delete the
                                  * registration. */
+)
 {
     Tcl_HashTable *hTblPtr;
     Tcl_HashEntry *hPtr;
@@ -1271,15 +1287,16 @@ UnregisterTcpServerInterpCleanupProc(interp, acceptCallbackPtr)
  */
 
 static void
-AcceptCallbackProc(callbackData, chan, address, port)
-    ClientData callbackData;           /* The data stored when the callback
+AcceptCallbackProc(
+    ClientData callbackData,           /* The data stored when the callback
                                          * was created in the call to
                                          * Tcl_OpenTcpServer. */
-    Tcl_Channel chan;                  /* Channel for the newly accepted
+    Tcl_Channel chan,                  /* Channel for the newly accepted
                                          * connection. */
-    char *address;                     /* Address of client that was
+    char *address,                     /* Address of client that was
                                          * accepted. */
-    int port;                          /* Port of client that was accepted. */
+    int port                           /* Port of client that was accepted. */
+)
 {
     AcceptCallback *acceptCallbackPtr;
     Tcl_Interp *interp;
@@ -1346,9 +1363,10 @@ AcceptCallbackProc(callbackData, chan, address, port)
  */
 
 static void
-TcpServerCloseProc(callbackData)
-    ClientData callbackData;   /* The data passed in the call to
+TcpServerCloseProc(
+    ClientData callbackData    /* The data passed in the call to
                                  * Tcl_CreateCloseHandler. */
+)
 {
     AcceptCallback *acceptCallbackPtr;
                                /* The actual data. */
@@ -1380,11 +1398,12 @@ TcpServerCloseProc(callbackData)
  */
 
 int
-Tcl_SocketCmd(notUsed, interp, argc, argv)
-    ClientData notUsed;                        /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_SocketCmd(
+    ClientData notUsed,                        /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int a, server, port;
     char *arg, *copyScript, *host, *script;
index 21002470b55038657cdb011783790f71a3467c2b..bf43356f2d52de904c660c70306bf9b3273a53ac 100644 (file)
  */
 
 int
-TclSockGetPort(interp, string, proto, portPtr)
-    Tcl_Interp *interp;
-    char *string;              /* Integer or service name */
-    char *proto;               /* "tcp" or "udp", typically */
-    int *portPtr;              /* Return port number */
+TclSockGetPort(
+    Tcl_Interp *interp,
+    char *string,              /* Integer or service name */
+    char *proto,               /* "tcp" or "udp", typically */
+    int *portPtr               /* Return port number */
+)
 {
     struct servent *sp = getservbyname(string, proto);    
     if (sp != NULL) {
@@ -97,9 +98,10 @@ TclSockGetPort(interp, string, proto, portPtr)
  */
 
 int
-TclSockMinimumBuffers(sock, size)
-    int sock;                  /* Socket file descriptor */
-    int size;                  /* Minimum buffer size */
+TclSockMinimumBuffers(
+    int sock,                  /* Socket file descriptor */
+    int size                   /* Minimum buffer size */
+)
 {
     int current;
     int len = sizeof(int);
index e7f58c4a19990dd8fd5e63ccd3f7e26787d4d616..1a1cb9c2b741cd06b8976adfba9873030fd84b5e 100644 (file)
@@ -89,27 +89,28 @@ static Tcl_File     FileForRedirect _ANSI_ARGS_((Tcl_Interp *interp,
  */
 
 static Tcl_File
-FileForRedirect(interp, spec, atOk, arg, flags, nextArg, skipPtr, closePtr)
-    Tcl_Interp *interp;                        /* Intepreter to use for error
+FileForRedirect(
+    Tcl_Interp *interp,                        /* Intepreter to use for error
                                         * reporting. */
-    register char *spec;                       /* Points to character just after
+    char *spec,                        /* Points to character just after
                                         * redirection character. */
-    int atOk;                          /* Non-zero means '@' notation is
+    int atOk,                          /* Non-zero means '@' notation is
                                         * OK, zero means it isn't. */
-    char *arg;                         /* Pointer to entire argument
+    char *arg,                         /* Pointer to entire argument
                                         * containing spec:  used for error
                                         * reporting. */
-    int flags;                         /* Flags to use for opening file. */
-    char *nextArg;                     /* Next argument in argc/argv
+    int flags,                         /* Flags to use for opening file. */
+    char *nextArg,                     /* Next argument in argc/argv
                                         * array, if needed for file name.
                                         * May be NULL. */
-    int *skipPtr;                      /* This value is incremented if
+    int *skipPtr,                      /* This value is incremented if
                                         * nextArg is used for redirection
                                         * spec. */
-    int *closePtr;                     /* This value is set to 1 if the file
+    int *closePtr                      /* This value is set to 1 if the file
                                         * that's returned must be closed, 0
                                         * if it was specified with "@" so
                                         * it must be left open. */
+)
 {
     int writing = (flags & O_WRONLY);
     Tcl_Channel chan;
@@ -209,14 +210,15 @@ FileForRedirect(interp, spec, atOk, arg, flags, nextArg, skipPtr, closePtr)
  */
 
 int
-TclGetOpenMode(interp, string, seekFlagPtr)
-    Tcl_Interp *interp;                        /* Interpreter to use for error
+TclGetOpenMode(
+    Tcl_Interp *interp,                        /* Interpreter to use for error
                                         * reporting - may be NULL. */
-    char *string;                      /* Mode string, e.g. "r+" or
+    char *string,                      /* Mode string, e.g. "r+" or
                                         * "RDONLY CREAT". */
-    int *seekFlagPtr;                  /* Set this to 1 if the caller
+    int *seekFlagPtr                   /* Set this to 1 if the caller
                                          * should seek to EOF during the
                                          * opening of the file. */
+)
 {
     int mode, modeArgc, c, i, gotRW;
     char **modeArgv, *flag;
@@ -369,10 +371,11 @@ TclGetOpenMode(interp, string, seekFlagPtr)
  */
 
 int
-Tcl_EvalFile(interp, fileName)
-    Tcl_Interp *interp;                /* Interpreter in which to process file. */
-    char *fileName;            /* Name of file to process.  Tilde-substitution
+Tcl_EvalFile(
+    Tcl_Interp *interp,                /* Interpreter in which to process file. */
+    char *fileName             /* Name of file to process.  Tilde-substitution
                                 * will be performed on this name. */
+)
 {
     int result;
     struct stat statBuf;
@@ -478,12 +481,13 @@ error:
  */
 
 void
-Tcl_DetachPids(numPids, pidPtr)
-    int numPids;               /* Number of pids to detach:  gives size
+Tcl_DetachPids(
+    int numPids,               /* Number of pids to detach:  gives size
                                 * of array pointed to by pidPtr. */
-    pid_t *pidPtr;             /* Array of pids to detach. */
+    pid_t *pidPtr              /* Array of pids to detach. */
+)
 {
-    register Detached *detPtr;
+    Detached *detPtr;
     int i;
 
     for (i = 0; i < numPids; i++) {
@@ -515,9 +519,9 @@ Tcl_DetachPids(numPids, pidPtr)
  */
 
 void
-Tcl_ReapDetachedProcs()
+Tcl_ReapDetachedProcs(void)
 {
-    register Detached *detPtr;
+    Detached *detPtr;
     Detached *nextPtr, *prevPtr;
     int status;
     pid_t pid;
@@ -563,13 +567,14 @@ Tcl_ReapDetachedProcs()
  */
 
 int
-TclCleanupChildren(interp, numPids, pidPtr, errorChan)
-    Tcl_Interp *interp;                /* Used for error messages. */
-    int numPids;               /* Number of entries in pidPtr array. */
-    pid_t *pidPtr;             /* Array of process ids of children. */
-    Tcl_Channel errorChan;     /* Channel for file containing stderr output
+TclCleanupChildren(
+    Tcl_Interp *interp,                /* Used for error messages. */
+    int numPids,               /* Number of entries in pidPtr array. */
+    pid_t *pidPtr,             /* Array of process ids of children. */
+    Tcl_Channel errorChan      /* Channel for file containing stderr output
                                 * from pipeline.  NULL means there isn't any
                                 * stderr output. */
+)
 {
     int result = TCL_OK;
     pid_t pid;
@@ -735,30 +740,29 @@ TclCleanupChildren(interp, numPids, pidPtr, errorChan)
  */
 
 int
-TclCreatePipeline(interp, argc, argv, pidArrayPtr, inPipePtr,
-       outPipePtr, errFilePtr)
-    Tcl_Interp *interp;                /* Interpreter to use for error reporting. */
-    int argc;                  /* Number of entries in argv. */
-    char **argv;               /* Array of strings describing commands in
+TclCreatePipeline(
+    Tcl_Interp *interp,                /* Interpreter to use for error reporting. */
+    int argc,                  /* Number of entries in argv. */
+    char **argv,               /* Array of strings describing commands in
                                 * pipeline plus I/O redirection with <,
                                 * <<,  >, etc.  Argv[argc] must be NULL. */
-    pid_t **pidArrayPtr;       /* Word at *pidArrayPtr gets filled in with
+    pid_t **pidArrayPtr,       /* Word at *pidArrayPtr gets filled in with
                                 * address of array of pids for processes
                                 * in pipeline (first pid is first process
                                 * in pipeline). */
-    Tcl_File *inPipePtr;       /* If non-NULL, input to the pipeline comes
+    Tcl_File *inPipePtr,       /* If non-NULL, input to the pipeline comes
                                 * from a pipe (unless overridden by
                                 * redirection in the command).  The file
                                 * id with which to write to this pipe is
                                 * stored at *inPipePtr.  NULL means command
                                 * specified its own input source. */
-    Tcl_File *outPipePtr;      /* If non-NULL, output to the pipeline goes
+    Tcl_File *outPipePtr,      /* If non-NULL, output to the pipeline goes
                                 * to a pipe, unless overriden by redirection
                                 * in the command.  The file id with which to
                                 * read frome this pipe is stored at
                                 * *outPipePtr.  NULL means command specified
                                 * its own output sink. */
-    Tcl_File *errFilePtr;      /* If non-NULL, all stderr output from the
+    Tcl_File *errFilePtr       /* If non-NULL, all stderr output from the
                                 * pipeline will go to a temporary file
                                 * created here, and a descriptor to read
                                 * the file will be left at *errFilePtr.
@@ -769,6 +773,7 @@ TclCreatePipeline(interp, argc, argv, pidArrayPtr, inPipePtr,
                                 * If the pipeline specifies redirection
                                 * then the file will still be created
                                 * but it will never get any data. */
+)
 {
 #if defined( MAC_TCL )
     Tcl_AppendResult(interp,
@@ -1143,7 +1148,7 @@ error:
  */
 
 int
-Tcl_GetErrno()
+Tcl_GetErrno(void)
 {
     return errno;
 }
@@ -1165,8 +1170,9 @@ Tcl_GetErrno()
  */
 
 void
-Tcl_SetErrno(err)
-    int err;                   /* The new value. */
+Tcl_SetErrno(
+    int err                    /* The new value. */
+)
 {
     errno = err;
 }
@@ -1192,9 +1198,10 @@ Tcl_SetErrno(err)
  */
 
 char *
-Tcl_PosixError(interp)
-    Tcl_Interp *interp;                /* Interpreter whose $errorCode variable
+Tcl_PosixError(
+    Tcl_Interp *interp         /* Interpreter whose $errorCode variable
                                 * is to be changed. */
+)
 {
     char *id, *msg;
 
@@ -1239,13 +1246,14 @@ Tcl_PosixError(interp)
  */
 
 Tcl_Channel
-Tcl_OpenCommandChannel(interp, argc, argv, flags)
-    Tcl_Interp *interp;                /* Interpreter for error reporting. Can
+Tcl_OpenCommandChannel(
+    Tcl_Interp *interp,                /* Interpreter for error reporting. Can
                                  * NOT be NULL. */
-    int argc;                  /* How many arguments. */
-    char **argv;               /* Array of arguments for command pipe. */
-    int flags;                 /* Or'ed combination of TCL_STDIN, TCL_STDOUT,
+    int argc,                  /* How many arguments. */
+    char **argv,               /* Array of arguments for command pipe. */
+    int flags                  /* Or'ed combination of TCL_STDIN, TCL_STDOUT,
                                 * TCL_STDERR, and TCL_ENFORCE_MODE. */
+)
 {
     Tcl_File *inPipePtr, *outPipePtr, *errFilePtr;
     Tcl_File inPipe, outPipe, errFile;
index 7126f42d5a2a1ecf363748f1f4bcfe1b598dcdb3..2edc352f565c6214e5b0bb44914953faae0820ff 100644 (file)
@@ -233,16 +233,17 @@ static int TclCommandsToKeepCt =
  */
 
 int
-TclPreventAliasLoop(interp, cmdInterp, cmdName, proc, clientData)
-    Tcl_Interp *interp;                        /* Interp in which to report errors. */
-    Tcl_Interp *cmdInterp;             /* Interp in which the command is
+TclPreventAliasLoop(
+    Tcl_Interp *interp,                        /* Interp in which to report errors. */
+    Tcl_Interp *cmdInterp,             /* Interp in which the command is
                                          * being defined. */
-    char *cmdName;                     /* Name of Tcl command we are
+    char *cmdName,                     /* Name of Tcl command we are
                                          * attempting to define. */
-    Tcl_CmdProc *proc;                 /* The command procedure for the
+    Tcl_CmdProc *proc,                 /* The command procedure for the
                                          * command being created. */
-    ClientData clientData;             /* The client data associated with the
+    ClientData clientData              /* The client data associated with the
                                          * command to be created. */
+)
 {
     Alias *aliasPtr, *nextAliasPtr;
     Tcl_CmdInfo cmdInfo;
@@ -321,8 +322,9 @@ TclPreventAliasLoop(interp, cmdInterp, cmdName, proc, clientData)
  */
 
 static int
-MakeSafe(interp)
-    Tcl_Interp *interp;                /* Interpreter to be made safe. */
+MakeSafe(
+    Tcl_Interp *interp         /* Interpreter to be made safe. */
+)
 {
     char **argv;                               /* Args for Tcl_Eval. */
     int argc, keep, i, j;                      /* Loop indices. */
@@ -403,11 +405,12 @@ MakeSafe(interp)
  */
 
 static Tcl_Interp *
-GetInterp(interp, masterPtr, path, masterPtrPtr)
-    Tcl_Interp *interp;                /* Interp. to start search from. */
-    Master *masterPtr;         /* Its master record. */
-    char *path;                        /* The path (name) of interp. to be found. */
-    Master **masterPtrPtr;     /* (Return) its master record. */
+GetInterp(
+    Tcl_Interp *interp,                /* Interp. to start search from. */
+    Master *masterPtr,         /* Its master record. */
+    char *path,                        /* The path (name) of interp. to be found. */
+    Master **masterPtrPtr      /* (Return) its master record. */
+)
 {
     Tcl_HashEntry *hPtr;       /* Search element. */
     Slave *slavePtr;           /* Interim slave record. */
@@ -466,10 +469,11 @@ GetInterp(interp, masterPtr, path, masterPtrPtr)
  */
 
 static Tcl_Interp *
-CreateSlave(interp, slavePath, safe)
-    Tcl_Interp *interp;                        /* Interp. to start search from. */
-    char *slavePath;                   /* Path (name) of slave to create. */
-    int safe;                          /* Should we make it "safe"? */
+CreateSlave(
+    Tcl_Interp *interp,                        /* Interp. to start search from. */
+    char *slavePath,                   /* Path (name) of slave to create. */
+    int safe                           /* Should we make it "safe"? */
+)
 {
     Master *masterPtr;                 /* Master record. */
     Tcl_Interp *slaveInterp;           /* Ptr to slave interpreter. */
@@ -577,10 +581,11 @@ CreateSlave(interp, slavePath, safe)
  */
 
 static int
-CreateInterpObject(interp, argc, argv)
-    Tcl_Interp *interp;                        /* Invoking interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+CreateInterpObject(
+    Tcl_Interp *interp,                        /* Invoking interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int safe;                          /* Create a safe interpreter? */
     Master *masterPtr;                 /* Master record. */
@@ -656,9 +661,10 @@ CreateInterpObject(interp, argc, argv)
  */
 
 static int
-DeleteOneInterpObject(interp, path)
-    Tcl_Interp *interp;                        /* Interpreter for reporting errors. */
-    char *path;                                /* Path of interpreter to delete. */
+DeleteOneInterpObject(
+    Tcl_Interp *interp,                        /* Interpreter for reporting errors. */
+    char *path                         /* Path of interpreter to delete. */
+)
 {
     Master *masterPtr;                 /* Interim storage for master record.*/
     Slave *slavePtr;                   /* Interim storage for slave record. */
@@ -736,11 +742,12 @@ DeleteOneInterpObject(interp, path)
  */
 
 static int
-DeleteInterpObject(interp, argc, argv)
-    Tcl_Interp *interp;                        /* Interpreter start search from. */
-    int argc;                          /* Number of arguments in vector. */
-    char **argv;                       /* Contains path to interps to
+DeleteInterpObject(
+    Tcl_Interp *interp,                        /* Interpreter start search from. */
+    int argc,                          /* Number of arguments in vector. */
+    char **argv                                /* Contains path to interps to
                                          * delete. */
+)
 {
     int i;
     
@@ -771,18 +778,18 @@ DeleteInterpObject(interp, argc, argv)
  */
 
 static int
-AliasHelper(curInterp, slaveInterp, masterInterp, masterPtr,
-     aliasName, targetName, argc, argv)
-    Tcl_Interp *curInterp;             /* Interp that invoked this proc. */
-    Tcl_Interp *slaveInterp;           /* Interp where alias cmd will live
+AliasHelper(
+    Tcl_Interp *curInterp,             /* Interp that invoked this proc. */
+    Tcl_Interp *slaveInterp,           /* Interp where alias cmd will live
                                          * or from which alias will be
                                          * deleted. */
-    Tcl_Interp *masterInterp;          /* Interp where target cmd will be. */
-    Master *masterPtr;                 /* Master record for target interp. */
-    char *aliasName;                   /* Name of alias cmd. */
-    char *targetName;                  /* Name of target cmd. */
-    int argc;                          /* Additional arguments to store */
-    char **argv;                       /* with alias. */
+    Tcl_Interp *masterInterp,          /* Interp where target cmd will be. */
+    Master *masterPtr,                 /* Master record for target interp. */
+    char *aliasName,                   /* Name of alias cmd. */
+    char *targetName,                  /* Name of target cmd. */
+    int argc,                          /* Additional arguments to store */
+    char **argv                                /* with alias. */
+)
 {
     Alias *aliasPtr;                   /* Storage for alias data. */
     Alias *tmpAliasPtr;                        /* Temp storage for alias to delete. */
@@ -916,10 +923,11 @@ AliasHelper(curInterp, slaveInterp, masterInterp, masterPtr,
  */
 
 static int
-SlaveAliasHelper(interp, argc, argv)
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+SlaveAliasHelper(
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Master *masterPtr;                 /* Master record for current interp. */
     Tcl_Interp *slaveInterp,           /* Interpreters used when */
@@ -983,10 +991,11 @@ SlaveAliasHelper(interp, argc, argv)
  */
 
 static int
-DescribeAlias(interp, slaveInterp, aliasName)
-    Tcl_Interp *interp;                /* Interpreter for result and errors. */
-    Tcl_Interp *slaveInterp;   /* Interpreter defining alias. */
-    char *aliasName;           /* Name of alias to describe. */
+DescribeAlias(
+    Tcl_Interp *interp,                /* Interpreter for result and errors. */
+    Tcl_Interp *slaveInterp,   /* Interpreter defining alias. */
+    char *aliasName            /* Name of alias to describe. */
+)
 {
     Slave *slavePtr;           /* Slave record for slave interpreter. */
     Tcl_HashEntry *hPtr;       /* Search variable. */
@@ -1028,10 +1037,11 @@ DescribeAlias(interp, slaveInterp, aliasName)
  */
 
 static int
-DeleteAlias(interp, slaveInterp, aliasName)
-    Tcl_Interp *interp;                /* Interpreter for result and errors. */
-    Tcl_Interp *slaveInterp;   /* Interpreter defining alias. */
-    char *aliasName;           /* Name of alias to delete. */
+DeleteAlias(
+    Tcl_Interp *interp,                /* Interpreter for result and errors. */
+    Tcl_Interp *slaveInterp,   /* Interpreter defining alias. */
+    char *aliasName            /* Name of alias to delete. */
+)
 {
     Slave *slavePtr;           /* Slave record for slave interpreter. */
     Tcl_HashEntry *hPtr;       /* Search variable. */
@@ -1101,9 +1111,10 @@ DeleteAlias(interp, slaveInterp, aliasName)
  */
 
 int
-Tcl_GetInterpPath(askingInterp, targetInterp)
-    Tcl_Interp *askingInterp;  /* Interpreter to start search from. */
-    Tcl_Interp *targetInterp;  /* Interpreter to find. */
+Tcl_GetInterpPath(
+    Tcl_Interp *askingInterp,  /* Interpreter to start search from. */
+    Tcl_Interp *targetInterp   /* Interpreter to find. */
+)
 {
     Master *masterPtr;         /* Interim storage for Master record. */
     Slave *slavePtr;           /* Interim storage for Slave record. */
@@ -1154,10 +1165,11 @@ Tcl_GetInterpPath(askingInterp, targetInterp)
  */
 
 static int
-GetTarget(askingInterp, path, aliasName)
-    Tcl_Interp *askingInterp;  /* Interpreter to start search from. */
-    char *path;                        /* The path of the interp to find. */
-    char *aliasName;           /* The target of this allias. */
+GetTarget(
+    Tcl_Interp *askingInterp,  /* Interpreter to start search from. */
+    char *path,                        /* The path of the interp to find. */
+    char *aliasName            /* The target of this allias. */
+)
 {
     Tcl_Interp *slaveInterp;   /* Interim storage for slave. */
     Slave *slaveSlavePtr;      /* Its Slave record. */
@@ -1221,11 +1233,12 @@ GetTarget(askingInterp, path, aliasName)
  */
        /* ARGSUSED */
 int
-Tcl_InterpCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Unused. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_InterpCmd(
+    ClientData clientData,             /* Unused. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Interp *slaveInterp;           /* A slave. */
     Tcl_Interp *masterInterp;          /* A master. */
@@ -1524,11 +1537,12 @@ Tcl_InterpCmd(clientData, interp, argc, argv)
  */
 
 static int
-SlaveObjectCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Slave interpreter. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+SlaveObjectCmd(
+    ClientData clientData,             /* Slave interpreter. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Master *masterPtr;                 /* Master record for slave interp. */
     Slave *slavePtr;                   /* Slave record. */
@@ -1710,8 +1724,9 @@ SlaveObjectCmd(clientData, interp, argc, argv)
  */
 
 static void
-SlaveObjectDeleteProc(clientData)
-    ClientData clientData;             /* The SlaveRecord for the command. */
+SlaveObjectDeleteProc(
+    ClientData clientData              /* The SlaveRecord for the command. */
+)
 {
     Slave *slavePtr;                   /* Interim storage for Slave record. */
     Tcl_Interp *slaveInterp;           /* And for a slave interp. */
@@ -1773,11 +1788,12 @@ SlaveObjectDeleteProc(clientData)
  */
 
 static int
-AliasCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Alias record. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+AliasCmd(
+    ClientData clientData,             /* Alias record. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Alias *aliasPtr;                   /* Describes the alias. */
     Tcl_CmdInfo cmdInfo;               /* Info about target command. */
@@ -1926,8 +1942,9 @@ AliasCmd(clientData, interp, argc, argv)
  */
 
 static void
-AliasCmdDeleteProc(clientData)
-    ClientData clientData;             /* The alias record for this alias. */
+AliasCmdDeleteProc(
+    ClientData clientData              /* The alias record for this alias. */
+)
 {
     Alias *aliasPtr;                   /* Alias record for alias to delete. */
     Target *targetPtr;                 /* Record for target of this alias. */
@@ -1972,9 +1989,10 @@ AliasCmdDeleteProc(clientData)
  */
 
 static void
-MasterRecordDeleteProc(clientData, interp)
-    ClientData clientData;             /* Master record for deleted interp. */
-    Tcl_Interp *interp;                        /* Interpreter being deleted. */
+MasterRecordDeleteProc(
+    ClientData clientData,             /* Master record for deleted interp. */
+    Tcl_Interp *interp                 /* Interpreter being deleted. */
+)
 {
     Target *targetPtr;                 /* Loop variable. */
     Tcl_HashEntry *hPtr;               /* Search element. */
@@ -2025,9 +2043,10 @@ MasterRecordDeleteProc(clientData, interp)
  */
 
 static void
-SlaveRecordDeleteProc(clientData, interp)
-    ClientData clientData;             /* Slave record for deleted interp. */
-    Tcl_Interp *interp;                        /* Interpreter being deleted. */
+SlaveRecordDeleteProc(
+    ClientData clientData,             /* Slave record for deleted interp. */
+    Tcl_Interp *interp                 /* Interpreter being deleted. */
+)
 {
     Slave *slavePtr;                   /* Interim storage. */
     Alias *aliasPtr;
@@ -2128,8 +2147,9 @@ SlaveRecordDeleteProc(clientData, interp)
  */
 
 int
-TclInterpInit(interp)
-    Tcl_Interp *interp;                        /* Interpreter to initialize. */
+TclInterpInit(
+    Tcl_Interp *interp                 /* Interpreter to initialize. */
+)
 {
     Master *masterPtr;                 /* Its Master record. */
 
@@ -2161,8 +2181,9 @@ TclInterpInit(interp)
  */
 
 int
-Tcl_IsSafe(interp)
-    Tcl_Interp *interp;                /* Is this interpreter "safe" ? */
+Tcl_IsSafe(
+    Tcl_Interp *interp         /* Is this interpreter "safe" ? */
+)
 {
     Master *masterPtr;         /* Its master record. */
 
@@ -2193,8 +2214,9 @@ Tcl_IsSafe(interp)
  */
 
 int
-Tcl_MakeSafe(interp)
-    Tcl_Interp *interp;                /* Make this interpreter "safe". */
+Tcl_MakeSafe(
+    Tcl_Interp *interp         /* Make this interpreter "safe". */
+)
 {
     if (interp == (Tcl_Interp *) NULL) {
         return TCL_ERROR;
@@ -2226,10 +2248,11 @@ Tcl_MakeSafe(interp)
  */
 
 Tcl_Interp *
-Tcl_CreateSlave(interp, slavePath, isSafe)
-    Tcl_Interp *interp;                /* Interpreter to start search at. */
-    char *slavePath;           /* Name of slave to create. */
-    int isSafe;                        /* Should new slave be "safe" ? */
+Tcl_CreateSlave(
+    Tcl_Interp *interp,                /* Interpreter to start search at. */
+    char *slavePath,           /* Name of slave to create. */
+    int isSafe                 /* Should new slave be "safe" ? */
+)
 {
     if ((interp == (Tcl_Interp *) NULL) || (slavePath == (char *) NULL)) {
         return NULL;
@@ -2255,9 +2278,10 @@ Tcl_CreateSlave(interp, slavePath, isSafe)
  */
 
 Tcl_Interp *
-Tcl_GetSlave(interp, slavePath)
-    Tcl_Interp *interp;                /* Interpreter to start search from. */
-    char *slavePath;           /* Path of slave to find. */
+Tcl_GetSlave(
+    Tcl_Interp *interp,                /* Interpreter to start search from. */
+    char *slavePath            /* Path of slave to find. */
+)
 {
     Master *masterPtr;         /* Interim storage for Master record. */
 
@@ -2288,8 +2312,9 @@ Tcl_GetSlave(interp, slavePath)
  */
 
 Tcl_Interp *
-Tcl_GetMaster(interp)
-    Tcl_Interp *interp;                /* Get the master of this interpreter. */
+Tcl_GetMaster(
+    Tcl_Interp *interp         /* Get the master of this interpreter. */
+)
 {
     Slave *slavePtr;           /* Slave record of this interpreter. */
 
@@ -2321,13 +2346,14 @@ Tcl_GetMaster(interp)
  */
 
 int
-Tcl_CreateAlias(slaveInterp, slaveCmd, targetInterp, targetCmd, argc, argv)
-    Tcl_Interp *slaveInterp;           /* Interpreter for source command. */
-    char *slaveCmd;                    /* Command to install in slave. */
-    Tcl_Interp *targetInterp;          /* Interpreter for target command. */
-    char *targetCmd;                   /* Name of target command. */
-    int argc;                          /* How many additional arguments? */
-    char **argv;                       /* These are the additional args. */
+Tcl_CreateAlias(
+    Tcl_Interp *slaveInterp,           /* Interpreter for source command. */
+    char *slaveCmd,                    /* Command to install in slave. */
+    Tcl_Interp *targetInterp,          /* Interpreter for target command. */
+    char *targetCmd,                   /* Name of target command. */
+    int argc,                          /* How many additional arguments? */
+    char **argv                                /* These are the additional args. */
+)
 {
     Master *masterPtr;                 /* Master record for target interp. */
 
@@ -2365,14 +2391,14 @@ Tcl_CreateAlias(slaveInterp, slaveCmd, targetInterp, targetCmd, argc, argv)
  */
 
 int
-Tcl_GetAlias(interp, aliasName, targetInterpPtr, targetNamePtr, argcPtr,
-        argvPtr)
-    Tcl_Interp *interp;                        /* Interp to start search from. */
-    char *aliasName;                   /* Name of alias to find. */
-    Tcl_Interp **targetInterpPtr;      /* (Return) target interpreter. */
-    char **targetNamePtr;              /* (Return) name of target command. */
-    int *argcPtr;                      /* (Return) count of addnl args. */
-    char ***argvPtr;                   /* (Return) additional arguments. */
+Tcl_GetAlias(
+    Tcl_Interp *interp,                        /* Interp to start search from. */
+    char *aliasName,                   /* Name of alias to find. */
+    Tcl_Interp **targetInterpPtr,      /* (Return) target interpreter. */
+    char **targetNamePtr,              /* (Return) name of target command. */
+    int *argcPtr,                      /* (Return) count of addnl args. */
+    char ***argvPtr                    /* (Return) additional arguments. */
+)
 {
     Slave *slavePtr;                   /* Slave record for slave interp. */
     Tcl_HashEntry *hPtr;               /* Search element. */
index c5799b2ecdbd80d5c3944fed3a8908e4bbefda06..15f0c33ee2822aa979a1a343eee27f36d6f3a037 100644 (file)
@@ -94,14 +94,15 @@ static char *               StringValue _ANSI_ARGS_((Link *linkPtr,
  */
 
 int
-Tcl_LinkVar(interp, varName, addr, type)
-    Tcl_Interp *interp;                /* Interpreter in which varName exists. */
-    char *varName;             /* Name of a global variable in interp. */
-    char *addr;                        /* Address of a C variable to be linked
+Tcl_LinkVar(
+    Tcl_Interp *interp,                /* Interpreter in which varName exists. */
+    char *varName,             /* Name of a global variable in interp. */
+    char *addr,                        /* Address of a C variable to be linked
                                 * to varName. */
-    int type;                  /* Type of C variable: TCL_LINK_INT, etc. 
+    int type                   /* Type of C variable: TCL_LINK_INT, etc. 
                                 * Also may have TCL_LINK_READ_ONLY
                                 * OR'ed in. */
+)
 {
     Link *linkPtr;
     char buffer[TCL_DOUBLE_SPACE];
@@ -149,9 +150,10 @@ Tcl_LinkVar(interp, varName, addr, type)
  */
 
 void
-Tcl_UnlinkVar(interp, varName)
-    Tcl_Interp *interp;                /* Interpreter containing variable to unlink. */
-    char *varName;             /* Global variable in interp to unlink. */
+Tcl_UnlinkVar(
+    Tcl_Interp *interp,                /* Interpreter containing variable to unlink. */
+    char *varName              /* Global variable in interp to unlink. */
+)
 {
     Link *linkPtr;
 
@@ -187,9 +189,10 @@ Tcl_UnlinkVar(interp, varName)
  */
 
 void
-Tcl_UpdateLinkedVar(interp, varName)
-    Tcl_Interp *interp;                /* Interpreter containing variable. */
-    char *varName;             /* Name of global variable that is linked. */
+Tcl_UpdateLinkedVar(
+    Tcl_Interp *interp,                /* Interpreter containing variable. */
+    char *varName              /* Name of global variable that is linked. */
+)
 {
     Link *linkPtr;
     char buffer[TCL_DOUBLE_SPACE];
@@ -225,12 +228,13 @@ Tcl_UpdateLinkedVar(interp, varName)
  */
 
 static char *
-LinkTraceProc(clientData, interp, name1, name2, flags)
-    ClientData clientData;     /* Contains information about the link. */
-    Tcl_Interp *interp;                /* Interpreter containing Tcl variable. */
-    char *name1;               /* First part of variable name. */
-    char *name2;               /* Second part of variable name. */
-    int flags;                 /* Miscellaneous additional information. */
+LinkTraceProc(
+    ClientData clientData,     /* Contains information about the link. */
+    Tcl_Interp *interp,                /* Interpreter containing Tcl variable. */
+    char *name1,               /* First part of variable name. */
+    char *name2,               /* Second part of variable name. */
+    int flags                  /* Miscellaneous additional information. */
+)
 {
     Link *linkPtr = (Link *) clientData;
     int changed;
@@ -373,11 +377,12 @@ LinkTraceProc(clientData, interp, name1, name2, flags)
  */
 
 static char *
-StringValue(linkPtr, buffer)
-    Link *linkPtr;             /* Structure describing linked variable. */
-    char *buffer;              /* Small buffer to use for converting
+StringValue(
+    Link *linkPtr,             /* Structure describing linked variable. */
+    char *buffer               /* Small buffer to use for converting
                                 * values.  Must have TCL_DOUBLE_SPACE
                                 * bytes or more. */
+)
 {
     char *p;
 
index 65fdbb19d9480b961354b66f9802de975fe2a88d..4a5d063f087bab3cdbebd1052d5e198d769f13e0 100644 (file)
@@ -117,11 +117,12 @@ static void               LoadExitProc _ANSI_ARGS_((ClientData clientData));
  */
 
 int
-Tcl_LoadCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_LoadCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Interp *target;
     LoadedPackage *pkgPtr;
@@ -430,23 +431,24 @@ Tcl_LoadCmd(dummy, interp, argc, argv)
  */
 
 void
-Tcl_StaticPackage(interp, pkgName, initProc, safeInitProc)
-    Tcl_Interp *interp;                        /* If not NULL, it means that the
+Tcl_StaticPackage(
+    Tcl_Interp *interp,                        /* If not NULL, it means that the
                                         * package has already been loaded
                                         * into the given interpreter by
                                         * calling the appropriate init proc. */
-    char *pkgName;                     /* Name of package (must be properly
+    char *pkgName,                     /* Name of package (must be properly
                                         * capitalized: first letter upper
                                         * case, others lower case). */
-    Tcl_PackageInitProc *initProc;     /* Procedure to call to incorporate
+    Tcl_PackageInitProc *initProc,     /* Procedure to call to incorporate
                                         * this package into a trusted
                                         * interpreter. */
-    Tcl_PackageInitProc *safeInitProc; /* Procedure to call to incorporate
+    Tcl_PackageInitProc *safeInitProc  /* Procedure to call to incorporate
                                         * this package into a safe interpreter
                                         * (one that will execute untrusted
                                         * scripts).   NULL means the package
                                         * can't be used in safe
                                         * interpreters. */
+)
 {
     LoadedPackage *pkgPtr;
     InterpPackage *ipPtr, *ipFirstPtr;
@@ -500,13 +502,14 @@ Tcl_StaticPackage(interp, pkgName, initProc, safeInitProc)
  */
 
 int
-TclGetLoadedPackages(interp, targetName)
-    Tcl_Interp *interp;                /* Interpreter in which to return
+TclGetLoadedPackages(
+    Tcl_Interp *interp,                /* Interpreter in which to return
                                 * information or error message. */
-    char *targetName;          /* Name of target interpreter or NULL.
+    char *targetName           /* Name of target interpreter or NULL.
                                 * If NULL, return info about all interps;
                                 * otherwise, just return info about this
                                 * interpreter. */
+)
 {
     Tcl_Interp *target;
     LoadedPackage *pkgPtr;
@@ -575,10 +578,11 @@ TclGetLoadedPackages(interp, targetName)
  */
 
 static void
-LoadCleanupProc(clientData, interp)
-    ClientData clientData;     /* Pointer to first InterpPackage structure
+LoadCleanupProc(
+    ClientData clientData,     /* Pointer to first InterpPackage structure
                                 * for interp. */
-    Tcl_Interp *interp;                /* Interpreter that is being deleted. */
+    Tcl_Interp *interp         /* Interpreter that is being deleted. */
+)
 {
     InterpPackage *ipPtr, *nextPtr;
 
@@ -608,8 +612,9 @@ LoadCleanupProc(clientData, interp)
  */
 
 static void
-LoadExitProc(clientData)
-    ClientData clientData;             /* Not used. */
+LoadExitProc(
+    ClientData clientData              /* Not used. */
+)
 {
     LoadedPackage *pkgPtr;
 
index d5eaae370f5ea8980fda926e43d0dc46e6bb8e41..408afd3f88d890cd45c9a4cac65173f3554f4056 100644 (file)
  */
 
 int
-TclLoadFile(interp, fileName, sym1, sym2, proc1Ptr, proc2Ptr)
-    Tcl_Interp *interp;                /* Used for error reporting. */
-    char *fileName;            /* Name of the file containing the desired
+TclLoadFile(
+    Tcl_Interp *interp,                /* Used for error reporting. */
+    char *fileName,            /* Name of the file containing the desired
                                 * code. */
-    char *sym1, *sym2;         /* Names of two procedures to look up in
+    char *sym1, char *sym2,    /* Names of two procedures to look up in
                                 * the file's symbol table. */
-    Tcl_PackageInitProc **proc1Ptr, **proc2Ptr;
+    Tcl_PackageInitProc **proc1Ptr, Tcl_PackageInitProc **proc2Ptr
                                /* Where to return the addresses corresponding
                                 * to sym1 and sym2. */
+)
 {
     interp->result =
            "dynamic loading is not currently available on this system";
@@ -94,11 +95,12 @@ TclLoadFile(interp, fileName, sym1, sym2, proc1Ptr, proc2Ptr)
  */
 
 int
-TclGuessPackageName(fileName, bufPtr)
-    char *fileName;            /* Name of file containing package (already
+TclGuessPackageName(
+    char *fileName,            /* Name of file containing package (already
                                 * translated to local form if needed). */
-    Tcl_DString *bufPtr;       /* Initialized empty dstring.  Append
+    Tcl_DString *bufPtr                /* Initialized empty dstring.  Append
                                 * package name to this if possible. */
+)
 {
     return 0;
 }
index 5af2d7ffb884004981c8c7f46bdb2ee3c5ecd125..e41354fc3552642843566396c3ca700a571f9afd 100644 (file)
@@ -100,13 +100,14 @@ static int                CheckmemCmd _ANSI_ARGS_((ClientData clientData,
  */
 
 void
-Tcl_Main(argc, argv, appInitProc)
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Array of argument strings. */
-    Tcl_AppInitProc *appInitProc;      /* Application-specific initialization
+Tcl_Main(
+    int argc,                          /* Number of arguments. */
+    char **argv,                       /* Array of argument strings. */
+    Tcl_AppInitProc *appInitProc       /* Application-specific initialization
                                         * procedure to call after most
                                         * initialization but before starting
                                         * to execute commands. */
+)
 {
     char buffer[1000], *cmd, *args, *fileName;
     int code, gotPartial, tty, length;
@@ -350,11 +351,12 @@ done:
 
        /* ARGSUSED */
 static int
-CheckmemCmd(clientData, interp, argc, argv)
-    ClientData clientData;             /* Not used. */
-    Tcl_Interp *interp;                        /* Interpreter for evaluation. */
-    int argc;                          /* Number of arguments. */
-    char *argv[];                      /* String values of arguments. */
+CheckmemCmd(
+    ClientData clientData,             /* Not used. */
+    Tcl_Interp *interp,                        /* Interpreter for evaluation. */
+    int argc,                          /* Number of arguments. */
+    char *argv[]                       /* String values of arguments. */
+)
 {
     extern char *tclMemDumpFileName;
     if (argc != 2) {
index 2574fb6635e2e9bd3569d20f751c20146ff65272..5fe36df55ffc74799fbe7112c1f175af08efbe20 100644 (file)
@@ -127,13 +127,14 @@ static int                ServiceEvent _ANSI_ARGS_((int flags));
  */
 
 void
-Tcl_CreateEventSource(setupProc, checkProc, clientData)
-    Tcl_EventSetupProc *setupProc;     /* Procedure to invoke to figure out
+Tcl_CreateEventSource(
+    Tcl_EventSetupProc *setupProc,     /* Procedure to invoke to figure out
                                         * what to wait for. */
-    Tcl_EventCheckProc *checkProc;     /* Procedure to call after waiting
+    Tcl_EventCheckProc *checkProc,     /* Procedure to call after waiting
                                         * to see what happened. */
-    ClientData clientData;             /* One-word argument to pass to
+    ClientData clientData              /* One-word argument to pass to
                                         * setupProc and checkProc. */
+)
 {
     TclEventSource *sourcePtr;
 
@@ -165,13 +166,14 @@ Tcl_CreateEventSource(setupProc, checkProc, clientData)
  */
 
 void
-Tcl_DeleteEventSource(setupProc, checkProc, clientData)
-    Tcl_EventSetupProc *setupProc;     /* Procedure to invoke to figure out
+Tcl_DeleteEventSource(
+    Tcl_EventSetupProc *setupProc,     /* Procedure to invoke to figure out
                                         * what to wait for. */
-    Tcl_EventCheckProc *checkProc;     /* Procedure to call after waiting
+    Tcl_EventCheckProc *checkProc,     /* Procedure to call after waiting
                                         * to see what happened. */
-    ClientData clientData;             /* One-word argument to pass to
+    ClientData clientData              /* One-word argument to pass to
                                         * setupProc and checkProc. */
+)
 {
     TclEventSource *sourcePtr, *prevPtr;
 
@@ -215,15 +217,16 @@ Tcl_DeleteEventSource(setupProc, checkProc, clientData)
  */
 
 void
-Tcl_QueueEvent(evPtr, position)
-    Tcl_Event* evPtr;          /* Event to add to queue.  The storage
+Tcl_QueueEvent(
+    Tcl_Event* evPtr,          /* Event to add to queue.  The storage
                                 * space must have been allocated the caller
                                 * with malloc (ckalloc), and it becomes
                                 * the property of the event queue.  It
                                 * will be freed after the event has been
                                 * handled. */
-    Tcl_QueuePosition position;        /* One of TCL_QUEUE_TAIL, TCL_QUEUE_HEAD,
+    Tcl_QueuePosition position /* One of TCL_QUEUE_TAIL, TCL_QUEUE_HEAD,
                                 * TCL_QUEUE_MARK. */
+)
 {
     if (position == TCL_QUEUE_TAIL) {
        /*
@@ -286,9 +289,10 @@ Tcl_QueueEvent(evPtr, position)
  */
 
 void
-Tcl_DeleteEvents(proc, clientData)
-    Tcl_EventDeleteProc *proc;         /* The procedure to call. */
-    ClientData clientData;             /* type-specific data. */
+Tcl_DeleteEvents(
+    Tcl_EventDeleteProc *proc,         /* The procedure to call. */
+    ClientData clientData              /* type-specific data. */
+)
 {
     Tcl_Event *evPtr, *prevPtr, *hold;
 
@@ -335,13 +339,14 @@ Tcl_DeleteEvents(proc, clientData)
  */
 
 static int
-ServiceEvent(flags)
-    int flags;                 /* Indicates what events should be processed.
+ServiceEvent(
+    int flags                  /* Indicates what events should be processed.
                                 * May be any combination of TCL_WINDOW_EVENTS
                                 * TCL_FILE_EVENTS, TCL_TIMER_EVENTS, or other
                                 * flags defined elsewhere.  Events not
                                 * matching this will be skipped for processing
                                 * later. */
+)
 {
     Tcl_Event *evPtr, *prevPtr;
     Tcl_EventProc *proc;
@@ -438,10 +443,11 @@ ServiceEvent(flags)
  */
 
 void
-Tcl_SetMaxBlockTime(timePtr)
-    Tcl_Time *timePtr;         /* Specifies a maximum elapsed time for
+Tcl_SetMaxBlockTime(
+    Tcl_Time *timePtr          /* Specifies a maximum elapsed time for
                                 * the next blocking operation in the
                                 * event notifier. */
+)
 {
     if (!blockTimeSet || (timePtr->sec < blockTime.sec)
            || ((timePtr->sec == blockTime.sec)
@@ -475,12 +481,13 @@ Tcl_SetMaxBlockTime(timePtr)
  */
 
 int
-Tcl_DoOneEvent(flags)
-    int flags;                 /* Miscellaneous flag values:  may be any
+Tcl_DoOneEvent(
+    int flags                  /* Miscellaneous flag values:  may be any
                                 * combination of TCL_DONT_WAIT,
                                 * TCL_WINDOW_EVENTS, TCL_FILE_EVENTS,
                                 * TCL_TIMER_EVENTS, TCL_IDLE_EVENTS, or
                                 * others defined by event sources. */
+)
 {
     TclEventSource *sourcePtr;
     Tcl_Time *timePtr;
index 3c855c4e2de8c088b4bc862a8653e234909e613e..ac0c832f789f959c0efcf9bdee5d67ddc466b18c 100644 (file)
@@ -192,13 +192,14 @@ static char *     VarNameEnd _ANSI_ARGS_((char *string));
  */
 
 char
-Tcl_Backslash(src, readPtr)
-    char *src;                 /* Points to the backslash character of
+Tcl_Backslash(
+    char *src,                 /* Points to the backslash character of
                                 * a backslash sequence. */
-    int *readPtr;              /* Fill in with number of characters read
+    int *readPtr               /* Fill in with number of characters read
                                 * from src, unless NULL. */
+)
 {
-    register char *p = src+1;
+    char *p = src+1;
     char result;
     int count;
 
@@ -307,21 +308,22 @@ Tcl_Backslash(src, readPtr)
  */
 
 int
-TclParseQuotes(interp, string, termChar, flags, termPtr, pvPtr)
-    Tcl_Interp *interp;                /* Interpreter to use for nested command
+TclParseQuotes(
+    Tcl_Interp *interp,                /* Interpreter to use for nested command
                                 * evaluations and error messages. */
-    char *string;              /* Character just after opening double-
+    char *string,              /* Character just after opening double-
                                 * quote. */
-    int termChar;              /* Character that terminates "quoted" string
+    int termChar,              /* Character that terminates "quoted" string
                                 * (usually double-quote, but sometimes
                                 * right-paren or something else). */
-    int flags;                 /* Flags to pass to nested Tcl_Eval calls. */
-    char **termPtr;            /* Store address of terminating character
+    int flags,                 /* Flags to pass to nested Tcl_Eval calls. */
+    char **termPtr,            /* Store address of terminating character
                                 * here. */
-    ParseValue *pvPtr;         /* Information about where to place
+    ParseValue *pvPtr          /* Information about where to place
                                 * fully-substituted result of parse. */
+)
 {
-    register char *src, *dst, c;
+    char *src, *dst, c;
 
     src = string;
     dst = pvPtr->next;
@@ -426,15 +428,16 @@ TclParseQuotes(interp, string, termChar, flags, termPtr, pvPtr)
  */
 
 int
-TclParseNestedCmd(interp, string, flags, termPtr, pvPtr)
-    Tcl_Interp *interp;                /* Interpreter to use for nested command
+TclParseNestedCmd(
+    Tcl_Interp *interp,                /* Interpreter to use for nested command
                                 * evaluations and error messages. */
-    char *string;              /* Character just after opening bracket. */
-    int flags;                 /* Flags to pass to nested Tcl_Eval. */
-    char **termPtr;            /* Store address of terminating character
+    char *string,              /* Character just after opening bracket. */
+    int flags,                 /* Flags to pass to nested Tcl_Eval. */
+    char **termPtr,            /* Store address of terminating character
                                 * here. */
-    register ParseValue *pvPtr;        /* Information about where to place
+    ParseValue *pvPtr  /* Information about where to place
                                 * result of command. */
+)
 {
     int result, length, shortfall;
     Interp *iPtr = (Interp *) interp;
@@ -494,18 +497,19 @@ TclParseNestedCmd(interp, string, flags, termPtr, pvPtr)
  */
 
 int
-TclParseBraces(interp, string, termPtr, pvPtr)
-    Tcl_Interp *interp;                /* Interpreter to use for nested command
+TclParseBraces(
+    Tcl_Interp *interp,                /* Interpreter to use for nested command
                                 * evaluations and error messages. */
-    char *string;              /* Character just after opening bracket. */
-    char **termPtr;            /* Store address of terminating character
-                                * here. */
-    register ParseValue *pvPtr;        /* Information about where to place
+    char *string,              /* Character just after opening bracket. */
+    char **termPtr,            /* Store address of terminating character
+                               * here. */
+    ParseValue *pvPtr  /* Information about where to place
                                 * result of command. */
+)
 {
     int level;
-    register char *src, *dst, *end;
-    register char c;
+    char *src, *dst, *end;
+    char c;
 
     src = string;
     dst = pvPtr->next;
@@ -620,23 +624,24 @@ TclParseBraces(interp, string, termPtr, pvPtr)
  */
 
 int
-TclParseWords(interp, string, flags, maxWords, termPtr, argcPtr, argv, pvPtr)
-    Tcl_Interp *interp;                /* Interpreter to use for nested command
+TclParseWords(
+    Tcl_Interp *interp,                /* Interpreter to use for nested command
                                 * evaluations and error messages. */
-    char *string;              /* First character of word. */
-    int flags;                 /* Flags to control parsing (same values as
+    char *string,              /* First character of word. */
+    int flags,                 /* Flags to control parsing (same values as
                                 * passed to Tcl_Eval). */
-    int maxWords;              /* Maximum number of words to parse. */
-    char **termPtr;            /* Store address of terminating character
+    int maxWords,              /* Maximum number of words to parse. */
+    char **termPtr,            /* Store address of terminating character
                                 * here. */
-    int *argcPtr;              /* Filled in with actual number of words
+    int *argcPtr,              /* Filled in with actual number of words
                                 * parsed. */
-    char **argv;               /* Store addresses of individual words here. */
-    register ParseValue *pvPtr;        /* Information about where to place
+    char **argv,               /* Store addresses of individual words here. */
+    ParseValue *pvPtr  /* Information about where to place
                                 * fully-substituted word. */
+)
 {
-    register char *src, *dst;
-    register char c;
+    char *src, *dst;
+    char c;
     int type, result, argc;
     char *oldBuffer;           /* Used to detect when pvPtr's buffer gets
                                 * reallocated, so we can adjust all of the
@@ -875,14 +880,15 @@ TclParseWords(interp, string, flags, maxWords, termPtr, argcPtr, argv, pvPtr)
  */
 
 void
-TclExpandParseValue(pvPtr, needed)
-    register ParseValue *pvPtr;                /* Information about buffer that
+TclExpandParseValue(
+    ParseValue *pvPtr,         /* Information about buffer that
                                         * must be expanded.  If the clientData
                                         * in the structure is non-zero, it
                                         * means that the current buffer is
                                         * dynamically allocated. */
-    int needed;                                /* Minimum amount of additional space
+    int needed                         /* Minimum amount of additional space
                                         * to allocate. */
+)
 {
     int newSpace;
     char *new;
@@ -937,16 +943,17 @@ TclExpandParseValue(pvPtr, needed)
  */
 
 char *
-TclWordEnd(start, nested, semiPtr)
-    char *start;               /* Beginning of a word of a Tcl command. */
-    int nested;                        /* Zero means this is a top-level command.
+TclWordEnd(
+    char *start,               /* Beginning of a word of a Tcl command. */
+    int nested,                        /* Zero means this is a top-level command.
                                 * One means this is a nested command (close
                                 * bracket is a word terminator). */
-    int *semiPtr;              /* Set to 1 if word ends with a command-
+    int *semiPtr               /* Set to 1 if word ends with a command-
                                 * terminating semi-colon, zero otherwise.
                                 * If NULL then ignored. */
+)
 {
-    register char *p;
+    char *p;
     int count;
 
     if (semiPtr != NULL) {
@@ -1086,13 +1093,14 @@ TclWordEnd(start, nested, semiPtr)
  */
 
 static char *
-QuoteEnd(string, term)
-    char *string;              /* Pointer to character just after opening
+QuoteEnd(
+    char *string,              /* Pointer to character just after opening
                                 * "quote". */
-    int term;                  /* This character will terminate the
+    int term                   /* This character will terminate the
                                 * quoted string (e.g. '"' or ')'). */
+)
 {
-    register char *p = string;
+    char *p = string;
     int count;
 
     while (*p != term) {
@@ -1143,10 +1151,11 @@ QuoteEnd(string, term)
  */
 
 static char *
-VarNameEnd(string)
-    char *string;              /* Pointer to dollar-sign character. */
+VarNameEnd(
+    char *string               /* Pointer to dollar-sign character. */
+)
 {
-    register char *p = string+1;
+    char *p = string+1;
 
     if (*p == '{') {
        for (p++; (*p != '}') && (*p != 0); p++) {
@@ -1185,12 +1194,13 @@ VarNameEnd(string)
  */
 
 static char *
-ScriptEnd(p, nested)
-    char *p;                   /* Script to check. */
-    int nested;                        /* Zero means this is a top-level command.
+ScriptEnd(
+    char *p,                   /* Script to check. */
+    int nested                 /* Zero means this is a top-level command.
                                 * One means this is a nested command (the
                                 * last character of the script must be
                                 * an unquoted ]). */
+)
 {
     int commentOK = 1;
     int length;
@@ -1261,17 +1271,17 @@ ScriptEnd(p, nested)
  */
 
 char *
-Tcl_ParseVar(interp, string, termPtr)
-    Tcl_Interp *interp;                        /* Context for looking up variable. */
-    register char *string;             /* String containing variable name.
+Tcl_ParseVar(
+    Tcl_Interp *interp,                        /* Context for looking up variable. */
+    char *string,              /* String containing variable name.
                                         * First character must be "$". */
-    char **termPtr;                    /* If non-NULL, points to word to fill
+    char **termPtr                     /* If non-NULL, points to word to fill
                                         * in with character just after last
                                         * one in the variable specifier. */
-
+)
 {
     char *name1, *name1End, c, *result;
-    register char *name2;
+    char *name2;
 #define NUM_CHARS 200
     char copyStorage[NUM_CHARS];
     ParseValue pv;
@@ -1396,8 +1406,9 @@ Tcl_ParseVar(interp, string, termPtr)
  */
 
 int
-Tcl_CommandComplete(cmd)
-    char *cmd;                 /* Command to check. */
+Tcl_CommandComplete(
+    char *cmd                  /* Command to check. */
+)
 {
     char *p;
 
index b1f9f67de9202086472995977d3139f277e10b26..d6fa47ac0604fb25686c4fee81ab3de4370d6006 100644 (file)
@@ -103,11 +103,12 @@ static Package *  FindPackage _ANSI_ARGS_((Tcl_Interp *interp,
  */
 
 int
-Tcl_PkgProvide(interp, name, version)
-    Tcl_Interp *interp;                /* Interpreter in which package is now
+Tcl_PkgProvide(
+    Tcl_Interp *interp,                /* Interpreter in which package is now
                                 * available. */
-    char *name;                        /* Name of package. */
-    char *version;             /* Version string for package. */
+    char *name,                        /* Name of package. */
+    char *version              /* Version string for package. */
+)
 {
     Package *pkgPtr;
 
@@ -155,16 +156,17 @@ Tcl_PkgProvide(interp, name, version)
  */
 
 char *
-Tcl_PkgRequire(interp, name, version, exact)
-    Tcl_Interp *interp;                /* Interpreter in which package is now
+Tcl_PkgRequire(
+    Tcl_Interp *interp,                /* Interpreter in which package is now
                                 * available. */
-    char *name;                        /* Name of desired package. */
-    char *version;             /* Version string for desired version;
+    char *name,                        /* Name of desired package. */
+    char *version,             /* Version string for desired version;
                                 * NULL means use the latest version
                                 * available. */
-    int exact;                 /* Non-zero means that only the particular
+    int exact                  /* Non-zero means that only the particular
                                 * version given is acceptable. Zero means
                                 * use the latest compatible version. */
+)
 {
     Package *pkgPtr;
     PkgAvail *availPtr, *bestPtr;
@@ -312,11 +314,12 @@ Tcl_PkgRequire(interp, name, version, exact)
 
        /* ARGSUSED */
 int
-Tcl_PackageCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_PackageCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     size_t length;
@@ -554,9 +557,10 @@ Tcl_PackageCmd(dummy, interp, argc, argv)
  */
 
 static Package *
-FindPackage(interp, name)
-    Tcl_Interp *interp;                /* Interpreter to use for package lookup. */
-    char *name;                        /* Name of package to fine. */
+FindPackage(
+    Tcl_Interp *interp,                /* Interpreter to use for package lookup. */
+    char *name                 /* Name of package to fine. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     Tcl_HashEntry *hPtr;
@@ -594,8 +598,9 @@ FindPackage(interp, name)
  */
 
 void
-TclFreePackageInfo(iPtr)
-    Interp *iPtr;              /* Interpereter that is being deleted. */
+TclFreePackageInfo(
+    Interp *iPtr               /* Interpereter that is being deleted. */
+)
 {
     Package *pkgPtr;
     Tcl_HashSearch search;
@@ -643,11 +648,12 @@ TclFreePackageInfo(iPtr)
  */
 
 static int
-CheckVersion(interp, string)
-    Tcl_Interp *interp;                /* Used for error reporting. */
-    char *string;              /* Supposedly a version number, which is
+CheckVersion(
+    Tcl_Interp *interp,                /* Used for error reporting. */
+    char *string               /* Supposedly a version number, which is
                                 * groups of decimal digits separated
                                 * by dots. */
+)
 {
     char *p = string;
 
@@ -690,14 +696,15 @@ CheckVersion(interp, string)
  */
 
 static int
-ComparePkgVersions(v1, v2, satPtr)
-    char *v1, *v2;             /* Versions strings, of form 2.1.3 (any
+ComparePkgVersions(
+    char *v1, char *v2,                /* Versions strings, of form 2.1.3 (any
                                 * number of version numbers). */
-    int *satPtr;               /* If non-null, the word pointed to is
+    int *satPtr                        /* If non-null, the word pointed to is
                                 * filled in with a 0/1 value.  1 means
                                 * v1 "satisfies" v2:  v1 is greater than
                                 * or equal to v2 and both version numbers
                                 * have the same major number. */
+)
 {
     int thisIsMajor, n1, n2;
 
index 06bb078f46a196da850470f033f0b62a9229447a..47176b7c2fc2a01a9d9ffb6d129724ef7c34434b 100644 (file)
@@ -59,7 +59,7 @@
  */
 
 char *
-Tcl_ErrnoId()
+Tcl_ErrnoId(void)
 {
     switch (errno) {
 #ifdef E2BIG
@@ -504,8 +504,9 @@ Tcl_ErrnoId()
  */
 
 char *
-Tcl_ErrnoMsg(err)
-    int err;                   /* Error number (such as in errno variable). */
+Tcl_ErrnoMsg(
+    int err                    /* Error number (such as in errno variable). */
+)
 {
     switch (err) {
 #ifdef E2BIG
@@ -951,8 +952,9 @@ Tcl_ErrnoMsg(err)
  */
 
 char *
-Tcl_SignalId(sig)
-    int sig;                   /* Number of signal. */
+Tcl_SignalId(
+    int sig                    /* Number of signal. */
+)
 {
     switch (sig) {
 #ifdef SIGABRT
@@ -1083,8 +1085,9 @@ Tcl_SignalId(sig)
  */
 
 char *
-Tcl_SignalMsg(sig)
-    int sig;                   /* Number of signal. */
+Tcl_SignalMsg(
+    int sig                    /* Number of signal. */
+)
 {
     switch (sig) {
 #ifdef SIGABRT
index 0b92eb2038b16b0b6c4012157144c7c92ca32de7..6604b673f88067a02fe5a7f48ef2f8385c849d76 100644 (file)
@@ -89,8 +89,9 @@ static void   PreserveExitProc _ANSI_ARGS_((ClientData clientData));
 
        /* ARGSUSED */
 static void
-PreserveExitProc(clientData)
-    ClientData clientData;             /* NULL -Unused. */
+PreserveExitProc(
+    ClientData clientData              /* NULL -Unused. */
+)
 {
     if (spaceAvl != 0) {
         ckfree((char *) refArray);
@@ -120,8 +121,9 @@ PreserveExitProc(clientData)
  */
 
 void
-Tcl_Preserve(clientData)
-    ClientData clientData;     /* Pointer to malloc'ed block of memory. */
+Tcl_Preserve(
+    ClientData clientData      /* Pointer to malloc'ed block of memory. */
+)
 {
     Reference *refPtr;
     int i;
@@ -195,8 +197,9 @@ Tcl_Preserve(clientData)
  */
 
 void
-Tcl_Release(clientData)
-    ClientData clientData;     /* Pointer to malloc'ed block of memory. */
+Tcl_Release(
+    ClientData clientData      /* Pointer to malloc'ed block of memory. */
+)
 {
     Reference *refPtr;
     int mustFree;
@@ -262,9 +265,10 @@ Tcl_Release(clientData)
  */
 
 void
-Tcl_EventuallyFree(clientData, freeProc)
-    ClientData clientData;     /* Pointer to malloc'ed block of memory. */
-    Tcl_FreeProc *freeProc;    /* Procedure to actually do free. */
+Tcl_EventuallyFree(
+    ClientData clientData,     /* Pointer to malloc'ed block of memory. */
+    Tcl_FreeProc *freeProc     /* Procedure to actually do free. */
+)
 {
     Reference *refPtr;
     int i;
index 0be641e98cd399c57d5f7848d1fea209c9dd925c..85664b34a212149716bdf8bcdbc0399dbd8e2057 100644 (file)
@@ -66,18 +66,19 @@ static  void        ProcDeleteProc _ANSI_ARGS_((ClientData clientData));
 
        /* ARGSUSED */
 int
-Tcl_ProcCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ProcCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
-    register Proc *procPtr;
+    Interp *iPtr = (Interp *) interp;
+    Proc *procPtr;
     int result, argCount, i;
     char **argArray = NULL;
     Arg *lastArgPtr;
-    register Arg *argPtr = NULL;       /* Initialization not needed, but
+    Arg *argPtr = NULL;        /* Initialization not needed, but
                                         * prevents compiler warning. */
 
     if (argc != 4) {
@@ -202,13 +203,14 @@ Tcl_ProcCmd(dummy, interp, argc, argv)
  */
 
 int
-TclGetFrame(interp, string, framePtrPtr)
-    Tcl_Interp *interp;                /* Interpreter in which to find frame. */
-    char *string;              /* String describing frame. */
-    CallFrame **framePtrPtr;   /* Store pointer to frame here (or NULL
+TclGetFrame(
+    Tcl_Interp *interp,                /* Interpreter in which to find frame. */
+    char *string,              /* String describing frame. */
+    CallFrame **framePtrPtr    /* Store pointer to frame here (or NULL
                                 * if global frame indicated). */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
     int curLevel, level, result;
     CallFrame *framePtr;
 
@@ -279,13 +281,14 @@ TclGetFrame(interp, string, framePtrPtr)
 
        /* ARGSUSED */
 int
-Tcl_UplevelCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_UplevelCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
     int result;
     CallFrame *savedVarFramePtr, *framePtr;
 
@@ -364,9 +367,10 @@ Tcl_UplevelCmd(dummy, interp, argc, argv)
  */
 
 Proc *
-TclFindProc(iPtr, procName)
-    Interp *iPtr;              /* Interpreter in which to look. */
-    char *procName;            /* Name of desired procedure. */
+TclFindProc(
+    Interp *iPtr,              /* Interpreter in which to look. */
+    char *procName             /* Name of desired procedure. */
+)
 {
     Tcl_HashEntry *hPtr;
     Command *cmdPtr;
@@ -401,8 +405,9 @@ TclFindProc(iPtr, procName)
  */
 
 Proc *
-TclIsProc(cmdPtr)
-    Command *cmdPtr;           /* Command to test. */
+TclIsProc(
+    Command *cmdPtr            /* Command to test. */
+)
 {
     if (cmdPtr->proc == InterpProc) {
        return (Proc *) cmdPtr->clientData;
@@ -428,18 +433,19 @@ TclIsProc(cmdPtr)
  */
 
 static int
-InterpProc(clientData, interp, argc, argv)
-    ClientData clientData;     /* Record describing procedure to be
+InterpProc(
+    ClientData clientData,     /* Record describing procedure to be
                                 * interpreted. */
-    Tcl_Interp *interp;                /* Interpreter in which procedure was
+    Tcl_Interp *interp,                /* Interpreter in which procedure was
                                 * invoked. */
-    int argc;                  /* Count of number of arguments to this
+    int argc,                  /* Count of number of arguments to this
                                 * procedure. */
-    char **argv;               /* Argument values. */
+    char **argv                        /* Argument values. */
+)
 {
-    register Proc *procPtr = (Proc *) clientData;
-    register Arg *argPtr;
-    register Interp *iPtr;
+    Proc *procPtr = (Proc *) clientData;
+    Arg *argPtr;
+    Interp *iPtr;
     char **args;
     CallFrame frame;
     char *value;
@@ -592,8 +598,9 @@ InterpProc(clientData, interp, argc, argv)
  */
 
 static void
-ProcDeleteProc(clientData)
-    ClientData clientData;             /* Procedure to be deleted. */
+ProcDeleteProc(
+    ClientData clientData              /* Procedure to be deleted. */
+)
 {
     Proc *procPtr = (Proc *) clientData;
 
@@ -622,10 +629,11 @@ ProcDeleteProc(clientData)
  */
 
 static void
-CleanupProc(procPtr)
-    register Proc *procPtr;            /* Procedure to be deleted. */
+CleanupProc(
+    Proc *procPtr              /* Procedure to be deleted. */
+)
 {
-    register Arg *argPtr;
+    Arg *argPtr;
 
     ckfree((char *) procPtr->command);
     for (argPtr = procPtr->argPtr; argPtr != NULL; ) {
@@ -658,9 +666,10 @@ CleanupProc(procPtr)
  */
 
 int
-TclUpdateReturnInfo(iPtr)
-    Interp *iPtr;              /* Interpreter for which TCL_RETURN
+TclUpdateReturnInfo(
+    Interp *iPtr               /* Interpreter for which TCL_RETURN
                                 * exception is being processed. */
+)
 {
     int code;
 
index 7ff2f586b4112070191b4afcb1b464bdf3d9c8d0..6c36051803d21ea5747b23a923cf4d269d61ec65 100644 (file)
@@ -190,12 +190,13 @@ static Tcl_ChannelType tcpChannelType = {
 
        /* ARGSUSED */
 static int
-CommonBlockModeProc(instanceData, inFile, outFile, mode)
-    ClientData instanceData;           /* Unused. */
-    Tcl_File inFile, outFile;          /* Input, output files for channel. */
-    int mode;                          /* The mode to set. Can be one of
+CommonBlockModeProc(
+    ClientData instanceData,           /* Unused. */
+    Tcl_File inFile, Tcl_File outFile, /* Input, output files for channel. */
+    int mode                           /* The mode to set. Can be one of
                                          * TCL_MODE_BLOCKING or
                                          * TCL_MODE_NONBLOCKING. */
+)
 {
     int curStatus;
     int fd;
@@ -249,13 +250,14 @@ CommonBlockModeProc(instanceData, inFile, outFile, mode)
 
        /* ARGSUSED */
 static int
-FilePipeInputProc(instanceData, inFile, buf, toRead, errorCodePtr)
-    ClientData instanceData;           /* Unused. */
-    Tcl_File inFile;                   /* Input device for channel. */
-    char *buf;                         /* Where to store data read. */
-    int toRead;                                /* How much space is available
+FilePipeInputProc(
+    ClientData instanceData,           /* Unused. */
+    Tcl_File inFile,                   /* Input device for channel. */
+    char *buf,                         /* Where to store data read. */
+    int toRead,                                /* How much space is available
                                          * in the buffer? */
-    int *errorCodePtr;                 /* Where to store error code. */
+    int *errorCodePtr                  /* Where to store error code. */
+)
 {
     int fd;                            /* The OS handle for reading. */
     int bytesRead;                     /* How many bytes were actually
@@ -300,12 +302,13 @@ FilePipeInputProc(instanceData, inFile, buf, toRead, errorCodePtr)
 
        /* ARGSUSED */
 static int
-FilePipeOutputProc(instanceData, outFile, buf, toWrite, errorCodePtr)
-    ClientData instanceData;           /* Unused. */
-    Tcl_File outFile;                  /* Output device for channel. */
-    char *buf;                         /* The data buffer. */
-    int toWrite;                       /* How many bytes to write? */
-    int *errorCodePtr;                 /* Where to store error code. */
+FilePipeOutputProc(
+    ClientData instanceData,           /* Unused. */
+    Tcl_File outFile,                  /* Output device for channel. */
+    char *buf,                         /* The data buffer. */
+    int toWrite,                       /* How many bytes to write? */
+    int *errorCodePtr                  /* Where to store error code. */
+)
 {
     int written;
     int fd;
@@ -339,11 +342,12 @@ FilePipeOutputProc(instanceData, outFile, buf, toWrite, errorCodePtr)
 
        /* ARGSUSED */
 static int
-FileCloseProc(instanceData, interp, inFile, outFile)
-    ClientData instanceData;   /* Unused. */
-    Tcl_Interp *interp;                /* For error reporting - unused. */
-    Tcl_File inFile;           /* Input file to close. */
-    Tcl_File outFile;          /* Output file to close. */
+FileCloseProc(
+    ClientData instanceData,   /* Unused. */
+    Tcl_Interp *interp,                /* For error reporting - unused. */
+    Tcl_File inFile,           /* Input file to close. */
+    Tcl_File outFile           /* Output file to close. */
+)
 {
     int fd, errorCode = 0;
 
@@ -396,16 +400,17 @@ FileCloseProc(instanceData, interp, inFile, outFile)
 
        /* ARGSUSED */
 static int
-FileSeekProc(instanceData, inFile, outFile, offset, mode, errorCodePtr)
-    ClientData instanceData;                   /* Unused. */
-    Tcl_File inFile, outFile;                  /* Input and output
+FileSeekProc(
+    ClientData instanceData,                   /* Unused. */
+    Tcl_File inFile, Tcl_File outFile,         /* Input and output
                                                  * files for channel. */
-    long offset;                               /* Offset to seek to. */
-    int mode;                                  /* Relative to where
+    long offset,                               /* Offset to seek to. */
+    int mode,                                  /* Relative to where
                                                  * should we seek? Can be
                                                  * one of SEEK_START,
                                                  * SEEK_SET or SEEK_END. */
-    int *errorCodePtr;                         /* To store error code. */
+    int *errorCodePtr                          /* To store error code. */
+)
 {
     int newLoc;
     int fd;
@@ -447,9 +452,10 @@ FileSeekProc(instanceData, inFile, outFile, offset, mode, errorCodePtr)
  */
 
 void
-TclGetAndDetachPids(interp, chan)
-    Tcl_Interp *interp;
-    Tcl_Channel chan;
+TclGetAndDetachPids(
+    Tcl_Interp *interp,
+    Tcl_Channel chan
+)
 {
     PipeState *pipePtr;
     Tcl_ChannelType *chanTypePtr;
@@ -497,10 +503,11 @@ TclGetAndDetachPids(interp, chan)
 
        /* ARGSUSED */
 static int
-PipeCloseProc(instanceData, interp, inFile, outFile)
-    ClientData instanceData;   /* The pipe to close. */
-    Tcl_Interp *interp;                /* For error reporting. */
-    Tcl_File inFile, outFile;  /* Unused. */
+PipeCloseProc(
+    ClientData instanceData,   /* The pipe to close. */
+    Tcl_Interp *interp,                /* For error reporting. */
+    Tcl_File inFile, Tcl_File outFile  /* Unused. */
+)
 {
     PipeState *pipePtr;
     Tcl_Channel errChan;
@@ -566,15 +573,16 @@ PipeCloseProc(instanceData, interp, inFile, outFile)
  */
 
 Tcl_Channel
-Tcl_OpenFileChannel(interp, fileName, modeString, permissions)
-    Tcl_Interp *interp;                        /* Interpreter for error reporting;
+Tcl_OpenFileChannel(
+    Tcl_Interp *interp,                        /* Interpreter for error reporting;
                                          * can be NULL. */
-    char *fileName;                    /* Name of file to open. */
-    char *modeString;                  /* A list of POSIX open modes or
+    char *fileName,                    /* Name of file to open. */
+    char *modeString,                  /* A list of POSIX open modes or
                                          * a string such as "rw". */
-    int permissions;                   /* If the open involves creating a
+    int permissions                    /* If the open involves creating a
                                          * file, with what modes to create
                                          * it? */
+)
 {
     int fd, seekFlag, mode, channelPermissions;
     Tcl_File file;
@@ -680,12 +688,13 @@ Tcl_OpenFileChannel(interp, fileName, modeString, permissions)
  */
 
 Tcl_Channel
-Tcl_MakeFileChannel(inFd, outFd, mode)
-    ClientData inFd;           /* OS level handle used for input. */
-    ClientData outFd;          /* OS level handle used for output. */
-    int mode;                  /* ORed combination of TCL_READABLE and
+Tcl_MakeFileChannel(
+    ClientData inFd,           /* OS level handle used for input. */
+    ClientData outFd,          /* OS level handle used for output. */
+    int mode                   /* ORed combination of TCL_READABLE and
                                  * TCL_WRITABLE to indicate whether inFile
                                  * and/or outFile are valid. */
+)
 {
     Tcl_File inFile, outFile;
     char channelName[20];
@@ -730,16 +739,17 @@ Tcl_MakeFileChannel(inFd, outFd, mode)
  */
 
 Tcl_Channel
-TclCreateCommandChannel(readFile, writeFile, errorFile, numPids, pidPtr)
-    Tcl_File readFile;         /* If non-null, gives the file for reading. */
-    Tcl_File writeFile;                /* If non-null, gives the file for writing. */
-    Tcl_File errorFile;                /* If non-null, gives the file where errors
+TclCreateCommandChannel(
+    Tcl_File readFile,         /* If non-null, gives the file for reading. */
+    Tcl_File writeFile,                /* If non-null, gives the file for writing. */
+    Tcl_File errorFile,                /* If non-null, gives the file where errors
                                 * can be read. */
-    int numPids;               /* The number of pids in the pid array. */
-    pid_t *pidPtr;             /* An array of process identifiers.
+    int numPids,               /* The number of pids in the pid array. */
+    pid_t *pidPtr              /* An array of process identifiers.
                                  * Allocated by the caller, freed when
                                  * the channel is closed or the processes
                                  * are detached (in a background exec). */
+)
 {
     Tcl_Channel channel;
     char channelName[20];
@@ -807,11 +817,12 @@ TclCreateCommandChannel(readFile, writeFile, errorFile, numPids, pidPtr)
 
        /* ARGSUSED */
 int
-Tcl_PidCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_PidCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     Tcl_Channel chan;                  /* The channel to get pids for. */
     Tcl_ChannelType *chanTypePtr;      /* The type of that channel. */
@@ -865,12 +876,13 @@ Tcl_PidCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 static int
-TcpBlockModeProc(instanceData, inFile, outFile, mode)
-    ClientData instanceData;           /* Socket state. */
-    Tcl_File inFile, outFile;          /* Input, output files for channel. */
-    int mode;                          /* The mode to set. Can be one of
+TcpBlockModeProc(
+    ClientData instanceData,           /* Socket state. */
+    Tcl_File inFile, Tcl_File outFile, /* Input, output files for channel. */
+    int mode                           /* The mode to set. Can be one of
                                          * TCL_MODE_BLOCKING or
                                          * TCL_MODE_NONBLOCKING. */
+)
 {
     TcpState *statePtr;
     
@@ -901,10 +913,11 @@ TcpBlockModeProc(instanceData, inFile, outFile, mode)
  */
 
 static int
-WaitForConnect(statePtr, fileToWaitFor, errorCodePtr)
-    TcpState *statePtr;                /* State of the socket. */
-    Tcl_File fileToWaitFor;    /* File to wait on to become connected. */
-    int *errorCodePtr;         /* Where to store errors? */
+WaitForConnect(
+    TcpState *statePtr,                /* State of the socket. */
+    Tcl_File fileToWaitFor,    /* File to wait on to become connected. */
+    int *errorCodePtr          /* Where to store errors? */
+)
 {
     int sock;                  /* The socket itself. */
     int timeOut;               /* How long to wait. */
@@ -968,13 +981,14 @@ WaitForConnect(statePtr, fileToWaitFor, errorCodePtr)
 
        /* ARGSUSED */
 static int
-TcpInputProc(instanceData, inFile, buf, bufSize, errorCodePtr)
-    ClientData instanceData;           /* Socket state. */
-    Tcl_File inFile;                   /* Input device for channel. */
-    char *buf;                         /* Where to store data read. */
-    int bufSize;                       /* How much space is available
+TcpInputProc(
+    ClientData instanceData,           /* Socket state. */
+    Tcl_File inFile,                   /* Input device for channel. */
+    char *buf,                         /* Where to store data read. */
+    int bufSize,                       /* How much space is available
                                          * in the buffer? */
-    int *errorCodePtr;                 /* Where to store error code. */
+    int *errorCodePtr                  /* Where to store error code. */
+)
 {
     TcpState *statePtr;                        /* The state of the socket. */
     int sock;                          /* The OS handle. */
@@ -1027,12 +1041,13 @@ TcpInputProc(instanceData, inFile, buf, bufSize, errorCodePtr)
  */
 
 static int
-TcpOutputProc(instanceData, outFile, buf, toWrite, errorCodePtr)
-    ClientData instanceData;           /* Socket state. */
-    Tcl_File outFile;                  /* Output device for channel. */
-    char *buf;                         /* The data buffer. */
-    int toWrite;                       /* How many bytes to write? */
-    int *errorCodePtr;                 /* Where to store error code. */
+TcpOutputProc(
+    ClientData instanceData,           /* Socket state. */
+    Tcl_File outFile,                  /* Output device for channel. */
+    char *buf,                         /* The data buffer. */
+    int toWrite,                       /* How many bytes to write? */
+    int *errorCodePtr                  /* Where to store error code. */
+)
 {
     TcpState *statePtr;
     int written;
@@ -1074,10 +1089,11 @@ TcpOutputProc(instanceData, outFile, buf, toWrite, errorCodePtr)
 
        /* ARGSUSED */
 static int
-TcpCloseProc(instanceData, interp, inFile, outFile)
-    ClientData instanceData;   /* The socket to close. */
-    Tcl_Interp *interp;                /* For error reporting - unused. */
-    Tcl_File inFile, outFile;  /* Unused. */
+TcpCloseProc(
+    ClientData instanceData,   /* The socket to close. */
+    Tcl_Interp *interp,                /* For error reporting - unused. */
+    Tcl_File inFile, Tcl_File outFile  /* Unused. */
+)
 {
     TcpState *statePtr;
     Tcl_File sockFile;
@@ -1137,14 +1153,15 @@ TcpCloseProc(instanceData, interp, inFile, outFile)
  */
 
 static int
-TcpGetOptionProc(instanceData, optionName, dsPtr)
-    ClientData instanceData;           /* Socket state. */
-    char *optionName;                  /* Name of the option to
+TcpGetOptionProc(
+    ClientData instanceData,           /* Socket state. */
+    char *optionName,                  /* Name of the option to
                                          * retrieve the value for, or
                                          * NULL to get all options and
                                          * their values. */
-    Tcl_DString *dsPtr;                        /* Where to store the computed
+    Tcl_DString *dsPtr                 /* Where to store the computed
                                          * value; initialized by caller. */
+)
 {
     TcpState *statePtr;
     struct sockaddr_in sockname;
@@ -1240,18 +1257,19 @@ TcpGetOptionProc(instanceData, optionName, dsPtr)
  */
 
 static TcpState *
-CreateSocket(interp, port, host, server, myaddr, myport, async)
-    Tcl_Interp *interp;                /* For error reporting; can be NULL. */
-    int port;                  /* Port number to open. */
-    char *host;                        /* Name of host on which to open port.
+CreateSocket(
+    Tcl_Interp *interp,                /* For error reporting; can be NULL. */
+    int port,                  /* Port number to open. */
+    char *host,                        /* Name of host on which to open port.
                                 * NULL implies INADDR_ANY */
-    int server;                        /* 1 if socket should be a server socket,
+    int server,                        /* 1 if socket should be a server socket,
                                 * else 0 for a client socket. */
-    char *myaddr;              /* Optional client-side address */
-    int myport;                        /* Optional client-side port */
-    int async;                 /* If nonzero and creating a client socket,
+    char *myaddr,              /* Optional client-side address */
+    int myport,                        /* Optional client-side port */
+    int async                  /* If nonzero and creating a client socket,
                                  * attempt to do an async connect. Otherwise
                                  * do a synchronous connect or bind. */
+)
 {
     int status, sock, asyncConnect, curState, origState;
     struct sockaddr_in sockaddr;       /* socket address */
@@ -1388,10 +1406,11 @@ addressError:
  */
 
 static int
-CreateSocketAddress(sockaddrPtr, host, port)
-    struct sockaddr_in *sockaddrPtr;   /* Socket address */
-    char *host;                                /* Host.  NULL implies INADDR_ANY */
-    int port;                          /* Port number */
+CreateSocketAddress(
+    struct sockaddr_in *sockaddrPtr,   /* Socket address */
+    char *host,                                /* Host.  NULL implies INADDR_ANY */
+    int port                           /* Port number */
+)
 {
     struct hostent *hostent;           /* Host database entry */
     struct in_addr addr;               /* For 64/32 bit madness */
@@ -1451,15 +1470,16 @@ CreateSocketAddress(sockaddrPtr, host, port)
  */
 
 Tcl_Channel
-Tcl_OpenTcpClient(interp, port, host, myaddr, myport, async)
-    Tcl_Interp *interp;                        /* For error reporting; can be NULL. */
-    int port;                          /* Port number to open. */
-    char *host;                                /* Host on which to open port. */
-    char *myaddr;                      /* Client-side address */
-    int myport;                                /* Client-side port */
-    int async;                         /* If nonzero, attempt to do an
+Tcl_OpenTcpClient(
+    Tcl_Interp *interp,                        /* For error reporting; can be NULL. */
+    int port,                          /* Port number to open. */
+    char *host,                                /* Host on which to open port. */
+    char *myaddr,                      /* Client-side address */
+    int myport,                                /* Client-side port */
+    int async                          /* If nonzero, attempt to do an
                                          * asynchronous connect. Otherwise
                                          * we do a blocking connect. */
+)
 {
     Tcl_Channel chan;
     TcpState *statePtr;
@@ -1507,8 +1527,9 @@ Tcl_OpenTcpClient(interp, port, host, myaddr, myport, async)
  */
 
 Tcl_Channel
-Tcl_MakeTcpClientChannel(sock)
-    ClientData sock;           /* The socket to wrap up into a channel. */
+Tcl_MakeTcpClientChannel(
+    ClientData sock            /* The socket to wrap up into a channel. */
+)
 {
     TcpState *statePtr;
     Tcl_File sockFile;
@@ -1552,14 +1573,15 @@ Tcl_MakeTcpClientChannel(sock)
  */
 
 Tcl_Channel
-Tcl_OpenTcpServer(interp, port, myHost, acceptProc, acceptProcData)
-    Tcl_Interp *interp;                        /* For error reporting - may be
+Tcl_OpenTcpServer(
+    Tcl_Interp *interp,                        /* For error reporting - may be
                                          * NULL. */
-    int port;                          /* Port number to open. */
-    char *myHost;                      /* Name of local host. */
-    Tcl_TcpAcceptProc *acceptProc;     /* Callback for accepting connections
+    int port,                          /* Port number to open. */
+    char *myHost,                      /* Name of local host. */
+    Tcl_TcpAcceptProc *acceptProc,     /* Callback for accepting connections
                                          * from new clients. */
-    ClientData acceptProcData;         /* Data for the callback. */
+    ClientData acceptProcData          /* Data for the callback. */
+)
 {
     Tcl_Channel chan;
     TcpState *statePtr;
@@ -1609,9 +1631,10 @@ Tcl_OpenTcpServer(interp, port, myHost, acceptProc, acceptProcData)
 
        /* ARGSUSED */
 static void
-TcpAccept(data, mask)
-    ClientData data;                   /* Callback token. */
-    int mask;                          /* Not used. */
+TcpAccept(
+    ClientData data,                   /* Callback token. */
+    int mask                           /* Not used. */
+)
 {
     TcpState *sockState;               /* Client data of server socket. */
     int newsock;                       /* The new client socket */
@@ -1679,8 +1702,9 @@ TcpAccept(data, mask)
  */
 
 Tcl_Channel
-TclGetDefaultStdChannel(type)
-    int type;                  /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR. */
+TclGetDefaultStdChannel(
+    int type                   /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR. */
+)
 {
     Tcl_Channel channel = NULL;
     int fd = 0;                        /* Initializations needed to prevent */
@@ -1752,8 +1776,9 @@ TclGetDefaultStdChannel(type)
  */
 
 void
-TclClosePipeFile(file)
-    Tcl_File file;
+TclClosePipeFile(
+    Tcl_File file
+)
 {
     int fd = (int) (intptr_t) Tcl_GetFileInfo(file, NULL);
     close(fd);
@@ -1783,17 +1808,18 @@ TclClosePipeFile(file)
  */
 
 int
-Tcl_GetOpenFile(interp, string, forWriting, checkUsage, filePtr)
-    Tcl_Interp *interp;                /* Interpreter in which to find file. */
-    char *string;              /* String that identifies file. */
-    int forWriting;            /* 1 means the file is going to be used
+Tcl_GetOpenFile(
+    Tcl_Interp *interp,                /* Interpreter in which to find file. */
+    char *string,              /* String that identifies file. */
+    int forWriting,            /* 1 means the file is going to be used
                                 * for writing, 0 means for reading. */
-    int checkUsage;            /* 1 means verify that the file was opened
+    int checkUsage,            /* 1 means verify that the file was opened
                                 * in a mode that allows the access specified
                                 * by "forWriting". Ignored, we always
                                  * check that the channel is open for the
                                  * requested mode. */
-    ClientData *filePtr;       /* Store pointer to FILE structure here. */
+    ClientData *filePtr                /* Store pointer to FILE structure here. */
+)
 {
     Tcl_Channel chan;
     int chanMode;
index 2a38651ba7ef36696b46e3bd8093316512e4381f..37f8e4d8fbd7c3aed2f6867c51ee55ac08efb3e4 100644 (file)
@@ -80,10 +80,11 @@ static void FreeExecutableName _ANSI_ARGS_((ClientData clientData));
  */
 
 int
-Tcl_WaitPid(pid, statPtr, options)
-    pid_t pid;
-    int *statPtr;
-    int options;
+Tcl_WaitPid(
+    pid_t pid,
+    int *statPtr,
+    int options
+)
 {
     int result;
     pid_t real_pid;
@@ -116,8 +117,9 @@ Tcl_WaitPid(pid, statPtr, options)
 
        /* ARGSUSED */
 static void
-FreeCurrentDir(clientData)
-    ClientData clientData;     /* Not used. */
+FreeCurrentDir(
+    ClientData clientData      /* Not used. */
+)
 {
     if (currentDir != (char *) NULL) {
         ckfree(currentDir);
@@ -145,8 +147,9 @@ FreeCurrentDir(clientData)
 
        /* ARGSUSED */
 static void
-FreeExecutableName(clientData)
-    ClientData clientData;     /* Not used. */
+FreeExecutableName(
+    ClientData clientData      /* Not used. */
+)
 {
     if (tclExecutableName != (char *) NULL) {
         ckfree(tclExecutableName);
@@ -174,9 +177,10 @@ FreeExecutableName(clientData)
  */
 
 int
-TclChdir(interp, dirName)
-    Tcl_Interp *interp;                /* If non NULL, used for error reporting. */
-    char *dirName;                     /* Path to new working directory. */
+TclChdir(
+    Tcl_Interp *interp,                /* If non NULL, used for error reporting. */
+    char *dirName              /* Path to new working directory. */
+)
 {
     if (currentDir != NULL) {
        ckfree(currentDir);
@@ -215,8 +219,9 @@ TclChdir(interp, dirName)
  */
 
 char *
-TclGetCwd(interp)
-    Tcl_Interp *interp;                /* If non NULL, used for error reporting. */
+TclGetCwd(
+    Tcl_Interp *interp         /* If non NULL, used for error reporting. */
+)
 {
     char buffer[MAXPATHLEN+1];
 
@@ -260,9 +265,10 @@ TclGetCwd(interp)
  */
 
 Tcl_File
-TclOpenFile(fname, mode)
-    char *fname;                       /* The name of the file to open. */
-    int mode;                          /* In what mode to open the file? */
+TclOpenFile(
+    char *fname,                       /* The name of the file to open. */
+    int mode                           /* In what mode to open the file? */
+)
 {
     int fd;
 
@@ -291,8 +297,9 @@ TclOpenFile(fname, mode)
  */
 
 int
-TclCloseFile(file)
-    Tcl_File file;     /* The file to close. */
+TclCloseFile(
+    Tcl_File file      /* The file to close. */
+)
 {
     int type;
     int fd;
@@ -335,11 +342,12 @@ TclCloseFile(file)
  */
        /* ARGSUSED */
 int
-TclReadFile(file, shouldBlock, buf, toRead)
-    Tcl_File file;     /* The file to read from. */
-    int shouldBlock;           /* Not used. */
-    char *buf;                 /* The buffer to store input in. */
-    int toRead;                        /* Number of characters to read. */
+TclReadFile(
+    Tcl_File file,     /* The file to read from. */
+    int shouldBlock,           /* Not used. */
+    char *buf,                 /* The buffer to store input in. */
+    int toRead                 /* Number of characters to read. */
+)
 {
     int type, fd;
 
@@ -369,11 +377,12 @@ TclReadFile(file, shouldBlock, buf, toRead)
 
        /* ARGSUSED */
 int
-TclWriteFile(file, shouldBlock, buf, toWrite)
-    Tcl_File file;     /* The file to write to. */
-    int shouldBlock;           /* Not used. */
-    char *buf;                 /* Where output is stored. */
-    int toWrite;               /* Number of characters to write. */
+TclWriteFile(
+    Tcl_File file,     /* The file to write to. */
+    int shouldBlock,           /* Not used. */
+    char *buf,                 /* Where output is stored. */
+    int toWrite                        /* Number of characters to write. */
+)
 {
     int type, fd;
 
@@ -403,10 +412,11 @@ TclWriteFile(file, shouldBlock, buf, toWrite)
  */
 
 int
-TclSeekFile(file, offset, whence)
-    Tcl_File file;     /* The file to seek on. */
-    int offset;                        /* How far to seek? */
-    int whence;                        /* And from where to seek? */
+TclSeekFile(
+    Tcl_File file,     /* The file to seek on. */
+    int offset,                        /* How far to seek? */
+    int whence                 /* And from where to seek? */
+)
 {
     int type, fd;
 
@@ -437,8 +447,9 @@ TclSeekFile(file, offset, whence)
  */
 
 Tcl_File
-TclCreateTempFile(contents)
-    char *contents;            /* String to write into temp file, or NULL. */
+TclCreateTempFile(
+    char *contents             /* String to write into temp file, or NULL. */
+)
 {
     char fileName[L_tmpnam];
     Tcl_File file;
@@ -484,8 +495,9 @@ TclCreateTempFile(contents)
  */
 
 void
-Tcl_FindExecutable(argv0)
-    char *argv0;               /* The value of the application's argv[0]. */
+Tcl_FindExecutable(
+    char *argv0                        /* The value of the application's argv[0]. */
+)
 {
     char *name, *p, *cwd;
     Tcl_DString buffer;
@@ -612,11 +624,12 @@ Tcl_FindExecutable(argv0)
  */
 
 char *
-TclGetUserHome(name, bufferPtr)
-    char *name;                        /* User name to use to find home directory. */
-    Tcl_DString *bufferPtr;    /* May be used to hold result.  Must not hold
+TclGetUserHome(
+    char *name,                        /* User name to use to find home directory. */
+    Tcl_DString *bufferPtr     /* May be used to hold result.  Must not hold
                                 * anything at the time of the call, and need
                                 * not even be initialized. */
+)
 {
     struct passwd *pwPtr;
 
@@ -652,12 +665,13 @@ TclGetUserHome(name, bufferPtr)
  *---------------------------------------------------------------------- */
 
 int
-TclMatchFiles(interp, separators, dirPtr, pattern, tail)
-    Tcl_Interp *interp;                /* Interpreter to receive results. */
-    char *separators;          /* Path separators to pass to TclDoGlob. */
-    Tcl_DString *dirPtr;       /* Contains path to directory to search. */
-    char *pattern;             /* Pattern to match against. */
-    char *tail;                        /* Pointer to end of pattern. */
+TclMatchFiles(
+    Tcl_Interp *interp,                /* Interpreter to receive results. */
+    char *separators,          /* Path separators to pass to TclDoGlob. */
+    Tcl_DString *dirPtr,       /* Contains path to directory to search. */
+    char *pattern,             /* Pattern to match against. */
+    char *tail                 /* Pointer to end of pattern. */
+)
 {
     char *dirName, *patternEnd = tail;
     char savedChar = 0;                /* Initialization needed only to prevent
index 1607b6d280b09b75b1d628f60c12e7bbbc02b124..f32b0560245879a3e4714e2d7418bed48be539be 100644 (file)
@@ -106,8 +106,9 @@ init";
  */
 
 void
-TclPlatformInit(interp)
-    Tcl_Interp *interp;
+TclPlatformInit(
+    Tcl_Interp *interp
+)
 {
 #ifndef NO_UNAME
     struct utsname name;
@@ -179,8 +180,9 @@ TclPlatformInit(interp)
  */
 
 int
-Tcl_Init(interp)
-    Tcl_Interp *interp;                /* Interpreter to initialize. */
+Tcl_Init(
+    Tcl_Interp *interp         /* Interpreter to initialize. */
+)
 {
     return Tcl_Eval(interp, initScript);
 }
index 5fbfd0db0b89a16b2538473c7180a7fd792e0e4d..d587c5733de97b1419cc48da199907b0561c6ba5 100644 (file)
@@ -91,12 +91,13 @@ static int  MaskEmpty _ANSI_ARGS_((long *maskPtr));
  */
 
 void
-Tcl_WatchFile(file, mask)
-    Tcl_File file;     /* Generic file handle for a stream. */
-    int mask;                  /* OR'ed combination of TCL_READABLE,
+Tcl_WatchFile(
+    Tcl_File file,     /* Generic file handle for a stream. */
+    int mask                   /* OR'ed combination of TCL_READABLE,
                                 * TCL_WRITABLE, and TCL_EXCEPTION:
                                 * indicates conditions to wait for
                                 * in select. */
+)
 {
     int fd, type, index;
     fd_mask bit;
@@ -150,11 +151,12 @@ Tcl_WatchFile(file, mask)
  */
 
 int
-Tcl_FileReady(file, mask)
-    Tcl_File file;     /* Generic file handle for a stream. */
-    int mask;                  /* OR'ed combination of TCL_READABLE,
+Tcl_FileReady(
+    Tcl_File file,     /* Generic file handle for a stream. */
+    int mask                   /* OR'ed combination of TCL_READABLE,
                                 * TCL_WRITABLE, and TCL_EXCEPTION:
                                 * indicates conditions caller cares about. */
+)
 {
     int index, result, type, fd;
     fd_mask bit;
@@ -196,8 +198,9 @@ Tcl_FileReady(file, mask)
  */
 
 static int
-MaskEmpty(maskPtr)
-    long *maskPtr;
+MaskEmpty(
+    long *maskPtr
+)
 {
     long *runPtr, *tailPtr;
     int found, sz;
@@ -238,12 +241,13 @@ MaskEmpty(maskPtr)
  */
 
 int
-Tcl_WaitForEvent(timePtr)
-    Tcl_Time *timePtr;         /* Specifies the maximum amount of time
+Tcl_WaitForEvent(
+    Tcl_Time *timePtr          /* Specifies the maximum amount of time
                                 * that this procedure should block before
                                 * returning.  The time is given as an
                                 * interval, not an absolute wakeup time.
                                 * NULL means block forever. */
+)
 {
     struct timeval timeout, *timeoutPtr;
     int numFound;
@@ -300,8 +304,9 @@ Tcl_WaitForEvent(timePtr)
  */
 
 void
-Tcl_Sleep(ms)
-    int ms;                    /* Number of milliseconds to sleep. */
+Tcl_Sleep(
+    int ms                     /* Number of milliseconds to sleep. */
+)
 {
     static struct timeval delay;
     Tcl_Time before, after;
index e5634bdc1701ffb6250ba8344d2c142731d02793..f8fd9344c1fae6f144d21fc20cc057b70cae0a11 100644 (file)
@@ -63,7 +63,7 @@ static int            SetupStdFile _ANSI_ARGS_((Tcl_File file, int type));
  */
  
 static void
-RestoreSignals()
+RestoreSignals(void)
 {
 #ifdef SIGABRT
     signal(SIGABRT, SIG_DFL);
@@ -138,9 +138,10 @@ RestoreSignals()
  */
 
 static int
-SetupStdFile(file, type)
-    Tcl_File file;             /* File to dup, or NULL. */
-    int type;                  /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR */
+SetupStdFile(
+    Tcl_File file,             /* File to dup, or NULL. */
+    int type                   /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR */
+)
 {
     Tcl_Channel channel;
     int fd;
@@ -216,26 +217,26 @@ SetupStdFile(file, type)
  *----------------------------------------------------------------------
  */
 int
-TclSpawnPipeline(interp, pidPtr, numPids, argc, argv, inputFile,
-       outputFile, errorFile, intIn, finalOut)
-    Tcl_Interp *interp;                /* Interpreter in which to process pipeline. */
-    pid_t *pidPtr;             /* Array of pids which are created. */
-    int *numPids;              /* Number of pids created. */
-    int argc;                  /* Number of entries in argv. */
-    char **argv;               /* Array of strings describing commands in
+TclSpawnPipeline(
+    Tcl_Interp *interp,                /* Interpreter in which to process pipeline. */
+    pid_t *pidPtr,             /* Array of pids which are created. */
+    int *numPids,              /* Number of pids created. */
+    int argc,                  /* Number of entries in argv. */
+    char **argv,               /* Array of strings describing commands in
                                 * pipeline plus I/O redirection with <,
                                 * <<, >, etc. argv[argc] must be NULL. */
-    Tcl_File inputFile;        /* If >=0, gives file id to use as input for
+    Tcl_File inputFile,        /* If >=0, gives file id to use as input for
                                 * first process in pipeline (specified via <
                                 * or <@). */
-    Tcl_File outputFile;       /* Writable file id for output from last
+    Tcl_File outputFile,       /* Writable file id for output from last
                                 * command in pipeline (could be file or
                                 * pipe). NULL means use stdout. */
-    Tcl_File errorFile;        /* Writable file id for error output from all
+    Tcl_File errorFile,        /* Writable file id for error output from all
                                 * commands in the pipeline. NULL means use
                                 * stderr */
-    char *intIn;               /* File name for initial input (for Win32s). */
-    char *finalOut;            /* File name for final output (for Win32s). */
+    char *intIn,               /* File name for initial input (for Win32s). */
+    char *finalOut             /* File name for final output (for Win32s). */
+)
 {
     int firstArg, lastArg;
     pid_t pid;
@@ -435,11 +436,12 @@ error:
  *----------------------------------------------------------------------
  */
 int
-TclCreatePipe(readPipe, writePipe)
-    Tcl_File *readPipe;        /* Location to store file handle for
+TclCreatePipe(
+    Tcl_File *readPipe,                /* Location to store file handle for
                                 * read side of pipe. */
-    Tcl_File *writePipe;       /* Location to store file handle for
+    Tcl_File *writePipe                /* Location to store file handle for
                                 * write side of pipe. */
+)
 {
     int pipeIds[2];
 
@@ -474,15 +476,15 @@ TclCreatePipe(readPipe, writePipe)
  */
 
 int
-Tcl_CreatePipeline(interp, argc, argv, pidArrayPtr, inPipePtr,
-       outPipePtr, errFilePtr)
-    Tcl_Interp *interp;
-    int argc;
-    char **argv;
-    pid_t **pidArrayPtr;
-    int *inPipePtr;
-    int *outPipePtr;
-    int *errFilePtr;
+Tcl_CreatePipeline(
+    Tcl_Interp *interp,
+    int argc,
+    char **argv,
+    pid_t **pidArrayPtr,
+    int *inPipePtr,
+    int *outPipePtr,
+    int *errFilePtr
+)
 {
     Tcl_File inFile, outFile, errFile;
     int result;
index 31cf29848f569cdcc200c4af3b98b2f54e6880be..606f1ca8686961636ce21098f50a7c4f41cac9fd 100644 (file)
@@ -65,7 +65,7 @@ static int  hostnameInited = 0;
  */
 
 char *
-Tcl_GetHostName()
+Tcl_GetHostName(void)
 {
     struct utsname u;
     struct hostent *hp;
@@ -77,9 +77,9 @@ Tcl_GetHostName()
     if (uname(&u) > -1) {
         hp = gethostbyname(u.nodename);
         if (hp != NULL) {
-            strcpy(hostname, hp->h_name);
+            snprintf(hostname, sizeof(hostname), "%s", hp->h_name);
         } else {
-            strcpy(hostname, u.nodename);
+            snprintf(hostname, sizeof(hostname), "%s", u.nodename);
         }
         hostnameInited = 1;
         return hostname;
index dd8b12444cbab0c435a82bce848ed8dbee70de5f..76665d9d3a07e69dda211eb30f4924bb29a88baa 100644 (file)
@@ -57,7 +57,7 @@
  */
 
 unsigned long
-TclGetSeconds()
+TclGetSeconds(void)
 {
     return time((time_t *) NULL);
 }
@@ -82,7 +82,7 @@ TclGetSeconds()
  */
 
 unsigned long
-TclGetClicks()
+TclGetClicks(void)
 {
     unsigned long now;
 #ifdef NO_GETTOD
@@ -121,8 +121,9 @@ TclGetClicks()
  */
 
 int
-TclGetTimeZone (currentTime)
-    unsigned long  currentTime;
+TclGetTimeZone (
+    unsigned long  currentTime
+)
 {
     /*
      * Determine how a timezone is obtained from "struct tm".  If there is no
@@ -229,8 +230,9 @@ TclGetTimeZone (currentTime)
  */
 
 void
-TclGetTime(timePtr)
-    Tcl_Time *timePtr;         /* Location to store time information. */
+TclGetTime(
+    Tcl_Time *timePtr          /* Location to store time information. */
+)
 {
     struct timeval tv;
     struct timezone tz;
index 66b785551b4b96547ecc93bf8f16e4a38ecfbe3a..8b1401ae7af80b38cb2d3760850ef3b3257b633b 100644 (file)
@@ -102,25 +102,26 @@ static void               SetupAppendBuffer _ANSI_ARGS_((Interp *iPtr,
  */
 
 int
-TclFindElement(interp, list, elementPtr, nextPtr, sizePtr, bracePtr)
-    Tcl_Interp *interp;                /* Interpreter to use for error reporting. 
+TclFindElement(
+    Tcl_Interp *interp,                /* Interpreter to use for error reporting. 
                                 * If NULL, then no error message is left
                                 * after errors. */
-    register char *list;       /* String containing Tcl list with zero
+    char *list,        /* String containing Tcl list with zero
                                 * or more elements (possibly in braces). */
-    char **elementPtr;         /* Fill in with location of first significant
+    char **elementPtr,         /* Fill in with location of first significant
                                 * character in first element of list. */
-    char **nextPtr;            /* Fill in with location of character just
+    char **nextPtr,            /* Fill in with location of character just
                                 * after all white space following end of
                                 * argument (i.e. next argument or end of
                                 * list). */
-    int *sizePtr;              /* If non-zero, fill in with size of
+    int *sizePtr,              /* If non-zero, fill in with size of
                                 * element. */
-    int *bracePtr;             /* If non-zero fill in with non-zero/zero
+    int *bracePtr              /* If non-zero fill in with non-zero/zero
                                 * to indicate that arg was/wasn't
                                 * in braces. */
+)
 {
-    register char *p;
+    char *p;
     int openBraces = 0;
     int inQuotes = 0;
     int size;
@@ -312,13 +313,14 @@ TclFindElement(interp, list, elementPtr, nextPtr, sizePtr, bracePtr)
  */
 
 void
-TclCopyAndCollapse(count, src, dst)
-    int count;                 /* Total number of characters to copy
+TclCopyAndCollapse(
+    int count,                 /* Total number of characters to copy
                                 * from src. */
-    register char *src;                /* Copy from here... */
-    register char *dst;                /* ... to here. */
+    char *src,         /* Copy from here... */
+    char *dst          /* ... to here. */
+)
 {
-    register char c;
+    char c;
     int numRead;
 
     for (c = *src; count > 0; src++, c = *src, count--) {
@@ -366,17 +368,18 @@ TclCopyAndCollapse(count, src, dst)
  */
 
 int
-Tcl_SplitList(interp, list, argcPtr, argvPtr)
-    Tcl_Interp *interp;                /* Interpreter to use for error reporting. 
+Tcl_SplitList(
+    Tcl_Interp *interp,                /* Interpreter to use for error reporting. 
                                 * If NULL, then no error message is left. */
-    char *list;                        /* Pointer to string with list structure. */
-    int *argcPtr;              /* Pointer to location to fill in with
+    char *list,                        /* Pointer to string with list structure. */
+    int *argcPtr,              /* Pointer to location to fill in with
                                 * the number of elements in the list. */
-    char ***argvPtr;           /* Pointer to place to store pointer to array
+    char ***argvPtr            /* Pointer to place to store pointer to array
                                 * of pointers to list elements. */
+)
 {
     char **argv;
-    register char *p;
+    char *p;
     int size, i, result, elSize, brace;
     char *element;
 
@@ -455,13 +458,14 @@ Tcl_SplitList(interp, list, argcPtr, argvPtr)
  */
 
 int
-Tcl_ScanElement(string, flagPtr)
-    char *string;              /* String to convert to Tcl list element. */
-    int *flagPtr;              /* Where to store information to guide
+Tcl_ScanElement(
+    char *string,              /* String to convert to Tcl list element. */
+    int *flagPtr               /* Where to store information to guide
                                 * Tcl_ConvertElement. */
+)
 {
     int flags, nestingLevel;
-    register char *p;
+    char *p;
 
     /*
      * This procedure and Tcl_ConvertElement together do two things:
@@ -577,12 +581,13 @@ Tcl_ScanElement(string, flagPtr)
  */
 
 int
-Tcl_ConvertElement(src, dst, flags)
-    register char *src;                /* Source information for list element. */
-    char *dst;                 /* Place to put list-ified element. */
-    int flags;                 /* Flags produced by Tcl_ScanElement. */
+Tcl_ConvertElement(
+    char *src,         /* Source information for list element. */
+    char *dst,                 /* Place to put list-ified element. */
+    int flags                  /* Flags produced by Tcl_ScanElement. */
+)
 {
-    register char *p = dst;
+    char *p = dst;
 
     /*
      * See the comment block at the beginning of the Tcl_ScanElement
@@ -707,15 +712,16 @@ Tcl_ConvertElement(src, dst, flags)
  */
 
 char *
-Tcl_Merge(argc, argv)
-    int argc;                  /* How many strings to merge. */
-    char **argv;               /* Array of string values. */
+Tcl_Merge(
+    int argc,                  /* How many strings to merge. */
+    char **argv                        /* Array of string values. */
+)
 {
 #   define LOCAL_SIZE 20
     int localFlags[LOCAL_SIZE], *flagPtr;
     int numChars;
     char *result;
-    register char *dst;
+    char *dst;
     int i;
 
     /*
@@ -776,12 +782,13 @@ Tcl_Merge(argc, argv)
  */
 
 char *
-Tcl_Concat(argc, argv)
-    int argc;                  /* Number of strings to concatenate. */
-    char **argv;               /* Array of strings to concatenate. */
+Tcl_Concat(
+    int argc,                  /* Number of strings to concatenate. */
+    char **argv                        /* Array of strings to concatenate. */
+)
 {
     int totalSize, i;
-    register char *p;
+    char *p;
     char *result;
 
     for (totalSize = 1, i = 0; i < argc; i++) {
@@ -847,10 +854,10 @@ Tcl_Concat(argc, argv)
  */
 
 int
-Tcl_StringMatch(string, pattern)
-    register char *string;     /* String. */
-    register char *pattern;    /* Pattern, which may contain
-                                * special characters. */
+Tcl_StringMatch(
+    char *string,      /* String. */
+    char *pattern      /* Pattern, which may contain something */
+)
 {
     char c2;
 
@@ -982,16 +989,17 @@ Tcl_StringMatch(string, pattern)
  */
 
 void
-Tcl_SetResult(interp, string, freeProc)
-    Tcl_Interp *interp;                /* Interpreter with which to associate the
+Tcl_SetResult(
+    Tcl_Interp *interp,                /* Interpreter with which to associate the
                                 * return value. */
-    char *string;              /* Value to be returned.  If NULL,
+    char *string,              /* Value to be returned.  If NULL,
                                 * the result is set to an empty string. */
-    Tcl_FreeProc *freeProc;    /* Gives information about the string:
+    Tcl_FreeProc *freeProc     /* Gives information about the string:
                                 * TCL_STATIC, TCL_VOLATILE, or the address
                                 * of a Tcl_FreeProc such as free. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
     int length;
     Tcl_FreeProc *oldFreeProc = iPtr->freeProc;
     char *oldResult = iPtr->result;
@@ -1058,7 +1066,7 @@ void
 Tcl_AppendResult TCL_VARARGS_DEF(Tcl_Interp *,arg1)
 {
     va_list argList;
-    register Interp *iPtr;
+    Interp *iPtr;
     char *string;
     int newSpace;
 
@@ -1129,13 +1137,14 @@ Tcl_AppendResult TCL_VARARGS_DEF(Tcl_Interp *,arg1)
  */
 
 void
-Tcl_AppendElement(interp, string)
-    Tcl_Interp *interp;                /* Interpreter whose result is to be
+Tcl_AppendElement(
+    Tcl_Interp *interp,                /* Interpreter whose result is to be
                                 * extended. */
-    char *string;              /* String to convert to list element and
+    char *string               /* String to convert to list element and
                                 * add to result. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
     int size, flags;
     char *dst;
 
@@ -1184,10 +1193,11 @@ Tcl_AppendElement(interp, string)
  */
 
 static void
-SetupAppendBuffer(iPtr, newSpace)
-    register Interp *iPtr;     /* Interpreter whose result is being set up. */
-    int newSpace;              /* Make sure that at least this many bytes
+SetupAppendBuffer(
+    Interp *iPtr,      /* Interpreter whose result is being set up. */
+    int newSpace               /* Make sure that at least this many bytes
                                 * of new information may be added. */
+)
 {
     int totalSpace;
 
@@ -1262,10 +1272,11 @@ SetupAppendBuffer(iPtr, newSpace)
  */
 
 void
-Tcl_ResetResult(interp)
-    Tcl_Interp *interp;                /* Interpreter for which to clear result. */
+Tcl_ResetResult(
+    Tcl_Interp *interp         /* Interpreter for which to clear result. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
 
     Tcl_FreeResult(iPtr);
     iPtr->result = iPtr->resultSpace;
@@ -1348,10 +1359,11 @@ Tcl_SetErrorCode TCL_VARARGS_DEF(Tcl_Interp *,arg1)
  */
 
 int
-TclGetListIndex(interp, string, indexPtr)
-    Tcl_Interp *interp;                        /* Interpreter for error reporting. */
-    char *string;                      /* String containing list index. */
-    int *indexPtr;                     /* Where to store index. */
+TclGetListIndex(
+    Tcl_Interp *interp,                        /* Interpreter for error reporting. */
+    char *string,                      /* String containing list index. */
+    int *indexPtr                      /* Where to store index. */
+)
 {
     if (isdigit(UCHAR(*string)) || (*string == '-')) {
        if (Tcl_GetInt(interp, string, indexPtr) != TCL_OK) {
@@ -1397,12 +1409,13 @@ TclGetListIndex(interp, string, indexPtr)
  */
 
 Tcl_RegExp
-Tcl_RegExpCompile(interp, string)
-    Tcl_Interp *interp;                        /* For use in error reporting. */
-    char *string;                      /* String for which to produce
+Tcl_RegExpCompile(
+    Tcl_Interp *interp,                        /* For use in error reporting. */
+    char *string                       /* String for which to produce
                                         * compiled regular expression. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
     int i, length;
     regexp *result;
 
@@ -1485,15 +1498,16 @@ Tcl_RegExpCompile(interp, string)
  */
 
 int
-Tcl_RegExpExec(interp, re, string, start)
-    Tcl_Interp *interp;                /* Interpreter to use for error reporting. */
-    Tcl_RegExp re;             /* Compiled regular expression;  must have
+Tcl_RegExpExec(
+    Tcl_Interp *interp,                /* Interpreter to use for error reporting. */
+    Tcl_RegExp re,             /* Compiled regular expression;  must have
                                 * been returned by previous call to
                                 * Tcl_RegExpCompile. */
-    char *string;              /* String against which to match re. */
-    char *start;               /* If string is part of a larger string,
+    char *string,              /* String against which to match re. */
+    char *start                        /* If string is part of a larger string,
                                 * this identifies beginning of larger
                                 * string, so that "^" won't match. */
+)
 {
     int match;
 
@@ -1529,17 +1543,18 @@ Tcl_RegExpExec(interp, re, string, start)
  */
 
 void
-Tcl_RegExpRange(re, index, startPtr, endPtr)
-    Tcl_RegExp re;             /* Compiled regular expression that has
+Tcl_RegExpRange(
+    Tcl_RegExp re,             /* Compiled regular expression that has
                                 * been passed to Tcl_RegExpExec. */
-    int index;                 /* 0 means give the range of the entire
+    int index,                 /* 0 means give the range of the entire
                                 * match, > 0 means give the range of
                                 * a matching subrange.  Must be no greater
                                 * than NSUBEXP. */
-    char **startPtr;           /* Store address of first character in
+    char **startPtr,           /* Store address of first character in
                                 * (sub-) range here. */
-    char **endPtr;             /* Store address of character just after last
+    char **endPtr              /* Store address of character just after last
                                 * in (sub-) range here. */
+)
 {
     regexp *regexpPtr = (regexp *) re;
 
@@ -1571,11 +1586,12 @@ Tcl_RegExpRange(re, index, startPtr, endPtr)
  */
 
 int
-Tcl_RegExpMatch(interp, string, pattern)
-    Tcl_Interp *interp;                /* Used for error reporting. */
-    char *string;              /* String. */
-    char *pattern;             /* Regular expression to match against
+Tcl_RegExpMatch(
+    Tcl_Interp *interp,                /* Used for error reporting. */
+    char *string,              /* String. */
+    char *pattern              /* Regular expression to match against
                                 * string. */
+)
 {
     Tcl_RegExp re;
 
@@ -1605,9 +1621,10 @@ Tcl_RegExpMatch(interp, string, pattern)
  */
 
 void
-Tcl_DStringInit(dsPtr)
-    register Tcl_DString *dsPtr;       /* Pointer to structure for
+Tcl_DStringInit(
+    Tcl_DString *dsPtr         /* Pointer to structure for
                                         * dynamic string. */
+)
 {
     dsPtr->string = dsPtr->staticSpace;
     dsPtr->length = 0;
@@ -1634,15 +1651,16 @@ Tcl_DStringInit(dsPtr)
  */
 
 char *
-Tcl_DStringAppend(dsPtr, string, length)
-    register Tcl_DString *dsPtr;       /* Structure describing dynamic
+Tcl_DStringAppend(
+    Tcl_DString *dsPtr,        /* Structure describing dynamic
                                         * string. */
-    char *string;                      /* String to append.  If length is
+    char *string,                      /* String to append.  If length is
                                         * -1 then this must be
                                         * null-terminated. */
-    int length;                                /* Number of characters from string
+    int length                         /* Number of characters from string
                                         * to append.  If < 0, then append all
                                         * of string, up to null at end. */
+)
 {
     int newSize;
     char *newString, *dst, *end;
@@ -1702,11 +1720,12 @@ Tcl_DStringAppend(dsPtr, string, length)
  */
 
 char *
-Tcl_DStringAppendElement(dsPtr, string)
-    register Tcl_DString *dsPtr;       /* Structure describing dynamic
+Tcl_DStringAppendElement(
+    Tcl_DString *dsPtr,        /* Structure describing dynamic
                                         * string. */
-    char *string;                      /* String to append.  Must be
+    char *string                       /* String to append.  Must be
                                         * null-terminated. */
+)
 {
     int newSize, flags;
     char *dst, *newString;
@@ -1769,10 +1788,11 @@ Tcl_DStringAppendElement(dsPtr, string)
  */
 
 void
-Tcl_DStringSetLength(dsPtr, length)
-    register Tcl_DString *dsPtr;       /* Structure describing dynamic
+Tcl_DStringSetLength(
+    Tcl_DString *dsPtr,        /* Structure describing dynamic
                                         * string. */
-    int length;                                /* New length for dynamic string. */
+    int length                         /* New length for dynamic string. */
+)
 {
     if (length < 0) {
        length = 0;
@@ -1819,9 +1839,10 @@ Tcl_DStringSetLength(dsPtr, length)
  */
 
 void
-Tcl_DStringFree(dsPtr)
-    register Tcl_DString *dsPtr;       /* Structure describing dynamic
+Tcl_DStringFree(
+    Tcl_DString *dsPtr         /* Structure describing dynamic
                                         * string. */
+)
 {
     if (dsPtr->string != dsPtr->staticSpace) {
        ckfree(dsPtr->string);
@@ -1853,11 +1874,12 @@ Tcl_DStringFree(dsPtr)
  */
 
 void
-Tcl_DStringResult(interp, dsPtr)
-    Tcl_Interp *interp;                        /* Interpreter whose result is to be
+Tcl_DStringResult(
+    Tcl_Interp *interp,                        /* Interpreter whose result is to be
                                         * reset. */
-    Tcl_DString *dsPtr;                        /* Dynamic string that is to become
+    Tcl_DString *dsPtr                 /* Dynamic string that is to become
                                         * the result of interp. */
+)
 {
     Tcl_ResetResult(interp);
     if (dsPtr->string != dsPtr->staticSpace) {
@@ -1894,11 +1916,12 @@ Tcl_DStringResult(interp, dsPtr)
  */
 
 void
-Tcl_DStringGetResult(interp, dsPtr)
-    Tcl_Interp *interp;                        /* Interpreter whose result is to be
+Tcl_DStringGetResult(
+    Tcl_Interp *interp,                        /* Interpreter whose result is to be
                                         * reset. */
-    Tcl_DString *dsPtr;                        /* Dynamic string that is to become
+    Tcl_DString *dsPtr                 /* Dynamic string that is to become
                                         * the result of interp. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     if (dsPtr->string != dsPtr->staticSpace) {
@@ -1950,8 +1973,9 @@ Tcl_DStringGetResult(interp, dsPtr)
  */
 
 void
-Tcl_DStringStartSublist(dsPtr)
-    Tcl_DString *dsPtr;                        /* Dynamic string. */
+Tcl_DStringStartSublist(
+    Tcl_DString *dsPtr                 /* Dynamic string. */
+)
 {
     if (TclNeedSpace(dsPtr->string, dsPtr->string + dsPtr->length)) {
        Tcl_DStringAppend(dsPtr, " {", -1);
@@ -1980,8 +2004,9 @@ Tcl_DStringStartSublist(dsPtr)
  */
 
 void
-Tcl_DStringEndSublist(dsPtr)
-    Tcl_DString *dsPtr;                        /* Dynamic string. */
+Tcl_DStringEndSublist(
+    Tcl_DString *dsPtr                 /* Dynamic string. */
+)
 {
     Tcl_DStringAppend(dsPtr, "}", -1);
 }
@@ -2007,15 +2032,16 @@ Tcl_DStringEndSublist(dsPtr)
  */
 
 void
-Tcl_PrintDouble(interp, value, dst)
-    Tcl_Interp *interp;                        /* Interpreter whose tcl_precision
+Tcl_PrintDouble(
+    Tcl_Interp *interp,                        /* Interpreter whose tcl_precision
                                         * variable controls printing. */
-    double value;                      /* Value to print as string. */
-    char *dst;                         /* Where to store converted value;
+    double value,                      /* Value to print as string. */
+    char *dst                          /* Where to store converted value;
                                         * must have at least TCL_DOUBLE_SPACE
                                         * characters. */
+)
 {
-    register char *p;
+    char *p;
     sprintf(dst, ((Interp *) interp)->pdFormat, value);
 
     /*
@@ -2056,14 +2082,15 @@ Tcl_PrintDouble(interp, value, dst)
 
        /* ARGSUSED */
 char *
-TclPrecTraceProc(clientData, interp, name1, name2, flags)
-    ClientData clientData;     /* Not used. */
-    Tcl_Interp *interp;                /* Interpreter containing variable. */
-    char *name1;               /* Name of variable. */
-    char *name2;               /* Second part of variable name. */
-    int flags;                 /* Information about what happened. */
+TclPrecTraceProc(
+    ClientData clientData,     /* Not used. */
+    Tcl_Interp *interp,                /* Interpreter containing variable. */
+    char *name1,               /* Name of variable. */
+    char *name2,               /* Second part of variable name. */
+    int flags                  /* Information about what happened. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
     char *value, *end;
     int prec;
 
@@ -2120,10 +2147,11 @@ TclPrecTraceProc(clientData, interp, name1, name2, flags)
  */
 
 int
-TclNeedSpace(start, end)
-    char *start;               /* First character in string. */
-    char *end;                 /* End of string (place where space will
+TclNeedSpace(
+    char *start,               /* First character in string. */
+    char *end                  /* End of string (place where space will
                                 * be added, if appropriate). */
+)
 {
     /*
      * A space is needed unless either
index f5d90e396c6018bd6d7e6ec863b8009d9bdbab3f..eb2e3d5c93eab7316956e4e3203cd44c76b147d5 100644 (file)
@@ -125,28 +125,29 @@ static void               VarErrMsg _ANSI_ARGS_((Tcl_Interp *interp,
  */
 
 static Var *
-LookupVar(interp, part1, part2, flags, msg, create, arrayPtrPtr)
-    Tcl_Interp *interp;                /* Interpreter to use for lookup. */
-    char *part1;               /* If part2 isn't NULL, this is the name
+LookupVar(
+    Tcl_Interp *interp,                /* Interpreter to use for lookup. */
+    char *part1,               /* If part2 isn't NULL, this is the name
                                 * of an array.  Otherwise, if the
                                 * PART1_NOT_PARSED flag bit is set this
                                 * is a full variable name that could
                                 * include a parenthesized array elemnt.
                                 * If PART1_NOT_PARSED isn't present, then
                                 * this is the name of a scalar variable. */
-    char *part2;               /* Name of an element within array, or NULL. */
-    int flags;                 /* Only the TCL_GLOBAL_ONLY, TCL_LEAVE_ERR_MSG,
+    char *part2,               /* Name of an element within array, or NULL. */
+    int flags,                 /* Only the TCL_GLOBAL_ONLY, TCL_LEAVE_ERR_MSG,
                                 * and PART1_NOT_PARSED bits matter. */
-    char *msg;                 /* Verb to use in error messages, e.g.
+    char *msg,                 /* Verb to use in error messages, e.g.
                                 * "read" or "set".  Only needed if
                                 * TCL_LEAVE_ERR_MSG is set in flags. */
-    int create;                        /* OR'ed combination of CRT_PART1 and
+    int create,                        /* OR'ed combination of CRT_PART1 and
                                 * CRT_PART2.  Tells which entries to create
                                 * if they don't already exist. */
-    Var **arrayPtrPtr;         /* If the name refers to an element of an
+    Var **arrayPtrPtr          /* If the name refers to an element of an
                                 * array, *arrayPtrPtr gets filled in with
                                 * address of array variable.  Otherwise
                                 * this is set to NULL. */
+)
 {
     Interp *iPtr = (Interp *) interp;
     Tcl_HashTable *tablePtr;
@@ -315,12 +316,13 @@ LookupVar(interp, part1, part2, flags, msg, create, arrayPtrPtr)
  */
 
 char *
-Tcl_GetVar(interp, varName, flags)
-    Tcl_Interp *interp;                /* Command interpreter in which varName is
+Tcl_GetVar(
+    Tcl_Interp *interp,                /* Command interpreter in which varName is
                                 * to be looked up. */
-    char *varName;             /* Name of a variable in interp. */
-    int flags;                 /* OR-ed combination of TCL_GLOBAL_ONLY
+    char *varName,             /* Name of a variable in interp. */
+    int flags                  /* OR-ed combination of TCL_GLOBAL_ONLY
                                 * or TCL_LEAVE_ERR_MSG bits. */
+)
 {
     return Tcl_GetVar2(interp, varName, (char *) NULL,
            flags | PART1_NOT_PARSED);
@@ -351,16 +353,17 @@ Tcl_GetVar(interp, varName, flags)
  */
 
 char *
-Tcl_GetVar2(interp, part1, part2, flags)
-    Tcl_Interp *interp;                /* Command interpreter in which variable is
+Tcl_GetVar2(
+    Tcl_Interp *interp,                /* Command interpreter in which variable is
                                 * to be looked up. */
-    char *part1;               /* Name of array (if part2 is NULL) or
+    char *part1,               /* Name of array (if part2 is NULL) or
                                 * name of variable. */
-    char *part2;               /* If non-null, gives name of element in
+    char *part2,               /* If non-null, gives name of element in
                                 * array. */
-    int flags;                 /* OR-ed combination of TCL_GLOBAL_ONLY,
+    int flags                  /* OR-ed combination of TCL_GLOBAL_ONLY,
                                 * TCL_LEAVE_ERR_MSG, and PART1_NOT_PARSED
                                 * bits. */
+)
 {
     Var *varPtr, *arrayPtr;
     Interp *iPtr = (Interp *) interp;
@@ -438,14 +441,15 @@ Tcl_GetVar2(interp, part1, part2, flags)
  */
 
 char *
-Tcl_SetVar(interp, varName, newValue, flags)
-    Tcl_Interp *interp;                /* Command interpreter in which varName is
+Tcl_SetVar(
+    Tcl_Interp *interp,                /* Command interpreter in which varName is
                                 * to be looked up. */
-    char *varName;             /* Name of a variable in interp. */
-    char *newValue;            /* New value for varName. */
-    int flags;                 /* Various flags that tell how to set value:
+    char *varName,             /* Name of a variable in interp. */
+    char *newValue,            /* New value for varName. */
+    int flags                  /* Various flags that tell how to set value:
                                 * any of TCL_GLOBAL_ONLY, TCL_APPEND_VALUE,
                                 * TCL_LIST_ELEMENT, or TCL_LEAVE_ERR_MSG. */
+)
 {
     return Tcl_SetVar2(interp, varName, (char *) NULL, newValue,
            flags | PART1_NOT_PARSED);
@@ -477,20 +481,21 @@ Tcl_SetVar(interp, varName, newValue, flags)
  */
 
 char *
-Tcl_SetVar2(interp, part1, part2, newValue, flags)
-    Tcl_Interp *interp;                /* Command interpreter in which variable is
+Tcl_SetVar2(
+    Tcl_Interp *interp,                /* Command interpreter in which variable is
                                 * to be looked up. */
-    char *part1;               /* If part2 is NULL, this is name of scalar
+    char *part1,               /* If part2 is NULL, this is name of scalar
                                 * variable.  Otherwise it is name of array. */
-    char *part2;               /* Name of an element within array, or NULL. */
-    char *newValue;            /* New value for variable. */
-    int flags;                 /* Various flags that tell how to set value:
+    char *part2,               /* Name of an element within array, or NULL. */
+    char *newValue,            /* New value for variable. */
+    int flags                  /* Various flags that tell how to set value:
                                 * any of TCL_GLOBAL_ONLY, TCL_APPEND_VALUE,
                                 * TCL_LIST_ELEMENT, TCL_LEAVE_ERR_MSG, or
                                 * PART1_NOT_PARSED. */
+)
 {
-    register Var *varPtr;
-    register Interp *iPtr = (Interp *) interp;
+    Var *varPtr;
+    Interp *iPtr = (Interp *) interp;
     int length, listFlags;
     Var *arrayPtr;
     char *result;
@@ -667,14 +672,15 @@ Tcl_SetVar2(interp, part1, part2, newValue, flags)
  */
 
 int
-Tcl_UnsetVar(interp, varName, flags)
-    Tcl_Interp *interp;                /* Command interpreter in which varName is
+Tcl_UnsetVar(
+    Tcl_Interp *interp,                /* Command interpreter in which varName is
                                 * to be looked up. */
-    char *varName;             /* Name of a variable in interp.  May be
+    char *varName,             /* Name of a variable in interp.  May be
                                 * either a scalar name or an array name
                                 * or an element in an array. */
-    int flags;                 /* OR-ed combination of any of
+    int flags                  /* OR-ed combination of any of
                                 * TCL_GLOBAL_ONLY or TCL_LEAVE_ERR_MSG. */
+)
 {
     return Tcl_UnsetVar2(interp, varName, (char *) NULL,
            flags | PART1_NOT_PARSED);
@@ -702,14 +708,15 @@ Tcl_UnsetVar(interp, varName, flags)
  */
 
 int
-Tcl_UnsetVar2(interp, part1, part2, flags)
-    Tcl_Interp *interp;                /* Command interpreter in which varName is
+Tcl_UnsetVar2(
+    Tcl_Interp *interp,                /* Command interpreter in which varName is
                                 * to be looked up. */
-    char *part1;               /* Name of variable or array. */
-    char *part2;               /* Name of element within array or NULL. */
-    int flags;                 /* OR-ed combination of any of
+    char *part1,               /* Name of variable or array. */
+    char *part2,               /* Name of element within array or NULL. */
+    int flags                  /* OR-ed combination of any of
                                 * TCL_GLOBAL_ONLY, TCL_LEAVE_ERR_MSG,
                                 * or PART1_NOT_PARSED. */
+)
 {
     Var *varPtr, dummyVar;
     Interp *iPtr = (Interp *) interp;
@@ -828,17 +835,18 @@ Tcl_UnsetVar2(interp, part1, part2, flags)
  */
 
 int
-Tcl_TraceVar(interp, varName, flags, proc, clientData)
-    Tcl_Interp *interp;                /* Interpreter in which variable is
+Tcl_TraceVar(
+    Tcl_Interp *interp,                /* Interpreter in which variable is
                                 * to be traced. */
-    char *varName;             /* Name of variable;  may end with "(index)"
+    char *varName,             /* Name of variable;  may end with "(index)"
                                 * to signify an array reference. */
-    int flags;                 /* OR-ed collection of bits, including any
+    int flags,                 /* OR-ed collection of bits, including any
                                 * of TCL_TRACE_READS, TCL_TRACE_WRITES,
                                 * TCL_TRACE_UNSETS, and TCL_GLOBAL_ONLY. */
-    Tcl_VarTraceProc *proc;    /* Procedure to call when specified ops are
+    Tcl_VarTraceProc *proc,    /* Procedure to call when specified ops are
                                 * invoked upon varName. */
-    ClientData clientData;     /* Arbitrary argument to pass to proc. */
+    ClientData clientData      /* Arbitrary argument to pass to proc. */
+)
 {
     return Tcl_TraceVar2(interp, varName, (char *) NULL,
            flags | PART1_NOT_PARSED, proc, clientData);
@@ -866,23 +874,24 @@ Tcl_TraceVar(interp, varName, flags, proc, clientData)
  */
 
 int
-Tcl_TraceVar2(interp, part1, part2, flags, proc, clientData)
-    Tcl_Interp *interp;                /* Interpreter in which variable is
+Tcl_TraceVar2(
+    Tcl_Interp *interp,                /* Interpreter in which variable is
                                 * to be traced. */
-    char *part1;               /* Name of scalar variable or array. */
-    char *part2;               /* Name of element within array;  NULL means
+    char *part1,               /* Name of scalar variable or array. */
+    char *part2,               /* Name of element within array;  NULL means
                                 * trace applies to scalar variable or array
                                 * as-a-whole. */
-    int flags;                 /* OR-ed collection of bits, including any
+    int flags,                 /* OR-ed collection of bits, including any
                                 * of TCL_TRACE_READS, TCL_TRACE_WRITES,
                                 * TCL_TRACE_UNSETS, TCL_GLOBAL_ONLY, and
                                 * PART1_NOT_PARSED. */
-    Tcl_VarTraceProc *proc;    /* Procedure to call when specified ops are
+    Tcl_VarTraceProc *proc,    /* Procedure to call when specified ops are
                                 * invoked upon varName. */
-    ClientData clientData;     /* Arbitrary argument to pass to proc. */
+    ClientData clientData      /* Arbitrary argument to pass to proc. */
+)
 {
     Var *varPtr, *arrayPtr;
-    register VarTrace *tracePtr;
+    VarTrace *tracePtr;
 
     varPtr = LookupVar(interp, part1, part2, (flags | TCL_LEAVE_ERR_MSG),
            "trace", CRT_PART1|CRT_PART2, &arrayPtr);
@@ -923,16 +932,17 @@ Tcl_TraceVar2(interp, part1, part2, flags, proc, clientData)
  */
 
 void
-Tcl_UntraceVar(interp, varName, flags, proc, clientData)
-    Tcl_Interp *interp;                /* Interpreter containing traced variable. */
-    char *varName;             /* Name of variable;  may end with "(index)"
+Tcl_UntraceVar(
+    Tcl_Interp *interp,                /* Interpreter containing traced variable. */
+    char *varName,             /* Name of variable;  may end with "(index)"
                                 * to signify an array reference. */
-    int flags;                 /* OR-ed collection of bits describing
+    int flags,                 /* OR-ed collection of bits describing
                                 * current trace, including any of
                                 * TCL_TRACE_READS, TCL_TRACE_WRITES,
                                 * TCL_TRACE_UNSETS, and TCL_GLOBAL_ONLY. */
-    Tcl_VarTraceProc *proc;    /* Procedure assocated with trace. */
-    ClientData clientData;     /* Arbitrary argument to pass to proc. */
+    Tcl_VarTraceProc *proc,    /* Procedure assocated with trace. */
+    ClientData clientData      /* Arbitrary argument to pass to proc. */
+)
 {
     Tcl_UntraceVar2(interp, varName, (char *) NULL, flags | PART1_NOT_PARSED,
            proc, clientData);
@@ -957,21 +967,22 @@ Tcl_UntraceVar(interp, varName, flags, proc, clientData)
  */
 
 void
-Tcl_UntraceVar2(interp, part1, part2, flags, proc, clientData)
-    Tcl_Interp *interp;                /* Interpreter containing traced variable. */
-    char *part1;               /* Name of variable or array. */
-    char *part2;               /* Name of element within array;  NULL means
+Tcl_UntraceVar2(
+    Tcl_Interp *interp,                /* Interpreter containing traced variable. */
+    char *part1,               /* Name of variable or array. */
+    char *part2,               /* Name of element within array;  NULL means
                                 * trace applies to scalar variable or array
                                 * as-a-whole. */
-    int flags;                 /* OR-ed collection of bits describing
+    int flags,                 /* OR-ed collection of bits describing
                                 * current trace, including any of
                                 * TCL_TRACE_READS, TCL_TRACE_WRITES,
                                 * TCL_TRACE_UNSETS, TCL_GLOBAL_ONLY, and
                                 * PART1_NOT_PARSED. */
-    Tcl_VarTraceProc *proc;    /* Procedure assocated with trace. */
-    ClientData clientData;     /* Arbitrary argument to pass to proc. */
+    Tcl_VarTraceProc *proc,    /* Procedure assocated with trace. */
+    ClientData clientData      /* Arbitrary argument to pass to proc. */
+)
 {
-    register VarTrace *tracePtr;
+    VarTrace *tracePtr;
     VarTrace *prevPtr;
     Var *varPtr, *arrayPtr;
     Interp *iPtr = (Interp *) interp;
@@ -1052,17 +1063,18 @@ Tcl_UntraceVar2(interp, part1, part2, flags, proc, clientData)
  */
 
 ClientData
-Tcl_VarTraceInfo(interp, varName, flags, proc, prevClientData)
-    Tcl_Interp *interp;                /* Interpreter containing variable. */
-    char *varName;             /* Name of variable;  may end with "(index)"
+Tcl_VarTraceInfo(
+    Tcl_Interp *interp,                /* Interpreter containing variable. */
+    char *varName,             /* Name of variable;  may end with "(index)"
                                 * to signify an array reference. */
-    int flags;                 /* 0 or TCL_GLOBAL_ONLY. */
-    Tcl_VarTraceProc *proc;    /* Procedure assocated with trace. */
-    ClientData prevClientData; /* If non-NULL, gives last value returned
+    int flags,                 /* 0 or TCL_GLOBAL_ONLY. */
+    Tcl_VarTraceProc *proc,    /* Procedure assocated with trace. */
+    ClientData prevClientData  /* If non-NULL, gives last value returned
                                 * by this procedure, so this call will
                                 * return the next trace after that one.
                                 * If NULL, this call will return the
                                 * first trace. */
+)
 {
     return Tcl_VarTraceInfo2(interp, varName, (char *) NULL,
            flags | PART1_NOT_PARSED, proc, prevClientData);
@@ -1086,22 +1098,23 @@ Tcl_VarTraceInfo(interp, varName, flags, proc, prevClientData)
  */
 
 ClientData
-Tcl_VarTraceInfo2(interp, part1, part2, flags, proc, prevClientData)
-    Tcl_Interp *interp;                /* Interpreter containing variable. */
-    char *part1;               /* Name of variable or array. */
-    char *part2;               /* Name of element within array;  NULL means
+Tcl_VarTraceInfo2(
+    Tcl_Interp *interp,                /* Interpreter containing variable. */
+    char *part1,               /* Name of variable or array. */
+    char *part2,               /* Name of element within array;  NULL means
                                 * trace applies to scalar variable or array
                                 * as-a-whole. */
-    int flags;                 /* OR-ed combination of TCL_GLOBAL_ONLY and
+    int flags,                 /* OR-ed combination of TCL_GLOBAL_ONLY and
                                 * PART1_NOT_PARSED. */
-    Tcl_VarTraceProc *proc;    /* Procedure assocated with trace. */
-    ClientData prevClientData; /* If non-NULL, gives last value returned
+    Tcl_VarTraceProc *proc,    /* Procedure assocated with trace. */
+    ClientData prevClientData  /* If non-NULL, gives last value returned
                                 * by this procedure, so this call will
                                 * return the next trace after that one.
                                 * If NULL, this call will return the
                                 * first trace. */
+)
 {
-    register VarTrace *tracePtr;
+    VarTrace *tracePtr;
     Var *varPtr, *arrayPtr;
 
     varPtr = LookupVar(interp, part1, part2,
@@ -1152,11 +1165,12 @@ Tcl_VarTraceInfo2(interp, part1, part2, flags, proc, prevClientData)
 
        /* ARGSUSED */
 int
-Tcl_SetCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    register Tcl_Interp *interp;       /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_SetCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     if (argc == 2) {
        char *value;
@@ -1204,11 +1218,12 @@ Tcl_SetCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_UnsetCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    register Tcl_Interp *interp;       /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_UnsetCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int i;
 
@@ -1245,11 +1260,12 @@ Tcl_UnsetCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_AppendCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    register Tcl_Interp *interp;       /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_AppendCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int i;
     char *result = NULL;               /* (Initialization only needed to keep
@@ -1300,11 +1316,12 @@ Tcl_AppendCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_LappendCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    register Tcl_Interp *interp;       /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_LappendCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int i;
     char *result = NULL;               /* (Initialization only needed to keep
@@ -1356,11 +1373,12 @@ Tcl_LappendCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_ArrayCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    register Tcl_Interp *interp;       /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_ArrayCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
     int c, notArray;
     size_t length;
@@ -1674,17 +1692,18 @@ Tcl_ArrayCmd(dummy, interp, argc, argv)
  */
 
 static int
-MakeUpvar(iPtr, framePtr, otherP1, otherP2, myName, flags)
-    Interp *iPtr;              /* Interpreter containing variables.  Used
+MakeUpvar(
+    Interp *iPtr,              /* Interpreter containing variables.  Used
                                 * for error messages, too. */
-    CallFrame *framePtr;       /* Call frame containing "other" variable.
+    CallFrame *framePtr,       /* Call frame containing "other" variable.
                                 * NULL means use global context. */
-    char *otherP1, *otherP2;   /* Two-part name of variable in framePtr. */
-    char *myName;              /* Name of variable in local table, which
+    char *otherP1, char *otherP2,/* Two-part name of variable in framePtr. */
+    char *myName,              /* Name of variable in local table, which
                                 * will refer to otherP1/P2.  Must be a
                                 * scalar. */
-    int flags;                 /* 0 or TCL_GLOBAL_ONLY: indicates scope of
+    int flags                  /* 0 or TCL_GLOBAL_ONLY: indicates scope of
                                 * myName. */
+)
 {
     Tcl_HashEntry *hPtr;
     Var *otherPtr, *varPtr, *arrayPtr;
@@ -1774,21 +1793,22 @@ MakeUpvar(iPtr, framePtr, otherP1, otherP2, myName, flags)
  */
 
 int
-Tcl_UpVar(interp, frameName, varName, localName, flags)
-    Tcl_Interp *interp;                /* Command interpreter in which varName is
+Tcl_UpVar(
+    Tcl_Interp *interp,                /* Command interpreter in which varName is
                                 * to be looked up. */
-    char *frameName;           /* Name of the frame containing the source
+    char *frameName,           /* Name of the frame containing the source
                                 * variable, such as "1" or "#0". */
-    char *varName;             /* Name of a variable in interp.  May be
+    char *varName,             /* Name of a variable in interp.  May be
                                 * either a scalar name or an element
                                 * in an array. */
-    char *localName;           /* Destination variable name. */
-    int flags;                 /* Either 0 or TCL_GLOBAL_ONLY;  indicates
+    char *localName,           /* Destination variable name. */
+    int flags                  /* Either 0 or TCL_GLOBAL_ONLY;  indicates
                                 * whether localName is local or global. */
+)
 {
     int result;
     CallFrame *framePtr;
-    register char *p;
+    char *p;
 
     result = TclGetFrame(interp, frameName, &framePtr);
     if (result == -1) {
@@ -1848,14 +1868,15 @@ Tcl_UpVar(interp, frameName, varName, localName, flags)
  */
 
 int
-Tcl_UpVar2(interp, frameName, part1, part2, localName, flags)
-    Tcl_Interp *interp;                /* Interpreter containing variables.  Used
+Tcl_UpVar2(
+    Tcl_Interp *interp,                /* Interpreter containing variables.  Used
                                 * for error messages too. */
-    char *frameName;           /* Name of the frame containing the source
+    char *frameName,           /* Name of the frame containing the source
                                 * variable, such as "1" or "#0". */
-    char *part1, *part2;       /* Two parts of source variable name. */
-    char *localName;           /* Destination variable name. */
-    int flags;                 /* TCL_GLOBAL_ONLY or 0. */
+    char *part1, char *part2,  /* Two parts of source variable name. */
+    char *localName,           /* Destination variable name. */
+    int flags                  /* TCL_GLOBAL_ONLY or 0. */
+)
 {
     int result;
     CallFrame *framePtr;
@@ -1887,13 +1908,14 @@ Tcl_UpVar2(interp, frameName, part1, part2, localName, flags)
 
        /* ARGSUSED */
 int
-Tcl_GlobalCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_GlobalCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
 
     if (argc < 2) {
        Tcl_AppendResult((Tcl_Interp *) iPtr, "wrong # args: should be \"",
@@ -1932,16 +1954,17 @@ Tcl_GlobalCmd(dummy, interp, argc, argv)
 
        /* ARGSUSED */
 int
-Tcl_UpvarCmd(dummy, interp, argc, argv)
-    ClientData dummy;                  /* Not used. */
-    Tcl_Interp *interp;                        /* Current interpreter. */
-    int argc;                          /* Number of arguments. */
-    char **argv;                       /* Argument strings. */
+Tcl_UpvarCmd(
+    ClientData dummy,                  /* Not used. */
+    Tcl_Interp *interp,                        /* Current interpreter. */
+    int argc,                          /* Number of arguments. */
+    char **argv                                /* Argument strings. */
+)
 {
-    register Interp *iPtr = (Interp *) interp;
+    Interp *iPtr = (Interp *) interp;
     int result;
     CallFrame *framePtr;
-    register char *p;
+    char *p;
 
     if (argc < 3) {
        upvarSyntax:
@@ -2030,16 +2053,16 @@ Tcl_UpvarCmd(dummy, interp, argc, argv)
  */
 
 static char *
-CallTraces(iPtr, arrayPtr, varPtr, part1, part2, flags)
-    Interp *iPtr;                      /* Interpreter containing variable. */
-    register Var *arrayPtr;            /* Pointer to array variable that
+CallTraces(
+    Interp *iPtr,                      /* Interpreter containing variable. */
+    Var *arrayPtr,             /* Pointer to array variable that
                                         * contains the variable, or NULL if
                                         * the variable isn't an element of an
                                         * array. */
-    Var *varPtr;                       /* Variable whose traces are to be
+    Var *varPtr,                       /* Variable whose traces are to be
                                         * invoked. */
-    char *part1, *part2;               /* Variable's two-part name. */
-    int flags;                         /* Flags to pass to trace procedures:
+    char *part1, char *part2,          /* Variable's two-part name. */
+    int flags                          /* Flags to pass to trace procedures:
                                         * indicates what's happening to
                                         * variable, plus other stuff like
                                         * TCL_GLOBAL_ONLY and
@@ -2047,8 +2070,9 @@ CallTraces(iPtr, arrayPtr, varPtr, part1, part2, flags)
                                         * contain PART1_NOT_PARSEd, which
                                         * should not be passed through
                                         * to callbacks. */
+)
 {
-    register VarTrace *tracePtr;
+    VarTrace *tracePtr;
     ActiveVarTrace active;
     char *result, *openParen, *p;
     Tcl_DString nameCopy;
@@ -2192,9 +2216,9 @@ CallTraces(iPtr, arrayPtr, varPtr, part1, part2, flags)
  */
 
 static Var *
-NewVar()
+NewVar(void)
 {
-    register Var *varPtr;
+    Var *varPtr;
 
     varPtr = (Var *) ckalloc(sizeof(Var));
     varPtr->valueLength = 0;
@@ -2228,15 +2252,16 @@ NewVar()
  */
 
 static ArraySearch *
-ParseSearchId(interp, varPtr, varName, string)
-    Tcl_Interp *interp;                /* Interpreter containing variable. */
-    Var *varPtr;               /* Array variable search is for. */
-    char *varName;             /* Name of array variable that search is
+ParseSearchId(
+    Tcl_Interp *interp,                /* Interpreter containing variable. */
+    Var *varPtr,               /* Array variable search is for. */
+    char *varName,             /* Name of array variable that search is
                                 * supposed to be for. */
-    char *string;              /* String containing id of search.  Must have
+    char *string               /* String containing id of search.  Must have
                                 * form "search-num-var" where "num" is a
                                 * decimal number and "var" is a variable
                                 * name. */
+)
 {
     char *end;
     int id;
@@ -2296,9 +2321,10 @@ ParseSearchId(interp, varPtr, varName, string)
  */
 
 static void
-DeleteSearches(arrayVarPtr)
-    register Var *arrayVarPtr;         /* Variable whose searches are
+DeleteSearches(
+    Var *arrayVarPtr           /* Variable whose searches are
                                         * to be deleted. */
+)
 {
     ArraySearch *searchPtr;
 
@@ -2331,14 +2357,15 @@ DeleteSearches(arrayVarPtr)
  */
 
 void
-TclDeleteVars(iPtr, tablePtr)
-    Interp *iPtr;              /* Interpreter to which variables belong. */
-    Tcl_HashTable *tablePtr;   /* Hash table containing variables to
+TclDeleteVars(
+    Interp *iPtr,              /* Interpreter to which variables belong. */
+    Tcl_HashTable *tablePtr    /* Hash table containing variables to
                                 * delete. */
+)
 {
     Tcl_HashSearch search;
     Tcl_HashEntry *hPtr;
-    register Var *varPtr;
+    Var *varPtr;
     Var *upvarPtr;
     int flags;
     ActiveVarTrace *activePtr;
@@ -2454,19 +2481,20 @@ TclDeleteVars(iPtr, tablePtr)
  */
 
 static void
-DeleteArray(iPtr, arrayName, varPtr, flags)
-    Interp *iPtr;                      /* Interpreter containing array. */
-    char *arrayName;                   /* Name of array (used for trace
+DeleteArray(
+    Interp *iPtr,                      /* Interpreter containing array. */
+    char *arrayName,                   /* Name of array (used for trace
                                         * callbacks). */
-    Var *varPtr;                       /* Pointer to variable structure. */
-    int flags;                         /* Flags to pass to CallTraces:
+    Var *varPtr,                       /* Pointer to variable structure. */
+    int flags                          /* Flags to pass to CallTraces:
                                         * TCL_TRACE_UNSETS and sometimes
                                         * TCL_INTERP_DESTROYED and/or
                                         * TCL_GLOBAL_ONLY. */
+)
 {
     Tcl_HashSearch search;
-    register Tcl_HashEntry *hPtr;
-    register Var *elPtr;
+    Tcl_HashEntry *hPtr;
+    Var *elPtr;
     ActiveVarTrace *activePtr;
 
     DeleteSearches(varPtr);
@@ -2536,12 +2564,13 @@ DeleteArray(iPtr, arrayName, varPtr, flags)
  */
 
 static void
-CleanupVar(varPtr, arrayPtr)
-    Var *varPtr;               /* Pointer to variable that may be a
+CleanupVar(
+    Var *varPtr,               /* Pointer to variable that may be a
                                 * candidate for being expunged. */
-    Var *arrayPtr;             /* Array that contains the variable, or
+    Var *arrayPtr              /* Array that contains the variable, or
                                 * NULL if this variable isn't an array
                                 * element. */
+)
 {
     if ((varPtr->flags & VAR_UNDEFINED) && (varPtr->refCount == 0)
            && (varPtr->tracePtr == NULL)) {
@@ -2582,12 +2611,13 @@ CleanupVar(varPtr, arrayPtr)
  */
 
 static void
-VarErrMsg(interp, part1, part2, operation, reason)
-    Tcl_Interp *interp;                /* Interpreter in which to record message. */
-    char *part1, *part2;       /* Variable's two-part name. */
-    char *operation;           /* String describing operation that failed,
+VarErrMsg(
+    Tcl_Interp *interp,                /* Interpreter in which to record message. */
+    char *part1, char *part2,  /* Variable's two-part name. */
+    char *operation,           /* String describing operation that failed,
                                 * e.g. "read", "set", or "unset". */
-    char *reason;              /* String describing why operation failed. */
+    char *reason               /* String describing why operation failed. */
+)
 {
     Tcl_ResetResult(interp);
     Tcl_AppendResult(interp, "can't ", operation, " \"", part1, (char *) NULL);
index 49ef66d11d5ac037da61b803f2047679a8b21f29..bb6b1ac3edec335d89e443368f1a5bc8491316c4 100644 (file)
@@ -26,7 +26,7 @@
 #include "XlationSvc.h"
 
 int
-main()
+main(void)
 {
 _DtXlateDb  myDb = NULL;
 char        myPlatform[_DtPLATFORM_MAX_LEN+1];
index e30c4f18f504ab78b0c3c869e3944d8c2279a8cd..c8d8eee15310281d4629958bec74b105262a0a9d 100644 (file)
@@ -412,7 +412,7 @@ GetValues(
 {
    ChangeDirData * change_dir_data;
    Arg args[8];
-   register int n;
+   int n;
    XmStringTable history_list;
    XmString      string_path;
 
@@ -664,7 +664,7 @@ static void
 FreeValues(
         ChangeDirData *change_dir_data )
 {
-   register int i;
+   int i;
 
    for (i = 0; i < change_dir_data->list_count; i++)
       XmStringFree (change_dir_data->history_list[i]);
index e37e7834eeede169da3e5f6234dcb05e4d24bdad..2c25cc35e01187de3bae3e83b7da0de6f1b97b78 100644 (file)
@@ -122,8 +122,8 @@ UpdateActionMenuPane(
    FileViewData *file_view_data;
    DesktopRec *desktopWindow;
    Widget child;
-   register int i, menu_offset;
-   register int action_count;
+   int i, menu_offset;
+   int action_count;
    int count, del_count;
    int num_children;
    char ** command_list;
index 80cf8bd13203992a8032bbc4cdb0026dc6078d0d..68bc6e16ddc267a9a8c45a5df0b86244f84c3224 100644 (file)
@@ -1556,10 +1556,7 @@ DrawAInput (
  ************************************************************************/
 
 void
-RemoveDT (w, client_data, call_data)
-      Widget w;
-      XtPointer client_data;
-      XtPointer call_data;
+RemoveDT (Widget w, XtPointer client_data, XtPointer call_data)
 {
    DesktopRec *desktopWindow = (DesktopRec *) client_data;
    int i, j, num_of_files;
@@ -1609,11 +1606,8 @@ RemoveDT (w, client_data, call_data)
 
 #ifdef SUN_PERF
 void
-RemoveMovedObjectFromDT (w, client_data, file_cnt, file_list)
-      Widget w;
-      XtPointer client_data;
-      int file_cnt ;
-      char **file_list ;
+RemoveMovedObjectFromDT (Widget w, XtPointer client_data, int file_cnt,
+                         char **file_list)
 {
    DesktopRec *desktopWindow = (DesktopRec *) client_data;
    int i, j, k, m, num_of_files;
@@ -1867,7 +1861,7 @@ DeselectAllDTFiles (
       WorkspaceRec *workspaceData)
 {
    int selection_count;
-   register int i;
+   int i;
 
    selection_count = workspaceData->files_selected;
 
@@ -1898,8 +1892,8 @@ DeselectDTFile (
       DesktopRec *desktopWindow)
 {
    int selection_count;
-   register int i;
-   register int j;
+   int i;
+   int j;
 
 
    selection_count = workspaceData->files_selected;
@@ -2412,7 +2406,7 @@ ProcessDTSelection (
 
 
 void
-UnpostDTTextField ()
+UnpostDTTextField (void)
 
 {
    DesktopRec *desktopWindow;
index 1351ba4ce3a43508871c7be4c4abff381899dd50..2f9fbb6c14d717726dde059ac482269f57a6536a 100644 (file)
@@ -3612,10 +3612,8 @@ GetLongName(
    {
 #define ELLIPSIS " (...) "
 #define NAME_PRECISION 28
-#ifdef MULTIBYTE
      if (! is_multibyte)
      {
-#endif
        int len = strlen( file_data->file_name );
        if( len > NAME_PRECISION )
        {
@@ -3647,7 +3645,6 @@ GetLongName(
                  user_name, group_name,
                  link_path );
        }
-#ifdef MULTIBYTE
      } else {
        /* MULTIBYTE
        *
@@ -3710,7 +3707,6 @@ GetLongName(
                user_name, group_name,
                link_path );
      } /* is_multibyte */
-#endif  /* MULTIBYTE */
    }
 
    return (long_name);
index bf95070ff0a729e28ff2e0b0a63284562da5550c..ed72e1c8516d22a1f5b3ef40ba2eb6d8279ac7fe 100644 (file)
@@ -841,7 +841,7 @@ _DtHideDialog(
    Dialog * dialog;
    DialogData * new_data;
    CorePart * core;
-   register int i;
+   int i;
 
 
    /*  Find the dialog and then hide it.  */
@@ -1575,7 +1575,7 @@ TimerEvent(
         XtIntervalId *id )
 
 {
-   register int i;
+   int i;
    Dialog * dialog;
    Dialog * prev_dialog;
    int count;
index 228be51b628b67bcda93e47d800925d4e7249865..14b8786767590264ff71688af5b1f90d6a77669b 100644 (file)
@@ -282,7 +282,7 @@ static ObjectPosition *GetPositionalData (
 static void RedisplayUsingStackingOrder (
                         FileMgrData * file_mgr_data,
                         Widget w,
-                        register XEvent *event,
+                        XEvent *event,
                         Region region) ;
 static void ReorderChildrenList (
                         XmManagerWidget file_window,
@@ -345,8 +345,8 @@ static void LayoutDesktopIcons(
                         Boolean turn_off_hourglass);
 static XmGadget InputInGadget (
                        Widget w,
-                        register int x,
-                       register int y);
+                        int x,
+                       int y);
 static XmGadget InputForGadget (
                         Widget cw,
                         int x,
@@ -787,8 +787,8 @@ OrderFiles(
    FileViewData ** order_list;
    int * sort;
    int * sub_sort;
-   register int i;
-   register int start;
+   int i;
+   int start;
 
    file_view_data = directory_set->file_view_data;
    file_count = directory_set->file_count;
@@ -903,7 +903,7 @@ FilterFiles(
 {
    FileViewData **file_view_data;
    FilterData *   filter_data;
-   register int   i, j, k;
+   int   i, j, k;
    Boolean        show_hidden;
    String         filter;
    Boolean        mustMatch, matches;
@@ -1868,7 +1868,7 @@ GetDragIcon(
    XmManagerWidget mw = (XmManagerWidget) XtParent(w);
    Widget screen_object = (Widget) XmGetXmScreen(XtScreenOfObject(w));
    Arg args[11];
-   register int n;
+   int n;
    unsigned int wid, hei, d, junk;
    Widget dragIcon;
    Pixmap dragPixmap;
@@ -2247,7 +2247,7 @@ InitiateIconDrag(
    XRectangle pRect, lRect;
    unsigned char flags;
    int stringSize;
-   register int i;
+   int i;
    Arg args[10];
    Boolean allowDropInInitiatingWindow;
    int rectCount;
@@ -2321,18 +2321,18 @@ InitiateIconDrag(
 static XmGadget
 InputInGadget (
    Widget w,
-   register int x,
-   register int y)
+   int x,
+   int y)
 
 {
    CompositeWidget cw = (CompositeWidget)w;
    static Region r = NULL;
    FileMgrData * file_mgr_data;
    Boolean simpleCheck = False;
-   register int i;
+   int i;
    unsigned char flags;
    XRectangle pRect, lRect;
-   register Widget widget;
+   Widget widget;
 
    file_mgr_data = ReturnDesktopPtr((Widget)cw);
 
@@ -2741,8 +2741,8 @@ DeselectFile(
         Boolean valid)
 {
    int selection_count;
-   register int i;
-   register int j;
+   int i;
+   int j;
 
 
    selection_count = file_mgr_data->selected_file_count;
@@ -2781,7 +2781,7 @@ DeselectAllFiles(
         FileMgrData *file_mgr_data )
 {
    FileViewData * file_view_data;
-   register int i, j, k;
+   int i, j, k;
    ObjectPtr bottom;
    FileViewData ** repaint_list;
 
@@ -2887,8 +2887,8 @@ SelectAllFiles(
    FileViewData ** order_list;
    int directory_count;
    int selection_count;
-   register int i;
-   register int j;
+   int i;
+   int j;
    ObjectPtr top;
    FileViewData ** selection_list;
 
@@ -3142,27 +3142,17 @@ GetInsertPosition( int x1, int x2, XmFontList fontList, char * name )
   int i, width, stringWidth;
   char * tmp;
   char savedChar;
-#ifdef MULTIBYTE
   int len;
-#endif /* MULTIBYTE */
 
   width = x2 - x1;
 
-#ifdef MULTIBYTE
   i = 0;
   tmp = name;
   while ((len = mblen(tmp, MB_CUR_MAX)) > 0)
-#else /* MULTIBYTE */
-  for( tmp = name + 1, i = 0;
-       *tmp != 0x0;
-       ++tmp, ++i )
-#endif /* MULTIBYTE */
   {
     XmString string;
 
-#ifdef MULTIBYTE
     tmp += len;
-#endif /* MULTIBYTE */
 
     savedChar = *tmp;
     *tmp = 0x0;
@@ -3172,10 +3162,8 @@ GetInsertPosition( int x1, int x2, XmFontList fontList, char * name )
     *tmp = savedChar;
     if( stringWidth > width )
       break;
-#ifdef MULTIBYTE
     else
       i++;
-#endif /* MULTIBYTE */
   }
 
   return( i );
@@ -3690,11 +3678,11 @@ static void
 RedisplayUsingStackingOrder (
    FileMgrData * file_mgr_data,
    Widget w,
-   register XEvent *event,
+   XEvent *event,
    Region region)
 
 {
-   register Widget child;
+   Widget child;
    FileViewData * file_view_data;
    ObjectPosition * bottom;
    ObjectPosition * top;
@@ -4009,7 +3997,7 @@ ReorderChildrenList (
 
 {
    Widget * children = file_window->composite.children;
-   register int i, j;
+   int i, j;
 
    for (i = 0; i < manageCount; i++)
       children[i] = manage[i];
@@ -4436,7 +4424,7 @@ PositionFileView(
 static Boolean
 InMultipleObjectRegion (FileMgrData * file_mgr_data, FileViewData * fileViewData)
 {
-  register int i;
+  int i;
   for( i = 0; i < file_mgr_data->selected_file_count; ++i )
     if( strcmp( file_mgr_data->selection_list[i]->file_data->file_name, fileViewData->file_data->file_name ) == 0 )
       return True;
@@ -6357,13 +6345,8 @@ EstimateIconSize(
    if (file_view_data == NULL) {
       label_len = 1;
    } else {
-#ifdef MULTIBYTE
       label_len = DtCharCount(file_view_data->label == NULL ?
                        file_view_data->file_data->file_name : file_view_data->label);
-#else
-      label_len = strlen(file_view_data->label == NULL ?
-                       file_view_data->file_data->file_name : file_view_data->label);
-#endif
    }
 
    if (layout_data->pixmap_position == XmPIXMAP_TOP)
index 105c574bcb855da2a403fbe61e854a95dcaba75a..6c94699292a6ffa69642250eb28eaf0ba3812a67 100644 (file)
@@ -231,7 +231,7 @@ FileOperationError(
  ************************************************************************/
 char *
 DName(
-        register char *name )
+        char *name )
 {
    char * p;
    char * q;
@@ -262,8 +262,8 @@ DName(
 static int
 Check(
         Widget w,
-        register char *spth,
-        register ino_t dinode,
+        char *spth,
+        ino_t dinode,
         int mode,
         void (*errorHandler)() )
 {
@@ -324,15 +324,15 @@ Check(
 static Boolean
 MoveDir(
         Widget w,
-        register char *source,
-        register char *target,
+        char *source,
+        char *target,
         struct stat *sourceStatInfo,
         void (*errorHandler)(),
         char ** targetRtn ,
         int type )
 {
    static char *pname = "MoveDir";
-   register char *p;
+   char *p;
 
    char * targetDir;            /* original target dir path */
    char *link_path;
@@ -597,8 +597,8 @@ static Boolean
 CopyDir(
         Widget w,
         int mode,
-        register char *from,
-        register char *to,
+        char *from,
+        char *to,
         Boolean  isContainer,
         struct stat *s1,
         void (*errorHandler)(),
@@ -771,16 +771,16 @@ Boolean
 FileManip(
         Widget w,
         int mode,
-        register char *from,
-        register char *to,
+        char *from,
+        char *to,
         Boolean  isContainer,          /* described in function CopyDir */
         void (*errorHandler)(),
         Boolean checkForBusyDir,
         int type )
 {
-   register int fold;
-   register int fnew;
-   register int n;
+   int fold;
+   int fnew;
+   int n;
    Boolean copy_dir_return;
    Boolean move_dir_return;
    void (*oldInt)();
index 0cc15646324c2f44c2f1ec6cbbd4d2413f968e44..011e80fecd0f76b4848838d0f4cbac2056707cc1 100644 (file)
@@ -1652,9 +1652,9 @@ SetValues(
    ModAttrData *attr_data;
    Boolean loadOk;
 
-   register int i;
-   register int j;
-   register int k;
+   int i;
+   int j;
+   int k;
    DirectorySet ** directory_set;
    FileViewData ** order_list;
    int directory_count;
@@ -3442,7 +3442,7 @@ DropOnPrimaryHotspot (
    DirectorySet ** directory_data)
 {
    int directory_count;
-   register int i, j;
+   int i, j;
    FileViewData * file_view_data;
    DirectorySet * dir_data;
    ObjectPtr top;
@@ -3967,9 +3967,9 @@ GetFileData(
    int new_dir_count;
    int new_file_count;
    ObjectPtr position_info;
-   register int i;
-   register int j;
-   register int k;
+   int i;
+   int j;
+   int k;
    Boolean match;
 
 
@@ -4787,7 +4787,7 @@ FreeDirectorySet(
         DirectorySet ** directory_set,
         int directory_count)
 {
-   register int i, j;
+   int i, j;
 
    if (!directory_set)
      return;
@@ -6259,7 +6259,7 @@ DoTheMove(
    int file_count;
    char **file_set;
    char **host_set;
-   register int i, j;
+   int i, j;
    char *file, *next, *end;
    char directory[MAX_PATH];
    Boolean result = True;
index 71fb94bb18759a4170965397b531c0cdffcbf69e..9293d0239a0a22b11335f3309582d46dde002a68 100644 (file)
@@ -2864,14 +2864,11 @@ SetFocus(
 }
 
 FILE *
-findpopen(cmd,mode,childpid)
-   char *cmd;
-   char *mode;
-   int *childpid;
+findpopen(char *cmd, char *mode, int *childpid)
 {
    static char *pname = "findpopen";
    int     fd[2];
-   register int parentside, childside;
+   int parentside, childside;
 
    if(pipe(fd) < 0)
         return(NULL);
index 43a66ce8eacec36f0b00c6fa0aa52a01a337cbb3..3892448e68c90745fff4f07061528ac0125f4931 100644 (file)
@@ -149,7 +149,7 @@ FileWindowExposeCallback(
    DialogData  * dialog_data;
    FileMgrData * file_mgr_data;
    XmDrawingAreaCallbackStruct * da_cbs;
-   register int i;
+   int i;
 
    file_mgr_rec = (FileMgrRec *) client_data;
    dialog_data = _DtGetInstanceData ((XtPointer)file_mgr_rec);
@@ -1622,7 +1622,7 @@ ProcessSelection (
    XRectangle   widget_rect;
    DirectorySet ** directory_set;
    int directory_count;
-   register int i, j;
+   int i, j;
    Region region;
    Region widget_region;
    Region intersect_region;
index bfb3fc6847cde7388aa3a1980fd8f6d7ce4591df..70a939d5104743cb7285fcd6559fa1860a43e59c 100644 (file)
@@ -14,7 +14,7 @@ XINLIB = -lDtXinerama -lXinerama
 #endif
 
 DEPEND_DEFINES = $(DEPENDDEFINES)
-DEFINES = -DMULTIBYTE -DSHAPE -D_ILS_MACROS -DSUN_PERF \
+DEFINES = -DSHAPE -D_ILS_MACROS -DSUN_PERF \
        -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
        -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
        -DKORNSHELL=\"$(KORNSHELL)\" $(XINOPT)
index e384acfe178a4aa36086af5528149716fe98a5d7..4943a5f65305fbdabea037933158644df5fc5f62 100644 (file)
@@ -3920,8 +3920,8 @@ void
 CloseView(
         DialogData *dialog_data )
 {
-   register int i;
-   register int j;
+   int i;
+   int j;
    FileMgrData * file_mgr_data;
    DialogData * tmpDialog_data;
    FileMgrRec * file_mgr_rec;
@@ -4469,7 +4469,7 @@ static void
 ViewHomeDirectoryHandler(
    Tt_message msg)
 {
-   register int i, j, k;
+   int i, j, k;
    struct passwd * pwInfo;
    char * homeDir;
    char * tmp_path;
@@ -4647,7 +4647,7 @@ static void
 ViewToolsDirectoryHandler(
    Tt_message msg)
 {
-   register int i;
+   int i;
    char * tmp_path = NULL;
    char * tool_dir = NULL;
    char * msgFile = NULL;
@@ -5433,9 +5433,8 @@ static unsigned char
         unsigned char **ppchNext)
 {
     unsigned char *pchR = pchIn;
-    register int   i;
-#ifdef MULTIBYTE
-    register int   chlen;
+    int   i;
+    int   chlen;
 
     for (i = 0; ((chlen = mblen ((char *)pchIn, MB_CUR_MAX)) > 0); i++)
     /* find end of word: requires singlebyte whitespace terminator */
@@ -5447,19 +5446,8 @@ static unsigned char
         pchIn += chlen;
     }
 
-#else
-    for (i = 0; *pchIn && !isspace (*pchIn); i++, pchIn++)
-    /* find end of word */
-    {
-    }
-#endif
-
     /* skip to next word */
-#ifdef MULTIBYTE
     while (pchIn && (mblen ((char *)pchIn, MB_CUR_MAX) == 1) && isspace (*pchIn))
-#else
-    while (pchIn && isspace (*pchIn))
-#endif
     {
         *pchIn++;
     }
@@ -6007,9 +5995,9 @@ ForceMyIconClosed (
    char * host_name,
    char * directory_name)
 {
-   register int i;
-   register int j;
-   register int k;
+   int i;
+   int j;
+   int k;
    Arg args[1];
    FileViewData * file_view_data = NULL;
    DialogData *dialog_data;
index 08b4ffc33be287370533dd66d2ad4cf5a0a1ac9f..e19429d781c92b4d98c45abae15bc89072d1594e 100644 (file)
@@ -624,10 +624,10 @@ extern void AddString(
 /* prototype from MakeDir.c */
 
 extern int RunFileCommand(
-                        register char *command_path,
-                        register char *argument1,
-                        register char *argument2,
-                        register char *argument3) ;
+                        char *command_path,
+                        char *argument1,
+                        char *argument2,
+                        char *argument3) ;
 
 /* prototypes from Directory.h */
 
@@ -960,8 +960,8 @@ extern void FileOperationError(
 extern Boolean FileManip(
                         Widget w,
                         int mode,
-                        register char *from,
-                        register char *to,
+                        char *from,
+                        char *to,
                         Boolean isContainer,
                         void (*errorHandler)(),
                         Boolean checkForBusyDir,
@@ -971,7 +971,7 @@ extern int CheckAccess(
                         int what);
 
 extern char * DName(
-                        register char *name) ;
+                        char *name) ;
 
 /* prototypes from FileMgr.h */
 
index c53489b5a547a5287ed83a32e885664f142003b2..e5a91d880f5820d6bf49c7f51120aa0bcfe75306 100644 (file)
@@ -696,7 +696,7 @@ GetMainMenuData (
 
 
 void
-GetHomeDir( )
+GetHomeDir(void)
 {
   struct passwd * pwInfo;
 
@@ -770,7 +770,7 @@ static void
 UnmanageAllActionItems(
         FileMgrRec *file_mgr_rec )
 {
-  register int i, children;
+  int i, children;
   XmManagerWidget action_pane;
 
   action_pane = (XmManagerWidget) file_mgr_rec->action_pane;
@@ -987,7 +987,7 @@ TrashFiles(
    Widget mbar;
    DtActionArg * action_args;
    int arg_count;
-   register int i;
+   int i;
 
    if (!TrashIsInitialized())
    {
index 2c9c51541c6665e9889cf91108323947a9c21ea3..124b20ff4e2c5e862fb0c13e3ad44c842b2d8f32 100644 (file)
 
 int
 RunFileCommand(
-        register char *command_path,
-        register char *argument1,
-        register char *argument2,
-        register char *argument3)
+        char *command_path,
+        char *argument1,
+        char *argument2,
+        char *argument3)
 {
    static char *pname = "RunFileCommand";
-   register int child;           /* process id of command process */
-   register int wait_return;     /* return value from wait */
+   int child;           /* process id of command process */
+   int wait_return;     /* return value from wait */
             int exit_value;      /* command exit value */
-   register char *command_name;  /* pointer to the command name */
-   register int i;
+   char *command_name;  /* pointer to the command name */
+   int i;
    void (*oldSig)();
   
    /* prepare to catch the command termination */
index 1a4366634250c09175556cb4f36ab59fff538975..9dc65694ed019aa9e34c0496cd279c92dc22046c 100644 (file)
@@ -179,10 +179,10 @@ static void RenameCollisions(
 
 char *
 _DtPName(
-        register char *name )
+        char *name )
 
 {
-   register char * q;
+   char * q;
    static char pnam[MAXPATHLEN];
    static char dot[] = ".";
 
@@ -293,16 +293,16 @@ _DtFollowLink (
 
 Boolean
 _DtStringsAreEquivalent(
-        register char *in_str,
-        register char *test_str )
+        char *in_str,
+        char *test_str )
 {
 #ifdef NLS16
    wchar_t c1;
    wchar_t c2;
    int c1size, c2size;
 #endif
-   register int i;
-   register int j;
+   int i;
+   int j;
 
 #ifdef NLS16
    if (is_multibyte)
@@ -1391,7 +1391,7 @@ RetrieveAndUseNameTemplateInfo(
 static void
 RenameCollisions( char ** list, int count )
 {
-  register int i, j, k, l;
+  int i, j, k, l;
   char flg = 0, flg2 = 0;
 
   for( i = 0; i < count; ++i )
index 2ca22338ef46f0b6b3a90c0fe560828127c5adc6..e5a744caa89f40f6ca9cd28768686cd02d982cb6 100644 (file)
@@ -54,12 +54,12 @@ extern String _DtStripSpaces(
                         String string) ;
 
 extern char * _DtPName(
-                        register char *name) ;
+                        char *name) ;
 extern char * _DtFollowLink(
                         char * path) ;
 extern Boolean _DtStringsAreEquivalent(
-                        register char *in_str,
-                        register char *test_str) ;
+                        char *in_str,
+                        char *test_str) ;
 extern void _DtDuplicateDialogNameList (
                         char ** nameList,
                         char ** newNameList,
index 294069fb5ae81bf3190ba81790423813f8de7655..34924a5fc0e4a6192fc827253702868228cb71c7 100644 (file)
@@ -151,7 +151,7 @@ FileCallback(
 
 
 void
-FinalizeToolTalkSession( )
+FinalizeToolTalkSession(void)
 {
   Tt_status ttRc;
   int i;
index ad792753770d597bfc47152eeb64f618bcb92aa9..d391cccdb0e5ffdbcc9e2806b017dd34619b3228 100644 (file)
@@ -395,8 +395,8 @@ static void RestoreVerifyCancel(
 static int RestoreObject(
                         Widget w,
                         int mode,
-                        register char *source,
-                        register char *target,
+                        char *source,
+                        char *target,
                         Boolean  isContainer,
                         void (*errorHandler)(),
                         Boolean checkForBusyDir,
@@ -4280,8 +4280,8 @@ static int
 RestoreObject(
         Widget w,
         int mode,
-        register char *source,
-        register char *target,
+        char *source,
+        char *target,
         Boolean  isContainer,
         void (*errorHandler)(),
         Boolean checkForBusyDir,
index 9bf90d6a39ca5767c561ecc3fc41f42a1e06c6ec..8214d4036b7130427b2d83361b45b2d8f2e01ec8 100644 (file)
@@ -84,8 +84,8 @@
 
 /* Cannot put into sharedFuncs.h due to conflict with FileManip.c */
 extern int       Check(
-                                    register char *spth,
-                                    register char *dpth,
+                                    char *spth,
+                                    char *dpth,
                                     int mode);
 
 /*--------------------------------------------------------------------
@@ -367,10 +367,7 @@ cancel_callback(
 
 
 static void
-pause_callback(w, client_data, call_data)
-       Widget w;
-       XtPointer client_data;
-       XtPointer call_data;
+pause_callback(Widget w, XtPointer client_data, XtPointer call_data)
 {
   XmString xm_string;
   Pixmap px;
index aefde211a6c003fb47e274a26c190d468a8c7bdb..ac5b84b37abd24a0689cd129ef14431a25346c64 100644 (file)
@@ -278,7 +278,7 @@ _DtChildPosition(
 
 
 static Widget
-Get_Help_Dialog()
+Get_Help_Dialog(void)
 {
     Widget dialog;
     Arg args[5];
index 132ab7f4cf16cc6ff5f1e8a40b8945bee9baeb52..64e41ebe46120158c8cb0988ee08a60fad0fda15 100644 (file)
@@ -16,9 +16,4 @@
 !######################################################################
 
 XCOMM include "Dt"
-
-#ifdef __apollo
-Dtcolor*font:          user12x23
-#else
 %|nls-1-#optional_font_spec#|
-#endif
index fd8b329a2b45a7914209552402734526f156c0e6..eec7e5b852f763ffb7dcf73e5dafd51f0c6e5f45 100644 (file)
@@ -76,11 +76,7 @@ static char rcsid[] = "$TOG: dthello.c /main/9 1998/04/20 12:52:17 mgreess $";
 #include <sys/signal.h>
 #include <Xm/Xm.h>
 #include <Dt/GetDispRes.h>
-#ifdef __apollo
-#include </sys5/usr/include/limits.h>
-#else
 #include <limits.h>
-#endif
 #include <locale.h>
 #ifndef NO_MESSAGE_CATALOG
 # include <nl_types.h>
index e7c69961fce21553af027c692b55fc90cd3cefb9..8180dc9b46809372f200743026b2ffd8c1a1aa12 100644 (file)
@@ -170,7 +170,7 @@ static void ExpandVolume(
  * Purpose:        Initializes our global variables to valid starting values.
  *
  ****************************************************************************/
-static void GlobalInit()
+static void GlobalInit(void)
 
 {
 
index 0fce96e78a7e7eef074da5e248b957a69fe6c22b..6183275b7d28d82fa0ae5c84e3157f3f15110a4b 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "context.h"
 #define BUILDEF
 #include "build.h"
index 21c610cbd15dca681602a689b4ee594f71594182..573acf80139e8470f4c89d643aaeec7916e9048c 100644 (file)
@@ -421,8 +421,4 @@ BUILDEXTERN LOGICAL entrule BUILDINIT(FALSE) ;
 
 BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
 
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
+M_WCHAR *MakeWideCharString(const char *from);
index 5ceb2601cab42729fefa928fd8087afa02b8c55e..7ba1b45e8ad67692ef98610f2e8fac8f02188cb3 100644 (file)
@@ -62,7 +62,7 @@ if (*flag)
 }
 
 /* Program initialization */
-void initialize(M_NOPAR)
+void initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
@@ -90,7 +90,7 @@ ruleinit() ;
 
 
 /* Initialization before starting a new rule */
-void ruleinit(M_NOPAR)
+void ruleinit(void)
   {
     /* Reinitialize for next rule */
     lhs = NULL ;
@@ -110,7 +110,7 @@ void ruleinit(M_NOPAR)
     }
 
 /* Rule end processing */
-void rulend(M_NOPAR)
+void rulend(void)
   {
     STATE *fsa ;
     LOGICAL canbenull ;
@@ -150,7 +150,7 @@ void rulend(M_NOPAR)
     }
 
 /* Skip rest of statement after an error */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
   {
     int i ;
     static errlev = 0 ;
index 035f330679cafae7c71698c0fcd047bb81e7646d..48437cc12e5549114e7da488ec1c04551f59287d 100644 (file)
@@ -32,7 +32,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "build.h"
 
 /* Add an exception (inclusion or exclusion) for the current element */
-void addex(M_NOPAR)
+void addex(void)
   {
     excount++ ;
     *nextex = (EXCEPTION *) m_malloc(sizeof(EXCEPTION), "exception") ;
index 34359da957b7056b8c676935753a57e7ba35e22a..e89448a014c3f6a07874bbd4f38b83d41f880321 100644 (file)
@@ -37,18 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Addarc adds an arc from FSA state <from> to state <to> setting other
    fields as indicated by the other parameters.*/
-#if defined(M_PROTO)
 int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, int id, LOGICAL minim, ELTSTRUCT **errelt)
-#else
-int addarc(from, to, label, and, optional, id, minim, errelt)
-  STATE *from, *to ;
-  ELTSTRUCT *label ;
-  ANDGROUP *and ;
-  LOGICAL optional ;
-  int id ;
-  LOGICAL minim ;
-  ELTSTRUCT **errelt ;
-#endif
   {
     ARC *parc, *qarc ;
     int determ ;
@@ -187,7 +176,7 @@ void dellist(list)
 
 /* Delstartarcs deletes the contents of the starta list of arcs from start
    states of a submodel */
-void delstartarcs(M_NOPAR)
+void delstartarcs(void)
   {
     ARC *arcptr ;
     ARC *discard ;
@@ -201,7 +190,7 @@ void delstartarcs(M_NOPAR)
     }
 
 /* Getand allocates and initializes a new andgroup structure */
-ANDGROUP *getand(M_NOPAR)
+ANDGROUP *getand(void)
   {
     ANDGROUP *new ;
 
@@ -214,7 +203,7 @@ ANDGROUP *getand(M_NOPAR)
     }    
 
 /* Getstate obtains an FSA state */
-STATE *getstate(M_NOPAR)
+STATE *getstate(void)
   {
     STATE *new ;
 
@@ -488,7 +477,7 @@ LOGICAL permitspcd(a)
 
 /* Pop pops the submodel stack when the end of the current submodel is
    encountered */
-void pop(M_NOPAR)
+void pop(void)
   {
     STACK *discard ;
 
@@ -504,7 +493,7 @@ void pop(M_NOPAR)
     }
 
 /* Push pushes the submodel stack when a new group is encountered */
-void push(M_NOPAR)
+void push(void)
   {
     STACK *new ;
 
@@ -630,12 +619,7 @@ LOGICAL samelabelarc(a, s)
 
 /* Saves the name of an element appearing on the left-hand side of a
    grammar rule */
-#if defined(M_PROTO)
 void savelhs(LOGICAL param)
-#else
-void savelhs(param)
-  LOGICAL param ;
-#endif
   {
     STATE *end ;
     ELTSTRUCT *errelt ;
@@ -663,7 +647,7 @@ void savelhs(param)
 /* Called when arcs are added to the start state of a submodel that is
    also a start state of the parent model to set the parent model's
    starta list */
-void savestartarcs(M_NOPAR)
+void savestartarcs(void)
   {
     ARC *carcptr, *parcptr ;
 
index 47d65f5ca7a29b962608581ef7870a609114bd34..a13b2dcf3fb328b19b44295ad995f51971724bb3 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "context.h"
 #include "build.h"
 #include "delim.h"
@@ -86,7 +83,7 @@ char *deftype(n)
     }
 
 /* Called after all input is read to generate output */
-void done(M_NOPAR)
+void done(void)
   {
 
     if (! eltree.data) {
@@ -166,7 +163,7 @@ void eltblocks(tempfile)
 
 
 /* Writes data about elements */
-void eltreeout(M_NOPAR)
+void eltreeout(void)
   {
     M_WCHAR *p ;
     int enameindex = 0 ;
@@ -244,7 +241,7 @@ char *enttype(n)
     }
 
 /* Outputs exception lists */
-void exout(M_NOPAR)
+void exout(void)
   {
     EXCEPTION *ex ;
     int exindex = 0 ;
@@ -267,7 +264,7 @@ void exout(M_NOPAR)
     }
 
 /* Outputs FSA definitions */
-void fsa(M_NOPAR)
+void fsa(void)
   {
     int arcount = 0 ;
     STATE *pstate ;
@@ -330,7 +327,7 @@ void fsa(M_NOPAR)
     }
 
 /* Writes data about parameters */
-void parout(M_NOPAR)
+void parout(void)
 {
 PARAMETER *paramp ;
 LOGICAL first = TRUE ;
@@ -479,7 +476,7 @@ char *partype(n)
     }
 
 /* Write short reference information */
-void srefout(M_NOPAR)
+void srefout(void)
   {
     LOGICAL first = TRUE ;
     int *mapbysref ;
@@ -626,7 +623,7 @@ fputs("  <END-STRING><\\END-STRING>\n", tempfile) ;
 }
 
 /* Write template */
-void template(M_NOPAR)
+void template(void)
   {
     FILE *tempfile ;
     M_ENTITY *ent ;
index d9ec77455be42827a4ae9c77bca8fe564836ad00..2fb2d549df82803c4b7cbb81f0ee403fd3caa542 100644 (file)
@@ -38,7 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Add a keyword to the list of possible values of a keyword parameter for
    the current element
 */
-void addkeyword(M_NOPAR)
+void addkeyword(void)
 {
 int length ;
 PARAMETER *par ;
@@ -87,7 +87,7 @@ ptypelen++ ;
 }
 
 /* Add a parameter to the current element */
-void addpar(M_NOPAR)
+void addpar(void)
 {
 PARAMETER *paramp, *last ;
 int length ;
@@ -124,12 +124,7 @@ newpar->ptypep = NULL ;
 
 
 /* Check that specified default value is legal parameter value */
-#if defined(M_PROTO)
 LOGICAL checkdefault( const M_WCHAR *string )
-#else
-LOGICAL checkdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 const M_WCHAR *p ;
 int len ;
@@ -204,12 +199,7 @@ switch (newpar->type)
 
 /* Normalize parameter default.  Change tabs and RE's to spaces, capitalize
    all letters (unless type is CDATA), remove extra space in lists */
-#if defined(M_PROTO)
 void normdefault(M_WCHAR *string )
-#else
-void normdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 M_WCHAR *p, *q ;
 int i ;
@@ -269,7 +259,7 @@ switch (newpar->type)
 }
 
 /* Called at end of parameter attribute list rule */
-void prulend(M_NOPAR)
+void prulend(void)
 {
 LHS *lhsp ;
 LHS *discard ;
@@ -292,12 +282,7 @@ ruleinit() ;
 }
 
 /* Make string the default for the current parameter of the current element */
-#if defined(M_PROTO)
 void setdefault(const M_WCHAR *string)
-#else
-void setdefault()
-M_WCHAR *string;
-#endif /* M_PROTO */
 {
 PTYPE *kw ;
 int keycount ;
index 8fb876de99054f47c2f49ec20efa1b70f212f31e..a8b7c96c27fac07a05b3943b92bdf4097b468547 100644 (file)
 */
 
 /* Proto.h contains function prototypes for program BUILD. */
+/* Proto.h contains function prototypes for program BUILD. */
+
+
+int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, 
+  int id, LOGICAL minim, ELTSTRUCT **errelt);
+
+void adddefent(M_WCHAR *mapname);
+
+LOGICAL addent(M_WCHAR *name);
+
+void addex(void);
+
+void addkeyword(void);
+
+LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
+
+void addndent(M_WCHAR *p);
+
+void addpar(void);
+
+void addsref(M_WCHAR *p);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root, 
+  ELTSTRUCT **errelt);
+
+LOGICAL checkdefault(const M_WCHAR *string);
+
+int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
+
+int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
+
+void copyintolist(STATELIST *from, STATELIST **to);
+
+void countdown(M_TRIE *parent, int *count);
+
+void defmapname(void);
+
+char *deftype(int n);
+
+void dellist(STATELIST **list);
+
+void delstartarcs(void);
+
+void done(void);
+
+void dumpentnode(FILE *file, M_TRIE *value);
 
+void dumpmapnode(FILE *file, M_TRIE *value);
 
-int addarc(
-#if defined(M_PROTO)
-  STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, 
-  int id, LOGICAL minim, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-void adddefent(
-#if defined(M_PROTO)
-  M_WCHAR *mapname
-#endif
-  ) ;
-
-LOGICAL addent(
-#if defined(M_PROTO)
-  M_WCHAR *name
-#endif
-  ) ;
-
-void addex(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void addkeyword(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL addmapname(
-#if defined(M_PROTO)
-  M_WCHAR *p, LOGICAL define
-#endif
-  ) ;
-
-void addndent(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void addpar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void addsref(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void checkand(
-#if defined(M_PROTO)
-  ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root, 
-  ELTSTRUCT **errelt
-#endif
-  ) ;
-
-LOGICAL checkdefault(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-int checkdfsa(
-#if defined(M_PROTO)
-  STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-int checkrepeat(
-#if defined(M_PROTO)
-  STATE *from, ANDGROUP *and, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-void copyintolist(
-#if defined(M_PROTO)
-  STATELIST *from, STATELIST **to
-#endif
-  ) ;
-
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
-
-void defmapname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *deftype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void dellist(
-#if defined(M_PROTO)
-  STATELIST **list
-#endif
-  ) ;
-
-void delstartarcs(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void dumpentnode(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
-
-void dumpmapnode(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
-
-void dumpsrefnode(
-#if defined(M_PROTO)
-  FILE *file,
-  M_TRIE *value
-#endif
-  ) ;
-
-void dumpptrie(
-#if defined(M_PROTO)
-  M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
-  void (*proc)( FILE *, M_TRIE *)
-#endif
-  ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE   *file,
+void dumpsrefnode(FILE *file,
+  M_TRIE *value);
+
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+  void (*proc)( FILE *, M_TRIE *));
+
+void m_dumptrie(FILE   *file,
   M_TRIE *xtrie,
   char   *extname,
   int    *count,
-  void  (*proc)(M_ENTITY *)
-#endif
-  ) ;
-
-void eltblocks(
-#if defined(M_PROTO)
-  FILE *tempfile
-#endif
-  ) ;
-
-void eltreeout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endmodel(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void entout(
-#if defined(M_PROTO)
-  char *fname
-#endif
-  ) ;
-
-char *enttype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void exout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void freetree(
-#if defined(M_PROTO)
-  TREE *ruletree
-#endif
-  ) ;
-
-void found(
-#if defined(M_PROTO)
-  LOGICAL *flag, char *delim
-#endif
-  ) ;
-
-void fsa(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int getachar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-ANDGROUP *getand(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL getname(
-#if defined(M_PROTO)
-  int first
-#endif
-  ) ;
-
-STATE *getstate(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int gettoken(
-#if defined(M_PROTO)
-  int *c, int context
-#endif
-  ) ;
-
-TREE *gettreenode(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void makeand(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root, int optional
-#endif
-  ) ;
-
-LOGICAL makefsa(
-#if defined(M_PROTO)
-  TREE *root, int optional
-#endif
-  ) ;
-
-void makeor(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root
-#endif
-  ) ;
-
-void makeseq(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root, int optional
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void msgline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void msg1line(
-#if defined(M_PROTO)
-  char *text, char *arg1
-#endif
-  ) ;
-
-void nondeterm(
-#if defined(M_PROTO)
-  TREE *root, int c, ELTSTRUCT *eltp
-#endif
-  ) ;
-
-void normdefault(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL notinlist(
-#if defined(M_PROTO)
-  STATELIST *item, STATELIST *list
-#endif
-  ) ;
-
-ELTSTRUCT *ntrelt(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void parout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *partype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-LOGICAL permitspcd(
-#if defined(M_PROTO)
-  ARC *a
-#endif
-  ) ;
-
-void pop(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void prulend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void push(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL regenerate(
-#if defined(M_PROTO)
-  TREE *start, TREE *stop
-#endif
-  ) ;
-
-void repeat(
-#if defined(M_PROTO)
-  TREE *root
-#endif
-  ) ;
-
-void ruleinit(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void rulend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL samelabelarc(
-#if defined(M_PROTO)
-  ARC *a, STATE *s
-#endif
-  ) ;
-
-void savelhs(
-#if defined(M_PROTO)
-  LOGICAL param
-#endif
-  ) ;
-
-void savestartarcs(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int scan(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void setdefault(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void simplebranch(
-#if defined(M_PROTO)
-  TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_sprscon(
-#if defined(M_PROTO)
-  int i, int j
-#endif
-  ) ;
-
-void srefout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-STATE *startfsa(
-#if defined(M_PROTO)
-  TREE *root, LOGICAL *canbenull
-#endif
-  ) ;
-
-void tempelt(
-#if defined(M_PROTO)
-  ELTSTRUCT *eltp, FILE *tempfile
-#endif
-  ) ;
-
-void template(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *typecon(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim
-#endif
-  ) ;
-
-void ungetachar(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-void warning2(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2
-#endif
-  ) ;
-
-void warning3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void warning4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+  void  (*proc)(M_ENTITY *));
+
+void eltblocks(FILE *tempfile);
+
+void eltreeout(void);
+
+void endmodel(void);
+
+void entout(char *fname);
+
+char *enttype(int n);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void exout(void);
+
+void m_free(void *block, char *msg);
+
+void freetree(TREE *ruletree);
+
+void found(LOGICAL *flag, char *delim);
+
+void fsa(void);
+
+int getachar(void);
+
+ANDGROUP *getand(void);
+
+LOGICAL getname(int first);
+
+STATE *getstate(void);
+
+int gettoken(int *c, int context);
+
+TREE *gettreenode(void);
+
+void m_initctype(void);
+
+void initialize(void);
+
+LOGICAL litproc(int delim);
+
+void main(int argc, char **argv);
+
+void makeand(LOGICAL *canbenull, TREE *root, int optional);
+
+LOGICAL makefsa(TREE *root, int optional);
+
+void makeor(LOGICAL *canbenull, TREE *root);
+
+void makeseq(LOGICAL *canbenull, TREE *root, int optional);
+
+void *m_malloc(int size, char *msg);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
+
+void normdefault(M_WCHAR *string);
+
+LOGICAL notinlist(STATELIST *item, STATELIST *list);
+
+ELTSTRUCT *ntrelt(M_WCHAR *p);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void parout(void);
+
+char *partype(int n);
+
+LOGICAL permitspcd(ARC *a);
+
+void pop(void);
+
+void prulend(void);
+
+void push(void);
+
+LOGICAL regenerate(TREE *start, TREE *stop);
+
+void repeat(TREE *root);
+
+void ruleinit(void);
+
+void rulend(void);
+
+LOGICAL samelabelarc(ARC *a, STATE *s);
+
+void savelhs(LOGICAL param);
+
+void savestartarcs(void);
+
+int scan(void);
+
+void setdefault(const M_WCHAR *string);
+
+void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
+
+void skiptoend(void);
+
+int m_sprscon(int i, int j);
+
+void srefout(void);
+
+STATE *startfsa(TREE *root, LOGICAL *canbenull);
+
+void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
+
+void template(void);
+
+char *typecon(int n);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index d13b6fe57dd60b18dcae7fc601227e6e25a01a42..362d831bc0011233066c41c4974fe29879f41bc9 100644 (file)
@@ -30,9 +30,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Scan.c contains scanner procedures for program BUILD */
 
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "build.h"
 #define M_CONDEF
 #include "context.h"
@@ -74,7 +71,7 @@ return(TRUE);
 }
 
 /* Returns the next token to the main procedure */
-int scan(M_NOPAR)
+int scan(void)
 {
 int c;
 int n;
index dfe83fd75870458b162e3be6fe07ae3f0ff07253..bcfac4565b861a23d3c2e480ebac935a0d844259 100644 (file)
@@ -100,13 +100,7 @@ return(TRUE);
 }
 
 /* Add a short reference map name */
-#if defined(M_PROTO)
 LOGICAL addmapname(M_WCHAR* p, LOGICAL define)
-#else
-LOGICAL addmapname(p, define)
-M_WCHAR *p;
-LOGICAL define;
-#endif
 {
 MAP *old;
 MAP *new;
@@ -197,7 +191,7 @@ delim->data = thissref;
 
 /* Prefix left-hand side with "M-" to create default short reference map
    name, truncating to M_NAMELEN characters if necessary */
-void defmapname(M_NOPAR)
+void defmapname(void)
 {
 if (!wc_prefix)
     {
index 9dcdc172c42df38433dba1727369d6b044f1b194..052c70299f10e2b1d6165c6598c5f5df40cb3f69 100644 (file)
@@ -36,7 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Called after a right parenthesis is read while scanning a content model.
    Resets curcon if it is the outermost submodel. */
-void endmodel(M_NOPAR)
+void endmodel(void)
   {
     curtree = curtree->parent ;
     if (! curtree->parent) curcon = LASTM ;
@@ -58,7 +58,7 @@ void freetree(treep)
     }
 
 /* Gettreenode obtains a node to use in the tree representation of a rule */
-TREE *gettreenode(M_NOPAR)
+TREE *gettreenode(void)
   {
     TREE *new ;
 
index 0d2f2bf5d8376890eb35121d4d41ef611fee955f..f0d4fdb2ab0b16366b675609627a9865d12e8676 100644 (file)
@@ -398,7 +398,7 @@ tagc
   postent:start
   codetagc:inentc {
             startcode(entity->codeindex, &inent, entfile,
-                      "c", nopar, nopar, "") ;
+                      "c", "void", "void", "") ;
             }
   close:preparam
   sschain:inss {
@@ -420,11 +420,11 @@ tagc
             }
   scchain:insc {
             *getaction(scarray) = ++sactions ;
-            startcode(sactions, &insc, sfile, "s", nopar, nopar, "") ;
+            startcode(sactions, &insc, sfile, "s", "void", "void", "") ;
             }
   ecchain:inec {
             *getaction(ecarray) = ++eactions ;
-            startcode(eactions, &inec, efile, "e", nopar, nopar, "") ;
+            startcode(eactions, &inec, efile, "e", "void", "void", "") ;
             }
   stcchain:instc {
             *getaction(stcarray) = ++stactions ;
index 2ffd8b06556d8f41beeb37064fa93ae9f2d5f2ea..46506ecf27e2ee8dacf57f404b1d2732b43679cf 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
index 4edb7d4bcbf09e06ce913f291627e77ad560d854..17921b2d38901c62e6d48840535d3c192bb32c0f 100644 (file)
@@ -215,7 +215,6 @@ ELTEXTERN int restart ELTINIT(RENTITY) ;
 #define stproto "M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END"
 #define stformal "m_string, M_START, M_END"
 #define stft "  M_WCHAR *m_string ;\n  LOGICAL M_START ;\n  LOGICAL M_END ;\n"
-#define nopar "M_NOPAR"
 
 /* Structures for generating defines for parameter values */
 ELTEXTERN M_TRIE parval ;
index 07c6d40c4674e5a8a56c5c658327c814c9cce0b3..b838875311a063a355c68f4d0a261ba4d45a610e 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -66,23 +63,14 @@ void actptrout(array, name)
 
 
 /* Close a code file and write jump table at the end */
-#if defined(M_PROTO)
 void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto)
-#else
-void closeiffile(flag, file, count, table, proto)
-  LOGICAL flag;
-  FILE *file;
-  int count;
-  char *table;
-  char *proto;
-#endif
   {
     int i;
 
     endcode(flag, file);
     if (count) {
       fprintf(file,
-        "void (*m_%stable[])(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) = {\n",
+        "void (*m_%stable[])(%s) = {\n",
         table, proto);
       fprintf(file, "  m_%s1, /* Place holder for 1-based indexing */\n",
                     table);
@@ -94,14 +82,14 @@ void closeiffile(flag, file, count, table, proto)
       }
     else
       fprintf(file,
-        "void (*m_%stable[1])(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) ;\n",
+        "void (*m_%stable[1])(%s) ;\n",
         table, proto);
     fclose(file);
     }
 
 /* Called when the C identifier to be #define'd to a parameter value is
    scanned */
-void cvalue(M_NOPAR)
+void cvalue(void)
   {
     PARVAL *new;
 
@@ -120,18 +108,18 @@ void cvalue(M_NOPAR)
 
 /* Called after last input character is read to place closing punctuation
    at end of output files and close them */
-void done(M_NOPAR)
+void done(void)
   {
     M_ENTITY *ent;
     ACTION *actp;
     LOGICAL first;
     int i;
 
-    closeiffile(inent, entfile, codeent, "c", nopar);
+    closeiffile(inent, entfile, codeent, "c", "void");
     closeiffile(intext, tfile, tactions, "t", tproto);
     closeiffile(inpc, pfile, pactions, "p", pproto);
-    closeiffile(insc, sfile, sactions, "s", nopar);
-    closeiffile(inec, efile, eactions, "e", nopar);
+    closeiffile(insc, sfile, sactions, "s", "void");
+    closeiffile(inec, efile, eactions, "e", "void");
     closeiffile(instc, stfile, stactions, "st", stproto);
 
     endstring();
@@ -193,19 +181,13 @@ void done(M_NOPAR)
     }
 
 /* Called when finished reading a section of code from the input file */
-#if defined(M_PROTO)
 void endcode(LOGICAL flag, FILE *file)
-#else
-void endcode(flag, file)
-  LOGICAL flag;
-  FILE *file;
-#endif
   {
     if (flag) fprintf(file, "}}\n\n");
     }
 
 /* Called at the end of all initial fields in the interface definition */
-void endini(M_NOPAR)
+void endini(void)
   {
     if (finitext) 
       fputs("    putc(m_textchar, m_outfile);\n", tfile);
@@ -224,7 +206,7 @@ void endini(M_NOPAR)
 
 /* End the sign-on message */
 #include <time.h>
-void endsignon(M_NOPAR)
+void endsignon(void)
   {
     long storetime;
     char *p;
@@ -270,7 +252,7 @@ void endsignon(M_NOPAR)
     }
 
 /* Closes a start-string or end-string */
-void endstring(M_NOPAR)
+void endstring(void)
   {
     if (instring) {
       if (stringstart) stringstart = FALSE;
@@ -297,7 +279,7 @@ void enttype(type)
     }
 
 /* Free storage used for a context-specification chain */
-void freechain(M_NOPAR)
+void freechain(void)
   {
     CHAIN *chainp, *dchainp;
 
@@ -348,7 +330,7 @@ int *getaction(array)
     }
 
 /* Allocate new action structure */
-ACTION *getactstruct(M_NOPAR)
+ACTION *getactstruct(void)
   {
     ACTION *new;
 
@@ -362,7 +344,7 @@ ACTION *getactstruct(M_NOPAR)
     }
 
 /* Program initialization */
-void initialize(M_NOPAR)
+void initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
@@ -426,13 +408,13 @@ fputs("#endif\n", ifh);
 
 startcode(pactions, &inpc, pfile, "p", pproto, pformal, pftype);
 startcode(tactions, &intext, tfile, "t", tproto, tformal, tftype);
-startcode(sactions, &insc, sfile, "s", nopar, nopar, "");
-startcode(eactions, &inec, efile, "e", nopar, nopar, "");
+startcode(sactions, &insc, sfile, "s", "void", "void", "");
+startcode(eactions, &inec, efile, "e", "void", "void", "");
 startcode(stactions, &instc, stfile, "st", stproto, stformal, stft);
 }
 
 /* Output definitions for strings */
-void outstring(M_NOPAR)
+void outstring(void)
   {
     int c;
 
@@ -495,7 +477,7 @@ for ( ; p ; p = p->next)
 }
 
 /* Skip rest of statement after an error */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
   {
     int i;
     static errlev = 0;
@@ -563,21 +545,14 @@ endcode(*flag, file);
 *flag = TRUE;
 /* protoype */
 fprintf(file,
-       "void m_%s%d(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) ;\n",
+       "void m_%s%d(%s) ;\n",
        prefix,
        caseno,
        proto);
 
 /* ANSI defines */
-fputs("#if defined(M_PROTO)\n", file);
-fprintf(file, "void m_%s%d(%s)\n", prefix, caseno, proto);
-fputs("#else\n", file);
-fprintf(file,
-       "void m_%s%d(%s)\n%s\n#endif\n  {\n", /* balance the "}" */
-       prefix,
-       caseno,
-       formal,
-       formtype);
+fprintf(file, "void m_%s%d(%s)\n  {\n", prefix, caseno, proto);
+);
 
 for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next)
     {
@@ -603,7 +578,7 @@ fprintf(file, "{\n/* line %d \"%s\" */\n", m_line, iffile); /* balance "}" */
 }
 
 /* Begins processing a new element */
-void startelement(M_NOPAR)
+void startelement(void)
   {
     CVARSTRUCT *cvarp;
     CVARSTRUCT *discard;
@@ -624,7 +599,7 @@ void startelement(M_NOPAR)
     }
 
 /* Stores the name of a C variable read from the input file */
-void storecvar(M_NOPAR)
+void storecvar(void)
   {
     CVARSTRUCT *new;
 
@@ -639,7 +614,7 @@ void storecvar(M_NOPAR)
 /* Compares the parameter name associated with a C variable in the input
    file with the names of all parameters of the current element.  Stores
    result for later output with code segments */
-void storepname(M_NOPAR)
+void storepname(void)
   {
     int i, par;
 
index 1b3857f96ec02ec033a91f05c9f594023f15fcc6..ca391efe8ab842ebd650c659a327105e12e0db1f 100644 (file)
@@ -35,7 +35,7 @@
 #include "entext.h"
 
 /* Add an entity */
-void addent(M_NOPAR)
+void addent(void)
   {
     M_ENTITY *new ;
 
index a1691c51e2b0c60d892284f433cd0d13c33b0a15..1a42c193439b122dcc23f7a5be781b43e17f9199 100644 (file)
 /* Proto.h contains function prototypes for program ELTDEF. */
 
 
-void actptrout(
-#if defined(M_PROTO)
-  ACTION **array, char *name
-#endif
-  ) ;
-
-void addent(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void closeiffile(
-#if defined(M_PROTO)
-  LOGICAL flag, FILE *file, int count, char *table, char *proto
-#endif
-  ) ;
-
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
-
-void cvalue(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-
-void done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE *file,
-  M_TRIE *xtrie,
-  char *extname,
-  int *count,
-  void (*proc)(M_ENTITY *)
-#endif
-  ) ;
-
-void endcode(
-#if defined(M_PROTO)
-  LOGICAL flag, FILE *file
-#endif
-  ) ;
-
-void endini(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endsignon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endstring(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void entout(
-#if defined(M_PROTO)
-  char *fname
-#endif
-  ) ;
-
-void enttype(
-#if defined(M_PROTO)
-  int type
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text,
-  M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5
-#endif
-  ) ;
-
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void freechain(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int getachar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int *getaction(
-#if defined(M_PROTO)
-  ACTION **array
-#endif
-  ) ;
-
-ACTION *getactstruct(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void getname(
-#if defined(M_PROTO)
-  int first
-#endif
-  ) ;
-
-int gettoken(
-#if defined(M_PROTO)
-  int *c, int context
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void outpval(
-#if defined(M_PROTO)
-  M_TRIE *p
-#endif
-  ) ;
-
-void outstring(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie, M_WCHAR *name
-#endif
-  ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-int scan(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void startcode(
-#if defined(M_PROTO)
-  int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
-  char *formal, char *formtype
-#endif
-  ) ;
-
-void startelement(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void storecvar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void storepname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim
-#endif
-  ) ;
-
-void ungetachar(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-void value(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+void actptrout(ACTION **array, char *name);
+
+void addent(void);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
+
+void countdown(M_TRIE *parent, int *count);
+
+void cvalue(void);
+
+void done(void);
+
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, void (*proc)(M_ENTITY *));
+
+void endcode(LOGICAL flag, FILE *file);
+
+void endini(void);
+
+void endsignon(void);
+
+void endstring(void);
+
+void entout(char *fname);
+
+void enttype(int type);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_exit(int status);
+
+void m_free(void *block, char *msg);
+
+void freechain(void);
+
+int getachar(void);
+
+int *getaction(ACTION **array);
+
+ACTION *getactstruct(void);
+
+void getname(int first);
+
+int gettoken(int *c, int context);
+
+void m_initctype(void);
+
+void initialize(void);
+
+LOGICAL m_letter(M_WCHAR c);
+
+LOGICAL litproc(int delim);
+
+void main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void outpval(M_TRIE *p);
+
+void outstring(void);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+int scan(void);
+
+void skiptoend(void);
+
+void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
+  char *formal, char *formtype);
+
+void startelement(void);
+
+void storecvar(void);
+
+void storepname(void);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void value(M_WCHAR *p);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index 43c22160cf151d6c1727905c08f1014c42b91d2f..ab10a65270849c34c55a948c8c1d66f535585d78 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <stdio.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -85,7 +82,7 @@ ungetachar(c);
 }
 
 /* Reads the next token and returns it to the main procedure */
-int scan(M_NOPAR)
+int scan(void)
 {
 int c;
 int n;
index 4003d649ade592e23b83d9c3b5b670a14c9fc4e9..f39f88017cb066819ae7efb528abc3173ecfbe0d 100644 (file)
@@ -32,15 +32,6 @@ Copyright (c) 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 #include <stdlib.h>
 
-
-#if defined(MSDOS)
-/* Standard startup code doesn't have room to load inherited environments
-   in some cases.  Since they're not used, don't bother.  (Using Microsoft
-   C compiler).  */
-void _setenvp(M_NOPAR);
-void _setenvp(){}
-#endif
-
 /* Write input file and line number for an error message */
 void m_dumpline(file, line)
 M_WCHAR *file;
@@ -72,7 +63,7 @@ else
 }
 
 /* Write error message prefix */
-void m_eprefix(M_NOPAR)
+void m_eprefix(void)
 {
 m_errline("\n*****\n");
 m_dumpline(m_thisfile(), m_thisline());
@@ -92,11 +83,8 @@ for ( ; *p ; p++)
     }
 }
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 /* Write error message suffix */
-void m_esuffix(M_NOPAR)
+void m_esuffix(void)
 {
 m_errline(":\n");
 m_lastchars();
@@ -245,7 +233,7 @@ return(NULL);
 }
 
 /* Open input file */
-void *m_openfirst(M_NOPAR)
+void *m_openfirst(void)
 {
 FILE *first;
 char *input;
index f4cdf540c1dff91d665e10265c51471f944e3d66..55fd966103cf66f14f88557b34c70c7d6bfd8b4a 100644 (file)
@@ -30,12 +30,7 @@ Copyright 1988, 1989, 1992 Hewlett-Packard Co.
 #include "userinc.h"
 #include "globdec.h"
 
-#if defined(M_PROTO)
 int vextextsize(const M_WCHAR *keyword)
-#else
-int vextextsize(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return NORMAL;
 
@@ -47,12 +42,7 @@ m_err1("Unexpected value for ex/vex textsize parameter: %s", keyword);
 return NORMAL;
 }
 
-#if defined(M_PROTO)
 int vgloss(const M_WCHAR *keyword)
-#else
-int vgloss(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return GLOSS;
 
@@ -63,12 +53,7 @@ m_err1("Unexpected value for gloss parameter: %s", keyword);
 return GLOSS;
 }
 
-#if defined(M_PROTO)
 int vcenter(const M_WCHAR *keyword)
-#else
-int vcenter(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return CENTER;
 
@@ -80,12 +65,7 @@ m_err1("Unexpected value for center parameter: %s", keyword);
 return CENTER;
 }
 
-#if defined(M_PROTO)
 int vnumber(const M_WCHAR *keyword)
-#else
-int vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return NONUMBER;
 
@@ -96,12 +76,7 @@ m_err1("Unexpected value for number parameter: %s", keyword);
 return NONUMBER;
 }
 
-#if defined(M_PROTO)
 LOGICAL vstack(const M_WCHAR *keyword)
-#else
-LOGICAL vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return FALSE;
 
@@ -112,12 +87,7 @@ m_err1("Unexpected value for number parameter: %s", keyword);
 return FALSE;
 }
 
-#if defined(M_PROTO)
 int vordertype(const M_WCHAR *keyword)
-#else
-int vordertype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return ARABIC;
 
@@ -131,12 +101,7 @@ m_err1("Unexpected list order type: %s", keyword);
 return ARABIC;
 }
 
-#if defined(M_PROTO)
 int vrsectpage(const M_WCHAR *keyword)
-#else
-int vrsectpage(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return NEWPAGE;
 
@@ -147,12 +112,7 @@ m_err1("Unexpected value for rsectpage parameter: %s", keyword);
 return NEWPAGE;
 }
 
-#if defined(M_PROTO)
 int vspacing(const M_WCHAR *keyword)
-#else
-int vspacing(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return LOOSE;
 
@@ -163,12 +123,7 @@ m_err1("Unexpected value for spacing parameter: %s", keyword);
 return LOOSE;
 }
 
-#if defined(M_PROTO)
 int vtype(const M_WCHAR *keyword)
-#else
-int vtype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return BULLET;
 
index eda789705843d116c6662ad32cc79bd6677b1ad8..0ca272a26361230091dd912cd49dd1ea857c2ea3 100644 (file)
 /* Copyright (c) 1988, 1989, 1990 Hewlett-Packard Co. */
 /* Function prototypes for HP Tag/TeX translator */
 
-void appstart(
-#if defined(M_PROTO)
-  M_WCHAR *id, M_WCHAR *letter 
-#endif
-  ) ;
+void appstart(M_WCHAR *id, M_WCHAR *letter);
 
-void assert_hometopic_exists(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void assert_hometopic_exists(void);
 
-void badgraphic(
-#if defined(M_PROTO)
-  int filestat
-#endif
-  ) ;
+void badgraphic(int filestat);
 
-void basename(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void basename(void);
 
-void calcdisp (
-#if defined(M_PROTO)
-  M_WCHAR *file, M_WCHAR *startrow, M_WCHAR *endrow,
-  M_WCHAR *clip, M_WCHAR *margin
-#endif
-  ) ;
+void calcdisp (M_WCHAR *file, M_WCHAR *startrow, M_WCHAR *endrow,
+  M_WCHAR *clip, M_WCHAR *margin);
 
-void callndbeg (
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void callndbeg (void);
 
-void callndend (
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void callndend (void);
 
 /* used by ccompspec(), cmenlspec(), and cwmenlspec() */
-char *ccharspec(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
+char *ccharspec(M_WCHAR textchar);
 
-void ccmpiooutchar (
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
+void ccmpiooutchar (M_WCHAR textchar);
 
-void ccompesoutchar (
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile
-#endif
-  ) ;
+void ccompesoutchar (M_WCHAR textchar, FILE *outfile);
 
-void ccompexoutchar (
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile
-#endif
-  ) ;
+void ccompexoutchar (M_WCHAR textchar, FILE *outfile);
 
-void ccompoutchar (
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile
-#endif
-  ) ;
+void ccompoutchar (M_WCHAR textchar, FILE *outfile);
 
 /* special computer expansions for dot matrix(computer) in calculator style */
-char *ccompspec(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
+char *ccompspec(M_WCHAR textchar);
 
-void chapstart(
-#if defined(M_PROTO)
-  M_WCHAR *id, M_WCHAR *number, char type[] 
-#endif
-  ) ;
+void chapstart(M_WCHAR *id, M_WCHAR *number, char type[]);
 
-M_WCHAR *checkdimen(
-#if defined(M_PROTO)
-  M_WCHAR *val, M_WCHAR *paramname, M_WCHAR *elt
-#endif
-  ) ;
+M_WCHAR *checkdimen(M_WCHAR *val, M_WCHAR *paramname, M_WCHAR *elt);
 
-M_WCHAR *mb_checkdimen(
-#if defined(M_PROTO)
-  M_WCHAR *val, char *paramname, char *elt
-#endif
-  ) ;
+M_WCHAR *mb_checkdimen(M_WCHAR *val, char *paramname, char *elt);
 
-M_WCHAR *checkent(
-#if defined(M_PROTO)
-  M_WCHAR *entcontent
-#endif
-  ) ;
+M_WCHAR *checkent(M_WCHAR *entcontent);
 
-void checkgloss(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void checkgloss(void);
 
-M_WCHAR *checkid(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
+M_WCHAR *checkid(M_WCHAR *id);
 
-void checkmsghead (
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void checkmsghead (void);
 
-M_WCHAR *checkreal (
-#if defined(M_PROTO)
-  M_WCHAR *val, M_WCHAR *paramname, LOGICAL msgout, M_WCHAR *elt
-#endif
-  ) ;
+M_WCHAR *checkreal (M_WCHAR *val, M_WCHAR *paramname, LOGICAL msgout, M_WCHAR *elt);
 
-LOGICAL chkplottype(
-#if defined(M_PROTO)
-  M_WCHAR *val, int *p1x, int *p1y, int *p2x, int *p2y, LOGICAL prnt 
-#endif
-  ) ;
+LOGICAL chkplottype(M_WCHAR *val, int *p1x, int *p1y, int *p2x, int *p2y, LOGICAL prnt );
 
-void cmloutchar (
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile
-#endif
-  ) ;
+void cmloutchar (M_WCHAR textchar, FILE *outfile);
 
 /* special menu lable character expansions */
-char *cmenlspec(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
+char *cmenlspec(M_WCHAR textchar);
 
-void cspotend(
-#if defined(M_PROTO)
-  M_WCHAR *file, int graphics, M_WCHAR *xwidth, M_WCHAR *xheight
-#endif
-  ) ;
+void cspotend(M_WCHAR *file, int graphics, M_WCHAR *xwidth, M_WCHAR *xheight);
 
-void cspotstart(
-#if defined(M_PROTO)
-  M_WCHAR *file, int graphics, M_WCHAR *xwidth, M_WCHAR *xheight
-#endif
-  ) ;
+void cspotstart(M_WCHAR *file, int graphics, M_WCHAR *xwidth, M_WCHAR *xheight);
 
-void csubtc (
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile, M_WCHAR *parent
-#endif
-  ) ;
+void csubtc (M_WCHAR textchar, FILE *outfile, M_WCHAR *parent);
 
-void csuptc (
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile, M_WCHAR *parent
-#endif
-  ) ;
+void csuptc (M_WCHAR textchar, FILE *outfile, M_WCHAR *parent);
 
 /* special white menu label character expansions */
-char *cwmenlspec(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
+char *cwmenlspec(M_WCHAR textchar);
 
-void cwmloutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile
-#endif
-  ) ;
+void cwmloutchar(M_WCHAR textchar, FILE *outfile);
 
-void defxref(
-#if defined(M_PROTO)
-  FILE *xfile, M_WCHAR *id, struct xref *xref
-#endif
-  ) ;
+void defxref(FILE *xfile, M_WCHAR *id, struct xref *xref);
 
-int do_esc_seq(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+int do_esc_seq(void);
 
-void dumpxref(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void dumpxref(void);
 
-void echohead(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
+void echohead(M_WCHAR *p);
 
-void mb_echohead(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
+void mb_echohead(char *p);
 
-void endhead(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void endhead(void);
 
-void endhelpnode(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void endhelpnode(void);
 
-void esoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
+void esoutchar(M_WCHAR textchar);
 
-void exoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
+void exoutchar(M_WCHAR textchar);
 
-void exvexend(
-#if defined(M_PROTO)
-  M_WCHAR *textsize
-#endif
-  ) ;
+void exvexend(M_WCHAR *textsize);
 
-void exvexstart(
-#if defined(M_PROTO)
-  M_WCHAR *type, M_WCHAR *textsize, char *listinfo
-#endif
-  ) ;
+void exvexstart(M_WCHAR *type, M_WCHAR *textsize, char *listinfo);
 
-void figend (
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
+void figend (M_WCHAR *id);
 
-int figext (
-#if defined(M_PROTO)
-  M_WCHAR *fname
-#endif
-  ) ;
+int figext (M_WCHAR *fname);
 
-int figlist (
-#if defined(M_PROTO)
-  char *fnin
-#endif
-  ) ;
+int figlist (char *fnin);
 
-void figraster(
-#if defined(M_PROTO)
-M_WCHAR *file,    M_WCHAR *magnify,
+void figraster(M_WCHAR *file,    M_WCHAR *magnify,
 M_WCHAR *width,   M_WCHAR *depth,        M_WCHAR *hadjust,  M_WCHAR *vadjust,
 M_WCHAR *mirror,  M_WCHAR *margin,       M_WCHAR *clip,
-M_WCHAR *penwidth,M_WCHAR *plottype,     M_WCHAR *callout,  M_WCHAR *textsize
-#endif
-  ) ;
+M_WCHAR *penwidth,M_WCHAR *plottype,     M_WCHAR *callout,  M_WCHAR *textsize);
 
-void figstart(
-#if defined(M_PROTO)
-M_WCHAR *number,  M_WCHAR *tonumber,  M_WCHAR *id,          M_WCHAR *file,
+void figstart(M_WCHAR *number,  M_WCHAR *tonumber,  M_WCHAR *id,          M_WCHAR *file,
 M_WCHAR *type,    M_WCHAR *oldtype,
 M_WCHAR *xmagnify,M_WCHAR *xwidth,    M_WCHAR *xdepth,      M_WCHAR *xhadjust,
 M_WCHAR *xvadjust,M_WCHAR *border,    M_WCHAR *video,       M_WCHAR *strip,
 M_WCHAR *mirror,  M_WCHAR *margin,      M_WCHAR *clip,
 M_WCHAR *penwidth,M_WCHAR *snap,      M_WCHAR *autoscale,   M_WCHAR *plottype,
-M_WCHAR *callout, M_WCHAR *textsize
-#endif
-  ) ;
+M_WCHAR *callout, M_WCHAR *textsize);
 
-void figvector(
-#if defined(M_PROTO)
-M_WCHAR *file,     M_WCHAR *magnify,
+void figvector(M_WCHAR *file,     M_WCHAR *magnify,
 M_WCHAR *width,    M_WCHAR *depth,        M_WCHAR *hadjust,  M_WCHAR *vadjust,
 M_WCHAR *mirror,   M_WCHAR *margin,       M_WCHAR *clip,
 M_WCHAR *penwidth, M_WCHAR *autoscale,    M_WCHAR *plottype, M_WCHAR *callout,
-M_WCHAR *textsize
-#endif
-  ) ;
+M_WCHAR *textsize);
 
-unsigned get2b(
-#if defined(M_PROTO)
-  FILE *fh
-#endif
-  ) ;
+unsigned get2b(FILE *fh);
 
-unsigned long get4b(
-#if defined(M_PROTO)
-  FILE *fh
-#endif
-  ) ;
+unsigned long get4b(FILE *fh);
 
-unsigned long getPCLdims (
-#if defined(M_PROTO)
-  char *fn
-#endif
-  ) ;
+unsigned long getPCLdims (char *fn);
 
-int getqualified (
-#if defined(M_PROTO)
-  M_WCHAR *qualname, M_WCHAR *unqualname
-#endif
-  ) ;
+int getqualified (M_WCHAR *qualname, M_WCHAR *unqualname);
 
-int mb_getqualified (
-#if defined(M_PROTO)
-  char *qualname, char *unqualname
-#endif
-  ) ;
+int mb_getqualified (char *qualname, char *unqualname);
 
-void handle_link_and_graphic(
-#if defined(M_PROTO)
-  M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
-  M_WCHAR *glinktype, M_WCHAR *gdescription
-#endif
-  );                        
+void handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
+  M_WCHAR *glinktype, M_WCHAR *gdescription);     
 
-void keyesoutchar (
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
+void keyesoutchar (M_WCHAR textchar);
 
-void idstring(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
+void idstring(M_WCHAR *string);
 
-void indexchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
+void indexchar(M_WCHAR textchar);
 
-void item(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
+void item(M_WCHAR *id);
 
-char *m_itoa(
-#if defined(M_PROTO)
-  int n, char *s
-#endif
-  ) ;
+char *m_itoa(int n, char *s);
 
-void itoletter(
-#if defined(M_PROTO)
-  int n, char start, char *dest, int length
-#endif
-  ) ;
+void itoletter(int n, char start, char *dest, int length);
 
-LOGICAL m_letter(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+LOGICAL m_letter(M_WCHAR c);
 
-void loadxref(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void loadxref(void);
 
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_lower(int c);
 
-char *makecsname(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
+char *makecsname(M_WCHAR *id);
 
-void manustart(
-#if defined(M_PROTO)
-  M_WCHAR *language, M_WCHAR *idxvol, M_WCHAR *status
-#endif
-  ) ;
+void manustart(M_WCHAR *language, M_WCHAR *idxvol, M_WCHAR *status);
 
-void notimp(
-#if defined(M_PROTO)
-  char *eltname, char *option
-#endif
-  ) ;
+void notimp(char *eltname, char *option);
 
-M_WCHAR *okdimen (
-#if defined(M_PROTO)
-  M_WCHAR *val
-#endif
-  ) ;
+M_WCHAR *okdimen (M_WCHAR *val);
 
-void onlygraphic(
-#if defined(M_PROTO)
-  char    *param,    M_WCHAR *magnify, M_WCHAR *video,     M_WCHAR *mirror,
+void onlygraphic(char    *param,    M_WCHAR *magnify, M_WCHAR *video,     M_WCHAR *mirror,
   M_WCHAR *margin,   M_WCHAR *clip,    M_WCHAR *penwidth,  M_WCHAR *autoscale,
-  M_WCHAR *plottype, M_WCHAR *hadjust, M_WCHAR *vadjust
-#endif
-  ) ;
+  M_WCHAR *plottype, M_WCHAR *hadjust, M_WCHAR *vadjust);
 
-void open_new_helpfile(
-#if defined(M_PROTO)   
-   M_NOPAR
-#endif
-);
+void open_new_helpfile(void);
                       
-void notallow(
-#if defined(M_PROTO)
-  char *param1, char *param2
-#endif
-  ) ;
+void notallow(char *param1, char *param2);
 
-void options(
-#if defined(M_PROTO)
-  LOGICAL filelenonly
-#endif
-  ) ;
+void options(LOGICAL filelenonly);
 
-void outcall(
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile
-#endif
-  ) ;
+void outcall(M_WCHAR textchar, FILE *outfile);
 
-void outchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile 
-#endif
-  ) ;
+void outchar(M_WCHAR textchar, FILE *outfile);
 
-void outpi(
-#if defined(M_PROTO)
-  int enttype, M_WCHAR *pi, M_WCHAR *entname
-#endif
-  ) ;
+void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname);
 
-void parspace(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void parspace(void);
 
-LOGICAL pushndok(
-#if defined(M_PROTO)
-  LOGICAL val
-#endif
-  ) ;
+LOGICAL pushndok(LOGICAL val);
 
-LOGICAL popndok(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+LOGICAL popndok(void);
 
-void prfigborder(
-#if defined(M_PROTO)
-  int val
-#endif
-  ) ;
+void prfigborder(int val);
 
-void prfigclip(
-#if defined(M_PROTO)
-  M_WCHAR figmargin [NFIGSIDES] [M_NAMELEN+1]
-#endif
-  ) ;
+void prfigclip(M_WCHAR figmargin [NFIGSIDES] [M_NAMELEN+1]);
 
-void prfigheight(
-#if defined(M_PROTO)
-  char *val
-#endif
-  ) ;
+void prfigheight(char *val);
 
-void prfigmagnify(
-#if defined(M_PROTO)
-  char *val
-#endif
-  ) ;
+void prfigmagnify(char *val);
 
-void prfigmargin(
-#if defined(M_PROTO)
-  M_WCHAR figmargin [NFIGSIDES] [M_NAMELEN+1]
-#endif
-  ) ;
+void prfigmargin(M_WCHAR figmargin [NFIGSIDES] [M_NAMELEN+1]);
 
-void prfigpenwds(
-#if defined(M_PROTO)
-  long penwdarray[MAXPENS]
-#endif
-  ) ;
+void prfigpenwds(long penwdarray[MAXPENS]);
 
-void prfigwidth(
-#if defined(M_PROTO)
-  char *val
-#endif
-  ) ;
+void prfigwidth(char *val);
 
-LOGICAL print_vectors(
-#if defined(M_PROTO)
-  FILE * hOutFile, PTWTXT **Points, int *maxcalltxt, FILE *hCalFile, int CalNo
-#endif
-  ) ;
+LOGICAL print_vectors(FILE * hOutFile, PTWTXT **Points, int *maxcalltxt, FILE *hCalFile, int CalNo);
 
-void prplottype(
-#if defined(M_PROTO)
-  int p1x, int p1y, int p2x, int p2y
-#endif
-  ) ;
+void prplottype(int p1x, int p1y, int p2x, int p2y);
 
-float readcoord(
-#if defined(M_PROTO)
-  FILE *fh
-#endif
-  ) ;
+float readcoord(FILE *fh);
 
-float readinches(
-#if defined(M_PROTO)
-  FILE *fh
-#endif
-  ) ;
+float readinches(FILE *fh);
 
-void realoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile
-#endif
-  ) ;
+void realoutchar(M_WCHAR textchar, FILE *outfile);
 
-void rsectstart(
-#if defined(M_PROTO)
-  M_WCHAR *id, M_WCHAR *pagebreak
-#endif
-  ) ;
+void rsectstart(M_WCHAR *id, M_WCHAR *pagebreak);
 
-void rseqend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void rseqend(void);
 
-void rshnewclear(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void rshnewclear(void);
 
-M_WCHAR *searchforfile(
-#if defined(M_PROTO)
-  M_WCHAR *file
-#endif
-  ) ;
+M_WCHAR *searchforfile(M_WCHAR *file);
 
-void setid(
-#if defined(M_PROTO)
-  M_WCHAR *id,
+void setid(M_WCHAR *id,
   LOGICAL where,
   LOGICAL csensitive,
   LOGICAL inchapter,
   char *chapter,
   M_WCHAR *xrffile,
   int xrfline,
-  LOGICAL xrefable        
-#endif
-  ) ;
+  LOGICAL xrefable);
 
-void setopt(
-#if defined(M_PROTO)
-  char *string, LOGICAL filelenonly
-#endif
-  ) ;
+void setopt(char *string, LOGICAL filelenonly);
 
-LOGICAL setvalopt(
-#if defined(M_PROTO)
-  int thisopt, char *string, LOGICAL filelenonly
-#endif
-  ) ;
+LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly);
 
-void shchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar,
+void shchar(M_WCHAR textchar,
   int *len,
   int max,
   M_WCHAR *string,
   void (*proc)(M_WCHAR *string),
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void mb_shchar(
-#if defined(M_PROTO)
-  char textchar,
+void mb_shchar(char textchar,
   int *len,
   int max,
   M_WCHAR *string,
   void (*proc)(M_WCHAR *string),
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void shstring(
-#if defined(M_PROTO)
-  M_WCHAR *addstring,
+void shstring(M_WCHAR *addstring,
   int *len,
   int max,
   M_WCHAR *storestring,
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void mb_shstring(
-#if defined(M_PROTO)
-  char *addstring,
+void mb_shstring(char *addstring,
   int *len,
   int max,
   M_WCHAR *storestring,
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void starthelpnode(
-#if defined(M_PROTO)
-  M_WCHAR *id,
-  LOGICAL suppress_topic_map
-#endif
-  ) ;
+void starthelpnode(M_WCHAR *id,
+  LOGICAL suppress_topic_map);
 
-void mb_starthelpnode(
-#if defined(M_PROTO)
-  char *id,
-  LOGICAL suppress_topic_map
-#endif
-  ) ;
+void mb_starthelpnode(char *id,
+  LOGICAL suppress_topic_map);
 
-void startlablist(
-#if defined(M_PROTO)
-  M_WCHAR *longlabel, M_WCHAR *width, M_WCHAR *spacing
-#endif
-  ) ;
+void startlablist(M_WCHAR *longlabel, M_WCHAR *width, M_WCHAR *spacing);
 
-void startlist(
-#if defined(M_PROTO)
-  M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont
-#endif
-  ) ;
+void startlist(M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont);
 
-void strcode(
-#if defined(M_PROTO)
-  M_WCHAR *string, FILE *outfile
-#endif
-  ) ;
+void strcode(M_WCHAR *string, FILE *outfile);
 
-void mb_strcode(
-#if defined(M_PROTO)
-  char *string, FILE *outfile
-#endif
-  ) ;
+void mb_strcode(char *string, FILE *outfile);
 
 #if defined(hpux) || defined(__aix) || defined(sun)
-char *strstr(
-#if defined(M_PROTO)
-  const char *s1, const char *s2
-#endif
-  ) ;
+char *strstr(const char *s1, const char *s2);
 #endif
 
-void svhdstring(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
+void svhdstring(M_WCHAR *string);
 
-void svtcstring(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
+void svtcstring(M_WCHAR *string);
 
-void taboutre(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void taboutre(void);
 
-void termchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
+void termchar(M_WCHAR textchar);
 
-void termpi(
-#if defined(M_PROTO)
-  int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname
-#endif
-  ) ;
+void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname);
 
-void testindexfile(
-#if defined(M_PROTO)
-  FILE *first
-#endif
-  ) ;
+void testindexfile(FILE *first);
 
-void texinit(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void texinit(void);
 
-void unimp(
-#if defined(M_PROTO)
-  M_WCHAR *eltname
-#endif
-  ) ;
+void unimp(M_WCHAR *eltname);
 
-void mb_unimp(
-#if defined(M_PROTO)
-  char *eltname
-#endif
-  ) ;
+void mb_unimp(char *eltname);
 
-int m_upstrcmp(
-#if defined(M_PROTO)
-  char *p, char *q
-#endif
-  ) ;
+int m_upstrcmp(char *p, char *q);
 
-int vextextsize(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
+int vextextsize(const M_WCHAR *keyword);
 
-int vgloss(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
+int vgloss(const M_WCHAR *keyword);
 
-int vcenter(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
+int vcenter(const M_WCHAR *keyword);
 
-int vnumber(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
+int vnumber(const M_WCHAR *keyword);
 
-int vordertype(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
+int vordertype(const M_WCHAR *keyword);
 
-int vrsectpage(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
+int vrsectpage(const M_WCHAR *keyword);
 
-int vspacing(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
+int vspacing(const M_WCHAR *keyword);
 
-int vtype(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
+int vtype(const M_WCHAR *keyword);
 
-void xrefexpand(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
+void xrefexpand(M_WCHAR *id);
 
-void rtrim(
-#if defined(M_PROTO)
-  char *s
-#endif
-  ) ;
+void rtrim(char *s);
 
-double usertopt(
-#if defined(M_PROTO)
-  M_WCHAR *s
-#endif
-  ) ;
+double usertopt(M_WCHAR *s);
 
-double mb_usertopt(
-#if defined(M_PROTO)
-  char *s
-#endif
-  ) ;
+double mb_usertopt(char *s);
 
-long usertosp(
-#if defined(M_PROTO)
-  char *s
-#endif
-  ) ;
+long usertosp(char *s);
 
-void whereneedused(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void whereneedused(void);
 
-void t_addnotes(
-#if defined(M_PROTO)
-  M_WCHAR *tnoteid
-#endif
-  ) ;
+void t_addnotes(M_WCHAR *tnoteid);
 
-void t_prntnotes(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_prntnotes(void);
 
-LOGICAL t_want_a_Q(
-#if defined(M_PROTO)
-  int span_count
-#endif
-  );              
+LOGICAL t_want_a_Q(int span_count);   
 
 
-void t_xrefnotes(
-#if defined(M_PROTO)
-  M_WCHAR *tnoteid
-#endif
-  ) ;
+void t_xrefnotes(M_WCHAR *tnoteid);
 
-int t_getnum(
-#if defined(M_PROTO)
-  char *s
-#endif
-  ) ;
+int t_getnum(char *s);
 
-void t_insertcellmarkup(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_insertcellmarkup(void);
 
-void t_newpage(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_newpage(void);
 
-void t_startcolh(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_startcolh(void);
 
-void t_start_tabhead_colh(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_start_tabhead_colh(void);
 
-void t_nextcell(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_nextcell(void);
 
-void t_checkcaption(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_checkcaption(void);
 
-void t_preamble(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_preamble(void);
 
-void t_getstyle(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_getstyle(void);
 
-void t_dospan(
-#if defined(M_PROTO)
-  LOGICAL in_colh
-#endif
-  ) ;
+void t_dospan(LOGICAL in_colh);
 
-void t_startcell(
-#if defined(M_PROTO)
-  M_WCHAR *span, M_WCHAR *vspan, char *msg
-#endif
-  ) ;
+void t_startcell(M_WCHAR *span, M_WCHAR *vspan, char *msg);
 
-void t_endcell(
-#if defined(M_PROTO)
-  M_WCHAR *span, M_WCHAR *vspan
-#endif
-  ) ;
+void t_endcell(M_WCHAR *span, M_WCHAR *vspan);
 
-void t_startrow(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_startrow(void);
 
-void t_endrow(
-#if defined(M_PROTO)
-  M_WCHAR *taglevone
-#endif
-  ) ;
+void t_endrow(M_WCHAR *taglevone);
 
-void sizetofloat(
-#if defined(M_PROTO)
-  int column, char *s
-#endif
-  ) ;
+void sizetofloat(int column, char *s);
 
-void t_tabstart(
-#if defined(M_PROTO)
-  M_WCHAR *style, M_WCHAR *id, M_WCHAR *number, M_WCHAR *box, M_WCHAR *rule, 
+void t_tabstart(M_WCHAR *style, M_WCHAR *id, M_WCHAR *number, M_WCHAR *box, M_WCHAR *rule, 
   M_WCHAR *vrule, M_WCHAR *hrule, M_WCHAR *vcount, M_WCHAR *hcount,
   M_WCHAR *spacing, M_WCHAR *width, M_WCHAR *position, 
-  M_WCHAR *tonumber, M_WCHAR *divide, M_WCHAR *textsize
-#endif
-  ) ;
+  M_WCHAR *tonumber, M_WCHAR *divide, M_WCHAR *textsize);
 
-void t_tablebody(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_tablebody(void);
 
-void t_sendout_rowrule(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void t_sendout_rowrule(void);
 
-void showmemavail(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  );
+void showmemavail(void);
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_upper(int c);
 
-char *GetDefaultHeaderString(
-#if defined(M_PROTO)
-  char          *elementName,
+char *GetDefaultHeaderString(char          *elementName,
   unsigned char  desiredType,
-  char          *defaultString
-#endif
-  ) ;
+  char          *defaultString);
 
 
-void SetDefaultLocale(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  );
+void SetDefaultLocale(void);
 
-char *MakeMByteString(
-#if defined(M_PROTO)
-  const M_WCHAR *from
-#endif
-  );
+char *MakeMByteString(const M_WCHAR *from);
 
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
+M_WCHAR *MakeWideCharString(const char *from);
 
-void paragraph(
-#if defined(M_PROTO)
-  M_WCHAR *indent,
+void paragraph(M_WCHAR *indent,
   M_WCHAR *id,
   M_WCHAR *gentity,
   M_WCHAR *gposition,
   M_WCHAR *ghyperlink,
   M_WCHAR *glinktype,
   M_WCHAR *gdescription,
-  char    *listinfo
-#endif
-  );
+  char    *listinfo);
 
-void figure(
-#if defined(M_PROTO)
-       M_WCHAR *number,
+void figure(M_WCHAR *number,
        M_WCHAR *tonumber,
        M_WCHAR *id,
        M_WCHAR *file,
@@ -1076,20 +438,10 @@ void figure(
        M_WCHAR *ghyperlink,
        M_WCHAR *glinktype,
        M_WCHAR *gdescription,
-       char    *listinfo
-#endif
-  );
+       char    *listinfo);
 
-void endterm(
-#if defined(M_PROTO)
-       M_WCHAR *base,
+void endterm(M_WCHAR *base,
        M_WCHAR *gloss,
-       int      linktype
-#endif
-  );
+       int      linktype);
 
-M_WCHAR wc_toupper(
-#if defined(M_PROTO)
-       M_WCHAR wc
-#endif
-  );
+M_WCHAR wc_toupper(M_WCHAR wc);
index fed443896f80606649b7e7d17ef49bd23dfc8c42..65d32f1bd028f3f9c4db8399899b2e1ccac2a39f 100644 (file)
 
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <io.h>
-#include <process.h>
-#include <direct.h>
-#endif
 #include <ctype.h>
 
 #if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
@@ -153,9 +148,6 @@ EXTERN LOGICAL filelist INIT(FALSE) ;
 
 /* NOTE: If driver is redimensioned, a change is needed in texinit() */
 EXTERN char driver[20]
-#if defined(MSDOS)
-  INIT("CDS") 
-#else
 #if defined(hpux)
   INIT("HPUX")
 #endif
@@ -167,7 +159,6 @@ EXTERN char driver[20]
 #endif
 #if defined(sun)
   INIT("SUN")
-#endif
 #endif
   ;
 
@@ -191,14 +182,10 @@ struct search {
 EXTERN SEARCH *path INIT(NULL) ;
 EXTERN SEARCH **endpath INIT(&path) ;
 EXTERN char dirsep
-#if defined(MSDOS)
-INIT('\\')
-#else
 #if defined(hpux) || defined(_AIX) || defined(sun)
 INIT('/')
 #else
 ****define directory separator here****
-#endif
 #endif
   ;
 
@@ -206,13 +193,8 @@ INIT('/')
 #define CSEP '/'
 #define SSEP "/"
 #else
-#if defined(MSDOS)
-#define CSEP '\\'
-#define SSEP "\\"
-#else
 ****define directory separator here****
 #endif
-#endif
 
 /* Location in .TEX file of two \wlog messages */
 EXTERN long wlog ;
index 119472e7a22ec5e84bb3d5f3cb191bd7fff649bc..981fa80ba27161c5c6ef7c9abcf5cb2640b5f180 100644 (file)
@@ -95,7 +95,7 @@ tableno = 0;
 footnoteno = 1;
 }
 
-void assert_hometopic_exists(M_NOPAR)
+void assert_hometopic_exists(void)
 {
 char *string =
     GetDefaultHeaderString("UntitledElementDefaultHeadingString",
@@ -123,7 +123,7 @@ m_free(string, "GetDefaultHeaderString return");
 
 /* Determine base name for files (i.e., input name without extension).
    Open output and error files */
-void basename(M_NOPAR)
+void basename(void)
   {
     char *p, *q;
     int n;
@@ -139,18 +139,6 @@ void basename(M_NOPAR)
        ) filelist = TRUE;
 
     /* Get installation directory */
-#if defined(MSDOS)
-    for (p = m_argv[0]; *p ; p++);
-    for (; ; p--)
-      if (*p == dirsep || *p == ':') break;
-    p++;
-    save = *p;
-    *p = M_EOS;
-    install = m_malloc(strlen(m_argv[0]) + 1, "installation directory");
-    strcpy(install, m_argv[0]);
-    *p = save;
-
-#else
 #if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__)
 #define CONTRIB "/usr/hphelp/bin/"
 
@@ -230,16 +218,12 @@ void basename(M_NOPAR)
 
 #else
  Get installation directory
-#endif
 #endif
 
     /* Set default working directory (from input filename) */
     for (p = strchr(m_argv[1], M_EOS); p > m_argv[1] ; p--)
-      if (*(p - 1) == dirsep
-#if defined(MSDOS)
-          || *(p - 1) == ':'
-#endif
-          ) break;
+      if (*(p - 1) == dirsep)
+        break;
     if (p > m_argv[1]) {
       save = *p;
       *p = M_EOS;
@@ -816,7 +800,7 @@ return(NULL);
 
 /* Called at end of manual to report terms that occurred in the document
    but not entered in the glossary */
-void checkgloss(M_NOPAR)
+void checkgloss(void)
 {
 int n;
 M_WCHAR id[MAXTERM + 1];
@@ -853,7 +837,7 @@ while (TRUE)
                
 /* End Error _DtMessage macro \starterrmsg call, check to see if Error _DtMessage
    head is user specified or default */
-void checkmsghead(M_NOPAR)
+void checkmsghead(void)
 {
 char *string =
     GetDefaultHeaderString("MessagesElementDefaultHeadingString",
@@ -877,15 +861,8 @@ m_free(string, "GetDefaultHeaderString return");
 
                
 /* Verify that val is an acceptable real number value */
-#if defined(M_PROTO)
 M_WCHAR *
 checkreal (M_WCHAR *val, M_WCHAR *paramname, LOGICAL msgout, M_WCHAR *elt)
-#else
-M_WCHAR *checkreal (val, paramname, msgout, elt)
-M_WCHAR *val, *paramname;
-LOGICAL msgout;
-M_WCHAR *elt;
-#endif
 {
 /* returns val if a valid real number, else NULL */
 double num;
@@ -927,7 +904,7 @@ return ( valid );
 
 
 /* end a help node */
-void endhelpnode(M_NOPAR)
+void endhelpnode(void)
 {
 }
 
@@ -950,13 +927,7 @@ else
 
 
 /* Starting stuff for <EX> and <VEX> */
-#if defined(M_PROTO)
 void exvexstart (M_WCHAR *type, M_WCHAR *textsize, char *listinfo)
-#else
-void exvexstart (type, textsize, listinfo)
-M_WCHAR *type, *textsize;
-char *listinfo;
-#endif
 {
 int tsize;
 
@@ -1520,15 +1491,7 @@ fputs(">\n", outfile);
 
 
 /* Express a sequence number as a letter in an alpha list or appendix */
-#if defined(M_PROTO)
 void itoletter(int n, char start, char *dest, int length)
-#else
-void itoletter(n, start, dest, length)
-int n;
-char start;
-char *dest;
-int length;
-#endif
 {
 char invert[10];
 char *p, *q;
@@ -1756,7 +1719,7 @@ chapst = TRUE;
 
 /* Called at the end of a chapter, appendix, or section to end an open
    sequence of rsects */
-void rseqend(M_NOPAR)
+void rseqend(void)
 {
 if (rsectseq)
     {
@@ -1769,7 +1732,7 @@ if (rsectseq)
    sequence is not immediately followed by a new <rsect>.  Hence can output
    the \newpage macro call without concern about side effects on the
    page header */
-void rshnewclear(M_NOPAR)
+void rshnewclear(void)
 {
 if (rsectholdnew)
     {
@@ -1823,7 +1786,7 @@ return(NULL);
 
 
 /* show how much memory is available */
-void showmemavail(M_NOPAR)
+void showmemavail(void)
 {
 int amount=0;
 char *p;
@@ -1837,13 +1800,7 @@ m_exit(0);
 }
 
 /* Start a new helpnode */
-#if defined(M_PROTO)
 void starthelpnode(M_WCHAR *id, LOGICAL suppress_topic_map)
-#else
-void starthelpnode(id, suppress_topic_map)
-M_WCHAR *id;
-LOGICAL suppress_topic_map;          /* should we suppress .tpc entry */
-#endif
 {
 int i;
 char *mbyte;
@@ -1944,13 +1901,7 @@ if (!suppress_topic_map)
 } /* End starthelpnode(id) */
 
 
-#if defined(M_PROTO)
 void mb_starthelpnode(char *id, LOGICAL suppress_topic_map)
-#else
-void mb_starthelpnode(id, suppress_topic_map)
-char *id;
-LOGICAL suppress_topic_map;          /* should we suppress .tpc entry */
-#endif
 {
 M_WCHAR *wc;
 
@@ -2138,7 +2089,7 @@ m_entdupchk = FALSE;
 }
 
 /* Open and initialize TeX file */
-void texinit(M_NOPAR)
+void texinit(void)
 {
 LOGICAL init = TRUE;
 unsigned char type;
@@ -2246,18 +2197,11 @@ while (name = m_cyclent(init, &type, &content, &wheredef))
        }
     }
 
-#if defined(MSDOS)
-m_openchk(&nullfile, "NUL", "w");
-#else
 #if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__)
 m_openchk(&nullfile, "/dev/null", "w");
 #else
 m_openchk(&nullfile, "nullfile", "w");
 #endif
-#endif
-#if defined(MSDOS)
-#else
-#endif
 
 idxupdate = ftell(outfile);
 
@@ -2372,17 +2316,10 @@ return((long) num );
    the string returned must be m_free'd.
 */
 char *
-#if defined(M_PROTO)
 GetDefaultHeaderString(
     char          *elementName,
     unsigned char  desiredType,
     char          *defaultString )
-#else
-GetDefaultHeaderString(elementName, desiredType, defaultString)
-char          *elementName;
-unsigned char  desiredType;
-char          *defaultString;
-#endif
 {
 unsigned char type,wheredef;
 M_WCHAR *content;
@@ -2484,7 +2421,6 @@ m_free(elementName,"wide character string");
 }
 
 
-#if defined(M_PROTO)
 void paragraph(M_WCHAR *indent,
               M_WCHAR *id,
               M_WCHAR *gentity,
@@ -2493,24 +2429,6 @@ void paragraph(M_WCHAR *indent,
               M_WCHAR *glinktype,
               M_WCHAR *gdescription,
               char    *listinfo)
-#else
-void paragraph(indent,
-              id,
-              gentity,
-              gposition,
-              ghyperlink,
-              glinktype,
-              gdescription,
-              listinfo)
-M_WCHAR *indent;
-M_WCHAR *id;
-M_WCHAR *gentity;
-M_WCHAR *gposition;
-M_WCHAR *ghyperlink;
-M_WCHAR *glinktype;
-M_WCHAR *gdescription;
-char    *listinfo;
-#endif
 {
 if (id)
     {
@@ -2569,7 +2487,6 @@ fprintf(outfile, "%s>", listinfo);
 unleaded = FALSE;
 }
 
-#if defined(M_PROTO)
 void figure(
        M_WCHAR *number,
        M_WCHAR *tonumber,
@@ -2600,67 +2517,6 @@ void figure(
        M_WCHAR *glinktype,
        M_WCHAR *gdescription,
        char    *listinfo)
-#else
-void figure(
-       number,
-       tonumber,
-       id,
-       file,
-       figpos,
-       cappos,
-       oldtype,
-       xwidth,
-       xdepth,
-       xhadjust,
-       xvadjust,
-       border,
-       type,
-       xmagnify,
-       video,
-       strip,
-       mirror,
-       margin,
-       clip,
-       penwidth,
-       snap,
-       autoscale,
-       plottype,
-       callout,
-       textsize,
-       ghyperlink,
-       glinktype,
-       gdescription,
-       listinfo)
-M_WCHAR *number;
-M_WCHAR *tonumber;
-M_WCHAR *id;
-M_WCHAR *file;
-M_WCHAR *figpos;
-M_WCHAR *cappos;
-M_WCHAR *oldtype;
-M_WCHAR *xwidth;
-M_WCHAR *xdepth;
-M_WCHAR *xhadjust;
-M_WCHAR *xvadjust;
-M_WCHAR *border;
-M_WCHAR *type;
-M_WCHAR *xmagnify;
-M_WCHAR *video;
-M_WCHAR *strip;
-M_WCHAR *mirror;
-M_WCHAR *margin;
-M_WCHAR *clip;
-M_WCHAR *penwidth;
-M_WCHAR *snap;
-M_WCHAR *autoscale;
-M_WCHAR *plottype;
-M_WCHAR *callout;
-M_WCHAR *textsize;
-M_WCHAR *ghyperlink;
-M_WCHAR *glinktype;
-M_WCHAR *gdescription;
-char    *listinfo;
-#endif
 {
 unsigned char etype,wheredef;
 char *string = 
@@ -2919,14 +2775,7 @@ if (ftonumber)
 m_free(string, "default header string return");
 }
 
-#if defined(M_PROTO)
 void endterm( M_WCHAR *base, M_WCHAR *gloss, int linktype)
-#else
-void endterm( base, gloss, linktype)
-M_WCHAR *base;
-M_WCHAR *gloss;
-int     linktype;
-#endif
 {
 M_WCHAR *p;
 M_WCHAR wnl, wsp, wus;
@@ -3004,12 +2853,7 @@ if (vgloss(gloss) == GLOSS)
 if (echo) mb_echohead("++");
 }
 
-#if defined(M_PROTO)
 M_WCHAR wc_toupper(M_WCHAR wc)
-#else
-M_WCHAR wc_toupper(wc)
-M_WCHAR wc;
-#endif
 {
 if ((wc >= 0) && (wc <= 255))
     {
index 5e3ad6aabb108ef24eac3a8009a3a132d1695021..4919b94e3439e139589caa9697b7cadfaeae41a2 100644 (file)
   <\CODE>
 
 <!ENTITY m-machine SDATA CODE>
-#if defined(MSDOS)
-  m_piaction("VECTRA", "m-machine", M_SDATA) ;
-#else
 #if defined(hpux)
   {
   M_WCHAR *wc_1, *wc_2;
             M_SDATA) ;
 #endif
 #endif
-#endif
 #endif
   <\CODE>
 
index 8a4fb052bcbcd16497e2ddefad8364a979247c95..b53a1647c810a9e16d141b6e968fd0e981cb0962 100644 (file)
    or invoke function pointers should be in tex.c.
 */
 
-#if defined(MSDOS)
-#include <sys\types.h>
-#include <sys\stat.h>
-#endif
-
 #if defined(hpux) || defined(_AIX) || defined(sun)
 #include <sys/types.h>
 #include <sys/stat.h>
index 65e59d699c360e4bc1570d63fd8a16647e378c63..f16728e848b83cf074501cfa3f63aa66eabf13f3 100644 (file)
 #define TAGDOTOPT "helptag.opt"
 #define DOTOPT ".opt"
 
-#if defined(M_PROTO)
 void options(LOGICAL filelenonly)
-#else
-void options(filelenonly)
-  LOGICAL filelenonly;
-#endif
 {
 int i;
 FILE *optfile;
@@ -149,13 +144,7 @@ optval = M_NULLVAL;
 
 /* Set a single option */
 /* Workonly parameter described with function options()*/
-#if defined(M_PROTO)
 void setopt(char *string, LOGICAL filelenonly)
-#else
-void setopt(string, filelenonly)
-char *string;
-LOGICAL filelenonly;
-#endif
 {
 char *p;
 int thisopt;
@@ -280,14 +269,7 @@ else switch(thisopt + 1)
 }
 
 /* Process a value for a command line option */
-#if defined(M_PROTO)
 LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly)
-#else
-LOGICAL setvalopt(thisopt, string, filelenonly)
-int thisopt;
-char *string;
-LOGICAL filelenonly;
-#endif
 {
 char *p;
 int i;
@@ -312,11 +294,7 @@ if (! *string)
 switch (thisopt)
     {
     case SEARCHKEY:
-       if ( (parentsrch==TRUE) && (*string!=M_EOS) && (*string!=dirsep)
-#if defined(MSDOS)
-        && ( *(string+1) != ':' )
-#endif
-      )
+       if ( (parentsrch==TRUE) && (*string!=M_EOS) && (*string!=dirsep) )
            {
            /* prepend "..", for index processing in temporary sub-directory */
            tempstr = (char *) m_malloc( strlen(string) + 4, "tempstr search");
@@ -332,11 +310,7 @@ switch (thisopt)
 
        *endpath = (SEARCH *) m_malloc(sizeof(SEARCH), "search path");
        p = strchr(tempstr, M_EOS);
-       if (p != tempstr && *(p - 1) != dirsep
-    #if defined(MSDOS)
-             && *(p - 1) != ':'
-    #endif
-          )
+       if (p != tempstr && *(p - 1) != dirsep)
            {
            i = strlen(tempstr);
            (*endpath)->directory = (char *) m_malloc(i + 2,
index e409bd8ea938afc161b9689474aa72a9733ae99e..97cc0da1eebb0a7786f3aed729ded4fbd3bd2102 100644 (file)
@@ -57,7 +57,7 @@ m_free(wc,"wide character string");
 
 /* Called at end of a head in a chapter, appendix, section, or
    reference section */
-void endhead(M_NOPAR)
+void endhead(void)
 {
 if (savid)
     {
@@ -89,12 +89,7 @@ echo = savhd = FALSE;
 }
 
 /* Process a character in an environment where spaces must be escaped */
-#if defined(M_PROTO)
 void esoutchar(M_WCHAR textchar)
-#else
-void esoutchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 static M_WCHAR wsp = 0;
 
@@ -115,12 +110,7 @@ outchar(textchar, outfile);
 }
 
 /* Process a character in an example or an image paragraph */
-#if defined(M_PROTO)
 void exoutchar(M_WCHAR textchar)
-#else
-void exoutchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 static M_WCHAR wsp = 0, wre;
 
@@ -146,12 +136,7 @@ else outchar(textchar, outfile);
 }
 
 /* Write a character to be passed to the index file */
-#if defined(M_PROTO)
 void indexchar(M_WCHAR textchar)
-#else
-void indexchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 if (idxsavlen + 4 > (sizeof(idxsav) / sizeof(M_WCHAR)))
     {
@@ -163,26 +148,14 @@ idxsav[idxsavlen++] = textchar;
 
 
 /* Processes output for call out text */
-#if defined(M_PROTO)
 void outcall(M_WCHAR textchar, FILE *outfile)
-#else
-void outcall(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
 {
 if (textchar != M_RE)
     outchar(textchar, outfile);
 }
 
 /* Processes a data character */
-#if defined(M_PROTO)
 void outchar(M_WCHAR textchar, FILE *outfile)
-#else
-void outchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
 {
 M_WCHAR buffer[2];
 static M_WCHAR wnl = 0;
@@ -256,20 +229,14 @@ if (echo)
 }
 
 /* Called for normal paragraph spacing */
-void parspace(M_NOPAR)
+void parspace(void)
 {
 if (unleaded)  /* unleaded is a one-shot flag */
     unleaded = FALSE;
 }
 
 /* Really output a character */
-#if defined(M_PROTO)
 void realoutchar(M_WCHAR textchar, FILE *outfile)
-#else
-void realoutchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
 {
 rshnewclear();
 if (! abbrev || fabbrev)
@@ -313,22 +280,7 @@ if (! abbrev || fabbrev)
 
 /* Save a character in the array used to store table of contents entries
    when processing a head */
-#if defined(M_PROTO)
 void shchar(M_WCHAR textchar, int *len, int max, M_WCHAR *string, void (*proc)(M_WCHAR *string), char *msg, LOGICAL *errflg)
-#else
-void shchar(textchar, len, max, string, proc, msg, errflg)
-M_WCHAR textchar;
-int *len;
-int max;
-M_WCHAR *string;
-void (*proc)(
-#if defined(M_PROTO)
-             M_WCHAR *string
-#endif
-    );
-char *msg;
-LOGICAL *errflg;
-#endif
 {
 char mb_textchar[32]; /* arbitrarily large */
 unsigned char index;
@@ -361,27 +313,12 @@ else
 }
 
 
-#if defined(M_PROTO)
 void mb_shchar(char textchar,
               int *len,
               int max,
               M_WCHAR *string,
               void (*proc)(M_WCHAR *string),
               char *msg, LOGICAL *errflg)
-#else
-void mb_shchar(textchar, len, max, string, proc, msg, errflg)
-char textchar;
-int *len;
-int max;
-M_WCHAR *string;
-void (*proc)(
-#if defined(M_PROTO)
-    M_WCHAR *string
-#endif
-    );
-char *msg;
-LOGICAL *errflg;
-#endif
 {
 M_WCHAR wc_textchar;
 
@@ -530,12 +467,7 @@ svtclen += length;
 }
 
 /* Process a character in a term */
-#if defined(M_PROTO)
 void termchar(M_WCHAR textchar)
-#else
-void termchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 if (termp - term >= MAXTERM)
     {
index 2a83c2f0fd2ae7391d3f883f48f8ec7e981ce445..87d409490322cc5fb476b7ccf82d1c39a90cf74d 100644 (file)
@@ -143,7 +143,7 @@ m_free(csname, "csname");
 
 /* Write cross-reference file for next time document is processed
    and TeX macro file for post-processing this pass */
-void dumpxref(M_NOPAR)
+void dumpxref(void)
 {
 int n;
 M_WCHAR id[M_NAMELEN + 1];
@@ -213,7 +213,7 @@ xstrlen += length;
 
 /* Initializes cross-reference table reading in file output from previous
    pass through document */
-void loadxref(M_NOPAR)
+void loadxref(void)
 {
 M_WCHAR id[M_NAMELEN + 1];
 char c, d;
@@ -333,21 +333,9 @@ while (TRUE)
 
 
 /* Save a cross-reference ID and associated expansion */
-#if defined(M_PROTO)
 void setid(M_WCHAR *id, LOGICAL where, LOGICAL csensitive, LOGICAL inchapter,
           char *chapter, M_WCHAR *xrffile, int xrfline, LOGICAL xrefable)
-#else
-void setid(id, where, csensitive, inchapter, chapter, xrffile, xrfline, xrefable)
-M_WCHAR *id;
-LOGICAL where;
-LOGICAL csensitive;
-LOGICAL inchapter;
-char *chapter;
-M_WCHAR *xrffile;
-int xrfline;
-LOGICAL xrefable;
-#endif
-{
+s{
 struct xref *old;
 struct xref *xref;
 char *buffer;
index 848f7539c556080272ade5af2c70821c400cbe7b..e1a2240b209ce0a56ca5c56317332e781ab4a931 100644 (file)
@@ -32,9 +32,6 @@ in the interface definition.*/
 
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include <string.h>
 #include "basic.h"
 #include "trie.h"
@@ -107,17 +104,7 @@ int m_findact(elt, array)
     }
 
 /* Recursive procedure called by findact() to search m_action */
-#if defined(M_PROTO)
 void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, LOGICAL wild)
-#else
-void m_findchain(stackptr, start, chainin, chainout, index, wild)
-  M_PARSE *stackptr;
-  int start;
-  int chainin;
-  int *chainout;
-  int *index;
-  LOGICAL wild;
-#endif
 {
     int node;
     M_PARSE *stackp;
@@ -147,7 +134,7 @@ void m_findchain(stackptr, start, chainin, chainout, index, wild)
 /* Process global end string.  In separate procedure to keep all references
    to if.h in one source file and minimize recompilation if interface
    changes. */
-void m_globes(M_NOPAR)
+void m_globes(void)
 {
 M_WCHAR *wc_string;
 
@@ -159,7 +146,7 @@ m_free(wc_string,"wide character string");
 /* Process global start string.  In separate procedure to keep all references
    to if.h in one source file and minimize recompilation if interface
    changes. */
-void m_globss(M_NOPAR)
+void m_globss(void)
 {
 M_WCHAR *wc_string;
 
@@ -241,14 +228,7 @@ void m_strtaction(m_elt)
     }
 
 /* Output a start-string or end-string */
-#if defined(M_PROTO)
 void m_textout(char *format, LOGICAL start, LOGICAL end)
-#else
-void m_textout(format, start, end)
-  char *format;
-  LOGICAL start;
-  LOGICAL end;
-#endif
 {
 M_WCHAR name[M_NAMELEN + 1];
 int i, par;
index f9cba2c6b14dc3e7c427780e10fb65dc9c6c1466..7b42a3d3568f4c4d14879c1a6d62eb021293f5c5 100644 (file)
 #include "parser.h"
 #include "entext.h"
 
-#if defined(M_PROTO)
 M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, unsigned char *wheredef)
-#else
-M_WCHAR *m_cyclent(init, type, content, wheredef)
-  LOGICAL init ;
-  unsigned char *type ;
-  M_WCHAR **content ;
-  unsigned char *wheredef ;
-#endif
 {
     static M_TRIE *current ;
     static M_TRIE *ancestor[M_NAMELEN + 1] ;
index 0e3553e234ecef65b76c49053e20bbbf042b8145..48757aa15454fe521cdde5dbde4689914564bcd5 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "context.h"
@@ -43,13 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entext.h"
 
 /* Process the name in a usemap delaration */
-#if defined(M_PROTO)
 void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
-#else
-void m_ckmap(name, useoradd)
-  M_WCHAR *name ;
-  LOGICAL useoradd ;
-#endif
 {
     int mapid ;
 
index a92f068281634de1931a4f2e047720bb97738ab9..e8b6ce5583be8076fa02e927b2292e0048802d77 100644 (file)
@@ -29,7 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 
 /* Write error message prefix */
-void m_eprefix(M_NOPAR)
+void m_eprefix(void)
   {
     m_errline("\n*****\n") ;
     }
index 6f64dff7dc402c145f7a4c5c4b418395ebd5f650..e05d6b440ecf02fe5cacc1675cb92148cd31fa01 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -52,15 +49,9 @@ void m_error(text)
   }
 
 /* Issue error message (one argument) */
-#if defined(M_PROTO)
 void m_err1(
   const char    *text,
   const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
-  char    *text;
-  M_WCHAR *arg;
-#endif
 {
 char *buffer, *mb_arg;
 
@@ -77,15 +68,9 @@ m_esuffix();
 }
 
 
-#if defined(M_PROTO)
 void m_mberr1(
   const char *text,
   const char *arg)
-#else
-void m_err1(text, arg)
-  char    *text;
-  char *arg;
-#endif
   {
   M_WCHAR *wc_arg;
 
@@ -95,17 +80,10 @@ void m_err1(text, arg)
   }
 
 /* Issue error message (two arguments) */
-#if defined(M_PROTO)
 void m_err2(
   const char    *text,
   const M_WCHAR *arg1,
   const M_WCHAR *arg2)
-#else
-void m_err2(text, arg1, arg2)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-#endif
   {
     char *buffer;
     char *mb_arg1,*mb_arg2;
@@ -126,19 +104,11 @@ void m_err2(text, arg1, arg2)
   }
 
 /* Issue error message (three arguments) */
-#if defined(M_PROTO)
 void m_err3(
   char    *text,
   M_WCHAR *arg1,
   M_WCHAR *arg2,
   M_WCHAR *arg3)
-#else
-void m_err3(text, arg1, arg2, arg3)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3;
@@ -164,21 +134,12 @@ void m_err3(text, arg1, arg2, arg3)
   }
 
 /* Issue error message (four arguments) */
-#if defined(M_PROTO)
 void m_err4(
   char    *text,
   M_WCHAR *arg1,
   M_WCHAR *arg2,
   M_WCHAR *arg3,
   M_WCHAR *arg4)
-#else
-void m_err4(text, arg1, arg2, arg3, arg4)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4;
@@ -207,7 +168,6 @@ void m_err4(text, arg1, arg2, arg3, arg4)
   }
 
 /* Issue error message (five arguments) */
-#if defined(M_PROTO)
 void m_err5(
   char    *text,
   M_WCHAR *arg1,
@@ -215,15 +175,6 @@ void m_err5(
   M_WCHAR *arg3,
   M_WCHAR *arg4,
   M_WCHAR *arg5)
-#else
-void m_err5(text, arg1, arg2, arg3, arg4, arg5)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
@@ -261,7 +212,6 @@ void m_err5(text, arg1, arg2, arg3, arg4, arg5)
   }
 
 /* Issue error message (six arguments) */
-#if defined(M_PROTO)
 void m_err6(
   char    *text,
   M_WCHAR *arg1,
@@ -270,16 +220,6 @@ void m_err6(
   M_WCHAR *arg4,
   M_WCHAR *arg5,
   M_WCHAR *arg6)
-#else
-void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-  M_WCHAR *arg6;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6;
@@ -321,7 +261,6 @@ void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
   }
 
 /* Issue error message (seven arguments) */
-#if defined(M_PROTO)
 void m_err7(
   char    *text,
   M_WCHAR *arg1,
@@ -331,17 +270,6 @@ void m_err7(
   M_WCHAR *arg5,
   M_WCHAR *arg6,
   M_WCHAR *arg7)
-#else
-void m_err7(text, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-  M_WCHAR *arg6;
-  M_WCHAR *arg7;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7;
@@ -405,7 +333,7 @@ void m_getline(file, line)
 
 /* Dump last characters read from input stream to give context to
    an error message */
-void m_lastchars(M_NOPAR)
+void m_lastchars(void)
 {
 int i;
 M_WCHAR buffer[2];
@@ -454,14 +382,14 @@ if ((m_svlncnt[m_sysecnt] &&
 }
 
 /* Display information about the current element */
-void m_showcurelt(M_NOPAR)
+void m_showcurelt(void)
   {
     if (m_stacktop->oldtop)
       m_dispcurelt(m_stacktop->file, m_stacktop->line);
     }    
 
 /* Start an error message */
-void m_startmsg(M_NOPAR)
+void m_startmsg(void)
   {
     m_eprefix();
     m_errexit = TRUE;
@@ -469,7 +397,7 @@ void m_startmsg(M_NOPAR)
 
 /* Return the name of the current input file (most recently opened, but
    unclosed SYSTEM entity) */
-M_WCHAR *m_thisfile(M_NOPAR)
+M_WCHAR *m_thisfile(void)
   {
     int i;
 
@@ -482,7 +410,7 @@ M_WCHAR *m_thisfile(M_NOPAR)
     }
 
 /* Return the line number in the current input file */
-int m_thisline(M_NOPAR)
+int m_thisline(void)
   {
     return(m_line[m_sysecnt]);
     }
index 6f1726924d19e4ce94d89a8eb9a35423bb3a0d8e..d6cdc38e5c5644e642496a1cde25f13281c5b7fb 100644 (file)
@@ -27,12 +27,9 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 #include "userinc.h"
 #include "globdec.h"
-#if defined(MSDOS)
-#include <process.h>
-#endif
 
 /* Write error message suffix */
-void m_esuffix(M_NOPAR)
+void m_esuffix(void)
   {
     m_errline("\n") ;
     m_dumpline(m_thisfile(), m_thisline()) ;
index 6383fcb95cb02fd968bb2f2e62479560fbcd8087..d2e4d2056644af2d0bc9b99682568a806bdfc9d6 100644 (file)
@@ -27,9 +27,6 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 #include "userinc.h"
 #include "globdec.h"
-#if defined(MSDOS)
-#include <process.h>
-#endif
 
 /* Default version of PARSER m_exit().  Allows interface control if
    internal error causes PARSER to halt. */
index 3f36cb1c1c2b6b3ac0b52e6b35a1d295a7e88ffc..57f4aa674b6c907d81e9b9aee65ad752926f281c 100644 (file)
    Returns 0 if elt is not a valid element name, if param is specified
    but is not a valid parameter name, or if param is NULL and value is
    not a valid value of any of elt's parameters. */
-#if defined(M_PROTO)
 int m_findpar( const char *elt , const char *param , const M_WCHAR *value )
-#else
-int m_findpar(elt, param, value)
-char *elt ;
-char *param ;
-M_WCHAR *value ;
-#endif /* M_PROTO */
 {
 M_ELEMENT eltid ;
 int par ;
index 4cde83c182b6555f5e28b9126357523624d2ddf6..9606d682315295e4e2f957cd0371c5e84d1f4c3c 100644 (file)
@@ -34,7 +34,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "parser.h"
 #include "signonx.h"
 
-void m_getsignon(M_NOPAR)
+void m_getsignon(void)
   {
     m_errline(m_signon) ;
     }
index eeb4adcee8d6ab5d3286ee1866eaeed794142ef7..4a0c70559cefc87d9feec6f2b9ebf3bfe9c2038f 100644 (file)
@@ -39,7 +39,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "parser.h"
 
 /* M_etcomplete is called when a complete end-tag has been read */
-void m_etcomplete(M_NOPAR)
+void m_etcomplete(void)
   {
     if (! m_scanel) {
       M_WCHAR *wc_etago, *wc_tagc;
@@ -91,7 +91,7 @@ void m_frcend(val)
 
 /* M_frcstart is called to force the start of an element when that element
    cannot legally occur in the current context but does appear in the text*/
-void m_frcstart(M_NOPAR)
+void m_frcstart(void)
   {
     m_push(m_scanel, m_element[m_scanel - 1].start, m_scannet) ;
     if (m_scannet) m_netlevel++ ;
@@ -108,7 +108,7 @@ void m_frcstart(M_NOPAR)
 
 /* M_holdproc processes a RE that was saved to test if it was the last
    RE in an element's content */
-void m_holdproc(M_NOPAR)
+void m_holdproc(void)
   {
     if (m_stacktop->holdre) {
       m_stacktop->holdre = FALSE ;
@@ -122,7 +122,7 @@ void m_holdproc(M_NOPAR)
     }
 
 /* M_stcomplete is called when a complete start tag has been recognized */
-void m_stcomplete(M_NOPAR)
+void m_stcomplete(void)
   {
     if (! m_scanel) return ;
     if (m_strtproc(m_scanel))
index 446307c8a6e722216066ca5e40d627153196b412..5742bc5a961ba89d129c374a8e80c218defdcc1e 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <stdio.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -43,7 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* M_expecting reports to the user the possible valid content at a particular
    state in the parse of the document */
-void m_expecting(M_NOPAR)
+void m_expecting(void)
   {
     LOGICAL expstart = TRUE ;
     M_PARSE *stackptr ;
@@ -276,7 +273,7 @@ M_ELEMENT m_findunique(from, newleft)
 
 /* M_nullendtag is called when a null end tag is encountered; i.e., at the
    end of a short element */
-void m_nullendtag(M_NOPAR)
+void m_nullendtag(void)
   {
     LOGICAL foundnet ;
 
@@ -307,7 +304,7 @@ void m_nullendtag(M_NOPAR)
 
 /* Tests to see if an end tag may have been omitted at this point in the
    parse.*/
-LOGICAL m_omitend(M_NOPAR)
+LOGICAL m_omitend(void)
   {
     M_ANDGROUP pand ;
     M_OPENFSA *fsastack ;
index 0a79d55dd3ada3c3aaa595a2f8a17cc1cd29692c..2e07878e1850adbfacec584b30e2f90f349b7e23 100644 (file)
@@ -28,7 +28,7 @@
 #include "userinc.h"
 #include "globdec.h"
 
-void *m_openfirst(M_NOPAR)
+void *m_openfirst(void)
   {
     return((void *) stdin) ;
     }
index a9778b7245f92804f2a72c989f4ca238c37348d8..c5250a57aba63029967b32936add80a6d019203a 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "delim.h"
@@ -117,7 +114,7 @@ LOGICAL m_attvonly(string)
 
 /* Check a name previously saved in m_saveatt to see if it is the name of
    a valid parameter for the current start tag */
-void m_findatt(M_NOPAR)
+void m_findatt(void)
   {
     int par, i ;
 
@@ -220,7 +217,7 @@ void m_parupper(par, string)
 
 /* Set all parameters to their default values for an element included by
    tag minimization */
-void m_stkdefaultparams(M_NOPAR)
+void m_stkdefaultparams(void)
   {
     int i, par = 0 ;
 
@@ -272,7 +269,7 @@ void m_stkonedef(par, scanel, poccur, i)
     }
 
 /* Stack parameter values */
-void m_stkparams(M_NOPAR)
+void m_stkparams(void)
   {
     int i, par ;
 
@@ -290,13 +287,7 @@ void m_stkparams(M_NOPAR)
     }
 
 /* Update the default of a parameter whose default is #CURRENT */
-#if defined(M_PROTO)
 void m_updatedefault(const int par , const M_WCHAR *string )
-#else
-void m_updatedefault(par, string)
-  int par ;
-  M_WCHAR *string ;
-#endif /* M_PROTO */
   {
     if (m_parameter[par - 1].deftype != M_CURRENT &&
         m_parameter[par - 1].deftype != M_CHANGEDCUR) return ;
index b0ac76955d0a1bfbe63cc6b02b666ba1768110f0..277724c2769b5bb92b54568140dbeec93829556c 100644 (file)
@@ -345,8 +345,6 @@ M_PAREXTERN int m_wsused ;
 /* Temporary pointers to parameter values.  Used while scanning start tag
    before element is placed on parse stack.*/
 M_PAREXTERN
-#if defined M_PROTO
-#endif
 M_WCHAR *m_poccur[
 #if defined(M_PARDEF)
 M_MAXPAR ? M_MAXPAR : 1
index a9f6d3c023eae9a72c4706248a808d66515ddcbf..b9f43686637ad9809c67974f04e551387ffdda01 100644 (file)
@@ -33,9 +33,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <locale.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -48,7 +45,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "version.h"
 
 /* Adjust parsing state after each token if necessary */
-void m_adjuststate(M_NOPAR)
+void m_adjuststate(void)
   {
     if (m_curcon == START) {
       if (m_netlevel) {
@@ -79,7 +76,7 @@ void m_adjuststate(M_NOPAR)
 
 /* Tests whether the element named in a tag is defined; if so, returns its
    index; otherwise return FALSE */
-M_ELEMENT m_eltname(M_NOPAR)
+M_ELEMENT m_eltname(void)
   {
     M_ELEMENT eltid ;
 
@@ -103,7 +100,7 @@ return i;
 }
 
 /* Program initialization */
-void m_initialize(M_NOPAR)
+void m_initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
index 56cc575fafa6a5693e508f0592f2de16929479e6..1fb0dee97f871d231637c7465bb79ffa44ba8595 100644 (file)
 /* Function callable by interface designers.  Returns TRUE if specified value
    is a legal value for the indicated parameter of the given element,
    FALSE otherwise. */
-#if defined(M_PROTO)
 LOGICAL m_parvalok( M_WCHAR *elt , M_WCHAR *param , const M_WCHAR *value )
-#else
-LOGICAL m_parvalok(elt, param, value)
-  M_WCHAR *elt ;
-  M_WCHAR *param ;
-  M_WCHAR *value ;
-#endif /* M_PROTO */
   {
     M_ELEMENT eltid ;
     int par ;
index 0d692da73391a6651810a978a23372f40eb226db..e6d1002dc099b304136393968409d4cc6e7486b7 100644 (file)
  * Floor, Boston, MA 02110-1301 USA
  */
 /* $XConsortium: proto.h /main/3 1995/11/08 11:30:37 rswiston $ */
-int m_actgetc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_adjuststate(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void m_attval(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_attvonly(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-int m_checkstart(
-#if defined(M_PROTO)
-  M_ELEMENT val
-#endif
-  ) ;
-
-LOGICAL m_ckend(
-#if defined(M_PROTO)
-  M_ELEMENT val, LOGICAL neednet
-#endif
-  ) ;
-
-void m_ckmap(
-#if defined(M_PROTO)
-  M_WCHAR *name, LOGICAL useoradd
-#endif
-  ) ;
-
-void m_closent(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-void m_codeent(
-#if defined(M_PROTO)
-  int m_ent
-#endif
-  ) ;
-
-M_PARSE *m_copystackelt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *m_cyclent(
-#if defined(M_PROTO)
-  LOGICAL init, unsigned char *type, M_WCHAR **content, 
-  unsigned char *wheredef
-#endif
-  ) ;
-
-void m_dispcurelt(
-#if defined(M_PROTO)
-  M_WCHAR *file, int line
-#endif
-  ) ;
-
-void m_done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_dumpline(
-#if defined(M_PROTO)
-  M_WCHAR *file, int line
-#endif
-  ) ;
-
-void m_eduptype(
-#if defined(M_PROTO)
-  int type
-#endif
-  ) ;
-
-M_ELEMENT m_eltname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_endaction(
-#if defined(M_PROTO)
-  M_ELEMENT m_elt
-#endif
-  ) ;
-
-void m_endcase(
-#if defined(M_PROTO)
-  int m_action
-#endif
-  ) ;
-
-void m_endtag(
-#if defined(M_PROTO)
-  M_ELEMENT c
-#endif
-  ) ;
-
-void m_entexpand(
-#if defined(M_PROTO)
-  M_ENTITY *openent
-#endif
-  ) ;
-
-void m_eprefix(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5
-#endif
-  ) ;
-
-void m_err6(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6
-#endif
-  ) ;
-
-void m_err7(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7
-#endif
-  ) ;
-
-void m_errline(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_esuffix(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
-
-void m_etcomplete(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_excluded(
-#if defined(M_PROTO)
-  M_ELEMENT elt
-#endif
-  ) ;
-
-void m_expecting(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_expexpand(
-#if defined(M_PROTO)
-  LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data
-#endif
-  ) ;
-
-void m_expline(
-#if defined(M_PROTO)
-  LOGICAL *expstart, LOGICAL *data, M_ELEMENT label
-#endif
-  ) ;
-
-void m_exptend(
-#if defined(M_PROTO)
-  LOGICAL *expstart, M_PARSE *stackptr
-#endif
-  ) ;
-
-int m_findact(
-#if defined(M_PROTO)
-  M_ELEMENT elt, int *array
-#endif
-  ) ;
-
-void m_findatt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_findchain(
-#if defined(M_PROTO)
-  M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, 
-  LOGICAL wild
-#endif
-  ) ;
-
-int m_findpar(
-#if defined(M_PROTO)
-  const char *elt, const char *param, const M_WCHAR *value
-#endif
-  ) ;
-
-M_ELEMENT m_findunique(
-#if defined(M_PROTO)
-  M_STATE from, int *newleft
-#endif
-  ) ;
-
-void m_frcend(
-#if defined(M_PROTO)
-  M_ELEMENT val
-#endif
-  ) ;
-
-void m_frcstart(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void m_freeFSA(
-#if defined(M_PROTO)
-  M_PARSE *stackelt
-#endif
-  ) ;
-
-void m_freemin(
-#if defined(M_PROTO)
-  M_MIN *min
-  , char *msg
-#endif
-  ) ;
-
-void m_freeparam(
-#if defined(M_PROTO)
-  M_PARSE *stackelt
-#endif
-  ) ;
-
-LOGICAL m_gendelim(
-#if defined(M_PROTO)
-  int srlen, int context
-#endif
-  ) ;
-
-int m_getachar(
-#if defined(M_PROTO)
-  M_HOLDTYPE *dchar
-#endif
-  ) ;
-
-int m_getc(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-void *m_getdata(
-#if defined(M_PROTO)
-  int n, LOGICAL *flag
-#endif
-  ) ;
-
-void m_getline(
-#if defined(M_PROTO)
-  M_WCHAR **file, int *line
-#endif
-  ) ;
-
-void m_getname(
-#if defined(M_PROTO)
-  M_WCHAR first
-#endif
-  ) ;
-
-void m_getsignon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_gettoken(
-#if defined(M_PROTO)
-  int *c, M_HOLDTYPE *dchar, int context
-#endif
-  ) ;
-
-void m_globes(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_globss(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_holdproc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_inctest(
-#if defined(M_PROTO)
-  int *count, int limit, char *message
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_lastchars(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_level(
-#if defined(M_PROTO)
-  M_WCHAR *elt
-#endif
-  ) ;
-
-int m_mblevel(
-#if defined(M_PROTO)
-  char *elt
-#endif
-  ) ;
-
-void m_litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-void m_longent(
-#if defined(M_PROTO)
-  int context
-#endif
-  ) ;
-
-LOGICAL m_lookent(
-#if defined(M_PROTO)
-  M_WCHAR *name, unsigned char *type, M_WCHAR **content, 
-  unsigned char *wheredef
-#endif
-  ) ;
-
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void m_missingtagc(
-#if defined(M_PROTO)
-  int c, M_HOLDTYPE dchar, LOGICAL start
-#endif
-  ) ;
-
-LOGICAL m_nextand(
-#if defined(M_PROTO)
-  M_OPENFSA *thisfsa, M_ELEMENT label
-#endif
-  ) ;
-
-void m_nextdelimchar(
-#if defined(M_PROTO)
-  int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank, 
-  unsigned char type
-#endif
-  ) ;
-
-void m_ntrent(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void m_nullendtag(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_omitend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_omitstart(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void *m_openent(
-#if defined(M_PROTO)
-  M_WCHAR *entcontent
-#endif
-  ) ;
-
-void *m_openfirst(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_optstring(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie, M_WCHAR *name
-#endif
-  ) ;
-
-int m_parcount(
-#if defined(M_PROTO)
-  M_WCHAR *elt
-#endif
-  ) ;
-
-M_WCHAR *m_pardefault(
-#if defined(M_PROTO)
-  M_WCHAR *elt, M_WCHAR *param, unsigned char *type
-#endif
-  ) ;
-
-M_WCHAR *m_parent(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-M_WCHAR *m_parname(
-#if defined(M_PROTO)
-  M_WCHAR *elt, int n
-#endif
-  ) ;
-
-M_WCHAR *m_mbparname(
-#if defined(M_PROTO)
-  char *elt, int n
-#endif
-  ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-void m_parupper(
-#if defined(M_PROTO)
-  int par, M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_parvalok(
-#if defined(M_PROTO)
-  M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value
-#endif
-  ) ;
-
-void m_piaction(
-#if defined(M_PROTO)
-  M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype
-#endif
-  ) ;
-
-void m_pop(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_push(
-#if defined(M_PROTO)
-  M_ELEMENT elt, M_STATE current, LOGICAL need
-#endif
-  ) ;
-
-LOGICAL m_putdata(
-#if defined(M_PROTO)
-  void *data, int n
-#endif
-  ) ;
-
-void m_readcomments(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void *m_realloc(
-#if defined(M_PROTO)
-  void *ptr, int size, char *msg
-#endif
-  ) ;
-
-int m_scan(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_setmap(
-#if defined(M_PROTO)
-  int map, LOGICAL useoradd
-#endif
-  ) ;
-
-void m_setoptions(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_setparam(
-#if defined(M_PROTO)
-  M_WCHAR **cvar, int par
-#endif
-  ) ;
-
-void m_shortref(
-#if defined(M_PROTO)
-  int context
-#endif
-  ) ;
-
-void m_showcurelt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_signmsg(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_sigre(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_startdoc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_startmsg(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stcaction(
-#if defined(M_PROTO)
-  M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END
-#endif
-  ) ;
-
-void m_stcomplete(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stkdefaultparams(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stkonedef(
-#if defined(M_PROTO)
-  int par, M_ELEMENT scanel, M_WCHAR **poccur, int i
-#endif
-  ) ;
-
-void m_stkparams(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_strtaction(
-#if defined(M_PROTO)
-  M_ELEMENT m_elt
-#endif
-  ) ;
-
-void m_strtcase(
-#if defined(M_PROTO)
-  int m_action
-#endif
-  ) ;
-
-void m_strtcdata(
-#if defined(M_PROTO)
-  int scanval
-#endif
-  ) ;
-
-LOGICAL m_strtproc(
-#if defined(M_PROTO)
-  M_ELEMENT scanval
-#endif
-  ) ;
-
-void m_strttag(
-#if defined(M_PROTO)
-  M_ELEMENT val, LOGICAL net
-#endif
-  ) ;
-
-void m_textaction(
-#if defined(M_PROTO)
-  M_WCHAR m_textchar
-#endif
-  ) ;
-
-void m_textout(
-#if defined(M_PROTO)
-  char *format, LOGICAL start, LOGICAL end
-#endif
-  ) ;
-
-LOGICAL m_textpermitted(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *m_thisfile(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_thisline(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_trace(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-LOGICAL m_transition(
-#if defined(M_PROTO)
-  M_ELEMENT label, LOGICAL recur
-#endif
-  ) ;
-
-void m_undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim, LOGICAL flag
-#endif
-  ) ;
-
-void m_ungetachar(
-#if defined(M_PROTO)
-  int c, M_HOLDTYPE dchar, LOGICAL preread
-#endif
-  ) ;
-
-void m_updatedefault(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-LOGICAL m_validinpar(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_vldentref(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+int m_actgetc(void);
+
+void m_adjuststate(void);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void m_attval(M_WCHAR *string);
+
+LOGICAL m_attvonly(M_WCHAR *string);
+
+int m_checkstart(M_ELEMENT val);
+
+LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet);
+
+void m_ckmap(M_WCHAR *name, LOGICAL useoradd);
+
+void m_closent(void *m_ptr);
+
+void m_codeent(int m_ent);
+
+M_PARSE *m_copystackelt(void);
+
+M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, 
+  unsigned char *wheredef);
+
+void m_dispcurelt(M_WCHAR *file, int line);
+
+void m_done(void);
+
+void m_dumpline(M_WCHAR *file, int line);
+
+void m_eduptype(int type);
+
+M_ELEMENT m_eltname(void);
+
+void m_endaction(M_ELEMENT m_elt);
+
+void m_endcase(int m_action);
+
+void m_endtag(M_ELEMENT c);
+
+void m_entexpand(M_ENTITY *openent);
+
+void m_eprefix(void);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_err6(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6);
+
+void m_err7(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7);
+
+void m_errline(char *p);
+
+void m_error(char *text);
+
+void m_esuffix(void);
+
+void m_exit(int status);
+
+void m_etcomplete(void);
+
+LOGICAL m_excluded(M_ELEMENT elt);
+
+void m_expecting(void);
+
+void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data);
+
+void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label);
+
+void m_exptend(LOGICAL *expstart, M_PARSE *stackptr);
+
+int m_findact(M_ELEMENT elt, int *array);
+
+void m_findatt(void);
+
+void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, 
+  LOGICAL wild);
+
+int m_findpar(const char *elt, const char *param, const M_WCHAR *value);
+
+M_ELEMENT m_findunique(M_STATE from, int *newleft);
+
+void m_frcend(M_ELEMENT val);
+
+void m_frcstart(void);
+
+void m_free(void *block, char *msg);
+
+void m_freeFSA(M_PARSE *stackelt);
+
+void m_freemin(M_MIN *min, char *msg);
+
+void m_freeparam(M_PARSE *stackelt);
+
+LOGICAL m_gendelim(int srlen, int context);
+
+int m_getachar(M_HOLDTYPE *dchar);
+
+int m_getc(void *m_ptr);
+
+int mb_getwc(void *m_ptr);
+
+void *m_getdata(int n, LOGICAL *flag);
+
+void m_getline(M_WCHAR **file, int *line);
+
+void m_getname(M_WCHAR first);
+
+void m_getsignon(void);
+
+int m_gettoken(int *c, M_HOLDTYPE *dchar, int context);
+
+void m_globes(void);
+
+void m_globss(void);
+
+void m_holdproc(void);
+
+void m_inctest(int *count, int limit, char *message);
+
+void m_initctype(void);
+
+void m_initialize(void);
+
+void m_lastchars(void);
+
+int m_level(M_WCHAR *elt);
+
+int m_mblevel(char *elt);
+
+void m_litproc(int delim);
+
+void m_longent(int context);
+
+LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content, 
+  unsigned char *wheredef);
+
+void main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start);
+
+LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label);
+
+void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank, 
+  unsigned char type);
+
+void m_ntrent(M_WCHAR *p);
+
+void m_nullendtag(void);
+
+LOGICAL m_omitend(void);
+
+LOGICAL m_omitstart(void);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void *m_openent(M_WCHAR *entcontent);
+
+void *m_openfirst(void);
+
+void m_optstring(char *p);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+int m_parcount(M_WCHAR *elt);
+
+M_WCHAR *m_pardefault(M_WCHAR *elt, M_WCHAR *param, unsigned char *type);
+
+M_WCHAR *m_parent(int n);
+
+M_WCHAR *m_parname(M_WCHAR *elt, int n);
+
+M_WCHAR *m_mbparname(char *elt, int n);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+void m_parupper(int par, M_WCHAR *string);
+
+LOGICAL m_parvalok(M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value);
+
+void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype);
+
+void m_pop(void);
+
+void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need);
+
+LOGICAL m_putdata(void *data, int n);
+
+void m_readcomments(void);
+
+void *m_realloc(void *ptr, int size, char *msg);
+
+int m_scan(void);
+
+void m_setmap(int map, LOGICAL useoradd);
+
+void m_setoptions(void);
+
+void m_setparam(M_WCHAR **cvar, int par);
+
+void m_shortref(int context);
+
+void m_showcurelt(void);
+
+void m_signmsg(char *p);
+
+void m_sigre(void);
+
+void m_startdoc(void);
+
+void m_startmsg(void);
+
+void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END);
+
+void m_stcomplete(void);
+
+void m_stkdefaultparams(void);
+
+void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i);
+
+void m_stkparams(void);
+
+void m_strtaction(M_ELEMENT m_elt);
+
+void m_strtcase(int m_action);
+
+void m_strtcdata(int scanval);
+
+LOGICAL m_strtproc(M_ELEMENT scanval);
+
+void m_strttag(M_ELEMENT val, LOGICAL net);
+
+void m_textaction(M_WCHAR m_textchar);
+
+void m_textout(char *format, LOGICAL start, LOGICAL end);
+
+LOGICAL m_textpermitted(void);
+
+M_WCHAR *m_thisfile(void);
+
+int m_thisline(void);
+
+void m_trace(char *p);
+
+void m_wctrace(M_WCHAR *p);
+
+LOGICAL m_transition(M_ELEMENT label, LOGICAL recur);
+
+void m_undodelim(M_WCHAR *delim, LOGICAL flag);
+
+void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread);
+
+void m_updatedefault(const int par, const M_WCHAR *string);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+LOGICAL m_validinpar(M_WCHAR *string);
+
+LOGICAL m_vldentref(void);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index 4e14a56baecac7c62371d7b8bf6367de86042b79..d6ab9060d32de7f927683452b56118b553c9b989 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #define M_CONDEF
@@ -51,7 +48,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "sref.h"
 
 /* Actually read a character from an input stream */
-int m_actgetc(M_NOPAR)
+int m_actgetc(void)
   {
     int c ;
 
@@ -398,12 +395,7 @@ int m_getachar(dchar)
     }
 
 /* Reads a name token */
-#if defined(M_PROTO)
 void m_getname(M_WCHAR first)
-#else
-void m_getname(first)
-  M_WCHAR first ;
-#endif
 {
     M_WCHAR *p ;
     M_HOLDTYPE dchar ;
@@ -645,14 +637,7 @@ void m_litproc(delim)
     }
 
 /* Called when a missing tagc delimiter is detected */
-#if defined(M_PROTO)
 void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start)
-#else
-void m_missingtagc(c, dchar, start)
-  int c ;
-  M_HOLDTYPE dchar ;
-  LOGICAL start ;
-#endif
 {
     if (! m_wholetag) {
       if (start) m_mberr1("Invalid parameter or missing %s", m_tagc);
@@ -665,18 +650,8 @@ void m_missingtagc(c, dchar, start)
 
 /* Have found one character in a possible short reference delimiter.
    Prepare to look for the next one */
-#if defined(M_PROTO)
 void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart,
                     LOGICAL skipblank, unsigned char type)
-#else
-void m_nextdelimchar(n, i, linestart, newlinestart, skipblank, type)
-  int *n ;
-  int i ;
-  LOGICAL *linestart ;
-  LOGICAL newlinestart ;
-  LOGICAL skipblank ;
-  unsigned char type ;
-#endif
 {               
     int k ;
     char mb_re,mb_seqchar, mb_rschar;
@@ -711,7 +686,7 @@ void m_nextdelimchar(n, i, linestart, newlinestart, skipblank, type)
     }
 
 /* Scans past a comment within a markup declaration */
-void m_readcomments(M_NOPAR)
+void m_readcomments(void)
   {
     int c ;
     M_HOLDTYPE dchar ;
@@ -724,7 +699,7 @@ void m_readcomments(M_NOPAR)
     }
 
 /* Scanner */
-int m_scan(M_NOPAR)
+int m_scan(void)
   {
     int c ;
     M_HOLDTYPE dchar ;
@@ -858,13 +833,7 @@ int m_scan(M_NOPAR)
 
 
 /* Process explicit or implied USEMAP or ADDMAP */
-#if defined(M_PROTO)
 void m_setmap(int map, LOGICAL useoradd)
-#else
-void m_setmap(map, useoradd)
-  int map ;
-  LOGICAL useoradd ;
-#endif
 {
     int i ;
     int sref ;
@@ -1063,7 +1032,7 @@ while (TRUE)
           or contextual end tag [linestat == M_SOMETHING]
       3)  If a record end might be the last one in an element, save it
 */
-void m_sigre(M_NOPAR)
+void m_sigre(void)
   {
     /* Check for first RE in content and no preceding content */
     if (m_start &&
@@ -1082,13 +1051,7 @@ void m_sigre(M_NOPAR)
 
 /* Returns a context-dependent delimiter string to input stream so
    characters can be reread one at a time in another context */
-#if defined(M_PROTO)
 void m_undodelim(M_WCHAR *delim, LOGICAL flag)
-#else
-void m_undodelim(delim, flag)
-  M_WCHAR *delim ;
-  LOGICAL flag ;
-#endif
 {
     M_WCHAR *p ;
 
@@ -1105,14 +1068,7 @@ void m_undodelim(delim, flag)
 /* Place a character on the current input stream.  The character may have
    been scanned and determined not to be part of the current token or it
    may be in the expansion of an entity*/
-#if defined(M_PROTO)
 void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread)
-#else
-void m_ungetachar(c, dchar, preread)
-  int c ;
-  M_HOLDTYPE dchar ;
-  LOGICAL preread ;
-#endif
 {
     char buffer[10] ;
     int length;
@@ -1152,7 +1108,7 @@ void m_ungetachar(c, dchar, preread)
     }
 
 /* Have encountered an M_ERO.  If the entity reference is valid, process it*/
-LOGICAL m_vldentref(M_NOPAR)
+LOGICAL m_vldentref(void)
   {
     M_HOLDTYPE dchar ;
     int next ;
index 2fc124f0911e4344e7ce55cb556ee29eced6e885..1b83c7a4ea1c2a5249f46b63108c6b7ebab5e5d5 100644 (file)
@@ -30,7 +30,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 
 /* Set program options */
-void m_setoptions(M_NOPAR)
+void m_setoptions(void)
   {
     if (m_argc > 1) m_optstring(m_argv[1]) ;
     }
index 9663447a3ba5e784a8e1c4eb32e141cf105c8d57..8280639c4528b205033cbdc24373df3c2feb4822 100644 (file)
@@ -32,7 +32,7 @@ Copyright 1989 Hewlett-Packard Co.
    control after all entity declarations have been processed.  Not needed
    in valid documents (when it is called just prior to global start-code),
    but may be useful in some applications nevertheless. */
-void m_startdoc(M_NOPAR)
+void m_startdoc(void)
   {
     }
 
index b618aed345db3570a7119dfd3e354136afc5d404..95d157e421493471c3a2abf0856048ce1801c196 100644 (file)
 /* Include generated code */
 #include "stfile.c"
 
-#if defined(M_PROTO)
 void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END)
-#else
-void m_stcaction(m_string, M_START, M_END)
-  M_WCHAR *m_string ;
-  LOGICAL M_START ;
-  LOGICAL M_END ;
-#endif
 {
     m_stackpar = m_stacktop->stparam ;
     (*m_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ;
index 0afe866e518965de89118c9df29364a945891696..a7de300b71d2bc8a42b461d753ff8de861a7df51 100644 (file)
@@ -33,9 +33,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -88,13 +85,7 @@ int m_checkstart(val)
    If VAL is not the element at the top of the parse stack, m_ckend
    checks to see if the end of VAL can validly end nested
    elements as well. */
-#if defined(M_PROTO)
 LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet)
-#else
-LOGICAL m_ckend(val, neednet)
-  M_ELEMENT val ;
-  LOGICAL neednet ;
-  #endif
 {
     M_PARSE *stackptr ;
     M_OPENFSA *fsastack ;
@@ -197,7 +188,7 @@ LOGICAL m_ckend(val, neednet)
 
 /* Make a copy of the stack entry at the top of the parse stack in a scratch
    area */
-M_PARSE *m_copystackelt(M_NOPAR)
+M_PARSE *m_copystackelt(void)
   {
     M_OPENFSA *oldfsa ;
     M_OPENFSA **newfsa ;
@@ -225,7 +216,7 @@ M_PARSE *m_copystackelt(M_NOPAR)
     }
 
 /* End of document */
-void m_done(M_NOPAR)
+void m_done(void)
   {
     M_ELEMENT lastelt ;
 
@@ -401,7 +392,7 @@ LOGICAL m_nextand(thisfsa, label)
     }
 
 /* Pops the parse stack*/
-void m_pop(M_NOPAR)
+void m_pop(void)
   {
     M_PARSE *stackelt ;
 
@@ -423,14 +414,7 @@ void m_pop(M_NOPAR)
 
 /* Pushes a new item onto the parse stack, setting its element, current,
    and neednet fields as indicated by the parameters*/
-#if defined(M_PROTO)
 void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need)
-#else
-void m_push(elt, current, need)
-  M_ELEMENT elt ;
-  M_STATE current ;
-  LOGICAL need ;
-  #endif
 {
     M_PARSE *newstack ;
 
@@ -651,13 +635,7 @@ LOGICAL m_strtproc(scanval)
     }
 
 /* Processes explicit or implied start tag*/
-#if defined(M_PROTO)
 void m_strttag(M_ELEMENT val, LOGICAL net)
-#else
-void m_strttag(val, net)
-  M_ELEMENT val ;
-  LOGICAL net ;
-#endif
 {
     m_transition(val, TRUE) ;
     if (val) {
@@ -680,7 +658,7 @@ void m_strttag(val, net)
    makes more sense, is used by MARKUP, and is under consideration by the
    Standards committee; the latter is the current definition in the Standard
    */
-LOGICAL m_textpermitted(M_NOPAR)
+LOGICAL m_textpermitted(void)
   {
     M_ANDGROUP pand ;
     M_OPENFSA *fsastack ;
@@ -723,13 +701,7 @@ LOGICAL m_textpermitted(M_NOPAR)
 /* Returns TRUE iff LABEL allowed in the current state of the current
    element (without expanding any minimization).  May result in changes
    to the stack of FSA's for this element if and-groups open or close. */
-#if defined(M_PROTO)
 LOGICAL m_transition(M_ELEMENT label, LOGICAL recur)
-#else
-LOGICAL m_transition(label, recur)
-  M_ELEMENT label ;
-  LOGICAL recur ;
-#endif
 {
     M_ARC parc ;
     M_OPENFSA *newfsa ;
index dbf1c78927ba946b50c0d207a17425134d650a29..fb39edbfbb9ff4f8deceb757d50e65fe2d9b0c20 100644 (file)
@@ -36,12 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "tfile.c"
 
 /* When a text character occurs */
-#if defined(M_PROTO)
 void m_textaction(M_WCHAR m_textchar)
-#else
-void m_textaction(m_textchar)
-  M_WCHAR m_textchar ;
-  #endif
 {
     char buffer[10] ;
     char    mb_re;
index 3165fbc57fba18549e6b6e40b632f3cd8df8678c..d03d79d08fb4375b4db20d9c3a6f851107d88604 100644 (file)
 */
 #include "basic.h"
 
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
+LOGICAL m_allwhite(const M_WCHAR *string);
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+LOGICAL m_whitespace(M_WCHAR c);
 
 /* Test if a string contains only white space characters */
-#if defined(M_PROTO)
 LOGICAL m_allwhite(const M_WCHAR *string )
-#else
-LOGICAL m_allwhite(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 const M_WCHAR *p ;
 
index bbb0d8c25aba210a45402b790cb383fad0c506bb..a372f46bb5f9c71bb6ed7dd27313ef1af15bcb25 100644 (file)
@@ -46,69 +46,21 @@ typedef wchar_t M_WCHAR;
 
 /* For function prototypes */
 typedef char * M_POINTER;
-#if defined(hpux) || defined(__aix) || defined(sun)
-/* Old unix stuff
- *#define void int
- *#define M_NOPAR
- */
-/* New Ansi style */
-#define M_PROTO
-#define M_NOPAR void
-#else
-#define M_PROTO
-#define M_NOPAR void
-#endif
-
-char *MakeMByteString(
-#if defined(M_PROTO)
-  const M_WCHAR *from
-#endif
-  );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
-
-int w_strcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *string1, const M_WCHAR *string2
-#endif
-  );
-
-M_WCHAR *w_strcpy(
-#if defined(M_PROTO)
-  M_WCHAR *string1, const M_WCHAR *string2
-#endif
-  );
-
-M_WCHAR *w_strncpy(
-#if defined(M_PROTO)
-  M_WCHAR *string1, const M_WCHAR *string2, int max
-#endif
-  );
-
-int w_strlen(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  );
-
-M_WCHAR *w_strchr(
-#if defined(M_PROTO)
-  M_WCHAR *string, const M_WCHAR chr
-#endif
-  );
-
-M_WCHAR *w_strstr(
-#if defined(M_PROTO)
-  M_WCHAR *string1, M_WCHAR *string2
-#endif
-  );
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
+
+int w_strlen(const M_WCHAR *string);
+
+M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
+
+M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
+
+void *m_malloc(int size, char *msg);
index 5771e5f32c8a8085e0a9457f210d617cc87e8bbb..2bdcaf8d9b6d92f7c87da8fe750e576ca809257d 100644 (file)
@@ -37,179 +37,63 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #define CONTINIT(a)
 #endif
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpdlmptr(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void dumpdlmptr(void);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
 
-void dumptree(
-#if defined(M_PROTO)
-  LOGICAL sparse
-#endif
-  ) ;
+void dumptree(LOGICAL sparse);
 
-void enterdelim(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+void enterdelim(int n);
 
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void m_error(char *text);
 
-void m_err1(
-#if defined(M_PROTO)
-  char *text, char *arg
-#endif
-  ) ;
+void m_err1(char *text, char *arg);
 
-void getcode(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+void getcode(int n);
 
-void getcolon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void getcolon(void);
 
-int getcontext(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+int getcontext(void);
 
-LOGICAL getdname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+LOGICAL getdname(void);
 
-void inccon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void inccon(void);
 
-void incdelim(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void incdelim(void);
 
-void loaddelim(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void loaddelim(void);
 
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_lower(int c);
 
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
+void main(int argc, char **argv);
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void nextcon(
-#if defined(M_PROTO)
-  LOGICAL sparse
-#endif
-  ) ;
+void nextcon(LOGICAL sparse);
 
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
 
-void printval(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
+void printval(FILE *file, M_TRIE *value);
 
-void prtctxt(
-#if defined(M_PROTO)
-  int column, int value
-#endif
-  ) ;
+void prtctxt(int column, int value);
 
-int readchar(
-#if defined(M_PROTO)
-  LOGICAL cap
-#endif
-  ) ;
+int readchar(LOGICAL cap);
 
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void skiptoend(void);
 
-void unread(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+void unread(int c);
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_upper(int c);
 
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void warning(char *text);
 
-void warning1(
-#if defined(M_PROTO)
-  char *text, char *arg
-#endif
-  ) ;
+void warning1(char *text, char *arg);
 
-void warning2(
-#if defined(M_PROTO)
-  char *text, char *arg1, char *arg2
-#endif
-  ) ;
+void warning2(char *text, char *arg1, char *arg2);
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+LOGICAL m_whitespace(M_WCHAR c);
 
 
 #define NOMORE -1
index 9f3237d2f253d34e9ed21e135de522885aa032dd..1f92a699b6888bcda462fe9a08d826a641e88191 100644 (file)
@@ -157,9 +157,6 @@ delim.h.
 
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
index 5ae190cfb53e113be76fbe107c41cc8b27b6582b..e30308c1226795635e15e76f5bed7895f34179d3 100644 (file)
@@ -31,16 +31,13 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
 #include "cont.h"
 
 /* Output declaration of dlmptr */
-void dumpdlmptr(M_NOPAR)
+void dumpdlmptr(void)
   {
     int n;
 
@@ -55,12 +52,7 @@ void dumpdlmptr(M_NOPAR)
     }
 
 /* Output the generated data structures */
-#if defined(M_PROTO)
 void dumptree(LOGICAL sparse)
-#else
-void dumptree(sparse)
-  LOGICAL sparse;
-#endif
   {
     int i, count = 0;
 
@@ -219,7 +211,7 @@ while (TRUE)
 } /* End proc getcode() */
 
 /* Read the colon separating the two states in a transition pair */
-void getcolon(M_NOPAR)
+void getcolon(void)
 {
 int c ; /* c is int instead of char for use with ungetc */
 M_WCHAR wcl;
@@ -242,7 +234,7 @@ if (c != wcl)
 }
 
 /* Read a context name from an input line */
-int getcontext(M_NOPAR)
+int getcontext(void)
 {
 M_WCHAR name[CNAMELEN + 1];
 int c ; /* c is int instead of char for use with ungetc */
@@ -309,7 +301,7 @@ return(ccount - 1);
 }
 
 /* Read a delimiter name from the input line */
-LOGICAL getdname(M_NOPAR)
+LOGICAL getdname(void)
 {
 int c;
 M_WCHAR *p;
@@ -353,7 +345,7 @@ return(TRUE);
 }
 
 /* Out of context space.  Increase. */
-void inccon(M_NOPAR)
+void inccon(void)
   {
     M_TRIE **newtrie = NULL;
     int *newtransit = NULL;
@@ -400,7 +392,7 @@ void inccon(M_NOPAR)
     }
 
 /* Increase delimiter space. */
-void incdelim(M_NOPAR)
+void incdelim(void)
 {
 int *newtransit = NULL;
 char **newdlm = NULL;
@@ -443,7 +435,7 @@ dcount++;
 }
 
 /* Read delimiter definitions from delim.dat */
-void loaddelim(M_NOPAR)
+void loaddelim(void)
 {
 int c;
 M_WCHAR *p;
@@ -563,12 +555,7 @@ loading = FALSE;
 }
 
 /* Output transition matrix */
-#if defined(M_PROTO)
 void nextcon(LOGICAL sparse)
-#else
-void nextcon(sparse)
-  LOGICAL sparse;
-#endif
   {
     int i, j;
     int firstinrow;
@@ -635,12 +622,7 @@ void prtctxt(column, value)
 
 
 /* Read the next input character */
-#if defined(M_PROTO)
 int readchar(LOGICAL cap)
-#else
-int readchar(cap)
-  LOGICAL cap;
-#endif
 {
 int c;
 M_WCHAR wnl;
@@ -657,7 +639,7 @@ return(c);
 
 /* Called by utility procedure m_error() -- has content in other programs
    that use m_error() */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
 {
 }
 
index d8754cc5a2355e9b8c734ab272dab2200f7deef7..90493d922cfb1053cef11bbefe8f9cef802572d0 100644 (file)
 /* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
 /* Creates a file with nothing in it */
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void main(argc, argv)
-  int argc ;
-  char **argv ;
+void main(int argc, char **argv)
   {
     if (argc != 2) {
       fprintf(stderr, "Usage: emptyfil filename\n") ;
index 95996715ce23dc0cd61fe848d95d34a7fd0c3d87..dbd8ff38f291a6e230921491e2ebde33a0e5957b 100644 (file)
 
 /* Entout has procedures to write generated entity TRIE */
 
-void entptr(
-#if defined(M_PROTO)
-  M_ENTITY *data
-#endif
-  ) ;
+void entptr(M_ENTITY *data);
 
-char *typetype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+char *typetype(int n);
 
-char *typewhere(
-#if defined(M_PROTO)
-  unsigned char n
-#endif
-  ) ;
+char *typewhere(unsigned char n);
 
 /* Macro names written to output file */
 char xdbuild[] = "M_DBUILD" ;
@@ -213,12 +201,7 @@ char *typetype(n)
     }
 
 /* Typewhere returns a string indicating where the nth entity was defined.*/
-#if defined(M_PROTO)
 char *typewhere(unsigned char n)
-#else
-char *typewhere(n)
-  unsigned char n ;
-#endif
   {
     switch(n) {
       case M_DBUILD: return(xdbuild) ;
index a3380302d308057c74e6a56403ed9f84c7b6e272..1fa8aba58d6f9d741c5edfa5d7360b2c93478f52 100644 (file)
@@ -33,128 +33,47 @@ extern FILE *m_errfile ;
 extern int m_line ;
 extern LOGICAL errexit ;
 
-void eprefix(
-#if defined(M_PROTO)
-  LOGICAL flag
-#endif
-  ) ;
-
-void m_errline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
-             M_WCHAR *arg5
-#endif
-  ) ;
-
-void esuffix(
-#if defined(M_PROTO)
-  void
-#endif
-  ) ;
-
-void msgline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void msg1line(
-#if defined(M_PROTO)
-  char *text, char *arg1
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *text
-#endif
-  ) ;
-
-void m_trace(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-void warning2(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2
-#endif
-  ) ;
-
-void warning3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void warning4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
+void eprefix(LOGICAL flag);
+
+void m_errline(char *text);
+
+void m_error(char *text);
+
+void m_err1(char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
+             M_WCHAR *arg5);
+
+void esuffix(void);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void skiptoend(void);
+
+void m_wctrace(M_WCHAR *text);
+
+void m_trace(char *text);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
 
 /* Write error message prefix */
-#if defined(M_PROTO)
 void eprefix(LOGICAL flag)
-#else
-void eprefix(flag)
-  LOGICAL flag ;
-#endif
   {
     if (flag) errexit = TRUE ;
     fprintf(stderr, "\n**** ") ;
@@ -184,13 +103,7 @@ void m_error(text)
 
 /* Writes an error message with one argument to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err1(char *text, const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
-  char *text;
-  M_WCHAR *arg ;
-#endif
 {
 char *mb_arg;
 
@@ -203,13 +116,7 @@ skiptoend() ;
 m_free(mb_arg,"multi-byte string");
 }
 
-#if defined(M_PROTO)
 void m_mberr1(char *text, const char *arg)
-#else
-void m_err1(text, arg)
-  char *text;
-  char *arg ;
-#endif
 {
 eprefix(TRUE) ;
 fprintf(stderr, text, arg) ;
@@ -220,13 +127,7 @@ skiptoend() ;
 
 /* Writes an error message with two arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err2( const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2)
-#else
-void m_err2(text, arg1, arg2)
-char *text;
-M_WCHAR *arg1, *arg2 ;
-#endif
 {
 char *mb_arg1, *mb_arg2;
 
@@ -243,13 +144,7 @@ m_free(mb_arg2,"multi-byte string");
 
 /* Writes an error message with three arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err3( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
-#else
-void m_err3(text, arg1, arg2, arg3)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3;
 
@@ -268,14 +163,8 @@ m_free(mb_arg3,"multi-byte string");
 
 /* Writes an error message with five arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
             M_WCHAR *arg4, M_WCHAR *arg5)
-#else
-void m_err5(text, arg1, arg2, arg3, arg4, arg5)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3, *arg4, *arg5 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
 
@@ -296,7 +185,7 @@ m_free(mb_arg5,"multi-byte string");
 }
 
 /* Write error message suffix */
-void esuffix(M_NOPAR)
+void esuffix(void)
   {
     fprintf(stderr, " (line %d) ****\n", m_line) ;
     fprintf(m_errfile, " (line %d) ****\n", m_line) ;
@@ -347,13 +236,7 @@ void warning(text)
 
 /* Writes a nonfatal error message with one argument to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning1( char *text, M_WCHAR *arg)
-#else
-void warning1(text, arg)
-char *text;
-M_WCHAR *arg ;
-#endif
 {
 char *mb_arg;
 
@@ -367,13 +250,7 @@ m_free(mb_arg,"multi-byte string");
 
 /* Writes a nonfatal error message with two arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2)
-#else
-void warning2(text, arg1, arg2)
-char *text;
-M_WCHAR *arg1, *arg2 ;
-#endif
 {
 char *mb_arg1, *mb_arg2;
 
@@ -389,13 +266,7 @@ m_free(mb_arg2,"multi-byte string");
 
 /* Writes a nonfatal error message with three arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
-#else
-void warning3(text, arg1, arg2, arg3)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3;
 
@@ -413,14 +284,8 @@ m_free(mb_arg3,"multi-byte string");
 
 /* Writes a nonfatal error message with four arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
              M_WCHAR *arg4)
-#else
-void warning4(text, arg1, arg2, arg3, arg4)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3, *arg4 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4;
 
index 0966c4a08552296cbf612f642e2e7d39767b4c94..2fb2dc435bc0e0a36d5c32fc1599e65a010efedd 100644 (file)
 Copyright 1988, 1989 Hewlett-Packard Co.
 */
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
 /* Exit function called by utilities used in PARSER and other programs in
    the MARKUP system */
index cc78e8522eedd9320b55cf2cdd589aed9bbe4fce..77a4e8078bdab54082189c0892e0bfade7c4e39c 100644 (file)
@@ -37,9 +37,6 @@ with an error code of 0 if the files are the same, 1 if they differ, and
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #define SAME 0
 /* different defined to be 0 as of 12-1-89, because fclndir now does
@@ -58,23 +55,11 @@ struct data {
 char linedir[] = "#line" ;
 char *p = linedir, *q = linedir + 1 ;
 
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
+void main(int argc, char **argv);
 
-void copyfile(
-#if defined(m_proto)
-  char *pfile1, char *pfile2
-#endif
-  ) ;
+void copyfile(char *pfile1, char *pfile2);
 
-int nextchar(
-#if defined (M_PROTO)
-  FILE *file, struct data *data
-#endif
-  ) ;
+int nextchar(FILE *file, struct data *data);
 
 void main(argc, argv)
   int argc ;
@@ -134,11 +119,7 @@ void copyfile(pfile1,pfile2)
 /* malloc space for the system command: two filenames, plus a command,
    spaces, and the terminating null */
        pcmd = (char *) malloc(strlen(pfile1) + strlen(pfile2) + 8);
-#if defined(MSDOS)
-       ret = sprintf(pcmd,"copy %s %s",pfile1,pfile2);
-#else
        ret = sprintf(pcmd,"cp %s %s",pfile1,pfile2);
-#endif
        ret = system(pcmd);
        ret = sprintf(pcmd,"touch %s",pfile2);
        ret = system(pcmd);
index 8f97f60ad74875b80be4989bd065f0f14065cb05..f2dbba3eedfc07b185048e90a2f3769a045eb12f 100644 (file)
                    Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co.
 */
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const char *arg
-#endif
-  ) ;
+void m_err1(const char *text, const char *arg);
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_inctest(
-#if defined(M_PROTO)
-  int *count, int limit, char *message
-#endif
-  ) ;
+void m_inctest(int *count, int limit, char *message);
 
 /* Increment a count and test against a limit */
 void m_inctest(count, limit, message)
index f041dfc16595172c5498a1c79ecaec8e5e19c5b3..711df37ee651f645df4e21931c9a1efc3e154d9b 100644 (file)
 #include "common.h"
 extern char m_chartype[M_CHARSETLEN] ;
 
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void m_initctype(void);
 
-void m_initctype(M_NOPAR)
+void m_initctype(void)
   {
     int i ;
 
index a11e73f1bbc321b107ed9c865a46256c5c9ba8e5..1d61bd56311434fc9eeba312d28787fdd0517d94 100644 (file)
 #include <string.h>
 #include "basic.h"
 
-char *m_itoa(
-#if defined(M_PROTO)
-  int n, char *s
-#endif
-  ) ;
+char *m_itoa(int n, char *s);
 
-void reverse(
-#if defined(M_PROTO)
-  char *s
-#endif
-  ) ;
+void reverse(char *s);
 
 char *m_itoa(n, s)  /* convert n to characters in s */
 char s[]; 
index b3f828c6ce39e51021d6993a2351cb69db0b31b7..b836171977743f5230d472e92d7154326aaa1edb 100644 (file)
 
 #include "basic.h"
 
-LOGICAL m_letter(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
-#if defined(M_PROTO)
 LOGICAL m_letter(M_WCHAR c)
-#else
-LOGICAL m_letter(c)
-  M_WCHAR c ;
-#endif
 {
 if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) return(TRUE) ;
 return(FALSE) ;
index 107a51e81ba44d7b9107630461b617c8cb865a07..d6eaaf2910095f4582804bf2230502517ff525e4 100644 (file)
 
 #include "basic.h"
 
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-
-
 /* Force a letter to lowercase */
-int m_lower(c)
-  int c ;
+int m_lower(int c)
   {
     if (c >= 'A' && c <= 'Z') c += 'a' - 'A' ;
     return(c) ;
index ab18230c4bf25176eafc58ad3300b463145de1a7..7e99cd3bc76bff350e12cb443cf1c9b51f6467de 100644 (file)
 /**/
 #include <stdlib.h>
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
 extern LOGICAL m_heapchk ;
 extern LOGICAL m_malftrace ;
 
-void m_errline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void m_errline(char *text);
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
+void m_free(void *block, char *msg);
 
-void m_heapdump(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void m_heapdump(void);
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void *m_realloc(
-#if defined(M_PROTO)
-  void *ptr, int size, char *msg
-#endif
-  ) ;
+void *m_realloc(void *ptr, int size, char *msg);
 
-void *m_trace(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void *m_trace(char *text);
 
-void *m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *text
-#endif
-  ) ;
+void *m_wctrace(M_WCHAR *text);
 
 void m_free(block, msg)
   void *block ;
@@ -90,9 +55,6 @@ void m_free(block, msg)
   {
     char buffer[32] ;
 
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (m_malftrace) {
 #if defined(hpux) || defined(_AIX) || defined(sun)
       sprintf(buffer, "%5x:%5x",
@@ -107,45 +69,7 @@ void m_free(block, msg)
       m_trace("\n") ;
       }      
     free(block) ;
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
-    }
-
-#if defined(MSDOS)
-void m_heapdump(M_NOPAR)
-  {
-    struct _heapinfo hinfo ;
-    int heapstatus ;
-
-    heapstatus = _heapchk() ;
-    if (heapstatus == _HEAPOK || heapstatus == _HEAPEMPTY) return ;
-    printf("\nDumping heap:\n") ;
-    hinfo._pentry = NULL ;
-    while ((heapstatus = _heapwalk(&hinfo)) == _HEAPOK) 
-      printf("%6s block at %p of size %4.4X\n",
-             hinfo._useflag == _USEDENTRY ? "USED" : "FREE",
-             hinfo._pentry, hinfo._size) ;
-    switch(heapstatus) {
-      case _HEAPEMPTY:
-        printf("OK - empty heap\n\n") ;
-        break ;
-      case _HEAPEND:
-        printf("OK - end of heap\n\n") ;
-        break ;
-      case _HEAPBADPTR:
-        printf("Error - bad pointer to heap\n\n") ;
-        break ;
-      case _HEAPBADBEGIN:
-        printf("Error - bad start of heap\n\n") ;
-        break ;
-      case _HEAPBADNODE:
-        printf("Error - bad node in heap\n\n") ;
-        break ;
-      }
-    m_exit(TRUE) ;
     }
-#endif
 
 void *m_malloc(size, msg)
   int size ;
@@ -155,14 +79,8 @@ void *m_malloc(size, msg)
     void *p ;
 
     size *= sizeof(M_WCHAR);
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! size) return(NULL) ;
     p = (void *) malloc(size) ;
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! p) {
       m_errline("Unable to allocate space for ") ;
       m_errline(msg) ;
@@ -196,14 +114,8 @@ void *m_realloc(ptr, size, msg)
     void *p ;
 
     size *= sizeof(M_WCHAR);
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! size) return(NULL) ;
     p = (void *) realloc(ptr, size) ;
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! p) {
       m_errline("Unable to re-allocate space for ") ;
       m_errline(msg) ;
index b9be2e4b03678b2158e48a27ad75e30983c601d3..327b205dbe399ff4cbf8354868f6b07d30667c0d 100644 (file)
 */
 
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
 extern FILE *m_errfile ;
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
 
 /* Open a file and check that the open succeeded */
-void m_openchk(ptr, name, mode)
-  FILE **ptr ;
-  char *name, *mode ;
+void m_openchk(FILE **ptrm, char *name, char *mode)
   {
     *ptr = fopen(name, mode) ;
     if (*ptr) return ;
index 066cf9d63961f80cf0df69b20c97dcc7abf5057f..1f3c2fbb9b5abab9dc2d55ce39a5c0a223ae8c12 100644 (file)
@@ -33,13 +33,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Check to see if string is a valid value for parameter par.  If so
    return a pointer to the keyword if it's a keyword parameter and otherwise
    a pointer to string.  If not valid, return FALSE. */
-#if defined(M_PROTO)
 const M_WCHAR *m_partype(const int par , const M_WCHAR *string )
-#else
-M_WCHAR *m_partype(par, string)
-  int par ;
-  M_WCHAR *string ;
-#endif /* M_PROTO */
   {
     LOGICAL first = TRUE ;
     int kw ;
index e3eeb7e0419e715f5fa2109f90eb7120994b85a8..d916765c20403c77a4a4e5cf77eb8f816cd08829 100644 (file)
@@ -28,7 +28,7 @@
 extern FILE *ifile;
 
 /* Getachar returns the next character from the input stream */
-int getachar(M_NOPAR)
+int getachar(void)
 {
 int  c;
 M_WCHAR wc,wnl;
index 47ba594d6fbf1a945b0d31fba13a204c47fb2f47..1879916feef133bd4d580f0a6e905252b1d122ca 100644 (file)
 #if defined(sparse)
 #define m_newcon(i, j) m_sprscon(i, j)
 
-int m_sprscon(
-#if defined(M_PROTO)
-  int i, int j
-#endif
-  ) ;
+int m_sprscon(int i, int j);
 
 #else
 #define m_newcon(i, j) m_nextcon[i][j]
index e91d02ae51fc1da813e779d98a70dc2af93f7932..16ae146b7ce1aa385e7ec98ee23ced07552b54de 100644 (file)
 
 #include <stdio.h>
 
-#if defined(MSDOS)
-#include <stdlib.h>
-#endif
-
 #include "basic.h"
 #include "common.h"
 #include "trie.h"
@@ -45,26 +41,12 @@ extern FILE *m_errfile ;
 
 extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void m_entercharintrie(
-#if defined(M_PROTO)
-  M_TRIE **currentnode, M_WCHAR c
-#endif
-  ) ;
+void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c);
 
 /* Enters the next character of a string into a trie */
-#if defined(M_PROTO)
 void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c)
-#else
-void m_entercharintrie(currentnode, c)
-  M_TRIE **currentnode ;
-  M_WCHAR c ;
-#endif
   {
     M_TRIE *newnode ;
 
@@ -99,7 +81,7 @@ void m_entercharintrie(currentnode, c)
    } /* end entertree */
 
 /* Gets a new node for a trie */
-M_TRIE *m_gettrienode(M_NOPAR)
+M_TRIE *m_gettrienode(void)
   {
     M_TRIE *new ;
 
@@ -112,13 +94,7 @@ M_TRIE *m_gettrienode(M_NOPAR)
 
 /* M_lookfortrie(p, xtrie) looks for string p in the specified trie,
    returning its data value if found and otherwise FALSE */
-#if defined(M_PROTO)
 void *m_lookfortrie( const M_WCHAR *p , const M_TRIE *xtrie )
-#else
-void *m_lookfortrie(p, xtrie)
-  M_WCHAR *p ;
-  M_TRIE *xtrie ;
-#endif /* M_PROTO */
   {
     M_TRIE *currentnode ;
 
@@ -141,10 +117,7 @@ void *m_lookfortrie(p, xtrie)
     }
 
 /* Enters a string and associated data value into a trie */
-void *m_ntrtrie(p, xtrie, dataval)
-  M_WCHAR *p ;
-  M_TRIE *xtrie ;
-  void *dataval ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval)
   {
     M_TRIE *currentnode ;
     void *n ;
index 4d8a583de0d5ad91a94015c00cb801fa73c1b3b3..f33c9e988ea2d9ef6630d706173130ba6a02481f 100644 (file)
@@ -51,26 +51,10 @@ struct m_ptrie {
   } ;
 
 
-M_TRIE *m_gettrienode(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+M_TRIE *m_gettrienode(void);
 
-void *m_lookfortrie(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_TRIE *xtrie
-#endif
-  ) ;
+void *m_lookfortrie(const M_WCHAR *p, const M_TRIE *xtrie);
 
-void *m_ntrtrie(
-#if defined(M_PROTO)
-  M_WCHAR *p, M_TRIE *xtrie, void *dataval
-#endif
-  ) ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval);
 
-void *m_resettrie(
-#if defined(M_PROTO)
-  M_TRIE *xtrie, M_WCHAR *p, void *value
-#endif
-  ) ;
+void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value);
index 9e81d04a4a877fdb7b96cc170994367aec4cd4b5..d19c476d43b897539abd62efbbe0093a9061c3fe 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
-    void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+    void (*proc)(FILE *file, void *value));
 
-void printval(
-#if defined(M_PROTO)
-  FILE *file, void *value
-#endif
-  ) ;
+void printval(FILE *file, void *value);
 
 /* Count the descendants of a node in order to generate declarations for
    the packed form of a trie*/
@@ -71,12 +59,7 @@ void dumpnode(first, file, trieptr, count, proc)
   FILE *file ;
   M_TRIE *trieptr ;
   int *count ;
-  void (*proc) (
-#if defined (M_PROTO)
-    FILE *file, 
-    void *value
-#endif
-    ) ;
+  void (*proc) (FILE *file, void *value);
   {
     M_TRIE *p ;
     int savecount ;
index 0ddf29af501bd6949ada4d22bacfd412a7541498..b34d480d44ad099bfdbddcf64d3785c1152037ce 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *xtrie, char *extname, int *count,
-  void (*proc)(void *value)
-#endif
-  ) ;
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count,
+  void (*proc)(void *value));
 
 /* Write the C declaration of a trie */
 void m_dumptrie(file, xtrie, extname, count, proc)
@@ -48,11 +40,7 @@ void m_dumptrie(file, xtrie, extname, count, proc)
   M_TRIE *xtrie ;
   char *extname ;
   int *count ;
-  void (*proc)(
-#if defined(M_PROTO)
-    void *value
-#endif
-    ) ;
+  void (*proc)(void *value);
   {
     int firstson ;
     M_TRIE *p ;
index 30bd2a4cd8dd53b04baef2c079646aed14dbef8f..8d96d9c58a8803c332caf68f1eb237ff003c915e 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
-    void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+    void (*proc)(FILE *file, void *value));
 
-void dumpptrie(
-#if defined(M_PROTO)
-  M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
-  void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+  void (*proc)(FILE *file, void *value));
 
 /* Write the declaration of a packed trie to the specified files */
 void dumpptrie(intname, extname, file, externdef, defdef, proc)
@@ -56,12 +44,7 @@ void dumpptrie(intname, extname, file, externdef, defdef, proc)
   FILE *file ;
   char *externdef ;
   char *defdef ;
-  void (*proc) (
-#if defined (M_PROTO)
-    FILE *file,
-    void *value
-#endif
-    ) ;
+  void (*proc) (FILE *file, void *value);
   {
     LOGICAL first = TRUE ;
     int count = 0 ;
index da15d5da35030eb0f42b0625a6f0b60dff99a305..9a36bbf4401c8046032c808d666a7e6da161d260 100644 (file)
 
 extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
 
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie,
-  M_WCHAR *name
-#endif
-  ) ;
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
 
 /* Look for the string NAME in the packed trie PTRIE */
-int m_packedlook(xptrie, name)
-M_PTRIE *xptrie ;
-M_WCHAR *name ;
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name)
 {
 int current = 0 ;
 int i ;
index 828c05904ec9e9452ced55cf1f9c2c60212c3a01..27627ad8c93f5c607a1c67ba99a39a339aff9f71 100644 (file)
 #include "common.h"
 extern M_CHARTYPE m_ctarray[256] ;
 
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
 
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
 
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
+int m_mbmbupstrcmp(const char *p, const char *q);
 
-#if defined(M_PROTO)
 int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q )
-#else
-int m_wcupstrcmp(p, q)
-  M_WCHAR *p, *q ;
-#endif /* M_PROTO */
   {
     do {
       if (m_ctupper(*p) < m_ctupper(*q)) return(-1) ;
@@ -65,13 +48,7 @@ int m_wcupstrcmp(p, q)
     return(0) ;
     }
 
-#if defined(M_PROTO)
 int m_wcmbupstrcmp(const M_WCHAR *p, const char *q)
-#else
-int m_wcmbupstrcmp(p, q)
-  M_WCHAR *p;
-  char *q ;
-#endif
   {
   M_WCHAR *wc;
   int      retval;
@@ -82,13 +59,7 @@ int m_wcmbupstrcmp(p, q)
   return retval;
   }
 
-#if defined(M_PROTO)
 int m_mbmbupstrcmp(const char *p, const char *q)
-#else
-int m_mbmbupstrcmp(p, q)
-  char *p;
-  char *q ;
-#endif
   {
   M_WCHAR *w_p, *w_q;
   int      retval;
index 53f77e2b3f8ac4550f4e24885b80fc8e00d5abe7..7b1361b3c3cd79b8781b10fec3c66ad8bd6741e2 100644 (file)
 
 #include "basic.h"
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-int m_upper(c)
-  int c ;
+int m_upper(int c)
   {
     if (c >= 'a' && c <= 'z') c += 'A' - 'a' ;
     return(c) ;
index 5bf7b2d7cfc5d94d8209351777ab44fd3fe5b515..16d9140bc82c809e3819c74a1e124407ffe3a392 100644 (file)
 
 #include "basic.h"
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_upper(int c);
 
-int m_upstrcmp(
-#if defined(M_PROTO)
-  char *p, char *q
-#endif
-  ) ;
+int m_upstrcmp(char *p, char *q);
 
 int m_upstrcmp(p, q)
   char *p, *q ;
index 180995ab6b40d1e21cac3ee349f2439c2dbf8f2c..660281939c525c0beab9dedefb5561bf2461d1c7 100644 (file)
 
 
 /* compare two wide character strings */
-#if defined(M_PROTO)
 int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2)
-#else
-int w_strcmp(string1, string2)
-M_WCHAR *string1;
-M_WCHAR *string2;
-#endif
 {
 M_WCHAR c1, c2, null;
 
@@ -58,13 +52,7 @@ while (1)
 
 
 /* copy a wide character string */
-#if defined(M_PROTO)
 M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2)
-#else
-M_WCHAR *w_strcpy(string1, string2)
-M_WCHAR *string1;
-M_WCHAR *string2;
-#endif
 {
 M_WCHAR *string1start;
 
@@ -77,14 +65,7 @@ return string1start;
 
 
 /* copy a wide character string, stopping after "max" moves */
-#if defined(M_PROTO)
 M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max)
-#else
-M_WCHAR *w_strncpy(string1, string2, max)
-M_WCHAR *string1;
-M_WCHAR *string2;
-int      max;
-#endif
 {
 M_WCHAR *string1start;
 
@@ -97,12 +78,7 @@ return string1start;
 
 
 /* get the length of a wide character string */
-#if defined(M_PROTO)
 int w_strlen(const M_WCHAR *string)
-#else
-int w_strlen(string)
-M_WCHAR *string;
-#endif
 {
 int length;
 
@@ -115,12 +91,7 @@ return length;
 
 
 /* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
 M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr)
-#else
-M_WCHAR *w_strchr(string, chr)
-M_WCHAR *string, chr;
-#endif
 {
 M_WCHAR *where;
 
@@ -140,12 +111,7 @@ else
 
 
 /* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
 M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2)
-#else
-M_WCHAR *w_strstr(string1, string2)
-M_WCHAR *string1, *string2;
-#endif
 {
 M_WCHAR *where1, *where2;
 
@@ -180,12 +146,7 @@ return NULL;
 
 
 /* make a multi-byte string from a wide character string */
-#if defined(M_PROTO)
 char *MakeMByteString(const M_WCHAR *wc_string)
-#else
-char *MakeMByteString(wc_string)
-M_WCHAR *wc_string;
-#endif
 {
 char   *mb_string;
 int     length;
@@ -210,12 +171,7 @@ return mb_string;
 
 
 /* make a wide character string from a multi-byte string */
-#if defined(M_PROTO)
 M_WCHAR *MakeWideCharString(const char *mb_string)
-#else
-M_WCHAR *MakeWideCharString(mb_string)
-char *mb_string;
-#endif
 {
 M_WCHAR *wc_string, *wc_stringStart;
 int      length, incr;
index 36d0beafa568e2299f379a3bcc1a2b4a7667d1bf..000033c3b1a150287ea3d1c5c4ac1cd9b0598b60 100644 (file)
 
 #include "basic.h"
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
 /* Test if character c is a blank, tab, or carriage return */
-#if defined(M_PROTO)
 LOGICAL m_whitespace(M_WCHAR c)
-#else
-LOGICAL m_whitespace(c)
-  M_WCHAR c ;
-#endif
 {
 char mb_c[32]; /* arbitrarily large */
 int  length;
index a0d687a6e6cce4eba41931d811efc3f6a18dfe44..85b42afe07fa9381406545b7ed3d337cb0fc415d 100644 (file)
@@ -3,12 +3,6 @@ PROGRAMS = volumegen
 
        INCLUDES = -I.
 
-#if defined(ApolloArchitecture)
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -ldl -lgen
 #endif
index 4fe65690a3bb8a46a1b6c8e4fd58e4ac6447cf7a..2ac52b2759edda6d8fdcb138ff4cf424e1535dc5 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "context.h"
 #define BUILDEF
 #include "build.h"
@@ -41,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entdef.h"
 
 /* Main procedure */
-int main(argc, argv)
-int argc ;
-char **argv ;
+int main(int argc, char **argv)
 {
 int m_prevcon ;
 
index aadec6fcafc7c21bb83c3d6a2a06e67d9c755739..9887254f2472540e2809fb64b01a49e6b5886d62 100644 (file)
@@ -421,8 +421,4 @@ BUILDEXTERN LOGICAL entrule BUILDINIT(FALSE) ;
 
 BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
 
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
+M_WCHAR *MakeWideCharString(const char *from);
index dbdb390dee9dc3bda443eeff51557c4e2ded6499..aca0a4b81ce42d33e7995b85165f8945b036e47e 100644 (file)
@@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Verify that <PARAM>, <MIN> or <USEMAP> has not previously occurred in
    this rule */
-void found(flag, delim)
-LOGICAL *flag;
-char *delim;
+void found(LOGICAL *flag, char *delim)
 {
 M_WCHAR wcbuff[129];
 ssize_t  length;
@@ -62,7 +60,7 @@ if (*flag)
 }
 
 /* Program initialization */
-void initialize(M_NOPAR)
+void initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
@@ -90,7 +88,7 @@ ruleinit() ;
 
 
 /* Initialization before starting a new rule */
-void ruleinit(M_NOPAR)
+void ruleinit(void)
   {
     /* Reinitialize for next rule */
     lhs = NULL ;
@@ -110,7 +108,7 @@ void ruleinit(M_NOPAR)
     }
 
 /* Rule end processing */
-void rulend(M_NOPAR)
+void rulend(void)
   {
     STATE *fsa = NULL ;
     LOGICAL canbenull ;
@@ -150,7 +148,7 @@ void rulend(M_NOPAR)
     }
 
 /* Skip rest of statement after an error */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
   {
     int i ;
     static int errlev = 0 ;
index 8f312008d4517402537963eb5ae697d388c5692c..c7713f6e2ebb45f181a90b04b47090d41fb7f957 100644 (file)
@@ -34,8 +34,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "build.h"
 
 /* Enters an element name into the element name tree */
-ELTSTRUCT *ntrelt(p)
-  M_WCHAR *p ;
+ELTSTRUCT *ntrelt(M_WCHAR *p)
   {
     ELTSTRUCT *new ;
     ELTSTRUCT *old ;
index fc9653a89e3c5bea6d2959acc3e1e85c0809256c..330ee36d0e679b02a12bcf519dc4fcec00ea1107 100644 (file)
@@ -32,7 +32,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "build.h"
 
 /* Add an exception (inclusion or exclusion) for the current element */
-void addex(M_NOPAR)
+void addex(void)
   {
     excount++ ;
     *nextex = (EXCEPTION *) m_malloc(sizeof(EXCEPTION), "exception") ;
index 9dfb91698c088a7cced87f0b964873eef41bebf6..8ddd28ca103a669471a7202d5f6355c8c85083b1 100644 (file)
@@ -37,18 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Addarc adds an arc from FSA state <from> to state <to> setting other
    fields as indicated by the other parameters.*/
-#if defined(M_PROTO)
 int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, int id, LOGICAL minim, ELTSTRUCT **errelt)
-#else
-int addarc(from, to, label, and, optional, id, minim, errelt)
-  STATE *from, *to ;
-  ELTSTRUCT *label ;
-  ANDGROUP *and ;
-  LOGICAL optional ;
-  int id ;
-  LOGICAL minim ;
-  ELTSTRUCT **errelt ;
-#endif
   {
     ARC *parc, *qarc ;
     int determ ;
@@ -69,11 +58,8 @@ int addarc(from, to, label, and, optional, id, minim, errelt)
 
 /*checkand is used to verify nondeterminism from start and final states
   of FSA's generated from and groups*/
-void checkand(andstart, andptr, start, root, errelt)
-  ANDGROUP *andstart, *andptr ;
-  STATE *start ;
-  TREE *root ;
-  ELTSTRUCT **errelt ;    
+void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start,
+              TREE *root, ELTSTRUCT **errelt)
   {
     ARC *parc ;
     ANDGROUP *pand ;
@@ -97,12 +83,8 @@ void checkand(andstart, andptr, start, root, errelt)
 /*Checkdfsa is called when adding an arc to an FSA in order to verify that
 no existing arc from the same state (or from a start state of an and-group
 FSA labelling an arc from the same state) has the same label. */
-int checkdfsa(from, label, and, id, errelt)
-  STATE *from ;
-  ELTSTRUCT *label ;
-  ANDGROUP *and ;
-  int id ;
-  ELTSTRUCT **errelt ;
+int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id,
+              ELTSTRUCT **errelt)
   {
     int c ;
     ARC *parc ;
@@ -127,10 +109,7 @@ int checkdfsa(from, label, and, id, errelt)
     }
 
 /* Check use of repeated models with and groups */
-int checkrepeat(from, and, errelt)
-  STATE *from ;
-  ANDGROUP *and ;
-  ELTSTRUCT **errelt ;
+int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt)
   {
     ARC *parc ;
     int c ;
@@ -153,8 +132,7 @@ int checkrepeat(from, and, errelt)
     }
 
 /* Copyintolist copies one list of states into another */
-void copyintolist(from, to)
-  STATELIST *from, **to ;
+void copyintolist(STATELIST *from, STATELIST **to)
   {
     STATELIST **new, *old ;
 
@@ -172,8 +150,7 @@ void copyintolist(from, to)
     }
 
 /* Dellist deletes a list of states */
-void dellist(list)
-  STATELIST **list ;
+void dellist(STATELIST **list)
   {
     STATELIST *p, *q ;
 
@@ -187,7 +164,7 @@ void dellist(list)
 
 /* Delstartarcs deletes the contents of the starta list of arcs from start
    states of a submodel */
-void delstartarcs(M_NOPAR)
+void delstartarcs(void)
   {
     ARC *arcptr ;
     ARC *discard ;
@@ -201,7 +178,7 @@ void delstartarcs(M_NOPAR)
     }
 
 /* Getand allocates and initializes a new andgroup structure */
-ANDGROUP *getand(M_NOPAR)
+ANDGROUP *getand(void)
   {
     ANDGROUP *new ;
 
@@ -214,7 +191,7 @@ ANDGROUP *getand(M_NOPAR)
     }    
 
 /* Getstate obtains an FSA state */
-STATE *getstate(M_NOPAR)
+STATE *getstate(void)
   {
     STATE *new ;
 
@@ -231,10 +208,7 @@ STATE *getstate(M_NOPAR)
     }
 
 /* Makeand processes a submodel whose connector is & */
-void makeand(canbenull, root, optional)
-  LOGICAL *canbenull ;
-  TREE *root ;
-  int optional ;
+void makeand(LOGICAL *canbenull, TREE *root, int optional)
   {
     TREE *child ;
     STATELIST *start, *final ;
@@ -319,9 +293,7 @@ void makeand(canbenull, root, optional)
    allfinal is passed from model to submodel; information in newfinal
    goes from submodel to model.
    */
-LOGICAL makefsa(root, optional)
-  TREE *root ;
-  int optional ;
+LOGICAL makefsa(TREE *root, int optional)
   {
     LOGICAL canbenull ;
 
@@ -355,9 +327,7 @@ LOGICAL makefsa(root, optional)
     }
 
 /* Makeor processes a submodel whose connector is | */
-void makeor(canbenull, root)
-  LOGICAL *canbenull ;
-  TREE *root ;
+void makeor(LOGICAL *canbenull, TREE *root)
   {
     TREE *child ;
     STATELIST *final ;
@@ -379,10 +349,7 @@ void makeor(canbenull, root)
     }
 
 /* Makeseq processes a submodel whose connector is , */
-void makeseq(canbenull, root, optional)
-  LOGICAL *canbenull ;
-  TREE *root ;
-  int optional ;
+void makeseq(LOGICAL *canbenull, TREE *root, int optional)
   {
     LOGICAL branchnull ;
     STATELIST *keepfinal = NULL, *final ;
@@ -420,10 +387,7 @@ void makeseq(canbenull, root, optional)
 
 /* Nondeterm issues a diagnostic when a nondeterministic model is
    encountered */
-void nondeterm(root, c, eltp)
-  TREE *root ;
-  int c ;
-  ELTSTRUCT *eltp ;
+void nondeterm(TREE *root, int c, ELTSTRUCT *eltp)
   {
   M_WCHAR *wtemp;
 
@@ -454,8 +418,7 @@ void nondeterm(root, c, eltp)
 
 /* Notinlist returns TRUE iff item is not in list.  If item is in list,
    it makes sure that the stored nesting level is the smaller of the two */
-LOGICAL notinlist(item, list)
-  STATELIST *item, *list ;
+LOGICAL notinlist(STATELIST *item, STATELIST *list)
   {
     for ( ; list ; list = list->next)
       if (list->value == item->value) {
@@ -467,8 +430,7 @@ LOGICAL notinlist(item, list)
 
 /* Returns true if the arc is labeled #PCDATA or with an and-group that
    has an arc labelled #PCDATA from a start state */
-LOGICAL permitspcd(a)
-  ARC *a ;
+LOGICAL permitspcd(ARC *a)
   {
     ANDGROUP *pand ;
     ARC *b ;
@@ -488,7 +450,7 @@ LOGICAL permitspcd(a)
 
 /* Pop pops the submodel stack when the end of the current submodel is
    encountered */
-void pop(M_NOPAR)
+void pop(void)
   {
     STACK *discard ;
 
@@ -504,7 +466,7 @@ void pop(M_NOPAR)
     }
 
 /* Push pushes the submodel stack when a new group is encountered */
-void push(M_NOPAR)
+void push(void)
   {
     STACK *new ;
 
@@ -518,8 +480,7 @@ void push(M_NOPAR)
 
 /* Regenerate is used in error processing to print the portion of a grammar
    rule preceding an error */
-LOGICAL regenerate(start, stop)
-TREE *start, *stop ;
+LOGICAL regenerate(TREE *start, TREE *stop)
 {
 TREE *child ;
 
@@ -565,8 +526,7 @@ return(FALSE) ;
    by adding arcs from all the final states to all the states reachable
    in one transition from a start state, labelling them as arcs from
    start states are labelled. */
-void repeat(root)
-  TREE *root ;
+void repeat(TREE *root)
   {
     STATELIST *final ;
     ARC *a ;
@@ -617,9 +577,7 @@ void repeat(root)
 
 /* Used during processing of occurrence indicators in content models such
    as (a+)+ to prohibit duplicate arcs */
-LOGICAL samelabelarc(a, s)
-  ARC *a ;
-  STATE *s ;
+LOGICAL samelabelarc(ARC *a, STATE *s)
   {
     ARC *b ;
 
@@ -630,12 +588,7 @@ LOGICAL samelabelarc(a, s)
 
 /* Saves the name of an element appearing on the left-hand side of a
    grammar rule */
-#if defined(M_PROTO)
 void savelhs(LOGICAL param)
-#else
-void savelhs(param)
-  LOGICAL param ;
-#endif
   {
     STATE *end ;
     ELTSTRUCT *errelt ;
@@ -663,7 +616,7 @@ void savelhs(param)
 /* Called when arcs are added to the start state of a submodel that is
    also a start state of the parent model to set the parent model's
    starta list */
-void savestartarcs(M_NOPAR)
+void savestartarcs(void)
   {
     ARC *carcptr, *parcptr ;
 
@@ -682,11 +635,8 @@ void savestartarcs(M_NOPAR)
 
 /* Simplebranch adds a new state and transition to it in an FSA when a
    submodel consists of a single element or of an and group */
-void simplebranch(root, value, group, optional)
-  TREE *root ;
-  ELTSTRUCT *value ;
-  ANDGROUP *group ;
-  int optional ;
+void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group,
+                  int optional)
   {
     STATE *new = NULL ;
     STATELIST *index ;
@@ -734,9 +684,7 @@ void simplebranch(root, value, group, optional)
    subtree in the tree representing the grammar rule being processed and
    the pointer to a flag that is set to indicate whether or not the
    submodel can be null. */
-STATE *startfsa(root, canbenull)
-  TREE *root ;
-  LOGICAL *canbenull ;
+STATE *startfsa(TREE *root, LOGICAL *canbenull)
   {
     STATELIST *item ;
     STATE *first ;
index 83f418dddb60ebb94fd8f20b9d4b7b16a8ff475e..839940f17ae62b16f825798e8a6e735e1eb43a49 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "context.h"
 #include "build.h"
 #include "delim.h"
@@ -72,8 +69,7 @@ char mrequired[] = "M_REQUIRED" ;
 
 /* Deftype returns a string indicating the default type of the nth parameter.
    */
-char *deftype(n)
-  int n ;
+char *deftype(int n)
   {
     switch (n) {
       case NAME: return(mnamedef) ;
@@ -87,7 +83,7 @@ char *deftype(n)
     }
 
 /* Called after all input is read to generate output */
-void done(M_NOPAR)
+void done(void)
   {
 
     if (! eltree.data) {
@@ -104,9 +100,7 @@ void done(M_NOPAR)
     }
 
 /* Prints data value of an entry in the element name tree */
-void dumpentnode(file, value)
-  FILE *file ;
-  M_TRIE *value ;
+void dumpentnode(FILE *file, M_TRIE *value)
   {
 
     fprintf(file, ", %d", ((ELTSTRUCT *) value)->eltno) ;
@@ -114,9 +108,7 @@ void dumpentnode(file, value)
 
 /* Prints data value of an entry in the trie of short reference map names,
    reporting any maps that are referenced but not defined */
-void dumpmapnode(file, value)
-  FILE *file ;
-  M_TRIE *value ;
+void dumpmapnode(FILE *file, M_TRIE *value)
   {
     fprintf(file, ", %d", ((MAP *) value)->map) ;
     if (! ((MAP *) value)->defined)
@@ -126,9 +118,7 @@ void dumpmapnode(file, value)
 
 
 /* Prints data value of an entry in the trie of short reference delimiters */
-void dumpsrefnode(file, value)
-  FILE *file ;
-  M_TRIE *value ;
+void dumpsrefnode(FILE *file, M_TRIE *value)
   {
     fprintf(file, ", %d", ((SREFSTRUCT *) value)->srefcnt) ;
     }
@@ -136,8 +126,7 @@ void dumpsrefnode(file, value)
 
 /* Controls printing of element blocks in alphabetical order to the
    template file */
-void eltblocks(tempfile)
-  FILE *tempfile ;
+void eltblocks(FILE *tempfile)
   {
     int n ;
     M_TRIE *node[M_NAMELEN + 1] ;
@@ -167,7 +156,7 @@ void eltblocks(tempfile)
 
 
 /* Writes data about elements */
-void eltreeout(M_NOPAR)
+void eltreeout(void)
   {
     M_WCHAR *p ;
     int enameindex = 0 ;
@@ -226,8 +215,7 @@ void eltreeout(M_NOPAR)
     }
 
 /* Enttype returns a string indicating the type of an entity */
-char *enttype(n)
-  int n ;
+char *enttype(int n)
   {
     switch(n) {
       case M_GENERAL: return(mgeneral) ;
@@ -245,7 +233,7 @@ char *enttype(n)
     }
 
 /* Outputs exception lists */
-void exout(M_NOPAR)
+void exout(void)
   {
     EXCEPTION *ex ;
     int exindex = 0 ;
@@ -268,7 +256,7 @@ void exout(M_NOPAR)
     }
 
 /* Outputs FSA definitions */
-void fsa(M_NOPAR)
+void fsa(void)
   {
     int arcount = 0 ;
     STATE *pstate ;
@@ -331,7 +319,7 @@ void fsa(M_NOPAR)
     }
 
 /* Writes data about parameters */
-void parout(M_NOPAR)
+void parout(void)
 {
 PARAMETER *paramp ;
 LOGICAL first = TRUE ;
@@ -455,8 +443,7 @@ fprintf(dtd, "#define M_MAXPAR %d\n\n", maxpar) ;
 }
 
 /* Partype returns a string indicating the type of the nth parameter. */
-char *partype(n)
-  int n ;
+char *partype(int n)
   {
     switch(n) {
       case GRPO: return(mkeyword) ;
@@ -480,7 +467,7 @@ char *partype(n)
     }
 
 /* Write short reference information */
-void srefout(M_NOPAR)
+void srefout(void)
   {
     LOGICAL first = TRUE ;
     int *mapbysref = NULL ;
@@ -549,9 +536,7 @@ void srefout(M_NOPAR)
     }
 
 /* Output one element block in a template */
-void tempelt(eltp, tempfile)
-ELTSTRUCT *eltp ;
-FILE *tempfile ;
+void tempelt(ELTSTRUCT *eltp, FILE *tempfile)
 {
 PARAMETER *paramp ;
 PTYPE *ptypep ;
@@ -630,7 +615,7 @@ fputs("  <END-STRING></END-STRING>\n", tempfile) ;
 }
 
 /* Write template */
-void template(M_NOPAR)
+void template(void)
   {
     FILE *tempfile ;
     M_ENTITY *ent ;
@@ -657,8 +642,7 @@ void template(M_NOPAR)
     }
 
 /* Typecon returns a string indicating the content type of the nth element.*/
-char *typecon(n)
-  int n ;
+char *typecon(int n)
   {
     switch(n) {
       case GRPO: return(mregexp) ;
index b6b8e459304c31f22e23646a832d7c4a027e8d96..8d73b5314194897aeba168a1cb8901610c74c9dd 100644 (file)
@@ -38,7 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Add a keyword to the list of possible values of a keyword parameter for
    the current element
 */
-void addkeyword(M_NOPAR)
+void addkeyword(void)
 {
 int length ;
 PARAMETER *par ;
@@ -87,7 +87,7 @@ ptypelen++ ;
 }
 
 /* Add a parameter to the current element */
-void addpar(M_NOPAR)
+void addpar(void)
 {
 PARAMETER *paramp, *last = NULL ;
 int length ;
@@ -124,12 +124,7 @@ newpar->ptypep = NULL ;
 
 
 /* Check that specified default value is legal parameter value */
-#if defined(M_PROTO)
 LOGICAL checkdefault( const M_WCHAR *string )
-#else
-LOGICAL checkdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 const M_WCHAR *p ;
 int len ;
@@ -205,12 +200,7 @@ switch (newpar->type)
 
 /* Normalize parameter default.  Change tabs and RE's to spaces, capitalize
    all letters (unless type is CDATA), remove extra space in lists */
-#if defined(M_PROTO)
 void normdefault(M_WCHAR *string )
-#else
-void normdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 M_WCHAR *p, *q ;
 int i, ret ;
@@ -273,7 +263,7 @@ switch (newpar->type)
 }
 
 /* Called at end of parameter attribute list rule */
-void prulend(M_NOPAR)
+void prulend(void)
 {
 LHS *lhsp ;
 LHS *discard ;
@@ -296,12 +286,7 @@ ruleinit() ;
 }
 
 /* Make string the default for the current parameter of the current element */
-#if defined(M_PROTO)
 void setdefault(const M_WCHAR *string)
-#else
-void setdefault()
-M_WCHAR *string;
-#endif /* M_PROTO */
 {
 PTYPE *kw ;
 int keycount ;
index f86bef3e2e252753c4ae0a78ab473374a14f341d..f9a4a9091f0e601e0da9b15ad74210743ce29ff1 100644 (file)
 /* Proto.h contains function prototypes for program BUILD. */
 
 
-int addarc(
-#if defined(M_PROTO)
-  STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, 
-  int id, LOGICAL minim, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-void adddefent(
-#if defined(M_PROTO)
-  M_WCHAR *mapname
-#endif
-  ) ;
-
-LOGICAL addent(
-#if defined(M_PROTO)
-  M_WCHAR *name
-#endif
-  ) ;
-
-void addex(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void addkeyword(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL addmapname(
-#if defined(M_PROTO)
-  M_WCHAR *p, LOGICAL define
-#endif
-  ) ;
-
-void addndent(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void addpar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void addsref(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void checkand(
-#if defined(M_PROTO)
-  ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root, 
-  ELTSTRUCT **errelt
-#endif
-  ) ;
-
-LOGICAL checkdefault(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-int checkdfsa(
-#if defined(M_PROTO)
-  STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-int checkrepeat(
-#if defined(M_PROTO)
-  STATE *from, ANDGROUP *and, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-void copyintolist(
-#if defined(M_PROTO)
-  STATELIST *from, STATELIST **to
-#endif
-  ) ;
-
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
-
-void defmapname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *deftype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void dellist(
-#if defined(M_PROTO)
-  STATELIST **list
-#endif
-  ) ;
-
-void delstartarcs(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void dumpentnode(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
-
-void dumpmapnode(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
-
-void dumpsrefnode(
-#if defined(M_PROTO)
-  FILE *file,
-  M_TRIE *value
-#endif
-  ) ;
-
-void dumpptrie(
-#if defined(M_PROTO)
-  M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
-  void (*proc)( FILE *, M_TRIE *)
-#endif
-  ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE   *file,
+int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, 
+  int id, LOGICAL minim, ELTSTRUCT **errelt);
+
+void adddefent(M_WCHAR *mapname);
+
+LOGICAL addent(M_WCHAR *name);
+
+void addex(void);
+
+void addkeyword(void);
+
+LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
+
+void addndent(M_WCHAR *p);
+
+void addpar(void);
+
+void addsref(M_WCHAR *p);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root, 
+  ELTSTRUCT **errelt);
+
+LOGICAL checkdefault(const M_WCHAR *string);
+
+int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
+
+int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
+
+void copyintolist(STATELIST *from, STATELIST **to);
+
+void countdown(M_TRIE *parent, int *count);
+
+void defmapname(void);
+
+char *deftype(int n);
+
+void dellist(STATELIST **list);
+
+void delstartarcs(void);
+
+void done(void);
+
+void dumpentnode(FILE *file, M_TRIE *value);
+
+void dumpmapnode(FILE *file, M_TRIE *value);
+
+void dumpsrefnode(FILE *file,
+  M_TRIE *value);
+
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+  void (*proc)( FILE *, M_TRIE *));
+
+void m_dumptrie(FILE   *file,
   M_TRIE *xtrie,
   char   *extname,
   int    *count,
-  void  (*proc)(M_ENTITY *)
-#endif
-  ) ;
-
-void eltblocks(
-#if defined(M_PROTO)
-  FILE *tempfile
-#endif
-  ) ;
-
-void eltreeout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endmodel(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void entout(
-#if defined(M_PROTO)
-  char *fname
-#endif
-  ) ;
-
-char *enttype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void exout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void freetree(
-#if defined(M_PROTO)
-  TREE *ruletree
-#endif
-  ) ;
-
-void found(
-#if defined(M_PROTO)
-  LOGICAL *flag, char *delim
-#endif
-  ) ;
-
-void fsa(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int getachar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-ANDGROUP *getand(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL getname(
-#if defined(M_PROTO)
-  int first
-#endif
-  ) ;
-
-STATE *getstate(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int gettoken(
-#if defined(M_PROTO)
-  int *c, int context
-#endif
-  ) ;
-
-TREE *gettreenode(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void makeand(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root, int optional
-#endif
-  ) ;
-
-LOGICAL makefsa(
-#if defined(M_PROTO)
-  TREE *root, int optional
-#endif
-  ) ;
-
-void makeor(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root
-#endif
-  ) ;
-
-void makeseq(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root, int optional
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void msgline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void msg1line(
-#if defined(M_PROTO)
-  char *text, char *arg1
-#endif
-  ) ;
-
-void nondeterm(
-#if defined(M_PROTO)
-  TREE *root, int c, ELTSTRUCT *eltp
-#endif
-  ) ;
-
-void normdefault(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL notinlist(
-#if defined(M_PROTO)
-  STATELIST *item, STATELIST *list
-#endif
-  ) ;
-
-ELTSTRUCT *ntrelt(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void parout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *partype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-LOGICAL permitspcd(
-#if defined(M_PROTO)
-  ARC *a
-#endif
-  ) ;
-
-void pop(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void prulend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void push(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL regenerate(
-#if defined(M_PROTO)
-  TREE *start, TREE *stop
-#endif
-  ) ;
-
-void repeat(
-#if defined(M_PROTO)
-  TREE *root
-#endif
-  ) ;
-
-void ruleinit(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void rulend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL samelabelarc(
-#if defined(M_PROTO)
-  ARC *a, STATE *s
-#endif
-  ) ;
-
-void savelhs(
-#if defined(M_PROTO)
-  LOGICAL param
-#endif
-  ) ;
-
-void savestartarcs(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int scan(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void setdefault(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void simplebranch(
-#if defined(M_PROTO)
-  TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_sprscon(
-#if defined(M_PROTO)
-  int i, int j
-#endif
-  ) ;
-
-void srefout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-STATE *startfsa(
-#if defined(M_PROTO)
-  TREE *root, LOGICAL *canbenull
-#endif
-  ) ;
-
-void tempelt(
-#if defined(M_PROTO)
-  ELTSTRUCT *eltp, FILE *tempfile
-#endif
-  ) ;
-
-void template(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *typecon(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim
-#endif
-  ) ;
-
-void ungetachar(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-void warning2(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2
-#endif
-  ) ;
-
-void warning3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void warning4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+  void  (*proc)(M_ENTITY *));
+
+void eltblocks(FILE *tempfile);
+
+void eltreeout(void);
+
+void endmodel(void);
+
+void entout(char *fname);
+
+char *enttype(int n);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void exout(void);
+
+void m_free(void *block, char *msg);
+
+void freetree(TREE *ruletree);
+
+void found(LOGICAL *flag, char *delim);
+
+void fsa(void);
+
+int getachar(void);
+
+ANDGROUP *getand(void);
+
+LOGICAL getname(int first);
+
+STATE *getstate(void);
+
+int gettoken(int *c, int context);
+
+TREE *gettreenode(void);
+
+void m_initctype(void);
+
+void initialize(void);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void makeand(LOGICAL *canbenull, TREE *root, int optional);
+
+LOGICAL makefsa(TREE *root, int optional);
+
+void makeor(LOGICAL *canbenull, TREE *root);
+
+void makeseq(LOGICAL *canbenull, TREE *root, int optional);
+
+void *m_malloc(int size, char *msg);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
+
+void normdefault(M_WCHAR *string);
+
+LOGICAL notinlist(STATELIST *item, STATELIST *list);
+
+ELTSTRUCT *ntrelt(M_WCHAR *p);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void parout(void);
+
+char *partype(int n);
+
+LOGICAL permitspcd(ARC *a);
+
+void pop(void);
+
+void prulend(void);
+
+void push(void);
+
+LOGICAL regenerate(TREE *start, TREE *stop);
+
+void repeat(TREE *root);
+
+void ruleinit(void);
+
+void rulend(void);
+
+LOGICAL samelabelarc(ARC *a, STATE *s);
+
+void savelhs(LOGICAL param);
+
+void savestartarcs(void);
+
+int scan(void);
+
+void setdefault(const M_WCHAR *string);
+
+void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
+
+void skiptoend(void);
+
+int m_sprscon(int i, int j);
+
+void srefout(void);
+
+STATE *startfsa(TREE *root, LOGICAL *canbenull);
+
+void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
+
+void template(void);
+
+char *typecon(int n);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index dc29de3d5949eb21d9a6d53e3d612d040f12b33b..b2fa330d1792ca6d9efee71d2388f32f98e2d9c3 100644 (file)
@@ -30,9 +30,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Scan.c contains scanner procedures for program BUILD */
 
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "build.h"
 #define M_CONDEF
 #include "context.h"
@@ -41,8 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "sref.h"
 
 /* Reads a name */
-LOGICAL getname(first)
-  int first;
+LOGICAL getname(int first)
 {
 M_WCHAR *p;
 int c;
@@ -74,7 +70,7 @@ return(TRUE);
 }
 
 /* Returns the next token to the main procedure */
-int scan(M_NOPAR)
+int scan(void)
 {
 int c;
 int n;
index d8d45cc4022155a6ff0ba3133a8c7235a49f5570..9277b9d31553644fb82f36ff1530f076a17ba4fe 100644 (file)
@@ -36,8 +36,7 @@ static M_WCHAR *wc_prefix = NULL;
 /* Add an entity with the default name constructed by adding a suffix
    to the name of the short reference map in which it is invoked, and
    a prefix m- */
-void adddefent(mapname)
-M_WCHAR *mapname;
+void adddefent(M_WCHAR *mapname)
 {
 M_WCHAR *p;
 int n;
@@ -75,8 +74,7 @@ thissref->entidx = entity->index;
 
 /* Add an entity, return FALSE if already there, TRUE if adding it.
    Pointer to the entity structure is in global M_STRUCT *entity. */
-LOGICAL addent(name)
-M_WCHAR *name;
+LOGICAL addent(M_WCHAR *name)
 {
 M_ENTITY *new;
 
@@ -101,13 +99,7 @@ return(TRUE);
 }
 
 /* Add a short reference map name */
-#if defined(M_PROTO)
 LOGICAL addmapname(M_WCHAR* p, LOGICAL define)
-#else
-LOGICAL addmapname(p, define)
-M_WCHAR *p;
-LOGICAL define;
-#endif
 {
 MAP *old;
 MAP *new;
@@ -134,16 +126,14 @@ return(TRUE);
 }
 
 /* Add a named entity to a short reference map */
-void addndent(p)
-M_WCHAR *p;
+void addndent(M_WCHAR *p)
 {
 addent(p);
 thissref->entidx = entity->index;
 }
 
 /* Add a short reference delimiter */
-void addsref(p)
-M_WCHAR *p;
+void addsref(M_WCHAR *p)
 {
 SREFSTRUCT *delim;
 SREFSTRUCT *prevsr;
@@ -198,7 +188,7 @@ delim->data = thissref;
 
 /* Prefix left-hand side with "M-" to create default short reference map
    name, truncating to M_NAMELEN characters if necessary */
-void defmapname(M_NOPAR)
+void defmapname(void)
 {
 if (!wc_prefix)
     {
index 09464f1043b35e652e3b42a5dcdec3975dd151f1..fa465b2e3a79b91fe7b681d603077dc1a4f6518e 100644 (file)
@@ -36,7 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Called after a right parenthesis is read while scanning a content model.
    Resets curcon if it is the outermost submodel. */
-void endmodel(M_NOPAR)
+void endmodel(void)
   {
     curtree = curtree->parent ;
     if (! curtree->parent) curcon = LASTM ;
@@ -44,8 +44,7 @@ void endmodel(M_NOPAR)
     }
 
 /* Release storage used for the tree representation of a rule */
-void freetree(treep)
-  TREE *treep ;
+void freetree(TREE *treep)
   {
     TREE *child, *discard ;
 
@@ -58,7 +57,7 @@ void freetree(treep)
     }
 
 /* Gettreenode obtains a node to use in the tree representation of a rule */
-TREE *gettreenode(M_NOPAR)
+TREE *gettreenode(void)
   {
     TREE *new ;
 
index 06b28ee25793f1397e2e59c13b59f1bb8f1fd671..99040b9dbb073c21bd35ff88fb2d4dfe68e6ae7e 100644 (file)
@@ -398,7 +398,7 @@ tagc
   postent:start
   codetagc:inentc {
             startcode(entity->codeindex, &inent, entfile,
-                      "c", nopar, nopar, "") ;
+                      "c", "void", "void", "") ;
             }
   close:preparam
   sschain:inss {
@@ -420,11 +420,11 @@ tagc
             }
   scchain:insc {
             *getaction(scarray) = ++sactions ;
-            startcode(sactions, &insc, sfile, "s", nopar, nopar, "") ;
+            startcode(sactions, &insc, sfile, "s", "void", "void", "") ;
             }
   ecchain:inec {
             *getaction(ecarray) = ++eactions ;
-            startcode(eactions, &inec, efile, "e", nopar, nopar, "") ;
+            startcode(eactions, &inec, efile, "e", "void", "void", "") ;
             }
   stcchain:instc {
             *getaction(stcarray) = ++stactions ;
index 45540d03d9e455670076e357da42e511355ec87b..cd8b38a02a514e564f876382ca6653fea0912031 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -49,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entity.h"
 
 /* Main program */
-int main(argc, argv)
-  int argc ;
-  char **argv ;
+int main(int argc, char **argv)
   {
     int m_token ;
 
index 430dcde7a2097f56f702e73965dd3e1af9893f73..85d1e68266171046777bf1e1c233f4fc8480ca83 100644 (file)
@@ -215,7 +215,6 @@ ELTEXTERN int restart ELTINIT(RENTITY) ;
 #define stproto "M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END"
 #define stformal "m_string, M_START, M_END"
 #define stft "  M_WCHAR *m_string ;\n  LOGICAL M_START ;\n  LOGICAL M_END ;\n"
-#define nopar "M_NOPAR"
 
 /* Structures for generating defines for parameter values */
 ELTEXTERN M_TRIE parval ;
index 12f7c57e07eafa5831d8cc381bbafb814e0e82c0..2dc28f05a88bdd45b3e7c184ecc91091ea1b31b5 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -49,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "version.h"
 
 /* Output indicated action pointer array to if.h */
-void actptrout(array, name)
-  ACTION **array;
-  char *name;
+void actptrout(ACTION **array, char *name)
   {
     int i;
 
@@ -66,23 +61,14 @@ void actptrout(array, name)
 
 
 /* Close a code file and write jump table at the end */
-#if defined(M_PROTO)
 void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto)
-#else
-void closeiffile(flag, file, count, table, proto)
-  LOGICAL flag;
-  FILE *file;
-  int count;
-  char *table;
-  char *proto;
-#endif
   {
     int i;
 
     endcode(flag, file);
     if (count) {
       fprintf(file,
-        "void (*m_%stable[])(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) = {\n",
+        "void (*m_%stable[])(%s) = {\n",
         table, proto);
       fprintf(file, "  m_%s1, /* Place holder for 1-based indexing */\n",
                     table);
@@ -94,14 +80,14 @@ void closeiffile(flag, file, count, table, proto)
       }
     else
       fprintf(file,
-        "void (*m_%stable[1])(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) ;\n",
+        "void (*m_%stable[1])(%s) ;\n",
         table, proto);
     fclose(file);
     }
 
 /* Called when the C identifier to be #define'd to a parameter value is
    scanned */
-void cvalue(M_NOPAR)
+void cvalue(void)
   {
     PARVAL *new;
 
@@ -120,18 +106,18 @@ void cvalue(M_NOPAR)
 
 /* Called after last input character is read to place closing punctuation
    at end of output files and close them */
-void done(M_NOPAR)
+void done(void)
   {
     M_ENTITY *ent;
     ACTION *actp;
     LOGICAL first;
     int i;
 
-    closeiffile(inent, entfile, codeent, "c", nopar);
+    closeiffile(inent, entfile, codeent, "c", "void");
     closeiffile(intext, tfile, tactions, "t", tproto);
     closeiffile(inpc, pfile, pactions, "p", pproto);
-    closeiffile(insc, sfile, sactions, "s", nopar);
-    closeiffile(inec, efile, eactions, "e", nopar);
+    closeiffile(insc, sfile, sactions, "s", "void");
+    closeiffile(inec, efile, eactions, "e", "void");
     closeiffile(instc, stfile, stactions, "st", stproto);
 
     endstring();
@@ -193,19 +179,13 @@ void done(M_NOPAR)
     }
 
 /* Called when finished reading a section of code from the input file */
-#if defined(M_PROTO)
 void endcode(LOGICAL flag, FILE *file)
-#else
-void endcode(flag, file)
-  LOGICAL flag;
-  FILE *file;
-#endif
   {
     if (flag) fprintf(file, "}}\n\n");
     }
 
 /* Called at the end of all initial fields in the interface definition */
-void endini(M_NOPAR)
+void endini(void)
   {
     if (finitext) 
       fputs("    putc(m_textchar, m_outfile);\n", tfile);
@@ -224,7 +204,7 @@ void endini(M_NOPAR)
 
 /* End the sign-on message */
 #include <time.h>
-void endsignon(M_NOPAR)
+void endsignon(void)
   {
     time_t storetime;
     char *p;
@@ -270,7 +250,7 @@ void endsignon(M_NOPAR)
     }
 
 /* Closes a start-string or end-string */
-void endstring(M_NOPAR)
+void endstring(void)
   {
     if (instring) {
       if (stringstart) stringstart = FALSE;
@@ -285,8 +265,7 @@ void endstring(M_NOPAR)
 
 /* Set the type of an entity and check if different than declaration in
    BUILD */
-void enttype(type)
-  int type;
+void enttype(int type)
   {
     if ((entity->type == M_PI && type == M_CODEPI) ||
         (entity->type == M_SDATA && type == M_CODESDATA));
@@ -297,7 +276,7 @@ void enttype(type)
     }
 
 /* Free storage used for a context-specification chain */
-void freechain(M_NOPAR)
+void freechain(void)
   {
     CHAIN *chainp, *dchainp;
 
@@ -312,8 +291,7 @@ void freechain(M_NOPAR)
 
 /* Returns pointer to data field in action node for current chain of
    elements */
-int *getaction(array)
-  ACTION **array;
+int *getaction(ACTION **array)
   {
     ACTION *start, *node;
     CHAIN *chainp;
@@ -348,7 +326,7 @@ int *getaction(array)
     }
 
 /* Allocate new action structure */
-ACTION *getactstruct(M_NOPAR)
+ACTION *getactstruct(void)
   {
     ACTION *new;
 
@@ -362,7 +340,7 @@ ACTION *getactstruct(M_NOPAR)
     }
 
 /* Program initialization */
-void initialize(M_NOPAR)
+void initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
@@ -426,13 +404,13 @@ fputs("#endif\n", ifh);
 
 startcode(pactions, &inpc, pfile, "p", pproto, pformal, pftype);
 startcode(tactions, &intext, tfile, "t", tproto, tformal, tftype);
-startcode(sactions, &insc, sfile, "s", nopar, nopar, "");
-startcode(eactions, &inec, efile, "e", nopar, nopar, "");
+startcode(sactions, &insc, sfile, "s", "void", "void", "");
+startcode(eactions, &inec, efile, "e", "void", "void", "");
 startcode(stactions, &instc, stfile, "st", stproto, stformal, stft);
 }
 
 /* Output definitions for strings */
-void outstring(M_NOPAR)
+void outstring(void)
   {
     int c;
 
@@ -449,8 +427,7 @@ void outstring(M_NOPAR)
     }
 
 /* Output #define's for parameter values */
-void outpval(p)
-M_TRIE *p;
+void outpval(M_TRIE *p)
 {
 M_WCHAR *q;
 
@@ -495,7 +472,7 @@ for ( ; p ; p = p->next)
 }
 
 /* Skip rest of statement after an error */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
   {
     int i;
     static int errlev = 0;
@@ -548,14 +525,8 @@ void skiptoend(M_NOPAR)
   }
 
 /* Starts processing a code segment from the input file */
-void startcode(caseno, flag, file, prefix, proto, formal, formtype)
-int caseno;
-LOGICAL *flag;
-FILE *file;
-char *prefix;
-char *proto;
-char *formal;
-char *formtype;
+void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix,
+               char *proto, char *formal, char *formtype)
 {
 CVARSTRUCT *cvarp;
 
@@ -563,21 +534,13 @@ endcode(*flag, file);
 *flag = TRUE;
 /* protoype */
 fprintf(file,
-       "void m_%s%d(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) ;\n",
+       "void m_%s%d(%s);\n",
        prefix,
        caseno,
        proto);
 
 /* ANSI defines */
-fputs("#if defined(M_PROTO)\n", file);
-fprintf(file, "void m_%s%d(%s)\n", prefix, caseno, proto);
-fputs("#else\n", file);
-fprintf(file,
-       "void m_%s%d(%s)\n%s\n#endif\n  {\n", /* balance the "}" */
-       prefix,
-       caseno,
-       formal,
-       formtype);
+fprintf(file, "void m_%s%d(%s)\n  {\n", prefix, caseno, proto);
 
 for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next)
     {
@@ -603,7 +566,7 @@ fprintf(file, "{\n/* line %d \"%s\" */\n", m_line, iffile); /* balance "}" */
 }
 
 /* Begins processing a new element */
-void startelement(M_NOPAR)
+void startelement(void)
   {
     CVARSTRUCT *cvarp;
     CVARSTRUCT *discard;
@@ -624,7 +587,7 @@ void startelement(M_NOPAR)
     }
 
 /* Stores the name of a C variable read from the input file */
-void storecvar(M_NOPAR)
+void storecvar(void)
   {
     CVARSTRUCT *new;
 
@@ -639,7 +602,7 @@ void storecvar(M_NOPAR)
 /* Compares the parameter name associated with a C variable in the input
    file with the names of all parameters of the current element.  Stores
    result for later output with code segments */
-void storepname(M_NOPAR)
+void storepname(void)
   {
     int i, par;
 
@@ -657,8 +620,7 @@ void storepname(M_NOPAR)
     }
 
 /* Called when a possible parameter value to be defined is encountered */
-void value(p)
-M_WCHAR *p;
+void value(M_WCHAR *p)
 {
 char buffer[5];
 
index 36dc9f147d9e3c89d296f3d612fc76eb2681f992..3cf253bcd7e9b3ef45552f1a43a09d9128bb9082 100644 (file)
@@ -35,7 +35,7 @@
 #include "entext.h"
 
 /* Add an entity */
-void addent(M_NOPAR)
+void addent(void)
   {
     M_ENTITY *new ;
 
index be5ad4716bb77a94e3565514fd7221793a390bad..e22c6e53e991b7cd8f6742496b1f25e67aec2e82 100644 (file)
 /* Proto.h contains function prototypes for program ELTDEF. */
 
 
-void actptrout(
-#if defined(M_PROTO)
-  ACTION **array, char *name
-#endif
-  ) ;
-
-void addent(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void closeiffile(
-#if defined(M_PROTO)
-  LOGICAL flag, FILE *file, int count, char *table, char *proto
-#endif
-  ) ;
-
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
-
-void cvalue(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-
-void done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE *file,
+void actptrout(ACTION **array, char *name);
+
+void addent(void);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
+
+void countdown(M_TRIE *parent, int *count);
+
+void cvalue(void);
+
+
+void done(void);
+
+void m_dumptrie(FILE *file,
   M_TRIE *xtrie,
   char *extname,
   int *count,
-  void (*proc)(M_ENTITY *)
-#endif
-  ) ;
-
-void endcode(
-#if defined(M_PROTO)
-  LOGICAL flag, FILE *file
-#endif
-  ) ;
-
-void endini(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endsignon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endstring(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void entout(
-#if defined(M_PROTO)
-  char *fname
-#endif
-  ) ;
-
-void enttype(
-#if defined(M_PROTO)
-  int type
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text,
-  M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5
-#endif
-  ) ;
-
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void freechain(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int getachar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int *getaction(
-#if defined(M_PROTO)
-  ACTION **array
-#endif
-  ) ;
-
-ACTION *getactstruct(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void getname(
-#if defined(M_PROTO)
-  int first
-#endif
-  ) ;
-
-int gettoken(
-#if defined(M_PROTO)
-  int *c, int context
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void outpval(
-#if defined(M_PROTO)
-  M_TRIE *p
-#endif
-  ) ;
-
-void outstring(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie, M_WCHAR *name
-#endif
-  ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-int scan(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void startcode(
-#if defined(M_PROTO)
-  int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
-  char *formal, char *formtype
-#endif
-  ) ;
-
-void startelement(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void storecvar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void storepname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim
-#endif
-  ) ;
-
-void ungetachar(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-void value(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+  void (*proc)(M_ENTITY *));
+
+void endcode(LOGICAL flag, FILE *file);
+
+void endini(void);
+
+void endsignon(void);
+
+void endstring(void);
+
+void entout(char *fname);
+
+void enttype(int type);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err5(char *text,
+  M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_exit(int status);
+
+void m_free(void *block, char *msg);
+
+void freechain(void);
+
+int getachar(void);
+
+int *getaction(ACTION **array);
+
+ACTION *getactstruct(void);
+
+void getname(int first);
+
+int gettoken(int *c, int context);
+
+void m_initctype(void);
+
+void initialize(void);
+
+LOGICAL m_letter(M_WCHAR c);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void outpval(M_TRIE *p);
+
+void outstring(void);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+int scan(void);
+
+void skiptoend(void);
+
+void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
+  char *formal, char *formtype);
+
+void startelement(void);
+
+void storecvar(void);
+
+void storepname(void);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void value(M_WCHAR *p);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index aecff9015c4bff23276a9015bdb6c25f2f99bcf9..18114fef9bf5708873f784b2f89b3810a9a8757b 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <stdio.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -46,8 +43,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "delim.h"
 
 /* Reads a name token */
-void getname(first)
-int first;
+void getname(int first)
 {
 M_WCHAR *p, wus;
 int c, cttype;
@@ -86,7 +82,7 @@ ungetachar(c);
 }
 
 /* Reads the next token and returns it to the main procedure */
-int scan(M_NOPAR)
+int scan(void)
 {
 int c;
 int n;
index c55624c6baa982e9bf2a32168cc7259ae3fb3f38..bf7515bdae3ed1b77b245f60e4ddcb0d8b15fb51 100644 (file)
@@ -32,19 +32,8 @@ Copyright (c) 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 #include <stdlib.h>
 
-
-#if defined(MSDOS)
-/* Standard startup code doesn't have room to load inherited environments
-   in some cases.  Since they're not used, don't bother.  (Using Microsoft
-   C compiler).  */
-void _setenvp(M_NOPAR);
-void _setenvp(){}
-#endif
-
 /* Write input file and line number for an error message */
-void m_dumpline(file, line)
-M_WCHAR *file;
-int line;
+void m_dumpline(M_WCHAR *file, int line)
 {
 char buffer[10];
 char *mbyte;
@@ -72,7 +61,7 @@ else
 }
 
 /* Write error message prefix */
-void m_eprefix(M_NOPAR)
+void m_eprefix(void)
 {
 m_errline("\n*****\n");
 m_dumpline(m_thisfile(), m_thisline());
@@ -80,8 +69,7 @@ m_errline(",\n");
 }
 
 /* Process error message text */
-void m_errline(p)
-char *p;
+void m_errline(char *p)
 {
 char c;
 
@@ -92,11 +80,8 @@ for ( ; *p ; p++)
     }
 }
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 /* Write error message suffix */
-void m_esuffix(M_NOPAR)
+void m_esuffix(void)
 {
 m_errline(":\n");
 m_lastchars();
@@ -108,8 +93,7 @@ if (++m_errcnt == m_errlim)
 }
 
 /* Exit procedure */
-void m_exit(status)
-int status;
+void m_exit(int status)
 {
 if (filefound)
     {
@@ -150,8 +134,7 @@ exit(0);
 }
 
 /* Get-char procedure */
-int m_getc(m_ptr)
-void *m_ptr;
+int m_getc(void *m_ptr)
 {
 int  c;
 M_WCHAR wc;
@@ -205,8 +188,7 @@ return((int) wc);
 }
 
 /* Open SYSTEM entity procedure */
-void *m_openent(entcontent)
-M_WCHAR *entcontent;
+void *m_openent(M_WCHAR *entcontent)
 {
 FILE *open;
 char *filename;
@@ -245,7 +227,7 @@ return(NULL);
 }
 
 /* Open input file */
-void *m_openfirst(M_NOPAR)
+void *m_openfirst(void)
 {
 FILE *first;
 char *input;
@@ -284,7 +266,7 @@ return((void *) first);
 }
 
 /* Set program options */
-void m_setoptions()
+void m_setoptions(void)
   {
     /* F option used for FILELIST (checking done in basename, which is
        called before this function is called) */
@@ -310,8 +292,7 @@ void m_setoptions()
 
 /* Process signon message text, stripping out MARKUP version number, so
    only one version number will appear */
-void m_signmsg(p)
-  char *p;
+void m_signmsg(char *p)
   {
     char *q;
     char *pCopy;
@@ -329,7 +310,7 @@ void m_signmsg(p)
 
 /* All entity declarations have been processed.  Can now check if .TEX
    file uptodate and open appropriate output file */
-void m_startdoc()
+void m_startdoc(void)
 {
 LOGICAL init = TRUE;
 unsigned char type;
@@ -370,16 +351,14 @@ else
 }
 
 /* Write debugging trace information */
-void m_trace(p)
-char *p;
+void m_trace(char *p)
 {
 if (tracetostd) fputs(p, stdout);
 else fputs(p, m_outfile);
 }
 
 
-void m_wctrace(p)
-M_WCHAR *p;
+void m_wctrace(M_WCHAR *p)
 {
 char *mb_p;
 
index 134d013f8a1f9247f443ef7cd40c0c7fbc2b66a3..c91ee0d083c01d3dab538118826a9c1bf846c8dc 100644 (file)
@@ -30,12 +30,7 @@ Copyright 1988, 1989, 1992 Hewlett-Packard Co.
 #include "userinc.h"
 #include "globdec.h"
 
-#if defined(M_PROTO)
 int vextextsize(const M_WCHAR *keyword)
-#else
-int vextextsize(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return NORMAL;
 
@@ -47,12 +42,7 @@ m_err1("Unexpected value for ex/vex textsize parameter: %s", keyword);
 return NORMAL;
 }
 
-#if defined(M_PROTO)
 int vgloss(const M_WCHAR *keyword)
-#else
-int vgloss(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return GLOSS;
 
@@ -63,12 +53,7 @@ m_err1("Unexpected value for gloss parameter: %s", keyword);
 return GLOSS;
 }
 
-#if defined(M_PROTO)
 int vcenter(const M_WCHAR *keyword)
-#else
-int vcenter(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return CENTER;
 
@@ -80,12 +65,7 @@ m_err1("Unexpected value for center parameter: %s", keyword);
 return CENTER;
 }
 
-#if defined(M_PROTO)
 int vnumber(const M_WCHAR *keyword)
-#else
-int vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return NONUMBER;
 
@@ -96,12 +76,7 @@ m_err1("Unexpected value for number parameter: %s", keyword);
 return NONUMBER;
 }
 
-#if defined(M_PROTO)
 LOGICAL vstack(const M_WCHAR *keyword)
-#else
-LOGICAL vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return FALSE;
 
@@ -112,12 +87,7 @@ m_err1("Unexpected value for number parameter: %s", keyword);
 return FALSE;
 }
 
-#if defined(M_PROTO)
 int vordertype(const M_WCHAR *keyword)
-#else
-int vordertype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return ARABIC;
 
@@ -131,12 +101,7 @@ m_err1("Unexpected list order type: %s", keyword);
 return ARABIC;
 }
 
-#if defined(M_PROTO)
 int vspacing(const M_WCHAR *keyword)
-#else
-int vspacing(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return LOOSE;
 
@@ -147,12 +112,7 @@ m_err1("Unexpected value for spacing parameter: %s", keyword);
 return LOOSE;
 }
 
-#if defined(M_PROTO)
 int vlonglabel(const M_WCHAR *keyword)
-#else
-int vlonglabel(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return WRAP;
 
@@ -163,12 +123,7 @@ m_err1("Unexpected value for longlabel parameter: %s", keyword);
 return WRAP;
 }
 
-#if defined(M_PROTO)
 int vtype(const M_WCHAR *keyword)
-#else
-int vtype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return BULLET;
 
index d02b446a3820fda725da849bb5fb9c1e3789303d..a5970c16dc1d6a141136b9e6b1cde94f899624f5 100644 (file)
 /* Copyright (c) 1988, 1989, 1990 Hewlett-Packard Co. */
 /* Function prototypes for HP Tag/TeX translator */
 
-void assert_hometopic_exists(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void assert_hometopic_exists(void);
 
 /* osf has basename() defined in system header file, change
  * basename() to fbasename(). --XPG4 standard.
  */
-void fbasename(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void chapstart(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
-
-void checkgloss(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *checkid(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
-
-void checkmsghead (
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void dumpxref(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void echohead(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void mb_echohead(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void endhead(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void esoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-void vexoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-void exoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-void imoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-int getqualified (
-#if defined(M_PROTO)
-  M_WCHAR *qualname, M_WCHAR *unqualname
-#endif
-  ) ;
-
-void handle_link_and_graphic(
-#if defined(M_PROTO)
-  M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
-  M_WCHAR *glinktype, M_WCHAR *gdescription
-#endif
-  );                        
-
-void idstring(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-void indexchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-void Item(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
-
-char *m_itoa(
-#if defined(M_PROTO)
-  int n, char *s
-#endif
-  ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
-void loadxref(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-void options(
-#if defined(M_PROTO)
-  LOGICAL filelenonly
-#endif
-  ) ;
-
-void outchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile 
-#endif
-  ) ;
-
-void outpi(
-#if defined(M_PROTO)
-  int enttype, M_WCHAR *pi, M_WCHAR *entname
-#endif
-  ) ;
-
-void realoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile
-#endif
-  ) ;
-
-void rsectstart(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
-
-void rseqend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *searchforfile(
-#if defined(M_PROTO)
-  M_WCHAR *file
-#endif
-  ) ;
-
-void setid(
-#if defined(M_PROTO)
-  M_WCHAR *id,
+void fbasename(void);
+
+void chapstart(M_WCHAR *id);
+
+void checkgloss(void);
+
+M_WCHAR *checkid(M_WCHAR *id);
+
+void checkmsghead (void);
+
+void dumpxref(void);
+
+void echohead(M_WCHAR *p);
+
+void mb_echohead(char *p);
+
+void endhead(void);
+
+void esoutchar(M_WCHAR textchar);
+
+void vexoutchar(M_WCHAR textchar);
+
+void exoutchar(M_WCHAR textchar);
+
+void imoutchar(M_WCHAR textchar);
+
+int getqualified (M_WCHAR *qualname, M_WCHAR *unqualname);
+
+void handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
+  M_WCHAR *glinktype, M_WCHAR *gdescription);
+
+void idstring(M_WCHAR *string);
+
+void indexchar(M_WCHAR textchar);
+
+void Item(M_WCHAR *id);
+
+char *m_itoa(int n, char *s);
+
+LOGICAL m_letter(M_WCHAR c);
+
+void loadxref(void);
+
+int m_lower(int c);
+
+void options(LOGICAL filelenonly);
+
+void outchar(M_WCHAR textchar, FILE *outfile );
+
+void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname);
+
+void realoutchar(M_WCHAR textchar, FILE *outfile);
+
+void rsectstart(M_WCHAR *id);
+
+void rseqend(void);
+
+M_WCHAR *searchforfile(M_WCHAR *file);
+
+void setid(M_WCHAR *id,
   LOGICAL where,
   LOGICAL csensitive,
   LOGICAL inchapter,
   char *chapter,
   M_WCHAR *xrffile,
   int xrfline,
-  LOGICAL xrefable        
-#endif
-  ) ;
-
-void setopt(
-#if defined(M_PROTO)
-  char *string, LOGICAL filelenonly
-#endif
-  ) ;
-
-LOGICAL setvalopt(
-#if defined(M_PROTO)
-  int thisopt, char *string, LOGICAL filelenonly
-#endif
-  ) ;
-
-void shchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar,
+  LOGICAL xrefable        );
+
+void setopt(char *string, LOGICAL filelenonly);
+
+LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly);
+
+void shchar(M_WCHAR textchar,
   int *len,
   int max,
   M_WCHAR *string,
   void (*proc)(M_WCHAR *string),
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void mb_shchar(
-#if defined(M_PROTO)
-  char textchar,
+void mb_shchar(char textchar,
   int *len,
   int max,
   M_WCHAR *string,
   void (*proc)(M_WCHAR *string),
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void shstring(
-#if defined(M_PROTO)
-  M_WCHAR *addstring,
+void shstring(M_WCHAR *addstring,
   int *len,
   int max,
   M_WCHAR *storestring,
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void mb_shstring(
-#if defined(M_PROTO)
-  char *addstring,
+void mb_shstring(char *addstring,
   int *len,
   int max,
   M_WCHAR *storestring,
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void starthelpnode(
-#if defined(M_PROTO)
-  M_WCHAR *ssi,
+void starthelpnode(M_WCHAR *ssi,
   M_WCHAR *id,
-  int      level
-#endif
-  ) ;
+  int      level);
 
-void mb_starthelpnode(
-#if defined(M_PROTO)
-  char    *ssi,
+void mb_starthelpnode(char    *ssi,
   char    *id,
-  int      level
-#endif
-  ) ;
-
-void StartLabList(
-#if defined(M_PROTO)
-  M_WCHAR *spacing,
-  M_WCHAR *longlabel
-#endif
-  ) ;
-
-void StartList(
-#if defined(M_PROTO)
-  M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont
-#endif
-  ) ;
-
-void EndList(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void strcode(
-#if defined(M_PROTO)
-  M_WCHAR *string, FILE *outfile
-#endif
-  ) ;
-
-void mb_strcode(
-#if defined(M_PROTO)
-  char *string, FILE *outfile
-#endif
-  ) ;
-
-char *strstr(
-#if defined(M_PROTO)
-  const char *s1, const char *s2
-#endif
-  ) ;
-
-void svhdstring(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-void svtcstring(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-void termchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-void termpi(
-#if defined(M_PROTO)
-  int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname
-#endif
-  ) ;
-
-void texinit(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int vextextsize(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vgloss(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vcenter(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vnumber(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-LOGICAL vstack(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vordertype(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vlonglabel(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vspacing(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vtype(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-void xrefexpand(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
-
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-char *GetDefaultHeaderString(
-#if defined(M_PROTO)
-  char          *elementName,
+  int      level);
+
+void StartLabList(M_WCHAR *spacing,
+  M_WCHAR *longlabel);
+
+void StartList(M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont);
+
+void EndList(void);
+
+void strcode(M_WCHAR *string, FILE *outfile);
+
+void mb_strcode(char *string, FILE *outfile);
+
+char *strstr(const char *s1, const char *s2);
+
+void svhdstring(M_WCHAR *string);
+
+void svtcstring(M_WCHAR *string);
+
+void termchar(M_WCHAR textchar);
+
+void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname);
+
+void texinit(void);
+
+int vextextsize(const M_WCHAR *keyword);
+
+int vgloss(const M_WCHAR *keyword);
+
+int vcenter(const M_WCHAR *keyword);
+
+int vnumber(const M_WCHAR *keyword);
+
+LOGICAL vstack(const M_WCHAR *keyword);
+
+int vordertype(const M_WCHAR *keyword);
+
+int vlonglabel(const M_WCHAR *keyword);
+
+int vspacing(const M_WCHAR *keyword);
+
+int vtype(const M_WCHAR *keyword);
+
+void xrefexpand(M_WCHAR *id);
+
+int m_upper(int c);
+
+char *GetDefaultHeaderString(char          *elementName,
   unsigned char  desiredType,
-  char          *defaultString
-#endif
-  ) ;
-
-
-void SetDefaultLocale(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  );
-
-char *MakeMByteString(
-#if defined(M_PROTO)
-  const M_WCHAR *from
-#endif
-  );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
-
-void paragraph(
-#if defined(M_PROTO)
-  M_WCHAR *indent,
+  char          *defaultString);
+
+
+void SetDefaultLocale(void);
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+void paragraph(M_WCHAR *indent,
   M_WCHAR *id,
   M_WCHAR *gentity,
   M_WCHAR *gposition,
   M_WCHAR *ghyperlink,
   M_WCHAR *glinktype,
-  M_WCHAR *gdescription
-#endif
-  );
+  M_WCHAR *gdescription);
 
-void figure(
-#if defined(M_PROTO)
-       M_WCHAR *number,
+void figure(     M_WCHAR *number,
        M_WCHAR *tonumber,
        M_WCHAR *id,
        M_WCHAR *file,
@@ -477,180 +211,70 @@ void figure(
        M_WCHAR *cappos,
        M_WCHAR *ghyperlink,
        M_WCHAR *glinktype,
-       M_WCHAR *gdescription
-#endif
-  );
+       M_WCHAR *gdescription);
 
-void endterm(
-#if defined(M_PROTO)
-       M_WCHAR *base,
+void endterm(     M_WCHAR *base,
        M_WCHAR *gloss,
-       char    *linktype
-#endif
-  );
-
-M_WCHAR wc_toupper(
-#if defined(M_PROTO)
-       M_WCHAR wc
-#endif
-  );
-
-M_WCHAR *wc_stringtoupper(
-#if defined(M_PROTO)
-       M_WCHAR *wcp
-#endif
-  );
-
-int NextId(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-);
-
-char *GetLanguage(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-);
-
-char *GetCharset(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-);
-
-void HandleLink(
-#if defined(M_PROTO)
-    M_WCHAR *hyperlink,
+       char    *linktype);
+
+M_WCHAR wc_toupper(     M_WCHAR wc);
+
+M_WCHAR *wc_stringtoupper(     M_WCHAR *wcp);
+
+int NextId(void);
+
+char *GetLanguage(void);
+
+char *GetCharset(void);
+
+void HandleLink(  M_WCHAR *hyperlink,
     M_WCHAR *type,
-    M_WCHAR *description
-#endif
-  );
-
-char *mb_realloc(
-#if defined(M_PROTO)
-    char *ptr, long size
-#endif
-  );
-
-char *mb_malloc(
-#if defined(M_PROTO)
-    long size
-#endif
-  );
-
-void mb_free(
-#if defined(M_PROTO)
-    char **pptr
-#endif
-  );
-
-void Add2ToRowVec(
-#if defined(M_PROTO)
-    int *length, char **rowvec, char *id1, char *id2
-#endif
-  );
-
-void StartEx(
-#if defined(M_PROTO)
-M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize
-#endif
-  );
-
-void EndEx(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  );
-
-void StartNCW(
-#if defined(M_PROTO)
-  char *which
-#endif
-  );
-
-void StartBlock(
-#if defined(M_PROTO)
-  char *pclass, char *ssi, char *id
-#endif
-  );
-
-void AddToSNB(
-#if defined(M_PROTO)
-  char *id, char *iconName
-#endif
-  );
-
-void StartNCWtext(
-#if defined(M_PROTO)
-  char *which, char *iconFile, char *headingString
-#endif
-  );
-
-void IncludeToss(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  );
-
-M_WCHAR *CycleEnt(
-#if defined(M_PROTO)
-    LOGICAL init,
+    M_WCHAR *description);
+
+char *mb_realloc(  char *ptr, long size);
+
+char *mb_malloc(  long size);
+
+void mb_free(  char **pptr);
+
+void Add2ToRowVec(  int *length, char **rowvec, char *id1, char *id2);
+
+void StartEx(M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize);
+
+void EndEx(void);
+
+void StartNCW(char *which);
+
+void StartBlock(char *pclass, char *ssi, char *id);
+
+void AddToSNB(char *id, char *iconName);
+
+void StartNCWtext(char *which, char *iconFile, char *headingString);
+
+void IncludeToss(void);
+
+M_WCHAR *CycleEnt(  LOGICAL init,
     unsigned char *type,
     M_WCHAR ***content,
-    unsigned char *wheredef
-#endif
-  );
-
-void ModifyEntities(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  );
-
-void PushForm(
-#if defined(M_PROTO)
-  char *class,
+    unsigned char *wheredef);
+
+void ModifyEntities(void);
+
+void PushForm(char *class,
   char *ssi,
-  char *id
-#endif
-  ) ;
+  char *id);
 
-void PushForm2(
-#if defined(M_PROTO)
-  char *class,
+void PushForm2(char *class,
   char *ssi,
   char *id1,
-  char *id2
-#endif
-  ) ;
-
-void PopForm(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void PopForm2(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void PopFormMaybe(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void EmitSavedAnchors(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void CloseVirpage(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+  char *id2);
+
+void PopForm(void);
+
+void PopForm2(void);
+
+void PopFormMaybe(void);
+
+void EmitSavedAnchors(void);
+
+void CloseVirpage(void);
index e45c046502fc0fa9d7719195f7f9ff3cf157df93..4b1335220bd6fc4938f88c75669f208be7a1ba84 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
-#if defined(MSDOS)
-#include <io.h>
-#include <process.h>
-#include <direct.h>
-#endif
 #include <ctype.h>
 
 #if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
@@ -175,14 +170,10 @@ struct search {
 EXTERN SEARCH *path INIT(NULL) ;
 EXTERN SEARCH **endpath INIT(&path) ;
 EXTERN char dirsep
-#if defined(MSDOS)
-INIT('\\')
-#else
 #if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
 INIT('/')
 #else
 ****define directory separator here****
-#endif
 #endif
   ;
 
@@ -190,13 +181,8 @@ INIT('/')
 #define CSEP '/'
 #define SSEP "/"
 #else
-#if defined(MSDOS)
-#define CSEP '\\'
-#define SSEP "\\"
-#else
 ****define directory separator here****
 #endif
-#endif
 
 /* Location in .TEX file of two \wlog messages */
 EXTERN long wlog ;
index effe233f33597554a85e6f5aaa3859a7e7b24dc2..40c6cf444caa267d1423771f4ed5368a2dbd9d98 100644 (file)
@@ -32,7 +32,7 @@
 #include "LocaleXlate.h"
 #include "XlationSvc.h"
 
-void assert_hometopic_exists(M_NOPAR)
+void assert_hometopic_exists(void)
 {
 static const char hometopic[] = "-HOMETOPIC";
 char id[SDLNAMESIZ + sizeof(hometopic)];
@@ -61,7 +61,7 @@ m_free(string, "GetDefaultHeaderString return");
 
 /* Determine base name for files (i.e., input name without extension).
    Open output and error files */
-void fbasename(M_NOPAR)
+void fbasename(void)
 {
 char *p, *q;
 int n;
@@ -250,8 +250,7 @@ else
 
 
 /* This procedure starts a CHAPTER */
-void chapstart(id)
-M_WCHAR *id;
+void chapstart(M_WCHAR *id)
 {
 M_WCHAR *p, *q, *wc;
 int i;
@@ -292,7 +291,7 @@ if (*chapterSuffixString)
 
 /* Called at end of manual to report terms that occurred in the document
    but not entered in the glossary */
-void checkgloss(M_NOPAR)
+void checkgloss(void)
 {
 int n;
 M_WCHAR id[MAXTERM + 1];
@@ -329,7 +328,7 @@ while (TRUE)
                
 /* End Error Message macro \starterrmsg call, check to see if Error Message
    head is user specified or default */
-void checkmsghead(M_NOPAR)
+void checkmsghead(void)
 {
 char *string =
     GetDefaultHeaderString("MessagesElementDefaultHeadingString",
@@ -349,13 +348,7 @@ m_free(string, "GetDefaultHeaderString return");
 
 
 /* construct a qualified file name */
-#if defined(M_PROTO)
 static int mb_getqualified(char *qualname, char *unqualname)
-#else
-static int mb_getqualified(qualname, unqualname)
-char *qualname;
-char *unqualname;
-#endif
 {
 #if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
 
@@ -505,9 +498,7 @@ return ( 0 );
 }  /* end mb_getqualified */
 
 
-int getqualified (qualname, unqualname)
-M_WCHAR *qualname;
-M_WCHAR *unqualname;
+int getqualified (M_WCHAR *qualname, M_WCHAR *unqualname)
 {
 int retval;
 char mb_qualname[FNAMELEN],
@@ -527,13 +518,9 @@ return retval;
 
 /* handle the common link and graphic code for <p> and <image> */
 void
-handle_link_and_graphic(parent,
-                       gentity,
-                       gposition,
-                       ghyperlink,
-                       glinktype,
-                       gdescription)
-M_WCHAR *parent, *gentity, *gposition, *ghyperlink, *glinktype, *gdescription;
+handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity,
+                        M_WCHAR *gposition, M_WCHAR *ghyperlink,
+                        M_WCHAR *glinktype, M_WCHAR *gdescription)
 {
 unsigned char etype, wheredef;
 char *mb_content, *ssi, id[32];
@@ -689,12 +676,7 @@ if (!ghyperlink && (glinktype || gdescription))
 }
 
 /* Process an item in a list */
-#if defined(M_PROTO)
 void Item(M_WCHAR *id)
-#else
-void Item(id)
-M_WCHAR *id;
-#endif
 {
 char orderString[32];
 static char *ROMAN0[] =
@@ -932,8 +914,7 @@ if (item_id)
 
 
 /* Start a rsect */
-void rsectstart(id)
-M_WCHAR *id;
+void rsectstart(M_WCHAR *id)
 {
 savid = checkid(id);
 iderr = FALSE;
@@ -944,7 +925,7 @@ chapst = TRUE;
 
 /* Called at the end of a chapter, appendix, or section to end an open
    sequence of rsects */
-void rseqend(M_NOPAR)
+void rseqend(void)
 {
 if (rsectseq)
     --thisnodelevel;
@@ -953,8 +934,7 @@ rsectseq = FALSE;
 
 
 /* Follow search path to find a file, returning qualified name */
-M_WCHAR *searchforfile(file)
-M_WCHAR *file;
+M_WCHAR *searchforfile(M_WCHAR *file)
 {
 M_WCHAR *filename;
 SEARCH *searchp;
@@ -998,16 +978,9 @@ return(NULL);
 
 
 /* Start a new helpnode */
-#if defined(M_PROTO)
 void starthelpnode(M_WCHAR *ssi,
                   M_WCHAR *id,
                   int      level)
-#else
-void starthelpnode(ssi, id, level)
-M_WCHAR *ssi;
-M_WCHAR *id;
-int     level;
-#endif
 {
 int i;
 char *mbyte, *mb_ssi;
@@ -1061,16 +1034,9 @@ snbstart = ftell(outfile);
 } /* End starthelpnode(id) */
 
 
-#if defined(M_PROTO)
 void mb_starthelpnode(char   *ssi,
                      char   *id,
                      int     level)
-#else
-void mb_starthelpnode(ssi, id, level)
-char   *ssi;
-char   *id;
-int    level;
-#endif
 {
 M_WCHAR *wc_ssi, *wc_id;
 
@@ -1089,9 +1055,7 @@ if (wc_id)
 
 
 /* Start a labeled list */
-void StartLabList(spacing, longlabel)
-M_WCHAR *spacing;
-M_WCHAR *longlabel;
+void StartLabList(M_WCHAR *spacing, M_WCHAR *longlabel)
 {
        char *mb_spacing;
 static char  def_spacing[] = "LOOSE";
@@ -1131,15 +1095,10 @@ if (list <= MAXLISTLEV)
 
 
 /* Start a list */
-#if defined(M_PROTO)
 void StartList(M_WCHAR *type,
               M_WCHAR *order,
               M_WCHAR *spacing,
               M_WCHAR *cont)
-#else
-void StartList(type, order, spacing, cont)
-M_WCHAR *type, *order, *spacing, *cont;
-#endif
 {
 LIST *nextlist;
 CONTCHAIN *chain;
@@ -1279,7 +1238,7 @@ lastlist = nextlist;
 }
 
 
-void EndList()
+void EndList(void)
 {
 LIST *curlist ;
 CONTCHAIN *chain, *xchain ;
@@ -1314,7 +1273,7 @@ if (lastlist->type == BULLET) bulcount-- ;
 
 
 /* Open and initialize TeX file */
-void texinit(M_NOPAR)
+void texinit(void)
 {
 LOGICAL init = TRUE;
 unsigned char type;
@@ -1420,17 +1379,10 @@ postpreamble = ftell(outfile);
    the string returned must be m_free'd.
 */
 char *
-#if defined(M_PROTO)
 GetDefaultHeaderString(
     char          *elementName,
     unsigned char  desiredType,
     char          *defaultString )
-#else
-GetDefaultHeaderString(elementName, desiredType, defaultString)
-char         *elementName;
-unsigned char  desiredType;
-char         *defaultString;
-#endif
 {
 unsigned char type,wheredef;
 M_WCHAR *content;
@@ -1497,13 +1449,7 @@ return "";
  *                       standard versions.
 */
 static void
-#if defined(M_PROTO)
 SetStdLocale(char *pLang, char *pCharset)
-#else
-SetStdLocale(pLang, pCharset)
-char *pLang;
-char *pCharset;
-#endif
 {
 static const char *cString   = "C";
 static const char *isoString = "ISO-8859-1";
@@ -1632,11 +1578,7 @@ _DtLcxCloseDb(&myDb);
  * fashion.
 */
 static char *
-#if defined(M_PROTO)
-GetStdLocale()
-#else
-GetStdLocale()
-#endif
+GetStdLocale(void)
 {
 static char buffer[256];
 static char *cString   = "C";
@@ -1716,7 +1658,7 @@ return buffer;
  * versions of the language and charset.
 */
 void
-SetDefaultLocale()
+SetDefaultLocale(void)
 {
 unsigned char type,wheredef;
 M_WCHAR *elementName;
@@ -1795,7 +1737,6 @@ if (charset && (charset != (dotPtr+1)))
 }
 
 
-#if defined(M_PROTO)
 void paragraph(M_WCHAR *indent,
               M_WCHAR *id,
               M_WCHAR *gentity,
@@ -1803,22 +1744,6 @@ void paragraph(M_WCHAR *indent,
               M_WCHAR *ghyperlink,
               M_WCHAR *glinktype,
               M_WCHAR *gdescription)
-#else
-void paragraph(indent,
-              id,
-              gentity,
-              gposition,
-              ghyperlink,
-              glinktype,
-              gdescription)
-M_WCHAR *indent;
-M_WCHAR *id;
-M_WCHAR *gentity;
-M_WCHAR *gposition;
-M_WCHAR *ghyperlink;
-M_WCHAR *glinktype;
-M_WCHAR *gdescription;
-#endif
 {
 char *firstString, *indentString;
 
@@ -1862,7 +1787,6 @@ handle_link_and_graphic(m_parent(0),
 
 }
 
-#if defined(M_PROTO)
 void figure(
        M_WCHAR *number,
        M_WCHAR *tonumber,
@@ -1873,28 +1797,6 @@ void figure(
        M_WCHAR *ghyperlink,
        M_WCHAR *glinktype,
        M_WCHAR *gdescription)
-#else
-void figure(
-       number,
-       tonumber,
-       id,
-       file,
-       figpos,
-       cappos,
-       ghyperlink,
-       glinktype,
-       gdescription)
-M_WCHAR *number;
-M_WCHAR *tonumber;
-M_WCHAR *id;
-M_WCHAR *file;
-M_WCHAR *figpos;
-M_WCHAR *cappos;
-M_WCHAR *border;
-M_WCHAR *ghyperlink;
-M_WCHAR *glinktype;
-M_WCHAR *gdescription;
-#endif
 {
 char snb_id[32];
 unsigned char etype,wheredef;
@@ -2126,14 +2028,7 @@ if (ftonumber)
 m_free(string, "default header string return");
 }
 
-#if defined(M_PROTO)
 void endterm(M_WCHAR *base, M_WCHAR *gloss, char *linktype)
-#else
-void endterm( base, gloss, linktype)
-M_WCHAR *base;
-M_WCHAR *gloss;
-char   *linktype;
-#endif
 {
 M_WCHAR *p;
 M_WCHAR  dterm[MAXTERM+1];
@@ -2253,12 +2148,7 @@ if (vgloss(gloss) == GLOSS)
 if (echo) mb_echohead("++");
 }
 
-#if defined(M_PROTO)
 M_WCHAR wc_toupper(M_WCHAR wc)
-#else
-M_WCHAR wc_toupper(wc)
-M_WCHAR wc;
-#endif
 {
 if ((wc >= 0) && (wc <= 255))
     {
@@ -2267,12 +2157,7 @@ if ((wc >= 0) && (wc <= 255))
 return wc;
 }
 
-#if defined(M_PROTO)
 M_WCHAR *wc_stringtoupper(M_WCHAR *wcp)
-#else
-M_WCHAR *wc_stringtoupper(wcp)
-M_WCHAR *wcp;
-#endif
 {
 M_WCHAR *newstring, *nsp;
 
@@ -2290,14 +2175,14 @@ while (*wcp)
 return(newstring);
 }
 
-int NextId()
+int NextId(void)
 {
 static id = 0;
 
 return ++id;
 }
 
-char *GetLanguage()
+char *GetLanguage(void)
 {
 static char *pLang = NULL;
 
@@ -2309,7 +2194,7 @@ if (!pLang)
 return pLang;
 }
 
-char *GetCharset()
+char *GetCharset(void)
 {
 static char *pCharset = NULL;
 
@@ -2322,14 +2207,7 @@ return pCharset;
 }
 
 
-#if defined(M_PROTO)
 void HandleLink(M_WCHAR *hyperlink, M_WCHAR *type, M_WCHAR *description)
-#else
-void HandleLink(hyperlink, type, description)
-M_WCHAR *hyperlink;
-M_WCHAR *type;
-M_WCHAR *description;
-#endif
 {
 char *mb_hyperlink, mb_undefined[64];
 char buffer[BIGBUF];
@@ -2485,13 +2363,7 @@ mb_strcode(">", outfile);
 }
 
 
-#if defined(M_PROTO)
 char *mb_realloc(char *ptr, long size)
-#else
-char *mb_realloc(ptr, size)
-char *ptr;
-long  size;
-#endif
 {
 void   *vptr;
 size_t ssize;
@@ -2511,12 +2383,7 @@ return (char *) vptr;
 }
 
 
-#if defined(M_PROTO)
 char *mb_malloc(long size)
-#else
-char *mb_malloc(size)
-long  size;
-#endif
 {
 char   *cptr;
 size_t ssize;
@@ -2534,12 +2401,7 @@ return cptr;
 }
 
 
-#if defined(M_PROTO)
 void mb_free(char **pptr)
-#else
-void  *mb_free(pptr)
-char **pptr;
-#endif
 {
 
 #if DEBUG_MB_MALLOC
@@ -2551,14 +2413,7 @@ free((void *) *pptr);
 *pptr = NULL;
 }
 
-#if defined(M_PROTO)
 static void AddToRowVec(int *length, char **rowvec, char *id)
-#else
-static void AddToRowVec(length, rowvec, id)
-int   *length;
-char **rowvec;
-char  *id;
-#endif
 {
 char tempRowVec[BIGBUF];
 int  rowVecLen;
@@ -2571,14 +2426,7 @@ strcpy(*rowvec + *length - 1, tempRowVec);
 }
 
 
-#if defined(M_PROTO)
 void Add2ToRowVec(int *length, char **rowvec, char *id1, char *id2)
-#else
-void Add2ToRowVec(length, rowvec, id1, id2)
-int   *length;
-char **rowvec;
-char  *id1, *id2;
-#endif
 {
 char tempRowVec[BIGBUF];
 int  rowVecLen;
@@ -2591,14 +2439,7 @@ strcpy(*rowvec + *length - 1, tempRowVec);
 }
 
 
-#if defined(M_PROTO)
 void StartEx(M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize)
-#else
-void StartEx(*notes, *lines, *textsize)
-M_WCHAR *notes;
-M_WCHAR *lines;
-M_WCHAR *textsize;
-#endif
 {
 exTextSize = vextextsize(textsize);
 stackex = vstack(notes);
@@ -2614,11 +2455,7 @@ svexlen      = 1;
 }
 
 
-#if defined(M_PROTO)
-void EndEx()
-#else
-void EndEx()
-#endif
+void EndEx(void)
 {
 char *annotation;
 int   annotLen;
@@ -2683,24 +2520,14 @@ if (saveexseg)
 }
 
 
-#if defined(M_PROTO)
 void StartNCW(char *which)
-#else
-void StartNCW(which)
-char *which;
-#endif
 {
 notehead = FALSE;
 PushForm(NULL, which, NULL);
 }
 
 
-#if defined(M_PROTO)
 void StartBlock(char *pclass, char *ssi, char *id)
-#else
-void StartBlock(pclass, ssi, id)
-char *pclass, *ssi, *id;
-#endif
 {
 char  localId[32];
 char *realId;
@@ -2739,14 +2566,7 @@ firstPInBlock = TRUE;
 }
 
 
-#if defined(M_PROTO)
 void StartNCWtext(char *which, char *iconFile, char *headingString)
-#else
-void StartNCWtext(which, iconFile, headingString)
-char *which;
-char *iconFile;
-char *headingString;
-#endif
 {
 char *icon, *heading;
 
@@ -2777,13 +2597,7 @@ m_free(icon, "icon name");
 }
 
 
-#if defined(M_PROTO)
 void AddToSNB(char *id, char *xid)
-#else
-void AddToSNB(id, xid)
-char *id;
-char *xid;
-#endif
 {
 char tmpsnb[BIGBUF];
 int  snblen;
@@ -2807,11 +2621,7 @@ else
 }
 
 
-#if defined(M_PROTO)
-void IncludeToss()
-#else
-void IncludeToss()
-#endif
+void IncludeToss(void)
 {
 char    pathbuf[BIGBUF];
 char   *try = pathbuf;
@@ -2896,18 +2706,10 @@ mb_free(&mb_inputname);
 /* Cyclent.c contains procedure m_cyclent(), callable by interface
    designers, to cycle through all defined entities, returning information
    about them */
-#if defined(M_PROTO)
 M_WCHAR *CycleEnt(LOGICAL init,
                  unsigned char *type,
                  M_WCHAR ***content,
                  unsigned char *wheredef)
-#else
-M_WCHAR *m_cyclent(init, type, content, wheredef)
-  LOGICAL init ;
-  unsigned char *type ;
-  M_WCHAR ***content ;
-  unsigned char *wheredef ;
-#endif
 {
 static M_TRIE *current ;
 static M_TRIE *ancestor[M_NAMELEN + 1] ;
@@ -2955,7 +2757,7 @@ return(name) ;
  * content is modified to be <SPC NAME="[......]"> so that it may be
  * emitted into the SDL output.
 */
-void ModifyEntities()
+void ModifyEntities(void)
 {
 unsigned char type;
 unsigned char wheredef;
@@ -2990,14 +2792,7 @@ while (name = CycleEnt(FALSE, &type, &content, &wheredef));
 }
 
 
-#if defined(M_PROTO)
 void PushForm(char *class, char *ssi, char *id)
-#else
-void PushForm(class, ssi, id)
-     char *class;
-     char *ssi;
-     char *id;
-#endif
 {
 char  localId[SDLNAMESIZ+10];
 char *realId;
@@ -3061,15 +2856,7 @@ needFData = TRUE;
 }
 
 
-#if defined(M_PROTO)
 void PushForm2(char *class, char *ssi, char *id1, char *id2)
-#else
-void PushForm2(class, ssi, id1, id2)
-     char *class;
-     char *ssi;
-     char *id1;
-     char *id2;
-#endif
 {
 char id[32];
 int  stackSize;
@@ -3133,7 +2920,7 @@ fputs(">\n", outfile);
 needFData = TRUE;
 }
 
-void PopForm()
+void PopForm(void)
 {
 if (inBlock)
     {
@@ -3149,7 +2936,7 @@ mb_free(&(formStackTop->rowVec));
 --formStackTop;
 }
 
-void PopForm2()
+void PopForm2(void)
 {
 if (inBlock)
     {
@@ -3170,7 +2957,7 @@ mb_free(&(formStackTop->rowVec));
  * is pushed but the source doesn't go to text either because the text
  * is explicitly optional or due to the fact that text can be null.
 */
-void PopFormMaybe()
+void PopFormMaybe(void)
 {
 if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1))
     {
@@ -3179,7 +2966,7 @@ if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1))
     }
 }
 
-void EmitSavedAnchors()
+void EmitSavedAnchors(void)
 {
 char buffer[BIGBUF];
 
@@ -3194,7 +2981,7 @@ if (parTextId)
     }
 }
 
-void CloseVirpage()
+void CloseVirpage(void)
 {
 if (parTextId)
     {
index 2ea2cf0359aa570994e4073d883457bb9967584e..6c856cfb77f582a005183b8adda24ee6e25ea64b 100644 (file)
   </CODE>
 
 <!ENTITY m-machine SDATA CODE>
-#if defined(MSDOS)
-  m_piaction("VECTRA", "m-machine", M_SDATA) ;
-#else
 #if defined(hpux)
   {
   M_WCHAR *wc_1, *wc_2;
             M_SDATA) ;
 #endif
 #endif
-#endif
 #endif
   </CODE>
 
index dd5d7f7e977f03e86c6cd37c812cec582f6757b1..5c6ab8ef0c5eb414b5ff6bdbe0ec2e6bba5af752 100644 (file)
    or invoke function pointers should be in tex.c.
 */
 
-#if defined(MSDOS)
-#include <sys\types.h>
-#include <sys\stat.h>
-#endif
-
 #if defined(hpux) || defined(_AIX) || defined(sun)
 #include <sys/types.h>
 #include <sys/stat.h>
index e3ca706bea4c1015cde24ac0698e9c4aa4a10df5..db47515f500f5487890391d40a9dcfddc52ba152 100644 (file)
 #define TAGDOTOPT "helptag.opt"
 #define DOTOPT ".opt"
 
-#if defined(M_PROTO)
 void options(LOGICAL filelenonly)
-#else
-void options(filelenonly)
-  LOGICAL filelenonly;
-#endif
 {
 int i;
 FILE *optfile;
@@ -149,13 +144,7 @@ optval = M_NULLVAL;
 
 /* Set a single option */
 /* Workonly parameter described with function options()*/
-#if defined(M_PROTO)
 void setopt(char *string, LOGICAL filelenonly)
-#else
-void setopt(string, filelenonly)
-char *string;
-LOGICAL filelenonly;
-#endif
 {
 char *p;
 int thisopt;
@@ -280,14 +269,7 @@ else switch(thisopt + 1)
 }
 
 /* Process a value for a command line option */
-#if defined(M_PROTO)
 LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly)
-#else
-LOGICAL setvalopt(thisopt, string, filelenonly)
-int thisopt;
-char *string;
-LOGICAL filelenonly;
-#endif
 {
 char *p;
 int i;
@@ -312,11 +294,7 @@ if (! *string)
 switch (thisopt)
     {
     case SEARCHKEY:
-       if ( (parentsrch==TRUE) && (*string!=M_EOS) && (*string!=dirsep)
-#if defined(MSDOS)
-        && ( *(string+1) != ':' )
-#endif
-      )
+       if ( (parentsrch==TRUE) && (*string!=M_EOS) && (*string!=dirsep) )
            {
            /* prepend "..", for index processing in temporary sub-directory */
            tempstr = (char *) m_malloc( strlen(string) + 4, "tempstr search");
@@ -332,11 +310,7 @@ switch (thisopt)
 
        *endpath = (SEARCH *) m_malloc(sizeof(SEARCH), "search path");
        p = strchr(tempstr, M_EOS);
-       if (p != tempstr && *(p - 1) != dirsep
-    #if defined(MSDOS)
-             && *(p - 1) != ':'
-    #endif
-          )
+       if (p != tempstr && *(p - 1) != dirsep)
            {
            i = strlen(tempstr);
            (*endpath)->directory = (char *) m_malloc(i + 2,
index 01c6e298598228a768a67643e9c80b08360f6d05..5ba4790c39416f89dda042102fe7559365cd146d 100644 (file)
@@ -31,8 +31,7 @@
 
 /* Echo part of a head to the screen to indicate how much of the document
    has been processed */
-void echohead(p)
-M_WCHAR *p;
+void echohead(M_WCHAR *p)
 {
 char *mb_p,*mb_string;
 
@@ -54,8 +53,7 @@ m_free(mb_string,"multi-byte string");
 }
 
 /* call echohead with a literal string */
-void mb_echohead(p)
-char *p;
+void mb_echohead(char *p)
 {
 M_WCHAR *wc;
 
@@ -67,7 +65,7 @@ m_free(wc,"wide character string");
 
 /* Called at end of a head in a chapter, appendix, section, or
    reference section */
-void endhead(M_NOPAR)
+void endhead(void)
 {
 if (savid)
     {
@@ -104,7 +102,7 @@ echo = savhd = FALSE;
  * location is placed in the snb file and the <snb> elements are
  * emitted there too.
 */
-void chksnb()
+void chksnb(void)
 {
 fputs("</HEAD>\n", outfile);
 snbstart = ftell(outfile);
@@ -121,12 +119,7 @@ if (savesnb)
 
 
 /* Process a character in an environment where spaces must be escaped */
-#if defined(M_PROTO)
 void esoutchar(M_WCHAR textchar)
-#else
-void esoutchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 static M_WCHAR wsp = 0;
 
@@ -147,12 +140,7 @@ outchar(textchar, outfile);
 }
 
 /* Process a character in a verbatim example */
-#if defined(M_PROTO)
 void vexoutchar(M_WCHAR textchar)
-#else
-void vexoutchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 static M_WCHAR  wla = 0;
        char    *holdSaveExSeg;
@@ -177,12 +165,7 @@ else
 }
 
 /* Process a character in an example */
-#if defined(M_PROTO)
 void exoutchar(M_WCHAR textchar)
-#else
-void exoutchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 char          exbuff[32]; /* arbitrarily large */
 int           bufflen;
@@ -212,12 +195,7 @@ savex = holdSavex;
 }
 
 /* Process a character in an image paragraph */
-#if defined(M_PROTO)
 void imoutchar(M_WCHAR textchar)
-#else
-void imoutchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 char           imbuff[32]; /* arbitrarily large */
 int            bufflen;
@@ -240,12 +218,7 @@ else
 }
 
 /* Write a character to be passed to the index file */
-#if defined(M_PROTO)
 void indexchar(M_WCHAR textchar)
-#else
-void indexchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 if (idxsavlen + 4 > (sizeof(idxsav) / sizeof(M_WCHAR)))
     {
@@ -257,13 +230,7 @@ idxsav[idxsavlen++] = textchar;
 
 
 /* Processes a data character */
-#if defined(M_PROTO)
 void outchar(M_WCHAR textchar, FILE *outfile)
-#else
-void outchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
 {
 M_WCHAR buffer[2];
 static M_WCHAR wnl = 0;
@@ -307,10 +274,7 @@ else
 
 
 /* Called for processing instruction */
-void outpi(enttype, pi, entname)
-int enttype;
-M_WCHAR *pi;
-M_WCHAR *entname;
+void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname)
 {
 strcode(pi, outfile);
 
@@ -333,13 +297,7 @@ if (echo)
 
 
 /* Really output a character */
-#if defined(M_PROTO)
 void realoutchar(M_WCHAR textchar, FILE *outfile)
-#else
-void realoutchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
 {
 char mb_textchar[32]; /* arbitrarily large */
 int length, i;
@@ -379,22 +337,7 @@ if (savtc)
 
 /* Save a character in the array used to store table of contents entries
    when processing a head */
-#if defined(M_PROTO)
 void shchar(M_WCHAR textchar, int *len, int max, M_WCHAR *string, void (*proc)(M_WCHAR *string), char *msg, LOGICAL *errflg)
-#else
-void shchar(textchar, len, max, string, proc, msg, errflg)
-M_WCHAR textchar;
-int *len;
-int max;
-M_WCHAR *string;
-void (*proc)(
-#if defined(M_PROTO)
-             M_WCHAR *string
-#endif
-    );
-char *msg;
-LOGICAL *errflg;
-#endif
 {
 char mb_textchar[32]; /* arbitrarily large */
 unsigned char index;
@@ -427,27 +370,12 @@ else
 }
 
 
-#if defined(M_PROTO)
 void mb_shchar(char textchar,
               int *len,
               int max,
               M_WCHAR *string,
               void (*proc)(M_WCHAR *string),
               char *msg, LOGICAL *errflg)
-#else
-void mb_shchar(textchar, len, max, string, proc, msg, errflg)
-char textchar;
-int *len;
-int max;
-M_WCHAR *string;
-void (*proc)(
-#if defined(M_PROTO)
-    M_WCHAR *string
-#endif
-    );
-char *msg;
-LOGICAL *errflg;
-#endif
 {
 M_WCHAR wc_textchar;
 
@@ -459,13 +387,8 @@ shchar(wc_textchar, len, max, string, proc, msg, errflg);
 
 /* Save a string in the array used to store table of contents entries
    when processing a head */
-void shstring(addstring, len, max, storestring, msg, errflg)
-M_WCHAR *addstring;
-int *len;
-int max;
-M_WCHAR *storestring;
-char *msg;
-LOGICAL *errflg;
+void shstring(M_WCHAR *addstring, int *len, int max,
+              M_WCHAR *storestring, char *msg, LOGICAL *errflg)
 {
 int addlength;
 
@@ -486,13 +409,8 @@ else
 }
 
 
-void mb_shstring(addstring, len, max, storestring, msg, errflg)
-char *addstring;
-int *len;
-int max;
-M_WCHAR *storestring;
-char *msg;
-LOGICAL *errflg;
+void mb_shstring(char *addstring, int *len, int max,
+                 M_WCHAR *storestring, char *msg, LOGICAL *errflg)
 {
 M_WCHAR *wc_addstring;
 
@@ -502,9 +420,7 @@ m_free(wc_addstring,"wide character string");
 }
 
 /* Writes a string to the output file, and if appropriate saves it */
-void strcode(string, outfile)
-M_WCHAR *string;
-FILE *outfile;
+void strcode(M_WCHAR *string, FILE *outfile)
 {
 char    exbuff[32]; /* arbitrarily large */
 int     bufflen;
@@ -559,9 +475,7 @@ if (savex)
 }
 
 
-void mb_strcode(string, outfile)
-char *string;
-FILE *outfile;
+void mb_strcode(char *string, FILE *outfile)
 {
 M_WCHAR *wc;
 
@@ -571,8 +485,7 @@ m_free(wc,"wide character string");
 }
 
 /* Copies string to end of buffer where saving head for table of contents */
-void svhdstring(string)
-M_WCHAR *string;
+void svhdstring(M_WCHAR *string)
 {
 int length;
 
@@ -591,8 +504,7 @@ svheadlen += length;
 }
 
 /* Copies string to end of buffer where saving table caption */
-void svtcstring(string)
-M_WCHAR *string;
+void svtcstring(M_WCHAR *string)
 {
 int length;
 
@@ -611,12 +523,7 @@ svtclen += length;
 }
 
 /* Process a character in a term */
-#if defined(M_PROTO)
 void termchar(M_WCHAR textchar)
-#else
-void termchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 int length;
 char mb_textchar[32]; /* arbitrarily large */
@@ -677,10 +584,7 @@ else
 }
 
 /* Process a PI in a term */
-void termpi(m_enttype, m_pi, m_entname)
-int m_enttype;
-M_WCHAR *m_pi;
-M_WCHAR *m_entname;
+void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname)
 {
 int length;
 
index a3b6cb829218646a91025287c6b92c35666727de..714311e62abd21b155115f93b004724f7306b2fc 100644 (file)
@@ -138,9 +138,8 @@ struct {
 #define NO8BITCHARS 256
 int invert[NO8BITCHARS], emptycell;
 
-main(argc, argv)
-int argc;
-char *argv[];
+int
+main(int argc, char *argv[])
 {
 int i, both = FALSE, spec = FALSE, coll = FALSE, error = FALSE ;
 
index 8bae6a9d2a5974c9886bf9e743170b048b5e3250..e308e1b7ddc4839013bb3680acc6990f69f3cf72 100644 (file)
@@ -31,8 +31,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 
 /* Chk for duplicate xref id's, called in TEST, S1, S2, S3, S4, and rsect. */
-M_WCHAR *checkid(id)
-M_WCHAR *id;
+M_WCHAR *checkid(M_WCHAR *id)
 {
 struct xref *xref;
 char *buffer;
@@ -80,10 +79,7 @@ return(NULL);
 }
 
 /* Write a single cross-reference macro definition */
-static void defxref(xfile, id, xref)
-FILE *xfile;
-M_WCHAR *id;
-struct xref *xref;
+static void defxref(FILE *xfile, M_WCHAR *id, struct xref *xref)
 {
 char *csname;
 char *p;
@@ -143,7 +139,7 @@ m_free(csname, "csname");
 
 /* Write cross-reference file for next time document is processed
    and TeX macro file for post-processing this pass */
-void dumpxref(M_NOPAR)
+void dumpxref(void)
 {
 int n;
 M_WCHAR id[M_NAMELEN + 1];
@@ -191,8 +187,7 @@ while (TRUE)
 }
 
 /* Copies string to end of current cross-reference string */
-void idstring(string)
-M_WCHAR *string;
+void idstring(M_WCHAR *string)
 {
 int length;
 
@@ -214,7 +209,7 @@ xstrlen += length;
 
 /* Initializes cross-reference table reading in file output from previous
    pass through document */
-void loadxref(M_NOPAR)
+void loadxref(void)
 {
 M_WCHAR id[M_NAMELEN + 1];
 char c, d;
@@ -334,20 +329,8 @@ while (TRUE)
 
 
 /* Save a cross-reference ID and associated expansion */
-#if defined(M_PROTO)
 void setid(M_WCHAR *id, LOGICAL where, LOGICAL csensitive, LOGICAL inchapter,
           char *chapter, M_WCHAR *xrffile, int xrfline, LOGICAL xrefable)
-#else
-void setid(id, where, csensitive, inchapter, chapter, xrffile, xrfline, xrefable)
-M_WCHAR *id;
-LOGICAL where;
-LOGICAL csensitive;
-LOGICAL inchapter;
-char *chapter;
-M_WCHAR *xrffile;
-int xrfline;
-LOGICAL xrefable;
-#endif
 {
 struct xref *old;
 struct xref *xref;
@@ -421,8 +404,7 @@ savid = NULL;
 }
 
 /* Generate a cross-reference */
-void xrefexpand(id)
-M_WCHAR *id;
+void xrefexpand(M_WCHAR *id)
 {
 struct xref *xref;
 struct xref *old;
index 4c228fb3fa8c087ba6d97efff85e7abeda7df609..8c07eee881948b705f39e5257bba15993b84748a 100644 (file)
@@ -32,9 +32,6 @@ in the interface definition.*/
 
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include <string.h>
 #include "basic.h"
 #include "trie.h"
@@ -47,8 +44,7 @@ in the interface definition.*/
 #include "signon.h"
 
 /* When an explicit or implied end-tag occurs */
-void m_endaction(m_elt)
-  M_ELEMENT m_elt;
+void m_endaction(M_ELEMENT m_elt)
   {
     M_ELEMENT m_action;
     char buffer[2*MAXD+M_NAMELEN+1];
@@ -79,9 +75,7 @@ void m_endaction(m_elt)
     }
 
 /* Find appropriate action according to current stack */
-int m_findact(elt, array)
-  M_ELEMENT elt;
-  int *array;
+int m_findact(M_ELEMENT elt, int *array)
   {
     int chainlen = 0;
     int index;
@@ -107,17 +101,7 @@ int m_findact(elt, array)
     }
 
 /* Recursive procedure called by findact() to search m_action */
-#if defined(M_PROTO)
 void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, LOGICAL wild)
-#else
-void m_findchain(stackptr, start, chainin, chainout, index, wild)
-  M_PARSE *stackptr;
-  int start;
-  int chainin;
-  int *chainout;
-  int *index;
-  LOGICAL wild;
-#endif
 {
     int node;
     M_PARSE *stackp;
@@ -147,7 +131,7 @@ void m_findchain(stackptr, start, chainin, chainout, index, wild)
 /* Process global end string.  In separate procedure to keep all references
    to if.h in one source file and minimize recompilation if interface
    changes. */
-void m_globes(M_NOPAR)
+void m_globes(void)
 {
 M_WCHAR *wc_string;
 
@@ -159,7 +143,7 @@ m_free(wc_string,"wide character string");
 /* Process global start string.  In separate procedure to keep all references
    to if.h in one source file and minimize recompilation if interface
    changes. */
-void m_globss(M_NOPAR)
+void m_globss(void)
 {
 M_WCHAR *wc_string;
 
@@ -169,8 +153,7 @@ m_free(wc_string,"wide character string");
 }    
 
 /* When an explicit or implied start-tag occurs */
-void m_strtaction(m_elt)
-  M_ELEMENT m_elt;
+void m_strtaction(M_ELEMENT m_elt)
   {
     int m_par, m_i;
     M_WCHAR *m_p;
@@ -241,14 +224,7 @@ void m_strtaction(m_elt)
     }
 
 /* Output a start-string or end-string */
-#if defined(M_PROTO)
 void m_textout(char *format, LOGICAL start, LOGICAL end)
-#else
-void m_textout(format, start, end)
-  char *format;
-  LOGICAL start;
-  LOGICAL end;
-#endif
 {
 M_WCHAR name[M_NAMELEN + 1];
 int i, par;
index 3040932a01aa45b24e63c1b8b631037ae7b106a4..cff0aac921511519b985716abbe18622213a1073 100644 (file)
@@ -28,8 +28,7 @@
 #include "userinc.h"
 #include "globdec.h"
 
-void m_closent(m_ptr)
-  void *m_ptr ;
+void m_closent(void *m_ptr)
   {
     fclose((FILE *) m_ptr) ;
     }
index e72ad5f6ef117d625948e485700386197d185d66..b13a13ffa712c5e4cae7846a7cfdb378a18f750e 100644 (file)
@@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entfile.c"
 
 /* When a reference to a CODE entity is encountered */
-void m_codeent(m_ent)
-  int m_ent ;
+void m_codeent(int m_ent)
   {
     (*m_ctable[m_ent])() ;
   }
index 3a4cdeb77f070a3688990357fe1840d06e85be1a..974fe4f9dd73d6143f64beb7cd3ec1dfae9787fd 100644 (file)
 #include "parser.h"
 #include "entext.h"
 
-#if defined(M_PROTO)
 M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, unsigned char *wheredef)
-#else
-M_WCHAR *m_cyclent(init, type, content, wheredef)
-  LOGICAL init ;
-  unsigned char *type ;
-  M_WCHAR **content ;
-  unsigned char *wheredef ;
-#endif
 {
     static M_TRIE *current ;
     static M_TRIE *ancestor[M_NAMELEN + 1] ;
index 66965ccf6f38e5b7c923a28ae504c59fc7cec34d..a345aafa6e4bb0f23c897df9a4d552518ec990ad 100644 (file)
@@ -29,9 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 
 /* Displays current element after some error messages */
-void m_dispcurelt(file, line)
-M_WCHAR *file ;
-int line ;
+void m_dispcurelt(M_WCHAR *file, int line)
 {
 char *mb_parent;
 
index 9ad62c704f135e753dcd86d0aa764e8f87e7c8dc..20d9e273cb03f82122d6da2d03684216f215f41d 100644 (file)
@@ -39,8 +39,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 
 /* Perform the m_action-th end-code in the interface */
-void m_endcase(m_action)
-  int m_action ;
+void m_endcase(int m_action)
   {
     (*m_etable[m_action])() ;
     }
index 038b3b28afcdd70eafdb3abdb9e11c07a234efd5..d136f01fc1bd2a5c5c8d8543aeffa59db306699a 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "context.h"
@@ -43,13 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entext.h"
 
 /* Process the name in a usemap delaration */
-#if defined(M_PROTO)
 void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
-#else
-void m_ckmap(name, useoradd)
-  M_WCHAR *name ;
-  LOGICAL useoradd ;
-#endif
 {
     int mapid ;
 
@@ -61,8 +52,7 @@ void m_ckmap(name, useoradd)
 /* Check type specified in entity declaration for previously defined
    entity.  Testing to see if the new declaration is identical to the
    original one. */
-void m_eduptype(type)
-  int type ;
+void m_eduptype(int type)
   {
     if ((int) m_entity->type != type) {
       m_err1("Redefinition of entity %s ignored", m_entity->name) ;
@@ -72,8 +62,7 @@ void m_eduptype(type)
     }
 
 /* Tests if an entity is too long */
-void m_longent(context)
-  int context ;
+void m_longent(int context)
   {
     if (m_entclen >= M_LITLEN) {
       m_curcon = context ;
@@ -83,8 +72,7 @@ void m_longent(context)
     }
 
 /* Enters an entity name into the entity name tree */
-void m_ntrent(p)
-  M_WCHAR *p ;
+void m_ntrent(M_WCHAR *p)
   {
     M_ENTITY *new ;
 
index 00559eb3ed0c5b9dd4eb08b8ccdb0febd5e87efe..c1257c0f951482ff732be439364c42a5722cf563 100644 (file)
@@ -29,7 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 
 /* Write error message prefix */
-void m_eprefix(M_NOPAR)
+void m_eprefix(void)
   {
     m_errline("\n*****\n") ;
     }
index 4789f855eed60e1da225530b80655fe1764fa70e..6a20d97641c8606c96d45cc9776c6e115387cb59 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -43,8 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 
 /* Issue error message (no arguments) */
-void m_error(text)
-  char *text;
+void m_error(char *text)
   {
     m_startmsg();
     m_errline(text);
@@ -52,15 +48,7 @@ void m_error(text)
   }
 
 /* Issue error message (one argument) */
-#if defined(M_PROTO)
-void m_err1(
-  const char    *text,
-  const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
-  char    *text;
-  M_WCHAR *arg;
-#endif
+void m_err1(const char *text, const M_WCHAR *arg)
 {
 char *buffer, *mb_arg;
 
@@ -77,15 +65,9 @@ m_esuffix();
 }
 
 
-#if defined(M_PROTO)
 void m_mberr1(
   const char *text,
   const char *arg)
-#else
-void m_err1(text, arg)
-  char    *text;
-  char *arg;
-#endif
   {
   M_WCHAR *wc_arg;
 
@@ -95,17 +77,10 @@ void m_err1(text, arg)
   }
 
 /* Issue error message (two arguments) */
-#if defined(M_PROTO)
 void m_err2(
   const char    *text,
   const M_WCHAR *arg1,
   const M_WCHAR *arg2)
-#else
-void m_err2(text, arg1, arg2)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-#endif
   {
     char *buffer;
     char *mb_arg1,*mb_arg2;
@@ -126,19 +101,11 @@ void m_err2(text, arg1, arg2)
   }
 
 /* Issue error message (three arguments) */
-#if defined(M_PROTO)
 void m_err3(
   char    *text,
   M_WCHAR *arg1,
   M_WCHAR *arg2,
   M_WCHAR *arg3)
-#else
-void m_err3(text, arg1, arg2, arg3)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3;
@@ -164,21 +131,12 @@ void m_err3(text, arg1, arg2, arg3)
   }
 
 /* Issue error message (four arguments) */
-#if defined(M_PROTO)
 void m_err4(
   char    *text,
   M_WCHAR *arg1,
   M_WCHAR *arg2,
   M_WCHAR *arg3,
   M_WCHAR *arg4)
-#else
-void m_err4(text, arg1, arg2, arg3, arg4)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4;
@@ -207,7 +165,6 @@ void m_err4(text, arg1, arg2, arg3, arg4)
   }
 
 /* Issue error message (five arguments) */
-#if defined(M_PROTO)
 void m_err5(
   char    *text,
   M_WCHAR *arg1,
@@ -215,15 +172,6 @@ void m_err5(
   M_WCHAR *arg3,
   M_WCHAR *arg4,
   M_WCHAR *arg5)
-#else
-void m_err5(text, arg1, arg2, arg3, arg4, arg5)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
@@ -261,7 +209,6 @@ void m_err5(text, arg1, arg2, arg3, arg4, arg5)
   }
 
 /* Issue error message (six arguments) */
-#if defined(M_PROTO)
 void m_err6(
   char    *text,
   M_WCHAR *arg1,
@@ -270,16 +217,6 @@ void m_err6(
   M_WCHAR *arg4,
   M_WCHAR *arg5,
   M_WCHAR *arg6)
-#else
-void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-  M_WCHAR *arg6;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6;
@@ -321,7 +258,6 @@ void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
   }
 
 /* Issue error message (seven arguments) */
-#if defined(M_PROTO)
 void m_err7(
   char    *text,
   M_WCHAR *arg1,
@@ -331,17 +267,6 @@ void m_err7(
   M_WCHAR *arg5,
   M_WCHAR *arg6,
   M_WCHAR *arg7)
-#else
-void m_err7(text, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-  M_WCHAR *arg6;
-  M_WCHAR *arg7;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7;
@@ -388,9 +313,7 @@ void m_err7(text, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
 
 /* Getline.c returns the name of the current input file and the number
    of the current line */
-void m_getline(file, line)
-  M_WCHAR **file;
-  int *line;
+void m_getline(M_WCHAR **file, int *line)
   {
     int i;
 
@@ -405,7 +328,7 @@ void m_getline(file, line)
 
 /* Dump last characters read from input stream to give context to
    an error message */
-void m_lastchars(M_NOPAR)
+void m_lastchars(void)
 {
 int i;
 M_WCHAR buffer[2];
@@ -454,14 +377,14 @@ if ((m_svlncnt[m_sysecnt] &&
 }
 
 /* Display information about the current element */
-void m_showcurelt(M_NOPAR)
+void m_showcurelt(void)
   {
     if (m_stacktop->oldtop)
       m_dispcurelt(m_stacktop->file, m_stacktop->line);
     }    
 
 /* Start an error message */
-void m_startmsg(M_NOPAR)
+void m_startmsg(void)
   {
     m_eprefix();
     m_errexit = TRUE;
@@ -469,7 +392,7 @@ void m_startmsg(M_NOPAR)
 
 /* Return the name of the current input file (most recently opened, but
    unclosed SYSTEM entity) */
-M_WCHAR *m_thisfile(M_NOPAR)
+M_WCHAR *m_thisfile(void)
   {
     int i;
 
@@ -482,7 +405,7 @@ M_WCHAR *m_thisfile(M_NOPAR)
     }
 
 /* Return the line number in the current input file */
-int m_thisline(M_NOPAR)
+int m_thisline(void)
   {
     return(m_line[m_sysecnt]);
     }
index 0870464b57fb68b4d5d644b436ba7abae0937139..31b12d8a1bd42169e1b9ab6c75af561cb5b60ea3 100644 (file)
@@ -27,12 +27,9 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 #include "userinc.h"
 #include "globdec.h"
-#if defined(MSDOS)
-#include <process.h>
-#endif
 
 /* Write error message suffix */
-void m_esuffix(M_NOPAR)
+void m_esuffix(void)
   {
     m_errline("\n") ;
     m_dumpline(m_thisfile(), m_thisline()) ;
index be276f5ff8dd6c71bfa79e370f65437d6417c979..67952a9607eef51de3f8d586e7972bde73634cc5 100644 (file)
@@ -27,9 +27,6 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 #include "userinc.h"
 #include "globdec.h"
-#if defined(MSDOS)
-#include <process.h>
-#endif
 
 /* Default version of PARSER m_exit().  Allows interface control if
    internal error causes PARSER to halt. */
index ade073c41e669b220113b8b19afa7a02deaf51c9..d74048fe52c5724a8c078b3d81a35148480114eb 100644 (file)
    Returns 0 if elt is not a valid element name, if param is specified
    but is not a valid parameter name, or if param is NULL and value is
    not a valid value of any of elt's parameters. */
-#if defined(M_PROTO)
 int m_findpar( const char *elt , const char *param , const M_WCHAR *value )
-#else
-int m_findpar(elt, param, value)
-char *elt ;
-char *param ;
-M_WCHAR *value ;
-#endif /* M_PROTO */
 {
 M_ELEMENT eltid ;
 int par ;
index d3182b7e5f226ecbc1fa54b5b72d13e0a4d0ae04..c5f2fad9fd699cfc5a2025523a5b15897b501a7f 100644 (file)
@@ -34,7 +34,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "parser.h"
 #include "signonx.h"
 
-void m_getsignon(M_NOPAR)
+void m_getsignon(void)
   {
     m_errline(m_signon) ;
     }
index 1866e3fa8e0341b7d3962d4c9b7fbc301d439d32..21762c67e80b97ac25a16985ad6bd586fd7c85f5 100644 (file)
@@ -39,7 +39,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "parser.h"
 
 /* M_etcomplete is called when a complete end-tag has been read */
-void m_etcomplete(M_NOPAR)
+void m_etcomplete(void)
   {
     if (! m_scanel) {
       M_WCHAR *wc_etago, *wc_tagc;
@@ -64,8 +64,7 @@ void m_etcomplete(M_NOPAR)
 
 /* M_frcend is called after a syntax error to end element VAL even
    if more content for that element is expected */
-void m_frcend(val)
-  M_ELEMENT val ;
+void m_frcend(M_ELEMENT val)
   {
     M_PARSE *stackptr ;
     M_ELEMENT poppedval ;
@@ -91,7 +90,7 @@ void m_frcend(val)
 
 /* M_frcstart is called to force the start of an element when that element
    cannot legally occur in the current context but does appear in the text*/
-void m_frcstart(M_NOPAR)
+void m_frcstart(void)
   {
     m_push(m_scanel, m_element[m_scanel - 1].start, m_scannet) ;
     if (m_scannet) m_netlevel++ ;
@@ -108,7 +107,7 @@ void m_frcstart(M_NOPAR)
 
 /* M_holdproc processes a RE that was saved to test if it was the last
    RE in an element's content */
-void m_holdproc(M_NOPAR)
+void m_holdproc(void)
   {
     if (m_stacktop->holdre) {
       m_stacktop->holdre = FALSE ;
@@ -122,7 +121,7 @@ void m_holdproc(M_NOPAR)
     }
 
 /* M_stcomplete is called when a complete start tag has been recognized */
-void m_stcomplete(M_NOPAR)
+void m_stcomplete(void)
   {
     if (! m_scanel) return ;
     if (m_strtproc(m_scanel))
index 4f0a52d4e252661827d8c8940ebfdc9e88690468..8468f5608b433c2d050a67e51006c7c60efd45d0 100644 (file)
@@ -33,8 +33,7 @@
 
 /* Procedure callable by interface designer.  Returns number of occurrences
    of element on parse stack */
-int m_level(elt)
-  M_WCHAR *elt ;
+int m_level(M_WCHAR *elt)
   {
     int i = 0 ;
     M_PARSE *stackptr ;
@@ -48,8 +47,7 @@ int m_level(elt)
     }
 
 
-int m_mblevel(elt)
-  char *elt ;
+int m_mblevel(char *elt)
   {
   int     retval;
   M_WCHAR *wc_elt;
index 5cadab9111f2c526372cc7ea346a5b4d3fdead4e..e39c8878733996588b1c0dbbfff7ce4073e4f76c 100644 (file)
@@ -38,11 +38,8 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "parser.h"
 #include "entext.h"
 
-LOGICAL m_lookent(name, type, content, wheredef)
-  M_WCHAR *name ;
-  unsigned char *type ;
-  M_WCHAR **content ;
-  unsigned char *wheredef ;
+LOGICAL m_lookent(M_WCHAR *name, unsigned char *type,
+                  M_WCHAR **content, unsigned char *wheredef)
   {
     M_ENTITY *entity ;
 
index 180aaf405540e874c63f294ce63b32f9ae7b4eab..078da268834383d691a1e7e69a99c21701c62be2 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <stdio.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -43,7 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* M_expecting reports to the user the possible valid content at a particular
    state in the parse of the document */
-void m_expecting(M_NOPAR)
+void m_expecting(void)
   {
     LOGICAL expstart = TRUE ;
     M_PARSE *stackptr ;
@@ -102,11 +99,8 @@ void m_expecting(M_NOPAR)
 
 /* Recursive procedure first called from expecting() to display
    names of elements reachable from a particular node */
-void m_expexpand(expstart, node, required, data)
-  LOGICAL *expstart ;
-  M_STATE node ;
-  LOGICAL *required ;
-  LOGICAL *data ;
+void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required,
+                 LOGICAL *data)
   {
     M_ARC parc ;
     M_ANDGROUP pand ;
@@ -128,10 +122,7 @@ void m_expexpand(expstart, node, required, data)
     }
 
 /* M_expline writes one line for m_expecting() */
-void m_expline(expstart, data, label)
-  LOGICAL *expstart ;
-  LOGICAL *data ;
-  M_ELEMENT label ;
+void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label)
   {
     char buffer[M_NAMELEN + 2*MAXD + 1] ;
 
@@ -168,9 +159,7 @@ void m_expline(expstart, data, label)
 
 /* M_exptend is called from m_expecting to inform the user after an
    error if an end tag is permitted */
-void m_exptend(expstart, stackptr)
-  LOGICAL *expstart ;
-  M_PARSE *stackptr ;
+void m_exptend(LOGICAL *expstart, M_PARSE *stackptr)
   {
     char buffer[M_NAMELEN + 2*MAXD + 1] ;
 
@@ -219,9 +208,7 @@ void m_exptend(expstart, stackptr)
    element, 1 if character data is expected, and 0 (FALSE) if there is
    no unique element. 
 */
-M_ELEMENT m_findunique(from, newleft)
-  M_STATE from ;
-  int *newleft ;
+M_ELEMENT m_findunique(M_STATE from, int *newleft)
   {
     M_ARC parc ;
     M_ELEMENT cr = 0, minim = 0;
@@ -276,7 +263,7 @@ M_ELEMENT m_findunique(from, newleft)
 
 /* M_nullendtag is called when a null end tag is encountered; i.e., at the
    end of a short element */
-void m_nullendtag(M_NOPAR)
+void m_nullendtag(void)
   {
     LOGICAL foundnet ;
 
@@ -307,7 +294,7 @@ void m_nullendtag(M_NOPAR)
 
 /* Tests to see if an end tag may have been omitted at this point in the
    parse.*/
-LOGICAL m_omitend(M_NOPAR)
+LOGICAL m_omitend(void)
   {
     M_ANDGROUP pand ;
     M_OPENFSA *fsastack ;
@@ -342,7 +329,7 @@ LOGICAL m_omitend(M_NOPAR)
 
 /* Tests to see if a start tag may have been omitted at this point of
    the parse.  If so, saves the element name in the MINVAL array*/
-LOGICAL m_omitstart()
+LOGICAL m_omitstart(void)
   {
     M_ELEMENT c = M_NULLVAL ;
 
index 4df1feb91b486b1adc13686b4c29fcc37cb7012f..0ec9fb4b2b7b86d8fb03e5d7f4708c460d2e52ce 100644 (file)
@@ -28,7 +28,7 @@
 #include "userinc.h"
 #include "globdec.h"
 
-void *m_openfirst(M_NOPAR)
+void *m_openfirst(void)
   {
     return((void *) stdin) ;
     }
index 255b32d64e2903fecac0005f27bc26bc08ca464b..9056f2eed10370369cce22b4873156ca3c6b8da5 100644 (file)
@@ -33,8 +33,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "parser.h"
 
 /* Get program options from a string */
-void m_optstring(p)
-  char *p ;
+void m_optstring(char *p)
   {
     if (strchr(p, 'a')) m_malftrace = TRUE ;
     if (strchr(p, 'c')) m_chtrace = TRUE ;
index 889c2cad15e6b230bfedc8d6b16cb573b78e331d..3eb226f75772f9f4440fea6632ac260b146a3f13 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "delim.h"
@@ -45,8 +42,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Process the value for the parameter whose index number was previously
    saved in m_ppsave */
-void m_attval(string)
-  M_WCHAR *string ;
+void m_attval(M_WCHAR *string)
   {
     const M_WCHAR *p ;
 
@@ -68,8 +64,7 @@ void m_attval(string)
 
 /* Process a string that is a parameter value not prefixed by the parameter
    name and value indicator */
-LOGICAL m_attvonly(string)
-  M_WCHAR *string ;
+LOGICAL m_attvonly(M_WCHAR *string)
   {
     const M_WCHAR *p ;
     int par, i ;
@@ -117,7 +112,7 @@ LOGICAL m_attvonly(string)
 
 /* Check a name previously saved in m_saveatt to see if it is the name of
    a valid parameter for the current start tag */
-void m_findatt(M_NOPAR)
+void m_findatt(void)
   {
     int par, i ;
 
@@ -155,8 +150,7 @@ void m_findatt(M_NOPAR)
     }
 
 /* Free the parameter storage associated with an element on the parse stack */
-void m_freeparam(stackelt)
-  M_PARSE *stackelt ;
+void m_freeparam(M_PARSE *stackelt)
   {
     int i ;
     int par ;
@@ -176,9 +170,7 @@ void m_freeparam(stackelt)
 /* Force a parameter value to uppercase, if appropriate for its type.
    Also, if list-valued attribute, remove leading and trailing spaces,
    and condense white-space sequences to a single blank*/
-void m_parupper(par, string)
-  int par ;
-  M_WCHAR *string ;
+void m_parupper(int par, M_WCHAR *string)
   {
     M_WCHAR *p ;
     M_WCHAR *q ;
@@ -220,7 +212,7 @@ void m_parupper(par, string)
 
 /* Set all parameters to their default values for an element included by
    tag minimization */
-void m_stkdefaultparams(M_NOPAR)
+void m_stkdefaultparams(void)
   {
     int i, par = 0 ;
 
@@ -236,11 +228,7 @@ void m_stkdefaultparams(M_NOPAR)
     }
 
 /* Stack one default parameter */
-void m_stkonedef(par, scanel, poccur, i)
-  int par ;
-  M_ELEMENT scanel ;
-  M_WCHAR **poccur ;
-  int i ;
+void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i)
   {
     if (m_parameter[par - 1].deftype == M_REQUIRED ||
         (m_parameter[par - 1].deftype == M_CURRENT &&
@@ -272,7 +260,7 @@ void m_stkonedef(par, scanel, poccur, i)
     }
 
 /* Stack parameter values */
-void m_stkparams(M_NOPAR)
+void m_stkparams(void)
   {
     int i, par ;
 
@@ -290,13 +278,7 @@ void m_stkparams(M_NOPAR)
     }
 
 /* Update the default of a parameter whose default is #CURRENT */
-#if defined(M_PROTO)
 void m_updatedefault(const int par , const M_WCHAR *string )
-#else
-void m_updatedefault(par, string)
-  int par ;
-  M_WCHAR *string ;
-#endif /* M_PROTO */
   {
     if (m_parameter[par - 1].deftype != M_CURRENT &&
         m_parameter[par - 1].deftype != M_CHANGEDCUR) return ;
@@ -322,8 +304,7 @@ void m_updatedefault(par, string)
 
 /* Check to see if a string that occurs after the element name in a start
    tag is a valid parameter name or value; if not, assume tag is ended */
-LOGICAL m_validinpar(string)
-  M_WCHAR *string ;
+LOGICAL m_validinpar(M_WCHAR *string)
   {
     int par ;
     M_WCHAR *p ;
index 4cadab455ce3bc62e6e8d6ec8d55bf6ced0686c4..a8c7e198e58a17c854f573d5a735aceefd1388ee 100644 (file)
@@ -34,8 +34,7 @@
 /* Procedure callable by interface designers.  Returns pointer to name
    of nth level parent of current element (0 is self, 1 is parent, 2
    is grandparent, etc.) */
-M_WCHAR *m_parent(n)
-  int n ;
+M_WCHAR *m_parent(int n)
   {
     M_PARSE *stackptr ;
 
index 754021cf67c7d540270577680c8953be075cf97d..7d7ac070bf3b98b85e5d627549d632f283dc624f 100644 (file)
@@ -38,9 +38,7 @@
 static void scanloop(LOGICAL prolog);
 
 /* Main procedure */
-int main(argc, argv)
-  int argc ;
-  char **argv ;
+int main(int argc, char **argv)
 {
 M_WCHAR *wc_userdef;
 
index 7fb2166885573ada7074b36eb7318e1ba6e13157..663ec17bbfbbe77bc5adc910fc3a35bdeee08e99 100644 (file)
@@ -347,8 +347,6 @@ M_PAREXTERN int m_wsused ;
 /* Temporary pointers to parameter values.  Used while scanning start tag
    before element is placed on parse stack.*/
 M_PAREXTERN
-#if defined M_PROTO
-#endif
 M_WCHAR *m_poccur[
 #if defined(M_PARDEF)
 M_MAXPAR ? M_MAXPAR : 1
index bad227adbbf835d1c7ecc61e29b10b058d7867ce..f2f65715ea021ddc8f64a9f3783bfad8359abd28 100644 (file)
@@ -33,9 +33,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <locale.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -48,7 +45,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "version.h"
 
 /* Adjust parsing state after each token if necessary */
-void m_adjuststate(M_NOPAR)
+void m_adjuststate(void)
   {
     if (m_curcon == START) {
       if (m_netlevel) {
@@ -79,7 +76,7 @@ void m_adjuststate(M_NOPAR)
 
 /* Tests whether the element named in a tag is defined; if so, returns its
    index; otherwise return FALSE */
-M_ELEMENT m_eltname(M_NOPAR)
+M_ELEMENT m_eltname(void)
   {
     M_ELEMENT eltid ;
 
@@ -90,7 +87,7 @@ M_ELEMENT m_eltname(M_NOPAR)
       }
     }
 
-int get_mb_cur_max()
+int get_mb_cur_max(void)
 {
 char *l;
 int   i;
@@ -103,7 +100,7 @@ return i;
 }
 
 /* Program initialization */
-void m_initialize(M_NOPAR)
+void m_initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
index 3a6d28a7160a49f6d0c45aeb2cc51f8fe3eec86f..776b7ef8ee53df1dba2d112afd2594e87c4afa6d 100644 (file)
 /* Function callable by interface designers.  Returns TRUE if specified value
    is a legal value for the indicated parameter of the given element,
    FALSE otherwise. */
-#if defined(M_PROTO)
 LOGICAL m_parvalok( M_WCHAR *elt , M_WCHAR *param , const M_WCHAR *value )
-#else
-LOGICAL m_parvalok(elt, param, value)
-  M_WCHAR *elt ;
-  M_WCHAR *param ;
-  M_WCHAR *value ;
-#endif /* M_PROTO */
   {
     M_ELEMENT eltid ;
     int par ;
index b3b8b63344bb30c4aa911fcb56e47447bd4dc6b6..f254ac121eb7b21d84e414f1932781cdf547bf93 100644 (file)
@@ -38,10 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* When a processing instruction or SDATA entity other than a CODE entity
    occurs */
-void m_piaction(m_pi, m_entname, m_enttype)
-  M_WCHAR *m_pi ;
-  M_WCHAR *m_entname ;
-  int m_enttype ;
+void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype)
   {
     m_stackpar = m_stacktop->piparam ;
     (*m_ptable[m_stacktop->picase])(m_pi, m_entname, m_enttype) ;
index c16614afa1a511bfd2dc4827b136896c323e5059..b7e86e1e6351b8b44a6fc0ae1eac79e56eb73a97 100644 (file)
  * Floor, Boston, MA 02110-1301 USA
  */
 /* $XConsortium: proto.h /main/3 1995/11/08 09:42:21 rswiston $ */
-int m_actgetc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_adjuststate(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void m_attval(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_attvonly(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-int m_checkstart(
-#if defined(M_PROTO)
-  M_ELEMENT val
-#endif
-  ) ;
-
-LOGICAL m_ckend(
-#if defined(M_PROTO)
-  M_ELEMENT val, LOGICAL neednet
-#endif
-  ) ;
-
-void m_ckmap(
-#if defined(M_PROTO)
-  M_WCHAR *name, LOGICAL useoradd
-#endif
-  ) ;
-
-void m_closent(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-void m_codeent(
-#if defined(M_PROTO)
-  int m_ent
-#endif
-  ) ;
-
-M_PARSE *m_copystackelt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *m_cyclent(
-#if defined(M_PROTO)
-  LOGICAL init, unsigned char *type, M_WCHAR **content, 
-  unsigned char *wheredef
-#endif
-  ) ;
-
-void m_dispcurelt(
-#if defined(M_PROTO)
-  M_WCHAR *file, int line
-#endif
-  ) ;
-
-void m_done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_dumpline(
-#if defined(M_PROTO)
-  M_WCHAR *file, int line
-#endif
-  ) ;
-
-void m_eduptype(
-#if defined(M_PROTO)
-  int type
-#endif
-  ) ;
-
-M_ELEMENT m_eltname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_endaction(
-#if defined(M_PROTO)
-  M_ELEMENT m_elt
-#endif
-  ) ;
-
-void m_endcase(
-#if defined(M_PROTO)
-  int m_action
-#endif
-  ) ;
-
-void m_endtag(
-#if defined(M_PROTO)
-  M_ELEMENT c
-#endif
-  ) ;
-
-void m_entexpand(
-#if defined(M_PROTO)
-  M_ENTITY *openent
-#endif
-  ) ;
-
-void m_eprefix(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5
-#endif
-  ) ;
-
-void m_err6(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6
-#endif
-  ) ;
-
-void m_err7(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7
-#endif
-  ) ;
-
-void m_errline(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_esuffix(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
-
-void m_etcomplete(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_excluded(
-#if defined(M_PROTO)
-  M_ELEMENT elt
-#endif
-  ) ;
-
-void m_expecting(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_expexpand(
-#if defined(M_PROTO)
-  LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data
-#endif
-  ) ;
-
-void m_expline(
-#if defined(M_PROTO)
-  LOGICAL *expstart, LOGICAL *data, M_ELEMENT label
-#endif
-  ) ;
-
-void m_exptend(
-#if defined(M_PROTO)
-  LOGICAL *expstart, M_PARSE *stackptr
-#endif
-  ) ;
-
-int m_findact(
-#if defined(M_PROTO)
-  M_ELEMENT elt, int *array
-#endif
-  ) ;
-
-void m_findatt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_findchain(
-#if defined(M_PROTO)
-  M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, 
-  LOGICAL wild
-#endif
-  ) ;
-
-int m_findpar(
-#if defined(M_PROTO)
-  const char *elt, const char *param, const M_WCHAR *value
-#endif
-  ) ;
-
-M_ELEMENT m_findunique(
-#if defined(M_PROTO)
-  M_STATE from, int *newleft
-#endif
-  ) ;
-
-void m_frcend(
-#if defined(M_PROTO)
-  M_ELEMENT val
-#endif
-  ) ;
-
-void m_frcstart(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void m_freeFSA(
-#if defined(M_PROTO)
-  M_PARSE *stackelt
-#endif
-  ) ;
-
-void m_freemin(
-#if defined(M_PROTO)
-  M_MIN *min
-  , char *msg
-#endif
-  ) ;
-
-void m_freeparam(
-#if defined(M_PROTO)
-  M_PARSE *stackelt
-#endif
-  ) ;
-
-LOGICAL m_gendelim(
-#if defined(M_PROTO)
-  int srlen, int context
-#endif
-  ) ;
-
-int m_getachar(
-#if defined(M_PROTO)
-  M_HOLDTYPE *dchar
-#endif
-  ) ;
-
-int m_getc(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-void *m_getdata(
-#if defined(M_PROTO)
-  int n, LOGICAL *flag
-#endif
-  ) ;
-
-void m_getline(
-#if defined(M_PROTO)
-  M_WCHAR **file, int *line
-#endif
-  ) ;
-
-void m_getname(
-#if defined(M_PROTO)
-  M_WCHAR first
-#endif
-  ) ;
-
-void m_getsignon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_gettoken(
-#if defined(M_PROTO)
-  int *c, M_HOLDTYPE *dchar, int context
-#endif
-  ) ;
-
-void m_globes(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_globss(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_holdproc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_inctest(
-#if defined(M_PROTO)
-  int *count, int limit, char *message
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_lastchars(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_level(
-#if defined(M_PROTO)
-  M_WCHAR *elt
-#endif
-  ) ;
-
-int m_mblevel(
-#if defined(M_PROTO)
-  char *elt
-#endif
-  ) ;
-
-void m_litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-void m_longent(
-#if defined(M_PROTO)
-  int context
-#endif
-  ) ;
-
-LOGICAL m_lookent(
-#if defined(M_PROTO)
-  M_WCHAR *name, unsigned char *type, M_WCHAR **content, 
-  unsigned char *wheredef
-#endif
-  ) ;
-
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void m_missingtagc(
-#if defined(M_PROTO)
-  int c, M_HOLDTYPE dchar, LOGICAL start
-#endif
-  ) ;
-
-LOGICAL m_nextand(
-#if defined(M_PROTO)
-  M_OPENFSA *thisfsa, M_ELEMENT label
-#endif
-  ) ;
-
-void m_nextdelimchar(
-#if defined(M_PROTO)
-  int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank, 
-  unsigned char type
-#endif
-  ) ;
-
-void m_ntrent(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void m_nullendtag(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_omitend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_omitstart(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void *m_openent(
-#if defined(M_PROTO)
-  M_WCHAR *entcontent
-#endif
-  ) ;
-
-void *m_openfirst(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_optstring(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie, M_WCHAR *name
-#endif
-  ) ;
-
-int m_parcount(
-#if defined(M_PROTO)
-  M_WCHAR *elt
-#endif
-  ) ;
-
-M_WCHAR *m_pardefault(
-#if defined(M_PROTO)
-  M_WCHAR *elt, M_WCHAR *param, unsigned char *type
-#endif
-  ) ;
-
-M_WCHAR *m_parent(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-M_WCHAR *m_parname(
-#if defined(M_PROTO)
-  M_WCHAR *elt, int n
-#endif
-  ) ;
-
-M_WCHAR *m_mbparname(
-#if defined(M_PROTO)
-  char *elt, int n
-#endif
-  ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-void m_parupper(
-#if defined(M_PROTO)
-  int par, M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_parvalok(
-#if defined(M_PROTO)
-  M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value
-#endif
-  ) ;
-
-void m_piaction(
-#if defined(M_PROTO)
-  M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype
-#endif
-  ) ;
-
-void m_pop(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_push(
-#if defined(M_PROTO)
-  M_ELEMENT elt, M_STATE current, LOGICAL need
-#endif
-  ) ;
-
-LOGICAL m_putdata(
-#if defined(M_PROTO)
-  void *data, int n
-#endif
-  ) ;
-
-void m_readcomments(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void *m_realloc(
-#if defined(M_PROTO)
-  void *ptr, int size, char *msg
-#endif
-  ) ;
-
-int m_scan(
-#if defined(M_PROTO)
-  LOGICAL prolog
-#endif
-  ) ;
-
-void m_setmap(
-#if defined(M_PROTO)
-  int map, LOGICAL useoradd
-#endif
-  ) ;
-
-void m_setoptions(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_setparam(
-#if defined(M_PROTO)
-  M_WCHAR **cvar, int par
-#endif
-  ) ;
-
-void m_shortref(
-#if defined(M_PROTO)
-  int context
-#endif
-  ) ;
-
-void m_showcurelt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_signmsg(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_sigre(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_startdoc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_startmsg(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stcaction(
-#if defined(M_PROTO)
-  M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END
-#endif
-  ) ;
-
-void m_stcomplete(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stkdefaultparams(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stkonedef(
-#if defined(M_PROTO)
-  int par, M_ELEMENT scanel, M_WCHAR **poccur, int i
-#endif
-  ) ;
-
-void m_stkparams(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_strtaction(
-#if defined(M_PROTO)
-  M_ELEMENT m_elt
-#endif
-  ) ;
-
-void m_strtcase(
-#if defined(M_PROTO)
-  int m_action
-#endif
-  ) ;
-
-void m_strtcdata(
-#if defined(M_PROTO)
-  int scanval
-#endif
-  ) ;
-
-LOGICAL m_strtproc(
-#if defined(M_PROTO)
-  M_ELEMENT scanval
-#endif
-  ) ;
-
-void m_strttag(
-#if defined(M_PROTO)
-  M_ELEMENT val, LOGICAL net
-#endif
-  ) ;
-
-void m_textaction(
-#if defined(M_PROTO)
-  M_WCHAR m_textchar
-#endif
-  ) ;
-
-void m_textout(
-#if defined(M_PROTO)
-  char *format, LOGICAL start, LOGICAL end
-#endif
-  ) ;
-
-LOGICAL m_textpermitted(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *m_thisfile(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_thisline(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_trace(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-LOGICAL m_transition(
-#if defined(M_PROTO)
-  M_ELEMENT label, LOGICAL recur
-#endif
-  ) ;
-
-void m_undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim, LOGICAL flag
-#endif
-  ) ;
-
-void m_ungetachar(
-#if defined(M_PROTO)
-  int c, M_HOLDTYPE dchar, LOGICAL preread
-#endif
-  ) ;
-
-void m_updatedefault(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-LOGICAL m_validinpar(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_vldentref(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+int m_actgetc(void);
+
+void m_adjuststate(void);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void m_attval(M_WCHAR *string);
+
+LOGICAL m_attvonly(M_WCHAR *string);
+
+int m_checkstart(M_ELEMENT val);
+
+LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet);
+
+void m_ckmap(M_WCHAR *name, LOGICAL useoradd);
+
+void m_closent(void *m_ptr);
+
+void m_codeent(int m_ent);
+
+M_PARSE *m_copystackelt(void);
+
+M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, 
+  unsigned char *wheredef);
+
+void m_dispcurelt(M_WCHAR *file, int line);
+
+void m_done(void);
+
+void m_dumpline(M_WCHAR *file, int line);
+
+void m_eduptype(int type);
+
+M_ELEMENT m_eltname(void);
+
+void m_endaction(M_ELEMENT m_elt);
+
+void m_endcase(int m_action);
+
+void m_endtag(M_ELEMENT c);
+
+void m_entexpand(M_ENTITY *openent);
+
+void m_eprefix(void);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_err6(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6);
+
+void m_err7(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7);
+
+void m_errline(char *p);
+
+void m_error(char *text);
+
+void m_esuffix(void);
+
+void m_exit(int status);
+
+void m_etcomplete(void);
+
+LOGICAL m_excluded(M_ELEMENT elt);
+
+void m_expecting(void);
+
+void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data);
+
+void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label);
+
+void m_exptend(LOGICAL *expstart, M_PARSE *stackptr);
+
+int m_findact(M_ELEMENT elt, int *array);
+
+void m_findatt(void);
+
+void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, 
+  LOGICAL wild);
+
+int m_findpar(const char *elt, const char *param, const M_WCHAR *value);
+
+M_ELEMENT m_findunique(M_STATE from, int *newleft);
+
+void m_frcend(M_ELEMENT val);
+
+void m_frcstart(void);
+
+void m_free(void *block, char *msg);
+
+void m_freeFSA(M_PARSE *stackelt);
+
+void m_freemin(M_MIN *min
+  , char *msg);
+
+void m_freeparam(M_PARSE *stackelt);
+
+LOGICAL m_gendelim(int srlen, int context);
+
+int m_getachar(M_HOLDTYPE *dchar);
+
+int m_getc(void *m_ptr);
+
+int mb_getwc(void *m_ptr);
+
+void *m_getdata(int n, LOGICAL *flag);
+
+void m_getline(M_WCHAR **file, int *line);
+
+void m_getname(M_WCHAR first);
+
+void m_getsignon(void);
+
+int m_gettoken(int *c, M_HOLDTYPE *dchar, int context);
+
+void m_globes(void);
+
+void m_globss(void);
+
+void m_holdproc(void);
+
+void m_inctest(int *count, int limit, char *message);
+
+void m_initctype(void);
+
+void m_initialize(void);
+
+void m_lastchars(void);
+
+int m_level(M_WCHAR *elt);
+
+int m_mblevel(char *elt);
+
+void m_litproc(int delim);
+
+void m_longent(int context);
+
+LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content, 
+  unsigned char *wheredef);
+
+int main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start);
+
+LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label);
+
+void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank, 
+  unsigned char type);
+
+void m_ntrent(M_WCHAR *p);
+
+void m_nullendtag(void);
+
+LOGICAL m_omitend(void);
+
+LOGICAL m_omitstart(void);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void *m_openent(M_WCHAR *entcontent);
+
+void *m_openfirst(void);
+
+void m_optstring(char *p);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+int m_parcount(M_WCHAR *elt);
+
+M_WCHAR *m_pardefault(M_WCHAR *elt, M_WCHAR *param, unsigned char *type);
+
+M_WCHAR *m_parent(int n);
+
+M_WCHAR *m_parname(M_WCHAR *elt, int n);
+
+M_WCHAR *m_mbparname(char *elt, int n);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+void m_parupper(int par, M_WCHAR *string);
+
+LOGICAL m_parvalok(M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value);
+
+void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype);
+
+void m_pop(void);
+
+void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need);
+
+LOGICAL m_putdata(void *data, int n);
+
+void m_readcomments(void);
+
+void *m_realloc(void *ptr, int size, char *msg);
+
+int m_scan(LOGICAL prolog);
+
+void m_setmap(int map, LOGICAL useoradd);
+
+void m_setoptions(void);
+
+void m_setparam(M_WCHAR **cvar, int par);
+
+void m_shortref(int context);
+
+void m_showcurelt(void);
+
+void m_signmsg(char *p);
+
+void m_sigre(void);
+
+void m_startdoc(void);
+
+void m_startmsg(void);
+
+void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END);
+
+void m_stcomplete(void);
+
+void m_stkdefaultparams(void);
+
+void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i);
+
+void m_stkparams(void);
+
+void m_strtaction(M_ELEMENT m_elt);
+
+void m_strtcase(int m_action);
+
+void m_strtcdata(int scanval);
+
+LOGICAL m_strtproc(M_ELEMENT scanval);
+
+void m_strttag(M_ELEMENT val, LOGICAL net);
+
+void m_textaction(M_WCHAR m_textchar);
+
+void m_textout(char *format, LOGICAL start, LOGICAL end);
+
+LOGICAL m_textpermitted(void);
+
+M_WCHAR *m_thisfile(void);
+
+int m_thisline(void);
+
+void m_trace(char *p);
+
+void m_wctrace(M_WCHAR *p);
+
+LOGICAL m_transition(M_ELEMENT label, LOGICAL recur);
+
+void m_undodelim(M_WCHAR *delim, LOGICAL flag);
+
+void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread);
+
+void m_updatedefault(const int par, const M_WCHAR *string);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+LOGICAL m_validinpar(M_WCHAR *string);
+
+LOGICAL m_vldentref(void);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index 663492260eca231a2446bca6cc0f097221a86158..19c988d5120b4cf1f5172139ba2c2181e1350136 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #define M_CONDEF
@@ -51,7 +48,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "sref.h"
 
 /* Actually read a character from an input stream */
-int m_actgetc(M_NOPAR)
+int m_actgetc(void)
   {
     int c ;
 
@@ -65,8 +62,7 @@ int m_actgetc(M_NOPAR)
     }
 
 /* Expand an entity reference */
-void m_entexpand(openent)
-  M_ENTITY *openent ;
+void m_entexpand(M_ENTITY *openent)
   {
     M_WCHAR *p ;
     M_HOLDTYPE dchar ;
@@ -234,9 +230,7 @@ void m_entexpand(openent)
 
 /* An srlen-character long short-reference delimiter has been found.  Verify
    that it is not the prefix of a general delimiter recognized in context*/
-LOGICAL m_gendelim(srlen, context)
-  int srlen ;
-  int context ;
+LOGICAL m_gendelim(int srlen, int context)
   {
     int ghold[MAXD + 1] ;
     int ucase ;
@@ -324,8 +318,7 @@ LOGICAL m_gendelim(srlen, context)
 
 /* Reads next input character from the current source file or from an
    entity expansion */
-int m_getachar(dchar)
-  M_HOLDTYPE *dchar ;
+int m_getachar(M_HOLDTYPE *dchar)
   {
     int c ;
     int i ;
@@ -399,12 +392,7 @@ int m_getachar(dchar)
     }
 
 /* Reads a name token */
-#if defined(M_PROTO)
 void m_getname(M_WCHAR first)
-#else
-void m_getname(first)
-  M_WCHAR first ;
-#endif
 {
     M_WCHAR *p ;
     M_HOLDTYPE dchar ;
@@ -432,10 +420,7 @@ void m_getname(first)
     }
 
 /* Reads the next token */
-int m_gettoken(c, dchar, context)
-  int *c ;
-  M_HOLDTYPE *dchar ;
-  int context ;
+int m_gettoken(int *c, M_HOLDTYPE *dchar, int context)
   {
     int hold[MAXD + 1], next ;
     int ucase ;
@@ -559,8 +544,7 @@ int m_gettoken(c, dchar, context)
     }
 
 /* Reads a literal */
-void m_litproc(delim)
-  int delim ;
+void m_litproc(int delim)
   {
     int n, i ;
     M_HOLDTYPE dchar ;
@@ -646,14 +630,7 @@ void m_litproc(delim)
     }
 
 /* Called when a missing tagc delimiter is detected */
-#if defined(M_PROTO)
 void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start)
-#else
-void m_missingtagc(c, dchar, start)
-  int c ;
-  M_HOLDTYPE dchar ;
-  LOGICAL start ;
-#endif
 {
     if (! m_wholetag) {
       if (start) m_mberr1("Invalid parameter or missing %s", m_tagc);
@@ -666,18 +643,8 @@ void m_missingtagc(c, dchar, start)
 
 /* Have found one character in a possible short reference delimiter.
    Prepare to look for the next one */
-#if defined(M_PROTO)
 void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart,
                     LOGICAL skipblank, unsigned char type)
-#else
-void m_nextdelimchar(n, i, linestart, newlinestart, skipblank, type)
-  int *n ;
-  int i ;
-  LOGICAL *linestart ;
-  LOGICAL newlinestart ;
-  LOGICAL skipblank ;
-  unsigned char type ;
-#endif
 {               
     int k ;
     char mb_re,mb_seqchar, mb_rschar;
@@ -712,7 +679,7 @@ void m_nextdelimchar(n, i, linestart, newlinestart, skipblank, type)
     }
 
 /* Scans past a comment within a markup declaration */
-void m_readcomments(M_NOPAR)
+void m_readcomments(void)
   {
     int c ;
     M_HOLDTYPE dchar ;
@@ -725,12 +692,7 @@ void m_readcomments(M_NOPAR)
     }
 
 /* Scanner */
-#if defined(M_PROTO)
 int m_scan(LOGICAL prolog)
-#else
-int m_scan(prolog)
-  LOGICAL prolog ;
-#endif
 {
 int c ;
 M_HOLDTYPE dchar ;
@@ -878,13 +840,7 @@ while (TRUE)
 
 
 /* Process explicit or implied USEMAP or ADDMAP */
-#if defined(M_PROTO)
 void m_setmap(int map, LOGICAL useoradd)
-#else
-void m_setmap(map, useoradd)
-  int map ;
-  LOGICAL useoradd ;
-#endif
 {
     int i ;
     int sref ;
@@ -932,8 +888,7 @@ void m_setmap(map, useoradd)
     }
 
 /* Check for short reference delimiters */
-void m_shortref(context)
-int context ;
+void m_shortref(int context)
 {
 int n = 0 ;
 int i ;
@@ -1083,7 +1038,7 @@ while (TRUE)
           or contextual end tag [linestat == M_SOMETHING]
       3)  If a record end might be the last one in an element, save it
 */
-void m_sigre(M_NOPAR)
+void m_sigre(void)
   {
     /* Check for first RE in content and no preceding content */
     if (m_start &&
@@ -1102,13 +1057,7 @@ void m_sigre(M_NOPAR)
 
 /* Returns a context-dependent delimiter string to input stream so
    characters can be reread one at a time in another context */
-#if defined(M_PROTO)
 void m_undodelim(M_WCHAR *delim, LOGICAL flag)
-#else
-void m_undodelim(delim, flag)
-  M_WCHAR *delim ;
-  LOGICAL flag ;
-#endif
 {
     M_WCHAR *p ;
 
@@ -1125,14 +1074,7 @@ void m_undodelim(delim, flag)
 /* Place a character on the current input stream.  The character may have
    been scanned and determined not to be part of the current token or it
    may be in the expansion of an entity*/
-#if defined(M_PROTO)
 void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread)
-#else
-void m_ungetachar(c, dchar, preread)
-  int c ;
-  M_HOLDTYPE dchar ;
-  LOGICAL preread ;
-#endif
 {
     char buffer[10] ;
     int length;
@@ -1172,7 +1114,7 @@ void m_ungetachar(c, dchar, preread)
     }
 
 /* Have encountered an M_ERO.  If the entity reference is valid, process it*/
-LOGICAL m_vldentref(M_NOPAR)
+LOGICAL m_vldentref(void)
   {
     M_HOLDTYPE dchar ;
     int next ;
index ad7470771ec9266ccd51d32b662a5c806e55f5cc..b984d67d661aa01a9b69aa12c981eab24056a14d 100644 (file)
@@ -30,7 +30,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 
 /* Set program options */
-void m_setoptions(M_NOPAR)
+void m_setoptions(void)
   {
     if (m_argc > 1) m_optstring(m_argv[1]) ;
     }
index 8dfae12912e4d8b44db8f1d5509641aa0aa8ec49..a9833119c9734db0279ee69e11195c13fae8565b 100644 (file)
@@ -35,9 +35,7 @@
 #include "parser.h"
 
 /* Set a user-defined C variable to the corresponding parameter value */
-void m_setparam(cvar, par)
-  M_WCHAR **cvar ;
-  int par ;
+void m_setparam(M_WCHAR **cvar, int par)
   {
     *cvar = m_stackpar->param[par] ;
     }
index ba35115baa1854fb521feaf6c747da9882d0299e..d3a3ca3e1d7d8ceb1322a28b42306cfb9502bebb 100644 (file)
@@ -36,8 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "sfile.c"
 
 /* Perform the m_action-th start-code in the interface */
-void m_strtcase(m_action)
-  int m_action ;
+void m_strtcase(int m_action)
   {
     (*m_stable[m_action])() ;
     }
index f8519b3b0b75aedc81ee25073390e2151bd1e4a2..7e7c98bfee181bf37c5295f9f4837f9205b626f5 100644 (file)
@@ -32,7 +32,7 @@ Copyright 1989 Hewlett-Packard Co.
    control after all entity declarations have been processed.  Not needed
    in valid documents (when it is called just prior to global start-code),
    but may be useful in some applications nevertheless. */
-void m_startdoc(M_NOPAR)
+void m_startdoc(void)
   {
     }
 
index c7399727e18f03088bb653ad05bd69a1d673db2f..ad169716116b0f51bc8676437a00b60613f2fc35 100644 (file)
 /* Include generated code */
 #include "stfile.c"
 
-#if defined(M_PROTO)
 void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END)
-#else
-void m_stcaction(m_string, M_START, M_END)
-  M_WCHAR *m_string ;
-  LOGICAL M_START ;
-  LOGICAL M_END ;
-#endif
 {
     m_stackpar = m_stacktop->stparam ;
     (*m_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ;
index 9c6d3f153e10c163ef2423fcb3312e530794c314..8c43ec9b672987d98a1acd6e3c5c1dddcd07e61a 100644 (file)
@@ -33,9 +33,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -49,8 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
    is valid input. It returns TRUE, FALSE, or M_NONCONTEXTUAL respectively
    if the element is allowed by content, not allowed, or allowed by an
    inclusion exception. */
-int m_checkstart(val)
-  M_ELEMENT val ;
+int m_checkstart(M_ELEMENT val)
   {
     M_PARSE *stackptr ;
     int except ;
@@ -88,13 +84,7 @@ int m_checkstart(val)
    If VAL is not the element at the top of the parse stack, m_ckend
    checks to see if the end of VAL can validly end nested
    elements as well. */
-#if defined(M_PROTO)
 LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet)
-#else
-LOGICAL m_ckend(val, neednet)
-  M_ELEMENT val ;
-  LOGICAL neednet ;
-  #endif
 {
     M_PARSE *stackptr ;
     M_OPENFSA *fsastack ;
@@ -197,7 +187,7 @@ LOGICAL m_ckend(val, neednet)
 
 /* Make a copy of the stack entry at the top of the parse stack in a scratch
    area */
-M_PARSE *m_copystackelt(M_NOPAR)
+M_PARSE *m_copystackelt(void)
   {
     M_OPENFSA *oldfsa ;
     M_OPENFSA **newfsa ;
@@ -225,7 +215,7 @@ M_PARSE *m_copystackelt(M_NOPAR)
     }
 
 /* End of document */
-void m_done(M_NOPAR)
+void m_done(void)
   {
     M_ELEMENT lastelt ;
 
@@ -247,8 +237,7 @@ void m_done(M_NOPAR)
     }
 
 /* Process the endtag (implied, abbreviated, or explicit) for element C*/
-void m_endtag(c)
-  M_ELEMENT c ;
+void m_endtag(M_ELEMENT c)
   {
     m_endaction(c) ;
     m_pop() ;
@@ -260,8 +249,7 @@ void m_endtag(c)
 
 /* Check that the identified element is not prohibited in the current context
    by an exclusion exception */
-LOGICAL m_excluded(elt)
-  M_ELEMENT elt ;
+LOGICAL m_excluded(M_ELEMENT elt)
   {
     M_PARSE *stackptr ;
     int except ;
@@ -279,8 +267,7 @@ LOGICAL m_excluded(elt)
 
 /* Free the OPEN FSA substructures associated with an element on
    the parse stack */
-void m_freeFSA(stackelt)
-  M_PARSE *stackelt ;
+void m_freeFSA(M_PARSE *stackelt)
   {
     M_OPENFSA *fsastack ;
     M_ANDLIST *usedand ;
@@ -299,9 +286,7 @@ void m_freeFSA(stackelt)
     }
 
 /* Free storage used for tentative chain of tag minimizations */
-void m_freemin(min, msg)
-  M_MIN *min ;
-  char *msg ;
+void m_freemin(M_MIN *min, char *msg)
   {
     M_MIN *discard ;
 
@@ -316,9 +301,7 @@ void m_freemin(min, msg)
    in the current content model by starting a new submodel of the and-group
    indicated by fsastack, or (if the and-group is within a seq-group) by
    continuing past the and-group */
-LOGICAL m_nextand(thisfsa, label)
-  M_OPENFSA *thisfsa ;
-  M_ELEMENT label ;
+LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label)
   {
     M_ANDLIST *newgroup ;
     M_ANDGROUP pand ;
@@ -404,7 +387,7 @@ LOGICAL m_nextand(thisfsa, label)
     }
 
 /* Pops the parse stack*/
-void m_pop(M_NOPAR)
+void m_pop(void)
   {
     M_PARSE *stackelt ;
 
@@ -426,14 +409,7 @@ void m_pop(M_NOPAR)
 
 /* Pushes a new item onto the parse stack, setting its element, current,
    and neednet fields as indicated by the parameters*/
-#if defined(M_PROTO)
 void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need)
-#else
-void m_push(elt, current, need)
-  M_ELEMENT elt ;
-  M_STATE current ;
-  LOGICAL need ;
-  #endif
 {
     M_PARSE *newstack ;
 
@@ -477,8 +453,7 @@ void m_push(elt, current, need)
    character is treated differently so that if character data is not
    allowed in the current context, an error message is issued with the
    first character only and not with every character. */
-void m_strtcdata(scanval)
-  int scanval ;
+void m_strtcdata(int scanval)
   {
     if (! m_strtproc(M_NULLVAL))
       if (m_whitespace((M_WCHAR) scanval)) {
@@ -509,8 +484,7 @@ void m_strtcdata(scanval)
    to an element that was within #PCDATA, m_strtproc saves the current context
    and restores it after returning from the last call to m_endtag.)
 */
-LOGICAL m_strtproc(scanval)
-  M_ELEMENT scanval ;
+LOGICAL m_strtproc(M_ELEMENT scanval)
   {
     int check ;
     M_PARSE *original ;
@@ -654,13 +628,7 @@ LOGICAL m_strtproc(scanval)
     }
 
 /* Processes explicit or implied start tag*/
-#if defined(M_PROTO)
 void m_strttag(M_ELEMENT val, LOGICAL net)
-#else
-void m_strttag(val, net)
-  M_ELEMENT val ;
-  LOGICAL net ;
-#endif
 {
     m_transition(val, TRUE) ;
     if (val) {
@@ -683,7 +651,7 @@ void m_strttag(val, net)
    makes more sense, is used by MARKUP, and is under consideration by the
    Standards committee; the latter is the current definition in the Standard
    */
-LOGICAL m_textpermitted(M_NOPAR)
+LOGICAL m_textpermitted(void)
   {
     M_ANDGROUP pand ;
     M_OPENFSA *fsastack ;
@@ -726,13 +694,7 @@ LOGICAL m_textpermitted(M_NOPAR)
 /* Returns TRUE iff LABEL allowed in the current state of the current
    element (without expanding any minimization).  May result in changes
    to the stack of FSA's for this element if and-groups open or close. */
-#if defined(M_PROTO)
 LOGICAL m_transition(M_ELEMENT label, LOGICAL recur)
-#else
-LOGICAL m_transition(label, recur)
-  M_ELEMENT label ;
-  LOGICAL recur ;
-#endif
 {
     M_ARC parc ;
     M_OPENFSA *newfsa ;
index 377f8d19f3730c7bada7df4a9b52644a2584a120..9bae2a819fe857db03440c8bbe5aa999200ca84d 100644 (file)
@@ -36,12 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "tfile.c"
 
 /* When a text character occurs */
-#if defined(M_PROTO)
 void m_textaction(M_WCHAR m_textchar)
-#else
-void m_textaction(m_textchar)
-  M_WCHAR m_textchar ;
-  #endif
 {
     char buffer[10] ;
     char    mb_re;
index 9391eba79f700d7c3005b42c7cd67a74316d2760..f0e612811df174807f35db308fc22e5d5f6367fb 100644 (file)
 */
 #include "basic.h"
 
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
+LOGICAL m_allwhite(const M_WCHAR *string);
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+LOGICAL m_whitespace(M_WCHAR c);
 
 /* Test if a string contains only white space characters */
-#if defined(M_PROTO)
 LOGICAL m_allwhite(const M_WCHAR *string )
-#else
-LOGICAL m_allwhite(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 const M_WCHAR *p ;
 
index 30706b1c0dd62d0ffe50d002d5aabfc7990c5fb3..b8057c985508f1ca12d618efbb8fb5f1999c136f 100644 (file)
@@ -46,87 +46,27 @@ typedef wchar_t M_WCHAR;
 
 /* For function prototypes */
 typedef char * M_POINTER;
-#if defined(hpux) || defined(__aix) || defined(sun)
-/* Old unix stuff
- *#define void int
- *#define M_NOPAR
- */
-/* New Ansi style */
-#define M_PROTO
-#define M_NOPAR void
-#else
-#define M_PROTO
-#define M_NOPAR void
-#endif
-
-char *MakeMByteString(
-#if defined(M_PROTO)
-  const M_WCHAR *from
-#endif
-  );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
-
-int w_strcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *string1, const M_WCHAR *string2
-#endif
-  );
-
-M_WCHAR *w_strcpy(
-#if defined(M_PROTO)
-  M_WCHAR *string1, const M_WCHAR *string2
-#endif
-  );
-
-M_WCHAR *w_strncpy(
-#if defined(M_PROTO)
-  M_WCHAR *string1, const M_WCHAR *string2, int max
-#endif
-  );
-
-int w_strlen(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  );
-
-M_WCHAR *w_strchr(
-#if defined(M_PROTO)
-  M_WCHAR *string, const M_WCHAR chr
-#endif
-  );
-
-M_WCHAR *w_strstr(
-#if defined(M_PROTO)
-  M_WCHAR *string1, M_WCHAR *string2
-#endif
-  );
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
+
+int w_strlen(const M_WCHAR *string);
+
+M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
+
+M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
+
+void *m_malloc(int size, char *msg);
+
+void m_free(void *block, char *msg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+int mb_getwc(void *m_ptr);
index b41ce9f50ca0d814d7a3d38f04bb5bed39939b6e..4b060ec4c706a8f4ef41850e48b7d3fe47ba69bb 100644 (file)
@@ -37,179 +37,63 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #define CONTINIT(a)
 #endif
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpdlmptr(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void dumpdlmptr(void);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
 
-void dumptree(
-#if defined(M_PROTO)
-  LOGICAL sparse
-#endif
-  ) ;
+void dumptree(LOGICAL sparse);
 
-void enterdelim(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+void enterdelim(int n);
 
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void m_error(char *text);
 
-void m_err1(
-#if defined(M_PROTO)
-  char *text, char *arg
-#endif
-  ) ;
+void m_err1(char *text, char *arg);
 
-void getcode(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+void getcode(int n);
 
-void getcolon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void getcolon(void);
 
-int getContext(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+int getContext(void);
 
-LOGICAL getdname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+LOGICAL getdname(void);
 
-void inccon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void inccon(void);
 
-void incdelim(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void incdelim(void);
 
-void loaddelim(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void loaddelim(void);
 
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_lower(int c);
 
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
+int main(int argc, char **argv);
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void nextcon(
-#if defined(M_PROTO)
-  LOGICAL sparse
-#endif
-  ) ;
+void nextcon(LOGICAL sparse);
 
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
 
-void printval(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
+void printval(FILE *file, M_TRIE *value);
 
-void prtctxt(
-#if defined(M_PROTO)
-  int column, int value
-#endif
-  ) ;
+void prtctxt(int column, int value);
 
-int readchar(
-#if defined(M_PROTO)
-  LOGICAL cap
-#endif
-  ) ;
+int readchar(LOGICAL cap);
 
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void skiptoend(void);
 
-void unread(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+void unread(int c);
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_upper(int c);
 
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void warning(char *text);
 
-void warning1(
-#if defined(M_PROTO)
-  char *text, char *arg
-#endif
-  ) ;
+void warning1(char *text, char *arg);
 
-void warning2(
-#if defined(M_PROTO)
-  char *text, char *arg1, char *arg2
-#endif
-  ) ;
+void warning2(char *text, char *arg1, char *arg2);
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+LOGICAL m_whitespace(M_WCHAR c);
 
 
 #define NOMORE -1
index 5cc87cbecacf24fceff5a980ca11c394101be019..bc968106632a74104adddef3035104b9dde07bff 100644 (file)
@@ -157,9 +157,6 @@ delim.h.
 
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -169,9 +166,7 @@ delim.h.
 #include "cont.h"
 
 /* Main procedure */
-int main(argc, argv)
-  int argc ;
-  char **argv ;
+int main(int argc, char **argv)
 {
 int n ;
 
index 84fa81dee2d028055211f5dca70526f1db2d88f4..f17f33549a27ed3db055d44a540d63f1afe5f6c6 100644 (file)
@@ -31,16 +31,13 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
 #include "cont.h"
 
 /* Output declaration of dlmptr */
-void dumpdlmptr(M_NOPAR)
+void dumpdlmptr(void)
   {
     int n;
 
@@ -55,12 +52,7 @@ void dumpdlmptr(M_NOPAR)
     }
 
 /* Output the generated data structures */
-#if defined(M_PROTO)
 void dumptree(LOGICAL sparse)
-#else
-void dumptree(sparse)
-  LOGICAL sparse;
-#endif
   {
     int i, count = 0;
 
@@ -89,8 +81,7 @@ void dumptree(sparse)
     }
 
 /* Enter a delimiter into the delimiter tree for a particular context */
-void enterdelim(n)
-  int n;
+void enterdelim(int n)
 {
 if (! contree[n])
     {
@@ -115,8 +106,7 @@ if (m_ntrtrie(dstruct->string,
 }
 
 /* Read the code to be executed with a given state transition */
-void getcode(n)
-int n;
+void getcode(int n)
 {
 int c ; /* c is int instead of char for use with ungetc */
 int nested = 1;
@@ -221,7 +211,7 @@ while (TRUE)
 } /* End proc getcode() */
 
 /* Read the colon separating the two states in a transition pair */
-void getcolon(M_NOPAR)
+void getcolon(void)
 {
 int c ; /* c is int instead of char for use with ungetc */
 M_WCHAR wcl;
@@ -245,7 +235,7 @@ if (c != wcl)
 }
 
 /* Read a context name from an input line */
-int getContext(M_NOPAR)
+int getContext(void)
 {
 M_WCHAR name[CNAMELEN + 1];
 int c ; /* c is int instead of char for use with ungetc */
@@ -314,7 +304,7 @@ return(ccount - 1);
 }
 
 /* Read a delimiter name from the input line */
-LOGICAL getdname(M_NOPAR)
+LOGICAL getdname(void)
 {
 int c;
 M_WCHAR *p;
@@ -358,7 +348,7 @@ return(TRUE);
 }
 
 /* Out of context space.  Increase. */
-void inccon(M_NOPAR)
+void inccon(void)
   {
     M_TRIE **newtrie = NULL;
     int *newtransit = NULL;
@@ -405,7 +395,7 @@ void inccon(M_NOPAR)
     }
 
 /* Increase delimiter space. */
-void incdelim(M_NOPAR)
+void incdelim(void)
 {
 int *newtransit = NULL;
 char **newdlm = NULL;
@@ -453,7 +443,7 @@ dcount++;
 }
 
 /* Read delimiter definitions from delim.dat */
-void loaddelim(M_NOPAR)
+void loaddelim(void)
 {
 int c;
 M_WCHAR *p;
@@ -574,12 +564,7 @@ loading = FALSE;
 }
 
 /* Output transition matrix */
-#if defined(M_PROTO)
 void nextcon(LOGICAL sparse)
-#else
-void nextcon(sparse)
-  LOGICAL sparse;
-#endif
   {
     int i, j;
     int firstinrow;
@@ -633,8 +618,7 @@ void nextcon(sparse)
   
 /* If sparse matrix output option, generate a single element of transit
    array */
-void prtctxt(column, value)
-  int column, value;
+void prtctxt(int column, int value)
   {
     static LOGICAL first = TRUE;
 
@@ -646,12 +630,7 @@ void prtctxt(column, value)
 
 
 /* Read the next input character */
-#if defined(M_PROTO)
 int readchar(LOGICAL cap)
-#else
-int readchar(cap)
-  LOGICAL cap;
-#endif
 {
 int c;
 M_WCHAR wnl;
@@ -669,13 +648,12 @@ return(c);
 
 /* Called by utility procedure m_error() -- has content in other programs
    that use m_error() */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
 {
 }
 
 /* Return a character to the input stream for re-reading */
-void unread(c)
-int c;
+void unread(int c)
 {
 M_WCHAR wnl;
 
index 08460d96c1ef12278d7cbb8665b46f7f40c9df73..033096b4a3bf257fb58ce775f9ae6ec69bcdddfa 100644 (file)
 /* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
 /* Creates a file with nothing in it */
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
+void main(int argc, char **argv);
 
-void main(argc, argv)
-  int argc ;
-  char **argv ;
+void main(int argc, char **argv)
   {
     if (argc != 2) {
       fprintf(stderr, "Usage: emptyfil filename\n") ;
index f731e767f37bed12d91e729136ee9f05346d09a0..c031d65a7dfe2edbc104435ce9b437cd59514332 100644 (file)
 
 /* Entout has procedures to write generated entity TRIE */
 
-void entptr(
-#if defined(M_PROTO)
-  M_ENTITY *data
-#endif
-  ) ;
+void entptr(M_ENTITY *data);
 
-char *typetype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+char *typetype(int n);
 
-char *typewhere(
-#if defined(M_PROTO)
-  unsigned char n
-#endif
-  ) ;
+char *typewhere(unsigned char n);
 
 /* Macro names written to output file */
 char xdbuild[] = "M_DBUILD" ;
@@ -61,8 +49,7 @@ char xerror[] = "ERROR" ;
 
 /* Outputs entity definitions */
 #define ENTFILENAME 12
-void entout(fname)
-  char *fname ;
+void entout(char *fname)
   {
     char efilename[ENTFILENAME] ;
     int count = 1 ;
@@ -185,15 +172,13 @@ void entout(fname)
 
 /* Entptr is called by m_dumptrie to output the value stored with a
    particular entity in the entity trie */
-void entptr(data)
-  M_ENTITY *data ;
+void entptr(M_ENTITY *data)
   {
     fprintf(entfile, "(M_TRIE *) &m_entities[%d]", data->index - 1) ;
     }
 
 /* Typetype returns a string indicating the type of the nth entity.*/
-char *typetype(n)
-  int n ;
+char *typetype(int n)
   {
     switch(n) {
       case M_GENERAL: return(xgeneral) ;
@@ -212,12 +197,7 @@ char *typetype(n)
     }
 
 /* Typewhere returns a string indicating where the nth entity was defined.*/
-#if defined(M_PROTO)
 char *typewhere(unsigned char n)
-#else
-char *typewhere(n)
-  unsigned char n ;
-#endif
   {
     switch(n) {
       case M_DBUILD: return(xdbuild) ;
index 42b778ff30c7550270d32a7d118dea29d6149c0e..883acc63e3ace104d1ccb068b1d93df0c97a8183 100644 (file)
@@ -33,128 +33,47 @@ extern FILE *m_errfile ;
 extern int m_line ;
 extern LOGICAL errexit ;
 
-void eprefix(
-#if defined(M_PROTO)
-  LOGICAL flag
-#endif
-  ) ;
-
-void m_errline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
-             M_WCHAR *arg5
-#endif
-  ) ;
-
-void esuffix(
-#if defined(M_PROTO)
-  void
-#endif
-  ) ;
-
-void msgline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void msg1line(
-#if defined(M_PROTO)
-  char *text, char *arg1
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *text
-#endif
-  ) ;
-
-void m_trace(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-void warning2(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2
-#endif
-  ) ;
-
-void warning3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void warning4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
+void eprefix(LOGICAL flag);
+
+void m_errline(char *text);
+
+void m_error(char *text);
+
+void m_err1(char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
+             M_WCHAR *arg5);
+
+void esuffix(void);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void skiptoend(void);
+
+void m_wctrace(M_WCHAR *text);
+
+void m_trace(char *text);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
 
 /* Write error message prefix */
-#if defined(M_PROTO)
 void eprefix(LOGICAL flag)
-#else
-void eprefix(flag)
-  LOGICAL flag ;
-#endif
   {
     if (flag) errexit = TRUE ;
     fprintf(stderr, "\n**** ") ;
@@ -164,16 +83,14 @@ void eprefix(flag)
 /* Writes part of an error message.  Called from m_malloc instead of
    m_err1, since PARSER's version of m_err1 calls m_malloc and recursive
    calls are possible when the heap is exhausted */
-void m_errline(text)
-char *text ;
+void m_errline(char *text)
 {
 fputs(text, stderr) ;
 fputs(text, m_errfile) ;
 }
 
 /* Writes an error message to standard error and file "error" */
-void m_error(text)
-  char *text ;
+void m_error(char *text)
   {
     eprefix(TRUE) ;
     fprintf(stderr,"%s", text) ;
@@ -184,13 +101,7 @@ void m_error(text)
 
 /* Writes an error message with one argument to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err1(char *text, const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
-  char *text;
-  M_WCHAR *arg ;
-#endif
 {
 char *mb_arg;
 
@@ -203,13 +114,7 @@ skiptoend() ;
 m_free(mb_arg,"multi-byte string");
 }
 
-#if defined(M_PROTO)
 void m_mberr1(char *text, const char *arg)
-#else
-void m_err1(text, arg)
-  char *text;
-  char *arg ;
-#endif
 {
 eprefix(TRUE) ;
 fprintf(stderr, text, arg) ;
@@ -220,13 +125,7 @@ skiptoend() ;
 
 /* Writes an error message with two arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err2( const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2)
-#else
-void m_err2(text, arg1, arg2)
-char *text;
-M_WCHAR *arg1, *arg2 ;
-#endif
 {
 char *mb_arg1, *mb_arg2;
 
@@ -243,13 +142,7 @@ m_free(mb_arg2,"multi-byte string");
 
 /* Writes an error message with three arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err3( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
-#else
-void m_err3(text, arg1, arg2, arg3)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3;
 
@@ -268,14 +161,8 @@ m_free(mb_arg3,"multi-byte string");
 
 /* Writes an error message with five arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
             M_WCHAR *arg4, M_WCHAR *arg5)
-#else
-void m_err5(text, arg1, arg2, arg3, arg4, arg5)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3, *arg4, *arg5 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
 
@@ -296,37 +183,33 @@ m_free(mb_arg5,"multi-byte string");
 }
 
 /* Write error message suffix */
-void esuffix(M_NOPAR)
+void esuffix(void)
   {
     fprintf(stderr, " (line %d) ****\n", m_line) ;
     fprintf(m_errfile, " (line %d) ****\n", m_line) ;
     }
 
 /* Print something to both stderr and m_errfile */
-void msgline(text)
-  char *text ;
+void msgline(char *text)
   {
     fprintf(stderr, "%s", text) ;
     fprintf(m_errfile, "%s", text) ;
     }
 
 /* Print something to both stderr and m_errfile */
-void msg1line(text, arg1)
-  char *text, *arg1 ;
+void msg1line(char *text, char *arg1)
   {
     fprintf(stderr, text, arg1) ;
     fprintf(m_errfile, text, arg1) ;
     }
 
 /* Trace used for m_malloc trace output */
-void m_trace(text)
-char *text ;
+void m_trace(char *text)
 {
 m_errline(text) ;
 }
 
-void m_wctrace(text)
-M_WCHAR *text ;
+void m_wctrace(M_WCHAR *text)
 {
 char *mb_text;
 
@@ -336,8 +219,7 @@ m_free(mb_text,"multi-byte string");
 }
 
 /* Writes a nonfatal error message to standard error and file "error" */
-void warning(text)
-  char *text ;
+void warning(char *text)
   {
     eprefix(FALSE) ;
     fprintf(stderr,"%s", text) ;
@@ -347,13 +229,7 @@ void warning(text)
 
 /* Writes a nonfatal error message with one argument to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning1( char *text, M_WCHAR *arg)
-#else
-void warning1(text, arg)
-char *text;
-M_WCHAR *arg ;
-#endif
 {
 char *mb_arg;
 
@@ -367,13 +243,7 @@ m_free(mb_arg,"multi-byte string");
 
 /* Writes a nonfatal error message with two arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2)
-#else
-void warning2(text, arg1, arg2)
-char *text;
-M_WCHAR *arg1, *arg2 ;
-#endif
 {
 char *mb_arg1, *mb_arg2;
 
@@ -389,13 +259,7 @@ m_free(mb_arg2,"multi-byte string");
 
 /* Writes a nonfatal error message with three arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
-#else
-void warning3(text, arg1, arg2, arg3)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3;
 
@@ -413,14 +277,8 @@ m_free(mb_arg3,"multi-byte string");
 
 /* Writes a nonfatal error message with four arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
              M_WCHAR *arg4)
-#else
-void warning4(text, arg1, arg2, arg3, arg4)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3, *arg4 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4;
 
index dc95be5b6dc3c43de006042840f4c51fb2240695..47dd7e3b6b7b6adac494186ff2564dc1a381b45d 100644 (file)
 Copyright 1988, 1989 Hewlett-Packard Co.
 */
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
 /* Exit function called by utilities used in PARSER and other programs in
    the MARKUP system */
-void m_exit(status)
-  int status ;
+void m_exit(int status)
   {
     exit(status) ;
     }
index 0216abed9c5e64e21b58b4024ece52a1f55164a7..b69046c8a002473605fb8e758df30e2561386e9a 100644 (file)
@@ -37,9 +37,6 @@ with an error code of 0 if the files are the same, 1 if they differ, and
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #define SAME 0
 /* different defined to be 0 as of 12-1-89, because fclndir now does
@@ -58,27 +55,13 @@ struct data {
 char linedir[] = "#line" ;
 char *p = linedir, *q = linedir + 1 ;
 
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
+void main(int argc, char **argv);
 
-void copyfile(
-#if defined(m_proto)
-  char *pfile1, char *pfile2
-#endif
-  ) ;
+void copyfile(char *pfile1, char *pfile2);
 
-int nextchar(
-#if defined (M_PROTO)
-  FILE *file, struct data *data
-#endif
-  ) ;
+int nextchar(FILE *file, struct data *data);
 
-void main(argc, argv)
-  int argc ;
-  char **argv ;
+void main(int argc, char **argv)
   {
     FILE *one, *two ;
     int c1, c2 ;
@@ -125,8 +108,7 @@ void main(argc, argv)
     }
 
 /* copyfile inserted by ced, 12-1-89. */
-void copyfile(pfile1,pfile2)
-  char *pfile1, *pfile2; 
+void copyfile(char *pfile1, char *pfile2)
 {
        int ret;
        char *pcmd;
@@ -136,20 +118,14 @@ void copyfile(pfile1,pfile2)
    spaces, and the terminating null */
        slen = strlen(pfile1) + strlen(pfile2) + 8;
        pcmd = (char *) malloc(slen);
-#if defined(MSDOS)
-       ret = snprintf(pcmd, slen, "copy %s %s",pfile1,pfile2);
-#else
        ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2);
-#endif
        ret = system(pcmd);
        ret = snprintf(pcmd, slen, "touch %s",pfile2);
        ret = system(pcmd);
        free(pcmd);
 }
 
-int nextchar(file, data)
-  FILE *file ;
-  struct data *data ;
+int nextchar(FILE *file, struct data *data)
   {
     while (data->linestart) {
       data->linestart = FALSE ;
index ce658c012607e46f6b20b6bbb2514b5daee9778d..a3d7feacc7aa2fd6a4d5b38d0c9fe6c299d42a92 100644 (file)
                    Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co.
 */
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const char *arg
-#endif
-  ) ;
+void m_err1(const char *text, const char *arg);
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_inctest(
-#if defined(M_PROTO)
-  int *count, int limit, char *message
-#endif
-  ) ;
+void m_inctest(int *count, int limit, char *message);
 
 /* Increment a count and test against a limit */
-void m_inctest(count, limit, message)
-  int *count ;
-  int limit ;
-  char *message ;
+void m_inctest(int *count, int limit, char *message)
   {
     if (++*count <= limit) return ;
     m_err1("Internal error: %s exceeded", message) ;
index 319234555e8fa681e8ff6b87759b2e76bb5897dc..9f03df46de2ad08feaeff7679d107e302d23e48d 100644 (file)
 #include "common.h"
 extern char m_chartype[M_CHARSETLEN] ;
 
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_initctype(M_NOPAR)
+void m_initctype(void)
   {
     int i ;
 
index 1bac0790bcc65090748db056ad020da69d3494c2..a3f59a4c8a9f526f7d0a75780dd8d59269c21439 100644 (file)
 #include <string.h>
 #include "basic.h"
 
-char *m_itoa(
-#if defined(M_PROTO)
-  int n, char *s
-#endif
-  ) ;
+char *m_itoa(int n, char *s);
 
-void reverse(
-#if defined(M_PROTO)
-  char *s
-#endif
-  ) ;
+void reverse(char *s);
 
-char *m_itoa(n, s)  /* convert n to characters in s */
-char s[]; 
-int n;
+char *m_itoa(int n, char *s) /* convert n to characters in s */
 {   
     int sign ;
     char *p = s ;
@@ -59,8 +49,7 @@ int n;
     return(s) ;
 }
 
-void reverse(s)
-char s[];
+void reverse(char s[])
 {
     int c, i, j;
 
index 0ce3b177789db8f4498aa00d13371553f428eb4d..29fe3947f580ea6521e368fffe9b8a3f192d8b47 100644 (file)
 
 #include "basic.h"
 
-LOGICAL m_letter(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
-#if defined(M_PROTO)
 LOGICAL m_letter(M_WCHAR c)
-#else
-LOGICAL m_letter(c)
-  M_WCHAR c ;
-#endif
 {
 if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) return(TRUE) ;
 return(FALSE) ;
index a313a9b6e461d89aa4ea55d437dcf012d26a488a..96091df0d59203953272c0e72369d6c94a5deaab 100644 (file)
 
 #include "basic.h"
 
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_lower(int c);
 
 
 
 /* Force a letter to lowercase */
-int m_lower(c)
-  int c ;
+int m_lower(int c)
   {
     if (c >= 'A' && c <= 'Z') c += 'a' - 'A' ;
     return(c) ;
index 33f284873696c9bf32b09d9e898a416807c2fac0..32ef2dbf1ecf5d2c3cb9f77ac7fa9f9d148a0658 100644 (file)
 /**/
 #include <stdlib.h>
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
 extern LOGICAL m_heapchk ;
 extern LOGICAL m_malftrace ;
 
-void m_errline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void m_errline(char *text);
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
+void m_free(void *block, char *msg);
 
-void m_heapdump(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void m_heapdump(void);
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void *m_realloc(
-#if defined(M_PROTO)
-  void *ptr, int size, char *msg
-#endif
-  ) ;
+void *m_realloc(void *ptr, int size, char *msg);
 
-void *m_trace(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void *m_trace(char *text);
 
-void *m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *text
-#endif
-  ) ;
+void *m_wctrace(M_WCHAR *text);
 
-void m_free(block, msg)
-  void *block ;
-  char *msg ;
+void m_free(void *block, char *msg)
   {
     char buffer[32] ;
 
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     free(block) ;
     if (m_malftrace) {
 #if defined(hpux) || defined(_AIX) || defined(sun)
@@ -107,62 +67,16 @@ void m_free(block, msg)
       m_trace(msg) ;
       m_trace("\n") ;
       }      
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
-    }
-
-#if defined(MSDOS)
-void m_heapdump(M_NOPAR)
-  {
-    struct _heapinfo hinfo ;
-    int heapstatus ;
-
-    heapstatus = _heapchk() ;
-    if (heapstatus == _HEAPOK || heapstatus == _HEAPEMPTY) return ;
-    printf("\nDumping heap:\n") ;
-    hinfo._pentry = NULL ;
-    while ((heapstatus = _heapwalk(&hinfo)) == _HEAPOK) 
-      printf("%6s block at %p of size %4.4X\n",
-             hinfo._useflag == _USEDENTRY ? "USED" : "FREE",
-             hinfo._pentry, hinfo._size) ;
-    switch(heapstatus) {
-      case _HEAPEMPTY:
-        printf("OK - empty heap\n\n") ;
-        break ;
-      case _HEAPEND:
-        printf("OK - end of heap\n\n") ;
-        break ;
-      case _HEAPBADPTR:
-        printf("Error - bad pointer to heap\n\n") ;
-        break ;
-      case _HEAPBADBEGIN:
-        printf("Error - bad start of heap\n\n") ;
-        break ;
-      case _HEAPBADNODE:
-        printf("Error - bad node in heap\n\n") ;
-        break ;
-      }
-    m_exit(TRUE) ;
     }
-#endif
 
-void *m_malloc(size, msg)
-  int size ;
-  char *msg ;
+void *m_malloc(int size, char *msg)
   {
     char buffer[32] ;
     void *p ;
 
     size *= sizeof(M_WCHAR);
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! size) return(NULL) ;
     p = (void *) malloc(size) ;
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! p) {
       m_errline("Unable to allocate space for ") ;
       m_errline(msg) ;
@@ -187,23 +101,14 @@ void *m_malloc(size, msg)
     return(p) ;
     }
 
-void *m_realloc(ptr, size, msg)
-  void *ptr ;
-  int size ;
-  char *msg ;
+void *m_realloc(void *ptr, int size, char *msg)
   {
     char buffer[32] ;
     void *p ;
 
     size *= sizeof(M_WCHAR);
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! size) return(NULL) ;
     p = (void *) realloc(ptr, size) ;
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! p) {
       m_errline("Unable to re-allocate space for ") ;
       m_errline(msg) ;
index 824cc1219a6f6cc6037148a2a1300269d5bac0bb..44da72599dcf896a84f0820dc04105496759441d 100644 (file)
 */
 
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
 extern FILE *m_errfile ;
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
 
 /* Open a file and check that the open succeeded */
-void m_openchk(ptr, name, mode)
-  FILE **ptr ;
-  char *name, *mode ;
+void m_openchk(FILE **ptr, char *name, char *mode)
   {
     *ptr = fopen(name, mode) ;
     if (*ptr) return ;
index 561c8721222c28ccf0088e903efb1c76be825aba..b12886c7e3daa2c1fcf6dcc41c2056e1d3a0f131 100644 (file)
@@ -33,13 +33,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Check to see if string is a valid value for parameter par.  If so
    return a pointer to the keyword if it's a keyword parameter and otherwise
    a pointer to string.  If not valid, return FALSE. */
-#if defined(M_PROTO)
 const M_WCHAR *m_partype(const int par , const M_WCHAR *string )
-#else
-M_WCHAR *m_partype(par, string)
-  int par ;
-  M_WCHAR *string ;
-#endif /* M_PROTO */
   {
     LOGICAL first = TRUE ;
     int kw ;
index ca3ee61097b405bd0162c3825d3298a867988a33..7a45adf6fbe9a44cd9f94cbcc3919675d8f65f2f 100644 (file)
@@ -28,7 +28,7 @@
 extern FILE *ifile;
 
 /* Getachar returns the next character from the input stream */
-int getachar(M_NOPAR)
+int getachar(void)
 {
 int  c;
 M_WCHAR wc,wnl;
@@ -72,9 +72,7 @@ return((int) wc);
 }
 
 /* Reads the next token stored in a packed trie (as defined by context.dat) */
-int gettoken(c, context)
-int *c;
-int context;
+int gettoken(int *c, int context)
 {
 int hold[MAXD + 1];
 int ucase;
@@ -123,8 +121,7 @@ return(M_NULLVAL);
 }
 
 /* Reads a literal (called after the opening quotation mark is read) */
-LOGICAL litproc(delim)
-int delim;
+LOGICAL litproc(int delim)
 {
 int n, i, number;
 M_WCHAR *p, *pStart; /* bigger than wide versions of lit or lita */
@@ -215,8 +212,7 @@ return(FALSE);
 
 /* Returns a context-dependent delimiter string to input stream so
    characters can be reread one at a time in another context */
-void undodelim(delim)
-M_WCHAR *delim;
+void undodelim(M_WCHAR *delim)
 {
 M_WCHAR *p;
 
@@ -234,8 +230,7 @@ while (TRUE)
 /* Returns a character to the input stream to read again later. Unexplained
    problems occurred using standard ungetc procedure; hence
    explicit declaration of buffer for read-ahead characters */
-void ungetachar(c)
-int c;
+void ungetachar(int c)
 {
 M_WCHAR wnl;
 
index 6216398f33f1adcb809a29ed6d255b5d8c6573b9..57cea3380cb14de211489864fa519f1a16bd7ad3 100644 (file)
@@ -25,8 +25,7 @@
 /* Sparse.c has a procedure used with the tables generated by program
    CONTEXT when the sparse option is used */
 
-int m_sprscon(i, j)
-  int i, j ;
+int m_sprscon(int i, int j)
   {
     int k ;
 
index ddb5a1d2520d3a692775e3bb0b87d433eb5237b8..7ccc55ffda0001538e70fef0b91b459977ab2219 100644 (file)
 #if defined(sparse)
 #define m_newcon(i, j) m_sprscon(i, j)
 
-int m_sprscon(
-#if defined(M_PROTO)
-  int i, int j
-#endif
-  ) ;
+int m_sprscon(int i, int j);
 
 #else
 #define m_newcon(i, j) m_nextcon[i][j]
index fb4685948790662dd80efe8616086cf17687727a..020b91df5b369461961c37c06bc79fde0919eab0 100644 (file)
@@ -21,8 +21,8 @@
  * Floor, Boston, MA 02110-1301 USA
  */
 /* $XConsortium: strstr.c /main/3 1995/11/08 09:54:55 rswiston $ */
-char *strstr ( s1, s2 )
-char *s1, *s2 ; {
+char *strstr (char *s1, char *s2)
+{
        
        int x, y ;
        
index b27e5ecead3fd1e3ac5484d7d1e7b20e671835a0..5490569c87cf8280a31cbf8b6b11a3ecbe11c88e 100644 (file)
 
 #include <stdio.h>
 
-#if defined(MSDOS)
-#include <stdlib.h>
-#endif
-
 #include "basic.h"
 #include "common.h"
 #include "trie.h"
@@ -45,26 +41,12 @@ extern FILE *m_errfile ;
 
 extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void m_entercharintrie(
-#if defined(M_PROTO)
-  M_TRIE **currentnode, M_WCHAR c
-#endif
-  ) ;
+void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c);
 
 /* Enters the next character of a string into a trie */
-#if defined(M_PROTO)
 void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c)
-#else
-void m_entercharintrie(currentnode, c)
-  M_TRIE **currentnode ;
-  M_WCHAR c ;
-#endif
   {
     M_TRIE *newnode ;
 
@@ -99,7 +81,7 @@ void m_entercharintrie(currentnode, c)
    } /* end entertree */
 
 /* Gets a new node for a trie */
-M_TRIE *m_gettrienode(M_NOPAR)
+M_TRIE *m_gettrienode(void)
   {
     M_TRIE *new ;
 
@@ -112,13 +94,7 @@ M_TRIE *m_gettrienode(M_NOPAR)
 
 /* M_lookfortrie(p, xtrie) looks for string p in the specified trie,
    returning its data value if found and otherwise FALSE */
-#if defined(M_PROTO)
 void *m_lookfortrie( const M_WCHAR *p , const M_TRIE *xtrie )
-#else
-void *m_lookfortrie(p, xtrie)
-  M_WCHAR *p ;
-  M_TRIE *xtrie ;
-#endif /* M_PROTO */
   {
     M_TRIE *currentnode ;
 
@@ -141,10 +117,7 @@ void *m_lookfortrie(p, xtrie)
     }
 
 /* Enters a string and associated data value into a trie */
-void *m_ntrtrie(p, xtrie, dataval)
-  M_WCHAR *p ;
-  M_TRIE *xtrie ;
-  void *dataval ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval)
   {
     M_TRIE *currentnode ;
     void *n ;
index 648a9843fc5a0645a9e2acac545820e2924cc618..bf2a9da5f9d172cacb258e01785baf3255c85487 100644 (file)
@@ -51,26 +51,10 @@ struct m_ptrie {
   } ;
 
 
-M_TRIE *m_gettrienode(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+M_TRIE *m_gettrienode(void);
 
-void *m_lookfortrie(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_TRIE *xtrie
-#endif
-  ) ;
+void *m_lookfortrie(const M_WCHAR *p, const M_TRIE *xtrie);
 
-void *m_ntrtrie(
-#if defined(M_PROTO)
-  M_WCHAR *p, M_TRIE *xtrie, void *dataval
-#endif
-  ) ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval);
 
-void *m_resettrie(
-#if defined(M_PROTO)
-  M_TRIE *xtrie, M_WCHAR *p, void *value
-#endif
-  ) ;
+void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value);
index a27e3a9fb7b628f23716d61413640e813ee0eacc..079bed8c6b33b4fb8fdfd25abc681315f8fafece 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
-    void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+    void (*proc)(FILE *file, void *value));
 
-void printval(
-#if defined(M_PROTO)
-  FILE *file, void *value
-#endif
-  ) ;
+void printval(FILE *file, void *value);
 
 /* Count the descendants of a node in order to generate declarations for
    the packed form of a trie*/
-void countdown(parent, count)
-  M_TRIE *parent ;
-  int *count ;
+void countdown(M_TRIE *parent, int *count)
   {
     M_TRIE *child ;
 
@@ -66,17 +52,8 @@ void countdown(parent, count)
 
 /* Output descendants of a node for the declaration of a trie, in packed
    or normal format*/
-void dumpnode(first, file, trieptr, count, proc)
-  LOGICAL *first ;
-  FILE *file ;
-  M_TRIE *trieptr ;
-  int *count ;
-  void (*proc) (
-#if defined (M_PROTO)
-    FILE *file, 
-    void *value
-#endif
-    ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+              void (*proc) (FILE *file, void *value))
   {
     M_TRIE *p ;
     int savecount ;
@@ -106,9 +83,7 @@ void dumpnode(first, file, trieptr, count, proc)
 
 
 /* Most common procedure passed to dumpptrie */
-void printval(file, value)
-  FILE *file ;
-  void *value ;
+void printval(FILE *file, void *value)
   {
     fprintf(file, ", %ld", (long) value) ;
     }
index d2a41703eedce47dc4ecf844ae5fe5387c8690d7..859b16c629ac6d309f7daeaf37cdf9b4c8add282 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *xtrie, char *extname, int *count,
-  void (*proc)(void *value)
-#endif
-  ) ;
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count, void (*proc)(void *value));
 
 /* Write the C declaration of a trie */
-void m_dumptrie(file, xtrie, extname, count, proc)
-  FILE *file ;
-  M_TRIE *xtrie ;
-  char *extname ;
-  int *count ;
-  void (*proc)(
-#if defined(M_PROTO)
-    void *value
-#endif
-    ) ;
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count,
+                void (*proc)(void *value))
   {
     int firstson ;
     M_TRIE *p ;
index 1ac30ae01df495e740d67eae587b7063e3945bf4..7058d59f63f80334bd0ded7081b0ffd125d7c948 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
-    void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+    void (*proc)(FILE *file, void *value));
 
-void dumpptrie(
-#if defined(M_PROTO)
-  M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
-  void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+  void (*proc)(FILE *file, void *value));
 
 /* Write the declaration of a packed trie to the specified files */
-void dumpptrie(intname, extname, file, externdef, defdef, proc)
-  M_TRIE *intname ;
-  char *extname ;
-  FILE *file ;
-  char *externdef ;
-  char *defdef ;
-  void (*proc) (
-#if defined (M_PROTO)
-    FILE *file,
-    void *value
-#endif
-    ) ;
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file,
+               char *externdef, char *defdef,
+               void (*proc) (FILE *file, void *value))
   {
     LOGICAL first = TRUE ;
     int count = 0 ;
index 0c2451a34f85e2fba1d3f50c25850f2f5cb59ac2..0a6607aae21a27fa971f2bc1fcb010977731c825 100644 (file)
 
 extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
 
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie,
-  M_WCHAR *name
-#endif
-  ) ;
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
 
 /* Look for the string NAME in the packed trie PTRIE */
-int m_packedlook(xptrie, name)
-M_PTRIE *xptrie ;
-M_WCHAR *name ;
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name)
 {
 int current = 0 ;
 int i ;
index e923176bc11f8cbb87854127babaee525955dc05..d397eabe98baa0718a88d1693ad8d0e09c1134a3 100644 (file)
 extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
 
 /* Changes the value associated with an entry in a trie. */
-void *m_resettrie(xtrie, p, value)
-  M_TRIE *xtrie ;
-  M_WCHAR *p ;
-  void *value ;
+void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value)
   {
     M_TRIE *currentnode ;
 
index a2b4268dcd31d6e231157f7c3f41c96735533074..2e4aa006acaf5ed4508da114207c6d8261dc99e7 100644 (file)
 #include "common.h"
 extern M_CHARTYPE m_ctarray[256] ;
 
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
 
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
 
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
+int m_mbmbupstrcmp(const char *p, const char *q);
 
-#if defined(M_PROTO)
 int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q )
-#else
-int m_wcupstrcmp(p, q)
-  M_WCHAR *p, *q ;
-#endif /* M_PROTO */
   {
     do {
       if (m_ctupper(*p) < m_ctupper(*q)) return(-1) ;
@@ -65,13 +48,7 @@ int m_wcupstrcmp(p, q)
     return(0) ;
     }
 
-#if defined(M_PROTO)
 int m_wcmbupstrcmp(const M_WCHAR *p, const char *q)
-#else
-int m_wcmbupstrcmp(p, q)
-  M_WCHAR *p;
-  char *q ;
-#endif
   {
   M_WCHAR *wc;
   int      retval;
@@ -82,13 +59,7 @@ int m_wcmbupstrcmp(p, q)
   return retval;
   }
 
-#if defined(M_PROTO)
 int m_mbmbupstrcmp(const char *p, const char *q)
-#else
-int m_mbmbupstrcmp(p, q)
-  char *p;
-  char *q ;
-#endif
   {
   M_WCHAR *w_p, *w_q;
   int      retval;
index df1ac6f52a77a8b637d8628ab429c769de6b8e0c..0515984ebf0607ba9f0dcb84080af56aea91d4f8 100644 (file)
 
 #include "basic.h"
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-int m_upper(c)
-  int c ;
+int m_upper(int c)
   {
     if (c >= 'a' && c <= 'z') c += 'A' - 'a' ;
     return(c) ;
index e3a7f5617ba6445dbde0b78df22934b0339561d0..3e8254a69623953f3ce6dd6e7c227c5c58e47022 100644 (file)
 
 #include "basic.h"
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_upper(int c);
 
-int m_upstrcmp(
-#if defined(M_PROTO)
-  char *p, char *q
-#endif
-  ) ;
-
-int m_upstrcmp(p, q)
-  char *p, *q ;
+int m_upstrcmp(char *p, char *q)
   {
     do {
       if (m_upper((int) *p) < m_upper((int) *q)) return(-1) ;
index 3a1ae0d2019af68903e99816b6d2e6703d9de3a9..4927efdcbfd0e20c4ebe95fbe932b18388719e6d 100644 (file)
 
 
 /* compare two wide character strings */
-#if defined(M_PROTO)
 int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2)
-#else
-int w_strcmp(string1, string2)
-M_WCHAR *string1;
-M_WCHAR *string2;
-#endif
 {
 M_WCHAR c1, c2, null;
 
@@ -60,13 +54,7 @@ while (1)
 
 
 /* copy a wide character string */
-#if defined(M_PROTO)
 M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2)
-#else
-M_WCHAR *w_strcpy(string1, string2)
-M_WCHAR *string1;
-M_WCHAR *string2;
-#endif
 {
 M_WCHAR *string1start;
 
@@ -79,14 +67,7 @@ return string1start;
 
 
 /* copy a wide character string, stopping after "max" moves */
-#if defined(M_PROTO)
 M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max)
-#else
-M_WCHAR *w_strncpy(string1, string2, max)
-M_WCHAR *string1;
-M_WCHAR *string2;
-int      max;
-#endif
 {
 M_WCHAR *string1start;
 
@@ -99,12 +80,7 @@ return string1start;
 
 
 /* get the length of a wide character string */
-#if defined(M_PROTO)
 int w_strlen(const M_WCHAR *string)
-#else
-int w_strlen(string)
-M_WCHAR *string;
-#endif
 {
 int length;
 
@@ -117,12 +93,7 @@ return length;
 
 
 /* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
 M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr)
-#else
-M_WCHAR *w_strchr(string, chr)
-M_WCHAR *string, chr;
-#endif
 {
 M_WCHAR *where;
 
@@ -142,12 +113,7 @@ else
 
 
 /* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
 M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2)
-#else
-M_WCHAR *w_strstr(string1, string2)
-M_WCHAR *string1, *string2;
-#endif
 {
 M_WCHAR *where1, *where2;
 
@@ -182,12 +148,7 @@ return NULL;
 
 
 /* make a multi-byte string from a wide character string */
-#if defined(M_PROTO)
 char *MakeMByteString(const M_WCHAR *wc_string)
-#else
-char *MakeMByteString(wc_string)
-M_WCHAR *wc_string;
-#endif
 {
 char   *mb_string;
 int     length, retVal;
@@ -217,12 +178,7 @@ return mb_string;
 
 
 /* make a wide character string from a multi-byte string */
-#if defined(M_PROTO)
 M_WCHAR *MakeWideCharString(const char *mb_string)
-#else
-M_WCHAR *MakeWideCharString(mb_string)
-char *mb_string;
-#endif
 {
 M_WCHAR *wc_string, *wc_stringStart;
 int      length, incr;
@@ -258,8 +214,7 @@ return wc_stringStart;
 
 
 /* Get-wide-char procedure */
-int mb_getwc(m_ptr)
-void *m_ptr;
+int mb_getwc(void *m_ptr)
 {
 int  c;
 M_WCHAR wc;
index 07e08d6826aceca71a39e05db47053773d4f41d0..8b9c8b469cc7bae03bac212ed5fb243a549c710b 100644 (file)
 
 #include "basic.h"
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+LOGICAL m_whitespace(M_WCHAR c);
 
 /* Test if character c is a blank, tab, or carriage return */
-#if defined(M_PROTO)
 LOGICAL m_whitespace(M_WCHAR c)
-#else
-LOGICAL m_whitespace(c)
-  M_WCHAR c ;
-#endif
 {
 char mb_c[32]; /* arbitrarily large */
 int  length;
index 0bca5ab35694c1c0084d6b6036f3b0ef6d45cd43..02bf4022471bd928cfe79519284a9e098684ea26 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "context.h"
 #define BUILDEF
 #include "build.h"
@@ -41,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entdef.h"
 
 /* Main procedure */
-int main(argc, argv)
-int argc ;
-char **argv ;
+int main(int argc, char **argv)
 {
 int m_prevcon ;
 
index bebdf1fd0165345e0a015cd11dc8492811bd65c7..023896a575c3c9c2c21e37d5321d4562e27e527f 100644 (file)
@@ -421,8 +421,4 @@ BUILDEXTERN LOGICAL entrule BUILDINIT(FALSE) ;
 
 BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
 
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
+M_WCHAR *MakeWideCharString(const char *from);
index 6e137577b7b20fbce1516ab57feef08d1aac5a78..d3efc242f344e17d260f5f4021a3548a707369e7 100644 (file)
@@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Verify that <PARAM>, <MIN> or <USEMAP> has not previously occurred in
    this rule */
-void found(flag, delim)
-LOGICAL *flag;
-char *delim;
+void found(LOGICAL *flag, char *delim)
 {
 M_WCHAR wcbuff[129];
 ssize_t  length;
@@ -62,7 +60,7 @@ if (*flag)
 }
 
 /* Program initialization */
-void initialize(M_NOPAR)
+void initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
@@ -90,7 +88,7 @@ ruleinit() ;
 
 
 /* Initialization before starting a new rule */
-void ruleinit(M_NOPAR)
+void ruleinit(void)
   {
     /* Reinitialize for next rule */
     lhs = NULL ;
@@ -110,7 +108,7 @@ void ruleinit(M_NOPAR)
     }
 
 /* Rule end processing */
-void rulend(M_NOPAR)
+void rulend(void)
   {
     STATE *fsa = NULL ;
     LOGICAL canbenull ;
@@ -150,7 +148,7 @@ void rulend(M_NOPAR)
     }
 
 /* Skip rest of statement after an error */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
   {
     int i ;
     static int errlev = 0 ;
index 0049e076b2f67b0f5289a855bfa1a1252ba9ab59..eb8e39729d50e7877464194e8b71d185c13cb811 100644 (file)
@@ -34,8 +34,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "build.h"
 
 /* Enters an element name into the element name tree */
-ELTSTRUCT *ntrelt(p)
-  M_WCHAR *p ;
+ELTSTRUCT *ntrelt(M_WCHAR *p)
   {
     ELTSTRUCT *new ;
     ELTSTRUCT *old ;
index 4b877462cd575efdad52599716ee3da60affb02d..e9686335b181479f15492333788e8f058918a358 100644 (file)
@@ -32,7 +32,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "build.h"
 
 /* Add an exception (inclusion or exclusion) for the current element */
-void addex(M_NOPAR)
+void addex(void)
   {
     excount++ ;
     *nextex = (EXCEPTION *) m_malloc(sizeof(EXCEPTION), "exception") ;
index a4d3b5b07f2d783f4a2f92eefe2b801853c9365b..7f9ce0758127bbfbd614d16593911d9ee5e766a3 100644 (file)
@@ -37,18 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Addarc adds an arc from FSA state <from> to state <to> setting other
    fields as indicated by the other parameters.*/
-#if defined(M_PROTO)
 int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, int id, LOGICAL minim, ELTSTRUCT **errelt)
-#else
-int addarc(from, to, label, and, optional, id, minim, errelt)
-  STATE *from, *to ;
-  ELTSTRUCT *label ;
-  ANDGROUP *and ;
-  LOGICAL optional ;
-  int id ;
-  LOGICAL minim ;
-  ELTSTRUCT **errelt ;
-#endif
   {
     ARC *parc, *qarc ;
     int determ ;
@@ -69,11 +58,7 @@ int addarc(from, to, label, and, optional, id, minim, errelt)
 
 /*checkand is used to verify nondeterminism from start and final states
   of FSA's generated from and groups*/
-void checkand(andstart, andptr, start, root, errelt)
-  ANDGROUP *andstart, *andptr ;
-  STATE *start ;
-  TREE *root ;
-  ELTSTRUCT **errelt ;    
+void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root, ELTSTRUCT **errelt)
   {
     ARC *parc ;
     ANDGROUP *pand ;
@@ -97,12 +82,7 @@ void checkand(andstart, andptr, start, root, errelt)
 /*Checkdfsa is called when adding an arc to an FSA in order to verify that
 no existing arc from the same state (or from a start state of an and-group
 FSA labelling an arc from the same state) has the same label. */
-int checkdfsa(from, label, and, id, errelt)
-  STATE *from ;
-  ELTSTRUCT *label ;
-  ANDGROUP *and ;
-  int id ;
-  ELTSTRUCT **errelt ;
+int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt)
   {
     int c ;
     ARC *parc ;
@@ -127,10 +107,7 @@ int checkdfsa(from, label, and, id, errelt)
     }
 
 /* Check use of repeated models with and groups */
-int checkrepeat(from, and, errelt)
-  STATE *from ;
-  ANDGROUP *and ;
-  ELTSTRUCT **errelt ;
+int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt)
   {
     ARC *parc ;
     int c ;
@@ -153,8 +130,7 @@ int checkrepeat(from, and, errelt)
     }
 
 /* Copyintolist copies one list of states into another */
-void copyintolist(from, to)
-  STATELIST *from, **to ;
+void copyintolist(STATELIST *from, STATELIST **to)
   {
     STATELIST **new, *old ;
 
@@ -172,8 +148,7 @@ void copyintolist(from, to)
     }
 
 /* Dellist deletes a list of states */
-void dellist(list)
-  STATELIST **list ;
+void dellist(STATELIST **list)
   {
     STATELIST *p, *q ;
 
@@ -187,7 +162,7 @@ void dellist(list)
 
 /* Delstartarcs deletes the contents of the starta list of arcs from start
    states of a submodel */
-void delstartarcs(M_NOPAR)
+void delstartarcs(void)
   {
     ARC *arcptr ;
     ARC *discard ;
@@ -201,7 +176,7 @@ void delstartarcs(M_NOPAR)
     }
 
 /* Getand allocates and initializes a new andgroup structure */
-ANDGROUP *getand(M_NOPAR)
+ANDGROUP *getand(void)
   {
     ANDGROUP *new ;
 
@@ -214,7 +189,7 @@ ANDGROUP *getand(M_NOPAR)
     }    
 
 /* Getstate obtains an FSA state */
-STATE *getstate(M_NOPAR)
+STATE *getstate(void)
   {
     STATE *new ;
 
@@ -231,10 +206,7 @@ STATE *getstate(M_NOPAR)
     }
 
 /* Makeand processes a submodel whose connector is & */
-void makeand(canbenull, root, optional)
-  LOGICAL *canbenull ;
-  TREE *root ;
-  int optional ;
+void makeand(LOGICAL *canbenull, TREE *root, int optional)
   {
     TREE *child ;
     STATELIST *start, *final ;
@@ -319,9 +291,7 @@ void makeand(canbenull, root, optional)
    allfinal is passed from model to submodel; information in newfinal
    goes from submodel to model.
    */
-LOGICAL makefsa(root, optional)
-  TREE *root ;
-  int optional ;
+LOGICAL makefsa(TREE *root, int optional)
   {
     LOGICAL canbenull ;
 
@@ -355,9 +325,7 @@ LOGICAL makefsa(root, optional)
     }
 
 /* Makeor processes a submodel whose connector is | */
-void makeor(canbenull, root)
-  LOGICAL *canbenull ;
-  TREE *root ;
+void makeor(LOGICAL *canbenull, TREE *root)
   {
     TREE *child ;
     STATELIST *final ;
@@ -379,10 +347,7 @@ void makeor(canbenull, root)
     }
 
 /* Makeseq processes a submodel whose connector is , */
-void makeseq(canbenull, root, optional)
-  LOGICAL *canbenull ;
-  TREE *root ;
-  int optional ;
+void makeseq(LOGICAL *canbenull, TREE *root, int optional)
   {
     LOGICAL branchnull ;
     STATELIST *keepfinal = NULL, *final ;
@@ -420,10 +385,7 @@ void makeseq(canbenull, root, optional)
 
 /* Nondeterm issues a diagnostic when a nondeterministic model is
    encountered */
-void nondeterm(root, c, eltp)
-  TREE *root ;
-  int c ;
-  ELTSTRUCT *eltp ;
+void nondeterm(TREE *root, int c, ELTSTRUCT *eltp)
   {
   M_WCHAR *wtemp;
 
@@ -454,8 +416,7 @@ void nondeterm(root, c, eltp)
 
 /* Notinlist returns TRUE iff item is not in list.  If item is in list,
    it makes sure that the stored nesting level is the smaller of the two */
-LOGICAL notinlist(item, list)
-  STATELIST *item, *list ;
+LOGICAL notinlist(STATELIST *item, STATELIST *list)
   {
     for ( ; list ; list = list->next)
       if (list->value == item->value) {
@@ -467,8 +428,7 @@ LOGICAL notinlist(item, list)
 
 /* Returns true if the arc is labeled #PCDATA or with an and-group that
    has an arc labelled #PCDATA from a start state */
-LOGICAL permitspcd(a)
-  ARC *a ;
+LOGICAL permitspcd(ARC *a)
   {
     ANDGROUP *pand ;
     ARC *b ;
@@ -488,7 +448,7 @@ LOGICAL permitspcd(a)
 
 /* Pop pops the submodel stack when the end of the current submodel is
    encountered */
-void pop(M_NOPAR)
+void pop(void)
   {
     STACK *discard ;
 
@@ -504,7 +464,7 @@ void pop(M_NOPAR)
     }
 
 /* Push pushes the submodel stack when a new group is encountered */
-void push(M_NOPAR)
+void push(void)
   {
     STACK *new ;
 
@@ -518,8 +478,7 @@ void push(M_NOPAR)
 
 /* Regenerate is used in error processing to print the portion of a grammar
    rule preceding an error */
-LOGICAL regenerate(start, stop)
-TREE *start, *stop ;
+LOGICAL regenerate(TREE *start, TREE *stop)
 {
 TREE *child ;
 
@@ -565,8 +524,7 @@ return(FALSE) ;
    by adding arcs from all the final states to all the states reachable
    in one transition from a start state, labelling them as arcs from
    start states are labelled. */
-void repeat(root)
-  TREE *root ;
+void repeat(TREE *root)
   {
     STATELIST *final ;
     ARC *a ;
@@ -617,9 +575,7 @@ void repeat(root)
 
 /* Used during processing of occurrence indicators in content models such
    as (a+)+ to prohibit duplicate arcs */
-LOGICAL samelabelarc(a, s)
-  ARC *a ;
-  STATE *s ;
+LOGICAL samelabelarc(ARC *a, STATE *s)
   {
     ARC *b ;
 
@@ -630,12 +586,7 @@ LOGICAL samelabelarc(a, s)
 
 /* Saves the name of an element appearing on the left-hand side of a
    grammar rule */
-#if defined(M_PROTO)
 void savelhs(LOGICAL param)
-#else
-void savelhs(param)
-  LOGICAL param ;
-#endif
   {
     STATE *end ;
     ELTSTRUCT *errelt ;
@@ -663,7 +614,7 @@ void savelhs(param)
 /* Called when arcs are added to the start state of a submodel that is
    also a start state of the parent model to set the parent model's
    starta list */
-void savestartarcs(M_NOPAR)
+void savestartarcs(void)
   {
     ARC *carcptr, *parcptr ;
 
@@ -682,11 +633,7 @@ void savestartarcs(M_NOPAR)
 
 /* Simplebranch adds a new state and transition to it in an FSA when a
    submodel consists of a single element or of an and group */
-void simplebranch(root, value, group, optional)
-  TREE *root ;
-  ELTSTRUCT *value ;
-  ANDGROUP *group ;
-  int optional ;
+void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional)
   {
     STATE *new = NULL ;
     STATELIST *index ;
@@ -734,9 +681,7 @@ void simplebranch(root, value, group, optional)
    subtree in the tree representing the grammar rule being processed and
    the pointer to a flag that is set to indicate whether or not the
    submodel can be null. */
-STATE *startfsa(root, canbenull)
-  TREE *root ;
-  LOGICAL *canbenull ;
+STATE *startfsa(TREE *root, LOGICAL *canbenull)
   {
     STATELIST *item ;
     STATE *first ;
index 3d9a344adb78a3e5e18ae708929df7eb09c7326c..af50a14856b2870c51a6d6ca7c3d50a19576c95f 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "context.h"
 #include "build.h"
 #include "delim.h"
@@ -72,8 +69,7 @@ char mrequired[] = "M_REQUIRED" ;
 
 /* Deftype returns a string indicating the default type of the nth parameter.
    */
-char *deftype(n)
-  int n ;
+char *deftype(int n)
   {
     switch (n) {
       case NAME: return(mnamedef) ;
@@ -87,7 +83,7 @@ char *deftype(n)
     }
 
 /* Called after all input is read to generate output */
-void done(M_NOPAR)
+void done(void)
   {
 
     if (! eltree.data) {
@@ -104,9 +100,7 @@ void done(M_NOPAR)
     }
 
 /* Prints data value of an entry in the element name tree */
-void dumpentnode(file, value)
-  FILE *file ;
-  M_TRIE *value ;
+void dumpentnode(FILE *file, M_TRIE *value)
   {
 
     fprintf(file, ", %d", ((ELTSTRUCT *) value)->eltno) ;
@@ -114,9 +108,7 @@ void dumpentnode(file, value)
 
 /* Prints data value of an entry in the trie of short reference map names,
    reporting any maps that are referenced but not defined */
-void dumpmapnode(file, value)
-  FILE *file ;
-  M_TRIE *value ;
+void dumpmapnode(FILE *file, M_TRIE *value)
   {
     fprintf(file, ", %d", ((MAP *) value)->map) ;
     if (! ((MAP *) value)->defined)
@@ -126,9 +118,7 @@ void dumpmapnode(file, value)
 
 
 /* Prints data value of an entry in the trie of short reference delimiters */
-void dumpsrefnode(file, value)
-  FILE *file ;
-  M_TRIE *value ;
+void dumpsrefnode(FILE *file, M_TRIE *value)
   {
     fprintf(file, ", %d", ((SREFSTRUCT *) value)->srefcnt) ;
     }
@@ -136,8 +126,7 @@ void dumpsrefnode(file, value)
 
 /* Controls printing of element blocks in alphabetical order to the
    template file */
-void eltblocks(tempfile)
-  FILE *tempfile ;
+void eltblocks(FILE *tempfile)
   {
     int n ;
     M_TRIE *node[M_NAMELEN + 1] ;
@@ -167,7 +156,7 @@ void eltblocks(tempfile)
 
 
 /* Writes data about elements */
-void eltreeout(M_NOPAR)
+void eltreeout(void)
   {
     M_WCHAR *p ;
     int enameindex = 0 ;
@@ -226,8 +215,7 @@ void eltreeout(M_NOPAR)
     }
 
 /* Enttype returns a string indicating the type of an entity */
-char *enttype(n)
-  int n ;
+char *enttype(int n)
   {
     switch(n) {
       case M_GENERAL: return(mgeneral) ;
@@ -245,7 +233,7 @@ char *enttype(n)
     }
 
 /* Outputs exception lists */
-void exout(M_NOPAR)
+void exout(void)
   {
     EXCEPTION *ex ;
     int exindex = 0 ;
@@ -268,7 +256,7 @@ void exout(M_NOPAR)
     }
 
 /* Outputs FSA definitions */
-void fsa(M_NOPAR)
+void fsa(void)
   {
     int arcount = 0 ;
     STATE *pstate ;
@@ -331,7 +319,7 @@ void fsa(M_NOPAR)
     }
 
 /* Writes data about parameters */
-void parout(M_NOPAR)
+void parout(void)
 {
 PARAMETER *paramp ;
 LOGICAL first = TRUE ;
@@ -455,8 +443,7 @@ fprintf(dtd, "#define M_MAXPAR %d\n\n", maxpar) ;
 }
 
 /* Partype returns a string indicating the type of the nth parameter. */
-char *partype(n)
-  int n ;
+char *partype(int n)
   {
     switch(n) {
       case GRPO: return(mkeyword) ;
@@ -480,7 +467,7 @@ char *partype(n)
     }
 
 /* Write short reference information */
-void srefout(M_NOPAR)
+void srefout(void)
   {
     LOGICAL first = TRUE ;
     int *mapbysref = NULL;
@@ -548,9 +535,7 @@ void srefout(M_NOPAR)
     }
 
 /* Output one element block in a template */
-void tempelt(eltp, tempfile)
-ELTSTRUCT *eltp ;
-FILE *tempfile ;
+void tempelt(ELTSTRUCT *eltp, FILE *tempfile)
 {
 PARAMETER *paramp ;
 PTYPE *ptypep ;
@@ -629,7 +614,7 @@ fputs("  <END-STRING><\\END-STRING>\n", tempfile) ;
 }
 
 /* Write template */
-void template(M_NOPAR)
+void template(void)
   {
     FILE *tempfile ;
     M_ENTITY *ent ;
@@ -656,8 +641,7 @@ void template(M_NOPAR)
     }
 
 /* Typecon returns a string indicating the content type of the nth element.*/
-char *typecon(n)
-  int n ;
+char *typecon(int n)
   {
     switch(n) {
       case GRPO: return(mregexp) ;
index 837c649af2d80cf35167a6705d95ae3e508d031b..97753c0c43767213db0fef6c4dd8b730be724e85 100644 (file)
@@ -38,7 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Add a keyword to the list of possible values of a keyword parameter for
    the current element
 */
-void addkeyword(M_NOPAR)
+void addkeyword(void)
 {
 int length ;
 PARAMETER *par ;
@@ -87,7 +87,7 @@ ptypelen++ ;
 }
 
 /* Add a parameter to the current element */
-void addpar(M_NOPAR)
+void addpar(void)
 {
 PARAMETER *paramp, *last  = NULL ;
 int length ;
@@ -124,12 +124,7 @@ newpar->ptypep = NULL ;
 
 
 /* Check that specified default value is legal parameter value */
-#if defined(M_PROTO)
 LOGICAL checkdefault( const M_WCHAR *string )
-#else
-LOGICAL checkdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 const M_WCHAR *p ;
 int len ;
@@ -205,12 +200,7 @@ switch (newpar->type)
 
 /* Normalize parameter default.  Change tabs and RE's to spaces, capitalize
    all letters (unless type is CDATA), remove extra space in lists */
-#if defined(M_PROTO)
 void normdefault(M_WCHAR *string )
-#else
-void normdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 M_WCHAR *p, *q ;
 int i, ret ;
@@ -273,7 +263,7 @@ switch (newpar->type)
 }
 
 /* Called at end of parameter attribute list rule */
-void prulend(M_NOPAR)
+void prulend(void)
 {
 LHS *lhsp ;
 LHS *discard ;
@@ -296,12 +286,7 @@ ruleinit() ;
 }
 
 /* Make string the default for the current parameter of the current element */
-#if defined(M_PROTO)
 void setdefault(const M_WCHAR *string)
-#else
-void setdefault()
-M_WCHAR *string;
-#endif /* M_PROTO */
 {
 PTYPE *kw ;
 int keycount ;
index 01a931769958e4999bc34edf3dd77c0723c54415..e5396c6b903b2daebad96f3778b4b190fdf8ed14 100644 (file)
 /* Proto.h contains function prototypes for program BUILD. */
 
 
-int addarc(
-#if defined(M_PROTO)
-  STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, 
-  int id, LOGICAL minim, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-void adddefent(
-#if defined(M_PROTO)
-  M_WCHAR *mapname
-#endif
-  ) ;
-
-LOGICAL addent(
-#if defined(M_PROTO)
-  M_WCHAR *name
-#endif
-  ) ;
-
-void addex(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void addkeyword(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL addmapname(
-#if defined(M_PROTO)
-  M_WCHAR *p, LOGICAL define
-#endif
-  ) ;
-
-void addndent(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void addpar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void addsref(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void checkand(
-#if defined(M_PROTO)
-  ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root, 
-  ELTSTRUCT **errelt
-#endif
-  ) ;
-
-LOGICAL checkdefault(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-int checkdfsa(
-#if defined(M_PROTO)
-  STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-int checkrepeat(
-#if defined(M_PROTO)
-  STATE *from, ANDGROUP *and, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-void copyintolist(
-#if defined(M_PROTO)
-  STATELIST *from, STATELIST **to
-#endif
-  ) ;
-
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
-
-void defmapname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *deftype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void dellist(
-#if defined(M_PROTO)
-  STATELIST **list
-#endif
-  ) ;
-
-void delstartarcs(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void dumpentnode(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
-
-void dumpmapnode(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
-
-void dumpsrefnode(
-#if defined(M_PROTO)
-  FILE *file,
-  M_TRIE *value
-#endif
-  ) ;
-
-void dumpptrie(
-#if defined(M_PROTO)
-  M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
-  void (*proc)( FILE *, M_TRIE *)
-#endif
-  ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE   *file,
+int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, 
+  int id, LOGICAL minim, ELTSTRUCT **errelt);
+
+void adddefent(M_WCHAR *mapname);
+
+LOGICAL addent(M_WCHAR *name);
+
+void addex(void);
+
+void addkeyword(void);
+
+LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
+
+void addndent(M_WCHAR *p);
+
+void addpar(void);
+
+void addsref(M_WCHAR *p);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root, 
+  ELTSTRUCT **errelt);
+
+LOGICAL checkdefault(const M_WCHAR *string);
+
+int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
+
+int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
+
+void copyintolist(STATELIST *from, STATELIST **to);
+
+void countdown(M_TRIE *parent, int *count);
+
+void defmapname(void);
+
+char *deftype(int n);
+
+void dellist(STATELIST **list);
+
+void delstartarcs(void);
+
+void done(void);
+
+void dumpentnode(FILE *file, M_TRIE *value);
+
+void dumpmapnode(FILE *file, M_TRIE *value);
+
+void dumpsrefnode(FILE *file,
+  M_TRIE *value);
+
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+  void (*proc)( FILE *, M_TRIE *));
+
+void m_dumptrie(FILE   *file,
   M_TRIE *xtrie,
   char   *extname,
   int    *count,
-  void  (*proc)(M_ENTITY *)
-#endif
-  ) ;
-
-void eltblocks(
-#if defined(M_PROTO)
-  FILE *tempfile
-#endif
-  ) ;
-
-void eltreeout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endmodel(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void entout(
-#if defined(M_PROTO)
-  char *fname
-#endif
-  ) ;
-
-char *enttype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void exout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void freetree(
-#if defined(M_PROTO)
-  TREE *ruletree
-#endif
-  ) ;
-
-void found(
-#if defined(M_PROTO)
-  LOGICAL *flag, char *delim
-#endif
-  ) ;
-
-void fsa(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int getachar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-ANDGROUP *getand(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL getname(
-#if defined(M_PROTO)
-  int first
-#endif
-  ) ;
-
-STATE *getstate(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int gettoken(
-#if defined(M_PROTO)
-  int *c, int context
-#endif
-  ) ;
-
-TREE *gettreenode(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void makeand(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root, int optional
-#endif
-  ) ;
-
-LOGICAL makefsa(
-#if defined(M_PROTO)
-  TREE *root, int optional
-#endif
-  ) ;
-
-void makeor(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root
-#endif
-  ) ;
-
-void makeseq(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root, int optional
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void msgline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void msg1line(
-#if defined(M_PROTO)
-  char *text, char *arg1
-#endif
-  ) ;
-
-void nondeterm(
-#if defined(M_PROTO)
-  TREE *root, int c, ELTSTRUCT *eltp
-#endif
-  ) ;
-
-void normdefault(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL notinlist(
-#if defined(M_PROTO)
-  STATELIST *item, STATELIST *list
-#endif
-  ) ;
-
-ELTSTRUCT *ntrelt(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void parout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *partype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-LOGICAL permitspcd(
-#if defined(M_PROTO)
-  ARC *a
-#endif
-  ) ;
-
-void pop(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void prulend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void push(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL regenerate(
-#if defined(M_PROTO)
-  TREE *start, TREE *stop
-#endif
-  ) ;
-
-void repeat(
-#if defined(M_PROTO)
-  TREE *root
-#endif
-  ) ;
-
-void ruleinit(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void rulend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL samelabelarc(
-#if defined(M_PROTO)
-  ARC *a, STATE *s
-#endif
-  ) ;
-
-void savelhs(
-#if defined(M_PROTO)
-  LOGICAL param
-#endif
-  ) ;
-
-void savestartarcs(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int scan(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void setdefault(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void simplebranch(
-#if defined(M_PROTO)
-  TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_sprscon(
-#if defined(M_PROTO)
-  int i, int j
-#endif
-  ) ;
-
-void srefout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-STATE *startfsa(
-#if defined(M_PROTO)
-  TREE *root, LOGICAL *canbenull
-#endif
-  ) ;
-
-void tempelt(
-#if defined(M_PROTO)
-  ELTSTRUCT *eltp, FILE *tempfile
-#endif
-  ) ;
-
-void template(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *typecon(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim
-#endif
-  ) ;
-
-void ungetachar(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-void warning2(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2
-#endif
-  ) ;
-
-void warning3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void warning4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+  void  (*proc)(M_ENTITY *));
+
+void eltblocks(FILE *tempfile);
+
+void eltreeout(void);
+
+void endmodel(void);
+
+void entout(char *fname);
+
+char *enttype(int n);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void exout(void);
+
+void m_free(void *block, char *msg);
+
+void freetree(TREE *ruletree);
+
+void found(LOGICAL *flag, char *delim);
+
+void fsa(void);
+
+int getachar(void);
+
+ANDGROUP *getand(void);
+
+LOGICAL getname(int first);
+
+STATE *getstate(void);
+
+int gettoken(int *c, int context);
+
+TREE *gettreenode(void);
+
+void m_initctype(void);
+
+void initialize(void);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void makeand(LOGICAL *canbenull, TREE *root, int optional);
+
+LOGICAL makefsa(TREE *root, int optional);
+
+void makeor(LOGICAL *canbenull, TREE *root);
+
+void makeseq(LOGICAL *canbenull, TREE *root, int optional);
+
+void *m_malloc(int size, char *msg);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
+
+void normdefault(M_WCHAR *string);
+
+LOGICAL notinlist(STATELIST *item, STATELIST *list);
+
+ELTSTRUCT *ntrelt(M_WCHAR *p);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void parout(void);
+
+char *partype(int n);
+
+LOGICAL permitspcd(ARC *a);
+
+void pop(void);
+
+void prulend(void);
+
+void push(void);
+
+LOGICAL regenerate(TREE *start, TREE *stop);
+
+void repeat(TREE *root);
+
+void ruleinit(void);
+
+void rulend(void);
+
+LOGICAL samelabelarc(ARC *a, STATE *s);
+
+void savelhs(LOGICAL param);
+
+void savestartarcs(void);
+
+int scan(void);
+
+void setdefault(const M_WCHAR *string);
+
+void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
+
+void skiptoend(void);
+
+int m_sprscon(int i, int j);
+
+void srefout(void);
+
+STATE *startfsa(TREE *root, LOGICAL *canbenull);
+
+void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
+
+void template(void);
+
+char *typecon(int n);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index 9f0c5daa8615d4a9a1b916e87516fa13ebd0fd5b..89504aeec76cd59cda05ff99dc541fb8d33e8304 100644 (file)
@@ -30,9 +30,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Scan.c contains scanner procedures for program BUILD */
 
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "build.h"
 #define M_CONDEF
 #include "context.h"
@@ -41,8 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "sref.h"
 
 /* Reads a name */
-LOGICAL getname(first)
-  int first;
+LOGICAL getname(int first)
 {
 M_WCHAR *p;
 int c;
@@ -74,7 +70,7 @@ return(TRUE);
 }
 
 /* Returns the next token to the main procedure */
-int scan(M_NOPAR)
+int scan(void)
 {
 int c;
 int n;
index 85e9067bf8d1dd21798a35ef88aed4412b6b7360..4eb3a41b6a5fd3883e69b0794f226668b4abed80 100644 (file)
@@ -36,8 +36,7 @@ static M_WCHAR *wc_prefix = NULL;
 /* Add an entity with the default name constructed by adding a suffix
    to the name of the short reference map in which it is invoked, and
    a prefix m- */
-void adddefent(mapname)
-M_WCHAR *mapname;
+void adddefent(M_WCHAR *mapname)
 {
 M_WCHAR *p;
 int n;
@@ -75,8 +74,7 @@ thissref->entidx = entity->index;
 
 /* Add an entity, return FALSE if already there, TRUE if adding it.
    Pointer to the entity structure is in global M_STRUCT *entity. */
-LOGICAL addent(name)
-M_WCHAR *name;
+LOGICAL addent(M_WCHAR *name)
 {
 M_ENTITY *new;
 
@@ -101,13 +99,7 @@ return(TRUE);
 }
 
 /* Add a short reference map name */
-#if defined(M_PROTO)
 LOGICAL addmapname(M_WCHAR* p, LOGICAL define)
-#else
-LOGICAL addmapname(p, define)
-M_WCHAR *p;
-LOGICAL define;
-#endif
 {
 MAP *old;
 MAP *new;
@@ -134,16 +126,14 @@ return(TRUE);
 }
 
 /* Add a named entity to a short reference map */
-void addndent(p)
-M_WCHAR *p;
+void addndent(M_WCHAR *p)
 {
 addent(p);
 thissref->entidx = entity->index;
 }
 
 /* Add a short reference delimiter */
-void addsref(p)
-M_WCHAR *p;
+void addsref(M_WCHAR *p)
 {
 SREFSTRUCT *delim;
 SREFSTRUCT *prevsr;
@@ -198,7 +188,7 @@ delim->data = thissref;
 
 /* Prefix left-hand side with "M-" to create default short reference map
    name, truncating to M_NAMELEN characters if necessary */
-void defmapname(M_NOPAR)
+void defmapname(void)
 {
 if (!wc_prefix)
     {
index b7eba71247c86ff6ca43b3eec1232ec01e56b455..f1b64c8c23649a17d3f0b89d1199fef5cd9634d6 100644 (file)
@@ -36,7 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Called after a right parenthesis is read while scanning a content model.
    Resets curcon if it is the outermost submodel. */
-void endmodel(M_NOPAR)
+void endmodel(void)
   {
     curtree = curtree->parent ;
     if (! curtree->parent) curcon = LASTM ;
@@ -44,8 +44,7 @@ void endmodel(M_NOPAR)
     }
 
 /* Release storage used for the tree representation of a rule */
-void freetree(treep)
-  TREE *treep ;
+void freetree(TREE *treep)
   {
     TREE *child, *discard ;
 
@@ -58,7 +57,7 @@ void freetree(treep)
     }
 
 /* Gettreenode obtains a node to use in the tree representation of a rule */
-TREE *gettreenode(M_NOPAR)
+TREE *gettreenode(void)
   {
     TREE *new ;
 
index e9f76f65c5a8cf06a64db128863a0c72d4e3119e..2f99be16f615b0976ab22515828268271287147e 100644 (file)
@@ -398,7 +398,7 @@ tagc
   postent:start
   codetagc:inentc {
             startcode(entity->codeindex, &inent, entfile,
-                      "c", nopar, nopar, "") ;
+                      "c", "void", "void", "") ;
             }
   close:preparam
   sschain:inss {
@@ -420,11 +420,11 @@ tagc
             }
   scchain:insc {
             *getaction(scarray) = ++sactions ;
-            startcode(sactions, &insc, sfile, "s", nopar, nopar, "") ;
+            startcode(sactions, &insc, sfile, "s", "void", "void", "") ;
             }
   ecchain:inec {
             *getaction(ecarray) = ++eactions ;
-            startcode(eactions, &inec, efile, "e", nopar, nopar, "") ;
+            startcode(eactions, &inec, efile, "e", "void", "void", "") ;
             }
   stcchain:instc {
             *getaction(stcarray) = ++stactions ;
index cd27ab0d39551867600ea3268d3a6d3f0aa43ac9..7243f746b2264912200a01eedc4d976f4a75e06e 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -49,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entity.h"
 
 /* Main program */
-int main(argc, argv)
-  int argc ;
-  char **argv ;
+int main(int argc, char **argv)
   {
     int m_token ;
 
index ed705633379e94032fdbcb71f1b7eefe0de72b44..914f49bd7e8a162db32cc3dc133d2248c4483dc4 100644 (file)
@@ -215,7 +215,6 @@ ELTEXTERN int restart ELTINIT(RENTITY) ;
 #define stproto "M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END"
 #define stformal "m_string, M_START, M_END"
 #define stft "  M_WCHAR *m_string ;\n  LOGICAL M_START ;\n  LOGICAL M_END ;\n"
-#define nopar "M_NOPAR"
 
 /* Structures for generating defines for parameter values */
 ELTEXTERN M_TRIE parval ;
index 9c438d01c784286b63f39ef469c6b7d4e9b31dfa..e537fb70d4b720f8796fdca8b9fef57e1a2888c7 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -49,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "version.h"
 
 /* Output indicated action pointer array to if.h */
-void actptrout(array, name)
-  ACTION **array;
-  char *name;
+void actptrout(ACTION **array, char *name)
   {
     int i;
 
@@ -66,23 +61,14 @@ void actptrout(array, name)
 
 
 /* Close a code file and write jump table at the end */
-#if defined(M_PROTO)
 void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto)
-#else
-void closeiffile(flag, file, count, table, proto)
-  LOGICAL flag;
-  FILE *file;
-  int count;
-  char *table;
-  char *proto;
-#endif
   {
     int i;
 
     endcode(flag, file);
     if (count) {
       fprintf(file,
-        "void (*m_%stable[])(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) = {\n",
+        "void (*m_%stable[])(%s) = {\n",
         table, proto);
       fprintf(file, "  m_%s1, /* Place holder for 1-based indexing */\n",
                     table);
@@ -94,14 +80,14 @@ void closeiffile(flag, file, count, table, proto)
       }
     else
       fprintf(file,
-        "void (*m_%stable[1])(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) ;\n",
+        "void (*m_%stable[1])(%s) ;\n",
         table, proto);
     fclose(file);
     }
 
 /* Called when the C identifier to be #define'd to a parameter value is
    scanned */
-void cvalue(M_NOPAR)
+void cvalue(void)
   {
     PARVAL *new;
 
@@ -120,18 +106,18 @@ void cvalue(M_NOPAR)
 
 /* Called after last input character is read to place closing punctuation
    at end of output files and close them */
-void done(M_NOPAR)
+void done(void)
   {
     M_ENTITY *ent;
     ACTION *actp;
     LOGICAL first;
     int i;
 
-    closeiffile(inent, entfile, codeent, "c", nopar);
+    closeiffile(inent, entfile, codeent, "c", "void");
     closeiffile(intext, tfile, tactions, "t", tproto);
     closeiffile(inpc, pfile, pactions, "p", pproto);
-    closeiffile(insc, sfile, sactions, "s", nopar);
-    closeiffile(inec, efile, eactions, "e", nopar);
+    closeiffile(insc, sfile, sactions, "s", "void");
+    closeiffile(inec, efile, eactions, "e", "void");
     closeiffile(instc, stfile, stactions, "st", stproto);
 
     endstring();
@@ -193,19 +179,13 @@ void done(M_NOPAR)
     }
 
 /* Called when finished reading a section of code from the input file */
-#if defined(M_PROTO)
 void endcode(LOGICAL flag, FILE *file)
-#else
-void endcode(flag, file)
-  LOGICAL flag;
-  FILE *file;
-#endif
   {
     if (flag) fprintf(file, "}}\n\n");
     }
 
 /* Called at the end of all initial fields in the interface definition */
-void endini(M_NOPAR)
+void endini(void)
   {
     if (finitext) 
       fputs("    putc(m_textchar, m_outfile);\n", tfile);
@@ -224,7 +204,7 @@ void endini(M_NOPAR)
 
 /* End the sign-on message */
 #include <time.h>
-void endsignon(M_NOPAR)
+void endsignon(void)
   {
     time_t storetime;
     char *p;
@@ -270,7 +250,7 @@ void endsignon(M_NOPAR)
     }
 
 /* Closes a start-string or end-string */
-void endstring(M_NOPAR)
+void endstring(void)
   {
     if (instring) {
       if (stringstart) stringstart = FALSE;
@@ -285,8 +265,7 @@ void endstring(M_NOPAR)
 
 /* Set the type of an entity and check if different than declaration in
    BUILD */
-void enttype(type)
-  int type;
+void enttype(int type)
   {
     if ((entity->type == M_PI && type == M_CODEPI) ||
         (entity->type == M_SDATA && type == M_CODESDATA));
@@ -297,7 +276,7 @@ void enttype(type)
     }
 
 /* Free storage used for a context-specification chain */
-void freechain(M_NOPAR)
+void freechain(void)
   {
     CHAIN *chainp, *dchainp;
 
@@ -312,8 +291,7 @@ void freechain(M_NOPAR)
 
 /* Returns pointer to data field in action node for current chain of
    elements */
-int *getaction(array)
-  ACTION **array;
+int *getaction(ACTION **array)
   {
     ACTION *start, *node;
     CHAIN *chainp;
@@ -348,7 +326,7 @@ int *getaction(array)
     }
 
 /* Allocate new action structure */
-ACTION *getactstruct(M_NOPAR)
+ACTION *getactstruct(void)
   {
     ACTION *new;
 
@@ -362,7 +340,7 @@ ACTION *getactstruct(M_NOPAR)
     }
 
 /* Program initialization */
-void initialize(M_NOPAR)
+void initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
@@ -426,13 +404,13 @@ fputs("#endif\n", ifh);
 
 startcode(pactions, &inpc, pfile, "p", pproto, pformal, pftype);
 startcode(tactions, &intext, tfile, "t", tproto, tformal, tftype);
-startcode(sactions, &insc, sfile, "s", nopar, nopar, "");
-startcode(eactions, &inec, efile, "e", nopar, nopar, "");
+startcode(sactions, &insc, sfile, "s", "void", "void", "");
+startcode(eactions, &inec, efile, "e", "void", "void", "");
 startcode(stactions, &instc, stfile, "st", stproto, stformal, stft);
 }
 
 /* Output definitions for strings */
-void outstring(M_NOPAR)
+void outstring(void)
   {
     int c;
 
@@ -449,8 +427,7 @@ void outstring(M_NOPAR)
     }
 
 /* Output #define's for parameter values */
-void outpval(p)
-M_TRIE *p;
+void outpval(M_TRIE *p)
 {
 M_WCHAR *q;
 
@@ -495,7 +472,7 @@ for ( ; p ; p = p->next)
 }
 
 /* Skip rest of statement after an error */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
   {
     int i;
     static int errlev = 0;
@@ -548,14 +525,8 @@ void skiptoend(M_NOPAR)
   }
 
 /* Starts processing a code segment from the input file */
-void startcode(caseno, flag, file, prefix, proto, formal, formtype)
-int caseno;
-LOGICAL *flag;
-FILE *file;
-char *prefix;
-char *proto;
-char *formal;
-char *formtype;
+void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix,
+               char *proto, char *formal, char *formtype)
 {
 CVARSTRUCT *cvarp;
 
@@ -563,21 +534,13 @@ endcode(*flag, file);
 *flag = TRUE;
 /* protoype */
 fprintf(file,
-       "void m_%s%d(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) ;\n",
+       "void m_%s%d(%s) ;\n",
        prefix,
        caseno,
        proto);
 
 /* ANSI defines */
-fputs("#if defined(M_PROTO)\n", file);
-fprintf(file, "void m_%s%d(%s)\n", prefix, caseno, proto);
-fputs("#else\n", file);
-fprintf(file,
-       "void m_%s%d(%s)\n%s\n#endif\n  {\n", /* balance the "}" */
-       prefix,
-       caseno,
-       formal,
-       formtype);
+fprintf(file, "void m_%s%d(%s)\n  {\n", prefix, caseno, proto);
 
 for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next)
     {
@@ -603,7 +566,7 @@ fprintf(file, "{\n/* line %d \"%s\" */\n", m_line, iffile); /* balance "}" */
 }
 
 /* Begins processing a new element */
-void startelement(M_NOPAR)
+void startelement(void)
   {
     CVARSTRUCT *cvarp;
     CVARSTRUCT *discard;
@@ -624,7 +587,7 @@ void startelement(M_NOPAR)
     }
 
 /* Stores the name of a C variable read from the input file */
-void storecvar(M_NOPAR)
+void storecvar(void)
   {
     CVARSTRUCT *new;
 
@@ -639,7 +602,7 @@ void storecvar(M_NOPAR)
 /* Compares the parameter name associated with a C variable in the input
    file with the names of all parameters of the current element.  Stores
    result for later output with code segments */
-void storepname(M_NOPAR)
+void storepname(void)
   {
     int i, par;
 
@@ -657,8 +620,7 @@ void storepname(M_NOPAR)
     }
 
 /* Called when a possible parameter value to be defined is encountered */
-void value(p)
-M_WCHAR *p;
+void value(M_WCHAR *p)
 {
 char buffer[5];
 
index 2d9ef5038e1982bc813ba61c059e5cc726cee1ff..ba0e7ba213fccf46464efacf8e04434073254770 100644 (file)
@@ -35,7 +35,7 @@
 #include "entext.h"
 
 /* Add an entity */
-void addent(M_NOPAR)
+void addent(void)
   {
     M_ENTITY *new ;
 
index 6c63ee8b0f4dac998e03d5cf47f76531739ac544..fb7810839dc5474ef50f1fda9b9fac26c499bb00 100644 (file)
 /* Proto.h contains function prototypes for program ELTDEF. */
 
 
-void actptrout(
-#if defined(M_PROTO)
-  ACTION **array, char *name
-#endif
-  ) ;
-
-void addent(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void closeiffile(
-#if defined(M_PROTO)
-  LOGICAL flag, FILE *file, int count, char *table, char *proto
-#endif
-  ) ;
-
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
-
-void cvalue(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-
-void done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE *file,
+void actptrout(ACTION **array, char *name);
+
+void addent(void);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
+
+void countdown(M_TRIE *parent, int *count);
+
+void cvalue(void);
+
+
+void done(void);
+
+void m_dumptrie(FILE *file,
   M_TRIE *xtrie,
   char *extname,
   int *count,
-  void (*proc)(M_ENTITY *)
-#endif
-  ) ;
-
-void endcode(
-#if defined(M_PROTO)
-  LOGICAL flag, FILE *file
-#endif
-  ) ;
-
-void endini(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endsignon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endstring(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void entout(
-#if defined(M_PROTO)
-  char *fname
-#endif
-  ) ;
-
-void enttype(
-#if defined(M_PROTO)
-  int type
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text,
-  M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5
-#endif
-  ) ;
-
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void freechain(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int getachar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int *getaction(
-#if defined(M_PROTO)
-  ACTION **array
-#endif
-  ) ;
-
-ACTION *getactstruct(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void getname(
-#if defined(M_PROTO)
-  int first
-#endif
-  ) ;
-
-int gettoken(
-#if defined(M_PROTO)
-  int *c, int context
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void outpval(
-#if defined(M_PROTO)
-  M_TRIE *p
-#endif
-  ) ;
-
-void outstring(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie, M_WCHAR *name
-#endif
-  ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-int scan(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void startcode(
-#if defined(M_PROTO)
-  int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
-  char *formal, char *formtype
-#endif
-  ) ;
-
-void startelement(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void storecvar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void storepname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim
-#endif
-  ) ;
-
-void ungetachar(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-void value(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+  void (*proc)(M_ENTITY *));
+
+void endcode(LOGICAL flag, FILE *file);
+
+void endini(void);
+
+void endsignon(void);
+
+void endstring(void);
+
+void entout(char *fname);
+
+void enttype(int type);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err5(char *text,
+  M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_exit(int status);
+
+void m_free(void *block, char *msg);
+
+void freechain(void);
+
+int getachar(void);
+
+int *getaction(ACTION **array);
+
+ACTION *getactstruct(void);
+
+void getname(int first);
+
+int gettoken(int *c, int context);
+
+void m_initctype(void);
+
+void initialize(void);
+
+LOGICAL m_letter(M_WCHAR c);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void outpval(M_TRIE *p);
+
+void outstring(void);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+int scan(void);
+
+void skiptoend(void);
+
+void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
+  char *formal, char *formtype);
+
+void startelement(void);
+
+void storecvar(void);
+
+void storepname(void);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void value(M_WCHAR *p);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index cbc0ad8902571d44dfa3a2daff47f994e0f82657..89a912753e898a535ee32e0f8e82b08e251462cf 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <stdio.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -46,8 +43,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "delim.h"
 
 /* Reads a name token */
-void getname(first)
-int first;
+void getname(int first)
 {
 M_WCHAR *p, wus;
 int c, cttype;
@@ -86,7 +82,7 @@ ungetachar(c);
 }
 
 /* Reads the next token and returns it to the main procedure */
-int scan(M_NOPAR)
+int scan(void)
 {
 int c;
 int n;
index 1813100b07b2ee07c41ea6789d40cb1cb69fc6d9..b3687b405b41dc965adaf8676124ec883def7caf 100644 (file)
@@ -32,19 +32,8 @@ Copyright (c) 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 #include <stdlib.h>
 
-
-#if defined(MSDOS)
-/* Standard startup code doesn't have room to load inherited environments
-   in some cases.  Since they're not used, don't bother.  (Using Microsoft
-   C compiler).  */
-void _setenvp(M_NOPAR);
-void _setenvp(){}
-#endif
-
 /* Write input file and line number for an error message */
-void m_dumpline(file, line)
-M_WCHAR *file;
-int line;
+void m_dumpline(M_WCHAR *file, int line)
 {
 char buffer[10];
 char *mbyte;
@@ -72,7 +61,7 @@ else
 }
 
 /* Write error message prefix */
-void m_eprefix(M_NOPAR)
+void m_eprefix(void)
 {
 m_errline("\n*****\n");
 m_dumpline(m_thisfile(), m_thisline());
@@ -80,8 +69,7 @@ m_errline(",\n");
 }
 
 /* Process error message text */
-void m_errline(p)
-char *p;
+void m_errline(char *p)
 {
 char c;
 
@@ -92,11 +80,8 @@ for ( ; *p ; p++)
     }
 }
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 /* Write error message suffix */
-void m_esuffix(M_NOPAR)
+void m_esuffix(void)
 {
 m_errline(":\n");
 m_lastchars();
@@ -108,8 +93,7 @@ if (++m_errcnt == m_errlim)
 }
 
 /* Exit procedure */
-void m_exit(status)
-int status;
+void m_exit(int status)
 {
 if (filefound)
     {
@@ -146,8 +130,7 @@ exit(0);
 }
 
 /* Get-char procedure */
-int m_getc(m_ptr)
-void *m_ptr;
+int m_getc(void *m_ptr)
 {
 int  c;
 M_WCHAR wc;
@@ -201,8 +184,7 @@ return((int) wc);
 }
 
 /* Open SYSTEM entity procedure */
-void *m_openent(entcontent)
-M_WCHAR *entcontent;
+void *m_openent(M_WCHAR *entcontent)
 {
 FILE *open;
 char *filename;
@@ -245,7 +227,7 @@ return(NULL);
 }
 
 /* Open input file */
-void *m_openfirst(M_NOPAR)
+void *m_openfirst(void)
 {
 FILE *first;
 char *input;
@@ -282,7 +264,7 @@ return((void *) first);
 }
 
 /* Set program options */
-void m_setoptions()
+void m_setoptions(void)
 {
 /* F option used for FILELIST (checking done in basename, which is
 called before this function is called) */
@@ -296,8 +278,7 @@ if (m_argc > 2)
 
 /* Process signon message text, stripping out MARKUP version number, so
    only one version number will appear */
-void m_signmsg(p)
-  char *p;
+void m_signmsg(char *p)
   {
     char *q;
     char *pCopy;
@@ -317,7 +298,7 @@ void m_signmsg(p)
 
 /* All entity declarations have been processed.  Can now check if .TEX
    file uptodate and open appropriate output file */
-void m_startdoc()
+void m_startdoc(void)
 {
 LOGICAL init = TRUE;
 unsigned char type;
@@ -357,16 +338,14 @@ else
 }
 
 /* Write debugging trace information */
-void m_trace(p)
-char *p;
+void m_trace(char *p)
 {
 if (tracetostd) fputs(p, stdout);
 else fputs(p, m_outfile);
 }
 
 
-void m_wctrace(p)
-M_WCHAR *p;
+void m_wctrace(M_WCHAR *p)
 {
 char *mb_p;
 
index d04c41f5bdc5af1d6844cd4ee75d304b3e74031f..11c542882e15209d7073d3ca498bd8fc98a84a37 100644 (file)
@@ -30,12 +30,7 @@ Copyright 1988, 1989, 1992 Hewlett-Packard Co.
 #include "userinc.h"
 #include "globdec.h"
 
-#if defined(M_PROTO)
 int vextextsize(const M_WCHAR *keyword)
-#else
-int vextextsize(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return NORMAL;
 
@@ -47,12 +42,7 @@ m_err1("Unexpected value for ex/vex textsize parameter: %s", keyword);
 return NORMAL;
 }
 
-#if defined(M_PROTO)
 int vgloss(const M_WCHAR *keyword)
-#else
-int vgloss(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return GLOSS;
 
@@ -63,12 +53,7 @@ m_err1("Unexpected value for gloss parameter: %s", keyword);
 return GLOSS;
 }
 
-#if defined(M_PROTO)
 int vcenter(const M_WCHAR *keyword)
-#else
-int vcenter(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return CENTER;
 
@@ -80,12 +65,7 @@ m_err1("Unexpected value for center parameter: %s", keyword);
 return CENTER;
 }
 
-#if defined(M_PROTO)
 int vnumber(const M_WCHAR *keyword)
-#else
-int vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return NONUMBER;
 
@@ -96,12 +76,7 @@ m_err1("Unexpected value for number parameter: %s", keyword);
 return NONUMBER;
 }
 
-#if defined(M_PROTO)
 LOGICAL vstack(const M_WCHAR *keyword)
-#else
-LOGICAL vnumber(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return FALSE;
 
@@ -112,12 +87,7 @@ m_err1("Unexpected value for number parameter: %s", keyword);
 return FALSE;
 }
 
-#if defined(M_PROTO)
 int vordertype(const M_WCHAR *keyword)
-#else
-int vordertype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return ARABIC;
 
@@ -131,12 +101,7 @@ m_err1("Unexpected list order type: %s", keyword);
 return ARABIC;
 }
 
-#if defined(M_PROTO)
 int vrsectpage(const M_WCHAR *keyword)
-#else
-int vrsectpage(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return NEWPAGE;
 
@@ -147,12 +112,7 @@ m_err1("Unexpected value for rsectpage parameter: %s", keyword);
 return NEWPAGE;
 }
 
-#if defined(M_PROTO)
 int vlonglabel(const M_WCHAR *keyword)
-#else
-int vlonglabel(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return WRAP;
 
@@ -163,12 +123,7 @@ m_err1("Unexpected value for longlabel parameter: %s", keyword);
 return WRAP;
 }
 
-#if defined(M_PROTO)
 int vspacing(const M_WCHAR *keyword)
-#else
-int vspacing(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return LOOSE;
 
@@ -179,12 +134,7 @@ m_err1("Unexpected value for spacing parameter: %s", keyword);
 return LOOSE;
 }
 
-#if defined(M_PROTO)
 int vtype(const M_WCHAR *keyword)
-#else
-int vtype(keyword)
-M_WCHAR *keyword;
-#endif /* M_PROTO */
 {
 if (!keyword) return BULLET;
 
index a763134f6509727ee6e6bea6264a9ae855a81d8b..8b35a56607184e394edfecccbda9bd157eecc6ad 100644 (file)
 /* Copyright (c) 1988, 1989, 1990 Hewlett-Packard Co. */
 /* Function prototypes for HP Tag/TeX translator */
 
-void assert_hometopic_exists(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void assert_hometopic_exists(void);
 
 /* conflict with prototype defined for basename() in <string.h> on osf, 
    so use fbasename */
-void fbasename(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void chapstart(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
-
-void checkgloss(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *checkid(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
-
-void checkmsghead (
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void dumpxref(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void echohead(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void mb_echohead(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void endhead(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void esoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-void vexoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-void exoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-void imoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-int getqualified (
-#if defined(M_PROTO)
-  M_WCHAR *qualname, M_WCHAR *unqualname
-#endif
-  ) ;
-
-void handle_link_and_graphic(
-#if defined(M_PROTO)
-  M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
-  M_WCHAR *glinktype, M_WCHAR *gdescription
-#endif
-  );                        
-
-void idstring(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-void indexchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-void Item(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
-
-char *m_itoa(
-#if defined(M_PROTO)
-  int n, char *s
-#endif
-  ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
-void loadxref(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-void options(
-#if defined(M_PROTO)
-  LOGICAL filelenonly
-#endif
-  ) ;
-
-void outchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile 
-#endif
-  ) ;
-
-void outpi(
-#if defined(M_PROTO)
-  int enttype, M_WCHAR *pi, M_WCHAR *entname
-#endif
-  ) ;
-
-void realoutchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar, FILE *outfile
-#endif
-  ) ;
-
-void rsectstart(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
-
-void rseqend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *searchforfile(
-#if defined(M_PROTO)
-  M_WCHAR *file
-#endif
-  ) ;
-
-void setid(
-#if defined(M_PROTO)
-  M_WCHAR *id,
+void fbasename(void);
+
+void chapstart(M_WCHAR *id);
+
+void checkgloss(void);
+
+M_WCHAR *checkid(M_WCHAR *id);
+
+void checkmsghead (void);
+
+void dumpxref(void);
+
+void echohead(M_WCHAR *p);
+
+void mb_echohead(char *p);
+
+void endhead(void);
+
+void esoutchar(M_WCHAR textchar);
+
+void vexoutchar(M_WCHAR textchar);
+
+void exoutchar(M_WCHAR textchar);
+
+void imoutchar(M_WCHAR textchar);
+
+int getqualified (M_WCHAR *qualname, M_WCHAR *unqualname);
+
+void handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity, M_WCHAR *gposition, M_WCHAR *ghyperlink,
+  M_WCHAR *glinktype, M_WCHAR *gdescription);
+
+void idstring(M_WCHAR *string);
+
+void indexchar(M_WCHAR textchar);
+
+void Item(M_WCHAR *id);
+
+char *m_itoa(int n, char *s);
+
+LOGICAL m_letter(M_WCHAR c);
+
+void loadxref(void);
+
+int m_lower(int c);
+
+void options(LOGICAL filelenonly);
+
+void outchar(M_WCHAR textchar, FILE *outfile );
+
+void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname);
+
+void realoutchar(M_WCHAR textchar, FILE *outfile);
+
+void rsectstart(M_WCHAR *id);
+
+void rseqend(void);
+
+M_WCHAR *searchforfile(M_WCHAR *file);
+
+void setid(M_WCHAR *id,
   LOGICAL where,
   LOGICAL csensitive,
   LOGICAL inchapter,
   char *chapter,
   M_WCHAR *xrffile,
   int xrfline,
-  LOGICAL xrefable        
-#endif
-  ) ;
-
-void setopt(
-#if defined(M_PROTO)
-  char *string, LOGICAL filelenonly
-#endif
-  ) ;
-
-LOGICAL setvalopt(
-#if defined(M_PROTO)
-  int thisopt, char *string, LOGICAL filelenonly
-#endif
-  ) ;
-
-void shchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar,
+  LOGICAL xrefable);
+
+void setopt(char *string, LOGICAL filelenonly);
+
+LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly);
+
+void shchar(M_WCHAR textchar,
   int *len,
   int max,
   M_WCHAR *string,
   void (*proc)(M_WCHAR *string),
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void mb_shchar(
-#if defined(M_PROTO)
-  char textchar,
+void mb_shchar(char textchar,
   int *len,
   int max,
   M_WCHAR *string,
   void (*proc)(M_WCHAR *string),
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void shstring(
-#if defined(M_PROTO)
-  M_WCHAR *addstring,
+void shstring(M_WCHAR *addstring,
   int *len,
   int max,
   M_WCHAR *storestring,
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void mb_shstring(
-#if defined(M_PROTO)
-  char *addstring,
+void mb_shstring(char *addstring,
   int *len,
   int max,
   M_WCHAR *storestring,
   char *msg,
-  LOGICAL *errflg
-#endif
-  ) ;
+  LOGICAL *errflg);
 
-void starthelpnode(
-#if defined(M_PROTO)
-  M_WCHAR *ssi,
+void starthelpnode(M_WCHAR *ssi,
   M_WCHAR *id,
-  int      level
-#endif
-  ) ;
+  int      level);
 
-void mb_starthelpnode(
-#if defined(M_PROTO)
-  char    *ssi,
+void mb_starthelpnode(char    *ssi,
   char    *id,
-  int      level
-#endif
-  ) ;
-
-void StartLabList(
-#if defined(M_PROTO)
-  M_WCHAR *spacing,
-  M_WCHAR *longlabel
-#endif
-  ) ;
-
-void StartList(
-#if defined(M_PROTO)
-  M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont
-#endif
-  ) ;
-
-void EndList(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void strcode(
-#if defined(M_PROTO)
-  M_WCHAR *string, FILE *outfile
-#endif
-  ) ;
-
-void mb_strcode(
-#if defined(M_PROTO)
-  char *string, FILE *outfile
-#endif
-  ) ;
-
-char *strstr(
-#if defined(M_PROTO)
-  const char *s1, const char *s2
-#endif
-  ) ;
-
-void svhdstring(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-void svtcstring(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-void termchar(
-#if defined(M_PROTO)
-  M_WCHAR textchar
-#endif
-  ) ;
-
-void termpi(
-#if defined(M_PROTO)
-  int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname
-#endif
-  ) ;
-
-void texinit(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int vextextsize(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vgloss(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vcenter(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vnumber(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-LOGICAL vstack(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vordertype(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vlonglabel(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vspacing(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-int vtype(
-#if defined(M_PROTO)
-  const M_WCHAR *keyword
-#endif
-  ) ;
-
-void xrefexpand(
-#if defined(M_PROTO)
-  M_WCHAR *id
-#endif
-  ) ;
-
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-char *GetDefaultHeaderString(
-#if defined(M_PROTO)
-  char          *elementName,
+  int      level);
+
+void StartLabList(M_WCHAR *spacing,
+  M_WCHAR *longlabel);
+
+void StartList(M_WCHAR *type, M_WCHAR *order, M_WCHAR *spacing, M_WCHAR *cont);
+
+void EndList(void);
+
+void strcode(M_WCHAR *string, FILE *outfile);
+
+void mb_strcode(char *string, FILE *outfile);
+
+char *strstr(const char *s1, const char *s2);
+
+void svhdstring(M_WCHAR *string);
+
+void svtcstring(M_WCHAR *string);
+
+void termchar(M_WCHAR textchar);
+
+void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname);
+
+void texinit(void);
+
+int vextextsize(const M_WCHAR *keyword);
+
+int vgloss(const M_WCHAR *keyword);
+
+int vcenter(const M_WCHAR *keyword);
+
+int vnumber(const M_WCHAR *keyword);
+
+LOGICAL vstack(const M_WCHAR *keyword);
+
+int vordertype(const M_WCHAR *keyword);
+
+int vlonglabel(const M_WCHAR *keyword);
+
+int vspacing(const M_WCHAR *keyword);
+
+int vtype(const M_WCHAR *keyword);
+
+void xrefexpand(M_WCHAR *id);
+
+int m_upper(int c);
+
+char *GetDefaultHeaderString(char          *elementName,
   unsigned char  desiredType,
-  char          *defaultString
-#endif
-  ) ;
-
-
-void SetDefaultLocale(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  );
-
-char *MakeMByteString(
-#if defined(M_PROTO)
-  const M_WCHAR *from
-#endif
-  );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
-
-void paragraph(
-#if defined(M_PROTO)
-  M_WCHAR *indent,
+  char          *defaultString);
+
+
+void SetDefaultLocale(void);
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+void paragraph(M_WCHAR *indent,
   M_WCHAR *id,
   M_WCHAR *gentity,
   M_WCHAR *gposition,
   M_WCHAR *ghyperlink,
   M_WCHAR *glinktype,
-  M_WCHAR *gdescription
-#endif
-  );
+  M_WCHAR *gdescription);
 
-void figure(
-#if defined(M_PROTO)
-       M_WCHAR *number,
+void figure(     M_WCHAR *number,
        M_WCHAR *tonumber,
        M_WCHAR *id,
        M_WCHAR *file,
@@ -476,180 +210,70 @@ void figure(
        M_WCHAR *cappos,
        M_WCHAR *ghyperlink,
        M_WCHAR *glinktype,
-       M_WCHAR *gdescription
-#endif
-  );
+       M_WCHAR *gdescription);
 
-void endterm(
-#if defined(M_PROTO)
-       M_WCHAR *base,
+void endterm(     M_WCHAR *base,
        M_WCHAR *gloss,
-       char    *linktype
-#endif
-  );
-
-M_WCHAR wc_toupper(
-#if defined(M_PROTO)
-       M_WCHAR wc
-#endif
-  );
-
-M_WCHAR *wc_stringtoupper(
-#if defined(M_PROTO)
-       M_WCHAR *wcp
-#endif
-  );
-
-int NextId(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-);
-
-char *GetLanguage(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-);
-
-char *GetCharset(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-);
-
-void HandleLink(
-#if defined(M_PROTO)
-    M_WCHAR *hyperlink,
+       char    *linktype);
+
+M_WCHAR wc_toupper(     M_WCHAR wc);
+
+M_WCHAR *wc_stringtoupper(     M_WCHAR *wcp);
+
+int NextId(void);
+
+char *GetLanguage(void);
+
+char *GetCharset(void);
+
+void HandleLink(  M_WCHAR *hyperlink,
     M_WCHAR *type,
-    M_WCHAR *description
-#endif
-  );
-
-char *mb_realloc(
-#if defined(M_PROTO)
-    char *ptr, long size
-#endif
-  );
-
-char *mb_malloc(
-#if defined(M_PROTO)
-    long size
-#endif
-  );
-
-void mb_free(
-#if defined(M_PROTO)
-    char **pptr
-#endif
-  );
-
-void Add2ToRowVec(
-#if defined(M_PROTO)
-    int *length, char **rowvec, char *id1, char *id2
-#endif
-  );
-
-void StartEx(
-#if defined(M_PROTO)
-M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize
-#endif
-  );
-
-void EndEx(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  );
-
-void StartNCW(
-#if defined(M_PROTO)
-  char *which
-#endif
-  );
-
-void StartBlock(
-#if defined(M_PROTO)
-  char *pclass, char *ssi, char *id
-#endif
-  );
-
-void AddToSNB(
-#if defined(M_PROTO)
-  char *id, char *iconName
-#endif
-  );
-
-void StartNCWtext(
-#if defined(M_PROTO)
-  char *which, char *iconFile, char *headingString
-#endif
-  );
-
-void IncludeToss(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  );
-
-M_WCHAR *CycleEnt(
-#if defined(M_PROTO)
-    LOGICAL init,
+    M_WCHAR *description);
+
+char *mb_realloc(  char *ptr, long size);
+
+char *mb_malloc(  long size);
+
+void mb_free(  char **pptr);
+
+void Add2ToRowVec(  int *length, char **rowvec, char *id1, char *id2);
+
+void StartEx(M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize);
+
+void EndEx(void);
+
+void StartNCW(char *which);
+
+void StartBlock(char *pclass, char *ssi, char *id);
+
+void AddToSNB(char *id, char *iconName);
+
+void StartNCWtext(char *which, char *iconFile, char *headingString);
+
+void IncludeToss(void);
+
+M_WCHAR *CycleEnt(  LOGICAL init,
     unsigned char *type,
     M_WCHAR ***content,
-    unsigned char *wheredef
-#endif
-  );
-
-void ModifyEntities(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  );
-
-void PushForm(
-#if defined(M_PROTO)
-  char *class,
+    unsigned char *wheredef);
+
+void ModifyEntities(void);
+
+void PushForm(char *class,
   char *ssi,
-  char *id
-#endif
-  ) ;
+  char *id);
 
-void PushForm2(
-#if defined(M_PROTO)
-  char *class,
+void PushForm2(char *class,
   char *ssi,
   char *id1,
-  char *id2
-#endif
-  ) ;
-
-void PopForm(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void PopForm2(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void PopFormMaybe(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void EmitSavedAnchors(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void CloseVirpage(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+  char *id2);
+
+void PopForm(void);
+
+void PopForm2(void);
+
+void PopFormMaybe(void);
+
+void EmitSavedAnchors(void);
+
+void CloseVirpage(void);
index 490cd626859dd4fb29b68ff0098b2990dc86c9c4..d3b8d201576cb69450ae68566db3b13d69159a1e 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
-#if defined(MSDOS)
-#include <io.h>
-#include <process.h>
-#include <direct.h>
-#endif
 #include <ctype.h>
 
 #include <unistd.h>
index e01c96f5dbaed843404929478ddd4a474abe95b4..97060a6bad9234c407aa475e16b553abfeba8f9d 100644 (file)
@@ -32,7 +32,7 @@
 #include "LocaleXlate.h"
 #include "XlationSvc.h"
 
-void assert_hometopic_exists(M_NOPAR)
+void assert_hometopic_exists(void)
 {
 static const char hometopic[] = "-HOMETOPIC";
 char id[SDLNAMESIZ + sizeof(hometopic)];
@@ -61,7 +61,7 @@ m_free(string, "GetDefaultHeaderString return");
 
 /* Determine base name for files (i.e., input name without extension).
    Open output and error files */
-void fbasename(M_NOPAR)
+void fbasename(void)
 {
 char *p, *q;
 int n;
@@ -250,8 +250,7 @@ else
 
 
 /* This procedure starts a CHAPTER */
-void chapstart(id)
-M_WCHAR *id;
+void chapstart(M_WCHAR *id)
 {
 M_WCHAR *p, *q, *wc;
 int i;
@@ -292,7 +291,7 @@ if (*chapterSuffixString)
 
 /* Called at end of manual to report terms that occurred in the document
    but not entered in the glossary */
-void checkgloss(M_NOPAR)
+void checkgloss(void)
 {
 int n;
 M_WCHAR id[MAXTERM + 1];
@@ -329,7 +328,7 @@ while (TRUE)
                
 /* End Error Message macro \starterrmsg call, check to see if Error Message
    head is user specified or default */
-void checkmsghead(M_NOPAR)
+void checkmsghead(void)
 {
 char *string =
     GetDefaultHeaderString("MessagesElementDefaultHeadingString",
@@ -349,13 +348,7 @@ m_free(string, "GetDefaultHeaderString return");
 
 
 /* construct a qualified file name */
-#if defined(M_PROTO)
 static int mb_getqualified(char *qualname, char *unqualname)
-#else
-static int mb_getqualified(qualname, unqualname)
-char *qualname;
-char *unqualname;
-#endif
 {
 #if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
 FILE *f;
@@ -504,9 +497,7 @@ return ( 0 );
 }  /* end mb_getqualified */
 
 
-int getqualified (qualname, unqualname)
-M_WCHAR *qualname;
-M_WCHAR *unqualname;
+int getqualified(M_WCHAR *qualname, M_WCHAR *unqualname)
 {
 int retval;
 char mb_qualname[FNAMELEN],
@@ -526,13 +517,9 @@ return retval;
 
 /* handle the common link and graphic code for <p> and <image> */
 void
-handle_link_and_graphic(parent,
-                       gentity,
-                       gposition,
-                       ghyperlink,
-                       glinktype,
-                       gdescription)
-M_WCHAR *parent, *gentity, *gposition, *ghyperlink, *glinktype, *gdescription;
+handle_link_and_graphic(M_WCHAR *parent, M_WCHAR *gentity,
+                        M_WCHAR *gposition, M_WCHAR *ghyperlink,
+                        M_WCHAR *glinktype, M_WCHAR *gdescription)
 {
 unsigned char etype, wheredef;
 char *mb_content, *ssi, id[32];
@@ -686,12 +673,7 @@ if (!ghyperlink && (glinktype || gdescription))
 }
 
 /* Process an item in a list */
-#if defined(M_PROTO)
 void Item(M_WCHAR *id)
-#else
-void Item(id)
-M_WCHAR *id;
-#endif
 {
 char orderString[32];
 static char *ROMAN0[] =
@@ -923,8 +905,7 @@ if (item_id)
 
 
 /* Start a rsect */
-void rsectstart(id)
-M_WCHAR *id;
+void rsectstart(M_WCHAR *id)
 {
 savid = checkid(id);
 iderr = FALSE;
@@ -935,7 +916,7 @@ chapst = TRUE;
 
 /* Called at the end of a chapter, appendix, or section to end an open
    sequence of rsects */
-void rseqend(M_NOPAR)
+void rseqend(void)
 {
 if (rsectseq)
     --thisnodelevel;
@@ -944,8 +925,7 @@ rsectseq = FALSE;
 
 
 /* Follow search path to find a file, returning qualified name */
-M_WCHAR *searchforfile(file)
-M_WCHAR *file;
+M_WCHAR *searchforfile(M_WCHAR *file)
 {
 M_WCHAR *filename;
 SEARCH *searchp;
@@ -989,16 +969,9 @@ return(NULL);
 
 
 /* Start a new helpnode */
-#if defined(M_PROTO)
 void starthelpnode(M_WCHAR *ssi,
                   M_WCHAR *id,
                   int      level)
-#else
-void starthelpnode(ssi, id, level)
-M_WCHAR *ssi;
-M_WCHAR *id;
-int     level;
-#endif
 {
 int i;
 char *mbyte, *mb_ssi;
@@ -1052,16 +1025,9 @@ snbstart = ftell(outfile);
 } /* End starthelpnode(id) */
 
 
-#if defined(M_PROTO)
 void mb_starthelpnode(char   *ssi,
                      char   *id,
                      int     level)
-#else
-void mb_starthelpnode(ssi, id, level)
-char   *ssi;
-char   *id;
-int    level;
-#endif
 {
 M_WCHAR *wc_ssi, *wc_id;
 
@@ -1080,9 +1046,7 @@ if (wc_id)
 
 
 /* Start a labeled list */
-void StartLabList(spacing, longlabel)
-M_WCHAR *spacing;
-M_WCHAR *longlabel;
+void StartLabList(M_WCHAR *spacing, M_WCHAR *longlabel)
 {
        char *mb_spacing;
 static char  def_spacing[] = "LOOSE";
@@ -1122,15 +1086,10 @@ if (list <= MAXLISTLEV)
 
 
 /* Start a list */
-#if defined(M_PROTO)
 void StartList(M_WCHAR *type,
               M_WCHAR *order,
               M_WCHAR *spacing,
               M_WCHAR *cont)
-#else
-void StartList(type, order, spacing, cont)
-M_WCHAR *type, *order, *spacing, *cont;
-#endif
 {
 LIST *nextlist;
 CONTCHAIN *chain;
@@ -1270,7 +1229,7 @@ lastlist = nextlist;
 }
 
 
-void EndList()
+void EndList(void)
 {
 LIST *curlist ;
 CONTCHAIN *chain, *xchain ;
@@ -1305,7 +1264,7 @@ if (lastlist->type == BULLET) bulcount-- ;
 
 
 /* Open and initialize TeX file */
-void texinit(M_NOPAR)
+void texinit(void)
 {
 LOGICAL init = TRUE;
 unsigned char type;
@@ -1411,17 +1370,10 @@ postpreamble = ftell(outfile);
    the string returned must be m_free'd.
 */
 char *
-#if defined(M_PROTO)
 GetDefaultHeaderString(
     char          *elementName,
     unsigned char  desiredType,
     char          *defaultString )
-#else
-GetDefaultHeaderString(elementName, desiredType, defaultString)
-char         *elementName;
-unsigned char  desiredType;
-char         *defaultString;
-#endif
 {
 unsigned char type,wheredef;
 M_WCHAR *content;
@@ -1488,13 +1440,7 @@ return "";
  *                       standard versions.
 */
 static void
-#if defined(M_PROTO)
 SetStdLocale(char *pLang, char *pCharset)
-#else
-SetStdLocale(pLang, pCharset)
-char *pLang;
-char *pCharset;
-#endif
 {
 static const char *cString   = "C";
 static const char *isoString = "ISO-8859-1";
@@ -1621,11 +1567,7 @@ free(lang);
  * fashion.
 */
 static char *
-#if defined(M_PROTO)
-GetStdLocale()
-#else
-GetStdLocale()
-#endif
+GetStdLocale(void)
 {
 static char buffer[256];
 static char *cString   = "C";
@@ -1705,7 +1647,7 @@ return buffer;
  * versions of the language and charset.
 */
 void
-SetDefaultLocale()
+SetDefaultLocale(void)
 {
 unsigned char type,wheredef;
 M_WCHAR *elementName;
@@ -1784,7 +1726,6 @@ if (charset && (charset != (dotPtr+1)))
 }
 
 
-#if defined(M_PROTO)
 void paragraph(M_WCHAR *indent,
               M_WCHAR *id,
               M_WCHAR *gentity,
@@ -1792,22 +1733,6 @@ void paragraph(M_WCHAR *indent,
               M_WCHAR *ghyperlink,
               M_WCHAR *glinktype,
               M_WCHAR *gdescription)
-#else
-void paragraph(indent,
-              id,
-              gentity,
-              gposition,
-              ghyperlink,
-              glinktype,
-              gdescription)
-M_WCHAR *indent;
-M_WCHAR *id;
-M_WCHAR *gentity;
-M_WCHAR *gposition;
-M_WCHAR *ghyperlink;
-M_WCHAR *glinktype;
-M_WCHAR *gdescription;
-#endif
 {
 char *firstString, *indentString;
 
@@ -1851,7 +1776,6 @@ handle_link_and_graphic(m_parent(0),
 
 }
 
-#if defined(M_PROTO)
 void figure(
        M_WCHAR *number,
        M_WCHAR *tonumber,
@@ -1862,28 +1786,6 @@ void figure(
        M_WCHAR *ghyperlink,
        M_WCHAR *glinktype,
        M_WCHAR *gdescription)
-#else
-void figure(
-       number,
-       tonumber,
-       id,
-       file,
-       figpos,
-       cappos,
-       ghyperlink,
-       glinktype,
-       gdescription)
-M_WCHAR *number;
-M_WCHAR *tonumber;
-M_WCHAR *id;
-M_WCHAR *file;
-M_WCHAR *figpos;
-M_WCHAR *cappos;
-M_WCHAR *border;
-M_WCHAR *ghyperlink;
-M_WCHAR *glinktype;
-M_WCHAR *gdescription;
-#endif
 {
 char snb_id[32];
 unsigned char etype,wheredef;
@@ -2113,14 +2015,7 @@ if (ftonumber)
 m_free(string, "default header string return");
 }
 
-#if defined(M_PROTO)
 void endterm(M_WCHAR *base, M_WCHAR *gloss, char *linktype)
-#else
-void endterm( base, gloss, linktype)
-M_WCHAR *base;
-M_WCHAR *gloss;
-char   *linktype;
-#endif
 {
 M_WCHAR *p;
 M_WCHAR  dterm[MAXTERM+1];
@@ -2240,12 +2135,7 @@ if (vgloss(gloss) == GLOSS)
 if (echo) mb_echohead("++");
 }
 
-#if defined(M_PROTO)
 M_WCHAR wc_toupper(M_WCHAR wc)
-#else
-M_WCHAR wc_toupper(wc)
-M_WCHAR wc;
-#endif
 {
 if ((wc >= 0) && (wc <= 255))
     {
@@ -2254,12 +2144,7 @@ if ((wc >= 0) && (wc <= 255))
 return wc;
 }
 
-#if defined(M_PROTO)
 M_WCHAR *wc_stringtoupper(M_WCHAR *wcp)
-#else
-M_WCHAR *wc_stringtoupper(wcp)
-M_WCHAR *wcp;
-#endif
 {
 M_WCHAR *newstring, *nsp;
 
@@ -2277,14 +2162,14 @@ while (*wcp)
 return(newstring);
 }
 
-int NextId()
+int NextId(void)
 {
 static id = 0;
 
 return ++id;
 }
 
-char *GetLanguage()
+char *GetLanguage(void)
 {
 static char *pLang = NULL;
 
@@ -2296,7 +2181,7 @@ if (!pLang)
 return pLang;
 }
 
-char *GetCharset()
+char *GetCharset(void)
 {
 static char *pCharset = NULL;
 
@@ -2309,14 +2194,7 @@ return pCharset;
 }
 
 
-#if defined(M_PROTO)
 void HandleLink(M_WCHAR *hyperlink, M_WCHAR *type, M_WCHAR *description)
-#else
-void HandleLink(hyperlink, type, description)
-M_WCHAR *hyperlink;
-M_WCHAR *type;
-M_WCHAR *description;
-#endif
 {
 char *mb_hyperlink, mb_undefined[64];
 char buffer[BIGBUF];
@@ -2472,13 +2350,7 @@ mb_strcode(">", outfile);
 }
 
 
-#if defined(M_PROTO)
 char *mb_realloc(char *ptr, long size)
-#else
-char *mb_realloc(ptr, size)
-char *ptr;
-long  size;
-#endif
 {
 void   *vptr;
 size_t ssize;
@@ -2498,12 +2370,7 @@ return (char *) vptr;
 }
 
 
-#if defined(M_PROTO)
 char *mb_malloc(long size)
-#else
-char *mb_malloc(size)
-long  size;
-#endif
 {
 char   *cptr;
 size_t ssize;
@@ -2521,12 +2388,7 @@ return cptr;
 }
 
 
-#if defined(M_PROTO)
 void mb_free(char **pptr)
-#else
-void  *mb_free(pptr)
-char **pptr;
-#endif
 {
 
 #if DEBUG_MB_MALLOC
@@ -2538,14 +2400,7 @@ free((void *) *pptr);
 *pptr = NULL;
 }
 
-#if defined(M_PROTO)
 static void AddToRowVec(int *length, char **rowvec, char *id)
-#else
-static void AddToRowVec(length, rowvec, id)
-int   *length;
-char **rowvec;
-char  *id;
-#endif
 {
 char tempRowVec[BIGBUF];
 int  rowVecLen;
@@ -2558,14 +2413,7 @@ strcpy(*rowvec + *length - 1, tempRowVec);
 }
 
 
-#if defined(M_PROTO)
 void Add2ToRowVec(int *length, char **rowvec, char *id1, char *id2)
-#else
-void Add2ToRowVec(length, rowvec, id1, id2)
-int   *length;
-char **rowvec;
-char  *id1, *id2;
-#endif
 {
 char tempRowVec[BIGBUF];
 int  rowVecLen;
@@ -2578,14 +2426,7 @@ strcpy(*rowvec + *length - 1, tempRowVec);
 }
 
 
-#if defined(M_PROTO)
 void StartEx(M_WCHAR *notes, M_WCHAR *lines, M_WCHAR *textsize)
-#else
-void StartEx(*notes, *lines, *textsize)
-M_WCHAR *notes;
-M_WCHAR *lines;
-M_WCHAR *textsize;
-#endif
 {
 exTextSize = vextextsize(textsize);
 stackex = vstack(notes);
@@ -2601,11 +2442,7 @@ svexlen      = 1;
 }
 
 
-#if defined(M_PROTO)
-void EndEx()
-#else
-void EndEx()
-#endif
+void EndEx(void)
 {
 char *annotation;
 int   annotLen;
@@ -2670,24 +2507,14 @@ if (saveexseg)
 }
 
 
-#if defined(M_PROTO)
 void StartNCW(char *which)
-#else
-void StartNCW(which)
-char *which;
-#endif
 {
 notehead = FALSE;
 PushForm(NULL, which, NULL);
 }
 
 
-#if defined(M_PROTO)
 void StartBlock(char *pclass, char *ssi, char *id)
-#else
-void StartBlock(pclass, ssi, id)
-char *pclass, *ssi, *id;
-#endif
 {
 char  localId[32];
 char *realId;
@@ -2726,14 +2553,7 @@ firstPInBlock = TRUE;
 }
 
 
-#if defined(M_PROTO)
 void StartNCWtext(char *which, char *iconFile, char *headingString)
-#else
-void StartNCWtext(which, iconFile, headingString)
-char *which;
-char *iconFile;
-char *headingString;
-#endif
 {
 char *icon, *heading;
 
@@ -2764,13 +2584,7 @@ m_free(icon, "icon name");
 }
 
 
-#if defined(M_PROTO)
 void AddToSNB(char *id, char *xid)
-#else
-void AddToSNB(id, xid)
-char *id;
-char *xid;
-#endif
 {
 char tmpsnb[BIGBUF];
 int  snblen;
@@ -2794,11 +2608,7 @@ else
 }
 
 
-#if defined(M_PROTO)
-void IncludeToss()
-#else
-void IncludeToss()
-#endif
+void IncludeToss(void)
 {
 char    pathbuf[BIGBUF];
 char   *try = pathbuf;
@@ -2883,18 +2693,10 @@ mb_free(&mb_inputname);
 /* Cyclent.c contains procedure m_cyclent(), callable by interface
    designers, to cycle through all defined entities, returning information
    about them */
-#if defined(M_PROTO)
 M_WCHAR *CycleEnt(LOGICAL init,
                  unsigned char *type,
                  M_WCHAR ***content,
                  unsigned char *wheredef)
-#else
-M_WCHAR *m_cyclent(init, type, content, wheredef)
-  LOGICAL init ;
-  unsigned char *type ;
-  M_WCHAR ***content ;
-  unsigned char *wheredef ;
-#endif
 {
 static M_TRIE *current ;
 static M_TRIE *ancestor[M_NAMELEN + 1] ;
@@ -2942,7 +2744,7 @@ return(name) ;
  * content is modified to be <SPC NAME="[......]"> so that it may be
  * emitted into the SDL output.
 */
-void ModifyEntities()
+void ModifyEntities(void)
 {
 unsigned char type;
 unsigned char wheredef;
@@ -2977,14 +2779,7 @@ while (name = CycleEnt(FALSE, &type, &content, &wheredef));
 }
 
 
-#if defined(M_PROTO)
 void PushForm(char *class, char *ssi, char *id)
-#else
-void PushForm(class, ssi, id)
-     char *class;
-     char *ssi;
-     char *id;
-#endif
 {
 char  localId[SDLNAMESIZ+10];
 char *realId;
@@ -3048,15 +2843,7 @@ needFData = TRUE;
 }
 
 
-#if defined(M_PROTO)
 void PushForm2(char *class, char *ssi, char *id1, char *id2)
-#else
-void PushForm2(class, ssi, id1, id2)
-     char *class;
-     char *ssi;
-     char *id1;
-     char *id2;
-#endif
 {
 char id[32];
 int  stackSize;
@@ -3120,7 +2907,7 @@ fputs(">\n", outfile);
 needFData = TRUE;
 }
 
-void PopForm()
+void PopForm(void)
 {
 if (inBlock)
     {
@@ -3136,7 +2923,7 @@ mb_free(&(formStackTop->rowVec));
 --formStackTop;
 }
 
-void PopForm2()
+void PopForm2(void)
 {
 if (inBlock)
     {
@@ -3157,7 +2944,7 @@ mb_free(&(formStackTop->rowVec));
  * is pushed but the source doesn't go to text either because the text
  * is explicitly optional or due to the fact that text can be null.
 */
-void PopFormMaybe()
+void PopFormMaybe(void)
 {
 if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1))
     {
@@ -3166,7 +2953,7 @@ if ((formStackTop >= formStackBase) && (formStackTop->vecLen == 1))
     }
 }
 
-void EmitSavedAnchors()
+void EmitSavedAnchors(void)
 {
 char buffer[BIGBUF];
 
@@ -3181,7 +2968,7 @@ if (parTextId)
     }
 }
 
-void CloseVirpage()
+void CloseVirpage(void)
 {
 if (parTextId)
     {
index d5b4873053f49e043c95d4422751ea2a96edccf2..aa43e0ccb2f48e8490145f2fb3841b209a253143 100644 (file)
   <\CODE>
 
 <!ENTITY m-machine SDATA CODE>
-#if defined(MSDOS)
-  m_piaction("VECTRA", "m-machine", M_SDATA) ;
-#else
 #if defined(hpux)
   {
   M_WCHAR *wc_1, *wc_2;
             M_SDATA) ;
 #endif
 #endif
-#endif
 #endif
   <\CODE>
 
index e74a56e4742c40ae1607249920b28230c856d4ac..7dfe8893124f12d5b6eef69cbb8ea76c2d02e9c1 100644 (file)
    or invoke function pointers should be in tex.c.
 */
 
-#if defined(MSDOS)
-#include <sys\types.h>
-#include <sys\stat.h>
-#endif
-
 #if defined(hpux) || defined(_AIX) || defined(sun)
 #include <sys/types.h>
 #include <sys/stat.h>
index a10226b70d4b663e0ffd18a761f1f9dd9a6db532..8c0a187fb42d4ca68e2785e1914f246d100fbe67 100644 (file)
 #define TAGDOTOPT "helptag.opt"
 #define DOTOPT ".opt"
 
-#if defined(M_PROTO)
 void options(LOGICAL filelenonly)
-#else
-void options(filelenonly)
-  LOGICAL filelenonly;
-#endif
 {
 int i;
 FILE *optfile;
@@ -149,13 +144,7 @@ optval = M_NULLVAL;
 
 /* Set a single option */
 /* Workonly parameter described with function options()*/
-#if defined(M_PROTO)
 void setopt(char *string, LOGICAL filelenonly)
-#else
-void setopt(string, filelenonly)
-char *string;
-LOGICAL filelenonly;
-#endif
 {
 char *p;
 int thisopt;
@@ -280,14 +269,7 @@ else switch(thisopt + 1)
 }
 
 /* Process a value for a command line option */
-#if defined(M_PROTO)
 LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly)
-#else
-LOGICAL setvalopt(thisopt, string, filelenonly)
-int thisopt;
-char *string;
-LOGICAL filelenonly;
-#endif
 {
 char *p;
 int i;
index 3f5ea61e6e367b611b850785db6aa2c835665502..c4bda7d3250ccda5e0d30b2e4f1732dfd9fe4c04 100644 (file)
@@ -31,8 +31,7 @@
 
 /* Echo part of a head to the screen to indicate how much of the document
    has been processed */
-void echohead(p)
-M_WCHAR *p;
+void echohead(M_WCHAR *p)
 {
 char *mb_p,*mb_string;
 
@@ -54,8 +53,7 @@ m_free(mb_string,"multi-byte string");
 }
 
 /* call echohead with a literal string */
-void mb_echohead(p)
-char *p;
+void mb_echohead(char *p)
 {
 M_WCHAR *wc;
 
@@ -67,7 +65,7 @@ m_free(wc,"wide character string");
 
 /* Called at end of a head in a chapter, appendix, section, or
    reference section */
-void endhead(M_NOPAR)
+void endhead(void)
 {
 if (savid)
     {
@@ -104,7 +102,7 @@ echo = savhd = FALSE;
  * location is placed in the snb file and the <snb> elements are
  * emitted there too.
 */
-void chksnb()
+void chksnb(void)
 {
 fputs("</HEAD>\n", outfile);
 snbstart = ftell(outfile);
@@ -121,12 +119,7 @@ if (savesnb)
 
 
 /* Process a character in an environment where spaces must be escaped */
-#if defined(M_PROTO)
 void esoutchar(M_WCHAR textchar)
-#else
-void esoutchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 static M_WCHAR wsp = 0;
 
@@ -147,12 +140,7 @@ outchar(textchar, outfile);
 }
 
 /* Process a character in a verbatim example */
-#if defined(M_PROTO)
 void vexoutchar(M_WCHAR textchar)
-#else
-void vexoutchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 static M_WCHAR  wla = 0;
        char    *holdSaveExSeg;
@@ -177,12 +165,7 @@ else
 }
 
 /* Process a character in an example */
-#if defined(M_PROTO)
 void exoutchar(M_WCHAR textchar)
-#else
-void exoutchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 char          exbuff[32]; /* arbitrarily large */
 int           bufflen;
@@ -212,12 +195,7 @@ savex = holdSavex;
 }
 
 /* Process a character in an image paragraph */
-#if defined(M_PROTO)
 void imoutchar(M_WCHAR textchar)
-#else
-void imoutchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 char           imbuff[32]; /* arbitrarily large */
 int            bufflen;
@@ -240,12 +218,7 @@ else
 }
 
 /* Write a character to be passed to the index file */
-#if defined(M_PROTO)
 void indexchar(M_WCHAR textchar)
-#else
-void indexchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 if (idxsavlen + 4 > (sizeof(idxsav) / sizeof(M_WCHAR)))
     {
@@ -257,13 +230,7 @@ idxsav[idxsavlen++] = textchar;
 
 
 /* Processes a data character */
-#if defined(M_PROTO)
 void outchar(M_WCHAR textchar, FILE *outfile)
-#else
-void outchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
 {
 M_WCHAR buffer[2];
 static M_WCHAR wnl = 0;
@@ -307,10 +274,7 @@ else
 
 
 /* Called for processing instruction */
-void outpi(enttype, pi, entname)
-int enttype;
-M_WCHAR *pi;
-M_WCHAR *entname;
+void outpi(int enttype, M_WCHAR *pi, M_WCHAR *entname)
 {
 strcode(pi, outfile);
 
@@ -333,13 +297,7 @@ if (echo)
 
 
 /* Really output a character */
-#if defined(M_PROTO)
 void realoutchar(M_WCHAR textchar, FILE *outfile)
-#else
-void realoutchar(textchar, outfile)
-M_WCHAR textchar;
-FILE *outfile;
-#endif
 {
 char mb_textchar[32]; /* arbitrarily large */
 int length, i;
@@ -379,22 +337,7 @@ if (savtc)
 
 /* Save a character in the array used to store table of contents entries
    when processing a head */
-#if defined(M_PROTO)
 void shchar(M_WCHAR textchar, int *len, int max, M_WCHAR *string, void (*proc)(M_WCHAR *string), char *msg, LOGICAL *errflg)
-#else
-void shchar(textchar, len, max, string, proc, msg, errflg)
-M_WCHAR textchar;
-int *len;
-int max;
-M_WCHAR *string;
-void (*proc)(
-#if defined(M_PROTO)
-             M_WCHAR *string
-#endif
-    );
-char *msg;
-LOGICAL *errflg;
-#endif
 {
 char mb_textchar[32]; /* arbitrarily large */
 unsigned char index;
@@ -427,27 +370,12 @@ else
 }
 
 
-#if defined(M_PROTO)
 void mb_shchar(char textchar,
               int *len,
               int max,
               M_WCHAR *string,
               void (*proc)(M_WCHAR *string),
               char *msg, LOGICAL *errflg)
-#else
-void mb_shchar(textchar, len, max, string, proc, msg, errflg)
-char textchar;
-int *len;
-int max;
-M_WCHAR *string;
-void (*proc)(
-#if defined(M_PROTO)
-    M_WCHAR *string
-#endif
-    );
-char *msg;
-LOGICAL *errflg;
-#endif
 {
 M_WCHAR wc_textchar;
 
@@ -459,13 +387,8 @@ shchar(wc_textchar, len, max, string, proc, msg, errflg);
 
 /* Save a string in the array used to store table of contents entries
    when processing a head */
-void shstring(addstring, len, max, storestring, msg, errflg)
-M_WCHAR *addstring;
-int *len;
-int max;
-M_WCHAR *storestring;
-char *msg;
-LOGICAL *errflg;
+void shstring(M_WCHAR *addstring, int *len, int max,
+              M_WCHAR *storestring, char *msg, LOGICAL *errflg)
 {
 int addlength;
 
@@ -486,13 +409,8 @@ else
 }
 
 
-void mb_shstring(addstring, len, max, storestring, msg, errflg)
-char *addstring;
-int *len;
-int max;
-M_WCHAR *storestring;
-char *msg;
-LOGICAL *errflg;
+void mb_shstring(char *addstring, int *len, int max,
+                 M_WCHAR *storestring, char *msg, LOGICAL *errflg)
 {
 M_WCHAR *wc_addstring;
 
@@ -502,9 +420,7 @@ m_free(wc_addstring,"wide character string");
 }
 
 /* Writes a string to the output file, and if appropriate saves it */
-void strcode(string, outfile)
-M_WCHAR *string;
-FILE *outfile;
+void strcode(M_WCHAR *string, FILE *outfile)
 {
 char    exbuff[32]; /* arbitrarily large */
 int     bufflen;
@@ -559,9 +475,7 @@ if (savex)
 }
 
 
-void mb_strcode(string, outfile)
-char *string;
-FILE *outfile;
+void mb_strcode(char *string, FILE *outfile)
 {
 M_WCHAR *wc;
 
@@ -571,8 +485,7 @@ m_free(wc,"wide character string");
 }
 
 /* Copies string to end of buffer where saving head for table of contents */
-void svhdstring(string)
-M_WCHAR *string;
+void svhdstring(M_WCHAR *string)
 {
 int length;
 
@@ -591,8 +504,7 @@ svheadlen += length;
 }
 
 /* Copies string to end of buffer where saving table caption */
-void svtcstring(string)
-M_WCHAR *string;
+void svtcstring(M_WCHAR *string)
 {
 int length;
 
@@ -611,12 +523,7 @@ svtclen += length;
 }
 
 /* Process a character in a term */
-#if defined(M_PROTO)
 void termchar(M_WCHAR textchar)
-#else
-void termchar(textchar)
-M_WCHAR textchar;
-#endif
 {
 int length;
 char mb_textchar[32]; /* arbitrarily large */
@@ -677,10 +584,7 @@ else
 }
 
 /* Process a PI in a term */
-void termpi(m_enttype, m_pi, m_entname)
-int m_enttype;
-M_WCHAR *m_pi;
-M_WCHAR *m_entname;
+void termpi(int m_enttype, M_WCHAR *m_pi, M_WCHAR *m_entname)
 {
 int length;
 
index 6ec2d5d63191d24ec97fa5b7e7babc0ac0a5e1df..d25355be931ba631160347ab4f12c787a0f85309 100644 (file)
@@ -138,9 +138,7 @@ struct {
 #define NO8BITCHARS 256
 int invert[NO8BITCHARS], emptycell;
 
-main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
 {
 int i, both = FALSE, spec = FALSE, coll = FALSE, error = FALSE ;
 
index be0aac82ea0b613af4335a26f7823b00762536e3..6b7bac2c78e212b7c0fbee18fecb660cd4f03882 100644 (file)
@@ -31,8 +31,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 
 /* Chk for duplicate xref id's, called in TEST, S1, S2, S3, S4, and rsect. */
-M_WCHAR *checkid(id)
-M_WCHAR *id;
+M_WCHAR *checkid(M_WCHAR *id)
 {
 struct xref *xref;
 char *buffer;
@@ -80,10 +79,7 @@ return(NULL);
 }
 
 /* Write a single cross-reference macro definition */
-static void defxref(xfile, id, xref)
-FILE *xfile;
-M_WCHAR *id;
-struct xref *xref;
+static void defxref(FILE *xfile, M_WCHAR *id, struct xref *xref)
 {
 char *csname;
 char *p;
@@ -143,7 +139,7 @@ m_free(csname, "csname");
 
 /* Write cross-reference file for next time document is processed
    and TeX macro file for post-processing this pass */
-void dumpxref(M_NOPAR)
+void dumpxref(void)
 {
 int n;
 M_WCHAR id[M_NAMELEN + 1];
@@ -196,8 +192,7 @@ while (TRUE)
 }
 
 /* Copies string to end of current cross-reference string */
-void idstring(string)
-M_WCHAR *string;
+void idstring(M_WCHAR *string)
 {
 int length;
 
@@ -219,7 +214,7 @@ xstrlen += length;
 
 /* Initializes cross-reference table reading in file output from previous
    pass through document */
-void loadxref(M_NOPAR)
+void loadxref(void)
 {
 M_WCHAR id[M_NAMELEN + 1];
 char c, d;
@@ -339,20 +334,8 @@ while (TRUE)
 
 
 /* Save a cross-reference ID and associated expansion */
-#if defined(M_PROTO)
 void setid(M_WCHAR *id, LOGICAL where, LOGICAL csensitive, LOGICAL inchapter,
           char *chapter, M_WCHAR *xrffile, int xrfline, LOGICAL xrefable)
-#else
-void setid(id, where, csensitive, inchapter, chapter, xrffile, xrfline, xrefable)
-M_WCHAR *id;
-LOGICAL where;
-LOGICAL csensitive;
-LOGICAL inchapter;
-char *chapter;
-M_WCHAR *xrffile;
-int xrfline;
-LOGICAL xrefable;
-#endif
 {
 struct xref *old;
 struct xref *xref;
@@ -426,8 +409,7 @@ savid = NULL;
 }
 
 /* Generate a cross-reference */
-void xrefexpand(id)
-M_WCHAR *id;
+void xrefexpand(M_WCHAR *id)
 {
 struct xref *xref;
 struct xref *old;
index 04718a30218bbdd732c9f7aa069909c4e703634c..81ef022f36fe527cea9eb3b1192541ea16af9415 100644 (file)
@@ -32,9 +32,6 @@ in the interface definition.*/
 
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include <string.h>
 #include "basic.h"
 #include "trie.h"
@@ -47,8 +44,7 @@ in the interface definition.*/
 #include "signon.h"
 
 /* When an explicit or implied end-tag occurs */
-void m_endaction(m_elt)
-  M_ELEMENT m_elt;
+void m_endaction(M_ELEMENT m_elt)
   {
     M_ELEMENT m_action;
     char buffer[2*MAXD+M_NAMELEN+1];
@@ -79,9 +75,7 @@ void m_endaction(m_elt)
     }
 
 /* Find appropriate action according to current stack */
-int m_findact(elt, array)
-  M_ELEMENT elt;
-  int *array;
+int m_findact(M_ELEMENT elt, int *array)
   {
     int chainlen = 0;
     int index;
@@ -107,17 +101,7 @@ int m_findact(elt, array)
     }
 
 /* Recursive procedure called by findact() to search m_action */
-#if defined(M_PROTO)
 void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, LOGICAL wild)
-#else
-void m_findchain(stackptr, start, chainin, chainout, index, wild)
-  M_PARSE *stackptr;
-  int start;
-  int chainin;
-  int *chainout;
-  int *index;
-  LOGICAL wild;
-#endif
 {
     int node;
     M_PARSE *stackp;
@@ -147,7 +131,7 @@ void m_findchain(stackptr, start, chainin, chainout, index, wild)
 /* Process global end string.  In separate procedure to keep all references
    to if.h in one source file and minimize recompilation if interface
    changes. */
-void m_globes(M_NOPAR)
+void m_globes(void)
 {
 M_WCHAR *wc_string;
 
@@ -159,7 +143,7 @@ m_free(wc_string,"wide character string");
 /* Process global start string.  In separate procedure to keep all references
    to if.h in one source file and minimize recompilation if interface
    changes. */
-void m_globss(M_NOPAR)
+void m_globss(void)
 {
 M_WCHAR *wc_string;
 
@@ -169,8 +153,7 @@ m_free(wc_string,"wide character string");
 }    
 
 /* When an explicit or implied start-tag occurs */
-void m_strtaction(m_elt)
-  M_ELEMENT m_elt;
+void m_strtaction(M_ELEMENT m_elt)
   {
     int m_par, m_i;
     M_WCHAR *m_p;
@@ -241,14 +224,7 @@ void m_strtaction(m_elt)
     }
 
 /* Output a start-string or end-string */
-#if defined(M_PROTO)
 void m_textout(char *format, LOGICAL start, LOGICAL end)
-#else
-void m_textout(format, start, end)
-  char *format;
-  LOGICAL start;
-  LOGICAL end;
-#endif
 {
 M_WCHAR name[M_NAMELEN + 1];
 int i, par;
index ca80be854e074c2ce96941a4bce1c700c6d4eac3..f3280154dd724073bb213f4de18996f973061f3f 100644 (file)
@@ -28,8 +28,7 @@
 #include "userinc.h"
 #include "globdec.h"
 
-void m_closent(m_ptr)
-  void *m_ptr ;
+void m_closent(void *m_ptr)
   {
     fclose((FILE *) m_ptr) ;
     }
index aed6f7945bb29dbc3495f25825da768baf4b32d6..36afa6ceef2dc338c47a0f2317977854beabcf0d 100644 (file)
@@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entfile.c"
 
 /* When a reference to a CODE entity is encountered */
-void m_codeent(m_ent)
-  int m_ent ;
+void m_codeent(int m_ent)
   {
     (*m_ctable[m_ent])() ;
   }
index c6bbddec2b7b6ede1c56e0693ca4f68d9bd6f8ab..eaa6532f747bce0e6b6e16d68fd951e4d98514d4 100644 (file)
 #include "parser.h"
 #include "entext.h"
 
-#if defined(M_PROTO)
 M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, unsigned char *wheredef)
-#else
-M_WCHAR *m_cyclent(init, type, content, wheredef)
-  LOGICAL init ;
-  unsigned char *type ;
-  M_WCHAR **content ;
-  unsigned char *wheredef ;
-#endif
 {
     static M_TRIE *current ;
     static M_TRIE *ancestor[M_NAMELEN + 1] ;
index 4e5465332e5e774eae046d8b38ef5057a131a459..13794674ab5901ec2830914a30d13dec35e9d1b0 100644 (file)
@@ -29,9 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 
 /* Displays current element after some error messages */
-void m_dispcurelt(file, line)
-M_WCHAR *file ;
-int line ;
+void m_dispcurelt(M_WCHAR *file, int line)
 {
 char *mb_parent;
 
index f3601280172e8f3c85bd41ccca6532dbfbdc60a9..c4de1f992a6c82e9a1f731586577e111e15e241e 100644 (file)
@@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 
 /* Perform the m_action-th end-code in the interface */
-void m_endcase(m_action)
-  int m_action ;
+void m_endcase(int m_action)
   {
     (*m_etable[m_action])() ;
     }
index d747297bcb1fa6db02a39cf9dffb6cbe2a7a6664..3bc878e03f14ff1dccca6e1d217a082203e75717 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "context.h"
@@ -43,13 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entext.h"
 
 /* Process the name in a usemap delaration */
-#if defined(M_PROTO)
 void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
-#else
-void m_ckmap(name, useoradd)
-  M_WCHAR *name ;
-  LOGICAL useoradd ;
-#endif
 {
     int mapid ;
 
@@ -61,8 +52,7 @@ void m_ckmap(name, useoradd)
 /* Check type specified in entity declaration for previously defined
    entity.  Testing to see if the new declaration is identical to the
    original one. */
-void m_eduptype(type)
-  int type ;
+void m_eduptype(int type)
   {
     if ((int) m_entity->type != type) {
       m_err1("Redefinition of entity %s ignored", m_entity->name) ;
@@ -72,8 +62,7 @@ void m_eduptype(type)
     }
 
 /* Tests if an entity is too long */
-void m_longent(context)
-  int context ;
+void m_longent(int context)
   {
     if (m_entclen >= M_LITLEN) {
       m_curcon = context ;
@@ -83,8 +72,7 @@ void m_longent(context)
     }
 
 /* Enters an entity name into the entity name tree */
-void m_ntrent(p)
-  M_WCHAR *p ;
+void m_ntrent(M_WCHAR *p)
   {
     M_ENTITY *new ;
 
index d3befd8011e40a50135d997b50df5c00c45e5633..0dd2779833b43700986621f24b22b38e887e6940 100644 (file)
@@ -29,7 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 
 /* Write error message prefix */
-void m_eprefix(M_NOPAR)
+void m_eprefix(void)
   {
     m_errline("\n*****\n") ;
     }
index 8314738bace56c87949caf6d8083ee753fad0765..b2e9db8c55eec41db4afb36d7677e899218efa26 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -43,8 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 
 /* Issue error message (no arguments) */
-void m_error(text)
-  char *text;
+void m_error(char *text)
   {
     m_startmsg();
     m_errline(text);
@@ -52,15 +48,9 @@ void m_error(text)
   }
 
 /* Issue error message (one argument) */
-#if defined(M_PROTO)
 void m_err1(
   const char    *text,
   const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
-  char    *text;
-  M_WCHAR *arg;
-#endif
 {
 char *buffer, *mb_arg;
 
@@ -77,15 +67,9 @@ m_esuffix();
 }
 
 
-#if defined(M_PROTO)
 void m_mberr1(
   const char *text,
   const char *arg)
-#else
-void m_err1(text, arg)
-  char    *text;
-  char *arg;
-#endif
   {
   M_WCHAR *wc_arg;
 
@@ -95,17 +79,10 @@ void m_err1(text, arg)
   }
 
 /* Issue error message (two arguments) */
-#if defined(M_PROTO)
 void m_err2(
   const char    *text,
   const M_WCHAR *arg1,
   const M_WCHAR *arg2)
-#else
-void m_err2(text, arg1, arg2)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-#endif
   {
     char *buffer;
     char *mb_arg1,*mb_arg2;
@@ -126,19 +103,11 @@ void m_err2(text, arg1, arg2)
   }
 
 /* Issue error message (three arguments) */
-#if defined(M_PROTO)
 void m_err3(
   char    *text,
   M_WCHAR *arg1,
   M_WCHAR *arg2,
   M_WCHAR *arg3)
-#else
-void m_err3(text, arg1, arg2, arg3)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3;
@@ -164,21 +133,12 @@ void m_err3(text, arg1, arg2, arg3)
   }
 
 /* Issue error message (four arguments) */
-#if defined(M_PROTO)
 void m_err4(
   char    *text,
   M_WCHAR *arg1,
   M_WCHAR *arg2,
   M_WCHAR *arg3,
   M_WCHAR *arg4)
-#else
-void m_err4(text, arg1, arg2, arg3, arg4)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4;
@@ -207,7 +167,6 @@ void m_err4(text, arg1, arg2, arg3, arg4)
   }
 
 /* Issue error message (five arguments) */
-#if defined(M_PROTO)
 void m_err5(
   char    *text,
   M_WCHAR *arg1,
@@ -215,15 +174,6 @@ void m_err5(
   M_WCHAR *arg3,
   M_WCHAR *arg4,
   M_WCHAR *arg5)
-#else
-void m_err5(text, arg1, arg2, arg3, arg4, arg5)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
@@ -261,7 +211,6 @@ void m_err5(text, arg1, arg2, arg3, arg4, arg5)
   }
 
 /* Issue error message (six arguments) */
-#if defined(M_PROTO)
 void m_err6(
   char    *text,
   M_WCHAR *arg1,
@@ -270,16 +219,6 @@ void m_err6(
   M_WCHAR *arg4,
   M_WCHAR *arg5,
   M_WCHAR *arg6)
-#else
-void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-  M_WCHAR *arg6;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6;
@@ -321,7 +260,6 @@ void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
   }
 
 /* Issue error message (seven arguments) */
-#if defined(M_PROTO)
 void m_err7(
   char    *text,
   M_WCHAR *arg1,
@@ -331,17 +269,6 @@ void m_err7(
   M_WCHAR *arg5,
   M_WCHAR *arg6,
   M_WCHAR *arg7)
-#else
-void m_err7(text, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-  M_WCHAR *arg6;
-  M_WCHAR *arg7;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7;
@@ -388,9 +315,7 @@ void m_err7(text, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
 
 /* Getline.c returns the name of the current input file and the number
    of the current line */
-void m_getline(file, line)
-  M_WCHAR **file;
-  int *line;
+void m_getline(M_WCHAR **file, int *line)
   {
     int i;
 
@@ -405,7 +330,7 @@ void m_getline(file, line)
 
 /* Dump last characters read from input stream to give context to
    an error message */
-void m_lastchars(M_NOPAR)
+void m_lastchars(void)
 {
 int i;
 M_WCHAR buffer[2];
@@ -454,14 +379,14 @@ if ((m_svlncnt[m_sysecnt] &&
 }
 
 /* Display information about the current element */
-void m_showcurelt(M_NOPAR)
+void m_showcurelt(void)
   {
     if (m_stacktop->oldtop)
       m_dispcurelt(m_stacktop->file, m_stacktop->line);
     }    
 
 /* Start an error message */
-void m_startmsg(M_NOPAR)
+void m_startmsg(void)
   {
     m_eprefix();
     m_errexit = TRUE;
@@ -469,7 +394,7 @@ void m_startmsg(M_NOPAR)
 
 /* Return the name of the current input file (most recently opened, but
    unclosed SYSTEM entity) */
-M_WCHAR *m_thisfile(M_NOPAR)
+M_WCHAR *m_thisfile(void)
   {
     int i;
 
@@ -482,7 +407,7 @@ M_WCHAR *m_thisfile(M_NOPAR)
     }
 
 /* Return the line number in the current input file */
-int m_thisline(M_NOPAR)
+int m_thisline(void)
   {
     return(m_line[m_sysecnt]);
     }
index f998759a472900f31a5a107f0a64490ebb61d6eb..b56151199c37f46c59e6c394a409ae5528cb0f77 100644 (file)
@@ -27,12 +27,9 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 #include "userinc.h"
 #include "globdec.h"
-#if defined(MSDOS)
-#include <process.h>
-#endif
 
 /* Write error message suffix */
-void m_esuffix(M_NOPAR)
+void m_esuffix(void)
   {
     m_errline("\n") ;
     m_dumpline(m_thisfile(), m_thisline()) ;
index 49bed3fd36c21661ca3035c9a9604035e78515e8..e6fe9900349877d2754177ec096a0584eeecbda2 100644 (file)
@@ -27,9 +27,6 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 #include "userinc.h"
 #include "globdec.h"
-#if defined(MSDOS)
-#include <process.h>
-#endif
 
 /* Default version of PARSER m_exit().  Allows interface control if
    internal error causes PARSER to halt. */
index 2a27a06805f226014fabdb1bde9016c9775f7ceb..7aa28f8b53a252c71c5a7f5f01fbaa0985970278 100644 (file)
    Returns 0 if elt is not a valid element name, if param is specified
    but is not a valid parameter name, or if param is NULL and value is
    not a valid value of any of elt's parameters. */
-#if defined(M_PROTO)
 int m_findpar( const char *elt , const char *param , const M_WCHAR *value )
-#else
-int m_findpar(elt, param, value)
-char *elt ;
-char *param ;
-M_WCHAR *value ;
-#endif /* M_PROTO */
 {
 M_ELEMENT eltid ;
 int par ;
index d99a5908cc860c8bf4795c29c2c1f19328d40665..1e53a8678d312f25642eb372ab6d562c62089300 100644 (file)
@@ -34,7 +34,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "parser.h"
 #include "signonx.h"
 
-void m_getsignon(M_NOPAR)
+void m_getsignon(void)
   {
     m_errline(m_signon) ;
     }
index 248a7d428f522dbd5a9e5006286e124a61ddcd39..2a75ce3eff594b7c9d99d32c2225b65afae9b381 100644 (file)
@@ -39,7 +39,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "parser.h"
 
 /* M_etcomplete is called when a complete end-tag has been read */
-void m_etcomplete(M_NOPAR)
+void m_etcomplete(void)
   {
     if (! m_scanel) {
       M_WCHAR *wc_etago, *wc_tagc;
@@ -64,8 +64,7 @@ void m_etcomplete(M_NOPAR)
 
 /* M_frcend is called after a syntax error to end element VAL even
    if more content for that element is expected */
-void m_frcend(val)
-  M_ELEMENT val ;
+void m_frcend(M_ELEMENT val)
   {
     M_PARSE *stackptr ;
     M_ELEMENT poppedval ;
@@ -91,7 +90,7 @@ void m_frcend(val)
 
 /* M_frcstart is called to force the start of an element when that element
    cannot legally occur in the current context but does appear in the text*/
-void m_frcstart(M_NOPAR)
+void m_frcstart(void)
   {
     m_push(m_scanel, m_element[m_scanel - 1].start, m_scannet) ;
     if (m_scannet) m_netlevel++ ;
@@ -108,7 +107,7 @@ void m_frcstart(M_NOPAR)
 
 /* M_holdproc processes a RE that was saved to test if it was the last
    RE in an element's content */
-void m_holdproc(M_NOPAR)
+void m_holdproc(void)
   {
     if (m_stacktop->holdre) {
       m_stacktop->holdre = FALSE ;
@@ -122,7 +121,7 @@ void m_holdproc(M_NOPAR)
     }
 
 /* M_stcomplete is called when a complete start tag has been recognized */
-void m_stcomplete(M_NOPAR)
+void m_stcomplete(void)
   {
     if (! m_scanel) return ;
     if (m_strtproc(m_scanel))
index ef7ad203697d336933a7cfb768fb3450222d241c..f79a2ccf846b0b4808e3cf8b3874569051602851 100644 (file)
@@ -33,8 +33,7 @@
 
 /* Procedure callable by interface designer.  Returns number of occurrences
    of element on parse stack */
-int m_level(elt)
-  M_WCHAR *elt ;
+int m_level(M_WCHAR *elt)
   {
     int i = 0 ;
     M_PARSE *stackptr ;
@@ -48,8 +47,7 @@ int m_level(elt)
     }
 
 
-int m_mblevel(elt)
-  char *elt ;
+int m_mblevel(char *elt)
   {
   int     retval;
   M_WCHAR *wc_elt;
index 07c2f222558fd28be5d16e5bf4e7c7bcd2ca175a..401be0b83c54ae0b89ccb1e1846d3fb6c66923c8 100644 (file)
@@ -38,11 +38,8 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "parser.h"
 #include "entext.h"
 
-LOGICAL m_lookent(name, type, content, wheredef)
-  M_WCHAR *name ;
-  unsigned char *type ;
-  M_WCHAR **content ;
-  unsigned char *wheredef ;
+LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content,
+                  unsigned char *wheredef)
   {
     M_ENTITY *entity ;
 
index 10415a34119342f617842b6c9055efbaebb77246..9a5e82c3c111a12d84cae95655d2e7809a16189d 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <stdio.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -43,7 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* M_expecting reports to the user the possible valid content at a particular
    state in the parse of the document */
-void m_expecting(M_NOPAR)
+void m_expecting(void)
   {
     LOGICAL expstart = TRUE ;
     M_PARSE *stackptr ;
@@ -102,11 +99,7 @@ void m_expecting(M_NOPAR)
 
 /* Recursive procedure first called from expecting() to display
    names of elements reachable from a particular node */
-void m_expexpand(expstart, node, required, data)
-  LOGICAL *expstart ;
-  M_STATE node ;
-  LOGICAL *required ;
-  LOGICAL *data ;
+void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data)
   {
     M_ARC parc ;
     M_ANDGROUP pand ;
@@ -128,10 +121,7 @@ void m_expexpand(expstart, node, required, data)
     }
 
 /* M_expline writes one line for m_expecting() */
-void m_expline(expstart, data, label)
-  LOGICAL *expstart ;
-  LOGICAL *data ;
-  M_ELEMENT label ;
+void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label)
   {
     char buffer[M_NAMELEN + 2*MAXD + 1] ;
 
@@ -168,9 +158,7 @@ void m_expline(expstart, data, label)
 
 /* M_exptend is called from m_expecting to inform the user after an
    error if an end tag is permitted */
-void m_exptend(expstart, stackptr)
-  LOGICAL *expstart ;
-  M_PARSE *stackptr ;
+void m_exptend(LOGICAL *expstart, M_PARSE *stackptr)
   {
     char buffer[M_NAMELEN + 2*MAXD + 1] ;
 
@@ -219,9 +207,7 @@ void m_exptend(expstart, stackptr)
    element, 1 if character data is expected, and 0 (FALSE) if there is
    no unique element. 
 */
-M_ELEMENT m_findunique(from, newleft)
-  M_STATE from ;
-  int *newleft ;
+M_ELEMENT m_findunique(M_STATE from, int *newleft)
   {
     M_ARC parc ;
     M_ELEMENT cr = 0, minim = 0;
@@ -276,7 +262,7 @@ M_ELEMENT m_findunique(from, newleft)
 
 /* M_nullendtag is called when a null end tag is encountered; i.e., at the
    end of a short element */
-void m_nullendtag(M_NOPAR)
+void m_nullendtag(void)
   {
     LOGICAL foundnet ;
 
@@ -307,7 +293,7 @@ void m_nullendtag(M_NOPAR)
 
 /* Tests to see if an end tag may have been omitted at this point in the
    parse.*/
-LOGICAL m_omitend(M_NOPAR)
+LOGICAL m_omitend(void)
   {
     M_ANDGROUP pand ;
     M_OPENFSA *fsastack ;
@@ -342,7 +328,7 @@ LOGICAL m_omitend(M_NOPAR)
 
 /* Tests to see if a start tag may have been omitted at this point of
    the parse.  If so, saves the element name in the MINVAL array*/
-LOGICAL m_omitstart()
+LOGICAL m_omitstart(void)
   {
     M_ELEMENT c = M_NULLVAL ;
 
index 96f71659d9a694240c25f10441e4c764bf13c77f..9a58dea2ced0f90a9088eafad64c9585efe6b921 100644 (file)
@@ -28,7 +28,7 @@
 #include "userinc.h"
 #include "globdec.h"
 
-void *m_openfirst(M_NOPAR)
+void *m_openfirst(void)
   {
     return((void *) stdin) ;
     }
index f6926554deb41955d6bb8e233e4502edebad3741..5ca84929df4220b95e7477347f539732f9872fbb 100644 (file)
@@ -33,8 +33,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "parser.h"
 
 /* Get program options from a string */
-void m_optstring(p)
-  char *p ;
+void m_optstring(char *p)
   {
     if (strchr(p, 'a')) m_malftrace = TRUE ;
     if (strchr(p, 'c')) m_chtrace = TRUE ;
index 6dd97930a4fb8b24d6e941b79de9c9052318735e..1425c489fd68689020e6c0e830971cd3f2dfd577 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "delim.h"
@@ -45,8 +42,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Process the value for the parameter whose index number was previously
    saved in m_ppsave */
-void m_attval(string)
-  M_WCHAR *string ;
+void m_attval(M_WCHAR *string)
   {
     const M_WCHAR *p ;
 
@@ -68,8 +64,7 @@ void m_attval(string)
 
 /* Process a string that is a parameter value not prefixed by the parameter
    name and value indicator */
-LOGICAL m_attvonly(string)
-  M_WCHAR *string ;
+LOGICAL m_attvonly(M_WCHAR *string)
   {
     const M_WCHAR *p ;
     int par, i ;
@@ -117,7 +112,7 @@ LOGICAL m_attvonly(string)
 
 /* Check a name previously saved in m_saveatt to see if it is the name of
    a valid parameter for the current start tag */
-void m_findatt(M_NOPAR)
+void m_findatt(void)
   {
     int par, i ;
 
@@ -155,8 +150,7 @@ void m_findatt(M_NOPAR)
     }
 
 /* Free the parameter storage associated with an element on the parse stack */
-void m_freeparam(stackelt)
-  M_PARSE *stackelt ;
+void m_freeparam(M_PARSE *stackelt)
   {
     int i ;
     int par ;
@@ -176,9 +170,7 @@ void m_freeparam(stackelt)
 /* Force a parameter value to uppercase, if appropriate for its type.
    Also, if list-valued attribute, remove leading and trailing spaces,
    and condense white-space sequences to a single blank*/
-void m_parupper(par, string)
-  int par ;
-  M_WCHAR *string ;
+void m_parupper(int par, M_WCHAR *string)
   {
     M_WCHAR *p ;
     M_WCHAR *q ;
@@ -220,7 +212,7 @@ void m_parupper(par, string)
 
 /* Set all parameters to their default values for an element included by
    tag minimization */
-void m_stkdefaultparams(M_NOPAR)
+void m_stkdefaultparams(void)
   {
     int i, par = 0 ;
 
@@ -236,11 +228,7 @@ void m_stkdefaultparams(M_NOPAR)
     }
 
 /* Stack one default parameter */
-void m_stkonedef(par, scanel, poccur, i)
-  int par ;
-  M_ELEMENT scanel ;
-  M_WCHAR **poccur ;
-  int i ;
+void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i)
   {
     if (m_parameter[par - 1].deftype == M_REQUIRED ||
         (m_parameter[par - 1].deftype == M_CURRENT &&
@@ -272,7 +260,7 @@ void m_stkonedef(par, scanel, poccur, i)
     }
 
 /* Stack parameter values */
-void m_stkparams(M_NOPAR)
+void m_stkparams(void)
   {
     int i, par ;
 
@@ -290,13 +278,7 @@ void m_stkparams(M_NOPAR)
     }
 
 /* Update the default of a parameter whose default is #CURRENT */
-#if defined(M_PROTO)
 void m_updatedefault(const int par , const M_WCHAR *string )
-#else
-void m_updatedefault(par, string)
-  int par ;
-  M_WCHAR *string ;
-#endif /* M_PROTO */
   {
     if (m_parameter[par - 1].deftype != M_CURRENT &&
         m_parameter[par - 1].deftype != M_CHANGEDCUR) return ;
@@ -322,8 +304,7 @@ void m_updatedefault(par, string)
 
 /* Check to see if a string that occurs after the element name in a start
    tag is a valid parameter name or value; if not, assume tag is ended */
-LOGICAL m_validinpar(string)
-  M_WCHAR *string ;
+LOGICAL m_validinpar(M_WCHAR *string)
   {
     int par ;
     M_WCHAR *p ;
index e7f6217a77573078890593f56adb3cfdce36cc4e..aaf8fc2f3deacfcd6a9616e682922ca26c8bb786 100644 (file)
@@ -34,8 +34,7 @@
 /* Procedure callable by interface designers.  Returns pointer to name
    of nth level parent of current element (0 is self, 1 is parent, 2
    is grandparent, etc.) */
-M_WCHAR *m_parent(n)
-  int n ;
+M_WCHAR *m_parent(int n)
   {
     M_PARSE *stackptr ;
 
index 9c766429e3c65fe9cf23e8e5cd333b7e6f8659f3..1a28b615f27ed1ee80409da7d4b37555108637df 100644 (file)
@@ -36,9 +36,7 @@
 #include "entext.h"
 
 /* Main procedure */
-int main(argc, argv)
-  int argc ;
-  char **argv ;
+int main(int argc, char **argv)
   {
     static char parserr[] = "\nM_token=%d, m_prevcon=%d, m_scanval=%d\n" ;
     static char sopt[] =
index b431484f14cf40bd3e4e027bb25e7ddc63ccbfad..3d721d110a9fac53353db43c95c33d6b0095cca4 100644 (file)
@@ -345,8 +345,6 @@ M_PAREXTERN int m_wsused ;
 /* Temporary pointers to parameter values.  Used while scanning start tag
    before element is placed on parse stack.*/
 M_PAREXTERN
-#if defined M_PROTO
-#endif
 M_WCHAR *m_poccur[
 #if defined(M_PARDEF)
 M_MAXPAR ? M_MAXPAR : 1
index 4fd0080cb911b0df0a553a67669ef9d7ecdb20de..65087f69f024f347a3e548b220a09b08d8eb9bfc 100644 (file)
@@ -33,9 +33,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <locale.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -48,7 +45,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "version.h"
 
 /* Adjust parsing state after each token if necessary */
-void m_adjuststate(M_NOPAR)
+void m_adjuststate(void)
   {
     if (m_curcon == START) {
       if (m_netlevel) {
@@ -79,7 +76,7 @@ void m_adjuststate(M_NOPAR)
 
 /* Tests whether the element named in a tag is defined; if so, returns its
    index; otherwise return FALSE */
-M_ELEMENT m_eltname(M_NOPAR)
+M_ELEMENT m_eltname(void)
   {
     M_ELEMENT eltid ;
 
@@ -90,7 +87,7 @@ M_ELEMENT m_eltname(M_NOPAR)
       }
     }
 
-int get_mb_cur_max()
+int get_mb_cur_max(void)
 {
 char *l;
 int   i;
@@ -103,7 +100,7 @@ return i;
 }
 
 /* Program initialization */
-void m_initialize(M_NOPAR)
+void m_initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
index 58a124b181d6f0165b37f555a95381453ff875f8..a9aa78455b0ff50422bb640414421b3953824889 100644 (file)
 /* Function callable by interface designers.  Returns TRUE if specified value
    is a legal value for the indicated parameter of the given element,
    FALSE otherwise. */
-#if defined(M_PROTO)
 LOGICAL m_parvalok( M_WCHAR *elt , M_WCHAR *param , const M_WCHAR *value )
-#else
-LOGICAL m_parvalok(elt, param, value)
-  M_WCHAR *elt ;
-  M_WCHAR *param ;
-  M_WCHAR *value ;
-#endif /* M_PROTO */
   {
     M_ELEMENT eltid ;
     int par ;
index a51a90d152d2c7445844267dde606d4e8aa1adde..bd74454aa9bed97b2a6c967a0ebc8e03bc833e82 100644 (file)
@@ -38,10 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* When a processing instruction or SDATA entity other than a CODE entity
    occurs */
-void m_piaction(m_pi, m_entname, m_enttype)
-  M_WCHAR *m_pi ;
-  M_WCHAR *m_entname ;
-  int m_enttype ;
+void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype)
   {
     m_stackpar = m_stacktop->piparam ;
     (*m_ptable[m_stacktop->picase])(m_pi, m_entname, m_enttype) ;
index 2cfe20090433d1503c89ebeef5c999dfcd88551b..8ad1f618ab710e4487cd566a4a255051db52ab35 100644 (file)
  * Floor, Boston, MA 02110-1301 USA
  */
 /* $XConsortium: proto.h /main/3 1995/11/08 10:24:42 rswiston $ */
-int m_actgetc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_adjuststate(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void m_attval(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_attvonly(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-int m_checkstart(
-#if defined(M_PROTO)
-  M_ELEMENT val
-#endif
-  ) ;
-
-LOGICAL m_ckend(
-#if defined(M_PROTO)
-  M_ELEMENT val, LOGICAL neednet
-#endif
-  ) ;
-
-void m_ckmap(
-#if defined(M_PROTO)
-  M_WCHAR *name, LOGICAL useoradd
-#endif
-  ) ;
-
-void m_closent(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-void m_codeent(
-#if defined(M_PROTO)
-  int m_ent
-#endif
-  ) ;
-
-M_PARSE *m_copystackelt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *m_cyclent(
-#if defined(M_PROTO)
-  LOGICAL init, unsigned char *type, M_WCHAR **content, 
-  unsigned char *wheredef
-#endif
-  ) ;
-
-void m_dispcurelt(
-#if defined(M_PROTO)
-  M_WCHAR *file, int line
-#endif
-  ) ;
-
-void m_done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_dumpline(
-#if defined(M_PROTO)
-  M_WCHAR *file, int line
-#endif
-  ) ;
-
-void m_eduptype(
-#if defined(M_PROTO)
-  int type
-#endif
-  ) ;
-
-M_ELEMENT m_eltname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_endaction(
-#if defined(M_PROTO)
-  M_ELEMENT m_elt
-#endif
-  ) ;
-
-void m_endcase(
-#if defined(M_PROTO)
-  int m_action
-#endif
-  ) ;
-
-void m_endtag(
-#if defined(M_PROTO)
-  M_ELEMENT c
-#endif
-  ) ;
-
-void m_entexpand(
-#if defined(M_PROTO)
-  M_ENTITY *openent
-#endif
-  ) ;
-
-void m_eprefix(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5
-#endif
-  ) ;
-
-void m_err6(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6
-#endif
-  ) ;
-
-void m_err7(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7
-#endif
-  ) ;
-
-void m_errline(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_esuffix(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
-
-void m_etcomplete(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_excluded(
-#if defined(M_PROTO)
-  M_ELEMENT elt
-#endif
-  ) ;
-
-void m_expecting(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_expexpand(
-#if defined(M_PROTO)
-  LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data
-#endif
-  ) ;
-
-void m_expline(
-#if defined(M_PROTO)
-  LOGICAL *expstart, LOGICAL *data, M_ELEMENT label
-#endif
-  ) ;
-
-void m_exptend(
-#if defined(M_PROTO)
-  LOGICAL *expstart, M_PARSE *stackptr
-#endif
-  ) ;
-
-int m_findact(
-#if defined(M_PROTO)
-  M_ELEMENT elt, int *array
-#endif
-  ) ;
-
-void m_findatt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_findchain(
-#if defined(M_PROTO)
-  M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, 
-  LOGICAL wild
-#endif
-  ) ;
-
-int m_findpar(
-#if defined(M_PROTO)
-  const char *elt, const char *param, const M_WCHAR *value
-#endif
-  ) ;
-
-M_ELEMENT m_findunique(
-#if defined(M_PROTO)
-  M_STATE from, int *newleft
-#endif
-  ) ;
-
-void m_frcend(
-#if defined(M_PROTO)
-  M_ELEMENT val
-#endif
-  ) ;
-
-void m_frcstart(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void m_freeFSA(
-#if defined(M_PROTO)
-  M_PARSE *stackelt
-#endif
-  ) ;
-
-void m_freemin(
-#if defined(M_PROTO)
-  M_MIN *min
-  , char *msg
-#endif
-  ) ;
-
-void m_freeparam(
-#if defined(M_PROTO)
-  M_PARSE *stackelt
-#endif
-  ) ;
-
-LOGICAL m_gendelim(
-#if defined(M_PROTO)
-  int srlen, int context
-#endif
-  ) ;
-
-int m_getachar(
-#if defined(M_PROTO)
-  M_HOLDTYPE *dchar
-#endif
-  ) ;
-
-int m_getc(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-void *m_getdata(
-#if defined(M_PROTO)
-  int n, LOGICAL *flag
-#endif
-  ) ;
-
-void m_getline(
-#if defined(M_PROTO)
-  M_WCHAR **file, int *line
-#endif
-  ) ;
-
-void m_getname(
-#if defined(M_PROTO)
-  M_WCHAR first
-#endif
-  ) ;
-
-void m_getsignon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_gettoken(
-#if defined(M_PROTO)
-  int *c, M_HOLDTYPE *dchar, int context
-#endif
-  ) ;
-
-void m_globes(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_globss(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_holdproc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_inctest(
-#if defined(M_PROTO)
-  int *count, int limit, char *message
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_lastchars(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_level(
-#if defined(M_PROTO)
-  M_WCHAR *elt
-#endif
-  ) ;
-
-int m_mblevel(
-#if defined(M_PROTO)
-  char *elt
-#endif
-  ) ;
-
-void m_litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-void m_longent(
-#if defined(M_PROTO)
-  int context
-#endif
-  ) ;
-
-LOGICAL m_lookent(
-#if defined(M_PROTO)
-  M_WCHAR *name, unsigned char *type, M_WCHAR **content, 
-  unsigned char *wheredef
-#endif
-  ) ;
-
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void m_missingtagc(
-#if defined(M_PROTO)
-  int c, M_HOLDTYPE dchar, LOGICAL start
-#endif
-  ) ;
-
-LOGICAL m_nextand(
-#if defined(M_PROTO)
-  M_OPENFSA *thisfsa, M_ELEMENT label
-#endif
-  ) ;
-
-void m_nextdelimchar(
-#if defined(M_PROTO)
-  int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank, 
-  unsigned char type
-#endif
-  ) ;
-
-void m_ntrent(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void m_nullendtag(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_omitend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_omitstart(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void *m_openent(
-#if defined(M_PROTO)
-  M_WCHAR *entcontent
-#endif
-  ) ;
-
-void *m_openfirst(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_optstring(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie, M_WCHAR *name
-#endif
-  ) ;
-
-int m_parcount(
-#if defined(M_PROTO)
-  M_WCHAR *elt
-#endif
-  ) ;
-
-M_WCHAR *m_pardefault(
-#if defined(M_PROTO)
-  M_WCHAR *elt, M_WCHAR *param, unsigned char *type
-#endif
-  ) ;
-
-M_WCHAR *m_parent(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-M_WCHAR *m_parname(
-#if defined(M_PROTO)
-  M_WCHAR *elt, int n
-#endif
-  ) ;
-
-M_WCHAR *m_mbparname(
-#if defined(M_PROTO)
-  char *elt, int n
-#endif
-  ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-void m_parupper(
-#if defined(M_PROTO)
-  int par, M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_parvalok(
-#if defined(M_PROTO)
-  M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value
-#endif
-  ) ;
-
-void m_piaction(
-#if defined(M_PROTO)
-  M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype
-#endif
-  ) ;
-
-void m_pop(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_push(
-#if defined(M_PROTO)
-  M_ELEMENT elt, M_STATE current, LOGICAL need
-#endif
-  ) ;
-
-LOGICAL m_putdata(
-#if defined(M_PROTO)
-  void *data, int n
-#endif
-  ) ;
-
-void m_readcomments(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void *m_realloc(
-#if defined(M_PROTO)
-  void *ptr, int size, char *msg
-#endif
-  ) ;
-
-int m_scan(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_setmap(
-#if defined(M_PROTO)
-  int map, LOGICAL useoradd
-#endif
-  ) ;
-
-void m_setoptions(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_setparam(
-#if defined(M_PROTO)
-  M_WCHAR **cvar, int par
-#endif
-  ) ;
-
-void m_shortref(
-#if defined(M_PROTO)
-  int context
-#endif
-  ) ;
-
-void m_showcurelt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_signmsg(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_sigre(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_startdoc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_startmsg(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stcaction(
-#if defined(M_PROTO)
-  M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END
-#endif
-  ) ;
-
-void m_stcomplete(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stkdefaultparams(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stkonedef(
-#if defined(M_PROTO)
-  int par, M_ELEMENT scanel, M_WCHAR **poccur, int i
-#endif
-  ) ;
-
-void m_stkparams(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_strtaction(
-#if defined(M_PROTO)
-  M_ELEMENT m_elt
-#endif
-  ) ;
-
-void m_strtcase(
-#if defined(M_PROTO)
-  int m_action
-#endif
-  ) ;
-
-void m_strtcdata(
-#if defined(M_PROTO)
-  int scanval
-#endif
-  ) ;
-
-LOGICAL m_strtproc(
-#if defined(M_PROTO)
-  M_ELEMENT scanval
-#endif
-  ) ;
-
-void m_strttag(
-#if defined(M_PROTO)
-  M_ELEMENT val, LOGICAL net
-#endif
-  ) ;
-
-void m_textaction(
-#if defined(M_PROTO)
-  M_WCHAR m_textchar
-#endif
-  ) ;
-
-void m_textout(
-#if defined(M_PROTO)
-  char *format, LOGICAL start, LOGICAL end
-#endif
-  ) ;
-
-LOGICAL m_textpermitted(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *m_thisfile(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_thisline(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_trace(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-LOGICAL m_transition(
-#if defined(M_PROTO)
-  M_ELEMENT label, LOGICAL recur
-#endif
-  ) ;
-
-void m_undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim, LOGICAL flag
-#endif
-  ) ;
-
-void m_ungetachar(
-#if defined(M_PROTO)
-  int c, M_HOLDTYPE dchar, LOGICAL preread
-#endif
-  ) ;
-
-void m_updatedefault(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-LOGICAL m_validinpar(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_vldentref(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+int m_actgetc(void);
+
+void m_adjuststate(void);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void m_attval(M_WCHAR *string);
+
+LOGICAL m_attvonly(M_WCHAR *string);
+
+int m_checkstart(M_ELEMENT val);
+
+LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet);
+
+void m_ckmap(M_WCHAR *name, LOGICAL useoradd);
+
+void m_closent(void *m_ptr);
+
+void m_codeent(int m_ent);
+
+M_PARSE *m_copystackelt(void);
+
+M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, 
+  unsigned char *wheredef);
+
+void m_dispcurelt(M_WCHAR *file, int line);
+
+void m_done(void);
+
+void m_dumpline(M_WCHAR *file, int line);
+
+void m_eduptype(int type);
+
+M_ELEMENT m_eltname(void);
+
+void m_endaction(M_ELEMENT m_elt);
+
+void m_endcase(int m_action);
+
+void m_endtag(M_ELEMENT c);
+
+void m_entexpand(M_ENTITY *openent);
+
+void m_eprefix(void);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_err6(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6);
+
+void m_err7(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7);
+
+void m_errline(char *p);
+
+void m_error(char *text);
+
+void m_esuffix(void);
+
+void m_exit(int status);
+
+void m_etcomplete(void);
+
+LOGICAL m_excluded(M_ELEMENT elt);
+
+void m_expecting(void);
+
+void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data);
+
+void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label);
+
+void m_exptend(LOGICAL *expstart, M_PARSE *stackptr);
+
+int m_findact(M_ELEMENT elt, int *array);
+
+void m_findatt(void);
+
+void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, 
+  LOGICAL wild);
+
+int m_findpar(const char *elt, const char *param, const M_WCHAR *value);
+
+M_ELEMENT m_findunique(M_STATE from, int *newleft);
+
+void m_frcend(M_ELEMENT val);
+
+void m_frcstart(void);
+
+void m_free(void *block, char *msg);
+
+void m_freeFSA(M_PARSE *stackelt);
+
+void m_freemin(M_MIN *min
+  , char *msg);
+
+void m_freeparam(M_PARSE *stackelt);
+
+LOGICAL m_gendelim(int srlen, int context);
+
+int m_getachar(M_HOLDTYPE *dchar);
+
+int m_getc(void *m_ptr);
+
+int mb_getwc(void *m_ptr);
+
+void *m_getdata(int n, LOGICAL *flag);
+
+void m_getline(M_WCHAR **file, int *line);
+
+void m_getname(M_WCHAR first);
+
+void m_getsignon(void);
+
+int m_gettoken(int *c, M_HOLDTYPE *dchar, int context);
+
+void m_globes(void);
+
+void m_globss(void);
+
+void m_holdproc(void);
+
+void m_inctest(int *count, int limit, char *message);
+
+void m_initctype(void);
+
+void m_initialize(void);
+
+void m_lastchars(void);
+
+int m_level(M_WCHAR *elt);
+
+int m_mblevel(char *elt);
+
+void m_litproc(int delim);
+
+void m_longent(int context);
+
+LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content, 
+  unsigned char *wheredef);
+
+int main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start);
+
+LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label);
+
+void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank, 
+  unsigned char type);
+
+void m_ntrent(M_WCHAR *p);
+
+void m_nullendtag(void);
+
+LOGICAL m_omitend(void);
+
+LOGICAL m_omitstart(void);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void *m_openent(M_WCHAR *entcontent);
+
+void *m_openfirst(void);
+
+void m_optstring(char *p);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+int m_parcount(M_WCHAR *elt);
+
+M_WCHAR *m_pardefault(M_WCHAR *elt, M_WCHAR *param, unsigned char *type);
+
+M_WCHAR *m_parent(int n);
+
+M_WCHAR *m_parname(M_WCHAR *elt, int n);
+
+M_WCHAR *m_mbparname(char *elt, int n);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+void m_parupper(int par, M_WCHAR *string);
+
+LOGICAL m_parvalok(M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value);
+
+void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype);
+
+void m_pop(void);
+
+void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need);
+
+LOGICAL m_putdata(void *data, int n);
+
+void m_readcomments(void);
+
+void *m_realloc(void *ptr, int size, char *msg);
+
+int m_scan(void);
+
+void m_setmap(int map, LOGICAL useoradd);
+
+void m_setoptions(void);
+
+void m_setparam(M_WCHAR **cvar, int par);
+
+void m_shortref(int context);
+
+void m_showcurelt(void);
+
+void m_signmsg(char *p);
+
+void m_sigre(void);
+
+void m_startdoc(void);
+
+void m_startmsg(void);
+
+void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END);
+
+void m_stcomplete(void);
+
+void m_stkdefaultparams(void);
+
+void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i);
+
+void m_stkparams(void);
+
+void m_strtaction(M_ELEMENT m_elt);
+
+void m_strtcase(int m_action);
+
+void m_strtcdata(int scanval);
+
+LOGICAL m_strtproc(M_ELEMENT scanval);
+
+void m_strttag(M_ELEMENT val, LOGICAL net);
+
+void m_textaction(M_WCHAR m_textchar);
+
+void m_textout(char *format, LOGICAL start, LOGICAL end);
+
+LOGICAL m_textpermitted(void);
+
+M_WCHAR *m_thisfile(void);
+
+int m_thisline(void);
+
+void m_trace(char *p);
+
+void m_wctrace(M_WCHAR *p);
+
+LOGICAL m_transition(M_ELEMENT label, LOGICAL recur);
+
+void m_undodelim(M_WCHAR *delim, LOGICAL flag);
+
+void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread);
+
+void m_updatedefault(const int par, const M_WCHAR *string);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+LOGICAL m_validinpar(M_WCHAR *string);
+
+LOGICAL m_vldentref(void);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index 324019abfdd3b942d0b0e1d090609417eefe7c8b..bc20a3b73ba25aab42bb651196710d94ae1bd856 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #define M_CONDEF
@@ -51,7 +48,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "sref.h"
 
 /* Actually read a character from an input stream */
-int m_actgetc(M_NOPAR)
+int m_actgetc(void)
   {
     int c ;
 
@@ -65,8 +62,7 @@ int m_actgetc(M_NOPAR)
     }
 
 /* Expand an entity reference */
-void m_entexpand(openent)
-  M_ENTITY *openent ;
+void m_entexpand(M_ENTITY *openent)
   {
     M_WCHAR *p ;
     M_HOLDTYPE dchar ;
@@ -234,9 +230,7 @@ void m_entexpand(openent)
 
 /* An srlen-character long short-reference delimiter has been found.  Verify
    that it is not the prefix of a general delimiter recognized in context*/
-LOGICAL m_gendelim(srlen, context)
-  int srlen ;
-  int context ;
+LOGICAL m_gendelim(int srlen, int context)
   {
     int ghold[MAXD + 1] ;
     int ucase ;
@@ -324,8 +318,7 @@ LOGICAL m_gendelim(srlen, context)
 
 /* Reads next input character from the current source file or from an
    entity expansion */
-int m_getachar(dchar)
-  M_HOLDTYPE *dchar ;
+int m_getachar(M_HOLDTYPE *dchar)
   {
     int c ;
     int i ;
@@ -399,12 +392,7 @@ int m_getachar(dchar)
     }
 
 /* Reads a name token */
-#if defined(M_PROTO)
 void m_getname(M_WCHAR first)
-#else
-void m_getname(first)
-  M_WCHAR first ;
-#endif
 {
     M_WCHAR *p ;
     M_HOLDTYPE dchar ;
@@ -432,10 +420,7 @@ void m_getname(first)
     }
 
 /* Reads the next token */
-int m_gettoken(c, dchar, context)
-  int *c ;
-  M_HOLDTYPE *dchar ;
-  int context ;
+int m_gettoken(int *c, M_HOLDTYPE *dchar, int context)
   {
     int hold[MAXD + 1], next ;
     int ucase ;
@@ -559,8 +544,7 @@ int m_gettoken(c, dchar, context)
     }
 
 /* Reads a literal */
-void m_litproc(delim)
-  int delim ;
+void m_litproc(int delim)
   {
     int n, i ;
     M_HOLDTYPE dchar ;
@@ -646,14 +630,7 @@ void m_litproc(delim)
     }
 
 /* Called when a missing tagc delimiter is detected */
-#if defined(M_PROTO)
 void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start)
-#else
-void m_missingtagc(c, dchar, start)
-  int c ;
-  M_HOLDTYPE dchar ;
-  LOGICAL start ;
-#endif
 {
     if (! m_wholetag) {
       if (start) m_mberr1("Invalid parameter or missing %s", m_tagc);
@@ -666,18 +643,8 @@ void m_missingtagc(c, dchar, start)
 
 /* Have found one character in a possible short reference delimiter.
    Prepare to look for the next one */
-#if defined(M_PROTO)
 void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart,
                     LOGICAL skipblank, unsigned char type)
-#else
-void m_nextdelimchar(n, i, linestart, newlinestart, skipblank, type)
-  int *n ;
-  int i ;
-  LOGICAL *linestart ;
-  LOGICAL newlinestart ;
-  LOGICAL skipblank ;
-  unsigned char type ;
-#endif
 {               
     int k ;
     char mb_re,mb_seqchar, mb_rschar;
@@ -712,7 +679,7 @@ void m_nextdelimchar(n, i, linestart, newlinestart, skipblank, type)
     }
 
 /* Scans past a comment within a markup declaration */
-void m_readcomments(M_NOPAR)
+void m_readcomments(void)
   {
     int c ;
     M_HOLDTYPE dchar ;
@@ -725,7 +692,7 @@ void m_readcomments(M_NOPAR)
     }
 
 /* Scanner */
-int m_scan(M_NOPAR)
+int m_scan(void)
   {
     int c ;
     M_HOLDTYPE dchar ;
@@ -860,13 +827,7 @@ int m_scan(M_NOPAR)
 
 
 /* Process explicit or implied USEMAP or ADDMAP */
-#if defined(M_PROTO)
 void m_setmap(int map, LOGICAL useoradd)
-#else
-void m_setmap(map, useoradd)
-  int map ;
-  LOGICAL useoradd ;
-#endif
 {
     int i ;
     int sref ;
@@ -914,8 +875,7 @@ void m_setmap(map, useoradd)
     }
 
 /* Check for short reference delimiters */
-void m_shortref(context)
-int context ;
+void m_shortref(int context)
 {
 int n = 0 ;
 int i ;
@@ -1065,7 +1025,7 @@ while (TRUE)
           or contextual end tag [linestat == M_SOMETHING]
       3)  If a record end might be the last one in an element, save it
 */
-void m_sigre(M_NOPAR)
+void m_sigre(void)
   {
     /* Check for first RE in content and no preceding content */
     if (m_start &&
@@ -1084,13 +1044,7 @@ void m_sigre(M_NOPAR)
 
 /* Returns a context-dependent delimiter string to input stream so
    characters can be reread one at a time in another context */
-#if defined(M_PROTO)
 void m_undodelim(M_WCHAR *delim, LOGICAL flag)
-#else
-void m_undodelim(delim, flag)
-  M_WCHAR *delim ;
-  LOGICAL flag ;
-#endif
 {
     M_WCHAR *p ;
 
@@ -1107,14 +1061,7 @@ void m_undodelim(delim, flag)
 /* Place a character on the current input stream.  The character may have
    been scanned and determined not to be part of the current token or it
    may be in the expansion of an entity*/
-#if defined(M_PROTO)
 void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread)
-#else
-void m_ungetachar(c, dchar, preread)
-  int c ;
-  M_HOLDTYPE dchar ;
-  LOGICAL preread ;
-#endif
 {
     char buffer[10] ;
     int length;
@@ -1154,7 +1101,7 @@ void m_ungetachar(c, dchar, preread)
     }
 
 /* Have encountered an M_ERO.  If the entity reference is valid, process it*/
-LOGICAL m_vldentref(M_NOPAR)
+LOGICAL m_vldentref(void)
   {
     M_HOLDTYPE dchar ;
     int next ;
index 6bac3fc3231d1afeb248ecc78a7995a9b0c61a70..45e886429da1f3c4aeabd2d78355a78e7caad594 100644 (file)
@@ -30,7 +30,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 
 /* Set program options */
-void m_setoptions(M_NOPAR)
+void m_setoptions(void)
   {
     if (m_argc > 1) m_optstring(m_argv[1]) ;
     }
index be3c66bd29fb5a15ce5ae2593ded0af859ab7e32..6eef9fe53cbf0a3b71627b453819e94b249e8eed 100644 (file)
@@ -35,9 +35,7 @@
 #include "parser.h"
 
 /* Set a user-defined C variable to the corresponding parameter value */
-void m_setparam(cvar, par)
-  M_WCHAR **cvar ;
-  int par ;
+void m_setparam(M_WCHAR **cvar, int par)
   {
     *cvar = m_stackpar->param[par] ;
     }
index 07da69f1a542a1927274d46f7f29507baf3ef4ad..4dace66cf2879434171c749b7b17c8d704f8448e 100644 (file)
@@ -36,8 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "sfile.c"
 
 /* Perform the m_action-th start-code in the interface */
-void m_strtcase(m_action)
-  int m_action ;
+void m_strtcase(int m_action)
   {
     (*m_stable[m_action])() ;
     }
index 7e1af1dcc898ea7dd82bd82b007eb6a38ebcb132..cbd952c621c8f09e55af741ff34e73ab5237c189 100644 (file)
@@ -32,7 +32,7 @@ Copyright 1989 Hewlett-Packard Co.
    control after all entity declarations have been processed.  Not needed
    in valid documents (when it is called just prior to global start-code),
    but may be useful in some applications nevertheless. */
-void m_startdoc(M_NOPAR)
+void m_startdoc(void)
   {
     }
 
index 7efec4fa982077f14d04140da8607e9dccb198e0..9f2b9c9814e0d6c761378aa31994a49e66267f70 100644 (file)
 /* Include generated code */
 #include "stfile.c"
 
-#if defined(M_PROTO)
 void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END)
-#else
-void m_stcaction(m_string, M_START, M_END)
-  M_WCHAR *m_string ;
-  LOGICAL M_START ;
-  LOGICAL M_END ;
-#endif
 {
     m_stackpar = m_stacktop->stparam ;
     (*m_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ;
index 9d2a60d7c1c0c520c3564e3bbf029d94bfd232dc..14397638e6bb4c90f955de011908b0268bf52c92 100644 (file)
@@ -33,9 +33,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -49,8 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
    is valid input. It returns TRUE, FALSE, or M_NONCONTEXTUAL respectively
    if the element is allowed by content, not allowed, or allowed by an
    inclusion exception. */
-int m_checkstart(val)
-  M_ELEMENT val ;
+int m_checkstart(M_ELEMENT val)
   {
     M_PARSE *stackptr ;
     int except ;
@@ -88,13 +84,7 @@ int m_checkstart(val)
    If VAL is not the element at the top of the parse stack, m_ckend
    checks to see if the end of VAL can validly end nested
    elements as well. */
-#if defined(M_PROTO)
 LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet)
-#else
-LOGICAL m_ckend(val, neednet)
-  M_ELEMENT val ;
-  LOGICAL neednet ;
-  #endif
 {
     M_PARSE *stackptr ;
     M_OPENFSA *fsastack ;
@@ -197,7 +187,7 @@ LOGICAL m_ckend(val, neednet)
 
 /* Make a copy of the stack entry at the top of the parse stack in a scratch
    area */
-M_PARSE *m_copystackelt(M_NOPAR)
+M_PARSE *m_copystackelt(void)
   {
     M_OPENFSA *oldfsa ;
     M_OPENFSA **newfsa ;
@@ -225,7 +215,7 @@ M_PARSE *m_copystackelt(M_NOPAR)
     }
 
 /* End of document */
-void m_done(M_NOPAR)
+void m_done(void)
   {
     M_ELEMENT lastelt ;
 
@@ -247,8 +237,7 @@ void m_done(M_NOPAR)
     }
 
 /* Process the endtag (implied, abbreviated, or explicit) for element C*/
-void m_endtag(c)
-  M_ELEMENT c ;
+void m_endtag(M_ELEMENT c)
   {
     m_endaction(c) ;
     m_pop() ;
@@ -260,8 +249,7 @@ void m_endtag(c)
 
 /* Check that the identified element is not prohibited in the current context
    by an exclusion exception */
-LOGICAL m_excluded(elt)
-  M_ELEMENT elt ;
+LOGICAL m_excluded(M_ELEMENT elt)
   {
     M_PARSE *stackptr ;
     int except ;
@@ -279,8 +267,7 @@ LOGICAL m_excluded(elt)
 
 /* Free the OPEN FSA substructures associated with an element on
    the parse stack */
-void m_freeFSA(stackelt)
-  M_PARSE *stackelt ;
+void m_freeFSA(M_PARSE *stackelt)
   {
     M_OPENFSA *fsastack ;
     M_ANDLIST *usedand ;
@@ -299,9 +286,7 @@ void m_freeFSA(stackelt)
     }
 
 /* Free storage used for tentative chain of tag minimizations */
-void m_freemin(min, msg)
-  M_MIN *min ;
-  char *msg ;
+void m_freemin(M_MIN *min, char *msg)
   {
     M_MIN *discard ;
 
@@ -316,9 +301,7 @@ void m_freemin(min, msg)
    in the current content model by starting a new submodel of the and-group
    indicated by fsastack, or (if the and-group is within a seq-group) by
    continuing past the and-group */
-LOGICAL m_nextand(thisfsa, label)
-  M_OPENFSA *thisfsa ;
-  M_ELEMENT label ;
+LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label)
   {
     M_ANDLIST *newgroup ;
     M_ANDGROUP pand ;
@@ -404,7 +387,7 @@ LOGICAL m_nextand(thisfsa, label)
     }
 
 /* Pops the parse stack*/
-void m_pop(M_NOPAR)
+void m_pop(void)
   {
     M_PARSE *stackelt ;
 
@@ -426,14 +409,7 @@ void m_pop(M_NOPAR)
 
 /* Pushes a new item onto the parse stack, setting its element, current,
    and neednet fields as indicated by the parameters*/
-#if defined(M_PROTO)
 void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need)
-#else
-void m_push(elt, current, need)
-  M_ELEMENT elt ;
-  M_STATE current ;
-  LOGICAL need ;
-  #endif
 {
     M_PARSE *newstack ;
 
@@ -477,8 +453,7 @@ void m_push(elt, current, need)
    character is treated differently so that if character data is not
    allowed in the current context, an error message is issued with the
    first character only and not with every character. */
-void m_strtcdata(scanval)
-  int scanval ;
+void m_strtcdata(int scanval)
   {
     if (! m_strtproc(M_NULLVAL))
       if (m_whitespace((M_WCHAR) scanval)) {
@@ -509,8 +484,7 @@ void m_strtcdata(scanval)
    to an element that was within #PCDATA, m_strtproc saves the current context
    and restores it after returning from the last call to m_endtag.)
 */
-LOGICAL m_strtproc(scanval)
-  M_ELEMENT scanval ;
+LOGICAL m_strtproc(M_ELEMENT scanval)
   {
     int check ;
     M_PARSE *original ;
@@ -654,13 +628,7 @@ LOGICAL m_strtproc(scanval)
     }
 
 /* Processes explicit or implied start tag*/
-#if defined(M_PROTO)
 void m_strttag(M_ELEMENT val, LOGICAL net)
-#else
-void m_strttag(val, net)
-  M_ELEMENT val ;
-  LOGICAL net ;
-#endif
 {
     m_transition(val, TRUE) ;
     if (val) {
@@ -683,7 +651,7 @@ void m_strttag(val, net)
    makes more sense, is used by MARKUP, and is under consideration by the
    Standards committee; the latter is the current definition in the Standard
    */
-LOGICAL m_textpermitted(M_NOPAR)
+LOGICAL m_textpermitted(void)
   {
     M_ANDGROUP pand ;
     M_OPENFSA *fsastack ;
@@ -726,13 +694,7 @@ LOGICAL m_textpermitted(M_NOPAR)
 /* Returns TRUE iff LABEL allowed in the current state of the current
    element (without expanding any minimization).  May result in changes
    to the stack of FSA's for this element if and-groups open or close. */
-#if defined(M_PROTO)
 LOGICAL m_transition(M_ELEMENT label, LOGICAL recur)
-#else
-LOGICAL m_transition(label, recur)
-  M_ELEMENT label ;
-  LOGICAL recur ;
-#endif
 {
     M_ARC parc ;
     M_OPENFSA *newfsa ;
index 6708c6e012b4852fdbf06884194217587131d623..b82148e9c630a79f48324b4f54bf9685b4f27171 100644 (file)
@@ -36,12 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "tfile.c"
 
 /* When a text character occurs */
-#if defined(M_PROTO)
 void m_textaction(M_WCHAR m_textchar)
-#else
-void m_textaction(m_textchar)
-  M_WCHAR m_textchar ;
-  #endif
 {
     char buffer[10] ;
     char    mb_re;
index bbe242cb0f60e1ad5e3b1f9fd66b8f0ac0d46262..7822cf94891e528d4b105152fddbe0fe7faf8078 100644 (file)
 */
 #include "basic.h"
 
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
+LOGICAL m_allwhite(const M_WCHAR *string);
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+LOGICAL m_whitespace(M_WCHAR c);
 
 /* Test if a string contains only white space characters */
-#if defined(M_PROTO)
 LOGICAL m_allwhite(const M_WCHAR *string )
-#else
-LOGICAL m_allwhite(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 const M_WCHAR *p ;
 
index 88cc5c60823d1c6041d1838014688f7fc7869392..04cb1f10907c4983f82496e7e7dbe71e5fa2ee3c 100644 (file)
@@ -46,87 +46,27 @@ typedef wchar_t M_WCHAR;
 
 /* For function prototypes */
 typedef char * M_POINTER;
-#if defined(hpux) || defined(__aix) || defined(sun)
-/* Old unix stuff
- *#define void int
- *#define M_NOPAR
- */
-/* New Ansi style */
-#define M_PROTO
-#define M_NOPAR void
-#else
-#define M_PROTO
-#define M_NOPAR void
-#endif
-
-char *MakeMByteString(
-#if defined(M_PROTO)
-  const M_WCHAR *from
-#endif
-  );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
-
-int w_strcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *string1, const M_WCHAR *string2
-#endif
-  );
-
-M_WCHAR *w_strcpy(
-#if defined(M_PROTO)
-  M_WCHAR *string1, const M_WCHAR *string2
-#endif
-  );
-
-M_WCHAR *w_strncpy(
-#if defined(M_PROTO)
-  M_WCHAR *string1, const M_WCHAR *string2, int max
-#endif
-  );
-
-int w_strlen(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  );
-
-M_WCHAR *w_strchr(
-#if defined(M_PROTO)
-  M_WCHAR *string, const M_WCHAR chr
-#endif
-  );
-
-M_WCHAR *w_strstr(
-#if defined(M_PROTO)
-  M_WCHAR *string1, M_WCHAR *string2
-#endif
-  );
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
+
+int w_strlen(const M_WCHAR *string);
+
+M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
+
+M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
+
+void *m_malloc(int size, char *msg);
+
+void m_free(void *block, char *msg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+int mb_getwc(void *m_ptr);
index 598bf91dcc65160b79ef395678be8a91c7bf279a..0c5e0137e125bd765f3ff68e2ea32394ce6c2cc2 100644 (file)
@@ -37,179 +37,63 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #define CONTINIT(a)
 #endif
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpdlmptr(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void dumpdlmptr(void);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
 
-void dumptree(
-#if defined(M_PROTO)
-  LOGICAL sparse
-#endif
-  ) ;
+void dumptree(LOGICAL sparse);
 
-void enterdelim(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+void enterdelim(int n);
 
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void m_error(char *text);
 
-void m_err1(
-#if defined(M_PROTO)
-  char *text, char *arg
-#endif
-  ) ;
+void m_err1(char *text, char *arg);
 
-void getcode(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+void getcode(int n);
 
-void getcolon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void getcolon(void);
 
-int getContext(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+int getContext(void);
 
-LOGICAL getdname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+LOGICAL getdname(void);
 
-void inccon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void inccon(void);
 
-void incdelim(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void incdelim(void);
 
-void loaddelim(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void loaddelim(void);
 
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_lower(int c);
 
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
+int main(int argc, char **argv);
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void nextcon(
-#if defined(M_PROTO)
-  LOGICAL sparse
-#endif
-  ) ;
+void nextcon(LOGICAL sparse);
 
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
 
-void printval(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
+void printval(FILE *file, M_TRIE *value);
 
-void prtctxt(
-#if defined(M_PROTO)
-  int column, int value
-#endif
-  ) ;
+void prtctxt(int column, int value);
 
-int readchar(
-#if defined(M_PROTO)
-  LOGICAL cap
-#endif
-  ) ;
+int readchar(LOGICAL cap);
 
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void skiptoend(void);
 
-void unread(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+void unread(int c);
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_upper(int c);
 
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void warning(char *text);
 
-void warning1(
-#if defined(M_PROTO)
-  char *text, char *arg
-#endif
-  ) ;
+void warning1(char *text, char *arg);
 
-void warning2(
-#if defined(M_PROTO)
-  char *text, char *arg1, char *arg2
-#endif
-  ) ;
+void warning2(char *text, char *arg1, char *arg2);
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+LOGICAL m_whitespace(M_WCHAR c);
 
 
 #define NOMORE -1
index 39370a370109992072c950ad6ddb75dbde6d537b..e7185ce8f116abd1ad93ebca18229dd69e75ad7d 100644 (file)
@@ -158,9 +158,6 @@ delim.h.
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -170,9 +167,7 @@ delim.h.
 #include "cont.h"
 
 /* Main procedure */
-int main(argc, argv)
-  int argc ;
-  char **argv ;
+int main(int argc, char **argv)
 {
 int n ;
 
index bb92fa894da81ed3c0beb6b4946eac91f0b95d95..4fbdada5fd226ac94d8ce18795151c51fac8c93c 100644 (file)
@@ -31,16 +31,13 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
 #include "cont.h"
 
 /* Output declaration of dlmptr */
-void dumpdlmptr(M_NOPAR)
+void dumpdlmptr(void)
   {
     int n;
 
@@ -55,12 +52,7 @@ void dumpdlmptr(M_NOPAR)
     }
 
 /* Output the generated data structures */
-#if defined(M_PROTO)
 void dumptree(LOGICAL sparse)
-#else
-void dumptree(sparse)
-  LOGICAL sparse;
-#endif
   {
     int i, count = 0;
 
@@ -89,8 +81,7 @@ void dumptree(sparse)
     }
 
 /* Enter a delimiter into the delimiter tree for a particular context */
-void enterdelim(n)
-  int n;
+void enterdelim(int n)
 {
 if (! contree[n])
     {
@@ -115,8 +106,7 @@ if (m_ntrtrie(dstruct->string,
 }
 
 /* Read the code to be executed with a given state transition */
-void getcode(n)
-int n;
+void getcode(int n)
 {
 int c ; /* c is int instead of char for use with ungetc */
 int nested = 1;
@@ -221,7 +211,7 @@ while (TRUE)
 } /* End proc getcode() */
 
 /* Read the colon separating the two states in a transition pair */
-void getcolon(M_NOPAR)
+void getcolon(void)
 {
 int c ; /* c is int instead of char for use with ungetc */
 M_WCHAR wcl;
@@ -245,7 +235,7 @@ if (c != wcl)
 }
 
 /* Read a context name from an input line */
-int getContext(M_NOPAR)
+int getContext(void)
 {
 M_WCHAR name[CNAMELEN + 1];
 int c ; /* c is int instead of char for use with ungetc */
@@ -314,7 +304,7 @@ return(ccount - 1);
 }
 
 /* Read a delimiter name from the input line */
-LOGICAL getdname(M_NOPAR)
+LOGICAL getdname(void)
 {
 int c;
 M_WCHAR *p;
@@ -358,7 +348,7 @@ return(TRUE);
 }
 
 /* Out of context space.  Increase. */
-void inccon(M_NOPAR)
+void inccon(void)
   {
     M_TRIE **newtrie = NULL;
     int *newtransit = NULL;
@@ -405,7 +395,7 @@ void inccon(M_NOPAR)
     }
 
 /* Increase delimiter space. */
-void incdelim(M_NOPAR)
+void incdelim(void)
 {
 int *newtransit = NULL;
 char **newdlm = NULL;
@@ -449,7 +439,7 @@ dcount++;
 }
 
 /* Read delimiter definitions from delim.dat */
-void loaddelim(M_NOPAR)
+void loaddelim(void)
 {
 int c;
 M_WCHAR *p;
@@ -570,12 +560,7 @@ loading = FALSE;
 }
 
 /* Output transition matrix */
-#if defined(M_PROTO)
 void nextcon(LOGICAL sparse)
-#else
-void nextcon(sparse)
-  LOGICAL sparse;
-#endif
   {
     int i, j;
     int firstinrow;
@@ -629,8 +614,7 @@ void nextcon(sparse)
   
 /* If sparse matrix output option, generate a single element of transit
    array */
-void prtctxt(column, value)
-  int column, value;
+void prtctxt(int column, int value)
   {
     static LOGICAL first = TRUE;
 
@@ -642,12 +626,7 @@ void prtctxt(column, value)
 
 
 /* Read the next input character */
-#if defined(M_PROTO)
 int readchar(LOGICAL cap)
-#else
-int readchar(cap)
-  LOGICAL cap;
-#endif
 {
 int c;
 M_WCHAR wnl;
@@ -665,13 +644,12 @@ return(c);
 
 /* Called by utility procedure m_error() -- has content in other programs
    that use m_error() */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
 {
 }
 
 /* Return a character to the input stream for re-reading */
-void unread(c)
-int c;
+void unread(int c)
 {
 M_WCHAR wnl;
 
index efd886bd2d568f173fde25cc155ef03fce9fda4b..5569cbe308adf2f186f8c49a4f3a2f91dbea08ab 100644 (file)
 /* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
 /* Creates a file with nothing in it */
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void main(argc, argv)
-  int argc ;
-  char **argv ;
+int main(int argc, char **argv)
   {
     if (argc != 2) {
       fprintf(stderr, "Usage: emptyfil filename\n") ;
index 2a09dbfc78df2b0464c776a5899c4ab236619f8e..793a08964932ba20b8dd5b8f9ed46ca041c690a6 100644 (file)
 
 /* Entout has procedures to write generated entity TRIE */
 
-void entptr(
-#if defined(M_PROTO)
-  M_ENTITY *data
-#endif
-  ) ;
+void entptr(M_ENTITY *data);
 
-char *typetype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+char *typetype(int n);
 
-char *typewhere(
-#if defined(M_PROTO)
-  unsigned char n
-#endif
-  ) ;
+char *typewhere(unsigned char n);
 
 /* Macro names written to output file */
 char xdbuild[] = "M_DBUILD" ;
@@ -61,8 +49,7 @@ char xerror[] = "ERROR" ;
 
 /* Outputs entity definitions */
 #define ENTFILENAME 12
-void entout(fname)
-  char *fname ;
+void entout(char *fname)
   {
     char efilename[ENTFILENAME] ;
     int count = 1 ;
@@ -185,15 +172,13 @@ void entout(fname)
 
 /* Entptr is called by m_dumptrie to output the value stored with a
    particular entity in the entity trie */
-void entptr(data)
-  M_ENTITY *data ;
+void entptr(M_ENTITY *data)
   {
     fprintf(entfile, "(M_TRIE *) &m_entities[%d]", data->index - 1) ;
     }
 
 /* Typetype returns a string indicating the type of the nth entity.*/
-char *typetype(n)
-  int n ;
+char *typetype(int n)
   {
     switch(n) {
       case M_GENERAL: return(xgeneral) ;
@@ -212,12 +197,7 @@ char *typetype(n)
     }
 
 /* Typewhere returns a string indicating where the nth entity was defined.*/
-#if defined(M_PROTO)
 char *typewhere(unsigned char n)
-#else
-char *typewhere(n)
-  unsigned char n ;
-#endif
   {
     switch(n) {
       case M_DBUILD: return(xdbuild) ;
index 17b36d105c19c28f006ef74d88c91526e9f8e659..c9061fae5357eec03d6696c31a790c57dabaadef 100644 (file)
@@ -33,128 +33,47 @@ extern FILE *m_errfile ;
 extern int m_line ;
 extern LOGICAL errexit ;
 
-void eprefix(
-#if defined(M_PROTO)
-  LOGICAL flag
-#endif
-  ) ;
-
-void m_errline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
-             M_WCHAR *arg5
-#endif
-  ) ;
-
-void esuffix(
-#if defined(M_PROTO)
-  void
-#endif
-  ) ;
-
-void msgline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void msg1line(
-#if defined(M_PROTO)
-  char *text, char *arg1
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *text
-#endif
-  ) ;
-
-void m_trace(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-void warning2(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2
-#endif
-  ) ;
-
-void warning3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void warning4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
+void eprefix(LOGICAL flag);
+
+void m_errline(char *text);
+
+void m_error(char *text);
+
+void m_err1(char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
+             M_WCHAR *arg5);
+
+void esuffix(void);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void skiptoend(void);
+
+void m_wctrace(M_WCHAR *text);
+
+void m_trace(char *text);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
 
 /* Write error message prefix */
-#if defined(M_PROTO)
 void eprefix(LOGICAL flag)
-#else
-void eprefix(flag)
-  LOGICAL flag ;
-#endif
   {
     if (flag) errexit = TRUE ;
     fprintf(stderr, "\n**** ") ;
@@ -164,16 +83,14 @@ void eprefix(flag)
 /* Writes part of an error message.  Called from m_malloc instead of
    m_err1, since PARSER's version of m_err1 calls m_malloc and recursive
    calls are possible when the heap is exhausted */
-void m_errline(text)
-char *text ;
+void m_errline(char *text)
 {
 fputs(text, stderr) ;
 fputs(text, m_errfile) ;
 }
 
 /* Writes an error message to standard error and file "error" */
-void m_error(text)
-  char *text ;
+void m_error(char *text)
   {
     eprefix(TRUE) ;
     fprintf(stderr,"%s", text) ;
@@ -184,13 +101,7 @@ void m_error(text)
 
 /* Writes an error message with one argument to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err1(char *text, const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
-  char *text;
-  M_WCHAR *arg ;
-#endif
 {
 char *mb_arg;
 
@@ -203,13 +114,7 @@ skiptoend() ;
 m_free(mb_arg,"multi-byte string");
 }
 
-#if defined(M_PROTO)
 void m_mberr1(char *text, const char *arg)
-#else
-void m_err1(text, arg)
-  char *text;
-  char *arg ;
-#endif
 {
 eprefix(TRUE) ;
 fprintf(stderr, text, arg) ;
@@ -220,13 +125,7 @@ skiptoend() ;
 
 /* Writes an error message with two arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err2( const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2)
-#else
-void m_err2(text, arg1, arg2)
-char *text;
-M_WCHAR *arg1, *arg2 ;
-#endif
 {
 char *mb_arg1, *mb_arg2;
 
@@ -243,13 +142,7 @@ m_free(mb_arg2,"multi-byte string");
 
 /* Writes an error message with three arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err3( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
-#else
-void m_err3(text, arg1, arg2, arg3)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3;
 
@@ -268,14 +161,8 @@ m_free(mb_arg3,"multi-byte string");
 
 /* Writes an error message with five arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
             M_WCHAR *arg4, M_WCHAR *arg5)
-#else
-void m_err5(text, arg1, arg2, arg3, arg4, arg5)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3, *arg4, *arg5 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
 
@@ -296,37 +183,33 @@ m_free(mb_arg5,"multi-byte string");
 }
 
 /* Write error message suffix */
-void esuffix(M_NOPAR)
+void esuffix(void)
   {
     fprintf(stderr, " (line %d) ****\n", m_line) ;
     fprintf(m_errfile, " (line %d) ****\n", m_line) ;
     }
 
 /* Print something to both stderr and m_errfile */
-void msgline(text)
-  char *text ;
+void msgline(char *text)
   {
     fprintf(stderr, "%s", text) ;
     fprintf(m_errfile, "%s", text) ;
     }
 
 /* Print something to both stderr and m_errfile */
-void msg1line(text, arg1)
-  char *text, *arg1 ;
+void msg1line(char *text, char *arg1)
   {
     fprintf(stderr, text, arg1) ;
     fprintf(m_errfile, text, arg1) ;
     }
 
 /* Trace used for m_malloc trace output */
-void m_trace(text)
-char *text ;
+void m_trace(char *text)
 {
 m_errline(text) ;
 }
 
-void m_wctrace(text)
-M_WCHAR *text ;
+void m_wctrace(M_WCHAR *text)
 {
 char *mb_text;
 
@@ -336,8 +219,7 @@ m_free(mb_text,"multi-byte string");
 }
 
 /* Writes a nonfatal error message to standard error and file "error" */
-void warning(text)
-  char *text ;
+void warning(char *text)
   {
     eprefix(FALSE) ;
     fprintf(stderr,"%s", text) ;
@@ -347,13 +229,7 @@ void warning(text)
 
 /* Writes a nonfatal error message with one argument to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning1( char *text, M_WCHAR *arg)
-#else
-void warning1(text, arg)
-char *text;
-M_WCHAR *arg ;
-#endif
 {
 char *mb_arg;
 
@@ -367,13 +243,7 @@ m_free(mb_arg,"multi-byte string");
 
 /* Writes a nonfatal error message with two arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2)
-#else
-void warning2(text, arg1, arg2)
-char *text;
-M_WCHAR *arg1, *arg2 ;
-#endif
 {
 char *mb_arg1, *mb_arg2;
 
@@ -389,13 +259,7 @@ m_free(mb_arg2,"multi-byte string");
 
 /* Writes a nonfatal error message with three arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
-#else
-void warning3(text, arg1, arg2, arg3)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3;
 
@@ -413,14 +277,8 @@ m_free(mb_arg3,"multi-byte string");
 
 /* Writes a nonfatal error message with four arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
              M_WCHAR *arg4)
-#else
-void warning4(text, arg1, arg2, arg3, arg4)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3, *arg4 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4;
 
index 148d1ece7706093ac8938bf868a33ce3d6160788..2a2ae08b33af3b979afbea0a9586b555d46a8428 100644 (file)
 Copyright 1988, 1989 Hewlett-Packard Co.
 */
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
 /* Exit function called by utilities used in PARSER and other programs in
    the MARKUP system */
-void m_exit(status)
-  int status ;
+void m_exit(int status)
   {
     exit(status) ;
     }
index 771880061c63eb8da998047e85754e07a55c8511..eb0dcebf0a68c03e863a9ff7b50dac5554c0fb9b 100644 (file)
@@ -37,9 +37,6 @@ with an error code of 0 if the files are the same, 1 if they differ, and
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #define SAME 0
 /* different defined to be 0 as of 12-1-89, because fclndir now does
@@ -58,27 +55,13 @@ struct data {
 char linedir[] = "#line" ;
 char *p = linedir, *q = linedir + 1 ;
 
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
+int main(int argc, char **argv);
 
-void copyfile(
-#if defined(m_proto)
-  char *pfile1, char *pfile2
-#endif
-  ) ;
+void copyfile(char *pfile1, char *pfile2);
 
-int nextchar(
-#if defined (M_PROTO)
-  FILE *file, struct data *data
-#endif
-  ) ;
+int nextchar(FILE *file, struct data *data);
 
-int main(argc, argv)
-  int argc ;
-  char **argv ;
+int main(int argc, char **argv)
   {
     FILE *one, *two ;
     int c1, c2 ;
@@ -125,8 +108,7 @@ int main(argc, argv)
     }
 
 /* copyfile inserted by ced, 12-1-89. */
-void copyfile(pfile1,pfile2)
-  char *pfile1, *pfile2; 
+void copyfile(char *pfile1, char *pfile2)
 {
        int ret;
        char *pcmd;
@@ -136,20 +118,14 @@ void copyfile(pfile1,pfile2)
    spaces, and the terminating null */
        slen = strlen(pfile1) + strlen(pfile2) + 8;
        pcmd = (char *) malloc(slen);
-#if defined(MSDOS)
-       ret = snprintf(pcmd, slen, "copy %s %s",pfile1,pfile2);
-#else
        ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2);
-#endif
        ret = system(pcmd);
        ret = snprintf(pcmd, slen, "touch %s",pfile2);
        ret = system(pcmd);
        free(pcmd);
 }
 
-int nextchar(file, data)
-  FILE *file ;
-  struct data *data ;
+int nextchar(FILE *file, struct data *data)
   {
     while (data->linestart) {
       data->linestart = FALSE ;
index a248b7ea85f79e249f08b59e1852539c7e0443d3..75663b877f0b99d90af71b1a55ecebbf6478c6f2 100644 (file)
                    Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co.
 */
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const char *arg
-#endif
-  ) ;
+void m_err1(const char *text, const char *arg);
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_inctest(
-#if defined(M_PROTO)
-  int *count, int limit, char *message
-#endif
-  ) ;
+void m_inctest(int *count, int limit, char *message);
 
 /* Increment a count and test against a limit */
-void m_inctest(count, limit, message)
-  int *count ;
-  int limit ;
-  char *message ;
+void m_inctest(int *count, int limit, char *message)
   {
     if (++*count <= limit) return ;
     m_err1("Internal error: %s exceeded", message) ;
index a51a30081031785bd3f82533cf48e4c3d2586f2f..237bdea842f771359e5862c855065c210b8cae31 100644 (file)
 #include "common.h"
 extern char m_chartype[M_CHARSETLEN] ;
 
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_initctype(M_NOPAR)
+void m_initctype(void)
   {
     int i ;
 
index 76f7885e66d43692ea94eafa4595fa34b662b307..51de1f70d2c7567d96f2d19235859c9233468a3a 100644 (file)
 #include <string.h>
 #include "basic.h"
 
-char *m_itoa(
-#if defined(M_PROTO)
-  int n, char *s
-#endif
-  ) ;
+char *m_itoa(int n, char *s);
 
-void reverse(
-#if defined(M_PROTO)
-  char *s
-#endif
-  ) ;
+void reverse(char *s);
 
-char *m_itoa(n, s)  /* convert n to characters in s */
-char s[]; 
-int n;
+char *m_itoa(int n, char *s) /* convert n to characters in s */
 {   
     int sign ;
     char *p = s ;
@@ -59,8 +49,7 @@ int n;
     return(s) ;
 }
 
-void reverse(s)
-char s[];
+void reverse(char s[])
 {
     int c, i, j;
 
index f67e9fa522c7fd132838903de7dd58a4be0130f7..3f47ccae20a5832ee77cac0ed686c347796f3e9e 100644 (file)
 
 #include "basic.h"
 
-LOGICAL m_letter(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
-#if defined(M_PROTO)
 LOGICAL m_letter(M_WCHAR c)
-#else
-LOGICAL m_letter(c)
-  M_WCHAR c ;
-#endif
 {
 if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) return(TRUE) ;
 return(FALSE) ;
index 22100df941bc87ca03c89c0d0a8a9bb70bf51542..af4fedf2f9e0bf616710df69517a06a90fb099df 100644 (file)
 
 #include "basic.h"
 
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_lower(int c);
 
 
 
 /* Force a letter to lowercase */
-int m_lower(c)
-  int c ;
+int m_lower(int c)
   {
     if (c >= 'A' && c <= 'Z') c += 'a' - 'A' ;
     return(c) ;
index ffcdb1c669bedeb6136f108edfb665b2b74ac704..b574fafd73c869100fb5657ffb029f1ad2541bf6 100644 (file)
 /**/
 #include <stdlib.h>
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
 extern LOGICAL m_heapchk ;
 extern LOGICAL m_malftrace ;
 
-void m_errline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void m_errline(char *text);
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
+void m_free(void *block, char *msg);
 
-void m_heapdump(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void m_heapdump(void);
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void *m_realloc(
-#if defined(M_PROTO)
-  void *ptr, int size, char *msg
-#endif
-  ) ;
+void *m_realloc(void *ptr, int size, char *msg);
 
-void *m_trace(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void *m_trace(char *text);
 
-void *m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *text
-#endif
-  ) ;
+void *m_wctrace(M_WCHAR *text);
 
-void m_free(block, msg)
-  void *block ;
-  char *msg ;
+void m_free(void *block, char *msg)
   {
     char buffer[32] ;
 
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (m_malftrace) {
 #if defined(hpux) || defined(_AIX) || defined(sun)
       snprintf(buffer, 32, "%5x:%5x",
@@ -107,62 +67,16 @@ void m_free(block, msg)
       m_trace("\n") ;
       }      
     free(block) ;
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
-    }
-
-#if defined(MSDOS)
-void m_heapdump(M_NOPAR)
-  {
-    struct _heapinfo hinfo ;
-    int heapstatus ;
-
-    heapstatus = _heapchk() ;
-    if (heapstatus == _HEAPOK || heapstatus == _HEAPEMPTY) return ;
-    printf("\nDumping heap:\n") ;
-    hinfo._pentry = NULL ;
-    while ((heapstatus = _heapwalk(&hinfo)) == _HEAPOK) 
-      printf("%6s block at %p of size %4.4X\n",
-             hinfo._useflag == _USEDENTRY ? "USED" : "FREE",
-             hinfo._pentry, hinfo._size) ;
-    switch(heapstatus) {
-      case _HEAPEMPTY:
-        printf("OK - empty heap\n\n") ;
-        break ;
-      case _HEAPEND:
-        printf("OK - end of heap\n\n") ;
-        break ;
-      case _HEAPBADPTR:
-        printf("Error - bad pointer to heap\n\n") ;
-        break ;
-      case _HEAPBADBEGIN:
-        printf("Error - bad start of heap\n\n") ;
-        break ;
-      case _HEAPBADNODE:
-        printf("Error - bad node in heap\n\n") ;
-        break ;
-      }
-    m_exit(TRUE) ;
     }
-#endif
 
-void *m_malloc(size, msg)
-  int size ;
-  char *msg ;
+void *m_malloc(int size, char *msg)
   {
     char buffer[32] ;
     void *p ;
 
     size *= sizeof(M_WCHAR);
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! size) return(NULL) ;
     p = (void *) malloc(size) ;
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! p) {
       m_errline("Unable to allocate space for ") ;
       m_errline(msg) ;
@@ -187,23 +101,14 @@ void *m_malloc(size, msg)
     return(p) ;
     }
 
-void *m_realloc(ptr, size, msg)
-  void *ptr ;
-  int size ;
-  char *msg ;
+void *m_realloc(void *ptr, int size, char *msg)
   {
     char buffer[32] ;
     void *p ;
 
     size *= sizeof(M_WCHAR);
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! size) return(NULL) ;
     p = (void *) realloc(ptr, size) ;
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! p) {
       m_errline("Unable to re-allocate space for ") ;
       m_errline(msg) ;
index bc97a54e21e16e62fd3ccc1e6f2b8abc98ef1b64..935aefb7af3617eced5a01193a570a0fdbb264eb 100644 (file)
 */
 
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
 extern FILE *m_errfile ;
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
 
 /* Open a file and check that the open succeeded */
-void m_openchk(ptr, name, mode)
-  FILE **ptr ;
-  char *name, *mode ;
+void m_openchk(FILE **ptr, char *name, char *mode)
   {
     *ptr = fopen(name, mode) ;
     if (*ptr) return ;
index d3839b95875b49ab757c27a7de325c8decf623b4..5ed0518f0a20e9cae1206e0666b5067b45129d0d 100644 (file)
@@ -33,13 +33,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Check to see if string is a valid value for parameter par.  If so
    return a pointer to the keyword if it's a keyword parameter and otherwise
    a pointer to string.  If not valid, return FALSE. */
-#if defined(M_PROTO)
 const M_WCHAR *m_partype(const int par , const M_WCHAR *string )
-#else
-M_WCHAR *m_partype(par, string)
-  int par ;
-  M_WCHAR *string ;
-#endif /* M_PROTO */
   {
     LOGICAL first = TRUE ;
     int kw ;
index e28c5f5f3d4749776ce587aacf01cba9c3b3074b..86d9def39885a12d004b8546c955cb327809b373 100644 (file)
@@ -28,7 +28,7 @@
 extern FILE *ifile;
 
 /* Getachar returns the next character from the input stream */
-int getachar(M_NOPAR)
+int getachar(void)
 {
 int  c;
 M_WCHAR wc,wnl;
@@ -72,9 +72,7 @@ return((int) wc);
 }
 
 /* Reads the next token stored in a packed trie (as defined by context.dat) */
-int gettoken(c, context)
-int *c;
-int context;
+int gettoken(int *c, int context)
 {
 int hold[MAXD + 1];
 int ucase;
@@ -123,8 +121,7 @@ return(M_NULLVAL);
 }
 
 /* Reads a literal (called after the opening quotation mark is read) */
-LOGICAL litproc(delim)
-int delim;
+LOGICAL litproc(int delim)
 {
 int n, i, number;
 M_WCHAR *p, *pStart; /* bigger than wide versions of lit or lita */
@@ -215,8 +212,7 @@ return(FALSE);
 
 /* Returns a context-dependent delimiter string to input stream so
    characters can be reread one at a time in another context */
-void undodelim(delim)
-M_WCHAR *delim;
+void undodelim(M_WCHAR *delim)
 {
 M_WCHAR *p;
 
@@ -234,8 +230,7 @@ while (TRUE)
 /* Returns a character to the input stream to read again later. Unexplained
    problems occurred using standard ungetc procedure; hence
    explicit declaration of buffer for read-ahead characters */
-void ungetachar(c)
-int c;
+void ungetachar(int c)
 {
 M_WCHAR wnl;
 
index b831fbf775a91fabfbebd335dc91da2aad21c39e..c6a67f0e71d00b4359116c62c75b4b0d8e415cdc 100644 (file)
@@ -25,8 +25,7 @@
 /* Sparse.c has a procedure used with the tables generated by program
    CONTEXT when the sparse option is used */
 
-int m_sprscon(i, j)
-  int i, j ;
+int m_sprscon(int i, int j)
   {
     int k ;
 
index 8f26455670bb756945e135a38d4b99f30304d489..7c1df95545284b8d434441853c0fe876d2e33a0b 100644 (file)
 #if defined(sparse)
 #define m_newcon(i, j) m_sprscon(i, j)
 
-int m_sprscon(
-#if defined(M_PROTO)
-  int i, int j
-#endif
-  ) ;
+int m_sprscon(int i, int j);
 
 #else
 #define m_newcon(i, j) m_nextcon[i][j]
index 109cfe416763e846ec0929b271582acd19351c20..4d91891b8ee4f32892ecf99dc934dd1d84220ffa 100644 (file)
 
 #include <stdio.h>
 
-#if defined(MSDOS)
-#include <stdlib.h>
-#endif
-
 #include "basic.h"
 #include "common.h"
 #include "trie.h"
@@ -45,26 +41,12 @@ extern FILE *m_errfile ;
 
 extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void m_entercharintrie(
-#if defined(M_PROTO)
-  M_TRIE **currentnode, M_WCHAR c
-#endif
-  ) ;
+void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c);
 
 /* Enters the next character of a string into a trie */
-#if defined(M_PROTO)
 void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c)
-#else
-void m_entercharintrie(currentnode, c)
-  M_TRIE **currentnode ;
-  M_WCHAR c ;
-#endif
   {
     M_TRIE *newnode ;
 
@@ -99,7 +81,7 @@ void m_entercharintrie(currentnode, c)
    } /* end entertree */
 
 /* Gets a new node for a trie */
-M_TRIE *m_gettrienode(M_NOPAR)
+M_TRIE *m_gettrienode(void)
   {
     M_TRIE *new ;
 
@@ -112,13 +94,7 @@ M_TRIE *m_gettrienode(M_NOPAR)
 
 /* M_lookfortrie(p, xtrie) looks for string p in the specified trie,
    returning its data value if found and otherwise FALSE */
-#if defined(M_PROTO)
 void *m_lookfortrie( const M_WCHAR *p , const M_TRIE *xtrie )
-#else
-void *m_lookfortrie(p, xtrie)
-  M_WCHAR *p ;
-  M_TRIE *xtrie ;
-#endif /* M_PROTO */
   {
     M_TRIE *currentnode ;
 
@@ -141,10 +117,7 @@ void *m_lookfortrie(p, xtrie)
     }
 
 /* Enters a string and associated data value into a trie */
-void *m_ntrtrie(p, xtrie, dataval)
-  M_WCHAR *p ;
-  M_TRIE *xtrie ;
-  void *dataval ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval)
   {
     M_TRIE *currentnode ;
     void *n ;
index c147fdfeb910673cf0804a846efa1d69d72c1a28..f1fd061e58db3c0b0d47fd10f38d152fd28ef035 100644 (file)
@@ -51,26 +51,10 @@ struct m_ptrie {
   } ;
 
 
-M_TRIE *m_gettrienode(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+M_TRIE *m_gettrienode(void);
 
-void *m_lookfortrie(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_TRIE *xtrie
-#endif
-  ) ;
+void *m_lookfortrie(const M_WCHAR *p, const M_TRIE *xtrie);
 
-void *m_ntrtrie(
-#if defined(M_PROTO)
-  M_WCHAR *p, M_TRIE *xtrie, void *dataval
-#endif
-  ) ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval);
 
-void *m_resettrie(
-#if defined(M_PROTO)
-  M_TRIE *xtrie, M_WCHAR *p, void *value
-#endif
-  ) ;
+void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value);
index 9b7fee2bf3463d8b8ce52ca064394c93e51bf162..2899ff748c11cb0789e49504c88c9d7a0f337e16 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
-    void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+    void (*proc)(FILE *file, void *value));
 
-void printval(
-#if defined(M_PROTO)
-  FILE *file, void *value
-#endif
-  ) ;
+void printval(FILE *file, void *value);
 
 /* Count the descendants of a node in order to generate declarations for
    the packed form of a trie*/
-void countdown(parent, count)
-  M_TRIE *parent ;
-  int *count ;
+void countdown(M_TRIE *parent, int *count)
   {
     M_TRIE *child ;
 
@@ -66,17 +52,8 @@ void countdown(parent, count)
 
 /* Output descendants of a node for the declaration of a trie, in packed
    or normal format*/
-void dumpnode(first, file, trieptr, count, proc)
-  LOGICAL *first ;
-  FILE *file ;
-  M_TRIE *trieptr ;
-  int *count ;
-  void (*proc) (
-#if defined (M_PROTO)
-    FILE *file, 
-    void *value
-#endif
-    ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+              void (*proc) (FILE *file, void *value))
   {
     M_TRIE *p ;
     int savecount ;
@@ -106,9 +83,7 @@ void dumpnode(first, file, trieptr, count, proc)
 
 
 /* Most common procedure passed to dumpptrie */
-void printval(file, value)
-  FILE *file ;
-  void *value ;
+void printval(FILE *file, void *value)
   {
     fprintf(file, ", %ld", (long) value) ;
     }
index 1e62280bcca19aaf15ccb8c2ee68a9a8503309a4..e137eaf56d2c6ffb6d39cd43b123723963b4db3e 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *xtrie, char *extname, int *count,
-  void (*proc)(void *value)
-#endif
-  ) ;
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count,
+  void (*proc)(void *value));
 
 /* Write the C declaration of a trie */
-void m_dumptrie(file, xtrie, extname, count, proc)
-  FILE *file ;
-  M_TRIE *xtrie ;
-  char *extname ;
-  int *count ;
-  void (*proc)(
-#if defined(M_PROTO)
-    void *value
-#endif
-    ) ;
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count,
+                void (*proc)(void *value))
   {
     int firstson ;
     M_TRIE *p ;
index 83be1c83132904b0ec67fe04cb7814809479303e..e18f9200ad2093a1bb8eb50da9e5cb629635a83e 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
-    void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+    void (*proc)(FILE *file, void *value));
 
-void dumpptrie(
-#if defined(M_PROTO)
-  M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
-  void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+  void (*proc)(FILE *file, void *value));
 
 /* Write the declaration of a packed trie to the specified files */
-void dumpptrie(intname, extname, file, externdef, defdef, proc)
-  M_TRIE *intname ;
-  char *extname ;
-  FILE *file ;
-  char *externdef ;
-  char *defdef ;
-  void (*proc) (
-#if defined (M_PROTO)
-    FILE *file,
-    void *value
-#endif
-    ) ;
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file,
+               char *externdef, char *defdef,
+               void (*proc) (FILE *file, void *value))
   {
     LOGICAL first = TRUE ;
     int count = 0 ;
index 5754f5201e38c14cefdaf899ed6362982384ff8a..d0706f4594460ad827f9d39fb6145883cdbcda29 100644 (file)
 
 extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
 
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie,
-  M_WCHAR *name
-#endif
-  ) ;
+int m_packedlook(M_PTRIE *xptrie,
+  M_WCHAR *name);
 
 /* Look for the string NAME in the packed trie PTRIE */
-int m_packedlook(xptrie, name)
-M_PTRIE *xptrie ;
-M_WCHAR *name ;
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name)
 {
 int current = 0 ;
 int i ;
index 3a9fa97cabb159f09f6ebbcea912b21c62fc29d8..b2f91d0733ddc09e3d8ee9d770e97a4b2006cdbf 100644 (file)
 extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
 
 /* Changes the value associated with an entry in a trie. */
-void *m_resettrie(xtrie, p, value)
-  M_TRIE *xtrie ;
-  M_WCHAR *p ;
-  void *value ;
+void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value)
   {
     M_TRIE *currentnode ;
 
index c221a7f42f0c39d987231b3d80f0b44f3b82c5c6..a176ccc712504aa421af34e2b8a55adb2d82ea4d 100644 (file)
 #include "common.h"
 extern M_CHARTYPE m_ctarray[256] ;
 
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
 
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
 
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
+int m_mbmbupstrcmp(const char *p, const char *q);
 
-#if defined(M_PROTO)
 int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q )
-#else
-int m_wcupstrcmp(p, q)
-  M_WCHAR *p, *q ;
-#endif /* M_PROTO */
   {
     do {
       if (m_ctupper(*p) < m_ctupper(*q)) return(-1) ;
@@ -65,13 +48,7 @@ int m_wcupstrcmp(p, q)
     return(0) ;
     }
 
-#if defined(M_PROTO)
 int m_wcmbupstrcmp(const M_WCHAR *p, const char *q)
-#else
-int m_wcmbupstrcmp(p, q)
-  M_WCHAR *p;
-  char *q ;
-#endif
   {
   M_WCHAR *wc;
   int      retval;
@@ -82,13 +59,7 @@ int m_wcmbupstrcmp(p, q)
   return retval;
   }
 
-#if defined(M_PROTO)
 int m_mbmbupstrcmp(const char *p, const char *q)
-#else
-int m_mbmbupstrcmp(p, q)
-  char *p;
-  char *q ;
-#endif
   {
   M_WCHAR *w_p, *w_q;
   int      retval;
index 3463346b3bcb92754499d0674c2193b94d56e8d0..160e932c9764912ac12e4fdaa092ddca49f2b0eb 100644 (file)
 
 #include "basic.h"
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-int m_upper(c)
-  int c ;
+int m_upper(int c)
   {
     if (c >= 'a' && c <= 'z') c += 'A' - 'a' ;
     return(c) ;
index 3eaa6a64a530de6e0cd50accd31beec646de2c15..753d52f65a1bee1d9d543668b40a049926fb9548 100644 (file)
 
 #include "basic.h"
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_upper(int c);
 
-int m_upstrcmp(
-#if defined(M_PROTO)
-  char *p, char *q
-#endif
-  ) ;
-
-int m_upstrcmp(p, q)
-  char *p, *q ;
+int m_upstrcmp(char *p, char *q)
   {
     do {
       if (m_upper((int) *p) < m_upper((int) *q)) return(-1) ;
index 556d411597469f953c9761d14933a049bb9e73b4..c1ca8f1fc401a16a552293739f6fa6d19b6239fa 100644 (file)
 
 
 /* compare two wide character strings */
-#if defined(M_PROTO)
 int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2)
-#else
-int w_strcmp(string1, string2)
-M_WCHAR *string1;
-M_WCHAR *string2;
-#endif
 {
 M_WCHAR c1, c2, null;
 
@@ -60,13 +54,7 @@ while (1)
 
 
 /* copy a wide character string */
-#if defined(M_PROTO)
 M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2)
-#else
-M_WCHAR *w_strcpy(string1, string2)
-M_WCHAR *string1;
-M_WCHAR *string2;
-#endif
 {
 M_WCHAR *string1start;
 
@@ -79,14 +67,7 @@ return string1start;
 
 
 /* copy a wide character string, stopping after "max" moves */
-#if defined(M_PROTO)
 M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max)
-#else
-M_WCHAR *w_strncpy(string1, string2, max)
-M_WCHAR *string1;
-M_WCHAR *string2;
-int      max;
-#endif
 {
 M_WCHAR *string1start;
 
@@ -99,12 +80,7 @@ return string1start;
 
 
 /* get the length of a wide character string */
-#if defined(M_PROTO)
 int w_strlen(const M_WCHAR *string)
-#else
-int w_strlen(string)
-M_WCHAR *string;
-#endif
 {
 int length;
 
@@ -117,12 +93,7 @@ return length;
 
 
 /* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
 M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr)
-#else
-M_WCHAR *w_strchr(string, chr)
-M_WCHAR *string, chr;
-#endif
 {
 M_WCHAR *where;
 
@@ -142,12 +113,7 @@ else
 
 
 /* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
 M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2)
-#else
-M_WCHAR *w_strstr(string1, string2)
-M_WCHAR *string1, *string2;
-#endif
 {
 M_WCHAR *where1, *where2;
 
@@ -182,12 +148,7 @@ return NULL;
 
 
 /* make a multi-byte string from a wide character string */
-#if defined(M_PROTO)
 char *MakeMByteString(const M_WCHAR *wc_string)
-#else
-char *MakeMByteString(wc_string)
-M_WCHAR *wc_string;
-#endif
 {
 char   *mb_string;
 int     length, retVal;
@@ -217,12 +178,7 @@ return mb_string;
 
 
 /* make a wide character string from a multi-byte string */
-#if defined(M_PROTO)
 M_WCHAR *MakeWideCharString(const char *mb_string)
-#else
-M_WCHAR *MakeWideCharString(mb_string)
-char *mb_string;
-#endif
 {
 M_WCHAR *wc_string, *wc_stringStart;
 int      length, incr;
@@ -258,8 +214,7 @@ return wc_stringStart;
 
 
 /* Get-wide-char procedure */
-int mb_getwc(m_ptr)
-void *m_ptr;
+int mb_getwc(void *m_ptr)
 {
 int  c;
 M_WCHAR wc;
index 4fec412c29afc2a43a0e37620049ac22cf679849..cf410bcdc52c366b7fa1c0bdf40e07b62b8045d2 100644 (file)
 
 #include "basic.h"
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
 /* Test if character c is a blank, tab, or carriage return */
-#if defined(M_PROTO)
 LOGICAL m_whitespace(M_WCHAR c)
-#else
-LOGICAL m_whitespace(c)
-  M_WCHAR c ;
-#endif
 {
 char mb_c[32]; /* arbitrarily large */
 int  length;
index 51ea7d7ce53d5bedef2b87ea96cd9d8a5fb3718b..d0117c2ce6463c280c7fcdfda7abc52dcda0bb28 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "context.h"
 #define BUILDEF
 #include "build.h"
@@ -41,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entdef.h"
 
 /* Main procedure */
-int main(argc, argv)
-int argc ;
-char **argv ;
+int main(int argc, char **argv)
 {
 int m_prevcon ;
 
index 07f60ab6e998f91425d97afce956b1b1d3dc98e7..7a917f0b3008a36b157861f6c56e74d007079da5 100644 (file)
@@ -421,8 +421,4 @@ BUILDEXTERN LOGICAL entrule BUILDINIT(FALSE) ;
 
 BUILDEXTERN M_WCHAR genname[M_NAMELEN + sizeof(M_PREFIX)] ;
 
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
+M_WCHAR *MakeWideCharString(const char *from);
index e142f5fbbecb5eb2413c90e5adde21ba90e4b42c..ceb614cfc9c1f35dcf615ca4875bfc9bf7ad6df9 100644 (file)
@@ -38,9 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Verify that <PARAM>, <MIN> or <USEMAP> has not previously occurred in
    this rule */
-void found(flag, delim)
-LOGICAL *flag;
-char *delim;
+void found(LOGICAL *flag, char *delim)
 {
 M_WCHAR wcbuff[129];
 ssize_t  length;
@@ -62,7 +60,7 @@ if (*flag)
 }
 
 /* Program initialization */
-void initialize(M_NOPAR)
+void initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
@@ -90,7 +88,7 @@ ruleinit() ;
 
 
 /* Initialization before starting a new rule */
-void ruleinit(M_NOPAR)
+void ruleinit(void)
   {
     /* Reinitialize for next rule */
     lhs = NULL ;
@@ -110,7 +108,7 @@ void ruleinit(M_NOPAR)
     }
 
 /* Rule end processing */
-void rulend(M_NOPAR)
+void rulend(void)
   {
     STATE *fsa = NULL ;
     LOGICAL canbenull ;
@@ -150,7 +148,7 @@ void rulend(M_NOPAR)
     }
 
 /* Skip rest of statement after an error */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
   {
     int i ;
     static int errlev = 0 ;
index fadf193b1520831cb3277197406aac7940c8cb9a..c78a5ad0f6929761b5f4f26eaf99e736e93ceff2 100644 (file)
@@ -34,8 +34,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "build.h"
 
 /* Enters an element name into the element name tree */
-ELTSTRUCT *ntrelt(p)
-  M_WCHAR *p ;
+ELTSTRUCT *ntrelt(M_WCHAR *p)
   {
     ELTSTRUCT *new ;
     ELTSTRUCT *old ;
index d6a4fc08335d4e726ccf3d4e949c3e72082cdb7e..a00913c5b0163733b591aaedd59646b0db9922ed 100644 (file)
@@ -32,7 +32,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "build.h"
 
 /* Add an exception (inclusion or exclusion) for the current element */
-void addex(M_NOPAR)
+void addex(void)
   {
     excount++ ;
     *nextex = (EXCEPTION *) m_malloc(sizeof(EXCEPTION), "exception") ;
index c19875cd14a7533bb110d7721423546aa783c6e4..dd9cda1b80af74fd9b77a18c8823d7027317470e 100644 (file)
@@ -37,18 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Addarc adds an arc from FSA state <from> to state <to> setting other
    fields as indicated by the other parameters.*/
-#if defined(M_PROTO)
 int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, int id, LOGICAL minim, ELTSTRUCT **errelt)
-#else
-int addarc(from, to, label, and, optional, id, minim, errelt)
-  STATE *from, *to ;
-  ELTSTRUCT *label ;
-  ANDGROUP *and ;
-  LOGICAL optional ;
-  int id ;
-  LOGICAL minim ;
-  ELTSTRUCT **errelt ;
-#endif
   {
     ARC *parc, *qarc ;
     int determ ;
@@ -69,11 +58,8 @@ int addarc(from, to, label, and, optional, id, minim, errelt)
 
 /*checkand is used to verify nondeterminism from start and final states
   of FSA's generated from and groups*/
-void checkand(andstart, andptr, start, root, errelt)
-  ANDGROUP *andstart, *andptr ;
-  STATE *start ;
-  TREE *root ;
-  ELTSTRUCT **errelt ;    
+void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start,
+              TREE *root, ELTSTRUCT **errelt)
   {
     ARC *parc ;
     ANDGROUP *pand ;
@@ -97,12 +83,8 @@ void checkand(andstart, andptr, start, root, errelt)
 /*Checkdfsa is called when adding an arc to an FSA in order to verify that
 no existing arc from the same state (or from a start state of an and-group
 FSA labelling an arc from the same state) has the same label. */
-int checkdfsa(from, label, and, id, errelt)
-  STATE *from ;
-  ELTSTRUCT *label ;
-  ANDGROUP *and ;
-  int id ;
-  ELTSTRUCT **errelt ;
+int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id,
+              ELTSTRUCT **errelt)
   {
     int c ;
     ARC *parc ;
@@ -127,10 +109,7 @@ int checkdfsa(from, label, and, id, errelt)
     }
 
 /* Check use of repeated models with and groups */
-int checkrepeat(from, and, errelt)
-  STATE *from ;
-  ANDGROUP *and ;
-  ELTSTRUCT **errelt ;
+int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt)
   {
     ARC *parc ;
     int c ;
@@ -153,8 +132,7 @@ int checkrepeat(from, and, errelt)
     }
 
 /* Copyintolist copies one list of states into another */
-void copyintolist(from, to)
-  STATELIST *from, **to ;
+void copyintolist(STATELIST *from, STATELIST **to)
   {
     STATELIST **new, *old ;
 
@@ -172,8 +150,7 @@ void copyintolist(from, to)
     }
 
 /* Dellist deletes a list of states */
-void dellist(list)
-  STATELIST **list ;
+void dellist(STATELIST **list)
   {
     STATELIST *p, *q ;
 
@@ -187,7 +164,7 @@ void dellist(list)
 
 /* Delstartarcs deletes the contents of the starta list of arcs from start
    states of a submodel */
-void delstartarcs(M_NOPAR)
+void delstartarcs(void)
   {
     ARC *arcptr ;
     ARC *discard ;
@@ -201,7 +178,7 @@ void delstartarcs(M_NOPAR)
     }
 
 /* Getand allocates and initializes a new andgroup structure */
-ANDGROUP *getand(M_NOPAR)
+ANDGROUP *getand(void)
   {
     ANDGROUP *new ;
 
@@ -214,7 +191,7 @@ ANDGROUP *getand(M_NOPAR)
     }    
 
 /* Getstate obtains an FSA state */
-STATE *getstate(M_NOPAR)
+STATE *getstate(void)
   {
     STATE *new ;
 
@@ -231,10 +208,7 @@ STATE *getstate(M_NOPAR)
     }
 
 /* Makeand processes a submodel whose connector is & */
-void makeand(canbenull, root, optional)
-  LOGICAL *canbenull ;
-  TREE *root ;
-  int optional ;
+void makeand(LOGICAL *canbenull, TREE *root, int optional)
   {
     TREE *child ;
     STATELIST *start, *final ;
@@ -319,9 +293,7 @@ void makeand(canbenull, root, optional)
    allfinal is passed from model to submodel; information in newfinal
    goes from submodel to model.
    */
-LOGICAL makefsa(root, optional)
-  TREE *root ;
-  int optional ;
+LOGICAL makefsa(TREE *root, int optional)
   {
     LOGICAL canbenull ;
 
@@ -355,9 +327,7 @@ LOGICAL makefsa(root, optional)
     }
 
 /* Makeor processes a submodel whose connector is | */
-void makeor(canbenull, root)
-  LOGICAL *canbenull ;
-  TREE *root ;
+void makeor(LOGICAL *canbenull, TREE *root)
   {
     TREE *child ;
     STATELIST *final ;
@@ -379,10 +349,7 @@ void makeor(canbenull, root)
     }
 
 /* Makeseq processes a submodel whose connector is , */
-void makeseq(canbenull, root, optional)
-  LOGICAL *canbenull ;
-  TREE *root ;
-  int optional ;
+void makeseq(LOGICAL *canbenull, TREE *root, int optional)
   {
     LOGICAL branchnull ;
     STATELIST *keepfinal = NULL, *final ;
@@ -420,10 +387,7 @@ void makeseq(canbenull, root, optional)
 
 /* Nondeterm issues a diagnostic when a nondeterministic model is
    encountered */
-void nondeterm(root, c, eltp)
-  TREE *root ;
-  int c ;
-  ELTSTRUCT *eltp ;
+void nondeterm(TREE *root, int c, ELTSTRUCT *eltp)
   {
   M_WCHAR *wtemp;
 
@@ -454,8 +418,7 @@ void nondeterm(root, c, eltp)
 
 /* Notinlist returns TRUE iff item is not in list.  If item is in list,
    it makes sure that the stored nesting level is the smaller of the two */
-LOGICAL notinlist(item, list)
-  STATELIST *item, *list ;
+LOGICAL notinlist(STATELIST *item, STATELIST *list)
   {
     for ( ; list ; list = list->next)
       if (list->value == item->value) {
@@ -467,8 +430,7 @@ LOGICAL notinlist(item, list)
 
 /* Returns true if the arc is labeled #PCDATA or with an and-group that
    has an arc labelled #PCDATA from a start state */
-LOGICAL permitspcd(a)
-  ARC *a ;
+LOGICAL permitspcd(ARC *a)
   {
     ANDGROUP *pand ;
     ARC *b ;
@@ -488,7 +450,7 @@ LOGICAL permitspcd(a)
 
 /* Pop pops the submodel stack when the end of the current submodel is
    encountered */
-void pop(M_NOPAR)
+void pop(void)
   {
     STACK *discard ;
 
@@ -504,7 +466,7 @@ void pop(M_NOPAR)
     }
 
 /* Push pushes the submodel stack when a new group is encountered */
-void push(M_NOPAR)
+void push(void)
   {
     STACK *new ;
 
@@ -518,8 +480,7 @@ void push(M_NOPAR)
 
 /* Regenerate is used in error processing to print the portion of a grammar
    rule preceding an error */
-LOGICAL regenerate(start, stop)
-TREE *start, *stop ;
+LOGICAL regenerate(TREE *start, TREE *stop)
 {
 TREE *child ;
 
@@ -565,8 +526,7 @@ return(FALSE) ;
    by adding arcs from all the final states to all the states reachable
    in one transition from a start state, labelling them as arcs from
    start states are labelled. */
-void repeat(root)
-  TREE *root ;
+void repeat(TREE *root)
   {
     STATELIST *final ;
     ARC *a ;
@@ -617,9 +577,7 @@ void repeat(root)
 
 /* Used during processing of occurrence indicators in content models such
    as (a+)+ to prohibit duplicate arcs */
-LOGICAL samelabelarc(a, s)
-  ARC *a ;
-  STATE *s ;
+LOGICAL samelabelarc(ARC *a, STATE *s)
   {
     ARC *b ;
 
@@ -630,12 +588,7 @@ LOGICAL samelabelarc(a, s)
 
 /* Saves the name of an element appearing on the left-hand side of a
    grammar rule */
-#if defined(M_PROTO)
 void savelhs(LOGICAL param)
-#else
-void savelhs(param)
-  LOGICAL param ;
-#endif
   {
     STATE *end ;
     ELTSTRUCT *errelt ;
@@ -663,7 +616,7 @@ void savelhs(param)
 /* Called when arcs are added to the start state of a submodel that is
    also a start state of the parent model to set the parent model's
    starta list */
-void savestartarcs(M_NOPAR)
+void savestartarcs(void)
   {
     ARC *carcptr, *parcptr ;
 
@@ -682,11 +635,8 @@ void savestartarcs(M_NOPAR)
 
 /* Simplebranch adds a new state and transition to it in an FSA when a
    submodel consists of a single element or of an and group */
-void simplebranch(root, value, group, optional)
-  TREE *root ;
-  ELTSTRUCT *value ;
-  ANDGROUP *group ;
-  int optional ;
+void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group,
+                  int optional)
   {
     STATE *new = NULL ;
     STATELIST *index ;
@@ -734,9 +684,7 @@ void simplebranch(root, value, group, optional)
    subtree in the tree representing the grammar rule being processed and
    the pointer to a flag that is set to indicate whether or not the
    submodel can be null. */
-STATE *startfsa(root, canbenull)
-  TREE *root ;
-  LOGICAL *canbenull ;
+STATE *startfsa(TREE *root, LOGICAL *canbenull)
   {
     STATELIST *item ;
     STATE *first ;
index c15696b31626a598226d8176cff2ddf117cf051a..17183153ee5ddf90beeebc08affc335e61e8851d 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "context.h"
 #include "build.h"
 #include "delim.h"
@@ -72,8 +69,7 @@ char mrequired[] = "M_REQUIRED" ;
 
 /* Deftype returns a string indicating the default type of the nth parameter.
    */
-char *deftype(n)
-  int n ;
+char *deftype(int n)
   {
     switch (n) {
       case NAME: return(mnamedef) ;
@@ -87,7 +83,7 @@ char *deftype(n)
     }
 
 /* Called after all input is read to generate output */
-void done(M_NOPAR)
+void done(void)
   {
 
     if (! eltree.data) {
@@ -104,9 +100,7 @@ void done(M_NOPAR)
     }
 
 /* Prints data value of an entry in the element name tree */
-void dumpentnode(file, value)
-  FILE *file ;
-  M_TRIE *value ;
+void dumpentnode(FILE *file, M_TRIE *value)
   {
 
     fprintf(file, ", %d", ((ELTSTRUCT *) value)->eltno) ;
@@ -114,9 +108,7 @@ void dumpentnode(file, value)
 
 /* Prints data value of an entry in the trie of short reference map names,
    reporting any maps that are referenced but not defined */
-void dumpmapnode(file, value)
-  FILE *file ;
-  M_TRIE *value ;
+void dumpmapnode(FILE *file, M_TRIE *value)
   {
     fprintf(file, ", %d", ((MAP *) value)->map) ;
     if (! ((MAP *) value)->defined)
@@ -126,9 +118,7 @@ void dumpmapnode(file, value)
 
 
 /* Prints data value of an entry in the trie of short reference delimiters */
-void dumpsrefnode(file, value)
-  FILE *file ;
-  M_TRIE *value ;
+void dumpsrefnode(FILE *file, M_TRIE *value)
   {
     fprintf(file, ", %d", ((SREFSTRUCT *) value)->srefcnt) ;
     }
@@ -136,8 +126,7 @@ void dumpsrefnode(file, value)
 
 /* Controls printing of element blocks in alphabetical order to the
    template file */
-void eltblocks(tempfile)
-  FILE *tempfile ;
+void eltblocks(FILE *tempfile)
   {
     int n ;
     M_TRIE *node[M_NAMELEN + 1] ;
@@ -167,7 +156,7 @@ void eltblocks(tempfile)
 
 
 /* Writes data about elements */
-void eltreeout(M_NOPAR)
+void eltreeout(void)
   {
     M_WCHAR *p ;
     int enameindex = 0 ;
@@ -226,8 +215,7 @@ void eltreeout(M_NOPAR)
     }
 
 /* Enttype returns a string indicating the type of an entity */
-char *enttype(n)
-  int n ;
+char *enttype(int n)
   {
     switch(n) {
       case M_GENERAL: return(mgeneral) ;
@@ -245,7 +233,7 @@ char *enttype(n)
     }
 
 /* Outputs exception lists */
-void exout(M_NOPAR)
+void exout(void)
   {
     EXCEPTION *ex ;
     int exindex = 0 ;
@@ -268,7 +256,7 @@ void exout(M_NOPAR)
     }
 
 /* Outputs FSA definitions */
-void fsa(M_NOPAR)
+void fsa(void)
   {
     int arcount = 0 ;
     STATE *pstate ;
@@ -331,7 +319,7 @@ void fsa(M_NOPAR)
     }
 
 /* Writes data about parameters */
-void parout(M_NOPAR)
+void parout(void)
 {
 PARAMETER *paramp ;
 LOGICAL first = TRUE ;
@@ -455,8 +443,7 @@ fprintf(dtd, "#define M_MAXPAR %d\n\n", maxpar) ;
 }
 
 /* Partype returns a string indicating the type of the nth parameter. */
-char *partype(n)
-  int n ;
+char *partype(int n)
   {
     switch(n) {
       case GRPO: return(mkeyword) ;
@@ -480,7 +467,7 @@ char *partype(n)
     }
 
 /* Write short reference information */
-void srefout(M_NOPAR)
+void srefout(void)
   {
     LOGICAL first = TRUE ;
     int *mapbysref = NULL;
@@ -549,9 +536,7 @@ void srefout(M_NOPAR)
     }
 
 /* Output one element block in a template */
-void tempelt(eltp, tempfile)
-ELTSTRUCT *eltp ;
-FILE *tempfile ;
+void tempelt(ELTSTRUCT *eltp, FILE *tempfile)
 {
 PARAMETER *paramp ;
 PTYPE *ptypep ;
@@ -633,7 +618,7 @@ fputs("  <END-STRING><\\END-STRING>\n", tempfile) ;
 }
 
 /* Write template */
-void template(M_NOPAR)
+void template(void)
   {
     FILE *tempfile ;
     M_ENTITY *ent ;
@@ -661,8 +646,7 @@ void template(M_NOPAR)
     }
 
 /* Typecon returns a string indicating the content type of the nth element.*/
-char *typecon(n)
-  int n ;
+char *typecon(int n)
   {
     switch(n) {
       case GRPO: return(mregexp) ;
index b852e2310937c97f0094bde4fafc5e621e1f8cd8..63feb9b7e2375d4d69b9ec2fea9c931147812eee 100644 (file)
@@ -38,7 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Add a keyword to the list of possible values of a keyword parameter for
    the current element
 */
-void addkeyword(M_NOPAR)
+void addkeyword(void)
 {
 int length ;
 PARAMETER *par ;
@@ -87,7 +87,7 @@ ptypelen++ ;
 }
 
 /* Add a parameter to the current element */
-void addpar(M_NOPAR)
+void addpar(void)
 {
 PARAMETER *paramp, *last = NULL ;
 int length ;
@@ -124,12 +124,7 @@ newpar->ptypep = NULL ;
 
 
 /* Check that specified default value is legal parameter value */
-#if defined(M_PROTO)
 LOGICAL checkdefault( const M_WCHAR *string )
-#else
-LOGICAL checkdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 const M_WCHAR *p ;
 int len ;
@@ -205,12 +200,7 @@ switch (newpar->type)
 
 /* Normalize parameter default.  Change tabs and RE's to spaces, capitalize
    all letters (unless type is CDATA), remove extra space in lists */
-#if defined(M_PROTO)
 void normdefault(M_WCHAR *string )
-#else
-void normdefault(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 M_WCHAR *p, *q ;
 int i, ret ;
@@ -273,7 +263,7 @@ switch (newpar->type)
 }
 
 /* Called at end of parameter attribute list rule */
-void prulend(M_NOPAR)
+void prulend(void)
 {
 LHS *lhsp ;
 LHS *discard ;
@@ -296,12 +286,7 @@ ruleinit() ;
 }
 
 /* Make string the default for the current parameter of the current element */
-#if defined(M_PROTO)
 void setdefault(const M_WCHAR *string)
-#else
-void setdefault()
-M_WCHAR *string;
-#endif /* M_PROTO */
 {
 PTYPE *kw ;
 int keycount ;
index 0bd0eb0c1e7b35a48f86fc7f20b99b4e1e06f743..152e698284a396ebdf5aa0ef9cab4f7d2eed8369 100644 (file)
 /* Proto.h contains function prototypes for program BUILD. */
 
 
-int addarc(
-#if defined(M_PROTO)
-  STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, 
-  int id, LOGICAL minim, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-void adddefent(
-#if defined(M_PROTO)
-  M_WCHAR *mapname
-#endif
-  ) ;
-
-LOGICAL addent(
-#if defined(M_PROTO)
-  M_WCHAR *name
-#endif
-  ) ;
-
-void addex(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void addkeyword(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL addmapname(
-#if defined(M_PROTO)
-  M_WCHAR *p, LOGICAL define
-#endif
-  ) ;
-
-void addndent(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void addpar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void addsref(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void checkand(
-#if defined(M_PROTO)
-  ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root, 
-  ELTSTRUCT **errelt
-#endif
-  ) ;
-
-LOGICAL checkdefault(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-int checkdfsa(
-#if defined(M_PROTO)
-  STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-int checkrepeat(
-#if defined(M_PROTO)
-  STATE *from, ANDGROUP *and, ELTSTRUCT **errelt
-#endif
-  ) ;
-
-void copyintolist(
-#if defined(M_PROTO)
-  STATELIST *from, STATELIST **to
-#endif
-  ) ;
-
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
-
-void defmapname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *deftype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void dellist(
-#if defined(M_PROTO)
-  STATELIST **list
-#endif
-  ) ;
-
-void delstartarcs(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void dumpentnode(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
-
-void dumpmapnode(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
-
-void dumpsrefnode(
-#if defined(M_PROTO)
-  FILE *file,
-  M_TRIE *value
-#endif
-  ) ;
-
-void dumpptrie(
-#if defined(M_PROTO)
-  M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
-  void (*proc)( FILE *, M_TRIE *)
-#endif
-  ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE   *file,
+int addarc(STATE *from, STATE *to, ELTSTRUCT *label, ANDGROUP *and, LOGICAL optional, 
+  int id, LOGICAL minim, ELTSTRUCT **errelt);
+
+void adddefent(M_WCHAR *mapname);
+
+LOGICAL addent(M_WCHAR *name);
+
+void addex(void);
+
+void addkeyword(void);
+
+LOGICAL addmapname(M_WCHAR *p, LOGICAL define);
+
+void addndent(M_WCHAR *p);
+
+void addpar(void);
+
+void addsref(M_WCHAR *p);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void checkand(ANDGROUP *andstart, ANDGROUP *andptr, STATE *start, TREE *root, 
+  ELTSTRUCT **errelt);
+
+LOGICAL checkdefault(const M_WCHAR *string);
+
+int checkdfsa(STATE *from, ELTSTRUCT *label, ANDGROUP *and, int id, ELTSTRUCT **errelt);
+
+int checkrepeat(STATE *from, ANDGROUP *and, ELTSTRUCT **errelt);
+
+void copyintolist(STATELIST *from, STATELIST **to);
+
+void countdown(M_TRIE *parent, int *count);
+
+void defmapname(void);
+
+char *deftype(int n);
+
+void dellist(STATELIST **list);
+
+void delstartarcs(void);
+
+void done(void);
+
+void dumpentnode(FILE *file, M_TRIE *value);
+
+void dumpmapnode(FILE *file, M_TRIE *value);
+
+void dumpsrefnode(FILE *file,
+  M_TRIE *value);
+
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+  void (*proc)( FILE *, M_TRIE *));
+
+void m_dumptrie(FILE   *file,
   M_TRIE *xtrie,
   char   *extname,
   int    *count,
-  void  (*proc)(M_ENTITY *)
-#endif
-  ) ;
-
-void eltblocks(
-#if defined(M_PROTO)
-  FILE *tempfile
-#endif
-  ) ;
-
-void eltreeout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endmodel(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void entout(
-#if defined(M_PROTO)
-  char *fname
-#endif
-  ) ;
-
-char *enttype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void exout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void freetree(
-#if defined(M_PROTO)
-  TREE *ruletree
-#endif
-  ) ;
-
-void found(
-#if defined(M_PROTO)
-  LOGICAL *flag, char *delim
-#endif
-  ) ;
-
-void fsa(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int getachar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-ANDGROUP *getand(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL getname(
-#if defined(M_PROTO)
-  int first
-#endif
-  ) ;
-
-STATE *getstate(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int gettoken(
-#if defined(M_PROTO)
-  int *c, int context
-#endif
-  ) ;
-
-TREE *gettreenode(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void makeand(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root, int optional
-#endif
-  ) ;
-
-LOGICAL makefsa(
-#if defined(M_PROTO)
-  TREE *root, int optional
-#endif
-  ) ;
-
-void makeor(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root
-#endif
-  ) ;
-
-void makeseq(
-#if defined(M_PROTO)
-  LOGICAL *canbenull, TREE *root, int optional
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void msgline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void msg1line(
-#if defined(M_PROTO)
-  char *text, char *arg1
-#endif
-  ) ;
-
-void nondeterm(
-#if defined(M_PROTO)
-  TREE *root, int c, ELTSTRUCT *eltp
-#endif
-  ) ;
-
-void normdefault(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL notinlist(
-#if defined(M_PROTO)
-  STATELIST *item, STATELIST *list
-#endif
-  ) ;
-
-ELTSTRUCT *ntrelt(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void parout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *partype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-LOGICAL permitspcd(
-#if defined(M_PROTO)
-  ARC *a
-#endif
-  ) ;
-
-void pop(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void prulend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void push(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL regenerate(
-#if defined(M_PROTO)
-  TREE *start, TREE *stop
-#endif
-  ) ;
-
-void repeat(
-#if defined(M_PROTO)
-  TREE *root
-#endif
-  ) ;
-
-void ruleinit(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void rulend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL samelabelarc(
-#if defined(M_PROTO)
-  ARC *a, STATE *s
-#endif
-  ) ;
-
-void savelhs(
-#if defined(M_PROTO)
-  LOGICAL param
-#endif
-  ) ;
-
-void savestartarcs(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int scan(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void setdefault(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void simplebranch(
-#if defined(M_PROTO)
-  TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_sprscon(
-#if defined(M_PROTO)
-  int i, int j
-#endif
-  ) ;
-
-void srefout(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-STATE *startfsa(
-#if defined(M_PROTO)
-  TREE *root, LOGICAL *canbenull
-#endif
-  ) ;
-
-void tempelt(
-#if defined(M_PROTO)
-  ELTSTRUCT *eltp, FILE *tempfile
-#endif
-  ) ;
-
-void template(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *typecon(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-void undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim
-#endif
-  ) ;
-
-void ungetachar(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-void warning2(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2
-#endif
-  ) ;
-
-void warning3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void warning4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+  void  (*proc)(M_ENTITY *));
+
+void eltblocks(FILE *tempfile);
+
+void eltreeout(void);
+
+void endmodel(void);
+
+void entout(char *fname);
+
+char *enttype(int n);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void exout(void);
+
+void m_free(void *block, char *msg);
+
+void freetree(TREE *ruletree);
+
+void found(LOGICAL *flag, char *delim);
+
+void fsa(void);
+
+int getachar(void);
+
+ANDGROUP *getand(void);
+
+LOGICAL getname(int first);
+
+STATE *getstate(void);
+
+int gettoken(int *c, int context);
+
+TREE *gettreenode(void);
+
+void m_initctype(void);
+
+void initialize(void);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void makeand(LOGICAL *canbenull, TREE *root, int optional);
+
+LOGICAL makefsa(TREE *root, int optional);
+
+void makeor(LOGICAL *canbenull, TREE *root);
+
+void makeseq(LOGICAL *canbenull, TREE *root, int optional);
+
+void *m_malloc(int size, char *msg);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void nondeterm(TREE *root, int c, ELTSTRUCT *eltp);
+
+void normdefault(M_WCHAR *string);
+
+LOGICAL notinlist(STATELIST *item, STATELIST *list);
+
+ELTSTRUCT *ntrelt(M_WCHAR *p);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void parout(void);
+
+char *partype(int n);
+
+LOGICAL permitspcd(ARC *a);
+
+void pop(void);
+
+void prulend(void);
+
+void push(void);
+
+LOGICAL regenerate(TREE *start, TREE *stop);
+
+void repeat(TREE *root);
+
+void ruleinit(void);
+
+void rulend(void);
+
+LOGICAL samelabelarc(ARC *a, STATE *s);
+
+void savelhs(LOGICAL param);
+
+void savestartarcs(void);
+
+int scan(void);
+
+void setdefault(const M_WCHAR *string);
+
+void simplebranch(TREE *root, ELTSTRUCT *value, ANDGROUP *group, int optional);
+
+void skiptoend(void);
+
+int m_sprscon(int i, int j);
+
+void srefout(void);
+
+STATE *startfsa(TREE *root, LOGICAL *canbenull);
+
+void tempelt(ELTSTRUCT *eltp, FILE *tempfile);
+
+void template(void);
+
+char *typecon(int n);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index 184e8e5642778115ba082baacea677f5932d27bf..dc4c118d59906f3cdf2bc8e5e0d8e917b00f0eaf 100644 (file)
@@ -30,9 +30,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Scan.c contains scanner procedures for program BUILD */
 
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "build.h"
 #define M_CONDEF
 #include "context.h"
@@ -41,8 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "sref.h"
 
 /* Reads a name */
-LOGICAL getname(first)
-  int first;
+LOGICAL getname(int first)
 {
 M_WCHAR *p;
 int c;
@@ -74,7 +70,7 @@ return(TRUE);
 }
 
 /* Returns the next token to the main procedure */
-int scan(M_NOPAR)
+int scan(void)
 {
 int c;
 int n;
index 1bb4cb31debd3db0c37a58779e9903f152999bd2..a38fa84207de53b84427c9e059094c7bd06d0b35 100644 (file)
@@ -36,8 +36,7 @@ static M_WCHAR *wc_prefix = NULL;
 /* Add an entity with the default name constructed by adding a suffix
    to the name of the short reference map in which it is invoked, and
    a prefix m- */
-void adddefent(mapname)
-M_WCHAR *mapname;
+void adddefent(M_WCHAR *mapname)
 {
 M_WCHAR *p;
 int n;
@@ -75,8 +74,7 @@ thissref->entidx = entity->index;
 
 /* Add an entity, return FALSE if already there, TRUE if adding it.
    Pointer to the entity structure is in global M_STRUCT *entity. */
-LOGICAL addent(name)
-M_WCHAR *name;
+LOGICAL addent(M_WCHAR *name)
 {
 M_ENTITY *new;
 
@@ -101,13 +99,7 @@ return(TRUE);
 }
 
 /* Add a short reference map name */
-#if defined(M_PROTO)
 LOGICAL addmapname(M_WCHAR* p, LOGICAL define)
-#else
-LOGICAL addmapname(p, define)
-M_WCHAR *p;
-LOGICAL define;
-#endif
 {
 MAP *old;
 MAP *new;
@@ -134,16 +126,14 @@ return(TRUE);
 }
 
 /* Add a named entity to a short reference map */
-void addndent(p)
-M_WCHAR *p;
+void addndent(M_WCHAR *p)
 {
 addent(p);
 thissref->entidx = entity->index;
 }
 
 /* Add a short reference delimiter */
-void addsref(p)
-M_WCHAR *p;
+void addsref(M_WCHAR *p)
 {
 SREFSTRUCT *delim;
 SREFSTRUCT *prevsr;
@@ -198,7 +188,7 @@ delim->data = thissref;
 
 /* Prefix left-hand side with "M-" to create default short reference map
    name, truncating to M_NAMELEN characters if necessary */
-void defmapname(M_NOPAR)
+void defmapname(void)
 {
 if (!wc_prefix)
     {
index 717329bdc0dd6423da716906c525a0a1c78ff656..6988410fbe779668fd80b3edb68944a36b7183a6 100644 (file)
@@ -36,7 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Called after a right parenthesis is read while scanning a content model.
    Resets curcon if it is the outermost submodel. */
-void endmodel(M_NOPAR)
+void endmodel(void)
   {
     curtree = curtree->parent ;
     if (! curtree->parent) curcon = LASTM ;
@@ -44,8 +44,7 @@ void endmodel(M_NOPAR)
     }
 
 /* Release storage used for the tree representation of a rule */
-void freetree(treep)
-  TREE *treep ;
+void freetree(TREE *treep)
   {
     TREE *child, *discard ;
 
@@ -58,7 +57,7 @@ void freetree(treep)
     }
 
 /* Gettreenode obtains a node to use in the tree representation of a rule */
-TREE *gettreenode(M_NOPAR)
+TREE *gettreenode(void)
   {
     TREE *new ;
 
index c95c2b3fa5bdb1f78969ff4f3058af7587d45f5b..d84e3148ca7fcc9590a9aed4a43410aaa15b2e57 100644 (file)
@@ -398,7 +398,7 @@ tagc
   postent:start
   codetagc:inentc {
             startcode(entity->codeindex, &inent, entfile,
-                      "c", nopar, nopar, "") ;
+                      "c", "void", "void", "") ;
             }
   close:preparam
   sschain:inss {
@@ -420,11 +420,11 @@ tagc
             }
   scchain:insc {
             *getaction(scarray) = ++sactions ;
-            startcode(sactions, &insc, sfile, "s", nopar, nopar, "") ;
+            startcode(sactions, &insc, sfile, "s", "void", "void", "") ;
             }
   ecchain:inec {
             *getaction(ecarray) = ++eactions ;
-            startcode(eactions, &inec, efile, "e", nopar, nopar, "") ;
+            startcode(eactions, &inec, efile, "e", "void", "void", "") ;
             }
   stcchain:instc {
             *getaction(stcarray) = ++stactions ;
index f1858e140de0e602d4b1ae2f63e4ea192c62409b..b92ce7decc486d2c4121ab4046e0231a5e32e1d0 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -49,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entity.h"
 
 /* Main program */
-int main(argc, argv)
-  int argc ;
-  char **argv ;
+int main(int argc, char **argv)
   {
     int m_token ;
 
index f8f32a38e53664606b9c8a317dd3f0c73d8f338a..ec73250e761f17fbd594ce48e5eb1602f8cc8a36 100644 (file)
@@ -215,7 +215,6 @@ ELTEXTERN int restart ELTINIT(RENTITY) ;
 #define stproto "M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END"
 #define stformal "m_string, M_START, M_END"
 #define stft "  M_WCHAR *m_string ;\n  LOGICAL M_START ;\n  LOGICAL M_END ;\n"
-#define nopar "M_NOPAR"
 
 /* Structures for generating defines for parameter values */
 ELTEXTERN M_TRIE parval ;
index 0371e0048f2a4ecb1d40fc6dada9534870e8a7de..c7d0a24d038a51f24b54208b9b152df269200883 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -49,9 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "version.h"
 
 /* Output indicated action pointer array to if.h */
-void actptrout(array, name)
-  ACTION **array;
-  char *name;
+void actptrout(ACTION **array, char *name)
   {
     int i;
 
@@ -66,23 +61,14 @@ void actptrout(array, name)
 
 
 /* Close a code file and write jump table at the end */
-#if defined(M_PROTO)
 void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto)
-#else
-void closeiffile(flag, file, count, table, proto)
-  LOGICAL flag;
-  FILE *file;
-  int count;
-  char *table;
-  char *proto;
-#endif
   {
     int i;
 
     endcode(flag, file);
     if (count) {
       fprintf(file,
-        "void (*m_%stable[])(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) = {\n",
+        "void (*m_%stable[])(%s) = {\n",
         table, proto);
       fprintf(file, "  m_%s1, /* Place holder for 1-based indexing */\n",
                     table);
@@ -94,14 +80,14 @@ void closeiffile(flag, file, count, table, proto)
       }
     else
       fprintf(file,
-        "void (*m_%stable[1])(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) ;\n",
+        "void (*m_%stable[1])(%s) ;\n",
         table, proto);
     fclose(file);
     }
 
 /* Called when the C identifier to be #define'd to a parameter value is
    scanned */
-void cvalue(M_NOPAR)
+void cvalue(void)
   {
     PARVAL *new;
 
@@ -120,18 +106,18 @@ void cvalue(M_NOPAR)
 
 /* Called after last input character is read to place closing punctuation
    at end of output files and close them */
-void done(M_NOPAR)
+void done(void)
   {
     M_ENTITY *ent;
     ACTION *actp;
     LOGICAL first;
     int i;
 
-    closeiffile(inent, entfile, codeent, "c", nopar);
+    closeiffile(inent, entfile, codeent, "c", "void");
     closeiffile(intext, tfile, tactions, "t", tproto);
     closeiffile(inpc, pfile, pactions, "p", pproto);
-    closeiffile(insc, sfile, sactions, "s", nopar);
-    closeiffile(inec, efile, eactions, "e", nopar);
+    closeiffile(insc, sfile, sactions, "s", "void");
+    closeiffile(inec, efile, eactions, "e", "void");
     closeiffile(instc, stfile, stactions, "st", stproto);
 
     endstring();
@@ -193,19 +179,13 @@ void done(M_NOPAR)
     }
 
 /* Called when finished reading a section of code from the input file */
-#if defined(M_PROTO)
 void endcode(LOGICAL flag, FILE *file)
-#else
-void endcode(flag, file)
-  LOGICAL flag;
-  FILE *file;
-#endif
   {
     if (flag) fprintf(file, "}}\n\n");
     }
 
 /* Called at the end of all initial fields in the interface definition */
-void endini(M_NOPAR)
+void endini(void)
   {
     if (finitext) 
       fputs("    putc(m_textchar, m_outfile);\n", tfile);
@@ -224,7 +204,7 @@ void endini(M_NOPAR)
 
 /* End the sign-on message */
 #include <time.h>
-void endsignon(M_NOPAR)
+void endsignon(void)
   {
     time_t storetime;
     char *p;
@@ -270,7 +250,7 @@ void endsignon(M_NOPAR)
     }
 
 /* Closes a start-string or end-string */
-void endstring(M_NOPAR)
+void endstring(void)
   {
     if (instring) {
       if (stringstart) stringstart = FALSE;
@@ -285,8 +265,7 @@ void endstring(M_NOPAR)
 
 /* Set the type of an entity and check if different than declaration in
    BUILD */
-void enttype(type)
-  int type;
+void enttype(int type)
   {
     if ((entity->type == M_PI && type == M_CODEPI) ||
         (entity->type == M_SDATA && type == M_CODESDATA));
@@ -297,7 +276,7 @@ void enttype(type)
     }
 
 /* Free storage used for a context-specification chain */
-void freechain(M_NOPAR)
+void freechain(void)
   {
     CHAIN *chainp, *dchainp;
 
@@ -312,8 +291,7 @@ void freechain(M_NOPAR)
 
 /* Returns pointer to data field in action node for current chain of
    elements */
-int *getaction(array)
-  ACTION **array;
+int *getaction(ACTION **array)
   {
     ACTION *start, *node;
     CHAIN *chainp;
@@ -348,7 +326,7 @@ int *getaction(array)
     }
 
 /* Allocate new action structure */
-ACTION *getactstruct(M_NOPAR)
+ACTION *getactstruct(void)
   {
     ACTION *new;
 
@@ -362,7 +340,7 @@ ACTION *getactstruct(M_NOPAR)
     }
 
 /* Program initialization */
-void initialize(M_NOPAR)
+void initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
@@ -426,13 +404,13 @@ fputs("#endif\n", ifh);
 
 startcode(pactions, &inpc, pfile, "p", pproto, pformal, pftype);
 startcode(tactions, &intext, tfile, "t", tproto, tformal, tftype);
-startcode(sactions, &insc, sfile, "s", nopar, nopar, "");
-startcode(eactions, &inec, efile, "e", nopar, nopar, "");
+startcode(sactions, &insc, sfile, "s", "void", "void", "");
+startcode(eactions, &inec, efile, "e", "void", "void", "");
 startcode(stactions, &instc, stfile, "st", stproto, stformal, stft);
 }
 
 /* Output definitions for strings */
-void outstring(M_NOPAR)
+void outstring(void)
   {
     int c;
 
@@ -449,8 +427,7 @@ void outstring(M_NOPAR)
     }
 
 /* Output #define's for parameter values */
-void outpval(p)
-M_TRIE *p;
+void outpval(M_TRIE *p)
 {
 M_WCHAR *q;
 
@@ -495,7 +472,7 @@ for ( ; p ; p = p->next)
 }
 
 /* Skip rest of statement after an error */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
   {
     int i;
     static int errlev = 0;
@@ -548,14 +525,8 @@ void skiptoend(M_NOPAR)
   }
 
 /* Starts processing a code segment from the input file */
-void startcode(caseno, flag, file, prefix, proto, formal, formtype)
-int caseno;
-LOGICAL *flag;
-FILE *file;
-char *prefix;
-char *proto;
-char *formal;
-char *formtype;
+void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix,
+               char *proto, char *formal, char *formtype)
 {
 CVARSTRUCT *cvarp;
 
@@ -563,21 +534,13 @@ endcode(*flag, file);
 *flag = TRUE;
 /* protoype */
 fprintf(file,
-       "void m_%s%d(\n#if defined(M_PROTO)\n  %s\n#endif\n  ) ;\n",
+       "void m_%s%d(%s);\n",
        prefix,
        caseno,
        proto);
 
 /* ANSI defines */
-fputs("#if defined(M_PROTO)\n", file);
-fprintf(file, "void m_%s%d(%s)\n", prefix, caseno, proto);
-fputs("#else\n", file);
-fprintf(file,
-       "void m_%s%d(%s)\n%s\n#endif\n  {\n", /* balance the "}" */
-       prefix,
-       caseno,
-       formal,
-       formtype);
+fprintf(file, "void m_%s%d(%s)\n  {\n", prefix, caseno, proto);
 
 for (cvarp = cvarlist ; cvarp ; cvarp = cvarp->next)
     {
@@ -603,7 +566,7 @@ fprintf(file, "{\n/* line %d \"%s\" */\n", m_line, iffile); /* balance "}" */
 }
 
 /* Begins processing a new element */
-void startelement(M_NOPAR)
+void startelement(void)
   {
     CVARSTRUCT *cvarp;
     CVARSTRUCT *discard;
@@ -624,7 +587,7 @@ void startelement(M_NOPAR)
     }
 
 /* Stores the name of a C variable read from the input file */
-void storecvar(M_NOPAR)
+void storecvar(void)
   {
     CVARSTRUCT *new;
 
@@ -639,7 +602,7 @@ void storecvar(M_NOPAR)
 /* Compares the parameter name associated with a C variable in the input
    file with the names of all parameters of the current element.  Stores
    result for later output with code segments */
-void storepname(M_NOPAR)
+void storepname(void)
   {
     int i, par;
 
@@ -657,8 +620,7 @@ void storepname(M_NOPAR)
     }
 
 /* Called when a possible parameter value to be defined is encountered */
-void value(p)
-M_WCHAR *p;
+void value(M_WCHAR *p)
 {
 char buffer[5];
 
index 7c2e61d0c0f5f5e1b9977f94cbc54cea63c32d1f..ed8d334ecbf5ac19456d1ec5cadc3f1dc424765f 100644 (file)
@@ -35,7 +35,7 @@
 #include "entext.h"
 
 /* Add an entity */
-void addent(M_NOPAR)
+void addent(void)
   {
     M_ENTITY *new ;
 
index 71f49e8923076a417d93047d5a3d5516e6cae716..fb74b475ae44265245a17a01d8fd65aafc6a1458 100644 (file)
 /* Proto.h contains function prototypes for program ELTDEF. */
 
 
-void actptrout(
-#if defined(M_PROTO)
-  ACTION **array, char *name
-#endif
-  ) ;
-
-void addent(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void closeiffile(
-#if defined(M_PROTO)
-  LOGICAL flag, FILE *file, int count, char *table, char *proto
-#endif
-  ) ;
-
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
-
-void cvalue(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-
-void done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE *file,
+void actptrout(ACTION **array, char *name);
+
+void addent(void);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void closeiffile(LOGICAL flag, FILE *file, int count, char *table, char *proto);
+
+void countdown(M_TRIE *parent, int *count);
+
+void cvalue(void);
+
+
+void done(void);
+
+void m_dumptrie(FILE *file,
   M_TRIE *xtrie,
   char *extname,
   int *count,
-  void (*proc)(M_ENTITY *)
-#endif
-  ) ;
-
-void endcode(
-#if defined(M_PROTO)
-  LOGICAL flag, FILE *file
-#endif
-  ) ;
-
-void endini(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endsignon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void endstring(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void entout(
-#if defined(M_PROTO)
-  char *fname
-#endif
-  ) ;
-
-void enttype(
-#if defined(M_PROTO)
-  int type
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text,
-  M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5
-#endif
-  ) ;
-
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void freechain(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int getachar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int *getaction(
-#if defined(M_PROTO)
-  ACTION **array
-#endif
-  ) ;
-
-ACTION *getactstruct(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void getname(
-#if defined(M_PROTO)
-  int first
-#endif
-  ) ;
-
-int gettoken(
-#if defined(M_PROTO)
-  int *c, int context
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_letter(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
-LOGICAL litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void outpval(
-#if defined(M_PROTO)
-  M_TRIE *p
-#endif
-  ) ;
-
-void outstring(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie, M_WCHAR *name
-#endif
-  ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-int scan(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void startcode(
-#if defined(M_PROTO)
-  int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
-  char *formal, char *formtype
-#endif
-  ) ;
-
-void startelement(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void storecvar(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void storepname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim
-#endif
-  ) ;
-
-void ungetachar(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-void value(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+  void (*proc)(M_ENTITY *));
+
+void endcode(LOGICAL flag, FILE *file);
+
+void endini(void);
+
+void endsignon(void);
+
+void endstring(void);
+
+void entout(char *fname);
+
+void enttype(int type);
+
+void m_error(char *text);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err5(char *text,
+  M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_exit(int status);
+
+void m_free(void *block, char *msg);
+
+void freechain(void);
+
+int getachar(void);
+
+int *getaction(ACTION **array);
+
+ACTION *getactstruct(void);
+
+void getname(int first);
+
+int gettoken(int *c, int context);
+
+void m_initctype(void);
+
+void initialize(void);
+
+LOGICAL m_letter(M_WCHAR c);
+
+LOGICAL litproc(int delim);
+
+int main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void outpval(M_TRIE *p);
+
+void outstring(void);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+int scan(void);
+
+void skiptoend(void);
+
+void startcode(int caseno, LOGICAL *flag, FILE *file, char *prefix, char *proto,
+  char *formal, char *formtype);
+
+void startelement(void);
+
+void storecvar(void);
+
+void storepname(void);
+
+void undodelim(M_WCHAR *delim);
+
+void ungetachar(int c);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+void value(M_WCHAR *p);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index 916bc1e4834ebdf433e0cd86ef5888b8b8cd1f9b..7caa367064a63d1143e3bcc5200bef6732861d90 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <stdio.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -46,8 +43,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "delim.h"
 
 /* Reads a name token */
-void getname(first)
-int first;
+void getname(int first)
 {
 M_WCHAR *p, wus;
 int c, cttype;
@@ -86,7 +82,7 @@ ungetachar(c);
 }
 
 /* Reads the next token and returns it to the main procedure */
-int scan(M_NOPAR)
+int scan(void)
 {
 int c;
 int n;
index 69ad9f394ea5e9b80a0199dcfa5060640282f646..c4a0986b5f6cce01d10ac6e7e362f0ae83e49c24 100644 (file)
@@ -32,19 +32,8 @@ Copyright (c) 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 #include <stdlib.h>
 
-
-#if defined(MSDOS)
-/* Standard startup code doesn't have room to load inherited environments
-   in some cases.  Since they're not used, don't bother.  (Using Microsoft
-   C compiler).  */
-void _setenvp(M_NOPAR);
-void _setenvp(){}
-#endif
-
 /* Write input file and line number for an error message */
-void m_dumpline(file, line)
-M_WCHAR *file;
-int line;
+void m_dumpline(M_WCHAR *file, int line)
 {
 char buffer[10];
 char *mbyte;
@@ -70,7 +59,7 @@ else
 }
 
 /* Write error message prefix */
-void m_eprefix(M_NOPAR)
+void m_eprefix(void)
 {
 m_errline("\n*****\n");
 m_dumpline(m_thisfile(), m_thisline());
@@ -78,8 +67,7 @@ m_errline(",\n");
 }
 
 /* Process error message text */
-void m_errline(p)
-char *p;
+void m_errline(char *p)
 {
 char c;
 
@@ -90,11 +78,8 @@ for ( ; *p ; p++)
     }
 }
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 /* Write error message suffix */
-void m_esuffix(M_NOPAR)
+void m_esuffix(void)
 {
 m_errline(":\n");
 m_lastchars();
@@ -106,8 +91,7 @@ if (++m_errcnt == m_errlim)
 }
 
 /* Exit procedure */
-void m_exit(status)
-int status;
+void m_exit(int status)
 {
 
 if (status)
@@ -135,8 +119,7 @@ exit(0);
 }
 
 /* Get-char procedure */
-int m_getc(m_ptr)
-void *m_ptr;
+int m_getc(void *m_ptr)
 {
 int  c;
 M_WCHAR wc;
@@ -222,8 +205,7 @@ return((int) wc);
 }
 
 /* Open SYSTEM entity procedure */
-void *m_openent(entcontent)
-M_WCHAR *entcontent;
+void *m_openent(M_WCHAR *entcontent)
 {
 FILE *open;
 char *filename;
@@ -265,13 +247,13 @@ return(NULL);
 }
 
 /* Open input file */
-void *m_openfirst(M_NOPAR)
+void *m_openfirst(void)
 {
 return((void *) inFile);
 }
 
 /* Set program options */
-void m_setoptions()
+void m_setoptions(void)
 {
 if (m_argc > 2)
     {
@@ -281,8 +263,7 @@ if (m_argc > 2)
 
 /* Process signon message text, stripping out MARKUP version number, so
    only one version number will appear */
-void m_signmsg(p)
-  char *p;
+void m_signmsg(char *p)
   {
     char *q;
     char *pCopy;
@@ -299,19 +280,17 @@ void m_signmsg(p)
     }
 
 /* All entity declarations have been processed. */
-void m_startdoc()
+void m_startdoc(void)
 {
 }
 
 /* Write debugging trace information */
-void m_trace(p)
-char *p;
+void m_trace(char *p)
 {
 }
 
 
-void m_wctrace(p)
-M_WCHAR *p;
+void m_wctrace(M_WCHAR *p)
 {
 char *mb_p;
 
index f52bfd4ecb5f7750bb21bd43abee2018130c049b..8633db31bd319b02b2e7a39c6b2739ad381c5d89 100644 (file)
 /* Function prototypes for HP Tag/TeX translator */
 
 
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-void options(
-#if defined(M_PROTO)
-  LOGICAL filelenonly
-#endif
-  ) ;
-
-void setopt(
-#if defined(M_PROTO)
-  char *string, LOGICAL filelenonly
-#endif
-  ) ;
-
-LOGICAL setvalopt(
-#if defined(M_PROTO)
-  int thisopt, char *string, LOGICAL filelenonly
-#endif
-  ) ;
-
-char *strstr(
-#if defined(M_PROTO)
-  const char *s1, const char *s2
-#endif
-  ) ;
-
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
-
-char *MakeMByteString(
-#if defined(M_PROTO)
-  const M_WCHAR *from
-#endif
-  );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
-
-void PutString(
-#if defined(M_PROTO)
-  char *string
-#endif
-  ) ;
-
-void PutWString(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-void PutWChar(
-#if defined(M_PROTO)
-  M_WCHAR wchar
-#endif
-  ) ;
-
-void SaveWChar(
-#if defined(M_PROTO)
-  M_WCHAR wchar
-#endif
-  ) ;
-
-void OpenTag(
-#if defined(M_PROTO)
-  LOGICAL hasAttributes,
-  LOGICAL newlineOK
-#endif
-  ) ;
-
-void CloseTag(
-#if defined(M_PROTO)
-  LOGICAL newlineOK
-#endif
-  ) ;
-
-void ImpliedlAttribute(
-#if defined(M_PROTO)
-  char    *name,
-  M_WCHAR *value
-#endif
-  ) ;
-
-void RequiredAttribute(
-#if defined(M_PROTO)
-  char    *name,
-  M_WCHAR *value
-#endif
-  ) ;
-
-M_WCHAR *CopyWString(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-void MakeNewElement(
-#if defined(M_PROTO)
-  ElementTypes type
-#endif
-  ) ;
-
-void DeleteElement(
-#if defined(M_PROTO)
-  ElementPtr pElement
-#endif
-  ) ;
-
-void OptimizeAndEmit(
-#if defined(M_PROTO)
-  ElementPtr pVirpage
-#endif
-  ) ;
-
-void PushCurrentElement(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void PopCurrentElement(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-char *mb_realloc(
-#if defined(M_PROTO)
-    char *ptr, long size
-#endif
-  );
-
-char *mb_malloc(
-#if defined(M_PROTO)
-    long size
-#endif
-  );
-
-void mb_free(
-#if defined(M_PROTO)
-    char **pptr
-#endif
-  );
-
-void EmitSDL(
-#if defined(M_PROTO)
-  ElementPtr pVirpage
-#endif
-  ) ;
-
-int OpenFile(
-#if defined(M_PROTO)
-  char *name, int type, int code
-#endif
-  ) ;
-
-int ReadFile(
-#if defined(M_PROTO)
-  int fd, char *name, char *buffer, int amount, int code
-#endif
-  ) ;
-
-int WriteFile(
-#if defined(M_PROTO)
-  int fd, char *name, char *buffer, int amount, int code
-#endif
-  ) ;
-
-int FileExists(
-#if defined(M_PROTO)
-  char *name
-#endif
-  ) ;
-
-void AssertFileIsReadable(
-#if defined(M_PROTO)
-  char *name, int code
-#endif
-  ) ;
-
-int FileSize(
-#if defined(M_PROTO)
-  char *name, int code
-#endif
-  ) ;
-
-void CloseFile(
-#if defined(M_PROTO)
-  int fd, char *name, int code
-#endif
-  ) ;
-
-FILE *FopenFile(
-#if defined(M_PROTO)
-  char *name, int type, int code
-#endif
-  ) ;
-
-int GetALine(
-#if defined(M_PROTO)
-  FILE *file, char *name, char *line, int max, int code
-#endif
-  ) ;
-
-int FreadFile(
-#if defined(M_PROTO)
-  FILE *file, char *name, char *buffer, int amount, int code
-#endif
-  ) ;
-
-void FwriteFile(
-#if defined(M_PROTO)
-  FILE *file, char *name, char *buffer, size_t amount, int code
-#endif
-  ) ;
-
-void FcloseFile(
-#if defined(M_PROTO)
-  FILE *file, char *name, int code
-#endif
-  ) ;
-
-int StringToUpper(
-#if defined(M_PROTO)
-  char *string
-#endif
-  ) ;
-
-void BuildIndex(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void OpenDocument(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void CloseDocument(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void UpdateTossFileName(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void SetLocale(
-#if defined(M_PROTO)
-  M_WCHAR *pLang, M_WCHAR *pCharset
-#endif
-  ) ;
+int m_lower(int c);
+
+void options(LOGICAL filelenonly);
+
+void setopt(char *string, LOGICAL filelenonly);
+
+LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly);
+
+char *strstr(const char *s1, const char *s2);
+
+int m_upper(int c);
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+void PutString(char *string);
+
+void PutWString(M_WCHAR *string);
+
+void PutWChar(M_WCHAR wchar);
+
+void SaveWChar(M_WCHAR wchar);
+
+void OpenTag(LOGICAL hasAttributes,
+  LOGICAL newlineOK);
+
+void CloseTag(LOGICAL newlineOK);
+
+void ImpliedlAttribute(char    *name,
+  M_WCHAR *value);
+
+void RequiredAttribute(char    *name,
+  M_WCHAR *value);
+
+M_WCHAR *CopyWString(M_WCHAR *string);
+
+void MakeNewElement(ElementTypes type);
+
+void DeleteElement(ElementPtr pElement);
+
+void OptimizeAndEmit(ElementPtr pVirpage);
+
+void PushCurrentElement(void);
+
+void PopCurrentElement(void);
+
+char *mb_realloc(  char *ptr, long size);
+
+char *mb_malloc(  long size);
+
+void mb_free(  char **pptr);
+
+void EmitSDL(ElementPtr pVirpage);
+
+int OpenFile(char *name, int type, int code);
+
+int ReadFile(int fd, char *name, char *buffer, int amount, int code);
+
+int WriteFile(int fd, char *name, char *buffer, int amount, int code);
+
+int FileExists(char *name);
+
+void AssertFileIsReadable(char *name, int code);
+
+int FileSize(char *name, int code);
+
+void CloseFile(int fd, char *name, int code);
+
+FILE *FopenFile(char *name, int type, int code);
+
+int GetALine(FILE *file, char *name, char *line, int max, int code);
+
+int FreadFile(FILE *file, char *name, char *buffer, int amount, int code);
+
+void FwriteFile(FILE *file, char *name, char *buffer, size_t amount, int code);
+
+void FcloseFile(FILE *file, char *name, int code);
+
+int StringToUpper(char *string);
+
+void BuildIndex(void);
+
+void OpenDocument(void);
+
+void CloseDocument(void);
+
+void UpdateTossFileName(void);
+
+void SetLocale(M_WCHAR *pLang, M_WCHAR *pCharset);
index 8630de937d16eeac5a66a342a08ca1addffc7700..e983ad9b3b5b2355e39c38df187787322b6c7319 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
-#if defined(MSDOS)
-#include <io.h>
-#include <process.h>
-#include <direct.h>
-#endif
 #include <ctype.h>
 
 #if defined(hpux) || defined(_AIX) || defined(sun) || defined(__linux__) || defined(CSRG_BASED)
index 19a01dfadc4f3f886e746e2df6ae09fc75351de4..1c63a4980d43724add036b5c77a01d0f3f4457ea 100644 (file)
 #define TAGDOTOPT "helptag.opt"
 #define DOTOPT ".opt"
 
-#if defined(M_PROTO)
 void options(LOGICAL filelenonly)
-#else
-void options(filelenonly)
-  LOGICAL filelenonly;
-#endif
 {
 int i;
 FILE *optfile;
@@ -149,13 +144,7 @@ optval = M_NULLVAL;
 
 /* Set a single option */
 /* Workonly parameter described with function options()*/
-#if defined(M_PROTO)
 void setopt(char *string, LOGICAL filelenonly)
-#else
-void setopt(string, filelenonly)
-char *string;
-LOGICAL filelenonly;
-#endif
 {
 char *p;
 int thisopt;
@@ -207,14 +196,7 @@ else switch(thisopt + 1)
 }
 
 /* Process a value for a command line option */
-#if defined(M_PROTO)
 LOGICAL setvalopt(int thisopt, char *string, LOGICAL filelenonly)
-#else
-LOGICAL setvalopt(thisopt, string, filelenonly)
-int thisopt;
-char *string;
-LOGICAL filelenonly;
-#endif
 {
 char *p;
 int i;
index a4eaa2f194ccdbd133b6602755ba6f5207574568..1f8029b9f69f870226022492a457fbc723e59f2a 100644 (file)
 #include "userinc.h"
 #include "globdec.h"
 
-#if defined(M_PROTO)
 void PutString(char *string)
-#else
-void PutString(string)
-char *string;
-#endif
 {
 fputs(string, outFile);
 }
 
-#if defined(M_PROTO)
 void PutWString(M_WCHAR *string)
-#else
-void PutWString(string)
-M_WCHAR *string;
-#endif
 {
 char *mb_string;
 
@@ -51,12 +41,7 @@ fputs(mb_string, outFile);
 m_free(mb_string, "Multi-byte string");
 }
 
-#if defined(M_PROTO)
 void PutWChar(M_WCHAR wchar)
-#else
-void PutWChar(wchar)
-M_WCHAR wchar;
-#endif
 {
 M_WCHAR wc_string[2];
 char *mb_string;
@@ -68,12 +53,7 @@ fputs(mb_string, outFile);
 m_free(mb_string, "Multi-byte string");
 }
 
-#if defined(M_PROTO)
 void SaveWChar(M_WCHAR wchar)
-#else
-void SaveWChar(wchar)
-M_WCHAR wchar;
-#endif
 {
 CDATA_el *pCdata;
 
index 0a4f9e567e5c1783c180de85083e95afd3f099ee..7c50e04f68e26006bf8085e4828927d856f52682 100644 (file)
@@ -51,12 +51,7 @@ static int  nIds;
 static char wideCharacterString[] = "wide character string";
 
 
-#if defined(M_PROTO)
 char *mb_malloc(long size)
-#else
-char *mb_malloc(size)
-long  size;
-#endif
 {
 char   *cptr;
 size_t  ssize;
@@ -74,12 +69,7 @@ return cptr;
 }
 
 
-#if defined(M_PROTO)
 void mb_free(char **pptr)
-#else
-void  *mb_free(pptr)
-char **pptr;
-#endif
 {
 
 #if DEBUG_MB_MALLOC
@@ -92,13 +82,7 @@ free((void *) *pptr);
 }
 
 
-#if defined(M_PROTO)
 char *mb_realloc(char *ptr, long size)
-#else
-char *mb_realloc(ptr, size)
-char *ptr;
-long  size;
-#endif
 {
 void   *vptr;
 size_t  ssize;
@@ -118,13 +102,7 @@ return (char *) vptr;
 }
 
 
-#if defined(M_PROTO)
 void OpenTag(LOGICAL hasAttributes, LOGICAL newlineOK)
-#else
-void OpenTag(hasAttributes, newlineOK)
-  LOGICAL hasAttributes;
-  LOGICAL newlineOK;
-#endif
 {
 PutString("<");
 PutWString(m_parent(0));
@@ -137,14 +115,7 @@ if (!hasAttributes)
 }
 
 
-#if defined(M_PROTO)
 static void OpenNamedTag(char *name, LOGICAL hasAttributes, LOGICAL newlineOK)
-#else
-static void OpenNamedTag(name, hasAttributes, newlineOK)
-  LOGICAL  hasAttributes;
-  LOGICAL  newlineOK;
-  char    *name;
-#endif
 {
 PutString("<");
 PutString(name);
@@ -157,12 +128,7 @@ if (!hasAttributes)
 }
 
 
-#if defined(M_PROTO)
 void CloseTag(LOGICAL newlineOK)
-#else
-void CloseTag(newlineOK)
-  LOGICAL newlineOK;
-#endif
 {
 char *etagc;
 
@@ -176,13 +142,7 @@ PutString(etagc);
 }
 
 
-#if defined(M_PROTO)
 static void CloseNamedTag(char *name, LOGICAL newlineOK)
-#else
-static void CloseNamedTag(name, newlineOK)
-  LOGICAL newlineOK;
-  char *name; 
-#endif
 {
 char *etagc;
 
@@ -196,13 +156,7 @@ PutString(etagc);
 }
 
 
-#if defined(M_PROTO)
 void ImpliedAttribute(char *name, M_WCHAR *value)
-#else
-void ImpliedAttribute(name, value)
-  char    *name;
-  M_WCHAR *value;
-#endif
 {
 if (value)
     {
@@ -215,13 +169,7 @@ if (value)
 }
 
 
-#if defined(M_PROTO)
 void RequiredAttribute(char *name, M_WCHAR *value)
-#else
-void RequiredAttribute(name, value)
-  char    *name;
-  M_WCHAR *value;
-#endif
 {
 M_WCHAR  null;
 M_WCHAR *wc_name;
@@ -242,12 +190,7 @@ PutString("\"");
 }
 
 
-#if defined(M_PROTO)
 M_WCHAR *CopyWString(M_WCHAR *string)
-#else
-M_WCHAR *CopyWString(string)
-  M_WCHAR *string;
-#endif
 {
 M_WCHAR *retVal;
 
@@ -259,12 +202,7 @@ return retVal;
 }
 
 
-#if defined(M_PROTO)
 void MakeNewElement(ElementTypes type)
-#else
-void MakeNewElement(type)
-  ElementTypes type;
-#endif
 {
 pCurrentElement = (ElementPtr) mb_malloc(sizeof(Element));
 memset((void *) pCurrentElement, 0, sizeof(Element));
@@ -278,12 +216,7 @@ if (type == e_cdata)
 }
 
 
-#if defined(M_PROTO)
 void DeleteElement(ElementPtr pElement)
-#else
-void DeleteElement(pElement)
-  ElementPtr pElement;
-#endif
 {
 switch (pElement->type)
     {
@@ -928,7 +861,7 @@ static ElementPtr *currentElementStack;
 static int currentElementStackSize = 0;
 static int currentElementStackTop = -1;
 
-void PushCurrentElement()
+void PushCurrentElement(void)
 {
 currentElementStackTop++;
 if (currentElementStackSize == 0)
@@ -952,12 +885,7 @@ static ElementPtr *thisElementStack;
 static int thisElementStackSize = 0;
 static int thisElementStackTop = -1;
 
-#if defined(M_PROTO)
 static void PushThisElement(ElementPtr pThis)
-#else
-static void PushThisElement(pThis)
-  ElementPtr pThis;
-#endif
 {
 thisElementStackTop++;
 if (thisElementStackSize == 0)
@@ -977,7 +905,7 @@ thisElementStack[thisElementStackTop] = pThis;
 }
 
 
-void PopCurrentElement()
+void PopCurrentElement(void)
 {
 pCurrentElement = currentElementStack[currentElementStackTop];
 if (currentElementStackTop < 0)
@@ -993,7 +921,7 @@ else
 }
 
 
-static ElementPtr PopThisElement()
+static ElementPtr PopThisElement(void)
 {
 ElementPtr pThisElement;
 
@@ -1017,12 +945,7 @@ return pThisElement;
  * the .sdl file.  These occurrences are an artifact of translation
  * and seem to be easier to get rid of here than in the first pass.
 */
-#if defined(M_PROTO)
 static void RemoveSuperfluousBlocks(ElementPtr *ppBlockOrForm)
-#else
-static void RemoveSuperfluousBlocks(ppBlockOrForm)
-  ElementPtr *ppBlockOrForm;
-#endif
 {
 ElementPtr  pElement, pFdata;
 ElementPtr *ppBack;
@@ -1061,12 +984,7 @@ while (pElement)
 }
 
 
-#if defined(M_PROTO)
 static void ReplaceFormWithBlock(ElementPtr *ppBlockOrForm)
-#else
-static void ReplaceFormWithBlock(ppBlockOrForm)
-  ElementPtr ppBlockOrForm;
-#endif
 {
 ElementPtr  pElement, pFstyle, pFrowvec, pFdata, pSubElement;
 ElementPtr *ppBack;
@@ -1250,12 +1168,7 @@ m_free(wc_quote1, wideCharacterString);
 }
 
 
-#if defined(M_PROTO)
 static void OptimizeSDL(ElementPtr *ppBlockOrForm)
-#else
-static void OptimizeSDL(ppBlockOrForm)
-  ElementPtr ppBlockOrForm;
-#endif
 {
 ReplaceFormWithBlock(ppBlockOrForm);
 RemoveSuperfluousBlocks(ppBlockOrForm);
@@ -1266,20 +1179,11 @@ RemoveSuperfluousBlocks(ppBlockOrForm);
  * update the offsets when adding the INDEX and LOIDS; also when
  * compressing the VSTRUCT
 */
-#if defined(M_PROTO)
 static void AddToLOIDS(char     *pElementName,
                        M_WCHAR  *pwcId,
                        M_WCHAR  *pwcSSI,
                        M_WCHAR  *pwcLevel,
                       long int  virpageOffset)
-#else
-static void AddToLOIDS(pElementName, pwcId, pwcSSI, pwcLevel, virpageOffset)
-char     *pElementName;
-M_WCHAR  *pwcId;
-M_WCHAR  *pwcSSI;
-M_WCHAR  *pwcLevel;
-long int  virpageOffset;
-#endif
 {
 LoidsPtr pNewId;
 
@@ -1312,14 +1216,7 @@ pLoidsEnd = pNewId;
 
 /* compress or decompress a file; return the size after (de)compression
 */
-#if defined(M_PROTO)
 static int Compress(char *fileName, char *zFileName, LOGICAL doCompress)
-#else
-int Compress(fileName, zFileName, doCompress)
-  char    *fileName;
-  char    *zFileName;
-  LOGICAL  doCompress;
-#endif
 {
        char cmd[BUFSIZ];
        int  errStatus;
@@ -1405,7 +1302,7 @@ else
 
 
 /* decompress an SDL file */
-static void DecompressSDL()
+static void DecompressSDL(void)
 {
 int           outFd, zFd;
 FILE         *inFile;
@@ -1550,14 +1447,7 @@ unlink(compZFileName);
 /* A function too lookup a TOSS element and mark it as used if the
  * lookup succeeds.
 */
-#if defined(M_PROTO)
 static void MarkUsedStyle(M_WCHAR *level, M_WCHAR *class, M_WCHAR *ssi)
-#else
-static void MarkUsedStyle(level, class, ssi)
-  M_WCHAR *level;
-  M_WCHAR *class;
-  M_WCHAR *ssi;
-#endif
 {
 ElementPtr  pThis;
 M_WCHAR    *rlevel = NULL, *rclass = NULL, *rssi = NULL;
@@ -1619,13 +1509,7 @@ while (pThis)
 /* Look for "rid" in the "pSnb" list.  Return the element if found,
  * NULL otherwise.
 */
-#if defined(M_PROTO)
 static ElementPtr LookupInSnb(ElementPtr pSnb, M_WCHAR *rid)
-#else
-static ElementPtr LookupInSnb(pSnb, rid)
-  ElementPtr pSnb;
-  M_WCHAR *rid;
-#endif
 {
 ElementPtr   pThis;
 M_WCHAR    **pId;
@@ -1694,12 +1578,7 @@ return NULL;
  * nodes in the sub-tree are either marked or all clear.  Once a clear
  * node is found, the tree is not descended further.
 */
-#if defined(M_PROTO)
 static void ClearTree(ElementPtr pRoot)
-#else
-static void ClearTree(pRoot)
-  ElementPtr pRoot;
-#endif
 {
 ElementPtr  pThis;
 static char errMess[] =
@@ -2351,12 +2230,7 @@ while (pThis)
 /* A function to mark all elements in the TOSS that have been used
  * by the document up to this point.
 */
-#if defined(M_PROTO)
 static void MarkUsedTOSS(ElementPtr pRoot)
-#else
-static void MarkUsedTOSS(pRoot)
-  ElementPtr pRoot;
-#endif
 {
 ElementPtr pParent, pSnb, pItem, pThis;
 static char errMess[] =
@@ -3374,12 +3248,7 @@ while (pThis)
 }
 
 
-#if defined(M_PROTO)
 void EmitSDL(ElementPtr pRoot)
-#else
-void EmitSDL(pRoot)
-  ElementPtr pRoot;
-#endif
 {
 ElementPtr     pThis, pThat;
 long int       virpageOffset;
@@ -4945,12 +4814,7 @@ if (doCompression)
 }
 
 
-#if defined(M_PROTO)
 void OptimizeAndEmit(ElementPtr pVirpage)
-#else
-void OptimizeAndEmit(pVirpage)
-  ElementPtr pVirpage;
-#endif
 {
 if (optimizeFlag)
     OptimizeSDL(&(pVirpage->u.u_virpage.pBlockOrForm));
@@ -4959,7 +4823,7 @@ EmitSDL(pVirpage);
 
 
 /* A routine to emit a help message and exit */
-static void Help()
+static void Help(void)
 {
 printf("The available options to %s are 'c', 'd', 'h', 'o' and 't'.\n\n",
        progName);
@@ -4979,7 +4843,7 @@ exit(0);
 
 
 /* A routine to emit a usage message and exit */
-static void Usage()
+static void Usage(void)
 {
 fprintf(stderr,
        "Usage: %s [-cdhot] <inFileName> [<outFileName>]\n",
@@ -4998,7 +4862,7 @@ exit(1);
  * A routine to pre-build all the input, output and intermediate file
  * names that we'll need.
 */
-static void MakeFileNames()
+static void MakeFileNames(void)
 {
 int   argCount;
 int   length, c;
@@ -5115,14 +4979,7 @@ strcat(vstructFileName, "vstr");
  * Of course, when using the unbuffered versions we attempt to read in
  * BUFSIZ characters at a time.
 */
-#if defined(M_PROTO)
 int OpenFile(char *name, int type, int code)
-#else
-int OpenFile(name, type, code)
-  char *name;
-  int type;
-  int code;
-#endif
 {
 int fd;
 int oflag, mode;
@@ -5157,16 +5014,7 @@ return fd;
 }
 
 
-#if defined(M_PROTO)
 int ReadFile(int fd, char *name, char *buffer, int amount, int code)
-#else
-int ReadFile(fd, name, buffer, amount, code)
-  int fd;
-  char *name;
-  char *buffer;
-  int amount;
-  int code;
-#endif
 {
 int length;
 
@@ -5185,16 +5033,7 @@ return length;
 }
 
 
-#if defined(M_PROTO)
 int WriteFile(int fd, char *name, char *buffer, int amount, int code)
-#else
-int WriteFile(fd, name, buffer, amount, code)
-int fd;
-  char *name;
-  char *buffer;
-  int amount;
-  int code;
-#endif
 {
 int length;
 
@@ -5213,25 +5052,14 @@ return length;
 }
 
 
-#if defined(M_PROTO)
 int FileExists(char *name)
-#else
-int FileExists(name)
-  char *name;
-#endif
 {
 if (access(name, F_OK) == 0) return 1;
 return 0;
 }
 
 
-#if defined(M_PROTO)
 void AssertFileIsReadable(char *name, int code)
-#else
-void AssertFileIsReadable(name, code)
-  char *name;
-  int code;
-#endif
 {
 if (access(name, R_OK) == -1)
     {
@@ -5250,13 +5078,7 @@ if (access(name, R_OK) == -1)
 }
 
 
-#if defined(M_PROTO)
 int FileSize(char *name, int code)
-#else
-int FileSize(name, code)
-  char *name;
-  int code;
-#endif
 {
 struct stat buf;
 
@@ -5279,14 +5101,7 @@ return buf.st_size;
 }
 
 
-#if defined(M_PROTO)
 void CloseFile(int fd, char *name, int code)
-#else
-void CloseFile(fd, name, code)
-  int fd;
-  char *name;
-  int code;
-#endif
 {
 if (close(fd) == -1)
     {
@@ -5302,14 +5117,7 @@ if (close(fd) == -1)
 }
 
 
-#if defined(M_PROTO)
 FILE * FopenFile(char *name, int type, int code)
-#else
-FILE * FopenFile(name, type, code)
-  char *name;
-  int type;
-  int code;
-#endif
 {
 FILE *file;
 char *mode;
@@ -5363,16 +5171,7 @@ return file;
 }
 
 
-#if defined(M_PROTO)
 int GetALine(FILE *file, char *name, char *line, int max, int code)
-#else
-int GetALine(file, name, line, max, code)
-  FILE *file;
-  char *name;
-  char *line;
-  int max;
-  int code;
-#endif
 {
 char *pc;
 int   length;
@@ -5425,16 +5224,7 @@ return length;
 }
 
 
-#if defined(M_PROTO)
 int FreadFile(FILE *file, char *name, char *buffer, int amount, int code)
-#else
-int FreadFile(file, name, buffer, amount, code)
-  FILE *file;
-  char *name;
-  char *buffer;
-  int amount;
-  int code;
-#endif
 {
 int length;
 
@@ -5453,16 +5243,7 @@ return length;
 }
 
 
-#if defined(M_PROTO)
 void FwriteFile(FILE *file, char *name, char *buffer, size_t amount, int code)
-#else
-void FwriteFile(file, name, buffer, amount, code)
-  FILE *file;
-  char *name;
-  char *buffer;
-  size_t amount;
-  int code;
-#endif
 {
 if (fwrite(buffer, 1, amount, file) != amount)
     {
@@ -5478,14 +5259,7 @@ if (fwrite(buffer, 1, amount, file) != amount)
 }
 
 
-#if defined(M_PROTO)
 void FcloseFile(FILE *file, char *name, int code)
-#else
-void FcloseFile(file, name, code)
-  FILE *file;
-  char *name;
-  int code;
-#endif
 {
 if (fclose(file) != 0)
     {
@@ -5501,12 +5275,7 @@ if (fclose(file) != 0)
 }
 
 
-#if defined(M_PROTO)
 int StringToUpper(char *string)
-#else
-int StringToUpper(string)
-  char *string;
-#endif
 {
 char *pc, c;
 
@@ -5523,7 +5292,7 @@ return pc - string;
 /*
  * A routine to build the index from the .idx file (if any).
 */
-void BuildIndex()
+void BuildIndex(void)
 {
 char  buffer[BUFSIZ+1], *pFrom, *pTo, *pRestart, thisChar;
 int   length, size;
@@ -5935,7 +5704,7 @@ FcloseFile(sdlIdxFile, sortedIdxFileName, xxx);
 }
 
 
-static void HandleSNB()
+static void HandleSNB(void)
 {
 int   oldOffset, newOffset;
 FILE *snbFile;
@@ -6006,7 +5775,7 @@ CloseFile(outFd, tempFileName, xxx);
 /* calculate the size of the TOSS if only the used elements are
  * emitted
 */
-static int RestrictedTossSize()
+static int RestrictedTossSize(void)
 {
 char       buffer[32];
 ElementPtr pThis;
@@ -6316,7 +6085,7 @@ return size;
 /* iterate over the LOIDS computing the offsets as we remove the old
  * LOIDS and INDEX and replace them with the new
 */ 
-void IterateLoids()
+void IterateLoids(void)
 {
 int       replacing, length, incr, tmp;
 int       loidsSize;
@@ -6392,7 +6161,7 @@ while (incr)
  * the amount of padding needed in between the vstruct and the first
  * virpage to make everything work
 */
-static void CompressVstruct()
+static void CompressVstruct(void)
 {
 #define COMPRESS_PAD_LENGTH 10
 char      buffer[BUFSIZ], zTemp[4];
@@ -6535,7 +6304,7 @@ while (pad >= 0)
 
 
 /* insert the new loids and index then close the output file */
-static void IncorporateVstructElements()
+static void IncorporateVstructElements(void)
 {
 char      buffer[BUFSIZ];
 int       length, delta;
@@ -6691,18 +6460,10 @@ unlink(tempFileName);
 /* Cyclent.c contains procedure m_cyclent(), callable by interface
    designers, to cycle through all defined entities, returning information
    about them */
-#if defined(M_PROTO)
 static M_WCHAR *CycleEnt(LOGICAL init,
                         unsigned char *type,
                         M_WCHAR ***content,
                         unsigned char *wheredef)
-#else
-static M_WCHAR *m_CycleEnt(init, type, content, wheredef)
-  LOGICAL init ;
-  unsigned char *type ;
-  M_WCHAR ***content ;
-  unsigned char *wheredef ;
-#endif
 {
 static M_TRIE *current ;
 static M_TRIE *ancestor[M_NAMELEN + 1] ;
@@ -6749,7 +6510,7 @@ return(name) ;
  * file and its name is "TOSSFILE", change its content to be the
  * current file name base plus ".tss".
 */
-void UpdateTossFileName()
+void UpdateTossFileName(void)
 {
 unsigned char type;
 unsigned char wheredef;
@@ -6782,13 +6543,7 @@ while (name = CycleEnt(FALSE, &type, &content, &wheredef));
  *                       standard versions.
 */
 void
-#if defined(M_PROTO)
 SetLocale(M_WCHAR *pLang, M_WCHAR *pCharset)
-#else
-SetLocale(pLang, pCharset)
-M_WCHAR *pLang;
-M_WCHAR *pCharset;
-#endif
 {
 const char  cString[] = "C";
 _DtXlateDb  myDb = NULL;
@@ -6897,7 +6652,7 @@ _DtLcxCloseDb(&myDb);
 /* a routine to do all the things we want to do before actually
  * parsing the SDL document.
 */
-void OpenDocument()
+void OpenDocument(void)
 {
 MakeFileNames();
 m_errfile = FopenFile(errFileName, O_WRONLY|O_APPEND, xxx);
@@ -6919,7 +6674,7 @@ outFile   = FopenFile(vstructFileName, O_WRONLY, xxx);
 /* a routine to do all those things we want to do after parsing the
  * document such as doing the fixups in the vstruct
 */
-void CloseDocument()
+void CloseDocument(void)
 {
 FcloseFile(outFile, tempFileName, xxx);
 BuildIndex();
index 949c5fe795b48646444646234818e4e3878ebdbe..cbf1f50e0cf7ff92c0a0063642df5c10370b4f09 100644 (file)
@@ -32,9 +32,6 @@ in the interface definition.*/
 
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include <string.h>
 #include "basic.h"
 #include "trie.h"
@@ -47,8 +44,7 @@ in the interface definition.*/
 #include "signon.h"
 
 /* When an explicit or implied end-tag occurs */
-void m_endaction(m_elt)
-  M_ELEMENT m_elt;
+void m_endaction(M_ELEMENT m_elt)
   {
     M_ELEMENT m_action;
     char buffer[2*MAXD+M_NAMELEN+1];
@@ -79,9 +75,7 @@ void m_endaction(m_elt)
     }
 
 /* Find appropriate action according to current stack */
-int m_findact(elt, array)
-  M_ELEMENT elt;
-  int *array;
+int m_findact(M_ELEMENT elt, int *array)
   {
     int chainlen = 0;
     int index;
@@ -107,17 +101,7 @@ int m_findact(elt, array)
     }
 
 /* Recursive procedure called by findact() to search m_action */
-#if defined(M_PROTO)
 void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, LOGICAL wild)
-#else
-void m_findchain(stackptr, start, chainin, chainout, index, wild)
-  M_PARSE *stackptr;
-  int start;
-  int chainin;
-  int *chainout;
-  int *index;
-  LOGICAL wild;
-#endif
 {
     int node;
     M_PARSE *stackp;
@@ -147,7 +131,7 @@ void m_findchain(stackptr, start, chainin, chainout, index, wild)
 /* Process global end string.  In separate procedure to keep all references
    to if.h in one source file and minimize recompilation if interface
    changes. */
-void m_globes(M_NOPAR)
+void m_globes(void)
 {
 M_WCHAR *wc_string;
 
@@ -159,7 +143,7 @@ m_free(wc_string,"wide character string");
 /* Process global start string.  In separate procedure to keep all references
    to if.h in one source file and minimize recompilation if interface
    changes. */
-void m_globss(M_NOPAR)
+void m_globss(void)
 {
 M_WCHAR *wc_string;
 
@@ -169,8 +153,7 @@ m_free(wc_string,"wide character string");
 }    
 
 /* When an explicit or implied start-tag occurs */
-void m_strtaction(m_elt)
-  M_ELEMENT m_elt;
+void m_strtaction(M_ELEMENT m_elt)
   {
     int m_par, m_i;
     M_WCHAR *m_p;
@@ -241,14 +224,7 @@ void m_strtaction(m_elt)
     }
 
 /* Output a start-string or end-string */
-#if defined(M_PROTO)
 void m_textout(char *format, LOGICAL start, LOGICAL end)
-#else
-void m_textout(format, start, end)
-  char *format;
-  LOGICAL start;
-  LOGICAL end;
-#endif
 {
 M_WCHAR name[M_NAMELEN + 1];
 int i, par;
index c057ce7f92947acd4355de6e15d65db089af0a53..7921725ca84a40dd0c0b11784801b7aa72254037 100644 (file)
@@ -28,8 +28,7 @@
 #include "userinc.h"
 #include "globdec.h"
 
-void m_closent(m_ptr)
-  void *m_ptr ;
+void m_closent(void *m_ptr)
   {
     fclose((FILE *) m_ptr) ;
     }
index 681a40a820097107cd8fda3aded031f3b4163a59..4b73888ac42e49b4a4215d9f23ebf8297ca7fb0e 100644 (file)
@@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entfile.c"
 
 /* When a reference to a CODE entity is encountered */
-void m_codeent(m_ent)
-  int m_ent ;
+void m_codeent(int m_ent)
   {
     (*m_ctable[m_ent])() ;
   }
index 84c527a781881680f7a2e1cd194ca6425dc100de..0852fabce58dca0afbe49c4fb900218b2f95eae4 100644 (file)
 #include "parser.h"
 #include "entext.h"
 
-#if defined(M_PROTO)
 M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, unsigned char *wheredef)
-#else
-M_WCHAR *m_cyclent(init, type, content, wheredef)
-  LOGICAL init ;
-  unsigned char *type ;
-  M_WCHAR **content ;
-  unsigned char *wheredef ;
-#endif
 {
     static M_TRIE *current ;
     static M_TRIE *ancestor[M_NAMELEN + 1] ;
index 00ebd21f1905f0400758d231901df1fc1de3facc..f0fe2f419477565d3b1d5b0b314f31818acb48be 100644 (file)
@@ -29,9 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 
 /* Displays current element after some error messages */
-void m_dispcurelt(file, line)
-M_WCHAR *file ;
-int line ;
+void m_dispcurelt(M_WCHAR *file, int line)
 {
 char *mb_parent;
 
index 3902fc80a8c6278968f5831ae3e5232d22c2af75..07e347fa70c7714ac3a782028acd8493d8797b46 100644 (file)
@@ -37,8 +37,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 
 /* Perform the m_action-th end-code in the interface */
-void m_endcase(m_action)
-  int m_action ;
+void m_endcase(int m_action)
   {
     (*m_etable[m_action])() ;
     }
index bd151aa21e8a755edb284122a9117a8d64aa9dee..041eb03d463c21990b68a53e368f805aee1897c3 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "context.h"
@@ -43,13 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "entext.h"
 
 /* Process the name in a usemap delaration */
-#if defined(M_PROTO)
 void m_ckmap(M_WCHAR *name, LOGICAL useoradd)
-#else
-void m_ckmap(name, useoradd)
-  M_WCHAR *name ;
-  LOGICAL useoradd ;
-#endif
 {
     int mapid ;
 
@@ -61,8 +52,7 @@ void m_ckmap(name, useoradd)
 /* Check type specified in entity declaration for previously defined
    entity.  Testing to see if the new declaration is identical to the
    original one. */
-void m_eduptype(type)
-  int type ;
+void m_eduptype(int type)
   {
     if ((int) m_entity->type != type) {
       m_err1("Redefinition of entity %s ignored", m_entity->name) ;
@@ -72,8 +62,7 @@ void m_eduptype(type)
     }
 
 /* Tests if an entity is too long */
-void m_longent(context)
-  int context ;
+void m_longent(int context)
   {
     if (m_entclen >= M_LITLEN) {
       m_curcon = context ;
@@ -83,8 +72,7 @@ void m_longent(context)
     }
 
 /* Enters an entity name into the entity name tree */
-void m_ntrent(p)
-  M_WCHAR *p ;
+void m_ntrent(M_WCHAR *p)
   {
     M_ENTITY *new ;
 
index 10a173f95b4ab957b7a0eb524d2ac37ec22af194..7383b2c4684eb2b156ef80177865579d9de95c2f 100644 (file)
@@ -29,7 +29,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "globdec.h"
 
 /* Write error message prefix */
-void m_eprefix(M_NOPAR)
+void m_eprefix(void)
   {
     m_errline("\n*****\n") ;
     }
index 60746d68789756fc448c5c8b993b78b49c5996fa..17ddf2cbadb7d32d3b32aee990977e5d4445dd28 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -43,8 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 
 /* Issue error message (no arguments) */
-void m_error(text)
-  char *text;
+void m_error(char *text)
   {
     m_startmsg();
     m_errline(text);
@@ -52,15 +48,9 @@ void m_error(text)
   }
 
 /* Issue error message (one argument) */
-#if defined(M_PROTO)
 void m_err1(
   const char    *text,
   const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
-  char    *text;
-  M_WCHAR *arg;
-#endif
 {
 char *buffer, *mb_arg;
 
@@ -77,15 +67,9 @@ m_esuffix();
 }
 
 
-#if defined(M_PROTO)
 void m_mberr1(
   const char *text,
   const char *arg)
-#else
-void m_err1(text, arg)
-  char    *text;
-  char *arg;
-#endif
   {
   M_WCHAR *wc_arg;
 
@@ -95,17 +79,10 @@ void m_err1(text, arg)
   }
 
 /* Issue error message (two arguments) */
-#if defined(M_PROTO)
 void m_err2(
   const char    *text,
   const M_WCHAR *arg1,
   const M_WCHAR *arg2)
-#else
-void m_err2(text, arg1, arg2)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-#endif
   {
     char *buffer;
     char *mb_arg1,*mb_arg2;
@@ -126,19 +103,11 @@ void m_err2(text, arg1, arg2)
   }
 
 /* Issue error message (three arguments) */
-#if defined(M_PROTO)
 void m_err3(
   char    *text,
   M_WCHAR *arg1,
   M_WCHAR *arg2,
   M_WCHAR *arg3)
-#else
-void m_err3(text, arg1, arg2, arg3)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3;
@@ -164,21 +133,12 @@ void m_err3(text, arg1, arg2, arg3)
   }
 
 /* Issue error message (four arguments) */
-#if defined(M_PROTO)
 void m_err4(
   char    *text,
   M_WCHAR *arg1,
   M_WCHAR *arg2,
   M_WCHAR *arg3,
   M_WCHAR *arg4)
-#else
-void m_err4(text, arg1, arg2, arg3, arg4)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2,*mb_arg3,*mb_arg4;
@@ -207,7 +167,6 @@ void m_err4(text, arg1, arg2, arg3, arg4)
   }
 
 /* Issue error message (five arguments) */
-#if defined(M_PROTO)
 void m_err5(
   char    *text,
   M_WCHAR *arg1,
@@ -215,15 +174,6 @@ void m_err5(
   M_WCHAR *arg3,
   M_WCHAR *arg4,
   M_WCHAR *arg5)
-#else
-void m_err5(text, arg1, arg2, arg3, arg4, arg5)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
@@ -261,7 +211,6 @@ void m_err5(text, arg1, arg2, arg3, arg4, arg5)
   }
 
 /* Issue error message (six arguments) */
-#if defined(M_PROTO)
 void m_err6(
   char    *text,
   M_WCHAR *arg1,
@@ -270,16 +219,6 @@ void m_err6(
   M_WCHAR *arg4,
   M_WCHAR *arg5,
   M_WCHAR *arg6)
-#else
-void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-  M_WCHAR *arg6;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6;
@@ -321,7 +260,6 @@ void m_err6(text, arg1, arg2, arg3, arg4, arg5, arg6)
   }
 
 /* Issue error message (seven arguments) */
-#if defined(M_PROTO)
 void m_err7(
   char    *text,
   M_WCHAR *arg1,
@@ -331,17 +269,6 @@ void m_err7(
   M_WCHAR *arg5,
   M_WCHAR *arg6,
   M_WCHAR *arg7)
-#else
-void m_err7(text, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
-  char    *text;
-  M_WCHAR *arg1;
-  M_WCHAR *arg2;
-  M_WCHAR *arg3;
-  M_WCHAR *arg4;
-  M_WCHAR *arg5;
-  M_WCHAR *arg6;
-  M_WCHAR *arg7;
-#endif
   {
     char *buffer;
     char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5, *mb_arg6, *mb_arg7;
@@ -388,9 +315,7 @@ void m_err7(text, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
 
 /* Getline.c returns the name of the current input file and the number
    of the current line */
-void m_getline(file, line)
-  M_WCHAR **file;
-  int *line;
+void m_getline(M_WCHAR **file, int *line)
   {
     int i;
 
@@ -405,7 +330,7 @@ void m_getline(file, line)
 
 /* Dump last characters read from input stream to give context to
    an error message */
-void m_lastchars(M_NOPAR)
+void m_lastchars(void)
 {
 int i;
 M_WCHAR buffer[2];
@@ -454,14 +379,14 @@ if ((m_svlncnt[m_sysecnt] &&
 }
 
 /* Display information about the current element */
-void m_showcurelt(M_NOPAR)
+void m_showcurelt(void)
   {
     if (m_stacktop->oldtop)
       m_dispcurelt(m_stacktop->file, m_stacktop->line);
     }    
 
 /* Start an error message */
-void m_startmsg(M_NOPAR)
+void m_startmsg(void)
   {
     m_eprefix();
     m_errexit = TRUE;
@@ -469,7 +394,7 @@ void m_startmsg(M_NOPAR)
 
 /* Return the name of the current input file (most recently opened, but
    unclosed SYSTEM entity) */
-M_WCHAR *m_thisfile(M_NOPAR)
+M_WCHAR *m_thisfile(void)
   {
     int i;
 
@@ -482,7 +407,7 @@ M_WCHAR *m_thisfile(M_NOPAR)
     }
 
 /* Return the line number in the current input file */
-int m_thisline(M_NOPAR)
+int m_thisline(void)
   {
     return(m_line[m_sysecnt]);
     }
index 50fca824a87137d0b708942db62d4ae10fedae5a..9b71a516e9cb3ba6cdf9b9dfcc655e2887ef17b4 100644 (file)
@@ -27,12 +27,9 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 #include "userinc.h"
 #include "globdec.h"
-#if defined(MSDOS)
-#include <process.h>
-#endif
 
 /* Write error message suffix */
-void m_esuffix(M_NOPAR)
+void m_esuffix(void)
   {
     m_errline("\n") ;
     m_dumpline(m_thisfile(), m_thisline()) ;
index 532097e0a792475f99d47a5646d5dd5c03296882..215dc6d9840d530c69404e4bbf1acaee3163e0fe 100644 (file)
@@ -27,9 +27,6 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 #include "userinc.h"
 #include "globdec.h"
-#if defined(MSDOS)
-#include <process.h>
-#endif
 
 /* Default version of PARSER m_exit().  Allows interface control if
    internal error causes PARSER to halt. */
index 9614cca980c28c78c242a6679bf807f557b9edf6..59dd954d0403c98c2cd3c58edf34bf184d096684 100644 (file)
    Returns 0 if elt is not a valid element name, if param is specified
    but is not a valid parameter name, or if param is NULL and value is
    not a valid value of any of elt's parameters. */
-#if defined(M_PROTO)
 int m_findpar( const char *elt , const char *param , const M_WCHAR *value )
-#else
-int m_findpar(elt, param, value)
-char *elt ;
-char *param ;
-M_WCHAR *value ;
-#endif /* M_PROTO */
 {
 M_ELEMENT eltid ;
 int par ;
index 587714663038e58e3dc05bcf36ce4ff914e1219b..5575d77da487afcf6542d99b01d041cf06e80810 100644 (file)
@@ -34,7 +34,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "parser.h"
 #include "signonx.h"
 
-void m_getsignon(M_NOPAR)
+void m_getsignon(void)
   {
     m_errline(m_signon) ;
     }
index 430272fbd2ea9eeb76f9133d574a7c30346b91ef..3887c7b42090e9fec5624fdef589165b27e5520d 100644 (file)
@@ -39,7 +39,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "parser.h"
 
 /* M_etcomplete is called when a complete end-tag has been read */
-void m_etcomplete(M_NOPAR)
+void m_etcomplete(void)
   {
     if (! m_scanel) {
       M_WCHAR *wc_etago, *wc_tagc;
@@ -64,8 +64,7 @@ void m_etcomplete(M_NOPAR)
 
 /* M_frcend is called after a syntax error to end element VAL even
    if more content for that element is expected */
-void m_frcend(val)
-  M_ELEMENT val ;
+void m_frcend(M_ELEMENT val)
   {
     M_PARSE *stackptr ;
     M_ELEMENT poppedval ;
@@ -91,7 +90,7 @@ void m_frcend(val)
 
 /* M_frcstart is called to force the start of an element when that element
    cannot legally occur in the current context but does appear in the text*/
-void m_frcstart(M_NOPAR)
+void m_frcstart(void)
   {
     m_push(m_scanel, m_element[m_scanel - 1].start, m_scannet) ;
     if (m_scannet) m_netlevel++ ;
@@ -108,7 +107,7 @@ void m_frcstart(M_NOPAR)
 
 /* M_holdproc processes a RE that was saved to test if it was the last
    RE in an element's content */
-void m_holdproc(M_NOPAR)
+void m_holdproc(void)
   {
     if (m_stacktop->holdre) {
       m_stacktop->holdre = FALSE ;
@@ -122,7 +121,7 @@ void m_holdproc(M_NOPAR)
     }
 
 /* M_stcomplete is called when a complete start tag has been recognized */
-void m_stcomplete(M_NOPAR)
+void m_stcomplete(void)
   {
     if (! m_scanel) return ;
     if (m_strtproc(m_scanel))
index 0d861585df83ecf9a82721b59bc4be99dae0cc3d..1846ef39ae3fb29e01387b77efcf2e6727283d26 100644 (file)
@@ -33,8 +33,7 @@
 
 /* Procedure callable by interface designer.  Returns number of occurrences
    of element on parse stack */
-int m_level(elt)
-  M_WCHAR *elt ;
+int m_level(M_WCHAR *elt)
   {
     int i = 0 ;
     M_PARSE *stackptr ;
@@ -48,8 +47,7 @@ int m_level(elt)
     }
 
 
-int m_mblevel(elt)
-  char *elt ;
+int m_mblevel(char *elt)
   {
   int     retval;
   M_WCHAR *wc_elt;
index 761a64d03fa4b7eefb855a69cbb0f44b3829d902..fd47220befd5b9dd9f52e22bd1575cbce4918f5f 100644 (file)
@@ -38,11 +38,8 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "parser.h"
 #include "entext.h"
 
-LOGICAL m_lookent(name, type, content, wheredef)
-  M_WCHAR *name ;
-  unsigned char *type ;
-  M_WCHAR **content ;
-  unsigned char *wheredef ;
+LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content,
+                  unsigned char *wheredef)
   {
     M_ENTITY *entity ;
 
index 5bfa4842ab921fbe689bab068d388d2bde527114..1a0c1eb5789c563d99d59b14669386b788a5c24c 100644 (file)
@@ -31,9 +31,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 #include <stdio.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -43,7 +40,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* M_expecting reports to the user the possible valid content at a particular
    state in the parse of the document */
-void m_expecting(M_NOPAR)
+void m_expecting(void)
   {
     LOGICAL expstart = TRUE ;
     M_PARSE *stackptr ;
@@ -102,11 +99,7 @@ void m_expecting(M_NOPAR)
 
 /* Recursive procedure first called from expecting() to display
    names of elements reachable from a particular node */
-void m_expexpand(expstart, node, required, data)
-  LOGICAL *expstart ;
-  M_STATE node ;
-  LOGICAL *required ;
-  LOGICAL *data ;
+void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data)
   {
     M_ARC parc ;
     M_ANDGROUP pand ;
@@ -128,10 +121,7 @@ void m_expexpand(expstart, node, required, data)
     }
 
 /* M_expline writes one line for m_expecting() */
-void m_expline(expstart, data, label)
-  LOGICAL *expstart ;
-  LOGICAL *data ;
-  M_ELEMENT label ;
+void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label)
   {
     char buffer[M_NAMELEN + 2*MAXD + 1] ;
 
@@ -168,9 +158,7 @@ void m_expline(expstart, data, label)
 
 /* M_exptend is called from m_expecting to inform the user after an
    error if an end tag is permitted */
-void m_exptend(expstart, stackptr)
-  LOGICAL *expstart ;
-  M_PARSE *stackptr ;
+void m_exptend(LOGICAL *expstart, M_PARSE *stackptr)
   {
     char buffer[M_NAMELEN + 2*MAXD + 1] ;
 
@@ -219,9 +207,7 @@ void m_exptend(expstart, stackptr)
    element, 1 if character data is expected, and 0 (FALSE) if there is
    no unique element. 
 */
-M_ELEMENT m_findunique(from, newleft)
-  M_STATE from ;
-  int *newleft ;
+M_ELEMENT m_findunique(M_STATE from, int *newleft)
   {
     M_ARC parc ;
     M_ELEMENT cr = 0, minim = 0;
@@ -276,7 +262,7 @@ M_ELEMENT m_findunique(from, newleft)
 
 /* M_nullendtag is called when a null end tag is encountered; i.e., at the
    end of a short element */
-void m_nullendtag(M_NOPAR)
+void m_nullendtag(void)
   {
     LOGICAL foundnet ;
 
@@ -307,7 +293,7 @@ void m_nullendtag(M_NOPAR)
 
 /* Tests to see if an end tag may have been omitted at this point in the
    parse.*/
-LOGICAL m_omitend(M_NOPAR)
+LOGICAL m_omitend(void)
   {
     M_ANDGROUP pand ;
     M_OPENFSA *fsastack ;
@@ -342,7 +328,7 @@ LOGICAL m_omitend(M_NOPAR)
 
 /* Tests to see if a start tag may have been omitted at this point of
    the parse.  If so, saves the element name in the MINVAL array*/
-LOGICAL m_omitstart()
+LOGICAL m_omitstart(void)
   {
     M_ELEMENT c = M_NULLVAL ;
 
@@ -423,4 +409,3 @@ LOGICAL m_omitstart()
     m_nextms = &(*m_nextms)->next ;
     return(TRUE) ;
     }
-
index 9a734657b01edb467dec6eeb68be0aeffc453bc8..3bd2331bde440e38f77d31c43dbfbbe0525abb18 100644 (file)
@@ -28,7 +28,7 @@
 #include "userinc.h"
 #include "globdec.h"
 
-void *m_openfirst(M_NOPAR)
+void *m_openfirst(void)
   {
     return((void *) stdin) ;
     }
index 9045345bf969fd6f5d2485911f37bb1d25c8d0db..3c8f8ac12640a56de8e666c13d40f40fc729f267 100644 (file)
@@ -33,8 +33,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 #include "parser.h"
 
 /* Get program options from a string */
-void m_optstring(p)
-  char *p ;
+void m_optstring(char *p)
   {
     if (strchr(p, 'a')) m_malftrace = TRUE ;
     if (strchr(p, 'c')) m_chtrace = TRUE ;
index db443dce37a330219885279635cb2ee2cfa5194a..bc4a4ed23bd99c9bc41476b289c7c9d3518a59a3 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "delim.h"
@@ -45,8 +42,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* Process the value for the parameter whose index number was previously
    saved in m_ppsave */
-void m_attval(string)
-  M_WCHAR *string ;
+void m_attval(M_WCHAR *string)
   {
     const M_WCHAR *p ;
 
@@ -68,8 +64,7 @@ void m_attval(string)
 
 /* Process a string that is a parameter value not prefixed by the parameter
    name and value indicator */
-LOGICAL m_attvonly(string)
-  M_WCHAR *string ;
+LOGICAL m_attvonly(M_WCHAR *string)
   {
     const M_WCHAR *p ;
     int par, i ;
@@ -117,7 +112,7 @@ LOGICAL m_attvonly(string)
 
 /* Check a name previously saved in m_saveatt to see if it is the name of
    a valid parameter for the current start tag */
-void m_findatt(M_NOPAR)
+void m_findatt(void)
   {
     int par, i ;
 
@@ -155,8 +150,7 @@ void m_findatt(M_NOPAR)
     }
 
 /* Free the parameter storage associated with an element on the parse stack */
-void m_freeparam(stackelt)
-  M_PARSE *stackelt ;
+void m_freeparam(M_PARSE *stackelt)
   {
     int i ;
     int par ;
@@ -176,9 +170,7 @@ void m_freeparam(stackelt)
 /* Force a parameter value to uppercase, if appropriate for its type.
    Also, if list-valued attribute, remove leading and trailing spaces,
    and condense white-space sequences to a single blank*/
-void m_parupper(par, string)
-  int par ;
-  M_WCHAR *string ;
+void m_parupper(int par, M_WCHAR *string)
   {
     M_WCHAR *p ;
     M_WCHAR *q ;
@@ -220,7 +212,7 @@ void m_parupper(par, string)
 
 /* Set all parameters to their default values for an element included by
    tag minimization */
-void m_stkdefaultparams(M_NOPAR)
+void m_stkdefaultparams(void)
   {
     int i, par = 0 ;
 
@@ -236,11 +228,7 @@ void m_stkdefaultparams(M_NOPAR)
     }
 
 /* Stack one default parameter */
-void m_stkonedef(par, scanel, poccur, i)
-  int par ;
-  M_ELEMENT scanel ;
-  M_WCHAR **poccur ;
-  int i ;
+void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i)
   {
     if (m_parameter[par - 1].deftype == M_REQUIRED ||
         (m_parameter[par - 1].deftype == M_CURRENT &&
@@ -272,7 +260,7 @@ void m_stkonedef(par, scanel, poccur, i)
     }
 
 /* Stack parameter values */
-void m_stkparams(M_NOPAR)
+void m_stkparams(void)
   {
     int i, par ;
 
@@ -290,13 +278,7 @@ void m_stkparams(M_NOPAR)
     }
 
 /* Update the default of a parameter whose default is #CURRENT */
-#if defined(M_PROTO)
 void m_updatedefault(const int par , const M_WCHAR *string )
-#else
-void m_updatedefault(par, string)
-  int par ;
-  M_WCHAR *string ;
-#endif /* M_PROTO */
   {
     if (m_parameter[par - 1].deftype != M_CURRENT &&
         m_parameter[par - 1].deftype != M_CHANGEDCUR) return ;
@@ -322,8 +304,7 @@ void m_updatedefault(par, string)
 
 /* Check to see if a string that occurs after the element name in a start
    tag is a valid parameter name or value; if not, assume tag is ended */
-LOGICAL m_validinpar(string)
-  M_WCHAR *string ;
+LOGICAL m_validinpar(M_WCHAR *string)
   {
     int par ;
     M_WCHAR *p ;
index 800143bd5d2a280d488d8fbf5173c5f06fa9aa56..2a7234da21de2e75f1117db02b35f65caabebc81 100644 (file)
@@ -34,8 +34,7 @@
 /* Procedure callable by interface designers.  Returns pointer to name
    of nth level parent of current element (0 is self, 1 is parent, 2
    is grandparent, etc.) */
-M_WCHAR *m_parent(n)
-  int n ;
+M_WCHAR *m_parent(int n)
   {
     M_PARSE *stackptr ;
 
index fcfb86ab446f025be6bcd6e7e3ed6f29aebaf2d6..0c915da226bcf4733de15f8aa9ac81b32042bc26 100644 (file)
@@ -36,9 +36,7 @@
 #include "entext.h"
 
 /* Main procedure */
-void main(argc, argv)
-  int argc ;
-  char **argv ;
+void main(int argc, char **argv)
   {
     static char parserr[] = "\nM_token=%d, m_prevcon=%d, m_scanval=%d\n" ;
     static char sopt[] =
index 5636b1485b12d0debfc7fbd5509c4c2741ca6908..821dcb3678b27a07500319d59cc3a27253c95f8a 100644 (file)
@@ -345,8 +345,6 @@ M_PAREXTERN int m_wsused ;
 /* Temporary pointers to parameter values.  Used while scanning start tag
    before element is placed on parse stack.*/
 M_PAREXTERN
-#if defined M_PROTO
-#endif
 M_WCHAR *m_poccur[
 #if defined(M_PARDEF)
 M_MAXPAR ? M_MAXPAR : 1
index 5cca22e342f14b2ec182ecc6ded104826fa62612..9431830f54c10caa001d2da00205005689c82353 100644 (file)
@@ -33,9 +33,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <stdlib.h>
 #include <locale.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -48,7 +45,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "version.h"
 
 /* Adjust parsing state after each token if necessary */
-void m_adjuststate(M_NOPAR)
+void m_adjuststate(void)
   {
     if (m_curcon == START) {
       if (m_netlevel) {
@@ -79,7 +76,7 @@ void m_adjuststate(M_NOPAR)
 
 /* Tests whether the element named in a tag is defined; if so, returns its
    index; otherwise return FALSE */
-M_ELEMENT m_eltname(M_NOPAR)
+M_ELEMENT m_eltname(void)
   {
     M_ELEMENT eltid ;
 
@@ -90,7 +87,7 @@ M_ELEMENT m_eltname(M_NOPAR)
       }
     }
 
-int get_mb_cur_max()
+int get_mb_cur_max(void)
 {
 char *l;
 int   i;
@@ -103,7 +100,7 @@ return i;
 }
 
 /* Program initialization */
-void m_initialize(M_NOPAR)
+void m_initialize(void)
 {
 char    **mb_delims;
 M_WCHAR **wc_delims;
index 9025cf52d1539666f385319779913a7f70ec7d88..6789594c0f961b16f6beee715bd470a49f945bb2 100644 (file)
 /* Function callable by interface designers.  Returns TRUE if specified value
    is a legal value for the indicated parameter of the given element,
    FALSE otherwise. */
-#if defined(M_PROTO)
 LOGICAL m_parvalok( M_WCHAR *elt , M_WCHAR *param , const M_WCHAR *value )
-#else
-LOGICAL m_parvalok(elt, param, value)
-  M_WCHAR *elt ;
-  M_WCHAR *param ;
-  M_WCHAR *value ;
-#endif /* M_PROTO */
   {
     M_ELEMENT eltid ;
     int par ;
index 22efdd848953c19ef8de0487c939874d0b645f62..7b4870132cfce7e74dbfff6fb452db034cd199be 100644 (file)
@@ -38,10 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 
 /* When a processing instruction or SDATA entity other than a CODE entity
    occurs */
-void m_piaction(m_pi, m_entname, m_enttype)
-  M_WCHAR *m_pi ;
-  M_WCHAR *m_entname ;
-  int m_enttype ;
+void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype)
   {
     m_stackpar = m_stacktop->piparam ;
     (*m_ptable[m_stacktop->picase])(m_pi, m_entname, m_enttype) ;
index f45099c956badaab163ea37cb669f005d7d01962..f907af1ce25dcfcf8c20efc3c07e60d73d79faac 100644 (file)
  * Floor, Boston, MA 02110-1301 USA
  */
 /* $XConsortium: proto.h /main/3 1995/11/08 10:57:56 rswiston $ */
-int m_actgetc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_adjuststate(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
-
-void m_attval(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_attvonly(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-int m_checkstart(
-#if defined(M_PROTO)
-  M_ELEMENT val
-#endif
-  ) ;
-
-LOGICAL m_ckend(
-#if defined(M_PROTO)
-  M_ELEMENT val, LOGICAL neednet
-#endif
-  ) ;
-
-void m_ckmap(
-#if defined(M_PROTO)
-  M_WCHAR *name, LOGICAL useoradd
-#endif
-  ) ;
-
-void m_closent(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-void m_codeent(
-#if defined(M_PROTO)
-  int m_ent
-#endif
-  ) ;
-
-M_PARSE *m_copystackelt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *m_cyclent(
-#if defined(M_PROTO)
-  LOGICAL init, unsigned char *type, M_WCHAR **content, 
-  unsigned char *wheredef
-#endif
-  ) ;
-
-void m_dispcurelt(
-#if defined(M_PROTO)
-  M_WCHAR *file, int line
-#endif
-  ) ;
-
-void m_done(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_dumpline(
-#if defined(M_PROTO)
-  M_WCHAR *file, int line
-#endif
-  ) ;
-
-void m_eduptype(
-#if defined(M_PROTO)
-  int type
-#endif
-  ) ;
-
-M_ELEMENT m_eltname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_endaction(
-#if defined(M_PROTO)
-  M_ELEMENT m_elt
-#endif
-  ) ;
-
-void m_endcase(
-#if defined(M_PROTO)
-  int m_action
-#endif
-  ) ;
-
-void m_endtag(
-#if defined(M_PROTO)
-  M_ELEMENT c
-#endif
-  ) ;
-
-void m_entexpand(
-#if defined(M_PROTO)
-  M_ENTITY *openent
-#endif
-  ) ;
-
-void m_eprefix(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5
-#endif
-  ) ;
-
-void m_err6(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6
-#endif
-  ) ;
-
-void m_err7(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
-             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7
-#endif
-  ) ;
-
-void m_errline(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_esuffix(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
-
-void m_etcomplete(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_excluded(
-#if defined(M_PROTO)
-  M_ELEMENT elt
-#endif
-  ) ;
-
-void m_expecting(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_expexpand(
-#if defined(M_PROTO)
-  LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data
-#endif
-  ) ;
-
-void m_expline(
-#if defined(M_PROTO)
-  LOGICAL *expstart, LOGICAL *data, M_ELEMENT label
-#endif
-  ) ;
-
-void m_exptend(
-#if defined(M_PROTO)
-  LOGICAL *expstart, M_PARSE *stackptr
-#endif
-  ) ;
-
-int m_findact(
-#if defined(M_PROTO)
-  M_ELEMENT elt, int *array
-#endif
-  ) ;
-
-void m_findatt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_findchain(
-#if defined(M_PROTO)
-  M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, 
-  LOGICAL wild
-#endif
-  ) ;
-
-int m_findpar(
-#if defined(M_PROTO)
-  const char *elt, const char *param, const M_WCHAR *value
-#endif
-  ) ;
-
-M_ELEMENT m_findunique(
-#if defined(M_PROTO)
-  M_STATE from, int *newleft
-#endif
-  ) ;
-
-void m_frcend(
-#if defined(M_PROTO)
-  M_ELEMENT val
-#endif
-  ) ;
-
-void m_frcstart(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void m_freeFSA(
-#if defined(M_PROTO)
-  M_PARSE *stackelt
-#endif
-  ) ;
-
-void m_freemin(
-#if defined(M_PROTO)
-  M_MIN *min
-  , char *msg
-#endif
-  ) ;
-
-void m_freeparam(
-#if defined(M_PROTO)
-  M_PARSE *stackelt
-#endif
-  ) ;
-
-LOGICAL m_gendelim(
-#if defined(M_PROTO)
-  int srlen, int context
-#endif
-  ) ;
-
-int m_getachar(
-#if defined(M_PROTO)
-  M_HOLDTYPE *dchar
-#endif
-  ) ;
-
-int m_getc(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
-
-void *m_getdata(
-#if defined(M_PROTO)
-  int n, LOGICAL *flag
-#endif
-  ) ;
-
-void m_getline(
-#if defined(M_PROTO)
-  M_WCHAR **file, int *line
-#endif
-  ) ;
-
-void m_getname(
-#if defined(M_PROTO)
-  M_WCHAR first
-#endif
-  ) ;
-
-void m_getsignon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_gettoken(
-#if defined(M_PROTO)
-  int *c, M_HOLDTYPE *dchar, int context
-#endif
-  ) ;
-
-void m_globes(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_globss(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_holdproc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_inctest(
-#if defined(M_PROTO)
-  int *count, int limit, char *message
-#endif
-  ) ;
-
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_initialize(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_lastchars(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_level(
-#if defined(M_PROTO)
-  M_WCHAR *elt
-#endif
-  ) ;
-
-int m_mblevel(
-#if defined(M_PROTO)
-  char *elt
-#endif
-  ) ;
-
-void m_litproc(
-#if defined(M_PROTO)
-  int delim
-#endif
-  ) ;
-
-void m_longent(
-#if defined(M_PROTO)
-  int context
-#endif
-  ) ;
-
-LOGICAL m_lookent(
-#if defined(M_PROTO)
-  M_WCHAR *name, unsigned char *type, M_WCHAR **content, 
-  unsigned char *wheredef
-#endif
-  ) ;
-
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void m_missingtagc(
-#if defined(M_PROTO)
-  int c, M_HOLDTYPE dchar, LOGICAL start
-#endif
-  ) ;
-
-LOGICAL m_nextand(
-#if defined(M_PROTO)
-  M_OPENFSA *thisfsa, M_ELEMENT label
-#endif
-  ) ;
-
-void m_nextdelimchar(
-#if defined(M_PROTO)
-  int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank, 
-  unsigned char type
-#endif
-  ) ;
-
-void m_ntrent(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-void m_nullendtag(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_omitend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_omitstart(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
-
-void *m_openent(
-#if defined(M_PROTO)
-  M_WCHAR *entcontent
-#endif
-  ) ;
-
-void *m_openfirst(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_optstring(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie, M_WCHAR *name
-#endif
-  ) ;
-
-int m_parcount(
-#if defined(M_PROTO)
-  M_WCHAR *elt
-#endif
-  ) ;
-
-M_WCHAR *m_pardefault(
-#if defined(M_PROTO)
-  M_WCHAR *elt, M_WCHAR *param, unsigned char *type
-#endif
-  ) ;
-
-M_WCHAR *m_parent(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
-
-M_WCHAR *m_parname(
-#if defined(M_PROTO)
-  M_WCHAR *elt, int n
-#endif
-  ) ;
-
-M_WCHAR *m_mbparname(
-#if defined(M_PROTO)
-  char *elt, int n
-#endif
-  ) ;
-
-const M_WCHAR *m_partype(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-void m_parupper(
-#if defined(M_PROTO)
-  int par, M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_parvalok(
-#if defined(M_PROTO)
-  M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value
-#endif
-  ) ;
-
-void m_piaction(
-#if defined(M_PROTO)
-  M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype
-#endif
-  ) ;
-
-void m_pop(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_push(
-#if defined(M_PROTO)
-  M_ELEMENT elt, M_STATE current, LOGICAL need
-#endif
-  ) ;
-
-LOGICAL m_putdata(
-#if defined(M_PROTO)
-  void *data, int n
-#endif
-  ) ;
-
-void m_readcomments(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void *m_realloc(
-#if defined(M_PROTO)
-  void *ptr, int size, char *msg
-#endif
-  ) ;
-
-int m_scan(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_setmap(
-#if defined(M_PROTO)
-  int map, LOGICAL useoradd
-#endif
-  ) ;
-
-void m_setoptions(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_setparam(
-#if defined(M_PROTO)
-  M_WCHAR **cvar, int par
-#endif
-  ) ;
-
-void m_shortref(
-#if defined(M_PROTO)
-  int context
-#endif
-  ) ;
-
-void m_showcurelt(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_signmsg(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_sigre(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_startdoc(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_startmsg(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stcaction(
-#if defined(M_PROTO)
-  M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END
-#endif
-  ) ;
-
-void m_stcomplete(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stkdefaultparams(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_stkonedef(
-#if defined(M_PROTO)
-  int par, M_ELEMENT scanel, M_WCHAR **poccur, int i
-#endif
-  ) ;
-
-void m_stkparams(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_strtaction(
-#if defined(M_PROTO)
-  M_ELEMENT m_elt
-#endif
-  ) ;
-
-void m_strtcase(
-#if defined(M_PROTO)
-  int m_action
-#endif
-  ) ;
-
-void m_strtcdata(
-#if defined(M_PROTO)
-  int scanval
-#endif
-  ) ;
-
-LOGICAL m_strtproc(
-#if defined(M_PROTO)
-  M_ELEMENT scanval
-#endif
-  ) ;
-
-void m_strttag(
-#if defined(M_PROTO)
-  M_ELEMENT val, LOGICAL net
-#endif
-  ) ;
-
-void m_textaction(
-#if defined(M_PROTO)
-  M_WCHAR m_textchar
-#endif
-  ) ;
-
-void m_textout(
-#if defined(M_PROTO)
-  char *format, LOGICAL start, LOGICAL end
-#endif
-  ) ;
-
-LOGICAL m_textpermitted(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-M_WCHAR *m_thisfile(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-int m_thisline(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_trace(
-#if defined(M_PROTO)
-  char *p
-#endif
-  ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *p
-#endif
-  ) ;
-
-LOGICAL m_transition(
-#if defined(M_PROTO)
-  M_ELEMENT label, LOGICAL recur
-#endif
-  ) ;
-
-void m_undodelim(
-#if defined(M_PROTO)
-  M_WCHAR *delim, LOGICAL flag
-#endif
-  ) ;
-
-void m_ungetachar(
-#if defined(M_PROTO)
-  int c, M_HOLDTYPE dchar, LOGICAL preread
-#endif
-  ) ;
-
-void m_updatedefault(
-#if defined(M_PROTO)
-  const int par, const M_WCHAR *string
-#endif
-  ) ;
-
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
-
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
-
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
-
-LOGICAL m_validinpar(
-#if defined(M_PROTO)
-  M_WCHAR *string
-#endif
-  ) ;
-
-LOGICAL m_vldentref(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+int m_actgetc(void);
+
+void m_adjuststate(void);
+
+LOGICAL m_allwhite(const M_WCHAR *string);
+
+void m_attval(M_WCHAR *string);
+
+LOGICAL m_attvonly(M_WCHAR *string);
+
+int m_checkstart(M_ELEMENT val);
+
+LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet);
+
+void m_ckmap(M_WCHAR *name, LOGICAL useoradd);
+
+void m_closent(void *m_ptr);
+
+void m_codeent(int m_ent);
+
+M_PARSE *m_copystackelt(void);
+
+M_WCHAR *m_cyclent(LOGICAL init, unsigned char *type, M_WCHAR **content, 
+  unsigned char *wheredef);
+
+void m_dispcurelt(M_WCHAR *file, int line);
+
+void m_done(void);
+
+void m_dumpline(M_WCHAR *file, int line);
+
+void m_eduptype(int type);
+
+M_ELEMENT m_eltname(void);
+
+void m_endaction(M_ELEMENT m_elt);
+
+void m_endcase(int m_action);
+
+void m_endtag(M_ELEMENT c);
+
+void m_entexpand(M_ENTITY *openent);
+
+void m_eprefix(void);
+
+void m_err1(const char *text, const M_WCHAR *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5);
+
+void m_err6(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6);
+
+void m_err7(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
+             M_WCHAR *arg4, M_WCHAR *arg5, M_WCHAR *arg6, M_WCHAR *arg7);
+
+void m_errline(char *p);
+
+void m_error(char *text);
+
+void m_esuffix(void);
+
+void m_exit(int status);
+
+void m_etcomplete(void);
+
+LOGICAL m_excluded(M_ELEMENT elt);
+
+void m_expecting(void);
+
+void m_expexpand(LOGICAL *expstart, M_STATE node, LOGICAL *required, LOGICAL *data);
+
+void m_expline(LOGICAL *expstart, LOGICAL *data, M_ELEMENT label);
+
+void m_exptend(LOGICAL *expstart, M_PARSE *stackptr);
+
+int m_findact(M_ELEMENT elt, int *array);
+
+void m_findatt(void);
+
+void m_findchain(M_PARSE *stackptr, int start, int chainin, int *chainout, int *index, 
+  LOGICAL wild);
+
+int m_findpar(const char *elt, const char *param, const M_WCHAR *value);
+
+M_ELEMENT m_findunique(M_STATE from, int *newleft);
+
+void m_frcend(M_ELEMENT val);
+
+void m_frcstart(void);
+
+void m_free(void *block, char *msg);
+
+void m_freeFSA(M_PARSE *stackelt);
+
+void m_freemin(M_MIN *min
+  , char *msg);
+
+void m_freeparam(M_PARSE *stackelt);
+
+LOGICAL m_gendelim(int srlen, int context);
+
+int m_getachar(M_HOLDTYPE *dchar);
+
+int m_getc(void *m_ptr);
+
+int mb_getwc(void *m_ptr);
+
+void *m_getdata(int n, LOGICAL *flag);
+
+void m_getline(M_WCHAR **file, int *line);
+
+void m_getname(M_WCHAR first);
+
+void m_getsignon(void);
+
+int m_gettoken(int *c, M_HOLDTYPE *dchar, int context);
+
+void m_globes(void);
+
+void m_globss(void);
+
+void m_holdproc(void);
+
+void m_inctest(int *count, int limit, char *message);
+
+void m_initctype(void);
+
+void m_initialize(void);
+
+void m_lastchars(void);
+
+int m_level(M_WCHAR *elt);
+
+int m_mblevel(char *elt);
+
+void m_litproc(int delim);
+
+void m_longent(int context);
+
+LOGICAL m_lookent(M_WCHAR *name, unsigned char *type, M_WCHAR **content, 
+  unsigned char *wheredef);
+
+void main(int argc, char **argv);
+
+void *m_malloc(int size, char *msg);
+
+void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start);
+
+LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label);
+
+void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart, LOGICAL skipblank, 
+  unsigned char type);
+
+void m_ntrent(M_WCHAR *p);
+
+void m_nullendtag(void);
+
+LOGICAL m_omitend(void);
+
+LOGICAL m_omitstart(void);
+
+void m_openchk(FILE **ptr, char *name, char *mode);
+
+void *m_openent(M_WCHAR *entcontent);
+
+void *m_openfirst(void);
+
+void m_optstring(char *p);
+
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
+
+int m_parcount(M_WCHAR *elt);
+
+M_WCHAR *m_pardefault(M_WCHAR *elt, M_WCHAR *param, unsigned char *type);
+
+M_WCHAR *m_parent(int n);
+
+M_WCHAR *m_parname(M_WCHAR *elt, int n);
+
+M_WCHAR *m_mbparname(char *elt, int n);
+
+const M_WCHAR *m_partype(const int par, const M_WCHAR *string);
+
+void m_parupper(int par, M_WCHAR *string);
+
+LOGICAL m_parvalok(M_WCHAR *elt, M_WCHAR *param, const M_WCHAR *value);
+
+void m_piaction(M_WCHAR *m_pi, M_WCHAR *m_entname, int m_enttype);
+
+void m_pop(void);
+
+void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need);
+
+LOGICAL m_putdata(void *data, int n);
+
+void m_readcomments(void);
+
+void *m_realloc(void *ptr, int size, char *msg);
+
+int m_scan(void);
+
+void m_setmap(int map, LOGICAL useoradd);
+
+void m_setoptions(void);
+
+void m_setparam(M_WCHAR **cvar, int par);
+
+void m_shortref(int context);
+
+void m_showcurelt(void);
+
+void m_signmsg(char *p);
+
+void m_sigre(void);
+
+void m_startdoc(void);
+
+void m_startmsg(void);
+
+void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END);
+
+void m_stcomplete(void);
+
+void m_stkdefaultparams(void);
+
+void m_stkonedef(int par, M_ELEMENT scanel, M_WCHAR **poccur, int i);
+
+void m_stkparams(void);
+
+void m_strtaction(M_ELEMENT m_elt);
+
+void m_strtcase(int m_action);
+
+void m_strtcdata(int scanval);
+
+LOGICAL m_strtproc(M_ELEMENT scanval);
+
+void m_strttag(M_ELEMENT val, LOGICAL net);
+
+void m_textaction(M_WCHAR m_textchar);
+
+void m_textout(char *format, LOGICAL start, LOGICAL end);
+
+LOGICAL m_textpermitted(void);
+
+M_WCHAR *m_thisfile(void);
+
+int m_thisline(void);
+
+void m_trace(char *p);
+
+void m_wctrace(M_WCHAR *p);
+
+LOGICAL m_transition(M_ELEMENT label, LOGICAL recur);
+
+void m_undodelim(M_WCHAR *delim, LOGICAL flag);
+
+void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread);
+
+void m_updatedefault(const int par, const M_WCHAR *string);
+
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
+
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
+
+int m_mbmbupstrcmp(const char *p, const char *q);
+
+LOGICAL m_validinpar(M_WCHAR *string);
+
+LOGICAL m_vldentref(void);
+
+LOGICAL m_whitespace(M_WCHAR c);
 
index 153728dfb1622cb6b3bef9051d3bd6cbda37f83a..3bc16ced84eafbded840b66bf2ab38304e7d1a89 100644 (file)
@@ -32,9 +32,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #define M_CONDEF
@@ -51,7 +48,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "sref.h"
 
 /* Actually read a character from an input stream */
-int m_actgetc(M_NOPAR)
+int m_actgetc(void)
   {
     int c ;
 
@@ -65,8 +62,7 @@ int m_actgetc(M_NOPAR)
     }
 
 /* Expand an entity reference */
-void m_entexpand(openent)
-  M_ENTITY *openent ;
+void m_entexpand(M_ENTITY *openent)
   {
     M_WCHAR *p ;
     M_HOLDTYPE dchar ;
@@ -234,9 +230,7 @@ void m_entexpand(openent)
 
 /* An srlen-character long short-reference delimiter has been found.  Verify
    that it is not the prefix of a general delimiter recognized in context*/
-LOGICAL m_gendelim(srlen, context)
-  int srlen ;
-  int context ;
+LOGICAL m_gendelim(int srlen, int context)
   {
     int ghold[MAXD + 1] ;
     int ucase ;
@@ -324,8 +318,7 @@ LOGICAL m_gendelim(srlen, context)
 
 /* Reads next input character from the current source file or from an
    entity expansion */
-int m_getachar(dchar)
-  M_HOLDTYPE *dchar ;
+int m_getachar(M_HOLDTYPE *dchar)
   {
     int c ;
     int i ;
@@ -402,12 +395,7 @@ int m_getachar(dchar)
     }
 
 /* Reads a name token */
-#if defined(M_PROTO)
 void m_getname(M_WCHAR first)
-#else
-void m_getname(first)
-  M_WCHAR first ;
-#endif
 {
     M_WCHAR *p ;
     M_HOLDTYPE dchar ;
@@ -435,10 +423,7 @@ void m_getname(first)
     }
 
 /* Reads the next token */
-int m_gettoken(c, dchar, context)
-  int *c ;
-  M_HOLDTYPE *dchar ;
-  int context ;
+int m_gettoken(int *c, M_HOLDTYPE *dchar, int context)
   {
     int hold[MAXD + 1], next ;
     int ucase ;
@@ -562,8 +547,7 @@ int m_gettoken(c, dchar, context)
     }
 
 /* Reads a literal */
-void m_litproc(delim)
-  int delim ;
+void m_litproc(int delim)
   {
     int n, i ;
     M_HOLDTYPE dchar ;
@@ -649,14 +633,7 @@ void m_litproc(delim)
     }
 
 /* Called when a missing tagc delimiter is detected */
-#if defined(M_PROTO)
 void m_missingtagc(int c, M_HOLDTYPE dchar, LOGICAL start)
-#else
-void m_missingtagc(c, dchar, start)
-  int c ;
-  M_HOLDTYPE dchar ;
-  LOGICAL start ;
-#endif
 {
     if (! m_wholetag) {
       if (start) m_mberr1("Invalid parameter or missing %s", m_tagc);
@@ -669,18 +646,8 @@ void m_missingtagc(c, dchar, start)
 
 /* Have found one character in a possible short reference delimiter.
    Prepare to look for the next one */
-#if defined(M_PROTO)
 void m_nextdelimchar(int *n, int i, LOGICAL *linestart, LOGICAL newlinestart,
                     LOGICAL skipblank, unsigned char type)
-#else
-void m_nextdelimchar(n, i, linestart, newlinestart, skipblank, type)
-  int *n ;
-  int i ;
-  LOGICAL *linestart ;
-  LOGICAL newlinestart ;
-  LOGICAL skipblank ;
-  unsigned char type ;
-#endif
 {               
     int k ;
     char mb_re,mb_seqchar, mb_rschar;
@@ -715,7 +682,7 @@ void m_nextdelimchar(n, i, linestart, newlinestart, skipblank, type)
     }
 
 /* Scans past a comment within a markup declaration */
-void m_readcomments(M_NOPAR)
+void m_readcomments(void)
   {
     int c ;
     M_HOLDTYPE dchar ;
@@ -728,7 +695,7 @@ void m_readcomments(M_NOPAR)
     }
 
 /* Scanner */
-int m_scan(M_NOPAR)
+int m_scan(void)
   {
     int c ;
     M_HOLDTYPE dchar ;
@@ -863,13 +830,7 @@ int m_scan(M_NOPAR)
 
 
 /* Process explicit or implied USEMAP or ADDMAP */
-#if defined(M_PROTO)
 void m_setmap(int map, LOGICAL useoradd)
-#else
-void m_setmap(map, useoradd)
-  int map ;
-  LOGICAL useoradd ;
-#endif
 {
     int i ;
     int sref ;
@@ -917,8 +878,7 @@ void m_setmap(map, useoradd)
     }
 
 /* Check for short reference delimiters */
-void m_shortref(context)
-int context ;
+void m_shortref(int context)
 {
 int n = 0 ;
 int i ;
@@ -1068,7 +1028,7 @@ while (TRUE)
           or contextual end tag [linestat == M_SOMETHING]
       3)  If a record end might be the last one in an element, save it
 */
-void m_sigre(M_NOPAR)
+void m_sigre(void)
   {
     /* Check for first RE in content and no preceding content */
     if (m_start &&
@@ -1087,13 +1047,7 @@ void m_sigre(M_NOPAR)
 
 /* Returns a context-dependent delimiter string to input stream so
    characters can be reread one at a time in another context */
-#if defined(M_PROTO)
 void m_undodelim(M_WCHAR *delim, LOGICAL flag)
-#else
-void m_undodelim(delim, flag)
-  M_WCHAR *delim ;
-  LOGICAL flag ;
-#endif
 {
     M_WCHAR *p ;
 
@@ -1110,14 +1064,7 @@ void m_undodelim(delim, flag)
 /* Place a character on the current input stream.  The character may have
    been scanned and determined not to be part of the current token or it
    may be in the expansion of an entity*/
-#if defined(M_PROTO)
 void m_ungetachar(int c, M_HOLDTYPE dchar, LOGICAL preread)
-#else
-void m_ungetachar(c, dchar, preread)
-  int c ;
-  M_HOLDTYPE dchar ;
-  LOGICAL preread ;
-#endif
 {
     char buffer[10] ;
     int length;
@@ -1157,7 +1104,7 @@ void m_ungetachar(c, dchar, preread)
     }
 
 /* Have encountered an M_ERO.  If the entity reference is valid, process it*/
-LOGICAL m_vldentref(M_NOPAR)
+LOGICAL m_vldentref(void)
   {
     M_HOLDTYPE dchar ;
     int next ;
index 0d6310521b9ac1abc4cf232aebfe56c69901acd7..6d161306ad601aa08ece6975d2f690c2998d8539 100644 (file)
@@ -30,7 +30,7 @@ Copyright 1988, 1989 Hewlett-Packard Co.
 
 
 /* Set program options */
-void m_setoptions(M_NOPAR)
+void m_setoptions(void)
   {
     if (m_argc > 1) m_optstring(m_argv[1]) ;
     }
index 4a198d42ef8d42d1d3e2f92a3211dd72faa9912e..4124a45c4238bb4d3b744b098c6176ae25c02e3e 100644 (file)
@@ -35,9 +35,7 @@
 #include "parser.h"
 
 /* Set a user-defined C variable to the corresponding parameter value */
-void m_setparam(cvar, par)
-  M_WCHAR **cvar ;
-  int par ;
+void m_setparam(M_WCHAR **cvar, int par)
   {
     *cvar = m_stackpar->param[par] ;
     }
index 24120add2e4d7c4700b9de3866a6777684b6467f..8b82ee5247d1f5d68c859c5ac407a9c9b922aff2 100644 (file)
@@ -36,8 +36,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include "sfile.c"
 
 /* Perform the m_action-th start-code in the interface */
-void m_strtcase(m_action)
-  int m_action ;
+void m_strtcase(int m_action)
   {
     (*m_stable[m_action])() ;
     }
index 955b277e9833a950ef89fc5e76c9febe9f8f3b7d..c4e35ab174d35d22569fa3e014c7bf5606081001 100644 (file)
@@ -32,7 +32,7 @@ Copyright 1989 Hewlett-Packard Co.
    control after all entity declarations have been processed.  Not needed
    in valid documents (when it is called just prior to global start-code),
    but may be useful in some applications nevertheless. */
-void m_startdoc(M_NOPAR)
+void m_startdoc(void)
   {
     }
 
index 3074876a9cc60d93cec2ebac126c21c2a3ed7d74..65af1d484d362bbfd5cc5c6e39ca0dcc5467c94a 100644 (file)
 /* Include generated code */
 #include "stfile.c"
 
-#if defined(M_PROTO)
 void m_stcaction(M_WCHAR *m_string, LOGICAL M_START, LOGICAL M_END)
-#else
-void m_stcaction(m_string, M_START, M_END)
-  M_WCHAR *m_string ;
-  LOGICAL M_START ;
-  LOGICAL M_END ;
-#endif
 {
     m_stackpar = m_stacktop->stparam ;
     (*m_sttable[m_stacktop->stccase])(m_string, M_START, M_END) ;
index d9a09783946a1cff5dcc76088da9c415182a7a8a..7471ae2b23b02dd9da700d568ecc209669a36cde 100644 (file)
@@ -33,9 +33,6 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 #include "dtdext.h"
@@ -49,8 +46,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
    is valid input. It returns TRUE, FALSE, or M_NONCONTEXTUAL respectively
    if the element is allowed by content, not allowed, or allowed by an
    inclusion exception. */
-int m_checkstart(val)
-  M_ELEMENT val ;
+int m_checkstart(M_ELEMENT val)
   {
     M_PARSE *stackptr ;
     int except ;
@@ -88,13 +84,7 @@ int m_checkstart(val)
    If VAL is not the element at the top of the parse stack, m_ckend
    checks to see if the end of VAL can validly end nested
    elements as well. */
-#if defined(M_PROTO)
 LOGICAL m_ckend(M_ELEMENT val, LOGICAL neednet)
-#else
-LOGICAL m_ckend(val, neednet)
-  M_ELEMENT val ;
-  LOGICAL neednet ;
-  #endif
 {
     M_PARSE *stackptr ;
     M_OPENFSA *fsastack ;
@@ -197,7 +187,7 @@ LOGICAL m_ckend(val, neednet)
 
 /* Make a copy of the stack entry at the top of the parse stack in a scratch
    area */
-M_PARSE *m_copystackelt(M_NOPAR)
+M_PARSE *m_copystackelt(void)
   {
     M_OPENFSA *oldfsa ;
     M_OPENFSA **newfsa ;
@@ -225,7 +215,7 @@ M_PARSE *m_copystackelt(M_NOPAR)
     }
 
 /* End of document */
-void m_done(M_NOPAR)
+void m_done(void)
   {
     M_ELEMENT lastelt ;
 
@@ -247,8 +237,7 @@ void m_done(M_NOPAR)
     }
 
 /* Process the endtag (implied, abbreviated, or explicit) for element C*/
-void m_endtag(c)
-  M_ELEMENT c ;
+void m_endtag(M_ELEMENT c)
   {
     m_endaction(c) ;
     m_pop() ;
@@ -260,8 +249,7 @@ void m_endtag(c)
 
 /* Check that the identified element is not prohibited in the current context
    by an exclusion exception */
-LOGICAL m_excluded(elt)
-  M_ELEMENT elt ;
+LOGICAL m_excluded(M_ELEMENT elt)
   {
     M_PARSE *stackptr ;
     int except ;
@@ -279,8 +267,7 @@ LOGICAL m_excluded(elt)
 
 /* Free the OPEN FSA substructures associated with an element on
    the parse stack */
-void m_freeFSA(stackelt)
-  M_PARSE *stackelt ;
+void m_freeFSA(M_PARSE *stackelt)
   {
     M_OPENFSA *fsastack ;
     M_ANDLIST *usedand ;
@@ -299,9 +286,7 @@ void m_freeFSA(stackelt)
     }
 
 /* Free storage used for tentative chain of tag minimizations */
-void m_freemin(min, msg)
-  M_MIN *min ;
-  char *msg ;
+void m_freemin(M_MIN *min, char *msg)
   {
     M_MIN *discard ;
 
@@ -316,9 +301,7 @@ void m_freemin(min, msg)
    in the current content model by starting a new submodel of the and-group
    indicated by fsastack, or (if the and-group is within a seq-group) by
    continuing past the and-group */
-LOGICAL m_nextand(thisfsa, label)
-  M_OPENFSA *thisfsa ;
-  M_ELEMENT label ;
+LOGICAL m_nextand(M_OPENFSA *thisfsa, M_ELEMENT label)
   {
     M_ANDLIST *newgroup ;
     M_ANDGROUP pand ;
@@ -404,7 +387,7 @@ LOGICAL m_nextand(thisfsa, label)
     }
 
 /* Pops the parse stack*/
-void m_pop(M_NOPAR)
+void m_pop(void)
   {
     M_PARSE *stackelt ;
 
@@ -426,14 +409,7 @@ void m_pop(M_NOPAR)
 
 /* Pushes a new item onto the parse stack, setting its element, current,
    and neednet fields as indicated by the parameters*/
-#if defined(M_PROTO)
 void m_push(M_ELEMENT elt, M_STATE current, LOGICAL need)
-#else
-void m_push(elt, current, need)
-  M_ELEMENT elt ;
-  M_STATE current ;
-  LOGICAL need ;
-  #endif
 {
     M_PARSE *newstack ;
 
@@ -477,8 +453,7 @@ void m_push(elt, current, need)
    character is treated differently so that if character data is not
    allowed in the current context, an error message is issued with the
    first character only and not with every character. */
-void m_strtcdata(scanval)
-  int scanval ;
+void m_strtcdata(int scanval)
   {
     if (! m_strtproc(M_NULLVAL))
       if (m_whitespace((M_WCHAR) scanval)) {
@@ -509,8 +484,7 @@ void m_strtcdata(scanval)
    to an element that was within #PCDATA, m_strtproc saves the current context
    and restores it after returning from the last call to m_endtag.)
 */
-LOGICAL m_strtproc(scanval)
-  M_ELEMENT scanval ;
+LOGICAL m_strtproc(M_ELEMENT scanval)
   {
     int check ;
     M_PARSE *original ;
@@ -654,13 +628,7 @@ LOGICAL m_strtproc(scanval)
     }
 
 /* Processes explicit or implied start tag*/
-#if defined(M_PROTO)
 void m_strttag(M_ELEMENT val, LOGICAL net)
-#else
-void m_strttag(val, net)
-  M_ELEMENT val ;
-  LOGICAL net ;
-#endif
 {
     m_transition(val, TRUE) ;
     if (val) {
@@ -683,7 +651,7 @@ void m_strttag(val, net)
    makes more sense, is used by MARKUP, and is under consideration by the
    Standards committee; the latter is the current definition in the Standard
    */
-LOGICAL m_textpermitted(M_NOPAR)
+LOGICAL m_textpermitted(void)
   {
     M_ANDGROUP pand ;
     M_OPENFSA *fsastack ;
@@ -726,13 +694,7 @@ LOGICAL m_textpermitted(M_NOPAR)
 /* Returns TRUE iff LABEL allowed in the current state of the current
    element (without expanding any minimization).  May result in changes
    to the stack of FSA's for this element if and-groups open or close. */
-#if defined(M_PROTO)
 LOGICAL m_transition(M_ELEMENT label, LOGICAL recur)
-#else
-LOGICAL m_transition(label, recur)
-  M_ELEMENT label ;
-  LOGICAL recur ;
-#endif
 {
     M_ARC parc ;
     M_OPENFSA *newfsa ;
index 0b1e6237a87ff2676171b2fbb74dd0f77620e898..80017d3efe020d72dfb1181a8cda575fb71d3544 100644 (file)
@@ -38,12 +38,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #define M_BUFLEN (32)
 
 /* When a text character occurs */
-#if defined(M_PROTO)
 void m_textaction(M_WCHAR m_textchar)
-#else
-void m_textaction(m_textchar)
-  M_WCHAR m_textchar ;
-  #endif
 {
     char buffer[M_BUFLEN] ;
     char    mb_re;
index 86b33e3acbea23eb40e4ad914c9d4272cc7d4ff2..2783b9b5da3e68e23aa82da8e89659d3ddbc59e6 100644 (file)
 */
 #include "basic.h"
 
-LOGICAL m_allwhite(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  ) ;
+LOGICAL m_allwhite(const M_WCHAR *string);
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+LOGICAL m_whitespace(M_WCHAR c);
 
 /* Test if a string contains only white space characters */
-#if defined(M_PROTO)
 LOGICAL m_allwhite(const M_WCHAR *string )
-#else
-LOGICAL m_allwhite(string)
-M_WCHAR *string ;
-#endif /* M_PROTO */
 {
 const M_WCHAR *p ;
 
index d77c6528788b01f782df8e8f131b74ff6824732e..617d9d11ca49a5e52037f1da1e28f927af59f325 100644 (file)
@@ -46,93 +46,29 @@ typedef wchar_t M_WCHAR;
 
 /* For function prototypes */
 typedef char * M_POINTER;
-#if defined(hpux) || defined(__aix) || defined(sun)
-/* Old unix stuff
- *#define void int
- *#define M_NOPAR
- */
-/* New Ansi style */
-#define M_PROTO
-#define M_NOPAR void
-#else
-#define M_PROTO
-#define M_NOPAR void
-#endif
-
-char *MakeMByteString(
-#if defined(M_PROTO)
-  const M_WCHAR *from
-#endif
-  );
-
-M_WCHAR *MakeWideCharString(
-#if defined(M_PROTO)
-  const char *from
-#endif
-  );
-
-int w_strcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *string1, const M_WCHAR *string2
-#endif
-  );
-
-int w_strncmp(
-#if defined(M_PROTO)
-  const M_WCHAR *string1, const M_WCHAR *string2, int max
-#endif
-  );
-
-M_WCHAR *w_strcpy(
-#if defined(M_PROTO)
-  M_WCHAR *string1, const M_WCHAR *string2
-#endif
-  );
-
-M_WCHAR *w_strncpy(
-#if defined(M_PROTO)
-  M_WCHAR *string1, const M_WCHAR *string2, int max
-#endif
-  );
-
-int w_strlen(
-#if defined(M_PROTO)
-  const M_WCHAR *string
-#endif
-  );
-
-M_WCHAR *w_strchr(
-#if defined(M_PROTO)
-  M_WCHAR *string, const M_WCHAR chr
-#endif
-  );
-
-M_WCHAR *w_strstr(
-#if defined(M_PROTO)
-  M_WCHAR *string1, M_WCHAR *string2
-#endif
-  );
-
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
-
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-int mb_getwc(
-#if defined(M_PROTO)
-  void *m_ptr
-#endif
-  ) ;
+
+char *MakeMByteString(const M_WCHAR *from);
+
+M_WCHAR *MakeWideCharString(const char *from);
+
+int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2);
+
+int w_strncmp(const M_WCHAR *string1, const M_WCHAR *string2, int max);
+
+M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2);
+
+M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max);
+
+int w_strlen(const M_WCHAR *string);
+
+M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr);
+
+M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2);
+
+void *m_malloc(int size, char *msg);
+
+void m_free(void *block, char *msg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+int mb_getwc(void *m_ptr);
index 55ca65bd189fa9ecd4657d63873b0edf304e0026..c93ae00752caa693a0e33d0c9d36bc6a13690bea 100644 (file)
@@ -37,179 +37,63 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #define CONTINIT(a)
 #endif
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpdlmptr(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void dumpdlmptr(void);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count, void (*proc));
 
-void dumptree(
-#if defined(M_PROTO)
-  LOGICAL sparse
-#endif
-  ) ;
+void dumptree(LOGICAL sparse);
 
-void enterdelim(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+void enterdelim(int n);
 
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void m_error(char *text);
 
-void m_err1(
-#if defined(M_PROTO)
-  char *text, char *arg
-#endif
-  ) ;
+void m_err1(char *text, char *arg);
 
-void getcode(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+void getcode(int n);
 
-void getcolon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void getcolon(void);
 
-int getContext(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+int getContext(void);
 
-LOGICAL getdname(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+LOGICAL getdname(void);
 
-void inccon(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void inccon(void);
 
-void incdelim(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void incdelim(void);
 
-void loaddelim(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void loaddelim(void);
 
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_lower(int c);
 
-int main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
+int main(int argc, char **argv);
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void nextcon(
-#if defined(M_PROTO)
-  LOGICAL sparse
-#endif
-  ) ;
+void nextcon(LOGICAL sparse);
 
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
 
-void printval(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *value
-#endif
-  ) ;
+void printval(FILE *file, M_TRIE *value);
 
-void prtctxt(
-#if defined(M_PROTO)
-  int column, int value
-#endif
-  ) ;
+void prtctxt(int column, int value);
 
-int readchar(
-#if defined(M_PROTO)
-  LOGICAL cap
-#endif
-  ) ;
+int readchar(LOGICAL cap);
 
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void skiptoend(void);
 
-void unread(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+void unread(int c);
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_upper(int c);
 
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void warning(char *text);
 
-void warning1(
-#if defined(M_PROTO)
-  char *text, char *arg
-#endif
-  ) ;
+void warning1(char *text, char *arg);
 
-void warning2(
-#if defined(M_PROTO)
-  char *text, char *arg1, char *arg2
-#endif
-  ) ;
+void warning2(char *text, char *arg1, char *arg2);
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+LOGICAL m_whitespace(M_WCHAR c);
 
 
 #define NOMORE -1
index c18345f7949c5640598ef1b6ec72cee24115ddbf..f59f86f72aa88c13c12c7881855555ad37cf9fe3 100644 (file)
@@ -157,9 +157,6 @@ delim.h.
 
 #include <stdio.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
@@ -169,9 +166,7 @@ delim.h.
 #include "cont.h"
 
 /* Main procedure */
-int main(argc, argv)
-  int argc ;
-  char **argv ;
+int main(int argc, char **argv)
 {
 int n ;
 
index d0a064266a972c86957a55d8b6cb3d779f052448..6aa93c561b2bbafa9877b64d611543d8248443e6 100644 (file)
@@ -31,16 +31,13 @@ This product and information is proprietary of Tandem Computers Incorporated.
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #include "trie.h"
 
 #include "cont.h"
 
 /* Output declaration of dlmptr */
-void dumpdlmptr(M_NOPAR)
+void dumpdlmptr(void)
   {
     int n;
 
@@ -55,12 +52,7 @@ void dumpdlmptr(M_NOPAR)
     }
 
 /* Output the generated data structures */
-#if defined(M_PROTO)
 void dumptree(LOGICAL sparse)
-#else
-void dumptree(sparse)
-  LOGICAL sparse;
-#endif
   {
     int i, count = 0;
 
@@ -89,8 +81,7 @@ void dumptree(sparse)
     }
 
 /* Enter a delimiter into the delimiter tree for a particular context */
-void enterdelim(n)
-  int n;
+void enterdelim(int n)
 {
 if (! contree[n])
     {
@@ -115,8 +106,7 @@ if (m_ntrtrie(dstruct->string,
 }
 
 /* Read the code to be executed with a given state transition */
-void getcode(n)
-int n;
+void getcode(int n)
 {
 int c ; /* c is int instead of char for use with ungetc */
 int nested = 1;
@@ -221,7 +211,7 @@ while (TRUE)
 } /* End proc getcode() */
 
 /* Read the colon separating the two states in a transition pair */
-void getcolon(M_NOPAR)
+void getcolon(void)
 {
 int c ; /* c is int instead of char for use with ungetc */
 M_WCHAR wcl;
@@ -245,7 +235,7 @@ if (c != wcl)
 }
 
 /* Read a context name from an input line */
-int getContext(M_NOPAR)
+int getContext(void)
 {
 M_WCHAR name[CNAMELEN + 1];
 int c ; /* c is int instead of char for use with ungetc */
@@ -314,7 +304,7 @@ return(ccount - 1);
 }
 
 /* Read a delimiter name from the input line */
-LOGICAL getdname(M_NOPAR)
+LOGICAL getdname(void)
 {
 int c;
 M_WCHAR *p;
@@ -358,7 +348,7 @@ return(TRUE);
 }
 
 /* Out of context space.  Increase. */
-void inccon(M_NOPAR)
+void inccon(void)
   {
     M_TRIE **newtrie = NULL;
     int *newtransit = NULL;
@@ -405,7 +395,7 @@ void inccon(M_NOPAR)
     }
 
 /* Increase delimiter space. */
-void incdelim(M_NOPAR)
+void incdelim(void)
 {
 int *newtransit = NULL;
 char **newdlm = NULL;
@@ -452,7 +442,7 @@ dcount++;
 }
 
 /* Read delimiter definitions from delim.dat */
-void loaddelim(M_NOPAR)
+void loaddelim(void)
 {
 int c;
 M_WCHAR *p;
@@ -573,12 +563,7 @@ loading = FALSE;
 }
 
 /* Output transition matrix */
-#if defined(M_PROTO)
 void nextcon(LOGICAL sparse)
-#else
-void nextcon(sparse)
-  LOGICAL sparse;
-#endif
   {
     int i, j;
     int firstinrow;
@@ -632,8 +617,7 @@ void nextcon(sparse)
   
 /* If sparse matrix output option, generate a single element of transit
    array */
-void prtctxt(column, value)
-  int column, value;
+void prtctxt(int column, int value)
   {
     static LOGICAL first = TRUE;
 
@@ -645,12 +629,7 @@ void prtctxt(column, value)
 
 
 /* Read the next input character */
-#if defined(M_PROTO)
 int readchar(LOGICAL cap)
-#else
-int readchar(cap)
-  LOGICAL cap;
-#endif
 {
 int c;
 M_WCHAR wnl;
@@ -668,13 +647,12 @@ return(c);
 
 /* Called by utility procedure m_error() -- has content in other programs
    that use m_error() */
-void skiptoend(M_NOPAR)
+void skiptoend(void)
 {
 }
 
 /* Return a character to the input stream for re-reading */
-void unread(c)
-int c;
+void unread(int c)
 {
 M_WCHAR wnl;
 
index a1203c7abc7a761f7d31dca01b44cbbc3886ba18..a373d097fcc632b875518b253ab0d02a51cd4ac7 100644 (file)
 /* Copyright (c) 1988, 1989 Hewlett-Packard Co. */
 /* Creates a file with nothing in it */
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
+void main(int argc, char **argv);
 
 void main(argc, argv)
   int argc ;
index 2d3ff791e1c787dec31ccb7d0bb92a1e7ed66127..9db9b9e94527c42250a5adf543d2232644acdd28 100644 (file)
 
 /* Entout has procedures to write generated entity TRIE */
 
-void entptr(
-#if defined(M_PROTO)
-  M_ENTITY *data
-#endif
-  ) ;
+void entptr(M_ENTITY *data);
 
-char *typetype(
-#if defined(M_PROTO)
-  int n
-#endif
-  ) ;
+char *typetype(int n);
 
-char *typewhere(
-#if defined(M_PROTO)
-  unsigned char n
-#endif
-  ) ;
+char *typewhere(unsigned char n);
 
 /* Macro names written to output file */
 char xdbuild[] = "M_DBUILD" ;
@@ -61,8 +49,7 @@ char xerror[] = "ERROR" ;
 
 /* Outputs entity definitions */
 #define ENTFILENAME 12
-void entout(fname)
-  char *fname ;
+void entout(char *fname)
   {
     char efilename[ENTFILENAME] ;
     int count = 1 ;
@@ -185,15 +172,13 @@ void entout(fname)
 
 /* Entptr is called by m_dumptrie to output the value stored with a
    particular entity in the entity trie */
-void entptr(data)
-  M_ENTITY *data ;
+void entptr(M_ENTITY *data)
   {
     fprintf(entfile, "(M_TRIE *) &m_entities[%d]", data->index - 1) ;
     }
 
 /* Typetype returns a string indicating the type of the nth entity.*/
-char *typetype(n)
-  int n ;
+char *typetype(int n)
   {
     switch(n) {
       case M_GENERAL: return(xgeneral) ;
@@ -212,12 +197,7 @@ char *typetype(n)
     }
 
 /* Typewhere returns a string indicating where the nth entity was defined.*/
-#if defined(M_PROTO)
 char *typewhere(unsigned char n)
-#else
-char *typewhere(n)
-  unsigned char n ;
-#endif
   {
     switch(n) {
       case M_DBUILD: return(xdbuild) ;
index eb5a7026bbdb4513a932896dfbefdc79b44719be..27e9caec73b6f055f848bb3b88c5e3f09e649360 100644 (file)
@@ -33,128 +33,47 @@ extern FILE *m_errfile ;
 extern int m_line ;
 extern LOGICAL errexit ;
 
-void eprefix(
-#if defined(M_PROTO)
-  LOGICAL flag
-#endif
-  ) ;
-
-void m_errline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_error(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void m_err1(
-#if defined(M_PROTO)
-  char *text, const M_WCHAR *arg
-#endif
-  ) ;
-
-void m_mberr1(
-#if defined(M_PROTO)
-  char *text, const char *arg
-#endif
-  ) ;
-
-void m_err2(
-#if defined(M_PROTO)
-  const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2
-#endif
-  ) ;
-
-void m_err3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void m_err5(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
-             M_WCHAR *arg5
-#endif
-  ) ;
-
-void esuffix(
-#if defined(M_PROTO)
-  void
-#endif
-  ) ;
-
-void msgline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void msg1line(
-#if defined(M_PROTO)
-  char *text, char *arg1
-#endif
-  ) ;
-
-void skiptoend(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
-
-void m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *text
-#endif
-  ) ;
-
-void m_trace(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
-
-void warning1(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg
-#endif
-  ) ;
-
-void warning2(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2
-#endif
-  ) ;
-
-void warning3(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3
-#endif
-  ) ;
-
-void warning4(
-#if defined(M_PROTO)
-  char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4
-#endif
-  ) ;
+void eprefix(LOGICAL flag);
+
+void m_errline(char *text);
+
+void m_error(char *text);
+
+void m_err1(char *text, const M_WCHAR *arg);
+
+void m_mberr1(char *text, const char *arg);
+
+void m_err2(const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2);
+
+void m_err3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void m_err5(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4,
+             M_WCHAR *arg5);
+
+void esuffix(void);
+
+void msgline(char *text);
+
+void msg1line(char *text, char *arg1);
+
+void skiptoend(void);
+
+void m_wctrace(M_WCHAR *text);
+
+void m_trace(char *text);
+
+void warning(char *text);
+
+void warning1(char *text, M_WCHAR *arg);
+
+void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2);
+
+void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3);
+
+void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3, M_WCHAR *arg4);
 
 /* Write error message prefix */
-#if defined(M_PROTO)
 void eprefix(LOGICAL flag)
-#else
-void eprefix(flag)
-  LOGICAL flag ;
-#endif
   {
     if (flag) errexit = TRUE ;
     fprintf(stderr, "\n**** ") ;
@@ -164,16 +83,14 @@ void eprefix(flag)
 /* Writes part of an error message.  Called from m_malloc instead of
    m_err1, since PARSER's version of m_err1 calls m_malloc and recursive
    calls are possible when the heap is exhausted */
-void m_errline(text)
-char *text ;
+void m_errline(char *text)
 {
 fputs(text, stderr) ;
 fputs(text, m_errfile) ;
 }
 
 /* Writes an error message to standard error and file "error" */
-void m_error(text)
-  char *text ;
+void m_error(char *text)
   {
     eprefix(TRUE) ;
     fprintf(stderr,"%s", text) ;
@@ -184,13 +101,7 @@ void m_error(text)
 
 /* Writes an error message with one argument to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err1(char *text, const M_WCHAR *arg)
-#else
-void m_err1(text, arg)
-  char *text;
-  M_WCHAR *arg ;
-#endif
 {
 char *mb_arg;
 
@@ -203,13 +114,7 @@ skiptoend() ;
 m_free(mb_arg,"multi-byte string");
 }
 
-#if defined(M_PROTO)
 void m_mberr1(char *text, const char *arg)
-#else
-void m_err1(text, arg)
-  char *text;
-  char *arg ;
-#endif
 {
 eprefix(TRUE) ;
 fprintf(stderr, text, arg) ;
@@ -220,13 +125,7 @@ skiptoend() ;
 
 /* Writes an error message with two arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err2( const char *text, const M_WCHAR *arg1, const M_WCHAR *arg2)
-#else
-void m_err2(text, arg1, arg2)
-char *text;
-M_WCHAR *arg1, *arg2 ;
-#endif
 {
 char *mb_arg1, *mb_arg2;
 
@@ -243,13 +142,7 @@ m_free(mb_arg2,"multi-byte string");
 
 /* Writes an error message with three arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err3( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
-#else
-void m_err3(text, arg1, arg2, arg3)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3;
 
@@ -268,14 +161,8 @@ m_free(mb_arg3,"multi-byte string");
 
 /* Writes an error message with five arguments to standard error and file
    "error" */
-#if defined(M_PROTO)
 void m_err5( char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
             M_WCHAR *arg4, M_WCHAR *arg5)
-#else
-void m_err5(text, arg1, arg2, arg3, arg4, arg5)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3, *arg4, *arg5 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4, *mb_arg5;
 
@@ -296,37 +183,33 @@ m_free(mb_arg5,"multi-byte string");
 }
 
 /* Write error message suffix */
-void esuffix(M_NOPAR)
+void esuffix(void)
   {
     fprintf(stderr, " (line %d) ****\n", m_line) ;
     fprintf(m_errfile, " (line %d) ****\n", m_line) ;
     }
 
 /* Print something to both stderr and m_errfile */
-void msgline(text)
-  char *text ;
+void msgline(char *text)
   {
     fprintf(stderr, "%s", text) ;
     fprintf(m_errfile, "%s", text) ;
     }
 
 /* Print something to both stderr and m_errfile */
-void msg1line(text, arg1)
-  char *text, *arg1 ;
+void msg1line(char *text, char *arg1)
   {
     fprintf(stderr, text, arg1) ;
     fprintf(m_errfile, text, arg1) ;
     }
 
 /* Trace used for m_malloc trace output */
-void m_trace(text)
-char *text ;
+void m_trace(char *text)
 {
 m_errline(text) ;
 }
 
-void m_wctrace(text)
-M_WCHAR *text ;
+void m_wctrace(M_WCHAR *text)
 {
 char *mb_text;
 
@@ -336,8 +219,7 @@ m_free(mb_text,"multi-byte string");
 }
 
 /* Writes a nonfatal error message to standard error and file "error" */
-void warning(text)
-  char *text ;
+void warning(char *text)
   {
     eprefix(FALSE) ;
     fprintf(stderr,"%s", text) ;
@@ -347,13 +229,7 @@ void warning(text)
 
 /* Writes a nonfatal error message with one argument to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning1( char *text, M_WCHAR *arg)
-#else
-void warning1(text, arg)
-char *text;
-M_WCHAR *arg ;
-#endif
 {
 char *mb_arg;
 
@@ -367,13 +243,7 @@ m_free(mb_arg,"multi-byte string");
 
 /* Writes a nonfatal error message with two arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning2(char *text, M_WCHAR *arg1, M_WCHAR *arg2)
-#else
-void warning2(text, arg1, arg2)
-char *text;
-M_WCHAR *arg1, *arg2 ;
-#endif
 {
 char *mb_arg1, *mb_arg2;
 
@@ -389,13 +259,7 @@ m_free(mb_arg2,"multi-byte string");
 
 /* Writes a nonfatal error message with three arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning3(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3)
-#else
-void warning3(text, arg1, arg2, arg3)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3;
 
@@ -413,14 +277,8 @@ m_free(mb_arg3,"multi-byte string");
 
 /* Writes a nonfatal error message with four arguments to standard error
    and file "error" */
-#if defined(M_PROTO)
 void warning4(char *text, M_WCHAR *arg1, M_WCHAR *arg2, M_WCHAR *arg3,
              M_WCHAR *arg4)
-#else
-void warning4(text, arg1, arg2, arg3, arg4)
-char *text;
-M_WCHAR *arg1, *arg2, *arg3, *arg4 ;
-#endif
 {
 char *mb_arg1, *mb_arg2, *mb_arg3, *mb_arg4;
 
index aa94451946cc6623dd882fb9f412e1c6ef4ab74f..d326e97d6d9eaf22a8c6f570f254af28b4566751 100644 (file)
 Copyright 1988, 1989 Hewlett-Packard Co.
 */
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
 /* Exit function called by utilities used in PARSER and other programs in
    the MARKUP system */
-void m_exit(status)
-  int status ;
+void m_exit(int status)
   {
     exit(status) ;
     }
index 8cbaf5a2b3e3bb5ba8e4e29e96a1b5291d231dbf..1c1eb501c7f58f7cf4cc82d21a3a07e07cf74698 100644 (file)
@@ -37,9 +37,6 @@ with an error code of 0 if the files are the same, 1 if they differ, and
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 #define SAME 0
 /* different defined to be 0 as of 12-1-89, because fclndir now does
@@ -58,27 +55,13 @@ struct data {
 char linedir[] = "#line" ;
 char *p = linedir, *q = linedir + 1 ;
 
-void main(
-#if defined(M_PROTO)
-  int argc, char **argv
-#endif
-  ) ;
+void main(int argc, char **argv);
 
-void copyfile(
-#if defined(m_proto)
-  char *pfile1, char *pfile2
-#endif
-  ) ;
+void copyfile(char *pfile1, char *pfile2);
 
-int nextchar(
-#if defined (M_PROTO)
-  FILE *file, struct data *data
-#endif
-  ) ;
+int nextchar(FILE *file, struct data *data);
 
-void main(argc, argv)
-  int argc ;
-  char **argv ;
+void main(int argc, char **argv)
   {
     FILE *one, *two ;
     int c1, c2 ;
@@ -125,8 +108,7 @@ void main(argc, argv)
     }
 
 /* copyfile inserted by ced, 12-1-89. */
-void copyfile(pfile1,pfile2)
-  char *pfile1, *pfile2; 
+void copyfile(char *pfile1, char *pfile2)
 {
        int ret;
        char *pcmd;
@@ -136,20 +118,14 @@ void copyfile(pfile1,pfile2)
    spaces, and the terminating null */
        slen = strlen(pfile1) + strlen(pfile2) + 8;
        pcmd = (char *) malloc(slen);
-#if defined(MSDOS)
-       ret = snprintf(pcmd, slen, "copy %s %s",pfile1,pfile2);
-#else
        ret = snprintf(pcmd, slen, "cp %s %s",pfile1,pfile2);
-#endif
        ret = system(pcmd);
        ret = snprintf(pcmd, slen, "touch %s",pfile2);
        ret = system(pcmd);
        free(pcmd);
 }
 
-int nextchar(file, data)
-  FILE *file ;
-  struct data *data ;
+int nextchar(FILE *file, struct data *data)
   {
     while (data->linestart) {
       data->linestart = FALSE ;
index ec09eeea0b102b56f832df9960770a60a16bc04b..db343b98b2a5d63e2064ead15bd7ca10c00f938f 100644 (file)
                    Copyright 1986, 1987, 1988, 1989 Hewlett-Packard Co.
 */
 
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
-void m_err1(
-#if defined(M_PROTO)
-  const char *text, const char *arg
-#endif
-  ) ;
+void m_err1(const char *text, const char *arg);
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_inctest(
-#if defined(M_PROTO)
-  int *count, int limit, char *message
-#endif
-  ) ;
+void m_inctest(int *count, int limit, char *message);
 
 /* Increment a count and test against a limit */
-void m_inctest(count, limit, message)
-  int *count ;
-  int limit ;
-  char *message ;
+void m_inctest(int *count, int limit, char *message)
   {
     if (++*count <= limit) return ;
     m_err1("Internal error: %s exceeded", message) ;
index 63e3e9f63e392be52628d6cb42af5c49e8366c5b..9be8dde033e9cd77d4ec079503b80b3915033e37 100644 (file)
 #include "common.h"
 extern char m_chartype[M_CHARSETLEN] ;
 
-void m_initctype(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void m_initctype(void);
 
-void m_initctype(M_NOPAR)
+void m_initctype(void)
   {
     int i ;
 
index 51f2eb5aa94e2a688bb4c40b1c0298476c43e2c8..a08f4bf7965ac53e1e7dbbc647f123fcd2785551 100644 (file)
 #include <string.h>
 #include "basic.h"
 
-char *m_itoa(
-#if defined(M_PROTO)
-  int n, char *s
-#endif
-  ) ;
+char *m_itoa(int n, char *s);
 
-void reverse(
-#if defined(M_PROTO)
-  char *s
-#endif
-  ) ;
+void reverse(char *s);
 
-char *m_itoa(n, s)  /* convert n to characters in s */
-char s[]; 
-int n;
+char *m_itoa(int n, char *s)  /* convert n to characters in s */
 {   
     int sign ;
     char *p = s ;
@@ -59,8 +49,7 @@ int n;
     return(s) ;
 }
 
-void reverse(s)
-char s[];
+void reverse(char s[])
 {
     int c, i, j;
 
index f6cfe43c93b86dc2ac9f7197556732a5c32ad7cc..0e8c7ada7170c3e90288620dcf4ea9a370f56b26 100644 (file)
 
 #include "basic.h"
 
-LOGICAL m_letter(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
-
-#if defined(M_PROTO)
 LOGICAL m_letter(M_WCHAR c)
-#else
-LOGICAL m_letter(c)
-  M_WCHAR c ;
-#endif
 {
 if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) return(TRUE) ;
 return(FALSE) ;
index c479492c3f7bd1c7cfb800d7e70b632159e38daf..52cac2bc89b7e380942cdff0528d91354d21d846 100644 (file)
 
 #include "basic.h"
 
-int m_lower(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_lower(int c);
 
 
 
 /* Force a letter to lowercase */
-int m_lower(c)
-  int c ;
+int m_lower(int c)
   {
     if (c >= 'A' && c <= 'Z') c += 'a' - 'A' ;
     return(c) ;
index 11e7bf5c040948eb9715edc305c7fb694ae611ff..ff63f1348e7497e52eabdddc53f7eabe051c2d6b 100644 (file)
 /**/
 #include <stdlib.h>
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
 extern LOGICAL m_heapchk ;
 extern LOGICAL m_malftrace ;
 
-void m_errline(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void m_errline(char *text);
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_free(
-#if defined(M_PROTO)
-  void *block, char *msg
-#endif
-  ) ;
+void m_free(void *block, char *msg);
 
-void m_heapdump(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+void m_heapdump(void);
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void *m_realloc(
-#if defined(M_PROTO)
-  void *ptr, int size, char *msg
-#endif
-  ) ;
+void *m_realloc(void *ptr, int size, char *msg);
 
-void *m_trace(
-#if defined(M_PROTO)
-  char *text
-#endif
-  ) ;
+void *m_trace(char *text);
 
-void *m_wctrace(
-#if defined(M_PROTO)
-  M_WCHAR *text
-#endif
-  ) ;
+void *m_wctrace(M_WCHAR *text);
 
 void m_free(void *block, char *msg)
   {
     char buffer[32] ;
 
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (m_malftrace) {
 #if defined(hpux) || defined(_AIX) || defined(sun)
       snprintf(buffer, 32, "%5x:%5x",
@@ -105,62 +67,16 @@ void m_free(void *block, char *msg)
       m_trace("\n") ;
       }      
     free(block) ;
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
-    }
-
-#if defined(MSDOS)
-void m_heapdump(M_NOPAR)
-  {
-    struct _heapinfo hinfo ;
-    int heapstatus ;
-
-    heapstatus = _heapchk() ;
-    if (heapstatus == _HEAPOK || heapstatus == _HEAPEMPTY) return ;
-    printf("\nDumping heap:\n") ;
-    hinfo._pentry = NULL ;
-    while ((heapstatus = _heapwalk(&hinfo)) == _HEAPOK) 
-      printf("%6s block at %p of size %4.4X\n",
-             hinfo._useflag == _USEDENTRY ? "USED" : "FREE",
-             hinfo._pentry, hinfo._size) ;
-    switch(heapstatus) {
-      case _HEAPEMPTY:
-        printf("OK - empty heap\n\n") ;
-        break ;
-      case _HEAPEND:
-        printf("OK - end of heap\n\n") ;
-        break ;
-      case _HEAPBADPTR:
-        printf("Error - bad pointer to heap\n\n") ;
-        break ;
-      case _HEAPBADBEGIN:
-        printf("Error - bad start of heap\n\n") ;
-        break ;
-      case _HEAPBADNODE:
-        printf("Error - bad node in heap\n\n") ;
-        break ;
-      }
-    m_exit(TRUE) ;
     }
-#endif
 
-void *m_malloc(size, msg)
-  int size ;
-  char *msg ;
+void *m_malloc(int size, char *msg)
   {
     char buffer[32] ;
     void *p ;
 
     size *= sizeof(M_WCHAR);
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! size) return(NULL) ;
     p = (void *) malloc(size) ;
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! p) {
       m_errline("Unable to allocate space for ") ;
       m_errline(msg) ;
@@ -185,23 +101,14 @@ void *m_malloc(size, msg)
     return(p) ;
     }
 
-void *m_realloc(ptr, size, msg)
-  void *ptr ;
-  int size ;
-  char *msg ;
+void *m_realloc(void *ptr, int size, char *msg)
   {
     char buffer[32] ;
     void *p ;
 
     size *= sizeof(M_WCHAR);
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! size) return(NULL) ;
     p = (void *) realloc(ptr, size) ;
-#if defined(MSDOS)
-    if (m_heapchk) m_heapdump() ;
-#endif
     if (! p) {
       m_errline("Unable to re-allocate space for ") ;
       m_errline(msg) ;
index 139916f31cab1213757d2408d8e431d56b74d5b7..13e45b0a632a2f9944c6eada0f35c2dabe7f9a16 100644 (file)
 */
 
 #include <stdio.h>
-#if defined(MSDOS)
-#include <process.h>
-#endif
 #include "basic.h"
 
 extern FILE *m_errfile ;
 
-void m_exit(
-#if defined(M_PROTO)
-  int status
-#endif
-  ) ;
+void m_exit(int status);
 
-void m_openchk(
-#if defined(M_PROTO)
-  FILE **ptr, char *name, char *mode
-#endif
-  ) ;
+void m_openchk(FILE **ptr, char *name, char *mode);
 
 /* Open a file and check that the open succeeded */
-void m_openchk(ptr, name, mode)
-  FILE **ptr ;
-  char *name, *mode ;
+void m_openchk(FILE **ptr, char *name, char *mode)
   {
     *ptr = fopen(name, mode) ;
     if (*ptr) return ;
index 14d1cad10c91e74d50258a7a7a70b4ab2c9ee716..ef46f325ae8a2310a3a4ff6e15f72387a40c6af4 100644 (file)
@@ -33,13 +33,7 @@ This product and information is proprietary of Tandem Computers Incorporated.
 /* Check to see if string is a valid value for parameter par.  If so
    return a pointer to the keyword if it's a keyword parameter and otherwise
    a pointer to string.  If not valid, return FALSE. */
-#if defined(M_PROTO)
 const M_WCHAR *m_partype(const int par , const M_WCHAR *string )
-#else
-M_WCHAR *m_partype(par, string)
-  int par ;
-  M_WCHAR *string ;
-#endif /* M_PROTO */
   {
     LOGICAL first = TRUE ;
     int kw ;
index 465090e3be56f33d8502a5424b73a7f1a2f6964e..9f3ff6b349d77bd57aebd372189b2e0778b06160 100644 (file)
@@ -28,7 +28,7 @@
 extern FILE *ifile;
 
 /* Getachar returns the next character from the input stream */
-int getachar(M_NOPAR)
+int getachar(void)
 {
 int  c;
 M_WCHAR wc,wnl;
@@ -72,9 +72,7 @@ return((int) wc);
 }
 
 /* Reads the next token stored in a packed trie (as defined by context.dat) */
-int gettoken(c, context)
-int *c;
-int context;
+int gettoken(int *c, int context)
 {
 int hold[MAXD + 1];
 int ucase;
@@ -123,8 +121,7 @@ return(M_NULLVAL);
 }
 
 /* Reads a literal (called after the opening quotation mark is read) */
-LOGICAL litproc(delim)
-int delim;
+LOGICAL litproc(int delim)
 {
 int n, i, number;
 M_WCHAR *p, *pStart; /* bigger than wide versions of lit or lita */
@@ -215,8 +212,7 @@ return(FALSE);
 
 /* Returns a context-dependent delimiter string to input stream so
    characters can be reread one at a time in another context */
-void undodelim(delim)
-M_WCHAR *delim;
+void undodelim(M_WCHAR *delim)
 {
 M_WCHAR *p;
 
@@ -234,8 +230,7 @@ while (TRUE)
 /* Returns a character to the input stream to read again later. Unexplained
    problems occurred using standard ungetc procedure; hence
    explicit declaration of buffer for read-ahead characters */
-void ungetachar(c)
-int c;
+void ungetachar(int c)
 {
 M_WCHAR wnl;
 
index 8f6ec8c9d6e97669d6adfea762168b1a9a6dc869..89339678dcf63d42f609d2a83da69243179849b6 100644 (file)
@@ -25,8 +25,7 @@
 /* Sparse.c has a procedure used with the tables generated by program
    CONTEXT when the sparse option is used */
 
-int m_sprscon(i, j)
-  int i, j ;
+int m_sprscon(int i, int j)
   {
     int k ;
 
index 85ca88396ad1fec11f75b65a0cf3d0fd0a925c1e..b173c5b560388f1a5dc4923edeeac47eade5a4fe 100644 (file)
 #if defined(sparse)
 #define m_newcon(i, j) m_sprscon(i, j)
 
-int m_sprscon(
-#if defined(M_PROTO)
-  int i, int j
-#endif
-  ) ;
+int m_sprscon(int i, int j);
 
 #else
 #define m_newcon(i, j) m_nextcon[i][j]
index ac8373b8c5385ba29abcfc47fc3148298e94e598..eca3dc21a5eedf0860a22d4dcdb23924339ae76c 100644 (file)
 
 #include <stdio.h>
 
-#if defined(MSDOS)
-#include <stdlib.h>
-#endif
-
 #include "basic.h"
 #include "common.h"
 #include "trie.h"
@@ -45,26 +41,12 @@ extern FILE *m_errfile ;
 
 extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
 
-void *m_malloc(
-#if defined(M_PROTO)
-  int size, char *msg
-#endif
-  ) ;
+void *m_malloc(int size, char *msg);
 
-void m_entercharintrie(
-#if defined(M_PROTO)
-  M_TRIE **currentnode, M_WCHAR c
-#endif
-  ) ;
+void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c);
 
 /* Enters the next character of a string into a trie */
-#if defined(M_PROTO)
 void m_entercharintrie(M_TRIE **currentnode, M_WCHAR c)
-#else
-void m_entercharintrie(currentnode, c)
-  M_TRIE **currentnode ;
-  M_WCHAR c ;
-#endif
   {
     M_TRIE *newnode ;
 
@@ -99,7 +81,7 @@ void m_entercharintrie(currentnode, c)
    } /* end entertree */
 
 /* Gets a new node for a trie */
-M_TRIE *m_gettrienode(M_NOPAR)
+M_TRIE *m_gettrienode(void)
   {
     M_TRIE *new ;
 
@@ -112,13 +94,7 @@ M_TRIE *m_gettrienode(M_NOPAR)
 
 /* M_lookfortrie(p, xtrie) looks for string p in the specified trie,
    returning its data value if found and otherwise FALSE */
-#if defined(M_PROTO)
 void *m_lookfortrie( const M_WCHAR *p , const M_TRIE *xtrie )
-#else
-void *m_lookfortrie(p, xtrie)
-  M_WCHAR *p ;
-  M_TRIE *xtrie ;
-#endif /* M_PROTO */
   {
     M_TRIE *currentnode ;
 
@@ -141,10 +117,7 @@ void *m_lookfortrie(p, xtrie)
     }
 
 /* Enters a string and associated data value into a trie */
-void *m_ntrtrie(p, xtrie, dataval)
-  M_WCHAR *p ;
-  M_TRIE *xtrie ;
-  void *dataval ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval)
   {
     M_TRIE *currentnode ;
     void *n ;
index 6b3821a618777a110d8eeb3c38c6d4315d953a1f..6660e2bb0d8c87c8955c646ee4d0d5cd5da132e2 100644 (file)
@@ -51,26 +51,10 @@ struct m_ptrie {
   } ;
 
 
-M_TRIE *m_gettrienode(
-#if defined(M_PROTO)
-  M_NOPAR
-#endif
-  ) ;
+M_TRIE *m_gettrienode(void);
 
-void *m_lookfortrie(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_TRIE *xtrie
-#endif
-  ) ;
+void *m_lookfortrie(const M_WCHAR *p, const M_TRIE *xtrie);
 
-void *m_ntrtrie(
-#if defined(M_PROTO)
-  M_WCHAR *p, M_TRIE *xtrie, void *dataval
-#endif
-  ) ;
+void *m_ntrtrie(M_WCHAR *p, M_TRIE *xtrie, void *dataval);
 
-void *m_resettrie(
-#if defined(M_PROTO)
-  M_TRIE *xtrie, M_WCHAR *p, void *value
-#endif
-  ) ;
+void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value);
index 8d15bf9baa0cdda72a7150975704b0992f498972..4225352bfade2bb0cd00c7fb0f6d2812ac5f3b12 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
-    void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+    void (*proc)(FILE *file, void *value));
 
-void printval(
-#if defined(M_PROTO)
-  FILE *file, void *value
-#endif
-  ) ;
+void printval(FILE *file, void *value);
 
 /* Count the descendants of a node in order to generate declarations for
    the packed form of a trie*/
-void countdown(parent, count)
-  M_TRIE *parent ;
-  int *count ;
+void countdown(M_TRIE *parent, int *count)
   {
     M_TRIE *child ;
 
@@ -66,17 +52,8 @@ void countdown(parent, count)
 
 /* Output descendants of a node for the declaration of a trie, in packed
    or normal format*/
-void dumpnode(first, file, trieptr, count, proc)
-  LOGICAL *first ;
-  FILE *file ;
-  M_TRIE *trieptr ;
-  int *count ;
-  void (*proc) (
-#if defined (M_PROTO)
-    FILE *file, 
-    void *value
-#endif
-    ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+              void (*proc) (FILE *file, void *value))
   {
     M_TRIE *p ;
     int savecount ;
@@ -106,9 +83,7 @@ void dumpnode(first, file, trieptr, count, proc)
 
 
 /* Most common procedure passed to dumpptrie */
-void printval(file, value)
-  FILE *file ;
-  void *value ;
+void printval(FILE *file, void *value)
   {
     fprintf(file, ", %ld", (long) value) ;
     }
index 1e27b6df92098fc92a82e176e8b8ed2aa492dc6b..e69fd1a7880d91c77ea2010e75fc0942fa211881 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void m_dumptrie(
-#if defined(M_PROTO)
-  FILE *file, M_TRIE *xtrie, char *extname, int *count,
-  void (*proc)(void *value)
-#endif
-  ) ;
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count,
+  void (*proc)(void *value));
 
 /* Write the C declaration of a trie */
-void m_dumptrie(file, xtrie, extname, count, proc)
-  FILE *file ;
-  M_TRIE *xtrie ;
-  char *extname ;
-  int *count ;
-  void (*proc)(
-#if defined(M_PROTO)
-    void *value
-#endif
-    ) ;
+void m_dumptrie(FILE *file, M_TRIE *xtrie, char *extname, int *count,
+                void (*proc)(void *value))
   {
     int firstson ;
     M_TRIE *p ;
index b837cae91e5b30d086004b1b04415ea6e33b3ee5..faa036c9e20e1ed014fb2c218de3dfd82976f561 100644 (file)
 #include "basic.h"
 #include "trie.h"
 
-void countdown(
-#if defined(M_PROTO)
-  M_TRIE *parent, int *count
-#endif
-  ) ;
+void countdown(M_TRIE *parent, int *count);
 
-void dumpnode(
-#if defined(M_PROTO)
-  LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
-    void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpnode(LOGICAL *first, FILE *file, M_TRIE *trieptr, int *count,
+    void (*proc)(FILE *file, void *value));
 
-void dumpptrie(
-#if defined(M_PROTO)
-  M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
-  void (*proc)(FILE *file, void *value)
-#endif
-  ) ;
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file, char *externdef, char *defdef,
+  void (*proc)(FILE *file, void *value));
 
 /* Write the declaration of a packed trie to the specified files */
-void dumpptrie(intname, extname, file, externdef, defdef, proc)
-  M_TRIE *intname ;
-  char *extname ;
-  FILE *file ;
-  char *externdef ;
-  char *defdef ;
-  void (*proc) (
-#if defined (M_PROTO)
-    FILE *file,
-    void *value
-#endif
-    ) ;
+void dumpptrie(M_TRIE *intname, char *extname, FILE *file,
+               char *externdef, char *defdef,
+               void (*proc) (FILE *file, void *value))
   {
     LOGICAL first = TRUE ;
     int count = 0 ;
index 87af06c8fed08e98f766c3cce278fe78719936d1..cad82ed57fa891547bec8229857d79ef99500c96 100644 (file)
 
 extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
 
-int m_packedlook(
-#if defined(M_PROTO)
-  M_PTRIE *xptrie,
-  M_WCHAR *name
-#endif
-  ) ;
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name);
 
 /* Look for the string NAME in the packed trie PTRIE */
-int m_packedlook(xptrie, name)
-M_PTRIE *xptrie ;
-M_WCHAR *name ;
+int m_packedlook(M_PTRIE *xptrie, M_WCHAR *name)
 {
 int current = 0 ;
 int i ;
index 69f01f6599597069cd484b1030d99ddaef247134..ad795ab305396e22b2be1486674c1597d310fb1a 100644 (file)
 extern M_CHARTYPE m_ctarray[M_CHARSETLEN] ;
 
 /* Changes the value associated with an entry in a trie. */
-void *m_resettrie(xtrie, p, value)
-  M_TRIE *xtrie ;
-  M_WCHAR *p ;
-  void *value ;
+void *m_resettrie(M_TRIE *xtrie, M_WCHAR *p, void *value)
   {
     M_TRIE *currentnode ;
 
index 5a8b2cd203d279eb7b00933da84ad70bdee2102b..627681b7089bfb77a32439956fdc620ad46bdc6b 100644 (file)
 #include "common.h"
 extern M_CHARTYPE m_ctarray[256] ;
 
-int m_wcupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const M_WCHAR *q
-#endif
-  ) ;
+int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q);
 
-int m_wcmbupstrcmp(
-#if defined(M_PROTO)
-  const M_WCHAR *p, const char *q
-#endif
-  ) ;
+int m_wcmbupstrcmp(const M_WCHAR *p, const char *q);
 
-int m_mbmbupstrcmp(
-#if defined(M_PROTO)
-  const char *p, const char *q
-#endif
-  ) ;
+int m_mbmbupstrcmp(const char *p, const char *q);
 
-#if defined(M_PROTO)
 int m_wcupstrcmp(const M_WCHAR *p, const M_WCHAR *q )
-#else
-int m_wcupstrcmp(p, q)
-  M_WCHAR *p, *q ;
-#endif /* M_PROTO */
   {
     do {
       if (m_ctupper(*p) < m_ctupper(*q)) return(-1) ;
@@ -65,13 +48,7 @@ int m_wcupstrcmp(p, q)
     return(0) ;
     }
 
-#if defined(M_PROTO)
 int m_wcmbupstrcmp(const M_WCHAR *p, const char *q)
-#else
-int m_wcmbupstrcmp(p, q)
-  M_WCHAR *p;
-  char *q ;
-#endif
   {
   M_WCHAR *wc;
   int      retval;
@@ -82,13 +59,7 @@ int m_wcmbupstrcmp(p, q)
   return retval;
   }
 
-#if defined(M_PROTO)
 int m_mbmbupstrcmp(const char *p, const char *q)
-#else
-int m_mbmbupstrcmp(p, q)
-  char *p;
-  char *q ;
-#endif
   {
   M_WCHAR *w_p, *w_q;
   int      retval;
index 4fbc5c192cf9a9c1308cc4f59b62e5c341d060b9..8cb9181dd19f6176a79ab825e2765fd68beb7f2c 100644 (file)
 
 #include "basic.h"
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_upper(int c);
 
-int m_upper(c)
-  int c ;
+int m_upper(int c)
   {
     if (c >= 'a' && c <= 'z') c += 'A' - 'a' ;
     return(c) ;
index b5c37861f4a487a85be40a2b25e71f42ef4e9661..a0a307fc3ba82f03f618685c4e14bcc5439f3c50 100644 (file)
 
 #include "basic.h"
 
-int m_upper(
-#if defined(M_PROTO)
-  int c
-#endif
-  ) ;
+int m_upper(int c);
 
-int m_upstrcmp(
-#if defined(M_PROTO)
-  char *p, char *q
-#endif
-  ) ;
+int m_upstrcmp(char *p, char *q);
 
-int m_upstrcmp(p, q)
-  char *p, *q ;
+int m_upstrcmp(char *p, char *q)
   {
     do {
       if (m_upper((int) *p) < m_upper((int) *q)) return(-1) ;
index 08bf275ab4dc91ecb87890b839eb4869e2960db4..23ded0c8c956bbd76e4eb781cbb38e9974bad592 100644 (file)
 
 
 /* compare two wide character strings */
-#if defined(M_PROTO)
 int w_strcmp(const M_WCHAR *string1, const M_WCHAR *string2)
-#else
-int w_strcmp(string1, string2)
-M_WCHAR *string1;
-M_WCHAR *string2;
-#endif
 {
 M_WCHAR c1, c2, null;
 
@@ -60,14 +54,7 @@ while (1)
 
 
 /* compare two wide character strings to length "n" */
-#if defined(M_PROTO)
 int w_strncmp(const M_WCHAR *string1, const M_WCHAR *string2, int max)
-#else
-int w_strcmp(string1, string2, max)
-M_WCHAR *string1;
-M_WCHAR *string2;
-int      max;
-#endif
 {
 M_WCHAR c1, c2, null;
 
@@ -91,13 +78,7 @@ return 0;
 
 
 /* copy a wide character string */
-#if defined(M_PROTO)
 M_WCHAR *w_strcpy(M_WCHAR *string1, const M_WCHAR *string2)
-#else
-M_WCHAR *w_strcpy(string1, string2)
-M_WCHAR *string1;
-M_WCHAR *string2;
-#endif
 {
 M_WCHAR *string1start;
 
@@ -110,14 +91,7 @@ return string1start;
 
 
 /* copy a wide character string, stopping after "max" moves */
-#if defined(M_PROTO)
 M_WCHAR *w_strncpy(M_WCHAR *string1, const M_WCHAR *string2, int max)
-#else
-M_WCHAR *w_strncpy(string1, string2, max)
-M_WCHAR *string1;
-M_WCHAR *string2;
-int      max;
-#endif
 {
 M_WCHAR *string1start;
 
@@ -130,12 +104,7 @@ return string1start;
 
 
 /* get the length of a wide character string */
-#if defined(M_PROTO)
 int w_strlen(const M_WCHAR *string)
-#else
-int w_strlen(string)
-M_WCHAR *string;
-#endif
 {
 int length;
 
@@ -148,12 +117,7 @@ return length;
 
 
 /* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
 M_WCHAR *w_strchr(M_WCHAR *string, const M_WCHAR chr)
-#else
-M_WCHAR *w_strchr(string, chr)
-M_WCHAR *string, chr;
-#endif
 {
 M_WCHAR *where;
 
@@ -173,12 +137,7 @@ else
 
 
 /* find wide character "chr" in wide string "string" */
-#if defined(M_PROTO)
 M_WCHAR *w_strstr(M_WCHAR *string1, M_WCHAR *string2)
-#else
-M_WCHAR *w_strstr(string1, string2)
-M_WCHAR *string1, *string2;
-#endif
 {
 M_WCHAR *where1, *where2;
 
@@ -213,12 +172,7 @@ return NULL;
 
 
 /* make a multi-byte string from a wide character string */
-#if defined(M_PROTO)
 char *MakeMByteString(const M_WCHAR *wc_string)
-#else
-char *MakeMByteString(wc_string)
-M_WCHAR *wc_string;
-#endif
 {
 char   *mb_string;
 int     length, retVal;
@@ -248,12 +202,7 @@ return mb_string;
 
 
 /* make a wide character string from a multi-byte string */
-#if defined(M_PROTO)
 M_WCHAR *MakeWideCharString(const char *mb_string)
-#else
-M_WCHAR *MakeWideCharString(mb_string)
-char *mb_string;
-#endif
 {
 M_WCHAR *wc_string, *wc_stringStart;
 int      length, incr;
@@ -289,8 +238,7 @@ return wc_stringStart;
 
 
 /* Get-wide-char procedure */
-int mb_getwc(m_ptr)
-void *m_ptr;
+int mb_getwc(void *m_ptr)
 {
 int  c;
 M_WCHAR wc;
index 50b1755cc51e0e36818da7b195b8a5cf8aee3a23..39087f8c61fb0da5fd6d7f73d0150274f9cebfc1 100644 (file)
 
 #include "basic.h"
 
-LOGICAL m_whitespace(
-#if defined(M_PROTO)
-  M_WCHAR c
-#endif
-  ) ;
+LOGICAL m_whitespace(M_WCHAR c);
 
 /* Test if character c is a blank, tab, or carriage return */
-#if defined(M_PROTO)
 LOGICAL m_whitespace(M_WCHAR c)
-#else
-LOGICAL m_whitespace(c)
-  M_WCHAR c ;
-#endif
 {
 char mb_c[32]; /* arbitrarily large */
 int  length;
index 4cfebb9a4e70c3e61b3cb52fa8126e09bbe92ef4..04351eb01076824aeca327b312cb0a75f632a30b 100644 (file)
@@ -2360,7 +2360,7 @@ build_dtIconShell( void )
 /*******************************************************************************
     NewGraphicsOp - sets the text in the instruction line
 *******************************************************************************/
-static void NewGraphicsOp()
+static void NewGraphicsOp(void)
 {
     static char *fillOnStr = NULL;
     int fillOp = False;
index b3cff7351c564fd4a551c0bd62b14abeb70754cf..67cbdcff5d1bc45b22ee1ad8d70f3343c46f8ab3 100644 (file)
@@ -801,7 +801,7 @@ Do_ButtonOp(
  *            the middle of a polyline or polygon is no longer allowed.    *
  ***************************************************************************/
 void
-EndPolyOp()
+EndPolyOp(void)
 {
     Anchored = False;
     Clear_ClickCount();
index 30c869a1a0a17a641f77b4000ee8859f6d567557..1256f8fe113261688b278f3385b04fa0083f16e9 100644 (file)
@@ -658,7 +658,7 @@ edit_notifier(char* fname, Tt_message msg, int clear)
 
 
 void
-send_tt_saved()
+send_tt_saved(void)
 {
         int mark;
         int fd;
index 2f7cf266cb9bc975515361c2f5a376ddcc2a33e3..a4324ade3d2d99203f6629d4a5a62e7958b541e9 100644 (file)
@@ -1588,7 +1588,7 @@ stat_out(
  *                                                                         *
  *X11***********************************************************************/
 void
-PixelTableClear()
+PixelTableClear(void)
 {
     pixelTable.numItems = 0;
     pixelTable.lastFound = 0;
@@ -2228,9 +2228,7 @@ Set_Gfx_Labels(
  ***************************************************************************/
 #define MAX_MSG_STR   1024
 
-static int jskXerrorDebug(disp, error_event)
-Display *disp;
-XErrorEvent *error_event;
+static int jskXerrorDebug(Display *disp, XErrorEvent *error_event)
 {
     char error_msg[MAX_MSG_STR];
 
@@ -2252,8 +2250,7 @@ XErrorEvent *error_event;
  *                                                                         *
  * Purpose:   This routine is needed in order to get good bfa (bba) stats  *
  **************************************************************************/
-static int jskXerrorIODebug(disp)
-Display *disp;
+static int jskXerrorIODebug(Display *disp)
 {
     exit (-1);
     return (TRUE);
@@ -2295,8 +2292,8 @@ SaveSession( void )
     if ((fd = creat(path, S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP)) == -1)
     {
         tmpStr = GETSTR(16,24, "Couldn't save session to file");
-        tmpStr2 = (char *)XtMalloc(strlen(tmpStr) + strlen(path)+ 3);
-        snprintf(tmpStr2, strlen(tmpStr) + strlen(path) + 3, "%s: %s\n", tmpStr, path);
+        tmpStr2 = (char *)XtMalloc(strlen(tmpStr) + strlen(path) + 4); /* +4 = ':', ' ', '\n' and '\0' */
+        snprintf(tmpStr2, strlen(tmpStr) + strlen(path) + 4, "%s: %s\n", tmpStr, path);
         _DtSimpleErrnoError(progName, DtError, NULL, tmpStr2, NULL);
         XtFree(tmpStr2);
         XtFree ((char *)path);
@@ -2345,6 +2342,7 @@ SaveSession( void )
        fprintf(stderr, "write() to session failed\n");
         XtFree ((char *)path);
         XtFree ((char *)name);
+        close(fd);
         return;    
     }
 
@@ -2484,8 +2482,7 @@ GetSessionInfo( void )
  * Purpose:   Put the file name in the window title...                     *
  ***************************************************************************/
 void
-ChangeTitle(
-        )
+ChangeTitle(void)
 {
     static char *dialogTitle = NULL;
     Arg al[10];
index 4c4a3ea5b7f65c0e67a73f1bf0c9ab53c21a3069..8d051be81fc5938aa875459c3d83a1ab6e1d3082 100644 (file)
@@ -42,14 +42,13 @@ static DtActionInvocationID actionId = 0;
 
        /* *****  DtAction functions  ***** */
 
-static void    DbReloadProc(cd)
-    XtPointer cd;
+static void    DbReloadProc(XtPointer cd)
 {
     DPR(("DbReloadProc(): action database updated\n"));
     DtDbLoad();        /* Pick up any dynamic changes to the database files */
 }
 
-static bool    init_action_env()
+static bool    init_action_env(void)
 {
     init_window_env();
 
@@ -68,12 +67,8 @@ static bool  init_action_env()
     return actionEnabled;
 }
 
-static void    action_cb(id, cd, args, argcnt, status)
-    long unsigned      id;
-    XtPointer  cd;     /* unused */
-    DtActionArg        *args;
-    int                argcnt;
-    DtActionStatus     status;
+static void    action_cb(long unsigned id, XtPointer cd /* unused */,
+                          DtActionArg *args, int argcnt, DtActionStatus status)
 {
     if (actionId == 0) {
        DPR(("action_cb(): invalid id %d != %d\n", id, actionId));
@@ -134,7 +129,7 @@ static void action_cb(id, cd, args, argcnt, status)
 }
 
 
-static void    wait_action_done()
+static void    wait_action_done(void)
 {
     XEvent event;
 
@@ -157,9 +152,7 @@ static void wait_action_done()
     return;
 }
 
-int    invoke_action(action, host)
-    char       *action;
-    char       *host;
+int    invoke_action(char *action, char *host)
 {
     if (init_action_env() != True)     return ErrInternal;
   
@@ -188,8 +181,7 @@ int invoke_action(action, host)
 }
 
 
-void   send_dtims_msg(msg, errcode)
-    int        msg, errcode;
+void   send_dtims_msg(int msg, int errcode)
 {
     XEvent ev;
 
@@ -204,11 +196,8 @@ void       send_dtims_msg(msg, errcode)
     XSendEvent(Dpy, XtWindow(TopW), False, NoEventMask, &ev);
 }
 
-void   dtims_msg_proc(w, cd, event, continue_dispatch)
-    Widget w;
-    XtPointer cd;
-    XEvent *event;
-    Boolean *continue_dispatch;        /* never changed */
+void   dtims_msg_proc(Widget w, XtPointer cd, XEvent *event,
+                       Boolean *continue_dispatch /* never changed */)
 {
     XClientMessageEvent *ev = &event->xclient;
     int        msg, errcode;
index 3d60cd0ec0fb9c3c5fbbeb054dd37898af0094ed..669623c46752f7e9c1bd9f1d20194ac32371265e 100644 (file)
@@ -36,7 +36,7 @@ typedef       enum {
     /* local func */
 static int     shell_type(/* shell */);
 
-int    set_cmd_env()
+int    set_cmd_env(void)
 {
     int                ret = NoError;
     char       **aliases = (char **)0;
@@ -63,7 +63,7 @@ int   set_cmd_env()
 }
 
 
-int    get_user_environ()
+int    get_user_environ(void)
 {
     int                ret = NoError;
     char       buf[BUFSIZ], *p;
@@ -138,12 +138,9 @@ int        get_user_environ()
 }
 
 
-int    expand_string(in_str, out_str, out_len, ims)
-    char       *in_str, *out_str;
-    int                out_len;
-    ImsConf    *ims;
+int    expand_string(char *in_str, char *out_str, int out_len, ImsConf *ims)
 {
-    register char      *p, *q, *ep;
+    char       *p, *q, *ep;
     char        str[20];
     int                len = 0;
     UserEnv    *uenv = &userEnv;
@@ -220,8 +217,7 @@ int expand_string(in_str, out_str, out_len, ims)
 }
 
 
-static int     shell_type(shell)
-    char       *shell;
+static int     shell_type(char *shell)
 {
     char       *p;
     int                len;
@@ -245,9 +241,7 @@ static int  shell_type(shell)
 }
 
 
-int    make_new_environ(oenv, sel)
-    OutEnv     *oenv;
-    UserSelection      *sel;
+int    make_new_environ(OutEnv *oenv, UserSelection *sel)
 {
     ImsConf    *ims;
     EnvEnt     *ep, *ep2;
@@ -362,8 +356,8 @@ int make_new_environ(oenv, sel)
     return NoError;
 }
 
-int    put_new_environ(oenv)   /* print modified environment variables */
-    OutEnv     *oenv;
+/* print modified environment variables */
+int    put_new_environ(OutEnv *oenv)
 {
     EnvEnt     *ep;
     char       tmpbuf[BUFSIZ], *bp, *vp;
@@ -433,8 +427,7 @@ int put_new_environ(oenv)   /* print modified environment variables */
 }
 
 
-int    set_remote_env(ptr, env_pass)
-    char       *ptr, *env_pass;
+int    set_remote_env(char *ptr, char *env_pass)
 {
     char       *bp = ptr, *ep;
     char       **ls, **ls2, **pp, **pp2;
@@ -477,8 +470,7 @@ int set_remote_env(ptr, env_pass)
 }
 
 # ifdef        old_hpux
-char   *xhp_xinput_name(locale)
-    char       *locale;
+char   *xhp_xinput_name(char *locale)
 {
     char       *xinput_name = "X@INPUT";
     char       **pp, *p;
@@ -513,8 +505,7 @@ char        *xhp_xinput_name(locale)
 }
 
 
-char   *get_real_locale(locale, aliases)
-    char       *locale, ***aliases;
+char   *get_real_locale(char *locale, char ***aliases)
 {
     int                i;
     int                match_idx = -1;
index 18c37b8f57b5e144b1c260301ab705eeeb31122f..f611fc39a2a99d5210946575a5fbbf93abe0ace2 100644 (file)
@@ -27,7 +27,7 @@
 #include       <sys/stat.h>
 
     /* local func */
-static void    put_selection_entry(/* fp, ent_type, is_valid, val, val2 */);
+static void put_selection_entry(FILE *fp, int ent_type, bool is_valid, char *val, char *val2);
 static void    put_ims_conf(/* fp, sel */);
 static void    put_select_mode(/* fp, select_mode */);
 static void    put_selection_header(/* fp */);
@@ -38,7 +38,7 @@ static char   *SelectFileFormat = NULL;
 static bool    cmdconf_initialized = False;
 
 
-int    create_xims_dir()
+int    create_xims_dir(void)
 {
     int                ret = NoError;
     char       path[MAXPATHLEN];
@@ -77,9 +77,7 @@ int   create_xims_dir()
     return ret;
 }
 
-int    init_log_file(org_path, check_size)
-    char       *org_path;
-    int                check_size;
+int    init_log_file(char *org_path, int check_size)
 {
     char       path[MAXPATHLEN];
     bool       log_exists = False;
@@ -124,8 +122,7 @@ _err:
 }
 
 
-int    set_errorlog(path)
-    char       *path;
+int    set_errorlog(char *path)
 {
     int        fd;
 
@@ -146,7 +143,7 @@ int set_errorlog(path)
 }
 
 
-int    read_cmd_conf()
+int    read_cmd_conf(void)
 {
     char       buf[MAXPATHLEN];
     CmdConf    *conf = &Conf;
@@ -377,7 +374,7 @@ _default:
     return NoError;
 }
 
-int    expand_cmd_conf()
+int    expand_cmd_conf(void)
 {
     char       **pp[20 + NUM_ACTIONS], *p, buf[BUFSIZ];
     int                i, j, n;
@@ -434,9 +431,7 @@ int expand_cmd_conf()
 }
 
 
-int    read_imsconf(conf, ims_name, ims_fname)
-    ImsConf    *conf;
-    char       *ims_name, *ims_fname;
+int    read_imsconf(ImsConf *conf, char *ims_name, char *ims_fname)
 {
     int                ret = NoError;
     char       path[MAXPATHLEN];
@@ -533,9 +528,7 @@ int read_imsconf(conf, ims_name, ims_fname)
     return ret;
 }
 
-int    check_ims_conf(ims, ims_name)
-    ImsConf    *ims;
-    char       *ims_name;
+int    check_ims_conf(ImsConf *ims, char *ims_name)
 {
     int                ret = NoError;
     char       *missing_entry = NULL;
@@ -570,9 +563,7 @@ int check_ims_conf(ims, ims_name)
     return ret;
 }
 
-int    read_localeconf(list, locale_name)
-    ImsList    *list;
-    char       *locale_name;
+int    read_localeconf(ImsList *list, char *locale_name)
 {
     char       path[MAXPATHLEN];
     char       *lp, *valp, *pp;
@@ -669,9 +660,7 @@ int read_localeconf(list, locale_name)
     return list->status;
 }
 
-int    read_user_selection(fselp, locale_name)
-    FileSel    **fselp;
-    char       *locale_name;
+int    read_user_selection(FileSel **fselp, char *locale_name)
 {
     char       path[MAXPATHLEN];
     int                ret;
@@ -702,9 +691,7 @@ int read_user_selection(fselp, locale_name)
     return NoError;
 }
 
-int    read_selection_file(fsel, fp)
-    FileSel    *fsel;
-    FILE       *fp;
+int    read_selection_file(FileSel *fsel, FILE *fp)
 {
     char       *lp, *valp, *vp, *p;
     int                i, nopts, line_num;
@@ -789,9 +776,7 @@ int read_selection_file(fsel, fp)
     return NoError;
 }
 
-int    save_user_selection(sel, locale_name)
-    UserSelection      *sel;
-    char       *locale_name;
+int    save_user_selection(UserSelection *sel, char *locale_name)
 {
     char       path[MAXPATHLEN];
     int                dpy_specific;
@@ -825,11 +810,7 @@ int        save_user_selection(sel, locale_name)
 #define        _IMSOPTION      4
 #define        _IMSOPT2        5
 
-static void    put_selection_entry(fp, ent_type, is_valid, val, val2)
-    FILE       *fp;
-    int                ent_type;
-    bool       is_valid;
-    char       *val, *val2;
+static void put_selection_entry(FILE *fp, int ent_type, bool is_valid, char *val, char *val2)
 {
     char       *name = NULL;
 
@@ -852,9 +833,7 @@ static void put_selection_entry(fp, ent_type, is_valid, val, val2)
 
 }
 
-static void    put_ims_conf(fp, sel)
-    FILE       *fp;
-    UserSelection      *sel;
+static void    put_ims_conf(FILE *fp, UserSelection *sel)
 {
     char       *valp, val[20];
 
@@ -891,9 +870,7 @@ static void put_ims_conf(fp, sel)
     }
 }
 
-static void    put_select_mode(fp, select_mode)
-    FILE       *fp;
-    int                select_mode;
+static void    put_select_mode(FILE *fp, int select_mode)
 {
     char val[20];
     if (select_mode != SEL_MODE_NOAUTO && select_mode != SEL_MODE_AUTO
@@ -908,22 +885,20 @@ static void       put_select_mode(fp, select_mode)
 
 }
 
-static void    put_selection_header(fp)
-    FILE       *fp;
+static void    put_selection_header(FILE *fp)
 {
     fprintf(fp, "%s %s\n", COMMENT_CHARS, ProgramRevision);
     if (SelectFileFormat)
        fprintf(fp, "%s%s\n", COMMENT_CHARS, SelectFileFormat);
 }
 
-static void    put_selection_sep(fp)
-    FILE       *fp;
+static void    put_selection_sep(FILE *fp)
 {
     fprintf(fp, "%s\n", COMMENT_CHARS);
 }
 
 
-int    get_select_mode()
+int    get_select_mode(void)
 {
     char       path[MAXPATHLEN];
     char       *lp, *valp;
@@ -957,8 +932,7 @@ int get_select_mode()
     return select_mode;
 }
 
-int    set_select_mode(cur_mode, new_mode)
-    int                cur_mode, new_mode;
+int    set_select_mode(int cur_mode, int new_mode)
 {
     char       path[MAXPATHLEN];
     int                dpy_specific;
@@ -1055,9 +1029,7 @@ int       set_select_mode(cur_mode, new_mode)
     return NoError;
 }
 
-static int     user_selection_fname(buf, buf_len, dpy_specific)
-    char       *buf;
-    int                buf_len, dpy_specific;
+static int     user_selection_fname(char *buf, int buf_len, int dpy_specific)
 {
     int                len;
     UserEnv    *uenv = &userEnv;
@@ -1125,8 +1097,7 @@ static int        user_selection_fname(buf, buf_len, dpy_specific)
 }
 
 
-int    parse_protolist(valp)
-    char       *valp;
+int    parse_protolist(char *valp)
 {
     int                proto_bits = 0;
 
@@ -1140,8 +1111,7 @@ int       parse_protolist(valp)
     return proto_bits;
 }
 
-int    default_protocol(conf)
-    ImsConf    *conf;
+int    default_protocol(ImsConf *conf)
 {
     if (conf->protocols & ProtoBit(Proto_XIM))         return Proto_XIM;
     else if (conf->protocols & ProtoBit(Proto_Ximp))   return Proto_Ximp;
index 8816c5771b92fbf3583bf508725c8c992640aa60..12bb4d2c642a3249f17a902a41bd8087d424cf4b 100644 (file)
@@ -75,9 +75,7 @@ static int    exitSignalNumber = 0;
 static bool    do_usage = False;
 
 
-main (argc, argv)
-    int                argc;
-    char       **argv;
+int main (int argc, char **argv)
 {
     int                ret = NoError;
     int                ret2;
@@ -149,8 +147,7 @@ main (argc, argv)
 }
 
 
-void   sigExit(sig)
-    int        sig;
+void   sigExit(int sig)
 {
     DPR(("sigExit:  %s (%d)\n", sig_name(sig), sig));
     signal(sig, SIG_IGN);
@@ -158,8 +155,7 @@ void        sigExit(sig)
     Exit(ErrSignaled);
 }
 
-void   Exit(err_code)
-    int        err_code;
+void   Exit(int err_code)
 {
     int                exit_code = IsNoError(err_code) ? 0 : 1;
 
@@ -186,8 +182,7 @@ void        Exit(err_code)
     exit(exit_code);
 }
 
-int    NotifyErrCode(err_code)
-    int        err_code;
+int    NotifyErrCode(int err_code)
 {
     char       buf[BUFSIZ], *bp, val[20];
     static bool        notify_done = False;
@@ -229,8 +224,7 @@ int NotifyErrCode(err_code)
 }
 
 
-static int     IsNoError(error)
-    ximsError  error;
+static int     IsNoError(ximsError error)
 {
     switch (error) {
        case NoError: case ErrIsNone: case ErrNotRun:
@@ -244,8 +238,7 @@ static int  IsNoError(error)
     return False;
 }
 
-static int     EnvNeeded(error)
-    ximsError  error;
+static int     EnvNeeded(ximsError error)
 {
     switch (error) {
        case NoError: case ErrIsNone: case ErrNotRun:
@@ -258,8 +251,7 @@ static int  EnvNeeded(error)
     return False;
 }
 
-static int     ErrMsgDisabled(error)
-    ximsError  error;
+static int     ErrMsgDisabled(ximsError error)
 {
     switch (error) {
        case NoError: case ErrIsNone: case ErrNotRun:
@@ -274,8 +266,7 @@ static int  ErrMsgDisabled(error)
     return False;
 }
 
-int    ErrFilePathNeeded(error)
-    ximsError  error;
+int    ErrFilePathNeeded(ximsError error)
 {
     switch (error) {
        case ErrFileOpen: case ErrFileCreate: case ErrDirCreate:
@@ -286,7 +277,7 @@ int ErrFilePathNeeded(error)
     return False;
 }
 
-int    InWaitingState()
+int    InWaitingState(void)
 {
     switch (OpState) {
        case State_Init_Err:
@@ -297,7 +288,7 @@ int InWaitingState()
     return False;
 }
 
-void   ximsMain()
+void   ximsMain(void)
 {
     static int call_cnt = 0;
 
@@ -366,7 +357,7 @@ void        ximsMain()
 }
 
 
-void   ximsFinish()
+void   ximsFinish(void)
 {
     OpStateVal oldOpState = OpState;
 
@@ -408,7 +399,7 @@ void        ximsFinish()
 }
 
 
-static int     ximsShowImsList()
+static int     ximsShowImsList(void)
 {
     int                ret;
     int                i;
@@ -491,7 +482,7 @@ static int  ximsShowImsList()
     return NoError;
 }
 
-static int     ximsShowCurrentIms()
+static int     ximsShowCurrentIms(void)
 {
     int                ret = NoError;
     FileSel    *fsel;
@@ -520,8 +511,7 @@ static int  ximsShowCurrentIms()
 }
 
 
-static int     prepare_remote(win_st)
-    int        win_st;
+static int     prepare_remote(int win_st)
 {
     int                ret;
     char       **av = NULL;
@@ -565,7 +555,7 @@ static int  prepare_remote(win_st)
     return NoError;
 }
 
-static int     ximsRemoteConf()
+static int     ximsRemoteConf(void)
 {
     int                ret;
     char       *locale;
@@ -583,7 +573,7 @@ static int  ximsRemoteConf()
 }
 
 
-static int     ximsSetMode()
+static int     ximsSetMode(void)
 {
     int                ret = NoError;
     int                cur_mode = SEL_MODE_NONE;
@@ -622,8 +612,7 @@ static int  ximsSetMode()
     return ret;
 }
 
-static void    show_select_mode(mode)
-    int                mode;
+static void    show_select_mode(int mode)
 {
     char       *valp;
 
@@ -652,8 +641,7 @@ static void show_select_mode(mode)
 }
 
 
-static int     set_locale_env(locale)
-    char       *locale;
+static int     set_locale_env(char *locale)
 {
     char       *env_name, *env_value, *bp, *vp, buf[BUFSIZ], buf2[BUFSIZ];
     static char        *last_lang_env[2] = { NULL, NULL };
@@ -729,8 +717,7 @@ static int  set_locale_env(locale)
     return NoError;
 }
 
-static void    init_command(progname)
-    char       *progname;
+static void    init_command(char *progname)
 {
        /* globals */
     ProgramName = progname;
@@ -775,9 +762,7 @@ static void init_command(progname)
 }
 
 
-static bool    optname_match(name, str, minlen)
-    char       *name, *str;
-    int                minlen;
+static bool    optname_match(char *name, char *str, int minlen)
 {
     int                nlen, slen;
 
@@ -790,9 +775,7 @@ static bool optname_match(name, str, minlen)
     return False;
 }
 
-static int     parse_options(argc, argv)
-    int                argc;
-    char       **argv;
+static int     parse_options(int argc, char **argv)
 {
     char       *opt;
     int                i, n;
@@ -1118,8 +1101,7 @@ static OptDesc    opts_internal[] = {
 };
 #endif /* DEBUG */
 
-static void    usage(force)
-    int                force;
+static void    usage(int force)
 {
     char       *fmt = "\t%-20s%s\n";
 
@@ -1167,9 +1149,7 @@ static void       usage(force)
 
        /* ********  error messages  ******** */
 
-char   *xims_errmsg(err_num, arg1, arg2, arg3)
-    int                err_num;
-    void       *arg1, *arg2, *arg3;
+char   *xims_errmsg(int err_num, void *arg1, void *arg2, void *arg3)
 {
     char       *fmt = NULL, *bp;
     int                len;
index ffce2447ab2d04bde6091c8bbd7c999d235fb353..6877367390f17e5d125b383b0fc5f5916d456bec 100644 (file)
@@ -132,10 +132,10 @@ Procedure:
  * which does the trick.
  */
 static int
-strcasecmp(register const char *s1,
-          register const char *s2)
+strcasecmp(const char *s1,
+          const char *s2)
 {
-    register int c1, c2;
+    int c1, c2;
 
     while (*s1 && *s2) {
        c1 = isupper(*s1) ? tolower(*s1) : *s1;
@@ -149,8 +149,7 @@ strcasecmp(register const char *s1,
 }
 #endif
 
-int    put_remote_conf(locale, ims_name)
-    char       *locale, *ims_name;
+int    put_remote_conf(char *locale, char *ims_name)
 {
     int                ret;
     int                msg_status = NoError;
@@ -182,9 +181,7 @@ int put_remote_conf(locale, ims_name)
     return ret;
 }
 
-int    get_remote_conf(listp, hostname, locale, ims_name)
-    ImsList    **listp;
-    char       *hostname, *locale, *ims_name;
+int    get_remote_conf(ImsList **listp, char *hostname, char *locale, char *ims_name)
 {
     int                ret = NoError;
     int                conflen = 0;
@@ -256,11 +253,9 @@ int        get_remote_conf(listp, hostname, locale, ims_name)
 #define        PUT_DATA(nm, val)       *bp++ = ' ', bp = strcpyx(bp, (nm)), \
                        *bp++ = '=', bp = strcpyx(bp, (val)), *bp++ = '\n'
 
-static int     mk_remote_conf(list, locale, ims_name, status, confbuf, conflen)
-    ImsList    *list;
-    int                status;
-    char       *locale, *ims_name, *confbuf;
-    int                *conflen;
+static int     mk_remote_conf(ImsList *list, char *locale,
+                               char *ims_name, int status,
+                               char *confbuf, int *conflen)
 {
     int                num_ent;
     int                i, j;
@@ -332,10 +327,7 @@ static int mk_remote_conf(list, locale, ims_name, status, confbuf, conflen)
     return NoError;
 }
 
-static char    *mk_ims_ent(bp, idx, ent)
-    ImsEnt     *ent;
-    int                idx;
-    register char      *bp;
+static char    *mk_ims_ent(char *bp, int idx, ImsEnt *ent)
 {
     ImsConf    *ims = ent->ims;
     char        val[20];
@@ -375,11 +367,9 @@ static char        *mk_ims_ent(bp, idx, ent)
 
 #undef PUT_DATA
 
-static int     parse_ims_list(ptr, list)
-    char       *ptr;
-    ImsList    *list;
+static int     parse_ims_list(char *ptr, ImsList *list)
 {
-    register char      *bp = ptr;
+    char       *bp = ptr;
     char       *np, *vp;
     char       *def_name;
     int                i, num_ent;
@@ -483,10 +473,7 @@ static int parse_ims_list(ptr, list)
 }
 
 
-static int     parse_remote_conf(listp, locale, confbuf, conflen)
-    ImsList    **listp;
-    char       *locale, *confbuf;
-    int                conflen;
+static int     parse_remote_conf(ImsList **listp, char *locale, char *confbuf, int conflen)
 {
     int                ret = NoError;
     char       *bp = confbuf;
@@ -545,8 +532,7 @@ static int  parse_remote_conf(listp, locale, confbuf, conflen)
 }
 
 
-int    exec_remote_ims(sel)
-    UserSelection      *sel;
+int    exec_remote_ims(UserSelection *sel)
 {
     int                ret = NoError;
     int                n, num_opts, binc;
@@ -636,8 +622,7 @@ int exec_remote_ims(sel)
 }
 
 
-int    check_hostname(hostname)
-    char       *hostname;
+int    check_hostname(char *hostname)
 {
     int                host_type = HOST_UNKNOWN;
     char       *local = userEnv.hostname;
@@ -681,9 +666,7 @@ int check_hostname(hostname)
 
 
 
-int    set_remote_confdata(confbuf, conflen)
-    char *confbuf;
-    int conflen;
+int    set_remote_confdata(char *confbuf, int conflen)
 {
     char *av[2];
 
@@ -692,9 +675,7 @@ int set_remote_confdata(confbuf, conflen)
     return set_window_data(1, av);
 }
 
-int    read_remote_confdata(confbuf, conflen)
-    char **confbuf;
-    int *conflen;
+int    read_remote_confdata(char **confbuf, int *conflen)
 {
     char **av = NULL;
     int ac = 0;
@@ -710,10 +691,7 @@ int        read_remote_confdata(confbuf, conflen)
 }
 
 
-static int     prepare_action(act_typ, av, ac)
-    int        act_typ;
-    char       **av;
-    int                ac;
+static int     prepare_action(int act_typ, char **av, int ac)
 {
     int ret;
 
@@ -738,7 +716,7 @@ static int  prepare_action(act_typ, av, ac)
 }
 
 
-int    get_window_status()
+int    get_window_status(void)
 {
     long       *datap;
     int                len = 0;
@@ -762,8 +740,7 @@ int get_window_status()
     return win_st;
 }
 
-int    change_window_status(status)
-    int        status;
+int    change_window_status(int status)
 {
     if (winEnv.atom_status == None || winEnv.atom_owner == None)
        return ErrInternal;
@@ -780,13 +757,11 @@ int       change_window_status(status)
     return NoError;
 }
 
-int    set_window_data(ac, av)
-    int        ac;
-    char **av;
+int    set_window_data(int ac, char **av)
 {
-    register int i;
-    register int nbytes;
-    register char *buf, *bp;
+    int i;
+    int nbytes;
+    char *buf, *bp;
 
     if (winEnv.atom_data == None || winEnv.atom_owner == None)
        return ErrInternal;
@@ -823,9 +798,7 @@ int set_window_data(ac, av)
 }
 
 
-int    get_window_data(acp, avp)
-    int        *acp;
-    char ***avp;
+int    get_window_data(int *acp, char ***avp)
 {
     int ac;
     char *data;
@@ -878,13 +851,9 @@ int        get_window_data(acp, avp)
 }
 
 
-static int     read_property(prop, type, format, del_flag, datapp, lenp)
-    Atom prop;
-    Atom type;
-    int format;
-    int        del_flag;
-    unsigned char **datapp;
-    unsigned long *lenp;
+static int     read_property(Atom prop, Atom type, int format,
+                              int del_flag, unsigned char **datapp,
+                              unsigned long *lenp)
 {
     Atom realtype;
     int realformat;
index f096bec1c22274ea4ed8d6ff8514a26788032457..53ddc17c65ab516bc328463c8ea5b98fcbf7fa56 100644 (file)
@@ -30,7 +30,7 @@ static int    setup_remote_selection(/* sel */);
 static int     setup_user_selection(/* sel, list, idx */);
 
 
-void   ximsSelect()
+void   ximsSelect(void)
 {
     int                ret;
     bool       use_win;
@@ -166,9 +166,7 @@ void        ximsSelect()
 }
 
 
-static int     fill_ims_ent(list, top, last)
-    ImsList    *list;
-    int                top, last;
+static int     fill_ims_ent(ImsList *list, int top, int last)
 {
     int                ret;
     int                i;
@@ -199,10 +197,7 @@ static int fill_ims_ent(list, top, last)
 }
 
 
-static int     setup_local_selection(sel, list, conf_all)
-    UserSelection      *sel;
-    ImsList    *list;
-    int                conf_all;
+static int     setup_local_selection(UserSelection *sel, ImsList *list, int conf_all)
 {
     int                ret;
     int                idx, top, last;
@@ -218,8 +213,7 @@ static int  setup_local_selection(sel, list, conf_all)
     return ret;
 }
 
-static int     setup_remote_selection(sel)
-    UserSelection      *sel;
+static int     setup_remote_selection(UserSelection *sel)
 {
     int                ret;
     int                idx;
@@ -235,10 +229,7 @@ static int setup_remote_selection(sel)
     return ret;
 }
 
-static int     setup_user_selection(sel, list, idx)
-    UserSelection      *sel;
-    ImsList    *list;
-    int                idx;
+static int     setup_user_selection(UserSelection *sel, ImsList *list, int idx)
 {
     if (sel->name) {
        if (idx >= 0) {
@@ -256,12 +247,7 @@ static int setup_user_selection(sel, list, idx)
     return sel->status;
 }
 
-int    update_user_selection(sel, list, idx, host, host_type)
-    UserSelection      *sel;
-    ImsList    *list;
-    int                idx;
-    char       *host;
-    int                host_type;
+int    update_user_selection(UserSelection *sel, ImsList *list, int idx, char *host, int host_type)
 {
     ImsEnt     *ent;
 
@@ -292,9 +278,7 @@ int update_user_selection(sel, list, idx, host, host_type)
 }
 
 
-int    get_ims_idx(list, name)
-    ImsList    *list;
-    char       *name;
+int    get_ims_idx(ImsList *list, char *name)
 {
     int                idx;
 
@@ -306,8 +290,7 @@ int get_ims_idx(list, name)
     return -1;
 }
 
-int    set_ims_status(ent)
-    ImsEnt     *ent;
+int    set_ims_status(ImsEnt *ent)
 {
     int                ret = NoError;
     ImsConf    *ims = ent->ims;
@@ -328,10 +311,7 @@ int        set_ims_status(ent)
 }
 
 
-int    get_ims_list(listp, locale, fill_ent)
-    ImsList    **listp;
-    char       *locale;
-    int                fill_ent;
+int    get_ims_list(ImsList **listp, char *locale, int fill_ent)
 {
     int                ret = NoError;
     ImsList    *list;
index a1d60a85bf74ae5997ff4a9c05dc13af8487a599..78fc2a38235f99158357ecde7709c960b6be4cba 100644 (file)
@@ -55,7 +55,7 @@ static int    create_dummy_ic(/* xim */);
 # endif        /* old_hpux */
 
 
-void   ximsStart()
+void   ximsStart(void)
 {
     int                ret;
     UserSelection      *sel = &userSel;
@@ -118,7 +118,7 @@ void        ximsStart()
 }
 
 
-void   ximsWait()
+void   ximsWait(void)
 {
     OpStateVal oldOpState = OpState;
     UserSelection      *sel = &userSel;
@@ -169,7 +169,7 @@ void        ximsWait()
 }
 
 
-void   ximsWaitDone()
+void   ximsWaitDone(void)
 {
     int                ret;
     UserSelection      *sel = &userSel;
@@ -224,20 +224,18 @@ void      ximsWaitDone()
     ximsMain();
 }
 
-int    is_waiting()
+int    is_waiting(void)
 {
     return userSel.renv && userSel.renv->status == ErrImsWaiting;
 }
 
-void   set_sig_chld(enable)
-    int                enable;
+void   set_sig_chld(int enable)
 {
     DPR(("set_sig_chld(%s)\n", enable ? "Enabled" : "Disabled"));
     signal(SIGCHLD, enable ? on_sig_chld : SIG_IGN);
 }
 
-int    im_mod_available(renv)
-    RunEnv     *renv;
+int    im_mod_available(RunEnv *renv)
 {
     Window     owner;
 
@@ -283,9 +281,7 @@ int im_mod_available(renv)
 
        /* ***** IMS options ***** */
 
-int    mk_ims_option(ptr, sel)
-    char       *ptr;
-    UserSelection      *sel;
+int    mk_ims_option(char *ptr, UserSelection *sel)
 {
     char       *bp = ptr;
     FileSel    *fsel = sel->fsel;
@@ -326,8 +322,7 @@ int mk_ims_option(ptr, sel)
     return (int) (bp - ptr);
 }
 
-static int     check_ims_opt(ptr)
-    char       *ptr;
+static int     check_ims_opt(char *ptr)
 {
        /* option string must not contain any of shell's metacaharacters */
     if (strpbrk(ptr, "`'\"#;&()|<>\n")) {
@@ -346,7 +341,7 @@ static int  check_ims_opt(ptr)
 
 static bool    resource_loaded = False;
 
-int    load_resources()
+int    load_resources(void)
 {
     int                ret;
     int                empty;
@@ -395,7 +390,7 @@ int load_resources()
     return ret;
 }
 
-int    restore_resources()
+int    restore_resources(void)
 {
     if (!resource_loaded) {
        DPR2(("restore_resources: not loaded yet -- not restored\n"));
@@ -405,8 +400,7 @@ int restore_resources()
     return restore_RM();
 }
 
-static char    *find_session_resfile(res_type)
-    int                res_type;
+static char    *find_session_resfile(int res_type)
 {
     char       path[MAXPATHLEN];
     char       **ls = (char **) 0, **pp;
@@ -449,8 +443,7 @@ static char *find_session_resfile(res_type)
 
        /* ***** local functions ***** */
 
-static int     check_selection(sel)
-    UserSelection      *sel;
+static int     check_selection(UserSelection *sel)
 {
     int                ret = NoError;
 
@@ -470,8 +463,7 @@ static int  check_selection(sel)
     return ret;
 }
 
-static int     build_run_env(sel)
-    UserSelection      *sel;
+static int     build_run_env(UserSelection *sel)
 {
     char       *p;
     int                proto;
@@ -570,8 +562,7 @@ static int  build_run_env(sel)
     return NoError;
 }
 
-static int     run_ims(sel)
-    UserSelection      *sel;
+static int     run_ims(UserSelection *sel)
 {
     int                ret = NoError;
 
@@ -598,8 +589,7 @@ static int  run_ims(sel)
     return ret;
 }
 
-static int     invoke_ims(sel)
-    UserSelection      *sel;
+static int     invoke_ims(UserSelection *sel)
 {
     RunEnv     *renv = sel->renv;
     pid_t      pid;
@@ -646,8 +636,7 @@ static int  invoke_ims(sel)
     return NoError;
 }
 
-static void    on_sig_chld(sig)
-    int sig;
+static void    on_sig_chld(int sig)
 {
     int                wait_status = 0;
     pid_t      pid;
@@ -703,9 +692,7 @@ static void on_sig_chld(sig)
     return;
 }
 
-static bool    is_ims_running(renv, ims)
-    RunEnv     *renv;
-    ImsConf    *ims;
+static bool    is_ims_running(RunEnv *renv, ImsConf *ims)
 {
     char       *prop_str;
     Window     owner;
@@ -745,8 +732,7 @@ static bool is_ims_running(renv, ims)
 }
 
 
-static int     settle_ims(sel)
-    UserSelection      *sel;
+static int     settle_ims(UserSelection *sel)
 {
 
     if (isXsession()) {
@@ -774,9 +760,7 @@ static int  settle_ims(sel)
     return NoError;
 }
 
-static Window  property_owner(prop_atom, prop_str)
-    Atom       *prop_atom;
-    char       *prop_str;
+static Window  property_owner(Atom *prop_atom, char *prop_str)
 {
     Atom       property = prop_atom ? *prop_atom : None;
 
@@ -799,16 +783,14 @@ static Window     property_owner(prop_atom, prop_str)
 static jmp_buf jmp_env;
 static Window  dmy_win = 0;    /* temporary window used for XCreateIC() */
 
-static void    catch_alarm(sig)
-    int        sig;
+static void    catch_alarm(int sig)
 {
     signal(SIGALRM, SIG_IGN);
     alarm(0);
     longjmp(jmp_env, 1);
 }
 
-static int     try_connection(sel)
-    UserSelection      *sel;
+static int     try_connection(UserSelection *sel)
 {
     RunEnv     *renv = sel->renv;
     ImsConf    *ims = sel->ent->ims;
@@ -886,8 +868,7 @@ static int  try_connection(sel)
     return ic_ok ? NoError : ErrImsTimeout;    /* ErrImsConnect; */
 }
 
-static int     create_dummy_ic(xim)
-    XIM                xim;
+static int     create_dummy_ic(XIM xim)
 {
     int                scr;
     XFontSet   fset;
index 945a2408558bca03db150dfe58b5234c65d72592..9437e3666ec113345f007d97940fe792b032e098 100644 (file)
@@ -30,7 +30,7 @@
 
         /* ********  locale name manupilation  ******** */
 
-int find_CDE_locale_name()
+int find_CDE_locale_name(void)
 {
     UserEnv   *uenv = &userEnv;
    _DtXlateDb db = NULL;
@@ -61,8 +61,7 @@ int find_CDE_locale_name()
    return ret;
 }
 
-char *find_system_locale_name(CDE_locale)
-    char *CDE_locale;
+char *find_system_locale_name(char *CDE_locale)
 {
    _DtXlateDb db = NULL;
    int        ret = NoError;
@@ -93,16 +92,14 @@ char *find_system_locale_name(CDE_locale)
 
        /* ********  string manupilation  ******** */
 
-char   *strcpyx(dest, src)
-    register char      *dest, *src;
+char   *strcpyx(char *dest, char *src)
 {
     while (*dest++ = *src++) ;
     return(--dest);
 }
 
 #ifdef unused
-char   *strcpy2(dest, src1, src2)
-    register char      *dest, *src1, *src2;
+char   *strcpy2(char *dest, char *src1, char *src2)
 {
     while (*dest++ = *src1++) ;
     --dest;
@@ -110,10 +107,9 @@ char       *strcpy2(dest, src1, src2)
     return(--dest);
 }
 
-char   *newstradded(src1, src2, src3)
-    register char      *src1, *src2, *src3;
+char   *newstradded(char *src1, char *src2, char *src3)
 {
-    register char      *p;
+    char       *p;
     char       *dest;
 
     dest = p = ALLOC(strlen(src1) + strlen(src2) + strlen(src3) + 1, char);
@@ -125,9 +121,7 @@ char        *newstradded(src1, src2, src3)
 #endif /* unused */
 
 
-int    str_to_int(ptr, val)
-    char *ptr;
-    int *val;
+int    str_to_int(char *ptr, int *val)
 {
     int        base;
     char *pp;
@@ -140,9 +134,7 @@ int str_to_int(ptr, val)
     return(True);
 }
 
-bool   str_to_bool(ptr, def_val)
-    char       *ptr;
-    bool       def_val;
+bool   str_to_bool(char *ptr, bool def_val)
 {
     if (!ptr || !*ptr) return def_val;
     skip_white(ptr);
@@ -168,10 +160,9 @@ bool       str_to_bool(ptr, def_val)
     return def_val;
 }
 
-char   *trim_line(ptr)
-    char       *ptr;
+char   *trim_line(char *ptr)
 {
-    register char      *lastp;
+    char       *lastp;
 
     skip_white(ptr);
     for (lastp = ptr + strlen(ptr) - 1;
@@ -180,9 +171,7 @@ char        *trim_line(ptr)
     return ptr;                /* return lastp > ptr ? ptr : NULL; */
 }
 
-char   **parse_strlist(ptr, sep_ch)
-    register char      *ptr;
-    char       sep_ch;
+char   **parse_strlist(char *ptr, char sep_ch)
 {
     char       *pbuf[100], **new, **bp;
     char       *sep, *p;
@@ -216,11 +205,9 @@ char       **parse_strlist(ptr, sep_ch)
 }
 
 #ifdef unused
-int    pack_strlist(ptr, listp, sep_ch)
-    char       *ptr, **listp;
-    char       sep_ch;
+int    pack_strlist(char *ptr, char **listp, char sep_ch)
 {
-    register char      *bp = ptr, **lp = listp;
+    char       *bp = ptr, **lp = listp;
 
     /* if (!ptr)       return 0; */
     if (!lp || !*lp) {
@@ -240,10 +227,9 @@ int        pack_strlist(ptr, listp, sep_ch)
 }
 #endif /* unused */
 
-void   free_strlist(pp)
-    char       **pp;
+void   free_strlist(char **pp)
 {
-    register char      **ptr = pp;
+    char       **ptr = pp;
 
     if (!ptr)  return;
     for ( ; *ptr; ptr++)       FREE(*ptr);
@@ -253,9 +239,7 @@ void        free_strlist(pp)
 
        /* ********  display string  ******** */
 
-bool   parse_dpy_str(display_str, host, dnum, snum, dnet)
-    char       *display_str, **host;
-    int                *dnum, *snum, *dnet;
+bool   parse_dpy_str(char *display_str, char **host, int *dnum, int *snum, int *dnet)
 {
     char       buf[BUFSIZ], hostbuf[BUFSIZ], *p, *hp, *pdnum, *psnum;
     int                isdnet = 0;
@@ -301,9 +285,7 @@ bool        parse_dpy_str(display_str, host, dnum, snum, dnet)
     return True;
 }
 
-char   *std_dpy_str(display_str, snum)
-    char       *display_str;
-    int                *snum;
+char   *std_dpy_str(char *display_str, int *snum)
 {
     char       buf[BUFSIZ], *bp, val[20];
     char       *host = NULL;
@@ -330,8 +312,7 @@ char        *std_dpy_str(display_str, snum)
 
        /* ********  file & dir manipulation  ******** */
 
-int    make_user_dir(path)
-    char       *path;
+int    make_user_dir(char *path)
 {
     if (!is_directory(path, False)) {
        if (access(path, F_OK) == 0)
@@ -343,11 +324,10 @@ int       make_user_dir(path)
     return True;
 }
 
-char   *dirname(path)
-    char       *path;
+char   *dirname(char *path)
 {
     static char        dname[MAXPATHLEN];
-    register char      *p = path;
+    char       *p = path;
     int                dlen;
 
     /* if (!p || !p[0])                return NULL; */
@@ -371,9 +351,7 @@ char        *dirname(path)
 
 }
 
-int    is_directory(path, must_writable)
-    char       *path;
-    int                must_writable;
+int    is_directory(char *path, int must_writable)
 {
     struct stat        stb;
     int                mode = R_OK|X_OK;
@@ -384,15 +362,13 @@ int       is_directory(path, must_writable)
 }
 
 #ifdef unused
-int    is_regularfile(path)
-    char       *path;
+int    is_regularfile(char *path)
 {
     struct stat        stb;
     return stat(path, &stb) == 0 && S_ISREG(stb.st_mode);
 }
 
-int    is_emptyfile(path)
-    char       *path;
+int    is_emptyfile(char *path)
 {
     struct stat        stb;
     return stat(path, &stb) == 0 && S_ISREG(stb.st_mode) && stb.st_size == 0;
@@ -400,8 +376,7 @@ int is_emptyfile(path)
 #endif /* unused */
 
 
-int    is_executable(path)
-    char       *path;
+int    is_executable(char *path)
 {
     struct stat        stb;
     return stat(path, &stb) == 0 && S_ISREG(stb.st_mode)
@@ -409,8 +384,7 @@ int is_executable(path)
 }
 
 #ifdef unused
-int    is_writable(path)
-    char       *path;
+int    is_writable(char *path)
 {
     if (access(path, R_OK|W_OK) == 0)
        return True;
@@ -421,9 +395,7 @@ int is_writable(path)
 }
 #endif /* unused */
 
-int    is_readable(path, allow_empty)
-    char       *path;
-    int                allow_empty;
+int    is_readable(char *path, int allow_empty)
 {
     struct stat        stb;
     return stat(path, &stb) == 0 && S_ISREG(stb.st_mode)
@@ -437,8 +409,7 @@ static int  tag_line_num = 0;
 static char    *tag_linebuf = NULL;
 static char    *tag_file = NULL;
 
-int    start_tag_line(fname)
-    char       *fname;
+int    start_tag_line(char *fname)
 {
     if (fname) {
        if (!tag_linebuf)
@@ -453,9 +424,7 @@ int start_tag_line(fname)
     return True;
 }
 
-int    read_tag_line(fp, tagp, valp)
-    FILE       *fp;
-    char       **tagp, **valp;
+int    read_tag_line(FILE *fp, char **tagp, char **valp)
 {
     char       *lp, *lp2;
 
@@ -483,9 +452,7 @@ int read_tag_line(fp, tagp, valp)
 
        /* ********  put messages  ******** */
 
-void   put_xims_msg(msg_type, err_num, arg1, arg2, arg3)
-    int                msg_type, err_num;
-    void       *arg1, *arg2, *arg3;
+void   put_xims_msg(int msg_type, int err_num, void *arg1, void *arg2, void *arg3)
 {
     int                ret = -2;
     char       *msg;
@@ -514,17 +481,13 @@ void      put_xims_msg(msg_type, err_num, arg1, arg2, arg3)
     return;
 }
 
-void   put_xims_errmsg(err_num, arg1, arg2, arg3)
-    int                err_num;
-    void       *arg1, *arg2, *arg3;
+void   put_xims_errmsg(int err_num, void *arg1, void *arg2, void *arg3)
 {
     if (Verbose > 0)
        put_xims_msg(MSGTYP_FATAL, err_num, arg1, arg2, arg3);
 }
 
-void   put_xims_warnmsg(err_num, arg1, arg2, arg3)
-    int                err_num;
-    void       *arg1, *arg2, *arg3;
+void   put_xims_warnmsg(int err_num, void *arg1, void *arg2, void *arg3)
 {
     if (Verbose > 0)
        put_xims_msg(MSGTYP_WARN, err_num, arg1, arg2, arg3);
@@ -533,18 +496,14 @@ void      put_xims_warnmsg(err_num, arg1, arg2, arg3)
 
 #ifdef DEBUG
     /* for DPR*() macro */
-void   print_msg(fmt, arg1, arg2, arg3, arg4, arg5)
-    char       *fmt;
-    void       *arg1, *arg2, *arg3, *arg4, *arg5;
+void   print_msg(char *fmt, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5)
 {
     fprintf(LogFp, fmt, arg1, arg2, arg3, arg4, arg5);
 }
 #endif
 
 
-int    put_xims_log(fmt, arg1, arg2, arg3)
-    char       *fmt;
-    void       *arg1, *arg2, *arg3;
+int    put_xims_log(char *fmt, void *arg1, void *arg2, void *arg3)
 {
     FILE       *fp;
     char       *logpath = Opt.LogPath;
@@ -570,8 +529,7 @@ int put_xims_log(fmt, arg1, arg2, arg3)
 
        /* ********  clear structure  ******** */
 
-void   clear_ImsConf(ims)
-    ImsConf    *ims;
+void   clear_ImsConf(ImsConf *ims)
 {
     FREE(ims->servername);
     FREE(ims->servername2);
@@ -586,8 +544,7 @@ void        clear_ImsConf(ims)
     CLR(ims, ImsConf);
 }
 
-void   clear_ImsEnt(ent)
-    ImsEnt     *ent;
+void   clear_ImsEnt(ImsEnt *ent)
 {
     FREE(ent->name);
     FREE(ent->fname);
@@ -599,8 +556,7 @@ void        clear_ImsEnt(ent)
     CLR(ent, ImsEnt);
 }
 
-void   clear_ImsList(list)
-    ImsList    *list;
+void   clear_ImsList(ImsList *list)
 {
     int                i;
 
@@ -616,8 +572,7 @@ void        clear_ImsList(list)
 }
 
 
-void   clear_FileSel(fsel)
-    FileSel    *fsel;
+void   clear_FileSel(FileSel *fsel)
 {
     FREE(fsel->name);
     FREE(fsel->hostname);
@@ -640,8 +595,7 @@ void        clear_FileSel(fsel)
     fsel->dpy_specific = False;
 }
 
-void   clear_UserSelection(sel)
-    UserSelection      *sel;
+void   clear_UserSelection(UserSelection *sel)
 {
     FREE(sel->name);
     FREE(sel->hostname);
@@ -666,8 +620,7 @@ void        clear_UserSelection(sel)
 }
 
 
-void   clear_RunEnv(renv)
-    RunEnv     *renv;
+void   clear_RunEnv(RunEnv *renv)
 {
     FREE(renv->im_mod);
     FREE(renv->atom_name);
@@ -678,8 +631,7 @@ void        clear_RunEnv(renv)
 }
 
 
-void   clear_OutEnv(oenv)
-    OutEnv     *oenv;
+void   clear_OutEnv(OutEnv *oenv)
 {
     EnvEnt     *ep;
 
@@ -696,7 +648,7 @@ void        clear_OutEnv(oenv)
 
 
 #ifdef unused
-void   clear_UserEnv()
+void   clear_UserEnv(void)
 {
     UserEnv    *uenv = &userEnv;
 
@@ -714,7 +666,7 @@ void        clear_UserEnv()
     return;
 }
 
-void   clear_CmdConf()
+void   clear_CmdConf(void)
 {
     if (cmdconf_initialized) {
        CmdConf *conf = &Conf;
@@ -775,17 +727,17 @@ void      clear_CmdConf()
     return;
 }
 
-void   clear_WinEnv()
+void   clear_WinEnv(void)
 {
     CLR(&winEnv, WinEnv);
 }
 
-void   clear_CmdOpt()
+void   clear_CmdOpt(void)
 {
     CLR(&Opt, CmdOpt);
 }
 
-void   clear_All()
+void   clear_All(void)
 {
     UserSelection      *sel = &userSel;
 
@@ -815,8 +767,7 @@ void        clear_All()
 
        /* ********  print structure (for DEBUG)  ******** */
 
-void   pr_FileSel(fsel)
-    FileSel    *fsel;
+void   pr_FileSel(FileSel *fsel)
 {
     fprintf(LogFp, "FileSel:\tdpy_specific=%d  real_fname=%s  select_mode=%d\n",
        fsel->dpy_specific, fsel->real_fname, fsel->select_mode);
@@ -831,8 +782,7 @@ void        pr_FileSel(fsel)
     }
 }
 
-void   pr_UserSelection(sel)
-    UserSelection      *sel;
+void   pr_UserSelection(UserSelection *sel)
 {
     fprintf(LogFp, "userSelection:\tstatus=%s  flag=%#x  ims_idx=%d\n",
                        error_name(sel->status), sel->flag, sel->ims_idx);
@@ -844,9 +794,7 @@ void        pr_UserSelection(sel)
     if (sel->renv)     pr_RunEnv(sel->renv);
 }
 
-void   pr_ImsConf(conf, ims_name)
-    ImsConf    *conf;
-    char       *ims_name;
+void   pr_ImsConf(ImsConf *conf, char *ims_name)
 {
     char       **p;
 
@@ -877,16 +825,13 @@ void      pr_ImsConf(conf, ims_name)
     fputc('\n', LogFp);
 }
 
-void   pr_ImsEnt(ent, idx)
-    ImsEnt     *ent;
-    int                idx;
+void   pr_ImsEnt(ImsEnt *ent, int idx)
 {
     fprintf(LogFp, "ImsEnt[%d]:\tname=%s  fname=%s  label=%s  ims=%#x\n",
                idx, ent->name, ent->fname, ent->label, ent->ims);
 }
 
-void   pr_ImsList(list)
-    ImsList    *list;
+void   pr_ImsList(ImsList *list)
 {
     int                i;
     ImsEnt     *ent;
@@ -900,8 +845,7 @@ void        pr_ImsList(list)
     }
 }
 
-void   pr_WinEnv(wenv)
-    WinEnv     *wenv;
+void   pr_WinEnv(WinEnv *wenv)
 {
     fprintf(LogFp, "WinEnv:\tstatus=%d  Dpy=%#x  topW=%#x  appC=%#x\n",
                wenv->status, wenv->Dpy, wenv->TopW, wenv->appC);
@@ -909,8 +853,7 @@ void        pr_WinEnv(wenv)
                wenv->atom_owner, wenv->atom_main, wenv->atom_status, wenv->atom_data);
 }
 
-void   pr_RunEnv(renv)
-    RunEnv     *renv;
+void   pr_RunEnv(RunEnv *renv)
 {
     fprintf(LogFp, "RunEnv:\tstatus=%s  is_remote=%d  proto=%d\n",
                error_name(renv->status), renv->is_remote, proto_name(renv->proto));
@@ -921,7 +864,7 @@ void        pr_RunEnv(renv)
 }
 
 
-void   pr_UserEnv()
+void   pr_UserEnv(void)
 {
     UserEnv    *uenv = &userEnv;
 
@@ -936,8 +879,7 @@ void        pr_UserEnv()
     fprintf(LogFp, "\tscreen_num=%d\n", uenv->screen_num);
 }
 
-void   pr_OutEnv(oenv)
-    OutEnv     *oenv;
+void   pr_OutEnv(OutEnv *oenv)
 {
     EnvEnt     *ep;
 
@@ -956,14 +898,14 @@ void      pr_OutEnv(oenv)
 }
 
 
-void   pr_CmdConf()
+void   pr_CmdConf(void)
 {
     int                i;
     CmdConf    *conf = &Conf;
 # ifdef        old_hpux
     LocaleAlias        **ap;
 # endif        /* old_hpux */
-    register char      **p;
+    char       **p;
 
     fprintf(LogFp, "CmdConf:\n");
     fprintf(LogFp, "\timsConfDir=%s\n", conf->imsConfDir);
@@ -1034,7 +976,7 @@ void       pr_CmdConf()
 # endif        /* old_hpux */
 }
 
-void   pr_CmdOpt()
+void   pr_CmdOpt(void)
 {
     fprintf(LogFp, "CmdOpt:\tDisplayName=%s  LocaleName=%s  ShellName=%s\n",
                        Opt.DisplayName, Opt.LocaleName, Opt.ShellName);
@@ -1048,7 +990,7 @@ void       pr_CmdOpt()
                        Opt.SelectMode, Opt.Timeout, Opt.Interval);
 }
 
-void   pr_OpModeFlag()
+void   pr_OpModeFlag(void)
 {
     char       *name = "<unknown>";
 
@@ -1107,7 +1049,7 @@ static char       *StateNameTbl[] = {
 };
 #define        NumStates       (sizeof(StateNameTbl) / sizeof(char *))
 
-char   *StateName()
+char   *StateName(void)
 {
     return (OpState >= 0 && OpState < NumStates) ?
                                StateNameTbl[OpState] : "<unknown>";
@@ -1116,8 +1058,7 @@ char      *StateName()
 
        /* ********  error name  ******** */
 
-char   *error_name(error)
-    ximsError  error;
+char   *error_name(ximsError error)
 {
     char       *name = "<unknown>";
 
@@ -1196,8 +1137,7 @@ static char *_proto_names[NUM_PROTOCOLS] =
                        { "None", "XIM", "Ximp", "Xsi" };
 # endif        /* old_hpux */
 
-char   *proto_name(proto_idx)
-    int                proto_idx;
+char   *proto_name(int proto_idx)
 {
     if (proto_idx >= 0 && proto_idx < NUM_PROTOCOLS)
        return _proto_names[proto_idx];
@@ -1214,15 +1154,13 @@ static char     *SigNames[] = {         /* 1 ~ 32 */
 
 #define        MaxSigNum       (sizeof(SigNames) / sizeof(char *))
 
-char   *sig_name(sig)
-    int                sig;
+char   *sig_name(int sig)
 {
     return (sig > 0 && sig <= MaxSigNum) ? SigNames[sig - 1] : "<unknown>";
 }
 
 
-void   pr_brk(msg)
-    char       *msg;
+void   pr_brk(char *msg)
 {
     static char        *last_brk = 0;
     char       *new_brk = (char *) sbrk(0);
index 31d8948f2079c1db2cff7ce60c30044666d8e45e..547c1f9f507ef966e665ba7748190ddf7218a282 100644 (file)
@@ -175,7 +175,7 @@ static void xt_timer_cb(/* client_data, timer_id */);
 
        /* ********  window env  ******** */
 
-int    open_display()
+int    open_display(void)
 {
     if (Dpy)   return NoError;         /* already done */
 
@@ -188,7 +188,7 @@ int open_display()
     return NoError;
 }
 
-void   close_display()
+void   close_display(void)
 {
     if (TopW)  return;         /* Xt not finished */
 
@@ -199,12 +199,12 @@ void      close_display()
     return;
 }
 
-int    window_env_ok()
+int    window_env_ok(void)
 {
     return winEnv.status != WIN_ST_NONE ? True : False;
 }
 
-int    init_window_env()
+int    init_window_env(void)
 {
     enum { XA_DTIMS_ATOM_MAIN, XA_DTIMS_ATOM_STATUS, XA_DTIMS_ATOM_DATA, 
           NUM_ATOMS }; 
@@ -288,7 +288,7 @@ int init_window_env()
     return NoError;
 }
 
-void   end_window_env()
+void   end_window_env(void)
 {
     if (TopW) {
        disown_main_atom(XtWindow(TopW));
@@ -309,9 +309,8 @@ void        end_window_env()
     /* return; */
 }
 
-
-int    clear_cmd_property(win)                 /* clear WM_COMMAND property */
-    Window     win;
+/* clear WM_COMMAND property */
+int    clear_cmd_property(Window win)
 {
     int                ret, ac = 0;
     int                clear_ok = False;
@@ -331,9 +330,7 @@ int clear_cmd_property(win)                 /* clear WM_COMMAND property */
     return clear_ok;
 }
 
-static int     ignoreBadWindow(dpy, error)
-    Display *dpy;
-    XErrorEvent *error;
+static int     ignoreBadWindow(Display *dpy, XErrorEvent *error)
 {
     if (error->error_code == BadWindow || error->error_code == BadDrawable) {
        return 0;
@@ -343,9 +340,7 @@ static int  ignoreBadWindow(dpy, error)
 }
 
 #ifdef unused
-static void    finish_window(w, end_window)
-    Widget     *w;
-    int                end_window;
+static void    finish_window(Widget *w, int end_window)
 {
     if (*w) {
        XtUnmapWidget(*w);
@@ -361,8 +356,8 @@ static void finish_window(w, end_window)
 #endif /* unused */
 
 
-static int     own_main_atom(win)      /* own DTIMS_ATOM_MAIN */
-    Window     win;
+/* own DTIMS_ATOM_MAIN */
+static int     own_main_atom(Window win)
 {
     Window     owner = None;
 
@@ -383,8 +378,8 @@ static int  own_main_atom(win)      /* own DTIMS_ATOM_MAIN */
     return winEnv.atom_owner == win ? True : False;
 }
 
-static int     disown_main_atom(win)   /* disown DTIMS_ATOM_MAIN */
-    Window     win;
+/* disown DTIMS_ATOM_MAIN */
+static int     disown_main_atom(Window win)
 {
     if (winEnv.atom_main == None)      return False;
     /* if (winEnv.atom_owner == None)  return False; */
@@ -402,15 +397,14 @@ static int        disown_main_atom(win)   /* disown DTIMS_ATOM_MAIN */
 
 static char    *saved_xdefs = NULL;    /* should not be freed */
 
-int    save_RM()
+int    save_RM(void)
 {
     if (!Dpy)  return False;
     saved_xdefs = XResourceManagerString(Dpy);
     return saved_xdefs ? True : False;
 }
 
-int    merge_RM(res1, res2)
-    char       *res1, *res2;
+int    merge_RM(char *res1, char *res2)
 {
     char       cmdbuf[BUFSIZ*2];
     int                ret;
@@ -438,7 +432,7 @@ int merge_RM(res1, res2)
     return ret == 0 ? True : False;
 }
 
-int    restore_RM()
+int    restore_RM(void)
 {
     int                len = saved_xdefs ? strlen(saved_xdefs) : 0;
     int                max = (XMaxRequestSize(Dpy) << 2) - 28;
@@ -490,8 +484,7 @@ static ImsList              *curList = 0;
 static bool            selection_changed = False;
 
 
-static void    free_ims_list(list)
-    ImsList    *list;
+static void    free_ims_list(ImsList *list)
 {
     /* DPR(("free_ims_list(list=%p)\n", list)); */
     if (list && list != localList && list != userSel.list) {
@@ -500,7 +493,7 @@ static void free_ims_list(list)
     }
 }
 
-static void    clear_selection_var()
+static void    clear_selection_var(void)
 {
     free_ims_list(curList);
     curList = (ImsList *) 0;
@@ -512,7 +505,7 @@ static void clear_selection_var()
     selection_changed = False;
 }
 
-int    start_selection_window()
+int    start_selection_window(void)
 {
     int                ret = NoError;
 
@@ -548,8 +541,7 @@ int start_selection_window()
     return NoError;
 }
 
-static void    finish_selection_window(end_window)
-    int                end_window;
+static void    finish_selection_window(int end_window)
 {
     DPR(("finish_selection_window(end=%s)\n", end_window ? "True" : "False"));
 
@@ -582,9 +574,7 @@ static void finish_selection_window(end_window)
     return;
 }
 
-static void    done_cb(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void    done_cb(Widget w, XtPointer client_data, XtPointer call_data)
 {
     int                canceled = (int)(intptr_t) client_data == CANCEL_BTN;
     int                idx;
@@ -618,9 +608,7 @@ static void done_cb(w, client_data, call_data)
     ximsMain();
 }
 
-static void    select_cb(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void    select_cb(Widget w, XtPointer client_data, XtPointer call_data)
 {
     int                new_idx = (int)(intptr_t) client_data;
 
@@ -635,22 +623,18 @@ static void       select_cb(w, client_data, call_data)
     CurIdx = new_idx;
 }
 
-static void    host_btn_cb(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void    host_btn_cb(Widget w, XtPointer client_data, XtPointer call_data)
 {
     start_host_window(CurHost);
 }
 
-static void    help_cb(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void    help_cb(Widget w, XtPointer client_data, XtPointer call_data)
 {
     ximsHelp(HELP_SELECTION);
 }
 
 
-static int     create_selection_window()
+static int     create_selection_window(void)
 {
     Widget     form, sel_rc, host_rc, cmd_rc, lb, sep;
     Widget     w_tbl[8];
@@ -752,9 +736,7 @@ static int  create_selection_window()
 }
 
 
-static int     change_host(new_host, host_type)
-    char       *new_host;
-    int                host_type;
+static int     change_host(char *new_host, int host_type)
 {
     int                ret = NoError;
     ImsList    *new_list = (ImsList *) 0;
@@ -794,8 +776,7 @@ static int  change_host(new_host, host_type)
 #define        createPB        XmCreatePushButton
 #define        createTB        XmCreateToggleButton
 
-static void    add_btn_trans(btn)
-    Widget     btn;
+static void    add_btn_trans(Widget btn)
 {
     char       btn_trans_str[] = "<Key>Return: ArmAndActivate()";
     static XtTranslations      btn_trans = 0;
@@ -814,9 +795,7 @@ static void add_btn_trans(btn)
 # endif        /* SelectByReturn */
 
 
-static void    change_ims_list(last_ims_name, init_idx)
-    char       *last_ims_name;
-    int                init_idx;
+static void    change_ims_list(char *last_ims_name, int init_idx)
 {
     int        idx;
     int        i, j;
@@ -880,9 +859,7 @@ static void change_ims_list(last_ims_name, init_idx)
 #undef IMS_OK
 }
 
-static void    set_host_label(host_type, hostname)
-    int                host_type;
-    char       *hostname;
+static void    set_host_label(int host_type, char *hostname)
 {
     static Widget      lb_host = 0;
 
@@ -914,10 +891,9 @@ static void        set_host_label(host_type, hostname)
 }
 
 
-static void    add_cmd_btn(parent_rc, cb_ok, cb_clear, cb_cancel, cb_host, cb_help)
-    Widget     parent_rc;
-    void       (*cb_ok)(), (*cb_cancel)(), (*cb_clear)(),
-                       (*cb_host)(), (*cb_help)();
+static void    add_cmd_btn(Widget parent_rc, void (*cb_ok)(),
+                            void (*cb_clear)(), void (*cb_cancel)(),
+                            void (*cb_host)(), void (*cb_help)())
 {
     Widget     pb[4];
     Arg                args[12];
@@ -996,8 +972,7 @@ static void add_cmd_btn(parent_rc, cb_ok, cb_clear, cb_cancel, cb_host, cb_help)
 
        /* ***** host window ***** */
 
-static void    start_host_window(cur_host)
-    char       *cur_host;
+static void    start_host_window(char *cur_host)
 {
     int        ret;
 
@@ -1026,7 +1001,7 @@ static void       start_host_window(cur_host)
     return;
 }
 
-static void    finish_host_window()
+static void    finish_host_window(void)
 {
     DPR(("finish_host_window()\n"));
 
@@ -1037,9 +1012,7 @@ static void       finish_host_window()
     }
 }
 
-static void    host_done_cb(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void    host_done_cb(Widget w, XtPointer client_data, XtPointer call_data)
 {
     int                cancel = (int)(intptr_t) client_data == CANCEL_BTN;
     int                ret = NoError;
@@ -1120,25 +1093,18 @@ static void     host_done_cb(w, client_data, call_data)
 #endif
 }
 
-static void    host_clear_cb(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void    host_clear_cb(Widget w, XtPointer client_data, XtPointer call_data)
 {
     /* if (!HostText)  return; */
     XtVaSetValues(HostText, XmNvalue, "", NULL);
 }
 
-static void    host_done_action(w, ev, args, num_args)
-    Widget     w;
-    XEvent     *ev;
-    String     *args;
-    Cardinal   *num_args;
+static void    host_done_action(Widget w, XEvent *ev, String *args, Cardinal *num_args)
 {
     host_done_cb(w, (XtPointer) OK_BTN, 0);
 }
 
-static void    create_host_window(cur_host)
-    char       *cur_host;
+static void    create_host_window(char *cur_host)
 {
     Widget     form, cmd_rc, lb1, sep, w_tbl[5];
     Widget     host_desc, host_rc, host_lb, host_txt;
@@ -1233,8 +1199,7 @@ static void       create_host_window(cur_host)
 static int     OrgMode = SEL_MODE_NONE;
 static int     CurMode = SEL_MODE_NONE;
 
-int    start_mode_window(cur_mode)
-    int                cur_mode;
+int    start_mode_window(int cur_mode)
 {
     int        ret;
 
@@ -1263,8 +1228,7 @@ int       start_mode_window(cur_mode)
     return NoError;
 }
 
-static void    finish_mode_window(end_window)
-    int                end_window;
+static void    finish_mode_window(int end_window)
 {
     if (ModeW) {
        XtUnmanageChild(ModeW);
@@ -1280,9 +1244,7 @@ static void       finish_mode_window(end_window)
     return;
 }
 
-static void    mode_done_cb(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void    mode_done_cb(Widget w, XtPointer client_data, XtPointer call_data)
 {
     int                ret = NoError;
     int                canceled = (int)(intptr_t) client_data == CANCEL_BTN;
@@ -1312,9 +1274,7 @@ static void       mode_done_cb(w, client_data, call_data)
        /* never returns */
 }
 
-static void    mode_cb(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void    mode_cb(Widget w, XtPointer client_data, XtPointer call_data)
 {
     int                is_set = (int)((XmToggleButtonCallbackStruct *)call_data)->set;
     int                is_auto = (int)(intptr_t) client_data;
@@ -1322,15 +1282,12 @@ static void     mode_cb(w, client_data, call_data)
     CurMode = (is_auto && is_set) ? SEL_MODE_AUTO : SEL_MODE_NOAUTO;
 }
 
-static void    mode_help_cb(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void    mode_help_cb(Widget w, XtPointer client_data, XtPointer call_data)
 {
     ximsHelp(HELP_MODE);
 }
 
-static int     create_mode_window(cur_mode)
-    int                cur_mode;
+static int     create_mode_window(int cur_mode)
 {
     Widget     form, mode_rc, cmd_rc, lb1, sep, w_tbl[8];
     Arg                args[16];
@@ -1415,14 +1372,12 @@ static int      create_mode_window(cur_mode)
 
        /* ********  ximsHelp  ******** */
 
-static void    help_ok(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void    help_ok(Widget w, XtPointer client_data, XtPointer call_data)
 {
     stop_help();
 }
 
-void   stop_help()
+void   stop_help(void)
 {
     if (HelpW) {
        XtUnmanageChild(HelpW);
@@ -1430,7 +1385,7 @@ void      stop_help()
     }
 }
 
-static void    create_help()
+static void    create_help(void)
 {
     int                i;
     Arg                args[10];
@@ -1460,8 +1415,7 @@ static void       create_help()
     return;
 }
 
-void   ximsHelp(help_type)
-    int                help_type;
+void   ximsHelp(int help_type)
 {
     char       *msg = NULL;
     XmString   str;
@@ -1509,9 +1463,7 @@ void      ximsHelp(help_type)
 static int     dialog_resp = XmCR_NONE;
 static bool    in_confirmation = False;
 
-static void    dialog_resp_cb(w, client_data, call_data)
-    Widget     w;
-    XtPointer  client_data, call_data;
+static void    dialog_resp_cb(Widget w, XtPointer client_data, XtPointer call_data)
 {
     Widget     msg_box = (Widget) client_data;
     XmAnyCallbackStruct        *cbs = (XmAnyCallbackStruct *) call_data;
@@ -1529,8 +1481,7 @@ static void       dialog_resp_cb(w, client_data, call_data)
 }
 
 #ifdef unused
-static int     wait_confirmation(w)
-    Widget     w;
+static int     wait_confirmation(Widget w)
 {
     XtAppContext       context;
 
@@ -1550,9 +1501,7 @@ static int        wait_confirmation(w)
 }
 #endif /* unused */
 
-int    put_msg_win(type, msg)
-    int                type;
-    char       *msg;
+int    put_msg_win(int type, char *msg)
 {
     int                reply;
     Widget     btn;
@@ -1657,8 +1606,7 @@ int       put_msg_win(type, msg)
 #define        LOC_RIGHT               (1<<3)
 #define        LOC_MARGIN              5
 
-static int     window_location(loc_str)
-    char       *loc_str;
+static int     window_location(char *loc_str)
 {
     int                locate_type = LOC_CENTER;
     char       *lower_str, *p;
@@ -1676,8 +1624,7 @@ static int        window_location(loc_str)
     return locate_type;
 }
 
-static void    locate_window(w)
-    Widget     w;
+static void    locate_window(Widget w)
 {
     int                scr;
     int                x, y;
@@ -1718,9 +1665,7 @@ static void       locate_window(w)
 
        /* ********  cursor (normal / wait)  ******** */
 
-static void    set_cursor(w, is_wait)
-    Widget     w;
-    int                is_wait;
+static void    set_cursor(Widget w, int is_wait)
 {
     static Cursor      cursors[2] = { None, None };
     int                idx;
@@ -1738,7 +1683,7 @@ static void       set_cursor(w, is_wait)
 
 
        /* *****  waiting functions  ***** */
-void   xevent_loop()
+void   xevent_loop(void)
 {
     if (appC)
        XtAppMainLoop(appC);
@@ -1748,7 +1693,7 @@ static time_t             xt_start_tm = 0L;       /* in sec */
 static XtIntervalId    xt_last_timer = (XtIntervalId)0;
 static bool            xt_waiting = False;
 
-void   xt_start_waiting()
+void   xt_start_waiting(void)
 {
     if (!appC) return;
 
@@ -1763,7 +1708,7 @@ void      xt_start_waiting()
     XtAppMainLoop(appC);
 }
 
-void   xt_stop_waiting()
+void   xt_stop_waiting(void)
 {
     if (xt_last_timer) {
        XtRemoveTimeOut(xt_last_timer);
@@ -1774,9 +1719,7 @@ void      xt_stop_waiting()
     ximsWaitDone();
 }
 
-static void    xt_timer_cb(client_data, timer_id)
-    XtPointer          client_data;
-    XtIntervalId       *timer_id;
+static void    xt_timer_cb(XtPointer client_data, XtIntervalId *timer_id)
 {
     int                lapse;
 
index aafac1eabb5f33c402f9419e615826bc3c6941a5..1dd791f72e356f0bba4941c751342f5e750b7eeb 100644 (file)
@@ -125,9 +125,9 @@ extern      char    *strcpyx(/* dest, src */);
 extern char    *strcpy2(/* dest, src1, src2 */);
 extern char    *newstradded(/* src1, src2, src3 */);
 extern int     str_to_int(/* ptr, val */);
-extern bool    str_to_bool(/* ptr, def_val */);
+extern bool    str_to_bool(char *ptr, bool def_val);
 extern char    *trim_line(/* ptr */);
-extern char    **parse_strlist(/* ptr, sep_ch */);
+extern char    **parse_strlist(register char *ptr, char sep_ch);
 extern int     pack_strlist(/* ptr, listp, sep_ch */);
 extern void    free_strlist(/* pp */);
 extern bool    parse_dpy_str(/* display_str, host, dnum, snum, dnet */);
index 1ddbbf3ae2144ef33f750d994abc232e54056e36..23e8f94d18cdb0cb06ba4a5bf8f890369e32074d 100644 (file)
@@ -210,9 +210,9 @@ extern char *getenv(const char *);
 int
 defParserparse()
 {
-    register int defParserm, defParsern, defParserstate;
+    int defParserm, defParsern, defParserstate;
 #if defParserDEBUG
-    register char *defParsers;
+    char *defParsers;
 
     if (defParsers = getenv("defParserDEBUG"))
     {
index 6603fdf7a42e3f40276ceceab92ac1ff97e07e38..ae53643968d7c8f1a16f05bb85692dea4f444979 100644 (file)
@@ -505,9 +505,9 @@ static int input defParser_PROTO(( void ));
 
 defParser_DECL
     {
-    register defParser_state_type defParser_current_state;
-    register defParser_CHAR *defParser_cp, *defParser_bp;
-    register int defParser_act;
+    defParser_state_type defParser_current_state;
+    defParser_CHAR *defParser_cp, *defParser_bp;
+    int defParser_act;
 
 
 
@@ -553,7 +553,7 @@ defParser_DECL
 defParser_match:
        do
            {
-           register defParser_CHAR defParser_c = defParser_ec[*defParser_cp];
+           defParser_CHAR defParser_c = defParser_ec[*defParser_cp];
            if ( defParser_accept[defParser_current_state] )
                {
                defParser_last_accepting_state = defParser_current_state;
@@ -912,9 +912,9 @@ case defParser_STATE_EOF(quoted_string):
 static int defParser_get_next_buffer()
 
     {
-    register defParser_CHAR *dest = defParser_current_buffer->defParser_ch_buf;
-    register defParser_CHAR *source = defParsertext - 1; /* copy prev. char, too */
-    register int number_to_move, i;
+    defParser_CHAR *dest = defParser_current_buffer->defParser_ch_buf;
+    defParser_CHAR *source = defParsertext - 1; /* copy prev. char, too */
+    int number_to_move, i;
     int ret_val;
 
     if ( defParser_c_buf_p > &defParser_current_buffer->defParser_ch_buf[defParser_n_chars + 1] )
@@ -993,10 +993,10 @@ static int defParser_get_next_buffer()
 static defParser_state_type defParser_get_previous_state()
 
     {
-    register defParser_state_type defParser_current_state;
-    register defParser_CHAR *defParser_cp;
+    defParser_state_type defParser_current_state;
+    defParser_CHAR *defParser_cp;
 
-    register defParser_CHAR *defParser_bp = defParsertext;
+    defParser_CHAR *defParser_bp = defParsertext;
 
     defParser_current_state = defParser_start;
     if ( defParser_bp[-1] == '\n' )
@@ -1004,7 +1004,7 @@ static defParser_state_type defParser_get_previous_state()
 
     for ( defParser_cp = defParsertext + defParser_MORE_ADJ; defParser_cp < defParser_c_buf_p; ++defParser_cp )
        {
-       register defParser_CHAR defParser_c = (*defParser_cp ? defParser_ec[*defParser_cp] : 1);
+       defParser_CHAR defParser_c = (*defParser_cp ? defParser_ec[*defParser_cp] : 1);
        if ( defParser_accept[defParser_current_state] )
            {
            defParser_last_accepting_state = defParser_current_state;
@@ -1030,17 +1030,17 @@ static defParser_state_type defParser_get_previous_state()
  */
 
 #ifdef defParser_USE_PROTOS
-static defParser_state_type defParser_try_NUL_trans( register defParser_state_type defParser_current_state )
+static defParser_state_type defParser_try_NUL_trans( defParser_state_type defParser_current_state )
 #else
 static defParser_state_type defParser_try_NUL_trans( defParser_current_state )
-register defParser_state_type defParser_current_state;
+defParser_state_type defParser_current_state;
 #endif
 
     {
-    register int defParser_is_jam;
-    register defParser_CHAR *defParser_cp = defParser_c_buf_p;
+    int defParser_is_jam;
+    defParser_CHAR *defParser_cp = defParser_c_buf_p;
 
-    register defParser_CHAR defParser_c = 1;
+    defParser_CHAR defParser_c = 1;
     if ( defParser_accept[defParser_current_state] )
        {
        defParser_last_accepting_state = defParser_current_state;
@@ -1061,25 +1061,25 @@ register defParser_state_type defParser_current_state;
 
 #if 0
 #ifdef defParser_USE_PROTOS
-static void defParserunput( defParser_CHAR c, register defParser_CHAR *defParser_bp )
+static void defParserunput( defParser_CHAR c, defParser_CHAR *defParser_bp )
 #else
 static void defParserunput( c, defParser_bp )
 defParser_CHAR c;
-register defParser_CHAR *defParser_bp;
+defParser_CHAR *defParser_bp;
 #endif
 
     {
-    register defParser_CHAR *defParser_cp = defParser_c_buf_p;
+    defParser_CHAR *defParser_cp = defParser_c_buf_p;
 
     /* undo effects of setting up defParsertext */
     *defParser_cp = defParser_hold_char;
 
     if ( defParser_cp < defParser_current_buffer->defParser_ch_buf + 2 )
        { /* need to shift things up to make room */
-       register int number_to_move = defParser_n_chars + 2; /* +2 for EOB chars */
-       register defParser_CHAR *dest =
+       int number_to_move = defParser_n_chars + 2; /* +2 for EOB chars */
+       defParser_CHAR *dest =
            &defParser_current_buffer->defParser_ch_buf[defParser_current_buffer->defParser_buf_size + 2];
-       register defParser_CHAR *source =
+       defParser_CHAR *source =
            &defParser_current_buffer->defParser_ch_buf[number_to_move];
 
        while ( source > defParser_current_buffer->defParser_ch_buf )
index 7c07c26d330fe8f17eb4f4eb91f6385d9f24af4c..f94efc5e5c0880169d0d36aa264b2f4642c151c9 100644 (file)
@@ -468,9 +468,9 @@ extern char *getenv(const char *);
 int
 styleparse()
 {
-    register int stylem, stylen, stylestate;
+    int stylem, stylen, stylestate;
 #if styleDEBUG
-    register char *styles;
+    char *styles;
 
     if (styles = getenv("styleDEBUG"))
     {
index de648d3109717dc3ac7cd0ca0a6a543b77f7b3c5..235e0fdf56cb380b8cf97c1194a41274cc98e14d 100644 (file)
@@ -606,9 +606,9 @@ static int input style_PROTO(( void ));
 
 style_DECL
     {
-    register style_state_type style_current_state;
-    register style_CHAR *style_cp, *style_bp;
-    register int style_act;
+    style_state_type style_current_state;
+    style_CHAR *style_cp, *style_bp;
+    int style_act;
 
 
 
@@ -654,7 +654,7 @@ style_DECL
 style_match:
        do
            {
-           register style_CHAR style_c = style_ec[*style_cp];
+           style_CHAR style_c = style_ec[*style_cp];
            if ( style_accept[style_current_state] )
                {
                style_last_accepting_state = style_current_state;
@@ -1160,9 +1160,9 @@ case style_STATE_EOF(quoted_string):
 static int style_get_next_buffer()
 
     {
-    register style_CHAR *dest = style_current_buffer->style_ch_buf;
-    register style_CHAR *source = styletext - 1; /* copy prev. char, too */
-    register int number_to_move, i;
+    style_CHAR *dest = style_current_buffer->style_ch_buf;
+    style_CHAR *source = styletext - 1; /* copy prev. char, too */
+    int number_to_move, i;
     int ret_val;
 
     if ( style_c_buf_p > &style_current_buffer->style_ch_buf[style_n_chars + 1] )
@@ -1241,10 +1241,10 @@ static int style_get_next_buffer()
 static style_state_type style_get_previous_state()
 
     {
-    register style_state_type style_current_state;
-    register style_CHAR *style_cp;
+    style_state_type style_current_state;
+    style_CHAR *style_cp;
 
-    register style_CHAR *style_bp = styletext;
+    style_CHAR *style_bp = styletext;
 
     style_current_state = style_start;
     if ( style_bp[-1] == '\n' )
@@ -1252,7 +1252,7 @@ static style_state_type style_get_previous_state()
 
     for ( style_cp = styletext + style_MORE_ADJ; style_cp < style_c_buf_p; ++style_cp )
        {
-       register style_CHAR style_c = (*style_cp ? style_ec[*style_cp] : 1);
+       style_CHAR style_c = (*style_cp ? style_ec[*style_cp] : 1);
        if ( style_accept[style_current_state] )
            {
            style_last_accepting_state = style_current_state;
@@ -1278,17 +1278,17 @@ static style_state_type style_get_previous_state()
  */
 
 #ifdef style_USE_PROTOS
-static style_state_type style_try_NUL_trans( register style_state_type style_current_state )
+static style_state_type style_try_NUL_trans( style_state_type style_current_state )
 #else
 static style_state_type style_try_NUL_trans( style_current_state )
-register style_state_type style_current_state;
+style_state_type style_current_state;
 #endif
 
     {
-    register int style_is_jam;
-    register style_CHAR *style_cp = style_c_buf_p;
+    int style_is_jam;
+    style_CHAR *style_cp = style_c_buf_p;
 
-    register style_CHAR style_c = 1;
+    style_CHAR style_c = 1;
     if ( style_accept[style_current_state] )
        {
        style_last_accepting_state = style_current_state;
@@ -1309,25 +1309,25 @@ register style_state_type style_current_state;
 
 #if 0
 #ifdef style_USE_PROTOS
-static void styleunput( style_CHAR c, register style_CHAR *style_bp )
+static void styleunput( style_CHAR c, style_CHAR *style_bp )
 #else
 static void styleunput( c, style_bp )
 style_CHAR c;
-register style_CHAR *style_bp;
+style_CHAR *style_bp;
 #endif
 
     {
-    register style_CHAR *style_cp = style_c_buf_p;
+    style_CHAR *style_cp = style_c_buf_p;
 
     /* undo effects of setting up styletext */
     *style_cp = style_hold_char;
 
     if ( style_cp < style_current_buffer->style_ch_buf + 2 )
        { /* need to shift things up to make room */
-       register int number_to_move = style_n_chars + 2; /* +2 for EOB chars */
-       register style_CHAR *dest =
+       int number_to_move = style_n_chars + 2; /* +2 for EOB chars */
+       style_CHAR *dest =
            &style_current_buffer->style_ch_buf[style_current_buffer->style_buf_size + 2];
-       register style_CHAR *source =
+       style_CHAR *source =
            &style_current_buffer->style_ch_buf[number_to_move];
 
        while ( source > style_current_buffer->style_ch_buf )
index cd48544bdd9739d2957a0fadf417cce389318473..13b657a2709eca4cd739f4696bea03ace72eac6d 100644 (file)
@@ -84,8 +84,7 @@ static int bt_meta __P((BTREE *));
  *     RET_ERROR, RET_SUCCESS
  */
 int
-__bt_close(dbp)
-       DB *dbp;
+__bt_close(DB *dbp)
 {
        BTREE *t;
        int fd;
@@ -134,9 +133,7 @@ __bt_close(dbp)
  *     RET_SUCCESS, RET_ERROR.
  */
 int
-__bt_sync(dbp, flags)
-       const DB *dbp;
-       u_int flags;
+__bt_sync(const DB *dbp, u_int flags)
 {
        BTREE *t;
        int status;
@@ -208,8 +205,7 @@ ecrsr:      if (ISSET(t, B_DELCRSR)) {
  *     RET_ERROR, RET_SUCCESS
  */
 static int
-bt_meta(t)
-       BTREE *t;
+bt_meta(BTREE *t)
 {
        BTMETA m;
        void *p;
index dbee48c72750ecda061be23371f0ba3922dc7d4b..58ad4d1ada251a71ed6bf4c5ce25070adac2619a 100644 (file)
@@ -81,10 +81,7 @@ static void mswap __P((PAGE *));
  *     h:      page to convert
  */
 void
-__bt_pgin(t, pg, pp)
-       void *t;
-       pgno_t pg;
-       void *pp;
+__bt_pgin(void *t, pgno_t pg, void *pp)
 {
        PAGE *h;
        int i, top;
@@ -149,10 +146,7 @@ __bt_pgin(t, pg, pp)
 }
 
 void
-__bt_pgout(t, pg, pp)
-       void *t;
-       pgno_t pg;
-       void *pp;
+__bt_pgout(void *t, pgno_t pg, void *pp)
 {
        PAGE *h;
        int i, top;
@@ -223,8 +217,7 @@ __bt_pgout(t, pg, pp)
  *     p:      page to convert
  */
 static void
-mswap(pg)
-       PAGE *pg;
+mswap(PAGE *pg)
 {
        char *p;
 
index cda3f475a2603d0bf0df7b30e0d9de09d64e6946..d31aaf0c6dfc4b744299ae7ff5e9e59cb3b8edae 100644 (file)
@@ -84,10 +84,7 @@ static int bt_bdelete __P((BTREE *, const DBT *));
  *     RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.
  */
 int
-__bt_delete(dbp, key, flags)
-       const DB *dbp;
-       const DBT *key;
-       u_int flags;
+__bt_delete(const DB *dbp, const DBT *key, u_int flags)
 {
        BTREE *t;
        int status;
@@ -141,9 +138,7 @@ einval:             errno = EINVAL;
  *     RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.
  */
 static int
-bt_bdelete(t, key)
-       BTREE *t;
-       const DBT *key;
+bt_bdelete(BTREE *t, const DBT *key)
 {
        EPG *e, save;
        PAGE *h;
@@ -299,15 +294,12 @@ done2:    mpool_put(t->bt_mp, h, dirty1);
  *     RET_SUCCESS, RET_ERROR.
  */
 int
-__bt_dleaf(t, h, index)
-       BTREE *t;
-       PAGE *h;
-       int index;
+__bt_dleaf(BTREE *t, PAGE *h, int index)
 {
-       register BLEAF *bl;
-       register indx_t *ip, offset;
-       register size_t nbytes;
-       register int cnt;
+       BLEAF *bl;
+       indx_t *ip, offset;
+       size_t nbytes;
+       int cnt;
        char *from;
        void *to;
 
index 3e37ccee5024f9b73963e04f5b90a0ad69eeccc4..f2ea0f145caca085436fd58ae798cc3ba58306b2 100644 (file)
@@ -83,11 +83,7 @@ static char sccsid[] = "@(#)bt_get.c 8.2 (Berkeley) 9/7/93";
  *     RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.
  */
 int
-__bt_get(dbp, key, data, flags)
-       const DB *dbp;
-       const DBT *key;
-       DBT *data;
-       u_int flags;
+__bt_get(const DB *dbp, const DBT *key, DBT *data, u_int flags)
 {
        BTREE *t;
        EPG *e;
@@ -153,13 +149,10 @@ __bt_get(dbp, key, data, flags)
  *     The first entry in the tree greater than or equal to key.
  */
 EPG *
-__bt_first(t, key, exactp)
-       BTREE *t;
-       const DBT *key;
-       int *exactp;
+__bt_first(BTREE *t, const DBT *key, int *exactp)
 {
-       register PAGE *h;
-       register EPG *e;
+       PAGE *h;
+       EPG *e;
        EPG save;
        pgno_t cpgno, pg;
        indx_t cindex;
index aa307becb71664e2bd7639bcb28dc4e3f745d7f9..62c87d95fd3b9593edc4611fba552fac54d2d7cd 100644 (file)
@@ -106,10 +106,7 @@ static int tmp __P((void));
  *
  */
 DB *
-__bt_open(fname, flags, mode, openinfo, dflags)
-       const char *fname;
-       int flags, mode, dflags;
-       const BTREEINFO *openinfo;
+__bt_open(const char *fname, int flags, int mode, const BTREEINFO *openinfo, int dflags)
 {
        BTMETA m;
        BTREE *t;
@@ -373,8 +370,7 @@ err:        if (t) {
  *     RET_ERROR, RET_SUCCESS
  */
 static int
-nroot(t)
-       BTREE *t;
+nroot(BTREE *t)
 {
        PAGE *meta, *root;
        pgno_t npg;
@@ -406,7 +402,7 @@ nroot(t)
 }
 
 static int
-tmp()
+tmp(void)
 {
        sigset_t set, oset;
        int fd;
@@ -426,7 +422,7 @@ tmp()
 }
 
 static int
-byteorder()
+byteorder(void)
 {
        u_long x;                       /* XXX: 32-bit assumption. */
        u_char *p;
@@ -444,8 +440,7 @@ byteorder()
 }
 
 int
-__bt_fd(dbp)
-        const DB *dbp;
+__bt_fd(const DB *dbp)
 {
        BTREE *t;
 
index 505fa792969becfa0ab16bea60043e6bd2a0c74e..c09337068c58020787dbad934287b301a9a1d8c3 100644 (file)
@@ -100,12 +100,7 @@ static char sccsid[] = "@(#)bt_overflow.c  8.1 (Berkeley) 6/4/93";
  *     RET_ERROR, RET_SUCCESS
  */
 int
-__ovfl_get(t, p, ssz, buf, bufsz)
-       BTREE *t;
-       void *p;
-       size_t *ssz;
-       char **buf;
-       size_t *bufsz;
+__ovfl_get(BTREE *t, void *p, size_t *ssz, char **buf, size_t *bufsz)
 {
        PAGE *h;
        pgno_t pg;
@@ -157,10 +152,7 @@ __ovfl_get(t, p, ssz, buf, bufsz)
  *     RET_ERROR, RET_SUCCESS
  */
 int
-__ovfl_put(t, dbt, pg)
-       BTREE *t;
-       const DBT *dbt;
-       pgno_t *pg;
+__ovfl_put(BTREE *t, const DBT *dbt, pgno_t *pg)
 {
        PAGE *h, *last;
        void *p;
@@ -210,9 +202,7 @@ __ovfl_put(t, dbt, pg)
  *     RET_ERROR, RET_SUCCESS
  */
 int
-__ovfl_delete(t, p)
-       BTREE *t;
-       void *p;
+__ovfl_delete(BTREE *t, void *p)
 {
        PAGE *h;
        pgno_t pg;
index ccb0796ab5cad22cf8ff96d14e4e6dd720e7a607..fb69b1fd3ec5cc798a61ba2163e14f4cba9003e3 100644 (file)
@@ -77,9 +77,7 @@ static char sccsid[] = "@(#)bt_page.c 8.1 (Berkeley) 6/4/93";
  *     RET_ERROR, RET_SUCCESS
  */
 int
-__bt_free(t, h)
-       BTREE *t;
-       PAGE *h;
+__bt_free(BTREE *t, PAGE *h)
 {
        /* Insert the page at the start of the free list. */
        h->prevpg = P_INVALID;
@@ -101,9 +99,7 @@ __bt_free(t, h)
  *     Pointer to a page, NULL on error.
  */
 PAGE *
-__bt_new(t, npg)
-       BTREE *t;
-       pgno_t *npg;
+__bt_new(BTREE *t, pgno_t *npg)
 {
        PAGE *h;
 
index 8f42b765812c5ce445e7d7f409b4f51656031e61..3c34b9bf1b75dcc4bd8e1edc0b575c70d657e83d 100644 (file)
@@ -87,11 +87,7 @@ static EPG *bt_fast __P((BTREE *, const DBT *, const DBT *, int *));
  *     tree and R_NOOVERWRITE specified.
  */
 int
-__bt_put(dbp, key, data, flags)
-       const DB *dbp;
-       DBT *key;
-       const DBT *data;
-       u_int flags;
+__bt_put(const DB *dbp, DBT *key, const DBT *data, u_int flags)
 {
        BTREE *t;
        DBT tkey, tdata;
@@ -285,10 +281,7 @@ u_long bt_cache_hit, bt_cache_miss;
  *     EPG for new record or NULL if not found.
  */
 static EPG *
-bt_fast(t, key, data, exactp)
-       BTREE *t;
-       const DBT *key, *data;
-       int *exactp;
+bt_fast(BTREE *t, const DBT *key, const DBT *data, int *exactp)
 {
        static EPG e;
        PAGE *h;
index a6bbdebf70201b8c8a385e2b46caf7a077af5e14..7ab48abd53aac44b859a9ee7b8ea03a8a101955a 100644 (file)
@@ -85,14 +85,11 @@ static char sccsid[] = "@(#)bt_search.c     8.1 (Berkeley) 6/4/93";
  *     next search of any kind in any tree.
  */
 EPG *
-__bt_search(t, key, exactp)
-       BTREE *t;
-       const DBT *key;
-       int *exactp;
+__bt_search(BTREE *t, const DBT *key, int *exactp)
 {
-       register indx_t index;
-       register int base, cmp, lim;
-       register PAGE *h;
+       indx_t index;
+       int base, cmp, lim;
+       PAGE *h;
        pgno_t pg;
        static EPG e;
 
index 2ba0ba7e2b180d549bae1833e575833b7eea2dd0..82bab6087c96ccb6c99083b19cfb2bcdf43f2a86 100644 (file)
@@ -100,10 +100,7 @@ static int  bt_seqset __P((BTREE *, EPG *, DBT *, int));
  *     RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key.
  */
 int
-__bt_seq(dbp, key, data, flags)
-       const DB *dbp;
-       DBT *key, *data;
-       u_int flags;
+__bt_seq(const DB *dbp, DBT *key, DBT *data, u_int flags)
 {
        BTREE *t;
        EPG e;
@@ -176,11 +173,7 @@ __bt_seq(dbp, key, data, flags)
  *     RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key.
  */
 static int
-bt_seqset(t, ep, key, flags)
-       BTREE *t;
-       EPG *ep;
-       DBT *key;
-       int flags;
+bt_seqset(BTREE *t, EPG *ep,  DBT *key, int flags)
 {
        EPG *e;
        PAGE *h;
@@ -306,10 +299,7 @@ bt_seqset(t, ep, key, flags)
  *     RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key.
  */
 static int
-bt_seqadv(t, e, flags)
-       BTREE *t;
-       EPG *e;
-       int flags;
+bt_seqadv(BTREE *t, EPG *e, int flags)
 {
        EPGNO *c, delc;
        PAGE *h;
@@ -387,9 +377,7 @@ bt_seqadv(t, e, flags)
  *     RET_ERROR, RET_SUCCESS
  */
 int
-__bt_crsrdel(t, c)
-       BTREE *t;
-       EPGNO *c;
+__bt_crsrdel(BTREE *t, EPGNO *c)
 {
        PAGE *h;
        int status;
index 75160bced05c476bc0d9344adec54b8e2b6c74d1..434af3001a4a95d777eb6e3ffeb20d631c052661 100644 (file)
@@ -103,13 +103,7 @@ u_long     bt_rootsplit, bt_split, bt_sortsplit, bt_pfxsaved;
  *     RET_ERROR, RET_SUCCESS
  */
 int
-__bt_split(t, sp, key, data, flags, ilen, skip)
-       BTREE *t;
-       PAGE *sp;
-       const DBT *key, *data;
-       u_long flags;
-       size_t ilen;
-       u_int skip;
+__bt_split(BTREE *t, PAGE *sp, const DBT *key, const DBT *data, u_long flags, size_t ilen, u_int skip)
 {
        BINTERNAL *bi = NULL;
        BLEAF *bl = NULL;
@@ -365,11 +359,7 @@ err2:      mpool_put(t->bt_mp, l, 0);
  *     Pointer to page in which to insert or NULL on error.
  */
 static PAGE *
-bt_page(t, h, lp, rp, skip, ilen)
-       BTREE *t;
-       PAGE *h, **lp, **rp;
-       u_int *skip;
-       size_t ilen;
+bt_page(BTREE *t, PAGE *h, PAGE **lp, PAGE **rp, u_int *skip, size_t ilen)
 {
        PAGE *l, *r, *tp;
        pgno_t npg;
@@ -467,11 +457,7 @@ bt_page(t, h, lp, rp, skip, ilen)
  *     Pointer to page in which to insert or NULL on error.
  */
 static PAGE *
-bt_root(t, h, lp, rp, skip, ilen)
-       BTREE *t;
-       PAGE *h, **lp, **rp;
-       u_int *skip;
-       size_t ilen;
+bt_root(BTREE *t, PAGE *h, PAGE **lp, PAGE **rp, u_int *skip, size_t ilen)
 {
        PAGE *l, *r, *tp;
        pgno_t lnpg, rnpg;
@@ -514,9 +500,7 @@ bt_root(t, h, lp, rp, skip, ilen)
  *     RET_ERROR, RET_SUCCESS
  */
 static int
-bt_rroot(t, h, l, r)
-       BTREE *t;
-       PAGE *h, *l, *r;
+bt_rroot(BTREE *t, PAGE *h, PAGE *l, PAGE *r)
 {
        char *dest;
 
@@ -554,9 +538,7 @@ bt_rroot(t, h, l, r)
  *     RET_ERROR, RET_SUCCESS
  */
 static int
-bt_broot(t, h, l, r)
-       BTREE *t;
-       PAGE *h, *l, *r;
+bt_broot(BTREE *t, PAGE *h, PAGE *l, PAGE *r)
 {
        BINTERNAL *bi;
        BLEAF *bl;
@@ -631,11 +613,7 @@ bt_broot(t, h, l, r)
  *     Pointer to page in which to insert.
  */
 static PAGE *
-bt_psplit(t, h, l, r, pskip, ilen)
-       BTREE *t;
-       PAGE *h, *l, *r;
-       u_int *pskip;
-       size_t ilen;
+bt_psplit(BTREE *t, PAGE *h, PAGE *l, PAGE *r, u_int *pskip, size_t ilen)
 {
        BINTERNAL *bi;
        BLEAF *bl;
@@ -811,9 +789,7 @@ bt_psplit(t, h, l, r, pskip, ilen)
  *     RET_SUCCESS, RET_ERROR.
  */
 static int
-bt_preserve(t, pg)
-       BTREE *t;
-       pgno_t pg;
+bt_preserve(BTREE *t, pgno_t pg)
 {
        PAGE *h;
 
@@ -839,8 +815,7 @@ bt_preserve(t, pg)
  * all the way back to bt_split/bt_rroot and it's not very clean.
  */
 static recno_t
-rec_total(h)
-       PAGE *h;
+rec_total(PAGE *h)
 {
        recno_t recs;
        indx_t nxt, top;
index bc31ef08afb9911d4875f82f48836d4506d31e76..27c10452c8a229940778930ec2929774ccea74d2 100644 (file)
@@ -94,10 +94,7 @@ static char sccsid[] = "@(#)bt_stack.c       8.1 (Berkeley) 6/4/93";
  *     RET_ERROR, RET_SUCCESS
  */
 int
-__bt_push(t, pgno, index)
-       BTREE *t;
-       pgno_t pgno;
-       int index;
+__bt_push(BTREE *t, pgno_t pgno, int index)
 {
        if (t->bt_sp == t->bt_maxstack) {
                t->bt_maxstack += 50;
index b355016421ea342175f8efa8d0e263ab69554bda..3e6f499eb5762e93aa415f175583193c38bfa3fc 100644 (file)
@@ -83,13 +83,10 @@ static char sccsid[] = "@(#)bt_utils.c      8.2 (Berkeley) 9/7/93";
  *     RET_SUCCESS, RET_ERROR.
  */
 int
-__bt_ret(t, e, key, data)
-       BTREE *t;
-       EPG *e;
-       DBT *key, *data;
+__bt_ret(BTREE *t, EPG *e, DBT *key, DBT *data)
 {
-       register BLEAF *bl;
-       register void *p;
+       BLEAF *bl;
+       void *p;
 
        bl = GETBLEAF(e->page, e->index);
 
@@ -158,10 +155,7 @@ __bt_ret(t, e, key, data)
  *     > 0 if k1 is > record
  */
 int
-__bt_cmp(t, k1, e)
-       BTREE *t;
-       const DBT *k1;
-       EPG *e;
+__bt_cmp(BTREE *t, const DBT *k1, EPG *e)
 {
        BINTERNAL *bi;
        BLEAF *bl;
@@ -221,11 +215,10 @@ __bt_cmp(t, k1, e)
  *     > 0 if a is > b
  */
 int
-__bt_defcmp(a, b)
-       const DBT *a, *b;
+__bt_defcmp(const DBT *a, const DBT *b)
 {
-       register u_char *p1, *p2;
-       register int diff, len;
+       u_char *p1, *p2;
+       int diff, len;
 
        len = MIN(a->size, b->size);
        for (p1 = a->data, p2 = b->data; len--; ++p1, ++p2)
@@ -245,11 +238,10 @@ __bt_defcmp(a, b)
  *     Number of bytes needed to distinguish b from a.
  */
 int
-__bt_defpfx(a, b)
-       const DBT *a, *b;
+__bt_defpfx(const DBT *a, const DBT *b)
 {
-       register u_char *p1, *p2;
-       register int len;
+       u_char *p1, *p2;
+       int len;
        int cnt;
 
        cnt = 1;
index ed619262f256e64a9fde3d21b0c21b4076070141..a735506c5c1b99d17b60711447b21992ced49716 100644 (file)
@@ -69,11 +69,7 @@ static char sccsid[] = "@(#)db.c     8.2 (Berkeley) 9/7/93";
 #include <db.h>
 
 DB *
-dbopen(fname, flags, mode, type, openinfo)
-       const char *fname;
-       int flags, mode;
-       DBTYPE type;
-       const void *openinfo;
+dbopen(const char *fname, int flags, int mode, DBTYPE type, const void *openinfo)
 {
 
 #define        DB_FLAGS        (DB_LOCK | DB_SHMEM | DB_TXN)
@@ -102,7 +98,7 @@ dbopen(fname, flags, mode, type, openinfo)
 }
 
 static int
-__dberr()
+__dberr(void)
 {
        return (RET_ERROR);
 }
@@ -114,8 +110,7 @@ __dberr()
  *     dbp:    pointer to the DB structure.
  */
 void
-__dbpanic(dbp)
-       DB *dbp;
+__dbpanic(DB *dbp)
 {
        /* The only thing that can succeed is a close. */
        dbp->del = (int (*)())__dberr;
index 07218ec0fea883a5b542699da48e58349e2753e0..3568a01d2c79248d4e3c86efb81b94d41593bdc2 100644 (file)
@@ -92,11 +92,11 @@ bcopy(src0, dst0, length)
 #endif
        void *dst0;
        const void *src0;
-       register size_t length;
+       size_t length;
 {
-       register char *dst = dst0;
-       register const char *src = src0;
-       register size_t t;
+       char *dst = dst0;
+       const char *src = src0;
+       size_t t;
 
        if (length == 0 || dst == src)          /* nothing to do */
                goto done;
index a8e25f9479a44d524a8693abbd7f08ce9fbc834c..4f043799b15621c2e1257e5ef699d2519b2b0116 100644 (file)
@@ -73,8 +73,7 @@ extern int errno;
 
 static int _gettemp(char*, int*);
 
-int mkstemp(path)
-       char *path;
+int mkstemp(char *path)
 {
        int fd;
 
@@ -82,18 +81,15 @@ int mkstemp(path)
 }
 
 char *
-mktemp(path)
-       char *path;
+mktemp(char *path)
 {
        return(_gettemp(path, (int *)NULL) ? path : (char *)NULL);
 }
 
 static int
-_gettemp(path, doopen)
-       char *path;
-       register int *doopen;
+_gettemp(char *path, int *doopen)
 {
-       register char *start, *trv;
+       char *start, *trv;
        struct stat sbuf;
        u_int pid;
 
index 68110fcd0e455690f998b6c90fd901be42a18bd3..92ce371bfa28f99853431511bea1645a5d601ffc 100644 (file)
@@ -91,10 +91,7 @@ static void __mpoolerr __P((const char *fmt, ...));
  *     MPOOL pointer, NULL on error.
  */
 MPOOL *
-mpool_open(key, fd, pagesize, maxcache)
-       DBT *key;
-       int fd;
-       pgno_t pagesize, maxcache;
+mpool_open(DBT *key, int fd, pgno_t pagesize, pgno_t maxcache)
 {
        struct stat sb;
        MPOOL *mp;
@@ -145,11 +142,10 @@ mpool_open(key, fd, pagesize, maxcache)
  *     pgcookie:       Cookie for page in/out routines.
  */
 void
-mpool_filter(mp, pgin, pgout, pgcookie)
-       MPOOL *mp;
-       void (*pgin) __P((void *, pgno_t, void *));
-       void (*pgout) __P((void *, pgno_t, void *));
-       void *pgcookie;
+mpool_filter(MPOOL *mp,
+             void (*pgin) __P((void *, pgno_t, void *)),
+             void (*pgout) __P((void *, pgno_t, void *)),
+             void *pgcookie)
 {
        mp->pgin = pgin;
        mp->pgout = pgout;
@@ -166,9 +162,7 @@ mpool_filter(mp, pgin, pgout, pgcookie)
  *     RET_ERROR, RET_SUCCESS
  */
 void *
-mpool_new(mp, pgnoaddr)
-       MPOOL *mp;
-       pgno_t *pgnoaddr;
+mpool_new(MPOOL *mp, pgno_t *pgnoaddr)
 {
        BKT *b;
        BKTHDR *hp;
@@ -201,10 +195,7 @@ mpool_new(mp, pgnoaddr)
  *     RET_ERROR, RET_SUCCESS
  */
 void *
-mpool_get(mp, pgno, flags)
-       MPOOL *mp;
-       pgno_t pgno;
-       u_int flags;            /* XXX not used? */
+mpool_get(MPOOL *mp, pgno_t pgno, u_int flags /* XXX not used? */)
 {
        BKT *b;
        BKTHDR *hp;
@@ -277,10 +268,7 @@ mpool_get(mp, pgno, flags)
  *     RET_ERROR, RET_SUCCESS
  */
 int
-mpool_put(mp, page, flags)
-       MPOOL *mp;
-       void *page;
-       u_int flags;
+mpool_put(MPOOL *mp, void *page, u_int flags)
 {
        BKT *baddr;
 #ifdef DEBUG
@@ -316,8 +304,7 @@ mpool_put(mp, page, flags)
  *     RET_ERROR, RET_SUCCESS
  */
 int
-mpool_close(mp)
-       MPOOL *mp;
+mpool_close(MPOOL *mp)
 {
        BKT *b, *next;
 
@@ -340,8 +327,7 @@ mpool_close(mp)
  *     RET_ERROR, RET_SUCCESS
  */
 int
-mpool_sync(mp)
-       MPOOL *mp;
+mpool_sync(MPOOL *mp)
 {
        BKT *b;
 
@@ -361,8 +347,7 @@ mpool_sync(mp)
  *     NULL on failure and a pointer to the BKT on success     
  */
 static BKT *
-mpool_bkt(mp)
-       MPOOL *mp;
+mpool_bkt(MPOOL *mp)
 {
        BKT *b;
 
@@ -424,9 +409,7 @@ new:        if ((b = malloc(sizeof(BKT) + mp->pagesize)) == NULL)
  *     RET_ERROR, RET_SUCCESS
  */
 static int
-mpool_write(mp, b)
-       MPOOL *mp;
-       BKT *b;
+mpool_write(MPOOL *mp, BKT *b)
 {
        off_t off;
 
@@ -456,12 +439,10 @@ mpool_write(mp, b)
  *     NULL on failure and a pointer to the BKT on success
  */
 static BKT *
-mpool_look(mp, pgno)
-       MPOOL *mp;
-       pgno_t pgno;
+mpool_look(MPOOL *mp, pgno_t pgno)
 {
-       register BKT *b;
-       register BKTHDR *tb;
+       BKT *b;
+       BKTHDR *tb;
 
        /* XXX
         * If find the buffer, put it first on the hash chain so can
@@ -489,8 +470,7 @@ mpool_look(mp, pgno)
  *     mp:     mpool cookie
  */
 void
-mpool_stat(mp)
-       MPOOL *mp;
+mpool_stat(MPOOL *mp)
 {
        BKT *b;
        int cnt;
index b1f7eab1c1efda8979720d30e6b9ede0f541d2d6..16b5854f5c5e16a5df8f4771f9897db4605f45ae 100644 (file)
@@ -26,9 +26,7 @@
 #include <stdlib.h>
 
 void *
-__fix_realloc(p, n)
-       void *p;
-       size_t n;
+__fix_realloc(void *p, size_t n)
 {
        return (p == 0 ? malloc(n) : realloc(p, n));
 }
index 5a09ab53b95ffd57432cfc0aeeef4821060ed8bb..747f73141aefd0d7eabc9935ead2f0ea83c48f21 100644 (file)
@@ -435,9 +435,9 @@ static int input ps_PROTO(( void ));
 
 ps_DECL
     {
-    register ps_state_type ps_current_state;
-    register ps_CHAR *ps_cp, *ps_bp;
-    register int ps_act;
+    ps_state_type ps_current_state;
+    ps_CHAR *ps_cp, *ps_bp;
+    int ps_act;
 
 
 
@@ -481,7 +481,7 @@ ps_DECL
 ps_match:
        do
            {
-           register ps_CHAR ps_c = ps_ec[*ps_cp];
+           ps_CHAR ps_c = ps_ec[*ps_cp];
            if ( ps_accept[ps_current_state] )
                {
                ps_last_accepting_state = ps_current_state;
@@ -666,9 +666,9 @@ case ps_STATE_EOF(INITIAL):
 static int ps_get_next_buffer()
 
     {
-    register ps_CHAR *dest = ps_current_buffer->ps_ch_buf;
-    register ps_CHAR *source = pstext - 1; /* copy prev. char, too */
-    register int number_to_move, i;
+    ps_CHAR *dest = ps_current_buffer->ps_ch_buf;
+    ps_CHAR *source = pstext - 1; /* copy prev. char, too */
+    int number_to_move, i;
     int ret_val;
 
     if ( ps_c_buf_p > &ps_current_buffer->ps_ch_buf[ps_n_chars + 1] )
@@ -747,14 +747,14 @@ static int ps_get_next_buffer()
 static ps_state_type ps_get_previous_state()
 
     {
-    register ps_state_type ps_current_state;
-    register ps_CHAR *ps_cp;
+    ps_state_type ps_current_state;
+    ps_CHAR *ps_cp;
 
     ps_current_state = ps_start;
 
     for ( ps_cp = pstext + ps_MORE_ADJ; ps_cp < ps_c_buf_p; ++ps_cp )
        {
-       register ps_CHAR ps_c = (*ps_cp ? ps_ec[*ps_cp] : 1);
+       ps_CHAR ps_c = (*ps_cp ? ps_ec[*ps_cp] : 1);
        if ( ps_accept[ps_current_state] )
            {
            ps_last_accepting_state = ps_current_state;
@@ -780,17 +780,17 @@ static ps_state_type ps_get_previous_state()
  */
 
 #ifdef ps_USE_PROTOS
-static ps_state_type ps_try_NUL_trans( register ps_state_type ps_current_state )
+static ps_state_type ps_try_NUL_trans( ps_state_type ps_current_state )
 #else
 static ps_state_type ps_try_NUL_trans( ps_current_state )
-register ps_state_type ps_current_state;
+ps_state_type ps_current_state;
 #endif
 
     {
-    register int ps_is_jam;
-    register ps_CHAR *ps_cp = ps_c_buf_p;
+    int ps_is_jam;
+    ps_CHAR *ps_cp = ps_c_buf_p;
 
-    register ps_CHAR ps_c = 1;
+    ps_CHAR ps_c = 1;
     if ( ps_accept[ps_current_state] )
        {
        ps_last_accepting_state = ps_current_state;
@@ -811,25 +811,25 @@ register ps_state_type ps_current_state;
 
 #if 0
 #ifdef ps_USE_PROTOS
-static void psunput( ps_CHAR c, register ps_CHAR *ps_bp )
+static void psunput( ps_CHAR c, ps_CHAR *ps_bp )
 #else
 static void psunput( c, ps_bp )
 ps_CHAR c;
-register ps_CHAR *ps_bp;
+ps_CHAR *ps_bp;
 #endif
 
     {
-    register ps_CHAR *ps_cp = ps_c_buf_p;
+    ps_CHAR *ps_cp = ps_c_buf_p;
 
     /* undo effects of setting up pstext */
     *ps_cp = ps_hold_char;
 
     if ( ps_cp < ps_current_buffer->ps_ch_buf + 2 )
        { /* need to shift things up to make room */
-       register int number_to_move = ps_n_chars + 2; /* +2 for EOB chars */
-       register ps_CHAR *dest =
+       int number_to_move = ps_n_chars + 2; /* +2 for EOB chars */
+       ps_CHAR *dest =
            &ps_current_buffer->ps_ch_buf[ps_current_buffer->ps_buf_size + 2];
-       register ps_CHAR *source =
+       ps_CHAR *source =
            &ps_current_buffer->ps_ch_buf[number_to_move];
 
        while ( source > ps_current_buffer->ps_ch_buf )
index a06a0147f08455a2a84ca42c7167d6197dee222c..bcfd4cea8522fdec8241e38fb41cd108afec4443 100644 (file)
@@ -441,9 +441,9 @@ static int input sgml_PROTO(( void ));
 
 sgml_DECL
     {
-    register sgml_state_type sgml_current_state;
-    register sgml_CHAR *sgml_cp, *sgml_bp;
-    register int sgml_act;
+    sgml_state_type sgml_current_state;
+    sgml_CHAR *sgml_cp, *sgml_bp;
+    int sgml_act;
 
 
 
@@ -487,7 +487,7 @@ sgml_DECL
 sgml_match:
        do
            {
-           register sgml_CHAR sgml_c = sgml_ec[*sgml_cp];
+           sgml_CHAR sgml_c = sgml_ec[*sgml_cp];
            if ( sgml_accept[sgml_current_state] )
                {
                sgml_last_accepting_state = sgml_current_state;
@@ -677,9 +677,9 @@ case sgml_STATE_EOF(INITIAL):
 static int sgml_get_next_buffer()
 
     {
-    register sgml_CHAR *dest = sgml_current_buffer->sgml_ch_buf;
-    register sgml_CHAR *source = sgmltext - 1; /* copy prev. char, too */
-    register int number_to_move, i;
+    sgml_CHAR *dest = sgml_current_buffer->sgml_ch_buf;
+    sgml_CHAR *source = sgmltext - 1; /* copy prev. char, too */
+    int number_to_move, i;
     int ret_val;
 
     if ( sgml_c_buf_p > &sgml_current_buffer->sgml_ch_buf[sgml_n_chars + 1] )
@@ -758,14 +758,14 @@ static int sgml_get_next_buffer()
 static sgml_state_type sgml_get_previous_state()
 
     {
-    register sgml_state_type sgml_current_state;
-    register sgml_CHAR *sgml_cp;
+    sgml_state_type sgml_current_state;
+    sgml_CHAR *sgml_cp;
 
     sgml_current_state = sgml_start;
 
     for ( sgml_cp = sgmltext + sgml_MORE_ADJ; sgml_cp < sgml_c_buf_p; ++sgml_cp )
        {
-       register sgml_CHAR sgml_c = (*sgml_cp ? sgml_ec[*sgml_cp] : 1);
+       sgml_CHAR sgml_c = (*sgml_cp ? sgml_ec[*sgml_cp] : 1);
        if ( sgml_accept[sgml_current_state] )
            {
            sgml_last_accepting_state = sgml_current_state;
@@ -791,17 +791,17 @@ static sgml_state_type sgml_get_previous_state()
  */
 
 #ifdef sgml_USE_PROTOS
-static sgml_state_type sgml_try_NUL_trans( register sgml_state_type sgml_current_state )
+static sgml_state_type sgml_try_NUL_trans( sgml_state_type sgml_current_state )
 #else
 static sgml_state_type sgml_try_NUL_trans( sgml_current_state )
-register sgml_state_type sgml_current_state;
+sgml_state_type sgml_current_state;
 #endif
 
     {
-    register int sgml_is_jam;
-    register sgml_CHAR *sgml_cp = sgml_c_buf_p;
+    int sgml_is_jam;
+    sgml_CHAR *sgml_cp = sgml_c_buf_p;
 
-    register sgml_CHAR sgml_c = 1;
+    sgml_CHAR sgml_c = 1;
     if ( sgml_accept[sgml_current_state] )
        {
        sgml_last_accepting_state = sgml_current_state;
@@ -822,25 +822,25 @@ register sgml_state_type sgml_current_state;
 
 #if 0
 #ifdef sgml_USE_PROTOS
-static void sgmlunput( sgml_CHAR c, register sgml_CHAR *sgml_bp )
+static void sgmlunput( sgml_CHAR c, sgml_CHAR *sgml_bp )
 #else
 static void sgmlunput( c, sgml_bp )
 sgml_CHAR c;
-register sgml_CHAR *sgml_bp;
+sgml_CHAR *sgml_bp;
 #endif
 
     {
-    register sgml_CHAR *sgml_cp = sgml_c_buf_p;
+    sgml_CHAR *sgml_cp = sgml_c_buf_p;
 
     /* undo effects of setting up sgmltext */
     *sgml_cp = sgml_hold_char;
 
     if ( sgml_cp < sgml_current_buffer->sgml_ch_buf + 2 )
        { /* need to shift things up to make room */
-       register int number_to_move = sgml_n_chars + 2; /* +2 for EOB chars */
-       register sgml_CHAR *dest =
+       int number_to_move = sgml_n_chars + 2; /* +2 for EOB chars */
+       sgml_CHAR *dest =
            &sgml_current_buffer->sgml_ch_buf[sgml_current_buffer->sgml_buf_size + 2];
-       register sgml_CHAR *source =
+       sgml_CHAR *source =
            &sgml_current_buffer->sgml_ch_buf[number_to_move];
 
        while ( source > sgml_current_buffer->sgml_ch_buf )
index c512d6695328fe5cc037ef6341fdb617cb5076f3..14c59e9af2926ce08abec4de19125049644eecb0 100644 (file)
@@ -350,9 +350,9 @@ extern char *getenv(const char *);
 int
  schemaparse()
 {
-    register int  schemam,  scheman,  schemastate;
+    int  schemam,  scheman,  schemastate;
 #if  schemaDEBUG
-    register char * schemas;
+    char * schemas;
 
     if ( schemas = getenv(" schemaDEBUG"))
     {
index 9b3b2c2dafd8eecb2b671954bad608d23e0a09c5..842ba74977a1b5ebec3f7d41e81e88a126d226c7 100644 (file)
@@ -520,9 +520,9 @@ static int input  schema_PROTO(( void ));
 
  schema_DECL
     {
-    register  schema_state_type  schema_current_state;
-    register  schema_CHAR * schema_cp, * schema_bp;
-    register int  schema_act;
+     schema_state_type  schema_current_state;
+     schema_CHAR * schema_cp, * schema_bp;
+    int  schema_act;
 
 
 
@@ -568,7 +568,7 @@ static int input  schema_PROTO(( void ));
  schema_match:
        do
            {
-           register  schema_CHAR  schema_c =  schema_ec[* schema_cp];
+            schema_CHAR  schema_c =  schema_ec[* schema_cp];
            if (  schema_accept[ schema_current_state] )
                {
                 schema_last_accepting_state =  schema_current_state;
@@ -922,9 +922,9 @@ case  schema_STATE_EOF(INITIAL):
 static int  schema_get_next_buffer()
 
     {
-    register  schema_CHAR *dest =  schema_current_buffer-> schema_ch_buf;
-    register  schema_CHAR *source =  schematext - 1; /* copy prev. char, too */
-    register int number_to_move, i;
+     schema_CHAR *dest =  schema_current_buffer-> schema_ch_buf;
+     schema_CHAR *source =  schematext - 1; /* copy prev. char, too */
+    int number_to_move, i;
     int ret_val;
 
     if (  schema_c_buf_p > & schema_current_buffer-> schema_ch_buf[ schema_n_chars + 1] )
@@ -1003,10 +1003,10 @@ static int  schema_get_next_buffer()
 static  schema_state_type  schema_get_previous_state()
 
     {
-    register  schema_state_type  schema_current_state;
-    register  schema_CHAR * schema_cp;
+     schema_state_type  schema_current_state;
+     schema_CHAR * schema_cp;
 
-    register  schema_CHAR * schema_bp =  schematext;
+     schema_CHAR * schema_bp =  schematext;
 
      schema_current_state =  schema_start;
     if (  schema_bp[-1] == '\n' )
@@ -1014,7 +1014,7 @@ static  schema_state_type  schema_get_previous_state()
 
     for (  schema_cp =  schematext +  schema_MORE_ADJ;  schema_cp <  schema_c_buf_p; ++ schema_cp )
        {
-       register  schema_CHAR  schema_c = (* schema_cp ?  schema_ec[* schema_cp] : 1);
+        schema_CHAR  schema_c = (* schema_cp ?  schema_ec[* schema_cp] : 1);
        if (  schema_accept[ schema_current_state] )
            {
             schema_last_accepting_state =  schema_current_state;
@@ -1040,17 +1040,17 @@ static  schema_state_type  schema_get_previous_state()
  */
 
 #ifdef  schema_USE_PROTOS
-static  schema_state_type  schema_try_NUL_trans( register  schema_state_type  schema_current_state )
+static  schema_state_type  schema_try_NUL_trans(  schema_state_type  schema_current_state )
 #else
 static  schema_state_type  schema_try_NUL_trans(  schema_current_state )
-register  schema_state_type  schema_current_state;
+ schema_state_type  schema_current_state;
 #endif
 
     {
-    register int  schema_is_jam;
-    register  schema_CHAR * schema_cp =  schema_c_buf_p;
+    int  schema_is_jam;
+     schema_CHAR * schema_cp =  schema_c_buf_p;
 
-    register  schema_CHAR  schema_c = 1;
+     schema_CHAR  schema_c = 1;
     if (  schema_accept[ schema_current_state] )
        {
         schema_last_accepting_state =  schema_current_state;
@@ -1071,25 +1071,25 @@ register  schema_state_type  schema_current_state;
 
 #if 0
 #ifdef  schema_USE_PROTOS
-static void  schemaunput(  schema_CHAR c, register  schema_CHAR * schema_bp )
+static void  schemaunput(  schema_CHAR c,  schema_CHAR * schema_bp )
 #else
 static void  schemaunput( c,  schema_bp )
  schema_CHAR c;
-register  schema_CHAR * schema_bp;
+ schema_CHAR * schema_bp;
 #endif
 
     {
-    register  schema_CHAR * schema_cp =  schema_c_buf_p;
+     schema_CHAR * schema_cp =  schema_c_buf_p;
 
     /* undo effects of setting up  schematext */
     * schema_cp =  schema_hold_char;
 
     if (  schema_cp <  schema_current_buffer-> schema_ch_buf + 2 )
        { /* need to shift things up to make room */
-       register int number_to_move =  schema_n_chars + 2; /* +2 for EOB chars */
-       register  schema_CHAR *dest =
+       int number_to_move =  schema_n_chars + 2; /* +2 for EOB chars */
+        schema_CHAR *dest =
            & schema_current_buffer-> schema_ch_buf[ schema_current_buffer-> schema_buf_size + 2];
-       register  schema_CHAR *source =
+        schema_CHAR *source =
            & schema_current_buffer-> schema_ch_buf[number_to_move];
 
        while ( source >  schema_current_buffer-> schema_ch_buf )
index 7b5825c567e99b0135c1190e71c0ecbc60f4aa80..4d0b88d2baaff21a18c8b5ab71a82b0f6ecae363 100644 (file)
@@ -82,7 +82,7 @@ public: // variables
 Atomizer::Atomizer (const char *string)
 {
   // Try to find the string in the pool of strings
-  register unsigned int i;
+  unsigned int i;
 
   for (i = 0; i < f_pool.length(); i++)
     if (((PoolString *)f_pool[i])->equals (string))
index 5c8e5a70fd7475987df18421b46eae47ac80e0fc..43969084ff00c98bab3455560255cd2fce979b2c 100644 (file)
@@ -68,7 +68,7 @@ public: // functions
 int
 HashBucket::find (FolioObject &element)
 {
-  register int i;
+  int i;
 
   for (i = 0; i < f_length; i++)
     {
@@ -87,7 +87,7 @@ HashBucket::find (FolioObject &element)
 void
 HashBucket::remove (FolioObject &element)
 {
-  register int i;
+  int i;
 
   for (i = 0; i < f_length; i++)
     {
index 7f4c1d59da31a0643f621295e25cb91bd3f6af22..bd9251418193f9c51b5ffeef13838a2564973d93 100644 (file)
@@ -188,7 +188,7 @@ int
 List::find (FolioObject &element)
 {
   /* -------- Search through the list, looking for element. -------- */
-  register int i;
+  int i;
 
   for (i = 0; i < f_length; i++)
     if (f_list_element[i] == &element)
index d9720f764cf46a8226ead63e449798aca2e5f83f..03f9046e9f22684daa15133c94640810c1338fd4 100644 (file)
@@ -76,8 +76,8 @@ string_hash (const char *key)
 {
   assert (key != NULL);
 
-  register u_int pos, sum = 0;
-  register char c;
+  u_int pos, sum = 0;
+  char c;
 
   for (pos = 0; (c = *key++); pos++)
     sum = (sum << 5) + (sum >> (sizeof(int) * 8 - 6))
index 5228c114fea0d1303b74e2d23ee0d18ff49adb0e..5e30837bebe7249695d0524cf0f751159acc1c0e 100644 (file)
@@ -228,8 +228,7 @@ WidgetClass pannerWidgetClass = (WidgetClass) &pannerClassRec;
  *                                                                           *
  *****************************************************************************/
 
-static void reset_shadow_gc (pw)       /* used when resources change */
-    PannerWidget pw;
+static void reset_shadow_gc (PannerWidget pw)  /* used when resources change */
 {
     XtGCMask valuemask = GCForeground;
     XGCValues values;
@@ -270,8 +269,7 @@ static void reset_shadow_gc (pw)    /* used when resources change */
     pw->panner.shadow_gc = XtGetGC ((Widget) pw, valuemask, &values);
 }
 
-static void reset_slider_gc (pw)       /* used when resources change */
-    PannerWidget pw;
+static void reset_slider_gc (PannerWidget pw)  /* used when resources change */
 {
     XtGCMask valuemask = GCForeground;
     XGCValues values;
@@ -283,8 +281,7 @@ static void reset_slider_gc (pw)    /* used when resources change */
     pw->panner.slider_gc = XtGetGC ((Widget) pw, valuemask, &values);
 }
 
-static void reset_xor_gc (pw)          /* used when resources change */
-    PannerWidget pw;
+static void reset_xor_gc (PannerWidget pw)             /* used when resources change */
 {
     if (pw->panner.xor_gc) XtReleaseGC ((Widget) pw, pw->panner.xor_gc);
 
@@ -308,9 +305,7 @@ static void reset_xor_gc (pw)               /* used when resources change */
 }
 
 
-static void check_knob (pw, knob)
-    register PannerWidget pw;
-    Boolean knob;
+static void check_knob (PannerWidget pw, Boolean knob)
 {
     Position pad = pw->panner.internal_border * 2;
     Position maxx = (((Position) pw->core.width) - pad -
@@ -340,15 +335,14 @@ static void check_knob (pw, knob)
 }
 
 
-static void move_shadow (pw)
-    register PannerWidget pw;
+static void move_shadow (PannerWidget pw)
 {
     if (pw->panner.shadow_thickness > 0) {
        int lw = pw->panner.shadow_thickness + pw->panner.line_width * 2;
        int pad = pw->panner.internal_border;
 
        if ((int)pw->panner.knob_height > lw && (int)pw->panner.knob_width > lw) {
-           register XRectangle *r = pw->panner.shadow_rects;
+           XRectangle *r = pw->panner.shadow_rects;
            r->x = (short) (pw->panner.knob_x + pad + pw->panner.knob_width);
            r->y = (short) (pw->panner.knob_y + pad + lw);
            r->width = pw->panner.shadow_thickness;
@@ -366,9 +360,7 @@ static void move_shadow (pw)
     pw->panner.shadow_valid = FALSE;
 }
 
-static void scale_knob (pw, location, size)  /* set knob size and/or loc */
-    PannerWidget pw;
-    Boolean location, size;
+static void scale_knob (PannerWidget pw, Boolean location, Boolean size)  /* set knob size and/or loc */
 {
     if (location) {
        pw->panner.knob_x = (Position) PANNER_HSCALE (pw, pw->panner.slider_x);
@@ -393,8 +385,7 @@ static void scale_knob (pw, location, size)  /* set knob size and/or loc */
     move_shadow (pw);
 }
 
-static void rescale (pw)
-    PannerWidget pw;
+static void rescale (PannerWidget pw)
 {
     int hpad = pw->panner.internal_border * 2;
     int vpad = hpad;
@@ -415,19 +406,14 @@ static void rescale (pw)
 }
 
 
-static void get_default_size (pw, wp, hp)
-    PannerWidget pw;
-    Dimension *wp, *hp;
+static void get_default_size (PannerWidget pw, Dimension *wp, Dimension *hp)
 {
     Dimension pad = pw->panner.internal_border * 2;
     *wp = PANNER_DSCALE (pw, pw->panner.canvas_width) + pad;
     *hp = PANNER_DSCALE (pw, pw->panner.canvas_height) + pad;
 }
 
-static Boolean get_event_xy (pw, event, x, y)
-    PannerWidget pw;
-    XEvent *event;
-    int *x, *y;
+static Boolean get_event_xy (PannerWidget pw, XEvent *event, int *x, int *y)
 {
     int pad = pw->panner.internal_border;
 
@@ -459,10 +445,7 @@ static Boolean get_event_xy (pw, event, x, y)
     return FALSE;
 }
 
-static int parse_page_string (s, pagesize, canvassize, relative)
-    register char *s;
-    int pagesize, canvassize;
-    Boolean *relative;
+static int parse_page_string (char *s, int pagesize, int canvassize, Boolean *relative)
 {
     char *cp;
     double val = 1.0;
@@ -540,8 +523,7 @@ static int parse_page_string (s, pagesize, canvassize, relative)
  *****************************************************************************/
 
 
-static void Initialize (greq, gnew)
-    Widget greq, gnew;
+static void Initialize (Widget greq, Widget gnew)
 {
     PannerWidget req = (PannerWidget) greq, new = (PannerWidget) gnew;
     Dimension defwidth, defheight;
@@ -579,10 +561,7 @@ static void Initialize (greq, gnew)
 }
 
 
-static void Realize (gw, valuemaskp, attr)
-    Widget gw;
-    XtValueMask *valuemaskp;
-    XSetWindowAttributes *attr;
+static void Realize (Widget gw, XtValueMask *valuemaskp, XSetWindowAttributes *attr)
 {
     PannerWidget pw = (PannerWidget) gw;
     Pixmap pm = XtUnspecifiedPixmap;
@@ -605,8 +584,7 @@ static void Realize (gw, valuemaskp, attr)
 }
 
 
-static void Destroy (gw)
-    Widget gw;
+static void Destroy (Widget gw)
 {
     PannerWidget pw = (PannerWidget) gw;
 
@@ -615,18 +593,14 @@ static void Destroy (gw)
     XtReleaseGC (gw, pw->panner.xor_gc);
 }
 
-static void Resize (gw)
-    Widget gw;
+static void Resize (Widget gw)
 {
     rescale ((PannerWidget) gw);
 }
 
 
 /* ARGSUSED */
-static void Redisplay (gw, event, region)
-    Widget gw;
-    XEvent *event;
-    Region region;
+static void Redisplay (Widget gw, XEvent *event, Region region)
 {
     PannerWidget pw = (PannerWidget) gw;
     Display *dpy = XtDisplay(gw);
@@ -710,8 +684,7 @@ static void Redisplay (gw, event, region)
 
 
 /* ARGSUSED */
-static Boolean SetValues (gcur, greq, gnew)
-    Widget gcur, greq, gnew;
+static Boolean SetValues (Widget gcur, Widget greq, Widget gnew)
 {
     PannerWidget cur = (PannerWidget) gcur;
     PannerWidget new = (PannerWidget) gnew;
@@ -787,9 +760,7 @@ static Boolean SetValues (gcur, greq, gnew)
     return redisplay;
 }
 
-static void SetValuesAlmost (gold, gnew, req, reply)
-    Widget gold, gnew;
-    XtWidgetGeometry *req, *reply;
+static void SetValuesAlmost (Widget gold, Widget gnew, XtWidgetGeometry *req, XtWidgetGeometry *reply)
 {
     if (reply->request_mode == 0) {    /* got turned down, so cope */
        Resize (gnew);
@@ -798,9 +769,7 @@ static void SetValuesAlmost (gold, gnew, req, reply)
        (gold, gnew, req, reply);
 }
 
-static XtGeometryResult QueryGeometry (gw, intended, pref)
-    Widget gw;
-    XtWidgetGeometry *intended, *pref;
+static XtGeometryResult QueryGeometry (Widget gw, XtWidgetGeometry *intended, XtWidgetGeometry *pref)
 {
     PannerWidget pw = (PannerWidget) gw;
 
@@ -826,11 +795,7 @@ static XtGeometryResult QueryGeometry (gw, intended, pref)
  *****************************************************************************/
 
 /* ARGSUSED */
-static void ActionStart (gw, event, params, num_params)
-    Widget gw;
-    XEvent *event;
-    String *params;                    /* unused */
-    Cardinal *num_params;              /* unused */
+static void ActionStart (Widget gw, XEvent *event, String *params /* unused */, Cardinal *num_params /* unused */)
 {
     PannerWidget pw = (PannerWidget) gw;
     int x, y;
@@ -851,11 +816,7 @@ static void ActionStart (gw, event, params, num_params)
 }
 
 /* ARGSUSED */
-static void ActionStop (gw, event, params, num_params)
-    Widget gw;
-    XEvent *event;
-    String *params;                    /* unused */
-    Cardinal *num_params;              /* unused */
+static void ActionStop (Widget gw, XEvent *event, String *params /* unused */, Cardinal *num_params /* unused */)
 {
     PannerWidget pw = (PannerWidget) gw;
     int x, y;
@@ -870,11 +831,7 @@ static void ActionStop (gw, event, params, num_params)
 }
 
 /* ARGSUSED */
-static void ActionAbort (gw, event, params, num_params)
-    Widget gw;
-    XEvent *event;
-    String *params;                    /* unused */
-    Cardinal *num_params;              /* unused */
+static void ActionAbort (Widget gw, XEvent *event, String *params /* unused */, Cardinal *num_params /* unused */)
 {
     PannerWidget pw = (PannerWidget) gw;
 
@@ -892,11 +849,7 @@ static void ActionAbort (gw, event, params, num_params)
 
 
 /* ARGSUSED */
-static void ActionMove (gw, event, params, num_params)
-    Widget gw;
-    XEvent *event;                     /* must be a motion event */
-    String *params;                    /* unused */
-    Cardinal *num_params;              /* unused */
+static void ActionMove (Widget gw, XEvent *event /* must be a motion event */, String *params /* unused */, Cardinal *num_params /* unused */)
 {
     PannerWidget pw = (PannerWidget) gw;
     int x, y;
@@ -922,11 +875,7 @@ static void ActionMove (gw, event, params, num_params)
 
 
 /* ARGSUSED */
-static void ActionPage (gw, event, params, num_params)
-    Widget gw;
-    XEvent *event;                     /* unused */
-    String *params;
-    Cardinal *num_params;              /* unused */
+static void ActionPage (Widget gw, XEvent *event /* unused */, String *params, Cardinal *num_params /* unused */)
 {
     PannerWidget pw = (PannerWidget) gw;
     Cardinal zero = 0;
@@ -965,11 +914,7 @@ static void ActionPage (gw, event, params, num_params)
 
 
 /* ARGSUSED */
-static void ActionNotify (gw, event, params, num_params)
-    Widget gw;
-    XEvent *event;                     /* unused */
-    String *params;                    /* unused */
-    Cardinal *num_params;              /* unused */
+static void ActionNotify (Widget gw, XEvent *event /* unused */, String *params /* unused */, Cardinal *num_params /* unused */)
 {
     PannerWidget pw = (PannerWidget) gw;
 
@@ -1016,11 +961,7 @@ static void ActionNotify (gw, event, params, num_params)
 }
 
 /* ARGSUSED */
-static void ActionSet (gw, event, params, num_params)
-    Widget gw;
-    XEvent *event;                     /* unused */
-    String *params;
-    Cardinal *num_params;
+static void ActionSet (Widget gw, XEvent *event /* unused */, String *params, Cardinal *num_params)
 {
     PannerWidget pw = (PannerWidget) gw;
     Boolean rb;
index 45619215d17651c618461797afdfe43fe18ccb22..db13515d40c990b814e6793d757baf71416e78a9 100644 (file)
@@ -98,10 +98,7 @@ PixmapClassRec  pixmapClassRec = {
 WidgetClass pixmapWidgetClass = (WidgetClass)&pixmapClassRec;
 
 static void
-Initialize(req, new, args, nargs )
-PixmapWidget req, new ;
-ArgList args ;
-Cardinal *nargs ;
+Initialize(PixmapWidget req, PixmapWidget new, ArgList args, Cardinal *nargs)
 {
   XtGCMask  value_mask ;
   XGCValues values ;
@@ -136,16 +133,14 @@ Cardinal *nargs ;
 }
 
 static void
-Resize(w)
-PixmapWidget w ;
+Resize(PixmapWidget w)
 {
   ON_DEBUG(fprintf(stderr, "PixmapWidget: RESIZE (%d, %d)\n",
                   w->core.width, w->core.height));
 }
 
 static void
-Destroy(w)
-PixmapWidget w;
+Destroy(PixmapWidget w)
 {
   if (w->pixmap.pixmap != 0)
     {
@@ -154,10 +149,7 @@ PixmapWidget w;
 }
 
 static Boolean
-SetValues(current, request, new, args, num_args)
-PixmapWidget current, request, new ;
-ArgList args ;
-Cardinal *num_args ;
+SetValues(PixmapWidget current, PixmapWidget request, PixmapWidget new, ArgList args, Cardinal *num_args)
 {
   Window root ;
   int x, y ;
@@ -191,9 +183,7 @@ Cardinal *num_args ;
 
 
 static XtGeometryResult
-QueryGeometry(w, proposed, answer)
-PixmapWidget w ;
-XtWidgetGeometry *proposed, *answer;
+QueryGeometry(PixmapWidget w, XtWidgetGeometry *proposed, XtWidgetGeometry *answer)
 {
   ON_DEBUG(fprintf(stderr, "PixmapWidget:\tQueryGeometry()\n"));
 #ifdef DEBUG
@@ -218,9 +208,7 @@ XtWidgetGeometry *proposed, *answer;
 #endif
 
 static void
-ReDisplay(w, event)
-PixmapWidget w ;
-XExposeEvent *event ;
+ReDisplay(PixmapWidget w, XExposeEvent *event)
 {
   ON_DEBUG(fprintf(stderr, "PixmapWidget: EXPOSE\n"));
 
index f303cb9e9b23cded906852f185b968e8305810c6..8c6dc20f5267d9fa77f742d41c94adf0a28e4d9b 100644 (file)
@@ -166,11 +166,10 @@ WidgetClass portholeWidgetClass = (WidgetClass) &portholeClassRec;
  *                                                                           *
  *****************************************************************************/
 
-static Widget find_child (pw)
-    register PortholeWidget pw;
+static Widget find_child (PortholeWidget pw)
 {
-    register Widget *children;
-    register int i;
+    Widget *children;
+    int i;
 
     /*
      * Find the managed child on which we should operate.  Ignore multiple
@@ -184,9 +183,7 @@ static Widget find_child (pw)
     return (Widget) NULL;
 }
 
-static void SendReport (pw, changed)
-    PortholeWidget pw;
-    unsigned int changed;
+static void SendReport (PortholeWidget pw, unsigned int changed)
 {
     Widget child = find_child (pw);
 
@@ -206,12 +203,10 @@ static void SendReport (pw, changed)
 }
 
 
-static void layout_child (pw, child, geomp, xp, yp, widthp, heightp)
-    PortholeWidget pw;
-    Widget child;
-    XtWidgetGeometry *geomp;
-    Position *xp, *yp;
-    Dimension *widthp, *heightp;
+static void layout_child (PortholeWidget pw, Widget child,
+                          XtWidgetGeometry *geomp,
+                          Position *xp, Position *yp,
+                          Dimension *widthp, Dimension *heightp)
 {
     Position minx, miny;
 
@@ -256,10 +251,7 @@ static void layout_child (pw, child, geomp, xp, yp, widthp, heightp)
  *****************************************************************************/
 
 
-static void Realize (gw, valueMask, attributes)
-    register Widget gw;
-    Mask *valueMask;
-    XSetWindowAttributes *attributes;
+static void Realize (Widget gw, Mask *valueMask, XSetWindowAttributes *attributes)
 {
     attributes->bit_gravity = NorthWestGravity;
     *valueMask |= CWBitGravity;
@@ -271,8 +263,7 @@ static void Realize (gw, valueMask, attributes)
 }
 
 
-static void Resize (gw)
-    Widget gw;
+static void Resize (Widget gw)
 {
     PortholeWidget pw = (PortholeWidget) gw;
     Widget child = find_child (pw);
@@ -293,11 +284,9 @@ static void Resize (gw)
 }
 
 
-static XtGeometryResult QueryGeometry (gw, intended, preferred)
-    Widget gw;
-    XtWidgetGeometry *intended, *preferred;
+static XtGeometryResult QueryGeometry (Widget gw, XtWidgetGeometry *intended, XtWidgetGeometry *preferred)
 {
-    register PortholeWidget pw = (PortholeWidget) gw;
+    PortholeWidget pw = (PortholeWidget) gw;
     Widget child = find_child (pw);
 
     if (child) {
@@ -321,9 +310,7 @@ static XtGeometryResult QueryGeometry (gw, intended, preferred)
 }
 
 
-static XtGeometryResult GeometryManager (w, req, reply)
-    Widget w;
-    XtWidgetGeometry *req, *reply;
+static XtGeometryResult GeometryManager (Widget w, XtWidgetGeometry *req, XtWidgetGeometry *reply)
 {
     PortholeWidget pw = (PortholeWidget) w->core.parent;
     Widget child = find_child (pw);
@@ -385,8 +372,7 @@ static XtGeometryResult GeometryManager (w, req, reply)
 }
 
 
-static void ChangeManaged (gw)
-    Widget gw;
+static void ChangeManaged (Widget gw)
 {
     PortholeWidget pw = (PortholeWidget) gw;
     Widget child = find_child (pw);    /* ignore extra children */
@@ -420,7 +406,7 @@ static void ChangeManaged (gw)
 
 #if XmVersion == 1002
 static void
-ClassInitialize ()
+ClassInitialize (void)
 {
   /* set up base class extension quark */
   portholeClassExtRec.record_type = XmQmotif;
index b3df20d26e9d25439238e1b77bc8989152498131..53c11778af81e0e7e651e1e6600e72a2d4fbd47b 100644 (file)
@@ -139,7 +139,7 @@ SimpleClassRec simpleClassRec = {
 
 WidgetClass simpleWidgetClass = (WidgetClass)&simpleClassRec;
 
-static void ClassInitialize()
+static void ClassInitialize(void)
 {
     static XtConvertArgRec convertArg[] = {
         {XtWidgetBaseOffset, (XtPointer) XtOffsetOf(WidgetRec, core.screen),
@@ -157,11 +157,10 @@ static void ClassInitialize()
                       XtCacheByDisplay, NULL);
 }
 
-static void ClassPartInitialize(class)
-    WidgetClass class;
+static void ClassPartInitialize(WidgetClass class)
 {
-    register SimpleWidgetClass c = (SimpleWidgetClass)class;
-    register SimpleWidgetClass super = (SimpleWidgetClass) 
+    SimpleWidgetClass c = (SimpleWidgetClass)class;
+    SimpleWidgetClass super = (SimpleWidgetClass)
        c->core_class.superclass;
 
     if (c->simple_class.change_sensitive == NULL) {
@@ -178,10 +177,7 @@ static void ClassPartInitialize(class)
        c->simple_class.change_sensitive = super->simple_class.change_sensitive;
 }
 
-static void Realize(w, valueMask, attributes)
-    register Widget w;
-    Mask *valueMask;
-    XSetWindowAttributes *attributes;
+static void Realize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes)
 {
     Pixmap border_pixmap = 0;
 
@@ -221,8 +217,7 @@ static void Realize(w, valueMask, attributes)
  */
 
 static void
-ConvertCursor(w)
-Widget w;
+ConvertCursor(Widget w)
 {
     SimpleWidget simple = (SimpleWidget) w;
     XrmValue from, to;
@@ -251,8 +246,7 @@ Widget w;
 
 
 /* ARGSUSED */
-static Boolean SetValues(current, request, new)
-    Widget current, request, new;
+static Boolean SetValues(Widget current, Widget request, Widget new)
 {
     SimpleWidget s_old = (SimpleWidget) current;
     SimpleWidget s_new = (SimpleWidget) new;
@@ -284,8 +278,7 @@ static Boolean SetValues(current, request, new)
 }
 
 
-static Boolean ChangeSensitive(w)
-    register Widget w;
+static Boolean ChangeSensitive(Widget w)
 {
     if (XtIsRealized(w)) {
        if (XtIsSensitive(w))
index cc6c68784349375eac35b116f2eab3ace21a6658..5bbd7860a6e3adfa98d7e3bb9049801fad4c4632 100644 (file)
@@ -210,13 +210,10 @@ WidgetClass treeWidgetClass = (WidgetClass) &treeClassRec;
  *                                                                           *
  *****************************************************************************/
 
-static void initialize_dimensions (listp, sizep, n)
-    Dimension **listp;
-    int *sizep;
-    int n;
+static void initialize_dimensions (Dimension **listp, int *sizep, int n)
 {
-    register int i;
-    register Dimension *l;
+    int i;
+    Dimension *l;
 
     if (!*listp) {
        *listp = (Dimension *) XtCalloc ((unsigned int) n,
@@ -237,8 +234,7 @@ static void initialize_dimensions (listp, sizep, n)
     return;
 }
 
-static GC get_tree_gc (w)
-    TreeWidget w;
+static GC get_tree_gc (TreeWidget w)
 {
     XtGCMask valuemask = GCBackground | GCForeground;
     XGCValues values;
@@ -253,8 +249,7 @@ static GC get_tree_gc (w)
     return XtGetGC ((Widget) w, valuemask, &values);
 }
 
-static void insert_node (parent, node)
-     Widget parent, node;
+static void insert_node (Widget parent, Widget node)
 {
     TreeConstraints pc;
     TreeConstraints nc = TREE_CONSTRAINT(node);
@@ -287,8 +282,7 @@ static void insert_node (parent, node)
     pc->tree.n_children++;
 }
 
-static void delete_node (parent, node)
-    Widget parent, node;
+static void delete_node (Widget parent, Widget node)
 {
     TreeConstraints pc;
     int pos, i;
@@ -323,9 +317,7 @@ static void delete_node (parent, node)
     pc->tree.children[pc->tree.n_children]=0;
 }
 
-static void check_gravity (tw, grav)
-    TreeWidget tw;
-    XtGravity grav;
+static void check_gravity (TreeWidget tw, XtGravity grav)
 {
     switch (tw->tree.gravity) {
       case WestGravity: case NorthGravity: case EastGravity: case SouthGravity:
@@ -343,7 +335,7 @@ static void check_gravity (tw, grav)
  *                                                                           *
  *****************************************************************************/
 
-static void ClassInitialize ()
+static void ClassInitialize (void)
 {
     XawInitializeWidgetSet();
     XtAddConverter (XtRString, XtRGravity, XmuCvtStringToGravity,
@@ -351,8 +343,7 @@ static void ClassInitialize ()
 }
 
 
-static void Initialize (grequest, gnew)
-    Widget grequest, gnew;
+static void Initialize (Widget grequest, Widget gnew)
 {
     TreeWidget request = (TreeWidget) grequest, new = (TreeWidget) gnew;
     Arg args[2];
@@ -406,8 +397,7 @@ static void Initialize (grequest, gnew)
 
 
 /* ARGSUSED */
-static void ConstraintInitialize (request, new)
-     Widget request, new;
+static void ConstraintInitialize (Widget request, Widget new)
 {
     TreeConstraints tc = TREE_CONSTRAINT(new);
     TreeWidget tw = (TreeWidget) new->core.parent;
@@ -436,8 +426,7 @@ static void ConstraintInitialize (request, new)
 
 
 /* ARGSUSED */
-static Boolean SetValues (gcurrent, grequest, gnew)
-    Widget gcurrent, grequest, gnew;
+static Boolean SetValues (Widget gcurrent, Widget grequest, Widget gnew)
 {
     TreeWidget current = (TreeWidget) gcurrent, new = (TreeWidget) gnew;
     Boolean redraw = FALSE;
@@ -482,10 +471,7 @@ static Boolean SetValues (gcurrent, grequest, gnew)
 
 
 /* ARGSUSED */
-static Boolean ConstraintSetValues (current, request, new, args, num_args)
-    Widget current, request, new;
-    ArgList args;
-    Cardinal *num_args;
+static Boolean ConstraintSetValues (Widget current, Widget request, Widget new, ArgList args, Cardinal *num_args)
 {
     TreeConstraints newc = TREE_CONSTRAINT(new);
     TreeConstraints curc = TREE_CONSTRAINT(current);
@@ -513,8 +499,7 @@ static Boolean ConstraintSetValues (current, request, new, args, num_args)
 }
 
 
-static void ConstraintDestroy (w) 
-    Widget w;
+static void ConstraintDestroy (Widget w)
 { 
     TreeConstraints tc = TREE_CONSTRAINT(w);
     TreeWidget tw = (TreeWidget) XtParent(w);
@@ -540,10 +525,7 @@ static void ConstraintDestroy (w)
 }
 
 /* ARGSUSED */
-static XtGeometryResult GeometryManager (w, request, reply)
-    Widget w;
-    XtWidgetGeometry *request;
-    XtWidgetGeometry *reply;
+static XtGeometryResult GeometryManager (Widget w, XtWidgetGeometry *request, XtWidgetGeometry *reply)
 {
 
     TreeWidget tw = (TreeWidget) w->core.parent;
@@ -570,15 +552,13 @@ static XtGeometryResult GeometryManager (w, request, reply)
     return (XtGeometryYes);
 }
 
-static void ChangeManaged (gw)
-    Widget gw;
+static void ChangeManaged (Widget gw)
 {
     layout_tree ((TreeWidget) gw, FALSE);
 }
 
 
-static void Destroy (gw)
-    Widget gw;
+static void Destroy (Widget gw)
 {
     TreeWidget w = (TreeWidget) gw;
 
@@ -588,10 +568,7 @@ static void Destroy (gw)
 
 
 /* ARGSUSED */
-static void Redisplay (tw, event, region)
-     TreeWidget tw;
-     XEvent *event;
-     Region region;
+static void Redisplay (TreeWidget tw, XEvent *event, Region region)
 {
     /*
      * If the Tree widget is visible, visit each managed child.
@@ -602,7 +579,7 @@ static void Redisplay (tw, event, region)
        Window w = XtWindow (tw);
 
        for (i = 0; i < tw->composite.num_children; i++) {
-           register Widget child = tw->composite.children[i];
+           Widget child = tw->composite.children[i];
            TreeConstraints tc = TREE_CONSTRAINT(child);
 
            /*
@@ -629,7 +606,7 @@ static void Redisplay (tw, event, region)
                }
 
                for (j = 0; j < tc->tree.n_children; j++) {
-                   register Widget k = tc->tree.children[j];
+                   Widget k = tc->tree.children[j];
                    GC gc = (tc->tree.gc ? tc->tree.gc : tw->tree.gc);
 
                    switch (tw->tree.gravity) {
@@ -683,11 +660,9 @@ static void Redisplay (tw, event, region)
     }
 }
 
-static XtGeometryResult QueryGeometry (w, intended, preferred)
-    Widget w;
-    XtWidgetGeometry *intended, *preferred;
+static XtGeometryResult QueryGeometry (Widget w, XtWidgetGeometry *intended, XtWidgetGeometry *preferred)
 {
-    register TreeWidget tw = (TreeWidget) w;
+    TreeWidget tw = (TreeWidget) w;
 
     preferred->request_mode = (CWWidth | CWHeight);
     preferred->width = tw->tree.maxwidth;
@@ -717,13 +692,10 @@ static XtGeometryResult QueryGeometry (w, intended, preferred)
  *                                                                           *
  *****************************************************************************/
 
-static void compute_bounding_box_subtree (tree, w, depth)
-    TreeWidget tree;
-    Widget w;
-    int depth;
+static void compute_bounding_box_subtree (TreeWidget tree, Widget w, int depth)
 {
     TreeConstraints tc = TREE_CONSTRAINT(w);  /* info attached to all kids */
-    register int i;
+    int i;
     Bool horiz = IsHorizontal (tree);
     Dimension newwidth, newheight;
     Dimension bw2 = w->core.border_width * 2;
@@ -790,10 +762,7 @@ static void compute_bounding_box_subtree (tree, w, depth)
 }
 
 
-static void set_positions (tw, w, level)
-     TreeWidget tw;
-     Widget w;
-     int level;
+static void set_positions (TreeWidget tw, Widget w, int level)
 {
     int i;
   
@@ -831,15 +800,11 @@ static void set_positions (tw, w, level)
 }
 
 
-static void arrange_subtree (tree, w, depth, x, y)
-    TreeWidget tree;
-    Widget w;
-    int depth;
-    Position x, y;
+static void arrange_subtree (TreeWidget tree, Widget w, int depth, Position x, Position y)
 {
     TreeConstraints tc = TREE_CONSTRAINT(w);  /* info attached to all kids */
     TreeConstraints firstcc, lastcc;
-    register int i;
+    int i;
     int newx, newy;
     Bool horiz = IsHorizontal (tree);
     Widget child = NULL;
@@ -938,10 +903,7 @@ static void arrange_subtree (tree, w, depth, x, y)
     }
 }
 
-static void set_tree_size (tw, insetvalues, width, height)
-    TreeWidget tw;
-    Boolean insetvalues;
-    Dimension width, height;
+static void set_tree_size (TreeWidget tw, Boolean insetvalues, Dimension width, Dimension height)
 {
     if (insetvalues) {
        tw->core.width = width;
index 3424c0350779ffe08330a877e13ae3ce27c47d08..4e04ff2db1f74f698d1cbd7060e7bd6d21075dfc 100644 (file)
@@ -103,9 +103,9 @@ static int b_str(unsigned char **in_ptr, char **out_ptr)
 }
 /* now the integers */
 /* unsigned CGM integer at arbitrary legal precision */
-static unsigned int b_guint(in_ptr, bits_p)
-     unsigned char **in_ptr;           /* pointer to the input data pointer */
-     int bits_p;                       /* no. of bits precision */
+/* in_ptr, pointer to the input data pointer */
+/* bits_p, no. of bits precision */
+static unsigned int b_guint(unsigned char **in_ptr, int bits_p)
 {
   int i;
   unsigned int val;
@@ -117,9 +117,9 @@ static unsigned int b_guint(in_ptr, bits_p)
   return(val);
 }
 /* signed CGM integer at arbitrary legal precision */
-static int b_gsint(in_ptr, bits_p)
-     unsigned char **in_ptr;           /* pointer to the input data pointer */
-     int bits_p;                       /* no. of bits precision */
+/* in_ptr, pointer to the input data pointer */
+/* bits_p, no. of bits precision */
+static int b_gsint(unsigned char **in_ptr, int bits_p)
 {
   int i, val;
   /* have to worry about sign extension, may not have signed char */
@@ -132,9 +132,7 @@ static int b_gsint(in_ptr, bits_p)
 }
 /* now the reals */
 /* the fixed point real */
-static double b_fixed(dat_ptr, prec)
-     unsigned char **dat_ptr;
-     rp_type *prec;
+static double b_fixed(unsigned char **dat_ptr, rp_type *prec)
 {
   double ret;
   /* do it in two parts; the big (first) part and fractional (second) part */
@@ -145,9 +143,7 @@ static double b_fixed(dat_ptr, prec)
   return(ret);
 }
 /* the IEEE floating point */
-static double b_ieee(dat_ptr, prec)
-     unsigned char **dat_ptr;
-     rp_type *prec;
+static double b_ieee(unsigned char **dat_ptr, rp_type *prec)
 {
 #define TABLESIZE 128
   static double shift_table[TABLESIZE];
@@ -227,9 +223,7 @@ static double b_ieee(dat_ptr, prec)
 #undef TABLESIZE
 }
 /* the general real */
-static double b_real(dat_ptr, rprec)
-     unsigned char **dat_ptr;
-     rp_type *rprec;
+static double b_real(unsigned char **dat_ptr, rp_type *rprec)
 {
   if (rprec->fixed == 0) {     /* floating point */
     return(b_ieee(dat_ptr, rprec));
@@ -566,28 +560,19 @@ static int epic(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr,
 }
 /* Metafile Descriptors */
 /* Metafile Version */
-static int mfversion(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int mfversion(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   /* nothing for now */
   return 1;
 }
 /* Metafile Descriptor */
-static int mfdescrip(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int mfdescrip(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   /* nothing for now */
   return 1;
 }
 /* VDC type */
-static int vdctype(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int vdctype(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   /* 0=>integer, 1=>real */ 
   
@@ -596,19 +581,13 @@ static int vdctype(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Integer Precision */
-static int intprec(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int intprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->intprec = b_gsint(&dat_ptr, cgm_s->intprec);
   return 1;
 }
 /* Real Precision */
-static int realprec(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int realprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->realprec.fixed = b_gsint(&dat_ptr, cgm_s->intprec);
   cgm_s->realprec.exp = b_gsint(&dat_ptr, cgm_s->intprec);
@@ -617,46 +596,31 @@ static int realprec(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Index Precision */
-static int indexprec(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int indexprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->indexprec = b_gsint(&dat_ptr, cgm_s->intprec);
   return 1;
 }
 /* Colour Precision */
-static int colprec(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int colprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->colprec = b_gsint(&dat_ptr, cgm_s->intprec);
   return 1;
 }
 /* Colour Index Precision */
-static int cindprec(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int cindprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->cindprec = b_gsint(&dat_ptr, cgm_s->intprec);
   return 1;
 }
 /* Maximum Colour Index */
-static int maxcind(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int maxcind(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->maxcind = b_guint(&dat_ptr, cgm_s->cindprec);
   return 1;
 }
 /* Colour Value Extent */
-static int cvextent(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int cvextent(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i;
   for (i=0; i<6; ++i)
@@ -671,10 +635,7 @@ static int cvextent(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Metafile Element List */
-static int mfellist(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int mfellist(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i;
   cgm_s->mfellist_s = b_gsint(&dat_ptr, cgm_s->intprec);
@@ -688,10 +649,7 @@ static int mfellist(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Metafile Defaults Replacement, a complex element */
-static int mfdefrep(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int mfdefrep(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   struct cmd_info_s new_cmd;   /* for the new commands */
   int i, new_len, b_to_move, data_left;
@@ -761,10 +719,7 @@ static int mfdefrep(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Font List, store the data, but ignored for now */
-static int fontlist(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int fontlist(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i;
   unsigned char *my_ptr = NULL;
@@ -783,10 +738,7 @@ static int fontlist(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Character Set List, stored but ignored */
-static int charlist(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int charlist(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i;
   unsigned char *my_ptr = NULL;
@@ -808,20 +760,14 @@ static int charlist(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Character Announcer */
-static int charannounce(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int charannounce(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->charannounce = b_gsint(&dat_ptr, 16);
   return 1;
 }
 /* Picture Descriptors */
 /* Scaling Mode */
-static int scalmode(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int scalmode(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   
   cgm_s->scalmode = b_gsint(&dat_ptr, 16);
@@ -831,47 +777,32 @@ static int scalmode(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Colour Selection Mode */
-static int colselmode(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int colselmode(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   
   cgm_s->colselmode = b_gsint(&dat_ptr, 16);
   return 1;
 }
 /* Line Width Specification Mode */
-static int lwidspecmode(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int lwidspecmode(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->lwidspecmode = b_gsint(&dat_ptr, 16);
   return 1;
 }
 /* Marker Size Specification Mode */
-static int marksizspecmode(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int marksizspecmode(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->marksizspecmode = b_gsint(&dat_ptr, 16);
   return 1;
 }
 /* Edge Width Specification Mode */
-static int edwidspecmode(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int edwidspecmode(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->edwidspecmode = b_gsint(&dat_ptr, 16);
   return 1;
 }
 /* VDC Extent */
-static int vdcextent(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int vdcextent(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i;
   
@@ -886,10 +817,7 @@ static int vdcextent(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Background Colour */
-static int backcolr(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int backcolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i;
   for (i=0; i<3; ++i)
@@ -899,19 +827,13 @@ static int backcolr(dat_ptr, cmd_ptr, cgm_s)
 }
 /* Control Elements */
 /* VDC Integer Precision */
-static int vdcintprec(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int vdcintprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->vdcintprec = b_gsint(&dat_ptr, cgm_s->intprec);
   return 1;
 }
 /* VDC Real Precision */
-static int vdcrprec(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int vdcrprec(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->vdcrprec.fixed = b_gsint(&dat_ptr, cgm_s->intprec);
   cgm_s->vdcrprec.exp = b_gsint(&dat_ptr, cgm_s->intprec);
@@ -920,10 +842,7 @@ static int vdcrprec(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Auxiliary Colour */
-static int auxcolr(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int auxcolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i;
   switch(cgm_s->colselmode) {
@@ -936,10 +855,7 @@ static int auxcolr(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Transparency */
-static int transp(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int transp(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->transp = b_gsint(&dat_ptr, 16);
   return 1;
@@ -1061,10 +977,7 @@ unsigned int getXSegments(unsigned char *dat_ptr,
   return noSegments;
 }
 /* Polyline */
-static int polyline(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int polyline(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int noPts;
   XPoint *myPtr = NULL;
@@ -1074,10 +987,7 @@ static int polyline(dat_ptr, cmd_ptr, cgm_s)
   return(1);
 }
 /* Disjoint Polyline, on/off segments */
-static int dispoly(dat_ptr, cmd_ptr, cgm_s)
-unsigned char *dat_ptr;
-struct cmd_info_s *cmd_ptr;
-cgm_s_type *cgm_s;
+static int dispoly(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int noSegments;
   XSegment *myPtr = NULL;
@@ -1089,10 +999,7 @@ cgm_s_type *cgm_s;
   return(1);
 }
 /* Polymarker */
-static int polymarker(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int polymarker(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int noPts, i, x, y, size, asize;
   /* figure out the number of points */
@@ -1158,10 +1065,7 @@ void doText(cgm_s_type *cgm_s)
   textX = textY = textW = textH = 0;
 }
 /* Regular Text */
-static int text(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int text(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int final_flag;
   partialText *newPtr, *myPtr;
@@ -1198,10 +1102,7 @@ static int text(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Restricted Text */
-static int restext(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int restext(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int final_flag;
   partialText *newPtr, *myPtr;
@@ -1238,10 +1139,7 @@ static int restext(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Appended Text */
-static int apptext(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int apptext(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   partialText *newPtr, *myPtr;
   if (!textPtr) return 0; /* can't append if there's nothing started ! */
@@ -1267,10 +1165,7 @@ static int apptext(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Polygon */
-static int polygon(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int polygon(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int noPts;
   XPoint *myPtr = NULL;
@@ -1288,10 +1183,7 @@ static int polygon(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Polyset */
-static int polyset(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int polyset(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i, noPts, *vPtr, lastFill;
   XPoint *myPtr;
@@ -1491,10 +1383,7 @@ static Pixel *getPixels(unsigned char *dat_ptr, cgm_s_type *cgm_s,
   return retPtr;
 }
 /* actually get the cellarray command */
-static int cellarray(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int cellarray(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i, x[3], y[3], nx, ny, local_prec, rep_mode, xSize, ySize;
   int Qx, Qy, Rx, Ry, det, xMin, xMax, yMin, yMax, newX, newY, ix, iy,
@@ -1575,10 +1464,7 @@ static int cellarray(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Rectangle */
-static int rectangle(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int rectangle(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i, xPts[2], yPts[2], x, y, old_style;
   unsigned int w, h;
@@ -1622,10 +1508,7 @@ static int rectangle(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Circle */
-static int circle(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int circle(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int x, y, r;
   /* get the center position and radius */
@@ -1705,10 +1588,7 @@ static int getArc(float inX[3], float inY[3], int *outXC, int *outYC,
   return r;
 }
 /* Circular Arc, set by 3 points */
-static int circ3(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int circ3(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int xc, yc, r, i;
   double theta0, dtheta;
@@ -1738,10 +1618,7 @@ static int circ3(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Circular Arc, set by 3 points, close */
-static int circ3close(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int circ3close(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int xc, yc, r, i, close_type, x0, y0, x2, y2;
   float det1, x[3], y[3]; /* use floats since we must manipulate them */
@@ -1806,10 +1683,7 @@ static double getAngles(int xc, int yc, float dxy[4], double  *outTheta0)
   return dtheta;
 }
 /* Circular Arc, set by center */
-static int circcentre(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int circcentre(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i, xc, yc, r;
   double theta0, dtheta;
@@ -1834,10 +1708,7 @@ static int circcentre(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Circular Arc, set by center, close */
-static int circcclose(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int circcclose(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i, xc, yc, r, close_type, x0, y0, x1, y1;
   double theta0, dtheta;
@@ -1994,10 +1865,7 @@ static int getEllipseXPoints(int x1, int y1, int x2, int y2,
   return nSteps;
 }
 /* Ellipse */
-static int ellipse(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int ellipse(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int xc, yc, cdx0, cdy0, cdx1, cdy1, noPts, i;
   XPoint *myPtr = NULL;
@@ -2032,10 +1900,7 @@ static int ellipse(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Elliptical arc */
-static int elarc(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int elarc(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int xc, yc, cdx0, cdy0, cdx1, cdy1, i, noPts;
   float dxy[4];
@@ -2068,10 +1933,7 @@ static int elarc(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Elliptical arc, close */
-static int elarcclose(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int elarcclose(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int xc, yc, cdx0, cdy0, cdx1, cdy1, i, close_type, noPts;
   float dxy[4];
@@ -2153,20 +2015,14 @@ static int setLineType(int inType, GC inGC)
   return 1;
 }
 /* Line Type */
-static int ltype(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int ltype(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   /* get the line type */
   cgm_s->ltype = b_gsint(&dat_ptr, cgm_s->indexprec);
   return setLineType(cgm_s->ltype, lineGC);
 }
 /* Line Width */
-static int lwidth(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int lwidth(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   switch (cgm_s->lwidspecmode) {
   case ABSOLUTE:
@@ -2188,10 +2044,7 @@ static int lwidth(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Line Colour */
-static int lcolr(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int lcolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i;
   
@@ -2209,10 +2062,7 @@ static int lcolr(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Marker Type */
-static int mtype(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int mtype(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   /* get the line type */
   cgm_s->mtype = b_gsint(&dat_ptr, cgm_s->indexprec);
@@ -2220,10 +2070,7 @@ static int mtype(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Marker Size */
-static int msize(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int msize(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   switch (cgm_s->marksizspecmode) {
   case ABSOLUTE:
@@ -2241,10 +2088,7 @@ static int msize(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Marker Colour */
-static int mcolr(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int mcolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i;
   /* may be in direct colour mode or indexed colour mode */
@@ -2365,30 +2209,21 @@ static int talign(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr,
   return 1;
 }
 /* Character Set Index */
-static int csetindex(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int csetindex(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->csetindex = b_gsint(&dat_ptr, cgm_s->indexprec);
   
   return 1;
 }
 /* Alternate Character Set Index */
-static int altcsetindex(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int altcsetindex(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->altcsetindex = b_gsint(&dat_ptr, cgm_s->indexprec);
   
   return 1;
 }
 /* Interior Style */
-static int intstyle(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int intstyle(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->intstyle = b_gsint(&dat_ptr, 16);
   switch (cgm_s->intstyle) {
@@ -2409,10 +2244,7 @@ static int intstyle(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Fill Colour */
-static int fillcolr(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int fillcolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i;
   
@@ -2430,39 +2262,27 @@ static int fillcolr(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Hatch Index */
-static int hatchindex(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int hatchindex(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->hatchindex = b_gsint(&dat_ptr, cgm_s->indexprec);
   
   return 1;
 }
 /* Pattern Index */
-static int patindex(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int patindex(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->patindex = b_gsint(&dat_ptr, cgm_s->indexprec);
   
   return 1;
 }
 /* Edge Type */
-static int etype(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int etype(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->etype = b_gsint(&dat_ptr, cgm_s->indexprec);
   return setLineType(cgm_s->etype, edgeGC);
 }
 /* Edge Width */
-static int ewidth(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int ewidth(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   switch (cgm_s->edwidspecmode) {
   case ABSOLUTE:
@@ -2484,10 +2304,7 @@ static int ewidth(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Edge Colour */
-static int ecolr(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int ecolr(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i;
   
@@ -2505,10 +2322,7 @@ static int ecolr(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Edge Visibility */
-static int evis(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int evis(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   cgm_s->evis = b_gsint(&dat_ptr, 16);
   if (cgm_s->evis) { /* visible edge */
@@ -2519,10 +2333,7 @@ static int evis(dat_ptr, cmd_ptr, cgm_s)
   return 1;
 }
 /* Colour Table */
-static int coltab(dat_ptr, cmd_ptr, cgm_s)
-     unsigned char *dat_ptr;
-     struct cmd_info_s *cmd_ptr;
-     cgm_s_type *cgm_s;
+static int coltab(unsigned char *dat_ptr, struct cmd_info_s *cmd_ptr, cgm_s_type *cgm_s)
 {
   int i, j, first_index, no_entries, iColrs[3];
   
index d2aa3d37d8a2098f7e6d2d1c5678ef0de2a44d1f..104c1d566f7b6d048c25b72f2200145fdcee2c20 100644 (file)
@@ -1768,9 +1768,9 @@ static int input ol_data_PROTO(( void ));
 
 ol_data_DECL
     {
-    register ol_data_state_type ol_data_current_state;
-    register ol_data_CHAR *ol_data_cp, *ol_data_bp;
-    register int ol_data_act;
+    ol_data_state_type ol_data_current_state;
+    ol_data_CHAR *ol_data_cp, *ol_data_bp;
+    int ol_data_act;
 
 
 
@@ -2065,9 +2065,9 @@ case ol_data_STATE_EOF(INITIAL):
 static int ol_data_get_next_buffer()
 
     {
-    register ol_data_CHAR *dest = ol_data_current_buffer->ol_data_ch_buf;
-    register ol_data_CHAR *source = ol_datatext - 1; /* copy prev. char, too */
-    register int number_to_move, i;
+    ol_data_CHAR *dest = ol_data_current_buffer->ol_data_ch_buf;
+    ol_data_CHAR *source = ol_datatext - 1; /* copy prev. char, too */
+    int number_to_move, i;
     int ret_val;
 
     if ( ol_data_c_buf_p > &ol_data_current_buffer->ol_data_ch_buf[ol_data_n_chars + 1] )
@@ -2146,8 +2146,8 @@ static int ol_data_get_next_buffer()
 static ol_data_state_type ol_data_get_previous_state()
 
     {
-    register ol_data_state_type ol_data_current_state;
-    register ol_data_CHAR *ol_data_cp;
+    ol_data_state_type ol_data_current_state;
+    ol_data_CHAR *ol_data_cp;
 
     ol_data_current_state = ol_data_start;
 
@@ -2177,15 +2177,15 @@ static ol_data_state_type ol_data_get_previous_state()
  */
 
 #ifdef ol_data_USE_PROTOS
-static ol_data_state_type ol_data_try_NUL_trans( register ol_data_state_type ol_data_current_state )
+static ol_data_state_type ol_data_try_NUL_trans( ol_data_state_type ol_data_current_state )
 #else
 static ol_data_state_type ol_data_try_NUL_trans( ol_data_current_state )
-register ol_data_state_type ol_data_current_state;
+ol_data_state_type ol_data_current_state;
 #endif
 
     {
-    register int ol_data_is_jam;
-    register ol_data_CHAR *ol_data_cp = ol_data_c_buf_p;
+    int ol_data_is_jam;
+    ol_data_CHAR *ol_data_cp = ol_data_c_buf_p;
 
     ol_data_current_state = ol_data_NUL_trans[ol_data_current_state];
     ol_data_is_jam = (ol_data_current_state == 0);
@@ -2205,25 +2205,25 @@ register ol_data_state_type ol_data_current_state;
 
 #if 0
 #ifdef ol_data_USE_PROTOS
-static void ol_dataunput( ol_data_CHAR c, register ol_data_CHAR *ol_data_bp )
+static void ol_dataunput( ol_data_CHAR c, ol_data_CHAR *ol_data_bp )
 #else
 static void ol_dataunput( c, ol_data_bp )
 ol_data_CHAR c;
-register ol_data_CHAR *ol_data_bp;
+ol_data_CHAR *ol_data_bp;
 #endif
 
     {
-    register ol_data_CHAR *ol_data_cp = ol_data_c_buf_p;
+    ol_data_CHAR *ol_data_cp = ol_data_c_buf_p;
 
     /* undo effects of setting up ol_datatext */
     *ol_data_cp = ol_data_hold_char;
 
     if ( ol_data_cp < ol_data_current_buffer->ol_data_ch_buf + 2 )
        { /* need to shift things up to make room */
-       register int number_to_move = ol_data_n_chars + 2; /* +2 for EOB chars */
-       register ol_data_CHAR *dest =
+       int number_to_move = ol_data_n_chars + 2; /* +2 for EOB chars */
+       ol_data_CHAR *dest =
            &ol_data_current_buffer->ol_data_ch_buf[ol_data_current_buffer->ol_data_buf_size + 2];
-       register ol_data_CHAR *source =
+       ol_data_CHAR *source =
            &ol_data_current_buffer->ol_data_ch_buf[number_to_move];
 
        while ( source > ol_data_current_buffer->ol_data_ch_buf )
index 8ec441d3a3a95360ec07ecd928e5d03b1c9731ba..8425d6a8f4377ab8d4849d14450ead5c625e9299 100644 (file)
@@ -168,9 +168,9 @@ extern char *getenv(const char *);
 int
 ol_dataparse()
 {
-    register int ol_datam, ol_datan, ol_datastate;
+    int ol_datam, ol_datan, ol_datastate;
 #if ol_dataDEBUG
-    register char *ol_datas;
+    char *ol_datas;
 
     if ((ol_datas = getenv("ol_dataDEBUG")))
     {
index 65c9c832626d6403d682425b3bd187d4cb35c3be..97a203bf663f475e97052ff7f4a32cd124a86398 100644 (file)
@@ -2243,9 +2243,9 @@ static int input remote_PROTO(( void ));
 
 remote_DECL
     {
-    register remote_state_type remote_current_state;
-    register remote_CHAR *remote_cp, *remote_bp;
-    register int remote_act;
+    remote_state_type remote_current_state;
+    remote_CHAR *remote_cp, *remote_bp;
+    int remote_act;
 
 
 
@@ -2550,9 +2550,9 @@ case remote_STATE_EOF(OLIDREF_FILE):
 static int remote_get_next_buffer()
 
     {
-    register remote_CHAR *dest = remote_current_buffer->remote_ch_buf;
-    register remote_CHAR *source = remotetext - 1; /* copy prev. char, too */
-    register int number_to_move, i;
+    remote_CHAR *dest = remote_current_buffer->remote_ch_buf;
+    remote_CHAR *source = remotetext - 1; /* copy prev. char, too */
+    int number_to_move, i;
     int ret_val;
 
     if ( remote_c_buf_p > &remote_current_buffer->remote_ch_buf[remote_n_chars + 1] )
@@ -2631,8 +2631,8 @@ static int remote_get_next_buffer()
 static remote_state_type remote_get_previous_state()
 
     {
-    register remote_state_type remote_current_state;
-    register remote_CHAR *remote_cp;
+    remote_state_type remote_current_state;
+    remote_CHAR *remote_cp;
 
     remote_current_state = remote_start;
 
@@ -2662,15 +2662,15 @@ static remote_state_type remote_get_previous_state()
  */
 
 #ifdef remote_USE_PROTOS
-static remote_state_type remote_try_NUL_trans( register remote_state_type remote_current_state )
+static remote_state_type remote_try_NUL_trans( remote_state_type remote_current_state )
 #else
 static remote_state_type remote_try_NUL_trans( remote_current_state )
-register remote_state_type remote_current_state;
+remote_state_type remote_current_state;
 #endif
 
     {
-    register int remote_is_jam;
-    register remote_CHAR *remote_cp = remote_c_buf_p;
+    int remote_is_jam;
+    remote_CHAR *remote_cp = remote_c_buf_p;
 
     remote_current_state = remote_NUL_trans[remote_current_state];
     remote_is_jam = (remote_current_state == 0);
@@ -2690,25 +2690,25 @@ register remote_state_type remote_current_state;
 
 #if 0
 #ifdef remote_USE_PROTOS
-static void remoteunput( remote_CHAR c, register remote_CHAR *remote_bp )
+static void remoteunput( remote_CHAR c, remote_CHAR *remote_bp )
 #else
 static void remoteunput( c, remote_bp )
 remote_CHAR c;
-register remote_CHAR *remote_bp;
+remote_CHAR *remote_bp;
 #endif
 
     {
-    register remote_CHAR *remote_cp = remote_c_buf_p;
+    remote_CHAR *remote_cp = remote_c_buf_p;
 
     /* undo effects of setting up remotetext */
     *remote_cp = remote_hold_char;
 
     if ( remote_cp < remote_current_buffer->remote_ch_buf + 2 )
        { /* need to shift things up to make room */
-       register int number_to_move = remote_n_chars + 2; /* +2 for EOB chars */
-       register remote_CHAR *dest =
+       int number_to_move = remote_n_chars + 2; /* +2 for EOB chars */
+       remote_CHAR *dest =
            &remote_current_buffer->remote_ch_buf[remote_current_buffer->remote_buf_size + 2];
-       register remote_CHAR *source =
+       remote_CHAR *source =
            &remote_current_buffer->remote_ch_buf[number_to_move];
 
        while ( source > remote_current_buffer->remote_ch_buf )
index 20a1e6066ee5d937978116ec630bd0e64dcc006c..160cd96ea136e0fe7d621a162f20aeba4d07df40 100644 (file)
@@ -3048,9 +3048,9 @@ static int input nodedata_PROTO(( void ));
 
 nodedata_DECL
     {
-    register nodedata_state_type nodedata_current_state;
-    register nodedata_CHAR *nodedata_cp, *nodedata_bp;
-    register int nodedata_act;
+    nodedata_state_type nodedata_current_state;
+    nodedata_CHAR *nodedata_cp, *nodedata_bp;
+    int nodedata_act;
 
 
 
@@ -3381,9 +3381,9 @@ case nodedata_STATE_EOF(XREF):
 static int nodedata_get_next_buffer()
 
     {
-    register nodedata_CHAR *dest = nodedata_current_buffer->nodedata_ch_buf;
-    register nodedata_CHAR *source = nodedatatext - 1; /* copy prev. char, too */
-    register int number_to_move, i;
+    nodedata_CHAR *dest = nodedata_current_buffer->nodedata_ch_buf;
+    nodedata_CHAR *source = nodedatatext - 1; /* copy prev. char, too */
+    int number_to_move, i;
     int ret_val;
 
     if ( nodedata_c_buf_p > &nodedata_current_buffer->nodedata_ch_buf[nodedata_n_chars + 1] )
@@ -3462,8 +3462,8 @@ static int nodedata_get_next_buffer()
 static nodedata_state_type nodedata_get_previous_state()
 
     {
-    register nodedata_state_type nodedata_current_state;
-    register nodedata_CHAR *nodedata_cp;
+    nodedata_state_type nodedata_current_state;
+    nodedata_CHAR *nodedata_cp;
 
     nodedata_current_state = nodedata_start;
 
@@ -3493,15 +3493,15 @@ static nodedata_state_type nodedata_get_previous_state()
  */
 
 #ifdef nodedata_USE_PROTOS
-static nodedata_state_type nodedata_try_NUL_trans( register nodedata_state_type nodedata_current_state )
+static nodedata_state_type nodedata_try_NUL_trans( nodedata_state_type nodedata_current_state )
 #else
 static nodedata_state_type nodedata_try_NUL_trans( nodedata_current_state )
-register nodedata_state_type nodedata_current_state;
+nodedata_state_type nodedata_current_state;
 #endif
 
     {
-    register int nodedata_is_jam;
-    register nodedata_CHAR *nodedata_cp = nodedata_c_buf_p;
+    int nodedata_is_jam;
+    nodedata_CHAR *nodedata_cp = nodedata_c_buf_p;
 
     nodedata_current_state = nodedata_NUL_trans[nodedata_current_state];
     nodedata_is_jam = (nodedata_current_state == 0);
@@ -3521,25 +3521,25 @@ register nodedata_state_type nodedata_current_state;
 
 #if 0
 #ifdef nodedata_USE_PROTOS
-static void nodedataunput( nodedata_CHAR c, register nodedata_CHAR *nodedata_bp )
+static void nodedataunput( nodedata_CHAR c, nodedata_CHAR *nodedata_bp )
 #else
 static void nodedataunput( c, nodedata_bp )
 nodedata_CHAR c;
-register nodedata_CHAR *nodedata_bp;
+nodedata_CHAR *nodedata_bp;
 #endif
 
     {
-    register nodedata_CHAR *nodedata_cp = nodedata_c_buf_p;
+    nodedata_CHAR *nodedata_cp = nodedata_c_buf_p;
 
     /* undo effects of setting up nodedatatext */
     *nodedata_cp = nodedata_hold_char;
 
     if ( nodedata_cp < nodedata_current_buffer->nodedata_ch_buf + 2 )
        { /* need to shift things up to make room */
-       register int number_to_move = nodedata_n_chars + 2; /* +2 for EOB chars */
-       register nodedata_CHAR *dest =
+       int number_to_move = nodedata_n_chars + 2; /* +2 for EOB chars */
+       nodedata_CHAR *dest =
            &nodedata_current_buffer->nodedata_ch_buf[nodedata_current_buffer->nodedata_buf_size + 2];
-       register nodedata_CHAR *source =
+       nodedata_CHAR *source =
            &nodedata_current_buffer->nodedata_ch_buf[number_to_move];
 
        while ( source > nodedata_current_buffer->nodedata_ch_buf )
index 8bd096297c0fc3f0a7d34c2cea625098036a1daa..3c1688e3251f31f355b249ea42be23ccc4c234d0 100644 (file)
@@ -45,10 +45,10 @@ using namespace std;
  */
 
 int
-strcasecmp(register const char *s1,
-          register const char *s2)
+strcasecmp(const char *s1,
+          const char *s2)
 {
-    register int c1, c2;
+    int c1, c2;
 
     while (*s1 && *s2) {
        c1 = isupper(*s1) ? tolower(*s1) : *s1;
@@ -63,11 +63,11 @@ strcasecmp(register const char *s1,
 
 
 int
-strncasecmp(register const char *s1,
-           register const char *s2,
-           register size_t count)
+strncasecmp(const char *s1,
+           const char *s2,
+           size_t count)
 {
-    register int c1, c2;
+    int c1, c2;
 
     if (!count)
       return 0;
diff --git a/cde/programs/dtinfo/dtinfogen/infolib/etc/TKTemplate.nd.c b/cde/programs/dtinfo/dtinfogen/infolib/etc/TKTemplate.nd.c
deleted file mode 100644 (file)
index 9657da1..0000000
+++ /dev/null
@@ -1,3393 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: TKTemplate.nd.c /main/2 1996/08/21 15:47:40 drk $ */
-
-/* << AT&T C++ Translator 3.0.2 - ObjectCenter Version 2.1>> */
-char __cfront_version_302_xxxxxxxx;
-char __centerline_cfront;
-/* < TKTemplate.cc > */
-typedef int (*__vptp)();
-struct __mptr {short d; short i; __vptp f; };
-extern struct __mptr* __ptbl_vec__TKTemplate_cc_[];
-
-
-static char ______dummy1_ (){ 
-extern int ______setjmp ();
-extern int _______setjmp ();
-extern int ______sigsetjmp ();
-}
-
-typedef int jmp_buf [9];
-
-typedef int sigjmp_buf [10];
-
-#pragma unknown_control_flow(______sigsetjmp , ______setjmp , _______setjmp )
-
-static char ______dummy2_ (){ 
-extern int setjmp ();
-extern int _setjmp ();
-extern int sigsetjmp ();
-}
-
-#pragma unknown_control_flow(setjmp,_setjmp,sigsetjmp)
-
-extern int errno ;
-
-extern int sys_nerr ;
-extern char *sys_errlist [];
-
-typedef int sigset_t ;
-
-typedef unsigned int speed_t ;
-typedef unsigned long tcflag_t ;
-typedef unsigned char cc_t ;
-typedef int pid_t ;
-
-typedef unsigned short mode_t ;
-typedef short nlink_t ;
-
-typedef long clock_t ;
-typedef long time_t ;
-
-typedef int ______size_t ;
-typedef int ptrdiff_t ;
-
-typedef unsigned short wchar_t ;
-
-typedef unsigned int size_t ;
-
-struct _iobuf {        /* sizeof _iobuf == 20 */
-int _cnt__6_iobuf ;
-unsigned char *_ptr__6_iobuf ;
-unsigned char *_base__6_iobuf ;
-int _bufsiz__6_iobuf ;
-short _flag__6_iobuf ;
-char _file__6_iobuf ;
-};
-
-extern struct _iobuf _iob [];
-
-typedef long fpos_t ;
-
-typedef unsigned char u_char ;
-typedef unsigned short u_short ;
-typedef unsigned int u_int ;
-typedef unsigned long u_long ;
-typedef unsigned short ushort ;
-typedef unsigned int uint ;
-
-typedef struct _physadr_t *physadr_t ;
-
-typedef struct _quad_t quad_t ;
-typedef long daddr_t ;
-typedef char *caddr_t ;
-typedef unsigned long ino_t ;
-typedef short dev_t ;
-typedef long off_t ;
-typedef unsigned short uid_t ;
-typedef unsigned short gid_t ;
-typedef long key_t ;
-typedef char *addr_t ;
-
-typedef long fd_mask ;
-
-extern unsigned int _mb_cur_max ;
-
-extern char *optarg ;
-extern int optind ;
-
-extern int opterr ;
-extern char **environ ;
-extern int end ;
-
-extern int etext ;
-
-extern int edata ;
-
-typedef char *malloc_t ;
-
-extern char _ctype_ [];
-
-typedef char (* __Q2_10Exceptions15error_handler_t )();
-
-typedef unsigned int CC_Boolean ;
-
-typedef long streampos ;
-typedef long streamoff ;
-enum __Q2_3ios8io_state { goodbit__Q2_3ios8io_state = 0, eofbit__Q2_3ios8io_state = 1, failbit__Q2_3ios8io_state = 2, badbit__Q2_3ios8io_state = 4, hardfail__Q2_3ios8io_state = 128} ;
-enum __Q2_3ios9open_mode { in__Q2_3ios9open_mode = 1, out__Q2_3ios9open_mode = 2, ate__Q2_3ios9open_mode = 4, app__Q2_3ios9open_mode = 8, trunc__Q2_3ios9open_mode = 16, nocreate__Q2_3ios9open_mode = 32, noreplace__Q2_3ios9open_mode = 64} ;
-enum __Q2_3ios8seek_dir { beg__Q2_3ios8seek_dir = 0, cur__Q2_3ios8seek_dir = 1, end__Q2_3ios8seek_dir = 2} ;
-enum __Q2_3ios4__E9 { skipws__Q2_3ios4__E9 = 1, left__Q2_3ios4__E9 = 2, right__Q2_3ios4__E9 = 4, internal__Q2_3ios4__E9 = 8, dec__Q2_3ios4__E9 = 16, oct__Q2_3ios4__E9 = 32, hex__Q2_3ios4__E9 = 64, showbase__Q2_3ios4__E9 = 128, showpoint__Q2_3ios4__E9 = 256, uppercase__Q2_3ios4__E9 = 512, showpos__Q2_3ios4__E9 = 1024, scientific__Q2_3ios4__E9 = 2048, fixed__Q2_3ios4__E9 = 4096, unitbuf__Q2_3ios4__E9 = 8192,
-stdio__Q2_3ios4__E9 = 16384} ;
-enum __Q2_3ios5__E10 { skipping__Q2_3ios5__E10 = 512, tied__Q2_3ios5__E10 = 1024} ;
-struct ios {   /* sizeof ios == 60 */
-
-int nuser__3ios ;
-
-union ios_user_union *x_user__3ios ;
-
-struct streambuf *bp__3ios ;
-
-int state__3ios ;
-int ispecial__3ios ;
-int ospecial__3ios ;
-int isfx_special__3ios ;
-int osfx_special__3ios ;
-int delbuf__3ios ;
-struct ostream *x_tie__3ios ;
-long x_flags__3ios ;
-short x_precision__3ios ;
-char x_fill__3ios ;
-short x_width__3ios ;
-
-int assign_private__3ios ;
-
-struct __mptr *__vptr__3ios ;
-};
-
-extern long basefield__3ios ;
-
-extern long adjustfield__3ios ;
-
-extern long floatfield__3ios ;
-
-extern long nextbit__3ios ;
-extern long nextword__3ios ;
-
-extern char (*stdioflush__3ios )();
-
-struct istream {       /* sizeof istream == 72 */
-
-int x_gcount__7istream ;
-
-struct __mptr *__vptr__7istream ;
-struct ios *Pios;
-struct ios Oios;
-};
-
-struct istream_withassign {    /* sizeof istream_withassign == 72 */
-
-int x_gcount__7istream ;
-
-struct __mptr *__vptr__7istream ;
-struct ios *Pios;
-struct ios Oios;
-};
-
-extern struct istream_withassign cin ;
-
-struct ostream {       /* sizeof ostream == 68 */
-
-struct __mptr *__vptr__7ostream ;
-struct ios *Pios;
-struct ios Oios;
-};
-
-struct ostream_withassign {    /* sizeof ostream_withassign == 68 */
-
-struct __mptr *__vptr__7ostream ;
-struct ios *Pios;
-struct ios Oios;
-};
-
-extern struct ostream_withassign cout ;
-extern struct ostream_withassign cerr ;
-extern struct ostream_withassign clog ;
-
-struct Iostream_init { /* sizeof Iostream_init == 1 */
-
-char __W29__13Iostream_init ;
-};
-
-extern int stdstatus__13Iostream_init ;
-extern int initcount__13Iostream_init ;
-
-struct Iostream_init *__ct__13Iostream_initFv ();
-char __dt__13Iostream_initFv ();
-static struct Iostream_init iostream_init ;
-
-typedef struct Stack__pt__2_i _f1_ ;
-typedef struct CC_TPtrSlist__pt__11_9CC_String _f2_ ;
-typedef struct hashTable__pt__26_9CC_String13BTCollectable _f3_ ;
-typedef struct hashTable__pt__12_9CC_Stringi _f4_ ;
-typedef struct hashTableIterator__pt__26_9CC_String13BTCollectable _f5_ ;
-typedef struct hashTableIterator__pt__12_9CC_Stringi _f6_ ;
-
-struct hashTableIterator__pt__12_9CC_Stringi { /* sizeof hashTableIterator__pt__12_9CC_Stringi == 16 */
-
-size_t f_bucket_num__37hashTableIterator__pt__12_9CC_Stringi ;
-size_t f_pos__37hashTableIterator__pt__12_9CC_Stringi ;
-struct kv_pair__pt__12_9CC_Stringi *f_rec__37hashTableIterator__pt__12_9CC_Stringi ;
-struct hashTable__pt__12_9CC_Stringi *f_hashTable__37hashTableIterator__pt__12_9CC_Stringi ;
-};
-
-extern char *__nw__FUi ();
-
-struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi {   /* sizeof pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi == 12 */
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi **f_array__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ;
-size_t f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ;
-size_t f_items__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ;
-};
-
-struct hashTable__pt__12_9CC_Stringi { /* sizeof hashTable__pt__12_9CC_Stringi == 20 */
-
-struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi f_buckets__29hashTable__pt__12_9CC_Stringi ;
-unsigned int (*f_hash_func_ptr__29hashTable__pt__12_9CC_Stringi )();
-size_t f_items__29hashTable__pt__12_9CC_Stringi ;
-};
-
-struct hashTableIterator__pt__12_9CC_Stringi *__ct__37hashTableIterator__pt__12_9CC_StringiFR29hashTable__pt__12_9CC_Stringi (__0this , __1b )struct hashTableIterator__pt__12_9CC_Stringi *__0this ;
-
-struct hashTable__pt__12_9CC_Stringi *__1b ;
-
-{ if (__0this || (__0this = (struct hashTableIterator__pt__12_9CC_Stringi *)__nw__FUi ( sizeof (struct hashTableIterator__pt__12_9CC_Stringi)) ))( ( ( (__0this -> f_bucket_num__37hashTableIterator__pt__12_9CC_Stringi = 0 ),
-(__0this -> f_pos__37hashTableIterator__pt__12_9CC_Stringi = 0 )) , (__0this -> f_rec__37hashTableIterator__pt__12_9CC_Stringi = 0 )) , (__0this -> f_hashTable__37hashTableIterator__pt__12_9CC_Stringi = __1b )) ;
-
-return __0this ;
-}
-
-extern char __dl__FPv ();
-
-char __dt__37hashTableIterator__pt__12_9CC_StringiFv (__0this , __0__free )struct hashTableIterator__pt__12_9CC_Stringi *__0this ;
-
-int __0__free ;
-
-{ if (__0this )
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-
-}
-
-struct CC_Listbase {   /* sizeof CC_Listbase == 12 */
-
-struct CC_Link_base *f_head__11CC_Listbase ;
-struct CC_Link_base *f_tail__11CC_Listbase ;
-size_t f_length__11CC_Listbase ;
-};
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi **__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi ();
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi {    /* sizeof CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi == 20 */
-
-struct CC_Link_base *f_head__11CC_Listbase ;
-struct CC_Link_base *f_tail__11CC_Listbase ;
-size_t f_length__11CC_Listbase ;
-
-CC_Boolean destructed__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ;
-
-struct __mptr *__vptr__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ;
-};
-
-CC_Boolean _findNonEmptyBucket__37hashTableIterator__pt__12_9CC_StringiFv (__0this )register struct hashTableIterator__pt__12_9CC_Stringi *__0this ;
-{ 
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__1b ;
-
-__1b = 0 ;
-
-for(;__0this -> f_bucket_num__37hashTableIterator__pt__12_9CC_Stringi < ( ((struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& ((*__0this -> f_hashTable__37hashTableIterator__pt__12_9CC_Stringi )). f_buckets__29hashTable__pt__12_9CC_Stringi ))-> f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ) ;__0this -> f_bucket_num__37hashTableIterator__pt__12_9CC_Stringi ++ ) { 
-if
-((__1b = ((*__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi ( & ((*__0this -> f_hashTable__37hashTableIterator__pt__12_9CC_Stringi )). f_buckets__29hashTable__pt__12_9CC_Stringi , __0this -> f_bucket_num__37hashTableIterator__pt__12_9CC_Stringi ) )))&& (( ((struct CC_Listbase *)__1b )-> f_length__11CC_Listbase ) >
-0 )){ 
-__0this -> f_pos__37hashTableIterator__pt__12_9CC_Stringi = 0 ;
-return (unsigned int )1 ;
-}
-}
-
-return (unsigned int )0 ;
-}
-
-struct kv_pair__pt__12_9CC_Stringi *at__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiCFUi ();
-
-CC_Boolean _findNextRecord__37hashTableIterator__pt__12_9CC_StringiFv ();
-
-CC_Boolean __pp__37hashTableIterator__pt__12_9CC_StringiFv (__0this )register struct hashTableIterator__pt__12_9CC_Stringi *__0this ;
-{ 
-if (__0this -> f_rec__37hashTableIterator__pt__12_9CC_Stringi == 0 ){ 
-if (_findNonEmptyBucket__37hashTableIterator__pt__12_9CC_StringiFv ( __0this ) == 0 )
-return (unsigned int )0 ;
-
-}
-else 
-{ 
-if (_findNextRecord__37hashTableIterator__pt__12_9CC_StringiFv ( __0this ) == 0 ){ 
-__0this -> f_bucket_num__37hashTableIterator__pt__12_9CC_Stringi ++ ;
-if (_findNonEmptyBucket__37hashTableIterator__pt__12_9CC_StringiFv ( __0this ) == 0 )
-return (unsigned int )0 ;
-}
-}
-
-__0this -> f_rec__37hashTableIterator__pt__12_9CC_Stringi = at__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiCFUi ( (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)((*__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi ( & ((*__0this -> f_hashTable__37hashTableIterator__pt__12_9CC_Stringi )). f_buckets__29hashTable__pt__12_9CC_Stringi , __0this -> f_bucket_num__37hashTableIterator__pt__12_9CC_Stringi ) )), __0this -> f_pos__37hashTableIterator__pt__12_9CC_Stringi )
-;
-return (unsigned int )1 ;
-}
-
-CC_Boolean _findNextRecord__37hashTableIterator__pt__12_9CC_StringiFv (__0this )register struct hashTableIterator__pt__12_9CC_Stringi *__0this ;
-{ 
-struct CC_Listbase *__0__X78 ;
-
-__0this -> f_pos__37hashTableIterator__pt__12_9CC_Stringi ++ ;
-
-if (( (__0__X78 = (struct CC_Listbase *)((*__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi ( & ((*__0this -> f_hashTable__37hashTableIterator__pt__12_9CC_Stringi )). f_buckets__29hashTable__pt__12_9CC_Stringi , __0this -> f_bucket_num__37hashTableIterator__pt__12_9CC_Stringi ) ))), ( __0__X78 ->
-f_length__11CC_Listbase ) ) <= __0this -> f_pos__37hashTableIterator__pt__12_9CC_Stringi )
-return (unsigned int )0 ;
-else 
-return (unsigned int )1 ;
-}
-
-struct kv_pair__pt__12_9CC_Stringi {   /* sizeof kv_pair__pt__12_9CC_Stringi == 8 */
-
-struct CC_String *f_key__27kv_pair__pt__12_9CC_Stringi ;
-int *f_value__27kv_pair__pt__12_9CC_Stringi ;
-};
-
-extern CC_Boolean f_needRemove__27kv_pair__pt__12_9CC_Stringi ;
-
-struct CC_String *key__37hashTableIterator__pt__12_9CC_StringiFv (__0this )struct hashTableIterator__pt__12_9CC_Stringi *__0this ;
-{ 
-return __0this -> f_rec__37hashTableIterator__pt__12_9CC_Stringi -> f_key__27kv_pair__pt__12_9CC_Stringi ;
-}
-
-int *value__37hashTableIterator__pt__12_9CC_StringiCFv (__0this )struct hashTableIterator__pt__12_9CC_Stringi *__0this ;
-{ 
-return __0this -> f_rec__37hashTableIterator__pt__12_9CC_Stringi -> f_value__27kv_pair__pt__12_9CC_Stringi ;
-}
-
-struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable {     /* sizeof pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable == 12 */
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable **f_array__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ;
-size_t f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ;
-size_t f_items__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ;
-};
-
-struct hashTable__pt__26_9CC_String13BTCollectable {   /* sizeof hashTable__pt__26_9CC_String13BTCollectable == 20 */
-
-struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable f_buckets__43hashTable__pt__26_9CC_String13BTCollectable ;
-unsigned int (*f_hash_func_ptr__43hashTable__pt__26_9CC_String13BTCollectable )();
-size_t f_items__43hashTable__pt__26_9CC_String13BTCollectable ;
-};
-
-struct hashTableIterator__pt__26_9CC_String13BTCollectable {   /* sizeof hashTableIterator__pt__26_9CC_String13BTCollectable == 16 */
-
-size_t f_bucket_num__51hashTableIterator__pt__26_9CC_String13BTCollectable ;
-size_t f_pos__51hashTableIterator__pt__26_9CC_String13BTCollectable ;
-struct kv_pair__pt__26_9CC_String13BTCollectable *f_rec__51hashTableIterator__pt__26_9CC_String13BTCollectable ;
-struct hashTable__pt__26_9CC_String13BTCollectable *f_hashTable__51hashTableIterator__pt__26_9CC_String13BTCollectable ;
-};
-
-struct hashTableIterator__pt__26_9CC_String13BTCollectable *__ct__51hashTableIterator__pt__26_9CC_String13BTCollectableFR43hashTable__pt__26_9CC_String13BTCollectable (__0this , __1b )struct hashTableIterator__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct hashTable__pt__26_9CC_String13BTCollectable *__1b ;
-
-{ if (__0this || (__0this = (struct hashTableIterator__pt__26_9CC_String13BTCollectable *)__nw__FUi ( sizeof (struct hashTableIterator__pt__26_9CC_String13BTCollectable)) ))( ( ( (__0this -> f_bucket_num__51hashTableIterator__pt__26_9CC_String13BTCollectable = 0 ),
-(__0this -> f_pos__51hashTableIterator__pt__26_9CC_String13BTCollectable = 0 )) , (__0this -> f_rec__51hashTableIterator__pt__26_9CC_String13BTCollectable = 0 )) , (__0this -> f_hashTable__51hashTableIterator__pt__26_9CC_String13BTCollectable = __1b )) ;
-
-return __0this ;
-}
-
-char __dt__51hashTableIterator__pt__26_9CC_String13BTCollectableFv (__0this , __0__free )struct hashTableIterator__pt__26_9CC_String13BTCollectable *__0this ;
-
-int __0__free ;
-
-{ if (__0this )
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-
-}
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable **__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi ();
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable {      /* sizeof CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable == 20 */
-
-struct CC_Link_base *f_head__11CC_Listbase ;
-struct CC_Link_base *f_tail__11CC_Listbase ;
-size_t f_length__11CC_Listbase ;
-
-CC_Boolean destructed__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ;
-
-struct __mptr *__vptr__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ;
-};
-
-CC_Boolean _findNonEmptyBucket__51hashTableIterator__pt__26_9CC_String13BTCollectableFv (__0this )register struct hashTableIterator__pt__26_9CC_String13BTCollectable *__0this ;
-{ 
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__1b ;
-
-__1b = 0 ;
-
-for(;__0this -> f_bucket_num__51hashTableIterator__pt__26_9CC_String13BTCollectable < ( ((struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& ((*__0this -> f_hashTable__51hashTableIterator__pt__26_9CC_String13BTCollectable )). f_buckets__43hashTable__pt__26_9CC_String13BTCollectable ))-> f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ) ;__0this -> f_bucket_num__51hashTableIterator__pt__26_9CC_String13BTCollectable ++ ) { 
-if
-((__1b = ((*__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi ( & ((*__0this -> f_hashTable__51hashTableIterator__pt__26_9CC_String13BTCollectable )). f_buckets__43hashTable__pt__26_9CC_String13BTCollectable , __0this -> f_bucket_num__51hashTableIterator__pt__26_9CC_String13BTCollectable ) )))&& (( ((struct CC_Listbase *)__1b )-> f_length__11CC_Listbase ) >
-0 )){ 
-__0this -> f_pos__51hashTableIterator__pt__26_9CC_String13BTCollectable = 0 ;
-return (unsigned int )1 ;
-}
-}
-
-return (unsigned int )0 ;
-}
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *at__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableCFUi ();
-
-CC_Boolean _findNextRecord__51hashTableIterator__pt__26_9CC_String13BTCollectableFv ();
-
-CC_Boolean __pp__51hashTableIterator__pt__26_9CC_String13BTCollectableFv (__0this )register struct hashTableIterator__pt__26_9CC_String13BTCollectable *__0this ;
-{ 
-if (__0this -> f_rec__51hashTableIterator__pt__26_9CC_String13BTCollectable == 0 ){ 
-if (_findNonEmptyBucket__51hashTableIterator__pt__26_9CC_String13BTCollectableFv ( __0this ) == 0 )
-return (unsigned int )0 ;
-
-}
-else 
-{ 
-if (_findNextRecord__51hashTableIterator__pt__26_9CC_String13BTCollectableFv ( __0this ) == 0 ){ 
-__0this -> f_bucket_num__51hashTableIterator__pt__26_9CC_String13BTCollectable ++ ;
-if (_findNonEmptyBucket__51hashTableIterator__pt__26_9CC_String13BTCollectableFv ( __0this ) == 0 )
-return (unsigned int )0 ;
-}
-}
-
-__0this -> f_rec__51hashTableIterator__pt__26_9CC_String13BTCollectable = at__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableCFUi ( (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)((*__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi ( & ((*__0this -> f_hashTable__51hashTableIterator__pt__26_9CC_String13BTCollectable )). f_buckets__43hashTable__pt__26_9CC_String13BTCollectable , __0this -> f_bucket_num__51hashTableIterator__pt__26_9CC_String13BTCollectable ) )), __0this -> f_pos__51hashTableIterator__pt__26_9CC_String13BTCollectable )
-;
-return (unsigned int )1 ;
-}
-
-CC_Boolean _findNextRecord__51hashTableIterator__pt__26_9CC_String13BTCollectableFv (__0this )register struct hashTableIterator__pt__26_9CC_String13BTCollectable *__0this ;
-{ 
-struct CC_Listbase *__0__X79 ;
-
-__0this -> f_pos__51hashTableIterator__pt__26_9CC_String13BTCollectable ++ ;
-
-if (( (__0__X79 = (struct CC_Listbase *)((*__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi ( & ((*__0this -> f_hashTable__51hashTableIterator__pt__26_9CC_String13BTCollectable )). f_buckets__43hashTable__pt__26_9CC_String13BTCollectable , __0this -> f_bucket_num__51hashTableIterator__pt__26_9CC_String13BTCollectable ) ))), ( __0__X79 ->
-f_length__11CC_Listbase ) ) <= __0this -> f_pos__51hashTableIterator__pt__26_9CC_String13BTCollectable )
-return (unsigned int )0 ;
-else 
-return (unsigned int )1 ;
-}
-
-struct kv_pair__pt__26_9CC_String13BTCollectable {     /* sizeof kv_pair__pt__26_9CC_String13BTCollectable == 8 */
-
-struct CC_String *f_key__41kv_pair__pt__26_9CC_String13BTCollectable ;
-struct BTCollectable *f_value__41kv_pair__pt__26_9CC_String13BTCollectable ;
-};
-
-extern CC_Boolean f_needRemove__41kv_pair__pt__26_9CC_String13BTCollectable ;
-
-struct CC_String *key__51hashTableIterator__pt__26_9CC_String13BTCollectableFv (__0this )struct hashTableIterator__pt__26_9CC_String13BTCollectable *__0this ;
-{ 
-return __0this -> f_rec__51hashTableIterator__pt__26_9CC_String13BTCollectable -> f_key__41kv_pair__pt__26_9CC_String13BTCollectable ;
-}
-
-struct BTCollectable *value__51hashTableIterator__pt__26_9CC_String13BTCollectableCFv (__0this )struct hashTableIterator__pt__26_9CC_String13BTCollectable *__0this ;
-{ 
-return __0this -> f_rec__51hashTableIterator__pt__26_9CC_String13BTCollectable -> f_value__41kv_pair__pt__26_9CC_String13BTCollectable ;
-}
-
-struct ostream *__ls__7ostreamFPCc ();
-
-struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__ct__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFRC75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ();
-
-extern struct ostream *endl__FR7ostream ();
-
-extern char exit ();
-
-struct hashTable__pt__12_9CC_Stringi *__ct__29hashTable__pt__12_9CC_StringiFRC29hashTable__pt__12_9CC_Stringi (__0this , __1h )register struct hashTable__pt__12_9CC_Stringi *__0this ;
-
-struct hashTable__pt__12_9CC_Stringi *__1h ;
-
-{ 
-struct ostream *__0__X80 ;
-
-struct ostream *(*__2__X81 )();
-
-if (__0this || (__0this = (struct hashTable__pt__12_9CC_Stringi *)__nw__FUi ( sizeof (struct hashTable__pt__12_9CC_Stringi)) )){ ( ( __ct__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFRC75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ( & __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi ,
-(struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& ((*__1h )). f_buckets__29hashTable__pt__12_9CC_Stringi )) , (__0this -> f_hash_func_ptr__29hashTable__pt__12_9CC_Stringi = ((*__1h )). f_hash_func_ptr__29hashTable__pt__12_9CC_Stringi )) , (__0this -> f_items__29hashTable__pt__12_9CC_Stringi = ((*__1h )). f_items__29hashTable__pt__12_9CC_Stringi ))
-;
-( (__0__X80 = (struct ostream *)__ls__7ostreamFPCc ( (struct ostream *)(& cerr ), (char *)"Warning: hashTable(const hashTable&) called") ),
-( (__2__X81 = (endl__FR7ostream )), ( ((*__2__X81 ))( (struct ostream *)__0__X80 ) ) ) ) ;
-exit ( -1) ;
-} 
-return __0this ;
-}
-
-struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__ct__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUiP50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ();
-
-struct hashTable__pt__12_9CC_Stringi *__ct__29hashTable__pt__12_9CC_StringiFPFRC9CC_String_UiUi (__0this , __1f , __1init_bucket_num )struct hashTable__pt__12_9CC_Stringi *__0this ;
-
-unsigned int (*__1f )();
-
-size_t __1init_bucket_num ;
-
-{ if (__0this || (__0this = (struct hashTable__pt__12_9CC_Stringi *)__nw__FUi ( sizeof (struct hashTable__pt__12_9CC_Stringi)) ))( ( __ct__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUiP50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ( & __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi ,
-__1init_bucket_num , (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)0 ) , (__0this -> f_hash_func_ptr__29hashTable__pt__12_9CC_Stringi = __1f )) , (__0this -> f_items__29hashTable__pt__12_9CC_Stringi = 0 )) ;
-
-return __0this ;
-}
-
-char __dt__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFv ();
-
-char __dt__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFv ();
-
-char __dt__27kv_pair__pt__12_9CC_StringiFv ();
-
-struct CC_Link_base {  /* sizeof CC_Link_base == 8 */
-
-struct CC_Link_base *f_next__12CC_Link_base ;
-struct CC_Link_base *f_prev__12CC_Link_base ;
-};
-
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi { /* sizeof CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi == 12 */
-
-struct CC_Link_base *f_next__12CC_Link_base ;
-struct CC_Link_base *f_prev__12CC_Link_base ;
-
-struct kv_pair__pt__12_9CC_Stringi *f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi ;
-};
-
-struct CC_Link_base *removeFirst__11CC_ListbaseFv ();
-
-char __dt__29hashTable__pt__12_9CC_StringiFv (__0this , __0__free )register struct hashTable__pt__12_9CC_Stringi *__0this ;
-
-int __0__free ;
-
-{ 
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__1b ;
-struct kv_pair__pt__12_9CC_Stringi *__1r ;
-
-if (__0this ){ 
-__1b = 0 ;
-__1r = 0 ;
-
-{ { int __1i ;
-
-__1i = 0 ;
-
-for(;__1i < ( ((struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi ))-> f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ) ;__1i ++ ) { 
-__1b = ((*__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi ( & __0this ->
-f_buckets__29hashTable__pt__12_9CC_Stringi , (unsigned int )__1i ) ));
-
-if (__1b ){ 
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xt00athucfm ;
-
-struct kv_pair__pt__12_9CC_Stringi *__3__Xret00athucfm ;
-
-while (__1r = ( (__2__Xt00athucfm = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)removeFirst__11CC_ListbaseFv ( (struct CC_Listbase *)__1b ) ))))), (__2__Xt00athucfm ?( (__3__Xret00athucfm = __2__Xt00athucfm -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi ),
-( __dl__FPv ( (char *)__2__Xt00athucfm ) , __3__Xret00athucfm ) ) :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) )
-__dt__27kv_pair__pt__12_9CC_StringiFv ( __1r , 3) ;
-
-__dt__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFv ( __1b , 3) ;
-}
-}
-
-}
-
-}
-
-if (__0this ){ __dt__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFv ( & __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi , 2) ;
-
-if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} } 
-}
-
-char clearAndDestroy__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFv ();
-
-char clearAndDestroy__29hashTable__pt__12_9CC_StringiFv (__0this )register struct hashTable__pt__12_9CC_Stringi *__0this ;
-{ 
-f_needRemove__27kv_pair__pt__12_9CC_Stringi = 1 ;
-
-{ struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__1b ;
-
-__1b = 0 ;
-
-{ { int __1i ;
-
-__1i = 0 ;
-
-for(;__1i < ( ((struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi ))-> f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ) ;__1i ++ ) { 
-__1b = ((*__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi ( & __0this ->
-f_buckets__29hashTable__pt__12_9CC_Stringi , (unsigned int )__1i ) ));
-if (__1b ){ 
-((*(((char (*)())(__1b -> __vptr__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi [1]).f))))( ((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)((((char *)__1b ))+ (__1b -> __vptr__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi [1]).d))) ;
-__dt__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFv ( __1b , 3) ;
-((*__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi ( & __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi , (unsigned int )__1i ) ))= 0 ;
-}
-}
-
-__0this -> f_items__29hashTable__pt__12_9CC_Stringi = 0 ;
-
-f_needRemove__27kv_pair__pt__12_9CC_Stringi = 0 ;
-
-}
-
-}
-
-}
-}
-
-int *findValue__29hashTable__pt__12_9CC_StringiCFPC9CC_String ();
-
-CC_Boolean contains__29hashTable__pt__12_9CC_StringiCFPC9CC_String (__0this , __1k )struct hashTable__pt__12_9CC_Stringi *__0this ;
-
-struct CC_String *__1k ;
-{ 
-if (findValue__29hashTable__pt__12_9CC_StringiCFPC9CC_String ( __0this , __1k ) )
-return (unsigned int )1 ;
-else 
-return (unsigned int )0 ;
-
-}
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiCFUi ();
-enum __Q2_9CC_String11caseCompare { exact__Q2_9CC_String11caseCompare = 0, ignoreCase__Q2_9CC_String11caseCompare = 1} ;
-
-struct CC_String {     /* sizeof CC_String == 8 */
-
-char *f_string__9CC_String ;
-struct __mptr *__vptr__9CC_String ;
-};
-
-struct kv_pair__pt__12_9CC_Stringi *find__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiCFPC27kv_pair__pt__12_9CC_Stringi ();
-
-struct kv_pair__pt__12_9CC_Stringi *_find__29hashTable__pt__12_9CC_StringiCFPC9CC_String (__0this , __1k )register struct hashTable__pt__12_9CC_Stringi *__0this ;
-
-struct CC_String *__1k ;
-{ 
-size_t __1i ;
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__1b ;
-
-struct kv_pair__pt__12_9CC_Stringi *__0_result ;
-
-__1i = (((*__0this -> f_hash_func_ptr__29hashTable__pt__12_9CC_Stringi ))( (struct CC_String *)__1k ) % ( ((struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi ))-> f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ) );
-
-__1b = __vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiCFUi ( (struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi ), __1i ) ;
-
-if (__1b == 0 )
-return (struct kv_pair__pt__12_9CC_Stringi *)0 ;
-
-{ struct kv_pair__pt__12_9CC_Stringi __1key ;
-
-( (( ((& __1key )-> f_key__27kv_pair__pt__12_9CC_Stringi = (((struct CC_String *)(((struct CC_String *)__1k ))))), ((& __1key )-> f_value__27kv_pair__pt__12_9CC_Stringi = ((int *)0 ))) ),
-(& __1key )) ;
-
-{ { __0_result = find__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiCFPC27kv_pair__pt__12_9CC_Stringi ( (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__1b , (struct kv_pair__pt__12_9CC_Stringi *)(& __1key )) ;
-
-__dt__27kv_pair__pt__12_9CC_StringiFv ( & __1key , 2) ;
-} 
-return __0_result ;
-} 
-}
-}
-
-int *findValue__29hashTable__pt__12_9CC_StringiCFPC9CC_String (__0this , __1k )struct hashTable__pt__12_9CC_Stringi *__0this ;
-
-struct CC_String *__1k ;
-{ 
-struct kv_pair__pt__12_9CC_Stringi *__1p ;
-
-__1p = _find__29hashTable__pt__12_9CC_StringiCFPC9CC_String ( __0this , __1k ) ;
-if (__1p )
-return __1p -> f_value__27kv_pair__pt__12_9CC_Stringi ;
-else 
-return (int *)0 ;
-}
-
-struct CC_String *findKeyAndValue__29hashTable__pt__12_9CC_StringiCFPC9CC_StringRPi (__0this , __1k , __1v )register struct hashTable__pt__12_9CC_Stringi *__0this ;
-
-struct CC_String *__1k ;
-
-int **__1v ;
-{ 
-struct kv_pair__pt__12_9CC_Stringi *__1p ;
-
-__1p = _find__29hashTable__pt__12_9CC_StringiCFPC9CC_String ( __0this , __1k ) ;
-if (__1p ){ 
-((*__1v ))= __1p -> f_value__27kv_pair__pt__12_9CC_Stringi ;
-return __1p -> f_key__27kv_pair__pt__12_9CC_Stringi ;
-}
-else return (struct CC_String *)0 ;
-}
-
-char insert__11CC_ListbaseFP12CC_Link_base ();
-
-char insertKeyAndValue__29hashTable__pt__12_9CC_StringiFP9CC_StringPi (__0this , __1k , __1v )register struct hashTable__pt__12_9CC_Stringi *__0this ;
-
-struct CC_String *__1k ;
-
-int *__1v ;
-{ 
-size_t __1i ;
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__1b ;
-
-__1i = (((*__0this -> f_hash_func_ptr__29hashTable__pt__12_9CC_Stringi ))( (struct CC_String *)__1k ) % ( ((struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi ))-> f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ) );
-
-__1b = ((*__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi ( & __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi , __1i ) ));
-
-if (__1b == 0 ){ 
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0__X82 ;
-
-struct CC_Listbase *__0__X72 ;
-
-((*__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi ( & __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi , __1i ) ))= ( (__0__X82 = 0 ), ( ((__0__X82 || (__0__X82 = (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__nw__FUi (
-sizeof (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi)) ))?( ( (__0__X82 = (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)( (__0__X72 = (((struct CC_Listbase *)__0__X82 ))), ( ((__0__X72 || (__0__X72 = (struct
-CC_Listbase *)__nw__FUi ( sizeof (struct CC_Listbase)) ))?( ( (__0__X72 -> f_head__11CC_Listbase = 0 ), (__0__X72 -> f_tail__11CC_Listbase = 0 )) , (__0__X72 -> f_length__11CC_Listbase =
-0 )) :0 ), __0__X72 ) ) ), (__0__X82 -> __vptr__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[0])) , (__0__X82 -> destructed__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = 0 )) :0 ),
-__0__X82 ) ) ;
-}
-
-{ struct kv_pair__pt__12_9CC_Stringi *__1p ;
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0__X83 ;
-
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__0__X76 ;
-
-struct CC_Link_base *__0__X71 ;
-
-struct CC_Link_base *__2__X77 ;
-
-struct kv_pair__pt__12_9CC_Stringi *__0__X84 ;
-
-__1p = ( (__0__X84 = 0 ), ( ((__0__X84 || (__0__X84 = (struct kv_pair__pt__12_9CC_Stringi *)__nw__FUi ( sizeof (struct kv_pair__pt__12_9CC_Stringi)) ))?( (__0__X84 -> f_key__27kv_pair__pt__12_9CC_Stringi =
-__1k ), (__0__X84 -> f_value__27kv_pair__pt__12_9CC_Stringi = __1v )) :0 ), __0__X84 ) ) ;
-( (__0__X83 = ((*__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi ( & __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi , __1i ) ))), ( ( (__2__X77 = (struct CC_Link_base *)( (__0__X76 =
-0 ), ( ((__0__X76 || (__0__X76 = (struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)__nw__FUi ( sizeof (struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi)) ))?( (__0__X76 = (struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( (__0__X71 = (((struct
-CC_Link_base *)__0__X76 ))), ( ((__0__X71 || (__0__X71 = (struct CC_Link_base *)__nw__FUi ( sizeof (struct CC_Link_base)) ))?( (__0__X71 -> f_next__12CC_Link_base = 0 ), (__0__X71 -> f_prev__12CC_Link_base =
-0 )) :0 ), __0__X71 ) ) ), (__0__X76 -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi = __1p )) :0 ), __0__X76 ) ) ), ( insert__11CC_ListbaseFP12CC_Link_base (
-((struct CC_Listbase *)__0__X83 ), __2__X77 ) ) ) ) ) ;
-
-__0this -> f_items__29hashTable__pt__12_9CC_Stringi ++ ;
-
-}
-}
-
-struct kv_pair__pt__12_9CC_Stringi *remove__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFPC27kv_pair__pt__12_9CC_Stringi ();
-
-struct CC_String *remove__29hashTable__pt__12_9CC_StringiFPC9CC_String (__0this , __1k )register struct hashTable__pt__12_9CC_Stringi *__0this ;
-
-struct CC_String *__1k ;
-{ 
-size_t __1i ;
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__1b ;
-
-struct CC_String *__0_result ;
-
-__1i = (((*__0this -> f_hash_func_ptr__29hashTable__pt__12_9CC_Stringi ))( (struct CC_String *)__1k ) % ( ((struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi ))-> f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ) );
-
-__1b = ((*__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi ( & __0this -> f_buckets__29hashTable__pt__12_9CC_Stringi , __1i ) ));
-
-if (__1b == 0 )
-return (struct CC_String *)0 ;
-
-{ struct kv_pair__pt__12_9CC_Stringi __1key ;
-struct kv_pair__pt__12_9CC_Stringi *__1result ;
-
-( (( ((& __1key )-> f_key__27kv_pair__pt__12_9CC_Stringi = (((struct CC_String *)(((struct CC_String *)__1k ))))), ((& __1key )-> f_value__27kv_pair__pt__12_9CC_Stringi = ((int *)0 ))) ),
-(& __1key )) ;
-__1result = remove__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFPC27kv_pair__pt__12_9CC_Stringi ( __1b , (struct kv_pair__pt__12_9CC_Stringi *)(& __1key )) ;
-
-if (__1result == 0 )
-{ { __0_result = 0 ;
-
-__dt__27kv_pair__pt__12_9CC_StringiFv ( & __1key , 2) ;
-} 
-return __0_result ;
-} 
-{ struct CC_String *__1kr ;
-
-__1kr = __1result -> f_key__27kv_pair__pt__12_9CC_Stringi ;
-
-__dt__27kv_pair__pt__12_9CC_StringiFv ( __1result , 3) ;
-
-__0this -> f_items__29hashTable__pt__12_9CC_Stringi -- ;
-
-{ 
-__dt__27kv_pair__pt__12_9CC_StringiFv ( & __1key , 2) ;
-
-return __1kr ;
-} 
-}
-
-}
-}
-
-struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__ct__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFRC89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ();
-
-struct hashTable__pt__26_9CC_String13BTCollectable *__ct__43hashTable__pt__26_9CC_String13BTCollectableFRC43hashTable__pt__26_9CC_String13BTCollectable (__0this , __1h )register struct hashTable__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct hashTable__pt__26_9CC_String13BTCollectable *__1h ;
-
-{ 
-struct ostream *__0__X85 ;
-
-struct ostream *(*__2__X86 )();
-
-if (__0this || (__0this = (struct hashTable__pt__26_9CC_String13BTCollectable *)__nw__FUi ( sizeof (struct hashTable__pt__26_9CC_String13BTCollectable)) )){ ( ( __ct__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFRC89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ( & __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable ,
-(struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& ((*__1h )). f_buckets__43hashTable__pt__26_9CC_String13BTCollectable )) , (__0this -> f_hash_func_ptr__43hashTable__pt__26_9CC_String13BTCollectable = ((*__1h )). f_hash_func_ptr__43hashTable__pt__26_9CC_String13BTCollectable )) , (__0this -> f_items__43hashTable__pt__26_9CC_String13BTCollectable = ((*__1h )). f_items__43hashTable__pt__26_9CC_String13BTCollectable ))
-;
-( (__0__X85 = (struct ostream *)__ls__7ostreamFPCc ( (struct ostream *)(& cerr ), (char *)"Warning: hashTable(const hashTable&) called") ),
-( (__2__X86 = (endl__FR7ostream )), ( ((*__2__X86 ))( (struct ostream *)__0__X85 ) ) ) ) ;
-exit ( -1) ;
-} 
-return __0this ;
-}
-
-struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__ct__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUiP64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ();
-
-struct hashTable__pt__26_9CC_String13BTCollectable *__ct__43hashTable__pt__26_9CC_String13BTCollectableFPFRC9CC_String_UiUi (__0this , __1f , __1init_bucket_num )struct hashTable__pt__26_9CC_String13BTCollectable *__0this ;
-
-unsigned int (*__1f )();
-
-size_t __1init_bucket_num ;
-
-{ if (__0this || (__0this = (struct hashTable__pt__26_9CC_String13BTCollectable *)__nw__FUi ( sizeof (struct hashTable__pt__26_9CC_String13BTCollectable)) ))( ( __ct__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUiP64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ( & __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable ,
-__1init_bucket_num , (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)0 ) , (__0this -> f_hash_func_ptr__43hashTable__pt__26_9CC_String13BTCollectable = __1f )) , (__0this -> f_items__43hashTable__pt__26_9CC_String13BTCollectable = 0 )) ;
-
-return __0this ;
-}
-
-char __dt__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFv ();
-
-char __dt__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFv ();
-
-char __dt__41kv_pair__pt__26_9CC_String13BTCollectableFv ();
-
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable {   /* sizeof CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable == 12 */
-
-struct CC_Link_base *f_next__12CC_Link_base ;
-struct CC_Link_base *f_prev__12CC_Link_base ;
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ;
-};
-
-char __dt__43hashTable__pt__26_9CC_String13BTCollectableFv (__0this , __0__free )register struct hashTable__pt__26_9CC_String13BTCollectable *__0this ;
-
-int __0__free ;
-
-{ 
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__1b ;
-struct kv_pair__pt__26_9CC_String13BTCollectable *__1r ;
-
-if (__0this ){ 
-__1b = 0 ;
-__1r = 0 ;
-
-{ { int __1i ;
-
-__1i = 0 ;
-
-for(;__1i < ( ((struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable ))-> f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ) ;__1i ++ ) { 
-__1b = ((*__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi ( & __0this ->
-f_buckets__43hashTable__pt__26_9CC_String13BTCollectable , (unsigned int )__1i ) ));
-
-if (__1b ){ 
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xt00al4pcbp ;
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *__3__Xret00al4pcbp ;
-
-while (__1r = ( (__2__Xt00al4pcbp = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)removeFirst__11CC_ListbaseFv ( (struct CC_Listbase *)__1b ) ))))), (__2__Xt00al4pcbp ?( (__3__Xret00al4pcbp = __2__Xt00al4pcbp -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ),
-( __dl__FPv ( (char *)__2__Xt00al4pcbp ) , __3__Xret00al4pcbp ) ) :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) )
-__dt__41kv_pair__pt__26_9CC_String13BTCollectableFv ( __1r , 3) ;
-
-__dt__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFv ( __1b , 3) ;
-}
-}
-
-}
-
-}
-
-if (__0this ){ __dt__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFv ( & __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable , 2) ;
-
-if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} } 
-}
-
-char clearAndDestroy__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFv ();
-
-char clearAndDestroy__43hashTable__pt__26_9CC_String13BTCollectableFv (__0this )register struct hashTable__pt__26_9CC_String13BTCollectable *__0this ;
-{ 
-f_needRemove__41kv_pair__pt__26_9CC_String13BTCollectable = 1 ;
-
-{ struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__1b ;
-
-__1b = 0 ;
-
-{ { int __1i ;
-
-__1i = 0 ;
-
-for(;__1i < ( ((struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable ))-> f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ) ;__1i ++ ) { 
-__1b = ((*__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi ( & __0this ->
-f_buckets__43hashTable__pt__26_9CC_String13BTCollectable , (unsigned int )__1i ) ));
-if (__1b ){ 
-((*(((char (*)())(__1b -> __vptr__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable [1]).f))))( ((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)((((char *)__1b ))+ (__1b -> __vptr__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable [1]).d))) ;
-__dt__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFv ( __1b , 3) ;
-((*__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi ( & __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable , (unsigned int )__1i ) ))= 0 ;
-}
-}
-
-__0this -> f_items__43hashTable__pt__26_9CC_String13BTCollectable = 0 ;
-
-f_needRemove__41kv_pair__pt__26_9CC_String13BTCollectable = 0 ;
-
-}
-
-}
-
-}
-}
-
-struct BTCollectable *findValue__43hashTable__pt__26_9CC_String13BTCollectableCFPC9CC_String ();
-
-CC_Boolean contains__43hashTable__pt__26_9CC_String13BTCollectableCFPC9CC_String (__0this , __1k )struct hashTable__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct CC_String *__1k ;
-{ 
-if (findValue__43hashTable__pt__26_9CC_String13BTCollectableCFPC9CC_String ( __0this , __1k ) )
-return (unsigned int )1 ;
-else 
-return (unsigned int )0 ;
-
-}
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableCFUi ();
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *find__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableCFPC41kv_pair__pt__26_9CC_String13BTCollectable ();
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *_find__43hashTable__pt__26_9CC_String13BTCollectableCFPC9CC_String (__0this , __1k )register struct hashTable__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct CC_String *__1k ;
-{ 
-size_t __1i ;
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__1b ;
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *__0_result ;
-
-__1i = (((*__0this -> f_hash_func_ptr__43hashTable__pt__26_9CC_String13BTCollectable ))( (struct CC_String *)__1k ) % ( ((struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable ))-> f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ) );
-
-__1b = __vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableCFUi ( (struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable ), __1i ) ;
-
-if (__1b == 0 )
-return (struct kv_pair__pt__26_9CC_String13BTCollectable *)0 ;
-
-{ struct kv_pair__pt__26_9CC_String13BTCollectable __1key ;
-
-( (( ((& __1key )-> f_key__41kv_pair__pt__26_9CC_String13BTCollectable = (((struct CC_String *)(((struct CC_String *)__1k ))))), ((& __1key )-> f_value__41kv_pair__pt__26_9CC_String13BTCollectable = ((struct BTCollectable *)0 ))) ),
-(& __1key )) ;
-
-{ { __0_result = find__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableCFPC41kv_pair__pt__26_9CC_String13BTCollectable ( (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__1b , (struct kv_pair__pt__26_9CC_String13BTCollectable *)(& __1key )) ;
-
-__dt__41kv_pair__pt__26_9CC_String13BTCollectableFv ( & __1key , 2) ;
-} 
-return __0_result ;
-} 
-}
-}
-
-struct BTCollectable *findValue__43hashTable__pt__26_9CC_String13BTCollectableCFPC9CC_String (__0this , __1k )struct hashTable__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct CC_String *__1k ;
-{ 
-struct kv_pair__pt__26_9CC_String13BTCollectable *__1p ;
-
-__1p = _find__43hashTable__pt__26_9CC_String13BTCollectableCFPC9CC_String ( __0this , __1k ) ;
-if (__1p )
-return __1p -> f_value__41kv_pair__pt__26_9CC_String13BTCollectable ;
-else 
-return (struct BTCollectable *)0 ;
-}
-
-struct CC_String *findKeyAndValue__43hashTable__pt__26_9CC_String13BTCollectableCFPC9CC_StringRP13BTCollectable (__0this , __1k , __1v )register struct hashTable__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct CC_String *__1k ;
-
-struct BTCollectable **__1v ;
-{ 
-struct kv_pair__pt__26_9CC_String13BTCollectable *__1p ;
-
-__1p = _find__43hashTable__pt__26_9CC_String13BTCollectableCFPC9CC_String ( __0this , __1k ) ;
-if (__1p ){ 
-((*__1v ))= __1p -> f_value__41kv_pair__pt__26_9CC_String13BTCollectable ;
-return __1p -> f_key__41kv_pair__pt__26_9CC_String13BTCollectable ;
-}
-else return (struct CC_String *)0 ;
-}
-
-char insertKeyAndValue__43hashTable__pt__26_9CC_String13BTCollectableFP9CC_StringP13BTCollectable (__0this , __1k , __1v )register struct hashTable__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct CC_String *__1k ;
-
-struct BTCollectable *__1v ;
-{ 
-size_t __1i ;
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__1b ;
-
-__1i = (((*__0this -> f_hash_func_ptr__43hashTable__pt__26_9CC_String13BTCollectable ))( (struct CC_String *)__1k ) % ( ((struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable ))-> f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ) );
-
-__1b = ((*__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi ( & __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable , __1i ) ));
-
-if (__1b == 0 ){ 
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0__X87 ;
-
-struct CC_Listbase *__0__X65 ;
-
-((*__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi ( & __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable , __1i ) ))= ( (__0__X87 = 0 ), ( ((__0__X87 || (__0__X87 = (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__nw__FUi (
-sizeof (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable)) ))?( ( (__0__X87 = (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( (__0__X65 = (((struct CC_Listbase *)__0__X87 ))), ( ((__0__X65 || (__0__X65 = (struct
-CC_Listbase *)__nw__FUi ( sizeof (struct CC_Listbase)) ))?( ( (__0__X65 -> f_head__11CC_Listbase = 0 ), (__0__X65 -> f_tail__11CC_Listbase = 0 )) , (__0__X65 -> f_length__11CC_Listbase =
-0 )) :0 ), __0__X65 ) ) ), (__0__X87 -> __vptr__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[1])) , (__0__X87 -> destructed__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = 0 )) :0 ),
-__0__X87 ) ) ;
-}
-
-{ struct kv_pair__pt__26_9CC_String13BTCollectable *__1p ;
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0__X88 ;
-
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0__X69 ;
-
-struct CC_Link_base *__0__X64 ;
-
-struct CC_Link_base *__2__X70 ;
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *__0__X89 ;
-
-__1p = ( (__0__X89 = 0 ), ( ((__0__X89 || (__0__X89 = (struct kv_pair__pt__26_9CC_String13BTCollectable *)__nw__FUi ( sizeof (struct kv_pair__pt__26_9CC_String13BTCollectable)) ))?( (__0__X89 -> f_key__41kv_pair__pt__26_9CC_String13BTCollectable =
-__1k ), (__0__X89 -> f_value__41kv_pair__pt__26_9CC_String13BTCollectable = __1v )) :0 ), __0__X89 ) ) ;
-( (__0__X88 = ((*__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi ( & __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable , __1i ) ))), ( ( (__2__X70 = (struct CC_Link_base *)( (__0__X69 =
-0 ), ( ((__0__X69 || (__0__X69 = (struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__nw__FUi ( sizeof (struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable)) ))?( (__0__X69 = (struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( (__0__X64 = (((struct
-CC_Link_base *)__0__X69 ))), ( ((__0__X64 || (__0__X64 = (struct CC_Link_base *)__nw__FUi ( sizeof (struct CC_Link_base)) ))?( (__0__X64 -> f_next__12CC_Link_base = 0 ), (__0__X64 -> f_prev__12CC_Link_base =
-0 )) :0 ), __0__X64 ) ) ), (__0__X69 -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = __1p )) :0 ), __0__X69 ) ) ), ( insert__11CC_ListbaseFP12CC_Link_base (
-((struct CC_Listbase *)__0__X88 ), __2__X70 ) ) ) ) ) ;
-
-__0this -> f_items__43hashTable__pt__26_9CC_String13BTCollectable ++ ;
-
-}
-}
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *remove__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFPC41kv_pair__pt__26_9CC_String13BTCollectable ();
-
-struct CC_String *remove__43hashTable__pt__26_9CC_String13BTCollectableFPC9CC_String (__0this , __1k )register struct hashTable__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct CC_String *__1k ;
-{ 
-size_t __1i ;
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__1b ;
-
-struct CC_String *__0_result ;
-
-__1i = (((*__0this -> f_hash_func_ptr__43hashTable__pt__26_9CC_String13BTCollectable ))( (struct CC_String *)__1k ) % ( ((struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable ))-> f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ) );
-
-__1b = ((*__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi ( & __0this -> f_buckets__43hashTable__pt__26_9CC_String13BTCollectable , __1i ) ));
-
-if (__1b == 0 )
-return (struct CC_String *)0 ;
-
-{ struct kv_pair__pt__26_9CC_String13BTCollectable __1key ;
-struct kv_pair__pt__26_9CC_String13BTCollectable *__1result ;
-
-( (( ((& __1key )-> f_key__41kv_pair__pt__26_9CC_String13BTCollectable = (((struct CC_String *)(((struct CC_String *)__1k ))))), ((& __1key )-> f_value__41kv_pair__pt__26_9CC_String13BTCollectable = ((struct BTCollectable *)0 ))) ),
-(& __1key )) ;
-__1result = remove__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFPC41kv_pair__pt__26_9CC_String13BTCollectable ( __1b , (struct kv_pair__pt__26_9CC_String13BTCollectable *)(& __1key )) ;
-
-if (__1result == 0 )
-{ { __0_result = 0 ;
-
-__dt__41kv_pair__pt__26_9CC_String13BTCollectableFv ( & __1key , 2) ;
-} 
-return __0_result ;
-} 
-{ struct CC_String *__1kr ;
-
-__1kr = __1result -> f_key__41kv_pair__pt__26_9CC_String13BTCollectable ;
-
-__dt__41kv_pair__pt__26_9CC_String13BTCollectableFv ( __1result , 3) ;
-
-__0this -> f_items__43hashTable__pt__26_9CC_String13BTCollectable -- ;
-
-{ 
-__dt__41kv_pair__pt__26_9CC_String13BTCollectableFv ( & __1key , 2) ;
-
-return __1kr ;
-} 
-}
-
-}
-}
-
-static char __dt__9CC_StringFv (__0this , __0__free )struct CC_String *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-__0this -> __vptr__9CC_String = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[2];
-
-__dl__FPv ( (char *)__0this -> f_string__9CC_String ) ;
-
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} 
-}
-
-char __dt__27kv_pair__pt__12_9CC_StringiFv (__0this , __0__free )struct kv_pair__pt__12_9CC_Stringi *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-if (f_needRemove__27kv_pair__pt__12_9CC_Stringi == 1 ){ 
-__0this -> f_key__27kv_pair__pt__12_9CC_Stringi ?((*(((char (*)())(__0this -> f_key__27kv_pair__pt__12_9CC_Stringi -> __vptr__9CC_String [1]).f))))( ((struct CC_String *)((((char *)__0this ->
-f_key__27kv_pair__pt__12_9CC_Stringi ))+ (__0this -> f_key__27kv_pair__pt__12_9CC_Stringi -> __vptr__9CC_String [1]).d)), 3) :0 ;
-__dl__FPv ( (char *)__0this -> f_value__27kv_pair__pt__12_9CC_Stringi ) ;
-}
-
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} 
-}
-
-struct Destructable {  /* sizeof Destructable == 4 */
-
-struct __mptr *__vptr__12Destructable ;
-};
-
-extern char *g_stack_start__12Destructable ;
-
-extern unsigned short g_size__12Destructable ;
-
-struct Exception {     /* sizeof Exception == 20 */
-
-struct __mptr *__vptr__12Destructable ;
-
-unsigned int f_thrown__9Exception :1;
-unsigned int f_thrown_as_pointer__9Exception :1;
-unsigned int f_temporary__9Exception :1;
-
-char *f_file__9Exception ;
-unsigned short f_line__9Exception ;
-struct Exception *f_previous_exception__9Exception ;
-};
-extern struct Exception *g_current_exception__9Exception ;
-extern char g_temp_space__9Exception [];
-extern char *g_next_avail__9Exception ;
-
-char do_throw__9ExceptionFUiPCci ();
-
-char __dl__9ExceptionSFPv ();
-
-struct ccException {   /* sizeof ccException == 20 */
-
-struct __mptr *__vptr__12Destructable ;
-
-unsigned int f_thrown__9Exception :1;
-unsigned int f_thrown_as_pointer__9Exception :1;
-unsigned int f_temporary__9Exception :1;
-
-char *f_file__9Exception ;
-unsigned short f_line__9Exception ;
-struct Exception *f_previous_exception__9Exception ;
-};
-
-struct Unwind_Stack {  /* sizeof Unwind_Stack == 2 */
-
-unsigned short f_bottom__12Unwind_Stack ;
-};
-extern unsigned short g_top__12Unwind_Stack ;
-extern struct Unwind_Record g_stack__12Unwind_Stack [512];
-
-struct Jump_Environment {      /* sizeof Jump_Environment == 52 */
-
-struct __mptr *__vptr__12Destructable ;
-
-jmp_buf f_env__16Jump_Environment ;
-
-struct Exception *f_active_exception__16Jump_Environment ;
-struct Jump_Environment *f_next__16Jump_Environment ;
-unsigned char f_unwinding__16Jump_Environment ;
-struct Unwind_Stack f_unwind_stack__16Jump_Environment ;
-};
-
-extern struct Jump_Environment *g_jump_env_stack__16Jump_Environment ;
-extern struct Jump_Environment *g_used_jump_env_stack__16Jump_Environment ;
-
-int in_stack_set_size__12DestructableFv ();
-
-struct Unwind_Record { /* sizeof Unwind_Record == 8 */
-
-struct Destructable *f_object__13Unwind_Record ;
-unsigned short f_size__13Unwind_Record ;
-};
-enum __Q2_10Exceptions12error_type_t { INTERNAL_ERROR__Q2_10Exceptions12error_type_t = 0, APPLICATION_ERROR__Q2_10Exceptions12error_type_t = 1, THROW_MESSAGE__Q2_10Exceptions12error_type_t = 2} ;
-
-struct Exceptions {    /* sizeof Exceptions == 1 */
-
-char __W2__10Exceptions ;
-};
-
-extern  __Q2_10Exceptions15error_handler_t g_error_handler__10Exceptions ;
-
-extern char *f_msg_internal_error__10Exceptions ;
-extern char *f_msg_application_error__10Exceptions ;
-extern char *f_msg_throw_message__10Exceptions ;
-
-extern char *f_msg_not_initialized__10Exceptions ;
-extern char *f_msg_initialized_twice__10Exceptions ;
-extern char *f_msg_not_caught__10Exceptions ;
-extern char *f_msg_no_current_exception__10Exceptions ;
-extern char *f_msg_throw_from_terminate__10Exceptions ;
-extern char *f_msg_throw_from_error_handler__10Exceptions ;
-extern char *f_msg_throw_from_destructor__10Exceptions ;
-extern char *f_msg_throw_ptr_to_stack__10Exceptions ;
-
-extern char *f_msg_out_of_exception_memory__10Exceptions ;
-extern char *f_msg_out_of_obj_stack_memory__10Exceptions ;
-extern char *f_msg_memory_already_freed__10Exceptions ;
-
-char error__10ExceptionsSFPCcQ2_10Exceptions12error_type_t ();
-
-extern char terminate__Fv ();
-
-static struct Exception *__ct__9ExceptionFRC9Exception (__0this , __0__A37 )register struct Exception *__0this ;
-
-struct Exception *__0__A37 ;
-
-{ 
-struct Destructable *__0__X38 ;
-
-struct Unwind_Record *__0__X5 ;
-
-struct Unwind_Record *__0__X6 ;
-
-struct Unwind_Record *__0__X3 ;
-
-if (__0this || (__0this = (struct Exception *)( (((char *)__nw__FUi ( (sizeof (struct Exception))) ))) )){ ( ( (
-( ( ( ( (__0this = (struct Exception *)( (__0__X38 = (((struct Destructable *)__0this ))), ( ((__0__X38 || (__0__X38 = (struct
-Destructable *)__nw__FUi ( sizeof (struct Destructable)) ))?( (__0__X38 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[3]), ( (in_stack_set_size__12DestructableFv ( __0__X38 ) ?( ( (
-((( (g_top__12Unwind_Stack == ((struct Unwind_Stack *)(& g_jump_env_stack__16Jump_Environment -> f_unwind_stack__16Jump_Environment ))-> f_bottom__12Unwind_Stack )) || (( (g_size__12Destructable == 0 )) ?((((unsigned int )__0__X38 ))<
-( (__0__X6 = (struct Unwind_Record *)( (((struct Unwind_Record *)(& (g_stack__12Unwind_Stack [(g_top__12Unwind_Stack - 1 )]))))) ), ( (((unsigned int )__0__X6 -> f_object__13Unwind_Record )))
-) ):((((unsigned int )__0__X38 ))> ( (__0__X5 = (struct Unwind_Record *)( (((struct Unwind_Record *)(& (g_stack__12Unwind_Stack [(g_top__12Unwind_Stack - 1 )]))))) ), (
-((((unsigned int )__0__X5 -> f_object__13Unwind_Record ))+ __0__X5 -> f_size__13Unwind_Record )) ) )))?( ( ( ((g_top__12Unwind_Stack > 512 )?( ( error__10ExceptionsSFPCcQ2_10Exceptions12error_type_t (
-(char *)f_msg_out_of_obj_stack_memory__10Exceptions , 0) , terminate__Fv ( ) ) , 0 ) :( 0 ) ), ( (
-(__0__X3 = (& (g_stack__12Unwind_Stack [(g_top__12Unwind_Stack ++ )]))), ( ( (__0__X3 -> f_object__13Unwind_Record = __0__X38 ), (__0__X3 -> f_size__13Unwind_Record = ((unsigned int )g_size__12Destructable )))
-, (((char )0 ))) ) ) ) ) , 0 ) :( 0 ) )) ) ,
-0 ) :( 0 ) ), 0 ) ) :0 ), __0__X38 ) ) ), (__0this -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]))
-, (__0this -> f_thrown__9Exception = ((*__0__A37 )). f_thrown__9Exception )) , (__0this -> f_thrown_as_pointer__9Exception = ((*__0__A37 )). f_thrown_as_pointer__9Exception )) , (__0this -> f_temporary__9Exception = ((*__0__A37 )).
-f_temporary__9Exception )) , (__0this -> f_file__9Exception = ((*__0__A37 )). f_file__9Exception )) , (__0this -> f_line__9Exception = ((*__0__A37 )). f_line__9Exception )) , (__0this -> f_previous_exception__9Exception =
-((*__0__A37 )). f_previous_exception__9Exception )) ;
-
-;
-} 
-return __0this ;
-
-}
-
-struct ccStringException {     /* sizeof ccStringException == 24 */
-
-struct __mptr *__vptr__12Destructable ;
-
-unsigned int f_thrown__9Exception :1;
-unsigned int f_thrown_as_pointer__9Exception :1;
-unsigned int f_temporary__9Exception :1;
-
-char *f_file__9Exception ;
-unsigned short f_line__9Exception ;
-struct Exception *f_previous_exception__9Exception ;
-
-char *msg__17ccStringException ;
-};
-
-int in_stack__12DestructableFv ();
-
-char *__nw__9ExceptionSFUii ();
-
-static char __dt__12DestructableFv (__0this , __0__free )struct Destructable *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-__0this -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[3];
-
-if (in_stack__12DestructableFv ( __0this ) )
-( ( (((! ( (g_top__12Unwind_Stack == ((struct Unwind_Stack *)(& g_jump_env_stack__16Jump_Environment -> f_unwind_stack__16Jump_Environment ))-> f_bottom__12Unwind_Stack )) )&&
-(((*( (((struct Unwind_Record *)(& (g_stack__12Unwind_Stack [(g_top__12Unwind_Stack - 1 )]))))) )). f_object__13Unwind_Record == __0this ))?( ( ( ( (g_top__12Unwind_Stack -- ), 0 )
-, (((char )0 ))) ) , 0 ) :( 0 ) )) ) ;
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} 
-}
-
-static char __dt__9ExceptionFv (__0this , __0__free )struct Exception *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ __0this -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4];
-
-if (__0this ){ __dt__12DestructableFv ( ((struct Destructable *)__0this ), 0 ) ;
-
-if (__0__free & 1)__dl__9ExceptionSFPv ( (char *)__0this ) ;
-} } 
-}
-
-static char __dt__11ccExceptionFv (__0this , __0__free )struct ccException *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-__0this -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5];
-
-if (__0this ){ ( ((((struct Exception *)__0this ))?( ( ((((struct Exception *)__0this ))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)__0this ))?( (
-__dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)__0this ))), 0 ) , (( 0 ) )) , 0 ) :( 0 ) ))
-, 0 ) :( 0 ) )) ;
-
-if (__0__free & 1)__dl__9ExceptionSFPv ( (char *)__0this ) ;
-} } 
-}
-
-static char __dt__17ccStringExceptionFv (__0this , __0__free )struct ccStringException *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-__0this -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[6];
-
-if (__0this ){ ( ((((struct ccException *)__0this ))?( ( ((((struct ccException *)__0this ))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)__0this ))?( (
-( ((((struct Exception *)(((struct ccException *)__0this ))))?( ( ((((struct Exception *)(((struct ccException *)__0this ))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)__0this ))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)__0this ))))), 0 ) , (( 0 ) )) , 0 ) :(
-0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 ) :(
-0 ) )) , 0 ) :( 0 ) )) ;
-
-if (__0__free & 1)__dl__9ExceptionSFPv ( (char *)__0this ) ;
-} } 
-}
-
-struct Exception *__ct__9ExceptionFv ();
-
-static char *__opPCc__9CC_StringCFv ();
-
-int compareTo__9CC_StringCFPCcQ2_9CC_String11caseCompare ();
-
-unsigned int __eq__27kv_pair__pt__12_9CC_StringiFRC27kv_pair__pt__12_9CC_Stringi (__0this , __1kv )register struct kv_pair__pt__12_9CC_Stringi *__0this ;
-
-struct kv_pair__pt__12_9CC_Stringi *__1kv ;
-{ 
-struct ccException *__0__X44 ;
-
-register struct ccStringException *__0__X91 ;
-
-register struct ccStringException *__0__X92 ;
-
-struct Exception *__2__Xtemp002sf3bmd ;
-
-struct ccStringException *__0__X43 ;
-
-struct ccException *__0__X42 ;
-
-struct CC_String *__0__X93 ;
-
-if ((__0this -> f_key__27kv_pair__pt__12_9CC_Stringi == 0 )|| (((*__1kv )). f_key__27kv_pair__pt__12_9CC_Stringi == 0 )){ 
-{ 
-struct ccStringException __0__V90 ;
-
-( (__0__X92 = ( (__0__X91 = ( ( (( ( (( (__0__X44 = (((struct ccException *)(& __0__V90 )))), (
-((__0__X44 || (__0__X44 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X44 = (struct ccException *)__ct__9ExceptionFv ( ((struct
-Exception *)__0__X44 )) ), (__0__X44 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X44 ) ) ), ((& __0__V90 )-> __vptr__12Destructable = (struct
-__mptr *) __ptbl_vec__TKTemplate_cc_[6])) , ((& __0__V90 )-> msg__17ccStringException = ((char *)"kv_pair::operator==(): null pointer(s)."))) ), (& __0__V90 ))
-, (& __0__V90 )) ), ( ((! __0__X91 -> f_thrown__9Exception )?( (__0__X91 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X91 )
-) ), ( (in_stack__12DestructableFv ( (struct Destructable *)__0__X92 ) ?( (__2__Xtemp002sf3bmd = (struct Exception *)( (__0__X43 = (struct ccStringException *)__nw__9ExceptionSFUii ( sizeof
-(struct ccStringException ), 0 ) ), ( ((__0__X43 || (__0__X43 = (struct ccStringException *)( (((char *)__nw__FUi ( (sizeof (struct ccStringException))) )))
-))?( ( ( (__0__X43 = (struct ccStringException *)( (__0__X42 = (((struct ccException *)__0__X43 ))), ( ((__0__X42 || (__0__X42 = (struct ccException *)(
-(((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( ( (__0__X42 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X42 ), (struct Exception *)(((struct
-Exception *)(((struct Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct ccStringException *)__0__X92 ))))))))))))) ), (__0__X42 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ),
-__0__X42 ) ) ), (__0__X43 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[6])) , (__0__X43 -> msg__17ccStringException = ((*((struct ccStringException *)__0__X92 ))). msg__17ccStringException )) ,
-0 ) :0 ), __0__X43 ) ) ), (((struct Exception *)((((struct ccStringException *)(((struct ccStringException *)__2__Xtemp002sf3bmd ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp002sf3bmd = (struct Exception *)__0__X92 )),
-do_throw__9ExceptionFUiPCci ( __2__Xtemp002sf3bmd , ((unsigned int )28 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/cc_hdict.cc"), 0 ) ) )
-;
-
-( (( ( ((& __0__V90 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[6]), (( ( ( ((((struct ccException *)(& __0__V90 )))?(
-( ((((struct ccException *)(& __0__V90 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V90 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V90 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V90 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V90 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V90 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} } 
-return (unsigned int )(( (__0__X93 = __0this -> f_key__27kv_pair__pt__12_9CC_Stringi ), ( (((unsigned int )((( compareTo__9CC_StringCFPCcQ2_9CC_String11caseCompare (
-((struct CC_String *)__0__X93 ), __opPCc__9CC_StringCFv ( (struct CC_String *)((struct CC_String *)((*__1kv )). f_key__27kv_pair__pt__12_9CC_Stringi )) , ((int )0)) ) == 0 )?1 :0 )))) )
-?1 :0 );
-}
-
-CC_Boolean f_needRemove__27kv_pair__pt__12_9CC_Stringi = 0 ;
-
-struct BTCollectable { /* sizeof BTCollectable == 12 */
-
-char *f_name__13BTCollectable ;
-int line_num__13BTCollectable ;
-char *value__13BTCollectable ;
-};
-
-char __dt__13BTCollectableFv ();
-
-char __dt__41kv_pair__pt__26_9CC_String13BTCollectableFv (__0this , __0__free )struct kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-if (f_needRemove__41kv_pair__pt__26_9CC_String13BTCollectable == 1 ){ 
-__0this -> f_key__41kv_pair__pt__26_9CC_String13BTCollectable ?((*(((char (*)())(__0this -> f_key__41kv_pair__pt__26_9CC_String13BTCollectable -> __vptr__9CC_String [1]).f))))( ((struct CC_String *)((((char *)__0this ->
-f_key__41kv_pair__pt__26_9CC_String13BTCollectable ))+ (__0this -> f_key__41kv_pair__pt__26_9CC_String13BTCollectable -> __vptr__9CC_String [1]).d)), 3) :0 ;
-__dt__13BTCollectableFv ( __0this -> f_value__41kv_pair__pt__26_9CC_String13BTCollectable , 3) ;
-}
-
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} 
-}
-
-static char *__opPCc__9CC_StringCFv ();
-
-unsigned int __eq__41kv_pair__pt__26_9CC_String13BTCollectableFRC41kv_pair__pt__26_9CC_String13BTCollectable (__0this , __1kv )register struct kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *__1kv ;
-{ 
-struct ccException *__0__X44 ;
-
-register struct ccStringException *__0__X95 ;
-
-register struct ccStringException *__0__X96 ;
-
-struct Exception *__2__Xtemp002sf3bmd ;
-
-struct ccStringException *__0__X43 ;
-
-struct ccException *__0__X42 ;
-
-struct CC_String *__0__X97 ;
-
-if ((__0this -> f_key__41kv_pair__pt__26_9CC_String13BTCollectable == 0 )|| (((*__1kv )). f_key__41kv_pair__pt__26_9CC_String13BTCollectable == 0 )){ 
-{ 
-struct ccStringException __0__V94 ;
-
-( (__0__X96 = ( (__0__X95 = ( ( (( ( (( (__0__X44 = (((struct ccException *)(& __0__V94 )))), (
-((__0__X44 || (__0__X44 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X44 = (struct ccException *)__ct__9ExceptionFv ( ((struct
-Exception *)__0__X44 )) ), (__0__X44 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X44 ) ) ), ((& __0__V94 )-> __vptr__12Destructable = (struct
-__mptr *) __ptbl_vec__TKTemplate_cc_[6])) , ((& __0__V94 )-> msg__17ccStringException = ((char *)"kv_pair::operator==(): null pointer(s)."))) ), (& __0__V94 ))
-, (& __0__V94 )) ), ( ((! __0__X95 -> f_thrown__9Exception )?( (__0__X95 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X95 )
-) ), ( (in_stack__12DestructableFv ( (struct Destructable *)__0__X96 ) ?( (__2__Xtemp002sf3bmd = (struct Exception *)( (__0__X43 = (struct ccStringException *)__nw__9ExceptionSFUii ( sizeof
-(struct ccStringException ), 0 ) ), ( ((__0__X43 || (__0__X43 = (struct ccStringException *)( (((char *)__nw__FUi ( (sizeof (struct ccStringException))) )))
-))?( ( ( (__0__X43 = (struct ccStringException *)( (__0__X42 = (((struct ccException *)__0__X43 ))), ( ((__0__X42 || (__0__X42 = (struct ccException *)(
-(((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( ( (__0__X42 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X42 ), (struct Exception *)(((struct
-Exception *)(((struct Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct ccStringException *)__0__X96 ))))))))))))) ), (__0__X42 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ),
-__0__X42 ) ) ), (__0__X43 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[6])) , (__0__X43 -> msg__17ccStringException = ((*((struct ccStringException *)__0__X96 ))). msg__17ccStringException )) ,
-0 ) :0 ), __0__X43 ) ) ), (((struct Exception *)((((struct ccStringException *)(((struct ccStringException *)__2__Xtemp002sf3bmd ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp002sf3bmd = (struct Exception *)__0__X96 )),
-do_throw__9ExceptionFUiPCci ( __2__Xtemp002sf3bmd , ((unsigned int )28 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/cc_hdict.cc"), 0 ) ) )
-;
-
-( (( ( ((& __0__V94 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[6]), (( ( ( ((((struct ccException *)(& __0__V94 )))?(
-( ((((struct ccException *)(& __0__V94 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V94 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V94 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V94 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V94 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V94 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} } 
-return (unsigned int )(( (__0__X97 = __0this -> f_key__41kv_pair__pt__26_9CC_String13BTCollectable ), ( (((unsigned int )((( compareTo__9CC_StringCFPCcQ2_9CC_String11caseCompare (
-((struct CC_String *)__0__X97 ), __opPCc__9CC_StringCFv ( (struct CC_String *)((struct CC_String *)((*__1kv )). f_key__41kv_pair__pt__26_9CC_String13BTCollectable )) , ((int )0)) ) == 0 )?1 :0 )))) )
-?1 :0 );
-}
-
-CC_Boolean f_needRemove__41kv_pair__pt__26_9CC_String13BTCollectable = 0 ;
-
-struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__ct__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFRC75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi (__0this , __1pv )register struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__1pv ;
-
-{ 
-unsigned int __0__A98 ;
-
-if (__0this || (__0this = (struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__nw__FUi ( sizeof (struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi)) )){ ( ( (__0this -> f_array__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi **)(((struct
-CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi **)__nw__FUi ( (sizeof (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *))* (__0__A98 = ((*__1pv )). f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi )) ))), (__0this -> f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = ((*__1pv )). f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi )) , (__0this ->
-f_items__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = ((*__1pv )). f_items__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi )) ;
-{ { int __1i ;
-
-struct ostream *__0__X99 ;
-
-struct ostream *(*__2__X100 )();
-
-__1i = 0 ;
-
-for(;__1i < ((*__1pv )). f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ;__1i ++ ) 
-(__0this -> f_array__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi [__1i ])= (((*__1pv )). f_array__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi [__1i ]);
-
-( (__0__X99 = (struct ostream *)__ls__7ostreamFPCc ( (struct ostream *)(& cerr ), (char *)"Warning: pointer_vector(const pointer_vector&) called") ),
-( (__2__X100 = (endl__FR7ostream )), ( ((*__2__X100 ))( (struct ostream *)__0__X99 ) ) ) ) ;
-exit ( -1) ;
-
-}
-
-}
-} 
-return __0this ;
-
-}
-
-struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__ct__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUiP50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi (__0this , __1n , __1t )struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-size_t __1n ;
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__1t ;
-
-{ 
-unsigned int __0__A101 ;
-
-if (__0this || (__0this = (struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__nw__FUi ( sizeof (struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi)) )){ ( ( (__0this -> f_array__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi **)(((struct
-CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi **)__nw__FUi ( (sizeof (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *))* (__0__A101 = __1n )) ))), (__0this -> f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = __1n )) , (__0this -> f_items__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = 0 ))
-;
-{ { int __1i ;
-
-__1i = 0 ;
-
-for(;__1i < __0this -> f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ;__1i ++ ) 
-(__0this -> f_array__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi [__1i ])= __1t ;
-
-}
-
-}
-} 
-return __0this ;
-
-}
-
-char __dt__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFv (__0this , __0__free )struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-__dl__FPv ( (char *)__0this -> f_array__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ) ;
-
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} 
-}
-
-struct ccBoundaryException {   /* sizeof ccBoundaryException == 32 */
-
-struct __mptr *__vptr__12Destructable ;
-
-unsigned int f_thrown__9Exception :1;
-unsigned int f_thrown_as_pointer__9Exception :1;
-unsigned int f_temporary__9Exception :1;
-
-char *f_file__9Exception ;
-unsigned short f_line__9Exception ;
-struct Exception *f_previous_exception__9Exception ;
-
-int low__19ccBoundaryException ;
-int high__19ccBoundaryException ;
-int index__19ccBoundaryException ;
-};
-
-static char __dt__19ccBoundaryExceptionFv (__0this , __0__free )struct ccBoundaryException *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-__0this -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7];
-
-if (__0this ){ ( ((((struct ccException *)__0this ))?( ( ((((struct ccException *)__0this ))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)__0this ))?( (
-( ((((struct Exception *)(((struct ccException *)__0this ))))?( ( ((((struct Exception *)(((struct ccException *)__0this ))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)__0this ))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)__0this ))))), 0 ) , (( 0 ) )) , 0 ) :(
-0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 ) :(
-0 ) )) , 0 ) :( 0 ) )) ;
-
-if (__0__free & 1)__dl__9ExceptionSFPv ( (char *)__0this ) ;
-} } 
-}
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiCFUi (__0this , __1i )register struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-size_t __1i ;
-{ 
-struct ccException *__0__X49 ;
-
-register struct ccBoundaryException *__0__X103 ;
-
-register struct ccBoundaryException *__0__X104 ;
-
-struct Exception *__2__Xtemp00ere3blb ;
-
-register struct ccBoundaryException *__0__X48 ;
-
-struct ccException *__0__X47 ;
-
-if ((__1i < 0 )|| (__1i >= __0this -> f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi )){ 
-{ 
-struct ccBoundaryException __0__V102 ;
-
-( (__0__X104 = ( (__0__X103 = ( ( (( ( ( ( (( (__0__X49 = (((struct ccException *)(&
-__0__V102 )))), ( ((__0__X49 || (__0__X49 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X49 = (struct
-ccException *)__ct__9ExceptionFv ( ((struct Exception *)__0__X49 )) ), (__0__X49 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X49 ) ) ), ((& __0__V102 )->
-__vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , ((& __0__V102 )-> low__19ccBoundaryException = 0 )) , ((& __0__V102 )-> high__19ccBoundaryException = ((int )(__0this ->
-f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi - 1 )))) , ((& __0__V102 )-> index__19ccBoundaryException = ((int )__1i ))) ), (& __0__V102 )) , (& __0__V102 ))
-), ( ((! __0__X103 -> f_thrown__9Exception )?( (__0__X103 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X103 ) ) ), (
-(in_stack__12DestructableFv ( (struct Destructable *)__0__X104 ) ?( (__2__Xtemp00ere3blb = (struct Exception *)( (__0__X48 = (struct ccBoundaryException *)__nw__9ExceptionSFUii ( sizeof (struct ccBoundaryException ), 0 )
-), ( ((__0__X48 || (__0__X48 = (struct ccBoundaryException *)( (((char *)__nw__FUi ( (sizeof (struct ccBoundaryException))) ))) ))?( ( (
-( ( (__0__X48 = (struct ccBoundaryException *)( (__0__X47 = (((struct ccException *)__0__X48 ))), ( ((__0__X47 || (__0__X47 = (struct ccException *)( (((char
-*)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( ( (__0__X47 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X47 ), (struct Exception *)(((struct Exception *)(((struct
-Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct ccBoundaryException *)__0__X104 ))))))))))))) ), (__0__X47 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ), __0__X47 )
-) ), (__0__X48 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , (__0__X48 -> low__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X104 ))). low__19ccBoundaryException )) , (__0__X48 ->
-high__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X104 ))). high__19ccBoundaryException )) , (__0__X48 -> index__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X104 ))). index__19ccBoundaryException )) , 0 ) :0 ), __0__X48 )
-) ), (((struct Exception *)((((struct ccBoundaryException *)(((struct ccBoundaryException *)__2__Xtemp00ere3blb ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp00ere3blb = (struct Exception *)__0__X104 )), do_throw__9ExceptionFUiPCci ( __2__Xtemp00ere3blb , ((unsigned
-int )33 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/cc_pvect.cc"), 0 ) ) ) ;
-
-( (( ( ((& __0__V102 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7]), (( ( ( ((((struct ccException *)(& __0__V102 )))?(
-( ((((struct ccException *)(& __0__V102 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V102 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V102 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V102 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V102 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V102 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} } else 
-return (__0this -> f_array__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi [__1i ]);
-}
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi **__vc__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi (__0this , __1i )register struct pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-size_t __1i ;
-{ 
-struct ccException *__0__X49 ;
-
-register struct ccBoundaryException *__0__X106 ;
-
-register struct ccBoundaryException *__0__X107 ;
-
-struct Exception *__2__Xtemp00ere3blb ;
-
-register struct ccBoundaryException *__0__X48 ;
-
-struct ccException *__0__X47 ;
-
-if ((__1i < 0 )|| (__1i >= __0this -> f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi )){ 
-{ 
-struct ccBoundaryException __0__V105 ;
-
-( (__0__X107 = ( (__0__X106 = ( ( (( ( ( ( (( (__0__X49 = (((struct ccException *)(&
-__0__V105 )))), ( ((__0__X49 || (__0__X49 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X49 = (struct
-ccException *)__ct__9ExceptionFv ( ((struct Exception *)__0__X49 )) ), (__0__X49 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X49 ) ) ), ((& __0__V105 )->
-__vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , ((& __0__V105 )-> low__19ccBoundaryException = 0 )) , ((& __0__V105 )-> high__19ccBoundaryException = ((int )(__0this ->
-f_size__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi - 1 )))) , ((& __0__V105 )-> index__19ccBoundaryException = ((int )__1i ))) ), (& __0__V105 )) , (& __0__V105 ))
-), ( ((! __0__X106 -> f_thrown__9Exception )?( (__0__X106 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X106 ) ) ), (
-(in_stack__12DestructableFv ( (struct Destructable *)__0__X107 ) ?( (__2__Xtemp00ere3blb = (struct Exception *)( (__0__X48 = (struct ccBoundaryException *)__nw__9ExceptionSFUii ( sizeof (struct ccBoundaryException ), 0 )
-), ( ((__0__X48 || (__0__X48 = (struct ccBoundaryException *)( (((char *)__nw__FUi ( (sizeof (struct ccBoundaryException))) ))) ))?( ( (
-( ( (__0__X48 = (struct ccBoundaryException *)( (__0__X47 = (((struct ccException *)__0__X48 ))), ( ((__0__X47 || (__0__X47 = (struct ccException *)( (((char
-*)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( ( (__0__X47 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X47 ), (struct Exception *)(((struct Exception *)(((struct
-Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct ccBoundaryException *)__0__X107 ))))))))))))) ), (__0__X47 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ), __0__X47 )
-) ), (__0__X48 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , (__0__X48 -> low__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X107 ))). low__19ccBoundaryException )) , (__0__X48 ->
-high__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X107 ))). high__19ccBoundaryException )) , (__0__X48 -> index__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X107 ))). index__19ccBoundaryException )) , 0 ) :0 ), __0__X48 )
-) ), (((struct Exception *)((((struct ccBoundaryException *)(((struct ccBoundaryException *)__2__Xtemp00ere3blb ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp00ere3blb = (struct Exception *)__0__X107 )), do_throw__9ExceptionFUiPCci ( __2__Xtemp00ere3blb , ((unsigned
-int )42 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/cc_pvect.cc"), 0 ) ) ) ;
-
-( (( ( ((& __0__V105 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7]), (( ( ( ((((struct ccException *)(& __0__V105 )))?(
-( ((((struct ccException *)(& __0__V105 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V105 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V105 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V105 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V105 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V105 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} } else 
-return (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi **)(& (__0this -> f_array__75pointer_vector__pt__53_50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi [__1i ]));
-}
-
-struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__ct__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFRC89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable (__0this , __1pv )register struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__1pv ;
-
-{ 
-unsigned int __0__A108 ;
-
-if (__0this || (__0this = (struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__nw__FUi ( sizeof (struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable)) )){ ( ( (__0this -> f_array__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable **)(((struct
-CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable **)__nw__FUi ( (sizeof (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *))* (__0__A108 = ((*__1pv )). f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable )) ))), (__0this -> f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = ((*__1pv )). f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable )) , (__0this ->
-f_items__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = ((*__1pv )). f_items__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable )) ;
-{ { int __1i ;
-
-struct ostream *__0__X109 ;
-
-struct ostream *(*__2__X110 )();
-
-__1i = 0 ;
-
-for(;__1i < ((*__1pv )). f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ;__1i ++ ) 
-(__0this -> f_array__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable [__1i ])= (((*__1pv )). f_array__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable [__1i ]);
-
-( (__0__X109 = (struct ostream *)__ls__7ostreamFPCc ( (struct ostream *)(& cerr ), (char *)"Warning: pointer_vector(const pointer_vector&) called") ),
-( (__2__X110 = (endl__FR7ostream )), ( ((*__2__X110 ))( (struct ostream *)__0__X109 ) ) ) ) ;
-exit ( -1) ;
-
-}
-
-}
-} 
-return __0this ;
-
-}
-
-struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__ct__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUiP64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable (__0this , __1n , __1t )struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-size_t __1n ;
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__1t ;
-
-{ 
-unsigned int __0__A111 ;
-
-if (__0this || (__0this = (struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__nw__FUi ( sizeof (struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable)) )){ ( ( (__0this -> f_array__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable **)(((struct
-CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable **)__nw__FUi ( (sizeof (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *))* (__0__A111 = __1n )) ))), (__0this -> f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = __1n )) , (__0this -> f_items__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = 0 ))
-;
-{ { int __1i ;
-
-__1i = 0 ;
-
-for(;__1i < __0this -> f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ;__1i ++ ) 
-(__0this -> f_array__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable [__1i ])= __1t ;
-
-}
-
-}
-} 
-return __0this ;
-
-}
-
-char __dt__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFv (__0this , __0__free )struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-__dl__FPv ( (char *)__0this -> f_array__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ) ;
-
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} 
-}
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableCFUi (__0this , __1i )register struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-size_t __1i ;
-{ 
-struct ccException *__0__X49 ;
-
-register struct ccBoundaryException *__0__X113 ;
-
-register struct ccBoundaryException *__0__X114 ;
-
-struct Exception *__2__Xtemp00ere3blb ;
-
-register struct ccBoundaryException *__0__X48 ;
-
-struct ccException *__0__X47 ;
-
-if ((__1i < 0 )|| (__1i >= __0this -> f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable )){ 
-{ 
-struct ccBoundaryException __0__V112 ;
-
-( (__0__X114 = ( (__0__X113 = ( ( (( ( ( ( (( (__0__X49 = (((struct ccException *)(&
-__0__V112 )))), ( ((__0__X49 || (__0__X49 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X49 = (struct
-ccException *)__ct__9ExceptionFv ( ((struct Exception *)__0__X49 )) ), (__0__X49 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X49 ) ) ), ((& __0__V112 )->
-__vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , ((& __0__V112 )-> low__19ccBoundaryException = 0 )) , ((& __0__V112 )-> high__19ccBoundaryException = ((int )(__0this ->
-f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable - 1 )))) , ((& __0__V112 )-> index__19ccBoundaryException = ((int )__1i ))) ), (& __0__V112 )) , (& __0__V112 ))
-), ( ((! __0__X113 -> f_thrown__9Exception )?( (__0__X113 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X113 ) ) ), (
-(in_stack__12DestructableFv ( (struct Destructable *)__0__X114 ) ?( (__2__Xtemp00ere3blb = (struct Exception *)( (__0__X48 = (struct ccBoundaryException *)__nw__9ExceptionSFUii ( sizeof (struct ccBoundaryException ), 0 )
-), ( ((__0__X48 || (__0__X48 = (struct ccBoundaryException *)( (((char *)__nw__FUi ( (sizeof (struct ccBoundaryException))) ))) ))?( ( (
-( ( (__0__X48 = (struct ccBoundaryException *)( (__0__X47 = (((struct ccException *)__0__X48 ))), ( ((__0__X47 || (__0__X47 = (struct ccException *)( (((char
-*)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( ( (__0__X47 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X47 ), (struct Exception *)(((struct Exception *)(((struct
-Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct ccBoundaryException *)__0__X114 ))))))))))))) ), (__0__X47 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ), __0__X47 )
-) ), (__0__X48 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , (__0__X48 -> low__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X114 ))). low__19ccBoundaryException )) , (__0__X48 ->
-high__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X114 ))). high__19ccBoundaryException )) , (__0__X48 -> index__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X114 ))). index__19ccBoundaryException )) , 0 ) :0 ), __0__X48 )
-) ), (((struct Exception *)((((struct ccBoundaryException *)(((struct ccBoundaryException *)__2__Xtemp00ere3blb ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp00ere3blb = (struct Exception *)__0__X114 )), do_throw__9ExceptionFUiPCci ( __2__Xtemp00ere3blb , ((unsigned
-int )33 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/cc_pvect.cc"), 0 ) ) ) ;
-
-( (( ( ((& __0__V112 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7]), (( ( ( ((((struct ccException *)(& __0__V112 )))?(
-( ((((struct ccException *)(& __0__V112 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V112 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V112 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V112 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V112 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V112 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} } else 
-return (__0this -> f_array__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable [__1i ]);
-}
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable **__vc__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi (__0this , __1i )register struct pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-size_t __1i ;
-{ 
-struct ccException *__0__X49 ;
-
-register struct ccBoundaryException *__0__X116 ;
-
-register struct ccBoundaryException *__0__X117 ;
-
-struct Exception *__2__Xtemp00ere3blb ;
-
-register struct ccBoundaryException *__0__X48 ;
-
-struct ccException *__0__X47 ;
-
-if ((__1i < 0 )|| (__1i >= __0this -> f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable )){ 
-{ 
-struct ccBoundaryException __0__V115 ;
-
-( (__0__X117 = ( (__0__X116 = ( ( (( ( ( ( (( (__0__X49 = (((struct ccException *)(&
-__0__V115 )))), ( ((__0__X49 || (__0__X49 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X49 = (struct
-ccException *)__ct__9ExceptionFv ( ((struct Exception *)__0__X49 )) ), (__0__X49 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X49 ) ) ), ((& __0__V115 )->
-__vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , ((& __0__V115 )-> low__19ccBoundaryException = 0 )) , ((& __0__V115 )-> high__19ccBoundaryException = ((int )(__0this ->
-f_size__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable - 1 )))) , ((& __0__V115 )-> index__19ccBoundaryException = ((int )__1i ))) ), (& __0__V115 )) , (& __0__V115 ))
-), ( ((! __0__X116 -> f_thrown__9Exception )?( (__0__X116 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X116 ) ) ), (
-(in_stack__12DestructableFv ( (struct Destructable *)__0__X117 ) ?( (__2__Xtemp00ere3blb = (struct Exception *)( (__0__X48 = (struct ccBoundaryException *)__nw__9ExceptionSFUii ( sizeof (struct ccBoundaryException ), 0 )
-), ( ((__0__X48 || (__0__X48 = (struct ccBoundaryException *)( (((char *)__nw__FUi ( (sizeof (struct ccBoundaryException))) ))) ))?( ( (
-( ( (__0__X48 = (struct ccBoundaryException *)( (__0__X47 = (((struct ccException *)__0__X48 ))), ( ((__0__X47 || (__0__X47 = (struct ccException *)( (((char
-*)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( ( (__0__X47 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X47 ), (struct Exception *)(((struct Exception *)(((struct
-Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct ccBoundaryException *)__0__X117 ))))))))))))) ), (__0__X47 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ), __0__X47 )
-) ), (__0__X48 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , (__0__X48 -> low__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X117 ))). low__19ccBoundaryException )) , (__0__X48 ->
-high__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X117 ))). high__19ccBoundaryException )) , (__0__X48 -> index__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X117 ))). index__19ccBoundaryException )) , 0 ) :0 ), __0__X48 )
-) ), (((struct Exception *)((((struct ccBoundaryException *)(((struct ccBoundaryException *)__2__Xtemp00ere3blb ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp00ere3blb = (struct Exception *)__0__X117 )), do_throw__9ExceptionFUiPCci ( __2__Xtemp00ere3blb , ((unsigned
-int )42 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/cc_pvect.cc"), 0 ) ) ) ;
-
-( (( ( ((& __0__V115 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7]), (( ( ( ((((struct ccException *)(& __0__V115 )))?(
-( ((((struct ccException *)(& __0__V115 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V115 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V115 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V115 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V115 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V115 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} } else 
-return (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable **)(& (__0this -> f_array__89pointer_vector__pt__67_64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable [__1i ]));
-}
-
-struct CC_TValSlist__pt__2_i { /* sizeof CC_TValSlist__pt__2_i == 12 */
-
-struct CC_Link_base *f_head__11CC_Listbase ;
-struct CC_Link_base *f_tail__11CC_Listbase ;
-size_t f_length__11CC_Listbase ;
-};
-
-struct Stack__pt__2_i {        /* sizeof Stack__pt__2_i == 8 */
-
-struct __mptr *__vptr__12Destructable ;
-
-struct CC_TValSlist__pt__2_i *Items__14Stack__pt__2_i ;
-};
-
-struct Stack__pt__2_i *__ct__14Stack__pt__2_iFv (__0this )register struct Stack__pt__2_i *__0this ;
-{ 
-struct Destructable *__0__X118 ;
-
-struct Unwind_Record *__0__X5 ;
-
-struct Unwind_Record *__0__X6 ;
-
-struct Unwind_Record *__0__X3 ;
-
-struct CC_TValSlist__pt__2_i *__0__X119 ;
-
-struct CC_Listbase *__0__X52 ;
-
-if (__0this || (__0this = (struct Stack__pt__2_i *)__nw__FUi ( sizeof (struct Stack__pt__2_i)) )){ ( (__0this = (struct Stack__pt__2_i *)( (__0__X118 = (((struct
-Destructable *)__0this ))), ( ((__0__X118 || (__0__X118 = (struct Destructable *)__nw__FUi ( sizeof (struct Destructable)) ))?( (__0__X118 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[3]), (
-(in_stack_set_size__12DestructableFv ( __0__X118 ) ?( ( ( ((( (g_top__12Unwind_Stack == ((struct Unwind_Stack *)(& g_jump_env_stack__16Jump_Environment -> f_unwind_stack__16Jump_Environment ))-> f_bottom__12Unwind_Stack )) || ((
-(g_size__12Destructable == 0 )) ?((((unsigned int )__0__X118 ))< ( (__0__X6 = (struct Unwind_Record *)( (((struct Unwind_Record *)(& (g_stack__12Unwind_Stack [(g_top__12Unwind_Stack - 1 )]))))) ),
-( (((unsigned int )__0__X6 -> f_object__13Unwind_Record ))) ) ):((((unsigned int )__0__X118 ))> ( (__0__X5 = (struct Unwind_Record *)( (((struct
-Unwind_Record *)(& (g_stack__12Unwind_Stack [(g_top__12Unwind_Stack - 1 )]))))) ), ( ((((unsigned int )__0__X5 -> f_object__13Unwind_Record ))+ __0__X5 -> f_size__13Unwind_Record )) ) )))?( (
-( ((g_top__12Unwind_Stack > 512 )?( ( error__10ExceptionsSFPCcQ2_10Exceptions12error_type_t ( (char *)f_msg_out_of_obj_stack_memory__10Exceptions , 0) , terminate__Fv ( ) ) , 0 )
-:( 0 ) ), ( ( (__0__X3 = (& (g_stack__12Unwind_Stack [(g_top__12Unwind_Stack ++ )]))), ( ( (__0__X3 -> f_object__13Unwind_Record = __0__X118 ),
-(__0__X3 -> f_size__13Unwind_Record = ((unsigned int )g_size__12Destructable ))) , (((char )0 ))) ) ) ) ) , 0 )
-:( 0 ) )) ) , 0 ) :( 0 ) ), 0 ) ) :0 ), __0__X118 ) )
-), (__0this -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[8])) ;
-__0this -> Items__14Stack__pt__2_i = ( (__0__X119 = 0 ), ( ((__0__X119 || (__0__X119 = (struct CC_TValSlist__pt__2_i *)__nw__FUi ( sizeof (struct CC_TValSlist__pt__2_i)) ))?(__0__X119 = (struct
-CC_TValSlist__pt__2_i *)( (__0__X52 = (((struct CC_Listbase *)__0__X119 ))), ( ((__0__X52 || (__0__X52 = (struct CC_Listbase *)__nw__FUi ( sizeof (struct CC_Listbase)) ))?( ( (__0__X52 ->
-f_head__11CC_Listbase = 0 ), (__0__X52 -> f_tail__11CC_Listbase = 0 )) , (__0__X52 -> f_length__11CC_Listbase = 0 )) :0 ), __0__X52 ) ) ):0 ), __0__X119 )
-) ;
-} 
-return __0this ;
-}
-
-char __dt__21CC_TValSlist__pt__2_iFv ();
-
-char __dt__14Stack__pt__2_iFv (__0this , __0__free )struct Stack__pt__2_i *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-__0this -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[8];
-
-__dt__21CC_TValSlist__pt__2_iFv ( __0this -> Items__14Stack__pt__2_i , 3) ;
-
-if (__0this ){ ( ((((struct Destructable *)__0this ))?( ( ((((struct Destructable *)__0this ))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[3]), ( (in_stack__12DestructableFv ( (((struct
-Destructable *)__0this ))) ?( ( ( (((! ( (g_top__12Unwind_Stack == ((struct Unwind_Stack *)(& g_jump_env_stack__16Jump_Environment -> f_unwind_stack__16Jump_Environment ))-> f_bottom__12Unwind_Stack )) )&& (((*(
-(((struct Unwind_Record *)(& (g_stack__12Unwind_Stack [(g_top__12Unwind_Stack - 1 )]))))) )). f_object__13Unwind_Record == (((struct Destructable *)__0this ))))?( ( ( ( (g_top__12Unwind_Stack -- ), 0 )
-, (((char )0 ))) ) , 0 ) :( 0 ) )) ) , 0 ) :( 0 )
-), ((((struct Destructable *)__0this ))?( (( 0 ) ), 0 ) :( 0 ) )) ) , 0 ) :(
-0 ) )) ;
-
-if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} } 
-}
-
-struct CC_Link__pt__2_i {      /* sizeof CC_Link__pt__2_i == 12 */
-
-struct CC_Link_base *f_next__12CC_Link_base ;
-struct CC_Link_base *f_prev__12CC_Link_base ;
-
-int *f_element__16CC_Link__pt__2_i ;
-};
-
-static char append__21CC_TValSlist__pt__2_iFRCi (__0this , __2t )struct CC_TValSlist__pt__2_i *__0this ;
-
-int *__2t ;
-
-{ 
-int *__2new_element ;
-
-int *__0__N53 ;
-
-struct CC_Link__pt__2_i *__0__X54 ;
-
-struct CC_Link_base *__0__X51 ;
-
-struct CC_Link_base *__2__X55 ;
-
-__2new_element = ( ( (__0__N53 = (((int *)__nw__FUi ( sizeof (int )) ))), (((*__0__N53 ))= (*__2t ))) , __0__N53 )
-;
-( (__2__X55 = (struct CC_Link_base *)( (__0__X54 = 0 ), ( ((__0__X54 || (__0__X54 = (struct CC_Link__pt__2_i *)__nw__FUi ( sizeof (struct CC_Link__pt__2_i)) ))?(
-(__0__X54 = (struct CC_Link__pt__2_i *)( (__0__X51 = (((struct CC_Link_base *)__0__X54 ))), ( ((__0__X51 || (__0__X51 = (struct CC_Link_base *)__nw__FUi ( sizeof (struct CC_Link_base)) ))?(
-(__0__X51 -> f_next__12CC_Link_base = 0 ), (__0__X51 -> f_prev__12CC_Link_base = 0 )) :0 ), __0__X51 ) ) ), (__0__X54 -> f_element__16CC_Link__pt__2_i = (((int *)__2new_element ))))
-:0 ), __0__X54 ) ) ), ( insert__11CC_ListbaseFP12CC_Link_base ( ((struct CC_Listbase *)__0this ), __2__X55 ) ) ) ;
-}
-
-char push__14Stack__pt__2_iFCi (__0this , __1newItem )struct Stack__pt__2_i *__0this ;
-
-int __1newItem ;
-{ 
-append__21CC_TValSlist__pt__2_iFRCi ( __0this -> Items__14Stack__pt__2_i , (int *)(& __1newItem )) ;
-}
-
-struct CC_Link_base *removeLast__11CC_ListbaseFv ();
-
-char throw_it__9ExceptionFUiPCci ();
-
-int pop__14Stack__pt__2_iFv (__0this )register struct Stack__pt__2_i *__0this ;
-
-{ 
-struct CC_Link__pt__2_i *__1last_elem ;
-
-__1last_elem = (((struct CC_Link__pt__2_i *)(((struct CC_Link__pt__2_i *)removeLast__11CC_ListbaseFv ( (struct CC_Listbase *)__0this -> Items__14Stack__pt__2_i ) ))));
-
-if (! __1last_elem ){ 
-register struct Exception *__0__X121 ;
-
-{ 
-struct Exception __0__V120 ;
-
-throw_it__9ExceptionFUiPCci ( ( (__0__X121 = ( __ct__9ExceptionFv ( & __0__V120 ) , (& __0__V120 )) ), ( ((! __0__X121 ->
-f_thrown__9Exception )?( (__0__X121 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X121 ) ) , (unsigned int )30 , (char *)"/VOB/olias/library/Common_Class/dti_cc/CC_Stack.cc",
-0 ) ;
-
-( (( ( ((& __0__V120 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), (( ( __dt__12DestructableFv ( ((struct Destructable *)(& __0__V120 )),
-0 ) , (( 0 ) )) , 0 ) )) , 0 ) )) ;
-} }
-
-{ int *__1ret ;
-
-__1ret = __1last_elem -> f_element__16CC_Link__pt__2_i ;
-__dl__FPv ( (char *)__1last_elem ) ;
-
-{ int __1ret_value ;
-
-__1ret_value = ((*__1ret ));
-__dl__FPv ( (char *)__1ret ) ;
-
-return __1ret_value ;
-
-}
-
-}
-}
-
-int top__14Stack__pt__2_iCFv (__0this )register struct Stack__pt__2_i *__0this ;
-{ 
-struct CC_Link__pt__2_i *__1last_elem ;
-
-__1last_elem = (((struct CC_Link__pt__2_i *)(((struct CC_Link__pt__2_i *)( ((struct CC_Listbase *)__0this -> Items__14Stack__pt__2_i )-> f_tail__11CC_Listbase ) ))));
-if (! __1last_elem ){ 
-register struct Exception *__0__X123 ;
-
-{ 
-struct Exception __0__V122 ;
-
-throw_it__9ExceptionFUiPCci ( ( (__0__X123 = ( __ct__9ExceptionFv ( & __0__V122 ) , (& __0__V122 )) ), ( ((! __0__X123 ->
-f_thrown__9Exception )?( (__0__X123 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X123 ) ) , (unsigned int )49 , (char *)"/VOB/olias/library/Common_Class/dti_cc/CC_Stack.cc",
-0 ) ;
-
-( (( ( ((& __0__V122 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), (( ( __dt__12DestructableFv ( ((struct Destructable *)(& __0__V122 )),
-0 ) , (( 0 ) )) , 0 ) )) , 0 ) )) ;
-} }
-
-return ((*__1last_elem -> f_element__16CC_Link__pt__2_i ));
-}
-
-struct CC_List_Iterator_base { /* sizeof CC_List_Iterator_base == 12 */
-
-struct CC_Listbase *f_list__21CC_List_Iterator_base ;
-struct CC_Link_base *f_previous__21CC_List_Iterator_base ;
-struct CC_Link_base *f_current__21CC_List_Iterator_base ;
-};
-
-struct CC_TValSlistIterator__pt__2_i { /* sizeof CC_TValSlistIterator__pt__2_i == 12 */
-
-struct CC_Listbase *f_list__21CC_List_Iterator_base ;
-struct CC_Link_base *f_previous__21CC_List_Iterator_base ;
-struct CC_Link_base *f_current__21CC_List_Iterator_base ;
-};
-
-CC_Boolean __pp__21CC_List_Iterator_baseFv ();
-
-int key__29CC_TValSlistIterator__pt__2_iCFv ();
-
-struct CC_List_Iterator_base *__ct__21CC_List_Iterator_baseFP11CC_Listbase ();
-
-struct CC_TValSlist__pt__2_i *__ct__21CC_TValSlist__pt__2_iFRC21CC_TValSlist__pt__2_i (__0this , __1sval_list )register struct CC_TValSlist__pt__2_i *__0this ;
-
-struct CC_TValSlist__pt__2_i *__1sval_list ;
-{ 
-struct CC_TValSlistIterator__pt__2_i __1slist_val_iter ;
-
-struct CC_Listbase *__0__X125 ;
-
-if (__0this || (__0this = (struct CC_TValSlist__pt__2_i *)__nw__FUi ( sizeof (struct CC_TValSlist__pt__2_i)) )){ __0this = (struct CC_TValSlist__pt__2_i *)( (__0__X125 = (((struct CC_Listbase *)__0this ))),
-( ((__0__X125 || (__0__X125 = (struct CC_Listbase *)__nw__FUi ( sizeof (struct CC_Listbase)) ))?( ( (__0__X125 -> f_head__11CC_Listbase = 0 ), (__0__X125 -> f_tail__11CC_Listbase =
-0 )) , (__0__X125 -> f_length__11CC_Listbase = 0 )) :0 ), __0__X125 ) ) ;
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1slist_val_iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TValSlist__pt__2_i *)(((struct CC_TValSlist__pt__2_i *)(((struct CC_TValSlist__pt__2_i *)(__1sval_list ))))))))))) ), (& __1slist_val_iter ))
-;
-while (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1slist_val_iter )) ){ 
-{ 
-int __0__I124 ;
-
-append__21CC_TValSlist__pt__2_iFRCi ( __0this , (int *)( (__0__I124 = key__29CC_TValSlistIterator__pt__2_iCFv ( (struct CC_TValSlistIterator__pt__2_i *)(& __1slist_val_iter )) ), (& __0__I124 )) ) ;
-} 
-}
-} 
-return __0this ;
-
-}
-
-struct CC_Link_base *remove__11CC_ListbaseFR21CC_List_Iterator_base ();
-
-char __dt__21CC_TValSlist__pt__2_iFv (__0this , __0__free )register struct CC_TValSlist__pt__2_i *__0this ;
-
-int __0__free ;
-
-{ 
-struct CC_TValSlistIterator__pt__2_i __1iter ;
-
-if (__0this ){ 
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TValSlist__pt__2_i *)__0this )))))) ), (& __1iter ))
-;
-if (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ){ 
-while (1 ){ 
-struct CC_Link__pt__2_i *__3elem ;
-
-__3elem = (((struct CC_Link__pt__2_i *)(((struct CC_Link__pt__2_i *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , ((struct CC_List_Iterator_base *)(((struct CC_List_Iterator_base *)(& __1iter ))))) ))));
-if (__3elem ){ 
-if (__3elem -> f_element__16CC_Link__pt__2_i ){ __dl__FPv ( (char *)__3elem -> f_element__16CC_Link__pt__2_i ) ;
-
-}
-__dl__FPv ( (char *)__3elem ) ;
-}
-else { break ;
-
-}
-}
-}
-
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} 
-}
-
-struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi {    /* sizeof CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi == 12 */
-
-struct CC_Listbase *f_list__21CC_List_Iterator_base ;
-struct CC_Link_base *f_previous__21CC_List_Iterator_base ;
-struct CC_Link_base *f_current__21CC_List_Iterator_base ;
-};
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__ct__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFRC50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi (__0this , __1slist )register struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__1slist ;
-{ 
-struct CC_Listbase *__0__X126 ;
-
-if (__0this || (__0this = (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__nw__FUi ( sizeof (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi)) )){ ( (__0this = (struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)( (__0__X126 = (((struct
-CC_Listbase *)__0this ))), ( ((__0__X126 || (__0__X126 = (struct CC_Listbase *)__nw__FUi ( sizeof (struct CC_Listbase)) ))?( ( (__0__X126 -> f_head__11CC_Listbase = 0 ), (__0__X126 ->
-f_tail__11CC_Listbase = 0 )) , (__0__X126 -> f_length__11CC_Listbase = 0 )) :0 ), __0__X126 ) ) ), (__0this -> __vptr__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[0]))
-;
-
-__0this -> destructed__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = 0 ;
-{ struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi __1slist_iter ;
-
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1slist_iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(__1slist ))))))))))) ), (& __1slist_iter ))
-;
-
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1slist_iter )) ?( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(&
-__1slist_iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) ){ 
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-struct kv_pair__pt__12_9CC_Stringi *__2__X127 ;
-
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__0__X76 ;
-
-struct CC_Link_base *__0__X71 ;
-
-struct CC_Link_base *__2__X77 ;
-
-( (__2__X127 = ( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __1slist_iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf ->
-f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) ), ( ( (__2__X77 = (struct CC_Link_base *)( (__0__X76 = 0 ), ( ((__0__X76 || (__0__X76 = (struct
-CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)__nw__FUi ( sizeof (struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi)) ))?( (__0__X76 = (struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( (__0__X71 = (((struct CC_Link_base *)__0__X76 ))), ( ((__0__X71 || (__0__X71 = (struct
-CC_Link_base *)__nw__FUi ( sizeof (struct CC_Link_base)) ))?( (__0__X71 -> f_next__12CC_Link_base = 0 ), (__0__X71 -> f_prev__12CC_Link_base = 0 )) :0 ), __0__X71 ) ) ),
-(__0__X76 -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi = __2__X127 )) :0 ), __0__X76 ) ) ), ( insert__11CC_ListbaseFP12CC_Link_base ( ((struct CC_Listbase *)__0this ), __2__X77 ) ) )
-) ) ;
-}
-
-}
-} 
-return __0this ;
-
-}
-
-struct kv_pair__pt__12_9CC_Stringi *at__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiCFUi (__0this , __1pos )register struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-size_t __1pos ;
-{ 
-struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi __1iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__0this )))))))))) ), (& __1iter ))
-;
-{ { int __1i ;
-
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-__1i = 0 ;
-
-for(;__1i <= __1pos ;__1i ++ ) { 
-if (! __pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ){ 
-struct ccException *__0__X49 ;
-
-register struct ccBoundaryException *__0__X129 ;
-
-register struct ccBoundaryException *__0__X130 ;
-
-struct Exception *__2__Xtemp00ere3blb ;
-
-register struct ccBoundaryException *__0__X48 ;
-
-struct ccException *__0__X47 ;
-
-{ 
-struct ccBoundaryException __0__V128 ;
-
-( (__0__X130 = ( (__0__X129 = ( ( (( ( ( ( (( (__0__X49 = (((struct ccException *)(&
-__0__V128 )))), ( ((__0__X49 || (__0__X49 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X49 = (struct
-ccException *)__ct__9ExceptionFv ( ((struct Exception *)__0__X49 )) ), (__0__X49 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X49 ) ) ), ((& __0__V128 )->
-__vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , ((& __0__V128 )-> low__19ccBoundaryException = 0 )) , ((& __0__V128 )-> high__19ccBoundaryException = 0 )) ,
-((& __0__V128 )-> index__19ccBoundaryException = __1i )) ), (& __0__V128 )) , (& __0__V128 )) ), ( ((! __0__X129 ->
-f_thrown__9Exception )?( (__0__X129 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X129 ) ) ), ( (in_stack__12DestructableFv ( (struct Destructable *)__0__X130 ) ?(
-(__2__Xtemp00ere3blb = (struct Exception *)( (__0__X48 = (struct ccBoundaryException *)__nw__9ExceptionSFUii ( sizeof (struct ccBoundaryException ), 0 ) ), ( ((__0__X48 || (__0__X48 =
-(struct ccBoundaryException *)( (((char *)__nw__FUi ( (sizeof (struct ccBoundaryException))) ))) ))?( ( ( ( ( (__0__X48 = (struct
-ccBoundaryException *)( (__0__X47 = (((struct ccException *)__0__X48 ))), ( ((__0__X47 || (__0__X47 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) )))
-))?( ( (__0__X47 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X47 ), (struct Exception *)(((struct Exception *)(((struct Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct
-ccBoundaryException *)__0__X130 ))))))))))))) ), (__0__X47 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ), __0__X47 ) ) ), (__0__X48 -> __vptr__12Destructable =
-(struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , (__0__X48 -> low__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X130 ))). low__19ccBoundaryException )) , (__0__X48 -> high__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X130 ))). high__19ccBoundaryException ))
-, (__0__X48 -> index__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X130 ))). index__19ccBoundaryException )) , 0 ) :0 ), __0__X48 ) ) ), (((struct Exception *)((((struct
-ccBoundaryException *)(((struct ccBoundaryException *)__2__Xtemp00ere3blb ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp00ere3blb = (struct Exception *)__0__X130 )), do_throw__9ExceptionFUiPCci ( __2__Xtemp00ere3blb , ((unsigned int )30 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/CC_Slist.cc"),
-0 ) ) ) ;
-
-( (( ( ((& __0__V128 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7]), (( ( ( ((((struct ccException *)(& __0__V128 )))?(
-( ((((struct ccException *)(& __0__V128 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V128 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V128 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V128 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V128 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V128 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} }
-}
-
-return ( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf ->
-f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) ;
-
-}
-
-}
-}
-
-struct kv_pair__pt__12_9CC_Stringi *removeAt__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFUi (__0this , __1pos )register struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-size_t __1pos ;
-
-{ 
-struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi __1iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__0this )))))) ), (& __1iter )) ;
-{ { int __1i ;
-
-__1i = 0 ;
-
-for(;__1i <= __1pos ;__1i ++ ) { 
-if (! __pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ){ 
-struct ccException *__0__X49 ;
-
-register struct ccBoundaryException *__0__X132 ;
-
-register struct ccBoundaryException *__0__X133 ;
-
-struct Exception *__2__Xtemp00ere3blb ;
-
-register struct ccBoundaryException *__0__X48 ;
-
-struct ccException *__0__X47 ;
-
-{ 
-struct ccBoundaryException __0__V131 ;
-
-( (__0__X133 = ( (__0__X132 = ( ( (( ( ( ( (( (__0__X49 = (((struct ccException *)(&
-__0__V131 )))), ( ((__0__X49 || (__0__X49 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X49 = (struct
-ccException *)__ct__9ExceptionFv ( ((struct Exception *)__0__X49 )) ), (__0__X49 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X49 ) ) ), ((& __0__V131 )->
-__vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , ((& __0__V131 )-> low__19ccBoundaryException = 0 )) , ((& __0__V131 )-> high__19ccBoundaryException = 0 )) ,
-((& __0__V131 )-> index__19ccBoundaryException = __1i )) ), (& __0__V131 )) , (& __0__V131 )) ), ( ((! __0__X132 ->
-f_thrown__9Exception )?( (__0__X132 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X132 ) ) ), ( (in_stack__12DestructableFv ( (struct Destructable *)__0__X133 ) ?(
-(__2__Xtemp00ere3blb = (struct Exception *)( (__0__X48 = (struct ccBoundaryException *)__nw__9ExceptionSFUii ( sizeof (struct ccBoundaryException ), 0 ) ), ( ((__0__X48 || (__0__X48 =
-(struct ccBoundaryException *)( (((char *)__nw__FUi ( (sizeof (struct ccBoundaryException))) ))) ))?( ( ( ( ( (__0__X48 = (struct
-ccBoundaryException *)( (__0__X47 = (((struct ccException *)__0__X48 ))), ( ((__0__X47 || (__0__X47 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) )))
-))?( ( (__0__X47 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X47 ), (struct Exception *)(((struct Exception *)(((struct Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct
-ccBoundaryException *)__0__X133 ))))))))))))) ), (__0__X47 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ), __0__X47 ) ) ), (__0__X48 -> __vptr__12Destructable =
-(struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , (__0__X48 -> low__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X133 ))). low__19ccBoundaryException )) , (__0__X48 -> high__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X133 ))). high__19ccBoundaryException ))
-, (__0__X48 -> index__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X133 ))). index__19ccBoundaryException )) , 0 ) :0 ), __0__X48 ) ) ), (((struct Exception *)((((struct
-ccBoundaryException *)(((struct ccBoundaryException *)__2__Xtemp00ere3blb ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp00ere3blb = (struct Exception *)__0__X133 )), do_throw__9ExceptionFUiPCci ( __2__Xtemp00ere3blb , ((unsigned int )44 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/CC_Slist.cc"),
-0 ) ) ) ;
-
-( (( ( ((& __0__V131 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7]), (( ( ( ((((struct ccException *)(& __0__V131 )))?(
-( ((((struct ccException *)(& __0__V131 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V131 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V131 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V131 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V131 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V131 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} }
-}
-
-{ struct kv_pair__pt__12_9CC_Stringi *__1key_val ;
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__1elem ;
-
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-__1key_val = ( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct
-kv_pair__pt__12_9CC_Stringi *)0 )))) ;
-__1elem = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , (struct CC_List_Iterator_base *)(& __1iter )) ))));
-__dl__FPv ( (char *)__1elem ) ;
-
-return __1key_val ;
-
-}
-
-}
-
-}
-
-}
-
-struct kv_pair__pt__12_9CC_Stringi *find__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiCFPC27kv_pair__pt__12_9CC_Stringi (__0this , __1elem )register struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-struct kv_pair__pt__12_9CC_Stringi *__1elem ;
-{ 
-struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi __1iter ;
-
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__0this )))))))))) ), (& __1iter ))
-;
-
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) ){ 
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-if (__eq__27kv_pair__pt__12_9CC_StringiFRC27kv_pair__pt__12_9CC_Stringi ( ( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf ->
-f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) , (struct kv_pair__pt__12_9CC_Stringi *)__1elem ) )
-return ( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) ;
-}
-
-return (struct kv_pair__pt__12_9CC_Stringi *)0 ;
-}
-
-struct kv_pair__pt__12_9CC_Stringi *find__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiCFPFP27kv_pair__pt__12_9CC_StringiPv_UiPv (__0this , __1testFunc , __1d )register struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-CC_Boolean (*__1testFunc )();
-char *__1d ;
-{ 
-struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi __1iter ;
-
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__0this )))))))))) ), (& __1iter ))
-;
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) ){ 
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-if ((*(__1testFunc ))( ( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf ->
-f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) , __1d ) ){ 
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-return ( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct
-kv_pair__pt__12_9CC_Stringi *)0 )))) ;
-}
-}
-
-return (struct kv_pair__pt__12_9CC_Stringi *)0 ;
-}
-
-CC_Boolean contains__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiCFPC27kv_pair__pt__12_9CC_Stringi (__0this , __1elem )register struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-struct kv_pair__pt__12_9CC_Stringi *__1elem ;
-{ 
-struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi __1iter ;
-
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__0this )))))))))) ), (& __1iter ))
-;
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) ){ 
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-if (__eq__27kv_pair__pt__12_9CC_StringiFRC27kv_pair__pt__12_9CC_Stringi ( ( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf ->
-f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) , (struct kv_pair__pt__12_9CC_Stringi *)__1elem ) )
-return (unsigned int )1 ;
-}
-
-return (unsigned int )0 ;
-}
-
-struct kv_pair__pt__12_9CC_Stringi *remove__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFPC27kv_pair__pt__12_9CC_Stringi (__0this , __1elem )register struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-struct kv_pair__pt__12_9CC_Stringi *__1elem ;
-{ 
-struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi __1iter ;
-
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__0this )))))) ), (& __1iter )) ;
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) ){ 
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__2__Xlink_item00qpg5ckf ;
-
-if (__eq__27kv_pair__pt__12_9CC_StringiFRC27kv_pair__pt__12_9CC_Stringi ( ( (__2__Xlink_item00qpg5ckf = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00qpg5ckf ?__2__Xlink_item00qpg5ckf ->
-f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi :(((struct kv_pair__pt__12_9CC_Stringi *)0 )))) , (struct kv_pair__pt__12_9CC_Stringi *)__1elem ) ){ 
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__3key_rec ;
-struct kv_pair__pt__12_9CC_Stringi *__3ret ;
-
-__3key_rec = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , (struct CC_List_Iterator_base *)(& __1iter )) ))));
-__3ret = __3key_rec -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi ;
-__dl__FPv ( (char *)__3key_rec ) ;
-
-return __3ret ;
-}
-}
-
-return (struct kv_pair__pt__12_9CC_Stringi *)0 ;
-}
-
-char __dt__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFv (__0this , __0__free )register struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-__0this -> __vptr__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[0];
-
-if (! __0this -> destructed__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi ){ 
-struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi __2iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __2iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__0this )))))) ), (& __2iter )) ;
-if (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __2iter )) ){ 
-while (1 ){ 
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__4elem ;
-
-__4elem = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , ((struct CC_List_Iterator_base *)(((struct CC_List_Iterator_base *)(& __2iter ))))) ))));
-if (__4elem ){ 
-__dl__FPv ( (char *)__4elem ) ;
-}
-else { break ;
-
-}
-}
-}
-}
-
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} 
-}
-
-char clearAndDestroy__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFv (__0this )register struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *__0this ;
-{ 
-__0this -> destructed__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi = 1 ;
-{ struct CC_TPtrSlistIterator__pt__30_27kv_pair__pt__12_9CC_Stringi __1iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi *)__0this )))))) ), (& __1iter )) ;
-if (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ){ 
-while (1 ){ 
-struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *__3elem ;
-
-__3elem = (((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)(((struct CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , ((struct CC_List_Iterator_base *)(((struct CC_List_Iterator_base *)(& __1iter ))))) ))));
-if (__3elem ){ 
-__dt__27kv_pair__pt__12_9CC_StringiFv ( __3elem -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi , 3) ;
-__3elem -> f_element__45CC_Link__pt__30_27kv_pair__pt__12_9CC_Stringi = 0 ;
-__dl__FPv ( (char *)__3elem ) ;
-}
-else { break ;
-
-}
-}
-}
-
-}
-}
-
-struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable {      /* sizeof CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable == 12 */
-
-struct CC_Listbase *f_list__21CC_List_Iterator_base ;
-struct CC_Link_base *f_previous__21CC_List_Iterator_base ;
-struct CC_Link_base *f_current__21CC_List_Iterator_base ;
-};
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__ct__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFRC64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable (__0this , __1slist )register struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__1slist ;
-{ 
-struct CC_Listbase *__0__X134 ;
-
-if (__0this || (__0this = (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__nw__FUi ( sizeof (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable)) )){ ( (__0this = (struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( (__0__X134 = (((struct
-CC_Listbase *)__0this ))), ( ((__0__X134 || (__0__X134 = (struct CC_Listbase *)__nw__FUi ( sizeof (struct CC_Listbase)) ))?( ( (__0__X134 -> f_head__11CC_Listbase = 0 ), (__0__X134 ->
-f_tail__11CC_Listbase = 0 )) , (__0__X134 -> f_length__11CC_Listbase = 0 )) :0 ), __0__X134 ) ) ), (__0this -> __vptr__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[1]))
-;
-
-__0this -> destructed__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = 0 ;
-{ struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable __1slist_iter ;
-
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1slist_iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(__1slist ))))))))))) ), (& __1slist_iter ))
-;
-
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1slist_iter )) ?( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(&
-__1slist_iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) ){ 
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *__2__X135 ;
-
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0__X69 ;
-
-struct CC_Link_base *__0__X64 ;
-
-struct CC_Link_base *__2__X70 ;
-
-( (__2__X135 = ( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __1slist_iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda ->
-f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) ), ( ( (__2__X70 = (struct CC_Link_base *)( (__0__X69 = 0 ), ( ((__0__X69 || (__0__X69 = (struct
-CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__nw__FUi ( sizeof (struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable)) ))?( (__0__X69 = (struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( (__0__X64 = (((struct CC_Link_base *)__0__X69 ))), ( ((__0__X64 || (__0__X64 = (struct
-CC_Link_base *)__nw__FUi ( sizeof (struct CC_Link_base)) ))?( (__0__X64 -> f_next__12CC_Link_base = 0 ), (__0__X64 -> f_prev__12CC_Link_base = 0 )) :0 ), __0__X64 ) ) ),
-(__0__X69 -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = __2__X135 )) :0 ), __0__X69 ) ) ), ( insert__11CC_ListbaseFP12CC_Link_base ( ((struct CC_Listbase *)__0this ), __2__X70 ) ) )
-) ) ;
-}
-
-}
-} 
-return __0this ;
-
-}
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *at__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableCFUi (__0this , __1pos )register struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-size_t __1pos ;
-{ 
-struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable __1iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__0this )))))))))) ), (& __1iter ))
-;
-{ { int __1i ;
-
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-__1i = 0 ;
-
-for(;__1i <= __1pos ;__1i ++ ) { 
-if (! __pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ){ 
-struct ccException *__0__X49 ;
-
-register struct ccBoundaryException *__0__X137 ;
-
-register struct ccBoundaryException *__0__X138 ;
-
-struct Exception *__2__Xtemp00ere3blb ;
-
-register struct ccBoundaryException *__0__X48 ;
-
-struct ccException *__0__X47 ;
-
-{ 
-struct ccBoundaryException __0__V136 ;
-
-( (__0__X138 = ( (__0__X137 = ( ( (( ( ( ( (( (__0__X49 = (((struct ccException *)(&
-__0__V136 )))), ( ((__0__X49 || (__0__X49 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X49 = (struct
-ccException *)__ct__9ExceptionFv ( ((struct Exception *)__0__X49 )) ), (__0__X49 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X49 ) ) ), ((& __0__V136 )->
-__vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , ((& __0__V136 )-> low__19ccBoundaryException = 0 )) , ((& __0__V136 )-> high__19ccBoundaryException = 0 )) ,
-((& __0__V136 )-> index__19ccBoundaryException = __1i )) ), (& __0__V136 )) , (& __0__V136 )) ), ( ((! __0__X137 ->
-f_thrown__9Exception )?( (__0__X137 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X137 ) ) ), ( (in_stack__12DestructableFv ( (struct Destructable *)__0__X138 ) ?(
-(__2__Xtemp00ere3blb = (struct Exception *)( (__0__X48 = (struct ccBoundaryException *)__nw__9ExceptionSFUii ( sizeof (struct ccBoundaryException ), 0 ) ), ( ((__0__X48 || (__0__X48 =
-(struct ccBoundaryException *)( (((char *)__nw__FUi ( (sizeof (struct ccBoundaryException))) ))) ))?( ( ( ( ( (__0__X48 = (struct
-ccBoundaryException *)( (__0__X47 = (((struct ccException *)__0__X48 ))), ( ((__0__X47 || (__0__X47 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) )))
-))?( ( (__0__X47 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X47 ), (struct Exception *)(((struct Exception *)(((struct Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct
-ccBoundaryException *)__0__X138 ))))))))))))) ), (__0__X47 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ), __0__X47 ) ) ), (__0__X48 -> __vptr__12Destructable =
-(struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , (__0__X48 -> low__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X138 ))). low__19ccBoundaryException )) , (__0__X48 -> high__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X138 ))). high__19ccBoundaryException ))
-, (__0__X48 -> index__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X138 ))). index__19ccBoundaryException )) , 0 ) :0 ), __0__X48 ) ) ), (((struct Exception *)((((struct
-ccBoundaryException *)(((struct ccBoundaryException *)__2__Xtemp00ere3blb ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp00ere3blb = (struct Exception *)__0__X138 )), do_throw__9ExceptionFUiPCci ( __2__Xtemp00ere3blb , ((unsigned int )30 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/CC_Slist.cc"),
-0 ) ) ) ;
-
-( (( ( ((& __0__V136 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7]), (( ( ( ((((struct ccException *)(& __0__V136 )))?(
-( ((((struct ccException *)(& __0__V136 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V136 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V136 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V136 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V136 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V136 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} }
-}
-
-return ( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda ->
-f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) ;
-
-}
-
-}
-}
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *removeAt__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFUi (__0this , __1pos )register struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-size_t __1pos ;
-
-{ 
-struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable __1iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__0this )))))) ), (& __1iter )) ;
-{ { int __1i ;
-
-__1i = 0 ;
-
-for(;__1i <= __1pos ;__1i ++ ) { 
-if (! __pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ){ 
-struct ccException *__0__X49 ;
-
-register struct ccBoundaryException *__0__X140 ;
-
-register struct ccBoundaryException *__0__X141 ;
-
-struct Exception *__2__Xtemp00ere3blb ;
-
-register struct ccBoundaryException *__0__X48 ;
-
-struct ccException *__0__X47 ;
-
-{ 
-struct ccBoundaryException __0__V139 ;
-
-( (__0__X141 = ( (__0__X140 = ( ( (( ( ( ( (( (__0__X49 = (((struct ccException *)(&
-__0__V139 )))), ( ((__0__X49 || (__0__X49 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X49 = (struct
-ccException *)__ct__9ExceptionFv ( ((struct Exception *)__0__X49 )) ), (__0__X49 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X49 ) ) ), ((& __0__V139 )->
-__vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , ((& __0__V139 )-> low__19ccBoundaryException = 0 )) , ((& __0__V139 )-> high__19ccBoundaryException = 0 )) ,
-((& __0__V139 )-> index__19ccBoundaryException = __1i )) ), (& __0__V139 )) , (& __0__V139 )) ), ( ((! __0__X140 ->
-f_thrown__9Exception )?( (__0__X140 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X140 ) ) ), ( (in_stack__12DestructableFv ( (struct Destructable *)__0__X141 ) ?(
-(__2__Xtemp00ere3blb = (struct Exception *)( (__0__X48 = (struct ccBoundaryException *)__nw__9ExceptionSFUii ( sizeof (struct ccBoundaryException ), 0 ) ), ( ((__0__X48 || (__0__X48 =
-(struct ccBoundaryException *)( (((char *)__nw__FUi ( (sizeof (struct ccBoundaryException))) ))) ))?( ( ( ( ( (__0__X48 = (struct
-ccBoundaryException *)( (__0__X47 = (((struct ccException *)__0__X48 ))), ( ((__0__X47 || (__0__X47 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) )))
-))?( ( (__0__X47 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X47 ), (struct Exception *)(((struct Exception *)(((struct Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct
-ccBoundaryException *)__0__X141 ))))))))))))) ), (__0__X47 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ), __0__X47 ) ) ), (__0__X48 -> __vptr__12Destructable =
-(struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , (__0__X48 -> low__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X141 ))). low__19ccBoundaryException )) , (__0__X48 -> high__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X141 ))). high__19ccBoundaryException ))
-, (__0__X48 -> index__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X141 ))). index__19ccBoundaryException )) , 0 ) :0 ), __0__X48 ) ) ), (((struct Exception *)((((struct
-ccBoundaryException *)(((struct ccBoundaryException *)__2__Xtemp00ere3blb ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp00ere3blb = (struct Exception *)__0__X141 )), do_throw__9ExceptionFUiPCci ( __2__Xtemp00ere3blb , ((unsigned int )44 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/CC_Slist.cc"),
-0 ) ) ) ;
-
-( (( ( ((& __0__V139 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7]), (( ( ( ((((struct ccException *)(& __0__V139 )))?(
-( ((((struct ccException *)(& __0__V139 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V139 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V139 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V139 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V139 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V139 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} }
-}
-
-{ struct kv_pair__pt__26_9CC_String13BTCollectable *__1key_val ;
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__1elem ;
-
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-__1key_val = ( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct
-kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) ;
-__1elem = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , (struct CC_List_Iterator_base *)(& __1iter )) ))));
-__dl__FPv ( (char *)__1elem ) ;
-
-return __1key_val ;
-
-}
-
-}
-
-}
-
-}
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *find__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableCFPC41kv_pair__pt__26_9CC_String13BTCollectable (__0this , __1elem )register struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *__1elem ;
-{ 
-struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable __1iter ;
-
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__0this )))))))))) ), (& __1iter ))
-;
-
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) ){ 
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-if (__eq__41kv_pair__pt__26_9CC_String13BTCollectableFRC41kv_pair__pt__26_9CC_String13BTCollectable ( ( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda ->
-f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) , (struct kv_pair__pt__26_9CC_String13BTCollectable *)__1elem ) )
-return ( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) ;
-}
-
-return (struct kv_pair__pt__26_9CC_String13BTCollectable *)0 ;
-}
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *find__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableCFPFP41kv_pair__pt__26_9CC_String13BTCollectablePv_UiPv (__0this , __1testFunc , __1d )register struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-CC_Boolean (*__1testFunc )();
-char *__1d ;
-{ 
-struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable __1iter ;
-
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__0this )))))))))) ), (& __1iter ))
-;
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) ){ 
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-if ((*(__1testFunc ))( ( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda ->
-f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) , __1d ) ){ 
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-return ( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct
-kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) ;
-}
-}
-
-return (struct kv_pair__pt__26_9CC_String13BTCollectable *)0 ;
-}
-
-CC_Boolean contains__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableCFPC41kv_pair__pt__26_9CC_String13BTCollectable (__0this , __1elem )register struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *__1elem ;
-{ 
-struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable __1iter ;
-
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__0this )))))))))) ), (& __1iter ))
-;
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) ){ 
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-if (__eq__41kv_pair__pt__26_9CC_String13BTCollectableFRC41kv_pair__pt__26_9CC_String13BTCollectable ( ( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda ->
-f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) , (struct kv_pair__pt__26_9CC_String13BTCollectable *)__1elem ) )
-return (unsigned int )1 ;
-}
-
-return (unsigned int )0 ;
-}
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *remove__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFPC41kv_pair__pt__26_9CC_String13BTCollectable (__0this , __1elem )register struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-struct kv_pair__pt__26_9CC_String13BTCollectable *__1elem ;
-{ 
-struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable __1iter ;
-
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__0this )))))) ), (& __1iter )) ;
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) ){ 
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__2__Xlink_item00ak2cdda ;
-
-if (__eq__41kv_pair__pt__26_9CC_String13BTCollectableFRC41kv_pair__pt__26_9CC_String13BTCollectable ( ( (__2__Xlink_item00ak2cdda = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00ak2cdda ?__2__Xlink_item00ak2cdda ->
-f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable :(((struct kv_pair__pt__26_9CC_String13BTCollectable *)0 )))) , (struct kv_pair__pt__26_9CC_String13BTCollectable *)__1elem ) ){ 
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__3key_rec ;
-struct kv_pair__pt__26_9CC_String13BTCollectable *__3ret ;
-
-__3key_rec = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , (struct CC_List_Iterator_base *)(& __1iter )) ))));
-__3ret = __3key_rec -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ;
-__dl__FPv ( (char *)__3key_rec ) ;
-
-return __3ret ;
-}
-}
-
-return (struct kv_pair__pt__26_9CC_String13BTCollectable *)0 ;
-}
-
-char __dt__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFv (__0this , __0__free )register struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-__0this -> __vptr__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[1];
-
-if (! __0this -> destructed__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable ){ 
-struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable __2iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __2iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__0this )))))) ), (& __2iter )) ;
-if (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __2iter )) ){ 
-while (1 ){ 
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__4elem ;
-
-__4elem = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , ((struct CC_List_Iterator_base *)(((struct CC_List_Iterator_base *)(& __2iter ))))) ))));
-if (__4elem ){ 
-__dl__FPv ( (char *)__4elem ) ;
-}
-else { break ;
-
-}
-}
-}
-}
-
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} 
-}
-
-char clearAndDestroy__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFv (__0this )register struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__0this ;
-{ 
-__0this -> destructed__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = 1 ;
-{ struct CC_TPtrSlistIterator__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable __1iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)__0this )))))) ), (& __1iter )) ;
-if (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ){ 
-while (1 ){ 
-struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *__3elem ;
-
-__3elem = (((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)(((struct CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , ((struct CC_List_Iterator_base *)(((struct CC_List_Iterator_base *)(& __1iter ))))) ))));
-if (__3elem ){ 
-__dt__41kv_pair__pt__26_9CC_String13BTCollectableFv ( __3elem -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable , 3) ;
-__3elem -> f_element__59CC_Link__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable = 0 ;
-__dl__FPv ( (char *)__3elem ) ;
-}
-else { break ;
-
-}
-}
-}
-
-}
-}
-
-struct CC_TPtrSlist__pt__11_9CC_String {       /* sizeof CC_TPtrSlist__pt__11_9CC_String == 20 */
-
-struct CC_Link_base *f_head__11CC_Listbase ;
-struct CC_Link_base *f_tail__11CC_Listbase ;
-size_t f_length__11CC_Listbase ;
-
-CC_Boolean destructed__31CC_TPtrSlist__pt__11_9CC_String ;
-
-struct __mptr *__vptr__31CC_TPtrSlist__pt__11_9CC_String ;
-};
-
-struct CC_TPtrSlistIterator__pt__11_9CC_String {       /* sizeof CC_TPtrSlistIterator__pt__11_9CC_String == 12 */
-
-struct CC_Listbase *f_list__21CC_List_Iterator_base ;
-struct CC_Link_base *f_previous__21CC_List_Iterator_base ;
-struct CC_Link_base *f_current__21CC_List_Iterator_base ;
-};
-
-struct CC_Link__pt__11_9CC_String {    /* sizeof CC_Link__pt__11_9CC_String == 12 */
-
-struct CC_Link_base *f_next__12CC_Link_base ;
-struct CC_Link_base *f_prev__12CC_Link_base ;
-
-struct CC_String *f_element__26CC_Link__pt__11_9CC_String ;
-};
-
-struct CC_TPtrSlist__pt__11_9CC_String *__ct__31CC_TPtrSlist__pt__11_9CC_StringFRC31CC_TPtrSlist__pt__11_9CC_String (__0this , __1slist )register struct CC_TPtrSlist__pt__11_9CC_String *__0this ;
-
-struct CC_TPtrSlist__pt__11_9CC_String *__1slist ;
-{ 
-struct CC_Listbase *__0__X142 ;
-
-if (__0this || (__0this = (struct CC_TPtrSlist__pt__11_9CC_String *)__nw__FUi ( sizeof (struct CC_TPtrSlist__pt__11_9CC_String)) )){ ( (__0this = (struct CC_TPtrSlist__pt__11_9CC_String *)( (__0__X142 = (((struct
-CC_Listbase *)__0this ))), ( ((__0__X142 || (__0__X142 = (struct CC_Listbase *)__nw__FUi ( sizeof (struct CC_Listbase)) ))?( ( (__0__X142 -> f_head__11CC_Listbase = 0 ), (__0__X142 ->
-f_tail__11CC_Listbase = 0 )) , (__0__X142 -> f_length__11CC_Listbase = 0 )) :0 ), __0__X142 ) ) ), (__0this -> __vptr__31CC_TPtrSlist__pt__11_9CC_String = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[9]))
-;
-
-__0this -> destructed__31CC_TPtrSlist__pt__11_9CC_String = 0 ;
-{ struct CC_TPtrSlistIterator__pt__11_9CC_String __1slist_iter ;
-
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1slist_iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__11_9CC_String *)(((struct CC_TPtrSlist__pt__11_9CC_String *)(((struct CC_TPtrSlist__pt__11_9CC_String *)(__1slist ))))))))))) ), (& __1slist_iter ))
-;
-
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1slist_iter )) ?( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(&
-__1slist_iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl -> f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) :(((struct CC_String *)0 )))) ){ 
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-struct CC_String *__2__X143 ;
-
-struct CC_Link__pt__11_9CC_String *__0__X62 ;
-
-struct CC_Link_base *__0__X57 ;
-
-struct CC_Link_base *__2__X63 ;
-
-( (__2__X143 = ( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(& __1slist_iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl ->
-f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) ), ( ( (__2__X63 = (struct CC_Link_base *)( (__0__X62 = 0 ), ( ((__0__X62 || (__0__X62 = (struct
-CC_Link__pt__11_9CC_String *)__nw__FUi ( sizeof (struct CC_Link__pt__11_9CC_String)) ))?( (__0__X62 = (struct CC_Link__pt__11_9CC_String *)( (__0__X57 = (((struct CC_Link_base *)__0__X62 ))), ( ((__0__X57 || (__0__X57 = (struct
-CC_Link_base *)__nw__FUi ( sizeof (struct CC_Link_base)) ))?( (__0__X57 -> f_next__12CC_Link_base = 0 ), (__0__X57 -> f_prev__12CC_Link_base = 0 )) :0 ), __0__X57 ) ) ),
-(__0__X62 -> f_element__26CC_Link__pt__11_9CC_String = __2__X143 )) :0 ), __0__X62 ) ) ), ( insert__11CC_ListbaseFP12CC_Link_base ( ((struct CC_Listbase *)__0this ), __2__X63 ) ) )
-) ) ;
-}
-
-}
-} 
-return __0this ;
-
-}
-
-struct CC_String *at__31CC_TPtrSlist__pt__11_9CC_StringCFUi (__0this , __1pos )register struct CC_TPtrSlist__pt__11_9CC_String *__0this ;
-
-size_t __1pos ;
-{ 
-struct CC_TPtrSlistIterator__pt__11_9CC_String __1iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__11_9CC_String *)(((struct CC_TPtrSlist__pt__11_9CC_String *)(((struct CC_TPtrSlist__pt__11_9CC_String *)__0this )))))))))) ), (& __1iter ))
-;
-{ { int __1i ;
-
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-__1i = 0 ;
-
-for(;__1i <= __1pos ;__1i ++ ) { 
-if (! __pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ){ 
-struct ccException *__0__X49 ;
-
-register struct ccBoundaryException *__0__X145 ;
-
-register struct ccBoundaryException *__0__X146 ;
-
-struct Exception *__2__Xtemp00ere3blb ;
-
-register struct ccBoundaryException *__0__X48 ;
-
-struct ccException *__0__X47 ;
-
-{ 
-struct ccBoundaryException __0__V144 ;
-
-( (__0__X146 = ( (__0__X145 = ( ( (( ( ( ( (( (__0__X49 = (((struct ccException *)(&
-__0__V144 )))), ( ((__0__X49 || (__0__X49 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X49 = (struct
-ccException *)__ct__9ExceptionFv ( ((struct Exception *)__0__X49 )) ), (__0__X49 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X49 ) ) ), ((& __0__V144 )->
-__vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , ((& __0__V144 )-> low__19ccBoundaryException = 0 )) , ((& __0__V144 )-> high__19ccBoundaryException = 0 )) ,
-((& __0__V144 )-> index__19ccBoundaryException = __1i )) ), (& __0__V144 )) , (& __0__V144 )) ), ( ((! __0__X145 ->
-f_thrown__9Exception )?( (__0__X145 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X145 ) ) ), ( (in_stack__12DestructableFv ( (struct Destructable *)__0__X146 ) ?(
-(__2__Xtemp00ere3blb = (struct Exception *)( (__0__X48 = (struct ccBoundaryException *)__nw__9ExceptionSFUii ( sizeof (struct ccBoundaryException ), 0 ) ), ( ((__0__X48 || (__0__X48 =
-(struct ccBoundaryException *)( (((char *)__nw__FUi ( (sizeof (struct ccBoundaryException))) ))) ))?( ( ( ( ( (__0__X48 = (struct
-ccBoundaryException *)( (__0__X47 = (((struct ccException *)__0__X48 ))), ( ((__0__X47 || (__0__X47 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) )))
-))?( ( (__0__X47 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X47 ), (struct Exception *)(((struct Exception *)(((struct Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct
-ccBoundaryException *)__0__X146 ))))))))))))) ), (__0__X47 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ), __0__X47 ) ) ), (__0__X48 -> __vptr__12Destructable =
-(struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , (__0__X48 -> low__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X146 ))). low__19ccBoundaryException )) , (__0__X48 -> high__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X146 ))). high__19ccBoundaryException ))
-, (__0__X48 -> index__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X146 ))). index__19ccBoundaryException )) , 0 ) :0 ), __0__X48 ) ) ), (((struct Exception *)((((struct
-ccBoundaryException *)(((struct ccBoundaryException *)__2__Xtemp00ere3blb ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp00ere3blb = (struct Exception *)__0__X146 )), do_throw__9ExceptionFUiPCci ( __2__Xtemp00ere3blb , ((unsigned int )30 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/CC_Slist.cc"),
-0 ) ) ) ;
-
-( (( ( ((& __0__V144 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7]), (( ( ( ((((struct ccException *)(& __0__V144 )))?(
-( ((((struct ccException *)(& __0__V144 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V144 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V144 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V144 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V144 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V144 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} }
-}
-
-return ( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl ->
-f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) ;
-
-}
-
-}
-}
-
-struct CC_String *remove__31CC_TPtrSlist__pt__11_9CC_StringFPC9CC_String ();
-
-struct CC_String *removeAt__31CC_TPtrSlist__pt__11_9CC_StringFUi (__0this , __1pos )register struct CC_TPtrSlist__pt__11_9CC_String *__0this ;
-
-size_t __1pos ;
-
-{ 
-struct CC_TPtrSlistIterator__pt__11_9CC_String __1iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__11_9CC_String *)__0this )))))) ), (& __1iter )) ;
-{ { int __1i ;
-
-__1i = 0 ;
-
-for(;__1i <= __1pos ;__1i ++ ) { 
-if (! __pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ){ 
-struct ccException *__0__X49 ;
-
-register struct ccBoundaryException *__0__X148 ;
-
-register struct ccBoundaryException *__0__X149 ;
-
-struct Exception *__2__Xtemp00ere3blb ;
-
-register struct ccBoundaryException *__0__X48 ;
-
-struct ccException *__0__X47 ;
-
-{ 
-struct ccBoundaryException __0__V147 ;
-
-( (__0__X149 = ( (__0__X148 = ( ( (( ( ( ( (( (__0__X49 = (((struct ccException *)(&
-__0__V147 )))), ( ((__0__X49 || (__0__X49 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( (__0__X49 = (struct
-ccException *)__ct__9ExceptionFv ( ((struct Exception *)__0__X49 )) ), (__0__X49 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) :0 ), __0__X49 ) ) ), ((& __0__V147 )->
-__vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , ((& __0__V147 )-> low__19ccBoundaryException = 0 )) , ((& __0__V147 )-> high__19ccBoundaryException = 0 )) ,
-((& __0__V147 )-> index__19ccBoundaryException = __1i )) ), (& __0__V147 )) , (& __0__V147 )) ), ( ((! __0__X148 ->
-f_thrown__9Exception )?( (__0__X148 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X148 ) ) ), ( (in_stack__12DestructableFv ( (struct Destructable *)__0__X149 ) ?(
-(__2__Xtemp00ere3blb = (struct Exception *)( (__0__X48 = (struct ccBoundaryException *)__nw__9ExceptionSFUii ( sizeof (struct ccBoundaryException ), 0 ) ), ( ((__0__X48 || (__0__X48 =
-(struct ccBoundaryException *)( (((char *)__nw__FUi ( (sizeof (struct ccBoundaryException))) ))) ))?( ( ( ( ( (__0__X48 = (struct
-ccBoundaryException *)( (__0__X47 = (((struct ccException *)__0__X48 ))), ( ((__0__X47 || (__0__X47 = (struct ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) )))
-))?( ( (__0__X47 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X47 ), (struct Exception *)(((struct Exception *)(((struct Exception *)(((struct ccException *)(((struct ccException *)(((struct ccException *)(((struct
-ccBoundaryException *)__0__X149 ))))))))))))) ), (__0__X47 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ), __0__X47 ) ) ), (__0__X48 -> __vptr__12Destructable =
-(struct __mptr *) __ptbl_vec__TKTemplate_cc_[7])) , (__0__X48 -> low__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X149 ))). low__19ccBoundaryException )) , (__0__X48 -> high__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X149 ))). high__19ccBoundaryException ))
-, (__0__X48 -> index__19ccBoundaryException = ((*((struct ccBoundaryException *)__0__X149 ))). index__19ccBoundaryException )) , 0 ) :0 ), __0__X48 ) ) ), (((struct Exception *)((((struct
-ccBoundaryException *)(((struct ccBoundaryException *)__2__Xtemp00ere3blb ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp00ere3blb = (struct Exception *)__0__X149 )), do_throw__9ExceptionFUiPCci ( __2__Xtemp00ere3blb , ((unsigned int )44 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/CC_Slist.cc"),
-0 ) ) ) ;
-
-( (( ( ((& __0__V147 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[7]), (( ( ( ((((struct ccException *)(& __0__V147 )))?(
-( ((((struct ccException *)(& __0__V147 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), ((((struct ccException *)(& __0__V147 )))?( ( ( ((((struct Exception *)(((struct
-ccException *)(& __0__V147 )))))?( ( ((((struct Exception *)(((struct ccException *)(& __0__V147 )))))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(((struct ccException *)(& __0__V147 )))))?(
-( __dt__12DestructableFv ( ((struct Destructable *)(((struct Exception *)(((struct ccException *)(& __0__V147 )))))), 0 ) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-:( 0 ) )) , 0 ) :( 0 ) )) , (( 0 ) )) , 0 )
-)) , 0 ) )) ;
-} }
-}
-
-{ struct CC_String *__1key_val ;
-struct CC_Link__pt__11_9CC_String *__1elem ;
-
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-__1key_val = ( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl -> f_element__26CC_Link__pt__11_9CC_String :(((struct
-CC_String *)0 )))) ;
-__1elem = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , (struct CC_List_Iterator_base *)(& __1iter )) ))));
-__dl__FPv ( (char *)__1elem ) ;
-
-return __1key_val ;
-
-}
-
-}
-
-}
-
-}
-
-static char *__opPCc__9CC_StringCFv ();
-
-struct CC_String *find__31CC_TPtrSlist__pt__11_9CC_StringCFPC9CC_String (__0this , __1elem )register struct CC_TPtrSlist__pt__11_9CC_String *__0this ;
-
-struct CC_String *__1elem ;
-{ 
-struct CC_TPtrSlistIterator__pt__11_9CC_String __1iter ;
-
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__11_9CC_String *)(((struct CC_TPtrSlist__pt__11_9CC_String *)(((struct CC_TPtrSlist__pt__11_9CC_String *)__0this )))))))))) ), (& __1iter ))
-;
-
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl -> f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) :(((struct CC_String *)0 )))) ){ 
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-struct CC_String *__0__X150 ;
-
-if (( (__0__X150 = ( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))),
-(__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl -> f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) ), ( (((unsigned int )((( compareTo__9CC_StringCFPCcQ2_9CC_String11caseCompare ( ((struct CC_String *)__0__X150 ), __opPCc__9CC_StringCFv ( (struct CC_String *)((struct
-CC_String *)__1elem )) , ((int )0)) ) == 0 )?1 :0 )))) ) )
-return ( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)(
-((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl -> f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) ;
-}
-
-return (struct CC_String *)0 ;
-}
-
-struct CC_String *find__31CC_TPtrSlist__pt__11_9CC_StringCFPFP9CC_StringPv_UiPv (__0this , __1testFunc , __1d )register struct CC_TPtrSlist__pt__11_9CC_String *__0this ;
-
-CC_Boolean (*__1testFunc )();
-char *__1d ;
-{ 
-struct CC_TPtrSlistIterator__pt__11_9CC_String __1iter ;
-
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__11_9CC_String *)(((struct CC_TPtrSlist__pt__11_9CC_String *)(((struct CC_TPtrSlist__pt__11_9CC_String *)__0this )))))))))) ), (& __1iter ))
-;
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl -> f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) :(((struct CC_String *)0 )))) ){ 
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-if ((*(__1testFunc ))( ( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl ->
-f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) , __1d ) ){ 
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-return ( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl -> f_element__26CC_Link__pt__11_9CC_String :(((struct
-CC_String *)0 )))) ;
-}
-}
-
-return (struct CC_String *)0 ;
-}
-
-static char *__opPCc__9CC_StringCFv ();
-
-CC_Boolean contains__31CC_TPtrSlist__pt__11_9CC_StringCFPC9CC_String (__0this , __1elem )register struct CC_TPtrSlist__pt__11_9CC_String *__0this ;
-
-struct CC_String *__1elem ;
-{ 
-struct CC_TPtrSlistIterator__pt__11_9CC_String __1iter ;
-
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__11_9CC_String *)(((struct CC_TPtrSlist__pt__11_9CC_String *)(((struct CC_TPtrSlist__pt__11_9CC_String *)__0this )))))))))) ), (& __1iter ))
-;
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl -> f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) :(((struct CC_String *)0 )))) ){ 
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-struct CC_String *__0__X151 ;
-
-if (( (__0__X151 = ( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))),
-(__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl -> f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) ), ( (((unsigned int )((( compareTo__9CC_StringCFPCcQ2_9CC_String11caseCompare ( ((struct CC_String *)__0__X151 ), __opPCc__9CC_StringCFv ( (struct CC_String *)((struct
-CC_String *)__1elem )) , ((int )0)) ) == 0 )?1 :0 )))) ) )
-return (unsigned int )1 ;
-}
-
-return (unsigned int )0 ;
-}
-
-static char *__opPCc__9CC_StringCFv ();
-
-struct CC_String *remove__31CC_TPtrSlist__pt__11_9CC_StringFPC9CC_String (__0this , __1elem )register struct CC_TPtrSlist__pt__11_9CC_String *__0this ;
-
-struct CC_String *__1elem ;
-{ 
-struct CC_TPtrSlistIterator__pt__11_9CC_String __1iter ;
-
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__11_9CC_String *)__0this )))))) ), (& __1iter )) ;
-while (( (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ?( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(&
-__1iter )))-> f_current__21CC_List_Iterator_base ) ))))), (__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl -> f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) :(((struct CC_String *)0 )))) ){ 
-struct CC_Link__pt__11_9CC_String *__2__Xlink_item00iqjfdkl ;
-
-struct CC_String *__0__X152 ;
-
-if (( (__0__X152 = ( (__2__Xlink_item00iqjfdkl = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)( ((struct CC_List_Iterator_base *)((struct CC_TPtrSlistIterator__pt__11_9CC_String *)(& __1iter )))-> f_current__21CC_List_Iterator_base ) ))))),
-(__2__Xlink_item00iqjfdkl ?__2__Xlink_item00iqjfdkl -> f_element__26CC_Link__pt__11_9CC_String :(((struct CC_String *)0 )))) ), ( (((unsigned int )((( compareTo__9CC_StringCFPCcQ2_9CC_String11caseCompare ( ((struct CC_String *)__0__X152 ), __opPCc__9CC_StringCFv ( (struct CC_String *)((struct
-CC_String *)__1elem )) , ((int )0)) ) == 0 )?1 :0 )))) ) ){ 
-struct CC_Link__pt__11_9CC_String *__3key_rec ;
-struct CC_String *__3ret ;
-
-__3key_rec = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , (struct CC_List_Iterator_base *)(& __1iter )) ))));
-__3ret = __3key_rec -> f_element__26CC_Link__pt__11_9CC_String ;
-__dl__FPv ( (char *)__3key_rec ) ;
-
-return __3ret ;
-}
-}
-
-return (struct CC_String *)0 ;
-}
-
-char __dt__31CC_TPtrSlist__pt__11_9CC_StringFv (__0this , __0__free )register struct CC_TPtrSlist__pt__11_9CC_String *__0this ;
-
-int __0__free ;
-
-{ if (__0this ){ 
-__0this -> __vptr__31CC_TPtrSlist__pt__11_9CC_String = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[9];
-
-if (! __0this -> destructed__31CC_TPtrSlist__pt__11_9CC_String ){ 
-struct CC_TPtrSlistIterator__pt__11_9CC_String __2iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __2iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__11_9CC_String *)__0this )))))) ), (& __2iter )) ;
-if (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __2iter )) ){ 
-while (1 ){ 
-struct CC_Link__pt__11_9CC_String *__4elem ;
-
-__4elem = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , ((struct CC_List_Iterator_base *)(((struct CC_List_Iterator_base *)(& __2iter ))))) ))));
-if (__4elem ){ 
-__dl__FPv ( (char *)__4elem ) ;
-}
-else { break ;
-
-}
-}
-}
-}
-
-if (__0this )if (__0__free & 1)__dl__FPv ( (char *)__0this ) ;
-} 
-}
-
-char clearAndDestroy__31CC_TPtrSlist__pt__11_9CC_StringFv (__0this )register struct CC_TPtrSlist__pt__11_9CC_String *__0this ;
-{ 
-__0this -> destructed__31CC_TPtrSlist__pt__11_9CC_String = 1 ;
-{ struct CC_TPtrSlistIterator__pt__11_9CC_String __1iter ;
-
-( (__ct__21CC_List_Iterator_baseFP11CC_Listbase ( ((struct CC_List_Iterator_base *)(& __1iter )), ((struct CC_Listbase *)(((struct CC_Listbase *)(((struct CC_TPtrSlist__pt__11_9CC_String *)__0this )))))) ), (& __1iter )) ;
-if (__pp__21CC_List_Iterator_baseFv ( (struct CC_List_Iterator_base *)(& __1iter )) ){ 
-while (1 ){ 
-struct CC_Link__pt__11_9CC_String *__3elem ;
-
-__3elem = (((struct CC_Link__pt__11_9CC_String *)(((struct CC_Link__pt__11_9CC_String *)remove__11CC_ListbaseFR21CC_List_Iterator_base ( (struct CC_Listbase *)__0this , ((struct CC_List_Iterator_base *)(((struct CC_List_Iterator_base *)(& __1iter ))))) ))));
-if (__3elem ){ 
-__3elem -> f_element__26CC_Link__pt__11_9CC_String ?((*(((char (*)())(__3elem -> f_element__26CC_Link__pt__11_9CC_String -> __vptr__9CC_String [1]).f))))( ((struct CC_String *)((((char *)__3elem -> f_element__26CC_Link__pt__11_9CC_String ))+ (__3elem -> f_element__26CC_Link__pt__11_9CC_String -> __vptr__9CC_String [1]).d)),
-3) :0 ;
-__3elem -> f_element__26CC_Link__pt__11_9CC_String = 0 ;
-__dl__FPv ( (char *)__3elem ) ;
-}
-else { break ;
-
-}
-}
-}
-
-}
-}
-
-int key__29CC_TValSlistIterator__pt__2_iCFv (__0this )register struct CC_TValSlistIterator__pt__2_i *__0this ;
-{ 
-struct CC_Link__pt__2_i *__1link_item ;
-
-__1link_item = (((struct CC_Link__pt__2_i *)(((struct CC_Link__pt__2_i *)( ((struct CC_List_Iterator_base *)__0this )-> f_current__21CC_List_Iterator_base ) ))));
-if (__1link_item ){ 
-return ((*__1link_item -> f_element__16CC_Link__pt__2_i ));
-}
-else { 
-register struct ccException *__0__X154 ;
-
-register struct ccException *__0__X155 ;
-
-struct Exception *__2__Xtemp00m1g3bcg ;
-
-struct ccException *__0__X39 ;
-
-{ 
-struct ccException __0__V153 ;
-
-( (__0__X155 = ( (__0__X154 = ( ( (( (__ct__9ExceptionFv ( ((struct Exception *)(& __0__V153 ))) ), ((& __0__V153 )->
-__vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) ), (& __0__V153 )) , (& __0__V153 )) ), ( ((! __0__X154 -> f_thrown__9Exception )?(
-(__0__X154 -> f_thrown_as_pointer__9Exception = 0 ), 0 ) :0 ), __0__X154 ) ) ), ( (in_stack__12DestructableFv ( (struct Destructable *)__0__X155 ) ?( (__2__Xtemp00m1g3bcg =
-(struct Exception *)( (__0__X39 = (struct ccException *)__nw__9ExceptionSFUii ( sizeof (struct ccException ), 0 ) ), ( ((__0__X39 || (__0__X39 = (struct
-ccException *)( (((char *)__nw__FUi ( (sizeof (struct ccException))) ))) ))?( ( (__0__X39 = (struct ccException *)__ct__9ExceptionFRC9Exception ( ((struct Exception *)__0__X39 ), (struct
-Exception *)(((struct Exception *)(((struct Exception *)(((struct ccException *)__0__X155 ))))))) ), (__0__X39 -> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5])) , 0 ) :0 ), __0__X39 ) )
-), (((struct Exception *)((((struct ccException *)(((struct ccException *)__2__Xtemp00m1g3bcg ))))-> f_temporary__9Exception = 1 )))) :(__2__Xtemp00m1g3bcg = (struct Exception *)__0__X155 )), do_throw__9ExceptionFUiPCci ( __2__Xtemp00m1g3bcg , ((unsigned int
-)191 ), ((char *)"/VOB/olias/library/Common_Class/dti_cc/CC_Slist.cc"), 0 ) ) ) ;
-
-( (( ( ((& __0__V153 )-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[5]), (( ( ( ((((struct Exception *)(& __0__V153 )))?(
-( ((((struct Exception *)(& __0__V153 )))-> __vptr__12Destructable = (struct __mptr *) __ptbl_vec__TKTemplate_cc_[4]), ((((struct Exception *)(& __0__V153 )))?( ( __dt__12DestructableFv ( ((struct Destructable *)(((struct
-Exception *)(& __0__V153 )))), 0 ) , (( 0 ) )) , 0 ) :( 0 ) )) , 0 )
-:( 0 ) )) , (( 0 ) )) , 0 ) )) , 0 ) )) ;
-} 
-}
-}
-
-char __sti__TKTemplate_cc_______dummy1__ ()
-{ __ct__13Iostream_initFv ( & iostream_init ) ;
-
-}
-
-char __std__TKTemplate_cc_______dummy1__ ()
-{ __dt__13Iostream_initFv ( & iostream_init , 2) ;
-
-}
-static struct __linkl { struct __linkl * next;
-char (*ctor)(); char (*dtor)(); } __link = 
-{ (struct __linkl *)0, __sti__TKTemplate_cc_______dummy1__ ,__std__TKTemplate_cc_______dummy1__ };
-struct __mptr __vtbl__31CC_TPtrSlist__pt__11_9CC_String[] = {0,0,0,
-0,0,(__vptp)clearAndDestroy__31CC_TPtrSlist__pt__11_9CC_StringFv ,
-0,0,0};
-struct __mptr __vtbl__14Stack__pt__2_i[] = {0,0,0,
-0,0,(__vptp)__dt__14Stack__pt__2_iFv ,
-0,0,0};
-extern struct __mptr __vtbl__19ccBoundaryException[];
-extern struct __mptr __vtbl__17ccStringException[];
-extern struct __mptr __vtbl__11ccException[];
-static char print_exception__9ExceptionFv ();
-static char *class_name__9ExceptionFv ();
-static int isa__9ExceptionFPCc ();
-struct __mptr __vtbl__9Exception__TKTemplate_cc[] = {0,0,0,
-0,0,(__vptp)__dt__9ExceptionFv ,
-0,0,(__vptp)print_exception__9ExceptionFv ,
-0,0,(__vptp)class_name__9ExceptionFv ,
-0,0,(__vptp)isa__9ExceptionFPCc ,
-0,0,0};
-struct __mptr __vtbl__12Destructable__TKTemplate_cc[] = {0,0,0,
-0,0,(__vptp)__dt__12DestructableFv ,
-0,0,0};
-struct __mptr __vtbl__9CC_String__TKTemplate_cc[] = {0,0,0,
-0,0,(__vptp)__dt__9CC_StringFv ,
-0,0,0};
-struct __mptr __vtbl__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable[] = {0,0,0,
-0,0,(__vptp)clearAndDestroy__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectableFv ,
-0,0,0};
-struct __mptr __vtbl__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi[] = {0,0,0,
-0,0,(__vptp)clearAndDestroy__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_StringiFv ,
-0,0,0};
-
-static char *__opPCc__9CC_StringCFv (__0this )struct CC_String *__0this ;
-
-{ return (char *)__0this -> f_string__9CC_String ;
-
-}
-
-int is__9ExceptionFPCcT1 ();
-
-static int isa__9ExceptionFPCc (__0this , __2type )struct Exception *__0this ;
-
-char *__2type ;
-
-{ return is__9ExceptionFPCcT1 ( __0this , __2type , (char *)"Exception") ;
-
-}
-
-static char *class_name__9ExceptionFv (__0this )struct Exception *__0this ;
-{ return (char *)"Exception";
-
-}
-
-static char print_exception__9ExceptionFv (__0this )struct Exception *__0this ;
-{ }
-
-int initcount__13Iostream_init ;
-
-int stdstatus__13Iostream_init ;
-
-char (*stdioflush__3ios )();
-
-long nextword__3ios ;
-
-long nextbit__3ios ;
-
-long floatfield__3ios ;
-
-long adjustfield__3ios ;
-
-long basefield__3ios ;
-
-struct Jump_Environment *g_used_jump_env_stack__16Jump_Environment ;
-
-struct Jump_Environment *g_jump_env_stack__16Jump_Environment ;
-
-struct Unwind_Record g_stack__12Unwind_Stack [512];
-
-unsigned short g_top__12Unwind_Stack ;
-
-char *f_msg_memory_already_freed__10Exceptions ;
-
-char *f_msg_out_of_obj_stack_memory__10Exceptions ;
-
-char *f_msg_out_of_exception_memory__10Exceptions ;
-
-char *f_msg_throw_ptr_to_stack__10Exceptions ;
-
-char *f_msg_throw_from_destructor__10Exceptions ;
-
-char *f_msg_throw_from_error_handler__10Exceptions ;
-
-char *f_msg_throw_from_terminate__10Exceptions ;
-
-char *f_msg_no_current_exception__10Exceptions ;
-
-char *f_msg_not_caught__10Exceptions ;
-
-char *f_msg_initialized_twice__10Exceptions ;
-
-char *f_msg_not_initialized__10Exceptions ;
-
-char *f_msg_throw_message__10Exceptions ;
-
-char *f_msg_application_error__10Exceptions ;
-
-char *f_msg_internal_error__10Exceptions ;
-
- __Q2_10Exceptions15error_handler_t g_error_handler__10Exceptions ;
-
-char *g_next_avail__9Exception ;
-
-struct Exception *g_current_exception__9Exception ;
-
-unsigned short g_size__12Destructable ;
-
-char *g_stack_start__12Destructable ;
-struct __mptr* __ptbl_vec__TKTemplate_cc_[] = {
-__vtbl__50CC_TPtrSlist__pt__30_27kv_pair__pt__12_9CC_Stringi,
-__vtbl__64CC_TPtrSlist__pt__44_41kv_pair__pt__26_9CC_String13BTCollectable,
-__vtbl__9CC_String__TKTemplate_cc,
-__vtbl__12Destructable__TKTemplate_cc,
-__vtbl__9Exception__TKTemplate_cc,
-__vtbl__11ccException,
-__vtbl__17ccStringException,
-__vtbl__19ccBoundaryException,
-__vtbl__14Stack__pt__2_i,
-__vtbl__31CC_TPtrSlist__pt__11_9CC_String,
-
-};
-
-/* Include file stack for ObjectCenter dependency info */
-
-/* the end */
index d4b04f9276fb90c942bbb2c500488d17e96ffa8f..7aaf15e37265ba8e6abb9840fbb829a4a0ad450a 100644 (file)
@@ -1883,9 +1883,9 @@ static int input graphics_task_PROTO(( void ));
 
 graphics_task_DECL
     {
-    register graphics_task_state_type graphics_task_current_state;
-    register graphics_task_CHAR *graphics_task_cp, *graphics_task_bp;
-    register int graphics_task_act;
+    graphics_task_state_type graphics_task_current_state;
+    graphics_task_CHAR *graphics_task_cp, *graphics_task_bp;
+    int graphics_task_act;
 
 
 
@@ -2162,9 +2162,9 @@ case graphics_task_STATE_EOF(INITIAL):
 static int graphics_task_get_next_buffer()
 
     {
-    register graphics_task_CHAR *dest = graphics_task_current_buffer->graphics_task_ch_buf;
-    register graphics_task_CHAR *source = graphics_tasktext - 1; /* copy prev. char, too */
-    register int number_to_move, i;
+    graphics_task_CHAR *dest = graphics_task_current_buffer->graphics_task_ch_buf;
+    graphics_task_CHAR *source = graphics_tasktext - 1; /* copy prev. char, too */
+    int number_to_move, i;
     int ret_val;
 
     if ( graphics_task_c_buf_p > &graphics_task_current_buffer->graphics_task_ch_buf[graphics_task_n_chars + 1] )
@@ -2243,10 +2243,10 @@ static int graphics_task_get_next_buffer()
 static graphics_task_state_type graphics_task_get_previous_state()
 
     {
-    register graphics_task_state_type graphics_task_current_state;
-    register graphics_task_CHAR *graphics_task_cp;
+    graphics_task_state_type graphics_task_current_state;
+    graphics_task_CHAR *graphics_task_cp;
 
-    register graphics_task_CHAR *graphics_task_bp = graphics_tasktext;
+    graphics_task_CHAR *graphics_task_bp = graphics_tasktext;
 
     graphics_task_current_state = graphics_task_start;
     if ( graphics_task_bp[-1] == '\n' )
@@ -2278,15 +2278,15 @@ static graphics_task_state_type graphics_task_get_previous_state()
  */
 
 #ifdef graphics_task_USE_PROTOS
-static graphics_task_state_type graphics_task_try_NUL_trans( register graphics_task_state_type graphics_task_current_state )
+static graphics_task_state_type graphics_task_try_NUL_trans( graphics_task_state_type graphics_task_current_state )
 #else
 static graphics_task_state_type graphics_task_try_NUL_trans( graphics_task_current_state )
-register graphics_task_state_type graphics_task_current_state;
+graphics_task_state_type graphics_task_current_state;
 #endif
 
     {
-    register int graphics_task_is_jam;
-    register graphics_task_CHAR *graphics_task_cp = graphics_task_c_buf_p;
+    int graphics_task_is_jam;
+    graphics_task_CHAR *graphics_task_cp = graphics_task_c_buf_p;
 
     graphics_task_current_state = graphics_task_NUL_trans[graphics_task_current_state];
     graphics_task_is_jam = (graphics_task_current_state == 0);
@@ -2306,25 +2306,25 @@ register graphics_task_state_type graphics_task_current_state;
 
 #if 0
 #ifdef graphics_task_USE_PROTOS
-static void graphics_taskunput( graphics_task_CHAR c, register graphics_task_CHAR *graphics_task_bp )
+static void graphics_taskunput( graphics_task_CHAR c, graphics_task_CHAR *graphics_task_bp )
 #else
 static void graphics_taskunput( c, graphics_task_bp )
 graphics_task_CHAR c;
-register graphics_task_CHAR *graphics_task_bp;
+graphics_task_CHAR *graphics_task_bp;
 #endif
 
     {
-    register graphics_task_CHAR *graphics_task_cp = graphics_task_c_buf_p;
+    graphics_task_CHAR *graphics_task_cp = graphics_task_c_buf_p;
 
     /* undo effects of setting up graphics_tasktext */
     *graphics_task_cp = graphics_task_hold_char;
 
     if ( graphics_task_cp < graphics_task_current_buffer->graphics_task_ch_buf + 2 )
        { /* need to shift things up to make room */
-       register int number_to_move = graphics_task_n_chars + 2; /* +2 for EOB chars */
-       register graphics_task_CHAR *dest =
+       int number_to_move = graphics_task_n_chars + 2; /* +2 for EOB chars */
+       graphics_task_CHAR *dest =
            &graphics_task_current_buffer->graphics_task_ch_buf[graphics_task_current_buffer->graphics_task_buf_size + 2];
-       register graphics_task_CHAR *source =
+       graphics_task_CHAR *source =
            &graphics_task_current_buffer->graphics_task_ch_buf[number_to_move];
 
        while ( source > graphics_task_current_buffer->graphics_task_ch_buf )
index e9b87af5634b5022228f3b7efe4a4f298e203e99..3cbbe71488421dde588b394a9cddb0b3ba639ab7 100644 (file)
@@ -1760,9 +1760,9 @@ static int input YY_PROTO(( void ));
 
 YY_DECL
     {
-    register yy_state_type yy_current_state;
-    register YY_CHAR *yy_cp, *yy_bp;
-    register int yy_act;
+    yy_state_type yy_current_state;
+    YY_CHAR *yy_cp, *yy_bp;
+    int yy_act;
 
 
 
@@ -2135,9 +2135,9 @@ case YY_STATE_EOF(ProcessData):
 static int yy_get_next_buffer()
 
     {
-    register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
-    register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
-    register int number_to_move, i;
+    YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
+    YY_CHAR *source = yytext - 1; /* copy prev. char, too */
+    int number_to_move, i;
     int ret_val;
 
     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
@@ -2216,10 +2216,10 @@ static int yy_get_next_buffer()
 static yy_state_type yy_get_previous_state()
 
     {
-    register yy_state_type yy_current_state;
-    register YY_CHAR *yy_cp;
+    yy_state_type yy_current_state;
+    YY_CHAR *yy_cp;
 
-    register YY_CHAR *yy_bp = yytext;
+    YY_CHAR *yy_bp = yytext;
 
     yy_current_state = yy_start;
     if ( yy_bp[-1] == '\n' )
@@ -2251,15 +2251,15 @@ static yy_state_type yy_get_previous_state()
  */
 
 #ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
 #else
 static yy_state_type yy_try_NUL_trans( yy_current_state )
-register yy_state_type yy_current_state;
+yy_state_type yy_current_state;
 #endif
 
     {
-    register int yy_is_jam;
-    register YY_CHAR *yy_cp = yy_c_buf_p;
+    int yy_is_jam;
+    YY_CHAR *yy_cp = yy_c_buf_p;
 
     yy_current_state = yy_NUL_trans[yy_current_state];
     yy_is_jam = (yy_current_state == 0);
@@ -2279,25 +2279,25 @@ register yy_state_type yy_current_state;
 
 #if 0
 #ifdef YY_USE_PROTOS
-static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
+static void yyunput( YY_CHAR c, YY_CHAR *yy_bp )
 #else
 static void yyunput( c, yy_bp )
 YY_CHAR c;
-register YY_CHAR *yy_bp;
+YY_CHAR *yy_bp;
 #endif
 
     {
-    register YY_CHAR *yy_cp = yy_c_buf_p;
+    YY_CHAR *yy_cp = yy_c_buf_p;
 
     /* undo effects of setting up yytext */
     *yy_cp = yy_hold_char;
 
     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
        { /* need to shift things up to make room */
-       register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
-       register YY_CHAR *dest =
+       int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
+       YY_CHAR *dest =
            &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
-       register YY_CHAR *source =
+       YY_CHAR *source =
            &yy_current_buffer->yy_ch_buf[number_to_move];
 
        while ( source > yy_current_buffer->yy_ch_buf )
index aa09d8dff6b8f251104813ed73efbd93ae77bd0f..4e5ff03d4313b7755f2b2604472d63638fa24501 100644 (file)
@@ -24,9 +24,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-int main(argc, argv)
-int argc ;
-char **argv; 
+int main(int argc, char **argv)
 {
   /* first parameter d or h */
   /* second parameter is library name, other params are classnames  */
index 2f076a822a80234b7e592832c03e3247562f39c5..639fb839f7a1862ad667fa277d481a8550e875a9 100644 (file)
@@ -422,9 +422,9 @@ static int input YY_PROTO(( void ));
 
 YY_DECL
     {
-    register yy_state_type yy_current_state;
-    register YY_CHAR *yy_cp, *yy_bp;
-    register int yy_act;
+    yy_state_type yy_current_state;
+    YY_CHAR *yy_cp, *yy_bp;
+    int yy_act;
 
 
 
@@ -470,7 +470,7 @@ YY_DECL
 yy_match:
        do
            {
-           register YY_CHAR yy_c = yy_ec[*yy_cp];
+           YY_CHAR yy_c = yy_ec[*yy_cp];
            if ( yy_accept[yy_current_state] )
                {
                yy_last_accepting_state = yy_current_state;
@@ -734,9 +734,9 @@ ECHO;
 static int yy_get_next_buffer()
 
     {
-    register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
-    register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
-    register int number_to_move, i;
+    YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
+    YY_CHAR *source = yytext - 1; /* copy prev. char, too */
+    int number_to_move, i;
     int ret_val;
 
     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
@@ -815,10 +815,10 @@ static int yy_get_next_buffer()
 static yy_state_type yy_get_previous_state()
 
     {
-    register yy_state_type yy_current_state;
-    register YY_CHAR *yy_cp;
+    yy_state_type yy_current_state;
+    YY_CHAR *yy_cp;
 
-    register YY_CHAR *yy_bp = yytext;
+    YY_CHAR *yy_bp = yytext;
 
     yy_current_state = yy_start;
     if ( yy_bp[-1] == '\n' )
@@ -826,7 +826,7 @@ static yy_state_type yy_get_previous_state()
 
     for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
        {
-       register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
+       YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
        if ( yy_accept[yy_current_state] )
            {
            yy_last_accepting_state = yy_current_state;
@@ -852,17 +852,17 @@ static yy_state_type yy_get_previous_state()
  */
 
 #ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
 #else
 static yy_state_type yy_try_NUL_trans( yy_current_state )
-register yy_state_type yy_current_state;
+yy_state_type yy_current_state;
 #endif
 
     {
-    register int yy_is_jam;
-    register YY_CHAR *yy_cp = yy_c_buf_p;
+    int yy_is_jam;
+    YY_CHAR *yy_cp = yy_c_buf_p;
 
-    register YY_CHAR yy_c = 1;
+    YY_CHAR yy_c = 1;
     if ( yy_accept[yy_current_state] )
        {
        yy_last_accepting_state = yy_current_state;
@@ -882,25 +882,25 @@ register yy_state_type yy_current_state;
 
 #if 0
 #ifdef YY_USE_PROTOS
-static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
+static void yyunput( YY_CHAR c, YY_CHAR *yy_bp )
 #else
 static void yyunput( c, yy_bp )
 YY_CHAR c;
-register YY_CHAR *yy_bp;
+YY_CHAR *yy_bp;
 #endif
 
     {
-    register YY_CHAR *yy_cp = yy_c_buf_p;
+    YY_CHAR *yy_cp = yy_c_buf_p;
 
     /* undo effects of setting up yytext */
     *yy_cp = yy_hold_char;
 
     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
        { /* need to shift things up to make room */
-       register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
-       register YY_CHAR *dest =
+       int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
+       YY_CHAR *dest =
            &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
-       register YY_CHAR *source =
+       YY_CHAR *source =
            &yy_current_buffer->yy_ch_buf[number_to_move];
 
        while ( source > yy_current_buffer->yy_ch_buf )
index c36c7b933418d986ab3a8db6d166e20888a6c154..8b3df3d42185275bce3c6412e48782e3fc76b659 100644 (file)
@@ -24,9 +24,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-int main(argc, argv)
-int argc ;
-char **argv ;
+int main(int argc, char **argv)
 {
   FILE *f ;
   int i;
index fa35fac4a8938577ae0c42c5ab8354c35bee0771..6be8ec40d7f9540f118b93a4bff8ef378394ed3e 100644 (file)
@@ -38,16 +38,7 @@ LOCAL_LDFLAGS = -bE:dtksh.exp
 EXTRA_DEFINES = -DDYNLIB
 #endif
 
-#if defined(HPOSFArchitecture)
-#endif
-
-
-#if defined(ApolloArchitecture)
-EXTRA_INCLUDES = -I/bsd4.3/usr/include -I/sys5/usr/include \
-       -I$(DTHELPSRC) -I$(DTPRINTSRC)
-#else
 EXTRA_INCLUDES = -I$(DTHELPSRC) -I$(DTPRINTSRC)
-#endif
 
 #ifdef SunArchitecture
 .NO_PARALLEL:
index 0ded7d79e2068fcb554534d1e6ad63601b3122d9..570b9586efcbe3453d0b1cd03428fd4a82bd434c 100644 (file)
@@ -200,11 +200,11 @@ DtCompareISOLatin1(
         char *first,
         char *second )
 {
-    register unsigned char *ap, *bp;
+    unsigned char *ap, *bp;
 
     for (ap = (unsigned char *) first, bp = (unsigned char *) second;
         *ap && *bp; ap++, bp++) {
-       register unsigned char a, b;
+       unsigned char a, b;
 
        if ((a = *ap) != (b = *bp)) {
            /* try lowercasing and try again */
index bf812e3b03d86b28fb0a76970723e4abdc9ce4d0..b2683d90a67971c1b0e604feaad6c009bd38c70e 100644 (file)
@@ -202,11 +202,6 @@ const struct shtable3 shtab_builtins[] =
        "wait",         NV_BLTIN|BLT_ENV|BLT_EXIT,      bltin(wait),
         "type",         NV_BLTIN|BLT_ENV,               bltin(whence),
        "whence",       NV_BLTIN|BLT_ENV,               bltin(whence),
-#ifdef apollo
-       "inlib",        NV_BLTIN|BLT_ENV,               bltin(inlib),
-       "rootnode",     NV_BLTIN,                       bltin(rootnode),
-       "ver",          NV_BLTIN,                       bltin(ver),
-#endif /* apollo */
        "/bin/basename",NV_BLTIN|NV_NOFREE,             bltin(basename),
        "/bin/chmod",   NV_BLTIN|NV_NOFREE,             bltin(chmod),
        "/bin/dirname", NV_BLTIN|NV_NOFREE,             bltin(dirname),
index 9980d6d6ef1f33820617a2c86fb91151db5b031f..f9367682788bc36cfb7e2118bb5ee255474bfba9 100644 (file)
@@ -294,7 +294,7 @@ do_call(
        char *p;
        char dorun, promptflag;
        unsigned char freeval, ret_type;
-       register int i, j, ret;
+       int i, j, ret;
         char * msg;
         char * errbuf;
         char * errmsg;
index 2e66355b23be2d777956688139f2cf560b8b83db..1c1e273f4c504b644119bf7cbf7bfc908721fd3a 100644 (file)
@@ -69,7 +69,7 @@
 #include "msgs.h"
 #include <locale.h>
 
-extern Namval_t *sh_assignok(register Namval_t *np,int add);
+extern Namval_t *sh_assignok(Namval_t *np,int add);
 
 
 static void PendingDestroy( 
@@ -542,8 +542,8 @@ parse_args(
        char ** pargv ,
        Boolean postponePixmaps )
 {
-       register int i;
-       register char *colon, *resource, *val, *p;
+       int i;
+       char *colon, *resource, *val, *p;
        XtArgVal argval;
        int freeflag, len;
         char * errmsg;
@@ -638,7 +638,7 @@ free_args(
         int n,
         Arg *args )
 {
-       register int i;
+       int i;
 
        /*
         * Free up argument pointers
@@ -700,7 +700,7 @@ _CreateWidget(
        wtab_t *w, *pw, *wtab;
        char *wname, *wclass, *parentid, *var;
        Arg     args[MAXARGS];
-       register int    i;
+       int     i;
        int n;
         char * errmsg;
        int pargc;
@@ -777,7 +777,7 @@ do_XtCreateApplicationShell(
        wtab_t *w, *wtab;
        char *wname, *wclass, *var;
        Arg     args[MAXARGS];
-       register int    i;
+       int     i;
        int n;
         char * errmsg;
        int pargc;
@@ -916,7 +916,7 @@ do_single_widget_arg_func(
         char **argv )
 {
        wtab_t *w;
-       register int i;
+       int i;
         char * errmsg;
 
        if (argc < 2) {
@@ -950,7 +950,7 @@ do_single_widget_test_func(
         char **argv )
 {
        wtab_t *w;
-       register int i;
+       int i;
         char * errmsg;
 
        if (argc != 2) {
@@ -985,7 +985,7 @@ do_XtIsShell(
         char *argv[] )
 {
    wtab_t *w;
-   register int i;
+   int i;
    char * errmsg;
 
    if (argc != 2) 
@@ -1044,7 +1044,7 @@ do_XtMapWidget(
         char *argv[] )
 {
        wtab_t *w;
-       register int i;
+       int i;
         char * errmsg;
 
        if (argc < 2) {
@@ -1068,7 +1068,7 @@ do_XtUnmapWidget(
         char **argv )
 {
        wtab_t *w;
-       register int i;
+       int i;
         char * errmsg;
 
        if (argc < 2) {
@@ -1681,7 +1681,7 @@ do_XtGetValues(
         int argc,
         char **argv )
 {
-       register int i, j;
+       int i, j;
        int n;
        char *arg0 = argv[0];
        char *val, *p, *str;
@@ -2030,7 +2030,7 @@ do_managelist_func(
         int (*func)() )
 {
        wtab_t *w;
-       register int i;
+       int i;
        Widget widgets[MAXARGS];
        Cardinal nwidgets;
         char * errmsg;
@@ -2059,7 +2059,7 @@ do_XtIsSubclass(
         char *argv[] )
 {
    wtab_t *w;
-   register int i;
+   int i;
    char * errmsg;
 
    if (argc != 3) 
@@ -2095,7 +2095,7 @@ do_XtClass(
         char *argv[] )
 {
    wtab_t *w;
-   register int i;
+   int i;
    char * errmsg;
    WidgetClass class;
 
@@ -2346,7 +2346,7 @@ do_XtRemoveAllCallbacks(
         char *argv[] )
 {
        wtab_t *w;
-       register int i;
+       int i;
         char * errmsg;
 
        if (argc != 3) {
@@ -2480,7 +2480,7 @@ invokeXDrawFunction(
    unsigned int width, height;
    char *s;
    char *sp;
-   register int i;
+   int i;
    int mode, parse;
    int text = FALSE;
    int (*func)();
@@ -3307,7 +3307,7 @@ do_XtAddInput(
         int argc,
         char *argv[] )
 {
-   register int i, j;
+   int i, j;
    int fd;
    char *arg0 = argv[0];
    char *variable;
@@ -3811,7 +3811,7 @@ stdInputCB(
    char cmdbuf[LINESIZE];
    int cmd;
    char *p;
-   register int i, n, j;
+   int i, n, j;
    char * errmsg;
    int len;
 
index cbd2e077adad3c6ba7915721ddad7104d5544c1a..a03ccf6f174c946e3849307202697ed4155dc8b4 100644 (file)
@@ -450,7 +450,7 @@ DtkshCvtCallbackToString(
 {
    XtCallbackList cb;
    char buf[2048];
-   register char *p;
+   char *p;
    char * errmsg;
    Boolean count = 0;
 
index dabb722c9ba7d78d94dfe3c16c7b1896023a21fe..88fe732aeea96756331ba472b255af6e3ae0364c 100644 (file)
@@ -431,7 +431,6 @@ $set 25
 125 Resources lost
 126 Reverting to old tty driver...
 127 S [mask]
-128 SIGAPOLLO
 129 Security label changed
 130 Socket interrupt
 131 Sound completed
index 395f4c3466c6c5bbbf1e285f5ab20f4878a90a37..85dfcc713f9eb6be03b9ea58858b9849754e5c1d 100644 (file)
@@ -139,7 +139,7 @@ xk_prin_int(
         unsigned long *old_v )
 
 {
-       register int i, printed = 0;
+       int i, printed = 0;
        struct symlist *sym;
        unsigned long v;
 
@@ -226,7 +226,7 @@ xk_par_int(
         long *v,
         struct envsymbols *env )
 {
-       register int ret, base;
+       int ret, base;
        char *p, *q, *pp;
        char nbuf[512];
 
@@ -339,7 +339,7 @@ xk_prin_charstr(
         unsigned char *str,
         int len )
 {
-       register int i;
+       int i;
 
        if (str == NULL)
                *buf += lsprintf(*buf, "NULL");
@@ -390,7 +390,7 @@ xk_prin_hexstr(
         char *str,
         int len )
 {
-       register int i;
+       int i;
        unsigned char tempc;
 
        if (str == NULL)
@@ -443,7 +443,7 @@ xk_par_charstr(
         char **str,
         int *len )
 {
-       register int i;
+       int i;
        char delim;
        int didmalloc = FALSE, getmode;
        char cbuf[3];   /* conversion buffer for hex strings */
index 634f8cc1c63ffbb5741c7ad0e6672121fe00db3d..4b157464d239e79ed13aef00c80561548ff2bdca 100644 (file)
@@ -168,7 +168,7 @@ xk_parse(
         memtbl_t *(*tbl_find)() )
 {
        memtbl_t *ntbl;
-       register int i = 0;
+       int i = 0;
        int skind, delim_type;
        long val = 0;           /* used for choice selection */
        char *np;
@@ -726,7 +726,7 @@ xk_print(
         memtbl_t *(*tbl_find)() )
 {
        memtbl_t *ntbl;
-       register int i;
+       int i;
        long val;               /* used for choice selection */
        char *np;
        int delim = _Delim;
@@ -962,7 +962,7 @@ xk_free(
         memtbl_t *(*tbl_find)() )
 {
        memtbl_t *ntbl;
-       register int i;
+       int i;
        long val;               /* used for choice selection */
        char *np;
        int delim = _Delim;
index 9f6ec45960a08bbdd6f3ea025a1b741c3ca99896..f183ab4cb5eae862dd8fa11f56b20965bb591333 100644 (file)
@@ -113,7 +113,7 @@ env_set_var(
         char *var,
         char *val )
 {
-       register int len;
+       int len;
        char tmp[512];
        char *set = &tmp[0];
 
index df95e855acd9091e8b3abbc27aa1b87d0f14f849..ead47dc853a26827ee7af12565bcab808d31dd4a 100644 (file)
@@ -129,7 +129,7 @@ error __PARAM__((int level, const char* file, const char* msg), (level, file, ms
  */
 
 static int
-shipnewer __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){
+shipnewer __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){
        unsigned long   ref;
        struct stat     st;
 
@@ -146,9 +146,9 @@ static char         buf[4096];
 
 static unsigned long
 sealfile __PARAM__((char* file, int fd, unsigned long s), (file, fd, s)) __OTORP__(char* file; int fd; unsigned long s;){
-       register unsigned char* b;
-       register unsigned char* e;
-       register int            n;
+       unsigned char*  b;
+       unsigned char*  e;
+       int             n;
 
        HASHPART(s, 0);
        while ((n = read(fd, buf, sizeof(buf))) > 0)
@@ -166,9 +166,9 @@ sealfile __PARAM__((char* file, int fd, unsigned long s), (file, fd, s)) __OTORP
  */
 
 static int
-shipseal __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){
-       register char*  f;
-       register int    fd;
+shipseal __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){
+       char*   f;
+       int     fd;
        unsigned long   s;
 
        s = 0;
@@ -192,9 +192,9 @@ shipseal __PARAM__((register char** argv), (argv)) __OTORP__(register char** arg
  */
 
 static int
-shipstate __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){
-       register char*  s;
-       register int    c;
+shipstate __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){
+       char*   s;
+       int     c;
        long            ref;
        struct stat     st;
 
@@ -225,7 +225,7 @@ shipstate __PARAM__((register char** argv), (argv)) __OTORP__(register char** ar
  */
 
 static int
-shiptime __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){
+shiptime __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){
        struct stat     st;
        time_t          date;
 
@@ -262,8 +262,8 @@ static struct optab ops[] =
 
 int
 main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-       register char*  s;
-       register int    i;
+       char*   s;
+       int     i;
 
        if (!(s = *++argv))
                exit(0);
index a5f3496054add092307ada15c144b5b9071c322f..0688e24540e556e7b94754f2434e201ecd660051 100644 (file)
@@ -2037,12 +2037,12 @@ static char*    oct = &hex[14];
 
 
 void
-ppfsm __PARAM__((int op, register char* s), (op, s)) __OTORP__(int op; register char* s;){
-       register int                    c;
-       register int                    n;
-       register int                    i;
-       register short*                 rp;
-       register struct fsminit*        fp;
+ppfsm __PARAM__((int op, char* s), (op, s)) __OTORP__(int op; char* s;){
+       int                     c;
+       int                     n;
+       int                     i;
+       short*                  rp;
+       struct fsminit* fp;
 
 
 
@@ -2556,8 +2556,8 @@ static int                errors;
 
 
 static int
-sstrlen __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
-       register char*  b;
+sstrlen __PARAM__((char* s), (s)) __OTORP__(char* s;){
+       char*   b;
 
        for (b = s; *s; s++);
        return(s - b);
@@ -2568,8 +2568,8 @@ sstrlen __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
 
 
 static int
-sstrncmp __PARAM__((register char* s, register char* t, register int n), (s, t, n)) __OTORP__(register char* s; register char* t; register int n;){
-       register char*  e = s + n;
+sstrncmp __PARAM__((char* s, char* t, int n), (s, t, n)) __OTORP__(char* s; char* t; int n;){
+       char*   e = s + n;
 
        while (s < e)
        {
@@ -2585,8 +2585,8 @@ sstrncmp __PARAM__((register char* s, register char* t, register int n), (s, t,
 
 
 static char*
-memcopy __PARAM__((register char* s, register char* t, int n), (s, t, n)) __OTORP__(register char* s; register char* t; int n;){
-       register char*  e = t + n;
+memcopy __PARAM__((char* s, char* t, int n), (s, t, n)) __OTORP__(char* s; char* t; int n;){
+       char*   e = t + n;
 
        while (t < e) *s++ = *t++;
        return(s);
@@ -2597,7 +2597,7 @@ memcopy __PARAM__((register char* s, register char* t, int n), (s, t, n)) __OTOR
 
 
 static char*
-strcopy __PARAM__((register char* s, register char* t), (s, t)) __OTORP__(register char* s; register char* t;){
+strcopy __PARAM__((char* s, char* t), (s, t)) __OTORP__(char* s; char* t;){
        while (*s++ = *t++);
        return(s - 1);
 }
@@ -2612,8 +2612,8 @@ strcopy __PARAM__((register char* s, register char* t), (s, t)) __OTORP__(regist
 
 
 static char*
-comment __PARAM__((register char* p, register char* s, register int n, int u), (p, s, n, u)) __OTORP__(register char* p; register char* s; register int n; int u;){
-       register char*  e;
+comment __PARAM__((char* p, char* s, int n, int u), (p, s, n, u)) __OTORP__(char* p; char* s; int n; int u;){
+       char*   e;
        char*           m;
 
        if (!s)
@@ -2675,10 +2675,10 @@ typedef struct
 } Notice_t;
 
 static char*
-copyright __PARAM__((register char* p, register char* s), (p, s)) __OTORP__(register char* p; register char* s;){
-       register char*  v;
-       register char*  x;
-       register int    c;
+copyright __PARAM__((char* p, char* s), (p, s)) __OTORP__(char* p; char* s;){
+       char*   v;
+       char*   x;
+       int     c;
        int             i;
        int             n;
        unsigned long   h;
@@ -2909,8 +2909,8 @@ copyright __PARAM__((register char* p, register char* s), (p, s)) __OTORP__(regi
 
 
 static char*
-number __PARAM__((register char* p, register long n), (p, n)) __OTORP__(register char* p; register long n;){
-       register long   d;
+number __PARAM__((char* p, long n), (p, n)) __OTORP__(char* p; long n;){
+       long    d;
 
        for (d = 1000000; d > 1; d /= 10)
                if (n >= d) *p++ = '0' + (n / d) % 10;
@@ -2925,13 +2925,13 @@ number __PARAM__((register char* p, register long n), (p, n)) __OTORP__(register
 
 static void
 proto_error __PARAM__((char* iob, int level, char* msg, char* arg), (iob, level, msg, arg)) __OTORP__(char* iob; int level; char* msg; char* arg;){
-       register char*  p;
+       char*   p;
        char            buf[1024];
 
        p = strcopy(buf, "proto: ");
        if (iob)
        {
-               register struct proto*  proto = (struct proto*)(iob - sizeof(struct proto));
+               struct proto*   proto = (struct proto*)(iob - sizeof(struct proto));
 
                if (proto->line)
                {
@@ -2977,7 +2977,7 @@ proto_error __PARAM__((char* iob, int level, char* msg, char* arg), (iob, level,
 
 
 static char*
-linesync __PARAM__((register struct proto* proto, register char* p, register long n), (proto, p, n)) __OTORP__(register struct proto* proto; register char* p; register long n;){
+linesync __PARAM__((struct proto* proto, char* p, long n), (proto, p, n)) __OTORP__(struct proto* proto; char* p; long n;){
 
        if (proto->flags & (1L<<12))
 
@@ -3077,12 +3077,12 @@ init __PARAM__((char* op, int flags), (op, flags)) __OTORP__(char* op; int flags
 
 
 static int
-lex __PARAM__((register struct proto* proto, register long flags), (proto, flags)) __OTORP__(register struct proto* proto; register long flags;){
-       register char*          ip;
-       register char*          op;
-       register int            c;
-       register int            state;
-       register short*         rp;
+lex __PARAM__((struct proto* proto, long flags), (proto, flags)) __OTORP__(struct proto* proto; long flags;){
+       char*           ip;
+       char*           op;
+       int             c;
+       int             state;
+       short*          rp;
        char*                   m;
        char*                   e;
        char*                   t;
@@ -4478,7 +4478,7 @@ if !defined(va_start)\n\
 
 void
 pppclose __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){
-       register struct proto*  proto = (struct proto*)(iob - sizeof(struct proto));
+       struct proto*   proto = (struct proto*)(iob - sizeof(struct proto));
 
        if (proto->flags & (1L<<15)) close(proto->fd);
        free((char*)proto);  
@@ -4496,10 +4496,10 @@ pppclose __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){
 
 char*
 pppopen __PARAM__((char* file, int fd, char* notice, int flags), (file, fd, notice, flags)) __OTORP__(char* file; int fd; char* notice; int flags;){
-       register struct proto*  proto;
-       register char*          iob;
-       register long           n;
-       register char*          s;
+       struct proto*   proto;
+       char*           iob;
+       long            n;
+       char*           s;
        int                     pragma;
        char*                   b;
 
@@ -4771,8 +4771,8 @@ pppopen __PARAM__((char* file, int fd, char* notice, int flags), (file, fd, noti
 
 int
 pppread __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){
-       register struct proto*  proto = (struct proto*)(iob - sizeof(struct proto));
-       register int            n;
+       struct proto*   proto = (struct proto*)(iob - sizeof(struct proto));
+       int             n;
 
        if (proto->flags & (1L<<17))
        {
@@ -4796,9 +4796,9 @@ pppread __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){
 
                        if (proto->flags & (1L<<29))
                        {
-                               register char*  ip = proto->ip;
-                               register char*  op = proto->ob;
-                               register char*  ep = proto->ob + proto->oz - 2;
+                               char*   ip = proto->ip;
+                               char*   op = proto->ob;
+                               char*   ep = proto->ob + proto->oz - 2;
 
                                if (!*ip)
                                {
index df711165f7f71f9c40b89b152850ff73f39fe9fe..ae102ab248850cecc19d1521d76e41497b6fbbc5 100644 (file)
@@ -120,7 +120,7 @@ static void trap_timeout __PROTO__((__V_*));
  * insert timeout item on current given list in sorted order
  */
 static __V_ *time_add __PARAM__((struct tevent *item, __V_ *list), (item, list)) __OTORP__(struct tevent *item; __V_ *list;){
-       register struct tevent *tp = (struct tevent*)list;
+       struct tevent *tp = (struct tevent*)list;
        if(!tp || item->milli < tp->milli)
        {
                item->next = tp;
@@ -141,8 +141,8 @@ static __V_ *time_add __PARAM__((struct tevent *item, __V_ *list), (item, list))
 /*
  * delete timeout item from current given list, delete timer
  */
-static         __V_ *time_delete __PARAM__((register struct tevent *item, __V_ *list), (item, list)) __OTORP__(register struct tevent *item; __V_ *list;){
-       register struct tevent *tp = (struct tevent*)list;
+static         __V_ *time_delete __PARAM__((struct tevent *item, __V_ *list), (item, list)) __OTORP__(struct tevent *item; __V_ *list;){
+       struct tevent *tp = (struct tevent*)list;
        if(item==tp)
                list = (__V_*)tp->next;
        else
@@ -158,12 +158,12 @@ static    __V_ *time_delete __PARAM__((register struct tevent *item, __V_ *list),
 }
 
 static void    print_alarms __PARAM__((__V_ *list), (list)) __OTORP__(__V_ *list;){
-       register struct tevent *tp = (struct tevent*)list;
+       struct tevent *tp = (struct tevent*)list;
        while(tp)
        {
                if(tp->timeout)
                {
-                       register char *name = nv_name(tp->node);
+                       char *name = nv_name(tp->node);
                        if(tp->flags&R_FLAG)
                        {
                                double d = tp->milli;
@@ -177,7 +177,7 @@ static void print_alarms __PARAM__((__V_ *list), (list)) __OTORP__(__V_ *list;){
 }
 
 static void    trap_timeout __PARAM__((__V_* handle), (handle)) __OTORP__(__V_* handle;){
-       register struct tevent *tp = (struct tevent*)handle;
+       struct tevent *tp = (struct tevent*)handle;
        sh.trapnote |= SH_SIGTRAP;
        if(!(tp->flags&R_FLAG))
                tp->timeout = 0;
@@ -188,8 +188,8 @@ static void trap_timeout __PARAM__((__V_* handle), (handle)) __OTORP__(__V_* han
 }
 
 void   sh_timetraps __PARAM__((void), ()){
-       register struct tevent *tp, *tpnext;
-       register struct tevent *tptop;
+       struct tevent *tp, *tpnext;
+       struct tevent *tptop;
        while(1)
        {
                sh.sigflag[SIGALRM] &= ~SH_SIGTRAP;
@@ -222,7 +222,7 @@ void        sh_timetraps __PARAM__((void), ()){
 static char *setdisc __PARAM__((Namval_t *np, const char *event, Namval_t* action, Namfun_t
  *fp), (np, event, action, fp)) __OTORP__(Namval_t *np; const char *event; Namval_t* action; Namfun_t
  *fp;){
-        register struct tevent *tp = (struct tevent*)fp;
+        struct tevent *tp = (struct tevent*)fp;
        if(!event)
                return(action?"":(char*)ALARM);
        if(strcmp(event,ALARM)!=0)
@@ -241,8 +241,8 @@ static char *setdisc __PARAM__((Namval_t *np, const char *event, Namval_t* actio
  * catch assignments and set alarm traps
  */
 static void putval __PARAM__((Namval_t* np, const char* val, int flag, Namfun_t* fp), (np, val, flag, fp)) __OTORP__(Namval_t* np; const char* val; int flag; Namfun_t* fp;){
-       register struct tevent *tp;
-       register double d;
+       struct tevent *tp;
+       double d;
        if(val)
        {
                double now;
@@ -290,9 +290,9 @@ static const Namdisc_t alarmdisc =
 };
 
 int    b_alarm __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
-       register int n,rflag=0;
-       register Namval_t *np;
-       register struct tevent *tp;
+       int n,rflag=0;
+       Namval_t *np;
+       struct tevent *tp;
        NOT_USED(extra);
        while (n = optget(argv, sh_optalarm)) switch (n)
        {
index 18dfeba61997af7dcabfa79fe8eef297ce757123..da85d28026c317bdbdae391cf07529dedee17b65 100644 (file)
 #include       <ls.h>
 
 int    b_cd __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc; char *argv[];__V_ *extra;){
-       register char *dir, *cdpath="";
-       register const char *dp;
+       char *dir, *cdpath="";
+       const char *dp;
        int saverrno=0;
        int rval,flag = (sh_isoption(SH_PHYSICAL)!=0);
        char *oldpwd;
@@ -174,7 +174,7 @@ int b_cd __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) __
                }
                if(!flag)
                {
-                       register char *cp;
+                       char *cp;
                        stakseek(PATH_MAX+PATH_OFFSET);
 #ifdef SHOPT_FS_3D
                        if(!(cp = pathcanon(stakptr(PATH_OFFSET),PATH_DOTDOT)))
@@ -235,8 +235,8 @@ success:
 }
 
 int    b_pwd __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc; char *argv[];__V_ *extra;){
-       register int n, flag = (sh_isoption(SH_PHYSICAL)!=0);
-       register char *cp;
+       int n, flag = (sh_isoption(SH_PHYSICAL)!=0);
+       char *cp;
        NOT_USED(extra);
        NOT_USED(argc);
        while((n = optget(argv,sh_optpwd))) switch(n)
index a28990a657d5da0d905521334cf407b3eb1a9f23..ccbd2da09f1322d74d7dd51ca0a9e40f15e6ca9e 100644 (file)
 /*
  * return and exit
  */
-int    b_ret_exit __PARAM__((register int n, register char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(register int n; register char *argv[];__V_ *extra;){
+int    b_ret_exit __PARAM__((int n, char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(int n; char *argv[];__V_ *extra;){
        struct checkpt *pp = (struct checkpt*)sh.jmplist;
-       register char *arg;
+       char *arg;
        NOT_USED(extra);
        while((n = optget(argv,sh_optcflow))) switch(n)
        {
@@ -133,9 +133,9 @@ done:
 /*
  * break and continue
  */
-int    b_brk_cont __PARAM__((register int n, register char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(register int n; register char *argv[];__V_ *extra;){
+int    b_brk_cont __PARAM__((int n, char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(int n; char *argv[];__V_ *extra;){
        char *arg;
-       register int cont= **argv=='c';
+       int cont= **argv=='c';
        NOT_USED(extra);
        while((n = optget(argv,sh_optcflow))) switch(n)
        {
index 8374470ab6c8d6a18b3b7f342803bcdd6331b177..0bf7ddb29723825511447626ac8c6bd346ffe795 100644 (file)
 #define next_config(p) ((Shtable_t*)((char*)(p) + sizeof(*shtab_config)))
 #define MIN_LEN        20
 
-int    b_getconf __PARAM__((register int argc, char *argv[]), (argc, argv)) __OTORP__(register int argc; char *argv[];){
-       register int m,n;
-       register long val;
-       register const char *name, *path="";
+int    b_getconf __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
+       int m,n;
+       long val;
+       const char *name, *path="";
        int offset = staktell();
        const Shtable_t *tp = shtab_config;
        error_info.id = argv[0];
index d64d3a61c942ba2a95f5d604f30f7ca50099f5cd..c6abdbccd2bef194e8534f88c3ea73c2895d0e98 100644 (file)
@@ -99,9 +99,9 @@
 #include       "builtins.h"
 
 int    b_getopts __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
-       register char *options=error_info.context->id;
-       register Namval_t *np;
-       register int flag, mode, r=0;
+       char *options=error_info.context->id;
+       Namval_t *np;
+       int flag, mode, r=0;
        static char value[2], key[2];
        NOT_USED(extra);
        while((flag = optget(argv,sh_optgetopts))) switch(flag)
index e346bc8c031ea56eae61cd28eaa8fd85256e07f5..35001f20046e37fd51f59bf1ab5bc9169414961b 100644 (file)
 static void hist_subst __PROTO__((const char*, int fd, char*));
 
 int    b_hist __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){
-       register History_t *hp;
-       register char *arg;
-       register int flag,fdo;
+       History_t *hp;
+       char *arg;
+       int flag,fdo;
        struct stat statb;
        time_t before;
        Sfio_t *outfile;
@@ -258,25 +258,7 @@ int        b_hist __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra))
        arg = edit;
        if(!arg && !(arg=nv_getval(nv_scoped(HISTEDIT))) && !(arg=nv_getval(nv_scoped(FCEDNOD))))
                arg = (char*)e_defedit;
-#ifdef apollo
-       /*
-        * Code to support the FC using the pad editor.
-        * Exampled of how to use: HISTEDIT=pad
-        */
-       if (strcmp (arg, "pad") == 0)
-       {
-               extern __MANGLE__ int pad_create __PROTO__((char*));
-               sh_close(fdo);
-               fdo = pad_create(fname);
-               pad_wait(fdo);
-               unlink(fname);
-               strcat(fname, ".bak");
-               unlink(fname);
-               lseek(fdo,(off_t)0,SEEK_SET);
-       }
-       else
-       {
-#endif /* apollo */
+
        if(*arg != '-')
        {
                char *com[3];
@@ -288,9 +270,7 @@ int b_hist __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra))
        fdo = sh_chkopen(fname);
        unlink(fname);
        free((__V_*)fname);
-#ifdef apollo
-       }
-#endif /* apollo */
+
        /* don't history fc itself unless forked */
        error_info.flags |= ERROR_SILENT;
        if(!sh_isstate(SH_FORKED))
@@ -321,9 +301,9 @@ int b_hist __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra))
  */
 
 static void hist_subst __PARAM__((const char *command,int fd,char *replace), (command, fd, replace)) __OTORP__(const char *command;int fd;char *replace;){
-       register char *newp=replace;
-       register char *sp;
-       register int c;
+       char *newp=replace;
+       char *sp;
+       int c;
        off_t size;
        char *string;
        while(*++newp != '='); /* skip to '=' */
index 890a13c6f0ad5508275429c2e6490c0b2e801a43..56731d0e056d7631238191b213aee99a76d3e55c 100644 (file)
@@ -109,7 +109,7 @@ static void     noexport __PROTO__((Namval_t*));
 static char    *arg0;
 
 int    b_exec __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){
-       register int n;
+       int n;
         sh.st.ioset = 0;
        clear = 0;
        NOT_USED(extra);
@@ -137,7 +137,7 @@ int    b_exec __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra
        return(0);
 }
 
-static void     noexport __PARAM__((register Namval_t* np), (np)) __OTORP__(register Namval_t* np;){
+static void     noexport __PARAM__((Namval_t* np), (np)) __OTORP__(Namval_t* np;){
        nv_offattr(np,NV_EXPORT);
 }
 
@@ -149,9 +149,9 @@ int    b_login __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra
                error(ERROR_exit(1),e_restricted,argv[0]);
        else
         {
-               register struct argnod *arg=sh.envlist;
-               register Namval_t* np;
-               register char *cp;
+               struct argnod *arg=sh.envlist;
+               Namval_t* np;
+               char *cp;
                if(sh.subshell)
                        sh_subfork();
                if(clear)
@@ -183,8 +183,8 @@ int    b_login __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra
 }
 
 int    b_let __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
-       register int r;
-       register char *arg;
+       int r;
+       char *arg;
        NOT_USED(argc);
        NOT_USED(extra);
        while (r = optget(argv,sh_optlet)) switch (r)
@@ -205,7 +205,7 @@ int    b_let __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra))
 }
 
 int    b_eval __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){
-       register int r;
+       int r;
        NOT_USED(argc);
        NOT_USED(extra);
        while (r = optget(argv,sh_opteval)) switch (r)
@@ -228,10 +228,10 @@ int    b_eval __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra
        return(sh.exitval);
 }
 
-int    b_dot_cmd __PARAM__((register int n,char *argv[],__V_* extra), (n, argv, extra)) __OTORP__(register int n;char *argv[];__V_* extra;){
-       register char *script;
-       register Namval_t *np;
-       register int jmpval;
+int    b_dot_cmd __PARAM__((int n,char *argv[],__V_* extra), (n, argv, extra)) __OTORP__(int n;char *argv[];__V_* extra;){
+       char *script;
+       Namval_t *np;
+       int jmpval;
        int     fd;
        struct dolnod   *argsave=0, *saveargfor;
        char **saveargv;
@@ -314,7 +314,7 @@ int    b_dot_cmd __PARAM__((register int n,char *argv[],__V_* extra), (n, argv,
 /*
  * null, true  command
  */
-int    b_true __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){
+int    b_true __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
        NOT_USED(argc);
        NOT_USED(argv[0]);
        NOT_USED(extra);
@@ -324,15 +324,15 @@ int    b_true __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, arg
 /*
  * false  command
  */
-int    b_false __PARAM__((int argc,register char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[]; __V_ *extra;){
+int    b_false __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){
        NOT_USED(argc);
        NOT_USED(argv[0]);
        NOT_USED(extra);
        return(1);
 }
 
-int    b_shift __PARAM__((register int n, register char *argv[], __V_ *extra), (n, argv, extra)) __OTORP__(register int n; register char *argv[]; __V_ *extra;){
-       register char *arg;
+int    b_shift __PARAM__((int n, char *argv[], __V_ *extra), (n, argv, extra)) __OTORP__(int n; char *argv[]; __V_ *extra;){
+       char *arg;
        NOT_USED(extra);
        while((n = optget(argv,sh_optcflow))) switch(n)
        {
@@ -357,7 +357,7 @@ int    b_shift __PARAM__((register int n, register char *argv[], __V_ *extra), (
        return(0);
 }
 
-int    b_wait __PARAM__((register int n,register char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(register int n;register char *argv[];__V_ *extra;){
+int    b_wait __PARAM__((int n,char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(int n;char *argv[];__V_ *extra;){
        NOT_USED(extra);
        while((n = optget(argv,sh_optjoblist))) switch(n)
        {
@@ -376,8 +376,8 @@ int    b_wait __PARAM__((register int n,register char *argv[],__V_ *extra), (n,
 }
 
 #ifdef JOBS
-int    b_bg_fg __PARAM__((register int n,register char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(register int n;register char *argv[];__V_ *extra;){
-       register int flag = **argv;
+int    b_bg_fg __PARAM__((int n,char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(int n;char *argv[];__V_ *extra;){
+       int flag = **argv;
        NOT_USED(extra);
        while((n = optget(argv,sh_optjoblist))) switch(n)
        {
@@ -404,8 +404,8 @@ int    b_bg_fg __PARAM__((register int n,register char *argv[],__V_ *extra), (n,
        return(sh.exitval);
 }
 
-int    b_jobs __PARAM__((register int n,char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(register int n;char *argv[];__V_ *extra;){
-       register int flag = 0;
+int    b_jobs __PARAM__((int n,char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(int n;char *argv[];__V_ *extra;){
+       int flag = 0;
        NOT_USED(extra);
        while((n = optget(argv,sh_optjobs))) switch(n)
        {
@@ -443,8 +443,8 @@ int    b_jobs __PARAM__((register int n,char *argv[],__V_ *extra), (n, argv, ext
  * setuniv() calls.
  */
 int    b_universe __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc; char *argv[];__V_ *extra;){
-       register char *arg;
-       register int n;
+       char *arg;
+       int n;
        NOT_USED(extra);
        while((n = optget(argv,sh_optuniverse))) switch(n)
        {
@@ -476,10 +476,10 @@ int       b_universe __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extr
 #endif /* cmd_universe */
 
 #ifdef SHOPT_FS_3D
-    int        b_vpath_map __PARAM__((register int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(register int argc;char *argv[]; __V_ *extra;){
-       register int flag, n;
-       register const char *optstr; 
-       register char *vend; 
+    int        b_vpath_map __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){
+       int flag, n;
+       const char *optstr;
+       char *vend;
        NOT_USED(extra);
        if(argv[0][1]=='p')
        {
index 6d814f998ccafa8a7263df4ef4c5e25d8e414315..7c9b637e131244fcddc013184ac78a1bb1e27ea1 100644 (file)
@@ -149,7 +149,7 @@ static int outexceptf __PARAM__((Sfio_t* iop, int mode, Sfdisc_t* dp), (iop, mod
        /* This mess is because /bin/echo on BSD is different */
        if(!sh.universe)
        {
-               register char *universe;
+               char *universe;
                if(universe=astconf("_AST_UNIVERSE",0,0))
                        bsd_univ = (strcmp(universe,"ucb")==0);
                sh.universe = 1;
@@ -177,8 +177,8 @@ int    b_printf __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, ext
  */
 
 int    b_print __PARAM__((int argc, char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc; char *argv[]; __V_ *extra;){
-       register Sfio_t *outfile;
-       register int n, fd = 1;
+       Sfio_t *outfile;
+       int n, fd = 1;
        const char *msg = e_file+4;
        char *format = 0;
        int sflag = 0, nflag, rflag;
@@ -344,8 +344,8 @@ skip2:
  */
 
 int sh_echolist __PARAM__((Sfio_t *outfile, int raw, char *argv[]), (outfile, raw, argv)) __OTORP__(Sfio_t *outfile; int raw; char *argv[];){
-       register char   *cp;
-       register int    n;
+       char    *cp;
+       int     n;
        while(!cescape && (cp= *argv++))
        {
                if(!raw  && (n=fmtvecho(cp))>=0)
@@ -364,7 +364,7 @@ int sh_echolist __PARAM__((Sfio_t *outfile, int raw, char *argv[]), (outfile, ra
 
 
 static char *genformat __PARAM__((char *format), (format)) __OTORP__(char *format;){
-       register char *fp;
+       char *fp;
        stakseek(0);
        stakputs(preformat);
        stakputs(format);
@@ -374,9 +374,9 @@ static char *genformat __PARAM__((char *format), (format)) __OTORP__(char *forma
 }
 
 static int getarg __PARAM__((int format,union types_t *value), (format, value)) __OTORP__(int format;union types_t *value;){
-       register char *argp = *nextarg;
+       char *argp = *nextarg;
        char *lastchar = "";
-       register int neg = 0;
+       int neg = 0;
        if(!argp)
        {
                switch(format)
@@ -488,7 +488,7 @@ static int getarg __PARAM__((int format,union types_t *value), (format, value))
  * This routine adds new % escape sequences to printf
  */
 static int extend __PARAM__((char *invalue,int format,int precis,char **outval), (invalue, format, precis, outval)) __OTORP__(char *invalue;int format;int precis;char **outval;){
-       register int n;
+       int n;
        NOT_USED(precis);
        switch(format)
        {
@@ -528,9 +528,9 @@ static int extend __PARAM__((char *invalue,int format,int precis,char **outval),
 
 static int fmtvecho __PARAM__((const char *string), (string)) __OTORP__(const char *string;){
        static char *nullarg;
-       register const char *cp = string, *cpmax;
-       register int c;
-       register int offset = staktell();
+       const char *cp = string, *cpmax;
+       int c;
+       int offset = staktell();
         int chlen;
         if (MB_CUR_MAX > 1)
         {
index 270c0f589dca4a0ec86d403bb1968ae80199ac88..caba67fb347d52b717b4e01c8a867573cef9482f 100644 (file)
 #define D_FLAG 6       /* must be number of bits for all flags */
 
 int    b_read __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){
-       register char *name;
-       register int r, flags=0, fd=0;
+       char *name;
+       int r, flags=0, fd=0;
        long timeout = 1000*sh.tmout;
        int save_prompt;
        NOT_USED(argc);
@@ -203,11 +203,11 @@ static void timedout __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handle;
  */
 
 int sh_readline __PARAM__((char **names, int fd, int flags,long timeout), (names, fd, flags, timeout)) __OTORP__(char **names; int fd; int flags;long timeout;){
-       register int            c;
-       register unsigned char  *cp;
-       register Namval_t       *np;
-       register char           *name, *val;
-       register Sfio_t *iop;
+       int             c;
+       unsigned char   *cp;
+       Namval_t        *np;
+       char            *name, *val;
+       Sfio_t  *iop;
        char                    *ifs;
        unsigned char           *cpmax;
        char                    was_escape = 0;
@@ -437,8 +437,8 @@ int sh_readline __PARAM__((char **names, int fd, int flags,long timeout), (names
                if(!name && *val)
                {
                        /* strip off trailing delimiters */
-                       register char   *cp = val + strlen(val);
-                       register int n;
+                       char    *cp = val + strlen(val);
+                       int n;
                        while((n=sh.ifstable[*--cp])==S_DELIM || n==S_SPACE);
                        cp[1] = 0;
                }
index 7dd643509a08ac5ad02dfcf424697e3c8df362f8..7d0e2c333cd0ffd19444c70b1367d63d609eda59 100644 (file)
 #   undef _lib_poll
 #endif /* _lib_poll_notimer */
 
-int    b_sleep __PARAM__((register int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(register int argc;char *argv[];__V_ *extra;){
-       register char *cp;
-       register double d;
+int    b_sleep __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
+       char *cp;
+       double d;
        time_t tloc = 0;
        NOT_USED(extra);
        while((argc = optget(argv,sh_optsleep))) switch(argc)
@@ -181,7 +181,7 @@ unsigned sleep __PARAM__((unsigned sec), (sec)) __OTORP__(unsigned sec;){
  */
 
 void   sh_delay __PARAM__((double t), (t)) __OTORP__(double t;){
-       register int n = (int)t;
+       int n = (int)t;
 #ifdef _lib_poll
        struct pollfd fd;
        if(t<=0)
index 6902a1ddec89c66c7b4a30a3a2ee58ae39b0f6c8..24658e737f3caa293583a07cf99ebaeac513b7c0 100644 (file)
@@ -131,8 +131,8 @@ static int ap, ac;
 static char **av;
 
 int b_test __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc; char *argv[];__V_ *extra;){
-       register char *cp = argv[0];
-       register int not;
+       char *cp = argv[0];
+       int not;
        NOT_USED(extra);
        av = argv;
        ap = 1;
@@ -156,7 +156,7 @@ int b_test __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra))
                        /* fall through */
                case 4:
                {
-                       register int op = sh_lookup(cp=argv[2],shtab_testops);
+                       int op = sh_lookup(cp=argv[2],shtab_testops);
                        if(op&TEST_BINOP)
                                break;
                        if(!op)
@@ -190,9 +190,9 @@ int b_test __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra))
  * flag is 1 when in parenthesis
  * flag is 2 when evaluating -a 
  */
-static int expr __PARAM__((int register flag), (flag)) __OTORP__(int register flag;){
-       register int r;
-       register char *p;
+static int expr __PARAM__((int flag), (flag)) __OTORP__(int flag;){
+       int r;
+       char *p;
        r = e3();
        while(ap < ac)
        {
@@ -243,8 +243,8 @@ static char *nxtarg __PARAM__((int mt), (mt)) __OTORP__(int mt;){
 
 
 static e3 __PARAM__((void), ()){
-       register char *arg, *cp;
-       register int op;
+       char *arg, *cp;
+       int op;
        char *binop;
        arg=nxtarg(0);
        if(c_eq(arg, '!'))
@@ -298,7 +298,7 @@ skip:
        return(test_binop(op,arg,cp));
 }
 
-int test_unop __PARAM__((register int op,register const char *arg), (op, arg)) __OTORP__(register int op;register const char *arg;){
+int test_unop __PARAM__((int op,const char *arg), (op, arg)) __OTORP__(int op;const char *arg;){
        switch(op)
        {
            case 'r':
@@ -310,7 +310,7 @@ int test_unop __PARAM__((register int op,register const char *arg), (op, arg)) _
            case 'V':
 #ifdef SHOPT_FS_3D
            {
-               register int offset = staktell();
+               int offset = staktell();
                if(stat(arg,&statb)<0 || !S_ISREG(statb.st_mode))
                        return(0);
                /* add trailing / */
@@ -360,7 +360,7 @@ int test_unop __PARAM__((register int op,register const char *arg), (op, arg)) _
            case 'H':
 #ifdef S_ISCDF
            {
-               register int offset = staktell();
+               int offset = staktell();
                if(test_stat(arg,&statb)>=0 && S_ISCDF(statb.st_mode))
                        return(1);
                stakputs(arg);
@@ -419,8 +419,8 @@ int test_unop __PARAM__((register int op,register const char *arg), (op, arg)) _
        }
 }
 
-test_binop __PARAM__((register int op,const char *left,const char *right), (op, left, right)) __OTORP__(register int op;const char *left;const char *right;){
-       register double lnum,rnum;
+test_binop __PARAM__((int op,const char *left,const char *right), (op, left, right)) __OTORP__(int op;const char *left;const char *right;){
+       double lnum,rnum;
        if(op&TEST_ARITH)
        {
                lnum = sh_arith(left);
@@ -498,7 +498,7 @@ test_inode __PARAM__((const char *file1,const char *file2), (file1, file2)) __OT
  * The static buffer statb is shared with test_mode.
  */
 
-sh_access __PARAM__((register const char *name, register int mode), (name, mode)) __OTORP__(register const char *name; register int mode;){
+sh_access __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){
        if(*name==0)
                return(-1);
        if(strmatch(name,(char*)e_devfdNN))
@@ -550,7 +550,7 @@ skip:
                {
                        static int maxgroups = 0;
                        gid_t *groups; 
-                       register int n;
+                       int n;
                        if(maxgroups==0)
                        {
                                /* first time */
@@ -584,7 +584,7 @@ skip:
  * The mode bits are zero if the file doesn't exist.
  */
 
-static int test_mode __PARAM__((register const char *file), (file)) __OTORP__(register const char *file;){
+static int test_mode __PARAM__((const char *file), (file)) __OTORP__(const char *file;){
        if(file && (*file==0 || test_stat(file,&statb)<0))
                return(0);
        return(statb.st_mode);
index 71e16ac5034046cc32dc6a3c56fcdf356ec61bd1..2496bf81943d3273302c0f556717e1be4abba1ba 100644 (file)
@@ -106,8 +106,8 @@ static int  sig_number __PROTO__((const char*));
 static void    sig_list __PROTO__((int));
 
 int    b_trap __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
-       register char *arg = argv[1];
-       register int sig, pflag = 0;
+       char *arg = argv[1];
+       int sig, pflag = 0;
        NOT_USED(argc);
        NOT_USED(extra);
        while (sig = optget(argv, sh_opttrap)) switch (sig)
@@ -127,7 +127,7 @@ int b_trap __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) _
                error(ERROR_usage(2),optusage((char*)0));
        if(arg = *argv)
        {
-               register int    clear;
+               int     clear;
                char *action = arg;
                if(!pflag)
                {
@@ -210,8 +210,8 @@ int b_trap __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) _
 }
 
 int    b_kill __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
-       register char *signame;
-       register int sig=SIGTERM, flag=0, n;
+       char *signame;
+       int sig=SIGTERM, flag=0, n;
        NOT_USED(argc);
        NOT_USED(extra);
        while((n = optget(argv,sh_optkill))) switch(n)
@@ -281,7 +281,7 @@ endopts:
  */
 
 static int sig_number __PARAM__((const char *string), (string)) __OTORP__(const char *string;){
-       register int n;
+       int n;
        char *last;
        if(isdigit(*string))
        {
@@ -291,7 +291,7 @@ static int sig_number __PARAM__((const char *string), (string)) __OTORP__(const
        }
        else
        {
-               register int c;
+               int c;
                n = staktell();
                do
                {
@@ -316,9 +316,9 @@ static int sig_number __PARAM__((const char *string), (string)) __OTORP__(const
  * if <flag> is zero, then print all signal names
  * if <flag> is negative, then print all traps
  */
-static void sig_list __PARAM__((register int flag), (flag)) __OTORP__(register int flag;){
-       register const struct shtable2  *tp;
-       register int sig = sh.sigmax+1;
+static void sig_list __PARAM__((int flag), (flag)) __OTORP__(int flag;){
+       const struct shtable2   *tp;
+       int sig = sh.sigmax+1;
        const char *names[SH_TRAP];
        const char *traps[SH_DEBUGTRAP+1];
 
@@ -353,7 +353,7 @@ static void sig_list __PARAM__((register int flag), (flag)) __OTORP__(register i
        else if(flag<0)
        {
                /* print the traps */
-               register char *trap,*sname,**trapcom;
+               char *trap,*sname,**trapcom;
                sig = sh.st.trapmax;
                /* use parent traps if otrapcom is set (for $(trap)  */
                trapcom = (sh.st.otrapcom?sh.st.otrapcom:sh.st.trapcom);
index 04a217bc5189d920ef158288294401371b63b1a0..69f967aeeba3d997d891e6b5a9bb2819803e0375 100644 (file)
@@ -145,7 +145,7 @@ static const Namdisc_t treedisc =
  */
 
 int    b_read_export __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
-       register int flag;
+       int flag;
        char *command = argv[0];
        NOT_USED(argc);
        NOT_USED(extra);
@@ -178,10 +178,10 @@ int    b_read_export __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv,
 }
 
 
-int    b_alias __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){
-       register unsigned flag = NV_ARRAY|NV_NOSCOPE|NV_ASSIGN;
-       register Hashtab_t *troot = sh.alias_tree;
-       register int n;
+int    b_alias __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
+       unsigned flag = NV_ARRAY|NV_NOSCOPE|NV_ASSIGN;
+       Hashtab_t *troot = sh.alias_tree;
+       int n;
        NOT_USED(argc);
        NOT_USED(extra);
        prefix=0;
@@ -230,9 +230,9 @@ int    b_alias __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, ar
 }
 
 
-int    b_typeset __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){
-       register int flag = NV_VARNAME|NV_ASSIGN;
-       register int n;
+int    b_typeset __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
+       int flag = NV_VARNAME|NV_ASSIGN;
+       int n;
        Hashtab_t *troot = sh.var_tree;
        int isfloat = 0;
        NOT_USED(argc);
@@ -347,8 +347,8 @@ int    b_typeset __PARAM__((int argc,register char *argv[],__V_ *extra), (argc,
        return(b_common(argv,flag,troot));
 }
 
-static int     b_common __PARAM__((char **argv,register int flag,Hashtab_t *troot), (argv, flag, troot)) __OTORP__(char **argv;register int flag;Hashtab_t *troot;){
-       register char *name;
+static int     b_common __PARAM__((char **argv,int flag,Hashtab_t *troot), (argv, flag, troot)) __OTORP__(char **argv;int flag;Hashtab_t *troot;){
+       char *name;
        int nvflags=(flag&(NV_ARRAY|NV_NOSCOPE|NV_VARNAME|NV_IDENT|NV_ASSIGN));
        int r=0, ref=0;
 #ifdef SHOPT_OO
@@ -376,8 +376,8 @@ static int     b_common __PARAM__((char **argv,register int flag,Hashtab_t *troo
                }
                while(name = *++argv)
                {
-                       register unsigned newflag;
-                       register Namval_t *np;
+                       unsigned newflag;
+                       Namval_t *np;
                        unsigned curflag;
                        if(troot == sh.fun_tree)
                        {
@@ -537,9 +537,9 @@ __V_ **sh_getliblist __PARAM__((void), ()){
  * adding builtins requires dlopen() interface
  */
 int    b_builtin __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
-       register char *arg=0, *name;
-       register int n, r=0, flag=0;
-       register Namval_t *np;
+       char *arg=0, *name;
+       int n, r=0, flag=0;
+       Namval_t *np;
        int dlete=0;
        static int maxlib, nlib;
        Fptr_t addr;
@@ -659,7 +659,7 @@ int b_builtin __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)
        return(r);
 }
 
-int    b_set __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){
+int    b_set __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
        NOT_USED(extra);
        prefix=0;
        if(argv[1])
@@ -682,21 +682,21 @@ int    b_set __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv
  * Non-existent items being deleted give non-zero exit status
  */
 
-int    b_unalias __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){
+int    b_unalias __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
        NOT_USED(extra);
        return(b_unall(argc,argv,sh.alias_tree));
 }
 
-int    b_unset __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){
+int    b_unset __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
        NOT_USED(extra);
        return(b_unall(argc,argv,sh.var_tree));
 }
 
-static int b_unall __PARAM__((int argc, char **argv, register Hashtab_t *troot), (argc, argv, troot)) __OTORP__(int argc; char **argv; register Hashtab_t *troot;){
-       register Namval_t *np;
-       register struct slnod *slp;
-       register const char *name;
-       register int r;
+static int b_unall __PARAM__((int argc, char **argv, Hashtab_t *troot), (argc, argv, troot)) __OTORP__(int argc; char **argv; Hashtab_t *troot;){
+       Namval_t *np;
+       struct slnod *slp;
+       const char *name;
+       int r;
        int nflag = 0;
        int all=0;
        NOT_USED(argc);
@@ -751,7 +751,7 @@ static int b_unall __PARAM__((int argc, char **argv, register Hashtab_t *troot),
                                else if(slp=(struct slnod*)(np->nvenv))
                                {
                                        /* free function definition */
-                                       register char *cp= strrchr(name,'.');
+                                       char *cp= strrchr(name,'.');
                                        if(cp)
                                        {
                                                Namval_t *npv;
@@ -767,15 +767,7 @@ static int b_unall __PARAM__((int argc, char **argv, register Hashtab_t *troot),
                                        continue;
                                }
                        }
-#ifdef apollo
-                       else
-                       {
-                               short namlen;
-                               name = nv_name(np);
-                               namlen =strlen(name);
-                               ev_$delete_var(name,&namlen);
-                       }
-#endif /* apollo */
+
                        if(sh.subshell)
                                np=sh_assignok(np,0);
                        nv_unset(np);
@@ -793,8 +785,8 @@ static int b_unall __PARAM__((int argc, char **argv, register Hashtab_t *troot),
  * print out the name and value of a name-value pair <np>
  */
 
-static int print_namval __PARAM__((Sfio_t *file,register Namval_t *np,register int flag), (file, np, flag)) __OTORP__(Sfio_t *file;register Namval_t *np;register int flag;){
-       register char *cp;
+static int print_namval __PARAM__((Sfio_t *file,Namval_t *np,int flag), (file, np, flag)) __OTORP__(Sfio_t *file;Namval_t *np;int flag;){
+       char *cp;
        sh_sigcheck();
        if(flag)
                flag = '\n';
@@ -824,7 +816,7 @@ static int print_namval __PARAM__((Sfio_t *file,register Namval_t *np,register i
        }
        if(cp=nv_getval(np))
        {
-               register Namarr_t *ap;
+               Namarr_t *ap;
                sfputr(file,sh_fmtq(nv_name(np)),-1);
                if(!flag)
                {
@@ -858,9 +850,9 @@ static void print_all __PARAM__((Sfio_t *file,Hashtab_t *root), (file, root)) __
  * format initialization list given a list of assignments <argp>
  */
 static void genvalue __PARAM__((struct argnod *argp, const char *prefix, int n, int indent), (argp, prefix, n, indent)) __OTORP__(struct argnod *argp; const char *prefix; int n; int indent;){
-       register struct argnod *ap;
-       register char *cp,*nextcp;
-       register int m,isarray;
+       struct argnod *ap;
+       char *cp,*nextcp;
+       int m,isarray;
        Namval_t *np;
        if(n==0)
                m = strlen(prefix);
@@ -955,13 +947,13 @@ static void genvalue __PARAM__((struct argnod *argp, const char *prefix, int n,
 /*
  * walk the virtual tree and print or delete name-value pairs
  */
-static char *walk_tree __PARAM__((register Namval_t *np, int dlete), (np, dlete)) __OTORP__(register Namval_t *np; int dlete;){
+static char *walk_tree __PARAM__((Namval_t *np, int dlete), (np, dlete)) __OTORP__(Namval_t *np; int dlete;){
        static Sfio_t *out;
        int n;
        Fcin_t save;
        int savtop = staktell();
        char *savptr = stakfreeze(0);
-       register struct argnod *ap; 
+       struct argnod *ap;
        struct argnod *arglist=0;
        char *name = nv_name(np);
        stakseek(ARGVAL);
@@ -993,7 +985,7 @@ static char *walk_tree __PARAM__((register Namval_t *np, int dlete), (np, dlete)
 /*
  * get discipline for compound initializations
  */
-static char *get_tree __PARAM__((register Namval_t *np, Namfun_t *fp), (np, fp)) __OTORP__(register Namval_t *np; Namfun_t *fp;){
+static char *get_tree __PARAM__((Namval_t *np, Namfun_t *fp), (np, fp)) __OTORP__(Namval_t *np; Namfun_t *fp;){
        NOT_USED(fp);
        return(walk_tree(np,0));
 }
@@ -1001,7 +993,7 @@ static char *get_tree __PARAM__((register Namval_t *np, Namfun_t *fp), (np, fp))
 /*
  * put discipline for compound initializations
  */
-static void put_tree __PARAM__((register Namval_t *np, const char *val, int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(register Namval_t *np; const char *val; int flags;Namfun_t *fp;){
+static void put_tree __PARAM__((Namval_t *np, const char *val, int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t *np; const char *val; int flags;Namfun_t *fp;){
        walk_tree(np,1);
        if(fp = nv_stack(np,NIL(Namfun_t*)))
        {
@@ -1016,8 +1008,8 @@ static void put_tree __PARAM__((register Namval_t *np, const char *val, int flag
 /*
  * Insert discipline to cause $x to print current tree
  */
-void nv_setvtree __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
-       register Namfun_t *nfp = newof(NIL(__V_*),Namfun_t,1,0);
+void nv_setvtree __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
+       Namfun_t *nfp = newof(NIL(__V_*),Namfun_t,1,0);
        nfp->disc = &treedisc;
        nv_stack(np, nfp);
 }
@@ -1025,11 +1017,11 @@ void nv_setvtree __PARAM__((register Namval_t *np), (np)) __OTORP__(register Nam
 /*
  * print the attributes of name value pair give by <np>
  */
-static void    print_attribute __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
-       register const Shtable_t *tp;
-       register char *cp;
-       register unsigned val;
-       register unsigned mask;
+static void    print_attribute __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
+       const Shtable_t *tp;
+       char *cp;
+       unsigned val;
+       unsigned mask;
 #ifdef SHOPT_OO
        Namval_t *nq;
        char *cclass=0;
@@ -1107,9 +1099,9 @@ static void       print_attribute __PARAM__((register Namval_t *np), (np)) __OTORP__(r
  */
 
 static void print_scan __PARAM__((Sfio_t *file, int flag, Hashtab_t *root, int option), (file, flag, root, option)) __OTORP__(Sfio_t *file; int flag; Hashtab_t *root; int option;){
-       register char **argv;
-       register Namval_t *np;
-       register int namec;
+       char **argv;
+       Namval_t *np;
+       int namec;
        Namval_t *onp = 0;
        flag &= ~NV_ASSIGN;
        scanmask = flag;
@@ -1156,7 +1148,7 @@ static void pushname __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
 /*
  * The inverse of creating a reference node
  */
-static void unref __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
+static void unref __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
        if(!nv_isattr(np,NV_REF))
                return;
        nv_offattr(np,NV_NOFREE|NV_REF);
index c5091c3061f930b7326116de1c420e1739faec93..494a3910ebfd91b02b89970e14c82d4bb9a06cb4 100644 (file)
 #define SOFT   2
 
 int    b_ulimit __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
-       register char *limit;
-       register int flag = 0, mode=0, n;
+       char *limit;
+       int flag = 0, mode=0, n;
 #ifdef _lib_getrlimit
        struct rlimit rlp;
 #endif /* _lib_getrlimit */
index 8311502f571d4aec8ed6624cd56f5dcf7b5ab5db..f848c3a4532c39c5335fc6a501bd8e1ca2a8854c 100644 (file)
 #include       "builtins.h"
 
 int    b_umask __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
-       register char *mask;
-       register int flag = 0, sflag = 0;
+       char *mask;
+       int flag = 0, sflag = 0;
        NOT_USED(extra);
        while((argc = optget(argv,sh_optumask))) switch(argc)
        {
@@ -121,7 +121,7 @@ int b_umask __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra))
        argv += opt_index;
        if(mask = *argv)
        {
-               register int c; 
+               int c;
                if(isdigit(*mask))
                {
                        while(c = *mask++)
index 65ad25ac8c5845e676661d38a6c3669384411169..55504f37b38f8bdc37cf6404f6776bec3f9523c9 100644 (file)
@@ -113,8 +113,8 @@ static int whence __PROTO__((char**, int));
  * In this case return 0 when -v or -V or unknown option, otherwise
  *   the shift count to the command is returned
  */
-int    b_command __PARAM__((register int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(register int argc;char *argv[];__V_ *extra;){
-       register int n, flags=0;
+int    b_command __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
+       int n, flags=0;
        NOT_USED(extra);
        opt_index = opt_char = 0;
        while((n = optget(argv,sh_optcommand))) switch(n)
@@ -151,7 +151,7 @@ int b_command __PARAM__((register int argc,char *argv[],__V_ *extra), (argc, arg
  *  for the whence command
  */
 int    b_whence __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){
-       register int flags=0, n;
+       int flags=0, n;
        NOT_USED(argc);
        NOT_USED(extra);
        if(*argv[0]=='t')
@@ -183,12 +183,12 @@ int       b_whence __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra))
        return(whence(argv, flags));
 }
 
-static int whence __PARAM__((char **argv, register int flags), (argv, flags)) __OTORP__(char **argv; register int flags;){
-       register const char *name;
-       register Namval_t *np;
-       register const char *cp;
-       register aflag,r=0;
-       register const char *msg;
+static int whence __PARAM__((char **argv, int flags), (argv, flags)) __OTORP__(char **argv; int flags;){
+       const char *name;
+       Namval_t *np;
+       const char *cp;
+       int aflag,r=0;
+       const char *msg;
        int notrack = 1;
        while(name= *argv++)
        {
index 57b7345aef51e7c02d26bcf8734e2436dd3beacb..9b59c15a5275457d30c872ae09d697bd438b79dc 100644 (file)
@@ -183,11 +183,6 @@ const struct shtable3 shtab_builtins[] =
        "wait",         NV_BLTIN|BLT_ENV|BLT_EXIT,      bltin(wait),
        "type",         NV_BLTIN|BLT_ENV,               bltin(whence),
        "whence",       NV_BLTIN|BLT_ENV,               bltin(whence),
-#ifdef apollo
-       "inlib",        NV_BLTIN|BLT_ENV,               bltin(inlib),
-       "rootnode",     NV_BLTIN,                       bltin(rootnode),
-       "ver",          NV_BLTIN,                       bltin(ver),
-#endif /* apollo */
        "/bin/basename",NV_BLTIN|NV_NOFREE,             bltin(basename),
        "/bin/chmod",   NV_BLTIN|NV_NOFREE,             bltin(chmod),
        "/bin/dirname", NV_BLTIN|NV_NOFREE,             bltin(dirname),
index a75014346931b1903c353dce65e0788d1a4c75b1..7c8f47e71b71a33a2d74eae6dce43a5a36dfc263 100644 (file)
@@ -213,11 +213,6 @@ const char e_alphanum[]            = "[_[:alpha:]]*([_[:alnum:]])";
     const char e_vpixdir[]     = "/usr/bin";
 #endif /* SHOPT_VPIX */
 const char e_devfdNN[]         = "/dev/fd/+([0-9])";
-#ifdef apollo
-    const char e_rootnode[]    = "Bad root node specification";
-    const char e_nover[]       = "Version not defined";
-    const char e_badver[]      = "Unrecognized version";
-#endif /* apollo */
 #ifdef SHOPT_FS_3D
     const char e_cantget[]     = "cannot get %s";
     const char e_cantset[]     = "cannot set %s";
index 5680e0cdea77d53b311c40b04eea8382f0beeedc..176a5d91cf0a92ba3f2ac234526cf58c6efd2f98 100644 (file)
@@ -119,9 +119,6 @@ static struct shtable2 _shtab_signals[] =
 #ifdef SIGALRM
        "ALRM",         VAL(SIGALRM,SH_SIGFAULT),       "Alarm call",
 #endif /* SIGALRM */
-#ifdef SIGAPOLLO
-       "APOLLO",       VAL(SIGAPOLLO,0),               "SIGAPOLLO",
-#endif /* SIGAPOLLO */
 #ifdef SIGBUS
        "BUS",          VAL(SIGBUS,SH_SIGDONE),         "Bus error",
 #endif /* SIGBUS */
index a1212e88120a70ea4cb6e7d61fdb12b914eb2f13..1d1447a2265e6534b088668b06e0818c2f9f6b3e 100644 (file)
@@ -168,9 +168,6 @@ const struct shtable2 shtab_variables[] =
 #ifdef SHOPT_MULTIBYTE
        "CSWIDTH",      0,                              (char*)0,
 #endif /* SHOPT_MULTIBYTE */
-#ifdef apollo
-       "SYSTYPE",      0,                              (char*)0,
-#endif /* apollo */
        "",     0,                                      (char*)0
 };
 
index 80447c9b278b8c1f52fcb7162a828d7da92e967f..99a6cefff7b28afb681522cc3fff9d91b14b83bd 100644 (file)
@@ -107,7 +107,7 @@ static char macro[] = "_??";
  *  if <str> is equal to <newstr> returns  <str>+strlen(<str>)+1
  *  otherwise returns <str>+strlen(<str>)
  */
-static char *overlay __PARAM__((register char *str,register const char *newstr), (str, newstr)) __OTORP__(register char *str;register const char *newstr;){
+static char *overlay __PARAM__((char *str,const char *newstr), (str, newstr)) __OTORP__(char *str;const char *newstr;){
        while(*str && *str == *newstr++)
                str++;
        if(*str)
@@ -132,7 +132,7 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur,
        char *staksav = stakptr(0);
        struct comnod  *comptr = (struct comnod*)stakalloc(sizeof(struct comnod));
        struct argnod *ap = (struct argnod*)stakseek(ARGVAL);
-       register char *out;
+       char *out;
        char *begin;
        int addstar;
        int rval = 0;
@@ -140,8 +140,8 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur,
        int nomarkdirs = !sh_isoption(SH_MARKDIRS);
 #ifdef SHOPT_MULTIBYTE
        {
-               register int c = *cur;
-               register genchar *cp;
+               int c = *cur;
+               genchar *cp;
                /* adjust cur */
                cp = (genchar *)outbuff + *cur;
                c = *cp;
@@ -157,7 +157,7 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur,
        ap->argflag = (ARG_MAC|ARG_EXP);
        ap->argnxt.ap = 0;
        {
-               register int c;
+               int c;
                if(out>outbuff)
                {
                        /* go to beginning of word */
@@ -201,10 +201,10 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur,
        if(mode!='*')
                sh_onoption(SH_MARKDIRS);
        {
-               register char **com;
+               char **com;
                char    *cp=begin;
                int      narg,cmd_completion=0;
-               register int size;
+               int size;
                while(cp>outbuff && ((size=cp[-1])==' ' || size=='\t'))
                        cp--;
                if((cp==outbuff || strchr(";&|(",size)) && *begin!='~' && !strchr(ap->argval,'/'))
@@ -230,7 +230,7 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur,
                {
                        if (strip && !cmd_completion)
                        {
-                               register char **ptrcom;
+                               char **ptrcom;
                                for(ptrcom=com;*ptrcom;ptrcom++)
                                        /* trim directory prefix */
                                        *ptrcom = path_basename(*ptrcom);
@@ -317,7 +317,7 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur,
                sh_offoption(SH_MARKDIRS);
 #ifdef SHOPT_MULTIBYTE
        {
-               register int c;
+               int c;
                /* first re-adjust cur */
                out = outbuff + *cur;
                c = *out;
@@ -335,8 +335,8 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur,
  * look for edit macro named _i
  * if found, puts the macro definition into lookahead buffer and returns 1
  */
-ed_macro __PARAM__((register int i), (i)) __OTORP__(register int i;){
-       register char *out;
+ed_macro __PARAM__((int i), (i)) __OTORP__(int i;){
+       char *out;
        Namval_t *np;
        genchar buff[LOOKAHEAD+1];
        if(i != '@')
@@ -369,7 +369,7 @@ ed_macro __PARAM__((register int i), (i)) __OTORP__(register int i;){
  * Enter the fc command on the current history line
  */
 ed_fulledit __PARAM__((void), ()){
-       register char *cp;
+       char *cp;
        if(!sh.hist_ptr)
                return(-1);
        /* use EDITOR on current command */
index a500ad39b107e56377f80ee7e0de15b6b650e21e..e5c5fa648a18848336cfda6f0c59d0904fa0488e 100644 (file)
@@ -190,7 +190,7 @@ int tty_check __PARAM__((int fd), (fd)) __OTORP__(int fd;){
  *   is called again without an intervening tty_set()
  */
 
-int tty_get __PARAM__((register int fd, register struct termios *tty), (fd, tty)) __OTORP__(register int fd; register struct termios *tty;){
+int tty_get __PARAM__((int fd, struct termios *tty), (fd, tty)) __OTORP__(int fd; struct termios *tty;){
        if(fd == savefd)
                *tty = savetty;
        else
@@ -243,7 +243,7 @@ int tty_set __PARAM__((int fd, int action, struct termios *tty), (fd, action, tt
  *
 }*/
 
-void tty_cooked __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
+void tty_cooked __PARAM__((int fd), (fd)) __OTORP__(int fd;){
 
        if(editb.e_raw==0)
                return;
@@ -274,7 +274,7 @@ void tty_cooked __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
  *
 }*/
 
-tty_raw __PARAM__((register int fd, int echo), (fd, echo)) __OTORP__(register int fd; int echo;){
+tty_raw __PARAM__((int fd, int echo), (fd, echo)) __OTORP__(int fd; int echo;){
 #ifdef L_MASK
        struct ltchars lchars;
 #endif /* L_MASK */
@@ -385,7 +385,7 @@ tty_raw __PARAM__((register int fd, int echo), (fd, echo)) __OTORP__(register in
  */
 
 #   ifdef TIOCGETC
-tty_alt __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
+tty_alt __PARAM__((int fd), (fd)) __OTORP__(int fd;){
        int mask;
        struct tchars ttychars;
        switch(editb.e_raw)
@@ -431,7 +431,7 @@ tty_alt __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
 #          define IEXTEN       0
 #      endif /* IEXTEN */
 
-tty_alt __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
+tty_alt __PARAM__((int fd), (fd)) __OTORP__(int fd;){
        switch(editb.e_raw)
        {
            case ECHOMODE:
@@ -498,7 +498,7 @@ tty_alt __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
  */
 int ed_window __PARAM__((void), ()){
        int     rows,cols;
-       register char *cp = nv_getval(COLUMNS);
+       char *cp = nv_getval(COLUMNS);
        if(cp)
                cols = atoi(cp)-1;
        else
@@ -521,8 +521,8 @@ int ed_window __PARAM__((void), ()){
  */
 
 void ed_flush __PARAM__((void), ()){
-       register int n = editb.e_outptr-editb.e_outbase;
-       register int fd = ERRIO;
+       int n = editb.e_outptr-editb.e_outbase;
+       int fd = ERRIO;
        if(n<=0)
                return;
        write(fd,editb.e_outbase,(unsigned)n);
@@ -568,11 +568,11 @@ void ed_crlf __PARAM__((void), ()){
  */
 
 void   ed_setup __PARAM__((int fd), (fd)) __OTORP__(int fd;){
-       register char *pp;
-       register char *last;
+       char *pp;
+       char *last;
        char *ppmax;
        int myquote = 0;
-       register int qlen = 1;
+       int qlen = 1;
        char inquote = 0;
        editb.e_fd = fd;
 #ifdef KSHELL
@@ -584,7 +584,7 @@ void        ed_setup __PARAM__((int fd), (fd)) __OTORP__(int fd;){
 #endif /* KSHELL */
        if(sh.hist_ptr)
        {
-               register History_t *hp = sh.hist_ptr;
+               History_t *hp = sh.hist_ptr;
                editb.e_hismax = hist_max(hp);
                editb.e_hismin = hist_min(hp);
        }
@@ -599,7 +599,7 @@ void        ed_setup __PARAM__((int fd), (fd)) __OTORP__(int fd;){
        ppmax = pp+PRSIZE-1;
        *pp++ = '\r';
        {
-               register int c;
+               int c;
                while(c= *last++) switch(c)
                {
                        case '\r':
@@ -648,7 +648,7 @@ void        ed_setup __PARAM__((int fd), (fd)) __OTORP__(int fd;){
        *pp = 0;
        if((editb.e_wsize -= editb.e_plen) < 7)
        {
-               register int shift = 7-editb.e_wsize;
+               int shift = 7-editb.e_wsize;
                editb.e_wsize = 7;
                pp = editb.e_prompt+1;
                strcpy(pp,pp+shift);
@@ -675,8 +675,8 @@ void        ed_setup __PARAM__((int fd), (fd)) __OTORP__(int fd;){
  * sfpkrd() correctly (i,e., those that support poll() or select()
  */
 int ed_read __PARAM__((int fd, char *buff, int size), (fd, buff, size)) __OTORP__(int fd; char *buff; int size;){
-       register int rv= -1;
-       register int delim = (editb.e_raw==RAWMODE?'\r':'\n');
+       int rv= -1;
+       int delim = (editb.e_raw==RAWMODE?'\r':'\n');
        sh_onstate(SH_TTYWAIT);
        errno = EINTR;
        while(rv<0 && errno==EINTR)
@@ -740,10 +740,10 @@ done:
  *    onto the stack so that it can be checked for KEYTRAP
  * putstack() returns 1 except when in the middle of a multi-byte char
  */
-static int putstack __PARAM__((char string[], register int nbyte, int type), (string, nbyte, type)) __OTORP__(char string[]; register int nbyte; int type;){
-       register int c;
+static int putstack __PARAM__((char string[], int nbyte, int type), (string, nbyte, type)) __OTORP__(char string[]; int nbyte; int type;){
+       int c;
 #ifdef SHOPT_MULTIBYTE
-       register int max,last;
+       int max,last;
        static int curchar, cursize=0;
        last = max = nbyte;
        nbyte = 0;
@@ -829,7 +829,7 @@ static int putstack __PARAM__((char string[], register int nbyte, int type), (st
  *   2         Next key is literal
  */
 int ed_getchar __PARAM__((int mode), (mode)) __OTORP__(int mode;){
-       register int n, c;
+       int n, c;
        char readin[LOOKAHEAD+1];
        if(!lookahead)
        {
@@ -887,7 +887,7 @@ int ed_getchar __PARAM__((int mode), (mode)) __OTORP__(int mode;){
        return(c);
 }
 
-void ed_ungetchar __PARAM__((register int c), (c)) __OTORP__(register int c;){
+void ed_ungetchar __PARAM__((int c), (c)) __OTORP__(int c;){
        if (lookahead < LOOKAHEAD)
                previous[lookahead++] = c;
        return;
@@ -897,10 +897,10 @@ void ed_ungetchar __PARAM__((register int c), (c)) __OTORP__(register int c;){
  * put a character into the output buffer
  */
 
-void   ed_putchar __PARAM__((register int c), (c)) __OTORP__(register int c;){
-       register char *dp = editb.e_outptr;
+void   ed_putchar __PARAM__((int c), (c)) __OTORP__(int c;){
+       char *dp = editb.e_outptr;
 #ifdef SHOPT_MULTIBYTE
-       register int d;
+       int d;
        /* check for place holder */
        if(c == MARKER)
                return;
@@ -934,9 +934,9 @@ void        ed_putchar __PARAM__((register int c), (c)) __OTORP__(register int c;){
  */
 
 ed_virt_to_phys __PARAM__((genchar *virt,genchar *phys,int cur,int voff,int poff), (virt, phys, cur, voff, poff)) __OTORP__(genchar *virt;genchar *phys;int cur;int voff;int poff;){
-       register genchar *sp = virt;
-       register genchar *dp = phys;
-       register int c;
+       genchar *sp = virt;
+       genchar *dp = phys;
+       int c;
        genchar *curp = sp + cur;
        genchar *dpmax = phys+MAXLINE;
        int r;
@@ -1001,11 +1001,11 @@ ed_virt_to_phys __PARAM__((genchar *virt,genchar *phys,int cur,int voff,int poff
  */
 
 int    ed_internal __PARAM__((const char *src, genchar *dest), (src, dest)) __OTORP__(const char *src; genchar *dest;){
-       register const unsigned char *cp = (unsigned char *)src;
-       register int c;
-       register genchar *dp = dest;
-       register int d;
-       register int size;
+       const unsigned char *cp = (unsigned char *)src;
+       int c;
+       genchar *dp = dest;
+       int d;
+       int size;
        if((unsigned char*)dest == cp)
        {
                genchar buffer[MAXLINE];
@@ -1042,9 +1042,9 @@ int       ed_internal __PARAM__((const char *src, genchar *dest), (src, dest)) __OTORP
  */
 
 int    ed_external __PARAM__((const genchar *src, char *dest), (src, dest)) __OTORP__(const genchar *src; char *dest;){
-       register int c;
-       register char *dp = dest;
-       register int d;
+       int c;
+       char *dp = dest;
+       int d;
        char *dpmax = dp+sizeof(genchar)*MAXLINE-2;
        if((char*)src == dp)
        {
@@ -1084,7 +1084,7 @@ void      ed_gencpy __PARAM__((genchar *dp,const genchar *sp), (dp, sp)) __OTORP__(ge
  * copy at most <n> items from <sp> to <dp>
  */
 
-void   ed_genncpy __PARAM__((register genchar *dp,register const genchar *sp, int n), (dp, sp, n)) __OTORP__(register genchar *dp;register const genchar *sp; int n;){
+void   ed_genncpy __PARAM__((genchar *dp,const genchar *sp, int n), (dp, sp, n)) __OTORP__(genchar *dp;const genchar *sp; int n;){
        while(n-->0 && (*dp++ = *sp++));
 }
 
@@ -1092,8 +1092,8 @@ void      ed_genncpy __PARAM__((register genchar *dp,register const genchar *sp, int
  * find the string length of <str>
  */
 
-int    ed_genlen __PARAM__((register const genchar *str), (str)) __OTORP__(register const genchar *str;){
-       register const genchar *sp = str;
+int    ed_genlen __PARAM__((const genchar *str), (str)) __OTORP__(const genchar *str;){
+       const genchar *sp = str;
        while(*sp++);
        return(sp-str-1);
 }
@@ -1108,10 +1108,10 @@ int     ed_genlen __PARAM__((register const genchar *str), (str)) __OTORP__(register
  */
 
 ed_setwidth __PARAM__((const char *string), (string)) __OTORP__(const char *string;){
-       register int indx = 0;
-       register int state = 0;
-       register int c;
-       register int n = 0;
+       int indx = 0;
+       int state = 0;
+       int c;
+       int n = 0;
        static char widths[6] = {1,1};
        while(1) switch(c = *string++)
        {
@@ -1160,7 +1160,7 @@ ed_setwidth __PARAM__((const char *string), (string)) __OTORP__(const char *stri
 /*
  * returns 1 when <n> bytes starting at <a> and <b> are equal
  */
-static int compare __PARAM__((register const char *a,register const char *b,register int n), (a, b, n)) __OTORP__(register const char *a;register const char *b;register int n;){
+static int compare __PARAM__((const char *a,const char *b,int n), (a, b, n)) __OTORP__(const char *a;const char *b;int n;){
        while(n-->0)
        {
                if(*a++ != *b++)
@@ -1188,8 +1188,8 @@ static struct termio ott;
 
 
 tcgetattr __PARAM__((int fd, struct termios *tt), (fd, tt)) __OTORP__(int fd; struct termios *tt;){
-       register int r;
-       register int i;
+       int r;
+       int i;
        tcgeta = 0;
        echoctl = (ECHOCTL!=0);
        if((r=ioctl(fd,TCGETS,tt))>=0 ||  errno!=EINVAL)
@@ -1209,10 +1209,10 @@ tcgetattr __PARAM__((int fd, struct termios *tt), (fd, tt)) __OTORP__(int fd; st
 }
 
 tcsetattr __PARAM__((int fd,int mode,struct termios *tt), (fd, mode, tt)) __OTORP__(int fd;int mode;struct termios *tt;){
-       register int r;
+       int r;
        if(tcgeta)
        {
-               register int i;
+               int i;
                ott.c_lflag = tt->c_lflag;
                ott.c_oflag = tt->c_oflag;
                ott.c_iflag = tt->c_iflag;
@@ -1250,10 +1250,10 @@ tcsetattr __PARAM__((int fd,int mode,struct termios *tt), (fd, mode, tt)) __OTOR
  * Execute keyboard trap on given buffer <inbuff> of given size <isize>
  * <mode> < 0 for vi insert mode
  */
-static int keytrap __PARAM__((char *inbuff,register int insize, int bufsize, int mode), (inbuff, insize, bufsize, mode)) __OTORP__(char *inbuff;register int insize; int bufsize; int mode;){
+static int keytrap __PARAM__((char *inbuff,int insize, int bufsize, int mode), (inbuff, insize, bufsize, mode)) __OTORP__(char *inbuff;int insize; int bufsize; int mode;){
        static char vi_insert[2];
        static long col;
-       register char *cp;
+       char *cp;
        inbuff[insize] = 0;
        col = editb.e_cur;
        if(mode== -2)
index 4d1abaeb11f80fdcc028835193f90d7ff8857b3d..624ae927cb536ad7c80c77cc19d424550033461d 100644 (file)
@@ -190,10 +190,10 @@ static int cr_ok;
 static Histloc_t location = { -5, 0 };
 
 ed_emacsread __PARAM__((int fd,char *buff,int scend), (fd, buff, scend)) __OTORP__(int fd;char *buff;int scend;){
-       register int c;
-       register int i;
-       register genchar *out;
-       register int count;
+       int c;
+       int i;
+       genchar *out;
+       int count;
        int adjust,oadjust;
        char backslash;
        genchar *kptr;
@@ -667,8 +667,8 @@ process:
 }
 
 static void show_info __PARAM__((const char *str), (str)) __OTORP__(const char *str;){
-       register genchar *out = drawbuff;
-       register int c;
+       genchar *out = drawbuff;
+       int c;
        genchar string[LBUF];
        int sav_cur = cur;
        /* save current line */
@@ -690,15 +690,15 @@ static void show_info __PARAM__((const char *str), (str)) __OTORP__(const char *
        draw(UPDATE);
 }
 
-static void putstring __PARAM__((register char *sp), (sp)) __OTORP__(register char *sp;){
-       register int c;
+static void putstring __PARAM__((char *sp), (sp)) __OTORP__(char *sp;){
+       int c;
        while (c= *sp++)
                 putchar(c);
 }
 
 
-static int escape __PARAM__((register genchar *out,int count), (out, count)) __OTORP__(register genchar *out;int count;){
-       register int i,value;
+static int escape __PARAM__((genchar *out,int count), (out, count)) __OTORP__(genchar *out;int count;){
+       int i,value;
        int digit,ch;
        digit = 0;
        value = 0;
@@ -965,7 +965,7 @@ static int escape __PARAM__((register genchar *out,int count), (out, count)) __O
  */
 
 static void xcommands __PARAM__((int count), (count)) __OTORP__(int count;){
-        register int i = ed_getchar(0);
+        int i = ed_getchar(0);
        NOT_USED(count);
         switch(i)
         {
@@ -1052,9 +1052,9 @@ static void search __PARAM__((genchar *out,int direction), (out, direction)) __O
 #ifndef ESH_NFIRST
        Histloc_t location;
 #endif
-       register int i,sl;
+       int i,sl;
        genchar str_buff[LBUF];
-       register genchar *string = drawbuff;
+       genchar *string = drawbuff;
        /* save current line */
        char sav_cur = cur;
        genncpy(str_buff,string,sizeof(str_buff)/CHARSIZE-1);
@@ -1161,18 +1161,18 @@ static void draw __PARAM__((Draw_t option), (option)) __OTORP__(Draw_t option;){
 #define        UPPER  '>'
 
        static char overflow;           /* Screen overflow flag set */
-       register genchar *sptr;         /* Pointer within screen */
+       genchar *sptr;          /* Pointer within screen */
        
        static int offset;              /* Screen offset */
        static char scvalid;            /* Screen is up to date */
        
        genchar nscreen[2*MAXLINE];     /* New entire screen */
        genchar *ncursor;               /* New cursor */
-       register genchar *nptr;         /* Pointer to New screen */
+       genchar *nptr;          /* Pointer to New screen */
        char  longline;                 /* Line overflow */
        genchar *logcursor;
        genchar *nscend;                /* end of logical screen */
-       register int i;
+       int i;
        
        nptr = nscreen;
        sptr = drawbuff;
@@ -1330,8 +1330,8 @@ static void draw __PARAM__((Draw_t option), (option)) __OTORP__(Draw_t option;){
  * cursor is set to reflect the change
  */
 
-static void setcursor __PARAM__((register int newp,int c), (newp, c)) __OTORP__(register int newp;int c;){
-       register int oldp = cursor - screen;
+static void setcursor __PARAM__((int newp,int c), (newp, c)) __OTORP__(int newp;int c;){
+       int oldp = cursor - screen;
        if (oldp > newp)
        {
                if (!cr_ok || (2*(newp+plen)>(oldp+plen)))
@@ -1359,12 +1359,12 @@ skip:
 }
 
 #ifdef SHOPT_MULTIBYTE
-static int print __PARAM__((register int c), (c)) __OTORP__(register int c;){
+static int print __PARAM__((int c), (c)) __OTORP__(int c;){
        return((c&~STRIP)==0 && isprint(c));
 }
 
-static int isword __PARAM__((register int i), (i)) __OTORP__(register int i;){
-       register int c = drawbuff[i];
+static int isword __PARAM__((int i), (i)) __OTORP__(int i;){
+       int c = drawbuff[i];
        return((c&~STRIP) || isalnum(c));
 }
 #endif /* SHOPT_MULTIBYTE */
index d55a2880f1ea50ee83d3aced4f80730bac2f150b..7d0eba2126ca23e251eafdeb395d58541a73f84d 100644 (file)
@@ -171,7 +171,7 @@ static History_t *hist_ptr;
 #   include <pwd.h>
     
     int  acctinit __PARAM__((void), ()){
-       register char *cp, *acctfile;
+       char *cp, *acctfile;
        Namval_t *np = nv_search("ACCTFILE",sh.var_tree,0);
 
        if(!np || !(acctfile=nv_getval(np)))
@@ -229,13 +229,13 @@ static void hist_touch __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handl
  * hist_open() returns 1, if history file is open
  */
 int  sh_histinit __PARAM__((void), ()){
-       register int fd;
-       register History_t *hp;
-       register char *histname;
+       int fd;
+       History_t *hp;
+       char *histname;
        char *fname=0;
        int histmask, maxlines, hist_start;
-       register char *cp;
-       register off_t hsize = 0;
+       char *cp;
+       off_t hsize = 0;
 
        if(sh.hist_ptr=hist_ptr)
                return(1);
@@ -384,7 +384,7 @@ retry:
  * close the history file and free the space
  */
 
-void hist_close __PARAM__((register History_t *hp), (hp)) __OTORP__(register History_t *hp;){
+void hist_close __PARAM__((History_t *hp), (hp)) __OTORP__(History_t *hp;){
        sfclose(hp->histfp);
        free((char*)hp);
        hist_ptr = 0;
@@ -401,7 +401,7 @@ void hist_close __PARAM__((register History_t *hp), (hp)) __OTORP__(register His
 /*
  * check history file format to see if it begins with special byte
  */
-static int hist_check __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
+static int hist_check __PARAM__((int fd), (fd)) __OTORP__(int fd;){
        unsigned char magic[2];
        lseek(fd,(off_t)0,SEEK_SET);
        if((read(fd,(char*)magic,2)!=2) || (magic[0]!=HIST_UNDO))
@@ -422,9 +422,9 @@ static int hist_clean __PARAM__((int fd), (fd)) __OTORP__(int fd;){
  */
 
 static void hist_trim __PARAM__((int n), (n)) __OTORP__(int n;){
-       register char *cp;
-       register int incmd=1, c=0;
-       register History_t *hist_new, *hist_old = hist_ptr;
+       char *cp;
+       int incmd=1, c=0;
+       History_t *hist_new, *hist_old = hist_ptr;
        char *buff, *endbuff;
        off_t oldp,newp;
        struct stat statb;
@@ -490,9 +490,9 @@ static void hist_trim __PARAM__((int n), (n)) __OTORP__(int n;){
 /*
  * position history file at size and find next command number 
  */
-static int hist_nearend __PARAM__((Sfio_t *iop, register off_t size), (iop, size)) __OTORP__(Sfio_t *iop; register off_t size;){
-        register unsigned char *cp, *endbuff;
-        register int n, incmd=1;
+static int hist_nearend __PARAM__((Sfio_t *iop, off_t size), (iop, size)) __OTORP__(Sfio_t *iop; off_t size;){
+        unsigned char *cp, *endbuff;
+        int n, incmd=1;
         unsigned char *buff, marker[4];
        if(size <= 2L || sfseek(iop,size,SEEK_SET)<0)
                goto begin;
@@ -556,10 +556,10 @@ begin:
  * the previous command.
  */
 
-void hist_eof __PARAM__((register History_t *hp), (hp)) __OTORP__(register History_t *hp;){
-       register char *cp,*first,*endbuff;
-       register int incmd = 0;
-       register off_t count = hp->histcnt;
+void hist_eof __PARAM__((History_t *hp), (hp)) __OTORP__(History_t *hp;){
+       char *cp,*first,*endbuff;
+       int incmd = 0;
+       off_t count = hp->histcnt;
        int n,skip=0;
        char *buff;
        sfseek(hp->histfp,count,SEEK_SET);
@@ -652,8 +652,8 @@ void hist_eof __PARAM__((register History_t *hp), (hp)) __OTORP__(register Histo
  * This routine will cause the previous command to be cancelled
  */
 
-void hist_cancel __PARAM__((register History_t *hp), (hp)) __OTORP__(register History_t *hp;){
-       register int c;
+void hist_cancel __PARAM__((History_t *hp), (hp)) __OTORP__(History_t *hp;){
+       int c;
        if(!hp)
                return;
        sfputc(hp->histfp,HIST_UNDO);
@@ -668,8 +668,8 @@ void hist_cancel __PARAM__((register History_t *hp), (hp)) __OTORP__(register Hi
  * flush the current history command
  */
 
-void hist_flush __PARAM__((register History_t *hp), (hp)) __OTORP__(register History_t *hp;){
-       register char *buff;
+void hist_flush __PARAM__((History_t *hp), (hp)) __OTORP__(History_t *hp;){
+       char *buff;
        if(hp)
        {
                if(buff=(char*)sfreserve(hp->histfp,0,1))
@@ -695,11 +695,11 @@ void hist_flush __PARAM__((register History_t *hp), (hp)) __OTORP__(register His
  * a zero byte.  Line sequencing is added as required
  */
 
-static int hist_write __PARAM__((Sfio_t *iop,const __V_ *buff,register int insize,Sfdisc_t* handle), (iop, buff, insize, handle)) __OTORP__(Sfio_t *iop;const __V_ *buff;register int insize;Sfdisc_t* handle;){
-       register char *bufptr = ((char*)buff)+insize;
-       register History_t *hp = hist_ptr;
-       register int c,size = insize;
-       register off_t cur;
+static int hist_write __PARAM__((Sfio_t *iop,const __V_ *buff,int insize,Sfdisc_t* handle), (iop, buff, insize, handle)) __OTORP__(Sfio_t *iop;const __V_ *buff;int insize;Sfdisc_t* handle;){
+       char *bufptr = ((char*)buff)+insize;
+       History_t *hp = hist_ptr;
+       int c,size = insize;
+       off_t cur;
        NOT_USED(handle);
        if(!histflush)
                return(write(sffileno(iop),(char*)buff,size));
@@ -769,7 +769,7 @@ static int hist_write __PARAM__((Sfio_t *iop,const __V_ *buff,register int insiz
  * The buffer must be large enough to hold HIST_MARKSZ chars
  */
 
-static void hist_marker __PARAM__((register char *buff,register long cmdno), (buff, cmdno)) __OTORP__(register char *buff;register long cmdno;){
+static void hist_marker __PARAM__((char *buff,long cmdno), (buff, cmdno)) __OTORP__(char *buff;long cmdno;){
        *buff++ = HIST_CMDNO;
        *buff++ = 0;
        *buff++ = (cmdno>>16);
@@ -781,14 +781,14 @@ static void hist_marker __PARAM__((register char *buff,register long cmdno), (bu
 /*
  * return byte offset in history file for command <n>
  */
-off_t hist_tell __PARAM__((register History_t *hp, int n), (hp, n)) __OTORP__(register History_t *hp; int n;){
+off_t hist_tell __PARAM__((History_t *hp, int n), (hp, n)) __OTORP__(History_t *hp; int n;){
        return(hp->histcmds[hist_ind(hp,n)]);
 }
 
 /*
  * seek to the position of command <n>
  */
-off_t hist_seek __PARAM__((register History_t *hp, int n), (hp, n)) __OTORP__(register History_t *hp; int n;){
+off_t hist_seek __PARAM__((History_t *hp, int n), (hp, n)) __OTORP__(History_t *hp; int n;){
        return(sfseek(hp->histfp,hp->histcmds[hist_ind(hp,n)],SEEK_SET));
 }
 
@@ -798,9 +798,9 @@ off_t hist_seek __PARAM__((register History_t *hp, int n), (hp, n)) __OTORP__(re
  * each new-line character is replaced with string <nl>.
  */
 
-void hist_list __PARAM__((register History_t *hp,Sfio_t *outfile, off_t offset,int last, char *nl), (hp, outfile, offset, last, nl)) __OTORP__(register History_t *hp;Sfio_t *outfile; off_t offset;int last; char *nl;){
-       register int oldc=0;
-       register int c;
+void hist_list __PARAM__((History_t *hp,Sfio_t *outfile, off_t offset,int last, char *nl), (hp, outfile, offset, last, nl)) __OTORP__(History_t *hp;Sfio_t *outfile; off_t offset;int last; char *nl;){
+       int oldc=0;
+       int c;
        if(offset<0 || !hp)
        {
                sfputr(outfile,e_unknown,'\n');
@@ -828,8 +828,8 @@ void hist_list __PARAM__((register History_t *hp,Sfio_t *outfile, off_t offset,i
  * direction < 1 for backwards search
 */
 
-Histloc_t hist_find __PARAM__((register History_t*hp,char *string,register int index1,int flag,int direction), (hp, string, index1, flag, direction)) __OTORP__(register History_t*hp;char *string;register int index1;int flag;int direction;){
-       register int index2;
+Histloc_t hist_find __PARAM__((History_t*hp,char *string,int index1,int flag,int direction), (hp, string, index1, flag, direction)) __OTORP__(History_t*hp;char *string;int index1;int flag;int direction;){
+       int index2;
        off_t offset;
        int *coffset=0;
        Histloc_t location;
@@ -886,10 +886,10 @@ Histloc_t hist_find __PARAM__((register History_t*hp,char *string,register int i
  * returns the line number of the match if successful, otherwise -1
  */
 
-int hist_match __PARAM__((register History_t *hp,off_t offset,char *string,int *coffset), (hp, offset, string, coffset)) __OTORP__(register History_t *hp;off_t offset;char *string;int *coffset;){
-       register unsigned char *cp;
-       register int c;
-       register off_t count;
+int hist_match __PARAM__((History_t *hp,off_t offset,char *string,int *coffset), (hp, offset, string, coffset)) __OTORP__(History_t *hp;off_t offset;char *string;int *coffset;){
+       unsigned char *cp;
+       int c;
+       off_t count;
        int line = 0;
        int chrs=0;
 #ifdef SHOPT_MULTIBYTE
@@ -960,10 +960,10 @@ int hist_match __PARAM__((register History_t *hp,off_t offset,char *string,int *
  */
 
 int hist_copy __PARAM__((char *s1,int size,int command,int line), (s1, size, command, line)) __OTORP__(char *s1;int size;int command;int line;){
-       register int c;
-       register History_t *hp = hist_ptr;
-       register int count = 0;
-       register char *s1max = s1+size;
+       int c;
+       History_t *hp = hist_ptr;
+       int count = 0;
+       char *s1max = s1+size;
        off_t offset;
        if(!hp)
                return(-1);
@@ -1002,10 +1002,10 @@ int hist_copy __PARAM__((char *s1,int size,int command,int line), (s1, size, com
  */
 
 char *hist_word __PARAM__((char *string,int size,int word), (string, size, word)) __OTORP__(char *string;int size;int word;){
-       register int c;
-       register char *s1 = string;
-       register unsigned char *cp = (unsigned char*)s1;
-       register int flag = 0;
+       int c;
+       char *s1 = string;
+       unsigned char *cp = (unsigned char*)s1;
+       int flag = 0;
        if(!hist_ptr)
 #ifdef KSHELL
        {
@@ -1047,7 +1047,7 @@ char *hist_word __PARAM__((char *string,int size,int word), (string, size, word)
  * compute the new command and line number.
  */
 
-Histloc_t hist_locate __PARAM__((History_t *hp,register int command,register int line,int lines), (hp, command, line, lines)) __OTORP__(History_t *hp;register int command;register int line;int lines;){
+Histloc_t hist_locate __PARAM__((History_t *hp,int command,int line,int lines), (hp, command, line, lines)) __OTORP__(History_t *hp;int command;int line;int lines;){
        Histloc_t next;
        line += lines;
        if(!hp)
@@ -1057,7 +1057,7 @@ Histloc_t hist_locate __PARAM__((History_t *hp,register int command,register int
        }
        if(lines > 0)
        {
-               register int count;
+               int count;
                while(command <= hp->histind)
                {
                        count = hist_copy(NIL(char*),0, command,-1);
@@ -1069,7 +1069,7 @@ Histloc_t hist_locate __PARAM__((History_t *hp,register int command,register int
        }
        else
        {
-               register int least = (int)hp->histind-hp->histsize;
+               int least = (int)hp->histind-hp->histsize;
                while(1)
                {
                        if(line >=0)
@@ -1094,7 +1094,7 @@ done:
  * Handle history file exceptions
  */
 static int hist_exceptf __PARAM__((Sfio_t* fp, int type, Sfdisc_t *handle), (fp, type, handle)) __OTORP__(Sfio_t* fp; int type; Sfdisc_t *handle;){
-       register int newfd,oldfd;
+       int newfd,oldfd;
        History_t *hp = (History_t*)handle;
        if(type==SF_WRITE)
        {
@@ -1110,7 +1110,7 @@ static int hist_exceptf __PARAM__((Sfio_t* fp, int type, Sfdisc_t *handle), (fp,
                        close(newfd);
                        if(lseek(oldfd,(off_t)0,SEEK_END) < hp->histcnt)
                        {
-                               register int index = hp->histind;
+                               int index = hp->histind;
                                lseek(oldfd,(off_t)2,SEEK_SET);
                                hp->histcnt = 2;
                                hp->histind = 1;
index 6527c0bc7f7092ff08c27b0dba9d16e0f91ffb1f..72646b8f8a1ee839ee15d95848c912156296c85b 100644 (file)
@@ -247,9 +247,9 @@ static int  textmod __PROTO__((int,int));
  *
 -*/
 
-ed_viread __PARAM__((int fd, register char *shbuf, int nchar), (fd, shbuf, nchar)) __OTORP__(int fd; register char *shbuf; int nchar;){
-       register int i;                 /* general variable */
-       register int term_char;         /* read() termination character */
+ed_viread __PARAM__((int fd, char *shbuf, int nchar), (fd, shbuf, nchar)) __OTORP__(int fd; char *shbuf; int nchar;){
+       int i;                  /* general variable */
+       int term_char;          /* read() termination character */
        char prompt[PRSIZE+2];          /* prompt */
        genchar Physical[2*MAXLINE];    /* physical image */
        genchar Ubuf[MAXLINE];  /* used for U command */
@@ -316,7 +316,7 @@ ed_viread __PARAM__((int fd, register char *shbuf, int nchar), (fd, shbuf, nchar
            }
            else
            {
-               register int c = shbuf[0];
+               int c = shbuf[0];
 
                /*** Save and remove the last character if its an eol, ***/
                /* changing '\r' to '\n' */
@@ -448,7 +448,7 @@ ed_viread __PARAM__((int fd, register char *shbuf, int nchar), (fd, shbuf, nchar
                                virtual[i] = '\n';
                    if(!echoctl)
                    {
-                       register int c = virtual[i];
+                       int c = virtual[i];
                        if( c<=usrerase)
                        {
                                /*** user typed escaped erase or kill char ***/
@@ -652,7 +652,7 @@ ed_viread __PARAM__((int fd, register char *shbuf, int nchar), (fd, shbuf, nchar
 #define virtual                editb.e_inbuf   /* pointer to virtual image buffer */
 
 static void append __PARAM__((int c, int mode), (c, mode)) __OTORP__(int c; int mode;){
-       register int i,j;
+       int i,j;
 
        if( last_virt<max_col && last_phys<max_col )
        {
@@ -675,8 +675,8 @@ static void append __PARAM__((int c, int mode), (c, mode)) __OTORP__(int c; int
  *
 }*/
 
-static void backword __PARAM__((int nwords, register int cmd), (nwords, cmd)) __OTORP__(int nwords; register int cmd;){
-       register int tcur_virt = cur_virt;
+static void backword __PARAM__((int nwords, int cmd), (nwords, cmd)) __OTORP__(int nwords; int cmd;){
+       int tcur_virt = cur_virt;
        while( nwords-- && tcur_virt > first_virt )
        {
                if( !kshisblank(tcur_virt) && kshisblank(tcur_virt-1)
@@ -684,8 +684,8 @@ static void backword __PARAM__((int nwords, register int cmd), (nwords, cmd)) __
                        --tcur_virt;
                else if(cmd != 'B')
                {
-                       register int last = isalph(tcur_virt-1);
-                       register int cur = isalph(tcur_virt);
+                       int last = isalph(tcur_virt-1);
+                       int cur = isalph(tcur_virt);
                        if((!cur && last) || (cur && !last))
                                --tcur_virt;
                }
@@ -719,8 +719,8 @@ static void backword __PARAM__((int nwords, register int cmd), (nwords, cmd)) __
 }*/
 
 static int cntlmode __PARAM__((void), ()){
-       register int c;
-       register int i;
+       int c;
+       int i;
        genchar tmp_u_space[MAXLINE];   /* temporary u_space */
        genchar *real_u_space;          /* points to real u_space */
        int tmp_u_column = INVALID;     /* temporary u_column */
@@ -829,7 +829,7 @@ static int cntlmode __PARAM__((void), ()){
 
                case cntl('V'):
                {
-                       register const char *p = &e_version[5];
+                       const char *p = &e_version[5];
                        save_v();
                        del_line(BAD);
                        while(c = *p++)
@@ -971,7 +971,7 @@ static int cntlmode __PARAM__((void), ()){
                case '#':       /** insert(delete) # to (no)comment command **/
                        if( cur_virt != INVALID )
                        {
-                               register genchar *p = &virtual[last_virt+1];
+                               genchar *p = &virtual[last_virt+1];
                                *p = 0;
                                /*** see whether first char is comment char ***/
                                c = (virtual[0]=='#');
@@ -1026,8 +1026,8 @@ static int cntlmode __PARAM__((void), ()){
  *
 }*/
 
-static void cursor __PARAM__((register int x), (x)) __OTORP__(register int x;){
-       register int delta;
+static void cursor __PARAM__((int x), (x)) __OTORP__(int x;){
+       int delta;
 
 #ifdef SHOPT_MULTIBYTE
        while(physical[x]==MARKER)
@@ -1076,9 +1076,9 @@ static void cursor __PARAM__((register int x), (x)) __OTORP__(register int x;){
  *
 }*/
 
-static void cdelete __PARAM__((register int nchars, int mode), (nchars, mode)) __OTORP__(register int nchars; int mode;){
-       register int i;
-       register genchar *vp;
+static void cdelete __PARAM__((int nchars, int mode), (nchars, mode)) __OTORP__(int nchars; int mode;){
+       int i;
+       genchar *vp;
 
        if( cur_virt < first_virt )
        {
@@ -1162,8 +1162,8 @@ static void del_line __PARAM__((int mode), (mode)) __OTORP__(int mode;){
 }*/
 
 static int delmotion __PARAM__((int motion, int mode), (motion, mode)) __OTORP__(int motion; int mode;){
-       register int begin, end, delta;
-       /* the following saves a register */
+       int begin, end, delta;
+       /* the following saves a */
 
        if( cur_virt == INVALID )
                return(0);
@@ -1215,8 +1215,8 @@ static int delmotion __PARAM__((int motion, int mode), (motion, mode)) __OTORP__
  *
 }*/
 
-static void endword __PARAM__((int nwords, register int cmd), (nwords, cmd)) __OTORP__(int nwords; register int cmd;){
-       register int tcur_virt = cur_virt;
+static void endword __PARAM__((int nwords, int cmd), (nwords, cmd)) __OTORP__(int nwords; int cmd;){
+       int tcur_virt = cur_virt;
        while( nwords-- )
        {
                if( !kshisblank(tcur_virt) && tcur_virt<=last_virt )
@@ -1251,8 +1251,8 @@ static void endword __PARAM__((int nwords, register int cmd), (nwords, cmd)) __O
  *
 }*/
 
-static void forward __PARAM__((register int nwords, int cmd), (nwords, cmd)) __OTORP__(register int nwords; int cmd;){
-       register int tcur_virt = cur_virt;
+static void forward __PARAM__((int nwords, int cmd), (nwords, cmd)) __OTORP__(int nwords; int cmd;){
+       int tcur_virt = cur_virt;
        while( nwords-- )
        {
                if( cmd == 'W' )
@@ -1290,8 +1290,8 @@ static void forward __PARAM__((register int nwords, int cmd), (nwords, cmd)) __O
  *
 }*/
 
-static int getcount __PARAM__((register int c), (c)) __OTORP__(register int c;){
-       register int i;
+static int getcount __PARAM__((int c), (c)) __OTORP__(int c;){
+       int i;
 
        /*** get any repeat count ***/
 
@@ -1330,9 +1330,9 @@ static int getcount __PARAM__((register int c), (c)) __OTORP__(register int c;){
  *
 }*/
 
-static void getline __PARAM__((register int mode), (mode)) __OTORP__(register int mode;){
-       register int c;
-       register int tmp;
+static void getline __PARAM__((int mode), (mode)) __OTORP__(int mode;){
+       int c;
+       int tmp;
 
        addnl = 1;
 
@@ -1494,11 +1494,11 @@ static void getline __PARAM__((register int mode), (mode)) __OTORP__(register in
  *
 }*/
 
-static int mvcursor __PARAM__((register int motion), (motion)) __OTORP__(register int motion;){
-       register int count;
-       register int tcur_virt;
-       register int incr = -1;
-       register int bound = 0;
+static int mvcursor __PARAM__((int motion), (motion)) __OTORP__(int motion;){
+       int count;
+       int tcur_virt;
+       int incr = -1;
+       int bound = 0;
        static int last_find = 0;       /* last find command */
 
        switch(motion)
@@ -1669,9 +1669,9 @@ find_b:
  * print a string
  */
 
-static void pr_string __PARAM__((register const char *sp), (sp)) __OTORP__(register const char *sp;){
+static void pr_string __PARAM__((const char *sp), (sp)) __OTORP__(const char *sp;){
        /*** copy string sp ***/
-       register char *ptr = editb.e_outptr;
+       char *ptr = editb.e_outptr;
        while(*sp)
                *ptr++ = *sp++;
        editb.e_outptr = ptr;
@@ -1685,7 +1685,7 @@ static void pr_string __PARAM__((register const char *sp), (sp)) __OTORP__(regis
  *
 }*/
 
-static void putstring __PARAM__((register int col, register int nchars), (col, nchars)) __OTORP__(register int col; register int nchars;){
+static void putstring __PARAM__((int col, int nchars), (col, nchars)) __OTORP__(int col; int nchars;){
        while( nchars-- )
                putchar(physical[col++]);
        return;
@@ -1721,9 +1721,9 @@ static void putstring __PARAM__((register int col, register int nchars), (col, n
 }*/
 
 static void refresh __PARAM__((int mode), (mode)) __OTORP__(int mode;){
-       register int p;
-       register int regb;
-       register int first_w = first_wind;
+       int p;
+       int regb;
+       int first_w = first_wind;
        int p_differ;
        int new_lw;
        int ncur_phys;
@@ -1890,8 +1890,8 @@ static void refresh __PARAM__((int mode), (mode)) __OTORP__(int mode;){
  *
 }*/
 
-static void replace __PARAM__((register int c, register int increment), (c, increment)) __OTORP__(register int c; register int increment;){
-       register int cur_window;
+static void replace __PARAM__((int c, int increment), (c, increment)) __OTORP__(int c; int increment;){
+       int cur_window;
 
        if( cur_virt == INVALID )
        {
@@ -1945,7 +1945,7 @@ static void replace __PARAM__((register int c, register int increment), (c, incr
 }*/
 
 static void restore_v __PARAM__((void), ()){
-       register int tmpcol;
+       int tmpcol;
        genchar tmpspace[MAXLINE];
 
        if( u_column == INVALID-1 )
@@ -1971,7 +1971,7 @@ static void restore_v __PARAM__((void), ()){
 }*/
 
 static void save_last __PARAM__((void), ()){
-       register int i;
+       int i;
 
        if( (i = cur_virt - first_virt + 1) > 0 )
        {
@@ -2015,8 +2015,8 @@ static void save_v __PARAM__((void), ()){
  * search for <string> in the current command
  */
 static int curline_search __PARAM__((const char *string), (string)) __OTORP__(const char *string;){
-       register int len=strlen(string);
-       register const char *dp,*cp=string, *dpmax;
+       int len=strlen(string);
+       const char *dp,*cp=string, *dpmax;
 #ifdef SHOPT_MULTIBYTE
        ed_external(u_space,(char*)u_space);
 #endif /* SHOPT_MULTIBYTE */
@@ -2031,10 +2031,10 @@ static int curline_search __PARAM__((const char *string), (string)) __OTORP__(co
        return(-1);
 }
 
-static int search __PARAM__((register int mode), (mode)) __OTORP__(register int mode;){
-       register int new_direction;
-       register int oldcurhline;
-       register int i;
+static int search __PARAM__((int mode), (mode)) __OTORP__(int mode;){
+       int new_direction;
+       int oldcurhline;
+       int i;
        static int direction = -1;
        Histloc_t  location;
 
@@ -2114,9 +2114,9 @@ static int search __PARAM__((register int mode), (mode)) __OTORP__(register int
 }*/
 
 static void sync_cursor __PARAM__((void), ()){
-       register int p;
-       register int v;
-       register int c;
+       int p;
+       int v;
+       int c;
        int new_phys;
 
        if( cur_virt == INVALID )
@@ -2199,10 +2199,10 @@ static void sync_cursor __PARAM__((void), ()){
  *
 }*/
 
-static int textmod __PARAM__((register int c, int mode), (c, mode)) __OTORP__(register int c; int mode;){
-       register int i;
-       register genchar *p = lastline;
-       register int trepeat = repeat;
+static int textmod __PARAM__((int c, int mode), (c, mode)) __OTORP__(int c; int mode;){
+       int i;
+       genchar *p = lastline;
+       int trepeat = repeat;
        static int lastmacro;
        genchar *savep;
 
@@ -2521,19 +2521,19 @@ yankeol:
 
 
 #ifdef SHOPT_MULTIBYTE
-    static int isalph __PARAM__((register int c), (c)) __OTORP__(register int c;){
-       register int v = virtual[c];
+    static int isalph __PARAM__((int c), (c)) __OTORP__(int c;){
+       int v = virtual[c];
        return((v&~STRIP) || isalnum(v) || v=='_');
     }
 
 
-    static int kshisblank __PARAM__((register int c), (c)) __OTORP__(register int c;){
-       register int v = virtual[c];
+    static int kshisblank __PARAM__((int c), (c)) __OTORP__(int c;){
+       int v = virtual[c];
        return((v&~STRIP)==0 && isspace(v));
     }
 
-    static int ismetach __PARAM__((register int c), (c)) __OTORP__(register int c;){
-       register int v = virtual[c];
+    static int ismetach __PARAM__((int c), (c)) __OTORP__(int c;){
+       int v = virtual[c];
        return((v&~STRIP)==0 && ismeta(v));
     }
 
@@ -2544,7 +2544,7 @@ yankeol:
  */
 static int getrchar()
 {
-       register int c;
+       int c;
        if((c=ed_getchar(1))== usrlnext)
                c = ed_getchar(2);
        return(c);
index 08fd82830aeb47fd9efa84d75d00c1952a5cf4e1..0c29b67f31346bf77f66512a67e25823ea55a728 100644 (file)
@@ -185,13 +185,6 @@ extern __MANGLE__ int b_tty __PROTO__((int, char*[],__V_*));
 extern __MANGLE__ int b_uname __PROTO__((int, char*[],__V_*));
 extern __MANGLE__ int b_wc __PROTO__((int, char*[],__V_*));
 
-/* The following are extensions for apollo computers */
-#ifdef  apollo
-    extern __MANGLE__ int b_rootnode __PROTO__((int, char*[],__V_*));
-    extern __MANGLE__ int b_inlib __PROTO__((int, char*[],__V_*));
-    extern __MANGLE__ int b_ver __PROTO__((int, char*[],__V_*));
-#endif /* apollo */
-
 extern __MANGLE__ const char   e_alrm1[];
 extern __MANGLE__ const char   e_alrm2[];
 extern __MANGLE__ const char   e_badfun[];
@@ -228,12 +221,6 @@ extern __MANGLE__ const char       e_cneedsarg[];
     extern __MANGLE__ const char       e_mapping[];
     extern __MANGLE__ const char       e_versions[];
 #endif /* SHOPT_FS_3D */
-#ifdef apollo
-    extern __MANGLE__ const char       e_rootnode[];
-    extern __MANGLE__ const char       e_nover[];
-    extern __MANGLE__ const char       e_badver[];
-    extern __MANGLE__ const char       e_badinlib[];
-#endif /* apollo */
 
 /* for option parsing */
 extern __MANGLE__ const char sh_optalarm[];
index 26f9ca70398e9f88d9f6f9e229d41b22eacae174..ba45bcec2749b9d9dc7741f29533eeb5da9b7edd 100644 (file)
 #else
 #   define NMULTI       NVPIX
 #endif /* SHOPT_MULTIBYTE */
-#ifdef apollo
-#   define SYSTYPENOD  (sh.bltin_nodes+51+NMULTI)
-#endif /* apollo */
 
 #endif /* SH_VALNOD */
index 82b655071b7e7321f9cef0ad3b4f096ba07cee38..71f3c92ff114e29fa10532f85c5ccaed21bfbbae 100644 (file)
@@ -66,10 +66,10 @@ static char id[] = "\n@(#)mamstate (AT&T Bell Laboratories) 06/26/89\0\n";
 
 main(argc, argv)
 int            argc;
-register char**        argv;
+char** argv;
 {
-       register char*  s;
-       register int    c;
+       char*   s;
+       int     c;
        long            ref;
        struct stat     st;
        char            buf[1024];
diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/apollo.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/apollo.c
deleted file mode 100644 (file)
index c647575..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: apollo.c /main/4 1996/10/04 15:52:17 drk $ */
-/***************************************************************
-*                                                              *
-*                      AT&T - PROPRIETARY                      *
-*                                                              *
-*        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF        *
-*                    AT&T BELL LABORATORIES                    *
-*         AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN         *
-*            ACCORDANCE WITH APPLICABLE AGREEMENTS             *
-*                                                              *
-*                Copyright (c) 1995 AT&T Corp.                 *
-*              Unpublished & Not for Publication               *
-*                     All Rights Reserved                      *
-*                                                              *
-*       The copyright notice above does not evidence any       *
-*      actual or intended publication of such source code      *
-*                                                              *
-*               This software was created by the               *
-*           Advanced Software Technology Department            *
-*                    AT&T Bell Laboratories                    *
-*                                                              *
-*               For further information contact                *
-*                    {research,attmail}!dgk                    *
-*                                                              *
-***************************************************************/
-
-/* : : generated by proto : : */
-
-#if !defined(__PROTO__)
-#if defined(__STDC__) || defined(__cplusplus) || defined(_proto) || defined(c_plusplus)
-#if defined(__cplusplus)
-#define __MANGLE__     "C"
-#else
-#define __MANGLE__
-#endif
-#define __STDARG__
-#define __PROTO__(x)   x
-#define __OTORP__(x)
-#define __PARAM__(n,o) n
-#if !defined(__STDC__) && !defined(__cplusplus)
-#if !defined(c_plusplus)
-#define const
-#endif
-#define signed
-#define void           int
-#define volatile
-#define __V_           char
-#else
-#define __V_           void
-#endif
-#else
-#define __PROTO__(x)   ()
-#define __OTORP__(x)   x
-#define __PARAM__(n,o) o
-#define __MANGLE__
-#define __V_           char
-#define const
-#define signed
-#define void           int
-#define volatile
-#endif
-#if defined(__cplusplus) || defined(c_plusplus)
-#define __VARARG__     ...
-#else
-#define __VARARG__
-#endif
-#if defined(__STDARG__)
-#define __VA_START__(p,a)      va_start(p,a)
-#else
-#define __VA_START__(p,a)      va_start(p)
-#endif
-#endif
-#include       <ast.h>
-#include        "defs.h"
-#include       <errno.h>
-
-#ifdef apollo
-#include "/sys/ins/base.ins.c"
-#include "/sys/ins/pad.ins.c"
-#include "/sys/ins/error.ins.c"
-#include <sys/param.h> /* for maximum pathname length */
-#include <apollo/sys/ubase.h>
-#include <apollo/sys/name.h>
-#include <apollo/error.h>
-
-int pad_create __PARAM__((char *fname), (fname)) __OTORP__(char *fname;){
-       short oldfd = 1;
-       short newfd;
-        short size = 25;
-       long st;
-
-       pad_$create (*fname, (short)strlen(fname), pad_$edit, oldfd, 
-           pad_$bottom, 0, size, newfd, st);
-        if (st != 0)
-               error(ERROR_system(1),e_open,"dm pad");
-       return(newfd);
-}
-
-pad_wait __PARAM__((int fd), (fd)) __OTORP__(int fd;){
-       long st;
-
-       pad_$edit_wait((stream_$id_t)fd, st);
-
-        return (st == 0 ? 0 : 1);
-
-}
-
-char *apollo_error __PARAM__((void), ()){
-       extern __MANGLE__ long unix_proc_$status;
-        char subsys[80], module[80], code[80];
-        short slen, mlen, clen;
-        static char retstr[256];
-
-        error_$get_text (unix_proc_$status, subsys, slen, 
-               module, mlen, code, clen);
-       subsys[slen] = module[mlen] = code[clen] = 0;
-       if (clen == 0)
-               sprintf (code, "status 0x%08lx", unix_proc_$status);
-       if ( mlen )
-               sprintf(retstr, "%s (%s/%s)", code, subsys, module );
-       else
-               sprintf(retstr, "%s (%s)", code, subsys );              
-
-        return (retstr);
-}
-
-/*
- * declarations to support the apollo builtin commands 
- * rootnode, inlib, and ver.
- */
-
-static char last_rootnode[MAXPATHLEN] = "/";
-static char do_ver;
-static char *preval = NULL, *sysval, *sysid = "SYSTYPE";
-
-/* 
- * code to support the apollo builtin functions rootnode, 
- * inlib, and ver.
- */
-
-int    b_rootnode __PARAM__((int argn,char *argv[]), (argn, argv)) __OTORP__(int argn;char *argv[];){
-       if (argn == 1) 
-       {       /* report current setting */
-               sfprintf(sfstdout,"%s\n",last_rootnode);
-                       return(0);
-       }
-       if (!is_valid_rootnode(argv[1])) 
-               sh_cfail(e_rootnode);
-       if (rootnode(argv[1]) != 0) 
-       {
-               perror("rootnode: ");   /* ? */
-               sh_cfail(e_rootnode);
-       }
-       if (argn == 2)
-               strcpy(last_rootnode, argv[1]);
-       else 
-       {
-               sysval = argv[1];
-               sh_eval(sh_sfeval(argv),0);
-               if (rootnode(last_rootnode) != 0) 
-                       sh_cfail(e_rootnode);
-       }
-       return(0);
-}
-
-int    b_ver __PARAM__((int argn,char *argv[]), (argn, argv)) __OTORP__(int argn;char *argv[];){
-       char *oldver;
-       short i1, i2;
-       std_$call unsigned char c_$decode_version(__VARARG__);
-
-       oldver = SYSTYPENOD->namval.cp;
-       if (argn == 1 || argn > 2) 
-       {
-               sysval = NULL;
-               if (oldver)
-                       preval = sysval = oldver;
-       }
-       if (argn == 1) 
-       {
-               if (!oldver || !sysval)
-                       sh_cfail(e_nover);
-               else 
-               {
-                       sfprintf(sfstdout,"%s\n",sysval);
-               }
-       }
-       else 
-       {
-               if (!c_$decode_version (*argv[1], (short) strlen (argv[1]), i1, i2))
-                       sh_cfail(e_badver);
-               else 
-               {
-                       if (argn == 2) 
-                       {
-                               short namlen = strlen(sysid);
-                               short arglen = strlen(argv[1]);
-                                
-                               nv_unset(SYSTYPENOD);
-                               nv_putval(SYSTYPENOD, argv[1],NV_RDONLY);
-                               nv_onattr(SYSTYPENOD, NV_EXPORT | NV_NOFREE);
-                               ev_$set_var (sysid, &namlen, argv[1], &arglen);
-                       }
-                       else 
-                       {
-                               int fd;
-                               short namlen = strlen(sysid);
-                               short arglen = strlen(argv[1]);
-
-                               sysval = argv[1];
-                               argv = &argv[2];
-                               sh_eval(sh_sfeval(argv),0);
-                               ev_$set_var(sysid, &namlen, sysval, &arglen);
-                               if((fd=path_open(argv[0],path_get(argv[0]))) < 0)
-                               {
-                                       arglen = (short)strlen(preval);
-                                       ev_$set_var (sysid, &namlen, preval, &arglen);
-                                       error(ERROR_system(1),e_open,argv[0]);
-                               }
-                               close(fd);
-                               sh_eval(sfopen(argv[0],"s"),0);
-                               arglen = (short)strlen(preval);
-                               ev_$set_var (sysid, &namlen, preval, &arglen);
-                       }
-               }
-        }
-       return(sh.exitval);
-}
-
-/*
- * rootnode.c - a chroot call which doesn't require you to be root...
- */
-
-/*
- *  Changes:
-       01/24/88 brian  Initial coding
- */
-                  
-
-#ifndef NULL
-# define       NULL    ((__V_ *) 0)
-#endif
-
-extern __MANGLE__ boolean
-unix_fio_$status_to_errno __PROTO__((
-               status_$t       & status,
-               char            * pn,
-               short           & pnlen                  
-));
-
-is_valid_rootnode __PARAM__((const char *path), (path)) __OTORP__(const char *path;){
-       if (geteuid() == 0)
-               return 1;
-       return (path[0] == '/' && path[1] == '/' && path[2] != '\0' &&
-               strchr(&path[2], '/') == NULL);
-}
-
-rootnode __PARAM__((char * path), (path)) __OTORP__(char * path;){
-        uid_$t         dir_uid, rtn_uid;
-       name_$pname_t   new_root_name, rest_path;
-       name_$name_t    leaf;
-       short           rest_len, leaf_len, err;
-       status_$t       status;
-        
-       strcpy(new_root_name, path);
-
-       name_$resolve_afayc(new_root_name, (short)strlen(new_root_name), 
-               &dir_uid, &rtn_uid, rest_path, &rest_len, leaf, &leaf_len, &err, &status);
-
-               if (status.all != status_$ok) {
-               unix_fio_$status_to_errno(status, path, strlen(path));
-               return (-1);
-       }
-
-       name_$set_diru(rtn_uid, rest_path, (short) rest_len, name_$node_dir_type, &status);
-         
-               if (status.all != status_$ok) {
-               unix_fio_$status_to_errno(status, path, strlen(path));
-               return(-1);
-       }
-       return(0);
-}
-
-#endif /* apollo */
-
-/*
- *  Apollo system support library loads into the virtual address space
- */
-
-int    b_inlib(argc,argv)
-char **argv;
-{
-       register char *a1 = argv[1];
-       int status;
-       short len;
-       std_$call void loader_$inlib(__VARARG__);
-       if(sh.subshell)
-               sh_subfork();
-       if(a1)
-       {
-               len = strlen(a1);
-               loader_$inlib(*a1, len, status);
-               if(status!=0)
-                       error(3, e_badinlib);
-       }
-       return(0);
-}
index 42b35c356b21d9e3a4ad7b8e37aba015ceb9bdff..e62fa3562e397a32ca4c8d492d526f950e660b4e 100644 (file)
@@ -133,9 +133,9 @@ static char flagadr[NUM_OPTS+1];
  *  The -o option is used to set option by name
  *  This routine returns the number of non-option arguments
  */
-int sh_argopts __PARAM__((int argc,register char *argv[]), (argc, argv)) __OTORP__(int argc;register char *argv[];){
-       register int n;
-       register Shopt_t newflags=sh.options, opt;
+int sh_argopts __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){
+       int n;
+       Shopt_t newflags=sh.options, opt;
        int setflag=0, action=0, trace=(int)sh_isoption(SH_XTRACE);
        Namval_t *np = NIL(Namval_t*);
        const char *cp;
@@ -296,8 +296,8 @@ int sh_argopts __PARAM__((int argc,register char *argv[]), (argc, argv)) __OTORP
  * returns the value of $-
  */
 char *sh_argdolminus __PARAM__((void), ()){
-       register const char *cp=sh_optksh;
-       register char *flagp=flagadr;
+       const char *cp=sh_optksh;
+       char *flagp=flagadr;
        while(cp< &sh_optksh[NUM_OPTS])
        {
                if(sh.options&flagval[cp-sh_optksh])
@@ -329,8 +329,8 @@ void sh_argset __PARAM__((char *argv[]), (argv)) __OTORP__(char *argv[];){
  * If flag is set, then the block dolh is not freed
  */
 struct dolnod *sh_argfree __PARAM__((struct dolnod *blk,int flag), (blk, flag)) __OTORP__(struct dolnod *blk;int flag;){
-       register struct dolnod* argr=blk;
-       register struct dolnod* argblk;
+       struct dolnod*  argr=blk;
+       struct dolnod*  argblk;
        if(argblk=argr)
        {
                if((--argblk->dolrefcnt)==0)
@@ -364,10 +364,10 @@ struct dolnod *sh_argfree __PARAM__((struct dolnod *blk,int flag), (blk, flag))
  * grab space for arglist and copy args
  * The strings are copied after the argument vector
  */
-struct dolnod *sh_argcreate __PARAM__((register char *argv[]), (argv)) __OTORP__(register char *argv[];){
-       register struct dolnod *dp;
-       register char **pp=argv, *sp;
-       register int    size=0,n;
+struct dolnod *sh_argcreate __PARAM__((char *argv[]), (argv)) __OTORP__(char *argv[];){
+       struct dolnod *dp;
+       char **pp=argv, *sp;
+       int     size=0,n;
        /* count args and number of bytes of arglist */
        while(sp= *pp++)
                size += strlen(sp);
@@ -391,7 +391,7 @@ struct dolnod *sh_argcreate __PARAM__((register char *argv[]), (argv)) __OTORP__
  *  used to set new arguments for functions
  */
 struct dolnod *sh_argnew __PARAM__((char *argi[], struct dolnod **savargfor), (argi, savargfor)) __OTORP__(char *argi[]; struct dolnod **savargfor;){
-       register struct dolnod *olddolh = dolh;
+       struct dolnod *olddolh = dolh;
        *savargfor = argfor;
        dolh = 0;
        argfor = 0;
@@ -416,7 +416,7 @@ void sh_argreset __PARAM__((struct dolnod *blk, struct dolnod *afor), (blk, afor
  * increase the use count so that an sh_argset will not make it go away
  */
 struct dolnod *sh_arguse __PARAM__((void), ()){
-       register struct dolnod *dh;
+       struct dolnod *dh;
        if(dh=dolh)
                dh->dolrefcnt++;
        return(dh);
@@ -426,8 +426,8 @@ struct dolnod *sh_arguse __PARAM__((void), ()){
  *  Print option settings on standard output
  *  if mode==1 for -o format, otherwise +o format
  */
-static void print_opts __PARAM__((Shopt_t oflags,register int mode), (oflags, mode)) __OTORP__(Shopt_t oflags;register int mode;){
-       register const Shtable_t *tp = shtab_options;
+static void print_opts __PARAM__((Shopt_t oflags,int mode), (oflags, mode)) __OTORP__(Shopt_t oflags;int mode;){
+       const Shtable_t *tp = shtab_options;
        Shopt_t value;
        if(mode)
                sfputr(sfstdout,ERROR_translate(e_heading,1),'\n');
@@ -459,10 +459,10 @@ static void print_opts __PARAM__((Shopt_t oflags,register int mode), (oflags, mo
  * build an argument list
  */
 char **sh_argbuild __PARAM__((int *nargs, const struct comnod *comptr), (nargs, comptr)) __OTORP__(int *nargs; const struct comnod *comptr;){
-       register struct argnod  *argp;
+       struct argnod   *argp;
        struct argnod *arghead=0;
        {
-               register const struct comnod    *ac = comptr;
+               const struct comnod     *ac = comptr;
                /* see if the arguments have already been expanded */
                if(!ac->comarg)
                {
@@ -471,7 +471,7 @@ char **sh_argbuild __PARAM__((int *nargs, const struct comnod *comptr), (nargs,
                }
                else if(!(ac->comtyp&COMSCAN))
                {
-                       register struct dolnod *ap = (struct dolnod*)ac->comarg;
+                       struct dolnod *ap = (struct dolnod*)ac->comarg;
                        *nargs = ap->dolnum;
                        return(ap->dolval+ap->dolbot);
                }
@@ -489,9 +489,9 @@ char **sh_argbuild __PARAM__((int *nargs, const struct comnod *comptr), (nargs,
                }
        }
        {
-               register char   **comargn;
-               register int    argn;
-               register char   **comargm;
+               char    **comargn;
+               int     argn;
+               char    **comargm;
                argn = *nargs;
                /* allow room to prepend args */
 #ifdef SHOPT_VPIX
@@ -528,14 +528,14 @@ char **sh_argbuild __PARAM__((int *nargs, const struct comnod *comptr), (nargs,
 }
 
 /* Argument expansion */
-static int arg_expand __PARAM__((register struct argnod *argp, struct argnod **argchain), (argp, argchain)) __OTORP__(register struct argnod *argp; struct argnod **argchain;){
-       register int count = 0;
+static int arg_expand __PARAM__((struct argnod *argp, struct argnod **argchain), (argp, argchain)) __OTORP__(struct argnod *argp; struct argnod **argchain;){
+       int count = 0;
        argp->argflag &= ~ARG_MAKE;
 #ifdef SHOPT_DEVFD
        if(*argp->argval==0 && (argp->argflag&ARG_EXP))
        {
                /* argument of the form (cmd) */
-               register struct argnod *ap;
+               struct argnod *ap;
                int monitor, fd, pv[2];
                ap = (struct argnod*)stakseek(ARGVAL);
                ap->argflag |= ARG_MAKE;
index ed43cfeeb6d9d04ae802486a3d0c6f85b0d08916..bfc87b65159bebdc6a8d2f55ac46eac5f1405a29 100644 (file)
 
 static int level;
 static double arith __PARAM__((const char **ptr, struct lval *lvalue, int type, double n), (ptr, lvalue, type, n)) __OTORP__(const char **ptr; struct lval *lvalue; int type; double n;){
-       register double r= 0;
+       double r= 0;
        char *str = (char*)*ptr;
        switch(type)
        {
            case ASSIGN:
            {
-               register Namval_t *np = (Namval_t*)(lvalue->value);
-               register Namarr_t *ap;
+               Namval_t *np = (Namval_t*)(lvalue->value);
+               Namarr_t *ap;
                if(ap = nv_arrayptr(np))
                {
                        if(!array_assoc(ap))
@@ -119,13 +119,13 @@ static double arith __PARAM__((const char **ptr, struct lval *lvalue, int type,
            }
            case LOOKUP:
            {
-               register int c = *str;
+               int c = *str;
                lvalue->value = (char*)0;
                if(c=='.')
                        c = str[1];
                if(isaletter(c))
                {
-                       register Namval_t *np;
+                       Namval_t *np;
                        while(c= *++str, isaname(c)||c=='.');
                        if(c=='(')
                        {
@@ -177,7 +177,7 @@ static double arith __PARAM__((const char **ptr, struct lval *lvalue, int type,
            }
            case VALUE:
            {
-               register Namval_t *np = (Namval_t*)(lvalue->value);
+               Namval_t *np = (Namval_t*)(lvalue->value);
                if(sh_isoption(SH_NOEXEC))
                        return(0);
                if((level || sh_isoption(SH_NOUNSET)) && nv_isnull(np) && !nv_isattr(np,NV_INTEGER))
@@ -200,13 +200,13 @@ static double arith __PARAM__((const char **ptr, struct lval *lvalue, int type,
        return(r);
 }
 
-double sh_strnum __PARAM__((register const char *str, char** ptr), (str, ptr)) __OTORP__(register const char *str; char** ptr;){
+double sh_strnum __PARAM__((const char *str, char** ptr), (str, ptr)) __OTORP__(const char *str; char** ptr;){
        return(strval(str,(char**)ptr, arith));
 }
 
-double sh_arith __PARAM__((register const char *str), (str)) __OTORP__(register const char *str;){
+double sh_arith __PARAM__((const char *str), (str)) __OTORP__(const char *str;){
        const char *ptr = str;
-       register double d;
+       double d;
        if(*str==0)
                return(0);
        d = strval(str,(char**)&ptr,arith);
index fc9ca4b6d8816cfaa8811dcb190b0a256702d9ab..1dde32dea1a024e592a61680971ff7e8ec7c16a4 100644 (file)
@@ -114,8 +114,8 @@ struct index_array
  *   but <= ARRAY_MAX) is returned.
  *
  */
-static int     arsize __PARAM__((register int maxi), (maxi)) __OTORP__(register int maxi;){
-       register int i = roundof(maxi,ARRAY_INCR);
+static int     arsize __PARAM__((int maxi), (maxi)) __OTORP__(int maxi;){
+       int i = roundof(maxi,ARRAY_INCR);
        return (i>ARRAY_MAX?ARRAY_MAX:i);
 }
 
@@ -126,10 +126,10 @@ static int        arsize __PARAM__((register int maxi), (maxi)) __OTORP__(register int
  *        allocated Namarr_t structure is returned.
  *        <maxi> becomes the current index of the array.
  */
-static struct index_array *array_grow __PARAM__((register struct index_array *arp,int maxi), (arp, maxi)) __OTORP__(register struct index_array *arp;int maxi;){
-       register struct index_array *ap;
-       register int i=0;
-       register int newsize = arsize(maxi+1);
+static struct index_array *array_grow __PARAM__((struct index_array *arp,int maxi), (arp, maxi)) __OTORP__(struct index_array *arp;int maxi;){
+       struct index_array *ap;
+       int i=0;
+       int newsize = arsize(maxi+1);
        if (maxi >= ARRAY_MAX)
                error(ERROR_exit(1),e_subscript, fmtbase((long)maxi,10,0));
        ap = new_of(struct index_array,(newsize-1)*sizeof(union Value*));
@@ -158,7 +158,7 @@ static struct index_array *array_grow __PARAM__((register struct index_array *ar
  * Check for bounds violation for indexed array
  */
 void array_check __PARAM__((Namval_t *np,int flag), (np, flag)) __OTORP__(Namval_t *np;int flag;){
-       register struct index_array *ap = (struct index_array*)nv_arrayptr(np);
+       struct index_array *ap = (struct index_array*)nv_arrayptr(np);
        if(ap->header.nelem&ARRAY_UNDEF)
        {
                ap->header.nelem &= ~ARRAY_UNDEF;
@@ -194,9 +194,9 @@ void array_check __PARAM__((Namval_t *np,int flag), (np, flag)) __OTORP__(Namval
  * After the lookup is done the last @ or * subscript is incremented
  */
 union Value *array_find __PARAM__((Namval_t *np,int flag), (np, flag)) __OTORP__(Namval_t *np;int flag;){
-       register struct index_array *ap = (struct index_array*)nv_arrayptr(np);
-       register union Value *up;
-       register unsigned dot=0;
+       struct index_array *ap = (struct index_array*)nv_arrayptr(np);
+       union Value *up;
+       unsigned dot=0;
        if(is_associative(ap))
                up = (union Value*)((*ap->header.fun)(np,NIL(char*),0));
        else
@@ -241,12 +241,12 @@ union Value *array_find __PARAM__((Namval_t *np,int flag), (np, flag)) __OTORP__
  * freeing relevant storage
  */
 static Namarr_t *nv_changearray __PARAM__((Namval_t *np, __V_ *(*fun)(Namval_t*,const char*,int)), (np, fun)) __OTORP__(Namval_t *np; __V_ *(*fun)();){
-       register Namarr_t *ap;
+       Namarr_t *ap;
        char numbuff[NUMSIZE];
        unsigned dot, digit, n;
        union Value *up;
        struct index_array *save_ap;
-       register char *string_index= &numbuff[NUMSIZE];
+       char *string_index= &numbuff[NUMSIZE];
        numbuff[NUMSIZE]='\0';
 
        if(!fun || !(ap = nv_arrayptr(np)) || is_associative(ap))
@@ -284,7 +284,7 @@ static Namarr_t *nv_changearray __PARAM__((Namval_t *np, __V_ *(*fun)(Namval_t*,
  * The array pointer is returned if sucessful.
  */
 Namarr_t *nv_setarray __PARAM__((Namval_t *np, __V_ *(*fun)(Namval_t*,const char*,int)), (np, fun)) __OTORP__(Namval_t *np; __V_ *(*fun)();){
-       register Namarr_t *ap;
+       Namarr_t *ap;
 
        if(fun && (ap = nv_arrayptr(np)) && !is_associative(ap))
        {
@@ -321,8 +321,8 @@ Namarr_t *nv_setarray __PARAM__((Namval_t *np, __V_ *(*fun)(Namval_t*,const char
  * Otherwise, 1 is returned.
  */
 int nv_nextsub __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
-       register struct index_array *ap = (struct index_array*)nv_arrayptr(np);
-       register unsigned dot;
+       struct index_array *ap = (struct index_array*)nv_arrayptr(np);
+       unsigned dot;
        if(!ap || !(ap->header.nelem&ARRAY_SCAN))
                return(0);
        if(is_associative(ap))
@@ -353,9 +353,9 @@ int nv_nextsub __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
  * The node pointer is returned which can be NULL if <np> is
  *    not already array and the ARRAY_ADD bit of <mode> is not set.
  */
-Namval_t *nv_putsub __PARAM__((Namval_t *np,register char *sp,register long mode), (np, sp, mode)) __OTORP__(Namval_t *np;register char *sp;register long mode;){
-       register struct index_array *ap = (struct index_array*)nv_arrayptr(np);
-       register int size = (mode&ARRAY_MASK);
+Namval_t *nv_putsub __PARAM__((Namval_t *np,char *sp,long mode), (np, sp, mode)) __OTORP__(Namval_t *np;char *sp;long mode;){
+       struct index_array *ap = (struct index_array*)nv_arrayptr(np);
+       int size = (mode&ARRAY_MASK);
        if(!ap || !ap->header.fun)
        {
                if(sp)
@@ -367,7 +367,7 @@ Namval_t *nv_putsub __PARAM__((Namval_t *np,register char *sp,register long mode
                }
                if(!ap || size>=ap->maxi)
                {
-                       register struct index_array *apold;
+                       struct index_array *apold;
                        if(size==0)
                                return(NIL(Namval_t*));
                        ap = array_grow(apold=ap,size);
@@ -398,9 +398,9 @@ Namval_t *nv_putsub __PARAM__((Namval_t *np,register char *sp,register long mode
  * process an array subscript for node <np> given the subscript <cp>
  * returns pointer to character after the subscript
  */
-char *nv_endsubscript __PARAM__((Namval_t *np, register char *cp, int mode), (np, cp, mode)) __OTORP__(Namval_t *np; register char *cp; int mode;){
-       register int count=1, quoted=0, c;
-       register char *sp = cp+1;
+char *nv_endsubscript __PARAM__((Namval_t *np, char *cp, int mode), (np, cp, mode)) __OTORP__(Namval_t *np; char *cp; int mode;){
+       int count=1, quoted=0, c;
+       char *sp = cp+1;
        /* first find matching ']' */
        while(count>0 && (c= *++cp))
        {
@@ -435,9 +435,9 @@ char *nv_endsubscript __PARAM__((Namval_t *np, register char *cp, int mode), (np
 
 char   *nv_getsub __PARAM__((Namval_t* np), (np)) __OTORP__(Namval_t* np;){
        static char numbuff[NUMSIZE];
-       register struct index_array *ap = (struct index_array*)nv_arrayptr(np);
-       register unsigned dot, n;
-       register char *cp = &numbuff[NUMSIZE];
+       struct index_array *ap = (struct index_array*)nv_arrayptr(np);
+       unsigned dot, n;
+       char *cp = &numbuff[NUMSIZE];
        if(!ap)
                return(NIL(char*));
        if(is_associative(ap))
@@ -456,7 +456,7 @@ char        *nv_getsub __PARAM__((Namval_t* np), (np)) __OTORP__(Namval_t* np;){
  * If <np> is an indexed array node, the current subscript index
  * retuned, otherwise returns -1
  */
-int nv_aindex __PARAM__((register Namval_t* np), (np)) __OTORP__(register Namval_t* np;){
+int nv_aindex __PARAM__((Namval_t* np), (np)) __OTORP__(Namval_t* np;){
        Namarr_t *ap = nv_arrayptr(np);
        if(!ap || is_associative(ap))
                return(-1);
@@ -475,9 +475,9 @@ struct assoc_array
 /*
  *  This is the default implementation for associate arrays
  */
-__V_ *nv_associative __PARAM__((register Namval_t *np,const char *sp,int mode), (np, sp, mode)) __OTORP__(register Namval_t *np;const char *sp;int mode;){
-       register struct assoc_array *ap = (struct assoc_array*)nv_arrayptr(np);
-       register int type;
+__V_ *nv_associative __PARAM__((Namval_t *np,const char *sp,int mode), (np, sp, mode)) __OTORP__(Namval_t *np;const char *sp;int mode;){
+       struct assoc_array *ap = (struct assoc_array*)nv_arrayptr(np);
+       int type;
        switch(mode)
        {
            case NV_AINIT:
@@ -536,7 +536,7 @@ __V_ *nv_associative __PARAM__((register Namval_t *np,const char *sp,int mode),
 /*
  * Assign values to an array
  */
-void nv_setvec __PARAM__((register Namval_t *np,register int argc,register char *argv[]), (np, argc, argv)) __OTORP__(register Namval_t *np;register int argc;register char *argv[];){
+void nv_setvec __PARAM__((Namval_t *np,int argc,char *argv[]), (np, argc, argv)) __OTORP__(Namval_t *np;int argc;char *argv[];){
        while(--argc >= 0)
        {
                if(argc>0  || nv_isattr(np,NV_ARRAY))
index f4da65f2af7514d674edf8232b073fdc528be1cd..40241e86f34541ed0243d2a2a4009fe572b7df16 100644 (file)
@@ -136,8 +136,8 @@ void sh_deparse __PARAM__((Sfio_t *out, const union anynode *t,int tflags), (out
 /*
  * print script corresponding to shell tree <t>
  */
-static void p_tree __PARAM__((register const union anynode *t,register int tflags), (t, tflags)) __OTORP__(register const union anynode *t;register int tflags;){
-       register char *cp;
+static void p_tree __PARAM__((const union anynode *t,int tflags), (t, tflags)) __OTORP__(const union anynode *t;int tflags;){
+       char *cp;
        int save = end_line;
        int needbrace = (tflags&NEED_BRACE);
        tflags &= ~NEED_BRACE;
@@ -280,7 +280,7 @@ static void p_tree __PARAM__((register const union anynode *t,register int tflag
 
                case TARITH:
                {
-                       register struct argnod *ap = t->ar.arexpr;
+                       struct argnod *ap = t->ar.arexpr;
                        if(begin_line && level)
                                sfnputc(outfile,'\t',level);
                        sfprintf(outfile,"(( %s ))%c",ap->argflag&ARG_RAW?sh_fmtq(ap->argval):ap->argval,end_line);
@@ -396,7 +396,7 @@ static void p_tree __PARAM__((register const union anynode *t,register int tflag
  * decrement indent level for flag==END
  */
 static void p_keyword __PARAM__((const char *word,int flag), (word, flag)) __OTORP__(const char *word;int flag;){
-       register int sep;
+       int sep;
        if(flag==END)
                sep = end_line;
        else if(*word=='[')
@@ -416,9 +416,9 @@ static void p_keyword __PARAM__((const char *word,int flag), (word, flag)) __OTO
                level++;
 }
 
-static void p_arg __PARAM__((register const struct argnod *arg,register int endchar,int opts), (arg, endchar, opts)) __OTORP__(register const struct argnod *arg;register int endchar;int opts;){
-       register const char *cp;
-       register int flag;
+static void p_arg __PARAM__((const struct argnod *arg,int endchar,int opts), (arg, endchar, opts)) __OTORP__(const struct argnod *arg;int endchar;int opts;){
+       const char *cp;
+       int flag;
        do
        {
                if(!arg->argnxt.ap)
@@ -454,9 +454,9 @@ static void p_arg __PARAM__((register const struct argnod *arg,register int endc
        return;
 }
 
-static void p_redirect __PARAM__((register const struct ionod *iop), (iop)) __OTORP__(register const struct ionod *iop;){
-       register int iof;
-       register char *cp;
+static void p_redirect __PARAM__((const struct ionod *iop), (iop)) __OTORP__(const struct ionod *iop;){
+       int iof;
+       char *cp;
        for(;iop;iop=iop->ionxt)
        {
                iof=iop->iofile;
@@ -517,8 +517,8 @@ static void p_redirect __PARAM__((register const struct ionod *iop), (iop)) __OT
        return;
 }
 
-static void p_comarg __PARAM__((const register struct comnod *com), (com)) __OTORP__(const register struct comnod *com;){
-       register int flag = end_line;
+static void p_comarg __PARAM__((const struct comnod *com), (com)) __OTORP__(const struct comnod *com;){
+       int flag = end_line;
        if(com->comarg || com->comio)
                flag = ' ';
        if(com->comset)
@@ -538,8 +538,8 @@ static void p_comarg __PARAM__((const register struct comnod *com), (com)) __OTO
 }
 
 static void p_comlist __PARAM__((const struct dolnod *dol,int endchar), (dol, endchar)) __OTORP__(const struct dolnod *dol;int endchar;){
-       register char *cp, *const*argv;
-       register int flag = ' ', special;
+       char *cp, *const*argv;
+       int flag = ' ', special;
        argv = dol->dolval+ARG_SPARE;
        cp = *argv;
        special = (*cp=='[' && cp[1]==0);
@@ -562,7 +562,7 @@ static void p_comlist __PARAM__((const struct dolnod *dol,int endchar), (dol, en
        return;
 }
 
-static void p_switch __PARAM__((register const struct regnod *reg), (reg)) __OTORP__(register const struct regnod *reg;){
+static void p_switch __PARAM__((const struct regnod *reg), (reg)) __OTORP__(const struct regnod *reg;){
        if(level>1)
                sfnputc(outfile,'\t',level-1);
        p_arg(reg->regptr,')',PRE);
@@ -583,7 +583,7 @@ static void p_switch __PARAM__((register const struct regnod *reg), (reg)) __OTO
 /*
  * output here documents
  */
-static void here_body __PARAM__((register const struct ionod *iop), (iop)) __OTORP__(register const struct ionod *iop;){
+static void here_body __PARAM__((const struct ionod *iop), (iop)) __OTORP__(const struct ionod *iop;){
        Sfio_t *infile;
 #ifdef xxx
        if(iop->iolink)
index abff09aa71c4a7235b33d49f7d370126f359821d..399cac650f0625939996d2c4dd978f6372648edd 100644 (file)
             */
            static struct ld_info *getinfo __PARAM__((__V_ *module), (module)) __OTORP__(__V_ *module;){
                struct ld_info *info=ld_info;
-               register int n=1;
+               int n=1;
                if (!ld_info || module != last_module)
                {
                        last_module = module;
index e3dfa0c33d6884197354cdb6d4fb8086b32ff329..06f17d29e31bc262673a92ff4352dd5118c4ee83 100644 (file)
@@ -158,8 +158,8 @@ static void         glob_dir __PROTO__((struct argnod*));
 #ifdef SHOPT_NOCASE
 
 #   include    <ctype.h>
-    static void utol __PARAM__((register char const *str1,register char *str2), (str1, str2)) __OTORP__(register char const *str1;register char *str2;){               
-        register int c;         
+    static void utol __PARAM__((char const *str1,char *str2), (str1, str2)) __OTORP__(char const *str1;char *str2;){
+        int c;
         for(; c= *((unsigned char*)str1); str1++,str2++)
         {               
                 if(isupper(c))  
@@ -180,9 +180,9 @@ static void         glob_dir __PROTO__((struct argnod*));
 
 
 int path_expand __PARAM__((const char *pattern, struct argnod **arghead), (pattern, arghead)) __OTORP__(const char *pattern; struct argnod **arghead;){
-       register struct argnod *ap;
-       register struct glob *gp;
-       register char *pat;
+       struct argnod *ap;
+       struct glob *gp;
+       char *pat;
 #ifdef KSHELL
        struct glob globdata;
        membase = &globdata;
@@ -223,10 +223,10 @@ int path_expand __PARAM__((const char *pattern, struct argnod **arghead), (patte
 }
 
 static void glob_dir __PARAM__((struct argnod *ap), (ap)) __OTORP__(struct argnod *ap;){
-       register char           *rescan;
-       register char           *prefix;
-       register char           *pat;
-       register struct dirent  *dirp;
+       char            *rescan;
+       char            *prefix;
+       char            *pat;
+       struct dirent   *dirp;
        DIR                     *dirf;
        char                    *path=0;
        char                    quote = 0;
@@ -344,7 +344,7 @@ process:
 #endif /* SHOPT_NOCASE */
                        while(dirp = readdir(dirf))
                        {
-                               register int c;
+                               int c;
                                if(!D_FILENO(dirp))
                                        continue;
                                if(fignore && *fignore && strmatch(dirp->d_name, fignore))
@@ -365,9 +365,9 @@ process:
        return;
 }
 
-static  void addmatch __PARAM__((const char *dir,const char *pat,const register char *rescan,char *endslash), (dir, pat, rescan, endslash)) __OTORP__(const char *dir;const char *pat;const register char *rescan;char *endslash;){
-       register struct argnod *ap = (struct argnod*)stakseek(ARGVAL);
-       register struct glob *gp = globptr();
+static  void addmatch __PARAM__((const char *dir,const char *pat,const char *rescan,char *endslash), (dir, pat, rescan, endslash)) __OTORP__(const char *dir;const char *pat;const char *rescan;char *endslash;){
+       struct argnod *ap = (struct argnod*)stakseek(ARGVAL);
+       struct glob *gp = globptr();
        struct stat statb;
        if(dir)
        {
@@ -429,11 +429,11 @@ static  void addmatch __PARAM__((const char *dir,const char *pat,const register
  * scan tree and add each name that matches the given pattern
  */
 static void scantree __PARAM__((Hashtab_t *tree, const char *pattern), (tree, pattern)) __OTORP__(Hashtab_t *tree; const char *pattern;){
-       register Hashpos_t *hp;
-       register Namval_t *np;
-       register struct argnod *ap;
-       register struct glob *gp = globptr();
-       register char *cp;
+       Hashpos_t *hp;
+       Namval_t *np;
+       struct argnod *ap;
+       struct glob *gp = globptr();
+       char *cp;
        if(hp = hashscan(tree,0))
        {
                while((np = (Namval_t*)hashnext(hp)) && !nv_isnull(np))
@@ -461,7 +461,7 @@ static void scantree __PARAM__((Hashtab_t *tree, const char *pattern), (tree, pa
  * The number of matches is returned
  */
 
-int path_complete __PARAM__((const char *name,register const char *suffix, struct argnod **arghead), (name, suffix, arghead)) __OTORP__(const char *name;register const char *suffix; struct argnod **arghead;){
+int path_complete __PARAM__((const char *name,const char *suffix, struct argnod **arghead), (name, suffix, arghead)) __OTORP__(const char *name;const char *suffix; struct argnod **arghead;){
        sufstr = suffix;
        suflen = strlen(suffix);
        return(path_expand(name,arghead));
@@ -474,10 +474,10 @@ int path_complete __PARAM__((const char *name,register const char *suffix, struc
  */
 
 static void sh_trim(sp)
-register char *sp;
+char *sp;
 {
-       register char *dp = sp;
-       register int c;
+       char *dp = sp;
+       int c;
        while(1)
        {
                if((c= *sp++) == '\\')
@@ -491,9 +491,9 @@ register char *sp;
 
 #ifdef SHOPT_BRACEPAT
 int path_generate __PARAM__((struct argnod *todo, struct argnod **arghead), (todo, arghead)) __OTORP__(struct argnod *todo; struct argnod **arghead;){
-       register char *cp;
-       register int brace;
-       register struct argnod *ap;
+       char *cp;
+       int brace;
+       struct argnod *ap;
        struct argnod *top = 0;
        struct argnod *apin;
        char *pat, *rescan, *bracep;
index ed116de192a88fe587e5bdede1e54badc8d7781f..4d32f1f212965d0e5b1eaae486cdeff14ec821e2 100644 (file)
@@ -106,10 +106,10 @@ static char       indone;
 /*
  * Most signals caught or ignored by the shell come here
 */
-void   sh_fault __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){
-       register int    flag;
-       register char   *trap;
-       register struct checkpt *pp = (struct checkpt*)sh.jmplist;
+void   sh_fault __PARAM__((int sig), (sig)) __OTORP__(int sig;){
+       int     flag;
+       char    *trap;
+       struct checkpt  *pp = (struct checkpt*)sh.jmplist;
        /* reset handler */
        signal(sig, sh_fault);
        /* handle ignored signals */
@@ -176,8 +176,8 @@ void        sh_fault __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){
  * initialize signal handling
  */
 void sh_siginit __PARAM__((void), ()){
-       register int sig, n=SIGTERM+1;
-       register const struct shtable2  *tp = shtab_signals;
+       int sig, n=SIGTERM+1;
+       const struct shtable2   *tp = shtab_signals;
        init_shtab_signals();
        sig_begin();
        /* find the largest signal number in the table */
@@ -214,8 +214,8 @@ void sh_siginit __PARAM__((void), ()){
 /*
  * Turn on trap handler for signal <sig>
  */
-void   sh_sigtrap __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){
-       register int flag;
+void   sh_sigtrap __PARAM__((int sig), (sig)) __OTORP__(int sig;){
+       int flag;
        sh.st.otrapcom = 0;
        if(sig==0)
                sh_sigdone();
@@ -238,7 +238,7 @@ void        sh_sigtrap __PARAM__((register int sig), (sig)) __OTORP__(register int sig;
  * set signal handler so sh_done is called for all caught signals
  */
 void   sh_sigdone __PARAM__((void), ()){
-       register int    flag, sig = sh.sigmax;
+       int     flag, sig = sh.sigmax;
        setdone=1;
        sh.sigflag[0] |= SH_SIGFAULT;
        while(--sig>0)
@@ -254,9 +254,9 @@ void        sh_sigdone __PARAM__((void), ()){
  * Free the trap strings if mode is non-zero
  * If mode>1 then ignored traps cause signal to be ignored 
  */
-void   sh_sigreset __PARAM__((register int mode), (mode)) __OTORP__(register int mode;){
-       register char   *trap;
-       register int    flag, sig=sh.st.trapmax;
+void   sh_sigreset __PARAM__((int mode), (mode)) __OTORP__(int mode;){
+       char    *trap;
+       int     flag, sig=sh.st.trapmax;
        while(sig-- > 0)
        {
                if(trap=sh.st.trapcom[sig])
@@ -296,9 +296,9 @@ void        sh_sigreset __PARAM__((register int mode), (mode)) __OTORP__(register int m
 /*
  * free up trap if set and restore signal handler if modified
  */
-void   sh_sigclear __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){
-       register int flag = sh.sigflag[sig];
-       register char *trap;
+void   sh_sigclear __PARAM__((int sig), (sig)) __OTORP__(int sig;){
+       int flag = sh.sigflag[sig];
+       char *trap;
        sh.st.otrapcom=0;
        if(!(flag&SH_SIGFAULT))
                return;
@@ -316,8 +316,8 @@ void        sh_sigclear __PARAM__((register int sig), (sig)) __OTORP__(register int sig
  */
 
 void   sh_chktrap __PARAM__((void), ()){
-       register int    sig=sh.st.trapmax;
-       register char *trap;
+       int     sig=sh.st.trapmax;
+       char *trap;
        if(!sh.trapnote)
                sig=0;
        sh.trapnote &= ~SH_SIGTRAP;
@@ -401,9 +401,9 @@ int sh_trap __PARAM__((const char *trap, int mode), (trap, mode)) __OTORP__(cons
 /*
  * exit the current scope and jump to an earlier one based on pp->mode
  */
-void sh_exit __PARAM__((register int xno), (xno)) __OTORP__(register int xno;){
-       register struct checkpt *pp = (struct checkpt*)sh.jmplist;
-       register int            sig=0;
+void sh_exit __PARAM__((int xno), (xno)) __OTORP__(int xno;){
+       struct checkpt  *pp = (struct checkpt*)sh.jmplist;
+       int             sig=0;
        sh.exitval=xno;
        if(xno==SH_EXITSIG)
                sh.exitval |= (sig=sh.lastsig);
@@ -471,9 +471,9 @@ void sh_exit __PARAM__((register int xno), (xno)) __OTORP__(register int xno;){
  * This is the exit routine for the shell
  */
 
-void sh_done __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){
-       register char *t;
-       register int savxit = sh.exitval;
+void sh_done __PARAM__((int sig), (sig)) __OTORP__(int sig;){
+       char *t;
+       int savxit = sh.exitval;
        sh.trapnote = 0;
        indone=1;
        if(sig==0)
index 078ce0cb72416b7667cba9416d5cf80b5cf981bd..12061776971173557a38ae2fd0a3ded9099a6878 100644 (file)
@@ -102,8 +102,8 @@ Fcin_t _Fcin;
 /*
  * open stream <f> for fast character input
  */
-int    fcfopen __PARAM__((register Sfio_t* f), (f)) __OTORP__(register Sfio_t* f;){
-       register int    n;
+int    fcfopen __PARAM__((Sfio_t* f), (f)) __OTORP__(Sfio_t* f;){
+       int     n;
        char            *buff;
        Fcin_t          save;
        errno = 0;
@@ -136,9 +136,9 @@ int fcfopen __PARAM__((register Sfio_t* f), (f)) __OTORP__(register Sfio_t* f;){
  * the previous character is a 0 byte.
  */
 int    fcfill __PARAM__((void), ()){
-       register int            n;
-       register Sfio_t *f;
-       register unsigned char  *last=_Fcin.fclast, *ptr=_Fcin.fcptr;
+       int             n;
+       Sfio_t  *f;
+       unsigned char   *last=_Fcin.fclast, *ptr=_Fcin.fcptr;
        if(!(f=fcfile()))
        {
                /* see whether pointer has passed null byte */
@@ -170,7 +170,7 @@ int fcfill __PARAM__((void), ()){
  * Synchronize and close the current stream
  */
 int fcclose __PARAM__((void), ()){
-       register unsigned char *ptr;
+       unsigned char *ptr;
        if(_Fcin.fclast==0)
                return(0);
        if((ptr=_Fcin.fcptr)>_Fcin.fcbuff && *(ptr-1)==0)
index c81320ac77122f1a397807238d2896a7dc943bfc..34532b4644e1c78790cd14dbd5f38fb4e052481b 100644 (file)
@@ -170,7 +170,7 @@ static Namval_t             *ifsnp;
 /*
  * Invalidate all path name bindings
  */
-static void rehash __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
+static void rehash __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
        nv_onattr(np,NV_NOALIAS);
 }
 
@@ -187,8 +187,8 @@ static char *nospace __PARAM__((int unused), (unused)) __OTORP__(int unused;){
 #   include    "edit.h"
     /* Trap for CSWIDTH variable */
     static void put_cswidth __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){
-       register char *cp;
-       register char *name = nv_name(np);
+       char *cp;
+       char *name = nv_name(np);
        if(ed_setwidth(val?val:"") && !(flags&NV_IMPORT))
                error(ERROR_exit(1),e_format,nv_name(np));
        nv_putv(np, val, flags, fp);
@@ -196,8 +196,8 @@ static char *nospace __PARAM__((int unused), (unused)) __OTORP__(int unused;){
 #endif /* SHOPT_MULTIBYTE */
 
 /* Trap for VISUAL and EDITOR variables */
-static void put_ed __PARAM__((register Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(register Namval_t* np;const char *val;int flags;Namfun_t *fp;){
-       register const char *cp, *name=nv_name(np);
+static void put_ed __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){
+       const char *cp, *name=nv_name(np);
        if(*name=='E' && nv_getval(nv_scoped(VISINOD)))
                goto done;
        sh_offoption(SH_VI|SH_EMACS|SH_GMACS);
@@ -225,7 +225,7 @@ static void put_optindex __PARAM__((Namval_t* np,const char *val,int flags,Namfu
 }
 
 /* Trap for restricted variables PATH, SHELL, ENV */
-static void put_restricted __PARAM__((register Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(register Namval_t* np;const char *val;int flags;Namfun_t *fp;){
+static void put_restricted __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){
        if(!(flags&NV_RDONLY) && sh_isoption(SH_RESTRICTED))
                error(ERROR_exit(1),e_restricted,nv_name(np));
        if(nv_name(np)==nv_name(PATHNOD))                       
@@ -236,15 +236,6 @@ static void put_restricted __PARAM__((register Namval_t* np,const char *val,int
        nv_putv(np, val, flags, fp);
 }
 
-#ifdef apollo
-    /* Trap for SYSTYPE variable */
-    static void put_systype __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){
-       sh.lastpath = 0;
-       nv_scan(sh.track_tree,rehash,NV_TAGGED,NV_TAGGED);
-       nv_putv(np, val, flags, fp);
-    }
-#endif
-
 #ifdef _hdr_locale
 
 /*
@@ -391,7 +382,6 @@ static MsgStr allmsgs[] = {
        {"Resources lost", 25, 125},
        {"Reverting to old tty driver...", 25, 126},
        {"S [mask]", 25, 127},
-       {"SIGAPOLLO", 25, 128},
        {"Security label changed", 25, 129},
        {"Socket interrupt", 25, 130},
        {"Sound completed", 25, 131},
@@ -508,7 +498,7 @@ static MsgStr allmsgs[] = {
 /*
  * Without this proto, standard C says that _DtGetMessage() returns
  * an int, even though it really returns a pointer.  The compiler is
- * then free to use the high 32-bits of the return register for
+ * then free to use the high 32-bits of the return for
  * something else (like scratch), and that can garble the pointer.
  */
 char *_DtGetMessage __PROTO__((char *filename, int set, int n, char *s));
@@ -723,7 +713,7 @@ char *savedNlsPath;
        void charsize_init __PARAM__((void), ()){
                static char fc[3] = { 0301,  ESS2, ESS3};
                char buff[8];
-               register int i,n;
+               int i,n;
                wchar_t wc;
                memset(buff,0301,MB_CUR_MAX);
                for(i=0; i<=2; i++)
@@ -772,7 +762,7 @@ char *savedNlsPath;
                        free((__V_*)sh_lexstates[ST_BEGIN]);
                if(ast.locale.set&LC_SET_CTYPE)
                {
-                       register int c;
+                       int c;
                        char *state[4];
                        sh_lexstates[ST_BEGIN] = state[0] = (char*)malloc(4*(1<<CHAR_BIT));
                        memcpy(state[0],sh_lexrstates[ST_BEGIN],(1<<CHAR_BIT));
@@ -821,7 +811,7 @@ char *savedNlsPath;
 #endif /* _hdr_locale */
 
 /* Trap for IFS assignment and invalidates state table */
-static void put_ifs __PARAM__((register Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(register Namval_t* np;const char *val;int flags;Namfun_t *fp;){
+static void put_ifs __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){
        ifsnp = 0;
        nv_putv(np, val, flags, fp);
 }
@@ -830,9 +820,9 @@ static void put_ifs __PARAM__((register Namval_t* np,const char *val,int flags,N
  * This is the lookup function for IFS
  * It keeps the sh.ifstable up to date
  */
-static char* get_ifs __PARAM__((register Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(register Namval_t* np; Namfun_t *fp;){
-       register char *cp, *value;
-       register int c,n;
+static char* get_ifs __PARAM__((Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(Namval_t* np; Namfun_t *fp;){
+       char *cp, *value;
+       int c,n;
        value = nv_getv(np,fp);
        if(np!=ifsnp)
        {
@@ -882,7 +872,7 @@ static char* get_ifs __PARAM__((register Namval_t* np, Namfun_t *fp), (np, fp))
 #   define gettimeofday(a,b)
 #endif
 
-static void put_seconds __PARAM__((register Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(register Namval_t* np;const char *val;int flags;Namfun_t *fp;){
+static void put_seconds __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){
        static double sec_offset;
        double d;
        struct tms tp;
@@ -906,7 +896,7 @@ static void put_seconds __PARAM__((register Namval_t* np,const char *val,int fla
        }
 }
 
-static char* get_seconds __PARAM__((register Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(register Namval_t* np; Namfun_t *fp;){
+static char* get_seconds __PARAM__((Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(Namval_t* np; Namfun_t *fp;){
        struct tms tp;
        double d;
        NOT_USED(fp);
@@ -915,7 +905,7 @@ static char* get_seconds __PARAM__((register Namval_t* np, Namfun_t *fp), (np, f
        return(sh_ftos(d,nv_size(np)));
 }
 
-static double nget_seconds __PARAM__((register Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(register Namval_t* np; Namfun_t *fp;){
+static double nget_seconds __PARAM__((Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(Namval_t* np; Namfun_t *fp;){
        struct tms tp;
        NOT_USED(fp);
        gettimeofday(&tp,NIL(void *));
@@ -925,9 +915,9 @@ static double nget_seconds __PARAM__((register Namval_t* np, Namfun_t *fp), (np,
 /*
  * These three functions are used to get and set the RANDOM variable
  */
-static void put_rand __PARAM__((register Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(register Namval_t* np;const char *val;int flags;Namfun_t *fp;){
+static void put_rand __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){
        static long rand_last;
-       register long n;
+       long n;
        NOT_USED(fp);
        if(!val)
        {
@@ -949,8 +939,8 @@ static void put_rand __PARAM__((register Namval_t* np,const char *val,int flags,
  * get random number in range of 0 - 2**15
  * never pick same number twice in a row
  */
-static double nget_rand __PARAM__((register Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(register Namval_t* np; Namfun_t *fp;){
-       register long cur, last= *np->nvalue.lp;
+static double nget_rand __PARAM__((Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(Namval_t* np; Namfun_t *fp;){
+       long cur, last= *np->nvalue.lp;
        NOT_USED(fp);
        do
                cur = (rand()>>rand_shift)&RANDMASK;
@@ -959,8 +949,8 @@ static double nget_rand __PARAM__((register Namval_t* np, Namfun_t *fp), (np, fp
        return((double)cur);
 }
 
-static char* get_rand __PARAM__((register Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(register Namval_t* np; Namfun_t *fp;){
-       register long n = nget_rand(np,fp);
+static char* get_rand __PARAM__((Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(Namval_t* np; Namfun_t *fp;){
+       long n = nget_rand(np,fp);
        return(fmtbase(n, 10, 0));
 }
 
@@ -979,7 +969,7 @@ static double nget_lineno __PARAM__((Namval_t* np, Namfun_t *fp), (np, fp)) __OT
 }
 
 static void put_lineno __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){
-       register long n;
+       long n;
        NOT_USED(fp);
        if(!val)
        {
@@ -994,8 +984,8 @@ static void put_lineno __PARAM__((Namval_t* np,const char *val,int flags,Namfun_
        sh.st.firstline += nget_lineno(np,fp)+1-n;
 }
 
-static char* get_lineno __PARAM__((register Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(register Namval_t* np; Namfun_t *fp;){
-       register long n = nget_lineno(np,fp);
+static char* get_lineno __PARAM__((Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(Namval_t* np; Namfun_t *fp;){
+       long n = nget_lineno(np,fp);
        return(fmtbase(n, 10, 0));
 }
 
@@ -1024,7 +1014,7 @@ static void put_lastarg __PARAM__((Namval_t* np,const char *val,int flags,Namfun
      * set or unset the mappings given a colon separated list of directories
      */
     static void vpath_set __PARAM__((char *str, int mode), (str, mode)) __OTORP__(char *str; int mode;){
-       register char *lastp, *oldp=str, *newp=strchr(oldp,':');
+       char *lastp, *oldp=str, *newp=strchr(oldp,':');
        if(!sh.lim.fs3d)
                return;
        while(newp)
@@ -1040,8 +1030,8 @@ static void put_lastarg __PARAM__((Namval_t* np,const char *val,int flags,Namfun
     }
 
     /* catch vpath assignments */
-    static void put_vpath __PARAM__((register Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(register Namval_t* np;const char *val;int flags;Namfun_t *fp;){
-       register char *cp;
+    static void put_vpath __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){
+       char *cp;
        if(cp = nv_getval(np))
                vpath_set(cp,0);
        if(val)
@@ -1080,10 +1070,6 @@ static Namfun_t L_ARG_init       = {  &L_ARG_disc};
     static Namfun_t LC_ALL_init                = {  &LC_disc};
     static Namfun_t LANG_init          = {  &LC_disc};
 #endif /* _hdr_locale */
-#ifdef apollo
-    static const Namdisc_t SYSTYPE_disc        = {  0, put_systype };
-    static Namfun_t SYSTYPE_init       = {  &SYSTYPEdisc};
-#endif /* apollo */
 #ifdef SHOPT_MULTIBYTE
     static const Namdisc_t CSWIDTH_disc        = {  0, put_cswidth };
     static Namfun_t CSWIDTH_init       = {  &CSWIDTH_disc};
@@ -1093,7 +1079,7 @@ static Namfun_t L_ARG_init        = {  &L_ARG_disc};
  * This function will get called whenever a configuration parameter changes
  */
 static int newconf __PARAM__((const char *name, const char *path, const char *value), (name, path, value)) __OTORP__(const char *name; const char *path; const char *value;){
-       register char *arg;
+       char *arg;
        if(strcmp(name,"UNIVERSE")==0 && strcmp(astconf(name,0,0),value))
        {
                sh.universe = 0;
@@ -1112,9 +1098,9 @@ static int newconf __PARAM__((const char *name, const char *path, const char *va
 /*
  * initialize the shell
  */
-int sh_init __PARAM__((register int argc,register char *argv[]), (argc, argv)) __OTORP__(register int argc;register char *argv[];){
-       register char *name;
-       register int n,prof;
+int sh_init __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){
+       char *name;
+       int n,prof;
 #ifdef MTRACE
        Mt_certify = 1;
 #endif /* MTRACE */
@@ -1255,8 +1241,8 @@ void sh_reinit __PARAM__((char *argv[]), (argv)) __OTORP__(char *argv[];){
 /*
  * set when creating a local variable of this name
  */
-Namfun_t *nv_cover __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
-       register Namfun_t *nfp=0;
+Namfun_t *nv_cover __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
+       Namfun_t *nfp=0;
        if(np==IFSNOD)
                nfp = &IFS_init;
        else if(np==PATHNOD)
@@ -1294,9 +1280,6 @@ static void nv_init __PARAM__((void), ()){
        nv_stack(LCNUMNOD, &LC_NUM_init);
        nv_stack(LANGNOD, &LANG_init);
 #endif /* _hdr_locale */
-#ifdef apollo
-       nv_stack(SYSTYPENOD, &SYSTYPE_init);
-#endif /* apollo */
 #ifdef SHOPT_MULTIBYTE
        nv_stack(CSWIDTHNOD, &CSWIDTH_init);
 #endif /* SHOPT_MULTIBYTE */
@@ -1316,10 +1299,10 @@ static void nv_init __PARAM__((void), ()){
  */
 
 static Hashtab_t *inittree __PARAM__((const struct shtable2 *name_vals), (name_vals)) __OTORP__(const struct shtable2 *name_vals;){
-       register Namval_t *np;
-       register const struct shtable2 *tp;
-       register unsigned n = 0;
-       register Hashtab_t *treep;
+       Namval_t *np;
+       const struct shtable2 *tp;
+       unsigned n = 0;
+       Hashtab_t *treep;
        for(tp=name_vals;*tp->sh_name;tp++)
                n++;
        np = (Namval_t*)calloc(n,sizeof(Namval_t));
@@ -1365,10 +1348,10 @@ static Hashtab_t *inittree __PARAM__((const struct shtable2 *name_vals), (name_v
  */
 
 static void env_init __PARAM__((void), ()){
-       register char *cp;
-       register Namval_t       *np;
-       register char **ep=environ;
-       register char *next=0;
+       char *cp;
+       Namval_t        *np;
+       char **ep=environ;
+       char *next=0;
        if(ep)
        {
                while(cp= *ep++)
index 34fc16bc8a38779e6b5b22c6e916beee958b8d4d..b938d330f3cec4cdc3210e7ec34ca20e47735bd2 100644 (file)
@@ -153,7 +153,7 @@ static int  slowread __PROTO__((Sfio_t*, __V_*, int, Sfdisc_t*));
 static int     slowexcept __PROTO__((Sfio_t*, int, Sfdisc_t*));
 static int     pipeexcept __PROTO__((Sfio_t*, int, Sfdisc_t*));
 static int     io_prompt __PROTO__((int));
-static int     io_heredoc __PROTO__((register struct ionod*));
+static int     io_heredoc __PROTO__((struct ionod*));
 static void    sftrack __PROTO__((Sfio_t*,int,int));
 static int     tee_write __PROTO__((Sfio_t*,const __V_*,int,Sfdisc_t*));
 static const Sfdisc_t eval_disc = { NULL, NULL, NULL, eval_exceptf, NULL};
@@ -178,7 +178,7 @@ static short                filemapsize;
 /* ======== input output and file copying ======== */
 
 void sh_ioinit __PARAM__((void), ()){
-       register int n;
+       int n;
        filemapsize = 8;
        filemap = (struct fdsave*)malloc(8*sizeof(struct fdsave));
 #ifdef SHOPT_FASTPIPE
@@ -215,10 +215,10 @@ void sh_ioinit __PARAM__((void), ()){
  * For output streams, the buffer is set to sh.output and put into
  * the sh.outpool synchronization pool
  */
-Sfio_t *sh_iostream __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
-       register Sfio_t *iop;
-       register int status = sh_iocheckfd(fd);
-       register int flags = SF_WRITE;
+Sfio_t *sh_iostream __PARAM__((int fd), (fd)) __OTORP__(int fd;){
+       Sfio_t *iop;
+       int status = sh_iocheckfd(fd);
+       int flags = SF_WRITE;
        char *bp;
        int size;
 #ifdef SHOPT_FASTPIPE
@@ -282,8 +282,8 @@ Sfio_t *sh_iostream __PARAM__((register int fd), (fd)) __OTORP__(register int fd
 /*
  * preserve the file descriptor or stream by moving it
  */
-static void io_preserve __PARAM__((register Sfio_t *sp, register int f2), (sp, f2)) __OTORP__(register Sfio_t *sp; register int f2;){
-       register int fd;
+static void io_preserve __PARAM__((Sfio_t *sp, int f2), (sp, f2)) __OTORP__(Sfio_t *sp; int f2;){
+       int fd;
        if(sp)
                fd = sfsetfd(sp,10);
        else
@@ -315,8 +315,8 @@ static void io_preserve __PARAM__((register Sfio_t *sp, register int f2), (sp, f
  * The original stream <f1> is closed.
  *  The new file descriptor <f2> is returned;
  */
-int sh_iorenumber __PARAM__((register int f1,register int f2), (f1, f2)) __OTORP__(register int f1;register int f2;){
-       register Sfio_t *sp = sh.sftable[f2];
+int sh_iorenumber __PARAM__((int f1,int f2), (f1, f2)) __OTORP__(int f1;int f2;){
+       Sfio_t *sp = sh.sftable[f2];
        if(f1!=f2)
        {
                /* see whether file descriptor is in use */
@@ -330,7 +330,7 @@ int sh_iorenumber __PARAM__((register int f1,register int f2), (f1, f2)) __OTORP
                sh_close(f2);
                if(f2<=2 && sp)
                {
-                       register Sfio_t *spnew = sh_iostream(f1);
+                       Sfio_t *spnew = sh_iostream(f1);
                        sh.fdstatus[f2] = (sh.fdstatus[f1]&~IOCLEX);
                        sfsetfd(spnew,f2);
                        sfswap(spnew,sp);
@@ -354,9 +354,9 @@ int sh_iorenumber __PARAM__((register int f1,register int f2), (f1, f2)) __OTORP
 /*
  * close a file descriptor and update stream table and attributes 
  */
-int sh_close __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
-       register Sfio_t *sp;
-       register int r = 0;
+int sh_close __PARAM__((int fd), (fd)) __OTORP__(int fd;){
+       Sfio_t *sp;
+       int r = 0;
        if(fd<0)
                return(-1);
        if(fd==sh.coutpipe)
@@ -379,9 +379,9 @@ int sh_close __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
  * Open a file for reading
  * On failure, print message.
  */
-int sh_open __PARAM__((register const char *path, int flags, ...), (va_alist)) __OTORP__(va_dcl)
-{ __OTORP__(register const char *path; int flags; )
-       register int            fd;
+int sh_open __PARAM__((const char *path, int flags, ...), (va_alist)) __OTORP__(va_dcl)
+{ __OTORP__(const char *path; int flags; )
+       int             fd;
        mode_t                  mode;
 #ifdef SOCKET
        struct sockaddr_in      addr;
@@ -432,8 +432,8 @@ int sh_open __PARAM__((register const char *path, int flags, ...), (va_alist)) _
        return(fd);
 }
 
-int sh_chkopen __PARAM__((register const char *name), (name)) __OTORP__(register const char *name;){
-       register int fd = sh_open(name,O_RDONLY,0);
+int sh_chkopen __PARAM__((const char *name), (name)) __OTORP__(const char *name;){
+       int fd = sh_open(name,O_RDONLY,0);
        if(fd < 0)
                error(ERROR_system(1),e_open,name);
        return(fd);
@@ -442,8 +442,8 @@ int sh_chkopen __PARAM__((register const char *name), (name)) __OTORP__(register
 /*
  * move open file descriptor to a number > 2
  */
-int sh_iomovefd __PARAM__((register int fdold), (fdold)) __OTORP__(register int fdold;){
-       register int fdnew;
+int sh_iomovefd __PARAM__((int fdold), (fdold)) __OTORP__(int fdold;){
+       int fdnew;
        if(fdold<0 || fdold>2)
                return(fdold);
        fdnew = sh_iomovefd(dup(fdold));
@@ -456,7 +456,7 @@ int sh_iomovefd __PARAM__((register int fdold), (fdold)) __OTORP__(register int
 /*
  * create a pipe and print message on failure
  */
-int    sh_pipe __PARAM__((register int pv[]), (pv)) __OTORP__(register int pv[];){
+int    sh_pipe __PARAM__((int pv[]), (pv)) __OTORP__(int pv[];){
        int fd[2];
        if(pipe(fd)<0 || (pv[0]=fd[0])<0 || (pv[1]=fd[1])<0)
                error(ERROR_system(1),e_pipe);
@@ -470,7 +470,7 @@ int sh_pipe __PARAM__((register int pv[]), (pv)) __OTORP__(register int pv[];){
 /*
  * close a pipe
  */
-void sh_pclose __PARAM__((register int pv[]), (pv)) __OTORP__(register int pv[];){
+void sh_pclose __PARAM__((int pv[]), (pv)) __OTORP__(int pv[];){
        if(pv[0]>=2)
                sh_close(pv[0]);
        if(pv[1]>=2)
@@ -485,9 +485,9 @@ void sh_pclose __PARAM__((register int pv[]), (pv)) __OTORP__(register int pv[];
  * flag = 3 when called from $( < ...), just open file and return
  */
 int    sh_redirect __PARAM__((struct ionod *iop, int flag), (iop, flag)) __OTORP__(struct ionod *iop; int flag;){
-       register char *fname;
-       register int    fd, iof;
-       register Namval_t *np=0;
+       char *fname;
+       int     fd, iof;
+       Namval_t *np=0;
        const char *message = e_open;
        int o_mode;             /* mode flag for open */
        static char io_op[5];   /* used for -x trace info */
@@ -663,9 +663,9 @@ fail:
 /*
  * Create a tmp file for the here-document
  */
-static int io_heredoc __PARAM__((register struct ionod *iop), (iop)) __OTORP__(register struct ionod *iop;){
-       register Sfio_t *infile = 0, *outfile;
-       register char           fd;
+static int io_heredoc __PARAM__((struct ionod *iop), (iop)) __OTORP__(struct ionod *iop;){
+       Sfio_t  *infile = 0, *outfile;
+       char            fd;
        /* create an unnamed temporary file */
        if(!(outfile=sftmp(0)))
                error(ERROR_system(1),e_tmpcreate);
@@ -716,12 +716,12 @@ static int tee_write __PARAM__((Sfio_t *iop,const __V_ *buff,int n,Sfdisc_t *unu
  * if <origfd> < 0, then -origfd is saved, but not duped so that it
  *   will be closed with sh_iorestore.
  */
-void sh_iosave __PARAM__((register int origfd, int oldtop), (origfd, oldtop)) __OTORP__(register int origfd; int oldtop;){
+void sh_iosave __PARAM__((int origfd, int oldtop), (origfd, oldtop)) __OTORP__(int origfd; int oldtop;){
 /*@
        assume oldtop>=0 && oldtop<sh.lim.open_max;
 @*/
  
-       register int    savefd;
+       int     savefd;
        /* see if already saved, only save once */
        for(savefd=sh.topfd; --savefd>=oldtop; )
        {
@@ -752,7 +752,7 @@ void sh_iosave __PARAM__((register int origfd, int oldtop), (origfd, oldtop)) __
        filemap[sh.topfd++].save_fd = savefd;
        if(savefd >=0)
        {
-               register Sfio_t* sp = sh.sftable[origfd];
+               Sfio_t* sp = sh.sftable[origfd];
                /* make saved file close-on-exec */
                fcntl(savefd,F_SETFD,FD_CLOEXEC);
                if(origfd==job.fd)
@@ -777,7 +777,7 @@ void sh_iosave __PARAM__((register int origfd, int oldtop), (origfd, oldtop)) __
  *  close all saved file descriptors
  */
 void   sh_iounsave __PARAM__((void), ()){
-       register int fd, savefd, newfd;
+       int fd, savefd, newfd;
        for(newfd=fd=0; fd < sh.topfd; fd++)
        {
                if((savefd = filemap[fd].save_fd)< 0)
@@ -795,7 +795,7 @@ void        sh_iounsave __PARAM__((void), ()){
  *  restore saved file descriptors from <last> on
  */
 void   sh_iorestore __PARAM__((int last), (last)) __OTORP__(int last;){
-       register int    origfd, savefd, fd;
+       int     origfd, savefd, fd;
        for (fd = sh.topfd - 1; fd >= last; fd--)
        {
                origfd = filemap[fd].orig_fd;
@@ -830,8 +830,8 @@ void        sh_iorestore __PARAM__((int last), (last)) __OTORP__(int last;){
  * returns -1 for failure, 0 for success
  * <mode> is the same as for access()
  */
-sh_ioaccess __PARAM__((int fd,register int mode), (fd, mode)) __OTORP__(int fd;register int mode;){
-       register int flags;
+sh_ioaccess __PARAM__((int fd,int mode), (fd, mode)) __OTORP__(int fd;int mode;){
+       int flags;
        if(mode==X_OK)
                return(-1);
        if((flags=sh_iocheckfd(fd))!=IOCLOSE)
@@ -852,8 +852,8 @@ sh_ioaccess __PARAM__((int fd,register int mode), (fd, mode)) __OTORP__(int fd;r
  * 0 returned on error
  */
 
-static int str2inet __PARAM__((register const char *sp, struct sockaddr_in *addr), (sp, addr)) __OTORP__(register const char *sp; struct sockaddr_in *addr;){
-       register int    n=0,c,v;
+static int str2inet __PARAM__((const char *sp, struct sockaddr_in *addr), (sp, addr)) __OTORP__(const char *sp; struct sockaddr_in *addr;){
+       int     n=0,c,v;
        unsigned long   a=0;
        unsigned short  p;
 
@@ -883,8 +883,8 @@ static int str2inet __PARAM__((register const char *sp, struct sockaddr_in *addr
 /*
  *  Handle interrupts for slow streams
  */
-static int slowexcept __PARAM__((register Sfio_t *iop, int type, Sfdisc_t *handle), (iop, type, handle)) __OTORP__(register Sfio_t *iop; int type; Sfdisc_t *handle;){
-       register int    n,fno;
+static int slowexcept __PARAM__((Sfio_t *iop, int type, Sfdisc_t *handle), (iop, type, handle)) __OTORP__(Sfio_t *iop; int type; Sfdisc_t *handle;){
+       int     n,fno;
        NOT_USED(handle);
        if(type!=SF_READ)
                return(0);
@@ -949,7 +949,7 @@ static void time_grace __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handl
        sh.trapnote |= SH_SIGTRAP;
 }
 
-static int piperead __PARAM__((Sfio_t *iop,__V_ *buff,register int size,Sfdisc_t *handle), (iop, buff, size, handle)) __OTORP__(Sfio_t *iop;__V_ *buff;register int size;Sfdisc_t *handle;){
+static int piperead __PARAM__((Sfio_t *iop,__V_ *buff,int size,Sfdisc_t *handle), (iop, buff, size, handle)) __OTORP__(Sfio_t *iop;__V_ *buff;int size;Sfdisc_t *handle;){
        NOT_USED(handle);
        size = ed_read(sffileno(iop), (char*)buff, size);
        return(size);
@@ -958,7 +958,7 @@ static int piperead __PARAM__((Sfio_t *iop,__V_ *buff,register int size,Sfdisc_t
  * This is the read discipline that is applied to slow devices
  * This routine takes care of prompting for input
  */
-static int slowread __PARAM__((Sfio_t *iop,__V_ *buff,register int size,Sfdisc_t *handle), (iop, buff, size, handle)) __OTORP__(Sfio_t *iop;__V_ *buff;register int size;Sfdisc_t *handle;){
+static int slowread __PARAM__((Sfio_t *iop,__V_ *buff,int size,Sfdisc_t *handle), (iop, buff, size, handle)) __OTORP__(Sfio_t *iop;__V_ *buff;int size;Sfdisc_t *handle;){
        int     (*readf) __PROTO__((int, char*, int));
        NOT_USED(handle);
        if(io_prompt(sh.nextprompt)<0 && errno==EIO)
@@ -987,8 +987,8 @@ static int slowread __PARAM__((Sfio_t *iop,__V_ *buff,register int size,Sfdisc_t
  * check and return the attributes for a file descriptor
  */
 
-int sh_iocheckfd __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
-       register int flags, n;
+int sh_iocheckfd __PARAM__((int fd), (fd)) __OTORP__(int fd;){
+       int flags, n;
        if((n=sh.fdstatus[fd])&IOCLOSE)
                return(n);
        if(!(n&(IOREAD|IOWRITE)))
@@ -1051,8 +1051,8 @@ int sh_iocheckfd __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){
  * Display prompt PS<flag> on standard error
  */
 
-static int     io_prompt __PARAM__((register int flag), (flag)) __OTORP__(register int flag;){
-       register char *cp;
+static int     io_prompt __PARAM__((int flag), (flag)) __OTORP__(int flag;){
+       char *cp;
        char *endprompt;
        static short cmdno;
        int sfflags;
@@ -1067,7 +1067,7 @@ static int        io_prompt __PARAM__((register int flag), (flag)) __OTORP__(register i
        {
                case 1:
                {
-                       register int c;
+                       int c;
 #if defined(TIOCLBIC) && defined(LFLUSHO)
                        if(!sh_isoption(SH_VI|SH_EMACS|SH_GMACS))
                        {
@@ -1133,9 +1133,9 @@ static int pipeexcept __PARAM__((Sfio_t* iop, int mode, Sfdisc_t* handle), (iop,
  * keep track of each stream that is opened and closed
  */
 static void    sftrack __PARAM__((Sfio_t* sp,int flag, int newfd), (sp, flag, newfd)) __OTORP__(Sfio_t* sp;int flag; int newfd;){
-       register int fd = sffileno(sp);
-       register struct checkpt *pp;
-       register int mode;
+       int fd = sffileno(sp);
+       struct checkpt *pp;
+       int mode;
        if(flag==SF_SETFD && newfd<0)
        {
                flag = SF_CLOSE;
@@ -1224,9 +1224,9 @@ struct eval
  * Create a stream consisting of a space separated argv[] list 
  */
 
-Sfio_t *sh_sfeval __PARAM__((register char *argv[]), (argv)) __OTORP__(register char *argv[];){
-       register Sfio_t *iop;
-       register char *cp;
+Sfio_t *sh_sfeval __PARAM__((char *argv[]), (argv)) __OTORP__(char *argv[];){
+       Sfio_t *iop;
+       char *cp;
        if(argv[1])
                cp = "";
        else
@@ -1234,7 +1234,7 @@ Sfio_t *sh_sfeval __PARAM__((register char *argv[]), (argv)) __OTORP__(register
        iop = sfopen(NIL(Sfio_t*),(char*)cp,"s");
        if(argv[1])
        {
-               register struct eval *ep;
+               struct eval *ep;
                if(!(ep = new_of(struct eval,0)))
                        return(NIL(Sfio_t*));
                ep->disc = eval_disc;
@@ -1251,9 +1251,9 @@ Sfio_t *sh_sfeval __PARAM__((register char *argv[]), (argv)) __OTORP__(register
  */
 
 static int eval_exceptf __PARAM__((Sfio_t *iop,int type, Sfdisc_t *handle), (iop, type, handle)) __OTORP__(Sfio_t *iop;int type; Sfdisc_t *handle;){
-       register struct eval *ep = (struct eval*)handle;
-       register char   *cp;
-       register int    len;
+       struct eval *ep = (struct eval*)handle;
+       char    *cp;
+       int     len;
 
        /* no more to do */
        if(type!=SF_READ || !(cp = ep->argv[0]))
@@ -1292,8 +1292,8 @@ static int eval_exceptf __PARAM__((Sfio_t *iop,int type, Sfdisc_t *handle), (iop
  */
 
 static Sfio_t *subopen __PARAM__((Sfio_t* sp, off_t offset, long size), (sp, offset, size)) __OTORP__(Sfio_t* sp; off_t offset; long size;){
-       register struct subfile *disp;
-       register int fd = sffileno(sp);
+       struct subfile *disp;
+       int fd = sffileno(sp);
        if(sfseek(sp,offset,SEEK_SET) <0)
                return(NIL(Sfio_t*));
        if(!(disp = (struct subfile*)malloc(sizeof(struct subfile)+IOBSIZE+1)))
@@ -1310,8 +1310,8 @@ static Sfio_t *subopen __PARAM__((Sfio_t* sp, off_t offset, long size), (sp, off
 /*
  * read function for subfile discipline
  */
-static int subread __PARAM__((Sfio_t* sp,__V_* buff,register int size,Sfdisc_t* handle), (sp, buff, size, handle)) __OTORP__(Sfio_t* sp;__V_* buff;register int size;Sfdisc_t* handle;){
-       register struct subfile *disp = (struct subfile*)handle;
+static int subread __PARAM__((Sfio_t* sp,__V_* buff,int size,Sfdisc_t* handle), (sp, buff, size, handle)) __OTORP__(Sfio_t* sp;__V_* buff;int size;Sfdisc_t* handle;){
+       struct subfile *disp = (struct subfile*)handle;
        NOT_USED(sp);
        if(disp->left == 0)
                return(0);
@@ -1324,8 +1324,8 @@ static int subread __PARAM__((Sfio_t* sp,__V_* buff,register int size,Sfdisc_t*
 /*
  * exception handler for subfile discipline
  */
-static int subexcept __PARAM__((Sfio_t* sp,register int mode, Sfdisc_t* handle), (sp, mode, handle)) __OTORP__(Sfio_t* sp;register int mode; Sfdisc_t* handle;){
-       register struct subfile *disp = (struct subfile*)handle;
+static int subexcept __PARAM__((Sfio_t* sp,int mode, Sfdisc_t* handle), (sp, mode, handle)) __OTORP__(Sfio_t* sp;int mode; Sfdisc_t* handle;){
+       struct subfile *disp = (struct subfile*)handle;
        if(mode==SF_CLOSE)
        {
                sfdisc(sp,SF_POPDISC);
@@ -1342,8 +1342,8 @@ static int subexcept __PARAM__((Sfio_t* sp,register int mode, Sfdisc_t* handle),
  * print a list of arguments in columns
  */
 void   sh_menu __PARAM__((Sfio_t *outfile,int argn,char *argv[]), (outfile, argn, argv)) __OTORP__(Sfio_t *outfile;int argn;char *argv[];){
-       register int i,j;
-       register char **arg;
+       int i,j;
+       char **arg;
        int nrow, ncol=1, ndigits=1;
        int fldsize, wsize = ed_window();
        char *cp = nv_getval(nv_scoped(LINES));
@@ -1397,8 +1397,8 @@ skip:
 /*
  * shell version of read() for user added builtins
  */
-ssize_t sh_read __PARAM__((register int fd, __V_* buff, size_t n), (fd, buff, n)) __OTORP__(register int fd; __V_* buff; size_t n;){
-       register Sfio_t *sp;
+ssize_t sh_read __PARAM__((int fd, __V_* buff, size_t n), (fd, buff, n)) __OTORP__(int fd; __V_* buff; size_t n;){
+       Sfio_t *sp;
        if(sp=sh.sftable[fd])
                return(sfread(sp,buff,n));
        else
@@ -1409,8 +1409,8 @@ ssize_t sh_read __PARAM__((register int fd, __V_* buff, size_t n), (fd, buff, n)
 /*
  * shell version of write() for user added builtins
  */
-ssize_t sh_write __PARAM__((register int fd, const __V_* buff, size_t n), (fd, buff, n)) __OTORP__(register int fd; const __V_* buff; size_t n;){
-       register Sfio_t *sp;
+ssize_t sh_write __PARAM__((int fd, const __V_* buff, size_t n), (fd, buff, n)) __OTORP__(int fd; const __V_* buff; size_t n;){
+       Sfio_t *sp;
        if(sp=sh.sftable[fd])
                return(sfwrite(sp,buff,n));
        else
@@ -1421,8 +1421,8 @@ ssize_t sh_write __PARAM__((register int fd, const __V_* buff, size_t n), (fd, b
 /*
  * shell version of lseek() for user added builtins
  */
-off_t sh_seek __PARAM__((register int fd, off_t offset, int whence), (fd, offset, whence)) __OTORP__(register int fd; off_t offset; int whence;){
-       register Sfio_t *sp;
+off_t sh_seek __PARAM__((int fd, off_t offset, int whence), (fd, offset, whence)) __OTORP__(int fd; off_t offset; int whence;){
+       Sfio_t *sp;
        if(sp=sh.sftable[fd])
                return(sfseek(sp,offset,whence));
        else
@@ -1430,8 +1430,8 @@ off_t sh_seek __PARAM__((register int fd, off_t offset, int whence), (fd, offset
 }
 
 #undef dup
-int sh_dup __PARAM__((register int old), (old)) __OTORP__(register int old;){
-       register int fd = dup(old);
+int sh_dup __PARAM__((int old), (old)) __OTORP__(int old;){
+       int fd = dup(old);
        if(fd>=0)
                sh.fdstatus[fd] = (sh.fdstatus[old]&~IOCLEX);
        return(fd);
index 98574c5d1396532809ad63e90d986c9d9cc9a239..f918475f1830426b6cf3a3c72f4b1b143933d09e 100644 (file)
@@ -210,10 +210,10 @@ static Sfio_t             *outfile;
  * This is the SIGCLD interrupt routine
  * When called with sig==0, it does a blocking wait
  */
-static void job_waitsafe __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){
-       register pid_t pid;
-       register struct process *pw;
-       register int flags;
+static void job_waitsafe __PARAM__((int sig), (sig)) __OTORP__(int sig;){
+       pid_t pid;
+       struct process *pw;
+       int flags;
        struct process dummy;
        struct jobsave *jp;
        int wstat;
@@ -347,7 +347,7 @@ static void job_waitsafe __PARAM__((register int sig), (sig)) __OTORP__(register
  * if lflag is set the switching driver message will not print
  */
 void job_init __PARAM__((int lflag), (lflag)) __OTORP__(int lflag;){
-       register int ntry=0;
+       int ntry=0;
 
        job.fd = JOBTTY;
        signal(SIGCHLD,job_waitsafe);
@@ -382,8 +382,8 @@ void job_init __PARAM__((int lflag), (lflag)) __OTORP__(int lflag;){
         {
                /* Get a controlling terminal and set process group */
                /* This should have already been done by rlogin */
-                register int fd;
-                register char *ttynam;
+                int fd;
+                char *ttynam;
 #ifndef SIGTSTP
                 setpgid(0,sh.pid);
 #endif /*SIGTSTP */
@@ -482,8 +482,8 @@ void job_init __PARAM__((int lflag), (lflag)) __OTORP__(int lflag;){
  * restore tty driver and pgrp
  */
 int job_close __PARAM__((void), ()){
-       register struct process *pw = job.pwlist;
-       register int count = 0, running = 0;
+       struct process *pw = job.pwlist;
+       int count = 0, running = 0;
        if(possible && !job.jobcontrol)
                return(0);
        else if(!possible && (!sh_isstate(SH_MONITOR) || sh_isstate(SH_FORKED)))
@@ -553,7 +553,7 @@ int job_close __PARAM__((void), ()){
        return(0);
 }
 
-static void job_set __PARAM__((register struct process *pw), (pw)) __OTORP__(register struct process *pw;){
+static void job_set __PARAM__((struct process *pw), (pw)) __OTORP__(struct process *pw;){
        /* save current terminal state */
        tty_get(job.fd,&my_stty);
        if(pw->p_flag&P_STTY)
@@ -568,7 +568,7 @@ static void job_set __PARAM__((register struct process *pw), (pw)) __OTORP__(reg
 #endif /* SIGTSTP */
 }
 
-static void job_reset __PARAM__((register struct process *pw), (pw)) __OTORP__(register struct process *pw;){
+static void job_reset __PARAM__((struct process *pw), (pw)) __OTORP__(struct process *pw;){
        /* save the terminal state for current job */
 #ifdef SIGTSTP
        job_fgrp(pw,tcgetpgrp(job.fd));
@@ -593,9 +593,9 @@ static void job_reset __PARAM__((register struct process *pw), (pw)) __OTORP__(r
  */
 
 void job_bwait __PARAM__((char **jobs), (jobs)) __OTORP__(char **jobs;){
-       register char *job;
-       register struct process *pw;
-       register pid_t pid;
+       char *job;
+       struct process *pw;
+       pid_t pid;
        if(*jobs==0)
                job_wait((pid_t)-1);
        else while(job = *jobs++)
@@ -621,10 +621,10 @@ void job_bwait __PARAM__((char **jobs), (jobs)) __OTORP__(char **jobs;){
  */
 
 int job_walk __PARAM__((Sfio_t *file,int (*fun)(struct process*,int),int arg,char *joblist[]), (file, fun, arg, joblist)) __OTORP__(Sfio_t *file;int (*fun)();int arg;char *joblist[];){
-       register struct process *pw = job.pwlist;
-       register int r = 0;
-       register char *jobid, **jobs=joblist;
-       register struct process *px;
+       struct process *pw = job.pwlist;
+       int r = 0;
+       char *jobid, **jobs=joblist;
+       struct process *px;
        job_string = 0;
        outfile = file;
        by_number = 0;
@@ -680,7 +680,7 @@ int job_walk __PARAM__((Sfio_t *file,int (*fun)(struct process*,int),int arg,cha
 /*
  * send signal <sig> to background process group if not disowned
  */
-int job_terminate __PARAM__((register struct process *pw,register int sig), (pw, sig)) __OTORP__(register struct process *pw;register int sig;){
+int job_terminate __PARAM__((struct process *pw,int sig), (pw, sig)) __OTORP__(struct process *pw;int sig;){
        if(pw->p_pgrp && !(pw->p_flag&P_DISOWN))
                job_kill(pw,sig);
        return(0);
@@ -693,11 +693,11 @@ int job_terminate __PARAM__((register struct process *pw,register int sig), (pw,
  * flag JOB_PFLAG for process id(s) only
  */
 
-int job_list __PARAM__((struct process *pw,register int flag), (pw, flag)) __OTORP__(struct process *pw;register int flag;){
-       register struct process *px = pw;
-       register int  n;
-       register const char *msg;
-       register int msize;
+int job_list __PARAM__((struct process *pw,int flag), (pw, flag)) __OTORP__(struct process *pw;int flag;){
+       struct process *px = pw;
+       int  n;
+       const char *msg;
+       int msize;
        if(!pw || pw->p_job<=0)
                return(1);
        if(pw->p_env != sh.jobenv)
@@ -768,9 +768,9 @@ int job_list __PARAM__((struct process *pw,register int flag), (pw, flag)) __OTO
  * get the process group given the job number
  * This routine returns the process group number or -1
  */
-static struct process *job_bystring __PARAM__((register char *ajob), (ajob)) __OTORP__(register char *ajob;){
-       register struct process *pw=job.pwlist;
-       register int c;
+static struct process *job_bystring __PARAM__((char *ajob), (ajob)) __OTORP__(char *ajob;){
+       struct process *pw=job.pwlist;
+       int c;
        if(*ajob++ != '%' || !pw)
                return(NIL(struct process*));
        c = *ajob;
@@ -794,9 +794,9 @@ static struct process *job_bystring __PARAM__((register char *ajob), (ajob)) __O
  * Kill a job or process
  */
 
-int job_kill __PARAM__((register struct process *pw,register int sig), (pw, sig)) __OTORP__(register struct process *pw;register int sig;){
-       register pid_t pid;
-       register int r;
+int job_kill __PARAM__((struct process *pw,int sig), (pw, sig)) __OTORP__(struct process *pw;int sig;){
+       pid_t pid;
+       int r;
        const char *msg;
 #ifdef SIGTSTP
        int stopsig = (sig==SIGSTOP||sig==SIGTSTP||sig==SIGTTIN||sig==SIGTTOU);
@@ -884,10 +884,10 @@ int job_kill __PARAM__((register struct process *pw,register int sig), (pw, sig)
  */
 
 static struct process *job_byname __PARAM__((char *name), (name)) __OTORP__(char *name;){
-       register struct process *pw = job.pwlist;
-       register struct process *pz = 0;
-       register int *flag = 0;
-       register char *cp = name;
+       struct process *pw = job.pwlist;
+       struct process *pz = 0;
+       int *flag = 0;
+       char *cp = name;
        int offset;
        if(!sh.hist_ptr)
                return(NIL(struct process*));
@@ -917,10 +917,10 @@ static struct process *job_byname __PARAM__((char *name), (name)) __OTORP__(char
  */
 
 void   job_clear __PARAM__((void), ()){
-       register struct process *pw, *px;
-       register struct process *pwnext;
-       register int j = BYTE(sh.lim.child_max);
-       register struct jobsave *jp;
+       struct process *pw, *px;
+       struct process *pwnext;
+       int j = BYTE(sh.lim.child_max);
+       struct jobsave *jp;
        for(pw=job.pwlist; pw; pw=pwnext)
        {
                pwnext = pw->p_nxtjob;
@@ -954,8 +954,8 @@ void        job_clear __PARAM__((void), ()){
  */
 
 int job_post __PARAM__((pid_t pid, pid_t join), (pid, join)) __OTORP__(pid_t pid; pid_t join;){
-       register struct process *pw;
-       register History_t *hp = sh.hist_ptr;
+       struct process *pw;
+       History_t *hp = sh.hist_ptr;
        sh.jobenv = sh.curenv;
        if(job.toclear)
        {
@@ -1023,7 +1023,7 @@ int job_post __PARAM__((pid_t pid, pid_t join), (pid, join)) __OTORP__(pid_t pid
  */
 
 static struct process *job_bypid __PARAM__((pid_t pid), (pid)) __OTORP__(pid_t pid;){
-       register struct process  *pw, *px;
+       struct process  *pw, *px;
        for(pw=job.pwlist; pw; pw=pw->p_nxtjob)
                for(px=pw; px; px=px->p_nxtproc)
                {
@@ -1038,7 +1038,7 @@ static struct process *job_bypid __PARAM__((pid_t pid), (pid)) __OTORP__(pid_t p
  */
 
 static struct process *job_byjid __PARAM__((int jobid), (jobid)) __OTORP__(int jobid;){
-       register struct process *pw;
+       struct process *pw;
        for(pw=job.pwlist;pw; pw = pw->p_nxtjob)
        {
                if(pw->p_job==jobid)
@@ -1050,10 +1050,10 @@ static struct process *job_byjid __PARAM__((int jobid), (jobid)) __OTORP__(int j
 /*
  * print a signal message
  */
-static void job_prmsg __PARAM__((register struct process *pw), (pw)) __OTORP__(register struct process *pw;){
+static void job_prmsg __PARAM__((struct process *pw), (pw)) __OTORP__(struct process *pw;){
        if(pw->p_exit!=SIGINT && pw->p_exit!=SIGPIPE)
        {
-               register const char *msg, *dump;
+               const char *msg, *dump;
                msg = job_sigmsg((int)(pw->p_exit));
                msg = ERROR_translate(msg,1);
                if(pw->p_flag&P_COREDUMP)
@@ -1075,9 +1075,9 @@ static void job_prmsg __PARAM__((register struct process *pw), (pw)) __OTORP__(r
  * pid=-1 to wait for all runing processes
  */
 
-void   job_wait __PARAM__((register pid_t pid), (pid)) __OTORP__(register pid_t pid;){
-       register struct process *pw=0,*px;
-       register int    jobid = 0;
+void   job_wait __PARAM__((pid_t pid), (pid)) __OTORP__(pid_t pid;){
+       struct process *pw=0,*px;
+       int     jobid = 0;
        char            intr = 0;
        if(pid <= 0)
        {
@@ -1230,8 +1230,8 @@ done:
  * disown job if bgflag == 'd'
  */
 
-job_switch __PARAM__((register struct process *pw,int bgflag), (pw, bgflag)) __OTORP__(register struct process *pw;int bgflag;){
-       register const char *msg;
+job_switch __PARAM__((struct process *pw,int bgflag), (pw, bgflag)) __OTORP__(struct process *pw;int bgflag;){
+       const char *msg;
        if(!pw || !(pw=job_byjid((int)pw->p_job)))
                return(1);
        if(bgflag=='d')
@@ -1276,7 +1276,7 @@ job_switch __PARAM__((register struct process *pw,int bgflag), (pw, bgflag)) __O
  * Set the foreground group associated with a job
  */
 
-static void job_fgrp __PARAM__((register struct process *pw, int newgrp), (pw, newgrp)) __OTORP__(register struct process *pw; int newgrp;){
+static void job_fgrp __PARAM__((struct process *pw, int newgrp), (pw, newgrp)) __OTORP__(struct process *pw; int newgrp;){
        for(; pw; pw=pw->p_nxtproc)
                pw->p_fgrp = newgrp;
 }
@@ -1285,9 +1285,9 @@ static void job_fgrp __PARAM__((register struct process *pw, int newgrp), (pw, n
  * turn off STOP state of a process group and send CONT signals
  */
 
-static void job_unstop __PARAM__((register struct process *px), (px)) __OTORP__(register struct process *px;){
-       register struct process *pw;
-       register int num = 0;
+static void job_unstop __PARAM__((struct process *px), (px)) __OTORP__(struct process *px;){
+       struct process *pw;
+       int num = 0;
        for(pw=px ;pw ;pw=pw->p_nxtproc)
        {
                if(pw->p_flag&P_STOPPED)
@@ -1313,8 +1313,8 @@ static void job_unstop __PARAM__((register struct process *px), (px)) __OTORP__(
  * if <notify> is non-zero, then jobs with pending notifications are unposted
  */
 
-static struct process *job_unpost __PARAM__((register struct process *pwtop,int notify), (pwtop, notify)) __OTORP__(register struct process *pwtop;int notify;){
-       register struct process *pw;
+static struct process *job_unpost __PARAM__((struct process *pwtop,int notify), (pwtop, notify)) __OTORP__(struct process *pwtop;int notify;){
+       struct process *pw;
        /* make sure all processes are done */
 #ifdef DEBUG
        sfprintf(sfstderr,"%ld: unpost pid=%ld\n",(long)getpid(),(long)pwtop->p_pid);
@@ -1361,8 +1361,8 @@ static struct process *job_unpost __PARAM__((register struct process *pwtop,int
 /*
  * unlink a job form the job list
  */
-static void job_unlink __PARAM__((register struct process *pw), (pw)) __OTORP__(register struct process *pw;){
-       register struct process *px;
+static void job_unlink __PARAM__((struct process *pw), (pw)) __OTORP__(struct process *pw;){
+       struct process *px;
        if(pw==job.pwlist)
        {
                job.pwlist = pw->p_nxtjob;
@@ -1383,15 +1383,15 @@ static void job_unlink __PARAM__((register struct process *pw), (pw)) __OTORP__(
  */
 
 static int job_alloc __PARAM__((void), ()){
-       register int j=0;
-       register unsigned mask = 1;
-       register unsigned char *freeword;
-       register int jmax = BYTE(sh.lim.child_max);
+       int j=0;
+       unsigned mask = 1;
+       unsigned char *freeword;
+       int jmax = BYTE(sh.lim.child_max);
        /* skip to first word with a free slot */
        for(j=0;job.freejobs[j] == UCHAR_MAX; j++);
        if(j >= jmax)
        {
-               register struct process *pw;
+               struct process *pw;
                for(j=1; j < sh.lim.child_max; j++)
                {
                        if((pw=job_byjid(j))&& !job_unpost(pw,0))
@@ -1412,9 +1412,9 @@ static int job_alloc __PARAM__((void), ()){
  * return a job number
  */
 
-static void job_free __PARAM__((register int n), (n)) __OTORP__(register int n;){
-       register int j = (--n)/CHAR_BIT;
-       register unsigned mask;
+static void job_free __PARAM__((int n), (n)) __OTORP__(int n;){
+       int j = (--n)/CHAR_BIT;
+       unsigned mask;
        n -= j*CHAR_BIT;
        mask = 1 << n;
        job.freejobs[j]  &= ~mask;
@@ -1422,16 +1422,7 @@ static void job_free __PARAM__((register int n), (n)) __OTORP__(register int n;)
 
 static char *job_sigmsg __PARAM__((int sig), (sig)) __OTORP__(int sig;){
        static char signo[] = "Signal xxxx";
-#ifdef apollo
-       /*
-        * This code handles the formatting for the apollo specific signal
-        * SIGAPOLLO. 
-        */
-       extern __MANGLE__ char *apollo_error __PROTO__((void));
-       
-       if ( sig == SIGAPOLLO )
-               return( apollo_error() );
-#endif /* apollo */
+
        if(sig<sh.sigmax && sh.sigmsg[sig])
                return(sh.sigmsg[sig]);
 #if defined(SIGRTMIN) && defined(SIGRTMAX)
@@ -1451,9 +1442,9 @@ static char *job_sigmsg __PARAM__((int sig), (sig)) __OTORP__(int sig;){
  * if pid==0, then oldest saved process is deleted
  * If pid is not found a -1 is returned.
  */
-int job_chksave __PARAM__((register pid_t pid), (pid)) __OTORP__(register pid_t pid;){
-       register struct jobsave *jp = bck_list, *jpold=0;
-       register int r= -1;
+int job_chksave __PARAM__((pid_t pid), (pid)) __OTORP__(pid_t pid;){
+       struct jobsave *jp = bck_list, *jpold=0;
+       int r= -1;
        while(jp)
        {
                if(jp->pid==pid)
index 6e9e21fca481c58063eaab6249d003602d843f61..47c281bd6fddc384472229ff869f672cdf05adbf 100644 (file)
@@ -199,7 +199,7 @@ static void refvar __PARAM__((int type), (type)) __OTORP__(int type;){
  * This routine gets called when reading across a buffer boundary
  * If lexd.nocopy is off, then current token is saved on the stack
  */
-static void lex_advance __PARAM__((Sfio_t *iop, const char *buff, register int size), (iop, buff, size)) __OTORP__(Sfio_t *iop; const char *buff; register int size;){
+static void lex_advance __PARAM__((Sfio_t *iop, const char *buff, int size), (iop, buff, size)) __OTORP__(Sfio_t *iop; const char *buff; int size;){
 #ifdef KSHELL
        /* write to history file and to stderr if necessary */
        if(!sfstacked(iop))
@@ -234,7 +234,7 @@ static void lex_advance __PARAM__((Sfio_t *iop, const char *buff, register int s
  * preserves lexical state
  */
 static int lexfill __PARAM__((void), ()){
-       register int c;
+       int c;
        struct lexdata savedata;
        struct lexstate savestate;
        savedata = lexd;
@@ -264,10 +264,10 @@ void sh_lexinit __PARAM__((int mode), (mode)) __OTORP__(int mode;){
 
 #ifdef DBUG
 int sh_lex __PARAM__((void), ()){
-       register int flag;
+       int flag;
        extern __MANGLE__ int lextoken __PROTO__((void));
        char *quoted, *macro, *split, *expand; 
-       register int tok = lextoken();
+       int tok = lextoken();
        quoted = macro = split = expand = "";
        if(tok==0 && (flag=shlex.arg->argflag))
        {
@@ -326,8 +326,8 @@ static void mbStateSkip __PARAM__((const char *state, int *c, int *n, int *len),
  * Returns the token type
  */
 int sh_lex __PARAM__((void), ()){
-       register const char     *state;
-       register int    n, c, mode=ST_BEGIN, wordflags=0;
+       const char      *state;
+       int     n, c, mode=ST_BEGIN, wordflags=0;
        int             len, inlevel=lexd.level, assignment=0, ingrave=0;
        Sfio_t *sp;
        if(lexd.paren)
@@ -1283,8 +1283,8 @@ breakloop:
  * read to end of command substitution
  */
 static int comsub __PARAM__((void), ()){
-       register int    n,c,count=1;
-       register int    line=sh.inlineno;
+       int     n,c,count=1;
+       int     line=sh.inlineno;
        char word[5];
        int messages=0;
        struct lexstate save;
@@ -1355,8 +1355,8 @@ done:
  * allocate ionode with delimiter filled in without disturbing stak
  */
 static void nested_here __PARAM__((void), ()){
-       register struct ionod *iop;
-       register int n,offset;
+       struct ionod *iop;
+       int n,offset;
        struct argnod *arg = shlex.arg;
        char *base;
        if(offset=staktell())
@@ -1386,8 +1386,8 @@ static void nested_here __PARAM__((void), ()){
  * if <copy> is non,zero, then the characters are copied to the stack
  * <state> is the initial lexical state
  */
-void sh_lexskip __PARAM__((int close, register int copy, int  state), (close, copy, state)) __OTORP__(int close; register int copy; int  state;){
-       register char   *cp;
+void sh_lexskip __PARAM__((int close, int copy, int  state), (close, copy, state)) __OTORP__(int close; int copy; int  state;){
+       char    *cp;
        lexd.nest = close;
        lex_state = state;
        lexd.nocopy += !copy;
@@ -1411,11 +1411,11 @@ void sh_lexskip __PARAM__((int close, register int copy, int  state), (close, co
  * returns 1 for complete here-doc, 0 for EOF
  */
 
-static int here_copy __PARAM__((register struct ionod *iop), (iop)) __OTORP__(register struct ionod *iop;){
-       register const char     *state;
-       register int            c,n;
-       register char           *bufp,*cp;
-       register Sfio_t *sp;
+static int here_copy __PARAM__((struct ionod *iop), (iop)) __OTORP__(struct ionod *iop;){
+       const char      *state;
+       int             c,n;
+       char            *bufp,*cp;
+       Sfio_t  *sp;
        int                     stripflg, nsave, special=0;
        if(iop->iolst)
                here_copy(iop->iolst);
@@ -1593,7 +1593,7 @@ done:
 /*
  * generates string for given token
  */
-static char    *fmttoken __PARAM__((register int sym), (sym)) __OTORP__(register int sym;){
+static char    *fmttoken __PARAM__((int sym), (sym)) __OTORP__(int sym;){
        static char tok[3];
        if(sym < 0)
                return((char*)e_lexzerobyte);
@@ -1601,7 +1601,7 @@ static char       *fmttoken __PARAM__((register int sym), (sym)) __OTORP__(register in
                return(shlex.arg?shlex.arg->argval:"?");
        if(sym&SYMRES)
        {
-               register const Shtable_t *tp=shtab_reserved;
+               const Shtable_t *tp=shtab_reserved;
                while(tp->sh_number && tp->sh_number!=sym)
                        tp++;
                return((char*)tp->sh_name);
@@ -1652,9 +1652,9 @@ static char       *fmttoken __PARAM__((register int sym), (sym)) __OTORP__(register in
  */
 
 void   sh_syntax __PARAM__((void), ()){
-       register const char *cp = e_unexpected;
-       register int tok = shlex.token;
-       register char *tokstr;
+       const char *cp = e_unexpected;
+       int tok = shlex.token;
+       char *tokstr;
        Sfio_t *sp;
        if((tok==EOFSYM) && shlex.lasttok)
        {
@@ -1667,7 +1667,7 @@ void      sh_syntax __PARAM__((void), ()){
        if((sp=fcfile()) || (sh.infd>=0 && (sp=sh.sftable[sh.infd])))
        {
                /* clear out any pending input */
-               register Sfio_t *top;
+               Sfio_t *top;
                while(fcget()>0);
                fcclose();
                while(top=sfstack(sp,SF_POPSTACK))
@@ -1696,10 +1696,10 @@ void    sh_syntax __PARAM__((void), ()){
  * If mode==2, the each $"" string is printed on standard output
  */
 struct argnod *sh_endword __PARAM__((int mode), (mode)) __OTORP__(int mode;){
-       register const char *state = sh_lexstates[ST_NESTED];
-       register int n;
-       register char *sp,*dp;
-       register int inquote=0, inlit=0; /* set within quoted strings */
+       const char *state = sh_lexstates[ST_NESTED];
+       int n;
+       char *sp,*dp;
+       int inquote=0, inlit=0; /* set within quoted strings */
        struct argnod* argp;
        char    *ep=0;
        int offset = staktell();
@@ -1901,8 +1901,8 @@ struct alias
  * This code gets called whenever an end of string is found with alias
  */
 static int alias_exceptf __PARAM__((Sfio_t *iop,int type,Sfdisc_t *handle), (iop, type, handle)) __OTORP__(Sfio_t *iop;int type;Sfdisc_t *handle;){
-       register struct alias *ap = (struct alias*)handle;
-       register Namval_t *np;
+       struct alias *ap = (struct alias*)handle;
+       Namval_t *np;
        static char buf[2];
        if(type==0 || !ap)
                return(0);
@@ -1911,7 +1911,7 @@ static int alias_exceptf __PARAM__((Sfio_t *iop,int type,Sfdisc_t *handle), (iop
        {
                if(type==SF_CLOSE)
                {
-                       register Sfdisc_t *dp = sfdisc(iop,SF_POPDISC);
+                       Sfdisc_t *dp = sfdisc(iop,SF_POPDISC);
                        if(dp!=handle)
                                sfdisc(iop,dp);
                        else if(ap)
@@ -1922,7 +1922,7 @@ static int alias_exceptf __PARAM__((Sfio_t *iop,int type,Sfdisc_t *handle), (iop
        if(ap->nextc)
        {
                /* if last character is a blank, then next work can be alias */
-               register int c = fcpeek(-1);
+               int c = fcpeek(-1);
                if(isblank(c))
                        shlex.aliasok = 1;
                *buf = ap->nextc;
@@ -1938,7 +1938,7 @@ done:
 
 
 static void setupalias __PARAM__((const char *string,Namval_t *np), (string, np)) __OTORP__(const char *string;Namval_t *np;){
-       register Sfio_t *iop, *base;
+       Sfio_t *iop, *base;
        struct alias *ap = (struct alias*)malloc(sizeof(struct alias));
        ap->disc = alias_disc;
        iop = sfopen(NIL(Sfio_t*),(char*)string,"s");
index ac9e04dbac10057330b5d5726dec55a1a3fb7c24..3df663ddc82a98a7639105feede28d5ed8ac8c38 100644 (file)
@@ -161,7 +161,7 @@ static char *mac_getstring __PROTO__((char*));
 /*
  * perform only parameter substitution and catch failures
  */
-char *sh_mactry __PARAM__((register char *string), (string)) __OTORP__(register char *string;){
+char *sh_mactry __PARAM__((char *string), (string)) __OTORP__(char *string;){
        if(string)
        {
                int             jmp_val;
@@ -183,7 +183,7 @@ char *sh_mactry __PARAM__((register char *string), (string)) __OTORP__(register
  * yields a single pathname.
  * If <mode> negative, than expansion rules for assignment are applied.
  */
-char *sh_mactrim __PARAM__((char *str, register int mode), (str, mode)) __OTORP__(char *str; register int mode;){
+char *sh_mactrim __PARAM__((char *str, int mode), (str, mode)) __OTORP__(char *str; int mode;){
        struct _mac_            savemac;
        savemac = mac;
        stakseek(0);
@@ -217,9 +217,9 @@ char *sh_mactrim __PARAM__((char *str, register int mode), (str, mode)) __OTORP_
 /*
  * Perform all the expansions on the argument <argp>
  */
-int sh_macexpand __PARAM__((register struct argnod *argp, struct argnod **arghead), (argp, arghead)) __OTORP__(register struct argnod *argp; struct argnod **arghead;){
-       register int flags = argp->argflag;
-       register char *str = argp->argval;
+int sh_macexpand __PARAM__((struct argnod *argp, struct argnod **arghead), (argp, arghead)) __OTORP__(struct argnod *argp; struct argnod **arghead;){
+       int flags = argp->argflag;
+       char *str = argp->argval;
        struct _mac_            savemac;
        savemac = mac;
        stakseek(ARGVAL);
@@ -248,9 +248,9 @@ int sh_macexpand __PARAM__((register struct argnod *argp, struct argnod **arghea
  * The result is written to <outfile>
  */
 void sh_machere __PARAM__((Sfio_t *infile, Sfio_t *outfile, char *string), (infile, outfile, string)) __OTORP__(Sfio_t *infile; Sfio_t *outfile; char *string;){
-       register int    c,n;
-       register const char     *state = sh_lexstates[ST_QUOTE];
-       register char   *cp;
+       int     c,n;
+       const char      *state = sh_lexstates[ST_QUOTE];
+       char    *cp;
        Fcin_t          save;
        struct _mac_            savemac;
        savemac = mac;
@@ -353,9 +353,9 @@ void sh_machere __PARAM__((Sfio_t *infile, Sfio_t *outfile, char *string), (infi
  * Process the characters up to <endch> or end of input string 
  */
 static void copyto __PARAM__((int endch, int newquote), (endch, newquote)) __OTORP__(int endch; int newquote;){
-       register int    c,n;
-       register const char     *state = sh_lexstates[ST_MACRO];
-       register char   *cp,*first;
+       int     c,n;
+       const char      *state = sh_lexstates[ST_MACRO];
+       char    *cp,*first;
        int             tilde = -1;
        int             oldquote = mac.quote;
        int             ansi_c = 0;
@@ -566,7 +566,7 @@ done:
  * This will be in libast some day
  */
 static int strgrpmatch __PARAM__((char *string, char *pattern, int match[], int nmatch,int flags), (string, pattern, match, nmatch, flags)) __OTORP__(char *string; char *pattern; int match[]; int nmatch;int flags;){
-       register char *cp=string, *dp;
+       char *cp=string, *dp;
        int c=0,anchor = (flags&STR_LEFT);
        flags &= ~STR_LEFT;
        /* optimize a little */
@@ -607,9 +607,9 @@ static int strgrpmatch __PARAM__((char *string, char *pattern, int match[], int
 /*
  * copy <str> to stack performing sub-expression substitutions
  */
-static void mac_substitute __PARAM__((register char *cp,char *str,register int subexp[],int subsize), (cp, str, subexp, subsize)) __OTORP__(register char *cp;char *str;register int subexp[];int subsize;){
-       register int c,n;
-       register char *first=cp;
+static void mac_substitute __PARAM__((char *cp,char *str,int subexp[],int subsize), (cp, str, subexp, subsize)) __OTORP__(char *cp;char *str;int subexp[];int subsize;){
+       int c,n;
+       char *first=cp;
        while(1)
        {
                while((c= *cp++) && c!=ESCAPE);
@@ -644,11 +644,11 @@ static void mac_substitute __PARAM__((register char *cp,char *str,register int s
  */
 static int varsub __PARAM__((void), ()){
        static char     idbuff[2];
-       register int    c;
-       register int    type=0; /* M_xxx */
-       register char   *v,*argp=0;
-       register Namval_t       *np = NIL(Namval_t*);
-       register int    dolg=0, mode=0;
+       int     c;
+       int     type=0; /* M_xxx */
+       char    *v,*argp=0;
+       Namval_t        *np = NIL(Namval_t*);
+       int     dolg=0, mode=0;
        Namarr_t        *ap=0;
        int             dolmax=0, vsize= -1, offset, nulflg, replen=0, bysub=0;
        char            *id = idbuff, *pattern=0, *repstr;
@@ -711,7 +711,7 @@ retry1:
                c -= '0';
                if(type)
                {
-                       register int d;
+                       int d;
                        while((d=fcget()),isadigit(d))
                                c = 10*c + (d-'0');
                        fcseek(-1);
@@ -1023,7 +1023,7 @@ retry1:
 retry2:
        if(v && (!nulflg || *v ) && c!='+')
        {
-               register int d = (mode=='@'?' ':mac.ifs);
+               int d = (mode=='@'?' ':mac.ifs);
                int match[20], nmatch;
                while(1)
                {
@@ -1156,8 +1156,8 @@ nosub:
  * <type> is 0 for older `...` version
  */
 static void comsubst __PARAM__((int type), (type)) __OTORP__(int type;){
-       register int            c;
-       register char           *str;
+       int             c;
+       char            *str;
        Sfio_t                  *sp;
        Fcin_t                  save;
        struct slnod            *saveslp = sh.st.staklist;
@@ -1167,7 +1167,7 @@ static void comsubst __PARAM__((int type), (type)) __OTORP__(int type;){
        char                    *savptr = stakfreeze(0);
        int                     saveflags = sh_isstate(SH_HISTORY|SH_VERBOSE);
        int                     newlines;
-       register union anynode  *t;
+       union anynode   *t;
        savemac = mac;
        sh.st.staklist=0;
        if(type)
@@ -1228,7 +1228,7 @@ static void comsubst __PARAM__((int type), (type)) __OTORP__(int type;){
                if(t->tre.tretyp==0 && !t->com.comarg)
                {
                        /* special case $( < file) */
-                       register int fd;
+                       int fd;
                        struct checkpt buff;
                        sh_pushcontext(&buff,SH_JMPIO);
                        if(t->tre.treio && !(((t->tre.treio)->iofile)&IOUFD) &&
@@ -1279,10 +1279,10 @@ static void comsubst __PARAM__((int type), (type)) __OTORP__(int type;){
 /*
  * copy <str> onto the stack
  */
-static void mac_copy __PARAM__((register const char *str, register int size), (str, size)) __OTORP__(register const char *str; register int size;){
-       register char           *state;
-       register const char     *cp=str;
-       register int            c,n,nopat;
+static void mac_copy __PARAM__((const char *str, int size), (str, size)) __OTORP__(const char *str; int size;){
+       char            *state;
+       const char      *cp=str;
+       int             c,n,nopat;
        nopat = (mac.quote||mac.assign==1||mac.arith);
        if(mac.sp)
                sfwrite(mac.sp,str,size);
@@ -1403,7 +1403,7 @@ static void mac_copy __PARAM__((register const char *str, register int size), (s
  * Do filename expansion of required
  */
 static void endfield __PARAM__((int split), (split)) __OTORP__(int split;){
-       register struct argnod *argp;
+       struct argnod *argp;
        if(staktell() > ARGVAL || split)
        {
                argp = (struct argnod*)stakfreeze(1);
@@ -1432,9 +1432,9 @@ static void endfield __PARAM__((int split), (split)) __OTORP__(int split;){
  * Finds the right substring of STRING using the expression PAT
  * the longest substring is found when FLAG is set.
  */
-static int substring __PARAM__((register const char *string,const char *pat,int match[], int flag), (string, pat, match, flag)) __OTORP__(register const char *string;const char *pat;int match[]; int flag;){
-       register const char *sp=string;
-       register int size,len,nmatch,n;
+static int substring __PARAM__((const char *string,const char *pat,int match[], int flag), (string, pat, match, flag)) __OTORP__(const char *string;const char *pat;int match[]; int flag;){
+       const char *sp=string;
+       int size,len,nmatch,n;
        int smatch[20];
        sp += (len=strlen(sp));
        size = sp-string;
@@ -1467,8 +1467,8 @@ static int substring __PARAM__((register const char *string,const char *pat,int
 
 #ifdef SHOPT_MULTIBYTE
        static char     *lastchar __PARAM__((const char *string, const char *endstring), (string, endstring)) __OTORP__(const char *string; const char *endstring;){
-               register char *str = (char*)string;
-               register int c;
+               char *str = (char*)string;
+               int c;
                mblen(NIL(char*),MB_CUR_MAX);
                while(*str)
                {
@@ -1481,9 +1481,9 @@ static int substring __PARAM__((register const char *string,const char *pat,int
                return(str);
        }
        static int      charlen __PARAM__((const char *string), (string)) __OTORP__(const char *string;){
-               register const char *str = string;
-               register int n=0;
-               register int c;
+               const char *str = string;
+               int n=0;
+               int c;
                wchar_t w;
                mblen(NIL(char*),MB_CUR_MAX);
                while(*str)
@@ -1504,8 +1504,8 @@ static int substring __PARAM__((register const char *string,const char *pat,int
  * <offset> is byte offset for beginning of tilde string
  */
 
-static void tilde_expand2 __PARAM__((register int offset), (offset)) __OTORP__(register int offset;){
-       register char *cp;
+static void tilde_expand2 __PARAM__((int offset), (offset)) __OTORP__(int offset;){
+       char *cp;
        int curoff = staktell();
        stakputc(0);
        if(cp = sh_tilde(stakptr(offset)))
@@ -1526,11 +1526,11 @@ static void tilde_expand2 __PARAM__((register int offset), (offset)) __OTORP__(r
  * If string doesn't start with ~ or ~... not found then 0 returned.
  */
                                                             
-static char *sh_tilde __PARAM__((register const char *string), (string)) __OTORP__(register const char *string;){
-       register char           *cp;
-       register int            c;
-       register struct passwd  *pw;
-       register Namval_t *np;
+static char *sh_tilde __PARAM__((const char *string), (string)) __OTORP__(const char *string;){
+       char            *cp;
+       int             c;
+       struct passwd   *pw;
+       Namval_t *np;
        static Hashtab_t *logins_tree;
        if(*string++!='~')
                return(NIL(char*));
@@ -1562,8 +1562,8 @@ static char *sh_tilde __PARAM__((register const char *string), (string)) __OTORP
 /*
  * return values for special macros
  */
-static char *special __PARAM__((register int c), (c)) __OTORP__(register int c;){
-       register Namval_t *np;
+static char *special __PARAM__((int c), (c)) __OTORP__(int c;){
+       Namval_t *np;
        switch(c)
        {
            case '@':
@@ -1605,8 +1605,8 @@ static void mac_error __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
  * \ characters are stripped from string.
  */ 
 static char *mac_getstring __PARAM__((char *pattern), (pattern)) __OTORP__(char *pattern;){
-       register char *cp = pattern;
-       register int c;
+       char *cp = pattern;
+       int c;
        while(c = *cp++)
        {
                if(c==ESCAPE)
@@ -1625,8 +1625,8 @@ static char *mac_getstring __PARAM__((char *pattern), (pattern)) __OTORP__(char
  */
 static char *nextname __PARAM__((const char *prefix, int len), (prefix, len)) __OTORP__(const char *prefix; int len;){
        static Hashpos_t *hp;
-       register Namval_t *np;
-       register char *cp;
+       Namval_t *np;
+       char *cp;
        if(!prefix)
                hp = hashscan(sh.var_tree,0);
        else if(hp)
index b9e32e26f23801f270bc4d247587fc6dfbe8a665..1f894e09b06325b1e90fd46f3ad13461b7ff87a7 100644 (file)
@@ -130,7 +130,7 @@ static time_t       mailtime;
 static char    beenhere = 0;
 
 #ifdef _lib_sigvec
-    void clearsigmask __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){
+    void clearsigmask __PARAM__((int sig), (sig)) __OTORP__(int sig;){
        struct sigvec vec;
        if(sigvec(sig,NIL(struct sigvec*),&vec)>=0 && vec.sv_mask)
        {
@@ -141,10 +141,10 @@ static char       beenhere = 0;
 #endif /* _lib_sigvec */
 
 main __PARAM__((int ac, char *av[]), (ac, av)) __OTORP__(int ac; char *av[];){
-       register char   *name;
-       register int    fdin;
-       register Sfio_t  *iop;
-       register int    rshflag;        /* set for restricted shell */
+       char    *name;
+       int     fdin;
+       Sfio_t  *iop;
+       int     rshflag;        /* set for restricted shell */
        struct checkpt buff;
        int prof;
        char *command;
@@ -322,7 +322,7 @@ main __PARAM__((int ac, char *av[]), (ac, av)) __OTORP__(int ac; char *av[];){
  * fdin is the input file descriptor 
  */
 
-static void    exfile __PARAM__((register Sfio_t *iop,register int fno), (iop, fno)) __OTORP__(register Sfio_t *iop;register int fno;){
+static void    exfile __PARAM__((Sfio_t *iop,int fno), (iop, fno)) __OTORP__(Sfio_t *iop;int fno;){
        time_t curtime;
        union anynode *t;
        int maxtry=IOMAXTRY, tdone=0, execflags;
@@ -412,7 +412,7 @@ static void exfile __PARAM__((register Sfio_t *iop,register int fno), (iop, fno)
                        sh_offstate(SH_INTERACTIVE|SH_ERREXIT|SH_MONITOR);
                if(sh_isstate(SH_INTERACTIVE) && !tdone)
                {
-                       register char *mail;
+                       char *mail;
 #ifdef JOBS
                        sh_offstate(SH_MONITOR);
                        sh_onstate(sh_isoption(SH_MONITOR));
@@ -529,8 +529,8 @@ done:
 
 /* prints out messages if files in list have been modified since last call */
 static void chkmail __PARAM__((char *files), (files)) __OTORP__(char *files;){
-       register char *cp,*sp,*qp;
-       register char save;
+       char *cp,*sp,*qp;
+       char save;
        struct argnod *arglist=0;
        int     offset = staktell();
        char    *savstak=stakptr(0);
@@ -626,7 +626,7 @@ static void fixargs __PARAM__((char **argv, int mode), (argv, mode)) __OTORP__(c
 #else
        static char *buff;
        static int command_len;
-       register char *cp;
+       char *cp;
        int offset=0,size;
 #   ifdef PSTAT
        union pstun un;
index 9a22413b759aa813d8ed048075fd2f368b44cc4f..2c232fce6a904c0bc08aa487738eead6bafe4e79 100644 (file)
 #include       "FEATURE/locale"
 #include       "national.h"
 
-#ifdef apollo
-    extern __MANGLE__ void     ev_$delete_var(__VARARG__);
-    extern __MANGLE__ void     ev_$set_var(__VARARG__);
-#endif /* apollo */
-
 static void    attstore __PROTO__((Namval_t*));
 static void    pushnam __PROTO__((Namval_t*));
 static char    *staknam __PROTO__((Namval_t*, char*));
@@ -235,9 +230,9 @@ void mirror_env __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;)
  * Perform parameter assignment for a linked list of parameters
  * <flags> contains attributes for the parameters
  */
-void nv_setlist __PARAM__((register struct argnod *arg,register int flags), (arg, flags)) __OTORP__(register struct argnod *arg;register int flags;){
-       register char *cp;
-       register Namval_t *np;
+void nv_setlist __PARAM__((struct argnod *arg,int flags), (arg, flags)) __OTORP__(struct argnod *arg;int flags;){
+       char *cp;
+       Namval_t *np;
        int traceon = (sh_isoption(SH_XTRACE)!=0);
        if(sh_isoption(SH_ALLEXPORT))
                flags |= NV_EXPORT;
@@ -258,7 +253,7 @@ void nv_setlist __PARAM__((register struct argnod *arg,register int flags), (arg
                        {
                                int flag = (NV_VARNAME|NV_ARRAY|NV_ASSIGN);
                                struct fornod *fp=(struct fornod*)arg->argchn.ap;
-                               register union anynode *tp=fp->fortre;
+                               union anynode *tp=fp->fortre;
                                char *prefix = sh.prefix;
                                cp = fp->fornam;
                                error_info.line = fp->fortyp-sh.st.firstline;
@@ -308,7 +303,7 @@ void nv_setlist __PARAM__((register struct argnod *arg,register int flags), (arg
                        np->nvsize &= ~NV_PARAM;
                if(traceon)
                {
-                       register char *sp=cp;
+                       char *sp=cp;
                        sh_trace(NIL(char**),0);
                        sfputr(sfstderr,nv_name(np),-1);
                        if(nv_isattr(np,NV_ARRAY) && (cp=strchr(sp,'[')))
@@ -329,8 +324,8 @@ void nv_setlist __PARAM__((register struct argnod *arg,register int flags), (arg
 /*
  * construct a new name from a prefix and base name on the stack
  */
-static char *newname __PARAM__((register const char *prefix, register const char *name), (prefix, name)) __OTORP__(register const char *prefix; register const char *name;){
-       register int offset = staktell();
+static char *newname __PARAM__((const char *prefix, const char *name), (prefix, name)) __OTORP__(const char *prefix; const char *name;){
+       int offset = staktell();
        stakputs(prefix);
        if(*name!='[')
                stakputc('.');
@@ -351,11 +346,11 @@ static char *newname __PARAM__((register const char *prefix, register const char
  * SH_INIT is only set while initializing the environment
  */
 Namval_t       *nv_open __PARAM__((const char *name,Hashtab_t *root,int flags), (name, root, flags)) __OTORP__(const char *name;Hashtab_t *root;int flags;){
-       register char *cp = (char*)name;
-       register Namval_t       *np=0;
-       register int sep = *cp;
-       register char *lastdot = 0;
-       register long mode = ((flags&NV_NOADD)?0:NV_ADD);
+       char *cp = (char*)name;
+       Namval_t        *np=0;
+       int sep = *cp;
+       char *lastdot = 0;
+       long mode = ((flags&NV_NOADD)?0:NV_ADD);
        if(root==sh.alias_tree)
        {
                while((sep= *(unsigned char*)cp) && (sep!='=') && (sep!='/') && 
@@ -523,22 +518,7 @@ Namval_t   *nv_open __PARAM__((const char *name,Hashtab_t *root,int flags), (name,
 #endif /* SHOPT_BSH */
                        }
                        nv_onattr(np, flags&NV_ATTRIBUTES);
-#ifdef apollo
-                       /*
-                        * Set environment variable defined in the underlying
-                        * DOMAIN_OS cache. This is done because dsee will only
-                        * process the path if it has changed since the last
-                        * time it looked.
-                        */
-                       if(nv_isattr(np,NV_EXPORT) && !nv_isattr(np,NV_IMPORT) 
-                               && (flags&NV_ASSIGN) && !(flags&(NV_NOSCOPE|NV_ARRAY)))
-                       {
-                               short namlen,vallen;
-                               namlen =strlen(nv_name(np));
-                               vallen = strlen(cp);
-                               ev_$set_var(nv_name(np),&namlen,cp,&vallen);
-                       }
-#endif /* apollo */
+
                         /*
                          * Set environment variable defined in the underlying
                          * libc environ. This is done because routines within
@@ -572,12 +552,12 @@ failed:
  * If <flags> contains NV_NOFREE, previous value is freed, and <string>
  * becomes value of node and <flags> becomes attributes
  */
-void nv_putval __PARAM__((register Namval_t *np, const char *string, int flags), (np, string, flags)) __OTORP__(register Namval_t *np; const char *string; int flags;){
-       register const char *sp=string;
-       register union Value *up;
-       register char *cp;
-       register int size = 0;
-       register int dot;
+void nv_putval __PARAM__((Namval_t *np, const char *string, int flags), (np, string, flags)) __OTORP__(Namval_t *np; const char *string; int flags;){
+       const char *sp=string;
+       union Value *up;
+       char *cp;
+       int size = 0;
+       int dot;
        if(!(flags&NV_RDONLY) && nv_isattr (np, NV_RDONLY))
                error(ERROR_exit(1),e_readonly, nv_name(np));
        /* The following could cause the shell to fork if assignment
@@ -657,21 +637,7 @@ void nv_putval __PARAM__((register Namval_t *np, const char *string, int flags),
                const char *tofree=0;
                if(flags&NV_INTEGER)
                        sp = sh_etos(*((double*)sp),12);
-#ifdef apollo
-               if(nv_isattr(np, NV_HOST)==NV_HOST && sp)
-               {
-                       /*
-                        * return the host file name given the UNIX name
-                        * non-unix hosts that use file name mapping
-                        * should change this
-                        */
-                       char pathname[1024];
-                       short pathlen;
-                       unix_fio_$get_name(sp,pathname,&pathlen);
-                       pathname[pathlen] = 0;
-                       sp = pathname;
-               }
-#endif /* apollo */
+
                if((nv_isattr(np, NV_RJUST|NV_ZFILL|NV_LJUST)) && sp)
                {
                        for(;*sp == ' '|| *sp=='\t';sp++);
@@ -720,7 +686,7 @@ void nv_putval __PARAM__((register Namval_t *np, const char *string, int flags),
                                rightjust(cp,size,' ');
                        else if(nv_isattr(np, NV_LJUST))
                        {
-                               register char *dp;
+                               char *dp;
                                dp = strlen (cp) + cp;
                                *(cp = (cp + size)) = 0;
                                for (; dp < cp; *dp++ = ' ');
@@ -734,16 +700,6 @@ void nv_putval __PARAM__((register Namval_t *np, const char *string, int flags),
                if(tofree)
                        free((__V_*)tofree);
        }
-#ifdef apollo
-       if((flags&NV_RDONLY) && nv_isattr(np,NV_EXPORT))
-       {
-               short namlen, vallen;
-               char *vp = nv_getval(np);
-               namlen =strlen(nv_name(np));
-               vallen = strlen(vp);
-               ev_$set_var(nv_name(np),&namlen,vp,&vallen);
-       }
-#endif /* apollo */
         /*
          * Set environment variable defined in the underlying
          * libc environ. This is done because routines within
@@ -766,8 +722,8 @@ void nv_putval __PARAM__((register Namval_t *np, const char *string, int flags),
  *   will default to a blank.
  */
 static void rightjust __PARAM__((char *str, int size, int fill), (str, size, fill)) __OTORP__(char *str; int size; int fill;){
-       register int n;
-       register char *cp,*sp;
+       int n;
+       char *cp,*sp;
        n = strlen(str);
 
        /* ignore trailing blanks */
@@ -809,8 +765,8 @@ static void rightjust __PARAM__((char *str, int size, int fill), (str, size, fil
      */
 
     static int ja_size __PARAM__((char *str,int size,int type), (str, size, type)) __OTORP__(char *str;int size;int type;){
-       register char *cp = str;
-       register int c, n=size;
+       char *cp = str;
+       int c, n=size;
        int oldn;
        wchar_t w;
        while(*cp)
@@ -818,7 +774,7 @@ static void rightjust __PARAM__((char *str, int size, int fill), (str, size, fil
                oldn = n;
                if((c=mbtowc(&w,cp,MB_CUR_MAX))>0)
                {
-                       register int outsize =  wcwidth(w);
+                       int outsize =  wcwidth(w);
                        /* allow room for excess input bytes */
                        n += (c-outsize);
                        size -= outsize;
@@ -857,15 +813,15 @@ static void rightjust __PARAM__((char *str, int size, int fill), (str, size, fil
     }
 
     static void ja_restore __PARAM__((void), ()){
-       register char *cp = savechars;
+       char *cp = savechars;
        while(*cp)
                *savep++ = *cp++;
        savep = 0;
     }
 #endif /* SHOPT_MULTIBYTE */
 
-static char *staknam __PARAM__((register Namval_t *np, char *value), (np, value)) __OTORP__(register Namval_t *np; char *value;){
-       register char *p,*q;
+static char *staknam __PARAM__((Namval_t *np, char *value), (np, value)) __OTORP__(Namval_t *np; char *value;){
+       char *p,*q;
        q = stakalloc(strlen(nv_name(np))+(value?strlen(value):0)+2);
        p=strcopy(q,nv_name(np));
        if(value)
@@ -879,8 +835,8 @@ static char *staknam __PARAM__((register Namval_t *np, char *value), (np, value)
 /*
  * put the name and attribute into value of attributes variable
  */
-static void attstore __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
-       register int flag = np->nvflag;
+static void attstore __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
+       int flag = np->nvflag;
        if(!(flag&NV_EXPORT) || (flag&NV_FUNCT))
                return;
        flag &= (NV_RDONLY|NV_UTOL|NV_LTOU|NV_RJUST|NV_LJUST|NV_ZFILL|NV_INTEGER);
@@ -894,7 +850,7 @@ static void attstore __PARAM__((register Namval_t *np), (np)) __OTORP__(register
 }
 
 static void pushnam __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
-       register char *value;
+       char *value;
        if(nv_isattr(np,NV_IMPORT))
        {
                if(np->nvenv)
@@ -911,9 +867,9 @@ static void pushnam __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
  */
 
 char **sh_envgen __PARAM__((void), ()){
-       register char **er;
-       register int namec;
-       register char *cp;
+       char **er;
+       int namec;
+       char *cp;
        /* L_ARGNOD gets generated automatically as full path name of command */
        nv_offattr(L_ARGNOD,NV_EXPORT);
        attsize = 6;
@@ -937,8 +893,8 @@ static int scanflags;
 static int scancount = 0;
 
 static int scanfilter __PARAM__((const char *name, char *arg, __V_ *notused), (name, arg, notused)) __OTORP__(const char *name; char *arg; __V_ *notused;){
-       register Namval_t *np = (Namval_t*)arg;
-       register int k=np->nvflag;
+       Namval_t *np = (Namval_t*)arg;
+       int k=np->nvflag;
        NOT_USED(name);
        NOT_USED(notused);
        if(scanmask?(k&scanmask)==scanflags:(!scanflags || (k&scanflags)))
@@ -979,7 +935,7 @@ int nv_scan __PARAM__((Hashtab_t *root, void (*fn)(Namval_t*), int mask, int fla
  * create a new environment scope
  */
 void nv_scope __PARAM__((struct argnod *envlist), (envlist)) __OTORP__(struct argnod *envlist;){
-       register Hashtab_t *newscope;
+       Hashtab_t *newscope;
        newscope = hashalloc(sh.var_tree,HASH_set,HASH_SCOPE|HASH_ALLOCATE,0);
        sh.var_tree = newscope;
        nv_setlist(envlist,NV_EXPORT|NV_NOSCOPE|NV_IDENT|NV_ASSIGN);
@@ -991,7 +947,7 @@ void nv_scope __PARAM__((struct argnod *envlist), (envlist)) __OTORP__(struct ar
  * node, as well as its dope vector, if it is an array.
  */
 
-void   sh_envnolocal  __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
+void   sh_envnolocal  __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
        if(nv_isattr(np,NV_EXPORT|NV_NOFREE))
        {
                if(nv_isattr(np,NV_REF))
@@ -1024,9 +980,9 @@ void       nv_close __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
  *   by the value of <np>.  If <np> denotes an array member, it
  *   will retain its attributes.
  */
-void   nv_unset __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
-       register union Value *up = &np->nvalue;
-       register Namarr_t *ap;
+void   nv_unset __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
+       union Value *up = &np->nvalue;
+       Namarr_t *ap;
        if(!forced && nv_isattr (np,NV_RDONLY))
                error(ERROR_exit(1),e_readonly, nv_name(np));
        if(sh.subshell && !nv_isnull(np))
@@ -1076,7 +1032,7 @@ void      nv_unset __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval
 /*
  * return the node pointer in the highest level scope
  */
-Namval_t *nv_scoped __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
+Namval_t *nv_scoped __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
        if(hashscope(sh.var_tree))
                return(nv_search((char*)np,sh.var_tree,HASH_BUCKET));
        else
@@ -1094,10 +1050,10 @@ Namval_t *nv_scoped __PARAM__((register Namval_t *np), (np)) __OTORP__(register
  *   If <np> has no value, 0 is returned.
  */
 
-char *nv_getval __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
-       register union Value *up= &np->nvalue;
-       register int numeric;
-       register Namarr_t *ap;
+char *nv_getval __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
+       union Value *up= &np->nvalue;
+       int numeric;
+       Namarr_t *ap;
        if(!np->nvfun && !nv_isattr(np,NV_ARRAY|NV_INTEGER|NV_FUNCT|NV_REF))
                goto done;
        if(ap = nv_arrayptr(np))
@@ -1119,7 +1075,7 @@ char *nv_getval __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namv
        }
        if(numeric)
        {
-               register long l;
+               long l;
                if(!up->cp || nv_isattr (np,NV_CPOINTER))
                        return((char*)up->cp);
                else if(nv_isattr (np,NV_DOUBLE))
@@ -1149,10 +1105,10 @@ done:
        return ((char*)up->cp);
 }
 
-double nv_getnum __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
-       register union Value *up;
-       register double r=0;
-       register char *str;
+double nv_getnum __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
+       union Value *up;
+       double r=0;
+       char *str;
        if(np->nvfun)
        {
                if(!local)
@@ -1184,10 +1140,10 @@ double nv_getnum __PARAM__((register Namval_t *np), (np)) __OTORP__(register Nam
  *   value to conform to <newatts>.  The <size> of left and right
  *   justified fields may be given.
  */
-void nv_newattr  __PARAM__((register Namval_t *np, unsigned newatts, int size), (np, newatts, size)) __OTORP__(register Namval_t *np; unsigned newatts; int size;){
-       register char *sp;
-       register char *cp = 0;
-       register unsigned int n;
+void nv_newattr  __PARAM__((Namval_t *np, unsigned newatts, int size), (np, newatts, size)) __OTORP__(Namval_t *np; unsigned newatts; int size;){
+       char *sp;
+       char *cp = 0;
+       unsigned int n;
        Namarr_t *ap = 0;
        int oldsize,oldatts;
 
@@ -1200,21 +1156,7 @@ void nv_newattr  __PARAM__((register Namval_t *np, unsigned newatts, int size),
        if(newatts&NV_EXPORT)
                nv_offattr(np,NV_IMPORT);
 #endif /* SHOPT_BSH */
-#ifdef apollo
-       if(((n^newatts)&NV_EXPORT))
-       /* record changes to the environment */
-       {
-               short namlen = strlen(nv_name(np));
-               if(n&NV_EXPORT)
-                       ev_$delete_var(nv_name(np),&namlen);
-               else
-               {
-                       char *vp = nv_getval(np);
-                       short vallen = strlen(vp);
-                       ev_$set_var(nv_name(np),&namlen,vp,&vallen);
-               }
-       }
-#endif /* apollo */
+
         /*
          * Set environment variable defined in the underlying
          * libc environ. This is done because routines within
@@ -1277,9 +1219,9 @@ void nv_newattr  __PARAM__((register Namval_t *np, unsigned newatts, int size),
 #ifndef _NEXT_SOURCE
 static char *oldgetenv __PARAM__((const char *string), (string)) __OTORP__(const
  char *string;){
-        register char c0,c1;
-        register const char *cp, *sp;
-        register char **av = environ;
+        char c0,c1;
+        const char *cp, *sp;
+        char **av = environ;
         if(!string || (c0= *string)==0)
                 return(0);
         if((c1= *++string)==0)
@@ -1304,7 +1246,7 @@ static char *oldgetenv __PARAM__((const char *string), (string)) __OTORP__(const
  * around the problems, others don't.
  */
 char *ksh_getenv __PARAM__((const char *name), (name)) __OTORP__(const char *name;){
-        register Namval_t *np;
+        Namval_t *np;
         if(!sh.var_tree)
                 return(oldgetenv(name));
         if((np = nv_search(name,sh.var_tree,0)) && nv_isattr(np,NV_EXPORT))
@@ -1324,7 +1266,7 @@ char *ksh_getenv __PARAM__((const char *name), (name)) __OTORP__(const char *nam
  * no calls to this routine. - harry phinney  8/15/1994.
  */
 int ksh_putenv __PARAM__((const char *name), (name)) __OTORP__(const char *name;){
-       register Namval_t *np;
+       Namval_t *np;
        if(name)
        {
                np = nv_open(name,sh.var_tree,NV_EXPORT|NV_IDENT|NV_ARRAY|NV_ASSIGN);
@@ -1339,7 +1281,7 @@ int ksh_putenv __PARAM__((const char *name), (name)) __OTORP__(const char *name;
  * Override libast setenv()
  */
 char* setenviron __PARAM__((const char *name), (name)) __OTORP__(const char *name;){
-       register Namval_t *np;
+       Namval_t *np;
        if(name)
        {
                np = nv_open(name,sh.var_tree,NV_EXPORT|NV_IDENT|NV_ARRAY|NV_ASSIGN);
@@ -1356,8 +1298,8 @@ char* setenviron __PARAM__((const char *name), (name)) __OTORP__(const char *nam
  * <str1> and <str2> may point to the same place.
  */
 
-static void ltou __PARAM__((register char const *str1,register char *str2), (str1, str2)) __OTORP__(register char const *str1;register char *str2;){
-       register int c;
+static void ltou __PARAM__((char const *str1,char *str2), (str1, str2)) __OTORP__(char const *str1;char *str2;){
+       int c;
        for(; c= *((unsigned char*)str1); str1++,str2++)
        {
                if(islower(c))
@@ -1374,8 +1316,8 @@ static void ltou __PARAM__((register char const *str1,register char *str2), (str
  * <str1> and <str2> may point to the same place.
  */
 
-static void utol __PARAM__((register char const *str1,register char *str2), (str1, str2)) __OTORP__(register char const *str1;register char *str2;){
-       register int c;
+static void utol __PARAM__((char const *str1,char *str2), (str1, str2)) __OTORP__(char const *str1;char *str2;){
+       int c;
        for(; c= *((unsigned char*)str1); str1++,str2++)
        {
                if(isupper(c))
@@ -1391,8 +1333,8 @@ static void utol __PARAM__((register char const *str1,register char *str2), (str
  * <fp> is null to pop, otherwise, <fp> is pushed onto stack
  * The top of the stack is returned
  */
-Namfun_t *nv_stack __PARAM__((register Namval_t *np, register Namfun_t* fp), (np, fp)) __OTORP__(register Namval_t *np; register Namfun_t* fp;){
-        register Namfun_t *lp;
+Namfun_t *nv_stack __PARAM__((Namval_t *np, Namfun_t* fp), (np, fp)) __OTORP__(Namval_t *np; Namfun_t* fp;){
+        Namfun_t *lp;
         if(fp)
         {
                 if((lp=np->nvfun)==fp)
@@ -1422,8 +1364,8 @@ Namfun_t *nv_stack __PARAM__((register Namval_t *np, register Namfun_t* fp), (np
  * Special builtins cannot be replaced and return -1
  */
 int     sh_addbuiltin __PARAM__((const char *path, int (*bltin)(int, char*[],__V_*),__V_ *extra), (path, bltin, extra)) __OTORP__(const char *path; int (*bltin)();__V_ *extra;){
-        register const char *cp, *name = path_basename(path);
-        register Namval_t *np, *nq=0;
+        const char *cp, *name = path_basename(path);
+        Namval_t *np, *nq=0;
         if(name==path && (cp=strchr(name,'.')) && cp!=name)
         {
                 int offset = staktell();
@@ -1470,8 +1412,8 @@ static  char *curbuf;
  *   with <places> places after the decimal point.  The string
  *   will be stored within static variable <numbuf>.
  */
-char *sh_ftos __PARAM__((double val,register int places), (val, places)) __OTORP__(double val;register int places;){
-       register char *cp, *sp;
+char *sh_ftos __PARAM__((double val,int places), (val, places)) __OTORP__(double val;int places;){
+       char *cp, *sp;
        int decpt,sign;
 
        cp = sffcvt(val,places,&decpt,&sign);
@@ -1498,8 +1440,8 @@ char *sh_ftos __PARAM__((double val,register int places), (val, places)) __OTORP
  * convert <val> to a string with <places> significant figures
  * The result is placed in a local buffer and a pointer returned
  */
-char *sh_etos __PARAM__((double val,register int places), (val, places)) __OTORP__(double val;register int places;){
-       register int bufsize = places+8;
+char *sh_etos __PARAM__((double val,int places), (val, places)) __OTORP__(double val;int places;){
+       int bufsize = places+8;
        if(!curbuf)
                curbuf = (char*)malloc(maxbufsize=bufsize);
        else if(bufsize > maxbufsize)
@@ -1511,9 +1453,9 @@ char *sh_etos __PARAM__((double val,register int places), (val, places)) __OTORP
 /*
  * call the next getval function in the chain
  */
-char *nv_getv __PARAM__((Namval_t *np, register Namfun_t *nfp), (np, nfp)) __OTORP__(Namval_t *np; register Namfun_t *nfp;){
-       register Namfun_t       *fp;
-       register char *cp;
+char *nv_getv __PARAM__((Namval_t *np, Namfun_t *nfp), (np, nfp)) __OTORP__(Namval_t *np; Namfun_t *nfp;){
+       Namfun_t        *fp;
+       char *cp;
        if((fp = nfp) != NIL(Namfun_t*) && !local)
                fp = nfp = nfp->next;
        local=0;
@@ -1536,9 +1478,9 @@ char *nv_getv __PARAM__((Namval_t *np, register Namfun_t *nfp), (np, nfp)) __OTO
 /*
  * call the next getnum function in the chain
  */
-double nv_getn __PARAM__((Namval_t *np, register Namfun_t *nfp), (np, nfp)) __OTORP__(Namval_t *np; register Namfun_t *nfp;){
-       register Namfun_t       *fp;
-       register double d=0;
+double nv_getn __PARAM__((Namval_t *np, Namfun_t *nfp), (np, nfp)) __OTORP__(Namval_t *np; Namfun_t *nfp;){
+       Namfun_t        *fp;
+       double d=0;
        if((fp = nfp) != NIL(Namfun_t*) && !local)
                fp = nfp = nfp->next;
        local=0;
@@ -1565,8 +1507,8 @@ double nv_getn __PARAM__((Namval_t *np, register Namfun_t *nfp), (np, nfp)) __OT
 /*
  * call the next assign function in the chain
  */
-void nv_putv __PARAM__((Namval_t *np, const char *value, int flags, register Namfun_t *nfp), (np, value, flags, nfp)) __OTORP__(Namval_t *np; const char *value; int flags; register Namfun_t *nfp;){
-       register Namfun_t       *fp;
+void nv_putv __PARAM__((Namval_t *np, const char *value, int flags, Namfun_t *nfp), (np, value, flags, nfp)) __OTORP__(Namval_t *np; const char *value; int flags; Namfun_t *nfp;){
+       Namfun_t        *fp;
        if((fp=nfp) != NIL(Namfun_t*) && !local)
                fp = nfp = nfp->next;
        local=0;
@@ -1600,8 +1542,8 @@ struct    vardisc
 /*
  * free discipline if no more discipline functions
  */
-static void chktfree __PARAM__((register Namval_t *np, register struct vardisc *vp), (np, vp)) __OTORP__(register Namval_t *np; register struct vardisc *vp;){
-       register int n;
+static void chktfree __PARAM__((Namval_t *np, struct vardisc *vp), (np, vp)) __OTORP__(Namval_t *np; struct vardisc *vp;){
+       int n;
        for(n=0; n< sizeof(vp->disc)/sizeof(*vp->disc); n++)
        {
                if(vp->disc[n])
@@ -1620,8 +1562,8 @@ static void chktfree __PARAM__((register Namval_t *np, register struct vardisc *
  * This function performs an assignment disc on the given node <np>
  */
 static void    assign __PARAM__((Namval_t *np,const char* val,int flags,Namfun_t *handle), (np, val, flags, handle)) __OTORP__(Namval_t *np;const char* val;int flags;Namfun_t *handle;){
-       register struct vardisc *vp = (struct vardisc*)handle;
-       register Namval_t *nq, **disc;
+       struct vardisc *vp = (struct vardisc*)handle;
+       Namval_t *nq, **disc;
        if(val)
        {
                if(!(nq=vp->disc[ASSIGN]))
@@ -1643,7 +1585,7 @@ static void       assign __PARAM__((Namval_t *np,const char* val,int flags,Namfun_t *h
        }
        if(val)
        {
-               register char *cp;
+               char *cp;
                double d;
                if(nv_isnull(SH_VALNOD))
                        cp=0;
@@ -1677,9 +1619,9 @@ static void       assign __PARAM__((Namval_t *np,const char* val,int flags,Namfun_t *h
  * the lookup on the given node <np>
  */
 static char*   lookup __PARAM__((Namval_t *np, Namfun_t *handle), (np, handle)) __OTORP__(Namval_t *np; Namfun_t *handle;){
-       register struct vardisc *vp = (struct vardisc*)handle;
-       register Namval_t *nq;
-       register char *cp=0;
+       struct vardisc *vp = (struct vardisc*)handle;
+       Namval_t *nq;
+       char *cp=0;
        if((nq=vp->disc[LOOKUP]) &&  nq!=BLOCKED)
        {
                nv_unset(SH_VALNOD);
@@ -1699,7 +1641,7 @@ static char*      lookup __PARAM__((Namval_t *np, Namfun_t *handle), (np, handle)) __
 /*
  * node creation discipline
  */
-Namval_t *nv_create __PARAM__((register Namval_t* np,const char *name,register Namfun_t *fp), (np, name, fp)) __OTORP__(register Namval_t* np;const char *name;register Namfun_t *fp;){
+Namval_t *nv_create __PARAM__((Namval_t* np,const char *name,Namfun_t *fp), (np, name, fp)) __OTORP__(Namval_t* np;const char *name;Namfun_t *fp;){
        if(np == (Namval_t*)fp)
                fp = np->nvfun;
        else if(fp)
@@ -1726,14 +1668,14 @@ static const Namdisc_t shdisc =
  * If <event> is NULL, then return the event name after <action>
  * If <event> is NULL, and <action> is NULL, return the first event
  */
-char *nv_setdisc __PARAM__((register Namval_t* np,register const char *event,Namval_t *action,register Namfun_t *fp), (np, event, action, fp)) __OTORP__(register Namval_t* np;register const char *event;Namval_t *action;register Namfun_t *fp;){
-       register struct vardisc *vp = (struct vardisc*)np->nvfun;
-       register int type;
+char *nv_setdisc __PARAM__((Namval_t* np,const char *event,Namval_t *action,Namfun_t *fp), (np, event, action, fp)) __OTORP__(Namval_t* np;const char *event;Namval_t *action;Namfun_t *fp;){
+       struct vardisc *vp = (struct vardisc*)np->nvfun;
+       int type;
        if(np == (Namval_t*)fp)
        {
                static const char *discnames[] = { "get", "set", "unset", 0 };
-               register const char *name;
-               register int getname=0;
+               const char *name;
+               int getname=0;
                /* top level call, check for get/set */
                if(!event)
                {
@@ -1802,10 +1744,10 @@ char *nv_setdisc __PARAM__((register Namval_t* np,register const char *event,Nam
 /*
  * Create a reference node from <np>
  */
-void nv_setref __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){
-       register Namval_t *nq, *nr;
-       register char *cp;
-       register int flags = NV_ARRAY|NV_VARNAME|NV_REF;
+void nv_setref __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){
+       Namval_t *nq, *nr;
+       char *cp;
+       int flags = NV_ARRAY|NV_VARNAME|NV_REF;
        Hashtab_t *hp=sh.var_tree;
        if(nv_isattr(np,NV_REF))
                return;
index 69de5334e602c12441fe24712d4d3d3b1dcf4676..03909f852877241af4bce2b0d80413ffa103b22e 100644 (file)
@@ -151,9 +151,9 @@ static struct argnod        *label_last;
  * type=='V' for variable assignment lists
  * Otherwise type is determined by the command */
 static void writedefs __PARAM__((struct argnod *arglist, int line, int type, struct argnod *cmd), (arglist, line, type, cmd)) __OTORP__(struct argnod *arglist; int line; int type; struct argnod *cmd;){
-       register struct argnod *argp = arglist;
-       register char *cp;
-       register int n;
+       struct argnod *argp = arglist;
+       char *cp;
+       int n;
        int width=0;
        static char atbuff[20];
        static char justify[2];
@@ -213,7 +213,7 @@ static void writedefs __PARAM__((struct argnod *arglist, int line, int type, str
  * Make a parent node for fork() or io-redirection
  */
 static union anynode   *makeparent __PARAM__((int flag, union anynode *child), (flag, child)) __OTORP__(int flag; union anynode *child;){
-       register union anynode  *par = getnode(forknod);
+       union anynode   *par = getnode(forknod);
        par->fork.forktyp = flag;
        par->fork.forktre = child;
        par->fork.forkio = 0;
@@ -225,7 +225,7 @@ static union anynode        *makeparent __PARAM__((int flag, union anynode *child), (fl
  *  Make a node corresponding to a command list
  */
 static union anynode   *makelist __PARAM__((int type, union anynode *l, union anynode *r), (type, l, r)) __OTORP__(int type; union anynode *l; union anynode *r;){
-       register union anynode  *t;
+       union anynode   *t;
        if(!l || !r)
                sh_syntax();
        else
@@ -247,7 +247,7 @@ static union anynode        *makelist __PARAM__((int type, union anynode *l, union anyn
  */
 
 union anynode  *sh_parse __PARAM__((Sfio_t *iop, int flag), (iop, flag)) __OTORP__(Sfio_t *iop; int flag;){
-       register union anynode  *t;
+       union anynode   *t;
        Fcin_t  sav_input;
        int     sav_prompt = sh.nextprompt;
        if(sh.binscript && sffileno(iop)==sh.infd)
@@ -305,7 +305,7 @@ union anynode       *sh_parse __PARAM__((Sfio_t *iop, int flag), (iop, flag)) __OTORP_
  * the parse tree
  */
 union anynode *sh_dolparen __PARAM__((void), ()){
-       register union anynode *t=0;
+       union anynode *t=0;
        Sfio_t *sp = fcfile();
        int line = sh.inlineno;
        sh.inlineno = error_info.line+sh.st.firstline;
@@ -329,7 +329,7 @@ union anynode *sh_dolparen __PARAM__((void), ()){
                 * This code handles the case where string has been converted
                 * to a file by an alias setup
                 */
-               register int c;
+               int c;
                char *cp;
                if(fcgetc(c) > 0)
                        fcseek(-1);
@@ -358,8 +358,8 @@ void        sh_freeup __PARAM__((void), ()){
  * stack is freed when reference count is zero
  */
 
-void sh_funstaks __PARAM__((register struct slnod *slp,int flag), (slp, flag)) __OTORP__(register struct slnod *slp;int flag;){
-       register struct slnod *slpold;
+void sh_funstaks __PARAM__((struct slnod *slp,int flag), (slp, flag)) __OTORP__(struct slnod *slp;int flag;){
+       struct slnod *slpold;
        while(slpold=slp)
        {
                if(slp->slchild)
@@ -379,9 +379,9 @@ void sh_funstaks __PARAM__((register struct slnod *slp,int flag), (slp, flag)) _
  *     list [ ; cmd ]
  */
 
-static union anynode   *sh_cmd __PARAM__((register int sym, int flag), (sym, flag)) __OTORP__(register int sym; int flag;){
-       register union anynode  *left, *right;
-       register int type = FINT|FAMP;
+static union anynode   *sh_cmd __PARAM__((int sym, int flag), (sym, flag)) __OTORP__(int sym; int flag;){
+       union anynode   *left, *right;
+       int type = FINT|FAMP;
        if(sym==NL)
                shlex.lasttok = 0;
        left = list(flag);
@@ -432,9 +432,9 @@ static union anynode        *sh_cmd __PARAM__((register int sym, int flag), (sym, flag)
  *     list || term
  *      unfortunately, these are equal precedence
  */
-static union anynode   *list __PARAM__((register int flag), (flag)) __OTORP__(register int flag;){
-       register union anynode  *t = term(flag);
-       register int    token;
+static union anynode   *list __PARAM__((int flag), (flag)) __OTORP__(int flag;){
+       union anynode   *t = term(flag);
+       int     token;
        while(t && ((token=shlex.token)==ANDFSYM || token==ORFSYM))
                t = makelist((token==ANDFSYM?TAND:TORF), t, term(SH_NL));
        return(t);
@@ -445,9 +445,9 @@ static union anynode        *list __PARAM__((register int flag), (flag)) __OTORP__(regi
  *     item
  *     item | term
  */
-static union anynode   *term __PARAM__((register int flag), (flag)) __OTORP__(register int flag;){
-       register union anynode  *t;
-       register int token;
+static union anynode   *term __PARAM__((int flag), (flag)) __OTORP__(int flag;){
+       union anynode   *t;
+       int token;
        if(flag&SH_NL)
                token = skipnl();
        else
@@ -463,7 +463,7 @@ static union anynode        *term __PARAM__((register int flag), (flag)) __OTORP__(regi
        }
        else if((t=item(SH_NL|SH_EMPTY)) && shlex.token=='|')
        {
-               register union anynode  *tt;
+               union anynode   *tt;
                t = makeparent(TFORK|FPOU,t);
                if(tt=term(SH_NL))
                {
@@ -489,9 +489,9 @@ static union anynode        *term __PARAM__((register int flag), (flag)) __OTORP__(regi
 /*
  * case statement
  */
-static struct regnod*  syncase __PARAM__((register int esym), (esym)) __OTORP__(register int esym;){
-       register int tok = skipnl();
-       register struct regnod  *r;
+static struct regnod*  syncase __PARAM__((int esym), (esym)) __OTORP__(int esym;){
+       int tok = skipnl();
+       struct regnod   *r;
        if(tok==esym)
                return(NIL(struct regnod*));
        r = (struct regnod*)stakalloc(sizeof(struct regnod));
@@ -538,11 +538,11 @@ static struct regnod*     syncase __PARAM__((register int esym), (esym)) __OTORP__(r
  * Otherise a list containing an arithmetic command and a while
  * is returned.
  */
-static union anynode   *arithfor __PARAM__((register union anynode *tf), (tf)) __OTORP__(register union anynode *tf;){
-       register union anynode  *t, *tw = tf;
-       register int    offset;
-       register struct argnod *argp;
-       register int n;
+static union anynode   *arithfor __PARAM__((union anynode *tf), (tf)) __OTORP__(union anynode *tf;){
+       union anynode   *t, *tw = tf;
+       int     offset;
+       struct argnod *argp;
+       int n;
        int argflag = shlex.arg->argflag;
        /* save current input */
        Fcin_t  sav_input;
@@ -551,7 +551,7 @@ static union anynode        *arithfor __PARAM__((register union anynode *tf), (tf)) __O
        /* split ((...)) into three expressions */
        for(n=0; ; n++)
        {
-               register int c;
+               int c;
                argp = (struct argnod*)stakseek(ARGVAL);
                argp->argnxt.ap = 0;
                argp->argflag = argflag;
@@ -617,8 +617,8 @@ static union anynode        *arithfor __PARAM__((register union anynode *tf), (tf)) __O
 }
 
 static union anynode *funct __PARAM__((void), ()){
-       register union anynode *t;
-       register int flag;
+       union anynode *t;
+       int flag;
        struct slnod *volatile slp=0;
        Stak_t *savstak;
 #ifdef SHOPT_KIA
@@ -735,10 +735,10 @@ static union anynode *funct __PARAM__((void), ()){
 /*
  * Compound assignment
  */
-static struct argnod *assign __PARAM__((register struct argnod *ap), (ap)) __OTORP__(register struct argnod *ap;){
-       register int n;
-       register union anynode *t ,**tp;
-       register struct comnod *ac;
+static struct argnod *assign __PARAM__((struct argnod *ap), (ap)) __OTORP__(struct argnod *ap;){
+       int n;
+       union anynode *t ,**tp;
+       struct comnod *ac;
        int array=0;
        Namval_t *np;
        n = strlen(ap->argval)-1;
@@ -808,9 +808,9 @@ static struct argnod *assign __PARAM__((register struct argnod *ap), (ap)) __OTO
  */
 
 static union anynode   *item __PARAM__((int flag), (flag)) __OTORP__(int flag;){
-       register union anynode  *t;
-       register struct ionod   *io;
-       register int tok = (shlex.token&0xff);
+       union anynode   *t;
+       struct ionod    *io;
+       int tok = (shlex.token&0xff);
        int savwdval = shlex.lasttok;
        int savline = shlex.lastline;
        if(!(flag&SH_NOIO) && (tok=='<' || tok=='>'))
@@ -862,7 +862,7 @@ static union anynode        *item __PARAM__((int flag), (flag)) __OTORP__(int flag;){
            /* if statement */
            case IFSYM:
            {
-               register union anynode  *tt;
+               union anynode   *tt;
                t = getnode(ifnod);
                t->if_.iftyp=TIF;
                t->if_.iftre=sh_cmd(THENSYM,SH_NL);
@@ -943,7 +943,7 @@ static union anynode        *item __PARAM__((int flag), (flag)) __OTORP__(int flag;){
 
            case LABLSYM:
            {
-               register struct argnod *argp = label_list;
+               struct argnod *argp = label_list;
                while(argp)
                {
                        if(strcmp(argp->argval,shlex.arg->argval)==0)
@@ -1001,9 +1001,9 @@ done:
  * This is for a simple command, for list, or compound assignment
  */
 static union anynode *simple __PARAM__((int flag, struct ionod *io), (flag, io)) __OTORP__(int flag; struct ionod *io;){
-       register struct comnod *t;
-       register struct argnod  *argp;
-       register int tok;
+       struct comnod *t;
+       struct argnod   *argp;
+       int tok;
        struct argnod   **argtail;
        struct argnod   **settail;
        int     keywd=1;
@@ -1137,7 +1137,7 @@ static union anynode *simple __PARAM__((int flag, struct ionod *io), (flag, io))
 #ifdef SHOPT_KIA
        if(shlex.kiafile)
        {
-               register Namval_t *np=(Namval_t*)t->comnamp;
+               Namval_t *np=(Namval_t*)t->comnamp;
                int line = t->comline;
                argp = t->comarg;
                if(argp)
@@ -1171,7 +1171,7 @@ static union anynode *simple __PARAM__((int flag, struct ionod *io), (flag, io))
                Namval_t *np=(Namval_t*)t->comnamp;
                if((np==SYSBREAK || np==SYSCONT) && (argp->argflag&ARG_RAW) && !isdigit(*argp->argval))
                {
-                       register char *cp = argp->argval;
+                       char *cp = argp->argval;
                        /* convert break/continue labels to numbers */
                        tok = 0;
                        for(argp=label_list;argp!=label_last;argp=argp->argnxt.ap)
@@ -1214,7 +1214,7 @@ static union anynode *simple __PARAM__((int flag, struct ionod *io), (flag, io))
  * skip past newlines but issue prompt if interactive
  */
 static int     skipnl __PARAM__((void), ()){
-       register int token;
+       int token;
        while((token=sh_lex())==NL);
        if(token==';')
                sh_syntax();
@@ -1226,8 +1226,8 @@ static int        skipnl __PARAM__((void), ()){
  * if flag is set then an alias can be in the next word
  */
 static struct ionod    *inout __PARAM__((struct ionod *lastio,int flag), (lastio, flag)) __OTORP__(struct ionod *lastio;int flag;){
-       register int            iof = shlex.digits, token=shlex.token;
-       register struct ionod   *iop;
+       int             iof = shlex.digits, token=shlex.token;
+       struct ionod    *iop;
        switch(token&0xff)
        {
            case '<':
@@ -1299,10 +1299,10 @@ static struct ionod     *inout __PARAM__((struct ionod *lastio,int flag), (lastio, f
  */
 
 static struct argnod *qscan __PARAM__((struct comnod *ac,int argn), (ac, argn)) __OTORP__(struct comnod *ac;int argn;){
-       register char **cp;
-       register struct argnod *ap;
-       register struct dolnod* dp;
-       register int special=0;
+       char **cp;
+       struct argnod *ap;
+       struct dolnod* dp;
+       int special=0;
        /* special hack for test -t compatibility */
        if((Namval_t*)ac->comnamp==SYSTEST)
                special = 2;
@@ -1356,30 +1356,30 @@ static struct argnod *qscan __PARAM__((struct comnod *ac,int argn), (ac, argn))
 }
 
 static union anynode *test_expr __PARAM__((int sym), (sym)) __OTORP__(int sym;){
-       register union anynode *t = test_or();
+       union anynode *t = test_or();
        if(shlex.token!=sym)
                sh_syntax();
        return(t);
 }
 
 static union anynode *test_or __PARAM__((void), ()){
-       register union anynode *t = test_and();
+       union anynode *t = test_and();
        while(shlex.token==ORFSYM)
                t = makelist(TORF|TTEST,t,test_and());
        return(t);
 }
 
 static union anynode *test_and __PARAM__((void), ()){
-       register union anynode *t = test_primary();
+       union anynode *t = test_primary();
        while(shlex.token==ANDFSYM)
                t = makelist(TAND|TTEST,t,test_primary());
        return(t);
 }
 
 static union anynode *test_primary __PARAM__((void), ()){
-       register struct argnod *arg;
-       register union anynode *t;
-       register int num,token;
+       struct argnod *arg;
+       union anynode *t;
+       int num,token;
        token = skipnl();
        num = shlex.digits;
        switch(token)
@@ -1462,8 +1462,8 @@ static union anynode *test_primary __PARAM__((void), ()){
 
 #ifdef SHOPT_KIA
 int kiaclose __PARAM__((void), ()){
-       register off_t off1,off2;
-       register int n;
+       off_t off1,off2;
+       int n;
        if(shlex.kiafile)
        {
                sfseek(shlex.kiafile,shlex.kiabegin,SEEK_SET);
index fe83aed3524e0716126709dfe3b3d2a967db1e59..22ddecd900ead3e39d0a5594abff3571144ae7a9 100644 (file)
@@ -130,9 +130,9 @@ static int          exec_err;
  * Sets the PWD variable to this value
  */
 char *path_pwd __PARAM__((int flag), (flag)) __OTORP__(int flag;){
-       register char *cp;
-       register char *dfault = (char*)e_dot;
-       register int count = 0;
+       char *cp;
+       char *dfault = (char*)e_dot;
+       int count = 0;
        if(sh.pwd)
                return((char*)sh.pwd);
        while(1) 
@@ -189,8 +189,8 @@ skip:
  */
 
 char *path_get __PARAM__((const char *name), (name)) __OTORP__(const char *name;){
-       register char *path=0;
-       register char *sp = sh.lastpath;
+       char *path=0;
+       char *sp = sh.lastpath;
        static int bin_is_usrbin = -1;
        if(strchr(name,'/'))
                return("");
@@ -220,9 +220,9 @@ char *path_get __PARAM__((const char *name), (name)) __OTORP__(const char *name;
  * convert each /usr/bin to /bin and eliminate multiple /bin from <path>
  * The resulting path is placed on the stack
  */
-static char *path_to_stak __PARAM__((register const char *path), (path)) __OTORP__(register const char *path;){
-       register const char *cp=path, *base;
-       register int n, nbin=0;
+static char *path_to_stak __PARAM__((const char *path), (path)) __OTORP__(const char *path;){
+       const char *cp=path, *base;
+       int n, nbin=0;
        stakseek(0);
        while(*cp)
        {
@@ -250,7 +250,7 @@ static char *path_to_stak __PARAM__((register const char *path), (path)) __OTORP
 }
 
 int    path_open __PARAM__((const char *name,char *path), (name, path)) __OTORP__(const char *name;char *path;){
-       register int fd;
+       int fd;
        struct stat statb;
        if(strchr(name,'/'))
        {
@@ -292,9 +292,9 @@ int path_open __PARAM__((const char *name,char *path), (name, path)) __OTORP__(c
  */
 
 static int path_inpath __PARAM__((const char *path, const char *fpath), (path, fpath)) __OTORP__(const char *path; const char *fpath;){
-       register const char *dp = fpath;
-       register const char *sp = path;
-       register int c, match=1;
+       const char *dp = fpath;
+       const char *sp = path;
+       int c, match=1;
        if(!dp || !sp || *sp==0)
                return(0);
        if(*sp==':' || (*sp=='.' && ((c=sp[1])==0 || c==':')))
@@ -323,14 +323,14 @@ static int path_inpath __PARAM__((const char *path, const char *fpath), (path, f
  *  set tracked alias node <np> to value <sp>
  */
 
-void path_alias __PARAM__((register Namval_t *np,register char *sp), (np, sp)) __OTORP__(register Namval_t *np;register char *sp;){
+void path_alias __PARAM__((Namval_t *np,char *sp), (np, sp)) __OTORP__(Namval_t *np;char *sp;){
        if(!sp)
                nv_unset(np);
        else
        {
-               register const char *vp = np->nvalue.cp;
-               register int n = 1;
-               register int nofree = nv_isattr(np,NV_NOFREE);
+               const char *vp = np->nvalue.cp;
+               int n = 1;
+               int nofree = nv_isattr(np,NV_NOFREE);
                nv_offattr(np,NV_NOPRINT);
                if(!vp || (n=strcmp(sp,vp))!=0)
                {
@@ -350,8 +350,8 @@ void path_alias __PARAM__((register Namval_t *np,register char *sp), (np, sp)) _
  * given a pathname return the base name
  */
 
-char   *path_basename __PARAM__((register const char *name), (name)) __OTORP__(register const char *name;){
-       register const char *start = name;
+char   *path_basename __PARAM__((const char *name), (name)) __OTORP__(const char *name;){
+       const char *start = name;
        while (*name)
                if ((*name++ == '/') && *name)  /* don't trim trailing / */
                        start = name;
@@ -379,9 +379,9 @@ static void funload __PARAM__((int fno, const char *name), (fno, name)) __OTORP_
  * If endpath!=NULL, Path search ends when path matches endpath.
  */
 
-int    path_search __PARAM__((register const char *name,const char *endpath, int flag), (name, endpath, flag)) __OTORP__(register const char *name;const char *endpath; int flag;){
-       register Namval_t *np;
-       register int fno;
+int    path_search __PARAM__((const char *name,const char *endpath, int flag), (name, endpath, flag)) __OTORP__(const char *name;const char *endpath; int flag;){
+       Namval_t *np;
+       int fno;
        if(flag)
        {
                /* if not found on pruned path, rehash and try again */
@@ -393,7 +393,7 @@ int path_search __PARAM__((register const char *name,const char *endpath, int fl
        }
        if(flag==0 || !sh.lastpath)
        {
-               register char *path=0;
+               char *path=0;
                if(strmatch(name,e_alphanum))
                        path = nv_getval(nv_scoped(FPATHNOD));
                if(path && (fno=path_open(name,path))>=0)
@@ -425,11 +425,11 @@ int       path_search __PARAM__((register const char *name,const char *endpath, int fl
  * end search of path matches endpath without checking execute permission
  */
 
-char   *path_absolute __PARAM__((register const char *name, const char *endpath), (name, endpath)) __OTORP__(register const char *name; const char *endpath;){
-       register int    f;
-       register char *path;
-       register const char *fpath=0;
-       register int isfun;
+char   *path_absolute __PARAM__((const char *name, const char *endpath), (name, endpath)) __OTORP__(const char *name; const char *endpath;){
+       int     f;
+       char *path;
+       const char *fpath=0;
+       int isfun;
 #ifdef SHOPT_VPIX
        char **suffix = 0;
        char *top;
@@ -501,9 +501,9 @@ char        *path_absolute __PARAM__((register const char *name, const char *endpath),
 #   endif /*S_EXEC */
 #endif /* S_IXUSR */
 
-static int canexecute __PARAM__((register char *path, int isfun), (path, isfun)) __OTORP__(register char *path; int isfun;){
+static int canexecute __PARAM__((char *path, int isfun), (path, isfun)) __OTORP__(char *path; int isfun;){
        struct stat statb;
-       register int fd=0;
+       int fd=0;
        path = path_relative(path);
        if(isfun)
        {
@@ -542,9 +542,9 @@ err:
  * Return path relative to present working directory
  */
 
-char *path_relative __PARAM__((register const char* file), (file)) __OTORP__(register const char* file;){
-       register const char *pwd;
-       register const char *fp = file;
+char *path_relative __PARAM__((const char* file), (file)) __OTORP__(const char* file;){
+       const char *pwd;
+       const char *fp = file;
        /* can't relpath when sh.pwd not set */
        if(!(pwd=sh.pwd))
                return((char*)fp);
@@ -564,10 +564,10 @@ char *path_relative __PARAM__((register const char* file), (file)) __OTORP__(reg
        return((char*)file);
 }
 
-char *path_join __PARAM__((register char *path,const char *name), (path, name)) __OTORP__(register char *path;const char *name;){
+char *path_join __PARAM__((char *path,const char *name), (path, name)) __OTORP__(char *path;const char *name;){
        /* leaves result on top of stack */
-       register char *scanp = path;
-       register int c;
+       char *scanp = path;
+       int c;
        stakseek(PATH_OFFSET);
        if(*scanp=='.')
        {
@@ -602,8 +602,8 @@ char *path_join __PARAM__((register char *path,const char *name), (path, name))
 }
 
 
-void   path_exec __PARAM__((register const char *arg0,register char *argv[],struct argnod *local), (arg0, argv, local)) __OTORP__(register const char *arg0;register char *argv[];struct argnod *local;){
-       register const char *path = "";
+void   path_exec __PARAM__((const char *arg0,char *argv[],struct argnod *local), (arg0, argv, local)) __OTORP__(const char *arg0;char *argv[];struct argnod *local;){
+       const char *path = "";
        nv_setlist(local,NV_EXPORT|NV_IDENT|NV_ASSIGN);
        xecenv=sh_envgen();
        if(strchr(arg0,'/'))
@@ -632,9 +632,9 @@ void        path_exec __PARAM__((register const char *arg0,register char *argv[],struct
  * This routine constructs a short path consisting of all
  * Relative directories up to the directory of fullname <name>
  */
-static char *prune __PARAM__((register char *path,const char *fullname), (path, fullname)) __OTORP__(register char *path;const char *fullname;){
-       register char *p = path;
-       register char *s;
+static char *prune __PARAM__((char *path,const char *fullname), (path, fullname)) __OTORP__(char *path;const char *fullname;){
+       char *p = path;
+       char *s;
        int n = 1; 
        const char *base;
        char *inpath = path;
@@ -675,8 +675,8 @@ static char *prune __PARAM__((register char *path,const char *fullname), (path,
 }
 
 
-static char *execs __PARAM__((const char *ap,const char *arg0,register char **argv), (ap, arg0, argv)) __OTORP__(const char *ap;const char *arg0;register char **argv;){
-       register char *path, *prefix;
+static char *execs __PARAM__((const char *ap,const char *arg0,char **argv), (ap, arg0, argv)) __OTORP__(const char *ap;const char *arg0;char **argv;){
+       char *path, *prefix;
        sh_sigcheck();
        prefix=path_join((char*)ap,arg0);
        xecenv[0] =  stakptr(0);
@@ -745,18 +745,9 @@ static char *execs __PARAM__((const char *ap,const char *arg0,register char **ar
 #endif /* SHELLMAGIC */
        switch(errno)
        {
-#ifdef apollo
-           /* 
-            * On apollo's execve will fail with eacces when
-            * file has execute but not read permissions. So,
-            * for now we will pretend that EACCES and ENOEXEC
-            * mean the same thing.
-            */
-           case EACCES:
-#endif /* apollo */
            case ENOEXEC:
                exscript(path,argv);
-#ifndef apollo
+
            case EACCES:
            {
                struct stat statb;
@@ -764,7 +755,7 @@ static char *execs __PARAM__((const char *ap,const char *arg0,register char **ar
                        errno = EISDIR;
            }
                /* FALL THROUGH */
-#endif /* !apollo */
+
 #ifdef ENAMETOOLONG
            case ENAMETOOLONG:
 #endif /* ENAMETOOLONG */
@@ -788,8 +779,8 @@ static char *execs __PARAM__((const char *ap,const char *arg0,register char **ar
  */
 
 
-static void exscript __PARAM__((register char *path,register char *argv[]), (path, argv)) __OTORP__(register char *path;register char *argv[];){
-       register Sfio_t *sp;
+static void exscript __PARAM__((char *path,char *argv[]), (path, argv)) __OTORP__(char *path;char *argv[];){
+       Sfio_t *sp;
        sh.comdiv=0;
        sh.bckpid = 0;
        sh.st.ioset=0;
@@ -810,8 +801,8 @@ static void exscript __PARAM__((register char *path,register char *argv[]), (pat
        /* check if file cannot open for read or script is setuid/setgid  */
        {
                static char name[] = "/tmp/euidXXXXXXXXXX";
-               register int n;
-               register uid_t euserid;
+               int n;
+               uid_t euserid;
                char *savet;
                struct stat statb;
                if((n=sh_open(path,O_RDONLY,0)) >= 0)
@@ -942,8 +933,8 @@ static void exscript __PARAM__((register char *path,register char *argv[]), (pat
      * Produce a pseudo-floating point representation
      * with 3 bits base-8 exponent, 13 bits fraction.
      */
-    static int compress __PARAM__((register time_t t), (t)) __OTORP__(register time_t t;){
-       register int exp = 0, rund = 0;
+    static int compress __PARAM__((time_t t), (t)) __OTORP__(time_t t;){
+       int exp = 0, rund = 0;
 
        while (t >= 8192)
        {
index b14cdb3aa7f7ee9086ca8712aea9e53862488f87..05e6b4452905f0a53252cc585b769e68dba69581 100644 (file)
@@ -141,7 +141,7 @@ static double               seterror __PROTO__((const char[]));     /* set error message string     *
  */
 
 double strval __PARAM__((const char *s, char** end, double(*conv)(const char**,struct lval*,int,double)), (s, end, conv)) __OTORP__(const char *s; char** end; double(*conv)();){
-       register double n;
+       double  n;
 
        pushchr(s);
        cur.isfloat = 0;
@@ -167,9 +167,9 @@ double strval __PARAM__((const char *s, char** end, double(*conv)(const char**,s
  * evaluate a subexpression with precedence
  */
 
-static double expr __PARAM__((register int precedence), (precedence)) __OTORP__(register int precedence;){
-       register int    c, op;
-       register double n, x;
+static double expr __PARAM__((int precedence), (precedence)) __OTORP__(int precedence;){
+       int     c, op;
+       double  n, x;
        int             wasop, incr=0;
        struct lval     lvalue, assignop;
        const char      *pos;
index 834ab306b36a95c780ea399e0feb746ebcf098e4..2d620bbbd8ddace16f06eb958dd493f4e19b980d 100644 (file)
  *  This is only used for small tables and is used to save non-sharable memory 
  */
 
-int sh_locate __PARAM__((register const char *sp,const Shtable_t *table,int size), (sp, table, size)) __OTORP__(register const char *sp;const Shtable_t *table;int size;){
-       register int first;
-       register const Shtable_t        *tp;
-       register int c;
+int sh_locate __PARAM__((const char *sp,const Shtable_t *table,int size), (sp, table, size)) __OTORP__(const char *sp;const Shtable_t *table;int size;){
+       int first;
+       const Shtable_t *tp;
+       int c;
        if(sp==0 || (first= *sp)==0)
                return(0);
        tp=table;
@@ -127,8 +127,8 @@ int sh_locate __PARAM__((register const char *sp,const Shtable_t *table,int size
  * The new string is put on top of the stack
  */
 char *sh_substitute __PARAM__((const char *string,const char *oldsp,char *newsp), (string, oldsp, newsp)) __OTORP__(const char *string;const char *oldsp;char *newsp;){
-       register const char *sp = string;
-       register const char *cp;
+       const char *sp = string;
+       const char *cp;
        const char *savesp = 0;
        stakseek(0);
        if(*sp==0)
@@ -182,9 +182,9 @@ found:
  * Remove escape characters from characters in <sp> and eliminate quoted nulls.
  */
 
-void   sh_trim __PARAM__((register char *sp), (sp)) __OTORP__(register char *sp;){
-       register char *dp;
-       register int c;
+void   sh_trim __PARAM__((char *sp), (sp)) __OTORP__(char *sp;){
+       char *dp;
+       int c;
        if(sp)
        {
                dp = sp;
@@ -204,8 +204,8 @@ void        sh_trim __PARAM__((register char *sp), (sp)) __OTORP__(register char *sp;){
  * puts null terminated result on stack, but doesn't freeze it
  */
 char   *sh_fmtq __PARAM__((const char *string), (string)) __OTORP__(const char *string;){
-       register const char *cp = string;
-       register int c, state;
+       const char *cp = string;
+       int c, state;
        int offset;
        if(!cp)
                return((char*)0);
@@ -303,10 +303,10 @@ char      *sh_fmtq __PARAM__((const char *string), (string)) __OTORP__(const char *st
 }
 
 #ifdef SHOPT_MULTIBYTE
-       int sh_strchr __PARAM__((const char *string, register const char *dp), (string, dp)) __OTORP__(const char *string; register const char *dp;){
+       int sh_strchr __PARAM__((const char *string, const char *dp), (string, dp)) __OTORP__(const char *string; const char *dp;){
                wchar_t c,d; 
-               register int m;
-               register const char *cp=string;
+               int m;
+               const char *cp=string;
                int n = mbtowc(&d,dp,MB_CUR_MAX);
                while((m=mbtowc(&c,cp,MB_CUR_MAX)) && c)
                {
index 649a010d303fb485c6330e5afbd349414013e0b5..b34d5c2ce52423418883f5fece0dbe780635d3ec 100644 (file)
@@ -132,9 +132,9 @@ static int subenv;
 void   sh_subtmpfile __PARAM__((void), ()){
        if(sfset(sfstdout,0,0)&SF_STRING)
        {
-               register int fd;
-               register struct checkpt *pp = (struct checkpt*)sh.jmplist;
-               register struct subshell *sp = subshell_data->pipe;
+               int fd;
+               struct checkpt  *pp = (struct checkpt*)sh.jmplist;
+               struct subshell *sp = subshell_data->pipe;
                /* save file descriptor 1 if open */
                if((sp->tmpfd = fd = fcntl(1,F_DUPFD,10)) >= 0)
                {
@@ -168,7 +168,7 @@ void        sh_subtmpfile __PARAM__((void), ()){
  * The child continues possibly with its standard output replaced by temp file
  */
 void sh_subfork __PARAM__((void), ()){
-       register struct subshell *sp = subshell_data;
+       struct subshell *sp = subshell_data;
        pid_t pid;
        /* see whether inside $(...) */
        if(sp->pipe)
@@ -197,8 +197,8 @@ void sh_subfork __PARAM__((void), ()){
  * layer created by the most recent subshell_fork if the
  * node hasn't already been copied
  */
-Namval_t *sh_assignok __PARAM__((register Namval_t *np,int add), (np, add)) __OTORP__(register Namval_t *np;int add;){
-       register Namval_t *mp;
+Namval_t *sh_assignok __PARAM__((Namval_t *np,int add), (np, add)) __OTORP__(Namval_t *np;int add;){
+       Namval_t *mp;
        if(nv_isnull(np) && !add)       /* don't bother with this */
                return(np);
        /* don't bother to save if in newer scope */
@@ -226,8 +226,8 @@ Namval_t *sh_assignok __PARAM__((register Namval_t *np,int add), (np, add)) __OT
  * restore the variables
  */
 static void nv_restore __PARAM__((struct subshell *sp), (sp)) __OTORP__(struct subshell *sp;){
-       register Namval_t *mp, *np;
-       register Hashpos_t *pos = hashscan(sp->svar,0);
+       Namval_t *mp, *np;
+       Hashpos_t *pos = hashscan(sp->svar,0);
        while(np=(Namval_t*)hashnext(pos))
        {
                if(mp = nv_search((char*)np,sp->var,HASH_BUCKET))
@@ -256,7 +256,7 @@ static void nv_restore __PARAM__((struct subshell *sp), (sp)) __OTORP__(struct s
 
 Sfio_t *sh_subshell __PARAM__((union anynode *t, int flags, int comsub), (t, flags, comsub)) __OTORP__(union anynode *t; int flags; int comsub;){
        struct subshell sub_data;
-       register struct subshell *sp = &sub_data;
+       struct subshell *sp = &sub_data;
        int jmpval,nsig;
        int savecurenv = sh.curenv;
        char *savstak;
index 3802fef0d0c01825770a7fd4f63fb99c524cf537..3b74f51ee71bc5245aa6c5274326b7233498d238 100644 (file)
@@ -130,8 +130,8 @@ static gid_t egroupid;
 static struct stat statb;
 
 main __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){
-       register int m,n;
-       register char *p;
+       int m,n;
+       char *p;
        struct stat statx;
        int mode;
        uid_t effuid;
@@ -283,7 +283,7 @@ exec:
  * return true of shell ends in sh
  */
 
-static int endsh __PARAM__((register const char *shell), (shell)) __OTORP__(register const char *shell;){
+static int endsh __PARAM__((const char *shell), (shell)) __OTORP__(const char *shell;){
        while(*shell)
                shell++;
        if(*--shell != 'h' || *--shell != 's')
@@ -296,7 +296,7 @@ static int endsh __PARAM__((register const char *shell), (shell)) __OTORP__(regi
  * return true of shell is in <dir> directory
  */
 
-static int in_dir __PARAM__((register const char *dir,register const char *shell), (dir, shell)) __OTORP__(register const char *dir;register const char *shell;){
+static int in_dir __PARAM__((const char *dir,const char *shell), (dir, shell)) __OTORP__(const char *dir;const char *shell;){
        while(*dir)
        {
                if(*dir++ != *shell++)
@@ -316,7 +316,7 @@ static void error_exit __PARAM__((const char *message), (message)) __OTORP__(con
  * This version of access checks against effective uid and effective gid
  */
 
-eaccess __PARAM__((register const char *name, register int mode), (name, mode)) __OTORP__(register const char *name; register int mode;){      
+eaccess __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){
        struct stat statb;
        if (stat(name, &statb) == 0)
        {
@@ -337,7 +337,7 @@ eaccess __PARAM__((register const char *name, register int mode), (name, mode))
                {
                        static int maxgroups = 0;
                        gid_t *groups; 
-                       register int n;
+                       int n;
                        if(maxgroups==0)
                        {
                                /* first time */
@@ -387,7 +387,7 @@ setids __PARAM__((int mode,int owner,int group), (mode, owner, group)) __OTORP__
  */
 
 setids __PARAM__((int mode,uid_t owner,gid_t group), (mode, owner, group)) __OTORP__(int mode;uid_t owner;gid_t group;){
-       register int n,m;
+       int n,m;
        int pv[2];
 
        /*
@@ -497,8 +497,8 @@ setids __PARAM__((int mode,uid_t owner,gid_t group), (mode, owner, group)) __OTO
  */
 
 static void maketemp __PARAM__((char *template), (template)) __OTORP__(char *template;){
-       register char *cp = template;
-       register pid_t n = getpid();
+       char *cp = template;
+       pid_t n = getpid();
        /* skip to end of string */
        while(*++cp);
        /* convert process id to string */
@@ -516,7 +516,7 @@ static void maketemp __PARAM__((char *template), (template)) __OTORP__(char *tem
 
 static int mycopy __PARAM__((int fdi, int fdo), (fdi, fdo)) __OTORP__(int fdi; int fdo;){
        char buffer[BLKSIZE];
-       register int n;
+       int n;
 
        while((n = read(fdi,buffer,BLKSIZE)) > 0)
                if(write(fdo,buffer,n) != n)
index 0268595af54617d42e12e66cebe6105f6d2c953d..e81bef827336aeede654c8e78506c26b3c1fae06 100644 (file)
@@ -114,7 +114,7 @@ int sh_tdump __PARAM__((Sfio_t *out, const union anynode *t), (out, t)) __OTORP_
 /*
  * print script corresponding to shell tree <t>
  */
-static int p_tree __PARAM__((register const union anynode *t), (t)) __OTORP__(register const union anynode *t;){
+static int p_tree __PARAM__((const union anynode *t), (t)) __OTORP__(const union anynode *t;){
        if(!t)
                return(sfputl(outfile,-1));
        if(sfputl(outfile,t->tre.tretyp)<0)
@@ -197,8 +197,8 @@ static int p_tree __PARAM__((register const union anynode *t), (t)) __OTORP__(re
        }
 }
 
-static int p_arg __PARAM__((register const struct argnod *arg), (arg)) __OTORP__(register const struct argnod *arg;){
-       register int n;
+static int p_arg __PARAM__((const struct argnod *arg), (arg)) __OTORP__(const struct argnod *arg;){
+       int n;
        struct fornod *fp;
        while(arg)
        {
@@ -221,7 +221,7 @@ static int p_arg __PARAM__((register const struct argnod *arg), (arg)) __OTORP__
        return(sfputu(outfile,0));
 }
 
-static int p_redirect __PARAM__((register const struct ionod *iop), (iop)) __OTORP__(register const struct ionod *iop;){
+static int p_redirect __PARAM__((const struct ionod *iop), (iop)) __OTORP__(const struct ionod *iop;){
        while(iop)
        {
                sfputl(outfile,iop->iofile);
@@ -240,7 +240,7 @@ static int p_redirect __PARAM__((register const struct ionod *iop), (iop)) __OTO
        return(sfputl(outfile,-1));
 }
 
-static int p_comarg __PARAM__((const register struct comnod *com), (com)) __OTORP__(const register struct comnod *com;){
+static int p_comarg __PARAM__((const struct comnod *com), (com)) __OTORP__(const struct comnod *com;){
        p_redirect(com->comio);
        p_arg(com->comset);
        if(!com->comarg)
@@ -253,8 +253,8 @@ static int p_comarg __PARAM__((const register struct comnod *com), (com)) __OTOR
 }
 
 static int p_comlist __PARAM__((const struct dolnod *dol), (dol)) __OTORP__(const struct dolnod *dol;){
-       register char *cp, *const*argv;
-       register int n;
+       char *cp, *const*argv;
+       int n;
        argv = dol->dolval+ARG_SPARE;
        while(cp = *argv)
                argv++;
@@ -266,7 +266,7 @@ static int p_comlist __PARAM__((const struct dolnod *dol), (dol)) __OTORP__(cons
        return(sfputu(outfile,0));
 }
 
-static int p_switch __PARAM__((register const struct regnod *reg), (reg)) __OTORP__(register const struct regnod *reg;){
+static int p_switch __PARAM__((const struct regnod *reg), (reg)) __OTORP__(const struct regnod *reg;){
        while(reg)
        {
                sfputl(outfile,reg->regflag);
@@ -277,8 +277,8 @@ static int p_switch __PARAM__((register const struct regnod *reg), (reg)) __OTOR
        return(sfputl(outfile,-1));
 }
 
-static int p_string __PARAM__((register const char *string), (string)) __OTORP__(register const char *string;){
-       register size_t n=strlen(string);
+static int p_string __PARAM__((const char *string), (string)) __OTORP__(const char *string;){
+       size_t n=strlen(string);
        if(sfputu(outfile,n+1)<0)
                return(-1);
        return(sfwrite(outfile,string,n));
index a686d208ddf8d98d84a543de5471dbc8f46dbdc6..6460f2d795776e5b567fcb17de8903e1ac53429b 100644 (file)
@@ -116,7 +116,7 @@ static Timer_t *tptop, *tpmin;
 static char time_state;
 
 static double getnow __PARAM__((void), ()){
-       register double now;
+       double now;
 #ifdef _lib_gettimeofday
        struct timeval tp;
        gettimeofday(&tp,(void *)0);
@@ -131,7 +131,7 @@ static double getnow __PARAM__((void), ()){
 /*
  * set an alarm for <t> seconds
  */
-static double setalarm __PARAM__((register double t), (t)) __OTORP__(register double t;){
+static double setalarm __PARAM__((double t), (t)) __OTORP__(double t;){
 #if defined(_lib_setitimer) && defined(ITIMER_REAL)
        struct itimerval tnew, told;
        tnew.it_value.tv_sec = t;
@@ -154,7 +154,7 @@ static double setalarm __PARAM__((register double t), (t)) __OTORP__(register do
 
 /* signal handler for alarm call */
 static void sigalrm __PARAM__((int sig), (sig)) __OTORP__(int sig;){
-       register Timer_t *tp, *tplast, *tpold;
+       Timer_t *tp, *tplast, *tpold;
        double now;
        static double left;
        NOT_USED(sig);
@@ -237,7 +237,7 @@ static void oldalrm __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handle;)
 }
        
 __V_ *kshtimeradd __PARAM__((unsigned long msec,int flags,void (*action)(__V_*),__V_ *handle), (msec, flags, action, handle)) __OTORP__(unsigned long msec;int flags;void (*action)();__V_ *handle;){
-       register Timer_t *tp;
+       Timer_t *tp;
        double t;
        Handler_t fn;
        t = ((double)msec)/1000.;
@@ -282,7 +282,7 @@ __V_ *kshtimeradd __PARAM__((unsigned long msec,int flags,void (*action)(__V_*),
  * delete timer <tp>.  If <tp> is NULL, all timers are deleted
  */
 void   timerdel __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handle;){
-       register Timer_t *tp = (Timer_t*)handle;
+       Timer_t *tp = (Timer_t*)handle;
        if(tp)
                tp->action = 0;
        else
index d1438f702da3b1017181f97b3812594783a2ef76..05a343d77f1d8c95a1515de476740f466c6fdd08 100644 (file)
@@ -121,8 +121,8 @@ union anynode *sh_trestore __PARAM__((Sfio_t *in), (in)) __OTORP__(Sfio_t *in;){
 static union anynode *r_tree()
 {
        long l = sfgetl(infile); 
-       register int type;
-       register union anynode *t=0;
+       int type;
+       union anynode *t=0;
        if(l<0)
                return(t);
        type = l;
@@ -219,8 +219,8 @@ static union anynode *r_tree()
 }
 
 static struct argnod *r_arg __PARAM__((void), ()){
-       register struct argnod *ap=0, *apold, *aptop=0;
-       register long l;
+       struct argnod *ap=0, *apold, *aptop=0;
+       long l;
        while((l=sfgetu(infile))>0)
        {
                ap = (struct argnod*)stakseek((unsigned)l+ARGVAL);
@@ -263,8 +263,8 @@ static struct argnod *r_arg __PARAM__((void), ()){
 }
 
 static struct ionod *r_redirect __PARAM__((void), ()){
-       register long l;
-       register struct ionod *iop=0, *iopold, *ioptop=0;
+       long l;
+       struct ionod *iop=0, *iopold, *ioptop=0;
        while((l=sfgetl(infile))>=0)
        {
                iop = (struct ionod*)getnode(ionod);
@@ -313,9 +313,9 @@ static void r_comarg __PARAM__((struct comnod *com), (com)) __OTORP__(struct com
 }
 
 static struct dolnod *r_comlist __PARAM__((void), ()){
-       register struct dolnod *dol=0;
-       register long l;
-       register char **argv;
+       struct dolnod *dol=0;
+       long l;
+       char **argv;
        if((l=sfgetl(infile))>0)
        {
                dol = (struct dolnod*)stakalloc(sizeof(struct dolnod) + sizeof(char*)*(l+ARG_SPARE));
@@ -328,7 +328,7 @@ static struct dolnod *r_comlist __PARAM__((void), ()){
 }
 
 static struct regnod *r_switch __PARAM__((void), ()){
-       register long l;
+       long l;
        struct regnod *reg=0,*regold,*regtop=0;
        while((l=sfgetl(infile))>=0)
        {
@@ -348,9 +348,9 @@ static struct regnod *r_switch __PARAM__((void), ()){
 }
 
 static char *r_string __PARAM__((void), ()){
-       register Sfio_t *in = infile;
-       register unsigned long l = sfgetu(in);
-       register char *ptr;
+       Sfio_t *in = infile;
+       unsigned long l = sfgetu(in);
+       char *ptr;
        if(l == 0)
                return(NIL(char*));
        ptr = stakalloc((unsigned)l);
index a4ac6565dd10d87913a43dec469e3ef8d8f880fc..33220ba4e5597ea4cc026fcdaba7aecd38ccd013 100644 (file)
@@ -130,7 +130,7 @@ static struct f_save *save_fork;    /* most recently saved data */
 int    sh_vforksave __PARAM__((void), ())
 #line 35
 {
-       register struct f_save *fp;
+       struct f_save *fp;
        if(!(fp = new_of(struct f_save,0)))
                return(0);
        fp->f_save_fork = save_fork;
@@ -151,7 +151,7 @@ int sh_vforksave __PARAM__((void), ())
 void   sh_vforkrestore __PARAM__((void), ())
 #line 55
 {
-       register struct f_save *fp = save_fork;
+       struct f_save *fp = save_fork;
 
        if(!sh_isstate(SH_VFORKED))
                return;
index 229a2b415eef5c38c6a9f3d843b102cd5c250c1d..74d2558e9e64dd5d0b7841678ef457053f38c589 100644 (file)
@@ -132,8 +132,8 @@ static char pipejob;
 /*
  * Given stream <iop> compile and execute
  */
-int sh_eval __PARAM__((register Sfio_t *iop, int mode), (iop, mode)) __OTORP__(register Sfio_t *iop; int mode;){
-       register union anynode *t;
+int sh_eval __PARAM__((Sfio_t *iop, int mode), (iop, mode)) __OTORP__(Sfio_t *iop; int mode;){
+       union anynode *t;
        struct slnod *saveslp = sh.st.staklist;
        int jmpval;
        struct checkpt *pp = (struct checkpt*)sh.jmplist;
@@ -167,7 +167,7 @@ int sh_eval __PARAM__((register Sfio_t *iop, int mode), (iop, mode)) __OTORP__(r
 #ifdef SHOPT_FASTPIPE
 static int pipe_exec __PARAM__((int pv[], union anynode *t, int errorflg), (pv, t, errorflg)) __OTORP__(int pv[]; union anynode *t; int errorflg;){
        struct checkpt buff;
-       register union anynode *tchild = t->fork.forktre;
+       union anynode *tchild = t->fork.forktre;
        Namval_t *np;
        Sfile_t *iop;
        int jmpval,r;
@@ -209,12 +209,12 @@ static int pipe_exec __PARAM__((int pv[], union anynode *t, int errorflg), (pv,
 }
 #endif /* SHOPT_FASTPIPE */
 
-sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OTORP__(register const union anynode *t; int flags;){
+sh_exec __PARAM__((const union anynode *t, int flags), (t, flags)) __OTORP__(const union anynode *t; int flags;){
        sh_sigcheck();
        if(t && !sh.st.execbrk && !sh_isoption(SH_NOEXEC))
        {
-               register int    type = flags;
-               register char   *com0 = 0;
+               int     type = flags;
+               char    *com0 = 0;
                int             errorflg = (type&SH_ERREXIT);
                int             execflg = (type&SH_NOFORK);
                int             mainloop = (type&SH_INTERACTIVE);
@@ -242,7 +242,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                {
                    case TCOM:
                    {
-                       register struct argnod  *argp;
+                       struct argnod   *argp;
                        char            *trap;
                        Namval_t        *np;
                        struct ionod    *io;
@@ -258,7 +258,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                        com0 = com[0];
                        if(!(np=(Namval_t*)(t->com.comnamp)) && com0)
                        {
-                               register char *cp;
+                               char *cp;
                                Namval_t *nq=0;
                                /* check for reference to discipline function */
                                if((cp=strchr(com0,'.')) && cp!=com0) 
@@ -310,7 +310,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                        }
                        while(np==SYSCOMMAND)
                        {
-                               register int n = b_command(0,com,0);
+                               int n = b_command(0,com,0);
                                if(n==0)
                                        break;
                                command += n;
@@ -333,7 +333,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                        {
                                if(argn==0 || (np && !command && nv_isattr(np,BLT_SPC)))
                                {
-                                       register int flags=NV_VARNAME|NV_ASSIGN;
+                                       int flags=NV_VARNAME|NV_ASSIGN;
                                        if(np==SYSTYPESET)
                                        {
                                                if(sh.fn_depth)
@@ -472,7 +472,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                                if(!command && np && nv_isattr(np,NV_FUNCTION))
                                {
                                        int indx;
-                                       register struct slnod *slp;
+                                       struct slnod *slp;
                                        if(!np->nvalue.ip)
                                        {
                                                path_search(com0,NIL(char*),0);
@@ -502,7 +502,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                    }
                    case TFORK:
                    {
-                       register pid_t parent;
+                       pid_t parent;
                        int no_fork,jobid;
                        int pipes[2];
                        no_fork = (execflg && !(type&(FAMP|FPOU)) &&
@@ -794,9 +794,9 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
 
                    case TFOR: /* for and select */
                    {
-                       register char **args;
-                       register int nargs;
-                       register Namval_t *np;
+                       char **args;
+                       int nargs;
+                       Namval_t *np;
                        struct dolnod   *argsav=0;
                        struct comnod   *tp;
                        char *cp, *nullptr = 0;
@@ -822,7 +822,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                                {
                                        char *val;
                                        int save_prompt;
-                                       /* reuse register */
+                                       /* reuse */
                                        if(refresh)
                                        {
                                                sh_menu(sfstderr,nargs,args);
@@ -889,7 +889,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
 
                    case TWH: /* while and until */
                    {
-                       register int    r=0;
+                       int     r=0;
                        sh.st.loopcnt++;
                        while(sh.st.execbrk==0 && (sh_exec(t->wh.whtre,0)==0)==(type==TWH))
                        {
@@ -908,7 +908,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                    }
                    case TARITH: /* (( expression )) */
                    {
-                       register char *trap;
+                       char *trap;
                        static char *arg[4]=  {"((", 0, "))"};
                        error_info.line = t->ar.arline-sh.st.firstline;
                        if(trap=sh.st.trap[SH_DEBUGTRAP])
@@ -945,10 +945,10 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                        t= (union anynode*)(t->sw.swlst);
                        while(t)
                        {
-                               register struct argnod  *rex=(struct argnod*)t->reg.regptr;
+                               struct argnod   *rex=(struct argnod*)t->reg.regptr;
                                while(rex)
                                {
-                                       register char *s;
+                                       char *s;
                                        if(rex->argflag&ARG_MAC)
                                        {
                                                s = sh_mactrim(rex->argval,1);
@@ -1037,11 +1037,11 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                    }
                    case TFUN:
                    {
-                       register Namval_t *np;
-                       register struct slnod *slp;
-                       register char *fname = ((struct functnod*)t)->functnam;
-                       register char *cp;
-                       register Namval_t *npv=0;
+                       Namval_t *np;
+                       struct slnod *slp;
+                       char *fname = ((struct functnod*)t)->functnam;
+                       char *cp;
+                       Namval_t *npv=0;
                        /* look for discipline functions */
                        error_info.line = t->funct.functline-sh.st.firstline;
                        if(cp = strrchr(fname,'.'))
@@ -1098,8 +1098,8 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                    /* new test compound command */
                    case TTST:
                    {
-                       register int n;
-                       register char *left;
+                       int n;
+                       char *left;
                        if(type&TTEST)
                                skipexitset++;
                        error_info.line = t->tst.tstline-sh.st.firstline;
@@ -1110,9 +1110,9 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
                        }
                        else
                        {
-                               register int traceon=0;
-                               register char *right;
-                               register char *trap;
+                               int traceon=0;
+                               char *right;
+                               char *trap;
                                n = type>>TSHIFT;
                                left = word_trim(&(t->lst.lstlef->arg),0);
                                if(type&TBINARY)
@@ -1220,8 +1220,8 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT
  * returns 1 if r == trim(s) otherwise 0
  */
 
-static trim_eq __PARAM__((register const char *r,register const char *s), (r, s)) __OTORP__(register const char *r;register const char *s;){
-       register char c;
+static trim_eq __PARAM__((const char *r,const char *s), (r, s)) __OTORP__(const char *r;const char *s;){
+       char c;
        while(c = *s++)
        {
                if(c=='\\')
@@ -1236,9 +1236,9 @@ static trim_eq __PARAM__((register const char *r,register const char *s), (r, s)
  * print out the command line if set -x is on
  */
 
-int sh_trace __PARAM__((register char *argv[], register int nl), (argv, nl)) __OTORP__(register char *argv[]; register int nl;){
-       register char *cp;
-       register int bracket = 0;
+int sh_trace __PARAM__((char *argv[], int nl), (argv, nl)) __OTORP__(char *argv[]; int nl;){
+       char *cp;
+       int bracket = 0;
        if(sh_isoption(SH_XTRACE))
        {
                /* make this trace atomic */
@@ -1279,8 +1279,8 @@ int sh_trace __PARAM__((register char *argv[], register int nl), (argv, nl)) __O
 }
 
 
-static char *word_trim __PARAM__((register struct argnod *arg, int flag), (arg, flag)) __OTORP__(register struct argnod *arg; int flag;){
-       register char *sp = arg->argval;
+static char *word_trim __PARAM__((struct argnod *arg, int flag), (arg, flag)) __OTORP__(struct argnod *arg; int flag;){
+       char *sp = arg->argval;
        if((arg->argflag&ARG_RAW))
                return(sp);
        return(sh_mactrim(sp,flag));
@@ -1309,8 +1309,8 @@ static void timed_out __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handle
 /*
  * called by parent and child after fork by sh_fork()
  */
-pid_t _sh_fork __PARAM__((register pid_t parent,int flags,int *jobid), (parent, flags, jobid)) __OTORP__(register pid_t parent;int flags;int *jobid;){
-       register struct checkpt *pp = (struct checkpt*)sh.jmplist;
+pid_t _sh_fork __PARAM__((pid_t parent,int flags,int *jobid), (parent, flags, jobid)) __OTORP__(pid_t parent;int flags;int *jobid;){
+       struct checkpt *pp = (struct checkpt*)sh.jmplist;
        static long forkcnt = 1000L;
        pid_t   curpgid = job.curpgid;
        pid_t   postid = (flags&FAMP)?0:curpgid;
@@ -1407,7 +1407,7 @@ pid_t _sh_fork __PARAM__((register pid_t parent,int flags,int *jobid), (parent,
 }
 
 pid_t sh_fork __PARAM__((int flags, int *jobid), (flags, jobid)) __OTORP__(int flags; int *jobid;){
-       register pid_t parent;
+       pid_t parent;
 #ifdef SHOPT_FASTPIPE
        if(sffileno(sfstdin)<0)
        {
@@ -1430,8 +1430,8 @@ pid_t sh_fork __PARAM__((int flags, int *jobid), (flags, jobid)) __OTORP__(int f
  * The environment modification list <envlist> is ignored for posix functions
  */
 static void sh_funct __PARAM__((Namval_t *np,int argn, char *argv[],int execflg,struct argnod *envlist), (np, argn, argv, execflg, envlist)) __OTORP__(Namval_t *np;int argn; char *argv[];int execflg;struct argnod *envlist;){
-       register char   *trap;
-       register int    nsig;
+       char    *trap;
+       int     nsig;
        struct dolnod   *argsav=0,*saveargfor;
        struct sh_scoped savst;
        Shopt_t         savopt;
@@ -1526,9 +1526,9 @@ static void sh_funct __PARAM__((Namval_t *np,int argn, char *argv[],int execflg,
  */
 int sh_fun __PARAM__((Namval_t *np, Namval_t *nq), (np, nq)) __OTORP__(Namval_t *np; Namval_t *nq;){
        char *argv[2];
-       register Namarr_t *ap;
-       register int offset;
-       register char *base;
+       Namarr_t *ap;
+       int offset;
+       char *base;
        Fcin_t save;
        fcsave(&save);
        if((offset=staktell())>0)
@@ -1575,9 +1575,9 @@ int sh_fun __PARAM__((Namval_t *np, Namval_t *nq), (np, nq)) __OTORP__(Namval_t
 /*
  * print a time and a separator 
  */
-static void    p_time __PARAM__((Sfio_t *outfile,register clock_t t,int c), (outfile, t, c)) __OTORP__(Sfio_t *outfile;register clock_t t;int c;){
-       register int  min, sec, frac;
-       register int hr;
+static void    p_time __PARAM__((Sfio_t *outfile,clock_t t,int c), (outfile, t, c)) __OTORP__(Sfio_t *outfile;clock_t t;int c;){
+       int  min, sec, frac;
+       int hr;
        frac = t%sh.lim.clk_tck;
        frac = (frac*100)/sh.lim.clk_tck;
        t /= sh.lim.clk_tck;
@@ -1635,8 +1635,8 @@ static void coproc_init __PARAM__((int pipes[]), (pipes)) __OTORP__(int pipes[];
 /*
  * print out function definition
  */
-static void print_fun __PARAM__((register Namval_t* np), (np)) __OTORP__(register Namval_t* np;){
-       register char *format;
+static void print_fun __PARAM__((Namval_t* np), (np)) __OTORP__(Namval_t* np;){
+       char *format;
        if(!is_afunction(np) || !np->nvalue.ip)
                return;
        if(nv_isattr(np,NV_FPOSIX))
@@ -1653,7 +1653,7 @@ static void print_fun __PARAM__((register Namval_t* np), (np)) __OTORP__(registe
  */
 static int run_subshell __PARAM__((const union anynode *t,pid_t grp), (t, grp)) __OTORP__(const union anynode *t;pid_t grp;){
        static char prolog[] = "set; typeset -p; print .sh.dollar=$$";
-       register int i, fd, trace = sh_isoption(SH_XTRACE);
+       int i, fd, trace = sh_isoption(SH_XTRACE);
        pid_t pid;
        char *arglist[3], devfd[12], *cp;
        Sfio_t *sp = sftmp(0);
@@ -1717,7 +1717,7 @@ static pid_t sh_ntfork __PARAM__((const union anynode *t,char *argv[],int *jobid
 #   ifndef _lib_fork
        if(!argv)
        {
-               register union anynode *tchild = t->fork.forktre;
+               union anynode *tchild = t->fork.forktre;
                int optimize=0;
                otype = t->tre.tretyp;
                savetype = otype;
index 3d5443f8d7324712d47b9af9045bfac12a728df0..8e3c8abeb48aa4ecdcc61a5adbf6fcef3c47fdd7 100644 (file)
  */
 
 static int
-blokread __PARAM__((register Archive_t* ap, char* buf, int n), (ap, buf, n)) __OTORP__(register Archive_t* ap; char* buf; int n;){
-       register int            i;
-       register int            j;
+blokread __PARAM__((Archive_t* ap, char* buf, int n), (ap, buf, n)) __OTORP__(Archive_t* ap; char* buf; int n;){
+       int             i;
+       int             j;
        char                    c;
 
        static int              eof;
@@ -170,10 +170,10 @@ blokread __PARAM__((register Archive_t* ap, char* buf, int n), (ap, buf, n)) __O
 }
 
 static int
-blokwrite __PARAM__((register Archive_t* ap, char* buf, int n), (ap, buf, n)) __OTORP__(register Archive_t* ap; char* buf; int n;){
-       register char*  s;
-       register int    i;
-       register int    j;
+blokwrite __PARAM__((Archive_t* ap, char* buf, int n), (ap, buf, n)) __OTORP__(Archive_t* ap; char* buf; int n;){
+       char*   s;
+       int     i;
+       int     j;
        char            blk[9];
 
        if (ap->io.blok)
@@ -225,7 +225,7 @@ blokwrite __PARAM__((register Archive_t* ap, char* buf, int n), (ap, buf, n)) __
  */
 
 void
-binit __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
+binit __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
        unsigned long   n;
 
        if (ap->delta)
@@ -245,7 +245,7 @@ binit __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap
  */
 
 int
-bskip __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
+bskip __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
        long            c;
        int             skip = ap->io.skip;
 #ifdef MTIOCTOP
@@ -315,8 +315,8 @@ bskip __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap
  */
 
 static int
-bfill __PARAM__((register Archive_t* ap, int must), (ap, must)) __OTORP__(register Archive_t* ap; int must;){
-       register int    c;
+bfill __PARAM__((Archive_t* ap, int must), (ap, must)) __OTORP__(Archive_t* ap; int must;){
+       int     c;
 
        if (ap->io.eof) return(-1);
        if (ap->io.skip) ap->io.skip = bskip(ap);
@@ -343,10 +343,10 @@ bfill __PARAM__((register Archive_t* ap, int must), (ap, must)) __OTORP__(regist
  */
 
 int
-bread __PARAM__((register Archive_t* ap, __V_* ab, register long n, long m, int must), (ap, ab, n, m, must)) __OTORP__(register Archive_t* ap; __V_* ab; register long n; long m; int must;){
-       register char*  b = (char*)ab;
-       register int    c;
-       register char*  ob;
+bread __PARAM__((Archive_t* ap, __V_* ab, long n, long m, int must), (ap, ab, n, m, must)) __OTORP__(Archive_t* ap; __V_* ab; long n; long m; int must;){
+       char*   b = (char*)ab;
+       int     c;
+       char*   ob;
 
        if (ap->io.eof) return(-1);
        if (m <= 0) return(0);
@@ -465,8 +465,8 @@ bread __PARAM__((register Archive_t* ap, __V_* ab, register long n, long m, int
  */
 
 void
-bunread __PARAM__((register Archive_t* ap, __V_* ab, register int n), (ap, ab, n)) __OTORP__(register Archive_t* ap; __V_* ab; register int n;){
-       register char*  b = (char*)ab;
+bunread __PARAM__((Archive_t* ap, __V_* ab, int n), (ap, ab, n)) __OTORP__(Archive_t* ap; __V_* ab; int n;){
+       char*   b = (char*)ab;
 
        ap->io.eof = 0;
        ap->io.count -= n;
@@ -484,8 +484,8 @@ bunread __PARAM__((register Archive_t* ap, __V_* ab, register int n), (ap, ab, n
  */
 
 char*
-bget __PARAM__((register Archive_t* ap, register int n), (ap, n)) __OTORP__(register Archive_t* ap; register int n;){
-       register char*  s;
+bget __PARAM__((Archive_t* ap, int n), (ap, n)) __OTORP__(Archive_t* ap; int n;){
+       char*   s;
 
        ap->io.count += n;
        s = ap->io.next;
@@ -494,9 +494,9 @@ bget __PARAM__((register Archive_t* ap, register int n), (ap, n)) __OTORP__(regi
        {
                if (ap->io.last > ap->io.buffer + MAXUNREAD + state.buffersize)
                {
-                        register char*  b;
-                        register int    k;
-                        register int    m;
+                        char*  b;
+                        int    k;
+                        int    m;
 
                         k = ap->io.last - s;
                        m = roundof(k, IOALIGN) - k;
@@ -534,9 +534,9 @@ bget __PARAM__((register Archive_t* ap, register int n), (ap, n)) __OTORP__(regi
  */
 
 void
-backup __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
-       register long   n;
-       register long   m;
+backup __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
+       long    n;
+       long    m;
 #ifdef MTIOCTOP
        struct mtop     mt;
 #endif
@@ -593,7 +593,7 @@ backup __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* a
  */
 
 void
-bflushin __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
+bflushin __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
        ap->io.count += ap->io.last - ap->io.next;
        ap->io.next = ap->io.last = ap->io.buffer + MAXUNREAD;
        if (!ap->io.eof)
@@ -608,7 +608,7 @@ bflushin __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t*
  */
 
 off_t
-bseek __PARAM__((register Archive_t* ap, off_t pos, int op), (ap, pos, op)) __OTORP__(register Archive_t* ap; off_t pos; int op;){
+bseek __PARAM__((Archive_t* ap, off_t pos, int op), (ap, pos, op)) __OTORP__(Archive_t* ap; off_t pos; int op;){
        ap->io.next = ap->io.last = ap->io.buffer + MAXUNREAD;
        if ((pos = lseek(ap->io.fd, pos, op)) >= 0)
        {
@@ -624,9 +624,9 @@ bseek __PARAM__((register Archive_t* ap, off_t pos, int op), (ap, pos, op)) __OT
  */
 
 void
-bflushout __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
-       register int    n;
-       register int    c;
+bflushout __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
+       int     n;
+       int     c;
 
        if (n = ap->io.next - ap->io.buffer)
        {
@@ -649,9 +649,9 @@ bflushout __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t
  */
 
 void
-bwrite __PARAM__((register Archive_t* ap, __V_* ab, register int n), (ap, ab, n)) __OTORP__(register Archive_t* ap; __V_* ab; register int n;){
-       register char*  b = (char*)ab;
-       register int    c;
+bwrite __PARAM__((Archive_t* ap, __V_* ab, int n), (ap, ab, n)) __OTORP__(Archive_t* ap; __V_* ab; int n;){
+       char*   b = (char*)ab;
+       int     c;
 
        if (ap->sum > 0)
                ap->memsum = memsum(b, n, ap->memsum);
@@ -734,7 +734,7 @@ bwrite __PARAM__((register Archive_t* ap, __V_* ab, register int n), (ap, ab, n)
  */
 
 void
-bput __PARAM__((register Archive_t* ap, register int n), (ap, n)) __OTORP__(register Archive_t* ap; register int n;){
+bput __PARAM__((Archive_t* ap, int n), (ap, n)) __OTORP__(Archive_t* ap; int n;){
        ap->io.count += n;
        message((-7, "bput(%s,%d@%ld): %-.*s%s", ap->name, n, ap->io.count, n > 32 ? 32 : n, ap->io.next, n > 32 ? "..." : ""));
        if (ap->sum > 0)
@@ -766,7 +766,7 @@ static struct
  */
 
 static int
-devpath __PARAM__((register Ftw_t* ftw), (ftw)) __OTORP__(register Ftw_t* ftw;){
+devpath __PARAM__((Ftw_t* ftw), (ftw)) __OTORP__(Ftw_t* ftw;){
        if (ftw->info == FTW_F && ftw->statb.st_dev == dev.st->st_dev && ftw->statb.st_ino == dev.st->st_ino)
        {
                message((-1, "device name is %s", ftw->path));
@@ -802,9 +802,9 @@ interactive __PARAM__((void), ()){
  */
 
 void
-newio __PARAM__((register Archive_t* ap, int c, int n), (ap, c, n)) __OTORP__(register Archive_t* ap; int c; int n;){
-       register char*  s;
-       register char*  rw;
+newio __PARAM__((Archive_t* ap, int c, int n), (ap, c, n)) __OTORP__(Archive_t* ap; int c; int n;){
+       char*   s;
+       char*   rw;
        char*           file;
        char*           io;
        char*           t;
index ce452df3cb31cf630ff36d3e12be508a4dc97474..5b25b71ba8632fef80be30f10789e36bc806323e 100644 (file)
@@ -97,9 +97,9 @@
  */
 
 char*
-strlower __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
-       register int    c;
-       register char*  t;
+strlower __PARAM__((char* s), (s)) __OTORP__(char* s;){
+       int     c;
+       char*   t;
 
        for (t = s; c = *t; t++)
                if (isupper(c))
@@ -112,9 +112,9 @@ strlower __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
  */
 
 char*
-strupper __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
-       register int    c;
-       register char*  t;
+strupper __PARAM__((char* s), (s)) __OTORP__(char* s;){
+       int     c;
+       char*   t;
 
        for (t = s; c = *t; t++)
                if (islower(c))
@@ -127,7 +127,7 @@ strupper __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
  */
 
 long
-cpio_long __PARAM__((register unsigned short* s), (s)) __OTORP__(register unsigned short* s;){
+cpio_long __PARAM__((unsigned short* s), (s)) __OTORP__(unsigned short* s;){
        Integral_t      u;
 
        u.l = 1;
@@ -149,7 +149,7 @@ cpio_long __PARAM__((register unsigned short* s), (s)) __OTORP__(register unsign
  */
 
 void
-cpio_short __PARAM__((register unsigned short* s, long n), (s, n)) __OTORP__(register unsigned short* s; long n;){
+cpio_short __PARAM__((unsigned short* s, long n), (s, n)) __OTORP__(unsigned short* s; long n;){
        Integral_t      u;
 
        u.l = 1;
@@ -173,8 +173,8 @@ cpio_short __PARAM__((register unsigned short* s, long n), (s, n)) __OTORP__(reg
 
 int
 tar_checksum __PARAM__((void), ()){
-       register char*  p;
-       register int    n;
+       char*   p;
+       int     n;
 
        p = tar_header.chksum;
        while (p < &tar_header.chksum[sizeof(tar_header.chksum)]) *p++ = ' ';
@@ -189,9 +189,9 @@ tar_checksum __PARAM__((void), ()){
  */
 
 long
-asc_checksum __PARAM__((char* ab, int n, register unsigned long sum), (ab, n, sum)) __OTORP__(char* ab; int n; register unsigned long sum;){
-       register unsigned char* b = (unsigned char*)ab;
-       register unsigned char* e;
+asc_checksum __PARAM__((char* ab, int n, unsigned long sum), (ab, n, sum)) __OTORP__(char* ab; int n; unsigned long sum;){
+       unsigned char* b = (unsigned char*)ab;
+       unsigned char*  e;
 
        e = b + n;
        while (b < e) sum += *b++;
@@ -203,9 +203,9 @@ asc_checksum __PARAM__((char* ab, int n, register unsigned long sum), (ab, n, su
  */
 
 long
-getlabnum __PARAM__((register char* p, int byte, int width, int base), (p, byte, width, base)) __OTORP__(register char* p; int byte; int width; int base;){
-       register char*  e;
-       register int    c;
+getlabnum __PARAM__((char* p, int byte, int width, int base), (p, byte, width, base)) __OTORP__(char* p; int byte; int width; int base;){
+       char*   e;
+       int     c;
        long            n;
 
        p += byte - 1;
@@ -221,9 +221,9 @@ getlabnum __PARAM__((register char* p, int byte, int width, int base), (p, byte,
  */
 
 char*
-getlabstr __PARAM__((register char* p, int byte, int width, register char* s), (p, byte, width, s)) __OTORP__(register char* p; int byte; int width; register char* s;){
+getlabstr __PARAM__((char* p, int byte, int width, char* s), (p, byte, width, s)) __OTORP__(char* p; int byte; int width; char* s;){
 
-       register char*  e;
+       char*   e;
        char*           v;
 
        v = s;
@@ -245,9 +245,9 @@ getlabstr __PARAM__((register char* p, int byte, int width, register char* s), (
 #define OHASHLPART(h,c)                OHASHPART(31, h, c, 3, 2)
 
 unsigned long
-omemsum __PARAM__((const __V_* b, int n, register unsigned long c), (b, n, c)) __OTORP__(const __V_* b; int n; register unsigned long c;){
-       register unsigned char* p;
-       register unsigned char* e;
+omemsum __PARAM__((const __V_* b, int n, unsigned long c), (b, n, c)) __OTORP__(const __V_* b; int n; unsigned long c;){
+       unsigned char*  p;
+       unsigned char*  e;
 
        p = (unsigned char*)b;
        e = p + n;
index 652f5081bfa71c92e63ad9ec79652ba5f1826403..ad9ac81b5a49be2015b53cde1a9110a7fa3fe59b 100644 (file)
@@ -97,8 +97,8 @@
  */
 
 void
-copyin __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
-       register File_t*        f = &ap->file;
+copyin __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
+       File_t* f = &ap->file;
 
        deltabase(ap);
        while (getprologue(ap))
@@ -120,9 +120,9 @@ copyin __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* a
  */
 
 int
-copyout __PARAM__((register Ftw_t* ftw), (ftw)) __OTORP__(register Ftw_t* ftw;){
-       register Archive_t*     ap = state.out;
-       register File_t*        f = &ap->file;
+copyout __PARAM__((Ftw_t* ftw), (ftw)) __OTORP__(Ftw_t* ftw;){
+       Archive_t*      ap = state.out;
+       File_t* f = &ap->file;
 
        if (getfile(ap, f, ftw))
        {
@@ -142,10 +142,10 @@ copyout __PARAM__((register Ftw_t* ftw), (ftw)) __OTORP__(register Ftw_t* ftw;){
 
 static void
 recordout __PARAM__((Archive_t* ap, File_t* f, Sfio_t* fp), (ap, f, fp)) __OTORP__(Archive_t* ap; File_t* f; Sfio_t* fp;){
-       register int    c;
-       register char*  p;
-       register char*  recdat;
-       register char*  blkdat;
+       int     c;
+       char*   p;
+       char*   recdat;
+       char*   blkdat;
        char*           rec;
        char*           blk;
        int             span;
@@ -326,9 +326,9 @@ recordout __PARAM__((Archive_t* ap, File_t* f, Sfio_t* fp), (ap, f, fp)) __OTORP
  */
 
 void
-fileout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register int    n;
-       register long   c;
+fileout __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       int     n;
+       long    c;
        int             err;
        Buffer_t*       bp;
        Sfio_t*         rfp;
@@ -458,9 +458,9 @@ fileout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP
  */
 
 static void
-recordin __PARAM__((register Archive_t* ap, register File_t* f, int wfd), (ap, f, wfd)) __OTORP__(register Archive_t* ap; register File_t* f; int wfd;){
-       register long                   n;
-       register long                   size;
+recordin __PARAM__((Archive_t* ap, File_t* f, int wfd), (ap, f, wfd)) __OTORP__(Archive_t* ap; File_t* f; int wfd;){
+       long                    n;
+       long                    size;
        int                             c;
        int                             i;
        int                             j;
@@ -645,8 +645,8 @@ recordin __PARAM__((register Archive_t* ap, register File_t* f, int wfd), (ap, f
  */
 
 static void
-savesetin __PARAM__((register Archive_t* ap, register File_t* f, int wfd), (ap, f, wfd)) __OTORP__(register Archive_t* ap; register File_t* f; int wfd;){
-       register long           c;
+savesetin __PARAM__((Archive_t* ap, File_t* f, int wfd), (ap, f, wfd)) __OTORP__(Archive_t* ap; File_t* f; int wfd;){
+       long            c;
        int                     i;
        int                     j;
        int                     k;
@@ -736,10 +736,10 @@ savesetin __PARAM__((register Archive_t* ap, register File_t* f, int wfd), (ap,
  */
 
 void
-filein __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register long   c;
-       register int    n;
-       register char*  s;
+filein __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       long    c;
+       int     n;
+       char*   s;
        int             dfd;
        int             wfd;
        long            checksum;
@@ -845,7 +845,7 @@ filein __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP_
  */
 
 void
-fileskip __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
+fileskip __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
        switch (ap->format)
        {
        case ALAR:
@@ -871,11 +871,11 @@ fileskip __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTOR
 
 int
 copyinout __PARAM__((Ftw_t* ftw), (ftw)) __OTORP__(Ftw_t* ftw;){
-       register long           c;
-       register long           n;
-       register int            rfd;
-       register int            wfd;
-       register File_t*        f = &state.out->file;
+       long            c;
+       long            n;
+       int             rfd;
+       int             wfd;
+       File_t* f = &state.out->file;
 
        static char             path[PATH_MAX];
 
@@ -932,9 +932,9 @@ cmpftw __PARAM__((Ftw_t* ft1, Ftw_t* ft2), (ft1, ft2)) __OTORP__(Ftw_t* ft1; Ftw
 typedef int (*Ftw_cmp_t) __PROTO__((Ftw_t*, Ftw_t*));
 
 void
-copy __PARAM__((register Archive_t* ap, register int (*copyfile)(Ftw_t*)), (ap, copyfile)) __OTORP__(register Archive_t* ap; register int (*copyfile)();){
-       register char*  s;
-       register int    n;
+copy __PARAM__((Archive_t* ap, int (*copyfile)(Ftw_t*)), (ap, copyfile)) __OTORP__(Archive_t* ap; int (*copyfile)();){
+       char*   s;
+       int     n;
 
        if (ap)
        {
@@ -966,7 +966,7 @@ copy __PARAM__((register Archive_t* ap, register int (*copyfile)(Ftw_t*)), (ap,
  */
 
 void
-append __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
+append __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
        if (state.update) initdelta(ap);
        ap->format = IN_DEFAULT;
        copyin(ap);
index 0a0879854a6fa3c95bf8b6d6707fc2abbd98498d..5b2b8ad79332323cba0752581b5c89914231bb8d 100644 (file)
@@ -98,9 +98,9 @@
 
 static void
 getdeltaops __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
-       register char*  s;
-       register char*  e;
-       register int    n;
+       char*   s;
+       char*   e;
+       int     n;
        unsigned long   x;
        char            c;
 
@@ -160,8 +160,8 @@ getdeltaops __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t*
  */
 
 void
-getdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register char*  s;
+getdeltaheader __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       char*   s;
        char            c;
        int             n;
        unsigned long   sum;
@@ -218,7 +218,7 @@ getdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f))
  */
 
 void
-getdeltatrailer __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
+getdeltatrailer __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
        if (ap->delta && ap->delta->trailer)
        {
                f->st->st_size += ap->delta->trailer;
@@ -232,9 +232,9 @@ getdeltatrailer __PARAM__((register Archive_t* ap, register File_t* f), (ap, f))
  */
 
 void
-setdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register char*  s;
-       register int    n;
+setdeltaheader __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       char*   s;
+       int     n;
 
        if (f->delta.op && ap->delta)
        {
@@ -253,7 +253,7 @@ setdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f))
  */
 
 void
-putdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
+putdeltaheader __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
        int     n;
 
        if (f->delta.op && ap->delta && (n = ap->delta->hdr - ap->delta->hdrbuf))
@@ -278,9 +278,9 @@ putdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f))
  */
 
 void
-putdeltatrailer __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register char*  s;
-       register int    n;
+putdeltatrailer __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       char*   s;
+       int     n;
 
        if (f->delta.op && ap->delta)
        {
@@ -312,8 +312,8 @@ initdelta __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
  */
 
 void
-deltabase __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
-       register Archive_t*     bp;
+deltabase __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
+       Archive_t*      bp;
        struct stat             st;
 
        if (!ap->delta)
@@ -355,10 +355,10 @@ deltabase __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t
 
 void
 deltaverify __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
-       register int            wfd;
-       register Member_t*      d;
-       register long           c;
-       register long           n;
+       int             wfd;
+       Member_t*       d;
+       long            c;
+       long            n;
        Hash_position_t*        pos;
 
        if (!state.list && ap->delta && (pos = hashscan(ap->delta->tab, 0)))
@@ -410,9 +410,9 @@ deltaverify __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
  */
 
 static void
-deltaprefix __PARAM__((Archive_t* ip, Archive_t* op, register Member_t* d), (ip, op, d)) __OTORP__(Archive_t* ip; Archive_t* op; register Member_t* d;){
-       register char*          s;
-       register Member_t*      m;
+deltaprefix __PARAM__((Archive_t* ip, Archive_t* op, Member_t* d), (ip, op, d)) __OTORP__(Archive_t* ip; Archive_t* op; Member_t* d;){
+       char*           s;
+       Member_t*       m;
 
        d->mark = 1;
        if (s = strrchr(d->info->path, '/'))
@@ -438,8 +438,8 @@ deltaprefix __PARAM__((Archive_t* ip, Archive_t* op, register Member_t* d), (ip,
  */
 
 void
-deltaout __PARAM__((Archive_t* ip, Archive_t* op, register File_t* f), (ip, op, f)) __OTORP__(Archive_t* ip; Archive_t* op; register File_t* f;){
-       register Member_t*      d;
+deltaout __PARAM__((Archive_t* ip, Archive_t* op, File_t* f), (ip, op, f)) __OTORP__(Archive_t* ip; Archive_t* op; File_t* f;){
+       Member_t*       d;
        int                     dfd;
 
        if (d = op->delta && op->delta->tab && f->name ? (Member_t*)hashget(op->delta->tab, f->name) : (Member_t*)0)
@@ -489,7 +489,7 @@ deltaout __PARAM__((Archive_t* ip, Archive_t* op, register File_t* f), (ip, op,
        }
        if (!d || d->mtime != f->st->st_mtime)
        {
-               register char*  s;
+               char*   s;
 
                if (ip && ip->delta && ip->delta->tab && f->name && (s = strrchr(f->name, '/')))
                {
@@ -512,7 +512,7 @@ deltaout __PARAM__((Archive_t* ip, Archive_t* op, register File_t* f), (ip, op,
  */
 
 static void
-deltacopy __PARAM__((Archive_t* ip, Archive_t* op, register File_t* f), (ip, op, f)) __OTORP__(Archive_t* ip; Archive_t* op; register File_t* f;){
+deltacopy __PARAM__((Archive_t* ip, Archive_t* op, File_t* f), (ip, op, f)) __OTORP__(Archive_t* ip; Archive_t* op; File_t* f;){
        f->st->st_size = f->delta.base->size;
        if (f->delta.base->expand >= 0)
        {
@@ -537,9 +537,9 @@ deltacopy __PARAM__((Archive_t* ip, Archive_t* op, register File_t* f), (ip, op,
  */
 
 void
-deltadelete __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
-       register File_t*        f;
-       register Member_t*      d;
+deltadelete __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
+       File_t* f;
+       Member_t*       d;
        Hash_position_t*        pos;
 
        if (!state.ordered && ap->delta && ap->delta->tab)
@@ -572,9 +572,9 @@ deltadelete __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive
 
 void
 deltapass __PARAM__((Archive_t* ip, Archive_t* op), (ip, op)) __OTORP__(Archive_t* ip; Archive_t* op;){
-       register File_t*        f;
-       register long           c;
-       register long           n;
+       File_t* f;
+       long            c;
+       long            n;
        Member_t*               d;
        char*                   p;
        Hash_position_t*        pos;
@@ -764,7 +764,7 @@ typedef struct
 
 static int
 delread __PARAM__((__V_* buf, int n, long off, Vddisc_t* vd), (buf, n, off, vd)) __OTORP__(__V_* buf; int n; long off; Vddisc_t* vd;){
-       register Vdio_t*        dp = (Vdio_t*)vd;
+       Vdio_t* dp = (Vdio_t*)vd;
 
        if (off != dp->offset)
        {
@@ -800,7 +800,7 @@ delread __PARAM__((__V_* buf, int n, long off, Vddisc_t* vd), (buf, n, off, vd))
 
 static int
 delwrite __PARAM__((__V_* buf, int n, long off, Vddisc_t* vd), (buf, n, off, vd)) __OTORP__(__V_* buf; int n; long off; Vddisc_t* vd;){
-       register Vdio_t*        dp = (Vdio_t*)vd;
+       Vdio_t* dp = (Vdio_t*)vd;
        Buffer_t*               bp;
 
        if (dp->op & DELTA_BIO)
@@ -836,7 +836,7 @@ delwrite __PARAM__((__V_* buf, int n, long off, Vddisc_t* vd), (buf, n, off, vd)
 int
 paxdelta __PARAM__((Archive_t* ip, Archive_t* ap, File_t* f, int op, ...), (va_alist)) __OTORP__(va_dcl)
 { __OTORP__(Archive_t* ip; Archive_t* ap; File_t* f; int op; )
-       register Vdio_t*        dp;
+       Vdio_t* dp;
        va_list                 vp;
        long                    n;
        int                     bufferclash = 0;
index 1363812fec27d78791566fe5c9c7f5e92ab7f933..df4c0e5ff76ae3de119fcb0e249a0312e14ace2e 100644 (file)
  */
 
 char*
-fgetline __PARAM__((register FILE* fp, int op), (fp, op)) __OTORP__(register FILE* fp; int op;)
+fgetline __PARAM__((FILE* fp, int op), (fp, op)) __OTORP__(FILE* fp; int op;)
 #line 29
 {
-       register int    c;
-       register char*  s;
-       register char*  end;
+       int     c;
+       char*   s;
+       char*   end;
 
        static char*    buf;
        static int      siz;
index 03633ed650bf38f1b0711bc49ea1a857b11f885a..855f4fd57549ca8f3742416cf50bed98d0b6207f 100644 (file)
@@ -97,8 +97,8 @@
  */
 
 int
-filter __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register int    n;
+filter __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       int     n;
        int             rfd;
        int             wfd;
        Proc_t*         proc;
@@ -150,8 +150,8 @@ filter __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP_
  */
 
 int
-openin __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register int    n;
+openin __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       int     n;
        int             rfd;
 
        if (f->type != X_IFREG)
@@ -185,9 +185,9 @@ openin __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP_
  */
 
 static int
-missdir __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register char*  s;
-       register char*  t;
+missdir __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       char*   s;
+       char*   t;
        long            pp;
        struct stat*    st;
        struct stat*    sp;
@@ -257,8 +257,8 @@ missdir __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP
  */
 
 int
-openout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register int    fd;
+openout __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       int     fd;
        int             exists;
        struct stat     st;
 
@@ -514,8 +514,8 @@ openout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP
  */
 
 int
-getfile __PARAM__((register Archive_t* ap, register File_t* f, register Ftw_t* ftw), (ap, f, ftw)) __OTORP__(register Archive_t* ap; register File_t* f; register Ftw_t* ftw;){
-       register char*          name;
+getfile __PARAM__((Archive_t* ap, File_t* f, Ftw_t* ftw), (ap, f, ftw)) __OTORP__(Archive_t* ap; File_t* f; Ftw_t* ftw;){
+       char*           name;
 
        static struct stat      st;
        static char             pathbuffer[PATH_MAX];
@@ -599,8 +599,8 @@ getfile __PARAM__((register Archive_t* ap, register File_t* f, register Ftw_t* f
  */
 
 int
-validout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register char*  s;
+validout __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       char*   s;
 
        static char     linkbuffer[PATH_MAX];
        static char     idbuffer[ALAR_NAMESIZE + 1];
@@ -697,9 +697,9 @@ validout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTOR
  */
 
 int
-addlink __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register Link_t*        p;
-       register char*          s;
+addlink __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       Link_t* p;
+       char*           s;
        Fileid_t                id;
        unsigned short          us;
 
@@ -827,7 +827,7 @@ addlink __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP
  */
 
 void
-getidnames __PARAM__((register File_t* f), (f)) __OTORP__(register File_t* f;){
+getidnames __PARAM__((File_t* f), (f)) __OTORP__(File_t* f;){
        if (!f->uidname) f->uidname = fmtuid(f->st->st_uid);
        if (!f->gidname) f->gidname = fmtgid(f->st->st_gid);
 }
@@ -837,8 +837,8 @@ getidnames __PARAM__((register File_t* f), (f)) __OTORP__(register File_t* f;){
  */
 
 void
-setidnames __PARAM__((register File_t* f), (f)) __OTORP__(register File_t* f;){
-       register int    id;
+setidnames __PARAM__((File_t* f), (f)) __OTORP__(File_t* f;){
+       int     id;
 
        if (f->uidname)
        {
@@ -898,7 +898,7 @@ getarchive __PARAM__((int op), (op)) __OTORP__(int op;){
  */
 
 void
-initfile __PARAM__((register Archive_t* ap, register File_t* f, register char* name, int mode), (ap, f, name, mode)) __OTORP__(register Archive_t* ap; register File_t* f; register char* name; int mode;){
+initfile __PARAM__((Archive_t* ap, File_t* f, char* name, int mode), (ap, f, name, mode)) __OTORP__(Archive_t* ap; File_t* f; char* name; int mode;){
        static struct stat      st;
 
        memzero(f, sizeof(*f));
@@ -918,8 +918,8 @@ initfile __PARAM__((register Archive_t* ap, register File_t* f, register char* n
  */
 
 void
-setfile __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register Post_t*        p;
+setfile __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       Post_t* p;
        Post_t                  post;
 
        if (!ap->pass) switch (f->type)
@@ -967,8 +967,8 @@ settime __PARAM__((const char* name, time_t atime, time_t mtime), (name, atime,
  */
 
 int
-restore __PARAM__((register const char* name, char* ap, __V_* handle), (name, ap, handle)) __OTORP__(register const char* name; char* ap; __V_* handle;){
-       register Post_t*        p = (Post_t*)ap;
+restore __PARAM__((const char* name, char* ap, __V_* handle), (name, ap, handle)) __OTORP__(const char* name; char* ap; __V_* handle;){
+       Post_t* p = (Post_t*)ap;
        int                     m;
        struct stat             st;
 
@@ -1004,7 +1004,7 @@ restore __PARAM__((register const char* name, char* ap, __V_* handle), (name, ap
  */
 
 int
-prune __PARAM__((register Archive_t* ap, register File_t* f, register struct stat* st), (ap, f, st)) __OTORP__(register Archive_t* ap; register File_t* f; register struct stat* st;){
+prune __PARAM__((Archive_t* ap, File_t* f, struct stat* st), (ap, f, st)) __OTORP__(Archive_t* ap; File_t* f; struct stat* st;){
        if (st->st_mode == f->st->st_mode && (ap->delta && f->st->st_mtime == st->st_mtime || state.update && (unsigned long)f->st->st_mtime <= (unsigned long)st->st_mtime))
                return(1);
        return(0);
@@ -1017,10 +1017,10 @@ prune __PARAM__((register Archive_t* ap, register File_t* f, register struct sta
 
 ssize_t
 holewrite __PARAM__((int fd, __V_* buf, size_t siz), (fd, buf, siz)) __OTORP__(int fd; __V_* buf; size_t siz;){
-       register char*  t = (char*)buf;
-       register char*  e = t + siz;
-       register char*  b = 0;
-       register char*  s;
+       char*   t = (char*)buf;
+       char*   e = t + siz;
+       char*   b = 0;
+       char*   s;
        ssize_t         i;
        ssize_t         n = 0;
 
index 12217458c0e2821f37b6aceb0536342c5b31a91e..4ac96eab5f0d911b87438f6e936663325656a5dd 100644 (file)
@@ -123,7 +123,7 @@ delta_hi __PARAM__((long x), (x)) __OTORP__(long x;){
  */
 
 static int
-isalar __PARAM__((Archive_t* ap, register char* hdr), (ap, hdr)) __OTORP__(Archive_t* ap; register char* hdr;){
+isalar __PARAM__((Archive_t* ap, char* hdr), (ap, hdr)) __OTORP__(Archive_t* ap; char* hdr;){
        char            buf[4];
 
        if (!strneq(hdr, "VOL1", 4))
@@ -147,7 +147,7 @@ isalar __PARAM__((Archive_t* ap, register char* hdr), (ap, hdr)) __OTORP__(Archi
  */
 
 int
-getprologue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
+getprologue __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
        int     n;
        long    size;
 
@@ -297,7 +297,7 @@ getprologue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive
  */
 
 static void
-setinfo __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
+setinfo __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
        long    n;
 
        if (ap->delta)
@@ -318,8 +318,8 @@ setinfo __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP
  */
 
 static void
-putinfo __PARAM__((register Archive_t* ap, char* file, unsigned long mtime, unsigned long checksum), (ap, file, mtime, checksum)) __OTORP__(register Archive_t* ap; char* file; unsigned long mtime; unsigned long checksum;){
-       register File_t*        f = &ap->file;
+putinfo __PARAM__((Archive_t* ap, char* file, unsigned long mtime, unsigned long checksum), (ap, file, mtime, checksum)) __OTORP__(Archive_t* ap; char* file; unsigned long mtime; unsigned long checksum;){
+       File_t* f = &ap->file;
        Sfio_t*                 np = 0;
 
        if (!file)
@@ -350,7 +350,7 @@ putinfo __PARAM__((register Archive_t* ap, char* file, unsigned long mtime, unsi
  */
 
 void
-putprologue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
+putprologue __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
        if (ap->delta && ap->delta->version == DELTA_88)
                ap->checksum = ap->old.checksum;
        switch (ap->format)
@@ -413,10 +413,10 @@ putprologue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive
  */
 
 void
-getepilogue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
-       register char*  s;
-       register long   n;
-       register long   i;
+getepilogue __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
+       char*   s;
+       long    n;
+       long    i;
 
        if (ap->delta && ap->delta->epilogue < 0)
                error(3, "%s: corrupt archive: missing epilogue", ap->name);
@@ -491,9 +491,9 @@ getepilogue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive
  */
 
 void
-putepilogue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){
-       register long           n;
-       register unsigned long  boundary;
+putepilogue __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){
+       long            n;
+       unsigned long   boundary;
 
        static int              selected;
 
@@ -571,10 +571,10 @@ static char*      ops = opsbuf;           /* opsbuf output pointer        */
  */
 
 static void
-getxops __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register char*  p;
-       register char*  s;
-       register int    c;
+getxops __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       char*   p;
+       char*   s;
+       int     c;
        long            n;
 
        if (f->namesize > (n = strlen(f->name) + 1)) for (p = f->name + n; c = *p++;)
@@ -613,8 +613,8 @@ getxops __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP
  */
 
 static void
-setxops __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archive_t* ap; register File_t* f;){
-       register int    n;
+setxops __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       int     n;
 
        NoP(ap);
        if (n = ops - opsbuf)
@@ -630,8 +630,8 @@ setxops __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archiv
  */
 
 static void
-putxops __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archive_t* ap; register File_t* f;){
-       register int    n;
+putxops __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       int     n;
 
        n = ops - opsbuf;
        bwrite(ap, f->name, f->namesize -= n);
@@ -644,9 +644,9 @@ putxops __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archiv
  */
 
 static void
-addxopstr __PARAM__((Archive_t* ap, int op, register char* s), (ap, op, s)) __OTORP__(Archive_t* ap; int op; register char* s;){
-       register char*  p = ops;
-       register char*  e = opsbuf + sizeof(opsbuf) - 3;
+addxopstr __PARAM__((Archive_t* ap, int op, char* s), (ap, op, s)) __OTORP__(Archive_t* ap; int op; char* s;){
+       char*   p = ops;
+       char*   e = opsbuf + sizeof(opsbuf) - 3;
 
        NoP(ap);
        if (p < e)
@@ -681,7 +681,7 @@ addxopnum __PARAM__((Archive_t* ap, int op, long n), (ap, op, n)) __OTORP__(Arch
 
 static void
 getkeyname __PARAM__((Archive_t* ap, File_t* f, int index, char** nm), (ap, f, index, nm)) __OTORP__(Archive_t* ap; File_t* f; int index; char** nm;){
-       register Option_t*      op;
+       Option_t*       op;
 
        static int              uinit;
        static int              ginit;
@@ -725,7 +725,7 @@ getkeyname __PARAM__((Archive_t* ap, File_t* f, int index, char** nm), (ap, f, i
 
 static void
 getkeytime __PARAM__((Archive_t* ap, File_t* f, int index, time_t* tm), (ap, f, index, tm)) __OTORP__(Archive_t* ap; File_t* f; int index; time_t* tm;){
-       register Option_t*      op;
+       Option_t*       op;
 
        NoP(f);
        op = &options[index];
@@ -745,10 +745,10 @@ getkeytime __PARAM__((Archive_t* ap, File_t* f, int index, time_t* tm), (ap, f,
  */
 
 int
-getheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register char*  s;
-       register int    i;
-       register long   n;
+getheader __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       char*   s;
+       int     i;
+       long    n;
        char*           t;
        long            num;
        int             warned;
@@ -1587,9 +1587,9 @@ getheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTO
 
 static void
 putkey __PARAM__((Sfio_t* sp, Sfio_t* tp, const char* name, int op, const char* value), (sp, tp, name, op, value)) __OTORP__(Sfio_t* sp; Sfio_t* tp; const char* name; int op; const char* value;){
-       register const char*    s;
-       register int            c;
-       register int            n;
+       const char*     s;
+       int             c;
+       int             n;
 
        sfprintf(tp, " %s", name);
        if (op) sfputc(tp, op);
@@ -1651,9 +1651,9 @@ putkey __PARAM__((Sfio_t* sp, Sfio_t* tp, const char* name, int op, const char*
  */
 
 void
-putheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register char*  s;
-       register int    n;
+putheader __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       char*   s;
+       int     n;
        int             c;
 
        setdeltaheader(ap, f);
@@ -2059,8 +2059,8 @@ putheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTO
  */
 
 void
-gettrailer __PARAM__((register Archive_t* ap, File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; File_t* f;){
-       register long   n;
+gettrailer __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       long    n;
 
        NoP(f);
        if (ap->sum-- > 0)
@@ -2080,8 +2080,8 @@ gettrailer __PARAM__((register Archive_t* ap, File_t* f), (ap, f)) __OTORP__(reg
  */
 
 void
-puttrailer __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register int    n;
+puttrailer __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       int     n;
 
        putdeltatrailer(ap, f);
        switch (ap->format)
@@ -2112,9 +2112,9 @@ puttrailer __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OT
  */
 
 int
-getlabel __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register int    c;
-       register int    n;
+getlabel __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       int     c;
+       int     n;
 
        static char     last[5];
        static int      done;
@@ -2151,7 +2151,7 @@ getlabel __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTOR
  */
 
 void
-putlabels __PARAM__((register Archive_t* ap, register File_t* f, char* type), (ap, f, type)) __OTORP__(register Archive_t* ap; register File_t* f; char* type;){
+putlabels __PARAM__((Archive_t* ap, File_t* f, char* type), (ap, f, type)) __OTORP__(Archive_t* ap; File_t* f; char* type;){
        struct tm*      tm;
 
        static int      section = 1;
@@ -2192,9 +2192,9 @@ putlabels __PARAM__((register Archive_t* ap, register File_t* f, char* type), (a
  */
 
 int
-getsaveset __PARAM__((register Archive_t* ap, register File_t* f, int header), (ap, f, header)) __OTORP__(register Archive_t* ap; register File_t* f; int header;){
-       register char*  p;
-       register char*  s;
+getsaveset __PARAM__((Archive_t* ap, File_t* f, int header), (ap, f, header)) __OTORP__(Archive_t* ap; File_t* f; int header;){
+       char*   p;
+       char*   s;
        char*           t;
        int             i;
        long            n;
index 78101914e9cc188a6b1add355d3d07f9b0fbe9a5..ac06fc143c87fd17ecc812a5ba86a5c8787cb36a 100644 (file)
  */
 
 int
-getformat __PARAM__((register char* name), (name)) __OTORP__(register char* name;){
-       register int    i;
+getformat __PARAM__((char* name), (name)) __OTORP__(char* name;){
+       int     i;
 
        strlower(name);
        for (i = 0; format[i].name; i++)
@@ -115,9 +115,9 @@ getformat __PARAM__((register char* name), (name)) __OTORP__(register char* name
  */
 
 static int
-pathcmp __PARAM__((register const char* s, register const char* t), (s, t)) __OTORP__(register const char* s; register const char* t;){
-       register int    sc;
-       register int    tc;
+pathcmp __PARAM__((const char* s, const char* t), (s, t)) __OTORP__(const char* s; const char* t;){
+       int     sc;
+       int     tc;
 
        for (;;)
        {
@@ -150,9 +150,9 @@ ordered __PARAM__((Archive_t* ap, const char* prv, const char* cur), (ap, prv, c
  */
 
 int
-selectfile __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){
-       register Archive_t*     bp;
-       register Member_t*      d;
+selectfile __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       Archive_t*      bp;
+       Member_t*       d;
        int                     linked = 0;
 
        if (f->skip || f->namesize <= 1)
@@ -200,8 +200,8 @@ selectfile __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OT
                addlink(ap, f);
        if (state.ordered && ap->delta && ap->delta->format != COMPRESS && (bp = ap->delta->base))
        {
-               register int    n;
-               register int    m;
+               int     n;
+               int     m;
 
                for (;;)
                {
@@ -266,9 +266,9 @@ selectfile __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OT
  */
 
 int
-verify __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archive_t* ap; register File_t* f;){
-       register char*  prompt;
-       register char*  name;
+verify __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){
+       char*   prompt;
+       char*   name;
 
        NoP(ap);
        if (state.yesno) switch (state.operation)
@@ -313,8 +313,8 @@ verify __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archive
  */
 
 char*
-map __PARAM__((register char* name), (name)) __OTORP__(register char* name;){
-       register Map_t* mp;
+map __PARAM__((char* name), (name)) __OTORP__(char* name;){
+       Map_t*  mp;
        char*           to;
        char*           from;
 
@@ -347,12 +347,12 @@ typedef struct
  */
 
 static int
-listlookup __PARAM__((__V_* handle, register const char* name, const char* arg, int cc, char** ps, long* pn), (handle, name, arg, cc, ps, pn)) __OTORP__(__V_* handle; register const char* name; const char* arg; int cc; char** ps; long* pn;){
+listlookup __PARAM__((__V_* handle, const char* name, const char* arg, int cc, char** ps, long* pn), (handle, name, arg, cc, ps, pn)) __OTORP__(__V_* handle; const char* name; const char* arg; int cc; char** ps; long* pn;){
        List_handle_t*          gp = (List_handle_t*)handle;
-       register File_t*        f = gp->file;
-       register struct stat*   st = f->st;
-       register char*          s = 0;
-       register long           n = 0;
+       File_t* f = gp->file;
+       struct stat*    st = f->st;
+       char*           s = 0;
+       long            n = 0;
        Option_t*               op;
 
        static Sfio_t*          mp;
@@ -573,7 +573,7 @@ listprintf __PARAM__((Sfio_t* sp, Archive_t* ap, File_t* f, const char* format),
  */
 
 void
-listentry __PARAM__((register File_t* f), (f)) __OTORP__(register File_t* f;){
+listentry __PARAM__((File_t* f), (f)) __OTORP__(File_t* f;){
        if (!f->extended && !f->skip && (state.drop || state.list || state.verbose))
        {
                if (state.drop)
@@ -599,7 +599,7 @@ listentry __PARAM__((register File_t* f), (f)) __OTORP__(register File_t* f;){
 
 char**
 initmatch __PARAM__((char** p), (p)) __OTORP__(char** p;){
-       register char** a;
+       char**  a;
 
        a = p;
        while (*a)
@@ -612,9 +612,9 @@ initmatch __PARAM__((char** p), (p)) __OTORP__(char** p;){
  */
 
 int
-match __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
-       register char** p;
-       register char*  t;
+match __PARAM__((char* s), (s)) __OTORP__(char* s;){
+       char**  p;
+       char*   t;
        int             n;
 
        if (!(p = state.patterns)) return(state.matchsense);
@@ -646,7 +646,7 @@ match __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
  */
 
 int
-dirprefix __PARAM__((register char* p, register char* s), (p, s)) __OTORP__(register char* p; register char* s;){
+dirprefix __PARAM__((char* p, char* s), (p, s)) __OTORP__(char* p; char* s;){
        if (*p == '.' && !*(p + 1) && *s != '/' && (*s != '.' || *(s + 1) != '.' || *(s + 2) && *(s + 2) != '/'))
                return(1);
        if (*p == '/' && !*(p + 1))
@@ -663,8 +663,8 @@ dirprefix __PARAM__((register char* p, register char* s), (p, s)) __OTORP__(regi
 
 int
 portable __PARAM__((const char* s), (s)) __OTORP__(const char* s;){
-       register unsigned char* u = (unsigned char*)s;
-       register int            c;
+       unsigned char*  u = (unsigned char*)s;
+       int             c;
 
        while (c = *s++)
                if (c > 0177)
index 923c90f2c0e1dfe181617b003f0a899f33f677aa..0487e864aa9a8112e121cf606d2f2af9050a20f5 100644 (file)
@@ -117,10 +117,10 @@ static const char id[] = "\n@(#)nocom (AT&T Bell Laboratories) 08/11/94\0\n";
  */
 
 static void
-nocom __PARAM__((register Sfio_t* sp, char* file), (sp, file)) __OTORP__(register Sfio_t* sp; char* file;){
-       register int    c = 0;
-       register int    p;
-       register int    data = 0;
+nocom __PARAM__((Sfio_t* sp, char* file), (sp, file)) __OTORP__(Sfio_t* sp; char* file;){
+       int     c = 0;
+       int     p;
+       int     data = 0;
        int             sync = 0;
        unsigned long   line = 0;
        unsigned long   prev = 0;
@@ -403,9 +403,9 @@ nocom __PARAM__((register Sfio_t* sp, char* file), (sp, file)) __OTORP__(registe
 }
 
 main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-       register int            c;
-       register char*          s;
-       register Sfio_t*        sp;
+       int             c;
+       char*           s;
+       Sfio_t* sp;
 
        NoP(argc);
        error_info.id = "nocom";
index e25dd33956755d1ea4879fe9899c2568ba7829c1..6634643ad0b1bbaa3fd479f9f83441e7411ae44c 100644 (file)
@@ -777,9 +777,9 @@ interrupt __PARAM__((int sig), (sig)) __OTORP__(int sig;){
  */
 
 static void
-substitute __PARAM__((Map_t** lastmap, register char* s), (lastmap, s)) __OTORP__(Map_t** lastmap; register char* s;){
-       register Map_t* mp;
-       register int    n;
+substitute __PARAM__((Map_t** lastmap, char* s), (lastmap, s)) __OTORP__(Map_t** lastmap; char* s;){
+       Map_t*  mp;
+       int     n;
        char*           p;
 
        for (;;)
@@ -845,9 +845,9 @@ substitute __PARAM__((Map_t** lastmap, register char* s), (lastmap, s)) __OTORP_
 
 static void
 help __PARAM__((void), ()){
-       register char*          s;
-       register char*          e;
-       register Sfio_t*        sp;
+       char*           s;
+       char*           e;
+       Sfio_t* sp;
        int                     n;
 
        sp = sfstropen();
@@ -880,7 +880,7 @@ help __PARAM__((void), ()){
  */
 
 int
-setoption __PARAM__((__V_* a, const __V_* p, register int n, register const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; register int n; register const char* v;){
+setoption __PARAM__((__V_* a, const __V_* p, int n, const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; int n; const char* v;){
        int             c;
        char*           e;
        char*           s;
@@ -1358,7 +1358,7 @@ setoption __PARAM__((__V_* a, const __V_* p, register int n, register const char
 
 static void
 ignore __PARAM__((void), ()){
-       register Option_t*      op;
+       Option_t*       op;
        Hash_position_t*        pos;
        char*                   all;
        char*                   ext;
@@ -1383,9 +1383,9 @@ ignore __PARAM__((void), ()){
 
 int
 main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-       register int            i;
-       register char*          s;
-       register Archive_t*     ap;
+       int             i;
+       char*           s;
+       Archive_t*      ap;
        char*                   p;
        Hash_position_t*        pos;
        Option_t*               op;
@@ -1845,10 +1845,10 @@ main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char**
 
 void
 finish __PARAM__((int code), (code)) __OTORP__(int code;){
-       register Archive_t*     ap;
-       register char*          x1 = &state.tmp.buffer[0];
-       register char*          x2 = &state.tmp.buffer[state.buffersize / 2];
-       register unsigned long  n;
+       Archive_t*      ap;
+       char*           x1 = &state.tmp.buffer[0];
+       char*           x2 = &state.tmp.buffer[state.buffersize / 2];
+       unsigned long   n;
 
        while (state.proc)
        {
index c9892f74df7f420cf3aab94af2f097394ded84e3..35005abf838419faec4eb8ac7b0f65ba750f8f55 100644 (file)
@@ -123,9 +123,9 @@ do  case $info in
                cat > $tmp.c <<!
 main()
 {
-       register unsigned long  i;
-       register unsigned long  j;
-       register unsigned long  k = 0;
+       unsigned long   i;
+       unsigned long   j;
+       unsigned long   k = 0;
        for (i = 0; i < 5000; i++)
                for (j = 0; j < 50000; j++)
                        k += j;
index 47dfa7dad768e20ae2eb25922a668484c233dcda..a93064638b6880d8aa45914898edfc051f18ec13 100644 (file)
@@ -125,7 +125,7 @@ extern __MANGLE__ void              _exit __PROTO__((int));
 
 int
 atexit __PARAM__((void (*func)(void)), (func)) __OTORP__(void (*func)();){
-       register struct list*   p;
+       struct list*    p;
 
        if (!(p = newof(0, struct list, 1, 0))) return(-1);
        p->func = func;
@@ -136,7 +136,7 @@ atexit __PARAM__((void (*func)(void)), (func)) __OTORP__(void (*func)();){
 
 void
 _ast_atexit __PARAM__((void), ()){
-       register struct list*   p;
+       struct list*    p;
 
        while (p = funclist)
        {
index 0a862cdf9b1e4e6762b60b19ea13bc2101167b25..b7358d2d35524a43203914d30aefc98097153a94 100644 (file)
@@ -116,7 +116,7 @@ ast_getgroups __PARAM__((int len, gid_t* set), (len, set)) __OTORP__(int len; gi
 #undef NGROUPS_MAX
 #define NGROUPS_MAX    1
 #endif
-       register int    i;
+       int     i;
        int             big[NGROUPS_MAX];
 #else
 #undef NGROUPS_MAX
index 41de50e55259f15e675ffb396465057ce2842ccc..6d47d25cecad019939c0f091a8d4a2a51f21f1ac 100644 (file)
@@ -105,10 +105,10 @@ NoN(memccpy)
  */
 
 __V_*
-memccpy __PARAM__((__V_* as1, const __V_* as2, register int c, size_t n), (as1, as2, c, n)) __OTORP__(__V_* as1; const __V_* as2; register int c; size_t n;){
-       register char*          s1 = (char*)as1;
-       register const char*    s2 = (char*)as2;
-       register const char*    ep = s2 + n;
+memccpy __PARAM__((__V_* as1, const __V_* as2, int c, size_t n), (as1, as2, c, n)) __OTORP__(__V_* as1; const __V_* as2; int c; size_t n;){
+       char*           s1 = (char*)as1;
+       const char*     s2 = (char*)as2;
+       const char*     ep = s2 + n;
 
        while (s2 < ep)
                if ((*s1++ = *s2++) == c)
index fc1bbe180300322d8aaecce7c9f4031c5d12baaa..e0a580a19966c00dcaf20cb06b84ee0ae63583a1 100644 (file)
@@ -104,9 +104,9 @@ NoN(memchr)
  */
 
 __V_*
-memchr __PARAM__((const __V_* asp, register int c, size_t n), (asp, c, n)) __OTORP__(const __V_* asp; register int c; size_t n;){
-       register const char*    sp = (char*)asp;
-       register const char*    ep = sp + n;
+memchr __PARAM__((const __V_* asp, int c, size_t n), (asp, c, n)) __OTORP__(const __V_* asp; int c; size_t n;){
+       const char*     sp = (char*)asp;
+       const char*     ep = sp + n;
 
        while (sp < ep)
                if (*sp++ == c)
index 644b3840ad1bc4b5740da226476b552a26ed249d..ea15acfe9b3ee2a58bb124de83894d8442b0c932 100644 (file)
@@ -100,9 +100,9 @@ NoN(memcmp)
 
 int
 memcmp __PARAM__((const __V_* ab1, const __V_* ab2, size_t n), (ab1, ab2, n)) __OTORP__(const __V_* ab1; const __V_* ab2; size_t n;){
-       register const unsigned char*   b1 = (const unsigned char*)ab1;
-       register const unsigned char*   b2 = (const unsigned char*)ab2;
-       register const unsigned char*   e = b1 + n;
+       const unsigned char*    b1 = (const unsigned char*)ab1;
+       const unsigned char*    b2 = (const unsigned char*)ab2;
+       const unsigned char*    e = b1 + n;
 
        while (b1 < e)
                if (*b1++ != *b2++)
index 078afec79daf11f31293c9ac31d8c0e8b32cdcc6..44b015cfe95978c04d84964966fd38667f5f3981 100644 (file)
@@ -113,9 +113,9 @@ memcpy __PARAM__((__V_* s1, __V_* s2, size_t n), (s1, s2, n)) __OTORP__(__V_* s1
 #else
 
 __V_*
-memcpy __PARAM__((__V_* as1, const __V_* as2, register size_t n), (as1, as2, n)) __OTORP__(__V_* as1; const __V_* as2; register size_t n;){
-       register char*          s1 = (char*)as1;
-       register const char*    s2 = (const char*)as2;
+memcpy __PARAM__((__V_* as1, const __V_* as2, size_t n), (as1, as2, n)) __OTORP__(__V_* as1; const __V_* as2; size_t n;){
+       char*           s1 = (char*)as1;
+       const char*     s2 = (const char*)as2;
 
        while (n-- > 0)
                *s1++ = *s2++;
index bc5cf7a93ea269318c06112ab45101767fddf0db..9b55cce1e560f586ea4e8e6f0727a03841ac339b 100644 (file)
@@ -99,9 +99,9 @@ NoN(memmove)
 #else
 
 __V_*
-memmove __PARAM__((__V_* to, const __V_* from, register size_t n), (to, from, n)) __OTORP__(__V_* to; const __V_* from; register size_t n;){
-       register char*  out = (char*)to;
-       register char*  in = (char*)from;
+memmove __PARAM__((__V_* to, const __V_* from, size_t n), (to, from, n)) __OTORP__(__V_* to; const __V_* from; size_t n;){
+       char*   out = (char*)to;
+       char*   in = (char*)from;
 
        if (n <= 0)     /* works if size_t is signed or not */
                ;
index 6fd6e07e6f493d6c003fdc245c2946a0f64f9a88..459fd66116f21aca27a1f75c723e322063dbd443 100644 (file)
@@ -99,8 +99,8 @@ NoN(memset)
 #else
 
 __V_*
-memset __PARAM__((__V_* asp, register int c, register size_t n), (asp, c, n)) __OTORP__(__V_* asp; register int c; register size_t n;){
-       register char*  sp = (char*)asp;
+memset __PARAM__((__V_* asp, int c, size_t n), (asp, c, n)) __OTORP__(__V_* asp; int c; size_t n;){
+       char*   sp = (char*)asp;
 
        while (n-- > 0)
                *sp++ = c;
index 739e96466943038f4a43038f9008ea6d2587ec80..2b319307d58b177fe060124c7d47f7befbd1c2e7 100644 (file)
@@ -104,7 +104,7 @@ NoN(mkdir)
 
 int
 mkdir __PARAM__((const char* path, mode_t mode), (path, mode)) __OTORP__(const char* path; mode_t mode;){
-       register int    n;
+       int     n;
        char*           av[3];
 
        static char*    cmd[] = { "/bin/mkdir", "/usr/5bin/mkdir", 0 };
index 1243caadf3ac89a6c5c5f2735d884638bb2cd56c..41bd865e41051f45070be990a1dc3c42301343c7 100644 (file)
@@ -103,7 +103,7 @@ NoN(rmdir)
 
 int
 rmdir __PARAM__((const char* path), (path)) __OTORP__(const char* path;){
-       register int    n;
+       int     n;
        struct stat     st;
        char*           av[3];
 
index 16d14096088b5440f8896a435c741488e5f32cf9..ff6f1d5dae39dff48e69dcfd970d868aa81f822a 100644 (file)
@@ -104,10 +104,10 @@ typedef struct
 } Locale_t;
 
 char*
-_ast_setlocale __PARAM__((register int category, const char* locale), (category, locale)) __OTORP__(register int category; const char* locale;){
+_ast_setlocale __PARAM__((int category, const char* locale), (category, locale)) __OTORP__(int category; const char* locale;){
 #if _hdr_locale && _lib_setlocale
-       register Locale_t*      lc;
-       register char*          p;
+       Locale_t*       lc;
+       char*           p;
 
        static Locale_t         def[] =
        {
index c4d6f4239e192bf2214439f656b775251bfe8acd..0d364b2f95a4963b6c6c13258390110e284e02b4 100644 (file)
@@ -176,9 +176,9 @@ spawnveg __PARAM__((const char* cmd, char* const argv[], char* const envv[], pid
                execve(cmd, argv, envv);
                if (errno == ENOEXEC)
                {
-                       register char** o;
-                       register char** p;
-                       register char** v;
+                       char**  o;
+                       char**  p;
+                       char**  v;
 
                        for (p = o = (char**)argv; *p; p++);
                        if (v = newof(0, char*, p - o + 2, 0))
index a6e397c081851e0d71393ea295d84d80ce8ffe59..5cfa5ff7a2ae2f878748c5886da175a9121ba73c 100644 (file)
@@ -126,7 +126,7 @@ NoN(statvfs)
 #endif
 
 static void
-us2v __PARAM__((register struct statfs* ufs, register struct stat* st, register struct statvfs* vfs), (ufs, st, vfs)) __OTORP__(register struct statfs* ufs; register struct stat* st; register struct statvfs* vfs;){
+us2v __PARAM__((struct statfs* ufs, struct stat* st, struct statvfs* vfs), (ufs, st, vfs)) __OTORP__(struct statfs* ufs; struct stat* st; struct statvfs* vfs;){
        memset(vfs, 0, sizeof(*vfs));
        vfs->f_bsize = vfs->f_frsize = ufs->f_bsize;
        vfs->f_blocks = ufs->f_blocks;
@@ -171,7 +171,7 @@ statvfs __PARAM__((const char* path, struct statvfs* vfs), (path, vfs)) __OTORP_
 #else
 
 static void
-s2v __PARAM__((register struct stat* st, register struct statvfs* vfs), (st, vfs)) __OTORP__(register struct stat* st; register struct statvfs* vfs;){
+s2v __PARAM__((struct stat* st, struct statvfs* vfs), (st, vfs)) __OTORP__(struct stat* st; struct statvfs* vfs;){
        memset(vfs, 0, sizeof(*vfs));
        vfs->f_bsize = vfs->f_frsize =
 #if _mem_st_blksize_stat
index 5ab781294e31534151e642b97522186d3a91cb4d..07e1c739b7440289231446395323d478132d95c2 100644 (file)
@@ -114,7 +114,7 @@ strchr __PARAM__((const char* s, int c), (s, c)) __OTORP__(const char* s; int c;
 #else
 
 char*
-strchr __PARAM__((register const char* s, register int c), (s, c)) __OTORP__(register const char* s; register int c;){
+strchr __PARAM__((const char* s, int c), (s, c)) __OTORP__(const char* s; int c;){
        do if (*s == c) return((char*)s); while(*s++);
        return(0);
 }
index 3660193b4a9dee0b4c9bd0b5d73fe4ae35d59cf3..a735992e90176a815cd96fbf0cbe37cedd5b02d1 100644 (file)
@@ -114,8 +114,8 @@ strrchr __PARAM__((const char* s, int c), (s, c)) __OTORP__(const char* s; int c
 #else
 
 char*
-strrchr __PARAM__((register const char* s, register int c), (s, c)) __OTORP__(register const char* s; register int c;){
-       register const char*    r;
+strrchr __PARAM__((const char* s, int c), (s, c)) __OTORP__(const char* s; int c;){
+       const char*     r;
 
        r = 0;
        do if (*s == c) r = s; while(*s++);
index 5713bd2ea576e8bbd7dfa72e5095c04e6133dbe7..b451067ed6eda632077b9d0095a8f6a20ee301c2 100644 (file)
@@ -103,7 +103,7 @@ NoN(strtod)
 extern __MANGLE__ double       atof __PROTO__((const char*));
 
 double
-strtod __PARAM__((register const char* s, char** e), (s, e)) __OTORP__(register const char* s; char** e;){
+strtod __PARAM__((const char* s, char** e), (s, e)) __OTORP__(const char* s; char** e;){
        double  n;
 
        n = atof(s);
index 8240985af9dbe0090eb5b40d7e73365f26277062..f26df6c782ed408edf021c5541378bcc8d9e97b0 100644 (file)
@@ -106,9 +106,9 @@ NoN(strtol)
 #define MBASE  ('z' - 'a' + 1 + 10)
 
 long
-strtol __PARAM__((register const char* str, char** ptr, register int base), (str, ptr, base)) __OTORP__(register const char* str; char** ptr; register int base;){
-       register long val;
-       register int c;
+strtol __PARAM__((const char* str, char** ptr, int base), (str, ptr, base)) __OTORP__(const char* str; char** ptr; int base;){
+       long val;
+       int c;
        int xx, neg = 0;
 
        if (ptr)
index 853287f74fa8ccd0055e2ac4b0baceada63c0d79..a259a1ac5ce0ea2f2a3a3a757cb768ea57f2e91a 100644 (file)
@@ -112,8 +112,8 @@ static char buf[L_tmpnam];
 static char    seed[] = { 'a', 'a', 'a', 0 };
 
 char*
-tmpnam __PARAM__((register char* p), (p)) __OTORP__(register char* p;){
-       register char*  q;
+tmpnam __PARAM__((char* p), (p)) __OTORP__(char* p;){
+       char*   q;
 
        if (!p) p = buf;
        strcopy(strcopy(strcopy(p, P_tmpdir), seed), "XXXXXX");
index b4336688353c826f316b37687884e736913248be..649a6d8300c54c689ce46670e03f530fe47c2ebd 100644 (file)
@@ -157,9 +157,9 @@ struct zombie
 
 pid_t
 waitpid __PARAM__((pid_t pid, int* status, int flags), (pid, status, flags)) __OTORP__(pid_t pid; int* status; int flags;){
-       register struct zombie* zp;
-       register struct zombie* pp;
-       register int            p;
+       struct zombie*  zp;
+       struct zombie*  pp;
+       int             p;
        int                     s;
 #if !_lib_wait2 && !_lib_wait3
 #if !defined(SIGCLD)
index 7cade7c42c1f9e073dbdb2475397518eb4fcddfb..627383be0f2fa26307c5aed2a9e9e138a8be1ac3 100644 (file)
@@ -144,8 +144,8 @@ getdents __PARAM__((int fd, __V_* buf, size_t siz), (fd, buf, siz)) __OTORP__(in
 #else
 #if _lib_dirread
        {
-               register char*          sp;     /* system */
-               register struct dirent* up;     /* user */
+               char*           sp;     /* system */
+               struct dirent*  up;     /* user */
                char*                   u;
                int                     n;
                int                     m;
@@ -187,10 +187,10 @@ getdents __PARAM__((int fd, __V_* buf, size_t siz), (fd, buf, siz)) __OTORP__(in
 
 #define MAXREC roundof(sizeof(*up)-sizeof(up->d_name)+sizeof(sp->d_name)+1,8)
 
-               register struct direct* sp;     /* system */
-               register struct dirent* up;     /* user */
-               register char*          s;
-               register char*          u;
+               struct direct*  sp;     /* system */
+               struct dirent*  up;     /* user */
+               char*           s;
+               char*           u;
                int                     n;
                int                     m;
                char                    tmp[sizeof(sp->d_name) + 1];
index d9fa8655dd4b0debe6a81cbb6a81adefab49091f..37eff2bc3b97fe728c80ecb7a73be4732e873f1e 100644 (file)
@@ -103,9 +103,9 @@ static const char id_dir[] = "\n@(#)directory (AT&T Bell Laboratories) 04/01/93\
 static DIR*    freedirp;               /* always keep one dirp */
 
 DIR*
-opendir __PARAM__((register const char* path), (path)) __OTORP__(register const char* path;){
-       register DIR*   dirp = 0;
-       register int    fd;
+opendir __PARAM__((const char* path), (path)) __OTORP__(const char* path;){
+       DIR*    dirp = 0;
+       int     fd;
        struct stat     st;
 
        if ((fd = open(path, 0)) < 0) return(0);
@@ -138,7 +138,7 @@ opendir __PARAM__((register const char* path), (path)) __OTORP__(register const
 }
 
 void
-closedir __PARAM__((register DIR* dirp), (dirp)) __OTORP__(register DIR* dirp;){
+closedir __PARAM__((DIR* dirp), (dirp)) __OTORP__(DIR* dirp;){
        if (dirp)
        {
                close(dirp->dd_fd);
index ff2f932f227ca599ef27cca33c1563eb9990f8e6..359cc183482ef84a46f7ada57c597af6cdaf6d2e 100644 (file)
@@ -99,8 +99,8 @@ NoN(readdir)
 #else
 
 struct dirent*
-readdir __PARAM__((register DIR* dirp), (dirp)) __OTORP__(register DIR* dirp;){
-       register struct dirent* dp;
+readdir __PARAM__((DIR* dirp), (dirp)) __OTORP__(DIR* dirp;){
+       struct dirent*  dp;
 
        for (;;)
        {
index 187cea1a7e8a7261c8f3438f1e89f672489c2c36..8f3c55fb4de86f4fded8fd2ece5d393b77de7e47 100644 (file)
@@ -99,7 +99,7 @@ NoN(seekdir)
 #else
 
 void
-seekdir __PARAM__((register DIR* dirp, long loc), (dirp, loc)) __OTORP__(register DIR* dirp; long loc;){
+seekdir __PARAM__((DIR* dirp, long loc), (dirp, loc)) __OTORP__(DIR* dirp; long loc;){
        off_t   base;           /* file location of block */
        off_t   offset;         /* offset within block */
 
index 77d2bccba7e3abaffbf0b7454c33b0f5279f1964..78dcf35639dd7344cba8c618dbc8226fb2d08806 100644 (file)
@@ -134,12 +134,12 @@ typedef union
 #define initfield(f,s) ((f)->first = (f)->delimiter = *((f)->next = (s)))
 
 static char*
-getfield __PARAM__((register Field_t* f, int restore), (f, restore)) __OTORP__(register Field_t* f; int restore;){
-       register char*  s;
-       register int    n;
-       register int    c;
-       register int    lp;
-       register int    rp;
+getfield __PARAM__((Field_t* f, int restore), (f, restore)) __OTORP__(Field_t* f; int restore;){
+       char*   s;
+       int     n;
+       int     c;
+       int     lp;
+       int     rp;
        char*           b;
 
        if (!f->delimiter)
@@ -414,7 +414,7 @@ int aha = *f.next;
 
 int
 sfkeyprintf __PARAM__((Sfio_t* sp, __V_* handle, const char* format, Sf_key_lookup_t lookup, Sf_key_convert_t convert), (sp, handle, format, lookup, convert)) __OTORP__(Sfio_t* sp; __V_* handle; const char* format; Sf_key_lookup_t lookup; Sf_key_convert_t convert;){
-       register int    i;
+       int     i;
 
        for (i = 0; i < elementsof(state.tmp); i++)
                if (!state.tmp[i] && !(state.tmp[i] = sfstropen()))
index 1ff542e2a4677b48af13b4692d5678154e24588f..6e73263c7c6b1d346525c193d547e2d853c893a4 100644 (file)
@@ -118,9 +118,9 @@ extern __MANGLE__ int               printf __PROTO__((const char*, ...));
 
 main()
 {
-       register int    i;
-       register int    j;
-       register int    k;
+       int     i;
+       int     j;
+       int     k;
 
        int             align0;
        int             align1;
index 356d8b7876fd74b3a51698c90f338d8ed3299256..f9d49eff6ed5cc333e6230bbf17ef97b66efd392 100644 (file)
@@ -111,7 +111,7 @@ main()
 #if _lib_getgroups
        if (sizeof(gid_t) < sizeof(int))
        {
-               register int    n;
+               int     n;
                gid_t           groups[32 * sizeof(int) / sizeof(gid_t)];
 
                for (n = 0; n < sizeof(int) / sizeof(gid_t); n++)
index 1a8ed9bc1fb49b90e6cc9a5b4aac4971bcef4d85..b87620e7e8d022f379a2d0a2a40b03684bd82979 100644 (file)
@@ -132,9 +132,9 @@ static int  size[] = { 1, 2, 4, 8 };
 
 main()
 {
-       register int    t;
-       register int    s;
-       register int    m = 1;
+       int     t;
+       int     s;
+       int     m = 1;
 
        for (s = 0; s < elementsof(size); s++)
        {
index 3fa90eb869e07d6c1d2ffc7e167381f34acde758..3b8b149acf83aca1fde81ede0130521374e0ead0 100644 (file)
@@ -154,8 +154,8 @@ static char*                cmd[] = { "/bin/echo", 0 };
 
 main()
 {
-       register int    i;
-       register int    n;
+       int     i;
+       int     n;
 
        char            c;
        unsigned char   uc;
index 3d1d94aa501e01790244d2780a9e0bc9b6d66721..62dd3900aa606fc4e8ca72a7ba33ec6191293077 100644 (file)
@@ -117,9 +117,6 @@ static struct _m_ map[] =
 #ifdef SIGALRM
 "Alarm call",                  "ALRM",         SIGALRM,
 #endif
-#ifdef SIGAPOLLO
-"Apollo",                      "APOLLO",       SIGAPOLLO,
-#endif
 #ifdef SIGBUS
 "Bus error",                   "BUS",          SIGBUS,
 #endif
@@ -261,9 +258,9 @@ extern __MANGLE__ int               printf __PROTO__((const char*, ...));
 
 main()
 {
-       register int    i;
-       register int    j;
-       register int    k;
+       int     i;
+       int     j;
+       int     k;
 
        k = 0;
        for (i = 0; map[i].name; i++)
index 770df7a6361171e9b972ce30c4b21367764e6faf..787f62d0820cd540ce465c6da84f0b6f2c6f8895 100644 (file)
@@ -110,9 +110,9 @@ extern __MANGLE__ int               printf __PROTO__((const char*, ...));
 
 main()
 {
-       register int    i;
-       register int    j;
-       register int    k;
+       int     i;
+       int     j;
+       int     k;
 
        int             align0;
        int             align1;
index 00778253fe25ae07ed77054e0d290ee23666144a..230718617094242f3edf56798d2146c748960832 100644 (file)
@@ -103,7 +103,7 @@ main()
 #if _lib_getgroups
        if (sizeof(gid_t) < sizeof(int))
        {
-               register int    n;
+               int     n;
                gid_t           groups[32 * sizeof(int) / sizeof(gid_t)];
 
                for (n = 0; n < sizeof(int) / sizeof(gid_t); n++)
index fecbd96ef4b48a91c35268cfc79bf125c25c35d2..df24d74c2e34f4050da2a609fcb3814f07b4b328 100644 (file)
@@ -124,9 +124,9 @@ static int  size[] = { 1, 2, 4, 8 };
 
 main()
 {
-       register int    t;
-       register int    s;
-       register int    m = 1;
+       int     t;
+       int     s;
+       int     m = 1;
 
        for (s = 0; s < elementsof(size); s++)
        {
index afb20d6c79bc3e0ff7884adb79eb36ca77320c32..9794c4c0a90967999b8eb0c52f01b703eea8e0a7 100644 (file)
@@ -121,8 +121,8 @@ extern __MANGLE__ int               printf __PROTO__((const char*, ...));
 
 main()
 {
-       register int    i;
-       register int    n;
+       int     i;
+       int     n;
 
        char            c;
        unsigned char   uc;
index 2f7ea5ea311123842999e069eefc38d7a6f80a86..2906bfedca6373aa08716ef2d4576c9859f106c7 100644 (file)
@@ -112,9 +112,6 @@ static struct _m_ map[] =
 #ifdef SIGALRM
 "Alarm call",                  "ALRM",         SIGALRM,
 #endif
-#ifdef SIGAPOLLO
-"Apollo",                      "APOLLO",       SIGAPOLLO,
-#endif
 #ifdef SIGBUS
 "Bus error",                   "BUS",          SIGBUS,
 #endif
@@ -283,9 +280,9 @@ extern __MANGLE__ int               printf __PROTO__((const char*, ...));
 
 main()
 {
-       register int    i;
-       register int    j;
-       register int    k;
+       int     i;
+       int     j;
+       int     k;
        int             n;
 
        k = 0;
index 0253673fe7dc32be0ce1407fbb7460ce29c1446f..3f5e0ae8de5257ba6c4980a50b1b4a38fa30d6c3 100644 (file)
@@ -110,9 +110,9 @@ Hash_info_t         hash_info = { 0 };
 Hash_table_t*
 hashalloc __PARAM__((Hash_table_t* ref, ...), (va_alist)) __OTORP__(va_dcl)
 { __OTORP__(Hash_table_t* ref; )
-       register Hash_table_t*  tab;
-       register Hash_table_t*  ret = 0;
-       register int            internal;
+       Hash_table_t*   tab;
+       Hash_table_t*   ret = 0;
+       int             internal;
        int                     n;
        va_list                 ap;
        va_list                 va[4];
index 68635a91b99cf3d562cef67264938f62cdcb7b67..acece655c8b63d5fc45b447fd8d83af19f791a33 100644 (file)
@@ -97,7 +97,7 @@
  */
 
 static void
-dumpflags __PARAM__((register int flags), (flags)) __OTORP__(register int flags;){
+dumpflags __PARAM__((int flags), (flags)) __OTORP__(int flags;){
        if (flags & HASH_ALLOCATE) sfprintf(sfstderr, "allocate ");
        if (flags & HASH_BUCKET) sfprintf(sfstderr, "bucket ");
        if (flags & HASH_FIXED) sfprintf(sfstderr, "fixed ");
@@ -113,9 +113,9 @@ dumpflags __PARAM__((register int flags), (flags)) __OTORP__(register int flags;
  */
 
 static void
-dumpbucket __PARAM__((register Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(register Hash_table_t* tab; int flags;){
-       register Hash_bucket_t**        sp;
-       register Hash_bucket_t*         b;
+dumpbucket __PARAM__((Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(Hash_table_t* tab; int flags;){
+       Hash_bucket_t** sp;
+       Hash_bucket_t*          b;
        Hash_bucket_t**                 sx;
        int                             n;
        unsigned char*                  s;
@@ -163,7 +163,7 @@ dumpbucket __PARAM__((register Hash_table_t* tab, int flags), (tab, flags)) __OT
  */
 
 static void
-dumptable __PARAM__((register Hash_table_t* tab, register int flags), (tab, flags)) __OTORP__(register Hash_table_t* tab; register int flags;){
+dumptable __PARAM__((Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(Hash_table_t* tab; int flags;){
        Hash_table_t*   scope;
        int             level;
 
@@ -192,8 +192,8 @@ dumptable __PARAM__((register Hash_table_t* tab, register int flags), (tab, flag
  */
 
 static void
-dumproot __PARAM__((register Hash_root_t* root, register int flags), (root, flags)) __OTORP__(register Hash_root_t* root; register int flags;){
-       register Hash_table_t*  tab;
+dumproot __PARAM__((Hash_root_t* root, int flags), (root, flags)) __OTORP__(Hash_root_t* root; int flags;){
+       Hash_table_t*   tab;
 
        sfprintf(sfstderr, "    root\n");
        sfprintf(sfstderr, "        address:     0x%08lx\n", (unsigned long)root);
@@ -221,8 +221,8 @@ dumproot __PARAM__((register Hash_root_t* root, register int flags), (root, flag
  */
 
 void
-hashdump __PARAM__((register Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(register Hash_table_t* tab; int flags;){
-       register Hash_root_t*   root;
+hashdump __PARAM__((Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(Hash_table_t* tab; int flags;){
+       Hash_root_t*    root;
 
        sfprintf(sfstderr, "\nhash table information:\n\n");
        if (tab) dumproot(tab->root, flags);
index 9f5471de199dafd01988a5581616798990374e53..1df5d35f239be0f589ea441359462a055b312ca9 100644 (file)
  */
 
 Hash_table_t*
-hashfree __PARAM__((register Hash_table_t* tab), (tab)) __OTORP__(register Hash_table_t* tab;){
-       register Hash_bucket_t**        sp;
-       register Hash_bucket_t*         b;
-       register Hash_bucket_t*         p;
+hashfree __PARAM__((Hash_table_t* tab), (tab)) __OTORP__(Hash_table_t* tab;){
+       Hash_bucket_t** sp;
+       Hash_bucket_t*          b;
+       Hash_bucket_t*          p;
        Hash_bucket_t**                 sx;
        Hash_root_t*                    rp;
        Hash_table_t*                   tp;
index d4ae2a5aee811ddebb4a2bd202ce591ebda643ca..7a8cb718b8dfc3b25f6d6b73063ec77628027c2e 100644 (file)
@@ -162,11 +162,11 @@ typedef struct                            /* root local pointers          */
 #define HASH(r,n,h)    if (r->local->hash) h = r->namesize ? (*r->local->hash)(n, r->namesize) : (*r->local->hash)(n);\
                        else\
                        {\
-                               register const char*    _hash_s1 = n;\
+                               const char*     _hash_s1 = n;\
                                h = 0;\
                                if (r->namesize)\
                                {\
-                                       register const char*    _hash_s2 = _hash_s1 + r->namesize;\
+                                       const char*     _hash_s2 = _hash_s1 + r->namesize;\
                                        while (_hash_s1 < _hash_s2) HASHPART(h, *_hash_s1++);\
                                }\
                                else while (*_hash_s1) HASHPART(h, *_hash_s1++);\
index 11952d3348ba08d7d69650268062fec8fd79f986..96b6ad830fc406464fee77c9d12256f237dc24fe 100644 (file)
  */
 
 char*
-hashlook __PARAM__((register Hash_table_t* tab, const char* name, long flags, const char* value), (tab, name, flags, value)) __OTORP__(register Hash_table_t* tab; const char* name; long flags; const char* value;){
-       register Hash_bucket_t* b;
-       register unsigned int   n;
-       register Hash_last_t*   last;
+hashlook __PARAM__((Hash_table_t* tab, const char* name, long flags, const char* value), (tab, name, flags, value)) __OTORP__(Hash_table_t* tab; const char* name; long flags; const char* value;){
+       Hash_bucket_t*  b;
+       unsigned int    n;
+       Hash_last_t*    last;
        Hash_table_t*           top;
        Hash_bucket_t*          prev;
        unsigned int            i;
 
        if ((flags & (HASH_LOOKUP|HASH_INTERNAL)) == (HASH_LOOKUP|HASH_INTERNAL))
        {
-               register char*          s1;
-               register const char*    s2;
-               register int            c;
+               char*           s1;
+               const char*     s2;
+               int             c;
 
                if (flags & HASH_HASHED) n = *((unsigned int*)value);
                else
@@ -166,12 +166,12 @@ hashlook __PARAM__((register Hash_table_t* tab, const char* name, long flags, co
                                {
                                        if (!tab->root->local->compare)
                                        {
-                                               register char*          s1 = hashname(b);
-                                               register const char*    s2 = name;
+                                               char*           s1 = hashname(b);
+                                               const char*     s2 = name;
 
                                                if (tab->root->namesize)
                                                {
-                                                       register char*  s3 = s1 + tab->root->namesize;
+                                                       char*   s3 = s1 + tab->root->namesize;
 
                                                        while (*s1++ == *s2++)
                                                                if (s1 >= s3) goto found;
index 53b438f8a3b240106b11afb4a7833dc5ff237064..8c3a1d5081f6f922df3a0f80f371bd888f21a7c1 100644 (file)
  */
 
 Hash_position_t*
-hashscan __PARAM__((register Hash_table_t* tab, register int flags), (tab, flags)) __OTORP__(register Hash_table_t* tab; register int flags;){
-       register Hash_position_t*       pos;
+hashscan __PARAM__((Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(Hash_table_t* tab; int flags;){
+       Hash_position_t*        pos;
 
        static Hash_bucket_t            empty;
 
@@ -122,12 +122,12 @@ hashscan __PARAM__((register Hash_table_t* tab, register int flags), (tab, flags
                pos->flags = HASH_SCOPE;
                do
                {
-                       register Hash_bucket_t* b;
+                       Hash_bucket_t*  b;
 
                        if (tab->flags & HASH_SCANNING)
                        {
-                               register Hash_bucket_t**        sp = tab->table;
-                               register Hash_bucket_t**        sx = tab->table + tab->size;
+                               Hash_bucket_t** sp = tab->table;
+                               Hash_bucket_t** sx = tab->table + tab->size;
 
                                while (sp < sx)
                                        for (b = *sp++; b; b = b->next)
@@ -147,8 +147,8 @@ hashscan __PARAM__((register Hash_table_t* tab, register int flags), (tab, flags
  */
 
 Hash_bucket_t*
-hashnext __PARAM__((register Hash_position_t* pos), (pos)) __OTORP__(register Hash_position_t* pos;){
-       register Hash_bucket_t* b;
+hashnext __PARAM__((Hash_position_t* pos), (pos)) __OTORP__(Hash_position_t* pos;){
+       Hash_bucket_t*  b;
 
        if (!pos) return(hash_info.last = pos->tab->root->last.bucket = 0);
        b = pos->bucket;
@@ -173,7 +173,7 @@ hashnext __PARAM__((register Hash_position_t* pos), (pos)) __OTORP__(register Ha
                if (!(b->hash & HASH_DELETED) && (!(pos->tab->flags & HASH_VALUE) || b->value) && (!pos->flags || !(b->hash & (HASH_HIDDEN|HASH_HIDES)))) break;
                if (b->hash & HASH_HIDES)
                {
-                       register Hash_bucket_t* h = (Hash_bucket_t*)b->name;
+                       Hash_bucket_t*  h = (Hash_bucket_t*)b->name;
 
                        if (!(h->hash & HASH_HIDDEN))
                        {
@@ -191,7 +191,7 @@ hashnext __PARAM__((register Hash_position_t* pos), (pos)) __OTORP__(register Ha
  */
 
 void
-hashdone __PARAM__((register Hash_position_t* pos), (pos)) __OTORP__(register Hash_position_t* pos;){
+hashdone __PARAM__((Hash_position_t* pos), (pos)) __OTORP__(Hash_position_t* pos;){
        if (pos)
        {
                if (pos->tab->flags & HASH_SCANNING)
index 951cc6d0f4a1f680b45a2c2beaaa4cf31702f934..de1d48d60721e71c456f5bbd3abd3e5877234983 100644 (file)
  */
 
 void
-hashsize __PARAM__((register Hash_table_t* tab, int size), (tab, size)) __OTORP__(register Hash_table_t* tab; int size;){
-       register Hash_bucket_t**        old_s;
-       register Hash_bucket_t**        new_s;
-       register Hash_bucket_t*         old_b;
-       register Hash_bucket_t*         new_b;
+hashsize __PARAM__((Hash_table_t* tab, int size), (tab, size)) __OTORP__(Hash_table_t* tab; int size;){
+       Hash_bucket_t** old_s;
+       Hash_bucket_t** new_s;
+       Hash_bucket_t*          old_b;
+       Hash_bucket_t*          new_b;
        Hash_bucket_t**                 old_sx;
        unsigned int                    index;
        HASHregion                      region;
index aad0e51a6d837b2105ce0380c40c86455720530e..d6e2751a8c40e39e0d6d89be0a2d5f84c8a09c80 100644 (file)
@@ -98,8 +98,8 @@
 
 int
 hashwalk __PARAM__((Hash_table_t* tab, int flags, register(*walker)(const char*, char*, __V_*), __V_* handle), (tab, flags, walker, handle)) __OTORP__(Hash_table_t* tab; int flags; register(*walker)(); __V_* handle;){
-       register Hash_bucket_t* b;
-       register int            v;
+       Hash_bucket_t*  b;
+       int             v;
        Hash_position_t*        pos;
 
        if (!(pos = hashscan(tab, flags))) return(-1);
index cbac67f3b0ed393bc494c4a6ba23ac84978adba4..c2785eaa00291f4145aa761459b6151c8408c9ba 100644 (file)
@@ -98,9 +98,9 @@
 
 unsigned int
 memhash __PARAM__((const __V_* as, int n), (as, n)) __OTORP__(const __V_* as; int n;){
-       register const unsigned char*   s = (const unsigned char*)as;
-       register const unsigned char*   e = s + n;
-       register unsigned int           c = 0;
+       const unsigned char*    s = (const unsigned char*)as;
+       const unsigned char*    e = s + n;
+       unsigned int            c = 0;
 
        while (s < e) HASHPART(c, *s++);
        return(c);
index e674456cd0e6473431c2a296b1cee2683913f1fc..d964f20f495d47054ce50341f5fded5be1f73dd3 100644 (file)
  */
 
 unsigned long
-memsum __PARAM__((const __V_* ap, int n, register unsigned long c), (ap, n, c)) __OTORP__(const __V_* ap; int n; register unsigned long c;){
-       register const unsigned char*   p = (const unsigned char*)ap;
-       register const unsigned char*   e = p + n;
+memsum __PARAM__((const __V_* ap, int n, unsigned long c), (ap, n, c)) __OTORP__(const __V_* ap; int n; unsigned long c;){
+       const unsigned char*    p = (const unsigned char*)ap;
+       const unsigned char*    e = p + n;
 
        while (p < e) HASHPART(c, *p++);
 #if LONG_MAX > 2147483647
index fe65a10ffbdac2ec1952ff9626d9069ade9fc93d..1eb1ca03db632982148b8fd0831f093012ccb9be 100644 (file)
@@ -98,9 +98,9 @@
 
 unsigned int
 strhash __PARAM__((const char* as), (as)) __OTORP__(const char* as;){
-       register const unsigned char*   s = (const unsigned char*)as;
-       register unsigned int           i = 0;
-       register unsigned int           c;
+       const unsigned char*    s = (const unsigned char*)as;
+       unsigned int            i = 0;
+       unsigned int            c;
 
        while (c = *s++) HASHPART(i, c);
        return(i);
index 2652e54ae55227b865d43f27cd246338bd492d03..b76c1b1d362530c5d0c9962eb6bf21875439665d 100644 (file)
  */
 
 unsigned long
-strsum __PARAM__((const char* as, register unsigned long c), (as, c)) __OTORP__(const char* as; register unsigned long c;){
-       register const unsigned char*   s = (const unsigned char*)as;
-       register int                    n;
+strsum __PARAM__((const char* as, unsigned long c), (as, c)) __OTORP__(const char* as; unsigned long c;){
+       const unsigned char*    s = (const unsigned char*)as;
+       int                     n;
 
        while (n = *s++) HASHPART(c, n);
 #if LONG_MAX > 2147483647
index 9e63ba24d486f4ccd199e8c80c389566f28a4590..32197c92c5d7322388ac8bd37588f398a4e1257a 100644 (file)
 #undef calloc
 
 __V_*
-calloc __PARAM__((register size_t count, register size_t size), (count, size)) __OTORP__(register size_t count; register size_t size;)
+calloc __PARAM__((size_t count, size_t size), (count, size)) __OTORP__(size_t count; size_t size;)
 #line 15
 {
-       register __V_*  ptr;
+       __V_*   ptr;
 
        if (ptr = malloc(size *= count))
                memzero(ptr, size);
index 70d19d5c34e86e44a0734be01d80851e477c130f..4518a1f46c51e58ccd52916891871b041f793c24 100644 (file)
 #include <wait.h>
 
 int
-cmdclose __PARAM__((register int fd), (fd)) __OTORP__(register int fd;)
+cmdclose __PARAM__((int fd), (fd)) __OTORP__(int fd;)
 #line 17
 {
-       register struct cmdinfo*        cmd;
+       struct cmdinfo* cmd;
        int                             status = -1;
 
        for (cmd = cmds; cmd; cmd = cmd->next)
index 2efa28954df24dfe1ea769cd951c77b03de92b79..65ef2e506144add31188bfd16a6d97e84e441297 100644 (file)
 #include "cmdlib.h"
 
 int
-cmdkill __PARAM__((register int fd, int sig), (fd, sig)) __OTORP__(register int fd; int sig;)
+cmdkill __PARAM__((int fd, int sig), (fd, sig)) __OTORP__(int fd; int sig;)
 #line 13
 {
-       register struct cmdinfo*        cmd;
+       struct cmdinfo* cmd;
 
        for (cmd = cmds; cmd; cmd = cmd->next)
                if (cmd->fd == fd)
index bca3015d50b4fe210e48af7ad63dd39a4c93e5e3..6cd9006b76515823f5bed05a353fe5ad8d91471c 100644 (file)
@@ -150,7 +150,7 @@ static const Namval_t               options[] =
  */
 
 static int
-setopt __PARAM__((register __V_* a, register const __V_* p, register int n, const char* v), (a, p, n, v)) __OTORP__(register __V_* a; register const __V_* p; register int n; const char* v;)
+setopt __PARAM__((__V_* a, const __V_* p, int n, const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; int n; const char* v;)
 #line 66
 {
        NoP(v);
@@ -208,9 +208,9 @@ int
 cmdopen __PARAM__((const char* cmd, char** argv, char** envv, int* redv, const char* mode), (cmd, argv, envv, redv, mode)) __OTORP__(const char* cmd; char** argv; char** envv; int* redv; const char* mode;)
 #line 119
 {
-       register struct cmdinfo*        proc;
-       register int                    cmdfd = -1;
-       register char**                 p;
+       struct cmdinfo* proc;
+       int                     cmdfd = -1;
+       char**                  p;
        char**                          v;
        int*                            r;
        int                             flags = 0;
index 53b2c1c33c8344445db898511b0663c18d757c96..b388bc84d456adb1164e1e88b63b40b48217446b 100644 (file)
@@ -136,7 +136,7 @@ static const Namval_t               options[] =
  */
 
 static int
-setopt __PARAM__((__V_* a, const __V_* p, register int n, register const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; register int n; register const char* v;){
+setopt __PARAM__((__V_* a, const __V_* p, int n, const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; int n; const char* v;){
        NoP(a);
        if (p) switch (((Namval_t*)p)->value)
        {
@@ -192,8 +192,8 @@ setopt __PARAM__((__V_* a, const __V_* p, register int n, register const char* v
  */
 
 static void
-print __PARAM__((register Sfio_t* sp, register char* name, char* delim), (sp, name, delim)) __OTORP__(register Sfio_t* sp; register char* name; char* delim;){
-       register int    c;
+print __PARAM__((Sfio_t* sp, char* name, char* delim), (sp, name, delim)) __OTORP__(Sfio_t* sp; char* name; char* delim;){
+       int     c;
 
        while (c = *name++)
        {
@@ -217,7 +217,7 @@ print __PARAM__((register Sfio_t* sp, register char* name, char* delim), (sp, na
  */
 
 static void
-context __PARAM__((register Sfio_t* sp, register Error_context_t* cp), (sp, cp)) __OTORP__(register Sfio_t* sp; register Error_context_t* cp;){
+context __PARAM__((Sfio_t* sp, Error_context_t* cp), (sp, cp)) __OTORP__(Sfio_t* sp; Error_context_t* cp;){
        if (cp->context) context(sp, cp->context);
        if (!(cp->flags & ERROR_SILENT))
        {
@@ -243,7 +243,7 @@ error __PARAM__((int level, ...), (va_alist)) __OTORP__(va_dcl)
 
 void
 errorv __PARAM__((const char* lib, int level, va_list ap), (lib, level, ap)) __OTORP__(const char* lib; int level; va_list ap;){
-       register int    n;
+       int     n;
        int             fd;
        int             flags;
        char*           s;
index 6d7357dc6915493f61dc542ccbd26c703cc4876a..6be2feeb3ebd9448756a0e092e3dfeb78bcabb1d 100644 (file)
@@ -115,11 +115,11 @@ typedef struct
 
 __V_*
 findopen __PARAM__((const char* pattern), (pattern)) __OTORP__(const char* pattern;){
-       register Find_t*        fp;
-       register char*          p;
-       register char*          s;
-       register char*          b;
-       register int            i; 
+       Find_t* fp;
+       char*           p;
+       char*           s;
+       char*           b;
+       int             i;
        int                     brace = 0;
        int                     paren = 0;
 
@@ -216,7 +216,7 @@ findopen __PARAM__((const char* pattern), (pattern)) __OTORP__(const char* patte
 
 void
 findclose __PARAM__((__V_* handle), (handle)) __OTORP__(__V_* handle;){
-       register Find_t*        fp = (Find_t*)handle;
+       Find_t* fp = (Find_t*)handle;
 
        sfclose(fp->fp);
        free(fp);
@@ -229,12 +229,12 @@ findclose __PARAM__((__V_* handle), (handle)) __OTORP__(__V_* handle;){
 
 char*
 findnext __PARAM__((__V_* handle), (handle)) __OTORP__(__V_* handle;){
-       register Find_t*        fp = (Find_t*)handle;
-       register char*          p;
-       register char*          q;
-       register char*          s;
-       register char*          b;
-       register int            c;
+       Find_t* fp = (Find_t*)handle;
+       char*           p;
+       char*           q;
+       char*           s;
+       char*           b;
+       int             c;
        int                     n;
 
        for (c = fp->peek; c != EOF;)
index 87037e1679383e9ca7a68798b8401552ea93830a..7a81b7000553036bd877021c6461dc90d88b7a15 100644 (file)
@@ -94,9 +94,9 @@
 #include <fs3d.h>
 
 int
-fs3d __PARAM__((register int op), (op)) __OTORP__(register int op;){
-       register int    cur;
-       register char*  v;
+fs3d __PARAM__((int op), (op)) __OTORP__(int op;){
+       int     cur;
+       char*   v;
        char            val[sizeof(FS3D_off) + 8];
 
        static int      fsview;
index d4ff5cb9be4ab000c059df7dfe1d71a120410ed5..0de74d623ac3a9773229bb94661be10806d317e7 100644 (file)
 static Ftw_t   *Free;
 #define freeFtw(f)     ((f)->link = Free, Free = (f))
 
-static Ftw_t *newFtw __PARAM__((register char* name, register int namelen), (name, namelen)) __OTORP__(register char* name; register int namelen;){
-       register Ftw_t  *f;
-       register int    amount;
+static Ftw_t *newFtw __PARAM__((char* name, int namelen), (name, namelen)) __OTORP__(char* name; int namelen;){
+       Ftw_t   *f;
+       int     amount;
 
        if(Free && namelen < MINNAME)
                f = Free, Free = f->link;
@@ -144,9 +144,9 @@ static Ftw_t *newFtw __PARAM__((register char* name, register int namelen), (nam
        return f;
 }
 
-static int freeAll __PARAM__((register Ftw_t* f, register int rv), (f, rv)) __OTORP__(register Ftw_t* f; register int rv;){
-       register Ftw_t  *next;
-       register int    freeing;
+static int freeAll __PARAM__((Ftw_t* f, int rv), (f, rv)) __OTORP__(Ftw_t* f; int rv;){
+       Ftw_t   *next;
+       int     freeing;
 
        for(freeing = 0; freeing < 2; ++freeing)
        {
@@ -165,8 +165,8 @@ static int freeAll __PARAM__((register Ftw_t* f, register int rv), (f, rv)) __OT
 /*
        To compare directories by device/inode.
 */
-static int statcmp __PARAM__((register Ftw_t* f1, register Ftw_t* f2), (f1, f2)) __OTORP__(register Ftw_t* f1; register Ftw_t* f2;){
-       register int    d;
+static int statcmp __PARAM__((Ftw_t* f1, Ftw_t* f2), (f1, f2)) __OTORP__(Ftw_t* f1; Ftw_t* f2;){
+       int     d;
        if((d = f1->statb.st_ino - f2->statb.st_ino) != 0)
                return d;
        if((d = f1->statb.st_dev - f2->statb.st_dev) != 0)
@@ -182,9 +182,9 @@ static int statcmp __PARAM__((register Ftw_t* f1, register Ftw_t* f2), (f1, f2))
 #define RROTATE(r)     (t = r->left, r->left = t->right, t->right = r, r = t)
 #define LROTATE(r)     (t = r->right, r->right = t->left, t->left = r, r = t)
 
-static Ftw_t *search __PARAM__((register Ftw_t* e, register Ftw_t* root, int(*comparf)(Ftw_t*, Ftw_t*), int insert), (e, root, comparf, insert)) __OTORP__(register Ftw_t* e; register Ftw_t* root; int(*comparf)(); int insert;){
-       register int            cmp;
-       register Ftw_t          *t, *left, *right, *lroot, *rroot;
+static Ftw_t *search __PARAM__((Ftw_t* e, Ftw_t* root, int(*comparf)(Ftw_t*, Ftw_t*), int insert), (e, root, comparf, insert)) __OTORP__(Ftw_t* e; Ftw_t* root; int(*comparf)(); int insert;){
+       int             cmp;
+       Ftw_t           *t, *left, *right, *lroot, *rroot;
 
        left = right = lroot = rroot = 0;
        while(root)
@@ -247,8 +247,8 @@ static Ftw_t *search __PARAM__((register Ftw_t* e, register Ftw_t* root, int(*co
 /*
 **     Delete the root element from the tree
 */
-static Ftw_t *deleteroot __PARAM__((register Ftw_t* root), (root)) __OTORP__(register Ftw_t* root;){
-       register Ftw_t *t, *left, *right;
+static Ftw_t *deleteroot __PARAM__((Ftw_t* root), (root)) __OTORP__(Ftw_t* root;){
+       Ftw_t *t, *left, *right;
 
        left = root->left;
        right = root->right;
@@ -267,7 +267,7 @@ static Ftw_t *deleteroot __PARAM__((register Ftw_t* root), (root)) __OTORP__(reg
 /*
        Convert a binary search tree into a sorted todo (link) list
 */
-static void getlist __PARAM__((register Ftw_t** top, register Ftw_t** bot, register Ftw_t* root), (top, bot, root)) __OTORP__(register Ftw_t** top; register Ftw_t** bot; register Ftw_t* root;){
+static void getlist __PARAM__((Ftw_t** top, Ftw_t** bot, Ftw_t* root), (top, bot, root)) __OTORP__(Ftw_t** top; Ftw_t** bot; Ftw_t* root;){
        if(root->left)
                getlist(top,bot,root->left);
        if (*top) (*bot)->link = root, *bot = root;
@@ -279,8 +279,8 @@ static void getlist __PARAM__((register Ftw_t** top, register Ftw_t** bot, regis
 /*
        Set directory when curdir is lost in space
 */
-static int setdir __PARAM__((register char* home, register char* path), (home, path)) __OTORP__(register char* home; register char* path;){
-       register int    cdrv;
+static int setdir __PARAM__((char* home, char* path), (home, path)) __OTORP__(char* home; char* path;){
+       int     cdrv;
 
        if(path[0] == '/')
                cdrv = pathcd(path,NiL);
@@ -298,8 +298,8 @@ static int setdir __PARAM__((register char* home, register char* path), (home, p
 /*
        Set to parent dir
 */
-static int setpdir __PARAM__((register char* home, register char* path, register char* base), (home, path, base)) __OTORP__(register char* home; register char* path; register char* base;){
-       register int    cdrv, c;
+static int setpdir __PARAM__((char* home, char* path, char* base), (home, path, base)) __OTORP__(char* home; char* path; char* base;){
+       int     cdrv, c;
 
        if(base > path)
        {
@@ -315,9 +315,9 @@ static int setpdir __PARAM__((register char* home, register char* path, register
 /*
        Pop a set of directories
 */
-static int popdirs __PARAM__((register int n_dir, register Ftw_t* ftw), (n_dir, ftw)) __OTORP__(register int n_dir; register Ftw_t* ftw;){
+static int popdirs __PARAM__((int n_dir, Ftw_t* ftw), (n_dir, ftw)) __OTORP__(int n_dir; Ftw_t* ftw;){
        struct stat     sb;
-       register char   *s, *endbuf;
+       char    *s, *endbuf;
        char            buf[PATH_MAX];
 
        if(!ftw || ftw->level < 0)
@@ -340,11 +340,11 @@ static int popdirs __PARAM__((register int n_dir, register Ftw_t* ftw), (n_dir,
 /*
        Get top list of elt to process
 */
-static Ftw_t *toplist __PARAM__((register char** paths, int(*statf)(const char*, struct stat*),int(*comparf)(Ftw_t*, Ftw_t*), int metaphysical), (paths, statf, comparf, metaphysical)) __OTORP__(register char** paths; int(*statf)();int(*comparf)(); int metaphysical;){
-       register char           *path;
-       register Ftw_t          *f, *root;
+static Ftw_t *toplist __PARAM__((char** paths, int(*statf)(const char*, struct stat*),int(*comparf)(Ftw_t*, Ftw_t*), int metaphysical), (paths, statf, comparf, metaphysical)) __OTORP__(char** paths; int(*statf)();int(*comparf)(); int metaphysical;){
+       char            *path;
+       Ftw_t           *f, *root;
        Ftw_t                   *top, *bot;
-       register struct stat    *sb;
+       struct stat     *sb;
        struct stat             st;
 
        top = bot = root = 0;
@@ -389,9 +389,9 @@ static Ftw_t *toplist __PARAM__((register char** paths, int(*statf)(const char*,
        Note that free() is not used because we may need to chdir(home)
        if there isn't enough space to continue
 */
-static int resize __PARAM__((register char** home, register char** endbuf, register char** path, register char** base, int n_buf, int incre), (home, endbuf, path, base, n_buf, incre)) __OTORP__(register char** home; register char** endbuf; register char** path; register char** base; int n_buf; int incre;){
-       register char   *old, *newp;
-       register int            n_old;
+static int resize __PARAM__((char** home, char** endbuf, char** path, char** base, int n_buf, int incre), (home, endbuf, path, base, n_buf, incre)) __OTORP__(char** home; char** endbuf; char** path; char** base; int n_buf; int incre;){
+       char    *old, *newp;
+       int             n_old;
 
        /* add space for "/." used in testing FTW_DNX */
        n_old = n_buf;
@@ -418,7 +418,7 @@ static int resize __PARAM__((register char** home, register char** endbuf, regis
 */
 ftwalk __PARAM__((const char *cpath, int (*userf)(Ftw_t*), int flags, int (*comparf)(Ftw_t*, Ftw_t*)), (cpath, userf, flags, comparf)) __OTORP__(const char *cpath; int (*userf)(); int flags; int (*comparf)();){
        char            *path = (char*)cpath;
-       register int    cdrv;           /* chdir value */
+       int     cdrv;           /* chdir value */
        int             fnrv;           /* return value from user function */
        Ftw_t           topf,           /* the parent of top elt */
                        *todo, *top, *bot;
@@ -478,14 +478,14 @@ ftwalk __PARAM__((const char *cpath, int (*userf)(Ftw_t*), int flags, int (*comp
        dirfp = 0;
        while(todo)
        {
-               register int            i, nd;
-               register Ftw_t          *ftw, *f;
-               register struct stat    *sb;
-               register char           *name, *endbase;
+               int             i, nd;
+               Ftw_t           *ftw, *f;
+               struct stat     *sb;
+               char            *name, *endbase;
                Ftw_t                   *link, *root, *curdir, *diroot, *dotdot;
                struct dirent           *dir;
                char                    *base;
-               register int            level, n_base, nostat, cpname;
+               int             level, n_base, nostat, cpname;
 
                /* process the top object on the stack */
                ftw = todo;
index 0941d8735bac1a856d29812129b8b95c4215f942..b9b5fd1ce40232e294e501d8070a5a781bd0c366 100644 (file)
@@ -95,7 +95,7 @@
 
 int
 ftwflags __PARAM__((void), ()){
-       register char*  s;
+       char*   s;
        
        s = astconf("PATH_RESOLVE", NiL, NiL);
        if (streq(s, "physical"))
index 3d277c0711f6984907b23bd56cf0f4cdb112e026..fab40aba0f3471c6b300bbcb27b74e54b05c515a 100644 (file)
@@ -111,8 +111,8 @@ struct dirlist                              /* long path chdir(2) component */
  */
 
 static int
-popdir __PARAM__((register struct dirlist* d, register char* end), (d, end)) __OTORP__(register struct dirlist* d; register char* end;){
-       register struct dirlist*        dp;
+popdir __PARAM__((struct dirlist* d, char* end), (d, end)) __OTORP__(struct dirlist* d; char* end;){
+       struct dirlist* dp;
        int                             v;
 
        v = 0;
@@ -135,8 +135,8 @@ popdir __PARAM__((register struct dirlist* d, register char* end), (d, end)) __O
  */
 
 static struct dirlist*
-pushdir __PARAM__((register struct dirlist* d, char* dots, char* path, char* end), (d, dots, path, end)) __OTORP__(register struct dirlist* d; char* dots; char* path; char* end;){
-       register struct dirlist*        p;
+pushdir __PARAM__((struct dirlist* d, char* dots, char* path, char* end), (d, dots, path, end)) __OTORP__(struct dirlist* d; char* dots; char* path; char* end;){
+       struct dirlist* p;
 
        if (!(p = newof(0, struct dirlist, 1, 0)) || chdir(dots))
        {
@@ -162,9 +162,9 @@ pushdir __PARAM__((register struct dirlist* d, char* dots, char* path, char* end
 
 char*
 getcwd __PARAM__((char* buf, size_t len), (buf, len)) __OTORP__(char* buf; size_t len;){
-       register char*  d;
-       register char*  p;
-       register char*  s;
+       char*   d;
+       char*   p;
+       char*   s;
        DIR*            dirp = 0;
        int             n;
        int             x;
index 2b705e0598aab91a1cd78c6ed538888b3ba69f41..42f1d92ff07501ee99e87e7a8090e4efd5c4c285 100644 (file)
@@ -104,7 +104,7 @@ char*
 getpath __PARAM__((void), ())
 #line 13
 {
-       register char*  s;
+       char*   s;
 
        if (!(s = getenv("PATH")) || !*s) s = ":/bin:/usr/bin:/usr/ucb";
        return(s);
index bfb628fc1c780a34079bcb4a08c3676229eb1ac3..bc02c4c645bd53d0580b575a1ee1ce29ca889ad9 100644 (file)
@@ -118,9 +118,9 @@ char*
 getshell __PARAM__((void), ())
 #line 28
 {
-       register char*  s;
-       register char*  sh;
-       register int    i;
+       char*   s;
+       char*   sh;
+       int     i;
 
        if ((sh = getenv("SHELL")) && *sh == '/' && strmatch(sh, "*/(sh|*[!cC]sh)"))
        {
index 00e6dd70ca551e51c17023f26eebbf369c7a350b..17c3eacce03f2ce9f8f32e65ca8ebee47d0c5f52 100644 (file)
@@ -127,10 +127,10 @@ getsymlink __PARAM__((const char* name, char* buf, int siz), (name, buf, siz)) _
 #ifdef UNIV_MAX
        if (isspace(*buf))
        {
-               register char*  s;
-               register char*  t;
-               register char*  u;
-               register char*  v;
+               char*   s;
+               char*   t;
+               char*   u;
+               char*   v;
                int             match = 0;
                char            tmp[PATH_MAX];
 
index f04477b5f6dd80d1c7a973361e8e34b815407350..228a5b7b9f4aad511047ab72594a2642c6f4a78d 100644 (file)
@@ -112,16 +112,16 @@ getuniv __PARAM__((void), ())
        return(getuniverse(buf) < 0 ? 0 : buf);
 #else
 #ifndef UNIV_MAX
-       register char*  u;
-       register char*  p;
+       char*   u;
+       char*   p;
 
        if (!(u = getenv(univ_env)) || !*u)
        {
                u = _UNIV_DEFAULT;
                if (p = getenv("PATH"))
                {
-                       register int    r = 1;
-                       register char*  d = p;
+                       int     r = 1;
+                       char*   d = p;
                        int             offset = staktell();
 
                        for (;;)
@@ -180,7 +180,7 @@ getuniv __PARAM__((void), ())
        return(buf);
 #else
 #if defined(ATT_UNIV) || defined(U_GET)
-       register int    n;
+       int     n;
 
 #if defined(ATT_UNIV)
        if ((n = setuniverse(ATT_UNIV)) < 0) return(0);
index 46599db3361663fec266a825fe05b17b0a308f92..161531d782e9dd81b9a1dd09eb57ddfa53b343b8 100644 (file)
@@ -102,10 +102,10 @@ void
 hsort __PARAM__((char** argv, int n, int(*fn)(const char*, const char*)), (argv, n, fn)) __OTORP__(char** argv; int n; int(*fn)();)
 #line 15
 {
-       register int    i;
-       register int    j;
-       register int    m;
-       register char** ap;
+       int     i;
+       int     j;
+       int     m;
+       char**  ap;
        char*           s;
        int             k;
 
index 52e74d3fc41ab16bc14840041d44957c0509459d..3c02c4067abdb18bb91880b32472728c0f975f45 100644 (file)
@@ -151,9 +151,9 @@ _vmopen __PARAM__((void), ()){
 }
 
 static void
-vmclose __PARAM__((register Vmalloc_t* vp), (vp)) __OTORP__(register Vmalloc_t* vp;){
-       register Vmchunk_t*     cp;
-       register Vmchunk_t*     np;
+vmclose __PARAM__((Vmalloc_t* vp), (vp)) __OTORP__(Vmalloc_t* vp;){
+       Vmchunk_t*      cp;
+       Vmchunk_t*      np;
 
        if (vp)
        {
@@ -168,7 +168,7 @@ vmclose __PARAM__((register Vmalloc_t* vp), (vp)) __OTORP__(register Vmalloc_t*
 }
 
 static __V_*
-vmalloc __PARAM__((register Vmalloc_t* vp, size_t size), (vp, size)) __OTORP__(register Vmalloc_t* vp; size_t size;){
+vmalloc __PARAM__((Vmalloc_t* vp, size_t size), (vp, size)) __OTORP__(Vmalloc_t* vp; size_t size;){
        char*   p;
        size_t  n;
 
@@ -385,8 +385,8 @@ static Dict_t               info[] =
  */
 
 static char*
-getdata __PARAM__((register Magic_t* mp, register long off, register int siz), (mp, off, siz)) __OTORP__(register Magic_t* mp; register long off; register int siz;){
-       register long   n;
+getdata __PARAM__((Magic_t* mp, long off, int siz), (mp, off, siz)) __OTORP__(Magic_t* mp; long off; int siz;){
+       long    n;
 
        if (off + siz <= mp->fbsz) return(mp->fbuf + off);
        if (off < mp->xoff || off + siz > mp->xoff + mp->xbsz)
@@ -413,10 +413,10 @@ getdata __PARAM__((register Magic_t* mp, register long off, register int siz), (
 
 static long
 indirect __PARAM__((const char* cs, char** e, __V_* handle), (cs, e, handle)) __OTORP__(const char* cs; char** e; __V_* handle;){
-       register char*          s = (char*)cs;
-       register Magic_t*       mp = (Magic_t*)handle;
-       register long           n = 0;
-       register char*          p;
+       char*           s = (char*)cs;
+       Magic_t*        mp = (Magic_t*)handle;
+       long            n = 0;
+       char*           p;
 
        if (!s) liberror(lib, 2, "%s in indirect expression", *e);
        else
@@ -461,11 +461,11 @@ indirect __PARAM__((const char* cs, char** e, __V_* handle), (cs, e, handle)) __
  */
 
 static char*
-ckmagic __PARAM__((register Magic_t* mp, const char* file, char* buf, struct stat* st, unsigned long off), (mp, file, buf, st, off)) __OTORP__(register Magic_t* mp; const char* file; char* buf; struct stat* st; unsigned long off;){
-       register Entry_t*       ep;
-       register char*          p;
-       register char*          b;
-       register int            level = 0;
+ckmagic __PARAM__((Magic_t* mp, const char* file, char* buf, struct stat* st, unsigned long off), (mp, file, buf, st, off)) __OTORP__(Magic_t* mp; const char* file; char* buf; struct stat* st; unsigned long off;){
+       Entry_t*        ep;
+       char*           p;
+       char*           b;
+       int             level = 0;
        int                     call = -1;
        int                     c;
        char*                   t;
@@ -769,11 +769,11 @@ ckmagic __PARAM__((register Magic_t* mp, const char* file, char* buf, struct sta
  */
 
 static int
-ckenglish __PARAM__((register Magic_t* mp, int pun, int badpun), (mp, pun, badpun)) __OTORP__(register Magic_t* mp; int pun; int badpun;){
-       register char*  s;
-       register int    vowl = 0;
-       register int    freq = 0;
-       register int    rare = 0;
+ckenglish __PARAM__((Magic_t* mp, int pun, int badpun), (mp, pun, badpun)) __OTORP__(Magic_t* mp; int pun; int badpun;){
+       char*   s;
+       int     vowl = 0;
+       int     freq = 0;
+       int     rare = 0;
 
        if (5 * badpun > pun)
                return(0);
@@ -799,12 +799,12 @@ ckenglish __PARAM__((register Magic_t* mp, int pun, int badpun), (mp, pun, badpu
 #define F_eascii       (1<<2)
 
 static char*
-cklang __PARAM__((register Magic_t* mp, const char* file, char* buf, struct stat* st), (mp, file, buf, st)) __OTORP__(register Magic_t* mp; const char* file; char* buf; struct stat* st;){
-       register int            c;
-       register unsigned char* b;
-       register unsigned char* e;
-       register int            q;
-       register char*          s;
+cklang __PARAM__((Magic_t* mp, const char* file, char* buf, struct stat* st), (mp, file, buf, st)) __OTORP__(Magic_t* mp; const char* file; char* buf; struct stat* st;){
+       int             c;
+       unsigned char*  b;
+       unsigned char*  e;
+       int             q;
+       char*           s;
        char*                   t;
        char*                   base;
        char*                   suff;
@@ -1099,7 +1099,7 @@ cklang __PARAM__((register Magic_t* mp, const char* file, char* buf, struct stat
  */
 
 static char*
-type __PARAM__((register Magic_t* mp, const char* file, struct stat* st, char* buf, int size), (mp, file, st, buf, size)) __OTORP__(register Magic_t* mp; const char* file; struct stat* st; char* buf; int size;){
+type __PARAM__((Magic_t* mp, const char* file, struct stat* st, char* buf, int size), (mp, file, st, buf, size)) __OTORP__(Magic_t* mp; const char* file; struct stat* st; char* buf; int size;){
        char*   s;
 
        if (!S_ISREG(st->st_mode))
@@ -1160,10 +1160,10 @@ type __PARAM__((register Magic_t* mp, const char* file, struct stat* st, char* b
  */
 
 int
-magicload __PARAM__((register Magic_t* mp, const char* file, unsigned long flags), (mp, file, flags)) __OTORP__(register Magic_t* mp; const char* file; unsigned long flags;){
-       register Entry_t*       ep;
-       register Sfio_t*        fp;
-       register char*          p;
+magicload __PARAM__((Magic_t* mp, const char* file, unsigned long flags), (mp, file, flags)) __OTORP__(Magic_t* mp; const char* file; unsigned long flags;){
+       Entry_t*        ep;
+       Sfio_t* fp;
+       char*           p;
        int                     n;
        int                     lge;
        int                     lev;
@@ -1195,7 +1195,7 @@ magicload __PARAM__((register Magic_t* mp, const char* file, unsigned long flags
        first = ep = vmnewof(mp->region, 0, Entry_t, 1, 0);
        while (p = sfgetr(fp, '\n', 1))
        {
-               register char*  p2;
+               char*   p2;
                char*           next;
 
                error_info.line++;
@@ -1685,9 +1685,9 @@ magicload __PARAM__((register Magic_t* mp, const char* file, unsigned long flags
 
 Magic_t*
 magicopen __PARAM__((unsigned long flags), (flags)) __OTORP__(unsigned long flags;){
-       register Magic_t*       mp;
-       register int            n;
-       register Vmalloc_t*     vp;
+       Magic_t*        mp;
+       int             n;
+       Vmalloc_t*      vp;
 
        if (!(vp = vmopen(Vmdcheap, Vmbest, 0)))
                return(0);
@@ -1715,7 +1715,7 @@ magicopen __PARAM__((unsigned long flags), (flags)) __OTORP__(unsigned long flag
  */
 
 void
-magicclose __PARAM__((register Magic_t* mp), (mp)) __OTORP__(register Magic_t* mp;){
+magicclose __PARAM__((Magic_t* mp), (mp)) __OTORP__(Magic_t* mp;){
 #if USE_VMALLOC
        if (mp) vmclose(mp->region);
 #else
@@ -1735,7 +1735,7 @@ magicclose __PARAM__((register Magic_t* mp), (mp)) __OTORP__(register Magic_t* m
  */
 
 char*
-magictype __PARAM__((register Magic_t* mp, const char* file, struct stat* st), (mp, file, st)) __OTORP__(register Magic_t* mp; const char* file; struct stat* st;){
+magictype __PARAM__((Magic_t* mp, const char* file, struct stat* st), (mp, file, st)) __OTORP__(Magic_t* mp; const char* file; struct stat* st;){
        char*           s;
        struct stat     statb;
 
@@ -1761,9 +1761,9 @@ magictype __PARAM__((register Magic_t* mp, const char* file, struct stat* st), (
  */
 
 int
-magiclist __PARAM__((register Magic_t* mp, register Sfio_t* sp), (mp, sp)) __OTORP__(register Magic_t* mp; register Sfio_t* sp;){
-       register Entry_t*       ep = mp->magic;
-       register Entry_t*       rp = 0;
+magiclist __PARAM__((Magic_t* mp, Sfio_t* sp), (mp, sp)) __OTORP__(Magic_t* mp; Sfio_t* sp;){
+       Entry_t*        ep = mp->magic;
+       Entry_t*        rp = 0;
 
        sfprintf(sp, "cont\toffset\ttype\top\tmask\tvalue\tdesc\n");
        while (ep)
index 0220a2cd3e6768591453160f999215fc7c8e8bab..6ba54d46a978b24b276d05dfadb874e2473d8bdf 100644 (file)
@@ -375,10 +375,10 @@ int       Mt_certify;             /* automatically certify the arena */
 int    Mt_trace = -1;          /* print trace of mallocs and frees */
 
 /* Convert an int to a string */
-static itoa __PARAM__((register size_t i, register char* buf), (i, buf)) __OTORP__(register size_t i; register char* buf;)
+static itoa __PARAM__((size_t i, char* buf), (i, buf)) __OTORP__(size_t i; char* buf;)
 #line 281
 {
-       register int    k, c;
+       int     k, c;
 
        k = 0;
        do
@@ -396,10 +396,10 @@ static itoa __PARAM__((register size_t i, register char* buf), (i, buf)) __OTORP
 }
 
 /* Convert an int to a hex string */
-static xtoa __PARAM__((register size_t i, register char* buf), (i, buf)) __OTORP__(register size_t i; register char* buf;)
+static xtoa __PARAM__((size_t i, char* buf), (i, buf)) __OTORP__(size_t i; char* buf;)
 #line 301
 {
-       register int    k;
+       int     k;
 
        static char dig[] = "0123456789ABCDEF";
 
@@ -412,7 +412,7 @@ static xtoa __PARAM__((register size_t i, register char* buf), (i, buf)) __OTORP
 }
 
 /* internal function for warning on corruption */
-static int mt_corrupt __PARAM__((register VOID* addr, register size_t usize, register VOID* stamp), (addr, usize, stamp)) __OTORP__(register VOID* addr; register size_t usize; register VOID* stamp;)
+static int mt_corrupt __PARAM__((VOID* addr, size_t usize, VOID* stamp), (addr, usize, stamp)) __OTORP__(VOID* addr; size_t usize; VOID* stamp;)
 #line 316
 {
        char    buf[64], *mesg;
@@ -436,7 +436,7 @@ static int mt_corrupt __PARAM__((register VOID* addr, register size_t usize, reg
 }
 
 /* Print trace information */
-static mt_trace __PARAM__((register VOID* addr, register int type), (addr, type)) __OTORP__(register VOID* addr; register int type;)
+static mt_trace __PARAM__((VOID* addr, int type), (addr, type)) __OTORP__(VOID* addr; int type;)
 #line 339
 {
        char    *mesg, buf[64];
@@ -458,7 +458,7 @@ static mt_trace __PARAM__((register VOID* addr, register int type), (addr, type)
 }
 
 /* Print a warning */
-static mt_didfree __PARAM__((register VOID* addr, register int type), (addr, type)) __OTORP__(register VOID* addr; register int type;)
+static mt_didfree __PARAM__((VOID* addr, int type), (addr, type)) __OTORP__(VOID* addr; int type;)
 #line 360
 {
        char    *mesg, buf[64];
@@ -472,10 +472,10 @@ static mt_didfree __PARAM__((register VOID* addr, register int type), (addr, typ
 }
 
 /* Set trace info for a block */
-static mt_setinfo __PARAM__((register TREE* bp, register size_t usize, int type), (bp, usize, type)) __OTORP__(register TREE* bp; register size_t usize; int type;)
+static mt_setinfo __PARAM__((TREE* bp, size_t usize, int type), (bp, usize, type)) __OTORP__(TREE* bp; size_t usize; int type;)
 #line 373
 {
-       register uchar  *magic, *emagic;
+       uchar   *magic, *emagic;
 
        USIZE(bp) = usize;
        USTAMP(bp) = NIL(VOID*);
@@ -487,7 +487,7 @@ static mt_setinfo __PARAM__((register TREE* bp, register size_t usize, int type)
 }
 
 /* Set a stamp */
-mt_stamp __PARAM__((register VOID* addr, register VOID* stamp), (addr, stamp)) __OTORP__(register VOID* addr; register VOID* stamp;)
+mt_stamp __PARAM__((VOID* addr, VOID* stamp), (addr, stamp)) __OTORP__(VOID* addr; VOID* stamp;)
 #line 387
 {
        USTAMP(BLOCK(addr)) = stamp;
@@ -497,8 +497,8 @@ mt_stamp __PARAM__((register VOID* addr, register VOID* stamp), (addr, stamp)) _
 mt_certify __PARAM__((void), ())
 #line 393
 {
-       register TREE   *bp, *endb;
-       register uchar  *magic, *endm;
+       TREE    *bp, *endb;
+       uchar   *magic, *endm;
 
        if(!Mt_corrupt)
                Mt_corrupt = mt_corrupt;
@@ -522,8 +522,8 @@ mt_certify __PARAM__((void), ())
 mt_stat __PARAM__((int fd), (fd)) __OTORP__(int fd;)
 #line 417
 {
-       register TREE   *bp, *endb;
-       register size_t nbusy, sfree, sbusy, mbusy;
+       TREE    *bp, *endb;
+       size_t  nbusy, sfree, sbusy, mbusy;
        char            buf[64], *mesg;
 
        nbusy = sfree = sbusy = mbusy = 0;
@@ -566,11 +566,11 @@ mt_stat __PARAM__((int fd), (fd)) __OTORP__(int fd;)
 /*
 **     Get more core. Gaps in memory are noted as busy blocks.
 */
-static TREE *morecore __PARAM__((register size_t size), (size)) __OTORP__(register size_t size;)
+static TREE *morecore __PARAM__((size_t size), (size)) __OTORP__(size_t size;)
 #line 463
 {
-       register TREE   *tp, *bp;
-       register VOID   *addr;
+       TREE    *tp, *bp;
+       VOID    *addr;
 
        /* space for queue of delayed free blocks */
        if(!Qfree)
@@ -607,7 +607,7 @@ static TREE *morecore __PARAM__((register size_t size), (size)) __OTORP__(regist
 #ifndef SEGMENT
                if((((size_t)addr)%ALIGN) != 0)
                {       /* make sure alignment is correct */
-                       register size_t n = ALIGN - ((size_t)addr)%ALIGN;
+                       size_t n = ALIGN - ((size_t)addr)%ALIGN;
                        if((VOID*)GETCORE(n) == ERRCORE)
                        {
                                Bottom = bp;
@@ -663,11 +663,11 @@ static TREE *morecore __PARAM__((register size_t size), (size)) __OTORP__(regist
 **     the tree and return its address.
 **     This uses the top-down splay strategy.
 */
-static TREE *t_search __PARAM__((register int size), (size)) __OTORP__(register int size;)
+static TREE *t_search __PARAM__((int size), (size)) __OTORP__(int size;)
 #line 559
 {
-       register int            cmp;
-       register TREE   *t, *del, *left, *right, *lroot, *rroot;
+       int             cmp;
+       TREE    *t, *del, *left, *right, *lroot, *rroot;
 
        /* find the right one to delete */
        del = Root;
@@ -786,14 +786,14 @@ static TREE *t_search __PARAM__((register int size), (size)) __OTORP__(register
 /*
 **     malloc().
 */
-__V_* malloc __PARAM__((register size_t size), (size)) __OTORP__(register size_t size;)
+__V_* malloc __PARAM__((size_t size), (size)) __OTORP__(size_t size;)
 #line 681
 {
-       register TREE   *tp, *np, *fp;
-       register int            n, i;
+       TREE    *tp, *np, *fp;
+       int             n, i;
 #ifdef MTRACE
        /* save true size and make size large enough to hold our data */
-       register size_t mtsize = size;
+       size_t  mtsize = size;
        size = size <= (MINSIZE-MTSPACE) ? MINSIZE : size + MTSPACE;
        if(Mt_certify)
                mt_certify();
@@ -896,14 +896,14 @@ __V_* malloc __PARAM__((register size_t size), (size)) __OTORP__(register size_t
 /*
 **     realloc().
 */
-__V_* realloc __PARAM__((__V_* old, register size_t size), (old, size)) __OTORP__(__V_* old; register size_t size;)
+__V_* realloc __PARAM__((__V_* old, size_t size), (old, size)) __OTORP__(__V_* old; size_t size;)
 #line 790
 {
-       register TREE   *tp, *np;
-       register int    n, ts;
-       register VOID   *newp;
+       TREE    *tp, *np;
+       int     n, ts;
+       VOID    *newp;
 #ifdef MTRACE
-       register size_t mtsize = size;
+       size_t  mtsize = size;
        if(old)
        {
                size = size < (MINSIZE-MTSPACE) ? MINSIZE : size + MTSPACE;
@@ -989,10 +989,10 @@ __V_* realloc __PARAM__((__V_* old, register size_t size), (old, size)) __OTORP_
 void free __PARAM__((__V_* aold), (aold)) __OTORP__(__V_* aold;)
 #line 879
 {
-       register VOID*  old = (VOID*)aold;
-       register int    size;
-       register TREE   *tp, *np, *sp;
-       register VOID   *dequeue;
+       VOID*   old = (VOID*)aold;
+       int     size;
+       TREE    *tp, *np, *sp;
+       VOID    *dequeue;
 #ifdef MTRACE
        if(Lfree != old)
        {
index 899b7be57f4691dd6f19b5b44826321a137aaf75..f1f17a6390927fc928434a2e1863eec393d91b15 100644 (file)
@@ -165,9 +165,9 @@ optget __PARAM__((char** argv, const char* oopts), (argv, oopts)) __OTORP__(char
  */
 
 static int
-error __PARAM__((register char* p), (p)) __OTORP__(register char* p;){
-       register char*  s;
-       register char*  t;
+error __PARAM__((char* p), (p)) __OTORP__(char* p;){
+       char*   s;
+       char*   t;
        int             n;
 
        if (!opt_info.msg && !(opt_info.msg = newof(0, char, OPT_MSG, 0))) opt_info.arg = "[* out of space *]";
@@ -215,7 +215,7 @@ error __PARAM__((register char* p), (p)) __OTORP__(register char* p;){
 
 static void
 optadd __PARAM__((const char* opts), (opts)) __OTORP__(const char* opts;){
-       register int    n;
+       int     n;
 
        if ((!opt_info.nopt || opt_info.opts[opt_info.nopt - 1] != (char*)opts) && opt_info.nopt < elementsof(opt_info.opts) - 1)
        {
@@ -260,9 +260,9 @@ optadd __PARAM__((const char* opts), (opts)) __OTORP__(const char* opts;){
  */
 
 int
-optget __PARAM__((register char** argv, const char* oopts), (argv, oopts)) __OTORP__(register char** argv; const char* oopts;){
-       register int    c;
-       register char*  s;
+optget __PARAM__((char** argv, const char* oopts), (argv, oopts)) __OTORP__(char** argv; const char* oopts;){
+       int     c;
+       char*   s;
        char*           e;
        char*           opts;
        int             n;
@@ -435,9 +435,9 @@ optget __PARAM__((register char** argv, const char* oopts), (argv, oopts)) __OTO
 char*
 optusage __PARAM__((const char* oopts), (oopts)) __OTORP__(const char* oopts;){
        char*                   opts = (char*)oopts;
-       register Sfio_t*        sp;
-       register int            c;
-       register char*          p;
+       Sfio_t* sp;
+       int             c;
+       char*           p;
        char*                   t;
        char*                   x;
        char**                  o;
index 2fdc43a2c1fe95e41373d9120ce2f8521457cfe5..2543d575be3fae54af54de0b90b5b1e3dbf18336 100644 (file)
@@ -99,8 +99,8 @@ int
 optjoin __PARAM__((char** argv, ...), (va_alist)) __OTORP__(va_dcl)
 { __OTORP__(char** argv; )
        va_list                 ap;
-       register OPTFUN         fun;
-       register OPTFUN         rep;
+       OPTFUN          fun;
+       OPTFUN          rep;
        OPTFUN                  err;
        int                     more;
        int                     user;
index aea1dc4e35af7bc7618cc22f8d2cf1fb390ed9ad..b6bbbaf64b51fecf59b6bfe1ce81cf9d1259f99b 100644 (file)
 #include <ls.h>
 
 char*
-pathaccess __PARAM__((register char* path, register const char* dirs, const char* a, const char* b, register int mode), (path, dirs, a, b, mode)) __OTORP__(register char* path; register const char* dirs; const char* a; const char* b; register int mode;)
+pathaccess __PARAM__((char* path, const char* dirs, const char* a, const char* b, int mode), (path, dirs, a, b, mode)) __OTORP__(char* path; const char* dirs; const char* a; const char* b; int mode;)
 #line 18
 {
        int             sep = ':';
index ccad2cbd9bfee18c8228750d02b462798defe4ab..7e25080644d26ca0bc73edb55199c7fc7bdb2927 100644 (file)
@@ -111,11 +111,11 @@ char*
 pathcanon __PARAM__((char* path, int flags), (path, flags)) __OTORP__(char* path; int flags;)
 #line 33
 {
-       register char*  p;
-       register char*  r;
-       register char*  s;
-       register char*  t;
-       register int    dots;
+       char*   p;
+       char*   r;
+       char*   s;
+       char*   t;
+       int     dots;
        int             loop;
        int             oerrno;
 #if defined(FS_3D)
index 8e6a914f9d21836b8061ac25dc6e6002439dbf72..80ba4077b6c60e00ecf90906421ed3ce287c80d7 100644 (file)
 #include <ast.h>
 
 char*
-pathcat __PARAM__((char* path, register const char* dirs, int sep, const char* a, register const char* b), (path, dirs, sep, a, b)) __OTORP__(char* path; register const char* dirs; int sep; const char* a; register const char* b;)
+pathcat __PARAM__((char* path, const char* dirs, int sep, const char* a, const char* b), (path, dirs, sep, a, b)) __OTORP__(char* path; const char* dirs; int sep; const char* a; const char* b;)
 #line 13
 {
-       register char*  s;
+       char*   s;
 
        s = path;
        while (*dirs && *dirs != sep) *s++ = *dirs++;
index e8ff0b8c93fe0d1c3fccb51d5f96dcb0b40b84a6..c774a67d02cb1a11fee32d3aeb4007389ff91bda 100644 (file)
@@ -110,9 +110,9 @@ char*
 pathkey __PARAM__((char* key, char* attr, const char* lang, const char* apath), (key, attr, lang, apath)) __OTORP__(char* key; char* attr; const char* lang; const char* apath;)
 #line 24
 {
-       register char*          path = (char*)apath;
-       register char*          s;
-       register char*          k;
+       char*           path = (char*)apath;
+       char*           s;
+       char*           k;
        char*                   t;
        char*                   flags;
        char**                  p;
index 436c1a120f1e6afff168e2d036c4300b453dbcaf..aae52f1faee1f97b3e7f5fd8dd071eaa94225569 100644 (file)
 extern __MANGLE__ char**       environ;
 
 char*
-pathpath __PARAM__((register char* path, const char* p, const char* a, int mode), (path, p, a, mode)) __OTORP__(register char* path; const char* p; const char* a; int mode;)
+pathpath __PARAM__((char* path, const char* p, const char* a, int mode), (path, p, a, mode)) __OTORP__(char* path; const char* p; const char* a; int mode;)
 #line 20
 {
-       register char*  s;
+       char*   s;
        char*           x;
 
        static char*    cmd;
index 7ffb0478866c0da8c9fdd1fff44139b19cd68d00..3494656cbdcc5c9a1abaea274a37e8e3a3745c0e 100644 (file)
@@ -112,9 +112,9 @@ pathprobe __PARAM__((char* path, char* attr, const char* lang, const char* tool,
 #line 32
 {
        char*           proc = (char*)aproc;
-       register char*  p;
-       register char*  k;
-       register char** ap;
+       char*   p;
+       char*   k;
+       char**  ap;
        int             n;
        char*           e;
        char*           probe;
index 0cb6a5517f00f995c5335fe967c65eb949ad6124..db683e0c653765514d2b29c2d85ef9daef8f26a1 100644 (file)
 #include <ast.h>
 
 char*
-pathrepl __PARAM__((register char* path, const char* match, register const char* replace), (path, match, replace)) __OTORP__(register char* path; const char* match; register const char* replace;)
+pathrepl __PARAM__((char* path, const char* match, const char* replace), (path, match, replace)) __OTORP__(char* path; const char* match; const char* replace;)
 #line 14
 {
-       register const char*    m = match;
-       register const char*    r;
+       const char*     m = match;
+       const char*     r;
        char*                   t;
 
        if (!match) match = "";
@@ -122,7 +122,7 @@ pathrepl __PARAM__((register char* path, const char* match, register const char*
                        while (*m && *m++ == *path) path++;
                        if (!*m && *path == '/')
                        {
-                               register char*  p;
+                               char*   p;
 
                                p = t;
                                r = replace;
@@ -130,7 +130,7 @@ pathrepl __PARAM__((register char* path, const char* match, register const char*
                                if (p < path) while (*p++ = *path++);
                                else if (*r && p >= path)
                                {
-                                       register char*  u;
+                                       char*   u;
 
                                        t = path + strlen(path);
                                        u = t + strlen(r);
index e889b0a6c1693621f7a506372612858ffe84eeaa..2003ba0ec9b78cff4e3962e5a01ae47893733f51 100644 (file)
@@ -115,10 +115,10 @@ char*
 pathtemp __PARAM__((char* buf, const char* adir, const char* apfx), (buf, adir, apfx)) __OTORP__(char* buf; const char* adir; const char* apfx;)
 #line 39
 {
-       register char*  dir = (char*)adir;
+       char*   dir = (char*)adir;
        char*           pfx = (char*)apfx;
-       register char*  p;
-       register char*  s;
+       char*   p;
+       char*   s;
        int             pid;
 
        static char*    tmpdir;
index ea70fe6813fab10d57becd50e190d0de1706d681..0c000fb05252b5c1d03d2e2bfbb42eddc019b369 100644 (file)
@@ -95,7 +95,7 @@
 #include <wait.h>
 
 int
-procclose __PARAM__((register Proc_t* p), (p)) __OTORP__(register Proc_t* p;){
+procclose __PARAM__((Proc_t* p), (p)) __OTORP__(Proc_t* p;){
        int     status = -1;
 
        if (p)
index 259dbaa28b65e8c1bc277ce1d405a1597e7f058f..7ac79630a164a3a60a27d8522ee65826432f6fdb 100644 (file)
@@ -93,7 +93,7 @@
 #include "proclib.h"
 
 int
-procfree __PARAM__((register Proc_t* p), (p)) __OTORP__(register Proc_t* p;){
+procfree __PARAM__((Proc_t* p), (p)) __OTORP__(Proc_t* p;){
        if (!p) return(-1);
        if (p == &proc_default) p->pid = -1;
        else free(p);
index 96e7fc767248adec0d1888671b2a2d59a5ac256a..215b132d2548c5e0aae2da406c2976d5cde1cf4d 100644 (file)
@@ -151,7 +151,7 @@ static const Namval_t               options[] =
  */
 
 static int
-setopt __PARAM__((register __V_* a, register const __V_* p, register int n, const char* v), (a, p, n, v)) __OTORP__(register __V_* a; register const __V_* p; register int n; const char* v;){
+setopt __PARAM__((__V_* a, const __V_* p, int n, const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; int n; const char* v;){
        NoP(v);
        if (p)
        {
@@ -253,7 +253,7 @@ modify __PARAM__((Proc_t* proc, int forked, int op, long arg1, long arg2), (proc
 #endif
 #if USE_SPAWN
        {
-               register Modify_t*      m;
+               Modify_t*       m;
 
                if (!(m = newof(NiL, Modify_t, 1, 0))) return(-1);
                m->next = mods;
@@ -327,8 +327,8 @@ modify __PARAM__((Proc_t* proc, int forked, int op, long arg1, long arg2), (proc
 
 static void
 restore __PARAM__((Proc_t* proc), (proc)) __OTORP__(Proc_t* proc;){
-       register Modify_t*      m;
-       register Modify_t*      p;
+       Modify_t*       m;
+       Modify_t*       p;
        int                     oerrno;
 
        NoP(proc);
@@ -399,9 +399,9 @@ restore __PARAM__((Proc_t* proc), (proc)) __OTORP__(Proc_t* proc;){
 
 Proc_t*
 procopen __PARAM__((const char* cmd, char** argv, char** envv, long* modv, long flags), (cmd, argv, envv, modv, flags)) __OTORP__(const char* cmd; char** argv; char** envv; long* modv; long flags;){
-       register Proc_t*        proc = 0;
-       register int            procfd;
-       register char**         p;
+       Proc_t* proc = 0;
+       int             procfd;
+       char**          p;
        char**                  v;
        int                     i;
        int                     forked = 0;
index d019e57f14e5050654643b2e1e6f2e35ebbb9bb1..e9d267823bccc78fa65853f92d835453d870da0e 100644 (file)
@@ -115,10 +115,10 @@ putenv __PARAM__((const char* akey), (akey)) __OTORP__(const char* akey;)
        static char**   last;           /* last free slot (0)           */
 
        char*           key = (char*)akey;
-       register char** v = environ;
-       register char** p = envv;
-       register char*  s;
-       register char*  t;
+       char**  v = environ;
+       char**  p = envv;
+       char*   s;
+       char*   t;
        int             n;
 
        if (p && !v)
index ddbedf7deb6e7704ef1b59c04cc3493b900dd875..1a608e7fbeaac63e3c26c109be69d514da47609f 100644 (file)
@@ -109,10 +109,10 @@ int
 putsymlink __PARAM__((const char* buf, const char* name), (buf, name)) __OTORP__(const char* buf; const char* name;)
 #line 16
 {
-       register char*  t = (char*)buf;
+       char*   t = (char*)buf;
 #ifdef UNIV_MAX
-       register char*  s = (char*)buf;
-       register char*  v;
+       char*   s = (char*)buf;
+       char*   v;
        int             n;
        char            tmp[PATH_MAX];
 
index c6b1a9b5ab6ffdb06fc0aee638ed3fadbe8e01c1..fccc98b355532f2f9733ce13aab8d0c4a38858ff 100644 (file)
@@ -111,8 +111,8 @@ query __PARAM__((int quit, const char* format, ...), (va_alist)) __OTORP__(va_dc
 #line 26
 
        va_list         ap;
-       register int    n;
-       register int    c;
+       int     n;
+       int     c;
 
        static Sfio_t*  rfp;
        static Sfio_t*  wfp;
index 00496df68741c467a1326475c5b76b51885956cd..f998be939b4754e9673599cdb4960b51bd99a68d 100644 (file)
@@ -138,11 +138,11 @@ vchdir __PARAM__((const char* path), (path)) __OTORP__(const char* path;)
  */
 
 int
-setcwd __PARAM__((register char* path, char* home), (path, home)) __OTORP__(register char* path; char* home;)
+setcwd __PARAM__((char* path, char* home), (path, home)) __OTORP__(char* path; char* home;)
 #line 48
 {
-       register char*  s;
-       register int    n;
+       char*   s;
+       int     n;
        int             r;
 
        r = 0;
index 3b9bff3e20981ff22e8654222c5f6fc230ed02c5..66a62a497fdb7f0bf86595fc2c83d0d8aa6f89c4 100644 (file)
@@ -114,10 +114,10 @@ setenv __PARAM__((const char* akey), (akey)) __OTORP__(const char* akey;)
        static char**   last;           /* last free slot (0)           */
 
        char*           key = (char*)akey;
-       register char** v = environ;
-       register char** p = envv;
-       register char*  s;
-       register char*  t;
+       char**  v = environ;
+       char**  p = envv;
+       char*   s;
+       char*   t;
        int             n;
 
        if (p && !v)
index 4281e97d960242f3098e5a551abba05bc7a3cad7..731b18bf0ae7ec171632994d94515b2943d0a1db 100644 (file)
@@ -103,10 +103,10 @@ setenviron __PARAM__((const char* akey), (akey)) __OTORP__(const char* akey;){
        static char     ok[] = "";      /* delete/optimization ok return*/
 
        char*           key = (char*)akey;
-       register char** v = environ;
-       register char** p = envv;
-       register char*  s;
-       register char*  t;
+       char**  v = environ;
+       char**  p = envv;
+       char*   s;
+       char*   t;
        int             n;
 
        if (p && !v)
index 30bdfdc0f9beecf0e098958a378617fe068add38..26762ea211304440af8209573168b8c7c95f663a 100644 (file)
@@ -117,7 +117,7 @@ setuniv __PARAM__((const char* buf), (buf)) __OTORP__(const char* buf;)
        return(-1);
 #else
 #if defined(ATT_UNIV) || defined(U_GET)
-       register int    n;
+       int     n;
 
        for (n = 0; n < UNIV_MAX; n++)
                if (streq(buf, univ_name[n]))
index efa9490ddaf886869af9d4f7bbbde0a961eeb157..4934b87be05af7f938f010fc4fef8a1cdbefccca 100644 (file)
@@ -136,7 +136,7 @@ interrupt __PARAM__((int sig), (sig)) __OTORP__(int sig;){
 
 int
 sigcritical __PARAM__((int op), (op)) __OTORP__(int op;){
-       register int            i;
+       int             i;
        static int              level;
 #if _lib_sigprocmask
        static sigset_t         mask;
index 870cc180340aded83cf3d2885a0e70a015b31b6e..7562963371a973f21dba313ea55ba88ca9f5773f 100644 (file)
@@ -100,9 +100,9 @@ static const char id_stack[] = "\n@(#)stack (AT&T Bell Laboratories) 05/01/84\0\
  */
 
 STACK
-stackalloc __PARAM__((register int size, __V_* error), (size, error)) __OTORP__(register int size; __V_* error;){
-       register STACK                  stack;
-       register struct stackblock      *b;
+stackalloc __PARAM__((int size, __V_* error), (size, error)) __OTORP__(int size; __V_* error;){
+       STACK                   stack;
+       struct stackblock       *b;
 
        if (size <= 0) size = 100;
        if (!(stack = newof(0, struct stacktable, 1, 0))) return(0);
@@ -132,9 +132,9 @@ stackalloc __PARAM__((register int size, __V_* error), (size, error)) __OTORP__(
  */
 
 void
-stackfree __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK stack;){
-       register struct stackblock*     b;
-       register struct stackblock*     p;
+stackfree __PARAM__((STACK stack), (stack)) __OTORP__(STACK stack;){
+       struct stackblock*      b;
+       struct stackblock*      p;
 
        b = stack->blocks;
        while (p = b)
@@ -151,7 +151,7 @@ stackfree __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK st
  */
 
 void
-stackclear __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK stack;){
+stackclear __PARAM__((STACK stack), (stack)) __OTORP__(STACK stack;){
        stack->position.block = stack->blocks;
        stack->position.index = -1;
 }
@@ -161,7 +161,7 @@ stackclear __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK s
  */
 
 __V_*
-stackget __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK stack;){
+stackget __PARAM__((STACK stack), (stack)) __OTORP__(STACK stack;){
        if (stack->position.index < 0) return(stack->error);
        else return(stack->position.block->stack[stack->position.index]);
 }
@@ -171,8 +171,8 @@ stackget __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK sta
  */
 
 int
-stackpush __PARAM__((register STACK stack, __V_* value), (stack, value)) __OTORP__(register STACK stack; __V_* value;){
-       register struct stackblock      *b;
+stackpush __PARAM__((STACK stack, __V_* value), (stack, value)) __OTORP__(STACK stack; __V_* value;){
+       struct stackblock       *b;
 
        if (++stack->position.index >= stack->size)
        {
@@ -200,7 +200,7 @@ stackpush __PARAM__((register STACK stack, __V_* value), (stack, value)) __OTORP
  */
 
 int
-stackpop __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK stack;){
+stackpop __PARAM__((STACK stack), (stack)) __OTORP__(STACK stack;){
        /*
         * return:
         *
@@ -225,7 +225,7 @@ stackpop __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK sta
  */
 
 void
-stacktell __PARAM__((register STACK stack, int set, STACKPOS* position), (stack, set, position)) __OTORP__(register STACK stack; int set; STACKPOS* position;){
+stacktell __PARAM__((STACK stack, int set, STACKPOS* position), (stack, set, position)) __OTORP__(STACK stack; int set; STACKPOS* position;){
        if (set) stack->position = *position;
        else *position = stack->position;
 }
index bcbf0eb4989d48427440f086ed731c3324ef69a0..49098efaab26ea700d7df5a5e6cffbdb4b76d2af 100644 (file)
@@ -189,7 +189,7 @@ static char *overflow __PARAM__((int n), (n)) __OTORP__(int n;)
 static void stakinit __PARAM__((int size), (size)) __OTORP__(int size;)
 #line 109
 {
-       register Sfile_t *sp;
+       Sfile_t *sp;
        init = size;
        sp = stakcreate(0);
        init = 1;
@@ -230,12 +230,12 @@ static int stakexcept __PARAM__((Sfile_t* sp, int type, Sfdisc_t* dp), (sp, type
 Sfile_t *stakcreate __PARAM__((int flags), (flags)) __OTORP__(int flags;)
 #line 148
 {
-       register int bsize;
-       register Sfile_t *stream;
-       register struct stak *sp;
-       register struct frame *fp;
-       register Sfdisc_t *dp;
-       register char *cp;
+       int bsize;
+       Sfile_t *stream;
+       struct stak *sp;
+       struct frame *fp;
+       Sfdisc_t *dp;
+       char *cp;
        if(!(stream=newof((char*)0,Sfile_t, 1, sizeof(*dp)+sizeof(*sp))))
                return(0);
        increment(create);
@@ -279,7 +279,7 @@ Sfile_t *stakinstall __PARAM__((Sfile_t *stream, _stak_overflow_ oflow), (stream
 #line 195
 {
        Sfile_t *old;
-       register struct stak *sp;
+       struct stak *sp;
        if(!init)
        {
                stakinit(1);
@@ -310,10 +310,10 @@ Sfile_t *stakinstall __PARAM__((Sfile_t *stream, _stak_overflow_ oflow), (stream
 /*
  * increase the reference count on the given <stack>
  */
-int staklink __PARAM__((register Sfile_t* stream), (stream)) __OTORP__(register Sfile_t* stream;)
+int staklink __PARAM__((Sfile_t* stream), (stream)) __OTORP__(Sfile_t* stream;)
 #line 229
 {
-       register struct stak *sp = stream2stak(stream);
+       struct stak *sp = stream2stak(stream);
        return(sp->stakref++);
 }
 
@@ -323,9 +323,9 @@ int staklink __PARAM__((register Sfile_t* stream), (stream)) __OTORP__(register
 int stakdelete __PARAM__((Sfile_t* stream), (stream)) __OTORP__(Sfile_t* stream;)
 #line 238
 {
-       register struct stak *sp = stream2stak(stream); 
-       register char *cp = sp->stakbase;
-       register struct frame *fp;
+       struct stak *sp = stream2stak(stream);
+       char *cp = sp->stakbase;
+       struct frame *fp;
        if(--sp->stakref>0)
                return(1);
        increment(delete);
@@ -354,13 +354,13 @@ int stakdelete __PARAM__((Sfile_t* stream), (stream)) __OTORP__(Sfile_t* stream;
  * otherwise, the top of the stack is set to stakbot+<offset>
  *
  */
-char *stakset __PARAM__((register char* loc, unsigned offset), (loc, offset)) __OTORP__(register char* loc; unsigned offset;)
+char *stakset __PARAM__((char* loc, unsigned offset), (loc, offset)) __OTORP__(char* loc; unsigned offset;)
 #line 271
 {
-       register struct stak *sp=stakcur;
-       register char *cp;
-       register struct frame *fp;
-       register int frames = 0;
+       struct stak *sp=stakcur;
+       char *cp;
+       struct frame *fp;
+       int frames = 0;
        if(!init)
                stakinit(offset+1);
        increment(set);
@@ -400,10 +400,10 @@ found:
 /*
  * allocate <n> bytes on the current stack
  */
-char *stakalloc __PARAM__((register unsigned int n), (n)) __OTORP__(register unsigned int n;)
+char *stakalloc __PARAM__((unsigned int n), (n)) __OTORP__(unsigned int n;)
 #line 316
 {
-       register unsigned char *old;
+       unsigned char *old;
        if(!init)
                stakinit(n);
        increment(alloc);
@@ -418,7 +418,7 @@ char *stakalloc __PARAM__((register unsigned int n), (n)) __OTORP__(register uns
 /*
  * begin a new stack word of at least <n> bytes
  */
-char *_stakseek __PARAM__((register unsigned n), (n)) __OTORP__(register unsigned n;)
+char *_stakseek __PARAM__((unsigned n), (n)) __OTORP__(unsigned n;)
 #line 333
 {
        if(!init)
@@ -434,10 +434,10 @@ char *_stakseek __PARAM__((register unsigned n), (n)) __OTORP__(register unsigne
  * advance the stack to the current top
  * if extra is non-zero, first add a extra bytes and zero the first
  */
-char   *stakfreeze __PARAM__((register unsigned extra), (extra)) __OTORP__(register unsigned extra;)
+char   *stakfreeze __PARAM__((unsigned extra), (extra)) __OTORP__(unsigned extra;)
 #line 348
 {
-       register unsigned char *old, *top;
+       unsigned char *old, *top;
        if(!init)
                stakinit(extra);
        old = staksp->data;
@@ -462,8 +462,8 @@ char        *stakfreeze __PARAM__((register unsigned extra), (extra)) __OTORP__(registe
 char   *stakcopy __PARAM__((const char* str), (str)) __OTORP__(const char* str;)
 #line 372
 {
-       register unsigned char *cp = (unsigned char*)str;
-       register int n;
+       unsigned char *cp = (unsigned char*)str;
+       int n;
        while(*cp++);
        n = roundof(cp-(unsigned char*)str,sizeof(char*));
        if(!init)
@@ -486,12 +486,12 @@ char      *stakcopy __PARAM__((const char* str), (str)) __OTORP__(const char* str;)
 static char *stakgrow __PARAM__((unsigned size), (size)) __OTORP__(unsigned size;)
 #line 395
 {
-       register int n = size;
-       register struct stak *sp = stakcur;
-       register struct frame *fp;
-       register char *cp;
-       register unsigned m = staktell();
-       register int reused = 0;
+       int n = size;
+       struct stak *sp = stakcur;
+       struct frame *fp;
+       char *cp;
+       unsigned m = staktell();
+       int reused = 0;
        n += (m + sizeof(struct frame)+1);
        if(sp->stakflags&STAK_SMALL)
 #ifndef USE_REALLOC
index 2e0503b15b8a0e7e2e63271990451f0a287fbaf9..3618c57d47ae9bc5e81fd18a410cc9c57a247584 100644 (file)
@@ -189,14 +189,14 @@ static char *overflow __PARAM__((int n), (n)) __OTORP__(int n;){
  * initialize stkstd, sfio operations may have already occcured
  */
 static void stkinit __PARAM__((int size), (size)) __OTORP__(int size;){
-       register Sfio_t *sp;
+       Sfio_t *sp;
        init = size;
        sp = stkopen(0);
        init = 1;
        stkinstall(sp,overflow);
 }
 
-static int stkexcept __PARAM__((register Sfio_t *stream, int type, Sfdisc_t* dp), (stream, type, dp)) __OTORP__(register Sfio_t *stream; int type; Sfdisc_t* dp;){
+static int stkexcept __PARAM__((Sfio_t *stream, int type, Sfdisc_t* dp), (stream, type, dp)) __OTORP__(Sfio_t *stream; int type; Sfdisc_t* dp;){
        NoP(dp);
        switch(type)
        {
@@ -226,12 +226,12 @@ static int stkexcept __PARAM__((register Sfio_t *stream, int type, Sfdisc_t* dp)
  * create a stack
  */
 Sfio_t *stkopen __PARAM__((int flags), (flags)) __OTORP__(int flags;){
-       register int bsize;
-       register Sfio_t *stream;
-       register struct stk *sp;
-       register struct frame *fp;
-       register Sfdisc_t *dp;
-       register char *cp;
+       int bsize;
+       Sfio_t *stream;
+       struct stk *sp;
+       struct frame *fp;
+       Sfdisc_t *dp;
+       char *cp;
        if(!(stream=newof((char*)0,Sfio_t, 1, sizeof(*dp)+sizeof(*sp))))
                return(0);
        increment(create);
@@ -273,7 +273,7 @@ Sfio_t *stkopen __PARAM__((int flags), (flags)) __OTORP__(int flags;){
  */
 Sfio_t *stkinstall __PARAM__((Sfio_t *stream, _stk_overflow_ oflow), (stream, oflow)) __OTORP__(Sfio_t *stream; _stk_overflow_ oflow;){
        Sfio_t *old;
-       register struct stk *sp;
+       struct stk *sp;
        if(!init)
        {
                stkinit(1);
@@ -304,8 +304,8 @@ Sfio_t *stkinstall __PARAM__((Sfio_t *stream, _stk_overflow_ oflow), (stream, of
 /*
  * increase the reference count on the given <stack>
  */
-int stklink __PARAM__((register Sfio_t* stream), (stream)) __OTORP__(register Sfio_t* stream;){
-       register struct stk *sp = stream2stk(stream);
+int stklink __PARAM__((Sfio_t* stream), (stream)) __OTORP__(Sfio_t* stream;){
+       struct stk *sp = stream2stk(stream);
        return(sp->stkref++);
 }
 
@@ -313,9 +313,9 @@ int stklink __PARAM__((register Sfio_t* stream), (stream)) __OTORP__(register Sf
  * terminate a stack and free up the space
  */
 int stkclose __PARAM__((Sfio_t* stream), (stream)) __OTORP__(Sfio_t* stream;){
-       register struct stk *sp = stream2stk(stream); 
-       register char *cp = sp->stkbase;
-       register struct frame *fp;
+       struct stk *sp = stream2stk(stream);
+       char *cp = sp->stkbase;
+       struct frame *fp;
        if(--sp->stkref>0)
                return(1);
        increment(delete);
@@ -344,11 +344,11 @@ int stkclose __PARAM__((Sfio_t* stream), (stream)) __OTORP__(Sfio_t* stream;){
  * otherwise, the top of the stack is set to stkbot+<offset>
  *
  */
-char *stkset __PARAM__((register Sfio_t * stream, register char* loc, unsigned offset), (stream, loc, offset)) __OTORP__(register Sfio_t * stream; register char* loc; unsigned offset;){
-       register struct stk *sp = stream2stk(stream); 
-       register char *cp;
-       register struct frame *fp;
-       register int frames = 0;
+char *stkset __PARAM__((Sfio_t * stream, char* loc, unsigned offset), (stream, loc, offset)) __OTORP__(Sfio_t * stream; char* loc; unsigned offset;){
+       struct stk *sp = stream2stk(stream);
+       char *cp;
+       struct frame *fp;
+       int frames = 0;
        if(!init)
                stkinit(offset+1);
        increment(set);
@@ -388,8 +388,8 @@ found:
 /*
  * allocate <n> bytes on the current stack
  */
-char *stkalloc __PARAM__((register Sfio_t *stream, register unsigned int n), (stream, n)) __OTORP__(register Sfio_t *stream; register unsigned int n;){
-       register unsigned char *old;
+char *stkalloc __PARAM__((Sfio_t *stream, unsigned int n), (stream, n)) __OTORP__(Sfio_t *stream; unsigned int n;){
+       unsigned char *old;
        if(!init)
                stkinit(n);
        increment(alloc);
@@ -404,7 +404,7 @@ char *stkalloc __PARAM__((register Sfio_t *stream, register unsigned int n), (st
 /*
  * begin a new stack word of at least <n> bytes
  */
-char *_stkseek __PARAM__((register Sfio_t *stream, register unsigned n), (stream, n)) __OTORP__(register Sfio_t *stream; register unsigned n;){
+char *_stkseek __PARAM__((Sfio_t *stream, unsigned n), (stream, n)) __OTORP__(Sfio_t *stream; unsigned n;){
        if(!init)
                stkinit(n);
        increment(seek);
@@ -418,8 +418,8 @@ char *_stkseek __PARAM__((register Sfio_t *stream, register unsigned n), (stream
  * advance the stack to the current top
  * if extra is non-zero, first add a extra bytes and zero the first
  */
-char   *stkfreeze __PARAM__((register Sfio_t *stream, register unsigned extra), (stream, extra)) __OTORP__(register Sfio_t *stream; register unsigned extra;){
-       register unsigned char *old, *top;
+char   *stkfreeze __PARAM__((Sfio_t *stream, unsigned extra), (stream, extra)) __OTORP__(Sfio_t *stream; unsigned extra;){
+       unsigned char *old, *top;
        if(!init)
                stkinit(extra);
        old = stream->data;
@@ -442,8 +442,8 @@ char        *stkfreeze __PARAM__((register Sfio_t *stream, register unsigned extra), (s
  * copy string <str> onto the stack as a new stack word
  */
 char   *stkcopy __PARAM__((Sfio_t *stream, const char* str), (stream, str)) __OTORP__(Sfio_t *stream; const char* str;){
-       register unsigned char *cp = (unsigned char*)str;
-       register int n;
+       unsigned char *cp = (unsigned char*)str;
+       int n;
        while(*cp++);
        n = roundof(cp-(unsigned char*)str,sizeof(char*));
        if(!init)
@@ -463,13 +463,13 @@ char      *stkcopy __PARAM__((Sfio_t *stream, const char* str), (stream, str)) __OTOR
  * to the end is copied into the new stack frame
  */
 
-static char *stkgrow __PARAM__((register Sfio_t *stream, unsigned size), (stream, size)) __OTORP__(register Sfio_t *stream; unsigned size;){
-       register int n = size;
-       register struct stk *sp = stream2stk(stream);
-       register struct frame *fp;
-       register char *cp;
-       register unsigned m = stktell(stream);
-       register int reused = 0;
+static char *stkgrow __PARAM__((Sfio_t *stream, unsigned size), (stream, size)) __OTORP__(Sfio_t *stream; unsigned size;){
+       int n = size;
+       struct stk *sp = stream2stk(stream);
+       struct frame *fp;
+       char *cp;
+       unsigned m = stktell(stream);
+       int reused = 0;
        n += (m + sizeof(struct frame)+1);
        if(sp->stkflags&STK_SMALL)
 #ifndef USE_REALLOC
index 92ea0d0665add4c5096361c6a4945ec52c8b7f5e..03a9c18890c3e9dccc90f39e9b8d6609cdd6ebfd 100644 (file)
@@ -96,8 +96,8 @@
 
 void
 systrace __PARAM__((const char* id), (id)) __OTORP__(const char* id;){
-       register int    n;
-       register char*  out;
+       int     n;
+       char*   out;
        char*           s;
        char            buf[PATH_MAX];
        char*           av[7];
index de771c3f0d5ae260d2dda6b294b5e071b0eecaef..76cf88ff4c159f7c3172928840c6abfae8f6c06c 100644 (file)
  */
 
 char*
-fgetline __PARAM__((register FILE* fp, int op), (fp, op)) __OTORP__(register FILE* fp; int op;)
+fgetline __PARAM__((FILE* fp, int op), (fp, op)) __OTORP__(FILE* fp; int op;)
 #line 29
 {
-       register int    c;
-       register char*  s;
-       register char*  end;
+       int     c;
+       char*   s;
+       char*   end;
 
        static char*    buf;
        static int      siz;
index 20e19151279d4a82ded9d4b3ff76379a5d3149c4..165cc1599c0055bf714561be0719446395f49dd5 100644 (file)
@@ -93,6 +93,6 @@
 #include <ast.h>
 
 void
-getwinsize __PARAM__((int fd, register int* rows, register int* cols), (fd, rows, cols)) __OTORP__(int fd; register int* rows; register int* cols;){
+getwinsize __PARAM__((int fd, int* rows, int* cols), (fd, rows, cols)) __OTORP__(int fd; int* rows; int* cols;){
        astwinsize(fd, rows, cols);
 }
index 39a0e3fab17722fbd9ebaf6e7d568f9f79771a1f..15ae2c936286bf078575db66bc17769f7f973a0d 100644 (file)
@@ -97,8 +97,8 @@ int
 query __PARAM__((int quit, const char* format, ...), (va_alist)) __OTORP__(va_dcl)
 { __OTORP__(int quit; const char* format; )
        va_list         ap;
-       register int    n;
-       register int    c;
+       int     n;
+       int     c;
 
        static Sfio_t*  rfp;
        static Sfio_t*  wfp;
index 1b58a9b803b07b965ac1278746f02c17d9cf4c55..9facdc15b8b35231789e7ac26ea6b4b49b5f8a94 100644 (file)
@@ -93,6 +93,6 @@
 #include <ast.h>
 
 __V_*
-tablook __PARAM__((const __V_* tab, int siz, register const char* name), (tab, siz, name)) __OTORP__(const __V_* tab; int siz; register const char* name;){
+tablook __PARAM__((const __V_* tab, int siz, const char* name), (tab, siz, name)) __OTORP__(const __V_* tab; int siz; const char* name;){
        return(strlook(tab, siz, name));
 }
index cc8c8291e9b58601daf3b46b2f96f04ad30ba267..ee0b1f6f70bcbdbb3ef21a4c914e829124d2617b 100644 (file)
@@ -94,8 +94,8 @@
 #include <ls.h>
 
 char*
-pathaccess __PARAM__((register char* path, register const char* dirs, const char* a, const char* b, register int mode), (path, dirs, a, b, mode)) __OTORP__(register char* path; register const char* dirs; const char* a; const char* b; register int mode;){
-       register int    m = 0;
+pathaccess __PARAM__((char* path, const char* dirs, const char* a, const char* b, int mode), (path, dirs, a, b, mode)) __OTORP__(char* path; const char* dirs; const char* a; const char* b; int mode;){
+       int     m = 0;
        int             sep = ':';
        char            cwd[PATH_MAX];
        struct stat     st;
index 1a448f97344bf421bac0a23f41812e728c175559..9c99d94ef855d713f6af4d895687bf0b36413bc7 100644 (file)
@@ -94,7 +94,7 @@
 
 char*
 pathbin __PARAM__((void), ()){
-       register char*  bin;
+       char*   bin;
 
        static char*    val;
 
index 17fff137bdb2956dad01bd0c3001af4a86eabbf6..911a1caada59609baae56a1a15608caa62ccc26a 100644 (file)
 
 char*
 pathcanon __PARAM__((char* path, int flags), (path, flags)) __OTORP__(char* path; int flags;){
-       register char*  p;
-       register char*  r;
-       register char*  s;
-       register char*  t;
-       register int    dots;
+       char*   p;
+       char*   r;
+       char*   s;
+       char*   t;
+       int     dots;
        int             loop;
        int             oerrno;
 #if defined(FS_3D)
index 3c00060e6fedf3e707a22938cbc7c9860a181a4b..bd7abbf8b6b99801c1d905aa6230ac359d7236b0 100644 (file)
@@ -93,8 +93,8 @@
 #include <ast.h>
 
 char*
-pathcat __PARAM__((char* path, register const char* dirs, int sep, const char* a, register const char* b), (path, dirs, sep, a, b)) __OTORP__(char* path; register const char* dirs; int sep; const char* a; register const char* b;){
-       register char*  s;
+pathcat __PARAM__((char* path, const char* dirs, int sep, const char* a, const char* b), (path, dirs, sep, a, b)) __OTORP__(char* path; const char* dirs; int sep; const char* a; const char* b;){
+       char*   s;
 
        s = path;
        while (*dirs && *dirs != sep) *s++ = *dirs++;
index 70616d0c442224b60415df99a62436aeb0681194..fd21e7e4a3dbade2e0cba70018afcc4ff9dcb4f2 100644 (file)
@@ -126,9 +126,9 @@ vchdir __PARAM__((const char* path), (path)) __OTORP__(const char* path;){
 
 int
 pathcd __PARAM__((const char* path, const char* home), (path, home)) __OTORP__(const char* path; const char* home;){
-       register char*  p = (char*)path;
-       register char*  s;
-       register int    n;
+       char*   p = (char*)path;
+       char*   s;
+       int     n;
        int             i;
        int             r;
 
index 5c2665a29342885276f382e8a400a23283d2c32a..7e2c1fcfa260f6bf237e4f69ff290f1a1b3eecc4 100644 (file)
@@ -99,7 +99,7 @@
 int
 pathcheck __PARAM__((const char* package, const char* tool, Pathcheck_t* pc), (package, tool, pc)) __OTORP__(const char* package; const char* tool; Pathcheck_t* pc;){
 #ifdef PARANOID
-       register char*  s;
+       char*   s;
        struct stat     st;
 
        if (strmatch(tool, PARANOID) && environ && (s = *environ) && *s++ == '_' && *s++ == '=' && !stat(s, &st))
index dcfc35a271d7d72f2633f3817c11cfc64d7d9b1c..ea2819389407285ebcfee92ce270b243c5ef6b91 100644 (file)
@@ -117,10 +117,10 @@ pathgetlink __PARAM__((const char* name, char* buf, int siz), (name, buf, siz))
 #ifdef UNIV_MAX
        if (isspace(*buf))
        {
-               register char*  s;
-               register char*  t;
-               register char*  u;
-               register char*  v;
+               char*   s;
+               char*   t;
+               char*   u;
+               char*   v;
                int             match = 0;
                char            tmp[PATH_MAX];
 
index 7aff229d069725883301bca1d141c08254995f98..8f95551e13024397ce737bd0a14948c763393a16 100644 (file)
@@ -98,9 +98,9 @@
 
 char*
 pathkey __PARAM__((char* key, char* attr, const char* lang, const char* apath), (key, attr, lang, apath)) __OTORP__(char* key; char* attr; const char* lang; const char* apath;){
-       register char*          path = (char*)apath;
-       register char*          s;
-       register char*          k;
+       char*           path = (char*)apath;
+       char*           s;
+       char*           k;
        char*                   t;
        char*                   flags;
        char**                  p;
index 1fbca079a9b0b10086e4f15040be836743debee2..49d20da590493b1c5de9e06cf432730deb84af90 100644 (file)
@@ -94,8 +94,8 @@
 #include <option.h>
 
 char*
-pathpath __PARAM__((register char* path, const char* p, const char* a, int mode), (path, p, a, mode)) __OTORP__(register char* path; const char* p; const char* a; int mode;){
-       register char*  s;
+pathpath __PARAM__((char* path, const char* p, const char* a, int mode), (path, p, a, mode)) __OTORP__(char* path; const char* p; const char* a; int mode;){
+       char*   s;
        char*           x;
 
        static char*    cmd;
index 79cc2c74ca913a6d487c16f994eb5260b3cfacce..ea25fd6256e8a7ae9799a23576467221cb1247b4 100644 (file)
 char*
 pathprobe __PARAM__((char* path, char* attr, const char* lang, const char* tool, const char* aproc, int op), (path, attr, lang, tool, aproc, op)) __OTORP__(char* path; char* attr; const char* lang; const char* tool; const char* aproc; int op;){
        char*           proc = (char*)aproc;
-       register char*  p;
-       register char*  k;
-       register char** ap;
+       char*   p;
+       char*   k;
+       char**  ap;
        int             n;
        char*           e;
        char*           probe;
index b43ea65281ed02d56365edd9f8051e1a1e143d3f..96e1aa6a8baf31db87cd85a58b83f6b7cba8b427 100644 (file)
@@ -93,9 +93,9 @@
 #include <ast.h>
 
 char*
-pathrepl __PARAM__((register char* path, const char* match, register const char* replace), (path, match, replace)) __OTORP__(register char* path; const char* match; register const char* replace;){
-       register const char*    m = match;
-       register const char*    r;
+pathrepl __PARAM__((char* path, const char* match, const char* replace), (path, match, replace)) __OTORP__(char* path; const char* match; const char* replace;){
+       const char*     m = match;
+       const char*     r;
        char*                   t;
 
        if (!match) match = "";
@@ -112,7 +112,7 @@ pathrepl __PARAM__((register char* path, const char* match, register const char*
                        while (*m && *m++ == *path) path++;
                        if (!*m && *path == '/')
                        {
-                               register char*  p;
+                               char*   p;
 
                                p = t;
                                r = replace;
@@ -120,7 +120,7 @@ pathrepl __PARAM__((register char* path, const char* match, register const char*
                                if (p < path) while (*p++ = *path++);
                                else if (*r && p >= path)
                                {
-                                       register char*  u;
+                                       char*   u;
 
                                        t = path + strlen(path);
                                        u = t + strlen(r);
index f8dd209905bd4f97a7bd7e203471750c0386e583..a09efefc1db6e90a6e5d7c1b3b433a6a76a268c8 100644 (file)
 
 int
 pathsetlink __PARAM__((const char* buf, const char* name), (buf, name)) __OTORP__(const char* buf; const char* name;){
-       register char*  t = (char*)buf;
+       char*   t = (char*)buf;
 #ifdef UNIV_MAX
-       register char*  s = (char*)buf;
-       register char*  v;
+       char*   s = (char*)buf;
+       char*   v;
        int             n;
        char            tmp[PATH_MAX];
 
index 008a40118c4457c6b0a0ed6179a382a9ecd2fc3f..a7b6ff23be6df0e47f9344f0f3f0adc598364ab0 100644 (file)
 
 char*
 pathshell __PARAM__((void), ()){
-       register char*  s;
-       register char*  sh;
-       register int    i;
+       char*   s;
+       char*   sh;
+       int     i;
 
        static char*    val;
 
index 7fa869cf4050b209c7dc99fe1c454a43daae5824..27c02ccf6c3acc8ac97945938061a27af9bc2f4e 100644 (file)
 
 char*
 pathtemp __PARAM__((char* buf, const char* dir, const char* pfx), (buf, dir, pfx)) __OTORP__(char* buf; const char* dir; const char* pfx;){
-       register char*          d = (char*)dir;
+       char*           d = (char*)dir;
        char*                   p = (char*)pfx;
-       register char*          b;
-       register char*          s;
+       char*           b;
+       char*           s;
        unsigned long           loop;
 
        static char*            tmpdir;
index a9aaa30969f3e07283f57c0fcee07ba0806e2d3a..79f98cd2b30ef946a03ae66eae4429841a3ccd92 100644 (file)
@@ -158,11 +158,11 @@ static Ast_confdisc_t     notify;
  */
 
 static char*
-synthesize __PARAM__((register Feature_t* fp, const char* path, const char* value), (fp, path, value)) __OTORP__(register Feature_t* fp; const char* path; const char* value;){
-       register char*          s;
-       register char*          d;
-       register char*          v;
-       register int            n;
+synthesize __PARAM__((Feature_t* fp, const char* path, const char* value), (fp, path, value)) __OTORP__(Feature_t* fp; const char* path; const char* value;){
+       char*           s;
+       char*           d;
+       char*           v;
+       int             n;
 
        static char*            data;
        static char*            last;
@@ -279,16 +279,16 @@ synthesize __PARAM__((register Feature_t* fp, const char* path, const char* valu
  */
 
 static void
-initialize __PARAM__((register Feature_t* fp, const char* path, const char* command, const char* succeed, const char* fail), (fp, path, command, succeed, fail)) __OTORP__(register Feature_t* fp; const char* path; const char* command; const char* succeed; const char* fail;){
-       register char*  p;
-       register int    ok = 1;
+initialize __PARAM__((Feature_t* fp, const char* path, const char* command, const char* succeed, const char* fail), (fp, path, command, succeed, fail)) __OTORP__(Feature_t* fp; const char* path; const char* command; const char* succeed; const char* fail;){
+       char*   p;
+       int     ok = 1;
 
        if (fp->op != OP_path_resolve || !fs3d(FS3D_TEST))
        {
                if (p = getenv("PATH"))
                {
-                       register int    r = 1;
-                       register char*  d = p;
+                       int     r = 1;
+                       char*   d = p;
                        int             offset = stktell(stkstd);
 
                        for (;;)
@@ -363,8 +363,8 @@ initialize __PARAM__((register Feature_t* fp, const char* path, const char* comm
 
 static char*
 feature __PARAM__((const char* name, const char* path, const char* value), (name, path, value)) __OTORP__(const char* name; const char* path; const char* value;){
-       register Feature_t*     fp;
-       register int            n;
+       Feature_t*      fp;
+       int             n;
 
        if (value)
        {
@@ -432,12 +432,12 @@ feature __PARAM__((const char* name, const char* path, const char* value), (name
  */
 
 static int
-lookup __PARAM__((register Lookup_t* look, const char* name), (look, name)) __OTORP__(register Lookup_t* look; const char* name;){
-       register Conf_t*        mid = (Conf_t*)conf;
-       register Conf_t*        lo = mid;
-       register Conf_t*        hi = mid + conf_elements;
-       register int            v;
-       register int            c;
+lookup __PARAM__((Lookup_t* look, const char* name), (look, name)) __OTORP__(Lookup_t* look; const char* name;){
+       Conf_t* mid = (Conf_t*)conf;
+       Conf_t* lo = mid;
+       Conf_t* hi = mid + conf_elements;
+       int             v;
+       int             c;
        const char*             oldname = name;
        const Prefix_t*         p;
 
@@ -530,9 +530,9 @@ lookup __PARAM__((register Lookup_t* look, const char* name), (look, name)) __OT
  */
 
 static char*
-print __PARAM__((Sfio_t* sp, register Lookup_t* look, const char* name, const char* path), (sp, look, name, path)) __OTORP__(Sfio_t* sp; register Lookup_t* look; const char* name; const char* path;){
-       register Conf_t*        p = look->conf;
-       register int            flags = look->flags|CONF_DEFINED;
+print __PARAM__((Sfio_t* sp, Lookup_t* look, const char* name, const char* path), (sp, look, name, path)) __OTORP__(Sfio_t* sp; Lookup_t* look; const char* name; const char* path;){
+       Conf_t* p = look->conf;
+       int             flags = look->flags|CONF_DEFINED;
        char*                   call;
        int                     offset;
        long                    v;
@@ -669,7 +669,7 @@ print __PARAM__((Sfio_t* sp, register Lookup_t* look, const char* name, const ch
 
 char*
 astconf __PARAM__((const char* name, const char* path, const char* value), (name, path, value)) __OTORP__(const char* name; const char* path; const char* value;){
-       register char*  s;
+       char*   s;
        Lookup_t        look;
 
        if (!path)
index 8be7597e76c1b0f57c9b884f02ff36f5eff2dc75..ec2698fcfd1c1a7e883ec96b720bad7e166ff8f1 100644 (file)
@@ -136,7 +136,7 @@ extern __MANGLE__ caddr_t           mmap __PROTO__((caddr_t, size_t, int, int, int, off_t
 
 off_t
 astcopy __PARAM__((int rfd, int wfd, off_t n), (rfd, wfd, n)) __OTORP__(int rfd; int wfd; off_t n;){
-       register off_t  c;
+       off_t   c;
 #ifdef MAPSIZE
        off_t           pos;
        off_t           mapsize;
index 0a3ad4c61421a245a6665b8cb20f4213c658419f..688aa113efe71ac777886fc4431dd1230b8f1fea 100644 (file)
@@ -97,8 +97,8 @@ int
 astquery __PARAM__((int quit, const char* format, ...), (va_alist)) __OTORP__(va_dcl)
 { __OTORP__(int quit; const char* format; )
        va_list         ap;
-       register int    n;
-       register int    c;
+       int     n;
+       int     c;
 
        static Sfio_t*  rfp;
        static Sfio_t*  wfp;
index bf58fd183d4f9cb577432164a6c4c7cb29f93537..d73b43a8e709a02b7a307dec02deb637a05d351e 100644 (file)
@@ -129,7 +129,7 @@ __STDPP__directive pragma pp:nohide ioctl sleep
 static int             ttctl __PROTO__((int, int, __V_*));
 
 void
-astwinsize __PARAM__((int fd, register int* rows, register int* cols), (fd, rows, cols)) __OTORP__(int fd; register int* rows; register int* cols;){
+astwinsize __PARAM__((int fd, int* rows, int* cols), (fd, rows, cols)) __OTORP__(int fd; int* rows; int* cols;){
 #ifdef TIOCGWINSZ
 #define NEED_ttctl
        struct winsize  ws;
@@ -180,8 +180,8 @@ astwinsize __PARAM__((int fd, register int* rows, register int* cols), (fd, rows
  */
 
 static int
-ttctl __PARAM__((register int fd, int op, __V_* tt), (fd, op, tt)) __OTORP__(register int fd; int op; __V_* tt;){
-       register int    v;
+ttctl __PARAM__((int fd, int op, __V_* tt), (fd, op, tt)) __OTORP__(int fd; int op; __V_* tt;){
+       int     v;
 
        if (fd < 0)
        {
index 267bf6db475e96d146ed301fead6c86dbcfde7c0..f52ab0975fb2e07ac2d19feea325adb7ede70784 100644 (file)
@@ -146,7 +146,7 @@ off_t
 fdcopy __PARAM__((int rfd, int wfd, off_t n), (rfd, wfd, n)) __OTORP__(int rfd; int wfd; off_t n;)
 #line 55
 {
-       register off_t  c;
+       off_t   c;
 #ifdef MAPSIZE
        off_t           pos;
        off_t           mapsize;
index bdb1d04b9d2177c948097f8798a2d98249e30dd7..f14cb8685434445f206c22e88e4d0d90fdf5a7f5 100644 (file)
@@ -137,7 +137,7 @@ __STDPP__directive pragma pp:nohide ioctl sleep
 static int             ttctl __PROTO__((int, int, __V_*));
 
 void
-getwinsize __PARAM__((int fd, register int* rows, register int* cols), (fd, rows, cols)) __OTORP__(int fd; register int* rows; register int* cols;)
+getwinsize __PARAM__((int fd, int* rows, int* cols), (fd, rows, cols)) __OTORP__(int fd; int* rows; int* cols;)
 #line 48
 {
 #ifdef TIOCGSIZE
@@ -190,10 +190,10 @@ getwinsize __PARAM__((int fd, register int* rows, register int* cols), (fd, rows
  */
 
 static int
-ttctl __PARAM__((register int fd, int op, __V_* tt), (fd, op, tt)) __OTORP__(register int fd; int op; __V_* tt;)
+ttctl __PARAM__((int fd, int op, __V_* tt), (fd, op, tt)) __OTORP__(int fd; int op; __V_* tt;)
 #line 100
 {
-       register int    v;
+       int     v;
 
        if (fd < 0)
        {
index 1ad3a944fbe55bd8035b45b0e0d63f9ffc5435d8..408cb0d45fe31b86395ea8885a97b02e1b0484f7 100644 (file)
 
 char*
 getpreroot __PARAM__((char* path, const char* cmd), (path, cmd)) __OTORP__(char* path; const char* cmd;){
-       register int    c;
-       register FILE*  fp;
-       register char*  p;
+       int     c;
+       FILE*   fp;
+       char*   p;
        char            buf[PATH_MAX];
 
        if (!path) path = buf;
index f5c4b82a9faf9264283eafe1ef2d1dbb23c17004..ebe9c98cb3441f06fd92b78052405fe66a797e7d 100644 (file)
@@ -98,9 +98,9 @@
 #include <option.h>
 
 void
-setpreroot __PARAM__((register char** argv, const char* dir), (argv, dir)) __OTORP__(register char** argv; const char* dir;){
-       register char*  s;
-       register char** ap;
+setpreroot __PARAM__((char** argv, const char* dir), (argv, dir)) __OTORP__(char** argv; const char* dir;){
+       char*   s;
+       char**  ap;
        int             argc;
        char*           cmd;
        char**          av;
index d305fb531bbb61e2515c70f1ee1f9532311e3a66..cac360345b57808246002d1a89af26fbf7cb0eb4 100644 (file)
@@ -129,7 +129,7 @@ rcerror __PARAM__((char* s), (s)) __OTORP__(char* s;){
 }
 
 static void
-reerr2 __PARAM__((register char* s, int c), (s, c)) __OTORP__(register char* s; int c;){
+reerr2 __PARAM__((char* s, int c), (s, c)) __OTORP__(char* s; int c;){
        char    buf[100];
 
        s = strcopy(buf, s);
@@ -164,7 +164,7 @@ pushand __PARAM__((Inst_t* f, Inst_t* l), (f, l)) __OTORP__(Inst_t* f; Inst_t* l
 
 static Node_t*
 popand __PARAM__((int op), (op)) __OTORP__(int op;){
-       register Inst_t*        inst;
+       Inst_t* inst;
 
        if (re->andp <= &re->andstack[0])
        {
@@ -190,11 +190,11 @@ popator __PARAM__((void), ()){
 }
 
 static void
-evaluntil __PARAM__((register int pri), (pri)) __OTORP__(register int pri;){
-       register Node_t*        op1;
-       register Node_t*        op2;
-       register Inst_t*        inst1;
-       register Inst_t*        inst2;
+evaluntil __PARAM__((int pri), (pri)) __OTORP__(int pri;){
+       Node_t* op1;
+       Node_t* op2;
+       Inst_t* inst1;
+       Inst_t* inst2;
 
        while (pri == RBRA || re->atorp[-1] >= pri)
        {
@@ -262,8 +262,8 @@ evaluntil __PARAM__((register int pri), (pri)) __OTORP__(register int pri;){
 }
 
 static void
-operation __PARAM__((register int t), (t)) __OTORP__(register int t;){
-       register int    thisisand = 0;
+operation __PARAM__((int t), (t)) __OTORP__(int t;){
+       int     thisisand = 0;
 
        switch (t)
        {
@@ -294,7 +294,7 @@ operation __PARAM__((register int t), (t)) __OTORP__(register int t;){
 
 static void
 operand __PARAM__((int t), (t)) __OTORP__(int t;){
-       register Inst_t*        i;
+       Inst_t* i;
 
        /*
         * catenate is implicit
@@ -317,8 +317,8 @@ operand __PARAM__((int t), (t)) __OTORP__(int t;){
 
 static void
 optimize __PARAM__((Re_program_t* pp), (pp)) __OTORP__(Re_program_t* pp;){
-       register Inst_t*        inst;
-       register Inst_t*        target;
+       Inst_t* inst;
+       Inst_t* target;
 
        for (inst = pp->firstinst; inst->type != END; inst++)
        {
@@ -358,7 +358,7 @@ dump __PARAM__((Re_program_t* pp), (pp)) __OTORP__(Re_program_t* pp;){
 
 static int
 nextc __PARAM__((void), ()){
-       register int    c;
+       int     c;
 
        switch (c = *re->exprp++)
        {
@@ -378,10 +378,10 @@ nextc __PARAM__((void), ()){
 
 static void
 bldcclass __PARAM__((void), ()){
-       register int    c1;
-       register int    c2;
-       register char*  map;
-       register int    negate;
+       int     c1;
+       int     c2;
+       char*   map;
+       int     negate;
 
        if (re->nclass >= NCLASS) reerr2("too many character classes -- limit ", NCLASS + '0');
        map = re->classp[re->nclass++].map;
@@ -429,7 +429,7 @@ bldcclass __PARAM__((void), ()){
 
 static int
 lex __PARAM__((void), ()){
-       register int    c;
+       int     c;
 
        switch(c = *re->exprp++)
        {
@@ -523,7 +523,7 @@ lex __PARAM__((void), ()){
 
 reprogram*
 recomp __PARAM__((const char* s, int reflags), (s, reflags)) __OTORP__(const char* s; int reflags;){
-       register int    token;
+       int     token;
        Re_program_t*   pp;
        State_t         restate;
 
index 2b62506549b4e2aa2d7341b66306a96c6f9f751b..5752f30e4ee7aabbf7370969d0bf85890848a2cc 100644 (file)
@@ -109,7 +109,7 @@ typedef struct
  */
 
 static List_t*
-newthread __PARAM__((register List_t* p, register Inst_t* ip, register Subexp_t* sep), (p, ip, sep)) __OTORP__(register List_t* p; register Inst_t* ip; register Subexp_t* sep;){
+newthread __PARAM__((List_t* p, Inst_t* ip, Subexp_t* sep), (p, ip, sep)) __OTORP__(List_t* p; Inst_t* ip; Subexp_t* sep;){
        for (; p->inst; p++)
                if (p->inst == ip)
                {
@@ -123,7 +123,7 @@ newthread __PARAM__((register List_t* p, register Inst_t* ip, register Subexp_t*
 }
 
 static void
-newmatch __PARAM__((register Subexp_t* mp, register Subexp_t* np), (mp, np)) __OTORP__(register Subexp_t* mp; register Subexp_t* np;){
+newmatch __PARAM__((Subexp_t* mp, Subexp_t* np), (mp, np)) __OTORP__(Subexp_t* mp; Subexp_t* np;){
        if (!mp->m[0].sp || np->m[0].sp < mp->m[0].sp || np->m[0].sp == mp->m[0].sp && np->m[0].ep > mp->m[0].ep)
                *mp = *np;
 }
@@ -131,10 +131,10 @@ newmatch __PARAM__((register Subexp_t* mp, register Subexp_t* np), (mp, np)) __O
 int
 reexec __PARAM__((Re_program_t* aprogp, const char* starts), (aprogp, starts)) __OTORP__(Re_program_t* aprogp; const char* starts;){
        Re_program_t*           progp = (Re_program_t*)aprogp;
-       register int            flag = 0;
-       register Inst_t*        inst;
-       register List_t*        tlp;
-       register const char*    s;
+       int             flag = 0;
+       Inst_t* inst;
+       List_t* tlp;
+       const char*     s;
        Subexp_t*               mp;
        int                     checkstart;
        int                     startchar;
index 9a152e6395b14fa066b04a991395fa4891f5b845..6a9f88ca83b459dc22e19c4e79f89a6c58bcb1d8 100644 (file)
  */
 
 static void
-sub __PARAM__((register Sfio_t* dp, register const char* sp, register Match_t* mp, register int flags), (dp, sp, mp, flags)) __OTORP__(register Sfio_t* dp; register const char* sp; register Match_t* mp; register int flags;){
-       register int    c;
+sub __PARAM__((Sfio_t* dp, const char* sp, Match_t* mp, int flags), (dp, sp, mp, flags)) __OTORP__(Sfio_t* dp; const char* sp; Match_t* mp; int flags;){
+       int     c;
        char*           s;
        char*           e;
 
@@ -169,8 +169,8 @@ sub __PARAM__((register Sfio_t* dp, register const char* sp, register Match_t* m
  */
 
 void
-ressub __PARAM__((Re_program_t* re, Sfio_t* dp, register const char* op, const char* sp, int flags), (re, dp, op, sp, flags)) __OTORP__(Re_program_t* re; Sfio_t* dp; register const char* op; const char* sp; int flags;){
-       register Match_t*       mp;
+ressub __PARAM__((Re_program_t* re, Sfio_t* dp, const char* op, const char* sp, int flags), (re, dp, op, sp, flags)) __OTORP__(Re_program_t* re; Sfio_t* dp; const char* op; const char* sp; int flags;){
+       Match_t*        mp;
 
        mp = re->subexp.m;
        do
index e95d8ba7ff3290b679b03c144f1ecdfc1e72e3b4..8c52fe40f806a3c0453cf635c6489a610ce3194d 100644 (file)
@@ -99,8 +99,8 @@
  */
 
 static char*
-sub __PARAM__((register const char* sp, register char* dp, register Match_t* mp, int flags), (sp, dp, mp, flags)) __OTORP__(register const char* sp; register char* dp; register Match_t* mp; int flags;){
-       register int    i;
+sub __PARAM__((const char* sp, char* dp, Match_t* mp, int flags), (sp, dp, mp, flags)) __OTORP__(const char* sp; char* dp; Match_t* mp; int flags;){
+       int     i;
        char*           s;
 
        NoP(flags);
@@ -147,8 +147,8 @@ sub __PARAM__((register const char* sp, register char* dp, register Match_t* mp,
  */
 
 char*
-resub __PARAM__((Re_program_t* re, register const char* op, const char* sp, register char* dp, int flags), (re, op, sp, dp, flags)) __OTORP__(Re_program_t* re; register const char* op; const char* sp; register char* dp; int flags;){
-       register Match_t*       mp;
+resub __PARAM__((Re_program_t* re, const char* op, const char* sp, char* dp, int flags), (re, op, sp, dp, flags)) __OTORP__(Re_program_t* re; const char* op; const char* sp; char* dp; int flags;){
+       Match_t*        mp;
 
        mp = re->subexp.m;
        do
index adf65239108806ce1426a3ff34c6a6210cb953b2..aff786925ec5a443ef749e66a84e05ba02f98f89 100644 (file)
@@ -154,7 +154,7 @@ reg Sfio_t* f;
                f->disc = NIL(Sfdisc_t*);
        }
 
-       /* tell the register function */
+       /* tell the function */
        if(_Sfnotify)
                (*_Sfnotify)(f,SF_CLOSE,f->file);
 
index beff9cbbf774f32202d40a4b4f12c5cd2a952b24..7e1e2952bac9312123c3db3b4d18e79faa0a09a6 100644 (file)
@@ -196,8 +196,8 @@ _END_EXTERNS_
 #define uchar          unsigned char
 #define ulong          unsigned long
 #define uint           unsigned int
-#define reg            register
-#define REG            register
+#define reg            /*NO register keyword*/
+#define REG            reg
 
 #define SECOND         1000    /* millisecond units */
 
index 7d9cb73ea3cb96994ac6a032cae46cd847023442..c3028078e883622e06aae6f9beb0265a687eab53 100644 (file)
@@ -49,8 +49,8 @@
 _stdvsprintf(char *s, const char *form, va_list args)
 #else
 _stdvsprintf(s,form,args)
-register char  *s;
-register char  *form;
+char   *s;
+char   *form;
 va_list                args;
 #endif
 {
index b79927d64094a2b5e20f4197121c44883122a945..e81b3d513923a8b866acbbe9da988dbf72a40ede 100644 (file)
@@ -49,8 +49,8 @@
 _stdvsscanf(char *s, const char *form, va_list args)
 #else
 _stdvsscanf(s,form,args)
-register char  *s;
-register char  *form;
+char   *s;
+char   *form;
 va_list                args;
 #endif
 {
index 686d9d337a9c1d2f424a1e59e6345a586d2d3490..605a91b75f98bb2abe00128991160fa7440ba4f3 100644 (file)
@@ -93,9 +93,9 @@
 #include <ast.h>
 
 int
-chresc __PARAM__((register const char* s, char** p), (s, p)) __OTORP__(register const char* s; char** p;){
-       register const char*    q;
-       register int            c;
+chresc __PARAM__((const char* s, char** p), (s, p)) __OTORP__(const char* s; char** p;){
+       const char*     q;
+       int             c;
 
        switch (c = *s++)
        {
index e51b3d15ee8c52eaebe50553767686b90def5eb5..a2173fd22289946c5450a0e0ebe01e3e57936335 100644 (file)
 #include <ast.h>
 
 int
-chrtoi __PARAM__((register const char* s), (s)) __OTORP__(register const char* s;){
-       register int    c;
-       register int    n;
-       register int    x;
+chrtoi __PARAM__((const char* s), (s)) __OTORP__(const char* s;){
+       int     c;
+       int     n;
+       int     x;
        char*           p;
 
        c = 0;
index 9beea11fbf7569b0ca394011c8cb86346d261238..87f216deec0a86bc638b64cd2cb845f27548f827 100644 (file)
@@ -93,7 +93,7 @@
 #include <ast.h>
 
 char*
-fmtbase __PARAM__((register long n, register int b, int p), (n, b, p)) __OTORP__(register long n; register int b; int p;){
+fmtbase __PARAM__((long n, int b, int p), (n, b, p)) __OTORP__(long n; int b; int p;){
        static char     buf[36];
 
        if (n == 0 || b == 0) sfsprintf(buf, sizeof(buf), "%ld", n);
index 761a4d82ca27e0ee45c61aa8002374915272531b..959c570fcb0c53226301d809648341997ceb3662 100644 (file)
@@ -93,8 +93,8 @@
 #include <ast.h>
 
 char*
-fmtelapsed __PARAM__((register unsigned long t, register int n), (t, n)) __OTORP__(register unsigned long t; register int n;){
-       register unsigned long  s;
+fmtelapsed __PARAM__((unsigned long t, int n), (t, n)) __OTORP__(unsigned long t; int n;){
+       unsigned long   s;
 
        static int              amt[] = { 1, 60, 60, 24, 7, 4, 12, 20 };
        static char             chr[] = "smhdwMYS";
index 2dad5cf6db3934d69cf7fa8762798c1bda5eea5d..3e6453a308360eb51a8e77c9ee174025067c79ed 100644 (file)
@@ -96,9 +96,9 @@
 
 char*
 fmtesc __PARAM__((const char* as), (as)) __OTORP__(const char* as;){
-       register unsigned char* s = (unsigned char*)as;
-       register char*          b;
-       register int            c;
+       unsigned char*  s = (unsigned char*)as;
+       char*           b;
+       int             c;
 
        static char*            buf;
        static int              bufsiz;
index b0721d147cef1d303e71a88b4a95c13b1f055b0e..21cf21bde2131184f06fdbf475f67ea43fd246c9 100644 (file)
@@ -162,10 +162,10 @@ struct    mntent
 
 static struct mntent*
 getmntent __PARAM__((FILE* mp), (mp)) __OTORP__(FILE* mp;){
-       register int            c;
-       register char*          s;
-       register char*          m;
-       register int            q;
+       int             c;
+       char*           s;
+       char*           m;
+       int             q;
        static struct mntent    e;
 
        q = 0;
@@ -225,9 +225,9 @@ endmntent __PARAM__((FILE* mp), (mp)) __OTORP__(FILE* mp;){
 
 char*
 fmtfs __PARAM__((struct stat* st), (st)) __OTORP__(struct stat* st;){
-       register FILE*          mp;
-       register struct mntent* mnt;
-       register char*          s;
+       FILE*           mp;
+       struct mntent*  mnt;
+       char*           s;
        struct stat             rt;
 
        static Hash_table_t*    tab;
index e5f51ffc07f848e6bdc5588aa304fcc02382fa3b..b3f510f12b7c84f6781faa517d7c929286a2df4a 100644 (file)
@@ -120,8 +120,8 @@ extern __MANGLE__ struct group*     getgrgid __PROTO__((gid_t));
 
 char*
 fmtgid __PARAM__((int gid), (gid)) __OTORP__(int gid;){
-       register char*          name;
-       register struct group*  gr;
+       char*           name;
+       struct group*   gr;
 
        static Hash_table_t*    gidtab;
        static char             buf[sizeof(int) * 3 + 1];
index 2dfa8ad5a0b763327d99c88802b410551fef2d45..480905a1a89850ae0626ad802caf78f5679333cf 100644 (file)
  */
 
 char*
-fmtls __PARAM__((char* buf, const char* name, register struct stat* st, const char* info, const char* link, register int flags), (buf, name, st, info, link, flags)) __OTORP__(char* buf; const char* name; register struct stat* st; const char* info; const char* link; register int flags;){
-       register char*          s;
+fmtls __PARAM__((char* buf, const char* name, struct stat* st, const char* info, const char* link, int flags), (buf, name, st, info, link, flags)) __OTORP__(char* buf; const char* name; struct stat* st; const char* info; const char* link; int flags;){
+       char*           s;
        time_t                  tm;
 
        s = buf;
index 1906ada29c562e1496c113408f5871c26f90cecb..473e74c6743d464d66ec1e4e6ece6e7cfe97a6de 100644 (file)
 
 char*
 fmtmatch __PARAM__((const char* as), (as)) __OTORP__(const char* as;){
-       register char*  s = (char*)as;
-       register int    c;
-       register char*  t;
-       register char** p;
-       register char*  b;
+       char*   s = (char*)as;
+       int     c;
+       char*   t;
+       char**  p;
+       char*   b;
        char*           x;
        char*           y;
        int             a;
index c0eeb1e6835a0ecbdc58ca279c0e73861f34d4cc..1aa769f0ef775e551fe26b0649df4414a49b482b 100644 (file)
@@ -93,9 +93,9 @@
 #include "modelib.h"
 
 char*
-fmtmode __PARAM__((register int mode, int external), (mode, external)) __OTORP__(register int mode; int external;){
-       register char*          s;
-       register struct modeop* p;
+fmtmode __PARAM__((int mode, int external), (mode, external)) __OTORP__(int mode; int external;){
+       char*           s;
+       struct modeop*  p;
 
        static char             buf[MODELEN + 1];
 
index 85a47a6d28dd06a63fef58148fccfd40451fa860..b2c0e7ce9e2d75883866ccafd92cfad7a27614c0 100644 (file)
@@ -94,9 +94,9 @@
 #include <ls.h>
 
 char*
-fmtperm __PARAM__((register int perm), (perm)) __OTORP__(register int perm;){
-       register char*  s;
-       register char*  p;
+fmtperm __PARAM__((int perm), (perm)) __OTORP__(int perm;){
+       char*   s;
+       char*   p;
        char*           o;
        int             c;
 
index 15ff817b28a57a56ba84890fcc68f18e801c87eb..51a79616e79536d11b9c77aa2284778226ba47f1 100644 (file)
 
 char*
 fmtre __PARAM__((const char* as), (as)) __OTORP__(const char* as;){
-       register char*  s = (char*)as;
-       register int    c;
-       register char*  t;
-       register char*  p;
+       char*   s = (char*)as;
+       int     c;
+       char*   t;
+       char*   p;
        int             n;
        char            stack[32];
 
index dcf9f69a4e58ef043aede9975890df531524d78a..df84f94b2fe79bb0502f65bea88339903ce5e4ea 100644 (file)
@@ -94,7 +94,7 @@
 #include <sig.h>
 
 char*
-fmtsignal __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){
+fmtsignal __PARAM__((int sig), (sig)) __OTORP__(int sig;){
        static char     buf[20];
 
        if (sig >= 0)
index b985a858019a48367e3fa9de4f35a4f9af057def..f08115631ec47996b6aaa939a03aeddbf8ce921d 100644 (file)
@@ -120,8 +120,8 @@ extern __MANGLE__ struct passwd*    getpwuid __PROTO__((uid_t));
 
 char*
 fmtuid __PARAM__((int uid), (uid)) __OTORP__(int uid;){
-       register char*          name;
-       register struct passwd* pw;
+       char*           name;
+       struct passwd*  pw;
 
        static Hash_table_t*    uidtab;
        static char             buf[sizeof(int) * 3 + 1];
index b516b9d5001778f939143e194e000c352ab4732d..cc425018491db833bbf11c17b2b43029a622ed09 100644 (file)
@@ -139,9 +139,9 @@ static unsigned char atoe[] =
  */
 
 void
-mematoe __PARAM__((__V_* aop, const __V_* aip, register size_t n), (aop, aip, n)) __OTORP__(__V_* aop; const __V_* aip; register size_t n;){
-       register unsigned char*         op = (unsigned char*)aop;
-       register const unsigned char*   ip = (const unsigned char*)aip;
+mematoe __PARAM__((__V_* aop, const __V_* aip, size_t n), (aop, aip, n)) __OTORP__(__V_* aop; const __V_* aip; size_t n;){
+       unsigned char*          op = (unsigned char*)aop;
+       const unsigned char*    ip = (const unsigned char*)aip;
 
        while (n-- > 0) *op++ = atoe[*ip++];
 }
index 7ba8afbdef855fc8c964f91af133a3e550f5f396..4de75e9e88b158c2e875471f87a2fee573342c04 100644 (file)
@@ -103,8 +103,8 @@ NoN(memdup)
  */
 
 __V_*
-memdup __PARAM__((register const __V_* s, register size_t n), (s, n)) __OTORP__(register const __V_* s; register size_t n;){
-       register __V_*  t;
+memdup __PARAM__((const __V_* s, size_t n), (s, n)) __OTORP__(const __V_* s; size_t n;){
+       __V_*   t;
 
        return((t = (__V_*)newof(0, char, n, 0)) ? memcpy(t, s, n) : 0);
 }
index d08ef142c2701b3246cb6846b0b156bfa5c5663c..5a49d21af5d566a15f082d5fe8855be81072d045 100644 (file)
@@ -139,9 +139,9 @@ static unsigned char etoa[] =
  */
 
 void
-memetoa __PARAM__((__V_* aop, const __V_* aip, register size_t n), (aop, aip, n)) __OTORP__(__V_* aop; const __V_* aip; register size_t n;){
-       register unsigned char*         op = (unsigned char*)aop;
-       register const unsigned char*   ip = (const unsigned char*)aip;
+memetoa __PARAM__((__V_* aop, const __V_* aip, size_t n), (aop, aip, n)) __OTORP__(__V_* aop; const __V_* aip; size_t n;){
+       unsigned char*          op = (unsigned char*)aop;
+       const unsigned char*    ip = (const unsigned char*)aip;
 
        while (n-- > 0) *op++ = etoa[*ip++];
 }
index d6a0488b79c8e812bd42a48a898498a32bd0e7f4..970f73e80b9c4e9e535c13fabba5eb7d4a9a32e8 100644 (file)
 #undef modei
 
 int
-modei __PARAM__((register int x), (x)) __OTORP__(register int x;){
+modei __PARAM__((int x), (x)) __OTORP__(int x;){
 #if _S_IDPERM
        return(x & X_IPERM);
 #else
-       register int    i;
-       register int    c;
+       int     i;
+       int     c;
 
        i = 0;
        for (c = 0; c < PERMLEN; c += 2)
index 1250eff5edfe3c2f262961827efaed996b736c47..3597c9db6c36ae48cd4fd74d220125d942a1fac6 100644 (file)
 #undef modex
 
 int
-modex __PARAM__((register int i), (i)) __OTORP__(register int i;){
+modex __PARAM__((int i), (i)) __OTORP__(int i;){
 #if _S_IDPERM && _S_IDTYPE
        return(i);
 #else
-       register int    x;
-       register int    c;
+       int     x;
+       int     c;
 
        x = 0;
 #if _S_IDPERM
index 7f531741e41ed3c56370c16bcf1c22f29d384e23..c5deba64405b2844024b8b55cfc8120b328be968 100644 (file)
@@ -97,7 +97,7 @@
  */
 
 char*
-strcopy __PARAM__((register char* s, register const char* t), (s, t)) __OTORP__(register char* s; register const char* t;){
+strcopy __PARAM__((char* s, const char* t), (s, t)) __OTORP__(char* s; const char* t;){
        if (!t) return(s);
        while (*s++ = *t++);
        return(--s);
index 83f56193361b0581ad143b8f8cad5ade2078b8d0..3add14292d0be71c29c90e3984a36dd751c2b005 100644 (file)
@@ -97,9 +97,9 @@
  */
 
 char*
-strdup __PARAM__((register const char* s), (s)) __OTORP__(register const char* s;){
-       register char*  t;
-       register int    n;
+strdup __PARAM__((const char* s), (s)) __OTORP__(const char* s;){
+       char*   t;
+       int     n;
 
        return((t = newof(0, char, n = strlen(s) + 1, 0)) ? (char*)memcpy(t, s, n) : 0);
 }
index 46c6f74dc32188b0e17875ccebd3f06de27bf6d1..431c27557081abecf37f111c1bc3988dde3dab29 100644 (file)
@@ -94,9 +94,9 @@
 #include <ctype.h>
 
 unsigned long
-strelapsed __PARAM__((register const char* s, char** e, int n), (s, e, n)) __OTORP__(register const char* s; char** e; int n;){
-       register int            c;
-       register unsigned long  v;
+strelapsed __PARAM__((const char* s, char** e, int n), (s, e, n)) __OTORP__(const char* s; char** e; int n;){
+       int             c;
+       unsigned long   v;
        unsigned long           t = 0;
        int                     f = 0;
        int                     m;
index f1d7f90607b8c09bbd376f98a76c37da9d3e372f..3efff56539450be94219c807c8a002f75bb9da48 100644 (file)
@@ -93,9 +93,9 @@
 #include <ast.h>
 
 int
-stresc __PARAM__((register char* s), (s)) __OTORP__(register char* s;){
-       register char*  t;
-       register int    c;
+stresc __PARAM__((char* s), (s)) __OTORP__(char* s;){
+       char*   t;
+       int     c;
        char*           b;
        char*           p;
 
index 2380271267e1f6df1a3942e118e3970b75fb4098..b29b5e019aba7a1fd90974ed369d79c47b034156 100644 (file)
@@ -113,7 +113,7 @@ typedef struct                              /* expression handle            */
  */
 
 static long
-seterror __PARAM__((register Expr_t* ex, char* msg), (ex, msg)) __OTORP__(register Expr_t* ex; char* msg;){
+seterror __PARAM__((Expr_t* ex, char* msg), (ex, msg)) __OTORP__(Expr_t* ex; char* msg;){
        if (!ex->errmsg) ex->errmsg = msg;
        ex->errchr = ex->nextchr;
        ex->nextchr = "";
@@ -125,10 +125,10 @@ seterror __PARAM__((register Expr_t* ex, char* msg), (ex, msg)) __OTORP__(regist
  */
 
 static long
-expr __PARAM__((register Expr_t* ex, register int precedence), (ex, precedence)) __OTORP__(register Expr_t* ex; register int precedence;){
-       register int    c;
-       register long   n;
-       register long   x;
+expr __PARAM__((Expr_t* ex, int precedence), (ex, precedence)) __OTORP__(Expr_t* ex; int precedence;){
+       int     c;
+       long    n;
+       long    x;
        char*           pos;
        int             operand = 1;
 
index a017ab4ba36487e876f0b61d9468e5971c21a9ba..c2095472c4cbac374cfd546fe24d8d13be4dccff 100644 (file)
@@ -136,9 +136,9 @@ typedef struct
 
 int
 strgid __PARAM__((const char* name), (name)) __OTORP__(const char* name;){
-       register struct group*  gr;
-       register struct passwd* pw;
-       register bucket*        b;
+       struct group*   gr;
+       struct passwd*  pw;
+       bucket* b;
        char*                   e;
 
        static Hash_table_t*    gidtab;
index 21e80aa1309f0ab2e541dc18ffb7fc4d3570d697..a52da940234ebe3721acdb24643e5a3a70b9df3d 100644 (file)
  */
 
 __V_*
-strlook __PARAM__((const __V_* tab, int siz, register const char* name), (tab, siz, name)) __OTORP__(const __V_* tab; int siz; register const char* name;){
-       register char*  t = (char*)tab;
-       register char*  s;
+strlook __PARAM__((const __V_* tab, int siz, const char* name), (tab, siz, name)) __OTORP__(const __V_* tab; int siz; const char* name;){
+       char*   t = (char*)tab;
+       char*   s;
 
        for (; s = *((char**)t); t += siz)
                if (streq(s, name))
index 195f4a1297e3d315d8b812fda71bef418e1d4c2d..886646e38ba67ed0ec8d04d99f65852630cbe1cd 100644 (file)
@@ -212,9 +212,9 @@ extern __MANGLE__ int               fnmatch __PROTO__((const char*, const char*, int));
  */
 
 static char*
-gobble __PARAM__((Match_t* mp, register char* s, register int sub, int* g, int clear), (mp, s, sub, g, clear)) __OTORP__(Match_t* mp; register char* s; register int sub; int* g; int clear;){
-       register int    p = 0;
-       register char*  b = 0;
+gobble __PARAM__((Match_t* mp, char* s, int sub, int* g, int clear), (mp, s, sub, g, clear)) __OTORP__(Match_t* mp; char* s; int sub; int* g; int clear;){
+       int     p = 0;
+       char*   b = 0;
        int             c = 0;
        int             n;
 
@@ -262,7 +262,7 @@ gobble __PARAM__((Match_t* mp, register char* s, register int sub, int* g, int c
        }
 }
 
-static int     grpmatch __PROTO__((Match_t*, int, char*, register char*, char*, int));
+static int     grpmatch __PROTO__((Match_t*, int, char*, char*, char*, int));
 
 #if _DEBUG_MATCH
 static long            test;
@@ -278,9 +278,9 @@ static long         test;
 
 static int
 onematch __PARAM__((Match_t* mp, int g, char* s, char* p, char* e, char* r, int flags), (mp, g, s, p, e, r, flags)) __OTORP__(Match_t* mp; int g; char* s; char* p; char* e; char* r; int flags;){
-       register int    pc;
-       register int    sc;
-       register int    n;
+       int     pc;
+       int     sc;
+       int     n;
        char*           olds;
        char*           oldp;
 
@@ -687,8 +687,8 @@ onematch __PARAM__((Match_t* mp, int g, char* s, char* p, char* e, char* r, int
  */
 
 static int
-grpmatch __PARAM__((Match_t* mp, int g, char* s, register char* p, char* e, int flags), (mp, g, s, p, e, flags)) __OTORP__(Match_t* mp; int g; char* s; register char* p; char* e; int flags;){
-       register char*  a;
+grpmatch __PARAM__((Match_t* mp, int g, char* s, char* p, char* e, int flags), (mp, g, s, p, e, flags)) __OTORP__(Match_t* mp; int g; char* s; char* p; char* e; int flags;){
+       char*   a;
 
 #if _DEBUG_MATCH
        error_info.indent++;
@@ -719,8 +719,8 @@ grpmatch __PARAM__((Match_t* mp, int g, char* s, register char* p, char* e, int
 
 int
 strgrpmatch __PARAM__((const char* b, const char* p, int* sub, int n, int flags), (b, p, sub, n, flags)) __OTORP__(const char* b; const char* p; int* sub; int n; int flags;){
-       register int    i;
-       register char*  s;
+       int     i;
+       char*   s;
        char*           e;
        Match_t         match;
 
index 54c3cabaa617a070bdd0c3e20ae50252c716fb4a..7841eb69ffe62c5b78854ea05705d7519bf5d9c9 100644 (file)
 #include "modelib.h"
 
 int
-strmode __PARAM__((register const char* s), (s)) __OTORP__(register const char* s;){
-       register int            c;
-       register char*          t;
-       register struct modeop* p;
+strmode __PARAM__((const char* s), (s)) __OTORP__(const char* s;){
+       int             c;
+       char*           t;
+       struct modeop*  p;
        int                     mode;
 
        mode = 0;
index df0264f7d9004226d58f285e9bac2c5789d7d71c..5f089f0609ad44a72a713d7d05680b0b2765765b 100644 (file)
 
 int
 stropt __PARAM__((const char* as, const __V_* tab, int siz, int(*f)(__V_*, const __V_*, int, const char*), __V_* a), (as, tab, siz, f, a)) __OTORP__(const char* as; const __V_* tab; int siz; int(*f)(); __V_* a;){
-       register int    c;
-       register char*  s;
-       register char*  v;
-       register char*  t;
+       int     c;
+       char*   s;
+       char*   v;
+       char*   t;
        char**          p;
        char*           u;
        char*           x;
index c2a81b3b2e7eb197bc60f6035fc660e557019927..9276d1b50c6b8c51a9465d12347d7b7023a2db05 100644 (file)
 #include <modex.h>
 
 int
-strperm __PARAM__((const char* aexpr, char** e, register int perm), (aexpr, e, perm)) __OTORP__(const char* aexpr; char** e; register int perm;){
-       register char*  expr = (char*)aexpr;
-       register int    c;
-       register int    typ;
-       register int    who;
+strperm __PARAM__((const char* aexpr, char** e, int perm), (aexpr, e, perm)) __OTORP__(const char* aexpr; char** e; int perm;){
+       char*   expr = (char*)aexpr;
+       int     c;
+       int     typ;
+       int     who;
        int             num;
        int             op;
 
index 2be505b2b2a2c4f2cb02611d5eb8ec46c94b709a..cbf71601d27bb8fedc3743643d4faaaf72ac7c05 100644 (file)
 #include <sig.h>
 
 char*
-strsignal __PARAM__((register int sig), (sig)) __OTORP__(register int sig;)
+strsignal __PARAM__((int sig), (sig)) __OTORP__(int sig;)
 #line 17
 {
        static char     buf[20];
index 65e8508f92e17a7adc5f7a2a828b1323df362a74..3f938a72b6df129777bddbb438c183b6b9782a2f 100644 (file)
 #endif
 void
 strsort __PARAM__((char** argv, int n, int(*fn)(const char*, const char*)), (argv, n, fn)) __OTORP__(char** argv; int n; int(*fn)();){
-       register int    i;
-       register int    j;
-       register int    m;
-       register char** ap;
+       int     i;
+       int     j;
+       int     m;
+       char**  ap;
        char*           s;
        int             k;
 
index ce14bf1baa3100c063be13a2e71b41e302f7e6e6..36c3f70584476369986f3a0f8da99d2d303b9944 100644 (file)
@@ -93,7 +93,7 @@
 #include <ast.h>
 
 char*
-strtape __PARAM__((register const char* s, register char** e), (s, e)) __OTORP__(register const char* s; register char** e;){
+strtape __PARAM__((const char* s, char** e), (s, e)) __OTORP__(const char* s; char** e;){
        int             mtunit = '0';
        int             mtdensity = 0;
        char            mtrewind[2];
index 78c0108a4f6e7babdd8aa2d142a15778b68ec23e..7d13118a4f109b44c680b08a5f54307dfc232295 100644 (file)
 #include <ctype.h>
 
 long
-strton __PARAM__((register const char* s, char** e, char* b, int m), (s, e, b, m)) __OTORP__(register const char* s; char** e; char* b; int m;){
-       register long           n;
-       register int            c;
-       register int            r;
-       register const char*    p;
+strton __PARAM__((const char* s, char** e, char* b, int m), (s, e, b, m)) __OTORP__(const char* s; char** e; char* b; int m;){
+       long            n;
+       int             c;
+       int             r;
+       const char*     p;
        int                     z;
 
        if (!b || (r = *b) < 0 || r > 64) r = 0;
index fbf44913f6d2b14ab4884599033f83be6857e185..dbd1ea157047cd178aa4f71345469ea6916ea16b 100644 (file)
@@ -131,8 +131,8 @@ typedef struct
 
 int
 struid __PARAM__((const char* name), (name)) __OTORP__(const char* name;){
-       register struct passwd* pw;
-       register bucket*        b;
+       struct passwd*  pw;
+       bucket* b;
        char*                   e;
 
        static Hash_table_t*    uidtab;
index f1d810e5cf519f99a80495a8a046dc4997506840..05bd5c46c358eb0b10082a017af72d4c1a6a8180 100644 (file)
@@ -99,8 +99,8 @@
 
 int_max
 swapget __PARAM__((int op, const __V_* b, int n), (op, b, n)) __OTORP__(int op; const __V_* b; int n;){
-       register unsigned char* p;
-       register unsigned char* d;
+       unsigned char*  p;
+       unsigned char*  d;
        int_max                 v;
        unsigned char           tmp[sizeof(int_max)];
 
index c88cec823755844b18c6554398c5341cfa6bebe9..0b7d3880200c9d6b00f0bc600e811e9978fb83a1 100644 (file)
  */
 
 __V_*
-swapmem __PARAM__((int op, const __V_* from, __V_* to, register size_t n), (op, from, to, n)) __OTORP__(int op; const __V_* from; __V_* to; register size_t n;){
-       register char*  f = (char*)from;
-       register char*  t = (char*)to;
-       register int    c;
+swapmem __PARAM__((int op, const __V_* from, __V_* to, size_t n), (op, from, to, n)) __OTORP__(int op; const __V_* from; __V_* to; size_t n;){
+       char*   f = (char*)from;
+       char*   t = (char*)to;
+       int     c;
 
        switch ((op ^ int_swap) & (n - 1))
        {
index 62ea88c7f14e765d2141798c4e7a09673ca96510..51f83fbf7d618075b09dadaa6202ec09bc69fcfd 100644 (file)
@@ -99,7 +99,7 @@
 
 int
 swapop __PARAM__((const __V_* internal, const __V_* external, int size), (internal, external, size)) __OTORP__(const __V_* internal; const __V_* external; int size;){
-       register int    op;
+       int     op;
        char            tmp[sizeof(int_max)];
 
        if (size <= 1)
index ebc4660121fbaff22ea1af1a902e728a3d01d819..b26bd3506cfbe9b3cfcc2ecf88e5facb7f62fef8 100644 (file)
@@ -99,7 +99,7 @@
 
 __V_*
 swapput __PARAM__((int op, __V_* b, int n, int_max v), (op, b, n, v)) __OTORP__(int op; __V_* b; int n; int_max v;){
-       register char*  p = (char*)b + n;
+       char*   p = (char*)b + n;
 
        while (p > (char*)b)
        {
index 799ac88dd7bb0517b40d8494baa1fd472d283f1b..6eb8f707339bfb42c617f2b7e906d9c6b035d7dc 100644 (file)
  */
 
 int
-tabindex __PARAM__((char* tab, int siz, register char* name), (tab, siz, name)) __OTORP__(char* tab; int siz; register char* name;)
+tabindex __PARAM__((char* tab, int siz, char* name), (tab, siz, name)) __OTORP__(char* tab; int siz; char* name;)
 #line 18
 {
-       register char*  p;
-       register char*  s;
+       char*   p;
+       char*   s;
 
        for (p = tab; s = *((char**)p); p += siz)
                if (streq(s, name))
index 489977b3cd9e2f58dc2e92c5b168b4c0ceb1fe72..1fb9a6298cc300c23ba143ef8690757c070fe065 100644 (file)
  */
 
 char*
-tablook __PARAM__((register char* tab, int siz, register char* name), (tab, siz, name)) __OTORP__(register char* tab; int siz; register char* name;)
+tablook __PARAM__((char* tab, int siz, char* name), (tab, siz, name)) __OTORP__(char* tab; int siz; char* name;)
 #line 18
 {
-       register char*  s;
+       char*   s;
 
        for (; s = *((char**)tab); tab += siz)
                if (streq(s, name))
index 77cf61bf4265d53d00febbba9a05d2e02c41b36d..4ffdce4e0b5fd982d01400eb4e31d91ffbebe390 100644 (file)
@@ -113,8 +113,8 @@ static struct tok*  freelist;
  */
 
 char*
-tokopen __PARAM__((register char* s, int f), (s, f)) __OTORP__(register char* s; int f;){
-       register TOK*   p;
+tokopen __PARAM__((char* s, int f), (s, f)) __OTORP__(char* s; int f;){
+       TOK*    p;
 
        if (p = freelist) freelist = freelist->ptr.nxt;
        else if (!(p = newof(0, TOK, 1, 0))) return(0);
@@ -130,7 +130,7 @@ tokopen __PARAM__((register char* s, int f), (s, f)) __OTORP__(register char* s;
 
 void
 tokclose __PARAM__((char* u), (u)) __OTORP__(char* u;){
-       register TOK*   p = (TOK*)u;
+       TOK*    p = (TOK*)u;
 
        if (p->flg) *p->ptr.end = p->chr;
        p->ptr.nxt = freelist;
@@ -146,11 +146,11 @@ tokclose __PARAM__((char* u), (u)) __OTORP__(char* u;){
 
 char*
 tokread __PARAM__((char* u), (u)) __OTORP__(char* u;){
-       register TOK*   p = (TOK*)u;
-       register char*  s;
-       register char*  r;
-       register int    q;
-       register int    c;
+       TOK*    p = (TOK*)u;
+       char*   s;
+       char*   r;
+       int     q;
+       int     c;
 
        /*
         * restore string on each call
index 31799b37759355b01051f624bee87cb87d37e929..cf0655be234043d73d6117671ebb3d025908d0a8 100644 (file)
@@ -107,11 +107,11 @@ typedef struct
 static int
 splice __PARAM__((Sfio_t* s, int op, Sfdisc_t* ad), (s, op, ad)) __OTORP__(Sfio_t* s; int op; Sfdisc_t* ad;){
        SPLICE*         d = (SPLICE*)ad;
-       register char*  b;
-       register int    c;
-       register int    n;
-       register int    q;
-       register char*  e;
+       char*   b;
+       int     c;
+       int     n;
+       int     q;
+       char*   e;
        char*           buf;
 
        switch (op)
index 87850ee5a8dbf1961d97820f19839318f6870335..e669121e1ad46bdb1a744b7772ba8fa19d7b2cc6 100644 (file)
@@ -101,9 +101,9 @@ static char empty[1];
  */
 
 static char*
-lextok __PARAM__((register char* s, register int c, char** p, int* n), (s, c, p, n)) __OTORP__(register char* s; register int c; char** p; int* n;){
-       register char*  t;
-       register int    q;
+lextok __PARAM__((char* s, int c, char** p, int* n), (s, c, p, n)) __OTORP__(char* s; int c; char** p; int* n;){
+       char*   t;
+       int     q;
        char*           b;
        char*           u;
 
@@ -198,10 +198,10 @@ lextok __PARAM__((register char* s, register int c, char** p, int* n), (s, c, p,
  */
 
 int
-tokscan __PARAM__((register char* s, char** nxt, const char* fmt, ...), (va_alist)) __OTORP__(va_dcl)
-{ __OTORP__(register char* s; char** nxt; const char* fmt; )
-       register int    c;
-       register char*  f;
+tokscan __PARAM__((char* s, char** nxt, const char* fmt, ...), (va_alist)) __OTORP__(va_dcl)
+{ __OTORP__(char* s; char** nxt; const char* fmt; )
+       int     c;
+       char*   f;
        int             num = 0;
        char*           skip = 0;
        int             q;
index 021f7d0876d0f016e5a742768111931f9760ecbd..12d85144e947b58a73476af706d1ebdf32176b21 100644 (file)
  */
 
 time_t
-tmdate __PARAM__((register const char* s, char** e, time_t* clock), (s, e, clock)) __OTORP__(register const char* s; char** e; time_t* clock;){
-       register Tm_t*  tm;
-       register int    n;
+tmdate __PARAM__((const char* s, char** e, time_t* clock), (s, e, clock)) __OTORP__(const char* s; char** e; time_t* clock;){
+       Tm_t*   tm;
+       int     n;
        int             state;
        time_t          now;
        char*           t;
index 44ecc3d29b348f6493b80d300e9e5caeb829b1df..a55440ea4a2b7b17cb5e1035566a9a31c276abb7 100644 (file)
  */
 
 Tm_t*
-tmfix __PARAM__((register Tm_t* tp), (tp)) __OTORP__(register Tm_t* tp;){
-       register int    n;
+tmfix __PARAM__((Tm_t* tp), (tp)) __OTORP__(Tm_t* tp;){
+       int     n;
 
        if ((n = tp->tm_sec) < 0)
        {
index 22ac523f78fd10eac1c0c446310e0bb55765e470..dd7a71345f44c87f77c06d8b265cedb6c67a4363 100644 (file)
  */
 
 static char*
-number __PARAM__((register char* s, register char* e, register long n, register int p), (s, e, n, p)) __OTORP__(register char* s; register char* e; register long n; register int p;){
+number __PARAM__((char* s, char* e, long n, int p), (s, e, n, p)) __OTORP__(char* s; char* e; long n; int p;){
        if (p > 0) s += sfsprintf(s, 64, "%0*lu", p, n);
        else if (p < 0) s += sfsprintf(s, 64, "%*lu", -p, n);
        else s += sfsprintf(s, e - s, "%lu", n);
@@ -119,10 +119,10 @@ number __PARAM__((register char* s, register char* e, register long n, register
 
 char*
 tmfmt __PARAM__((char* buf, size_t len, const char* format, time_t* clock), (buf, len, format, clock)) __OTORP__(char* buf; size_t len; const char* format; time_t* clock;){
-       register char*  cp;
-       register char*  ep;
-       register char*  p;
-       register int    n;
+       char*   cp;
+       char*   ep;
+       char*   p;
+       int     n;
        int             c;
        int             i;
        int             flags;
index f4968580b2d027776050a78a2700c18d186231db..ad210c93585a81c805de21b5981006c3196b1293 100644 (file)
  */
 
 int
-tmgoff __PARAM__((register const char* s, char** e, int d), (s, e, d)) __OTORP__(register const char* s; char** e; int d;){
-       register int    n;
+tmgoff __PARAM__((const char* s, char** e, int d), (s, e, d)) __OTORP__(const char* s; char** e; int d;){
+       int     n;
        char*           t;
 
        if (isdigit(n = *s) || n == '-' || n == '+')
index 4aceda962e23c06afe92377a2c126571358d0248..1c2679ca90d27fd5ab58af226fe34b3bcdf0908a 100644 (file)
@@ -139,9 +139,9 @@ Tm_info_t           tm_info;
 
 static int
 tzwest __PARAM__((time_t* clock, int* isdst), (clock, isdst)) __OTORP__(time_t* clock; int* isdst;){
-       register Tm_t*  tp;
-       register int    n;
-       register int    m;
+       Tm_t*   tp;
+       int     n;
+       int     m;
        int             h;
 
        /*
@@ -198,9 +198,9 @@ tmopt __PARAM__((__V_* a, const __V_* p, int n, const char* v), (a, p, n, v)) __
 
 static void
 tmlocal __PARAM__((void), ()){
-       register Tm_zone_t*     zp;
-       register int            n;
-       register char*          s;
+       Tm_zone_t*      zp;
+       int             n;
+       char*           s;
        int                     i;
        int                     m;
        int                     isdst;
@@ -390,13 +390,13 @@ tmlocal __PARAM__((void), ()){
  */
 
 void
-tminit __PARAM__((register Tm_zone_t* zp), (zp)) __OTORP__(register Tm_zone_t* zp;){
+tminit __PARAM__((Tm_zone_t* zp), (zp)) __OTORP__(Tm_zone_t* zp;){
        if (!tm_info.local) tmlocal();
        if (!zp) zp = tm_info.local;
 #if HUH950804 /* it only worked on systems that ignored TZ=...! */
        if (zp != tm_info.zone)
        {
-               register char*  s;
+               char*   s;
                time_t          clock;
                char            buf[128];
 
index 118cba673049dd58552c6039960b45e8417b756f..4e1527a4929da2eb0d0e2798e40f57b8dcefa63d 100644 (file)
@@ -99,8 +99,8 @@
  */
 
 time_t
-tmleap __PARAM__((register time_t* clock), (clock)) __OTORP__(register time_t* clock;){
-       register Tm_leap_t*     lp;
+tmleap __PARAM__((time_t* clock), (clock)) __OTORP__(time_t* clock;){
+       Tm_leap_t*      lp;
        time_t                  now;
 
        tmset(tm_info.zone);
index e0a6b9b7169a48a6b1962e064d1657ba456f98f6..0eec9914ae85de83c949219c81765ba1cb181ed9 100644 (file)
  */
 
 int
-tmlex __PARAM__((register const char* s, char** e, char** tab, register int ntab, char** suf, int nsuf), (s, e, tab, ntab, suf, nsuf)) __OTORP__(register const char* s; char** e; char** tab; register int ntab; char** suf; int nsuf;){
-       register char** p;
+tmlex __PARAM__((const char* s, char** e, char** tab, int ntab, char** suf, int nsuf), (s, e, tab, ntab, suf, nsuf)) __OTORP__(const char* s; char** e; char** tab; int ntab; char** suf; int nsuf;){
+       char**  p;
 
        for (p = tab; ntab-- && *p; p++)
                if (tmword(s, e, *p, suf, nsuf))
index 41495e90f4cc12585bda40d4ca80729d6e86651b..41e77d59ac0c66016181a8d239b93ebf967741ca 100644 (file)
 
 Tm_t*
 tmmake __PARAM__((time_t* clock), (clock)) __OTORP__(time_t* clock;){
-       register Tm_t*          tp;
-       register Tm_leap_t*     lp;
+       Tm_t*           tp;
+       Tm_leap_t*      lp;
        int                     leapsec;
        time_t                  now;
 
index 55b2f264580c409d1551baf47a7359080e259729..ad9e25561a686e699b04b94bf62f72c58b908bd4 100644 (file)
  */
 
 char*
-tmpoff __PARAM__((register char* s, register const char* p, register int n, int d), (s, p, n, d)) __OTORP__(register char* s; register const char* p; register int n; int d;){
+tmpoff __PARAM__((char* s, const char* p, int n, int d), (s, p, n, d)) __OTORP__(char* s; const char* p; int n; int d;){
        while (*s = *p++) s++;
        if (n != d)
        {
index 7a7275f12b5dc6d9abeef05d8a9bb9d32842a1b5..1480032168d01e94b63742dfb0330bae03caaa12 100644 (file)
  */
 
 time_t
-tmtime __PARAM__((register Tm_t* tp, int west), (tp, west)) __OTORP__(register Tm_t* tp; int west;){
-       register time_t         clock;
-       register Tm_leap_t*     lp;
+tmtime __PARAM__((Tm_t* tp, int west), (tp, west)) __OTORP__(Tm_t* tp; int west;){
+       time_t          clock;
+       Tm_leap_t*      lp;
        int                     n;
        int                     sec;
        time_t                  now;
index 705ed64da97ef9f6d7ab9ef42e3e0336ecf24856..6cebf8b482610e9ef16ba1056960e506c25f2084 100644 (file)
  */
 
 Tm_zone_t*
-tmtype __PARAM__((register const char* s, char** e), (s, e)) __OTORP__(register const char* s; char** e;){
-       register Tm_zone_t*     zp;
-       register char*          t;
+tmtype __PARAM__((const char* s, char** e), (s, e)) __OTORP__(const char* s; char** e;){
+       Tm_zone_t*      zp;
+       char*           t;
 
        tmset(tm_info.zone);
        zp = tm_info.local;
index 6853c2ac976fb54ff1b6ecdf154da7d7ce679faf..1bd9d23a260fd135a2b794dfc4ade341e43a2aa8 100644 (file)
  */
 
 int
-tmword __PARAM__((register const char* s, char** e, register const char* t, char** suf, int n), (s, e, t, suf, n)) __OTORP__(register const char* s; char** e; register const char* t; char** suf; int n;){
-       register int    c;
+tmword __PARAM__((const char* s, char** e, const char* t, char** suf, int n), (s, e, t, suf, n)) __OTORP__(const char* s; char** e; const char* t; char** suf; int n;){
+       int     c;
        const char*     b;
 
        if (*s && *t)
index dcbbbf7d623c0ccb1723ef0cdd31f4470cef26f8..643f91e2153aa2c284deb2190d3840977be80fcc 100644 (file)
  */
 
 Tm_zone_t*
-tmzone __PARAM__((register const char* name, char** end, const char* type, int* dst), (name, end, type, dst)) __OTORP__(register const char* name; char** end; const char* type; int* dst;){
-       register Tm_zone_t*     zp;
-       register char*          prev;
+tmzone __PARAM__((const char* name, char** end, const char* type, int* dst), (name, end, type, dst)) __OTORP__(const char* name; char** end; const char* type; int* dst;){
+       Tm_zone_t*      zp;
+       char*           prev;
 
        tmset(tm_info.zone);
        zp = tm_info.local;
index 2d3b2104edc9502750e75068979097d9c7009ac4..5c127c9ea31e1ff08a4e481844254c53d25a083f 100644 (file)
  */
 
 int
-vecargs __PARAM__((register char** vec, int* argcp, char*** argvp), (vec, argcp, argvp)) __OTORP__(register char** vec; int* argcp; char*** argvp;){
-       register char** argv;
-       register char** oargv;
+vecargs __PARAM__((char** vec, int* argcp, char*** argvp), (vec, argcp, argvp)) __OTORP__(char** vec; int* argcp; char*** argvp;){
+       char**  argv;
+       char**  oargv;
        char**          ovec;
        char*           s;
        int             num;
index 7123986cd7a27a1339cce40ffb2ce3166328b7b5..99babacdffdd6f73316c041303e8e02be559b179 100644 (file)
 
 char**
 vecfile __PARAM__((const char* file), (file)) __OTORP__(const char* file;){
-       register int    n;
-       register char*  buf;
-       register char** vec;
+       int     n;
+       char*   buf;
+       char**  vec;
        int             fd;
        struct stat     st;
 
index 70c163558f9d3120017160c5497ad3e057935142..aa9276a8da40f13fe0e313f27ab3becda78fa3cd 100644 (file)
  */
 
 void
-vecfree __PARAM__((register char** vec, int retain), (vec, retain)) __OTORP__(register char** vec; int retain;){
+vecfree __PARAM__((char** vec, int retain), (vec, retain)) __OTORP__(char** vec; int retain;){
        if (vec)
        {
                if (*(vec -= 2) && !retain) free(*vec);
index 5162dd74063280cea1fc0079015ea6c3b878b673..76cfa929b8bdea11f246581a6adb70eae8b45e96 100644 (file)
 
 char**
 vecload __PARAM__((char* buf), (buf)) __OTORP__(char* buf;){
-       register char*  s;
-       register int    n;
-       register char** p;
+       char*   s;
+       int     n;
+       char**  p;
        char**          vec;
 
        vec = 0;
index e9be2a5a5776780a1e77d589c433a0a5ebb683c2..2523324fc6312a26f111e69ea4b1b1f7a6caa1e4 100644 (file)
@@ -99,8 +99,8 @@
 
 char**
 vecstring __PARAM__((const char* str), (str)) __OTORP__(const char* str;){
-       register char*  buf;
-       register char** vec;
+       char*   buf;
+       char**  vec;
 
        if (!str || !*str || !(buf = strdup(str))) vec = 0;
        else if (!(vec = vecload(buf))) free(buf);
index c69fdbd55c0dda120d420acdf7ea6317f9dccb73..33de3c16a9199f1437d9a2d8e9f938d9b0a8f642 100644 (file)
@@ -80,7 +80,7 @@ typedef struct _block_                Block_t;
 typedef struct _seg_           Seg_t;
 typedef struct _pfobj_         Pfobj_t;
 
-#define reg                    register
+#define reg                    /*no register keywords*/
 #define NOTUSED(x)             (&x,1)
 
 /* convert an address to an integral value */
index 4d75b600240a02fd8f2a78fa11df947c3bbfb1ef..f2e0627a13c47ecb48b2f7b02572cfc92df7c01b 100644 (file)
@@ -98,9 +98,9 @@
  */
 
 char*
-vmstrdup __PARAM__((Vmalloc_t* v, register const char* s), (v, s)) __OTORP__(Vmalloc_t* v; register const char* s;){
-       register char*  t;
-       register int    n;
+vmstrdup __PARAM__((Vmalloc_t* v, const char* s), (v, s)) __OTORP__(Vmalloc_t* v; const char* s;){
+       char*   t;
+       int     n;
 
        return((t = vmalloc(v, n = strlen(s) + 1)) ? (char*)memcpy(t, s, n) : (char*)0);
 }
index 8b451fe23a401e1d87c6cf04c0c43dfef0808a7c..dcf16eb91c263e519c70f56f16040802b47d2159 100644 (file)
@@ -94,9 +94,9 @@ static const char id[] = "\n@(#)basename (AT&T Bell Laboratories) 03/01/94\0\n";
 
 #include <cmdlib.h>
 
-static void namebase __PARAM__((Sfio_t *outfile, register char *pathname, char *suffix), (outfile, pathname, suffix)) __OTORP__(Sfio_t *outfile; register char *pathname; char *suffix;){
-       register char *first, *last;
-       register int n=0;
+static void namebase __PARAM__((Sfio_t *outfile, char *pathname, char *suffix), (outfile, pathname, suffix)) __OTORP__(Sfio_t *outfile; char *pathname; char *suffix;){
+       char *first, *last;
+       int n=0;
        for(first=last=pathname; *last; last++);
        /* back over trailing '/' */
        if(last>first)
@@ -126,8 +126,8 @@ static void namebase __PARAM__((Sfio_t *outfile, register char *pathname, char *
 }
 
 int
-b_basename __PARAM__((int argc,register char *argv[]), (argc, argv)) __OTORP__(int argc;register char *argv[];){
-       register int  n;
+b_basename __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){
+       int  n;
 
        NoP(id[0]);
        cmdinit(argv);
index 2f652340fad80e7d23a2cd788e896c09d6c86254..ac9b81ca2769c93c17642f3b5d04e0ac43befcf2 100644 (file)
@@ -123,11 +123,11 @@ static char       states[UCHAR_MAX+1];
 
 static int
 vcat __PARAM__((Sfio_t *fdin, Sfio_t *fdout, int flags), (fdin, fdout, flags)) __OTORP__(Sfio_t *fdin; Sfio_t *fdout; int flags;){
-       register unsigned char* cp;
-       register unsigned char* cpold;
-       register int            n;
-       register int            line = 1;
-       register unsigned char* endbuff;
+       unsigned char*  cp;
+       unsigned char*  cpold;
+       int             n;
+       int             line = 1;
+       unsigned char*  endbuff;
        unsigned char*          inbuff;
        int                     printdefer = (flags&(B_FLAG|N_FLAG));
        int                     lastchar;
@@ -240,10 +240,10 @@ vcat __PARAM__((Sfio_t *fdin, Sfio_t *fdout, int flags), (fdin, fdout, flags)) _
 
 int
 b_cat __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-       register int            n;
-       register int            flags = 0;
-       register char*          cp;
-       register Sfio_t*        fp;
+       int             n;
+       int             flags = 0;
+       char*           cp;
+       Sfio_t* fp;
        int                     att;
 
        NoP(id[0]);
index bc1e335a6c2c2417968717e33f0213369226474d..7efa793d7ec537f9ccdaead290436287fae21c15 100644 (file)
@@ -135,9 +135,9 @@ extern __MANGLE__ int       lchown __PROTO__((const char*, uid_t, gid_t));
  */
 
 static void
-getids __PARAM__((register char* s, char** e, int* uid, int* gid, int flags), (s, e, uid, gid, flags)) __OTORP__(register char* s; char** e; int* uid; int* gid; int flags;){
-       register char*  t;
-       register int    n;
+getids __PARAM__((char* s, char** e, int* uid, int* gid, int flags), (s, e, uid, gid, flags)) __OTORP__(char* s; char** e; int* uid; int* gid; int flags;){
+       char*   t;
+       int     n;
        char*           z;
        char            buf[64];
 
@@ -185,10 +185,10 @@ getids __PARAM__((register char* s, char** e, int* uid, int* gid, int flags), (s
 
 int
 b_chgrp __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
-       register int    flags = 0;
-       register char*  file;
-       register char*  s;
-       register Map_t* m;
+       int     flags = 0;
+       char*   file;
+       char*   s;
+       Map_t*  m;
        Hash_table_t*   map = 0;
        int             resolve;
        int             n;
index ef5a1f2d7b8e4e38d299e4cdef94f7d4ce33c486..4f98e4ffe9b0db63758e34bb82181441d83188e0 100644 (file)
@@ -114,12 +114,12 @@ extern __MANGLE__ int     lchmod __PROTO__((const char*, mode_t));
 
 int
 b_chmod __PARAM__((int argc, char* argv[]), (argc, argv)) __OTORP__(int argc; char* argv[];){
-       register int    mode;
-       register int    force = 0;
-       register int    recurse = 0;
-       register int    resolve;
-       register char*  amode;
-       register char*  file;
+       int     mode;
+       int     force = 0;
+       int     recurse = 0;
+       int     resolve;
+       char*   amode;
+       char*   file;
        char*           last;
        struct stat     st;
        int             (*chmodf) __PROTO__((const char*, mode_t));
index 32fac130a8f5d7e23028198a931c709188f692d2..1ec6c49c0fba550ea9bbd7fd8f6849d4b6e0ba9b 100644 (file)
  */
 
 static void
-cmdinit __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){
-       register char*  cp;
+cmdinit __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){
+       char*   cp;
 
        if (cp = strrchr(argv[0], '/')) cp++;
        else cp = argv[0];
index b956ebe089be8389c0ee877e244d48406b945165..52c4104e286ca5c5ca279f51315d3d832606add5 100644 (file)
@@ -93,8 +93,8 @@
 #include <cmdlib.h>
 
 void
-cmdinit __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){
-       register char*  cp;
+cmdinit __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){
+       char*   cp;
 
        if (cp = strrchr(argv[0], '/')) cp++;
        else cp = argv[0];
index 238012a55f5eea35a448d44fc91d87a9fb4c87ba..cd9ddfcb0e646cf22e31ca673b02736edb805dcd 100644 (file)
@@ -96,8 +96,8 @@
 
 int
 cmdrecurse __PARAM__((int argc, char** argv, int pfxc, char** pfxv), (argc, argv, pfxc, pfxv)) __OTORP__(int argc; char** argv; int pfxc; char** pfxv;){
-       register char** v;
-       register char** a;
+       char**  v;
+       char**  a;
        int             resolve = 'L';
        char            arg[16];
 
index fa1b17c9d7fa491e4558ad97f9572cc26270f3d8..adc41136b527e768be29e1be72f90b3449a400e2 100644 (file)
@@ -104,13 +104,13 @@ static const char id[] = "\n@(#)cmp (AT&T Bell Laboratories) 07/17/94\0\n";
 
 static int
 cmp __PARAM__((const char* file1, Sfio_t* f1, const char* file2, Sfio_t* f2, int flags), (file1, f1, file2, f2, flags)) __OTORP__(const char* file1; Sfio_t* f1; const char* file2; Sfio_t* f2; int flags;){
-       register int            c1;
-       register int            c2;
-       register unsigned char* p1 = 0;
-       register unsigned char* p2 = 0;
-       register int            lines = 1;
-       register unsigned char* e1 = 0;
-       register unsigned char* e2 = 0;
+       int             c1;
+       int             c2;
+       unsigned char*  p1 = 0;
+       unsigned char*  p2 = 0;
+       int             lines = 1;
+       unsigned char*  e1 = 0;
+       unsigned char*  e2 = 0;
        unsigned long           pos = 0;
        int                     ret = 0;
        unsigned char*          last;
@@ -177,7 +177,7 @@ cmp __PARAM__((const char* file1, Sfio_t* f1, const char* file2, Sfio_t* f2, int
 }
 
 int
-b_cmp __PARAM__((int argc, register char** argv), (argc, argv)) __OTORP__(int argc; register char** argv;){
+b_cmp __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
        char*           s;
        char*           e;
        Sfio_t*         f1 = 0;
index 1614ac319392ab0ca3f3ddc37395868c36963926..0cf6f5b95bf7444ea467e7f690904e53b0eaf0e7 100644 (file)
@@ -99,9 +99,9 @@ static const char id[] = "\n@(#)comm (AT&T Bell Laboratories) 04/01/92\0\n";
 #define C_COMMON       4
 #define C_ALL          (C_FILE1|C_FILE2|C_COMMON)
 
-static int comm __PARAM__((Sfio_t *in1, Sfio_t *in2, register Sfio_t *out,register int mode), (in1, in2, out, mode)) __OTORP__(Sfio_t *in1; Sfio_t *in2; register Sfio_t *out;register int mode;){
-       register char *cp1, *cp2;
-       register int n1, n2, n, comp;
+static int comm __PARAM__((Sfio_t *in1, Sfio_t *in2, Sfio_t *out,int mode), (in1, in2, out, mode)) __OTORP__(Sfio_t *in1; Sfio_t *in2; Sfio_t *out;int mode;){
+       char *cp1, *cp2;
+       int n1, n2, n, comp;
        if(cp1 = sfgetr(in1,'\n',0))
                n1 = sfslen();
        if(cp2 = sfgetr(in2,'\n',0))
@@ -181,9 +181,9 @@ static int comm __PARAM__((Sfio_t *in1, Sfio_t *in2, register Sfio_t *out,regist
 
 int
 b_comm __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
-       register int n;
-       register int mode = C_FILE1|C_FILE2|C_COMMON;
-       register char *cp;
+       int n;
+       int mode = C_FILE1|C_FILE2|C_COMMON;
+       char *cp;
        Sfio_t *f1, *f2;
 
        NoP(id[0]);
index a749ba68f92597ab1988911f00260f46ee62568b..f3c2d7f10fbe8aec057f47a6b5237fa5c3732cc4 100644 (file)
@@ -119,14 +119,14 @@ static int seqno;
  * compare the first of an array of integers
  */
 
-static int mycomp __PARAM__((register const __V_ *a,register const __V_ *b), (a, b)) __OTORP__(register const __V_ *a;register const __V_ *b;){
+static int mycomp __PARAM__((const __V_ *a,const __V_ *b), (a, b)) __OTORP__(const __V_ *a;const __V_ *b;){
        return(*((int*)a) - *((int*)b));
 }
 
 static Cut_t *cutinit __PARAM__((int mode,char *str,int wdelim,int ldelim), (mode, str, wdelim, ldelim)) __OTORP__(int mode;char *str;int wdelim;int ldelim;){
-       register int *lp, c, n=0;
-       register int range = 0;
-       register char *cp = str;
+       int *lp, c, n=0;
+       int range = 0;
+       char *cp = str;
        Cut_t *cuthdr;
        cuthdr = (Cut_t*)stakalloc(sizeof(Cut_t)+strlen(cp)*sizeof(int));
        cuthdr->cflag = ((mode&C_CHARS)!=0);
@@ -158,7 +158,7 @@ static Cut_t *cutinit __PARAM__((int mode,char *str,int wdelim,int ldelim), (mod
                        }
                        if(c==0)
                        {
-                               register int *dp;
+                               int *dp;
                                *lp = HUGE;
                                n = 1 + (lp-cuthdr->list)/2;
                                qsort(lp=cuthdr->list,n,2*sizeof(*lp),mycomp);
@@ -227,10 +227,10 @@ static Cut_t *cutinit __PARAM__((int mode,char *str,int wdelim,int ldelim), (mod
  */
 
 static int cutcols __PARAM__((const Cut_t *cuthdr,Sfio_t *fdin,Sfio_t *fdout), (cuthdr, fdin, fdout)) __OTORP__(const Cut_t *cuthdr;Sfio_t *fdin;Sfio_t *fdout;){
-       register int            c, ncol=0;
-       register const int      *lp = cuthdr->list;
-       register char           *inp, *inend;
-       register int            skip; /* non-zero for don't copy */
+       int             c, ncol=0;
+       const int       *lp = cuthdr->list;
+       char            *inp, *inend;
+       int             skip; /* non-zero for don't copy */
        int                     inword = 0;
        while(inp = sfgetr(fdin,'\n', 0))
        {
@@ -267,12 +267,12 @@ static int cutcols __PARAM__((const Cut_t *cuthdr,Sfio_t *fdin,Sfio_t *fdout), (
 static int cutfields __PARAM__((const Cut_t *cuthdr,Sfio_t *fdin,Sfio_t *fdout), (cuthdr, fdin, fdout)) __OTORP__(const Cut_t *cuthdr;Sfio_t *fdin;Sfio_t *fdout;){
        static signed char space[1<<CHAR_BIT];
        static int lastseq, lastwdelim = 0, lastldelim = '\n';
-       register unsigned char *cp;
-       register int c, nfields;
-       register const int *lp = cuthdr->list;
-       register unsigned char *copy;
-       register int nodelim, empty, inword=0;
-       register unsigned char *endbuff;
+       unsigned char *cp;
+       int c, nfields;
+       const int *lp = cuthdr->list;
+       unsigned char *copy;
+       int nodelim, empty, inword=0;
+       unsigned char *endbuff;
        unsigned char *inbuff, *first;
        int lastchar;
        Sfio_t *fdtmp = 0;
@@ -384,8 +384,8 @@ failed:
 
 int
 b_cut __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){
-       register char *cp;
-       register Sfio_t *fp;
+       char *cp;
+       Sfio_t *fp;
        int     n;
        Cut_t   *cuthdr;
        int     mode = 0;
index f42247cf11e9711b02130974e1cae4f5755db935..7357ff60fe6e0550b3264534010bba0604ffb0bc 100644 (file)
@@ -94,8 +94,8 @@ static const char id[] = "\n@(#)dirname (AT&T Bell Laboratories) 07/17/92\0\n";
 
 #include <cmdlib.h>
 
-static void dirname __PARAM__((register Sfio_t *outfile, register const char *pathname), (outfile, pathname)) __OTORP__(register Sfio_t *outfile; register const char *pathname;){
-       register const char  *last;
+static void dirname __PARAM__((Sfio_t *outfile, const char *pathname), (outfile, pathname)) __OTORP__(Sfio_t *outfile; const char *pathname;){
+       const char  *last;
        /* go to end of path */
        for(last=pathname; *last; last++);
        /* back over trailing '/' */
@@ -124,8 +124,8 @@ static void dirname __PARAM__((register Sfio_t *outfile, register const char *pa
 }
 
 int
-b_dirname __PARAM__((int argc,register char *argv[]), (argc, argv)) __OTORP__(int argc;register char *argv[];){
-       register int n;
+b_dirname __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){
+       int n;
 
        NoP(id[0]);
        cmdinit(argv);
index 4f75b57f3e650dd9fba4f4375fa3621d6e4f93f4..418a016798577fddd9fb46a334f815d5029b4c78 100644 (file)
@@ -106,10 +106,10 @@ static const char id[] = "\n@(#)fold (AT&T Bell Laboratories) 04/01/92\0\n";
 
 static char cols[1<<CHAR_BIT];
 
-static void fold __PARAM__((Sfio_t *in, Sfio_t *out, register int width), (in, out, width)) __OTORP__(Sfio_t *in; Sfio_t *out; register int width;){
-       register char *cp, *first;
-       register int n, col=0;
-       register char *last_space=0;
+static void fold __PARAM__((Sfio_t *in, Sfio_t *out, int width), (in, out, width)) __OTORP__(Sfio_t *in; Sfio_t *out; int width;){
+       char *cp, *first;
+       int n, col=0;
+       char *last_space=0;
        cols[0] = 0;
        while(cp  = sfgetr(in,'\n',0))
        {
@@ -177,9 +177,9 @@ static void fold __PARAM__((Sfio_t *in, Sfio_t *out, register int width), (in, o
 
 int
 b_fold __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
-       register int n, width=WIDTH;
-       register Sfio_t *fp;
-       register char *cp;
+       int n, width=WIDTH;
+       Sfio_t *fp;
+       char *cp;
 
        NoP(id[0]);
        cmdinit(argv);
index ca8fc08e826967d855d960f7a2eb5789d4ed3df6..e9e6e7928bee188897fc9fd3a19f277e26c4b2d7 100644 (file)
@@ -96,11 +96,11 @@ static const char id[] = "\n@(#)getconf (AT&T Bell Laboratories) 05/09/95\0\n";
 
 int
 b_getconf __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-       register char*  name;
-       register char*  path;
-       register char*  value;
-       register char*  s;
-       register int    n;
+       char*   name;
+       char*   path;
+       char*   value;
+       char*   s;
+       int     n;
        int             flags;
 
        static char     empty[] = "-";
index c1f24089ceea62038c6273a48749cfd1c5683926..379d95327c61219f82d559c497f1c175b6800a3a 100644 (file)
@@ -95,14 +95,14 @@ static const char id[] = "\n@(#)head (AT&T Bell Laboratories) 04/01/92\0\n";
 #include <cmdlib.h>
 
 int
-b_head __PARAM__((int argc, register  char *argv[]), (argc, argv)) __OTORP__(int argc; register  char *argv[];){
+b_head __PARAM__((int argc,  char *argv[]), (argc, argv)) __OTORP__(int argc;  char *argv[];){
        static char header_fmt[] = "\n==> %s <==\n";
-       register Sfio_t *fp;
-       register char           *cp;
-       register long           number = 10;
-       register off_t          skip = 0;
-       register int            n;
-       register int            delim = '\n';
+       Sfio_t  *fp;
+       char            *cp;
+       long            number = 10;
+       off_t           skip = 0;
+       int             n;
+       int             delim = '\n';
        char                    *format = header_fmt+1;
 
        NoP(id[0]);
index d3e74b1773732a66b9fff8d529da8a35a9d4dc77..4f9d431bcc72a482af791012e89a5da36e71d7a7 100644 (file)
@@ -139,10 +139,10 @@ static const char id[] = "\n@(#)id (AT&T Bell Laboratories) 07/17/94\0\n";
 
 #if _lib_fsid
 static void
-getfsids __PARAM__((Sfio_t* sp, const char* name, int flags, register int lastchar), (sp, name, flags, lastchar)) __OTORP__(Sfio_t* sp; const char* name; int flags; register int lastchar;){
-       register struct fsg*    fs;
-       register char*          s;
-       register char**         p;
+getfsids __PARAM__((Sfio_t* sp, const char* name, int flags, int lastchar), (sp, name, flags, lastchar)) __OTORP__(Sfio_t* sp; const char* name; int flags; int lastchar;){
+       struct fsg*     fs;
+       char*           s;
+       char**          p;
        char**                  x;
 
        if (lastchar)
@@ -161,9 +161,9 @@ getfsids __PARAM__((Sfio_t* sp, const char* name, int flags, register int lastch
                                if (flags > 0) x = 0;
                                else
                                {
-                                       register char**         q;
-                                       register char*          t;
-                                       register int            n;
+                                       char**          q;
+                                       char*           t;
+                                       int             n;
 
                                        n = 0;
                                        q = p;
@@ -228,14 +228,14 @@ putid __PARAM__((Sfio_t* sp, int flags, const char* label, const char* name, lon
 }
 
 static int
-getids __PARAM__((Sfio_t* sp, const char* name, register int flags), (sp, name, flags)) __OTORP__(Sfio_t* sp; const char* name; register int flags;){
-       register struct passwd* pw;
-       register struct group*  grp;
-       register int            i;
-       register int            j;
-       register int            k;
+getids __PARAM__((Sfio_t* sp, const char* name, int flags), (sp, name, flags)) __OTORP__(Sfio_t* sp; const char* name; int flags;){
+       struct passwd*  pw;
+       struct group*   grp;
+       int             i;
+       int             j;
+       int             k;
 #if _lib_fsid
-       register struct fsg*    fs;
+       struct fsg*     fs;
        const char*             fs_name;
        int                     fs_id;
 #endif
@@ -452,8 +452,8 @@ getids __PARAM__((Sfio_t* sp, const char* name, register int flags), (sp, name,
 
 int
 b_id __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
-       register int    flags = 0;
-       register int    n;
+       int     flags = 0;
+       int     n;
 
        NoP(id[0]);
        cmdinit(argv);
index d9e49a2c36dc13f4f7d87e889daeca9221f4342d..9e9d8b629935b625ffcd61fd27dbe70cd347de09 100644 (file)
@@ -129,7 +129,7 @@ typedef struct
 #define S_SPACE        2
 #define S_NL   3
 
-static void join_free __PARAM__((register Join_t *jp), (jp)) __OTORP__(register Join_t *jp;){
+static void join_free __PARAM__((Join_t *jp), (jp)) __OTORP__(Join_t *jp;){
        if(jp->outlist)
                free(jp->outlist);
        free(jp->file[0].fieldlist);
@@ -137,9 +137,9 @@ static void join_free __PARAM__((register Join_t *jp), (jp)) __OTORP__(register
 }
 
 static int getolist __PARAM__((Join_t* jp, const char *first, char** arglist), (jp, first, arglist)) __OTORP__(Join_t* jp; const char *first; char** arglist;){
-       register const char *cp = first;
+       const char *cp = first;
        char **argv = arglist;
-       register int c;
+       int c;
        int *outptr, *outmax;
        int nfield = NFIELD;
        char *str;
@@ -214,11 +214,11 @@ static int getolist __PARAM__((Join_t* jp, const char *first, char** arglist), (
  * reads in a record from file <index> and splits into fields
 */
 static char *getrec __PARAM__((Join_t* jp, int index), (jp, index)) __OTORP__(Join_t* jp; int index;){
-       register unsigned char *state = jp->state;
-       register struct jfile *fp = &jp->file[index];
-       register char *cp, **ptr = fp->fieldlist;
-       register int n=0;
-       register char **ptrmax = ptr + fp->maxfields;
+       unsigned char *state = jp->state;
+       struct jfile *fp = &jp->file[index];
+       char *cp, **ptr = fp->fieldlist;
+       int n=0;
+       char **ptrmax = ptr + fp->maxfields;
        fp->spaces = 0;
        if(!(cp = sfgetr(fp->iop, '\n', 0)))
                return(0);
@@ -269,11 +269,11 @@ static char *getrec __PARAM__((Join_t* jp, int index), (jp, index)) __OTORP__(Jo
 /*
  * print field <n> from file <index>
  */
-static int outfield __PARAM__((Join_t* jp, int index, register int n, int last), (jp, index, n, last)) __OTORP__(Join_t* jp; int index; register int n; int last;){
-       register struct jfile *fp = &jp->file[index];
-       register char *cp, *cpmax;
-       register int size;
-       register Sfio_t *iop = jp->outfile;
+static int outfield __PARAM__((Join_t* jp, int index, int n, int last), (jp, index, n, last)) __OTORP__(Join_t* jp; int index; int n; int last;){
+       struct jfile *fp = &jp->file[index];
+       char *cp, *cpmax;
+       int size;
+       Sfio_t *iop = jp->outfile;
        {
                if(n < fp->nfields)
                {
@@ -315,9 +315,9 @@ static int outfield __PARAM__((Join_t* jp, int index, register int n, int last),
        return(0);
 }
 
-static int joinout __PARAM__((register Join_t *jp, int mode), (jp, mode)) __OTORP__(register Join_t *jp; int mode;){
-       register struct jfile *fp;
-       register int i,j,n;
+static int joinout __PARAM__((Join_t *jp, int mode), (jp, mode)) __OTORP__(Join_t *jp; int mode;){
+       struct jfile *fp;
+       int i,j,n;
        int     last,*out;
        if(out= jp->outlist)
        {
@@ -377,7 +377,7 @@ static int joinout __PARAM__((register Join_t *jp, int mode), (jp, mode)) __OTOR
 }
 
 static Join_t *join_init __PARAM__((void), ()){
-       register Join_t *jp;
+       Join_t *jp;
        static Join_t Join;
        jp = &Join;
        memzero(jp->state, sizeof(jp->state));
@@ -393,8 +393,8 @@ static Join_t *join_init __PARAM__((void), ()){
 }
 
 static int join __PARAM__((Join_t *jp), (jp)) __OTORP__(Join_t *jp;){
-       register char *cp1, *cp2;
-       register int n1, n2, n, comp;
+       char *cp1, *cp2;
+       int n1, n2, n, comp;
        off_t offset = -1;
        int ndup=0;
        cp1 = getrec(jp,0);
@@ -485,9 +485,9 @@ static int join __PARAM__((Join_t *jp), (jp)) __OTORP__(Join_t *jp;){
 
 int
 b_join __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
-       register int n;
-       register char *cp;
-       register Join_t *jp = join_init();
+       int n;
+       char *cp;
+       Join_t *jp = join_init();
 
        NoP(id[0]);
        cmdinit(argv);
index fcd398af3e46048d55020c1f4b30565f80f436c0..5f7daefb54033794b07d8b93c50f435ab2dba3a3 100644 (file)
@@ -102,8 +102,8 @@ extern __MANGLE__ char*             getlogin __PROTO__((void));
 
 int
 b_logname __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
-       register int    n;
-       register char*  logname;
+       int     n;
+       char*   logname;
 
        NoP(argc);
        NoP(id[0]);
index ee0398d3d27fb9cf4e5ab5bd3c6656d2720da074..89b3494692be15bb677bb41d51c565d4cec81420 100644 (file)
@@ -99,9 +99,9 @@ static const char id[] = "\n@(#)mkdir (AT&T Bell Laboratories) 02/14/95\0\n";
 
 int
 b_mkdir __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
-       register char *arg;
-       register mode_t mode=DIRMODE, mask;
-       register int n, mflag=0, pflag=0;
+       char *arg;
+       mode_t mode=DIRMODE, mask;
+       int n, mflag=0, pflag=0;
        mode_t dmode;
 
        NoP(argc);
index 794a6a443ca922e55b4c57856fa236e3eae02ade..8f6173ffcfc2168b5e5a55868f4f215bb819517d 100644 (file)
@@ -99,9 +99,9 @@ static const char id[] = "\n@(#)mkfifo (AT&T Bell Laboratories) 04/01/92\0\n";
 
 int
 b_mkfifo __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
-       register char *arg;
-       register mode_t mode=RWALL, mask=0;
-       register int n, mflag=0;
+       char *arg;
+       mode_t mode=RWALL, mask=0;
+       int n, mflag=0;
 
        NoP(argc);
        NoP(id[0]);
index a0baba7fc1dde4f53faa8b9508ebd6972ee656a9..1ec829b154ce39500cc018b767230bc7a051f2d6 100644 (file)
@@ -99,10 +99,10 @@ static const char id[] = "\n@(#)paste (AT&T Bell Laboratories) 04/01/92\0\n";
  * to <out>
  */
 
-static int paste __PARAM__((int nstream,Sfio_t* streams[],Sfio_t *out, register const char *delim,int dlen), (nstream, streams, out, delim, dlen)) __OTORP__(int nstream;Sfio_t* streams[];Sfio_t *out; register const char *delim;int dlen;){
-       register const char *cp;
-       register int d, n, more=1;
-       register Sfio_t *fp;
+static int paste __PARAM__((int nstream,Sfio_t* streams[],Sfio_t *out, const char *delim,int dlen), (nstream, streams, out, delim, dlen)) __OTORP__(int nstream;Sfio_t* streams[];Sfio_t *out; const char *delim;int dlen;){
+       const char *cp;
+       int d, n, more=1;
+       Sfio_t *fp;
        do
        {
                d = (dlen>0?0:-1);
@@ -135,7 +135,7 @@ static int paste __PARAM__((int nstream,Sfio_t* streams[],Sfio_t *out, register
                        }
                        if(++n<nstream && more && d>=0)
                        {
-                               register int c;
+                               int c;
                                if(d >= dlen)
                                        d = 0;
                                if(c=delim[d++])
@@ -150,9 +150,9 @@ static int paste __PARAM__((int nstream,Sfio_t* streams[],Sfio_t *out, register
 /*
  * Handles paste -s, for file <in> to file <out> using delimiters <delim>
  */
-static int spaste __PARAM__((Sfio_t *in,register Sfio_t* out,register const char *delim,int dlen), (in, out, delim, dlen)) __OTORP__(Sfio_t *in;register Sfio_t* out;register const char *delim;int dlen;){
-       register const char *cp;
-       register int d=0;
+static int spaste __PARAM__((Sfio_t *in,Sfio_t* out,const char *delim,int dlen), (in, out, delim, dlen)) __OTORP__(Sfio_t *in;Sfio_t* out;const char *delim;int dlen;){
+       const char *cp;
+       int d=0;
        if(cp = sfgetr(in,'\n',0))
        {
                if(sfwrite(out,cp,sfslen()-1) < 0)
@@ -162,7 +162,7 @@ static int spaste __PARAM__((Sfio_t *in,register Sfio_t* out,register const char
        {
                if(dlen)
                {
-                       register int c;
+                       int c;
                        if(d >= dlen)
                                d = 0;
                        if(c=delim[d++])
@@ -176,10 +176,10 @@ static int spaste __PARAM__((Sfio_t *in,register Sfio_t* out,register const char
 }
 
 int
-b_paste __PARAM__((int argc,register char *argv[]), (argc, argv)) __OTORP__(int argc;register char *argv[];){
-       register int            n, sflag=0;
-       register Sfio_t *fp, **streams;
-       register char           *cp, *delim = "\t";     /* default delimiter */
+b_paste __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){
+       int             n, sflag=0;
+       Sfio_t  *fp, **streams;
+       char            *cp, *delim = "\t";     /* default delimiter */
        int                     dlen;
 
        NoP(id[0]);
index 0bb56e90782fe5577b62e5384ebea7243da307a3..995fc91bd0d62e8f40fbc2451143dc7b1bc83330 100644 (file)
@@ -101,7 +101,7 @@ static const char id[] = "\n@(#)pathchk (AT&T Bell Laboratories) 11/04/92\0\n";
  * call pathconf and handle unlimited sizes
  */ 
 static long mypathconf __PARAM__((const char *path, int op), (path, op)) __OTORP__(const char *path; int op;){
-       register long r;
+       long r;
        errno=0;
        if((r=pathconf(path, op))<0 && errno==0)
                return(LONG_MAX);
@@ -112,9 +112,9 @@ static long mypathconf __PARAM__((const char *path, int op), (path, op)) __OTORP
  * returns 1 if <path> passes test
  */
 static int pathchk __PARAM__((char* path, int mode), (path, mode)) __OTORP__(char* path; int mode;){
-       register char *cp=path, *cpold;
-       register int c;
-       register long r,name_max,path_max;
+       char *cp=path, *cpold;
+       int c;
+       long r,name_max,path_max;
        if(mode)
        {
                name_max = _POSIX_NAME_MAX;
@@ -217,8 +217,8 @@ err:
 
 int
 b_pathchk __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-       register int n, mode=0;
-       register char *cp;
+       int n, mode=0;
+       char *cp;
 
        NoP(argc);
        cmdinit(argv);
index 84b52c5cf5a61c2366c6cb280c8a47f7206579eb..5ed1e27cf2c059f0dc9f1c7c2f35c6f897b93c4e 100644 (file)
@@ -98,9 +98,9 @@ static const char id[] = "\n@(#)rev (AT&T Bell Laboratories) 11/11/92\0\n";
  * reverse the characters within a line
  */
 static int rev_char __PARAM__((Sfio_t *in, Sfio_t *out), (in, out)) __OTORP__(Sfio_t *in; Sfio_t *out;){
-       register int c;
-       register char *ep, *bp, *cp;
-       register int n;
+       int c;
+       char *ep, *bp, *cp;
+       int n;
        while(cp = bp = sfgetr(in,'\n',0))
        {
                ep = bp + (n=sfslen()) -1;
@@ -117,10 +117,10 @@ static int rev_char __PARAM__((Sfio_t *in, Sfio_t *out), (in, out)) __OTORP__(Sf
 }
 
 int
-b_rev __PARAM__((int argc, register char** argv), (argc, argv)) __OTORP__(int argc; register char** argv;){
-       register Sfio_t *fp;
-       register char *cp;
-       register int n, line=0;
+b_rev __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
+       Sfio_t *fp;
+       char *cp;
+       int n, line=0;
        NOT_USED(argc);
 
        NoP(id[0]);
index 9a2517a8020453cec08b16403d1251394d142615..d152ac4cfff5cdd513c378445a9a726c0f5a03ae 100644 (file)
  * in reverse order
  */
 int rev_line __PARAM__((Sfio_t *in, Sfio_t *out, off_t start), (in, out, start)) __OTORP__(Sfio_t *in; Sfio_t *out; off_t start;){
-       register char *cp, *cpold;
-       register int n, nleft=0;
+       char *cp, *cpold;
+       int n, nleft=0;
        char buff[BUFSIZE];
        off_t offset;
        if(sfseek(in,(off_t)0,SEEK_CUR) < 0)
index 402f08540b6952877a861b83f3e43a7ab68d9b95..fecaca7b45e8807feafe140fa33ec6dbabd53722 100644 (file)
@@ -96,8 +96,8 @@ static const char id[] = "\n@(#)rmdir (AT&T Bell Laboratories) 05/09/95\0\n";
 
 int
 b_rmdir __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-       register char*  dir;
-       register int    n;
+       char*   dir;
+       int     n;
 
        NoP(argc);
        NoP(id[0]);
index 0b5d20b3ea421bb8544d0a21b427423cbd90f995..6318180ab93f476a6aa2b0368408e3adf582c477 100644 (file)
@@ -104,9 +104,9 @@ static const char id[] = "\n@(#)tail (AT&T Bell Laboratories) 05/03/94\0\n";
  * If file is seekable, position file to tail location and return offset
  * Otherwise, return -1
  */
-static off_t tailpos __PARAM__((register Sfio_t *fp, register long nitems, int delim), (fp, nitems, delim)) __OTORP__(register Sfio_t *fp; register long nitems; int delim;){
-       register int nleft,n;
-       register off_t offset, first, last;
+static off_t tailpos __PARAM__((Sfio_t *fp, long nitems, int delim), (fp, nitems, delim)) __OTORP__(Sfio_t *fp; long nitems; int delim;){
+       int nleft,n;
+       off_t offset, first, last;
        if((first=sfseek(fp,(off_t)0,SEEK_CUR))<0)
                return((off_t)-1);
        last = sfsize(fp);
@@ -145,8 +145,8 @@ static off_t tailpos __PARAM__((register Sfio_t *fp, register long nitems, int d
  * This code handles tail from a pipe without any size limits
  */
 static void pipetail __PARAM__((Sfio_t *infile, Sfio_t *outfile, int nitems, int delim), (infile, outfile, nitems, delim)) __OTORP__(Sfio_t *infile; Sfio_t *outfile; int nitems; int delim;){
-       register Sfio_t *out;
-       register int n=(2*SF_BUFSIZE), nleft=nitems, fno=0;
+       Sfio_t *out;
+       int n=(2*SF_BUFSIZE), nleft=nitems, fno=0;
        off_t offset[2];
        Sfio_t *tmp[2];
        if(delim<0 && nitems < n)
@@ -188,8 +188,8 @@ static void pipetail __PARAM__((Sfio_t *infile, Sfio_t *outfile, int nitems, int
 
 int
 b_tail __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-       register Sfio_t *fp;
-       register int n, delim='\n', flags=0;
+       Sfio_t *fp;
+       int n, delim='\n', flags=0;
        char *cp;
        off_t offset;
        long number = 10;
@@ -332,7 +332,7 @@ b_tail __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char
        }
        if(flags&F_FLAG)
        {
-               register char *bufp;
+               char *bufp;
                while(1)
                {
                        sfsync(sfstdout);
index aba297e811c9195775d4fd54b63edf6d17d06e4b..63af358ce41024da65868ba3f7ce334e2f427b98 100644 (file)
@@ -108,11 +108,11 @@ struct tee
  */
 
 static int tee_write __PARAM__((Sfio_t* fp, const __V_* buf, int n, Sfdisc_t* handle), (fp, buf, n, handle)) __OTORP__(Sfio_t* fp; const __V_* buf; int n; Sfdisc_t* handle;){
-       register const char*    bp;
-       register const char*    ep;
-       register int*           hp = ((struct tee*)handle)->fd;
-       register int            fd = sffileno(fp);
-       register int            r;
+       const char*     bp;
+       const char*     ep;
+       int*            hp = ((struct tee*)handle)->fd;
+       int             fd = sffileno(fp);
+       int             r;
 
        do
        {
@@ -131,12 +131,12 @@ static int tee_write __PARAM__((Sfio_t* fp, const __V_* buf, int n, Sfdisc_t* ha
 static Sfdisc_t tee_disc = { 0, tee_write, 0, 0, 0 };
 
 int
-b_tee __PARAM__((int argc, register char** argv), (argc, argv)) __OTORP__(int argc; register char** argv;){
-       register struct tee*    tp = 0;
-       register int            oflag = O_WRONLY|O_TRUNC|O_CREAT;
-       register int            n;
-       register int*           hp;
-       register char*          cp;
+b_tee __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
+       struct tee*     tp = 0;
+       int             oflag = O_WRONLY|O_TRUNC|O_CREAT;
+       int             n;
+       int*            hp;
+       char*           cp;
 
        NoP(id[0]);
        cmdinit(argv);
index 258fec5a781f9baa9020c2dac5f5a52daa03ef5b..46b8b18de4fde51315fc8821469694dff4fadba1 100644 (file)
@@ -96,8 +96,8 @@ static const char id[] = "\n@(#)tty (AT&T Bell Laboratories) 04/01/92\0\n";
 
 int
 b_tty __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){
-       register int n,sflag=0;
-       register char *tty;
+       int n,sflag=0;
+       char *tty;
 
        NoP(argc);
        NoP(id[0]);
index d8387a1a59b2d4fa2158b445ffab340c2ad1d339..75023b090f3657e50feb15f2aba27db8a808aa2b 100644 (file)
@@ -178,7 +178,7 @@ struct utsname
 };
 
 int
-uname __PARAM__((register struct utsname* ut), (ut)) __OTORP__(register struct utsname* ut;){
+uname __PARAM__((struct utsname* ut), (ut)) __OTORP__(struct utsname* ut;){
 #ifdef HOSTTYPE
        char*           sys = 0;
        char*           arch = 0;
@@ -252,9 +252,9 @@ static int  all = ((M_FLAG<<1)-1);
 
 int
 b_uname __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-       register int    n;
-       register int    flags = 0;
-       register char*  s;
+       int     n;
+       int     flags = 0;
+       char*   s;
        char*           sethost = 0;
        struct utsname  ut;
        char*           last = (char*)&ut.machine + sizeof(ut.machine);
index e20c5b706dc5aa1bcb30af3c4396cb44627fc480..48dd8264ebccacc2d4221f1e9839e8a5742ad54d 100644 (file)
@@ -106,7 +106,7 @@ static const char id[] = "\n@(#)uniq (AT&T Bell Laboratories) 04/01/93\0\n";
 static char *sidebuff __PARAM__((int size), (size)) __OTORP__(int size;){
        static int maxbuff;
        static char *buff;
-       register char *cp=0;
+       char *cp=0;
        if(size)
        {
                if(size <= maxbuff)
@@ -123,8 +123,8 @@ static char *sidebuff __PARAM__((int size), (size)) __OTORP__(int size;){
 }
 
 static int uniq __PARAM__((Sfio_t *fdin, Sfio_t *fdout, int fields, int chars, int mode), (fdin, fdout, fields, chars, mode)) __OTORP__(Sfio_t *fdin; Sfio_t *fdout; int fields; int chars; int mode;){
-       register int n, outsize=0;
-       register char *cp, *bufp, *outp;
+       int n, outsize=0;
+       char *cp, *bufp, *outp;
        char *orecp, *sbufp=0, *outbuff;
        int reclen,oreclen= -1,count=0, cwidth=0;
        if(mode&C_FLAG)
@@ -225,8 +225,8 @@ static int uniq __PARAM__((Sfio_t *fdin, Sfio_t *fdout, int fields, int chars, i
 
 int
 b_uniq __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){
-       register int n, mode=0;
-       register char *cp;
+       int n, mode=0;
+       char *cp;
        int fields=0, chars=0;
        Sfio_t *fpin, *fpout;
 
index 415bcddc17aa10d1c28266472f3ec7e051dc3e1a..b6b434c56c041c0fe34c7be5d7e6db5d9d68fbd0 100644 (file)
@@ -98,7 +98,7 @@ static const char id[] = "\n@(#)wc (AT&T Bell Laboratories) 08/11/94\0\n";
 
 #define ERRORMAX       125
 
-static void printout __PARAM__((register Wc_t *wp, register char *name,register int mode), (wp, name, mode)) __OTORP__(register Wc_t *wp; register char *name;register int mode;){
+static void printout __PARAM__((Wc_t *wp, char *name,int mode), (wp, name, mode)) __OTORP__(Wc_t *wp; char *name;int mode;){
        if(mode&WC_LINES)
                sfprintf(sfstdout," %7lu",wp->lines);
        if(mode&WC_WORDS)
@@ -109,10 +109,10 @@ static void printout __PARAM__((register Wc_t *wp, register char *name,register
 }
 
 int
-b_wc __PARAM__((int argc,register char **argv), (argc, argv)) __OTORP__(int argc;register char **argv;){
-       register char   *cp;
-       register int    mode=0, n;
-       register Wc_t   *wp;
+b_wc __PARAM__((int argc,char **argv), (argc, argv)) __OTORP__(int argc;char **argv;){
+       char    *cp;
+       int     mode=0, n;
+       Wc_t    *wp;
        Sfio_t          *fp;
        long            tlines=0, twords=0, tchars=0;
        struct stat     statb;
index c60f67bfa462f6200847425f33f67d7d0c047e88..44c35c341fa1d1ed7a1410247d6680baa74749da 100644 (file)
@@ -97,7 +97,7 @@
 #define endline(c)     (((signed char)-1)<0?(c)<0:(c)==((char)-1))
 
 Wc_t *wc_init __PARAM__((char *space), (space)) __OTORP__(char *space;){
-       register int  n;
+       int  n;
        Wc_t *wp;
 
        if(!(wp = (Wc_t*)stakalloc(sizeof(Wc_t))))
@@ -117,12 +117,12 @@ Wc_t *wc_init __PARAM__((char *space), (space)) __OTORP__(char *space;){
  * compute the line, word, and character count for file <fd>
  */
 wc_count __PARAM__((Wc_t *wp, Sfio_t *fd), (wp, fd)) __OTORP__(Wc_t *wp; Sfio_t *fd;){
-       register signed char    *space = wp->space;
-       register unsigned char  *cp;
-       register long           nwords;
-       register int            c;
-       register unsigned char  *endbuff;
-       register int            lasttype = 1;
+       signed char     *space = wp->space;
+       unsigned char   *cp;
+       long            nwords;
+       int             c;
+       unsigned char   *endbuff;
+       int             lasttype = 1;
        unsigned int            lastchar;
        unsigned char           *buff;
        wp->lines = nwords = wp->chars = 0;
index c4bf48f637ead2a5fac2ff94d0c334fdc79e50a5..53a9dd8f9fd04ddbc8e24033b449b639e0830be7 100644 (file)
@@ -137,8 +137,8 @@ static int delputc __PARAM__((int byte), (byte)) __OTORP__(int byte;){
        return 0;
 }
 
-static int delputl __PARAM__((register int n, register long v), (n, v)) __OTORP__(register int n; register long v;){
-       register int    i;
+static int delputl __PARAM__((int n, long v), (n, v)) __OTORP__(int n; long v;){
+       int     i;
        unsigned char   c[4];
 
        for(i = 0; i < n; ++i)
@@ -152,7 +152,7 @@ static int delputl __PARAM__((register int n, register long v), (n, v)) __OTORP_
        return 0;
 }
 
-static int delputs __PARAM__((register long n, register long addr), (n, addr)) __OTORP__(register long n; register long addr;){
+static int delputs __PARAM__((long n, long addr), (n, addr)) __OTORP__(long n; long addr;){
        if(n < (Dend-Dnext))
        {
                memcpy(Dnext,Btar+addr,n);
@@ -170,7 +170,7 @@ static int delputs __PARAM__((register long n, register long addr), (n, addr)) _
 
 /* write an instruction */
 static int putMove __PARAM__((Move* ip), (ip)) __OTORP__(Move* ip;){
-       register char   inst;
+       char    inst;
 
        inst = ip->type;
        inst |= (NBYTE(ip->size)&07) << 3;
@@ -194,7 +194,7 @@ static int putMove __PARAM__((Move* ip), (ip)) __OTORP__(Move* ip;){
 
 /* constructor for Move */
 static Move *newMove __PARAM__((int type, long size, long addr, Move* last), (type, size, addr, last)) __OTORP__(int type; long size; long addr; Move* last;){
-       register Move *ip = (Move*) malloc(sizeof(Move));
+       Move *ip = (Move*) malloc(sizeof(Move));
        if(!ip) return 0;
        ip->type = type;
        ip->size = size;
@@ -211,8 +211,8 @@ static Move *newMove __PARAM__((int type, long size, long addr, Move* last), (ty
 
 /* destructor for Move, return the elt after move */
 static Move *delMove __PARAM__((Move* ip), (ip)) __OTORP__(Move* ip;){
-       register Move *next = ip->next;
-       register Move *last = ip->last;
+       Move *next = ip->next;
+       Move *last = ip->last;
        if(last)
                last->next = next;
        if(next)
@@ -223,7 +223,7 @@ static Move *delMove __PARAM__((Move* ip), (ip)) __OTORP__(Move* ip;){
 
 /* make a new add command */
 static Move *makeAdd __PARAM__((char* beg, char* end, Move* last), (beg, end, last)) __OTORP__(char* beg; char* end; Move* last;){
-       register Move   *ip;
+       Move    *ip;
 
        ip = newMove(DELTA_ADD,(long)(end-beg),(long)(beg-Btar),NiL);
        if(!ip)
@@ -232,7 +232,7 @@ static Move *makeAdd __PARAM__((char* beg, char* end, Move* last), (beg, end, la
        /* remove small previous adjacent moves */
        while(last)
        {
-               register int a_size, cost_m, cost_a;
+               int a_size, cost_m, cost_a;
 
                if(last->type == DELTA_ADD)
                        break;
@@ -267,7 +267,7 @@ static Move *makeAdd __PARAM__((char* beg, char* end, Move* last), (beg, end, la
 
 /* check to see if a move is appropriate */
 static int chkMove __PARAM__((long m_size, long m_addr, long a_size), (m_size, m_addr, a_size)) __OTORP__(long m_size; long m_addr; long a_size;){
-       register int cost_m, cost_a;
+       int cost_m, cost_a;
 
        cost_m = NBYTE(m_size) + NBYTE(m_addr);
        cost_a = NBYTE(m_size) + m_size;
@@ -277,7 +277,7 @@ static int chkMove __PARAM__((long m_size, long m_addr, long a_size), (m_size, m
        /* it's good but it may be better to merge it to an add */
        if(a_size > 0)
        {
-               register int m_cost, a_cost;
+               int m_cost, a_cost;
 
                m_cost = cost_m + NBYTE(a_size) + a_size;
                a_size += m_size;
@@ -292,9 +292,9 @@ static int chkMove __PARAM__((long m_size, long m_addr, long a_size), (m_size, m
 }
 
 /* optimize a sequence of moves */
-static Move *optMove __PARAM__((register Move* s), (s)) __OTORP__(register Move* s;){
-       register long   add, m_cost, a_cost;
-       register Move   *ip, *last;
+static Move *optMove __PARAM__((Move* s), (s)) __OTORP__(Move* s;){
+       long    add, m_cost, a_cost;
+       Move    *ip, *last;
 
        add = (s->last && s->last->type == DELTA_ADD) ? s->last->size : 0;
 
@@ -302,7 +302,7 @@ static Move *optMove __PARAM__((register Move* s), (s)) __OTORP__(register Move*
        a_cost = 0;
        for(ip = s; ip; ip = ip->next)
        {
-               register long cost_m, cost_a;
+               long cost_m, cost_a;
 
                if(ip->type == DELTA_ADD || ip->size > (M_MAX+A_MAX))
                        break;
@@ -360,8 +360,8 @@ static Move *optMove __PARAM__((register Move* s), (s)) __OTORP__(register Move*
 /* the real thing */
 int
 delta __PARAM__((char* src, long n_src, char* tar, long n_tar, int delfd), (src, n_src, tar, n_tar, delfd)) __OTORP__(char* src; long n_src; char* tar; long n_tar; int delfd;){
-       register char   *sp, *tp, *esrc, *etar;
-       register long   size, addr;
+       char    *sp, *tp, *esrc, *etar;
+       long    size, addr;
        Suftree         *tree;
        Move            *moves, *last;
        char            inst, buf[BUFSIZE];
@@ -395,7 +395,7 @@ delta __PARAM__((char* src, long n_src, char* tar, long n_tar, int delfd), (src,
                                break;
                if((size = src-Bsrc) > 0)
                {
-                       register int cost_m, cost_a;
+                       int cost_m, cost_a;
 
                        cost_m = NBYTE(size) + NBYTE(0);
                        cost_a = NBYTE(size) + size;
@@ -501,7 +501,7 @@ delta __PARAM__((char* src, long n_src, char* tar, long n_tar, int delfd), (src,
        /* optimize move instructions */
        if(moves)
        {
-               register Move   *ip;
+               Move    *ip;
 
                ip = moves;
                while(ip->last)
index 9a732a43ffcff15f75b2e19d6941d2376cff326b..50bb63d29c1971ab17b109aab596939d8402b958 100644 (file)
 #define ALPHA  (256)   /* alphabet size */
 
 static void freemem __PARAM__((long* n_index, char*** index), (n_index, index)) __OTORP__(long* n_index; char*** index;){
-       register int i;
+       int i;
        if(n_index && index)
        {
                for(i = 0; i < ALPHA; ++i)
@@ -113,7 +113,7 @@ static void freemem __PARAM__((long* n_index, char*** index), (n_index, index))
 
 /* initial assumptions: src[0] == tar[0] && src+n_match <= endsrc */
 static long domatch __PARAM__((char* src, char* endsrc, char* tar, char* endtar, long n_match), (src, endsrc, tar, endtar, n_match)) __OTORP__(char* src; char* endsrc; char* tar; char* endtar; long n_match;){
-       register char   *sp, *tp;
+       char    *sp, *tp;
 
        /* see if this really improves on the current match */
        for(sp = src+n_match, tp = tar+n_match; sp > src; --sp, --tp)
@@ -136,9 +136,9 @@ static long domatch __PARAM__((char* src, char* endsrc, char* tar, char* endtar,
 long   mtchstring __PARAM__((char* src, long n_src, char* tar, long n_tar, char** match), (src, n_src, tar, n_tar, match)) __OTORP__(char* src; long n_src; char* tar; long n_tar; char** match;){
        char            *endsrc, *endtar;
        long            n_match;
-       register int    i;
-       register long   n_ind;
-       register char   **ind;
+       int     i;
+       long    n_ind;
+       char    **ind;
        static long     *N_index = 0;
        static char     *Cursrc = 0, ***Index = 0;
        static int      Alloced = 0;
@@ -166,7 +166,7 @@ long        mtchstring __PARAM__((char* src, long n_src, char* tar, long n_tar, char**
                Alloced = 1;
                if(N_index = (long*) malloc(ALPHA*sizeof(long)))
                {
-                       register char   *sp;
+                       char    *sp;
 
                        memzero(N_index,ALPHA*sizeof(long));
                        if(!(Index = (char ***) malloc(ALPHA*sizeof(char**))))
@@ -213,7 +213,7 @@ long        mtchstring __PARAM__((char* src, long n_src, char* tar, long n_tar, char**
        n_match = 0;
        while(1)
        {
-               register long m;
+               long m;
 
                if(ind)
                {
index 23c224a6a780dfa9aec37e7ef20e72120d83ecf4..8fd413ac6cf9af3e9eced8ac144a5a43cc4b3676 100644 (file)
@@ -122,7 +122,7 @@ void delsuftree __PARAM__((Suftree* root), (root)) __OTORP__(Suftree* root;){
        root -= 1;
        while(root)
        {
-               register Suftree *next;
+               Suftree *next;
                next = NEXT(root);
                free(root);
                root = next;
@@ -131,7 +131,7 @@ void delsuftree __PARAM__((Suftree* root), (root)) __OTORP__(Suftree* root;){
 
 /* Find a child whose label string starts with a given character */
 static Suftree *child_find __PARAM__((Suftree* node, Element c), (node, c)) __OTORP__(Suftree* node; Element c;){
-       register Suftree        *np, *last;
+       Suftree *np, *last;
 
        last = 0;
        for(np = CHILD(node); np; np = SIBLING(np))
@@ -186,10 +186,10 @@ static Suftree *getmem __PARAM__((Suftree* root, int n), (root, n)) __OTORP__(Su
 **                     of the previously inserted suffix.
 */
 Suftree        *bldsuftree __PARAM__((Element* src, long len), (src, len)) __OTORP__(Element* src; long len;){
-       register Element        *sp, *mp, *rescan, *endmatch, *endsrc;
-       register Suftree        *match, *clocus, *locus, *link;
-       register long           mtlen, relen;
-       register int            n;
+       Element *sp, *mp, *rescan, *endmatch, *endsrc;
+       Suftree *match, *clocus, *locus, *link;
+       long            mtlen, relen;
+       int             n;
        Suftree                 *root, *list, *endlist;
 
        if(len == 0)
@@ -383,9 +383,9 @@ Suftree     *bldsuftree __PARAM__((Element* src, long len), (src, len)) __OTORP__(El
        string represented by the tree.
 */
 long   mtchsuftree __PARAM__((Suftree* tree, Element* str, long len, Element** mtchp), (tree, str, len, mtchp)) __OTORP__(Suftree* tree; Element* str; long len; Element** mtchp;){
-       register Suftree        *match;
-       register Element        *sp, *mp, *endmp, *endstr;
-       register long           mlen;
+       Suftree *match;
+       Element *sp, *mp, *endmp, *endstr;
+       long            mlen;
 
        mlen = 0;
        endstr = str + len;
index 449ccfc71577493bc9339f2916e90d3178a10f08..85621c3e35600f935d2870d9189c66cc4e3b587f 100644 (file)
@@ -112,7 +112,7 @@ static int          Dfd, Tfd;
 static int delgetc __PARAM__((void), ()){
        if(Dnext >= Dend)
        {
-               register int n;
+               int n;
                if((n = read(Dfd,(char*)Ddata,BUFSIZE)) <= 0)
                        return -1;
                Dnext = Ddata, Dend = Ddata+n;
@@ -121,13 +121,13 @@ static int delgetc __PARAM__((void), ()){
 }
 
 /* read a long value from delta file */
-static long delgetl __PARAM__((register int n), (n)) __OTORP__(register int n;){
-       register long   lv;
+static long delgetl __PARAM__((int n), (n)) __OTORP__(int n;){
+       long    lv;
 
        lv = 0;
        for(; n > 0; --n)
        {
-               register int v;
+               int v;
                if((v = delgetc()) < 0)
                        return -1;
                lv = lv*256 + v;
@@ -139,7 +139,7 @@ static long delgetl __PARAM__((register int n), (n)) __OTORP__(register int n;){
 static int filetransfer __PARAM__((int fd, long n), (fd, n)) __OTORP__(int fd; long n;){
        while(n > 0)
        {
-               register int r;
+               int r;
 
                if(Tnext >= Tend)
                        if(tarflush() < 0)
@@ -154,10 +154,10 @@ static int filetransfer __PARAM__((int fd, long n), (fd, n)) __OTORP__(int fd; l
 }
 
 /* transfer a number of bytes from a memory area to the target file */
-static int memtransfer __PARAM__((unsigned char* addr, register long n), (addr, n)) __OTORP__(unsigned char* addr; register long n;){
+static int memtransfer __PARAM__((unsigned char* addr, long n), (addr, n)) __OTORP__(unsigned char* addr; long n;){
        while(n > 0)
        {
-               register int r;
+               int r;
 
                if(Tnext >= Tend)
                        if(tarflush() < 0)
@@ -173,12 +173,12 @@ static int memtransfer __PARAM__((unsigned char* addr, register long n), (addr,
 
 /* transfer a number of bytes from delta to target */
 static int deltransfer __PARAM__((long n), (n)) __OTORP__(long n;){
-       register int d;
+       int d;
 
        /* transfer what's already in core */
        if((d = Dend-Dnext) > 0)
        {
-               register int w = n <= d ? n : d;
+               int w = n <= d ? n : d;
 
                if(w > (Tend-Tnext))
                        if(tarflush() < 0)
@@ -196,8 +196,8 @@ static int deltransfer __PARAM__((long n), (n)) __OTORP__(long n;){
 
 int
 update __PARAM__((int srcfd, long offset, int delfd, int tarfd), (srcfd, offset, delfd, tarfd)) __OTORP__(int srcfd; long offset; int delfd; int tarfd;){
-       register int    i;
-       register long   n_src, n_tar;
+       int     i;
+       long    n_src, n_tar;
        unsigned char   delbuf[BUFSIZE], tarbuf[BUFSIZE];
        unsigned char   *src, *tar;
 
@@ -225,7 +225,7 @@ update __PARAM__((int srcfd, long offset, int delfd, int tarfd), (srcfd, offset,
 
        while((i = delgetc()) >= 0)
        {
-               register long   size, addr;
+               long    size, addr;
 
                if((size = delgetl((i>>3)&07)) < 0)
                        return -1;
index 950c2dd9fe9adf69061632910455a9cf7996242d..d248d757efccd72ec62b4a5b2bd9ded4bfe2d168 100644 (file)
@@ -72,7 +72,7 @@ _END_EXTERNS_
 #endif
 
 /* short-hand notations */
-#define reg            register
+#define reg            /*no register keywords*/
 #define uchar          unsigned char
 #define uint           unsigned int
 #define ulong          unsigned long
index f28c2b4a3bd822f8291417a58de35fd7f06088b9..7d67446734ebe3987c5fafac0c9a600a8d0b8a32 100644 (file)
@@ -63,7 +63,7 @@ char * GetSharedMsg(
 /*
  * Without this proto, standard C says that _DtGetMessage() returns
  * an int, even though it really returns a pointer.  The compiler is
- * then free to use the high 32-bits of the return register for
+ * then free to use the high 32-bits of the return for
  * something else (like scratch), and that can garble the pointer.
  */
 # ifdef _NO_PROTO
index 23a44ef91b8280dd8d39a95158f74386a5811818..8617ae0d1bcc9c41ac83de7e30900b8990b7d9f2 100644 (file)
@@ -638,7 +638,7 @@ all_tbl_search(
         char *name,
         int flag )
 {
-       register int i;
+       int i;
        void *found;
 
         if (!structInited)
@@ -647,8 +647,8 @@ all_tbl_search(
        if (found = (void *) xkhash_find(Hashnams, name))
                return((memtbl_t *) found);
        else {
-               register int j;
-               register memtbl_t **subtbl;
+               int j;
+               memtbl_t **subtbl;
 
                for (i = 0; i < Nstructlist; i++) {
                        if (subtbl = Structlist[i].mem)
index a2aff74ed1502f6a6d27810802806021685eb4d2..5a0e8b972fd2eeb15cc71c996a1ed4f5a482596a 100644 (file)
@@ -174,9 +174,6 @@ const struct shtable2 shtab_variables[] =
 #ifdef MULTIBYTE
        "CSWIDTH",      0,                              (char*)0,
 #endif /* MULTIBYTE */
-#ifdef apollo
-       "SYSTYPE",      0,                              (char*)0,
-#endif /* apollo */
 EXKSH_EXTRA_VAR
        "",     0,                                      (char*)0
 };
index 2247942333838509e3e27c6d7b2af23f2ac37ee8..8ef221e8616b19869d20c22d088911dd494d46b7 100644 (file)
@@ -113,7 +113,7 @@ static void pr_widheader( void ) ;
 void
 init_widgets( void )
 {
-       register int i, n = 0;
+       int i, n = 0;
        char *nam;
        wtab_t *wentries;
         char * errmsg;
@@ -163,7 +163,7 @@ str_to_class(
         char *arg0,
         char *s )
 {
-   register int i, j, n;
+   int i, j, n;
    Widget w;
    char *nam;
    classtab_t *ret;
@@ -429,7 +429,7 @@ wtab_t *
 widget_to_wtab(
         Widget w )
 {
-       register int i;
+       int i;
         char * errmsg;
 
        if (w == NULL)
@@ -495,7 +495,7 @@ get_new_wtab(
         char *name )
 
 {
-       register int i;
+       int i;
 
        /*
         * If there has been a destroywidget call, then one or more
@@ -518,7 +518,7 @@ get_new_wtab(
                if (NumW < MaxW) {
                        i = NumW++;
                } else {
-                       register int j;
+                       int j;
                        int oldmax = MaxW;
                        wtab_t *wentries;
 
@@ -545,7 +545,7 @@ fixupresources(
         resfixup_t *fixups )
 {
        XtResource *resource;
-       register int i;
+       int i;
        char *nam;
 
        if (fixups == NULL)
@@ -658,7 +658,7 @@ _pr_resource_list(
 static void
 sort_and_print_res( void )
 {
-       register int i;
+       int i;
        qsort(Res, Nres, sizeof(XtResource *), (int (*)())rescompare);
        for (i = 0; i < Nres; i++) {
                _pr_resource_list(Res[i]);
@@ -826,7 +826,7 @@ do_DtWidgetInfo(
         int argc,
         char *argv[] )
 {
-       register int i, j;
+       int i, j;
        char buf[1024];
        wtab_t *w;
        classtab_t *c;
index 0bb9d869f6e02df660918960dd7b1dd7178291cd..0742989628d359571eb38239faab26802ce1291f 100644 (file)
@@ -652,7 +652,7 @@ _xmcreatefunc(
        wtab_t *w, *pw, *wtab, *parenttab;
        char *wname, *parentid, *var;
        Arg     args[MAXARGS];
-       register int    i;
+       int     i;
        int n;
         char * errmsg;
        int pargc;
@@ -2336,7 +2336,7 @@ do_XmMainWindowSetAreas(
 {
    char *arg0 = argv[0];
    wtab_t *w[6];
-   register int i;
+   int i;
    char * errmsg;
 
    if (argc != 7) 
@@ -4992,7 +4992,7 @@ _CreatePDMJobSetup(
        char *arg0 = argv[0];
        wtab_t *w, *pw, *wtab, *parenttab;
        char *parentid, *var;
-       register int    i;
+       int     i;
        int n;
        char * errmsg;
        WidgetClass wclass;
index daf743b0845a5336fc3542a766eb60ab596b1621..09955a730ea56cf238a131b61e2bf5a7225d0832 100644 (file)
@@ -264,7 +264,7 @@ DtkshCvtNamedValueToString(
        struct named_integer *table;
        int numtable;
        long value;
-       register int i;
+       int i;
         char * errmsg;
 
         switch(fval->size)
@@ -335,7 +335,7 @@ DtkshCvtStringToNamedValue(
        struct named_integer *table;
        int numtable;
        char *value;
-       register int i;
+       int i;
         char * errbuf;
         char * errmsg;
 
index e31ce4404c384bd6e145a2275822cc0be9c80566..a3833442eb676afa5e8f9ad264a587f57887fc47 100644 (file)
@@ -291,7 +291,7 @@ classtab_t C[] = {
 void
 toolkit_init_widgets( void )
 {
-       register int i, n = 0;
+       int i, n = 0;
        struct namnod *nam;
 
        if (C[0].class != NULL)
index 4143de6c123a86de043b8146b7eb3189d47095f0..3ff67a063d275079506f71407ed2093f0280f171 100644 (file)
@@ -162,28 +162,28 @@ INCLUDES = -I$(XPROJECTROOT)/include/freetype2
           SRCS1 = access.c account.c auth.c genauth.c daemon.c dm.c \
                   dpylist.c error.c file.c mitauth.c protodpy.c policy.c \
                   reset.c resource.c server.c session.c socket.c util.c \
-                  verify.c version.c apollo.c sysauth.c fontpath.c $(DESSRCS) \
+                  verify.c version.c sysauth.c fontpath.c $(DESSRCS) \
                  qualify.c choose.c netaddr.c xdmcp.c \
                  $(PAM_SRCS) $(SOLARIS_SRCS)
 
           OBJS1 = access.o account.o auth.o genauth.o daemon.o dm.o \
                   dpylist.o error.o file.o mitauth.o protodpy.o policy.o \
                   reset.o resource.o server.o session.o socket.o util.o \
-                  verify.o version.o apollo.o sysauth.o fontpath.o $(DESOBJS) \
+                  verify.o version.o sysauth.o fontpath.o $(DESOBJS) \
                  qualify.o choose.o netaddr.o xdmcp.o \
                  $(PAM_OBJS) $(SOLARIS_OBJS) 
 
           PROG2 = dtgreet
 #ifdef AlphaArchitecture
           SRCS2 = vgcallback.c vglogo.c vgmain.c vgutil.c \
-                  vgversion.c vgapollo.c vglang.c vgsiaform.c
+                  vgversion.c vglang.c vgsiaform.c
           OBJS2 = vgcallback.o vglogo.o vgmain.o vgutil.o \
-                  vgversion.o vgapollo.o vglang.o vgsiaform.o
+                  vgversion.o vglang.o vgsiaform.o
 #else
           SRCS2 = vgcallback.c vglogo.c vgmain.c vgutil.c \
-                  vgversion.c vgapollo.c vglang.c
+                  vgversion.c vglang.c
           OBJS2 = vgcallback.o vglogo.o vgmain.o vgutil.o \
-                  vgversion.o vgapollo.o vglang.o
+                  vgversion.o vglang.o
 #endif
 
           PROG3 = dtchooser
index 27f51ca0c2ffcfbf570956def5540797d2f2d390..3ea5c320fe46774c9552a4b583fe15d4dda90849 100644 (file)
  *
  ***************************************************************************/
 
-
-#ifdef __apollo
-#include <X11/apollosys.h>        /* for pid_t struct in hp-ux sys/types.h */
-#include       <sys/types.h>
-#else
 #include       <sys/types.h>
 #include       <sys/stat.h>
-#endif
 
 #ifdef AIXV3
 #include       <usersec.h>
diff --git a/cde/programs/dtlogin/apollo.c b/cde/programs/dtlogin/apollo.c
deleted file mode 100644 (file)
index be21650..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: apollo.c /main/4 1995/10/27 16:11:14 rswiston $ */
-/*                                                                      *
- * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
- * (c) Copyright 1993, 1994 International Business Machines Corp.       *
- * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
- * (c) Copyright 1993, 1994 Novell, Inc.                                *
- */
-/************************************<+>*************************************
- ****************************************************************************
- **
- **   File:        apollo.c
- **
- **   Project:     HP Visual User Environment (DT)
- **
- **   Description: Dtlogin user setup routines for Domain/OS 10.4
- **
- **                These routines set up the user's state before starting
- **               the DT session.
- **
- **
- **   (c) Copyright 1987, 1988, 1989 by Hewlett-Packard Company
- **
- **
- **    Conditional compiles:
- **
- **    __apollo    Domain OS only
- **
- ****************************************************************************
- ************************************<+>*************************************/
-
-
-#include       <stdio.h>               /* just so file isn't empty        */
-
-#ifdef __apollo
-
-/***************************************************************************
- *
- *  Includes & Defines
- *
- ***************************************************************************/
-
-#include       <pwd.h>
-
-#include       <apollo/base.h>
-#include       <apollo/error.h>
-
-#include       "apollo/passwd.h"       /* copy of <apollo/sys/passwd.h>   */
-#include       "apollo/login.h"        /* copy of <apollo/sys/login.h>    */
-
-#include       "dm.h"
-#include       "vgmsg.h"
-
-      
-#define        SCMPN(a, b)     strncmp(a, b, sizeof(a))
-#define        SCPYN(a, b)     strncpy(a, b, sizeof(a))
-#define eq(a,b)                !strcmp(a,b)
-
-#define NMAX   strlen(name)
-#define HMAX   strlen(host)
-
-#define STRING(str)    (str), (short) strlen(str)
-#define STRNULL(s, l)  ((s)[(l)] = '\0')
-#define ISTRING(str)   (str), (int) strlen(str)
-
-
-
-/***************************************************************************
- *
- *  External declarations
- *
- ***************************************************************************/
-
-
-/***************************************************************************
- *
- *  Procedure declarations
- *
- ***************************************************************************/
-
-
-
-
-/***************************************************************************
- *
- *  Global variables
- *
- ***************************************************************************/
-
-
-
-
-/***************************************************************************
- *
- *  Stub routines
- *
- ***************************************************************************/
-
-
-
-
-/***************************************************************************
- *
- *  DoLogin
- *
- *  set up user environment
- ***************************************************************************/
-
-int
-DoLogin( char *user, char *passwd, char *host )
-{
-       ios_$id_t               logid;
-       login_$opt_set_t        opts;
-               status_$t               status;
-        error_$string_t         subsystem, module, error;
-        short                   sslen, modlen, errlen;
-       char                    buf[BUFSIZ];
-      
-       Debug("DoLogin(): for %s\n", user);
-       login_$set_host(host, strlen(host));
-
-       opts = login_$no_prompt_name_sm | 
-              login_$no_prompt_pass_sm | 
-              login_$addut_sm          |
-              login_$chown_tty_sm;
-
-       Debug("DoLogin(): before calling login_$chk_login()\n");
-       if ((!login_$chk_login(opts, STRING(user), STRING(passwd),
-                              (login_$open_log_p) NULL, STRING(""),
-                              &logid, &status)) 
-           && (status.all != status_$ok)) {
-
-           Debug("DoLogin(): login_$chk_login() failed\n");
-                   error_$get_text(status, subsystem, &sslen, module, &modlen, 
-                           error, &errlen);
-            STRNULL(error, errlen);
-           STRNULL(module, modlen);
-                   STRNULL(subsystem, sslen);
-            sprintf(buf,ReadCatalog(MC_LOG_SET,MC_LOG_DOMAIN,MC_DEF_LOG_DOMAIN),
-               error, subsystem, module);
-           LogError (buf);
-
-           bzero (passwd, strlen(passwd)); 
-
-           return (false);
-       }
-
-       Debug("DoLogin(): login_$chk_login() succeeded\n");
-
-       /* 
-        * clear password...
-        */
-       bzero (passwd, strlen(passwd)); 
-
-       return (true);
-}     
-#endif
diff --git a/cde/programs/dtlogin/apollo/des.h b/cde/programs/dtlogin/apollo/des.h
deleted file mode 100644 (file)
index 6a52d01..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: des.h /main/3 1995/10/27 16:19:08 rswiston $ */
-/*                                                                      *
- * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
- * (c) Copyright 1993, 1994 International Business Machines Corp.       *
- * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
- * (c) Copyright 1993, 1994 Novell, Inc.                                *
- */
-/*
-{ DES, USX/LIB/DESLIB, PJL, 04/05/82 }
-{   DES routines }
-
-{  CHANGES:
-   12/21/88 gilbert   Modifications for C++.
-   03/25/88 brian     Created ANSI C version
-   01/13/86 nazgul    Created C version
-   08/25/83 spf   Added us_des_ins_pas declaration
-}
-*/
-
-#ifndef apollo_sys_des_h
-#define apollo_sys_des_h
-
-
-/*  Enable function prototypes for ANSI C and C++  */
-#if defined(__STDC__) || defined(c_plusplus) || defined(__cplusplus)
-#    define _PROTOTYPES
-#endif
-
-/*  Required for C++ V2.0  */
-#ifdef  __cplusplus
-    extern "C" {
-#endif
-
-#ifdef _PROTOTYPES
-#define std_$call      extern
-#endif
-
-typedef  char  des_$key[8];
-
-/*
-  packed record                       { NOTE THIS WELL!!! }
-        bits:   0..127;                 { 56 bits: LEFT ADJUSTED in 8 bytes }
-        parity: 0..1                    { reserved for parity, but ignored }
-        end;
-*/
-
-typedef  char  des_$text[8];          /* Actually a 64 bit set */
-
-typedef  char  des_$key_sched[16][8];
-
-std_$call void    des_$encrypt(
-#ifdef _PROTOTYPES
-        des_$text       & plain,          /* input 64 bits to encrypt */
-        des_$text       * cipher,         /* ...get back result */
-        des_$key_sched  & key_sched       /* made with des_$compute_key_sched */
-#endif
-);
-
-std_$call void   des_$decrypt(
-#ifdef _PROTOTYPES
-        des_$text       & cipher,         /* input 64 bits to decrypt */
-        des_$text       * plain,          /* ...get back result */
-        des_$key_sched  & key_sched       /* made with des_$compute_key_sched */
-#endif
-);
-
-std_$call void   des_$compute_key_sched(
-#ifdef _PROTOTYPES
-        des_$key        & key,            /* eight byte key */
-        des_$key_sched  * key_sched       /* output key schedule */
-#endif
-);
-
-#ifdef  __cplusplus
-    }
-#endif
-
-#endif
diff --git a/cde/programs/dtlogin/apollo/login.h b/cde/programs/dtlogin/apollo/login.h
deleted file mode 100644 (file)
index 068ea56..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: login.h /main/3 1995/10/27 16:19:16 rswiston $ */
-/*                                                                      *
- * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
- * (c) Copyright 1993, 1994 International Business Machines Corp.       *
- * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
- * (c) Copyright 1993, 1994 Novell, Inc.                                *
- */
-/*  LOGIN.INS.C, /us/ins, rod, 12/09/88 */
-
-/* changes:
-    12/21/88 gilbert Modifications for C++.
-    12/09/88 betsy  add login_$logins_disabled 
-    04/19/88 betsy  cast values for login_$opt_set_t  ( to be consistent )
-    03/30/88 betsy  add login_$set_host
-    03/21/88 betsy  add options login_$addut & login_$chown_tty
-       01/04/88 brian  Fixed param decl of login_$chk_login
-       12/31/87 brian  Converted to ANSII from /us/ins/login.ins.c/6
-*/
-
-#define login_$mod 2
-
-#define login_$err_shut        0x07020001  /*user wants to caller to shut down*/
-#define login_$err_exit        0x07020002  /*user wants to caller to exit*/
-#define login_$no_room         0x07020003  /*no room for rep at open */
-#define login_$bad_passwd      0x07020004  /*passwd check failed */
-#define login_$inv_acct        0x07020005  /* account expired */
-#define login_$logins_disabled 0x07020006  /* logins disabled */
-
-#define login_$log_stream_index 4    /* 4th stream in streams array is the open log */
-
-
-typedef void *login_$ptr;
-
-typedef short enum { login_$read, login_$update } login_$mode_t;
-
-typedef short enum {
-    login_$log_events,      /* log all events */
-    login_$log_inv_only,    /* log only unsuccessful attempts to log in */
-    login_$no_passwd,       /* don't require password (!) */
-    login_$no_setsid,       /* implies no_setpm, but allows set of wd/nd */
-    login_$no_setpm,        /* not done unless setsid successfully done */
-    login_$no_setwd,        /* not done if setsid attempted and failed */
-    login_$fail_ret,        /* return if failure logged */
-    login_$no_prompt_name,  /* no prompt for name */
-    login_$no_prompt_pass,  /* no prompt for password */
-    login_$preserve_sub,    /* preserve subsystem */
-    login_$leave_log_open,  /* leave log file open on return */
-    login_$addut,           /* add utmp/wtmp/lastlog entry */
-    login_$chown_tty,       /* chown the login device */
-    login_$extra14,         /* pad to 32-bit set */
-    login_$extra15, 
-    login_$extra16, 
-    login_$extra17          /* just over the border */
-} login_$opt_t;
-
-typedef long login_$opt_set_t;
-#define login_$log_events_sm      ((login_$opt_set_t) (1 << (int) login_$log_events))
-#define login_$log_inv_only_sm    ((login_$opt_set_t) (1 << (int) login_$log_inv_only))
-#define login_$no_passwd_sm       ((login_$opt_set_t) (1 << (int) login_$no_passwd))
-#define login_$no_setsid_sm       ((login_$opt_set_t) (1 << (int) login_$no_setsid))
-#define login_$no_setpm_sm        ((login_$opt_set_t) (1 << (int) login_$no_setpm))
-#define login_$no_setwd_sm        ((login_$opt_set_t) (1 << (int) login_$no_setwd))
-#define login_$fail_ret_sm        ((login_$opt_set_t) (1 << (int) login_$fail_ret))
-#define login_$no_prompt_name_sm  ((login_$opt_set_t) (1 << (int) login_$no_prompt_name))
-#define login_$no_prompt_pass_sm  ((login_$opt_set_t) (1 << (int) login_$no_prompt_pass))
-#define login_$preserve_sub_sm    ((login_$opt_set_t) (1 << (int) login_$preserve_sub))
-#define login_$leave_log_open_sm  ((login_$opt_set_t) (1 << (int) login_$leave_log_open))
-#define login_$addut_sm           ((login_$opt_set_t) (1 << (int) login_$addut))
-#define login_$chown_tty_sm       ((login_$opt_set_t) (1 << (int) login_$chown_tty))
-
-typedef char login_$string_t[256];
-typedef ios_$id_t login_$streams_t[4];
-
-typedef char (*login_$open_log_p)(
-               char            * log_file,
-               short           & log_flen,
-               stream_$id_t    * logstr
-);
-
-typedef struct {
-        int                    (*help)(stream_$id_t    & stream);
-        login_$open_log_p      open_log;
-       /* A note to you:                                                     aug-87
-         These next two routines are here only for callers that cannot provide streams
-         for their i/o (i.e. the dm. It was just too hard, esp since he is 'going away'.)
-         To have them used, pass the number -2 as your first stream in login_$streams_t.
-         A bit of a hack, true, but as long as we all understand each other, it will work.
-         Login_$login promises NOT to ref these routines if you pass real streams. (Note
-         that the fillbuf stuff is gone (since changing home dir is no longer supported.)
-       */ 
-        short                  (*pread)(
-                                       stream_$id_t    & stream,
-                                       char            * inbuf,
-                                       short           & inlen,
-                                       char            * pstr,
-                                       short           & plen,
-                                       boolean         & echo,
-                                       char            * fillbuf, /* pre-fill buffer with string */
-                                       short           & fillbuflen
-                               );
-        int                    (*pwrite)(
-                                       stream_$id_t    & stream,
-                                       char            * pstr,
-                                       short           & plen
-                               );
-} login_$proc_rec_t;
-
-
-/*  Required for C++ V2.0  */
-#ifdef  __cplusplus
-    extern "C" {
-#endif
-
-/* FULL_LOGIN --- performs the login function with prompting, implementing system policy,
-            setting wd, nd, pm_$sid_text, pm_$home_txt and default shell (unless 
-            already set), prints /etc/dmmsg if exists.  Supports 'shut, 'exit' and 
-            'help' and all options EXCEPT login_$no_setsid.  Takes optional strings
-            for pre-read user name [passwd]. */
-extern boolean 
-login_$full_login(
-       login_$opt_set_t        & opts,
-       login_$streams_t        * streams,      /* in, out, err, log_stream  */
-       char                    * login_name,   /* login string - iff login_$no_prompt_name */
-       short                   & login_nlen,
-       char                    * pass,         /* passwd string - iff login_$no_prompt_pass */
-       short                   & passlen,
-       login_$proc_rec_t       & ioprocs,      /* procedure vectors */
-       char                    * log_file,     /* used iff login_$log_events/inv in opts */
-       short                   & log_flen,
-       status_$t               * status
-);
-
-/* CHK_LOGIN --- performs the login function based on the strings passed in with no 
-                prompting.  DOES NOT fully implement system policy. i.e. does nothing
-                if passwd needs to be changed, but returns bad status if expired or
-                invalid accounts.  Gives no error msgs. */
-extern boolean
-login_$chk_login (
-       login_$opt_set_t        & opts,
-       char                    * login_name,   /* login string - iff login_$no_prompt_name */
-       short                   & login_nlen,
-       char                    * pass,         /* passwd string - iff login_$no_prompt_pass */
-       short                   & passlen,
-       login_$open_log_p       & open_log,     /* used iff login_$log_events/inv in opts */
-       char                    * log_file,     /* used iff login_$log_events/inv in opts */
-       short                   & log_flen,     /* used iff login_$log_events/inv in opts */
-       ios_$id_t               * log_stream,   /* stream for open log file iff login_$leave_log_open */
-       status_$t               * status
-);
-
-/*-----------------------------------------------------------------------------
-  LOGIN_$SET_HOST - sets the host name to be used in the addut on a subsequent 
-                    login_$full_login or login_$chk_login call                 */
-extern void 
-login_$set_host(
-   char        * host_name,  /* max len is 64 */
-   int         & host_len
-);
-
-/* O P E N --- prepare to do login type stuff */
-extern void
-login_$open(
-       login_$mode_t   & lmode,
-       login_$ptr      * lptr,
-       status_$t       * st
-);
-
-/* S E T _ P P O -- set the PPO to operate on 
-   if ppo length is zero, use currently logged in user's PPO
-   if set_ppo not call before chpass, ckpass or chhdir called, one
-   will automatically be done (for current user)
-*/
-extern void
-login_$set_ppo(
-       login_$ptr      & lptr,
-       char            * ppo,
-       short           & plen,
-       status_$t       * st
-);
-
-/* C K P A S S -- check password 
-   checks the supplied password against that of the set PPO 
-*/        
-extern void
-login_$ckpass(
-       login_$ptr      & lptr,
-       char            * pass,
-       short           & plen,
-       status_$t       * st
-);                              
-
-/* C H P A S S --- change password in the registry */
-extern void 
-login_$chpass(
-       login_$ptr      & lptr,
-       char            * pass,
-       short           & plen,
-       status_$t       * st
-);
-
-/* C H H D I R --- change home directory in the registry */
-extern void 
-login_$chhdir(
-       login_$ptr      & lptr,
-       char            * hdir,
-       short           & hlen,
-       status_$t       * st
-);
-
-/* E R R _ C O N T E X T --- file name that had problems */
-extern void 
-login_$err_context(
-       login_$ptr      & lptr,
-       status_$t       * errst,
-       char            * badf,
-       short           * blen,
-       status_$t       * st
-);
-
-/* C L O S E --- release all acquired resources */
-    /* NOTE --- call even if open FAILS! */
-extern void 
-login_$close(
-       login_$ptr      & lptr,
-       status_$t       * st
-);
-
-
-#ifdef  __cplusplus
-    }
-#endif
-
diff --git a/cde/programs/dtlogin/apollo/passwd.h b/cde/programs/dtlogin/apollo/passwd.h
deleted file mode 100644 (file)
index 635b6f4..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: passwd.h /main/3 1995/10/27 16:19:23 rswiston $ */
-/*                                                                      *
- * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
- * (c) Copyright 1993, 1994 International Business Machines Corp.       *
- * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
- * (c) Copyright 1993, 1994 Novell, Inc.                                *
- */
-/* passwd.h us/unix/include/apollo/sys, brian
-   Password definitions
-
-
-     --------------------------------------------------------------------------
-    |   THE FOLLOWING PROGRAMS ARE THE SOLE PROPERTY OF APOLLO COMPUTER INC.   |
-    |         AND CONTAIN ITS PROPRIETARY AND CONFIDENTIAL INFORMATION.        |
-     --------------------------------------------------------------------------
-
-Changes:
-    12/27/88    gilbert Modifications for C++.
-    03/25/88    brian   ANSI version (from .ins.c)
-    11/05/87    betsy   need to include des.ins.c 
-    08/31/87    betsy   add support for unix encryption, remove passwd_$create
-                          for sr10 registry
-    07/07/87    pato    drop the (wrong) explicit values for passwd_$encrypt_t
-    04/02/86    lwa     Change enum to short enum.
-    01/13/86    nazgul  Created C version
-    04/05/82    PJL     changes for DES encryption
-*/
-
-#ifndef apollo_sys_passwd_ins_c
-#define apollo_sys_passwd_ins_c
-
-
-/*  Enable function prototypes for ANSI C and C++  */
-#if defined(__STDC__) || defined(c_plusplus) || defined(__cplusplus)
-#    define _PROTOTYPES
-#endif
-
-/*  Required for C++ V2.0  */
-#ifdef  __cplusplus
-    extern "C" {
-#endif
-
-#ifdef _PROTOTYPES
-#define std_$call      extern
-#endif
-
-#include "apollo/des.h"                /* copy from <apollo/sys/des.h>  */
-
-#define  passwd_$mod     3
-#define  passwd_$maxlen 8
-
-typedef  short  enum { passwd_$none, passwd_$des,
-                       passwd_$unix, passwd_$unix_bits }   passwd_$encrypt_t;
-typedef  struct {
-    passwd_$encrypt_t  ptype;
-    union {
-        char  plain[8];                 /* passwd_$none */
-        struct {                        /* passwd_$des, passwd_$unix_bits   */
-            short       rand;
-            des_$text   bits;
-        } des; 
-        struct {                        /* passwd_$unix */
-            char        salt[2];
-            char        cipher[12]; 
-        } unix_encrypted;
-    } pw_union;
-} passwd_$rec_t;
-
-typedef  char  passwd_$str_t[passwd_$maxlen];            
-
-std_$call boolean   passwd_$check(
-#ifdef _PROTOTYPES
-               passwd_$str_t           & pass_str,
-               short                   & pass_len,
-               passwd_$rec_t           & enc_passwd,
-               status_$t               * status
-#endif
-);
-
-#ifdef  __cplusplus
-    }
-#endif
-
-#endif
index 21974abde067f148dfc41ac215ba9e125cf79369..a019faf3b3cafdeb0089f17693b112d0354af043 100644 (file)
@@ -504,7 +504,7 @@ SetLocalAuthorization (struct display *d)
 void 
 SetAuthorization (struct display *d)
 {
-    register Xauth **auth = d->authorizations;
+    Xauth **auth = d->authorizations;
     int i;
 
     for (i = 0; i < d->authNum; i++)
@@ -697,9 +697,7 @@ checkEntry (Xauth *auth)
 static int  doWrite;
 
 static
-writeAuth (file, auth)
-    FILE       *file;
-    Xauth      *auth;
+writeAuth (FILE *file, Xauth *auth)
 {
     if (debugLevel >= 15) {    /* normally too verbose */
         Debug ("writeAuth: doWrite = %d\n", doWrite);
@@ -864,18 +862,15 @@ DefineSelf (int fd, FILE *file, Xauth *auth)
  * for this fd and add them to the selfhosts list.
  */
 static void
-DefineSelf (fd, file, auth)
-    int fd;
-    FILE       *file;
-    Xauth      *auth;
+DefineSelf (int fd, FILE *file, Xauth *auth)
 {
     char               buf[2048];
     struct ifconf      ifc;
-    register int       n;
+    int        n;
     int                len;
     char               *addr;
     int                family;
-    register struct ifreq *ifr;
+    struct ifreq *ifr;
     
     ifc.ifc_len = sizeof (buf);
     ifc.ifc_buf = buf;
@@ -940,16 +935,15 @@ DefineSelf (fd, file, auth)
  * for this fd and add them to the selfhosts list.
  */
 static void
-DefineSelf (fd, file, auth)
-    int fd;
+DefineSelf (int fd, int file, int auth)
 {
-    register int n;
+    int n;
     int        len;
     caddr_t    addr;
     int                family;
 
     struct utsname name;
-    register struct hostent  *hp;
+    struct hostent  *hp;
 
     union {
        struct  sockaddr   sa;
@@ -984,9 +978,7 @@ DefineSelf (fd, file, auth)
 
 
 static void
-setAuthNumber (auth, name)
-    Xauth   *auth;
-    char    *name;
+setAuthNumber (Xauth *auth, char *name)
 {
     char       *colon;
     char       *dot, *number;
index 213317d5c6abe4252b0310ecdc8f87db61f33eea..028193416bef38ec9ed20764e458348be3e5b95e 100644 (file)
@@ -768,12 +768,12 @@ getGroups ( char *name, struct verify_info *verify, int gid)
 int 
 passwordExpired( struct verify_info *verify)
 {
-       register struct pr_passwd *pr;
-       register time_t expiration;
-       register time_t last_change;
+       struct pr_passwd *pr;
+       time_t expiration;
+       time_t last_change;
        time_t expiration_time;
-       register time_t now;
-       register int passwd_status;
+       time_t now;
+       int passwd_status;
        struct pr_passwd save_data;
        struct pr_default *df;
        char *ttime;
index ac52ef913eedbae0dbff0608f5609140fb9838b8..dd034dc1569b9756ea04c07027d8c5eba28d4c98 100644 (file)
@@ -582,7 +582,7 @@ RegisterHostname (char *name)
     struct hostent     *hostent;
     struct sockaddr_in in_addr;
     struct ifconf      ifc;
-    register struct ifreq *ifr;
+    struct ifreq *ifr;
     struct sockaddr    broad_addr;
     char               buf[2048];
     int                        n;
index a7c3b04beeb655e8fa320f969d029488e76ad928..1ef3ef88698cda898e27c835c249e9dff8b8d808 100644 (file)
@@ -91,9 +91,7 @@ XCOMM     interest.
 XCOMM
 XCOMM ##########################################################################
 
-#if defined (__apollo)
-   *    Local local /etc/Xdomain :0
-#elif defined (_AIX) && defined (AIXV4)
+#if defined (_AIX) && defined (AIXV4)
    :0   Local local@console /usr/lpp/X11/defaults/xserverrc -T -force :0
 #elif defined (_AIX)
    :0  Local local@console /usr/bin/X11/X -T -force :0
index f905c1c87a323f38a0a917ae17de545ab18ce94d..d1ee27b8db39cd346ed19c4f2abc653541371c35 100644 (file)
@@ -62,7 +62,7 @@ extern void exit ();
 void
 BecomeDaemon( void )
 {
-    register int i;
+    int i;
 
     /*
      * fork so that the process goes into the background automatically. Also
index 8ce0eafefba15ec5c7b35b35a8aa6bf4e5b96841..166695ee56e134fdb136080d4ebae4ef23d57e1b 100644 (file)
@@ -895,7 +895,6 @@ StartDisplay(
                kill (d->serverPid, d->resetSignal);
        }
 
-#ifndef __apollo
        /*
         *  initialize d->utmpId. Check to see if anyone else is using
         *  the requested ID. Always allow the first request for "dt" to
@@ -932,7 +931,6 @@ StartDisplay(
                return 0;
            }
        }
-#endif
 
        /*
         *  set d->gettyLine to "console" for display ":0" if it is not 
@@ -1289,7 +1287,8 @@ CloseOnFork( void )
 }
 #endif
 
-CloseOnFork ()
+int
+CloseOnFork (void)
 {
     int        fd;
 
@@ -1298,6 +1297,8 @@ CloseOnFork ()
            close (fd);
     FD_ZERO (&CloseMask);
     max = 0;
+    
+    return 0;
 }
 
 static int  pidFd;
@@ -1484,7 +1485,7 @@ SetTitle( char *name, char *ptr )
 #define GETTYPATH "/usr/libexec/getty"
 #elif defined(__linux__)
 #define GETTYPATH "/sbin/getty"
-#elif !defined (__apollo)
+#else
 #define GETTYPATH "/etc/getty"
 #endif
 
index be74fddc5e2f9de184ff02efbb693ae0ebc8c2cb..3e0f24997416641449b42a9d3b18a3108d56e40a 100644 (file)
@@ -582,14 +582,6 @@ extern int  UtmpIdOpen(
                        char *utmpId) ;
 
 
-/*******************************     apollo.c     **************************/
-
-extern int  DoLogin(
-                       char *user, 
-                       char *passwd, 
-                       char *host) ;
-
-
 /*******************************     auth.c       **************************/
 
 extern int  ConvertAddr(
index 0e8baa4427a7cbf1065742585c764be4ef6f4fbf..d299a26805102501764cd9961c6f0b504eaa12d2 100644 (file)
@@ -316,7 +316,7 @@ MakeRootCursor( void )
 void 
 MakeBackground( void )
 {
-    register int i;
+    int i;
 
     /*
      * Get resources first
@@ -430,7 +430,7 @@ MakeBackground( void )
 void 
 MakeButtons( void )
 {
-    register int i;
+    int i;
 
     Dimension  width;
 
@@ -659,7 +659,7 @@ MakeChooser( void )
 void 
 MakeDialog( DialogType dtype )
 {
-    register int i, j;
+    int i, j;
 
     int                width;
     
index 5e15625fb33bcfe38ca389e3a6b07fb9602df944..e16a9fd8233f4ba728bd5963e36dd7e104b98ef1 100644 (file)
@@ -92,13 +92,11 @@ from the X Consortium.
 static char    auth_name[256];
 static int     auth_name_len;
 
-int MitInitAuth (name_len, name)
 #if NeedWidePrototypes
-    unsigned int name_len;
+int MitInitAuth (unsigned int name_len, char *name)
 #else
-    unsigned short name_len;
+int MitInitAuth (unsigned short name_len, char *name)
 #endif /* NeedWidePrototypes */
-    char *name;
 {
     if (name_len > 256)
        name_len = 256;
@@ -107,14 +105,13 @@ int MitInitAuth (name_len, name)
     return(0);
 }
 
-Xauth *
-MitGetAuth (namelen, name)
 #if NeedWidePrototypes
-    unsigned int namelen;
+Xauth *
+MitGetAuth (unsigned int namelen, char *name)
 #else
-    unsigned short namelen;
+Xauth *
+MitGetAuth (unsigned short namelen, char *name)
 #endif /* NeedWidePrototypes */
-    char *name;
 {
     Xauth   *new;
     new = (Xauth *) malloc (sizeof (Xauth));
index 85f853284ba2291039c553930d96f3ccecad2829..aa63541220183faf202acd3a601fbc34846fda70 100644 (file)
@@ -96,8 +96,7 @@ from the X Consortium.
 /* given an XdmcpNetaddr, returns the socket protocol family used,
    e.g., AF_INET */
 
-int NetaddrFamily(netaddrp)
-    XdmcpNetaddr netaddrp;
+int NetaddrFamily(XdmcpNetaddr netaddrp)
 {
 #ifdef STREAMSCONN
     short family = *(short *)netaddrp;
@@ -112,9 +111,7 @@ int NetaddrFamily(netaddrp)
    and sets *lenp to the length of the address
    or 0 if not using TCP or UDP. */
 
-char * NetaddrPort(netaddrp, lenp)
-    XdmcpNetaddr netaddrp;
-    int *lenp;                 /* return */
+char * NetaddrPort(XdmcpNetaddr netaddrp, int *lenp)
 {
 #ifdef STREAMSCONN
     *lenp = 2;
@@ -136,9 +133,7 @@ char * NetaddrPort(netaddrp, lenp)
 /* given an XdmcpNetaddr, returns a pointer to the network address
    and sets *lenp to the length of the address */
 
-char * NetaddrAddress(netaddrp, lenp)
-    XdmcpNetaddr netaddrp;
-    int *lenp;                 /* return */
+char * NetaddrAddress(XdmcpNetaddr netaddrp, int *lenp)
 {
 #ifdef STREAMSCONN
     *lenp = 4;
@@ -175,10 +170,7 @@ char * NetaddrAddress(netaddrp, lenp)
    sets *len to the number of bytes in addr.
    Returns the X protocol family used, e.g., FamilyInternet */
 
-int ConvertAddr (saddr, len, addr)
-    XdmcpNetaddr saddr;
-    int *len;                  /* return */
-    char **addr;               /* return */
+int ConvertAddr (XdmcpNetaddr saddr, int *len, char **addr)
 {
     int retval;
 
@@ -229,9 +221,7 @@ int ConvertAddr (saddr, len, addr)
     return retval;
 }
 
-addressEqual (a1, len1, a2, len2)
-    XdmcpNetaddr a1, a2;
-    int                 len1, len2;
+addressEqual (XdmcpNetaddr a1, int len1, XdmcpNetaddr a2, int len2)
 {
     int partlen1, partlen2;
     char *part1, *part2;
@@ -261,9 +251,7 @@ addressEqual (a1, len1, a2, len2)
 
 #ifdef DEBUG
 /*ARGSUSED*/
-PrintSockAddr (a, len)         /* Debugging routine */
-    struct sockaddr *a;
-    int                    len;
+PrintSockAddr (struct sockaddr *a, int len)
 {
     unsigned char    *t, *p;
 
index 6608dba540c99776a690642cb982bc21c5fcc90a..6b63668964951d21dfc4567a16fb965b22e51f53 100644 (file)
@@ -216,11 +216,8 @@ static     char    AppName[16] = DTLOGIN;
 #endif
 
 #ifndef DEF_LANG       /* LANG default settings for various architectures */
-#  ifdef __apollo
-#    define DEF_LANG   "C"
-#  endif
 #  ifdef sun   /* default language under Solaris */
-#    define DEF_LANG    "C" 
+#    define DEF_LANG    "C"
 #  endif
 #endif
 
@@ -614,7 +611,7 @@ LoadDMResources( void )
        keyFile = getFullFileName(keyFile, 0, NULL);
        accessFile = getFullFileName(accessFile, 0, NULL);
 
-#ifndef __apollo       /* set a TZ default for all OS except Domain */
+       /* set a TZ default */
         if (timeZone == NULL || strlen(timeZone) == 0)
         {
         /*
@@ -622,7 +619,6 @@ LoadDMResources( void )
           */
           GetSysParms(&timeZone,0,0);
         }
-#endif
 
 }
 
index e8fe43e9ea43837ff59f5f8fea59f92dea671da9..c5b587fe2e15de995db7ab3d52946dbaf7436220 100644 (file)
@@ -134,11 +134,6 @@ static int sia_exit_proc_reg = FALSE;
 
 #endif /* SIA */
 
-
-#ifdef __apollo
-  extern char *getenv();
-#endif 
-
 #define GREET_STATE_LOGIN             0
 #define GREET_STATE_AUTHENTICATE      1
 #define GREET_STATE_EXIT              2
@@ -262,12 +257,12 @@ catchAlrm( int arg )
     longjmp (pingTime, 1);
 }
 
-static int
-FileNameCompare (a, b)
 #if defined(__STDC__)
-       const void *a, *b;
+static int
+FileNameCompare (const char *a, const char *b)
 #else
-       char *a, *b;
+static int
+FileNameCompare (char *a, char *b)
 #endif
 {
     return strcoll (*(char **)a, *(char **)b);
@@ -1418,30 +1413,6 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp )
        Debug("BLS - Session setup complete.\n");
     } else {
 #endif /* BLS */
-                       
-#ifdef __apollo
-
-       /* 
-        * This should never fail since everything has been verified already.
-        * If it does it must mean registry strangeness, so exit, and try
-        * again...
-        */
-
-       if (!DoLogin (user, greet.password, d->name)) exit (1);
-       
-       /*
-        * extract the SYSTYPE and ISP environment values and set into user's 
-        * environment. This is necessary since we do an execve below...
-        */
-        
-       verify->userEnviron = setEnv(verify->userEnviron, "SYSTYPE",
-                                    getenv("SYSTYPE"));
-
-       verify->userEnviron = setEnv(verify->userEnviron, "ISP",
-                                    getenv("ISP"));
-
-#else /* ! __apollo */
-
 
 #  ifdef __AFS
        if ( IsVerifyName(VN_AFS) ) {
@@ -1525,8 +1496,6 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp )
        }
 #endif
 
-#endif /* __apollo */
-
 #ifdef BLS
     }  /* ends the else clause of if ( ISSECURE ) */
 #endif /* BLS */
@@ -1655,7 +1624,7 @@ StartClient( struct verify_info *verify, struct display *d, int *pidp )
 
            failsafeArgv[i++] = "-e";
            failsafeArgv[i++] = "/bin/passwd";
-#if defined (__apollo) || defined(__PASSWD_ETC)
+#if defined(__PASSWD_ETC)
            failsafeArgv[i++] = "-n";
 #endif
            failsafeArgv[i++] = getEnv (verify->userEnviron, "USER");
@@ -2077,15 +2046,6 @@ RunGreeter( struct display *d, struct greet_info *greet,
                 env = setEnv(env, "OPENWINHOME", path);
 #endif
 
-#ifdef __apollo
-           /*
-            *  set environment for Domain machines...
-            */
-           env = setEnv(env, "ENVIRONMENT", "bsd");
-           env = setEnv(env, "SYSTYPE", "bsd4.3");
-#endif
-               
-
            Debug ("Greeter environment:\n");
            printEnv(env);
            Debug ("End of Greeter environment:\n");
index 37e32be3059d5f839c1d3378c984d03795884644..5f3044ba51d6b8ceebce6b3bdc715f9279974b86 100644 (file)
@@ -105,7 +105,7 @@ extern int  chooserFd;
 extern FD_TYPE WellKnownSocketsMask;
 extern int     WellKnownSocketsMax;
 
-CreateWellKnownSockets ()
+CreateWellKnownSockets (void)
 {
     struct sockaddr_in sock_addr;
     char               *name, *localHostname();
@@ -154,9 +154,7 @@ CreateWellKnownSockets ()
     FD_SET (chooserFd, &WellKnownSocketsMask);
 }
 
-GetChooserAddr (addr, lenp)
-    char       *addr;
-    int                *lenp;
+GetChooserAddr (char *addr, int *lenp)
 {
     struct sockaddr_in in_addr;
     int                        len;
index 449dcd9a5ff6479844db82a9b23356a7d4095f58..34a987b28b4a47b96741f484352da1aa09942b39 100644 (file)
@@ -64,7 +64,6 @@
  **     Platform identification:
  **
  **    __hpux      HP-UX OS only
- **    __apollo    Domain OS only
  **     sun         SUN OS only
  **     SVR4        SUN OS et al.
  **     _AIX        AIX only
 /*
  * Define as generic those without platform specific code.
  */
-#if !(defined(__hpux) || defined(__apollo) || defined(_AIX) || defined(sun))
+#if !(defined(__hpux) || defined(_AIX) || defined(sun))
 #define generic
 #endif
 
@@ -218,7 +217,7 @@ static void Audit( struct passwd *p, char *msg, int errnum) ;
 static int     CheckPassword( char *name, char *passwd, struct passwd **ppwd );
 static int     CountUsers( int added_users) ;
 static int     CountUsersStrict( char *new_user) ;
-static int     PasswordAged( register struct passwd *pw) ;
+static int     PasswordAged( struct passwd *pw) ;
 static void    WriteBtmp( char *name) ;
 
 
@@ -489,7 +488,7 @@ CountUsersStrict( char *new_user )
 #define SECONDS_IN_WEEK                604800L
 
 static int 
-PasswordAged( register struct passwd *pw )
+PasswordAged( struct passwd *pw )
 {
     long change_week;  /* week password was changed (1/1/70 = Week 0) */
     long last_week;    /* week after which password must change */
@@ -704,7 +703,7 @@ CheckPassword( char *name, char     *passwd, struct passwd **ppwd )
 
 #ifdef __PASSWD_ETC
     /*
-     *   If regular passwd check fails, try old-style Apollo SR
+     *   If regular passwd check fails, try old-style SR
      */
 
     if (rgy_$is_des(passwd, strlen(passwd), p->pw_passwd) == TRUE)
@@ -1358,7 +1357,7 @@ Authenticate( struct display *d, char *name, char *passwd, char **msg )
  ***************************************************************************/
 
 static void Audit( struct passwd *p, char *msg, int errnum) ;
-static int  PasswordAged(char *name, register struct passwd *pw) ;
+static int  PasswordAged(char *name, struct passwd *pw) ;
 static void WriteBtmp( char *name) ;
 
 
@@ -1437,7 +1436,7 @@ WriteBtmp( char *name )
 #define SECONDS_IN_WEEK                604800L
 
 static int 
-PasswordAged(char *name, register struct passwd *pw )
+PasswordAged(char *name, struct passwd *pw )
 {
   struct userpw *pupw; /* authentication information from getuserpw() */
   struct userpw  upw;  /* working authentication information */
@@ -1833,7 +1832,7 @@ tsm_check_login(uid_t uid)
  ***************************************************************************/
 
 static void Audit( struct passwd *p, char *msg, int errnum) ;
-static int  PasswordAged( register struct passwd *pw) ;
+static int  PasswordAged( struct passwd *pw) ;
 static void WriteBtmp( char *name) ;
 
 
@@ -1897,7 +1896,7 @@ WriteBtmp( char *name )
 #define SECONDS_IN_WEEK                604800L
 
 static int 
-PasswordAged( register struct passwd *pw )
+PasswordAged( struct passwd *pw )
 {
   return(FALSE);
 }
index e78273ffb2049acb441b9cd0867d4748b4518275..60a54e983876b0ed6ef4775f600b197f29232694 100644 (file)
@@ -592,7 +592,7 @@ MakeLangAbort( int arg )
 void
 MakeLangList( void )
 {
-    register int i, j;
+    int i, j;
 
     char        *lang[500];             /* sort list for languages         */
     int         nlang;                  /* total number of languages       */
@@ -980,7 +980,7 @@ static char localHostbuf[256];
 static int  gotLocalHostname;
 
 char *
-localHostname ()
+localHostname (void)
 {
     if (!gotLocalHostname)
     {
index b736d87e6528a12089d6db66d1f34a5437ac027c..d9f70fe3aea4eefc421961ec3bc20da4287e934b 100644 (file)
@@ -449,8 +449,8 @@ login_defaults(
        struct display *d )
 {
         extern int defcntl();
-        register int  flags;
-        register char *ptr;
+        int  flags;
+        char *ptr;
        char *Def_path;
        char *final_path = malloc(MAXPATHLEN);
        char *element;
diff --git a/cde/programs/dtlogin/vgapollo.c b/cde/programs/dtlogin/vgapollo.c
deleted file mode 100644 (file)
index 8609db1..0000000
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: vgapollo.c /main/4 1995/10/27 16:17:06 rswiston $ */
-/*                                                                      *
- * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
- * (c) Copyright 1993, 1994 International Business Machines Corp.       *
- * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
- * (c) Copyright 1993, 1994 Novell, Inc.                                *
- */
-/************************************<+>*************************************
- ****************************************************************************
- **
- **   File:        vgapollo.c
- **
- **   Project:     HP Visual User Environment (DT)
- **
- **   Description: Dtgreet user authentication routines for Domain/OS 10.4
- **
- **                These routines validate the user; checking name, password,
- **               home directory, password aging, etc.
- **
- **
- **   (c) Copyright 1987, 1988, 1989 by Hewlett-Packard Company
- **
- **
- **    Conditional compiles:
- **
- **    __apollo    Domain OS only
- **
- ****************************************************************************
- ************************************<+>*************************************/
-
-
-#include       <stdio.h>               /* placed here so file isn't empty  */
-#include       "vgmsg.h"
-
-#ifdef __apollo
-
-/***************************************************************************
- *
- *  Includes & Defines
- *
- ***************************************************************************/
-
-#include       <pwd.h>
-
-#include       <apollo/base.h>
-#include       <apollo/error.h>
-
-#include       "apollo/passwd.h"       /* copy of <apollo/sys/passwd.h>   */
-#include       "apollo/login.h"        /* copy of <apollo/sys/login.h>    */
-#include       "apollo/rgy_base.h"
-
-#include       "vg.h"
-
-      
-#define        SCMPN(a, b)     strncmp(a, b, sizeof(a))
-#define        SCPYN(a, b)     strncpy(a, b, sizeof(a))
-#define eq(a,b)                !strcmp(a,b)
-
-#define NMAX   strlen(name)
-#define HMAX   strlen(host)
-
-#define STRING(str)    (str), (short) strlen(str)
-#define STRNULL(s, l)  ((s)[(l)] = '\0')
-#define ISTRING(str)   (str), (int) strlen(str)
-
-
-
-/***************************************************************************
- *
- *  External declarations
- *
- ***************************************************************************/
-
-
-/***************************************************************************
- *
- *  Procedure declarations
- *
- ***************************************************************************/
-
-
-static boolean         CheckLogin( char *user, char *passwd, char *host, 
-                           status_$t *status)
-static boolean CheckPassword( char *user, char *passwd) ;
-static int     PasswordAged( register struct passwd *pw) ;
-
-
-
-
-/***************************************************************************
- *
- *  Global variables
- *
- ***************************************************************************/
-
-rgy_$policy_t       policy;
-rgy_$acct_user_t user_part;
-rgy_$acct_admin_t admin_part;     
-extern struct passwd * getpwnam_full();
-
-
-
-/***************************************************************************
- *
- *  Stub routines
- *
- ***************************************************************************/
-
-
-
-
-/***************************************************************************
- *
- *  CheckLogin
- *
- *  check validity of user name, password and other login parameters
- *
- ***************************************************************************/
-
-static boolean
-CheckLogin( char *user, char *passwd, char *host, status_$t *status)
-{
-    ios_$id_t          logid;
-    login_$opt_set_t   opts;
-      
-    login_$set_host(host, strlen(host));
-
-    opts = login_$no_setsid_sm |
-          login_$no_setwd_sm  |
-          login_$no_prompt_pass;
-
-    if ( !login_$chk_login(opts,
-                       STRING(user),
-                       STRING(passwd), 
-                       (login_$open_log_p) NULL,
-                       STRING(""),
-                       &logid,
-                       status)) {
-
-       return(false);
-
-    } else
-       return(true);
-}     
-
-
-
-
-/***************************************************************************
- *
- *  CheckPassword
- *
- *  check validity of just user name and password
- ***************************************************************************/
-
-static boolean 
-CheckPassword( char *user, char *passwd )
-{
-    login_$ptr lptr;
-    status_$t  status;
-             
-    login_$open((login_$mode_t) 0, &lptr, &status);
-    if (status.all == status_$ok)
-       login_$set_ppo(lptr, STRING(user), &status);
-    if (status.all == status_$ok)
-       login_$ckpass(lptr, STRING(passwd), &status);
-
-    return (status.all == status_$ok);
-}     
-
-
-
-
-/***************************************************************************
- *
- *  PasswordAged
- *
- *  see if password has aged
- ***************************************************************************/
-
-static int 
-PasswordAged( register struct passwd *pw )
-{
-
-    boolean lrgy;
-
-    /* Account validity checks:  If we were able to connect to the network
-     * registry, then we've acquired account and policy data and can perform
-     * account/password checking
-     */
-
-    lrgy = rgy_$using_local_registry();
-    if ( !lrgy ) { 
-
-       /* Check for password expiration or invalidity */
-       if (rgy_$is_passwd_expired(&user_part, &policy ) == true  ||
-           rgy_$is_passwd_invalid(&user_part) == true)  {
-
-           return TRUE;
-       }
-    }
-   return FALSE;
-}
-
-
-    
-
-/***************************************************************************
- *
- *  Verify
- *
- *  verify the user
- *
- *  return codes indicate authentication results.
- ***************************************************************************/
-
-#define MAXATTEMPTS    5
-
-extern Widget focusWidget;             /* login or password text field    */
-struct  passwd nouser = {"", "nope"};  /* invalid user password struct    */
-
-int 
-Verify( char *name, char *passwd )
-{
-
-    static int         login_attempts = 0; /* # failed authentications    */
-    
-    struct passwd      *p;     /* password structure                      */
-    char               *host;  /* host that login is coming in from       */
-    status_$t          status; /* status code returned by CheckLogin      */
-
-    int                        n;
-
-    host = dpyinfo.name;
-    
-
-    /*
-     *  look up entry from registry...
-     *
-     *  need getpwnam_full to get policy data for passwd expiration 
-     *  or invalidity...
-     */
-    p = getpwnam_full(name, &user_part, &admin_part, &policy);
-/*    p = getpwnam(name);*/
-    
-    if (!p || strlen(name) == 0 || p->pw_name == NULL )
-       p = &nouser;
-
-
-    /*
-     *  validate user/password...
-     */
-
-    if (!CheckLogin(name, passwd, host, &status)) {
-
-       /*
-        *  if verification failed, but was just a name check, prompt for
-        *  password...
-        */
-
-       if ( focusWidget != passwd_text ) 
-           return (VF_INVALID);
-
-
-       /*
-        *  if maximum number of attempts exceeded, log failure...
-        */
-
-       if ((++login_attempts % MAXATTEMPTS) == 0 ) {
-
-#ifdef peter
-               syslog(LOG_CRIT,
-                   "REPEATED LOGIN FAILURES ON %s FROM %.*s, %.*s",
-                   "??", HMAX, host, NMAX, name);
-#endif
-       }
-       
-
-       /*
-        *  check status codes from verification...
-        */
-     
-       switch (status.all) {
-
-       case login_$logins_disabled:    /* logins are disabled             */
-           if (p->pw_uid != 0)
-               return(VF_NO_LOGIN);
-           else
-               if (!CheckPassword(name,passwd))
-                   return(VF_INVALID);
-                   
-           break;
-
-       case login_$inv_acct:           /* invalid account                 */
-           if ( PasswordAged(p) ) 
-               return(VF_PASSWD_AGED);
-           else
-               return(VF_INVALID);
-           break;
-
-       default:                        /* other failed verification       */
-           return(VF_INVALID);
-           break;
-
-       }
-    }
-
-         
-
-    /*
-     *  verify home directory exists...
-     */
-
-    if (chdir(p->pw_dir) < 0) {
-       if (chdir("/") < 0)
-           return(VF_HOME);
-       else 
-           LogError(ReadCatalog(
-               MC_LOG_SET,MC_LOG_NO_HMDIR,MC_DEF_LOG_NO_HMDIR),
-               p->pw_dir, name);
-    }
-
-
-    /*
-     *  validate uid and gid...
-     */
-
-    if ((p->pw_gid < 0)      || 
-       (setgid(p->pw_gid) == -1)) {
-       return(VF_BAD_GID);
-    }
-
-    if ((p->pw_uid < 0)      || 
-       (seteuid(p->pw_uid) == -1)) {
-       return(VF_BAD_UID);
-    }
-
-
-    /*
-     * verify ok...
-     */
-
-    return(VF_OK);
-}
-
-#endif
index 5d5c7e79f08ea4ecd4458f3224b2a8cb00a0158a..41dc6f9ce7395a00cb5ab07ac6fdf1121ddcd06e 100644 (file)
@@ -64,7 +64,6 @@
  **     Platform identification:
  **
  **    __hpux      HP-UX OS only
- **    __apollo    Domain OS only
  **     sun         SUN OS only
  **     SVR4        SUN OS et al.
  **     _AIX        AIX only
 /*
  * Define as generic those without platform specific code.
  */
-#if !(defined(__hpux)   || \
-      defined(__apollo) || \
-      defined(_AIX)     || \
-      defined(sun))
+#if !(defined(__hpux) || defined(_AIX) || defined(sun))
 #define generic
 #endif
 
@@ -202,7 +198,7 @@ static void Audit( struct passwd *p, char *msg, int errnum) ;
 static int     CheckPassword( char *name, char *passwd, struct passwd **ppwd );
 static int     CountUsers( int added_users) ;
 static int     CountUsersStrict( char *new_user) ;
-static int     PasswordAged( register struct passwd *pw) ;
+static int     PasswordAged( struct passwd *pw) ;
 static void    WriteBtmp( char *name) ;
 
 
@@ -473,7 +469,7 @@ CountUsersStrict( char *new_user )
 #define SECONDS_IN_WEEK                604800L
 
 static int 
-PasswordAged( register struct passwd *pw )
+PasswordAged( struct passwd *pw )
 {
     long change_week;  /* week password was changed (1/1/70 = Week 0) */
     long last_week;    /* week after which password must change */
@@ -694,7 +690,7 @@ CheckPassword( char *name, char     *passwd, struct passwd **ppwd )
 
 #ifdef __PASSWD_ETC
     /*
-     *   If regular passwd check fails, try old-style Apollo SR
+     *   If regular passwd check fails, try old-style SR
      */
 
     if (rgy_$is_des(passwd, strlen(passwd), p->pw_passwd) == TRUE)
@@ -1058,7 +1054,7 @@ WriteBtmp( char *name )
  ***************************************************************************/
 
 static void Audit( struct passwd *p, char *msg, int errnum) ;
-static int  PasswordAged( register struct passwd *pw) ;
+static int  PasswordAged( struct passwd *pw) ;
 static void WriteBtmp( char *name) ;
 
 
@@ -1121,7 +1117,7 @@ WriteBtmp( char *name )
 #define SECONDS_IN_WEEK                604800L
 
 static int 
-PasswordAged( register struct passwd *pw )
+PasswordAged( struct passwd *pw )
 {
     long change_week;  /* week password was changed (1/1/70 = Week 0) */
     long last_week;    /* week after which password must change */
@@ -1304,7 +1300,7 @@ Verify( char *name, char *passwd )
  ***************************************************************************/
 
 static void Audit( struct passwd *p, char *msg, int errnum) ;
-static int  PasswordAged(char *name, register struct passwd *pw) ;
+static int  PasswordAged(char *name, struct passwd *pw) ;
 static void WriteBtmp( char *name) ;
 
 
@@ -1367,7 +1363,7 @@ WriteBtmp( char *name )
 #define SECONDS_IN_WEEK                604800L
 
 static int 
-PasswordAged(char *name, register struct passwd *pw )
+PasswordAged(char *name, struct passwd *pw )
 {
   struct userpw *pupw; /* authentication information from getuserpw() */
   struct userpw  upw;  /* working authentication information */
@@ -1583,7 +1579,7 @@ Verify( char *name, char *passwd )
  ***************************************************************************/
 
 static void Audit( struct passwd *p, char *msg, int errnum) ;
-static int  PasswordAged( register struct passwd *pw) ;
+static int  PasswordAged( struct passwd *pw) ;
 static void WriteBtmp( char *name) ;
 
 
@@ -1646,7 +1642,7 @@ WriteBtmp( char *name )
 #define SECONDS_IN_WEEK                604800L
 
 static int 
-PasswordAged( register struct passwd *pw )
+PasswordAged( struct passwd *pw )
 {
   return(FALSE);
 }
index f9412be407368dd891d869eb150e297dc111bf49..6f134ad666726491c55a21b6d71cbf83cdff87f2 100644 (file)
@@ -426,7 +426,7 @@ EditPasswdCB(Widget w, XtPointer client, XtPointer call_data)
     XmTextVerifyPtr    cbs = (XmTextVerifyPtr) call_data;
     int                        i;
     static char                buffer[MAXPATHLEN];
-    register char      *s, *t;
+    char       *s, *t;
 
 #ifdef VG_TRACE
     vg_TRACE_EXECUTION("main:  entered EditPasswdCB ...");
@@ -1676,7 +1676,7 @@ SetDefaultDt(Widget w)
  *  the logo to display in logo_pixmap 
  **************************************************************************/
 void
-SetDtLabelAndIcon()
+SetDtLabelAndIcon(void)
 {
   static XmString      blanks = NULL;
   int                  i;
index eef0003e03b69ba3a84407623cee0d88ca3ed67b..9267e42b4906ced64cd46643fc8981fa02c99976 100644 (file)
@@ -443,7 +443,7 @@ compareLangDesc(
 void 
 MakeLangMenu( void )
 {
-    register int i, k;
+    int i, k;
     char       cblab[MAX_NAME_LEN];    /* pushbutton label                */
     int                nlang;                  /* total number of languages       */
     int                nlangMenus;             /* number of language sub-menus    */
index bd04f29d4796377248bc43a7c91fa3133f29ecb7..c95d86dd1915f9ba34d494533d95ab06297df531 100644 (file)
@@ -111,7 +111,7 @@ static      XtResource logoResources[] = {
 void 
 MakeLogo( void )
 {
-    register int i;
+    int i;
 
     char       *logoFile;              /* name of logo bitmap file        */
     
index ab8889bde48e0b85a1b1d2f9b416404c8526f25e..1dbaee1b29dae5b24f4810ecace1c55ea33ebf61 100644 (file)
@@ -765,7 +765,7 @@ MakeRootCursor( void )
 static void 
 MakeBackground( void )
 {
-    register int i;
+    int i;
     
 #ifdef VG_TRACE
     vg_TRACE_EXECUTION("MakeBackground:  entered ...");
@@ -1059,7 +1059,7 @@ char          *temp_p;
 static void 
 MakeButtons( void )
 {
-    register int i;
+    int i;
 
     Dimension  max_width;      /* maximum width  of a set of widgets      */
     Dimension  max_height;     /* maximum height of a set of widgets      */
@@ -1200,7 +1200,7 @@ MakeButtons( void )
 void 
 MakeDialog( DialogType dtype )
 {
-    register int i, j;
+    int i, j;
 
     int                width;
     
@@ -1481,7 +1481,7 @@ static    XtResource greetResources[] = {
 static void 
 MakeGreeting( void )
 {
-    register int i;
+    int i;
 
     char    *greetmsg;
     char    host[128];
@@ -1678,7 +1678,7 @@ MakeGreeting( void )
 static void 
 MakeLogin( void )
 {
-    register int i;
+    int i;
     int        j;
     LoginTextPtr textdata; 
     XtTranslations      textTable;
@@ -1950,11 +1950,6 @@ if ( session_menu != NULL ) {
 
     }
 
-
-     
-
-
-#ifndef __apollo
     /*
      *  [ No Windows ] menu pane...
      */
@@ -1972,7 +1967,6 @@ if ( session_menu != NULL ) {
     if (getenv(LOCATION) == NULL || strcmp(getenv(LOCATION), "local") != 0 )
         XtSetSensitive(options_item[j], False);
     j++;
-#endif
 
 
     /* 
index 602ebb8015655749636e1cc6f5b0f8a4d53d951c..d7f23da69555b6e49513d54121cdafc45b28f7f5 100644 (file)
@@ -145,7 +145,7 @@ static XmTextScanType sarray[] = {XmSELECT_POSITION};
 int 
 InitArg( WidgetType wtype )
 {
-    register int i;
+    int i;
 
     i = 0;
 
@@ -732,7 +732,7 @@ LogError( unsigned char *fmt, ...)
  ***************************************************************************/
 
 void
-CloseCatalog()
+CloseCatalog(void)
 {
     catclose(nl_fd);
 }
@@ -744,7 +744,7 @@ CloseCatalog()
  ***************************************************************************/
 
 void
-OpenCatalog()
+OpenCatalog(void)
 {
     static int initialized = 0;
     char *nlspath, *newnlspath;
index 720d4b567055b8822f5132cedac59f5403b45cee..375d53b381cc1349c8eb7110027ea85a706a2db7 100644 (file)
@@ -122,14 +122,13 @@ XdmPrintArray8Hex(const char *s, ARRAY8Ptr a)
 }
 #endif
 
-void
-XdmInitAuth (name_len, name)
 #if NeedWidePrototypes
-    unsigned int name_len;
+void
+XdmInitAuth (unsigned int name_len, char *name)
 #else
-    unsigned short name_len;
+void
+XdmInitAuth (unsigned short name_len, char *name)
 #endif /* NeedWidePrototypes */
-    char           *name;
 {
     if (name_len > 256)
        name_len = 256;
@@ -147,10 +146,7 @@ XdmInitAuth (name_len, name)
  */
 
 Xauth *
-XdmGetAuthHelper (namelen, name, includeRho)
-    unsigned short  namelen;
-    char           *name;
-    int            includeRho;
+XdmGetAuthHelper (unsigned short namelen, char *name, int includeRho)
 {
     Xauth   *new;
     new = (Xauth *) malloc (sizeof (Xauth));
@@ -192,28 +188,24 @@ XdmGetAuthHelper (namelen, name, includeRho)
     return new;
 }
 
-Xauth *
-XdmGetAuth (namelen, name)
 #if NeedWidePrototypes
-    unsigned int namelen;
+Xauth *
+XdmGetAuth (unsigned int namelen, char *name)
 #else
-    unsigned short namelen;
+Xauth *
+XdmGetAuth (unsigned short namelen, char *name)
 #endif /* NeedWidePrototypes */
-    char           *name;
 {
     return XdmGetAuthHelper (namelen, name, TRUE);
 }
 
 #ifdef XDMCP
 
-void XdmGetXdmcpAuth (pdpy,authorizationNameLen, authorizationName)
-    struct protoDisplay        *pdpy;
 #if NeedWidePrototypes
-    unsigned int authorizationNameLen;
+void XdmGetXdmcpAuth (struct protoDisplay *pdpy, unsigned int authorizationNameLen, char *authorizationName)
 #else
-    unsigned short authorizationNameLen;
+void XdmGetXdmcpAuth (struct protoDisplay *pdpy, unsigned short authorizationNameLen, char *authorizationName)
 #endif /* NeedWidePrototypes */
-    char               *authorizationName;
 {
     Xauth   *fileauth, *xdmcpauth;
 
@@ -264,8 +256,7 @@ void XdmGetXdmcpAuth (pdpy,authorizationNameLen, authorizationName)
                 'A' <= c && c <= 'F' ? c - 'A' + 10 : -1)
 
 static
-HexToBinary (key)
-    char    *key;
+HexToBinary (char *key)
 {
     char    *out, *in;
     int            top, bottom;
@@ -294,9 +285,7 @@ HexToBinary (key)
  * routine accepts either plain ascii strings for keys, or hex-encoded numbers
  */
 
-XdmGetKey (pdpy, displayID)
-    struct protoDisplay        *pdpy;
-    ARRAY8Ptr          displayID;
+XdmGetKey (struct protoDisplay *pdpy, ARRAY8Ptr displayID)
 {
     FILE    *keys;
     char    line[1024], id[1024], key[1024];
@@ -335,9 +324,8 @@ XdmGetKey (pdpy, displayID)
 }
 
 /*ARGSUSED*/
-XdmCheckAuthentication (pdpy, displayID, authenticationName, authenticationData)
-    struct protoDisplay        *pdpy;
-    ARRAY8Ptr          displayID, authenticationName, authenticationData;
+XdmCheckAuthentication (struct protoDisplay *pdpy, ARRAY8Ptr displayID,
+                        ARRAY8Ptr authenticationName, ARRAY8Ptr authenticationData)
 {
     XdmAuthKeyPtr   incoming;
 
index 9f74027650edadb77082d268c767bfec3e484066..3c25e6d39342eeb6f28ca8a029ef93733f09f399 100644 (file)
@@ -169,7 +169,7 @@ static char *phrase(char *, int , int );
 char *
 savestr(char *str)
 {
-       register char *cp, *cp2, *top;
+       char *cp, *cp2, *top;
 
        for (cp = str; *cp; cp++)
                ;
@@ -233,8 +233,8 @@ dispname(const char *hdr)
 static char *
 phrase(char *name, int token, int comma)
 {
-       register char c;
-       register char *cp, *cp2;
+       char c;
+       char *cp, *cp2;
        char *bufend, *nbufp;
        int gotlt, lastsp, didq;
        char nbuf[LINESIZE];
index 134ba15dc7a9ad822bf1c68cfce1530e4caae711..cf46343e530806677bda2a9c06446ae8bf421d82 100644 (file)
@@ -308,7 +308,7 @@ void DtMailGenDialog::verify(XmTextVerifyPtr cbs)
 {
     int                 i;
     static char         buffer[MAXPATHLEN];
-    register char       *s, *t;
+    char       *s, *t;
 
 #if defined(SHROUDED_TEXTFIELD_DEBUG)
     printf(
index c73bf7bb5e4b62244c849ed28efd3c10c138fb59..3ff9c905bc3399a6eb215be4c95ff8dc0100c9f2 100644 (file)
@@ -161,7 +161,7 @@ void EncryptedTextFieldUiItem::verify(XmTextVerifyPtr cbs)
 {
     int                        i;
     static char                buffer[MAXPATHLEN];
-    register char      *s, *t;
+    char       *s, *t;
 
 #if defined(ENCRYPTED_TEXTFIELD_DEBUG)
     printf(
index 21567c9be39cbe9c90f6f1daca4259758a92a007..1275d82e3797e70ee791ed9c6d11327d6ef70cb7 100644 (file)
@@ -73,7 +73,7 @@
 void
 FindDialog::clear()
 {
-  register unsigned int                offset;
+  unsigned int         offset;
 
   //
   if (_text_labels != NULL) {
@@ -239,7 +239,7 @@ FindDialog::createWorkArea(Widget dialog)
   Widget *label = new Widget[_num_text_fields]; 
 
 
-  register unsigned int                offset;
+  unsigned int         offset;
 
   _name = GETMSG(DT_catd, 1, 192, "Mailer - Find");
 
@@ -364,7 +364,7 @@ FindDialog::createWorkArea(Widget dialog)
   //
 #define TIGHTNESS      20
 
-  register Widget              widget;
+  Widget               widget;
 
   Widget fd_action = XtVaCreateWidget("actionArea",
                                 xmFormWidgetClass,
@@ -500,12 +500,12 @@ FindDialog::findMatching(Boolean findAll)
     //
     // A pointer to the currently interesting message.
     //
-    register DtMailMessageHandle         currentHandle = NULL;
+    DtMailMessageHandle          currentHandle = NULL;
 
     //
     // The offset of the currentHandle in the MsgScrollingList.
     //
-    register int                 handleOffset;
+    int                  handleOffset;
 
     //
     // Find the current message. We would always start from the
@@ -657,7 +657,7 @@ Boolean
 FindDialog::compareMessage(DtMailMessageHandle   handle)
 {
   Boolean                              found = False;
-  register unsigned int                offset;
+  unsigned int         offset;
 
   //
   // Check for something to do.
@@ -740,9 +740,9 @@ FindDialog::strcasestr(const char *str, const char *toFind)
   const char   *result = NULL;         // Default to not found.
 
   if (str && toFind) {         // Sanity check
-    register int       offset = 0;
-    register int       lenToFind = strlen(toFind);
-    register int       lenStr = strlen(str);
+    int        offset = 0;
+    int        lenToFind = strlen(toFind);
+    int        lenStr = strlen(str);
 
     //
     // If toFind == "", then return the entire string (like strstr()).
@@ -771,7 +771,7 @@ FindDialog::compareHeader(DtMailEnv         & error,
                          DtMailValueSeq        & header,
                          const char            * cmpToString)
 {
-  register int         headerOffset = header.length() - 1;
+  int          headerOffset = header.length() - 1;
 
   error.clear();
 
@@ -790,7 +790,7 @@ FindDialog::compareHeader(DtMailEnv         & error,
 void
 FindDialog::getAllFields()
 {
-  register unsigned int                offset;
+  unsigned int         offset;
 
   for (offset = 0; offset < _num_text_fields; offset++) {
     if (_text_fields[offset] != NULL) {
@@ -882,7 +882,7 @@ FindDialog::clearCallback(Widget    /*button*/,
                          XtPointer     /*call_data*/)
 {
   FindDialog   *findData = (FindDialog *)closure;
-  register unsigned int                offset;
+  unsigned int         offset;
 
   for (offset = 0; offset < findData->_num_text_fields; offset++) {
     if (findData->_text_fields[offset] != NULL) {
index b8b58aac1a83736ce41546c0b1143980ff30072a..a90a7d7bb311f49338ecca4e3384ed55627334f8 100644 (file)
@@ -1496,7 +1496,7 @@ MsgScrollingList::select_all_and_display_last(
 )
  
 {
-    register int                item_pos;
+    int                item_pos;
     int                                num_items;
     MsgHndArray                        * msgHandles = get_messages();
  
@@ -1537,8 +1537,8 @@ MsgScrollingList::select_all_and_display_last(
     unsigned int          elements
 )
 {
-  register int         handleOffset = 0;
-  register int         item_pos;
+  int          handleOffset = 0;
+  int          item_pos;
 
   error.clear();
 
index 8214b4e5fcf68e9f7a0e030f151acdf443bae2eb..8441bbd20bbbdf699b31b5acf2d2ca53145f424a 100644 (file)
@@ -114,8 +114,8 @@ Sort::sortMessages(MsgScrollingList *displayList,
 
       messageRecord    * messages = new messageRecord[numberMessages +2];
 
-      register unsigned int    offset;
-      register unsigned int    msgno;
+      unsigned int     offset;
+      unsigned int     msgno;
       DtMail::Message          * msg = NULL;
       DtMail::Envelope * envelope = NULL;
 
@@ -406,11 +406,11 @@ Sort::_msort (char        * base,
              int       (*compar)(char  **one,
                                  char  **two))
 {
-  register int i;
-  register int t;
-  register int s;
-  register int p;
-  register int q;
+  int  i;
+  int  t;
+  int  s;
+  int  p;
+  int  q;
   char *k1;
   char         *k2;
 
@@ -508,8 +508,8 @@ Sort::_sortCmp(char ** one, char ** two)
   //
   // Cast the pointers to the known type.
   //
-  register messageRecord       * first = (messageRecord *) *one;
-  register messageRecord       * second = (messageRecord *) *two;
+  messageRecord        * first = (messageRecord *) *one;
+  messageRecord        * second = (messageRecord *) *two;
 
   if (first->primary_key_str == NULL)
   {
index 6eb512701bb412fdd8b7112c988352536e9feb1e..496b2d50746ce8dd6ce1a4d525e1d1d249fec0ba 100644 (file)
@@ -159,7 +159,7 @@ static char *phrase(char *, int , int );
 char *
 savestr(char *str)
 {
-       register char *cp, *cp2, *top;
+       char *cp, *cp2, *top;
 
        for (cp = str; *cp; cp++)
                ;
@@ -223,8 +223,8 @@ dispname(const char *hdr)
 static char *
 phrase(char *name, int token, int comma)
 {
-       register char c;
-       register char *cp, *cp2;
+       char c;
+       char *cp, *cp2;
        char *bufend, *nbufp;
        int gotlt, lastsp, didq;
        char nbuf[LINESIZE];
index 66c1e0a6d9edc32001cc26da5afb4ebd9738658f..a2794c530f9ed11df3e10b64a9513eba15a414f0 100644 (file)
@@ -458,8 +458,8 @@ DtMail::MailRc::removeValue(DtMailEnv & error,
 // return alternates list
 const char * DtMail::MailRc::getAlternates(DtMailEnv &env)
 {
-    register int    i;
-    register struct hash *h;
+    int    i;
+    struct hash *h;
     struct hash **table = (struct hash **)glob.g_alternates;
     int len;
     
@@ -799,7 +799,7 @@ void DtMail::MailRc::init_globals()
 int
 DtMail::MailRc::load(char *name, char* line)
 {
-    register FILE *in, *oldin;
+    FILE *in, *oldin;
     int ret=0;
     
     if ((in = fopen(name, "r")) == NULL) {
@@ -828,7 +828,7 @@ DtMail::MailRc::load(char *name, char* line)
 int
 DtMail::MailRc::commands(char* iline)
 {
-    register int n;
+    int n;
     char *linebuf = new char[LINESIZE];
     char *line = new char[LINESIZE];
     
@@ -1070,8 +1070,8 @@ int DtMail::MailRc::execute(char linebuf[])
 int
 DtMail::MailRc::readline(FILE *ibuf, char *linebuf)
 {
-    register char *cp;
-    register int c;
+    char *cp;
+    int c;
     int seennulls = 0;
     
     clearerr(ibuf);
@@ -1122,7 +1122,7 @@ void DtMail::MailRc::unstack()
 
 void *DtMail::MailRc::lex(char word[])
 {
-    register struct cmd *cp;
+    struct cmd *cp;
 
     for (cp = &cmdtab[0]; cp->c_name != NOSTR; cp++)
        if (DtMail::MailRc::isprefix(word, cp->c_name))
@@ -1137,7 +1137,7 @@ void *DtMail::MailRc::lex(char word[])
 
 int DtMail::MailRc::isprefix(char *as1, char *as2)
 {
-    register char *s1, *s2;
+    char *s1, *s2;
     
     s1 = as1;
     s2 = as2;
@@ -1154,9 +1154,9 @@ int DtMail::MailRc::isprefix(char *as1, char *as2)
 
 int DtMail::MailRc::getrawlist(char line[], char **argv, int argc)
 {
-    register char **ap, *cp, *cp2;
+    char **ap, *cp, *cp2;
     char linebuf[LINESIZE], quotec;
-    register char **last;
+    char **last;
     
     ap = argv;
     cp = line;
@@ -1212,8 +1212,8 @@ void DtMail::MailRc::freerawlist(char **argv)
 
 char *DtMail::MailRc::mt_value(char name[])
 {
-    register struct var *vp;
-    register char *cp;
+    struct var *vp;
+    char *cp;
 //        extern char *getenv();
     
     if ((vp = lookup(name, (struct var **)this->variables)) == (struct var *)NULL)
@@ -1229,8 +1229,8 @@ char *DtMail::MailRc::mt_value(char name[])
  */
 struct var *DtMail::MailRc::lookup(char *name, struct var **hasharray)
 {
-    register struct var *vp;
-    register int h;
+    struct var *vp;
+    int h;
     
     h = hash(name);
     for (vp = hasharray[h]; vp != (struct var *)NULL; vp = vp->v_link)
@@ -1406,7 +1406,7 @@ DtMail::MailRc::nignorelist(char * key, void * data, void * client_data)
 
 int DtMail::MailRc::set(char **arglist, DtMail::MailRc *)
 {
-    register char *cp, *cp2;
+    char *cp, *cp2;
     char varbuf[LINESIZE], **ap;
     int errs;
     
@@ -1500,7 +1500,7 @@ DtMail::MailRc::wset(const char * verbatim,
 
 int DtMail::MailRc::unset(char **arglist, DtMail::MailRc *)
 {
-        register char **ap;
+        char **ap;
 
         for (ap = arglist; *ap != NOSTR; ap++)
                 (void) MailRc::mt_deassign(*ap);
@@ -1523,8 +1523,8 @@ DtMail::MailRc::wunset(const char * verbatim,
  */
 int DtMail::MailRc::hash(char *name)
 {
-    register unsigned h;
-    register char *cp;
+    unsigned h;
+    char *cp;
     
     for (cp = name, h = 0; *cp; h = (h << 2) + *cp++)
        ;
@@ -1579,8 +1579,8 @@ void DtMail::MailRc::mt_assign(char *name,char * val)
 
 int DtMail::MailRc::mt_deassign(char *s)
 {
-    register struct var *vp, *vp2;
-    register int h;
+    struct var *vp, *vp2;
+    int h;
     
     if ((vp2 = lookup(s, MailRc::variables)) == (struct var *)NULL) {
        return (1);
@@ -1607,8 +1607,8 @@ int DtMail::MailRc::mt_deassign(char *s)
  */
 void DtMail::MailRc::mt_puthash(char *name, char *val, struct var **hasharray)
 {
-    register struct var *vp;
-    register int h;
+    struct var *vp;
+    int h;
     
     vp = lookup(name, hasharray);
     if (vp == (struct var *)NULL) {
@@ -1681,7 +1681,7 @@ void DtMail::MailRc::hm_add(struct hash **table,
                            int size)
 {
     int index;
-    register struct hash *h;
+    struct hash *h;
     
     if (!table)
        return;
@@ -1703,9 +1703,9 @@ void DtMail::MailRc::hm_add(struct hash **table,
 
 void DtMail::MailRc::hm_delete(struct hash **table, char *key)
 {
-    register int index;
-    register struct hash *h;
-    register struct hash *old;
+    int index;
+    struct hash *h;
+    struct hash *old;
     
     if (!table)
        return;
@@ -1733,7 +1733,7 @@ void DtMail::MailRc::hm_delete(struct hash **table, char *key)
 
 void *DtMail::MailRc::hm_test(struct hash **table, char *key)
 {
-    register struct hash *h;
+    struct hash *h;
     
     if (!table)
        return (NULL);
@@ -1754,7 +1754,7 @@ void *DtMail::MailRc::hm_test(struct hash **table, char *key)
 
 void DtMail::MailRc::hm_mark(struct hash **table, char *key)
 {
-    register struct hash *h;
+    struct hash *h;
     
     if (!table)
        return;
@@ -1773,7 +1773,7 @@ void DtMail::MailRc::hm_mark(struct hash **table, char *key)
 
 int DtMail::MailRc::hm_ismarked(struct hash **table, char *key)
 {
-    register struct hash *h;
+    struct hash *h;
     
     if (!table) return 0;
     h = table[hash_index(key)];
@@ -1801,9 +1801,9 @@ DtMail::MailRc::hm_scan(struct hash **table, hm_callback callback, void * client
 
 int DtMail::MailRc::hash_index(char *key)
 {
-    register unsigned h;
-    register char *s;
-    register int c;
+    unsigned h;
+    char *s;
+    int c;
     
     s = key;
     h = 0;
@@ -2004,8 +2004,8 @@ DtMail::MailRc::expand(char *name)
        char *xname = new char[LINESIZE];
        char *cmdbuf = new char[LINESIZE];
        char *str;
-       register int pid, l;
-       register char *cp, *Shell;
+       int pid, l;
+       char *cp, *Shell;
        int s, pivec[2];
        struct stat sbuf;
         char *retchr = NULL;
@@ -2133,7 +2133,7 @@ DtMail::MailRc::wsource(const char * verbatim, char ** arglist, FILE * outf)
 int
 DtMail::MailRc::ifcmd(char **arglist, DtMail::MailRc *self)
 {
-       register char *cp;
+       char *cp;
 
        if (self->cond != CANY) {
                fprintf(stderr,"Illegal nested \"if\"\n");
index bbd3e725f92ce8bf23bff4a710d5fe95639f571c..6847b18fea5365b363200d0b4c85eff007256cc6 100644 (file)
@@ -906,7 +906,7 @@ int get_stat(
 struct vmount   **vmountpp)     /* place to tell where buffer is */
 {
   size_t                size;
-  register struct vmount        *vm;
+  struct vmount        *vm;
   int                   nmounts;
   int                   count;
 
@@ -958,7 +958,7 @@ struct vmount *get_vmount(fsid_t *fsid)
 {
     struct vmount *inu_vmount_p=NULL;
     int inu_vmount_num;
-    register struct vmount *vm;
+    struct vmount *vm;
     int nmount;
 
     /* make sure we have all the virtual mount status of this host */
index 07081d3864a816a84112e3eca67821cf223efcef..86c3e0c3730a1ecb84a8794cb734e1b773296405 100644 (file)
 
 extern "C" 
 int
-strcasecmp(register const char *s1,
-          register const char *s2)
+strcasecmp(const char *s1,
+          const char *s2)
 {
-    register int c1, c2;
+    int c1, c2;
 
     while (*s1 && *s2) {
        c1 = isupper(*s1) ? tolower(*s1) : *s1;
@@ -61,11 +61,11 @@ strcasecmp(register const char *s1,
 
 extern "C" 
 int
-strncasecmp(register const char *s1,
-           register const char *s2,
-           register size_t count)
+strncasecmp(const char *s1,
+           const char *s2,
+           size_t count)
 {
-    register int c1, c2;
+    int c1, c2;
 
     if (!count)
       return 0;
index c6bbeff5660ae9147e3531d4bcd5c1ba0e54c36f..243b526773890e9d300de871a2898022dd5b5d3d 100644 (file)
@@ -86,7 +86,7 @@ getNamedValueInt(const char *string, const char *name)
   int                  stringLen = strlen(string);
   int                  nameLen = strlen(name);
   int                  results = 0;
-  register unsigned int        offset;
+  unsigned int offset;
 
   for (offset = 0; offset < stringLen - nameLen; offset++) {
     if (strncasecmp(&string[offset], name, nameLen) == 0) {
@@ -110,7 +110,7 @@ getNamedValueString(const char *string, const char *name)
   int                    nameLen = strlen(name);
   const char           * results;
   char                 * stringEnd;
-  register unsigned int          offset;
+  unsigned int   offset;
 
   for (offset = 0; offset < stringLen - nameLen; offset++) {
     if (strncasecmp(&string[offset], name, nameLen) == 0) {
@@ -191,7 +191,7 @@ RFCMessage  *
 RFCMailBox::_assemblePartial(DtMailEnv & error,
                             RFCMessage * message)
 {
-  register unsigned int          offset;
+  unsigned int   offset;
   unsigned int           totalParts = 0;
 
   RFCMessage           * msg = message;
@@ -319,7 +319,7 @@ RFCMailBox::_assemblePartial(DtMailEnv      & error,
        unsigned int              duplicateCount;
        int                       fromLen;
        int                       headerNumber = 0;
-       register unsigned int     dupOffset;
+       unsigned int      dupOffset;
 
        if (error.isNotSet()) {
          //
index d09e0c69d27e2ff426d2c7be7f6de2b63b7b8c00..0b14d72c4f4c42a8d7f1cd87fc72056f962a3db6 100644 (file)
@@ -524,8 +524,8 @@ skin_comma(char * buf)
 void
 RFCTransport::arpaPhrase(const char * name, DtMailAddressSeq & tokens)
 {
-    register char c;
-    register const char *cp;
+    char c;
+    const char *cp;
     char *cp2;
     char *nbufp;
     char *bufend;
index 85b825eebb876dde77c5b6c72117dd50738c1fe4..ab16cb2b8c237c462524fba14e2b62315b074db2 100644 (file)
@@ -965,7 +965,7 @@ CreateEditorWidget(
 {
     Widget parent = pPad->mainWindow;
     Arg al[10];                /* arg list */
-    register int ac;   /* arg count */
+    int ac;    /* arg count */
     Pixel background, foreground, top_shadow, bottom_shadow, selectColor;
     Colormap colormap;
     XmString dialogTitleStr = XmStringCreateLocalized(DialogTitle(pPad));
@@ -1017,7 +1017,7 @@ FindOrCreatePad(
     Boolean foundPad = False;
     Editor *pPad;
     Arg al[10];
-    register int ac;
+    int ac;
 
     /* -----> Reuse unused entries (corresponding to closed editor windows)
      *        before creating new ones. */
index 9ae1225416b0a7407661230b635d9c5f9a8cc213..3ee3619aae0a6c7a36e2de2de075c16b6e356c26 100644 (file)
@@ -182,7 +182,7 @@ SetSaveAsDirAndFile(Editor *pPad)
     int firstSelect = -1, lastSelect = -1;
     Widget textField;
     Arg args[5];
-    register int n;
+    int n;
     XmString dirString;
     dirbuf[0] = (char) '\0';
 
@@ -263,7 +263,7 @@ CreateNewLineToggles(
        ToggleWidgets *pToggleWidgets)
 {
     Arg args[20];
-    register int n;
+    int n;
     XmString label_string;
 
     /* -----> Create Radio Box */
@@ -321,7 +321,7 @@ void
 CreateSaveAsDialog(Editor *pPad)
 {
     Arg args[20];
-    register int n;
+    int n;
     XmString label_string;
     char buf[256];
     SaveAs *pSaveAs = &pPad->fileStuff.fileWidgets.saveAs;
@@ -563,7 +563,7 @@ CreateFileSelectionDialog(
         Editor *pPad )
 {
     Arg al[10];             /* arg list */
-    register int ac;        /* arg count */
+    int ac;        /* arg count */
     XmString tmpStr;
     Select *pSelect = &pPad->fileStuff.fileWidgets.select;
 
@@ -618,7 +618,7 @@ CreateSaveWarning(
         Editor *pPad )
 {
     Arg al[10];                        /* arg list */
-    register int ac;           /* arg count */
+    int ac;            /* arg count */
     char buf[256];
     Widget w, kid[5];
     Pixel foreground, background;
@@ -901,7 +901,7 @@ AskIfSave(
         Editor *pPad)
 {
     Arg al[10];             /* arg list */
-    register int ac;        /* arg count */
+    int ac;        /* arg count */
     char *tmp = NULL;
     XmString tmpStr;
     Select *pSelect = &pPad->fileStuff.fileWidgets.select;
index ca0619a1540f8ca820a77ebbd407b4d0f2f2b5c7..fa8dc64f6fde1cd19441eebd440fab8e20be8d02 100644 (file)
@@ -512,7 +512,7 @@ CreateFirstPad(
     char **argv_l, **c_argv_l;
     Editor *pPad;
     Arg al[10];
-    register int ac;
+    int ac;
     Widget foo;
     int i;
     /* Added for the argument fix*/
@@ -1007,7 +1007,7 @@ RealizeNewPad(
         Editor *pPad)
 {
     Arg al[5];                 /* arg list */
-    register int ac;           /* arg count */
+    int ac;            /* arg count */
 
     /* Create the title */
     pPad->dialogTitle = DialogTitle(pPad);
@@ -1232,7 +1232,7 @@ GetAdjustedResizeHints(
         XSizeHints *pHints)
 {
     Arg al[2];                 /* arg list */
-    register int ac;           /* arg count */
+    int ac;            /* arg count */
     Dimension MBheight;
 
     /* get Dt Editor widget size hints */
@@ -1357,7 +1357,7 @@ SetWindowSize(
         Editor *pPad)
 {
     Arg al[10];                        /* arg list */
-    register int ac;           /* arg count */
+    int ac;            /* arg count */
     XSizeHints  size_hints;
     XWMHints   *wmhints;
     long supplied_return;
@@ -1876,4 +1876,8 @@ dtpadXIOErrorHandler(
 
     fprintf(stderr, "X IO Error");
     PanicSave();
+
+    /* Man page for XSetIOErrorhandler says this is a fatal error and
+     * should not return */
+    exit(EXIT_FAILURE);
 }
index 5b04381aaab80a909aab5add8f075fbf574d253f..9484e21d0782091b84a7d7d0d436979efd293844 100644 (file)
@@ -282,7 +282,7 @@ PrintJobCancel(PrintJob *pJob)
  *     Returns the last print display on which an error occurred.
  ************************************************************************/
 Display *
-PrintJobGetErrorPrintDisplay()
+PrintJobGetErrorPrintDisplay(void)
 {
     return _pjErrorPrintDisplay;
 }
index 0120938445e1b7b0704a038d5f657823d6d29948..53ec31277805229b923b055c019e5a4c7026cf31 100644 (file)
@@ -92,7 +92,7 @@ static void PdmJobBoxSetAttr(PdmSetupBox* me, PdmXp* pdm_xp);
  *
  */
 PdmSetupBox*
-PdmJobBoxNew()
+PdmJobBoxNew(void)
 {
     PdmSetupBox* me = (PdmSetupBox*)XtCalloc(1, sizeof(PdmSetupBox));
 
index 8af341cdee7deacfbb4768e0875f1b9b77ff28fa..078e8caf8c5e33b3bf02b0f74a6a1df8ea2db3dd 100644 (file)
@@ -115,7 +115,7 @@ static Boolean PdmStartOkWorkProc(XtPointer client_data);
  *
  */
 static PdmShell*
-PdmShellNew()
+PdmShellNew(void)
 {
     return (PdmShell*)XtCalloc(1, sizeof(PdmShell));
 }
index c449dd41faade8f4e6480ca14a8176dca9992ee9..8257d9d17731a9a65ea45161fa7639fdc8fdd77a 100644 (file)
@@ -87,7 +87,7 @@ static void PdmMainWinHelpDestroyCB(Widget, XtPointer, XtPointer);
  *
  */
 PdmMainWin*
-PdmMainWinNew()
+PdmMainWinNew(void)
 {
     PdmMainWin* me = (PdmMainWin*)XtCalloc(1, sizeof(PdmMainWin));
     me->pdm_xp = PdmXpNew();
index 92c055e0d3fc62ddd3947369a09bf9859c8b6980..c142f71e6e4bfd4242a3fc6edf40a9854ca8c750 100644 (file)
@@ -459,7 +459,7 @@ PdmOidListDelete(PdmOidList* list)
  *
  */
 PdmOidLinkedList*
-PdmOidLinkedListNew()
+PdmOidLinkedListNew(void)
 {
     return (PdmOidLinkedList*)XtCalloc(1, sizeof(PdmOidLinkedList));
 }
index 912e923d2a72236d832518d758d5ac909f34c772..05b2b4ef90fb8fef3edcddc8d7b4a96fafbc8e73 100644 (file)
@@ -69,7 +69,7 @@ static XrmDatabase PdmXpLoadPool(PdmXp* me, XPAttributes type);
  *
  */
 PdmXp*
-PdmXpNew()
+PdmXpNew(void)
 {
     return (PdmXp*)XtCalloc(1, sizeof(PdmXp));
 }
index bec8f05ab7c557544d001fb59d9952f4ba980cfe..d1847eef073d7f3ef156f2c06851358ef2abc5fa 100644 (file)
@@ -405,7 +405,7 @@ static String GetIconFileName(Widget w, String resource_name);
  *
  */
 PdmSetupBox*
-PdmPrinterBoxNew()
+PdmPrinterBoxNew(void)
 {
     PdmSetupBox* me = (PdmSetupBox*)XtCalloc(1, sizeof(PdmSetupBox));
     PdmPrinterBoxData* data;
@@ -1379,7 +1379,7 @@ OrientCtlGetOrientation(OrientCtl* me)
  *
  */
 static PlexCtl*
-PlexCtlNew()
+PlexCtlNew(void)
 {
     PlexCtl* me = (PlexCtl*)XtCalloc(1, sizeof(PlexCtl));
     me->pixmap_list_ptr = &me->portrait_pixmap_list;
@@ -2246,7 +2246,7 @@ TrayCtlSelectCB(Widget w, XtPointer client_data, XtPointer call_data)
  *
  */
 static SizeCtl*
-SizeCtlNew()
+SizeCtlNew(void)
 {
     SizeCtl* me = (SizeCtl*)XtCalloc(1, sizeof(SizeCtl));
     return me;
index 87412b289e08d4c701e01d76898297318c0375bd..3d7ddd91991110c9cd3bb20dcef3831d0ce8e8ea 100644 (file)
@@ -155,9 +155,7 @@ static void pusage( char *prog_name )
  *
  *****************************************************************************/
 
-static int generic_error_handler( edpy, eevent )
-    Display     *edpy;
-    XErrorEvent *eevent;
+static int generic_error_handler(Display *edpy, XErrorEvent *eevent)
 {
     g.xerrno  = eevent->error_code;
     g.xerrreq = eevent->request_code;
@@ -264,9 +262,7 @@ static void xtkick_proc( XtPointer w, int *source, XtInputId *id)
  * main
  */
 int
-main( argc, argv )
-    int argc;
-    char **argv;
+main(int argc, char **argv)
 {
     int tscreen;
     XtInputId xtid;
index 4a1d75de0d407161b4850ead726f85ba7741d147..98df74459a72e2003c3eacda0a088b17dc4ee6d4 100644 (file)
@@ -894,7 +894,7 @@ Bool has_exec_token( XpPdmServiceRec *rec )
  * Search through all the child tracking records and see if
  * any can be shutdown.
  */
-void mgr_shutdown_scan()
+void mgr_shutdown_scan(void)
 {
     int        i;
     time_t     now;
index e956e6982c0766dde3316ebfca51251f4a9b9b2b..dcc98dfa42f9eb071bdcbb50473937d4f7d296dc 100644 (file)
@@ -1019,7 +1019,7 @@ char *DtApp::GetBottomString(BaseObj *job, boolean need_details)
                 job->AttributeValue((char *)TIME_SUBMITTED),
                 job->AttributeValue((char *)DATE_SUBMITTED));
       else
-         strcpy(string, job->AttributeValue((char *)OWNER));
+         snprintf(string, sizeof(string), "%s", job->AttributeValue((char *)OWNER));
     }
    return string;
 }
index 22d7eac360c91a0a5b423e1a2d35db60cd8e8d92..56153eab61c44d88c6360e5143db56889120f0b0 100644 (file)
@@ -236,7 +236,8 @@ void DtFindSet::HelpCB(void *data)
 boolean DtFindSet::HandleHelpRequest()
 {
    char old_msg[200];
-   strcpy(old_msg, mainw->status_line->Name());
+
+   snprintf(old_msg, sizeof(old_msg), "%s", mainw->status_line->Name());
    mainw->status_line->Name(MESSAGE(GettingHelpL));
    mainw->WorkingCursor(true);
 
index f0256be6c6ae3342fc8786d2e0f56f1bc4aaf0b2..952047c201f69ca27c40cb4cce9d3659a4bec205 100644 (file)
@@ -123,7 +123,7 @@ void DtMainW::DisplayHelp(char *location_id, char *volume)
 {
    char old_msg[200];
 
-   strcpy(old_msg, status_line->Name());
+   snprintf(old_msg, sizeof(old_msg), "%s", status_line->Name());
    status_line->Name(MESSAGE(GettingHelpL));
    WorkingCursor(true);
    if (!helpSystem)
index 385f1d31faa147a092e1c7a9d07c64d6bfcb5788..51f79beffaffda489a473c51ab6a8848d41331cd 100644 (file)
@@ -752,17 +752,17 @@ char *DtPrinterIcon::GetPrinterIcon(const char *printer,
 {
    static char buf[200];
 
-   sprintf(buf, "%s_Print", printer);
+   snprintf(buf, sizeof(buf), "%s_Print", printer);
    if (_app_mode != INITIALIZE_PRINTERS && DtActionExists(buf))
     {
       char *iconfile = DtActionIcon(buf);
       if (iconfile)
-         strcpy(buf, iconfile);
+         snprintf(buf, sizeof(buf), "%s", iconfile);
       else
-         strcpy(buf, PRINTER_ICON_FILE);
+         snprintf(buf, sizeof(buf), "%s", PRINTER_ICON_FILE);
     }
    else
-      strcpy(buf, PRINTER_ICON_FILE);
+      snprintf(buf, sizeof(buf), "%s", PRINTER_ICON_FILE);
    return buf;
 }
 
@@ -771,16 +771,16 @@ char *DtPrinterIcon::GetPrinterLabel(const char *printer,
 {
    static char buf[200];
 
-   sprintf(buf, "%s_Print", printer);
+   snprintf(buf, sizeof(buf), "%s_Print", printer);
    if (_app_mode != INITIALIZE_PRINTERS && DtActionExists(buf))
     {
       char *label = DtActionLabel(buf);
       if (label)
-         strcpy(buf, label);
+         snprintf(buf, sizeof(buf), "%s", label);
       else
-         strcpy(buf, printer);
+         snprintf(buf, sizeof(buf), "%s", printer);
     }
    else
-      strcpy(buf, printer);
+      snprintf(buf, sizeof(buf), "%s", printer);
    return buf;
 }
index 7de0f616c84cf6a8d2619b0e0775765e8d287774..02ae0eb0c999afbf91d0cee26f9b15684be4cba8 100644 (file)
@@ -103,7 +103,7 @@ void DtPrtJobIcon::PrintJobObj(PrintJob *job)
     {
       Name(job->DisplayName());
       BottomString(GetBotString(mainw, Parent(), job));
-      strcpy(job_number, job->AttributeValue((char *)JOB_NUMBER));
+      snprintf(job_number, sizeof(job_number), "%s", job->AttributeValue((char *)JOB_NUMBER));
       if (props)
        {
          props->Visible(false);
index 08a3b76fb959cc8721fa2426a894c67f1566f768..769371d46d1d54c887a2274d9f5fa1e8109330d1 100644 (file)
@@ -129,7 +129,7 @@ PrintXError(
     char mesg[BUFSIZ];
     char number[32];
     char *mtype = "XlibMessage";
-    register _XExtension *ext = (_XExtension *)NULL;
+    _XExtension *ext = (_XExtension *)NULL;
     _XExtension *bext = (_XExtension *)NULL;
     XGetErrorText(dpy, event->error_code, buffer, BUFSIZ);
     XGetErrorDatabaseText(dpy, mtype, "XError", "X Error", mesg, BUFSIZ);
@@ -149,7 +149,7 @@ PrintXError(
             ext = ext->next)
             ;
         if (ext)
-            strcpy(buffer, ext->name);
+            snprintf(buffer, sizeof(buffer), "%s", ext->name);
         else
             buffer[0] = '\0';
       }
index 2adbcfdbf7ac64587abd03cb76c9eb88c44eea34..b970d7eb37cb8d4e8fc8f57ddfa21f1aa119a382 100644 (file)
@@ -1181,7 +1181,7 @@ int ParseAIXv3PrintJobs(char *_printer, char *jobs,
    static char *job_list = NULL;
    static int prev_buf_size = 0;
 
-   strcpy(printer, _printer);
+   snprintf(printer, sizeof(printer), "%s", _printer);
    if (s = strchr(printer, ':'))
       *s = '\0';
        
index 84aad0f2e70709d2070d59ef8879c779e68575ce..a024445028fb185b131531b40ad029ea4f11b4e0 100644 (file)
@@ -139,8 +139,7 @@ static Window *winprop = NULL;  /* dtsession cover windows */
 
 /* VARARGS1 */
 void
-error(s1, s2)
-    char       *s1, *s2;
+error(char *s1, char *s2)
 {
     fprintf(stderr, s1, ProgramName, s2);
     exit(1);
index a5a539cc162e9455d29d80b58ac0e2a908760d64..2b05d44470b8af9f941b7d580a0aebd15a2bed3a 100644 (file)
 #include <math.h>
 
 void
-hsb2rgb(H, S, B, r, g, b)
-    double      H,
-                S,
-                B;
-    u_char     *r,
-               *g,
-               *b;
+hsb2rgb(double H, double S, double B,  u_char *r, u_char *g, u_char *b)
 {
     int         i;
     double      f;
index 4cc3ce2a7b553a8efee03ccc011902fd73593af5..0e11d8f03469e874276eaf2f557ef0f4e69d512f 100644 (file)
@@ -342,10 +342,10 @@ shootup(perwindow *pwin, pyrostruct *pp, rocket *rp)
 static void
 burst(perwindow *pwin, pyrostruct *pp, rocket *rp)
 {
-    register int starn;
-    register int nstars, stype;
-    register float rx, ry, sd; /* Help compiler optimize :-) */
-    register float sx, sy;
+    int starn;
+    int nstars, stype;
+    float rx, ry, sd;  /* Help compiler optimize :-) */
+    float sx, sy;
 
     nstars = rp->nstars;
     stype = rp->shelltype;
index 656b2691d68c0596c238a94733f62e31d4e0cb1b..60bc54e9b7b302dbe667ce15ae2069517425a03e 100644 (file)
@@ -168,8 +168,8 @@ initrotor(perwindow *pwin)
 void
 drawrotor(perwindow *pwin)
 {
-    register flightstruct *fs;
-    register struct elem *pelem;
+    flightstruct *fs;
+    struct elem *pelem;
     int         thisx,
                 thisy;
     int         i,
index 5f50b71d1373f4626d43dab31287104df1942e59..b2d093a4448fb1e29a7d70deb0d7243225f921e2 100644 (file)
@@ -481,7 +481,7 @@ StartMsgServer(void)
  * 
  *************************************<->***********************************/
 static void 
-DtwmStarted()
+DtwmStarted(void)
 {
     smGD.dtwmRunning = True;
 } /* END OF FUNCTION  DtwmStarted */
@@ -940,11 +940,8 @@ ProcessReloadActionsDatabase(void)
 }
 
 void
-ProcessEvent(w, client_data, event, continue_to_dispatch)
-  Widget w;
-  XtPointer client_data;
-  XEvent *event;
-  Boolean *continue_to_dispatch;
+ProcessEvent(Widget w, XtPointer client_data, XEvent *event,
+             Boolean *continue_to_dispatch)
 {
   switch(event->type)
   {
index 7a4f513b6bc6f33844fa98c84b0f79b2453a8652..0bb24e7edd643581c35c1564b667b6f111c490b9 100644 (file)
@@ -64,9 +64,6 @@
 #include <sys/types.h>
 #include <sys/utsname.h>
 #include <unistd.h>
-#ifdef __apollo
-#include <X11/apollosys.h>      /* for pid_t, in hp-ux sys/types.h */
-#endif
 #include <sys/stat.h>
 #include <sys/param.h>
 #include <X11/Intrinsic.h>
@@ -962,7 +959,7 @@ SetResSet( void )
  *
  *************************************<->***********************************/
 void 
-UndoSetSavePath ( )
+UndoSetSavePath (void)
 {
        char                    * buf;
 
@@ -2640,7 +2637,7 @@ SmExit (
 }
 
 void
-SetSIGPIPEToDefault ()
+SetSIGPIPEToDefault (void)
 {
        struct sigaction pipeSig;
 
index 3a0178682d935f48b1006d4bd508325f62329319..d86590a1bfdd68d726826f07fcd916bbf99999dd 100644 (file)
 #include "SmHelp.h"
 #include "SmGlobals.h"
 
-#ifdef __apollo
-#include <X11/apollosys.h>
-#endif  /* __apollo */
-
-
 /*
  * #define statements
  */
index e505ed60ecf9f83aa4d9032bdfb0789e71f643a0..5b1dfd526da194d63455b800b37ad98627467c26 100644 (file)
@@ -64,9 +64,6 @@
 #endif /* _SUN_OS */
 #include <sys/types.h>
 #include <stdlib.h>
-#ifdef __apollo
-#include <X11/apollosys.h>        /* for pid_t struct in hp-ux sys/types.h */
-#endif
 #include <sys/socket.h>
 #include <sys/wait.h>
 #include <netinet/in.h>
index e2f23074a8d48a415123fc59ba5972cdc9345c8f..6db2e4a544be6273ea2c27f06cc93a36b5a6dc95 100644 (file)
@@ -314,7 +314,7 @@ SaveState(
  *
  *************************************<->***********************************/
 int 
-CompleteSave ( )
+CompleteSave (void)
 {
 
   FILE                         *convertFP;
@@ -414,7 +414,7 @@ CompleteSave ( )
  * 
  *************************************<->***********************************/
 static void
-PruneSessionDirectory ()
+PruneSessionDirectory (void)
 {
        DIR                     * dirp;
        struct dirent           * dp;
@@ -588,7 +588,7 @@ PruneSessionDirectory ()
  *
  *************************************<->***********************************/
 static Boolean
-WriteClientDatabase ()
+WriteClientDatabase (void)
 {
        char                    *db;
        ClientDB                outputDB;
@@ -810,7 +810,7 @@ CheckRequiredProperties (
  *
  *************************************<->***********************************/
 void 
-NotifyProxyClients ( )
+NotifyProxyClients (void)
 {
   unsigned int                 topListLength, containedListLength;
   WindowInfo           * topList;      /* list of top-level windows */
index cc7b14fe634aa69177c1747f46cd67bcdb9e37e7..a162485571c129b2f54194b61ff4584a99f6571c 100644 (file)
@@ -186,7 +186,7 @@ void AddClient (
  * Functions
  */
 
-Boolean InitXSMP ( )
+Boolean InitXSMP (void)
 {
        char            errorMsg[ERRORMSGLEN];
        char            *env;
@@ -299,7 +299,7 @@ InitializeSaveState (
 }
 
 static void 
-InitializeXSMPGlobals ( )
+InitializeXSMPGlobals (void)
 {
        smXSMP.authDataEntries = NULL;
 
@@ -920,7 +920,7 @@ SaveYourselfDoneProc (
 
 
 static void
-ProcessSaveYourselfResponses ()
+ProcessSaveYourselfResponses (void)
 {
        ClientRecPtr            pClientRec;
        Boolean                 done = False;
@@ -1014,7 +1014,7 @@ CloseConnectionProc (
 }
 
 void
-CompleteXSMPSave ()
+CompleteXSMPSave (void)
 {
        ClientRecPtr            pClientRec;
 
@@ -1235,7 +1235,7 @@ Tt_callback_action GetWsmClientsHandler(
 
 
 static
-Boolean SendGetWsmClientsMessage ( )
+Boolean SendGetWsmClientsMessage (void)
 {
        Tt_message              message;
        Tt_status               status;
@@ -1270,7 +1270,7 @@ Boolean SendGetWsmClientsMessage ( )
 
 
 static 
-int GetCurrentWorkspaceNumber ()
+int GetCurrentWorkspaceNumber (void)
 {
        Atom                    currentWorkspace;
        Atom                    *workspaceList;
@@ -1300,7 +1300,7 @@ int GetCurrentWorkspaceNumber ()
 
 
 static 
-void CancelShutdown ()
+void CancelShutdown (void)
 {
        ClientRecPtr            pClientRec;
        char                    *pch;
@@ -1441,7 +1441,7 @@ MyIoErrorHandler (
 }    
 
 void
-InstallIOErrorHandler ()
+InstallIOErrorHandler (void)
 {
        IceIOErrorHandler default_handler;
 
@@ -1452,7 +1452,7 @@ InstallIOErrorHandler ()
 }
 
 
-void XSMPExit ( )
+void XSMPExit (void)
 {
        char            * pchar;
 
index adc0683250d6532b27129a62aa3709f62c5dbf58..61fb4ddec285f01ecd45c6a4eda84679a7fb3676 100644 (file)
@@ -329,7 +329,7 @@ int             validate_id (char *s)
    OPEN_OUTFILE - open outputfile - if the file already exists,
   and no mode was specified by the user, ask the user what to do.
 ****************************************************************/
-void            open_outfile ()
+void            open_outfile (void)
 {
     FILE           *temp;
     int             i;
@@ -552,7 +552,7 @@ int             token (char *s)
 /***********************************************************************
     PROCESS_PROFILE - process 'profile' file.
 ************************************************************************/
-void            process_profile ()
+void            process_profile (void)
 {
     FILE           *prof;
     char            prof_line[200];
@@ -1572,7 +1572,7 @@ END_DATE_TABLE:
 /**********************************************************************
    CLEANUP - frees memory used by record
 ***********************************************************************/
-void            cleanup ()
+void            cleanup (void)
 {
     struct line_id *line_current;
     struct field_id *field_current;
@@ -1606,7 +1606,7 @@ void            cleanup ()
    WRITE_RECORD - writes the final form of the record - key, fzkey, abstract,
  and image.
 **************************************************************************/
-void            write_record ()
+void            write_record (void)
 {
     static int     dotcount = 0;
     char           *ptr;
@@ -2046,7 +2046,7 @@ try and identify each line.  Then fields are processed against these lines,
 and finally fzk processing can begin on any lines that are indicated being
 important.
 ***************************************************************************/
-void            process_infile ()
+void            process_infile (void)
 {
     int             line_num = 0;
     struct line_id *line_current;
index a251599cf1083d6bf5d7258243a066d38d101860..bd2fc23843645adde4baa75c6bf2e259c42c798c 100644 (file)
@@ -920,10 +920,10 @@ void            write_2_dtbs_addr_file (void)
     DtSrINT32          i_start, k, cur_ind;
     DtSrINT32          num_delete_addrs = 0;
     char               addrs_removed = FALSE;
-    register DtSrINT32 i;
-    register DtSrINT32 cur_byte;
-    register char      bit_addrs;
-    register DB_ADDR   temp1;
+    DtSrINT32  i;
+    DtSrINT32  cur_byte;
+    char       bit_addrs;
+    DB_ADDR    temp1;
 
     if (debugging & DEBUG_O)
        printf ("  old vis '%s' ofs=%ld adr=%ld fre=%ld\n",
@@ -1370,7 +1370,7 @@ main (int argc, char **argv)
     char               temp_buf[40];
     char               db_key [DtSrMAX_DB_KEYSIZE + 2];
     int                        oops = FALSE;
-    register DtSrINT32 cur_byte;
+    DtSrINT32  cur_byte;
     struct tm          *tmptr;
     DB_ADDR            dba, temp_dba;
     time_t             elapsed;
index 8b1af21ffd5041f814863b443849bdbd2af02bc0..f8c32ea3523e853e0e3fa2d17dcebc72bde13a2d 100644 (file)
@@ -137,7 +137,7 @@ static Widget
 build_audioDlg(
         Widget shell )
 {
-    register int     i, n;
+    int     i, n;
     Arg              args[MAX_ARGS];
     XmString         button_string[NUM_LABELS]; 
     XmString         string; 
index 2168a13a1d8b5f9df81bf220195035e6d7226a8e..9a00464395f2b56d9ac6eb20f7900e8e0b002c8e 100644 (file)
 #include <sys/types.h>
 #include <errno.h>
 
-#if defined(_AIX) || defined(__apollo)
+#if defined(_AIX)
 #include <sys/dir.h>
 #else
 #include <dirent.h>             /* opendir(), directory(3C) */
 #endif /* _AIX */
 
-#ifdef __apollo
-#include <X11/apollosys.h>      /* needed for S_ISDIR macro */
-#endif
-
-
 #include <locale.h>
 #include <X11/Xlib.h>
 #include <Xm/MwmUtil.h>
@@ -201,7 +196,7 @@ build_dirList(char * dirStr,
    char tokenSep[] = ":";
    char * token;
    char ** dirList = NULL;
-   register int i = 0;
+   int i = 0;
    char * tmpStr;
    int len = strlen(dirStr);
    *count = 0;
@@ -248,7 +243,7 @@ free_dirList(char ** dirList,
                    int count)
 
 {
-  register int   i;
+  int   i;
 
   if (dirList == NULL)
     return;
@@ -263,7 +258,7 @@ free_dirList(char ** dirList,
  *  SelectCurrentBackdrop() - Selects current backdrop in list
  *
  ************************************************************************/
-void SelectCurrentBackdrop(callback)
+void SelectCurrentBackdrop(int callback)
 {
     DtWsmWorkspaceInfo   *wInfo=NULL;
     Atom            aWS;
@@ -337,7 +332,7 @@ static int
 CreateBackdropDialog(
         Widget parent )
 {
-    register int     i, n;
+    int     i, n;
     Arg              args[20];
     Widget           mainForm;
     Widget           list;
@@ -570,7 +565,7 @@ static
   int            width, height, x, y;
   Window         win;
   int            num;
-  register int   i;   
+  int   i;
   char          *string;
   /* allocate space for temporary bitmap info */
   backdrops.tmpBitmapNames = (char **)XtCalloc(100, sizeof(char *));
index 9ba5ded7ac1241b72044088f69286c48f37a89ee..e125a6a414bdef262b239d58f80de68d1881097b 100644 (file)
@@ -215,7 +215,7 @@ static void
 CreateColorEditor(
         Widget parent )
 {
-       register int     n,i;
+       int     n,i;
        Arg              args[MAX_ARGS];
         Widget           sampleTB;
         Widget           sampleForm;
@@ -589,7 +589,7 @@ sliderLayoutCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-       register int     n;
+       int     n;
        Arg              args[12];
         Dimension        redLabelWidth;
         Dimension        greenLabelWidth;
@@ -834,7 +834,7 @@ sliderLayoutCB(
 static void 
 InitializeNewButton( void )
 {
-       register int     n;
+       int     n;
        Arg              args[6];
 
         n=0;
@@ -862,7 +862,7 @@ InitializeNewButton( void )
 static void 
 InitializeOldButton( void )
 {
-    register int     i,n, numOfPixels;
+    int     i,n, numOfPixels;
     unsigned long    *pixels;
     unsigned long    plane_mask;
     int              hue, val, sat, status;
index 0fbe61104653953d2f368c394bea42b2a123756d..28bc4287c94f724ca96a52f02f379b4857ee4121 100644 (file)
 
 #ifdef __hpux
 #include <ndir.h>               /*   opendir(), directory(3C) */
-#else
-#if defined(SVR4) || defined(sco) || defined(CSRG_BASED)
+#elif defined(SVR4) || defined(CSRG_BASED)
 #include <dirent.h>             /* opendir(), directory(3C) */
 #else
 #include <sys/dir.h>
-#ifdef __apollo
-#include <X11/apollosys.h>      /* needed for S_ISDIR macro */
-#endif
 #endif
-#endif
-
 
 #include <Xm/Xm.h>
 
@@ -254,7 +248,9 @@ ReadPalette(
 
     /* load the filename into the name element */
       p = strstr (in_filename, PALETTE_SUFFIX);
-      *p = '\0';
+      if(p) {
+          *p = '\0';
+      }
       strcpy(new_palette->name, in_filename);
 
 /* 
@@ -530,7 +526,10 @@ WriteOutDesc(
    if (hm_pl_DB )
      XrmPutFileDatabase(hm_pl_DB, desc_file);
    /* make the file read, write */
-   chmod(desc_file,438);
+   if(chmod(desc_file,438) == -1) {
+      fprintf(stderr, "failed to chmod '%s', %s\n", desc_file, strerror(errno));
+   }
+
    XtFree(desc_file);
    XtFree(desc_name);
 
@@ -1116,7 +1115,7 @@ CheckFileType( void )
 {
    char *filename1 = "abcdefghijklmno";
    char *filename2 = "abcdefghijklmn";
-   int  fd, fd1;
+   int  fd = -1, fd1 = -1;
    char *tmpfile1, *tmpfile2;
  
   /* get the $HOME environment varible and constuct the full file name */
@@ -1166,7 +1165,9 @@ CheckFileType( void )
    XtFree(tmpfile1);
    XtFree(tmpfile2);
    close(fd);
-   close(fd1);
+   if(fd1 != -1) {
+      close(fd1);
+   }
    
 }
 
index 347e111a6e952ed1e59248f3938c59880af24c7b..811c6c725b1d5e7de40432325e837c7ac4ba5d10 100644 (file)
 /*+++++++++++++++++++++++++++++++++++++++*/
 /* include files                         */
 /*+++++++++++++++++++++++++++++++++++++++*/
-#ifdef __apollo
-#include  "/sys5/usr/include/limits.h"
-#else  /* common default */
 #include <limits.h>
-#endif /* __apollo */
 
 #include <locale.h>
 #include <stdlib.h>
@@ -389,7 +385,7 @@ void
 Customize(
         Widget shell )
 {
-    register int     i;
+    int     i;
 
     /*  
     **  Main routine does the following:
@@ -505,7 +501,7 @@ void
 CreatePaletteButtons(
         Widget parent )
 {
-    register int     i,n;
+    int     i,n;
     Arg              args[16];
     XmString         string;
     Pixmap           pixmap100;
@@ -634,7 +630,7 @@ InitializePaletteList(
         Boolean startup )
 #endif
 {
-  register int     n;
+  int     n;
   Arg              args[4];
   XmString         string;
   XmStringTable    string_table;
@@ -838,7 +834,7 @@ selectPaletteCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-    register int     n;
+    int     n;
     Arg              args[10];
     XmListCallbackStruct *cb = (XmListCallbackStruct *)call_data;
     palette         *tmp_palette;
@@ -855,9 +851,10 @@ selectPaletteCB(
        selected_position = cb->item_position;
 
        tmp_palette = pHeadPalette;
-       while( tmp_palette->item_position != selected_position &&
-                                                 tmp_palette != NULL)
+       while( tmp_palette != NULL &&
+              tmp_palette->item_position != selected_position ) {
             tmp_palette = tmp_palette->next;
+       }
 
        if(tmp_palette->item_position == selected_position)
        {
@@ -1062,7 +1059,7 @@ timeoutCB(
         XtPointer client_data,
         XtIntervalId *id )
 {
-    register int     n;
+    int     n;
     intptr_t         i;
     Arg              args[2];
        Pixel   bg_pixel;
@@ -1099,7 +1096,7 @@ addPaletteCB(
         XtPointer call_data )
 {
 
-    register int     n;
+    int     n;
     Arg              args[10];
     XmString         string;
     XmString         string1;
@@ -1162,7 +1159,7 @@ addOkCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-  register int     n, i;
+  int     n, i;
   Arg              args[6];
   XmString         string;
   char             *name, *filename, *tmpstr;
@@ -1503,7 +1500,7 @@ deletePaletteCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-    register int     n;
+    int     n;
     Arg              args[10];
     char            *tmpStr;
     palette         *tmp_palette;
@@ -1514,9 +1511,10 @@ deletePaletteCB(
 
     tmp_palette = pHeadPalette;
 
-    while( tmp_palette->item_position != selected_position &&
-                                             tmp_palette != NULL)
+    while( tmp_palette != NULL
+           && tmp_palette->item_position != selected_position ) {
         tmp_palette = tmp_palette->next;
+    }
     
     if (deleteDialog == NULL)
     {
@@ -1595,7 +1593,7 @@ resourcesCB(
         XtPointer call_data )
 {
 
-    register int     n;
+    int     n;
     Arg              args[12];
     XmString         button_string[NUM_LABELS]; 
     XmString        string;
@@ -1987,7 +1985,7 @@ void
 DeletePaletteFromLinkList(
         Widget list )
 {
-    register int n;
+    int n;
     Arg args[2];
     int i;
     XmString        string; 
@@ -1996,9 +1994,10 @@ DeletePaletteFromLinkList(
 
 
     selected_palette = pHeadPalette;
-    while( selected_palette->item_position != selected_position &&
-                                             selected_palette != NULL)
+    while( selected_palette != NULL
+           && selected_palette->item_position != selected_position ) {
         selected_palette = selected_palette->next;
+    }
 
     XmListDeletePos (list, selected_palette->item_position);
 
@@ -2249,7 +2248,7 @@ void
   int      i;
    char     temp[XmCO_MAX_NUM_COLORS][60];
    char     xrdb_string[100];
-   XColor   saved_color[2];
+   XColor   saved_color[2] = { { 0, 0, 0 }, { 0, 0, 0 } };
    
    for(i = 0; i < XmCO_MAX_NUM_COLORS; i++)
      {
@@ -2674,7 +2673,7 @@ CreateDialogBoxD(
 void 
 AddToDialogBox( void )
 {
-    register int     n;
+    int     n;
     Arg              args[3];
 
    if(style.count > 1)
@@ -2705,7 +2704,7 @@ AddToDialogBox( void )
 void 
 CreateTopColor1( void )
 {
-    register int     n;
+    int     n;
     Arg              args[6];
     XmString         string; 
 
@@ -2741,7 +2740,7 @@ CreateTopColor1( void )
 void 
 CreateTopColor2( void )
 {
-    register int     n;
+    int     n;
     Arg              args[8];
 
     if(style.count > 3)
@@ -2774,7 +2773,7 @@ CreateTopColor2( void )
 void 
 CreateBottomColor( void )
 {
-    register int     n;
+    int     n;
     Arg              args[12];
     XmString         string; 
     Widget           addDeleteForm;
index 580588081b6ca3f46ee5764cc40b1294963eca48..8f8c79a44a65068657160db14f2bda9ec1f8389d 100644 (file)
@@ -137,7 +137,7 @@ AllocatePaletteCells(
 int 
 ReColorPalette( void )
 {
-    register int     n;
+    int     n;
     Arg              args[MAX_ARGS];
     int              i;
     int              j=0;
index a74b493acd6fc1b9bb05a29611cfb82ead5c580c..a9d62f9870a8f981d59ccfb842bda3795125d059 100644 (file)
@@ -196,7 +196,7 @@ popup_dtwmBB(
 /*+++++++++++++++++++++++++++++++++++++++*/
 
 static void 
-getDtwmValues( )
+getDtwmValues(void)
 {
     char *str_type_return;
     XrmValue value_return;
@@ -365,7 +365,7 @@ static Widget
 build_dtwmDlg(
         Widget shell )
 {
-    register int     i, n;
+    int     i, n;
     Arg              args[MAX_ARGS];
     XmString         button_string[NUM_LABELS]; 
     XmString         string; 
index 1dbf7a0bd381978910c609a06627dbf51a0b46f0..ff509de62a885b49dbbb2e6e35e4013ba45c36fe 100644 (file)
@@ -164,7 +164,7 @@ CreateFontDlg(
         Widget parent )
 {
 
-    register int     n;
+    int     n;
     int              i;
     Arg              args[MAX_ARGS];
     Widget           appTBox;
index fe3eea933403d821573e1d9a3d8d21b56f0a6212..c57eac3aac1c362f745919dbf8fa1e13f7b3c968 100644 (file)
@@ -54,7 +54,7 @@
 #include "Help.h"
 
 static Widget
-GetHelpDialog( )
+GetHelpDialog(void)
 {
     static HelpStruct       *pHelpCache;
 
index f809915184a5a7d5f8ca2ea5a4d3616c2a1b83db..987ecc577af3a6c6d1cda7288779252e8e0ad83a 100644 (file)
@@ -105,10 +105,10 @@ I18nEnv i18n_env;
  * which does the trick.
  */
 static int
-strcasecmp(register const char *s1,
-          register const char *s2)
+strcasecmp(const char *s1,
+          const char *s2)
 {
-    register int c1, c2;
+    int c1, c2;
 
     while (*s1 && *s2) {
        c1 = isupper(*s1) ? tolower(*s1) : *s1;
@@ -239,7 +239,7 @@ GetUserIMSelectionFile(
 )
 {
     int         ret = NoError;
-    FILE       *fp;
+    FILE       *fp = NULL;
 
     ret = GetUserFileName(env);
     
@@ -253,7 +253,11 @@ GetUserIMSelectionFile(
 
     start_tag_line(env->file_sel->fname);
     ret = ReadImSelectionFile(env->file_sel, fp);
-    
+
+    if(fp) {
+        fclose(fp);
+    }
+
     return ret;
 }
 
@@ -465,7 +469,7 @@ ReadPipe (
        
     nbytes = read (*fd, buf, 512);
 
-    if (nbytes) {
+    if (nbytes > 0) {
        savebuf = XtRealloc(savebuf, savebuf_bytes + nbytes);
        memcpy(savebuf+savebuf_bytes, buf, nbytes);
        savebuf_bytes += nbytes ;
index f88b86e0b2f8c31c26dd2c7c969f035d4f30e90a..b468ee179ff07f836c2bd31a13e89dff99bf0947 100644 (file)
@@ -363,7 +363,7 @@ static Widget
 BuildI18nDlg(
       Widget shell )
 {
-    register int     i, n;
+    int     i, n;
     Arg              args[MAX_ARGS];
     XmString         button_string[NUM_LABELS]; 
     XmString         string; 
index 85c7dc0b82ab6a6f1c196b2b6736b99e5ada5e2e..853f05c333fafef15add5ae4572593593038920e 100644 (file)
@@ -128,7 +128,7 @@ trim_line(
      char *ptr
 )
 {
-    register char      *lastp;
+    char       *lastp;
 
     skip_white(ptr);
     for (lastp = ptr + strlen(ptr) - 1;
index e6a90da8eb231f6da90eefdc74a594dc02b9799a..84c177c033f35412d13f0ea9787f27ad081e5eb0 100644 (file)
@@ -157,7 +157,7 @@ static Widget
 build_keyboardDlg(
         Widget shell )
 {
-    register int     i, n;
+    int     i, n;
     Arg              args[MAX_ARGS];
     Widget           widget_list[12]; 
     int              count = 0;
index 5bc71f37f4bfa654d965ad860b1d796c5530af1b..e6a6e8e4a4cfc448dd2592bfb274f2baa6b70bef 100644 (file)
@@ -570,11 +570,9 @@ malloc_trace(0);
 
     _DtWsmSetBackdropSearchPath(style.screen, dirs, style.useMultiColorIcons);
 
-    if (string != NULL)
-      XtFree((char *)string);
+    XtFree((char *)string);
     
-    if (dirs != NULL)
-      XtFree((char *)dirs); 
+    XtFree((char *)dirs);
     
     
 
@@ -646,9 +644,7 @@ ErrorHandler(
  *
  ************************************************************************/
 static int
-IOErrorHandler (display)
- Display *display;
-
+IOErrorHandler (Display *display)
 {
 #ifdef DEBUG
     Warning ("X IO error occurred during generic operation");
index 4b1b0a61c3cefcc5fe330523a94c1a89fbcd8bc0..24875d93b616eed98df1010c4aac41a51e359cc2 100644 (file)
@@ -270,7 +270,7 @@ popup_mouseBB( Widget shell )
 static Widget 
 build_mouseDialog( Widget shell )
 {
-    register int     i, n;
+    int     i, n;
     Arg              args[MAX_ARGS];
     int              nmap;
     XmString         button_string[NUM_LABELS]; 
@@ -1040,7 +1040,7 @@ dclickTestCB(
         XtPointer call_data )
 {
     Arg  color[3], args[10];       /*  arg list            */
-    register int    n;             /*  arg count           */
+    int    n;             /*  arg count           */
     XmPushButtonCallbackStruct *cb = (XmPushButtonCallbackStruct *)call_data;
     static int selectstate = False;
 
@@ -1105,7 +1105,7 @@ warnToggleCB(
         XtPointer call_data )
 {
   
-  register int     n;
+  int     n;
   Arg              args[10];
   XmString         string;
   Boolean          set;
@@ -1161,7 +1161,7 @@ midwarnToggleCB(
         XtPointer call_data )
 {
   
-  register int     n;
+  int     n;
   Arg              args[10];
   XmString         warnstring;
   Boolean          set;
@@ -1225,7 +1225,7 @@ cancelWarnCB(
         XtPointer call_data )
 {
 
-  register int     n;
+  int     n;
   Arg              args[10];
   XmString         string;
   
@@ -1254,7 +1254,7 @@ midcancelWarnCB(
         XtPointer call_data )
 {
 
-  register int     n;
+  int     n;
   Arg              args[10];
   XmString         string;
   
@@ -1281,7 +1281,7 @@ reverseToggleCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-  register int     n;
+  int     n;
   int              i, j;
   Arg              args[MAX_ARGS];
   Boolean          set;
@@ -1365,7 +1365,7 @@ midreverseToggleCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-    register int     n;
+    int     n;
     int              i, j;
     Arg              args[MAX_ARGS];
     Boolean          set;
index 5a7a8a3fc42746682202f841e4ed9bf10938d6e2..3c2c937eedd881c36e84dd173082e8a4f0cd407e 100644 (file)
@@ -272,7 +272,7 @@ build_saverList(char * str,
    char tokenSep[] = " ";
    char * token;
    char ** saverList = NULL;
-   register int i = 0;
+   int i = 0;
    char * tmpStr, *tmpStr2;
    int len = strlen(str);
    
@@ -335,7 +335,7 @@ build_selsaverList(char * envStr,
    char tokenSep[] = " ";
    char * token;
    char ** saverList = NULL;
-   register int i = 0;
+   int i = 0;
    char * tmpStr;
    int len = strlen(envStr);
    *count = 0;
@@ -416,7 +416,7 @@ build_selectedList(char ** saverList,
 {
 
    char * selectedList = NULL;
-   register int i = 0;
+   int i = 0;
    char * tmpStr;
    int len = 0;
    int tmplen = 0;
@@ -450,7 +450,7 @@ free_saverList(char ** saverList,
                    int count)
 
 {
-  register int   i;
+  int   i;
 
   if (saverList == NULL)
     return;
@@ -489,7 +489,7 @@ static Widget
 build_screenDialog(
         Widget shell )
 {
-    register int     i, m, n;
+    int     i, m, n;
     Arg              args[MAX_ARGS];
     Widget           form;
     Boolean          sel_matched = False;
@@ -1059,7 +1059,7 @@ formLayoutCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-    register int     n;
+    int     n;
     Arg              args[MAX_ARGS];
     Dimension        ScaleHeight;
     Dimension        LabelHeight;
@@ -1329,7 +1329,7 @@ no_svr_ext_formLayoutCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-  register int     n;
+  int     n;
   Arg              args[MAX_ARGS];
   Dimension        ScaleHeight;
   Dimension        LabelHeight;
@@ -1543,7 +1543,7 @@ _DtmapCB_screenDialog(
         XtPointer call_data )
 {
   static int    first_time = 1;
-  register int  n;
+  int  n;
   Arg           args[MAX_ARGS];
   XmString      string;
   Boolean       lock_on, saver_on;  
@@ -1800,7 +1800,7 @@ no_svr_ext_DtmapCB_screenDialog(
         XtPointer call_data )
 {
   static int    first_time = 1;
-  register int  n;
+  int  n;
   Arg           args[MAX_ARGS];
   XmString      string;
   int           mintime;
@@ -1941,7 +1941,7 @@ timeOutvalueChangedCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-    register int     n;
+    int     n;
     Arg              args[MAX_ARGS];
 
     n=0;
@@ -1979,7 +1979,7 @@ no_svr_ext_timeOutvalueChangedCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-    register int     n;
+    int     n;
     Arg              args[MAX_ARGS];
 
     n=0;
@@ -2004,7 +2004,7 @@ saverToggleCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-  register int     n;
+  int     n;
   Arg              args[MAX_ARGS];
   Boolean          set;
   XmString string;
@@ -2118,7 +2118,7 @@ no_svr_ext_saverToggleCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-    register int     n;
+    int     n;
     Arg              args[MAX_ARGS];
     Boolean          set;
     XmString string;
@@ -2173,7 +2173,7 @@ lockToggleCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-    register int     n;
+    int     n;
     Arg              args[MAX_ARGS];
     Boolean          set;
     XmToggleButtonCallbackStruct *cb = (XmToggleButtonCallbackStruct *)call_data;
@@ -2239,7 +2239,7 @@ saversToggleCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-  register int     n;
+  int     n;
   Arg              args[MAX_ARGS];
   Boolean          set;
   XmString string;
@@ -2321,7 +2321,7 @@ systemDefaultCB(
                XtPointer client_data,
                XtPointer call_data )
 {
-  register int  n;
+  int  n;
   Arg           args[MAX_ARGS];
   
   screen.saverTimeout = SAVER_DEFAULT;
@@ -2357,7 +2357,7 @@ no_svr_ext_systemDefaultCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-  register int  n;
+  int  n;
   Arg           args[MAX_ARGS];
 
   screen.saverTimeout = SAVER_DEFAULT;
@@ -2391,7 +2391,7 @@ ButtonCB(
         XtPointer client_data,
         XtPointer call_data )
 {
-  register int        i, n, m;
+  int        i, n, m;
   Arg                 args[MAX_ARGS];
   Boolean             sel_matched = False;
   Boolean             lockset;
@@ -2608,7 +2608,7 @@ no_svr_ext_ButtonCB(
                     XtPointer client_data,
                     XtPointer call_data )
 {
-  register int        i, n, m;
+  int        i, n, m;
   Arg                 args[MAX_ARGS];
   Boolean             sel_matched = False;
   Boolean             saverset;
@@ -2927,7 +2927,7 @@ saveScreen(
 static XmString * 
 MakeListStrings( char ** list )
 {
-    register int   i;
+    int   i;
     XmString      *xmList;
     
     xmList = (XmString *) XtMalloc(savers.saverCount * sizeof(XmString));
@@ -2973,7 +2973,7 @@ ListCB(
         XtPointer call_data )
 {
   XmListCallbackStruct  *cb = (XmListCallbackStruct *)call_data;
-  register int           i;
+  int           i;
   Boolean                runsaver = False;
   XmString               string;
 
index bc754c0551cb1a0c5b50a22fcc8d80b1925b99d2..ce99c831a42d3806df50e6cd9bba0c9fb030a8b4 100644 (file)
@@ -195,7 +195,7 @@ static Widget
 BuildStartup(
         Widget shell )
 {
-  register int     n;
+  int     n;
   Arg              args[MAX_ARGS];
   XmString         button_string[NUM_LABELS]; 
   XmString         string;
index dbea7caf7b6ad6ff3ebb0c558221d0aa2220ca94..282efb3d850a88187cf508c41d57bae37e05b15b 100644 (file)
@@ -667,7 +667,7 @@ AddMenubarToggle
 static void
 CloneCallback(Widget wid, XtPointer client_data, XtPointer call_data)
 {
-    register DtTermViewWidget w = (DtTermViewWidget) wid;
+    DtTermViewWidget w = (DtTermViewWidget) wid;
     DtTermViewCallbackStruct *termCB = (DtTermViewCallbackStruct *) call_data;
 
     Widget parent = XtParent((Widget) w);
@@ -837,7 +837,7 @@ CreateInstance
 }
 
 void
-AtExitProc()
+AtExitProc(void)
 {
     static int i = 0;
 
@@ -998,7 +998,7 @@ FixOSFBindings
     }
 
     if (!origDisplayBindings) {
-        if (ignoredKeysymList) XtFree((char *)ignoredKeysymList);
+        XtFree((char *)ignoredKeysymList);
        return;
     }
 
@@ -1104,7 +1104,7 @@ base_name(
      char *name
 )
 {
-       register char *cp;
+       char *cp;
 
        cp = strrchr(name, '/');
        return(cp ? cp + 1 : name);
index 74f9090bad620c416d293fea01c797c9363f4367..3a134ac90c5bc649450968b2696b53e0a914e708 100644 (file)
@@ -90,11 +90,11 @@ static char *message_defaults[] = {
 "End-Of-List",
 };
 
-static void GetUsage()
+static void GetUsage(void)
 {
-    register struct _options *optPtr;
-    register int i;
-    register char *c;
+    struct _options *optPtr;
+    int i;
+    char *c;
     char *c2;
     int num_messages;
     optHead = (struct _options *) 0;
@@ -224,7 +224,7 @@ static void GetUsage()
 
 void Syntax(char *programName, char *badOption)
 {
-    register struct _options    *optPtr;
+    struct _options    *optPtr;
     int                          col;
     int                          cols;
     char                        *c;
@@ -284,7 +284,7 @@ void Syntax(char *programName, char *badOption)
 
 void Help(char *programName)
 {
-    register struct _options     *optPtr;
+    struct _options     *optPtr;
     int                           width = 0;
 
     /* 
index 926dc2d689227b0e4ce6c71c0dc494c80df233f8..6c89cc47431fccad7678684dd98510b4ad0d0133 100644 (file)
@@ -87,7 +87,7 @@ static void TimeOut(XtPointer clientData, XtIntervalId *id);
 #endif  /* TIMEOUT */
 
 Boolean
-FinalizeToolTalkSession( )
+FinalizeToolTalkSession(void)
 {
     Tt_status  ttRc;
     int        i;
index 3060f7b27d5a7baabd51dd999730f09ad4f9385a..170fc2c60ca714bc08569d8809412cc74eb4b895 100644 (file)
@@ -7,13 +7,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index fb9b95f2dedac2666ae00cc7ce30c79d47bf70eb..0cbf6644b32da8c511926d7c6e53fd497fe09416 100644 (file)
@@ -7,13 +7,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index f83df2381ed78d8a92f85badc8dfffdfdfba432d..e2eb0ddfc686e356b0f69d640c4f358703491b6d 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
@@ -36,9 +29,3 @@ saber_src: $(SRCS)
 
 unsaber_src:
         XCOMM unload $(SRCS)
-
-
-
-
-
-
index c048d876c1af8059eeebf7174e17974ba3a51c85..dbb3989aadfad627fe4e158b977349ed1fef1649 100644 (file)
@@ -7,13 +7,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index f139bf71bc48c5bf66a0525b66293498e634a08e..d230775eff071e0bcde99fbc28f005343411a119 100644 (file)
@@ -7,13 +7,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 3b54036feb8daadc3a4a9358ef1b7764ab834be2..819100d265051f56740db673e94567845a0be98c 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index c959ef9f02672408fb13b7d990c5d49ef2cc1ef3..362c208e931646b6a224f152c0d762820fc39a21 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 7169b0343178d9dde5d3d729919e27ee144dd737..7972defa2ad2b0bafd5d0f6f4daca50b3e5b3d2d 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 3e081790af6d4d1a78d4e77831b56901e25fdda4..ef3a1acfd889bad8dd4db4e603fb255cc142d5cf 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index b270b10952df44aae9dfb2a3f2f21ecae45708a4..442b32cb9884e2e6af8d92e63614d2e37a95e6db 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index c418159c89493057cded9c488cdd343ba6be0348..52560568b4a077d0708953dd8c021ae4e9b96dc1 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index fcb1035816215e2c5901fbc4960218a69bd44444..5b827646ba35a02a3204ffc1c68e259f64352658 100644 (file)
@@ -7,13 +7,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 33f41ce19103bdbf2e4e4427d64b1449628c122a..3061ecf67baf4878ca9132df5abc8669cb6daf08 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index f7a559357109d0ab491db17f6c18cd3b2bb4319c..7ef30f4b2b30b4577a2f031ccb96f0ead8d7ae4c 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 8531ed58ac8a629e93d5329fc4d5a1546d906b9e..9a8d2ca7332571846676f3c1704b1b3416818138 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 3244a35b333911898c3b1175162a76a492750032..bce12161cbe9b7ac4148b6e8342254a9633f8149 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 3c807fbf9cfab33fbf170c5b2f771c8f63cadfe9..9e3ce0207fdee909865f8d2f68d70b145a871188 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index a21a88cc70273b27a9060f925cb854063af800ac..2b49185ebb34e44033f147008d37f3c282b601de 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 28cb4354b27766d5a09b34d40190928a2ab74ba2..148813469faa73b7272f32af9f05fa4967a638ed 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index d449ad5ceef027463738e1076f08de8376badbe2..bdb71129670255359d168c18ac3f42698de72865 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 18fcf50f82bd966f244ee575ebaf073194ee462f..aba60711ee9f521df569d6466cdcc89ad112fd10 100644 (file)
@@ -7,13 +7,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 902b6064edfeedf8bf0769db6e5f11b331f6dd9e..38921d759a7c78e312ff3c656b53e3c37d0caf39 100644 (file)
@@ -7,13 +7,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB 
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 13d1f46f34fd8857333a36e54908cbe0807ecc59..35a45b854810600625b6eb1b307bff817da370f2 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index a106213ce35c20245b4d39eeb6d88cbce712a612..55f6dab147e1b2eeb3921232525abab5ef2b6afa 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index dd57e8294188312a50dd6020811166f050b35c7b..527b152730c3380a40d6a4d54368986fb5fb79d4 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index d62d8076adc522ccd6b2a9ad4e44af2b43ab91a0..130db85a7b40535af92ef4346a9058dcf357ca10 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index ca4dceac75505de1214491dc4cc4493ade138ac5..9ce86077098aeccdc03ec55fdbf2255ab3b9f4df 100644 (file)
@@ -8,13 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 9c432886b79e69ade7d6571a504f27e83cb3df67..8b25bbf896b1b5f220d364f32df1252caa59cf42 100644 (file)
@@ -8,19 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-XCOMMifdef HPArchitecture
-EXTRA_DEFINES = -DLOG -DSYNLIB
-#endif
-#if defined(HPOSFArchitecture)
-#endif
-
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 #endif
index cf05711943dcd14240fba8f7313b81d28bcbc1d6..5a4eb7fea1c216a206f8c0de47f988dabb5cb1fe 100644 (file)
@@ -184,7 +184,7 @@ typedef char *Anyptr;
 # define Inline
 #endif
 
-#define Register    register  /* Register variables */
+#define Register    /* Register variables (nope) */
 #define Char        char      /* Characters (not bytes) */
 
 #ifndef Static
index 689b7762b6d4a63574eb0747acf9c911421611ae..2cc676199f57a3b1c69ac2cd90f0a5cdaa118224 100644 (file)
@@ -8,19 +8,6 @@ SYS_LIBRARIES = -lm
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#ifdef HPArchitecture
-EXTRA_DEFINES = -DLOG -DSYNLIB
-#endif
-#if defined(HPOSFArchitecture)
-#endif
-
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
index 6932b5eff8c87e25a3527a5eb7ddee7cea404384..601ff98e731fe4f53344186487be2584331c648c 100644 (file)
@@ -7,19 +7,6 @@ LOCAL_INCLUDES  = -I../shared -I$(TOP)/lib/
 
 EXTRA_DEFINES = -DLOG -DSYNLIB
 
-#ifdef HPArchitecture
-EXTRA_DEFINES = -DLOG -DSYNLIB
-#endif
-#if defined(HPOSFArchitecture)
-#endif
-
-#if defined(ApolloArchitecture)
-EXTRA_DEFINES = -Dapollo -D_CMDINV
-#if defined(SHLIB)
-   LOCAL_LIBRARIES = -A inlib,$(XLIB)
-#endif
-#endif
-
 #if defined(SunArchitecture)
 SYS_LIBRARIES = -lm -ldl -lgen -lC
 SYNLIB=$(TOP)/lib/synlib/libsynlibTst.a
diff --git a/cde/programs/dtudcexch/Imakefile b/cde/programs/dtudcexch/Imakefile
deleted file mode 100644 (file)
index 0443cf6..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/12 1996/10/17 01:48:11 cde-fuj $
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-FONTEDT_PATH1     =  ../dtudcfonted
-UDC_INC_PATH0     =  -I./
-UDC_INC_PATH1     =  -I$(FONTEDT_PATH1)
-UDC_INC_PATH2     =  -I$(FONTEDT_PATH1)/include
-UDC_INC_PATH3     =  -I$(FONTEDT_PATH1)/libfal
-UDC_INC_PATH4     =  -I$(FONTEDT_PATH1)/libfal/include
-UDC_INC_PATH7     =  -I$(FONTEDT_PATH1)/dtgpftobdf
-
-     INCLUDES     = \
-                       $(UDC_INC_PATH0)\
-                       $(UDC_INC_PATH1)\
-                       $(UDC_INC_PATH2)\
-                       $(UDC_INC_PATH3)\
-                       $(UDC_INC_PATH4)\
-                       $(UDC_INC_PATH7)
-
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-
-DEFINES = $(OPT2)
-
-DEPLIBS = $(DEPDTSVCLIB) $(DEPTTLIB) $(DEPXMLIB) $(DEPXTOOLLIB) \
-       $(DEPXLIB) \
-       $(FONTEDT_PATH1)/libfuty/liboakfuty.a \
-       $(FONTEDT_PATH1)/libfal/libfal.a 
-
-LOCAL_LIBRARIES   = $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) \
-               $(FONTEDT_PATH1)/libfuty/liboakfuty.a \
-               $(FONTEDT_PATH1)/libfal/libfal.a
-
-SYS_LIBRARIES = DtClientSysLibs
-
-         SRCS     = udcexc.c udcexp.c udcimp.c getbdffn.c excutil.c\
-                   selectx.c exportbdf.c importbdf.c
-
-         OBJS     = udcexc.o udcexp.o udcimp.o getbdffn.o excutil.o\
-                   selectx.o exportbdf.o importbdf.o
-
-ComplexProgramTarget(dtudcexch)
diff --git a/cde/programs/dtudcexch/README b/cde/programs/dtudcexch/README
deleted file mode 100644 (file)
index efd081e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-$XConsortium: README /main/3 1996/10/17 01:48:23 cde-fuj $
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-UDC data exchange utility README
-
-Source code and directory structure
-$(TOP)/cde/dtudcexch:
-  Imakefile
-  udcexc.c
-  udcexp.c
-  udcimp.c
-  getbdffn.c
-  excutil.c
-  excutil.h  
-  selectx.c
-  exportbdf.c
-  importbdf.c
-
-The dtudcexch command uses following commands.
-  dtaddcpf        dtbdftocpf      dtcpftobdf      dtcpftogpf
-  dtcpgpf         dtfonteditor    dtgpftobdf      dtgpftocpf
-  dtlsgpf
-
-The dtudcexch command uses following libraries.
-  libfal.a
-  liboakfuty.a
diff --git a/cde/programs/dtudcexch/dtudcexch.msg b/cde/programs/dtudcexch/dtudcexch.msg
deleted file mode 100644 (file)
index fabd167..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-$ $XConsortium: dtudcfonted.msg
-$ *************************************<+>*************************************
-$ *****************************************************************************
-$ **
-$ **  File:        dtudcexch.msg
-$ **
-$ **  Project:     Fujitsu DT UDC Exchange
-$ **
-$ **  Description:
-$ **  -----------
-$ **  This file is the source for the message catalog for dtudcexch
-$ **
-$ **
-$ *****************************************************************************
-$ **
-$ **     (c) Copyright 1996 Fujitsu Ltd.
-$ **
-
-$set 2
-$ *****************************************************************************
-$ ** _DtMessage set for getbdffn.c
-$ *****************************************************************************
-
-2 BDF file selection
-4 The selected file exists. Overwrite?
-6 Failed to open the selected file.
-
-$set 4
-$ *****************************************************************************
-$ ** _DtMessage set for selectx.c
-$ *****************************************************************************
-
-2 This font has no user defined characters.
-4 Failed to open the selected font. You do not have permission to access the font file, or the format of the file is incorrect.
-6 The font file is in use by another UDC application.
-8 There is no font
-10 Open
-12 Cancel
-14 UDC data exchange utility
-16 SelectItems
-18 - Codeset:
-20 -   Style:
-22 -   Width:
-24 -  Height:
-
-$set 6
-$ *****************************************************************************
-$ ** _DtMessage set for selectxlfd.c
-$ *****************************************************************************
-
-2 Do you want to terminate UDC Exchange?
-4 No UDCs exist in this font
-6 XLFD name is not selected
-8 Cannot open the font file
-10 The font file is in use by another UDC application.
-
-$set 8
-$ *****************************************************************************
-$ ** _DtMessage set for udcexc.c
-$ *****************************************************************************
-
-2 UDC data exchange utility
-4 Fatal error occurred.
-6 Cannot open the font file.
-8 Cannot read the font file.
-10 There is no more memory.
-12 Fatal error occurred.
-14 The specified font file does not exist.
-16 This font is not a pcf or snf font.
-18 Cannot open the fonts.list file.
-20 The format of the fonts.list file is incorrect.
-22 The descriptions of the fonts.list file are incorrect.
-24 The format of the fonts.list file is incorrect.
-26 Cannot open the fonts.dir file.
-28 Cannot read the fonts.dir file.
-30 Cannot read the font properties.
-32 Cannot get the FONT property.
-34 Cannot get the FAMILY_NAME property.
-36 This font file is already in use by another application.
-38 Cannot lock the font file.
-40 Cannot unlock the font file.
-42 Cannot get lock information from the font file.
-44 Cannot find the specified font file.
-46 Cannot read the NLS database.
-48 Cannot get charset names from the NLS database.
-50 The charset name is not defined in the NLS database.
-52 The specified font has not been opened.
-54 A fatal error occurred.
-56 XLFD name          :
-58 Original font (XLFD name)  :
-60 UDC code area      :
-62 Style              :
-64 Size (letter size) :
-66 Open
-68 Cancel
-70 OK
-72 cancel
-74 Copy origin code(hex)  :
-76 Copy target code(hex) :
-78 Copy
-80 Overlay
-82 export function
-84 import function
-86 Cancel
-
-$set 10
-$ *****************************************************************************
-$ ** _DtMessage set for udcexp.c
-$ *****************************************************************************
-
-2 Failed to create the BDF file
-4 No indexes are selected
-6 OK
-8 Cancel
-10 glyph indexes
-
-$set 12
-$ *****************************************************************************
-$ ** _DtMessage set for udcexp.c
-$ *****************************************************************************
-
-2 Glyph images in this BDF file cannot be added to the font.
-4 Failed to open the selected BDF font. You do not have permission to access the font file, or the format of the file is incorrect.
-6 One or more glyph images will be overwritten. Overwrite?
-8 Failed to open the selected font. You do not have permission to access the font file, or the format of the file is incorrect.
-10 Glyph images in this BDF file cannot be added to the font.
-12 Registration of the font file failed.
diff --git a/cde/programs/dtudcexch/excutil.c b/cde/programs/dtudcexch/excutil.c
deleted file mode 100644 (file)
index e17b1cc..0000000
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: excutil.c /main/3 1996/04/08 15:51:03 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#include "excutil.h"
-
-extern char *maintitle;
-
-Widget excCreatePushButton(Widget parent, String name, String label,
-                          XtCallbackProc callback_func,
-                          XtPointer client_data)
-{
-    Widget     widget;
-    XmString   xms;
-    Arg                args[20];
-    Cardinal   n;
-
-    n = 0;
-    xms = XmStringCreateLocalized(label);
-    XtSetArg(args[n], XmNlabelString, xms); n++;
-    widget = XmCreatePushButton(parent, name, args, n);
-    XmStringFree(xms);
-    XtAddCallback(widget, XmNactivateCallback,
-                 (XtCallbackProc) callback_func,
-                 (XtPointer) client_data);
-    XtManageChild(widget);
-
-    return (widget);
-}    
-
-void excerror(Exc_data * ed, int excerrno, char * funcname, char * func)
-{
-    switch (excerrno)
-    {
-    case EXCERRMALLOC:
-       fprintf(stderr, "dtudcexch:memory allocation error\n");
-       freeExcdata(ed);
-       exit (-1);
-    case EXCERRNOUDC:
-       fprintf(stderr, "dtudcexch:UDC is not defined in current locale\n");
-       freeExcdata(ed);
-       exit (-1);
-    }
-}
-
-void dialogokCB(Widget widget, int * ans, XtPointer call_data)
-{
-    /* ok button pushed */
-    *ans = 1;
-}
-
-void dialogcancelCB(Widget widget, int * ans, XtPointer call_data)
-{
-    /* cancel button pushed */
-    *ans = 2;
-}
-
-void AskUser(Widget parent, Exc_data * ed, char *msg, int *r, char * type)
-/* If ok button pushed, *r = 1. */
-/* If cancel button pushed(if exists), *r = 2. */
-{
-    XmString                           message;
-    Widget                             dialog;
-    int                                        ans = 0;
-    Cardinal                           n;
-    Arg                                        args[20];
-
-    n = 0;
-    message = XmStringCreateLocalized(msg);
-    XtSetArg(args[n], XmNmessageString, message); n++;
-    XtSetArg(args[n], XmNtitle, maintitle); n++;
-    XtSetArg(args[n], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); n++;
-    if (strcmp(type, "warning") == 0) {
-       dialog = XmCreateWarningDialog(parent, type, args, n);
-    } else if (strcmp(type, "error") == 0) {
-       dialog = XmCreateErrorDialog(parent, type, args, n);
-       XtUnmanageChild(XmMessageBoxGetChild(dialog, XmDIALOG_CANCEL_BUTTON));
-    } else if (strcmp(type, "information") == 0) {
-       dialog = XmCreateInformationDialog(parent, type, args, n);
-       XtUnmanageChild(XmMessageBoxGetChild(dialog, XmDIALOG_CANCEL_BUTTON));
-    } else if (strcmp(type, "question") == 0) {
-       dialog = XmCreateQuestionDialog(parent, type, args, n);
-    } else {
-       fprintf(stderr, "error in AskUser\n");
-    }
-    XtUnmanageChild(XmMessageBoxGetChild(dialog, XmDIALOG_HELP_BUTTON));
-    XmStringFree(message);
-    XtAddCallback(dialog, XmNokCallback, (XtCallbackProc) dialogokCB,
-                 (XtPointer) &ans);
-    XtAddCallback(dialog, XmNcancelCallback, (XtCallbackProc) dialogcancelCB,
-                 (XtPointer) &ans);
-    XtManageChild(dialog);
-    while (ans == 0) {
-       XtAppProcessEvent(ed->app, XtIMAll);
-       XSync(XtDisplay(dialog), 0);
-    }
-    *r = ans;
-    XSync(XtDisplay(dialog), 0);
-    XmUpdateDisplay(dialog);
-}
-
-int beki(int n, int num)
-{
-    int a,i;
-
-    a = 1;
-    for (i=0; i<num; i++)
-       a = a * n;
-
-    return a;
-}
-
-int c2h(char * num)
-{
-    int                i,n;
-    char       *c;
-
-    if ((strlen(num)==6)&&(strncmp(num,"0x",2)==0))
-    {
-       c = num;
-       c=c+2;
-       n=0;
-       for (i=3;i>=0;i--)
-       {
-           if (('0'<= *c)&&(*c <= '9'))
-               n = n + ((*c - '0')*beki(16,i));
-           else if (('a' <= *c)&&(*c <= 'f'))
-               n = n + ((*c - 'a'+10)*beki(16,i));
-           else
-               Ecs("error in c2h.here");
-           c++;
-       }
-    } else
-       Ecs("error in c2h");
-
-    return n;
-}
-char * renge2num(char * renge)
-{
-    char * num;
-
-    num = (char *) calloc(7, sizeof(char));
-
-    strncpy(num,renge,6);
-
-    return num;
-}
-
-void Ecs(char * string)
-{
-    fprintf(stderr,"%s\n",string);
-}
-void Ecd(int data)
-{
-    fprintf(stderr,"%d\n",data);
-}
-
-void freecsrec(UDCcsREC *rec)
-{
-    if (rec->charset != NULL)
-       free(rec->charset);
-    if (rec->udcrenge != NULL)
-       free(rec->udcrenge);
-}
-
-void freecslist(int n, UDCcsREC *rec)
-{
-    int                i;
-    UDCcsREC   *recp;
-
-    recp = rec;
-    for (i = 0; i < n; i++)
-    {
-       if (recp != NULL)
-       {
-           freecsrec(recp);
-           recp++;
-       } else {
-           break;
-       }
-    }
-}
-
-void freeExcdata(Exc_data *ed)
-{
-    if (ed == NULL)
-       return;
-
-/* Don't free ed->toplevel */
-
-    if (ed->locale != NULL)
-       free(ed->locale);
-
-    if (ed->cslist != NULL)
-       free(ed->cslist);
-
-    if (ed->xlfdname != NULL)
-       free(ed->xlfdname);
-
-    if (ed->style != NULL)
-       free(ed->style);
-
-    if (ed->size != NULL)
-       free(ed->size);
-
-/* Don't free ed->fontfile */
-
-    if (ed->bdffile != NULL)
-       XtFree(ed->bdffile);
-
-    if (ed->udcrenge != NULL)
-       free(ed->udcrenge);
-
-    if (ed->gpf_code_list != NULL)
-       free(ed->gpf_code_list);
-
-    if (ed->bdf_code_list != NULL)
-       free(ed->bdf_code_list);
-
-    if (ed->comment_list != NULL)
-       free(ed->comment_list);
-
-    free(ed);
-}
-
-void Ecss(char * s1, char * s2)
-{
-    fprintf(stderr,"%s is %s\n", s1, s2);
-}
-void Ecsd(char * s1, int i)
-{
-    fprintf(stderr,"%s = %d\n", s1, i);
-}
-
-void checkdata(Exc_data *ed)
-{
-    if (ed == NULL)
-       return;
-
-/* Don't free ed->toplevel */
-
-    if (ed->locale != NULL)
-       Ecss("ed->locale", ed->locale);
-
-    Ecsd("ed->csnum", ed->csnum);
-
-    if (ed->xlfdname != NULL)
-       Ecss("ed->xlfdname",ed->xlfdname);
-
-    if (ed->fontfile != NULL)
-       Ecss("ed->fontfile",ed->fontfile);
-
-    if (ed->bdffile != NULL)
-       Ecss("ed->bdffile",ed->bdffile);
-
-    if (ed->udcrenge != NULL)
-       Ecss("ed->udcrenge",ed->udcrenge);
-
-    Ecsd("ed->code_num", ed->code_num);
-}
-
-void excterminate(Exc_data * ed)
-{
-    freeExcdata(ed);
-    exit(0);
-}
-
-void excexit(Exc_data * ed)
-{
-    excterminate(ed);
-}
-
-void freeld(ListData *ld)
-{
-    int                i;
-    char       **cp;
-
-    if (ld != NULL) {
-       if (ld->allcode != NULL)
-           free(ld->allcode);
-       if (ld->existcode != NULL)
-           free(ld->existcode);
-       if (ld->existcode_c != NULL) {
-           cp = ld->existcode_c;
-           for (i = 0; i < ld->existcode_num; i++) {
-               if (*cp != NULL)
-                   free(*cp);
-               cp++;
-           }
-           free(ld->existcode_c);
-       }
-       free(ld);
-    }
-}
-
-int bigger(int num1, int num2)
-{
-    if (num1 >= num2)
-       return (num1);
-    else
-       return (num2);
-}
-
-int smaller(int num1, int num2)
-{
-    if (num1 < num2)
-       return (num1);
-    else
-       return (num2);
-}
diff --git a/cde/programs/dtudcexch/excutil.h b/cde/programs/dtudcexch/excutil.h
deleted file mode 100644 (file)
index cd6955a..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: excutil.h /main/6 1996/12/23 08:48:26 barstow $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <Xm/Xm.h>
-#include <Xm/MessageB.h>
-#include <Xm/PushB.h>
-#define        EXPORT  1
-#define        IMPORT  2
-#define EXCERRMALLOC   101
-#define EXCERRNOUDC    102
-
-void   Ecs();
-void   Ecd();
-/*void getpcffn();*/
-void   getbdffn();
-void   selcharcd();
-void   getcharcd();
-void   createbdf();
-int    bigger();
-int    smaller();
-int    c2h();
-char   *renge2num();
-void   freeExcdata();
-void   checkdata();
-void   excexit();
-void   excterminate();
-void   freeld();
-void   getexistcode();
-void   AskUser();
-void   excerror();
-Widget excCreatePushButton();
-
-typedef struct {
-    char * charset;
-    char * udcrenge;
-} UDCcsREC;
-
-typedef struct {
-    int                function;
-    XtAppContext       app;
-    Widget     toplevel;
-    char       *locale;
-    int                csnum;
-    UDCcsREC   *cslist;
-    char       *xlfdname;
-    char       *style;
-    char       *size;
-    char       *fontfile;
-    char       *bdffile;
-    char       bdfmode[2];
-    char       *udcrenge;
-    int                code_num;
-    int                *gpf_code_list;
-    int                *bdf_code_list;
-    int                comment_num;
-    char       **comment_list;
-} Exc_data;
-
-typedef struct {
-    Widget     list;
-    int                allcode_num;
-    int                *allcode;
-    int                existcode_num;
-    int                *existcode;
-    char       **existcode_c;
-    Exc_data   *ed;
-} ListData;
-
-#ifndef NO_MESSAGE_CATALOG
-# ifdef __ultrix
-#  define _CLIENT_CAT_NAME "dtudcexch.cat"
-# else  /* __ultrix */
-#  define _CLIENT_CAT_NAME "dtudcexch"
-# endif /* __ultrix */
-# ifdef _NO_PROTO
-extern char *_DtGetMessage();
-# else  /* _NO_PROTO */
-extern char *_DtGetMessage(
-                        char *filename,
-                        int set,
-                        int n,
-                        char *s );
-# endif /* _NO_PROTO */
-#define GETMESSAGE(set, number, string) GetMessage(set, number, string)
-static char *
-GetMessage(set, number, string)
-int set, number;
-char *string;
-{
-    char *tmp;
-    static char * point[100];
-    static int first = True;
-
-    if (first) {
-       memset(point, 0, sizeof(char *) * 100);
-       first = False;
-    }
-    if (point[number])
-       return(point[number]);
-    tmp = _DtGetMessage(_CLIENT_CAT_NAME, set, number, string);
-    point[number] = (char *) malloc(strlen(tmp) + 1);
-    strcpy(point[number], tmp);
-    return (point[number]);
-} 
-#else /* NO_MESSAGE_CATALOG */
-# define GETMESSAGE(set, number, string)\
-    string
-#endif /* NO_MESSAGE_CATALOG */
diff --git a/cde/programs/dtudcexch/exportbdf.c b/cde/programs/dtudcexch/exportbdf.c
deleted file mode 100644 (file)
index fbe2f52..0000000
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: exportbdf.c /main/4 1996/04/10 13:49:20 ageorge $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- *
- *  Authors: Seiya Miyazaki     FUJITSU LIMITED
- *           Hiroyuki Chiba     FUJITSU LIMITED
- */
-#include <stdio.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <stdlib.h>
-#ifndef SVR4
-#if !defined( SYSV )
-#include <sys/resource.h>
-#endif
-#include <sys/wait.h>
-#else
-#include <wait.h>
-#endif
-#include <memory.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <errno.h>
-
-#include "bdfgpf.h"
-
-static int     writeBdfHeader();
-static int     readBdfToMemory();
-static void    sigint_out();
-static char    buf[BUFSIZE];
-static struct  ptobhead        w_bdf ;
-
-static void
-sigint_out()
-{
-    fclose(w_bdf.output) ;
-    fclose(w_bdf.input) ;      /* stream */
-    exit( 0 );
-}
-
-int
-expCheckCode( code, code_num, code_list )
-unsigned int   code ;
-int    code_num ;
-int    *code_list ;
-{
-       int     i ;
-
-       if( code < MIN_CODE || code > MAX_CODE )  return -1 ;
-       for( i=0; i<code_num; i++ ){
-           if( code == code_list[i] )  return 0 ;
-       }
-       return -1 ;
-}
-
-int
-ExpGpftoBDF( gpf_name, bdf_name, code_num, code_list, comment_num, comment_list, make_all )
-char    *gpf_name ;     /* pointer to GPF file name area       */
-char    *bdf_name ;     /* pointer to BDF file name area       */
-int     code_num ;      /* number of GPF code                  */
-int     *code_list ;    /* pointer to GPF code lists           */
-int     comment_num ;   /* number comments                     */
-char    **comment_list ;/* pointer to the list of comments     */
-int    make_all ;      /* convert whole GPF fomat file to BDF  */
-{
-       struct  stat    statbuf ;
-       struct  btophead        r_gpf ;
-       int                     rtn, i, num_chars ;
-
-       /*
-        * parameter check
-        */
-       if( gpf_name == NULL || bdf_name == NULL ){
-           fprintf(stderr, "GPF or BDF file name is not specified.\n" ) ;
-           return -1 ;
-       }
-       /*
-        * initiation
-        */
-       memset( &w_bdf, 0, sizeof(struct ptobhead) ) ;
-       memset( &r_gpf, 0, sizeof(struct btophead) ) ;
-
-       if ( stat( SNFTOBDF, &statbuf ) ) {
-           if (!( oakgtobdf = get_cmd_path( getenv( "PATH" ), SNFTOBDF_CMD ))) {
-               fprintf( stderr, "There is not %s command.\n", SNFTOBDF_CMD ) ;
-               return -1 ;
-           }
-       }else{
-           oakgtobdf = SNFTOBDF;
-       }
-
-       /*
-        * export glyphs in BDF format
-        */
-       w_bdf.snf_file = gpf_name ;
-       if( (w_bdf.output = fopen( bdf_name, "w" )) == NULL ){
-           fprintf(stderr, "\"%s\" cannot open.\n", bdf_name ) ;
-           return -1 ;
-       }
-       
-       signal( SIGHUP , (void(*)())sigint_out );
-       signal( SIGINT , (void(*)())sigint_out );
-       signal( SIGQUIT, (void(*)())sigint_out );
-       signal( SIGTERM, (void(*)())sigint_out );
-
-       if( (rtn = writeBdfHeader(&w_bdf, comment_num, comment_list)) ){
-           fprintf(stderr, "\"%s\" cannot write header.\n", bdf_name ) ;
-           fclose(w_bdf.output) ;
-           fclose(w_bdf.input) ;       /* stream */
-           return rtn ;
-       }
-       
-       r_gpf.bdf_width         = w_bdf.bdf_width ;
-       r_gpf.bdf_height        = w_bdf.bdf_height ;
-       r_gpf.input             = w_bdf.input ;
-
-       num_chars = ((make_all) ? w_bdf.num_chars : code_num) ;
-
-       if( (r_gpf.code = (int *)malloc( sizeof(int) * num_chars)) == NULL ) {
-           fclose(w_bdf.output) ;
-           fclose(w_bdf.input) ;
-           return(MALLOC_ERROR);
-       }
-
-       if( (r_gpf.ptn = (char **)calloc( num_chars, sizeof(char *) )) == NULL ) {
-           fclose(w_bdf.output) ;
-           fclose(w_bdf.input) ;
-           return(MALLOC_ERROR);
-       }
-
-       if( (rtn = readBdfToMemory(&r_gpf, buf, code_num, code_list, make_all)) ){
-           fprintf(stderr, "\"%s\" cannot read glyph.\n", bdf_name ) ;
-           fclose(w_bdf.output) ;
-           fclose(w_bdf.input) ;
-           return rtn ;
-       }
-       fclose(w_bdf.input) ;
-       wait(0) ;
-
-       w_bdf.zoomf     = 0 ;
-       w_bdf.num_chars = r_gpf.num_chars ;
-       w_bdf.code      = r_gpf.code ;
-       w_bdf.ptn       = r_gpf.ptn  ;
-
-       if( (rtn = WritePtnToBdf( &w_bdf, buf )) ){
-           fprintf(stderr, "\"%s\" cannot write glyph.\n", bdf_name ) ;
-           fclose(w_bdf.output) ;
-           return rtn ;
-       }
-       fclose(w_bdf.output) ;
-       
-       signal( SIGHUP , SIG_IGN );
-       signal( SIGINT , SIG_IGN );
-       signal( SIGQUIT, SIG_IGN );
-       signal( SIGTERM, SIG_IGN );
-
-       /*
-        * free memories
-        */
-       free( r_gpf.code ) ;
-       for(i=0; i<r_gpf.num_chars; i++){
-           if(r_gpf.ptn[i])    free(r_gpf.ptn[i]) ;
-       }
-       free( r_gpf.ptn ) ;
-
-       return 0 ;
-}
-
-static int
-writeBdfHeader(head, comment_num, comment_list)
-struct ptobhead *head;
-int     comment_num ;   /* number comments                     */
-char    **comment_list ;/* pointer to the list of comments     */
-{
-       FILE            *fp;
-       int             fd[2];
-       unsigned int    getstat;
-       char            buf[BUFSIZE], *p;
-
-       int             cnt ;
-       int             comflg ;
-       pid_t           chld_pid = 0;
-#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__)
-       int             chld_stat ;
-#else
-       union   wait    chld_stat ;
-#endif
-
-       if (head->snf_file != NULL) {
-               if (pipe(fd) != 0) {
-                       return  PIPE_ERROR;
-               }
-               switch (chld_pid = fork()) {
-               case    0:
-                       close(1);
-                       if(dup(fd[1]) < 0) {
-                               return(DUP_ERROR);
-                       }
-                       close(fd[0]);
-                       close(fd[1]);
-                       execl( oakgtobdf, oakgtobdf, head->snf_file, 0);
-                       return  EXEC_ERROR;
-               case    -1:
-                       return(FORK_ERROR);
-               default:
-                       break;
-               }
-               close(fd[1]);
-               if((fp = (FILE *)fdopen(fd[0], "r")) == NULL) {
-                       close( fd[0] );
-                       kill( chld_pid, SIGKILL );
-                       WaitID( chld_pid, chld_stat ) ;
-                       return  FDOPEN_ERROR;
-               }
-       } else {
-               return(BDF_OPEN_HEAD);
-       }
-       head->input = fp ;
-       getstat = 0;
-       comflg = 0 ;
-
-       while ( 1 ) {
-               if (fgets(buf, BUFSIZE, fp) == NULL) {
-                   fclose( fp );
-                   if (head->snf_file != NULL) {
-                       close(fd[0]);
-                       kill( chld_pid, SIGKILL );
-                       WaitID( chld_pid, chld_stat ) ;
-                   }
-                   return(BDF_INVAL);
-               }
-               p = buf;
-               SCAN_TO_NONSP(p);
-
-               if (!strncmp(p, CHARS, CHARSsz)) {
-                   if ((sscanf(p, "CHARS %d", &(head->num_chars))) != 1 ){
-                       return(BDF_INVAL);
-                   }
-                   getstat |= 0x04;
-                   break;
-               }
-               /*
-                * write user comments
-                */
-               if ( !strncmp(p, "FONT", strlen("FONT"))
-                   && comment_list && !comflg
-               ) {
-                   int i ;
-                   for( i=0; i<comment_num; i++ ){
-                       char    *ep ;
-                       if( (ep = (char *)strchr( comment_list[i], '\n' )) != NULL )
-                           *ep = '\0' ;
-                       if( comment_list[i] == '\0' )   continue ;
-                       fprintf(head->output, "COMMENT %s\n", comment_list[i]);
-                   }
-                   fprintf(head->output, "COMMENT\n");
-                   comflg++ ;
-               }
-
-               fprintf(head->output, "%s", buf);
-
-               if (!strncmp(p, SIZE, SIZEsz)) {
-                   if ((sscanf(p, "SIZE %f%d",
-                       &(head->bdf_point), &(head->bdf_xdpi))) != 2) {
-                       fclose(fp);
-                       if (head->snf_file != NULL) {
-                           close(fd[0]);
-                           kill( chld_pid, SIGKILL );
-                           WaitID( chld_pid, chld_stat ) ;
-                       }
-                       return(BDF_INVAL);
-                   }
-                   getstat |= 0x01;
-                   continue;
-               }
-               if (!strncmp(p, FONTBOUNDINGBOX, FONTBOUNDINGBOXsz)) {
-                   if (( cnt = sscanf( p, "FONTBOUNDINGBOX %d%d%d%d", 
-                               &(head->bdf_width), &(head->bdf_height), 
-                               &(head->bdf_x), &(head->bdf_y))) != 4
-                   ) {
-                       fclose(fp);
-                       if (head->snf_file != NULL) {
-                           close(fd[0]);
-                           kill( chld_pid, SIGKILL );
-                           WaitID( chld_pid, chld_stat ) ;
-                       }
-                       return  BDF_INVAL;
-                   }
-                   getstat |= 0x02;
-                   continue;
-               }
-               get_charset_registry(head, p) ;
-       }
-
-       if (getstat != 0x07) {
-               return  BDF_INVAL;
-       }
-
-       return  0;
-}
-
-
-static int
-readBdfToMemory(head, buf, code_num, code_list, make_all)
-struct btophead *head;
-char   *buf;
-int     code_num ;      /* number of GPF code                  */
-int     *code_list ;    /* pointer to GPF code lists           */
-int    make_all ;      /* convert whole GPF fomat file to BDF  */
-{
-       int     code, mwidth, num_char, bsize, rtn;
-       char    *ptn;
-
-       num_char = 0;
-       mwidth = (head->bdf_width + 7) / 8;
-       bsize = mwidth * head->bdf_height;
-       while(1) {
-           if ((rtn = GetBdfCode(head, buf, &code)) < 0) {
-               return(rtn);    /* contain BDF_INVAL */
-           } else if (rtn == FILE_END) {
-               head->num_chars = num_char;
-               break;
-           }
-           if ( !make_all ) {
-               if ( expCheckCode(code, code_num, code_list) ) {
-                   continue;
-               }
-           }
-
-           head->code[num_char] = code;
-           if ( ( ptn = head->ptn[num_char++] = (char *)malloc( bsize ) ) == NULL ) {
-               return(MALLOC_ERROR);
-           }
-
-           if ((rtn = GetBdfPtn(head, buf, ptn, mwidth, bsize)) != 0) {
-               return(rtn);
-           }
-       }
-       return(0);
-}
-
diff --git a/cde/programs/dtudcexch/getbdffn.c b/cde/programs/dtudcexch/getbdffn.c
deleted file mode 100644 (file)
index 7415084..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: getbdffn.c /main/5 1996/10/14 14:44:32 barstow $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#include "excutil.h"
-#include <Xm/FileSB.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-/*
- * There is no public header file for this function (only an
- * internal header XmStringI.h).
- */
-extern XtPointer _XmStringUngenerate (XmString string,
-                        XmStringTag tag,
-                        XmTextType tag_type,
-                        XmTextType output_type);
-
-void filesbokCB();
-void filesbcancelCB();
-
-extern char *maintitle;
-
-void getbdffn(Exc_data * ed)
-{
-    Widget     filesb;
-    Arg                args[20];
-    Cardinal   n;
-    char       *selectlabel;
-    XmString   xms;
-
-    selectlabel = GETMESSAGE(2, 2, "BDF file selection");
-    n = 0;
-    XtSetArg(args[n], XmNtitle, maintitle); n++;
-    xms = XmStringCreateLocalized(selectlabel);
-    XtSetArg(args[n], XmNselectionLabelString, xms); n++;
-    filesb = XmCreateFileSelectionDialog(ed->toplevel, "filesb", args, n);
-    XtAddCallback(filesb, XmNokCallback,
-                 (XtCallbackProc) filesbokCB,
-                 (XtPointer) ed);
-    XtAddCallback(filesb, XmNcancelCallback,
-                 (XtCallbackProc) filesbcancelCB,
-                 (XtPointer) ed);
-    XtUnmanageChild(XmFileSelectionBoxGetChild(filesb, XmDIALOG_HELP_BUTTON));
-    XtManageChild(filesb);
-}
-
-int fopencheck(char *file, char *dir, char *mode)
-/*
- *  when mode = "r", if fopen can open the file with read only mode, return 0
- *  when mode = "w", if fopen can open the file with write mode, return 0
- *                   but if the file exists, return 1
- *  otherwise return -1
- */
-{
-    struct stat        buf;
-
-    if (strcmp(mode, "r") == 0) {
-       if (stat(file, &buf) == 0)
-           if ((buf.st_mode & S_IFMT) == S_IFREG)
-               return 0; /* readable regular file */
-    } else if (strcmp(mode, "w") == 0) {
-       if (stat(file, &buf) == 0) {
-           if (((buf.st_mode & S_IFMT) == S_IFREG) &&
-               (access(file, W_OK) == 0))
-               return 1; /* writable existing file */
-       } else {
-           if (stat(dir, &buf) == 0) {
-               if (((buf.st_mode & S_IFMT) == S_IFDIR) &&
-                   (access(dir, W_OK) == 0)) {
-                   return 0; /* writable new file */
-               }
-           }
-       }
-    } else
-       fprintf(stderr, "Unanticipatable error occurred in fopencheck.\n");
-    return -1;
-}
-
-void filesbcancelCB(Widget widget, Exc_data * ed, XtPointer call_data)
-{
-    excexit(ed);
-}
-
-void freeStrings(char * dir, char * file)
-{
-    if (dir != NULL)
-       XtFree(dir);
-    if (file != NULL)
-       XtFree(file);
-}
-
-void filesbokCB(Widget widget, Exc_data * ed, XtPointer call_data)
-{
-    XmFileSelectionBoxCallbackStruct   *ptr;
-    char                               *file = NULL, *dir = NULL, *tmpfile;
-    int                                        r, ans = 0;
-    char                               *msg1;
-    char                               *msg2;
-
-    msg1 = GETMESSAGE(2, 4, "The selected file exists. Overwrite?");
-    msg2 = GETMESSAGE(2, 6, "Failed to open the selected file.");
-
-    ptr = (XmFileSelectionBoxCallbackStruct *) call_data;
-
-    file = (char *)  _XmStringUngenerate((XmString) ptr->value, NULL,
-                                         XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-    if (!file) {
-       return;
-    }
-
-    dir = (char *)  _XmStringUngenerate((XmString) ptr->dir, NULL,
-                                         XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-    if (!dir) {
-       return;
-    } else {
-       if (*file != '/') {
-           if ((tmpfile = XtMalloc(strlen(dir) + 1 + strlen(file) + 1))
-               == NULL) {
-               excerror(ed, EXCERRMALLOC, "filesbokCB", "exit");
-           }
-           sprintf(tmpfile, "%s/%s", dir, file);
-           XtFree(file);
-           file = tmpfile;
-       }
-    }
-
-    r = fopencheck(file, dir, ed->bdfmode);
-    if (r == 0) {/* no problem */
-       /*fprintf(stderr, "%s will be opened\n", file);*/
-    } else if (r == 1) { /* file exist at export function */
-       AskUser(widget, ed, msg1, &ans, "warning");
-       if (ans != 1) { /* overwrite cancel */
-           freeStrings(dir, file);
-           return;
-       }
-    } else { /* file will not be opened */
-       AskUser(widget, ed, msg2, &ans, "error");
-       freeStrings(dir, file);
-       return;
-    }
-    ed->bdffile = (char *) malloc(strlen(file) + 1);
-    strcpy(ed->bdffile, file);
-    freeStrings(dir, file);
-    XtUnmanageChild(widget);
-    if (ed->function == EXPORT)
-    {
-       createbdf(ed);
-    } else if (ed->function == IMPORT)
-    {
-       PopupSelectXLFD(ed->toplevel);
-    }
-}
diff --git a/cde/programs/dtudcexch/importbdf.c b/cde/programs/dtudcexch/importbdf.c
deleted file mode 100644 (file)
index fe95a3a..0000000
+++ /dev/null
@@ -1,708 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: importbdf.c /main/5 1996/06/27 10:40:33 ageorge $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- *
- *  Authors: Seiya Miyazaki     FUJITSU LIMITED
- *           Hiroyuki Chiba     FUJITSU LIMITED
- *
- */
-
-
-
-#include       <stdio.h>
-#include       <fcntl.h>
-#include       <signal.h>
-#include       <sys/types.h>
-#include       <sys/stat.h>
-#ifndef SVR4
-#if !defined( SYSV )
-#include       <sys/resource.h>
-#endif
-#include       <sys/wait.h>
-#else
-#include       <wait.h>
-#endif
-
-#include       <unistd.h>
-
-#include       <X11/Xmd.h>
-#include       <X11/Xproto.h>
-#include       "bdfgpf.h"
-#include       "FaLib.h"
-
-#include       <errno.h>
-
-#define UNLINK_TMPFILE( file ){ \
-        if ( unlink( file ) != 0 ) { \
-                exit(-1) ; \
-        } \
-}
-
-static impFileConvInit();
-static impGetGpfInf();
-static impReadBdfHeaderAndPut();
-static impMergePtn();
-static impModifyPtn();
-static impInsertPtn();
-static impWriteSnf();
-static int impWritePtnToBdf();
-static int impPutDefaultChars();
-static int impReadBdfToMemory();
-
-extern int  expCheckCode();
-
-
-static struct ptobhead WriteGpf;
-
-static char    *targ_file = NULL;      /* UDC_file_name */
-
-
-static void
-sigint_out()
-{
-       if (WriteGpf.out_file) {
-               UNLINK_TMPFILE( WriteGpf.out_file );
-       }
-       exit( 0 );
-}
-
-
-
-
-int
-ImpBDFCodeList( bdf_name, code_num, code_list )
-char   *bdf_name ;
-int    *code_num ;
-int    **code_list ;
-{
-       int     *glyph_list ;
-       FILE    *bdfp ;
-       char    *p ;
-       char    buf[2048] ;
-       int     cnt ;
-
-       /* open BDF file */
-       if( (bdfp = fopen( bdf_name, "r" )) == NULL ){
-           return(-1);
-       }
-
-       /* get number of characters in BDF file */
-       while ( 1 ) {
-           if( fgets( buf, BUFSIZE, bdfp ) == NULL) {
-               return (BDF_INVAL);
-           }
-           p = buf;
-           SCAN_TO_NONSP( p )
-           if ( !strncmp( p, CHARS, (unsigned int)strlen( CHARS ) ) ) {
-               if ( ( sscanf( p, "CHARS %d", code_num ) ) != 1 ) {
-                   return  BDF_INVAL;
-               }
-               break ;
-           } 
-       }
-
-       /* alloc memory for codes */
-       if( (glyph_list = (int *)calloc( *code_num, (unsigned int)sizeof(int) )) == NULL ){
-           return(-1);
-       }
-
-       /* get codes of BDF file */
-       cnt = 0 ;
-       while( cnt < *code_num ) {
-           if (fgets(buf, BUFSIZE, bdfp ) == NULL) {
-               return (BDF_INVAL);
-           }
-           p = buf;
-           SCAN_TO_NONSP( p )
-           if (!strncmp(p, ENDFONT, (unsigned int)ENDFONTsz)) {
-               break;
-           }else if (!strncmp(p, ENCODING, (unsigned int)ENCODINGsz)) {
-               if ((sscanf(p, "ENCODING %d", &glyph_list[cnt] )) != 1) {
-                   return(BDF_INVAL);
-               }
-               cnt ++ ;
-           }
-       }
-       if( cnt != *code_num ){
-               return(-1) ;
-       }
-
-       /* close BDF file */
-       if( fclose( bdfp ) ){
-           return(-1);
-       }
-
-       *code_list = glyph_list ;
-
-       return(0) ;
-}
-
-
-
-int
-ImpBDFCodeListFree( code_list )
-int    **code_list ;
-{
-       free( *code_list ) ;
-       return(0) ;
-}
-
-
-
-int
-ImpBDFCheck( bdf_name, gpf_name )
-char   *bdf_name ;     /* BDF file name        */
-char   *gpf_name ;     /* GPF file name        */
-{
-       /* parameter check */
-       if( bdf_name == NULL || gpf_name == NULL ){
-               return(-1) ;
-       }
-       return(0) ;
-}
-
-
-
-
-int
-ImpBDFtoGpf( bdf_name, gpf_name, bdf_codenum, bdf_codelist)
-char   *bdf_name ;
-char   *gpf_name ;
-int    bdf_codenum ;
-int    *bdf_codelist ;
-{
-       int     rtn ;
-       int     exit_stat;
-       struct btophead ReadGpf;
-       struct btophead ReadUdc;
-       struct stat             statbuf;
-       char            buf[BUFSIZE];
-
-       int     chk_fd;
-
-       ReadGpf.in_file = ReadUdc.in_file = WriteGpf.out_file = NULL;
-
-       if (!( bdftopcf = get_cmd_path( getenv( "PATH" ), BDFTOPCF_CMD ))) {
-               bdftopcf = BDFTOPCF;
-       }
-       if (!( oakgtobdf = get_cmd_path( getenv( "PATH" ), SNFTOBDF_CMD ))) {
-               oakgtobdf = SNFTOBDF;
-       }
-       if (!( bdftosnf = get_cmd_path( getenv( "PATH" ), BDFTOSNF_CMD ))) {
-               bdftosnf = BDFTOSNF;
-       }
-
-       /* 
-       * set input/output file name
-       */
-
-       ReadUdc.in_file = bdf_name ;
-       ReadUdc.code_category = ALL_CODE ;
-       ReadUdc.start_code    = MIN_CODE ;
-       ReadUdc.end_code      = MAX_CODE ;
-
-       ReadGpf.in_file = gpf_name ;
-       ReadGpf.code_category = ALL_CODE ;
-       ReadGpf.start_code    = MIN_CODE ;
-       ReadGpf.end_code      = MAX_CODE ;
-
-       /*
-       * get real file name of GPF file
-       */
-       if ((targ_file = GetRealFileName( ReadGpf.in_file )) == NULL){
-               return(-1);
-       }
-
-       /*
-       * WriteGpf.snf_file = ReadGpf.in_file
-       */
-       WriteGpf.snf_file = targ_file;
-
-       signal( SIGHUP , (void(*)())sigint_out );
-       signal( SIGINT , (void(*)())sigint_out );
-       signal( SIGQUIT, (void(*)())sigint_out );
-       signal( SIGTERM, (void(*)())sigint_out );
-
-       /*
-        * impFileConvInit() 
-        *
-        * SNFTOBDF, BDFTOSNF
-        *
-        *  (ReadGpf.in_file)  -->  SNFTOBDF ==H 
-        *                                     H
-        *                                      oakaddp  <-- (ReadUdc.in_file)
-        *                                     H
-        * (WriteGpf.out_file) <--  BDFTOSNF ==H
-        *
-        */
-
-       /*
-       * make a temporary file by BDF format corresponded to target GPF file
-       */
-       if ( rtn = impFileConvInit( &ReadUdc, &ReadGpf, &WriteGpf ) ) {
-               if ( WriteGpf.out_file ) {
-                       UNLINK_TMPFILE( WriteGpf.out_file );
-               }
-               return(-1) ;
-       }
-
-       /*
-       * get informations from import file in BDF format
-       */
-       if ( rtn = ReadBdfHeader( &ReadUdc, buf ) ) {
-               if ( WriteGpf.out_file ) {
-                       UNLINK_TMPFILE( WriteGpf.out_file );
-               }
-               return(-1) ;
-       }
-
-       /*
-       * get informations from target file in BDF format
-       */
-
-       if ( rtn = impGetGpfInf( &ReadGpf, &WriteGpf, buf, bdf_codenum ) ) {
-               if ( WriteGpf.out_file ) {
-                       UNLINK_TMPFILE( WriteGpf.out_file );
-               }
-               return(-1) ;
-       }
-
-       /* wait for dtgpftobdf */
-       fclose( ReadGpf.input );
-       wait( 0 );
-
-       /*
-       * merge the UDC glyphs into GPF file (in BDF format)
-       */
-       if ( ( rtn = impMergePtn( &ReadUdc, &ReadGpf, buf,
-                                 bdf_codenum, bdf_codelist  ) ) ) {
-               if ( WriteGpf.out_file ) {
-                       UNLINK_TMPFILE( WriteGpf.out_file );
-               }
-               return(-1) ;
-       }
-
-       /*
-       * write the UDC data into GPF output file (in BDF format)
-       */
-       if ( ( rtn = impWriteSnf( &ReadGpf, &WriteGpf ) ) ) {
-               if ( WriteGpf.out_file ) {
-                       UNLINK_TMPFILE( WriteGpf.out_file );
-               }
-               return(-1) ;
-       }
-
-       /*
-       * convert temporary file into GPF format
-       */
-       fclose( ReadUdc.input );
-       fclose( WriteGpf.output );
-       wait( &exit_stat );
-#if !defined( SVR4 ) && !defined( SYSV )
-       if ( !WIFEXITED(exit_stat) ) {
-#else
-       if ( ! ( WIFEXITED(exit_stat) && !WEXITSTATUS(exit_stat) ) ) {
-#endif
-               UNLINK_TMPFILE( WriteGpf.out_file );
-               return(-1) ;
-       }
-       signal( SIGHUP , SIG_IGN );
-       signal( SIGINT , SIG_IGN );
-       signal( SIGQUIT, SIG_IGN );
-       signal( SIGTERM, SIG_IGN );
-
-       sleep( 1 );
-       if ( ( stat( WriteGpf.out_file, &statbuf ) ) || ( statbuf.st_size == 0 )
-           ) {
-               UNLINK_TMPFILE( WriteGpf.out_file );
-               return(-1) ;
-       }
-       if ( stat( WriteGpf.snf_file, &statbuf ) ) {
-               UNLINK_TMPFILE( WriteGpf.out_file );
-               return( -1 );
-       }
-       /*
-       * convert the temporary file to target file
-       */
-       return( Make_NewFefFile( WriteGpf.snf_file, WriteGpf.out_file,
-           FONT_FILE_PARM, (uid_t)statbuf.st_uid, (gid_t)statbuf.st_gid, "ImpBDFtoGpf()" ));
-}
-
-
-/*
-* sub functions
-*/
-
-static
-impFileConvInit(r_udc, r_gpf, w_gpf )
-struct btophead        *r_udc;
-struct btophead        *r_gpf;
-struct ptobhead        *w_gpf;
-{
-       int     fd[2], snf_fd, permission;
-       char    buf[BUFSIZE];
-       int     pfd[2], ofd;
-
-       FontInfoRec     *finf;
-       char    *optlist[5] = {0,0,0,0,0};
-       char    *ep ;
-       int     i ;
-       struct  stat    statbuf ;
-
-
-
-       if ( ( r_udc->input = fopen(r_udc->in_file, "r")) == NULL ) {
-               return  GPF_OPEN_IN;
-       }
-
-       /*
-       * case of SNF file
-       */
-       if ( ChkPcfFontFile( w_gpf->snf_file ) ) {
-               /* snf */
-               if ( ( snf_fd = open( w_gpf->snf_file, O_RDONLY ) ) >= 0 ) {
-                       COMM_SNF_FILEVERSION( snf_fd, finf, buf, permission ) ;
-                       if( permission < 0 ) {
-                               return  BDF_INVAL;
-                       }
-               } else {
-                       return  BDF_OPEN_IN;
-               }
-       }
-
-       if (pipe(fd) != 0) {
-               return  PIPE_ERROR;
-       }
-       switch ( fork() ) {
-       case    0:
-               close( fd[0] );
-               close( 1 );
-               if ( dup( fd[1] ) < 0 ) {
-                       return  DUP_ERROR;
-               }
-
-               close( fd[1] );
-
-               /* gpf -> bdf */
-               execl( oakgtobdf, oakgtobdf, r_gpf->in_file, 0 );
-               return  EXEC_ERROR;
-
-       case    -1:
-               return  FORK_ERROR;
-
-       default:
-               break;
-       }
-       close( fd[1] );
-       if ( ( r_gpf->input = (FILE *)fdopen( fd[0], "r" ) ) == NULL ) {
-               return  FDOPEN_ERROR;
-       }
-
-       if ( !( w_gpf->out_file = GetTmpPath( targ_file ) ) ) {
-               return  MKTMP_ERROR;
-       }
-
-       if ( pipe( pfd ) != 0 ) {
-               return  PIPE_ERROR;
-       }
-       switch ( fork() ) {
-       case    0:
-               if ( ( ofd = open( w_gpf->out_file, O_WRONLY | O_CREAT, 0664 ) ) < 0 ) {
-                       return  BDF_OPEN_OUT;
-               }
-               close( 0 );
-               if ( dup(pfd[0]) < 0 ) {
-                       return  DUP_ERROR;
-               }
-               close( pfd[0] );
-               close( pfd[1] );
-               close( 1 );
-               if( dup( ofd ) < 0 ) {
-                       return  DUP_ERROR;
-               }
-               close( ofd );
-               /*
-               * case of PCF file format
-               */
-               if ( ChkPcfFontFile( w_gpf->snf_file ) == 0 ) {
-                       execl( bdftopcf, bdftopcf, 0 );
-                       return  EXEC_ERROR;
-               }
-               /*
-               * case of SNF file format
-               */
-               COMM_SNF_EXECLBDFTOSNF( permission, buf, w_gpf->snf_file ) ;
-               return  EXEC_ERROR;
-
-       case    -1:
-               return  FORK_ERROR;
-                               
-       default:
-               break;
-       }
-       close( pfd[0] );
-       if ( ( w_gpf->output = (FILE *)fdopen( pfd[1], "w" ) ) == NULL ) {
-               return  FDOPEN_ERROR;
-       }
-       return  0;
-}
-
-
-
-
-
-static
-impGetGpfInf( r_gpf, w_gpf, buf, bdf_codenum )
-struct btophead *r_gpf;
-struct ptobhead *w_gpf;
-char                   *buf;
-int            bdf_codenum ;
-{
-       int         nchar, rtn;
-
-       if ( ( rtn = impReadBdfHeaderAndPut( r_gpf, w_gpf, buf ) ) ) {
-               return  rtn;
-       }
-
-       nchar = r_gpf->num_chars + bdf_codenum ;
-
-       if ( ( r_gpf->code = (int *)malloc( sizeof(int) * nchar ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-
-       if ( ( r_gpf->ptn = (char **)malloc( sizeof(char *) * nchar ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-
-       return  ReadBdfToMemory( r_gpf, buf ) ;
-}
-
-
-
-static
-impReadBdfHeaderAndPut(r_gpf, w_gpf, buf)
-struct btophead *r_gpf;
-struct ptobhead *w_gpf;
-char   *buf;
-{
-       char    *p;
-       unsigned int    getstat = 0;
-
-       while ( 1 ) {
-               if ( fgets( buf, BUFSIZE, r_gpf->input ) == NULL ) {
-                       return  BDF_INVAL;
-               }
-               p = buf;
-               SCAN_TO_NONSP( p )
-                   if ( !strncmp( p, SIZE, (unsigned int)strlen( SIZE ) ) ) {
-                       if ( ( sscanf( p, "SIZE %f%d",
-                           &(r_gpf->bdf_point), &(r_gpf->bdf_xdpi))) != 2 ) {
-                               return  BDF_INVAL;
-                       }
-                       fprintf( w_gpf->output, "%s", buf );
-                       getstat |= 0x01;
-
-               } else if ( !strncmp( p, FONTBOUNDINGBOX, (unsigned int)strlen( FONTBOUNDINGBOX ) ) ) {
-                       if ( ( sscanf( p, "FONTBOUNDINGBOX %d %d %d %d",
-                           &(r_gpf->bdf_width), &(r_gpf->bdf_height),
-                           &(r_gpf->bdf_x), &(r_gpf->bdf_y) ) ) != 4 ) {
-                               return  BDF_INVAL;
-                       }
-                       fprintf( w_gpf->output, "%s", buf );
-                       getstat |= 0x02;
-
-               } else if ( !strncmp( p, CHARS, (unsigned int)strlen( CHARS ) ) ) {
-                       if ( ( sscanf( p, "CHARS %d", &( r_gpf->num_chars ) ) ) != 1 ) {
-                               return  BDF_INVAL;
-                       }
-                       getstat |= 0x04;
-                       break;
-               } else {
-                       fprintf( w_gpf->output, "%s", buf );
-               }
-       }
-
-       if ( getstat != 0x07 ) {
-               return  BDF_INVAL;
-       }
-       return  0;
-}
-
-
-static
-impMergePtn(r_udc, r_gpf, buf, bdf_codenum, bdf_codelist )
-struct btophead *r_udc;
-struct btophead *r_gpf;
-char   *buf;
-int    bdf_codenum ;
-int    *bdf_codelist ;
-{
-       int     code, rtn, msize, i, j;
-       char    *ptn;
-
-       if ( ( r_udc->bdf_width != r_gpf->bdf_width )
-           || ( r_udc->bdf_height != r_gpf->bdf_height )
-           ) {
-               r_udc->zoomf = 1;
-
-               msize = ( r_udc->bdf_width + 7 ) / 8 * r_udc->bdf_height;
-
-               if ( ( ptn = (char *)malloc( msize ) ) == NULL ) {
-                       return  MALLOC_ERROR;
-               }
-               r_udc->ptn = &ptn;
-
-       } else {
-               r_udc->zoomf = 0;
-       }
-
-       for ( i = 0; i < r_udc->num_chars; i++ ) {
-               if ( ( rtn = GetBdfCode( r_udc, buf, &code ) ) < 0 ) {
-                       return  rtn;
-               } else if ( rtn == FILE_END ) {
-                       break;
-               }
-
-               if( expCheckCode( code, bdf_codenum, bdf_codelist ) ) {
-                       continue ;
-               }
-
-               for ( j = 0; j < r_gpf->num_chars; j++ ) {
-                       if ( r_gpf->code[j] == code ) {
-                               if ( ( rtn = impModifyPtn( r_udc, r_gpf, buf, j ) ) ) {
-                                       return  rtn;
-                               }
-                               break;
-                       } else if ( r_gpf->code[j] > code ) {
-                               if ( ( rtn = impInsertPtn( r_udc, r_gpf, buf, code, j ) ) ) {
-                                       return  rtn;
-                               }
-                               break;
-                       }
-               }
-               if ( j == r_gpf->num_chars ) {
-                       if ( ( rtn = impInsertPtn( r_udc, r_gpf, buf, code, j ) ) ) {
-                               return  rtn;
-                       }
-               }
-       }
-       return  0;
-}
-
-static
-impModifyPtn( r_udc, r_gpf, buf, ix )
-struct btophead *r_udc;
-struct btophead *r_gpf;
-char   *buf;
-int    ix;
-{
-       int     mwidth, msize, rtn;
-
-       mwidth = ( r_udc->bdf_width + 7 ) / 8;
-       msize = mwidth * r_udc->bdf_height;
-
-       if ( r_udc->zoomf ) {
-               if ( ( rtn = GetBdfPtn( r_udc, buf, r_udc->ptn[0], mwidth, msize ) ) ) {
-                       return  rtn;
-               }
-               if ( ( rtn = PtnZoom( r_gpf->ptn[ix], r_udc->ptn[0],
-                   r_udc->bdf_width, r_udc->bdf_height,
-                   r_gpf->bdf_width, r_gpf->bdf_height ) ) ) {
-                       return  rtn;
-               }
-       } else {
-               if ( ( rtn = GetBdfPtn( r_udc, buf, r_gpf->ptn[ix], mwidth, msize ) ) ) {
-                       return  rtn;
-               }
-       }
-       return  0;
-}
-
-static
-impInsertPtn( r_udc, r_gpf, buf, code, ix )
-struct btophead *r_udc;
-struct btophead *r_gpf;
-char   *buf;
-int    code;
-int    ix;
-{
-       int     mwidth, msize, rtn, i;
-
-       for ( i = r_gpf->num_chars; i > ix; i-- ) {
-               r_gpf->code[i] = r_gpf->code[i-1];
-               r_gpf->ptn[i] = r_gpf->ptn[i-1];
-       }
-       r_gpf->code[ix] = code;
-
-       r_gpf->num_chars++;
-
-       mwidth = (r_gpf->bdf_width + 7) / 8;
-       msize = mwidth * r_gpf->bdf_height;
-
-       if ( ( r_gpf->ptn[ix] = (char *)malloc( msize ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-
-       if ( r_udc->zoomf ) {
-               mwidth = (r_udc->bdf_width + 7) / 8;
-               msize = mwidth * r_udc->bdf_height;
-               if ( ( rtn = GetBdfPtn( r_udc, buf, r_udc->ptn[0], mwidth, msize ) ) ) {
-                       return  rtn;
-               }
-               if ( ( rtn = PtnZoom( r_gpf->ptn[ix], r_udc->ptn[0],
-                   r_udc->bdf_width, r_udc->bdf_height,
-                   r_gpf->bdf_width, r_gpf->bdf_height ) ) ) {
-                       return  rtn;
-               }
-       } else {
-               if ( ( rtn = GetBdfPtn( r_udc, buf, r_gpf->ptn[ix], mwidth, msize ) ) ) {
-                       return  rtn;
-               }
-       }
-       return(0);
-}
-
-static
-impWriteSnf( r_gpf, w_gpf )
-struct btophead *r_gpf;
-struct ptobhead *w_gpf;
-{
-       w_gpf->zoomf = 0;
-       w_gpf->num_chars  = r_gpf->num_chars;
-       w_gpf->code       = r_gpf->code;
-       w_gpf->ptn        = r_gpf->ptn;
-       w_gpf->bdf_width  = r_gpf->bdf_width;
-       w_gpf->bdf_height = r_gpf->bdf_height;
-       w_gpf->bdf_x      = r_gpf->bdf_x;
-       w_gpf->bdf_y      = r_gpf->bdf_y;
-       w_gpf->bdf_point  = r_gpf->bdf_point;
-       w_gpf->bdf_xdpi   = r_gpf->bdf_xdpi;
-
-       return  WritePtnToBdf( w_gpf );
-}
-
diff --git a/cde/programs/dtudcexch/selectx.c b/cde/programs/dtudcexch/selectx.c
deleted file mode 100644 (file)
index 894659d..0000000
+++ /dev/null
@@ -1,1212 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* selectx.c 1.12 - Fujitsu source for CDEnext    96/03/01 09:34:52      */
-/* $TOG: selectx.c /main/5 1997/07/23 17:24:39 samborn $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <locale.h> /* dtex add */
-#include <math.h> /* dtex add */
-#include <nl_types.h>
-
-#include<X11/Xlib.h>
-#include<X11/Xutil.h>
-#include<X11/Xatom.h>
-
-#include <Xm/Xm.h>
-#include <Xm/Form.h>
-#include <Xm/PushB.h>
-#include <Xm/Text.h>
-#include <Xm/TextF.h>
-#include <Xm/Label.h>
-#include <Xm/SeparatoG.h>
-#include <Xm/List.h>
-#include <Xm/ToggleB.h>
-#include <Xm/MessageB.h>
-#include <Xm/RowColumn.h>
-#include <Xm/Frame.h>
-#include <Xm/Label.h>
-
-
-#include "xoakufont.h"
-#include "selectxlfd.h"
-#include "excutil.h" /* dtex add */
-
-/*
- * There is no public header file for this function (only an
- * internal header XmStringI.h).
- */
-extern XtPointer _XmStringUngenerate (XmString string,
-                        XmStringTag tag,
-                        XmTextType tag_type,
-                        XmTextType output_type);
-
-/*extern Resource      resource ; dtex del*/
-/* dtex add */
-extern Exc_data *ed;
-extern ListData *ld;
-FalGlyphRegion  *gr;
-int num_gr;
-FalFontID              fid;
-extern char *maintitle;
-extern char **errmsg_org;
-
-/*
- * parameters
- */
-
-FalFontData fullFontData;
-
-void   PopupSelectXLFD() ;
-static Widget  CreateSelectXLFD() ;
-
-/*extern       void    xlfdPopupDialog() ; dtex del*/
-extern int     GetListsOfItems() ;
-
-/* extern      void    ReadCB(); dtex del */
-
-Widget xlfdDialog;
-static Widget xlfdWform;
-
-#define CS0 "Codeset 0"
-#define CS1 "Codeset 1"
-#define CS2 "Codeset 2"
-#define CS3 "Codeset 3"
-
-#define ERROR_1 errmsg_org[fal_utyerrno & 0xff]
-/*#define ERROR_1 fal_errmsg_org[fal_utyerrno & 0xff]*/
-/*#define ERROR_2 fal_errmsg_func[fal_utyerrno >>8]*/
-
-static Widget  pull1, pull2, pull3, pull4, scrolllist;
-static int     xlf_count = 0;
-static XmString *xlf=NULL;
-static int     udc_count = 0;
-static Boolean udc_flag = False;
-static int     *udc=NULL;
-static int     udc_val;
-static int     sty_count = 0;
-static Boolean sty_flag = False;
-static char    **sty=NULL;
-static char    *sty_val=NULL;
-static int     wls_count = 0;
-static Boolean wls_flag = False;
-static int     *wls=NULL;
-static int     wls_val;
-static int     hls_count = 0;
-static Boolean hls_flag = False;
-static int     *hls=NULL;
-static int     hls_val;
-static Widget       *button1=NULL;
-static Widget       *button2=NULL;
-static Widget       *button3=NULL;
-static Widget       *button4=NULL;
-
-/*
- * util dtex
- */
-
-void
-xlfdPopupDialog(w)
-Widget w;
-{
-    if (! XtIsManaged(w))
-        XtManageChild(w);
-    else
-        XRaiseWindow(XtDisplayOfObject(w), XtWindow(XtParent(w)));
-}
-
-void
-ForcePopdownDialog(w)
-Widget w;
-{
-    if (XtIsManaged(w)){
-       XtUnmanageChild(w);
-    }
-}
-
-int fontcheck(char *mode)
-/*
- * If fontfile can't be opend, return -1.
- * If fontfile is editted by other UDC client, return 1.
- * normary return 0.
- */
-{
-    int mask;
-    FalFontDataList    *fulllist = NULL;
-    FalFontID          fontid;
-
-    mask =  FAL_FONT_MASK_XLFDNAME | FAL_FONT_MASK_GLYPH_INDEX |
-           FAL_FONT_MASK_DEFINED |
-           FAL_FONT_MASK_UNDEFINED | FAL_FONT_MASK_CODE_SET;
-
-    if (strcmp(mode, "w") == 0)
-       mask |= FAL_FONT_MASK_UPDATE;
-
-    fontid = FalOpenSysFont(&fullFontData, mask, &fulllist);
-    if (fontid == 0) {
-       if ((fal_utyerrno & 0xff) == 0x10)/*_FAL_ERR_LCKD*/
-           return (1);
-       return (-1);
-    }
-    
-    FalCloseFont( fontid );
-    return (0);
-}
-
-void setallcode(ListData *ld)
-{
-    int                i, code, codenum;
-    int                *codep;
-    int                code1, code2;
-
-    codenum = 0;
-    for (i = 0; i < num_gr; i++) {
-       codenum += (abs(gr[i].end - gr[i].start) + 1);
-    }
-
-    ld->allcode = (int *) calloc(codenum, sizeof(int));
-    ld->allcode_num = codenum;
-    codep = ld->allcode;
-    for (i = 0; i < num_gr; i++) {
-       code1 = smaller(gr[i].start, gr[i].end);
-       code2 = bigger(gr[i].start, gr[i].end);
-       for (code = code1; code <= code2; code++) {
-           *codep = code;
-           codep++;
-       }
-    }
-}
-
-FalFontID openfont()
-{
-    int mask;
-    FalFontDataList    *fulllist = NULL;
-    FalFontID          fontid;
-    char                       *fullpath=NULL;
-
-    mask =  FAL_FONT_MASK_XLFDNAME | FAL_FONT_MASK_GLYPH_INDEX |
-           FAL_FONT_MASK_DEFINED |
-           FAL_FONT_MASK_UNDEFINED | FAL_FONT_MASK_CODE_SET;
-    fontid = FalOpenSysFont(&fullFontData, mask, &fulllist);
-    if (fontid == 0) {
-       return ( 0 );
-    }
-    if (fullpath != NULL)
-       FalFree(fullpath);
-    if (FalFontIDToFileName(fontid, &fullpath) < 0){
-       FalCloseFont(fontid);
-       fontid = NULL;
-    }
-    if ((ed->fontfile = strdup(fullpath)) == NULL) {       
-       exit (-1);
-    }
-    return (fontid);
-}
-
-void makelist(ListData *ld)
-{
-    char       *pattern;
-    int                code;
-    int                *existcodep, *allcodep;
-    int                existcode_num;
-    int                i;
-
-    ld->existcode = (int *) calloc(ld->allcode_num, sizeof(int));
-    existcodep = ld->existcode ;
-    allcodep = ld->allcode;
-    existcode_num = 0;
-    for (i = 0; i < ld->allcode_num; i++) {
-       code = *allcodep;
-       pattern = FalReadFont(fid, code, 0, 0);
-       if (fal_utyexists == 0) {
-           *existcodep = *allcodep;
-           existcodep++;
-           existcode_num++;
-       }
-       allcodep++;
-    }
-    ld->existcode_num = existcode_num;
-}
-
-void setexistcode(ListData *ld)
-{
-    fid = openfont();
-
-    makelist(ld);
-
-/* close font */
-    if (fid != NULL)
-       FalCloseFont(fid);
-}    
-
-
-char i2c(int num)
-{
-    char c; 
-
-    if ((0 <= num) && (num <= 9))
-       c = '0' + num;
-    else if ((10 <= num) && (num <= 15))
-       c = 'a' + (num - 10);
-    else
-       fprintf(stderr,"error in i2c\n");
-    return c;
-}
-
-char *i2s(int code)
-{
-    char       buf[8];
-    char       *number;
-    char       *cp;
-    int                i;
-    int                tmp;
-    int                len;
-
-    tmp = code;
-    for (i = 0; ; i++) {
-       if (tmp < 16) {
-           buf[i] = i2c(tmp);
-           buf[i+1] = 0;
-           break;
-       }
-       buf[i] = i2c(tmp % 16);
-       tmp = tmp / 16;
-    }
-    len = strlen(buf);
-    number = (char *) calloc(len+3, sizeof(char));
-    cp = number;
-    memcpy(cp, "0x", 2);
-    cp += 2;
-    for (i = len - 1; i >= 0; i--) {
-       *cp = buf[i];
-       cp++;
-    }
-    *cp = 0;
-    return (number);
-}
-
-void setexistcode_c(ListData *ld)
-{
-    int                i;
-    char       **code_cp;
-    int                *codep;
-
-    if (ld->existcode_num == 0) {
-       return;
-    }
-
-    ld->existcode_c = (char **) calloc(ld->existcode_num, sizeof(char *));
-    code_cp = ld->existcode_c;
-    codep = ld->existcode;
-    for (i = 0; i < ld->existcode_num; i++) {
-       *code_cp = i2s(*codep);
-       code_cp++;
-       codep++;
-    }
-}    
-
-void getexistcode(ListData *ld)
-{
-    setallcode(ld);
-    setexistcode(ld);
-    setexistcode_c(ld);
-}
-
-/****************************************************************
- * callbacks                                                   *
- ***************************************************************/
-
-void quit(w, client_data, call_data) /* dtex */
-Widget w;
-caddr_t        *client_data, *call_data;
-{
-    excterminate(ed);
-}
-
-static char *
-char_set(char *str) /* dtex */
-{
-    int i, count;
-    char *p;
-    for (i=strlen(str),p=&(str[i]),count=0; i && count < 2; i--,p--) {
-       if (*p == '-')
-           count ++;
-    }
-    if (count == 2)
-       return(p + 2);
-    else
-       return(str);
-}
-
-static char *
-spc(str, ch, count)
-char * str;
-char   ch;
-int    count;
-{
-    char *p;
-    p = str + strlen(str);
-    for(;count && (str < p);p--) {
-       if (*p == ch)
-           count --;
-    }
-    if (! count)
-       return(p+1);
-    else
-       return(NULL);
-}
-
-static void OpenWindowCB() /* dtex change */
-{
-    char       *str, *p;
-    XmStringTable      st;
-    /*dtex add */
-    int r;
-    int                ans;
-    char       *msg;
-    char       *msg2;
-    char       *msg3;
-    char       err[128];
-    extern void selcharcd();
-    char *locale;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED
-       | FAL_FONT_MASK_XLFDNAME;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-
-    msg = GETMESSAGE(4, 2, "This font has no user defined characters.");
-    msg2 = GETMESSAGE(4, 4, "Failed to open the selected font. You have no right to access for the font file, or the format of the file is not consistent.");
-    msg3 = GETMESSAGE(4, 6, "The font file is used by other UDC client.");
-
-    XtVaGetValues(scrolllist, XmNselectedItems, &st, NULL);
-    if( st == NULL ){
-       return ;
-    }
-    str = (char *) _XmStringUngenerate((XmString) st[0],
-                                NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-    if ( str == NULL ) {
-       return;
-    }
-
-    p = spc(str, '-', 4);
-    p++;
-
-    if (*p == 'p' || *p == 'P') {
-       str = NULL;
-    }
-
-    fullFontData.xlfdname = str;
-    if ((ed->xlfdname = strdup(str)) == NULL) {
-       exit (-1);
-    }
-    if(udc_flag == True)
-       fullFontData.cd_set = udc_val;
-    else { /* dtex change */
-       memset(&key, 0x00, sizeof(FalFontData));
-       key.xlfdname = fullFontData.xlfdname;
-       if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR)
-           return;
-       if (fontlist->num != 1)
-           return;
-       f = fontlist->list;
-       /*fullFontData.cd_set = -1;*/
-       fullFontData.cd_set = f->cd_set;
-       FalFreeFontList(fontlist);
-    }
-
-    if (ld != NULL) {
-       freeld(ld);
-    }
-
-    if ((ld = (ListData *) malloc(sizeof(ListData))) == NULL) {
-       excerror(ed, EXCERRMALLOC, "selcharcd", "exit");
-    }
-    memset(ld, 0x00, sizeof(ListData));
-    ld->ed = ed;
-    locale = getenv("LANG");
-    if (locale == NULL)
-       locale = "C";
-    if (FalGetUDCGIArea(locale, fullFontData.cd_set,
-                       char_set(fullFontData.xlfdname), &gr, &num_gr)
-       == FAL_ERROR) {
-           fprintf(stderr, "error in FalGetUDCGIArea\n");
-           sprintf(err, "%s", ERROR_1);
-           AskUser(ed->toplevel, ed, err, &ans, "error");
-           return;
-    }
-    if (ed->function == EXPORT) {
-       r = fontcheck("r");
-       if (r == -1) { /* file open error */
-           AskUser(ld->ed->toplevel, ld->ed, msg2, &ans, "error");
-           return;
-       } else if (r == 1) { /* file is being editted by other UDC client */
-           AskUser(ld->ed->toplevel, ld->ed, msg3, &ans, "error");
-           return;
-       }
-        /* get existing UDC code */
-       getexistcode(ld);
-       if (ld->existcode_num == 0) {
-           AskUser(ld->ed->toplevel, ld->ed, msg, &ans, "error");
-           return;
-       }
-       XtUnmanageChild(xlfdDialog);
-       selcharcd(ld->ed);
-    } else if (ed->function == IMPORT) {
-       r = fontcheck("w");
-       if (r == -1) { /* file open error */
-           AskUser(ld->ed->toplevel, ld->ed, msg2, &ans, "error");
-           return;
-       } else if (r == 1) { /* file is being editted by other UDC client */
-           AskUser(ld->ed->toplevel, ld->ed, msg3, &ans, "error");
-           return;
-       }
-        /* get existing UDC code */
-       getexistcode(ld);
-
-       XtUnmanageChild(xlfdDialog);
-       getcharcd(ed);
-    }
-}
-
-/**
- **  contents : "Cancel" button callback 
- ** ------------------------
- **  
- ** 
- **/
-
-/*ARGSUSED*/
-static void
-OpenCancelCB( widget, clientData, callData ) /* dtex change */
-Widget         widget;
-caddr_t                clientData;
-caddr_t                callData;
-{
-/*    extern void ForcePopdownDialog();
-    if ( !editPtnW ){
-       exit( 0 );
-    } dtex del */
-    ForcePopdownDialog(xlfdDialog);
-}
-
-
-/*
-* create selection window view
-*/
-void
-PopupSelectXLFD( top )
-Widget top ;
-{
-
-    if( xlfdDialog == NULL ){
-       if( (xlfdDialog = CreateSelectXLFD( top )) == NULL ){
-           exit( -1 ) ;
-       }
-    }
-    /* pop up select window */
-    xlfdPopupDialog( xlfdDialog );
-}
-
-
-static void
-create_xlfd()
-{
-       int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-       FalFontData key;
-       FalFontDataList *fontlist;
-       FalFontData *f;
-       int i;
-
-       if (udc_flag == True) {
-               key.cd_set = udc_val;
-               mask |= FAL_FONT_MASK_CODE_SET;
-       }
-       if (sty_flag == True) {
-               key.style.name = sty_val;
-               mask |= FAL_FONT_MASK_STYLE_NAME;
-       }
-       if (wls_flag == True) {
-               key.size.w = wls_val;
-               mask |= FAL_FONT_MASK_SIZE_W;
-       }
-       if (hls_flag == True) {
-               key.size.h = hls_val;
-               mask |= FAL_FONT_MASK_SIZE_H;
-       }
-       xlf_count = 0;
-       if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-               return;
-       }
-       if(fontlist->num == 0) {
-               FalFreeFontList(fontlist);
-               return;
-       }
-       if (xlf) {
-           for (i=0; i < xlf_count; i++) {
-               XmStringFree(xlf[i]);
-           }
-           XtFree((char *)xlf);
-       }
-       xlf = (XmString *)XtMalloc(sizeof(XmString) * fontlist->num);
-       for (i=0, f=fontlist->list; i < fontlist->num; i++, f++) {
-           xlf[xlf_count++] = XmStringCreateLocalized(f->xlfdname);
-       }
-       FalFreeFontList(fontlist);
-}
-
-static void
-udc_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-
-       moji = (char *) _XmStringUngenerate((XmString) label, NULL,
-                                       XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if (moji) {
-             if(strncmp(moji, "*", 1) == 0) {
-                     udc_flag = False;
-             } else if(strcmp(moji, CS0) == 0) {
-                     udc_val = FAL_FONT_CS0;
-                     udc_flag = True;
-             } else if(strcmp(moji, CS1) == 0) {
-                     udc_val = FAL_FONT_CS1;
-                     udc_flag = True;
-             } else if(strcmp(moji, CS2) == 0) {
-                     udc_val = FAL_FONT_CS2;
-                     udc_flag = True;
-             } else if(strcmp(moji, CS3) == 0) {
-                     udc_val = FAL_FONT_CS3;
-                     udc_flag = True;
-             } else {
-                     udc_flag = False;
-             }
-             XtFree(moji);
-       } else {
-                     udc_flag = False;
-       }
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-sty_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-       if (sty_val) {
-               XtFree(sty_val);
-               sty_val = NULL;
-       }
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-
-       moji = (char *) _XmStringUngenerate((XmString) label, NULL,
-                                       XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if (moji) {
-             if(strncmp(moji, "*", 1) == 0) {
-                     sty_flag = False;
-             }
-             else {
-                     sty_val = XtMalloc(sizeof(char) * (strlen(moji) + 1));
-                     strcpy(sty_val, moji);
-                     sty_flag = True;
-             }
-             XtFree(moji);
-       }
-
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-wls_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-
-       moji = (char *) _XmStringUngenerate((XmString) label, NULL,
-                                       XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if (moji) {
-             if(strncmp(moji, "*", 1) == 0) {
-                     wls_flag = False;
-             }
-             else {
-                     wls_val = atoi(moji);
-                     wls_flag = True;
-             }
-             XtFree(moji);
-       }
-
-       XmStringFree(label);
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-hls_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-
-       moji = (char *) _XmStringUngenerate((XmString) label, NULL,
-                                       XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if (moji) {
-             if(strncmp(moji, "*", 1) == 0) {
-                     hls_flag = False;
-             }
-             else {
-                     hls_val = atoi(moji);
-                     hls_flag = True;
-             }
-             XtFree(moji);
-       }
-       XmStringFree(label);
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-button_set1()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (sty_flag == True) {
-        key.style.name = sty_val;
-        mask |= FAL_FONT_MASK_STYLE_NAME;
-    }
-    if (wls_flag == True) {
-        key.size.w = wls_val;
-        mask |= FAL_FONT_MASK_SIZE_W;
-    }
-    if (hls_flag == True) {
-        key.size.h = hls_val;
-        mask |= FAL_FONT_MASK_SIZE_H;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-        for (j=0; j<udc_count; j++)
-           XtSetSensitive(button1[j], False);
-       return;
-    }
-    if(fontlist->num == 0) {
-        for (j=0; j<udc_count; j++)
-           XtSetSensitive(button1[j], False);
-        FalFreeFontList(fontlist);
-        return;
-    }
-    for (j=0; j<udc_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-            if(udc[j] == f->cd_set) {
-               found = True;
-                break;
-            }
-        }
-       if(found == False)
-           XtSetSensitive(button1[j], False);
-       else
-           XtSetSensitive(button1[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-static void
-button_set2()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (udc_flag == True) {
-        key.cd_set = udc_val;
-        mask |= FAL_FONT_MASK_CODE_SET;
-    }
-    if (wls_flag == True) {
-        key.size.w = wls_val;
-        mask |= FAL_FONT_MASK_SIZE_W;
-    }
-    if (hls_flag == True) {
-        key.size.h = hls_val;
-        mask |= FAL_FONT_MASK_SIZE_H;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-        for (j=0; j<sty_count; j++)
-           XtSetSensitive(button2[j], False);
-        return;
-    }
-    if(fontlist->num == 0) {
-        for (j=0; j<sty_count; j++)
-           XtSetSensitive(button2[j], False);
-        FalFreeFontList(fontlist);
-        return;
-    }
-    for (j=0; j<sty_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-           if(strcmp(sty[j], f->style.name) == 0) {
-               found = True;
-               break;
-           }
-        }
-       if(found == False)
-           XtSetSensitive(button2[j], False);
-       else
-           XtSetSensitive(button2[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-static void
-button_set3()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (udc_flag == True) {
-        key.cd_set = udc_val;
-        mask |= FAL_FONT_MASK_CODE_SET;
-    }
-    if (sty_flag == True) {
-        key.style.name = sty_val;
-        mask |= FAL_FONT_MASK_STYLE_NAME;
-    }
-    if (hls_flag == True) {
-        key.size.h = hls_val;
-        mask |= FAL_FONT_MASK_SIZE_H;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-        for (j=0; j<wls_count; j++)
-           XtSetSensitive(button3[j], False);
-        return;
-    }
-    if(fontlist->num == 0) {
-        for (j=0; j<wls_count; j++)
-           XtSetSensitive(button3[j], False);
-        FalFreeFontList(fontlist);
-        return;
-    }
-    for (j=0; j<wls_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-            if(wls[j] == f->size.w) {
-               found = True;
-                break;
-            }
-        }
-       if(found == False)
-           XtSetSensitive(button3[j], False);
-       else
-           XtSetSensitive(button3[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-static void
-button_set4()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (udc_flag == True) {
-        key.cd_set = udc_val;
-        mask |= FAL_FONT_MASK_CODE_SET;
-    }
-    if (sty_flag == True) {
-        key.style.name = sty_val;
-        mask |= FAL_FONT_MASK_STYLE_NAME;
-    }
-    if (wls_flag == True) {
-        key.size.w = wls_val;
-        mask |= FAL_FONT_MASK_SIZE_W;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-        for (j=0; j<hls_count; j++)
-           XtSetSensitive(button4[j], False);
-        return;
-    }
-    if(fontlist->num == 0) {
-        for (j=0; j<hls_count; j++)
-           XtSetSensitive(button4[j], False);
-        FalFreeFontList(fontlist);
-        return;
-    }
-    for (j=0; j<hls_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-            if(hls[j] == f->size.h) {
-                found = True;
-                break;
-            }
-        }
-        if (found == False)
-           XtSetSensitive(button4[j], False);
-       else
-           XtSetSensitive(button4[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-void
-data_sort(data, count)
-int *data;
-int count;
-{
-    int *p1, *p2, tmp, i;
-
-    for (; count; count--) {
-        for (i=1, p1=data, p2=data+1; i < count; i++, p1++, p2++) {
-           if( *p1 > *p2) {
-               tmp = *p2;
-               *p2 = *p1;
-               *p1 = tmp;
-           }
-       }
-    }
-}
-
-
-static void
-font_init() /* dtex change */
-{
-       FalFontDataList *fontlist;
-       FalFontData     *f;
-       Boolean         found;
-       int             i, j;
-       char            tmp[16];
-       char            err[128];
-       Widget          button;
-       int             ans; /* dtex add */
-/*     extern void Error_message(); dtex del */
-       char *p;
-
-       p = GETMESSAGE(4, 8, "There is no font");
-       xlf_count = udc_count = sty_count = wls_count = hls_count = 0;
-       if (FalGetFontList(NULL, FAL_FONT_MASK_DEFINED |
-                       FAL_FONT_MASK_UNDEFINED, &fontlist) == FAL_ERROR) {
-               sprintf(err, "%s", ERROR_1);
-/*             Error_message((Widget)NULL, err); dtex del */
-               AskUser(ed->toplevel, ed, err, &ans, "error");
-               return;
-       }
-       if(fontlist->num == 0) {
-               FalFreeFontList(fontlist);
-/*             strcpy(err, resource.mn_no_font); dtex change */
-               strcpy(err, p);
-/*             Error_message((Widget)NULL, err); dtex del */
-               AskUser(ed->toplevel, ed, err, &ans, "error");
-               return;
-       }
-       udc = (int *)XtMalloc(sizeof(int) * fontlist->num);
-       sty = (char **)XtMalloc(sizeof(char *) * fontlist->num);
-       wls = (int *)XtMalloc(sizeof(int) * fontlist->num);
-       hls = (int *)XtMalloc(sizeof(int) * fontlist->num);
-       for (i=0, f=fontlist->list; i < fontlist->num; i++, f++) {
-           for (j=0,found=False; j<udc_count; j++) {
-               if(udc[j] == f->cd_set) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               udc[udc_count++] = f->cd_set;
-           }
-           for (j=0,found=False; j<sty_count; j++) {
-               if(strcmp(sty[j], f->style.name) == 0) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               sty[sty_count] = XtMalloc(sizeof(char) * (strlen(f->style.name) + 1));
-               strcpy(sty[sty_count++], f->style.name);
-           }
-           if (f->size.w != -1) {
-           for (j=0,found=False; j<wls_count; j++) {
-               if(wls[j] == f->size.w) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               wls[wls_count++] = f->size.w;
-           }
-           }
-           for (j=0,found=False; j<hls_count; j++) {
-               if(hls[j] == f->size.h) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               hls[hls_count++] = f->size.h;
-           }
-       }
-       FalFreeFontList(fontlist);
-
-       data_sort(udc, udc_count);
-       data_sort(wls, wls_count);
-       data_sort(hls, hls_count);
-
-       if (udc_count > 0) {
-         button1 = (Widget *) XtMalloc(sizeof(Widget) * udc_count);
-       }
-       if (sty_count > 0) { 
-         button2 = (Widget *) XtMalloc(sizeof(Widget) * sty_count);
-       }
-       if (wls_count > 0) {
-         button3 = (Widget *) XtMalloc(sizeof(Widget) * wls_count);
-       }
-       if (hls_count > 0) {
-         button4 = (Widget *) XtMalloc(sizeof(Widget) * hls_count);
-       }
-
-       button = XmCreatePushButton(pull1, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)udc_call, NULL);
-       for (i=0; i < udc_count; i++) {
-               if(udc[i] == FAL_FONT_CS0)
-                       sprintf(tmp, CS0);
-               else if(udc[i] == FAL_FONT_CS1)
-                       sprintf(tmp, CS1);
-               else if(udc[i] == FAL_FONT_CS2)
-                       sprintf(tmp, CS2);
-               else if(udc[i] == FAL_FONT_CS3)
-                       sprintf(tmp, CS3);
-               else
-                       sprintf(tmp, "Codeset %x?", udc[i]);
-               button1[i] = XmCreatePushButton(pull1, tmp, NULL, 0);
-               XtManageChild(button1[i]);
-               XtAddCallback(button1[i], XmNactivateCallback,
-                                               (XtCallbackProc)udc_call, NULL);
-       }
-
-       button = XmCreatePushButton(pull2, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)sty_call, NULL);
-       for (i=0; i < sty_count; i++) {
-               button2[i] = XmCreatePushButton(pull2, sty[i], NULL, 0);
-               XtManageChild(button2[i]);
-               XtAddCallback(button2[i], XmNactivateCallback,
-                                               (XtCallbackProc)sty_call, NULL);
-       }
-
-       button = XmCreatePushButton(pull3, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)wls_call, NULL);
-       for (i=0; i < wls_count; i++) {
-               sprintf(tmp, "%d", wls[i]);
-               button3[i] = XmCreatePushButton(pull3, tmp, NULL, 0);
-               XtManageChild(button3[i]);
-               XtAddCallback(button3[i], XmNactivateCallback,
-                                               (XtCallbackProc)wls_call, NULL);
-       }
-
-       button = XmCreatePushButton(pull4, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)hls_call, NULL);
-       for (i=0; i < hls_count; i++) {
-               sprintf(tmp, "%d", hls[i]);
-               button4[i] = XmCreatePushButton(pull4, tmp, NULL, 0);
-               XtManageChild(button4[i]);
-               XtAddCallback(button4[i], XmNactivateCallback,
-                                               (XtCallbackProc)hls_call, NULL);
-       }
-}
-
-
-static Widget
-CreateSelectXLFD( top ) /* dtex change */
-Widget top ;
-{
-
-       int             n;
-       Arg             args[16];
-       XmString        xms, xms1 ;
-       Widget          editW ;
-       Widget          frame, row1, label1, row2, cas1, cas2, cas3, cas4;
-       XmString        str;
-       char            *p;
-       udc_flag = sty_flag = wls_flag = hls_flag = False;
-
-        /*
-       *  create base window
-       */
-        n = 0 ;
-        XtSetArg( args[n], XmNautoUnmanage, False ) ;          n++ ;
-        XtSetArg( args[n], XmNtitle, maintitle ) ;n++ ; /* dtex add */
-        XtSetArg( args[n], XmNnoResize, True ) ;               n++ ;
-        XtSetArg( args[n], XmNminimizeButtons, True ) ;                n++ ;
-/*        xms = XmStringCreateLocalized( resource.exec_label ) ; dtex change*/
-       p = GETMESSAGE(4, 10, "Open");
-        xms = XmStringCreateLocalized( p ) ;
-        XtSetArg( args[n], XmNokLabelString, xms ) ;           n++ ;
-/*        xms1 = XmStringCreateLocalized( resource.quit_label) ; dtex change*/
-       p = GETMESSAGE(4, 12, "Cancel");
-        xms1 = XmStringCreateLocalized( p ) ;
-        XtSetArg( args[n], XmNhelpLabelString, xms1 ) ;                n++ ;
-/*        editW = XmCreateTemplateDialog( top, "dtfonteditor - Open", args, n ); dtex change*/
-       p = GETMESSAGE(4, 14, "UDC data exchange utility");
-        editW = XmCreateTemplateDialog( top, p, args, n );
-
-       XmStringFree( xms ) ;
-       XmStringFree( xms1 ) ;
-
-       n = 0;
-       pull1 = XmCreatePulldownMenu(toplevel, "pull", args, n);
-       pull2 = XmCreatePulldownMenu(toplevel, "pull", args, n);
-       pull3 = XmCreatePulldownMenu(toplevel, "pull", args, n);
-       pull4 = XmCreatePulldownMenu(toplevel, "pull", args, n);
-
-       n = 0 ;
-       xlfdWform  = XmCreateRowColumn( editW, "BaseForm", args, n );
-       XtManageChild( xlfdWform );
-
-       n = 0;
-       frame = XmCreateFrame( xlfdWform, "frame", args, n);
-       XtManageChild( frame );
-
-       n = 0 ;
-       row1  = XmCreateRowColumn( frame, "row", args, n );
-       XtManageChild( row1 );
-
-       p = GETMESSAGE(4, 16, "SelectItems");
-       n = 0;
-       label1 = XmCreateLabel( row1, p, args, n);
-       XtManageChild( label1 );
-
-       n = 0 ;
-       row2  = XmCreateRowColumn( row1, "row", args, n );
-       XtManageChild( row2 );
-
-       n = 0 ;
-       /*str = XmStringCreateLocalized(resource.l_codeset) ; dtex change */
-       p = GETMESSAGE(4, 18, "- Codeset:");
-        str = XmStringCreateLocalized( p );
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull1);  n++;
-       cas1  = XmCreateOptionMenu( row2, "CodeSet", args, n );
-       XtManageChild( cas1 );
-       XtAddCallback(XmOptionButtonGadget(cas1), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set1, NULL);
-       XmStringFree(str);
-       n = 0 ;
-       /*str = XmStringCreateLocalized(resource.l_style) ; dtex change */
-       p = GETMESSAGE(4, 20, "-   Style:");
-        str = XmStringCreateLocalized( p );
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull2);  n++;
-       cas2  = XmCreateOptionMenu( row2, "Style", args, n );
-       XtAddCallback(XmOptionButtonGadget(cas2), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set2, NULL);
-       XtManageChild( cas2 );
-       XmStringFree(str);
-
-       n = 0 ;
-       /*str = XmStringCreateLocalized(resource.l_width) ; dtex change */
-       p = GETMESSAGE(4, 22, "-   Width:");
-        str = XmStringCreateLocalized( p );
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull3);  n++;
-       cas3  = XmCreateOptionMenu( row2, "Width", args, n );
-       XtManageChild( cas3 );
-       XtAddCallback(XmOptionButtonGadget(cas3), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set3, NULL);
-       XmStringFree(str);
-
-       n = 0 ;
-       /*str = XmStringCreateLocalized(resource.l_height) ; dtex change */
-       p = GETMESSAGE(4, 24, "-  Height:");
-        str = XmStringCreateLocalized( p );
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull4);  n++;
-       cas4  = XmCreateOptionMenu( row2, "Height", args, n );
-       XtManageChild( cas4 );
-       XtAddCallback(XmOptionButtonGadget(cas4), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set4, NULL);
-       XmStringFree(str);
-
-       font_init();
-       create_xlfd();
-
-       n = 0;
-        XtSetArg(args[n], XmNvisibleItemCount, 10) ;   n++ ;
-        XtSetArg(args[n], XmNlistSizePolicy, XmCONSTANT) ;     n++ ;
-        XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmSTATIC) ;       n++ ;
-        XtSetArg(args[n], XmNselectionPolicy, XmSINGLE_SELECT) ;       n++ ;
-        XtSetArg(args[n], XmNitems, xlf) ;     n++ ;
-        XtSetArg(args[n], XmNitemCount, xlf_count) ;   n++ ;
-       scrolllist = XmCreateScrolledList(xlfdWform, "scrolllist", args, n);
-       XtManageChild(scrolllist);
-
-        /*  
-        * Error_Messege
-        */
-
-        XtAddCallback(editW, XmNokCallback, (XtCallbackProc)OpenWindowCB, NULL);
-/*        XtAddCallback(editW, XmNokCallback, (XtCallbackProc)ReadCB, NULL); dtex del */
-        XtAddCallback(editW, XmNcancelCallback, (XtCallbackProc)quit, NULL);
-/*        XtAddCallback(editW, XmNhelpCallback,
-                                       (XtCallbackProc)OpenCancelCB, NULL); dtex del */
-        XtAddCallback(editW, XmNhelpCallback,
-                                       (XtCallbackProc)quit, NULL);
-
-       return( editW ) ;
-}
-
diff --git a/cde/programs/dtudcexch/selectxlfd.c b/cde/programs/dtudcexch/selectxlfd.c
deleted file mode 100644 (file)
index 4f0c8ba..0000000
+++ /dev/null
@@ -1,1034 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: selectxlfd.c /main/3 1996/10/14 14:45:17 barstow $ */
-/*
- *  All Rights Reserved, Copyright (c) FUJITSU LIMITED 1995
- */
-
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <nl_types.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include<X11/Xlib.h>
-#include<X11/Xutil.h>
-#include<X11/Xatom.h>
-
-#include <Xm/Xm.h>
-#include <Xm/Form.h>
-#include <Xm/PushB.h>
-#include <Xm/Text.h>
-#include <Xm/TextF.h>
-#include <Xm/Label.h>
-#include <Xm/SeparatoG.h>
-#include <Xm/List.h>
-#include <Xm/ToggleB.h>
-#include <Xm/MessageB.h>
-
-#include "FaLib.h"
-#include "falxlfd.h"
-#include "selectxlfd.h"
-#include "excutil.h"
-
-char *shell_n[] = { "pop0", "pop1", "pop2", "pop3" } ;
-char *list_n[]         = { "list0", "list1", "list2", "list3" } ;
-
-#ifdef DEBUG
-#undef Dprintf
-#define Dprintf fprintf
-#else
-#define Dprintf
-#endif /* DEBUG */
-
-/*
- * There is no public header file for this function (only an
- * internal header XmStringI.h).
- */
-extern XtPointer _XmStringUngenerate (XmString string,
-                        XmStringTag tag,
-                        XmTextType tag_type,
-                        XmTextType output_type);
-
-extern Rsrc resource;
-extern Exc_data *ed;
-extern ListData *ld;
-extern fal_utyerror;
-extern fal_utyderror;
-extern fal_utyexists;
-extern char *maintitle;
-
-FalFontID      fid;
-
-
-/*
- * parameters
- */
-
-char   *fullPathName   = NULL ;
-
-FalFontDataList                *font_L ;
-FalxCodeList           *CodeList ;
-FalxStyleList          *StyleList ;
-FalxSizeList           *SizeList ;
-FalxUdcArea            *UdcArea ;
-int                    SelectedOffset ;
-int                    UdcAreaCount ;
-int                    getmask ;
-
-FalxFontDataBuff       KeyBuff ;
-
-
-void   PopupSelectXLFD() ;
-
-Widget xlfdDialog, xlfdWform,
-       slctBLabel[BUTTONITEMS],slctBText[BUTTONITEMS], slctButton[BUTTONITEMS], 
-       listPop[BUTTONITEMS],   listW[BUTTONITEMS], 
-       separatorW, errorMD, msgBox ;
-extern Widget  cpyDialog ;
-
-extern Widget toplevel;
-
-
-/*
- * tmp
- */
-
-int fontcheck(char *fontfile, char *mode)
-/*
- * If fontfile can't be opend, return -1.
- * If fontfile is editted by other UDC client, return 1.
- * normary return 0.
- */
-{
-    int chk_fd;
-
-    if (strcmp(mode, "r") == 0) {
-       if ((chk_fd = open(fontfile, O_RDONLY)) < 0) {
-           return (-1);
-       }
-    } else if (strcmp(mode, "w") == 0) {
-       if ((chk_fd = open(fontfile, O_RDWR)) < 0) {
-           return (-1);
-       }
-    }
-    if (isLock(chk_fd) == 1) {
-       close(chk_fd);
-       return(1);
-    }
-    close(chk_fd);
-    return (0);
-}
-
-void setallcode(ListData *ld)
-{
-    int                i, code, codenum;
-    int                *codep;
-    int                code1, code2;
-
-    codenum = 0;
-    for (i = 0; i < UdcAreaCount; i++) {
-       codenum += (abs(UdcArea[i].udc_end - UdcArea[i].udc_start) + 1);
-    }
-
-    ld->allcode = (int *) calloc(codenum, sizeof(int));
-    ld->allcode_num = codenum;
-    codep = ld->allcode;
-    for (i = 0; i < UdcAreaCount; i++) {
-       code1 = smaller(UdcArea[i].udc_start, UdcArea[i].udc_end);
-       code2 = bigger(UdcArea[i].udc_start, UdcArea[i].udc_end);
-       for (code = code1; code <= code2; code++) {
-           *codep = code;
-           codep++;
-       }
-    }
-}
-
-FalFontID openfont()
-{
-    int                protect_key = FAL_FONT_DISPLAY;
-    int                codeset;
-    FalFontID  fontid;
-
-    fontid = NULL;
-    codeset = font_L->list[0].cd_set;
-    if ((fontid = FalOpenFont(fullPathName, protect_key, codeset))
-       == FAL_ERROR) {
-       fprintf(stderr, "FalOpenFont error\n");
-       return ((FalFontID) NULL);
-    }
-    return (fontid);
-}
-
-void makelist(ListData *ld)
-{
-    char       *pattern;
-    int                code;
-    int                *existcodep, *allcodep;
-    int                existcode_num;
-    int                i;
-/*    FalFontinfo fontinfo;*/
-
-/*    FalQueryFont(fid, &fontinfo);*/
-
-    ld->existcode = (int *) calloc(ld->allcode_num, sizeof(int));
-    existcodep = ld->existcode ;
-    allcodep = ld->allcode;
-    existcode_num = 0;
-    for (i = 0; i < ld->allcode_num; i++) {
-       code = *allcodep;
-       pattern = FalReadFont(fid, code, NULL, NULL);
-       if (fal_utyexists == 0) {
-           *existcodep = *allcodep;
-           existcodep++;
-           existcode_num++;
-       }
-       allcodep++;
-    }
-    ld->existcode_num = existcode_num;
-}
-
-void setexistcode(ListData *ld)
-{
-    int *codep, *allcodep;
-    int i;
-
-/* open font */
-    fid = openfont();
-
-    makelist(ld);
-
-/* close font */
-    if (fid != NULL)
-       FalCloseFont(fid);
-}    
-
-
-char i2c(int num)
-{
-    char c; 
-
-    if ((0 <= num) && (num <= 9))
-       c = '0' + num;
-    else if ((10 <= num) && (num <= 15))
-       c = 'a' + (num - 10);
-    else
-       fprintf(stderr,"error in i2c\n");
-    return c;
-}
-
-char *i2s(int code)
-{
-    char       buf[8];
-    char       *number;
-    char       *cp;
-    int                i;
-    int                tmp;
-    int                len;
-
-    tmp = code;
-    for (i = 0; ; i++) {
-       if (tmp < 16) {
-           buf[i] = i2c(tmp);
-           buf[i+1] = NULL;
-           break;
-       }
-       buf[i] = i2c(tmp % 16);
-       tmp = tmp / 16;
-    }
-    len = strlen(buf);
-    number = (char *) calloc(len+3, sizeof(char));
-    cp = number;
-    memcpy(cp, "0x", 2);
-    cp += 2;
-    for (i = len - 1; i >= 0; i--) {
-       *cp = buf[i];
-       cp++;
-    }
-    *cp = NULL;
-    return (number);
-}
-
-void setexistcode_c(ListData *ld)
-{
-    int                i;
-    char       **code_cp;
-    int                *codep;
-
-    if (ld->existcode_num == 0) {
-       return;
-    }
-
-    ld->existcode_c = (char **) calloc(ld->existcode_num, sizeof(char *));
-    code_cp = ld->existcode_c;
-    codep = ld->existcode;
-    for (i = 0; i < ld->existcode_num; i++) {
-       *code_cp = i2s(*codep);
-       code_cp++;
-       codep++;
-    }
-}    
-
-void getexistcode(ListData *ld)
-{
-    setallcode(ld);
-    setexistcode(ld);
-    setexistcode_c(ld);
-}
-
-
-
-/****************************************************************
- * common functions                                            *
- ***************************************************************/
-
-/*
- * pop up and down dialog box 
- */
-
-void
-xlfdPopupDialog(w)
-Widget w;
-{
-    if (! XtIsManaged(w))
-        XtManageChild(w);
-    else
-        XRaiseWindow(XtDisplayOfObject(w), XtWindow(XtParent(w)));
-}
-
-void
-xlfdPopdownDialog(w)
-Widget w;
-{
-    if (XtIsManaged(w)){
-        XtUnmanageChild(w);
-    }
-}
-
-
-/*
-* get pixel width
-*/
-Dimension
-GetPixelWidth( w, columns, width )
-Widget         w ;
-int            columns ;
-Dimension      *width ;
-{
-       Arg             args[1] ;
-       XtSetArg( args[0], XmNwidth, width ) ;
-       XtGetValues( w , args, 1 ) ;
-       return( *width / (Dimension)columns ) ;
-}
-
-
-/****************************************************************
- * callbacks                                                   *
- ***************************************************************/
-
-void quit(w, client_data, call_data)
-Widget w;
-caddr_t        *client_data, *call_data;
-{
-    char       *msg;
-    int                ans;
-
-    msg = GETMESSAGE(6, 2, "Do you want to terminate udcexchange?");
-
-    AskUser(ed->toplevel, ed, msg, &ans, "question");
-    if (ans == 1) {/* terminate ok */
-       FalxFreeCodeList( CodeList ) ;
-       FalxFreeStyleList( StyleList ) ;
-       FalxFreeSizeList( SizeList ) ;
-       FalxFreeFontList( font_L ) ;
-       excterminate(ed);
-    }
-}
-
-
-/*
- * Unmanage widgets
- */
-int
-ClearText( num, slctBText ) 
-int    num ;
-Widget *slctBText ;
-{
-       int     i ;
-       /* toggle button unset */
-       for( i=0; i<BUTTONITEMS; i++ ){
-           if( i>num ){
-               XmTextSetString( slctBText[i], "" );
-           }
-       }
-       return ;
-}
-
-int
-ClearButtons( num, slctButton ) 
-int    num ;
-Widget *slctButton ;
-{
-       int     i, cnt ;
-       Boolean isSet ;
-       Arg     args[5] ;
-       /* toggle button unset */
-       for( i=0; i<BUTTONITEMS; i++ ){
-           if( i != num ){
-               cnt = 0;
-               XtSetArg( args[cnt], XmNset, &isSet );  cnt++;
-               XtGetValues( slctButton[i], args, cnt );
-               if( isSet == True ){
-                   cnt = 0;
-                   XtSetArg( args[cnt], XmNset, False );       cnt++;
-                   XtSetValues( slctButton[i], args, cnt );
-               }
-           }
-       }
-       return ;
-}
-
-
-
-/* 
- * get text field position
- */
-int
-GetPositionOfLists( num, xlfdDialog, listPop, slctBText, x, y ) 
-int    num ; 
-Widget xlfdDialog ; 
-Widget *listPop ;
-Widget *slctBText ; 
-Position       *x ; 
-Position       *y ; 
-{
-       int             i ;
-       Position        tbx, tby, tx, ty ;
-       Dimension       theight ;
-       Arg     args[10] ;
-
-       i = 0;
-       XtSetArg(args[i], XmNx, &tbx ); i++;
-       XtSetArg(args[i], XmNy, &tby ); i++;
-       XtGetValues( xlfdDialog, args, i);
-       i = 0;
-       XtSetArg(args[i], XmNx, &tx );  i++;
-       XtSetArg(args[i], XmNy, &ty );  i++;
-       XtSetArg(args[i], XmNheight, &theight );        i++;
-       if( num==BUTTONITEMS-1 )
-           XtGetValues( slctBText[num], args, i ) ;
-       else
-           XtGetValues( XtParent(slctBText[num]), args, i ) ;  /* ScrolledText */
-       /*  determine the position of list */
-       *x = tx + tbx + CX ;
-       if( num==BUTTONITEMS-1 ){
-       *y = ty + tby + (Position)theight + 14 + CY ;
-       }else{
-       *y = ty + tby + (Position)theight + CY ;
-       }
-
-       for( i=0; i<BUTTONITEMS; i++ ){
-           if( XtIsManaged( listPop[i] ) )     XtUnmanageChild( listPop[i] );
-       }
-       if( !XtIsManaged( listPop[num] ) )      XtManageChild( listPop[num] );
-
-       return ;
-}
-
-
-
-
-void listEH(w, num, event)
-Widget w ;
-int    num ;
-XButtonEvent   *event;
-{
-       int             i, j, ITEM_COUNT;
-       Arg             args[10];
-       XmString        *xms ;
-       char            *str ;
-
-       int             rtn ;
-       Position        x, y ;
-
-       /*
-        *      get list items 
-        */
-       ITEM_COUNT = 0;
-       rtn = GetItemsToDisplay( num, &ITEM_COUNT, &xms ) ;
-       switch( rtn ){
-           case FALX_TRY_NEXT :
-               fprintf( stderr, "There are no fonts that was required.\n" ) ;
-               XmTextSetString( slctBText[0], " " );
-               ClearText( -1, slctBText ) ;
-               FalxFreeDataBuff( FALX_ALL, &KeyBuff ) ;
-               getmask = 0 ;
-               return ;
-           case 0 :
-               break ;
-           default :
-               fprintf( stderr, "GetItemsToDisplay() error.\n" ) ;
-               exit(-1) ;
-       }
-
-       if( num == 0 && ITEM_COUNT == 1 ){
-
-           str = (char *) _XmStringUngenerate((XmString) xms[0], NULL,
-                                       XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-           if (str)
-              XmTextSetString(slctBText[num], str );
-           return ;
-       }
-       if( ITEM_COUNT < 0 ){
-           exit(-1) ;
-       }
-
-
-       /* 
-        * get text field position
-        */
-       GetPositionOfLists( num, xlfdDialog, listPop, slctBText, &x, &y ) ;
-
-       i = 0;
-       XtSetArg(args[i], XmNx, x  ) ;  i++;
-       XtSetArg(args[i], XmNy, y  ) ;  i++;
-       XtSetValues(listPop[num], args, i );
-
-       /*
-        *      set list items 
-        */
-               i = 0;
-               XtSetArg (args[i], XmNitems, xms ); i++;
-               XtSetArg (args[i], XmNitemCount, ITEM_COUNT ); i++;
-       XtSetValues(listW[num], args, i );
-
-       /*
-        * pop up list
-        */
-       XtPopup( listPop[num], XtGrabNone );
-
-}
-
-
-
-
-void listPrintCB(w, num, call_data)
-Widget                 w;
-int                    num ;
-XmListCallbackStruct   *call_data;
-{
-       char    *str ;
-
-       /* clear text fields and unset buttons */
-       ClearButtons( num, slctButton ) ;
-
-
-       str = (char *) _XmStringUngenerate((XmString) call_data->item, NULL,
-                                       XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if (str) {
-           XmTextSetString(slctBText[num], str);
-       }
-
-#if 0
-       /* set key data         */
-       if( SetKeyBuff( num, str ) ){
-           exit(-1) ;
-       }
-#endif /* 0 */
-
-       if( XtIsManaged( listPop[num] ) )       XtUnmanageChild( listPop[num] );
-
-}
-
-
-
-
-
-void OpenWindow(w, client_data, call_data)
-Widget w;
-caddr_t        client_data, *call_data;
-{
-    int                r ;
-    int                i ;
-    int                ans;
-    char       *msg;
-    char       *msg1;
-    char       *msg2;
-    char       *msg3;
-    char       *str, buff[512] ;
-
-    msg = GETMESSAGE(6, 4, "No UDCs exist in this font");
-    msg1 = GETMESSAGE(6, 6, "XLFD name isn't selected");
-    msg2 = GETMESSAGE(6, 8, "Can't open the font file");
-    msg3 = GETMESSAGE(6, 10, "The font file is used by other UDC client.");
-
-    /* get font file name (str:  XLFD name)    */
-    str = XmTextGetString( slctBText[0] );
-    if (( str == NULL ) || (strcmp(str, "") == 0)) {
-       AskUser(w, ed, msg1, &ans, "error");
-       return;
-    }
-    if( fullPathName != NULL ){
-       free( fullPathName ) ;
-    }
-    SelectedOffset = FalxSearchFontFileName( str, font_L, buff ) ;
-    if( SelectedOffset < 0 ){
-        exit(-1) ;
-    }
-    if( (fullPathName = strdup( buff )) == NULL ){
-        exit(-1) ;
-    }
-    UdcAreaCount = FalxGetGlyphIndexInfo( str, font_L, &UdcArea ) ;
-    if( UdcAreaCount < 0 ){
-        exit(-1) ;
-    }
-
-    if( fullPathName != NULL ){
-       Dprintf( stderr, "OpenWindow() : full path name = %s\n", fullPathName );
-    }
-    for( i=0; i<UdcAreaCount; i++ ){
-       Dprintf( stderr, "OpenWindow() : start(%d) = 0x%x\n", i, UdcArea[i].udc_start );
-       Dprintf( stderr, "OpenWindow() : end  (%d) = 0x%x\n", i, UdcArea[i].udc_end );
-    }
-    if ((ed->xlfdname = strdup(str)) == NULL) {
-       exit (-1);
-    }
-    if ((ed->fontfile = strdup(fullPathName)) == NULL) {
-       exit (-1);
-    }
-/*    getxlfd(ed);*/
-/* initialize ld */
-    if ((ld = (ListData *) malloc(sizeof(ListData))) == NULL) {
-       excerror(ed, EXCERRMALLOC, "selcharcd", "exit");
-    }
-    memset(ld, 0x00, sizeof(ListData));
-    ld->ed = ed;
-
-    if (ed->function == EXPORT) {
-       r = fontcheck(ed->fontfile, "r");
-       if (r == -1) { /* file open error */
-           AskUser(ld->ed->toplevel, ld->ed, msg2, &ans, "error");
-           return;
-       } else if (r == 1) { /* file is being editted by other UDC client */
-           AskUser(ld->ed->toplevel, ld->ed, msg3, &ans, "error");
-           return;
-       }
-        /* get existing UDC code */
-       getexistcode(ld);
-       if (ld->existcode_num == 0) {
-           AskUser(ld->ed->toplevel, ld->ed, msg, &ans, "error");
-           return;
-       }
-       XtUnmanageChild(xlfdDialog);
-       selcharcd(ed);
-    } else if (ed->function == IMPORT) {
-       r = fontcheck(ed->fontfile, "w");
-       if (r == -1) { /* file open error */
-           AskUser(ld->ed->toplevel, ld->ed, msg2, &ans, "error");
-           return;
-       } else if (r == 1) { /* file is being editted by other UDC client */
-           AskUser(ld->ed->toplevel, ld->ed, msg3, &ans, "error");
-           return;
-       }
-        /* get existing UDC code */
-       getexistcode(ld);
-
-       XtUnmanageChild(xlfdDialog);
-       getcharcd(ed);
-    }
-}
-
-
-
-/****************************************************************
- * functions for create window view
-****************************************************************/
-
-#define SetLabel( cnt ){ \
-       switch( cnt ){ \
-           case 0 : buf = resource.xlfd_label ; break ; \
-           case 1 : buf = resource.code_label ; break ; \
-           case 2 : buf = resource.style_label; break ; \
-           case 3 : buf = resource.size_label ; break ; \
-       } \
-        xms = XmStringCreateLocalized( buf ); \
-}
-
-
-int
-CreateXLFDLabelAndText( owner, slctBLabel, slctBText, slctButton )
-Widget owner ;
-Widget *slctBLabel ;
-Widget *slctBText ;
-Widget *slctButton ;
-{
-
-       Widget  _slctBLabel ;
-       Widget  _slctBText ;
-       Widget  _slctButton ;
-       int             i, j;
-       Arg             args[16];
-       char            *buf ;
-       XmString        xms ;
-
-        /*
-       *  create XLFD titles
-       */
-       i = 0;
-       XtSetArg( args[i], XmNx,            20 ) ;      i++ ;
-       XtSetArg( args[i], XmNheight,       20 ) ;      i++ ;
-       XtSetArg( args[i], XmNtopAttachment, XmATTACH_FORM ) ; i++ ;
-       XtSetArg( args[i], XmNtopOffset,    20 ) ;      i++ ;
-/*
-       _slctBLabel = XmCreateLabelGadget( owner , "xlfdlabel", args, i );
-*/
-       _slctBLabel = XmCreateLabel( owner , "xlfdlabel", args, i );
-
-       XtManageChild( _slctBLabel );
-
-        /*
-       *  create text fields to display XLFD font name
-       */
-       i = 0;
-       XtSetArg( args[i], XmNleftAttachment,   XmATTACH_FORM ) ; i++ ;
-       XtSetArg( args[i], XmNleftOffset,       20 ) ;          i++ ;
-       XtSetArg( args[i], XmNtopAttachment,    XmATTACH_WIDGET ); i++ ;
-       XtSetArg( args[i], XmNtopOffset,        5 ) ;           i++ ;
-        XtSetArg (args[i], XmNtopWidget,       _slctBLabel );  i++;
-       XtSetArg( args[i], XmNcolumns,          XLFD_COLUMNS ) ;        i++ ;
-       XtSetArg( args[i], XmNspacing,          0 ) ;           i++ ;
-       XtSetArg( args[i], XmNeditMode, XmSINGLE_LINE_EDIT ) ;  i++ ;
-       XtSetArg( args[i], XmNscrollBarDisplayPolicy,   XmAS_NEEDED ) ; i++ ;
-       XtSetArg( args[i], XmNscrollingPolicy,   XmAPPLICATION_DEFINED ) ;  i++ ;
-/*
-       XtSetArg( args[i], XmNscrollingPolicy,   XmAUTOMATIC ) ;  i++ ;
-       XtSetArg( args[i], XmNlistSizePolicy,   XmCONSTANT ) ;  i++ ;
-
-       XtSetArg( args[i], XmNwidth, 600 ) ;                    i++ ;
-       XtSetArg( args[i], XmNfontList, fixed ) ;       i++ ;
-       XtSetArg( args[i], XmNeditable, True ) ;       i++ ;
-       XtSetArg( args[i], XmNlistSizePolicy,   XmVARIABLE ) ;  i++ ;
-*/
-       _slctBText = XmCreateScrolledText( owner , "xlfdtext", args, i );
-
-       XtManageChild( _slctBText );
-
-        /*
-       *  create XLFD select buttons
-       */
-       i = 0;
-       XtSetArg( args[i], XmNindicatorType,    XmONE_OF_MANY ) ;       i++ ;
-        XtSetArg (args[i], XmNtopWidget,       _slctBText );           i++;
-       XtSetArg( args[i], XmNtopAttachment,    XmATTACH_OPPOSITE_WIDGET ) ;    i++ ;
-       XtSetArg( args[i], XmNtopOffset,        15  ) ;                 i++ ;
-       XtSetArg( args[i], XmNleftAttachment,   XmATTACH_WIDGET ) ;     i++ ;
-       XtSetArg( args[i], XmNleftWidget,       _slctBText ) ;          i++ ;
-       XtSetArg( args[i], XmNleftOffset,       5 ) ;           i++ ;   /* WIDTH */
-       XtSetArg( args[i], XmNrightAttachment, XmATTACH_FORM ) ;      i++ ;
-       XtSetArg( args[i], XmNrightOffset,      5 ) ;           i++ ;   /* WIDTH */
-        xms = XmStringCreateLocalized( "" );
-       XtSetArg( args[i], XmNlabelString,     xms ) ;      i++ ;
-/*
-       _slctButton = XmCreateToggleButtonGadget( owner , "xlfdbtn", args, i);
-*/
-       _slctButton = XmCreateToggleButton( owner , "xlfdbtn", args, i);
-
-       XtManageChild( _slctButton );
-
-       *slctBLabel = _slctBLabel ;
-       *slctBText  = _slctBText ;
-       *slctButton = _slctButton ;
-
-}
-       
-
-
-
-int
-CreateOtherLabelAndText( num, owner, baseForm,
-                        slctBLabel, topW, slctBText, slctButton )
-int    num ;
-Widget owner ;
-Widget baseForm ;
-Widget *slctBLabel ;
-Widget topW ;
-Widget *slctBText ;
-Widget *slctButton ;
-{
-
-       Widget  _slctBLabel ;
-       Widget  _slctBText ;
-       Widget  _slctButton ;
-       int             i, j;
-       Arg             args[16];
-       char            *buf ;
-       XmString        xms ;
-
-
-       if( num < 1 )   return(0) ;
-
-        /*
-       *  create key titles
-       */
-       i = 0;
-        XtSetArg ( args[i], XmNtopWidget,
-               (num==1) ? baseForm : topW ); i++;
-       XtSetArg( args[i], XmNx,            20 ) ;      i++ ;
-       XtSetArg( args[i], XmNheight,       20 ) ;      i++ ;
-       XtSetArg( args[i], XmNtopAttachment, XmATTACH_WIDGET ) ; i++ ;
-/* DEBUG
-       XtSetArg( args[i], XmNtopOffset,    20 ) ;      i++ ;
-*/
-       XtSetArg( args[i], XmNtopOffset,    36 ) ;      i++ ;
-       SetLabel(num) ;
-       XtSetArg( args[i], XmNlabelString,      xms ) ; i++ ;
-/*
-       _slctBLabel = XmCreateLabelGadget( owner , "label", args, i);
-*/
-       _slctBLabel = XmCreateLabel( owner , "label", args, i);
-
-       XtManageChild( _slctBLabel );
-
-        /*
-       *  create text fields to display selected keys
-       */
-       i = 0;
-       XtSetArg( args[i], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET ) ;       i++ ;
-       XtSetArg( args[i], XmNtopOffset,        -5 ) ;          i++ ;
-        XtSetArg (args[i], XmNtopWidget,       _slctBLabel );  i++;
-       XtSetArg( args[i], XmNrightAttachment,  XmATTACH_OPPOSITE_WIDGET ) ; i++ ;
-       XtSetArg( args[i], XmNrightOffset,      0 ) ;           i++ ;
-        XtSetArg (args[i], XmNrightWidget,     baseForm );     i++;
-       XtSetArg( args[i], XmNcolumns,          KEY_COLUMNS ) ;         i++ ;
-       XtSetArg( args[i], XmNspacing,          0 ) ;           i++ ;
-       XtSetArg( args[i], XmNeditMode,         XmSINGLE_LINE_EDIT ) ;  i++ ;
-       XtSetArg( args[i], XmNscrollBarDisplayPolicy,   XmAS_NEEDED ) ; i++ ;
-       XtSetArg( args[i], XmNscrollingPolicy,   XmAPPLICATION_DEFINED ) ;  i++ ;
-       /*
-       XtSetArg( args[i], XmNscrollingPolicy,   XmAUTOMATIC ) ;        i++ ;
-       XtSetArg( args[i], XmNlistSizePolicy,   XmCONSTANT ) ;  i++ ;
-
-       XtSetArg( args[i], XmNfontList, fixed ) ;               i++ ;
-       XtSetArg( args[i], XmNlistSizePolicy,   XmVARIABLE ) ;  i++ ;
-       */
-       if( num==BUTTONITEMS-1 )
-           _slctBText = XmCreateText( owner , "text" , args, i );
-       else
-           _slctBText = XmCreateScrolledText( owner , "text" , args, i );
-
-       XtManageChild( _slctBText );
-
-        /*
-       *  create select buttons
-       */
-       i = 0;
-       XtSetArg( args[i], XmNindicatorType,    XmONE_OF_MANY ) ; i++ ;
-       XtSetArg( args[i], XmNtopAttachment,    XmATTACH_OPPOSITE_WIDGET ) ;    i++ ;
-       XtSetArg( args[i], XmNtopOffset,        5  ) ;          i++ ;
-        XtSetArg (args[i], XmNtopWidget,       _slctBLabel );  i++;
-       XtSetArg( args[i], XmNleftAttachment,   XmATTACH_WIDGET ) ;     i++ ;
-       XtSetArg( args[i], XmNleftWidget,       _slctBText  ) ;         i++ ;
-       XtSetArg( args[i], XmNleftOffset,       5 ) ;           i++ ;   /* WIDTH */
-        xms = XmStringCreateLocalized( "" );
-       XtSetArg( args[i], XmNlabelString,     xms ) ;          i++ ;
-/*
-       _slctButton = XmCreateToggleButtonGadget( owner , "button", args, i);
-*/
-       _slctButton = XmCreateToggleButton( owner , "button", args, i);
-
-       XtManageChild( _slctButton );
-
-       *slctBLabel = _slctBLabel ;
-       *slctBText  = _slctBText ;
-       *slctButton = _slctButton ;
-}
-
-
-
-/*
-* create pop up lists
-*/
-
-
-Widget
-xlfdCreateScrolledList ( owner, name, args, n )
-Widget owner ;
-char   *name ;
-Arg    *args ;
-int    n ;
-{
-       Widget          listW ;
-
-       XtSetArg( args[n], XmNselectionPolicy,          XmSINGLE_SELECT ) ;n++ ;
-       XtSetArg( args[n], XmNlistSpacing,              4 ) ;           n++ ;
-       XtSetArg( args[n], XmNlistSizePolicy,           XmCONSTANT ) ;  n++ ;
-       XtSetArg( args[n], XmNscrollBarDisplayPolicy,   XmAS_NEEDED ) ; n++ ;
-        listW = XmCreateScrolledList( owner, name, args, n );
-
-       XtManageChild( listW );
-
-
-       return( listW );
-}
-
-
-
-/*
-* create selection window view
-*/
-void
-PopupSelectXLFD( top )
-Widget top ;
-{
-
-    int                n, i, j;
-    Arg                args[16];
-    char               *buf ;
-    XmString   xms ;
-    Dimension  pix, xwidth, kwidth ;
-
-    if( xlfdDialog == NULL ){
-        /*
-       *  create base window
-       */
-        n = 0 ;
-        XtSetArg( args[n], XmNautoUnmanage, False ) ;          n++ ;
-        XtSetArg( args[n], XmNtitle, maintitle ) ;             n++ ;
-        XtSetArg( args[n], XmNnoResize, True ) ;               n++ ;
-        xms = XmStringCreateLocalized( resource.exec_label ) ;
-        XtSetArg( args[n], XmNokLabelString, xms ) ;           n++ ;
-        xms = XmStringCreateLocalized( resource.quit_label) ;
-        XtSetArg( args[n], XmNhelpLabelString, xms ) ;         n++ ;
-Dprintf( stdout, "(PopupSelectXLFD)XmCreateTemplateDialog: start\n" ) ;
-        xlfdDialog = XmCreateTemplateDialog( top, "SelectDialog", args, n );
-Dprintf( stdout, "(PopupSelectXLFD)XmCreateTemplateDialog: end\n" ) ;
-
-       n = 0 ;
-       xlfdWform  = XmCreateForm( xlfdDialog, "BaseForm", args, n );
-       XtManageChild( xlfdWform );
-
-
-        /*
-       *  create XLFD columns
-       */
-Dprintf( stdout, "(PopupSelectXLFD)CreateXLFDLabelAndText : start\n" ) ;
-       CreateXLFDLabelAndText( xlfdWform ,
-                                &slctBLabel[0], &slctBText[0], &slctButton[0] ) ;
-       n = 0 ;
-       SetLabel(0) ;
-       XtSetArg( args[n], XmNlabelString,      xms ) ; n++ ;
-       XtSetValues( slctBLabel[0], args, n ) ;
-Dprintf( stdout, "(PopupSelectXLFD)CreateXLFDLabelAndText : end\n" ) ;
-
-        /*
-       *  create other key columns
-       */
-Dprintf( stdout, "(PopupSelectXLFD)CreateOtherLabelAndText :start\n" ) ;
-       for( j=1; j<BUTTONITEMS; j++ ){
-           CreateOtherLabelAndText( j, xlfdWform, slctBText[0],
-                &slctBLabel[j], slctBLabel[j-1], &slctBText[j], &slctButton[j] ) ;
-       }
-Dprintf( stdout, "(PopupSelectXLFD)CreateOtherLabelAndText : end\n" ) ;
-
-       /* set bottom offsets */
-       n = 0 ;
-       XtSetArg( args[n], XmNbottomAttachment, XmATTACH_FORM ) ; n++ ;
-       XtSetArg( args[n], XmNbottomOffset,     36 ) ;          n++ ;
-       XtSetValues( slctBLabel[BUTTONITEMS-1], args, n ) ;
-
-       /* get pixel size */
-       pix = GetPixelWidth( slctBText[0], XLFD_COLUMNS, &xwidth ) ;
-       /* xwidth += pix / 2 ; */
-       kwidth = pix * KEY_COLUMNS + pix / 2 ;
-
-        /*
-       *  create popup shells
-       */
-       for( j=0; j<BUTTONITEMS; j++ ) {
-           n = 0;
-           listPop[j] = XtCreatePopupShell( shell_n[j], overrideShellWidgetClass,  
-                                            xlfdWform , args, n );
-       }
-
-        /*
-       *  create popup lists
-       */
-       for( j=0; j<BUTTONITEMS; j++ ) {
-           n = 0 ;
-           XtSetArg( args[n], XmNvisibleItemCount, (j==0)? 10 : 5 ) ;  n++ ;
-           if( j==0 ){
-               XtSetArg( args[n], XmNwidth,   xwidth ) ;               n++ ;
-           }else{
-               XtSetArg( args[n], XmNwidth,   kwidth ) ;               n++ ;
-               XtSetArg( args[n], XmNlistMarginWidth,   0 ) ;          n++ ;
-           }
-            listW[j] = xlfdCreateScrolledList( listPop[j], list_n[j], args, n );
-       }
-
-        /*  
-        * Error_Messege
-        */
-#if 0
-       n = 0 ;
-        XtSetArg( args[n], XmNokLabelString,   "OK" ) ;    n++ ;
-        XtSetArg( args[n], XmNcancelLabelString,"Cancel" ) ;    n++ ;
-        errorMD = XmCreateMessageDialog(toplevel, "ed0", NULL, 0);
-
-        msgBox = XmMessageBoxGetChild(errorMD, XmDIALOG_HELP_BUTTON);
-        XtUnmanageChild(msgBox);
-#endif /* 0 */
-
-       /*
-        * add callbacks
-        */
-       for( i=0; i<BUTTONITEMS; i++ )
-           XtAddEventHandler( slctButton[i], ButtonReleaseMask, False, (XtEventHandler) listEH, (XtPointer) i );
-
-       for( i=0; i<BUTTONITEMS; i++ )
-           XtAddCallback(listW[i], XmNsingleSelectionCallback, (XtCallbackProc) listPrintCB, (XtPointer) i );
-
-        XtAddCallback( xlfdDialog, XmNokCallback, (XtCallbackProc) OpenWindow, NULL );
-        XtAddCallback( xlfdDialog, XmNhelpCallback,(XtCallbackProc) quit,NULL );
-
-#if 0
-        XtAddCallback( errorMD,        XmNcancelCallback, (XtCallbackProc) quit, NULL);
-#endif /* 0 */
-
-    }
-    /*
-     * pop up select window
-     */
-Dprintf( stdout, "(PopupSelectXLFD)xlfdPopupDialog : start\n" ) ;
-    xlfdPopupDialog( xlfdDialog );
-Dprintf( stdout, "(PopupSelectXLFD)xlfdPopupDialog : end\n" ) ;
-Dprintf( stdout, " : end\n" ) ;
-
-}
-
-
-
-#undef SetLabel
diff --git a/cde/programs/dtudcexch/udcexc.c b/cde/programs/dtudcexch/udcexc.c
deleted file mode 100644 (file)
index 6d9a3c9..0000000
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: udcexc.c /main/4 1996/09/02 18:50:32 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#include "excutil.h"
-#include "xoakufont.h"
-#include "selectxlfd.h"
-#include <locale.h>
-#include <Xm/RowColumn.h>
-#include <Xm/ToggleB.h>
-#include <Xm/MessageB.h>
-#include <Xm/MainW.h>
-void callexpCB();
-void callimpCB();
-void exitCB();
-void helpCB();
-void udcexp();
-void udcimp();
-
-#define ERROR_1 errmsg_org[fal_utyerrno & 0xff]
-/*#define ERROR_1 fal_errmsg_org[fal_utyerrno & 0xff]*/
-/*#define ERROR_2 fal_errmsg_func[fal_utyerrno >>8]*/
-
-Widget toplevel, mainw;
-
-Exc_data *ed = NULL;
-ListData       *ld = NULL;
-char *maintitle;
-/*char *terminatemsg = "Do you want to terminate dtudcexch";*/
-
-/*
- * Error messages(by origin)
- * fal_errmsg_org
- */
-char   *errmsg_org[0xff];
-
-Rsrc resource ;
-
-#define Rchar(name, class, member,def){ \
-        name, class, XtRString, sizeof(char *), \
-        XtOffsetOf(Rsrc, member), XtRString, (XtPointer)def }
-
-Widget excCreateRadioButton(Widget parent, String name, String label,
-                           XtCallbackProc callback_func,
-                           XtPointer client_data)
-{
-    Widget     widget;
-    XmString   xms;
-
-    widget = XtVaCreateManagedWidget(name,
-                                    xmToggleButtonWidgetClass, parent,
-                                    XmNindicatorType, XmONE_OF_MANY,
-                                    NULL);
-    XtAddCallback(widget, XmNvalueChangedCallback,
-                 (XtCallbackProc) callback_func,
-                 (XtPointer) client_data);
-
-    xms = XmStringCreateLocalized(label);
-    XtVaSetValues(widget,
-                 XmNlabelString, xms,
-                 NULL);
-
-    XmStringFree(xms);
-
-    return (widget);
-}    
-
-int main(int argc, char * argv[])
-{
-    XtAppContext       app_context;
-    Widget             row, expfunc, impfunc, exit/*, help*/;
-    Arg                        args[20];
-    Cardinal           n;
-    static char                *explabel;
-    static char                *implabel;
-    static char                *exitlabel;
-/*    static char              helplabel[] = "Help";*/
-/*    char                msg1[] = "Failed in the start of dtudcexch";*/
-    char       err[128];
-    int                 ans;
-
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-
-/* appinitialize */
-    XtSetLanguageProc(NULL,NULL,NULL);
-    _DtEnvControl(0);
-    n = 0;
-    toplevel = XtAppInitialize(&app_context, "UDCexchange",
-                              (XrmOptionDescList) NULL,
-                              0, (int *) &argc, argv, (String *) NULL,
-                              args, n);
-
-    maintitle = GETMESSAGE(8, 2, "UDC data exchange utitlity");
-
-    errmsg_org[0] = GETMESSAGE(8, 4, "Fatal error occurred.");
-    errmsg_org[1] = GETMESSAGE(8, 6, "Cannot open the font file.");
-    errmsg_org[2] = GETMESSAGE(8, 8, "Cannot read the font file.");
-    errmsg_org[3] = GETMESSAGE(8, 10, "There is no more memory.");
-    errmsg_org[4] = GETMESSAGE(8, 12, "Fatal error occurred.");
-    errmsg_org[5] = GETMESSAGE(8, 14, "The specified font file does not exist.");
-    errmsg_org[6] = GETMESSAGE(8, 16, "This font is not a pcf or snf font.");
-    errmsg_org[7] = GETMESSAGE(8, 18, "Cannot open fonts.list file.");
-    errmsg_org[8] = GETMESSAGE(8, 20, "The format of fonts.list file is illegal.");
-    errmsg_org[9] = GETMESSAGE(8, 22, "The descriptions of the fonts.list file are incorrect.");
-    errmsg_org[10] = GETMESSAGE(8, 24, "The format of fonts.list file is illegal.");
-    errmsg_org[11] = GETMESSAGE(8, 26, "Cannot open fonts.dir file.");
-    errmsg_org[12] = GETMESSAGE(8, 28, "Cannot read fonts.dir file.");
-    errmsg_org[13] = GETMESSAGE(8, 30, "Cannot read font properties.");
-    errmsg_org[14] = GETMESSAGE(8, 32, "Cannot get FONT property.");
-    errmsg_org[15] = GETMESSAGE(8, 34, "Cannot get FAMILY_NAME property.");
-    errmsg_org[16] = GETMESSAGE(8, 36, "This font file is already opened by other application.");
-    errmsg_org[17] = GETMESSAGE(8, 38, "Cannot lock font file.");
-    errmsg_org[18] = GETMESSAGE(8, 40, "Cannot unlock font file.");
-    errmsg_org[19] = GETMESSAGE(8, 42, "Cannot get lock information from the font file.");
-    errmsg_org[20] = GETMESSAGE(8, 44, "Cannot find the specified font file.");
-    errmsg_org[21] = GETMESSAGE(8, 46, "Cannot read NLS database.");
-    errmsg_org[22] = GETMESSAGE(8, 48, "Cannot get charset names from NLS database.");
-    errmsg_org[23] = GETMESSAGE(8, 50, "Charset name not defined in NLS database.");
-    errmsg_org[24] = GETMESSAGE(8, 52, "The specified font has not been opened.");
-    errmsg_org[25] = GETMESSAGE(8, 54, "Fatal error occurred.");
-
-    resource.xlfd_label = GETMESSAGE(8, 56, "XLFD name          :" ),
-    resource.copy_xlfd_label = GETMESSAGE(8, 58, "Original font (XLFD name)  :");
-    resource.code_label = GETMESSAGE(8, 60, "UDC code area      :");
-    resource.style_label = GETMESSAGE(8, 62, "Style              :");
-    resource.size_label = GETMESSAGE(8, 64, "Size (letter size) :");
-    resource.exec_label = GETMESSAGE(8, 66, "Open");
-    resource.quit_label = GETMESSAGE(8, 68, "Cancel");
-    resource.ok_label = GETMESSAGE(8, 70, "OK");
-    resource.cancel_label = GETMESSAGE(8, 72, "cancel");
-    resource.copy_orgin = GETMESSAGE(8, 74, "Copy orgin code(hex)  :");
-    resource.copy_target = GETMESSAGE(8, 76, "Copy target code(hex) :");
-    resource.copy_label = GETMESSAGE(8, 78, "Copy");
-    resource.overlay_label = GETMESSAGE(8, 80, "Overlay");
-
-    explabel = GETMESSAGE(8, 82, "export function");
-    implabel = GETMESSAGE(8, 84, "import function");
-    exitlabel = GETMESSAGE(8, 86, "Cancel");
-
-/* initialize ed */
-    if ((ed = (Exc_data *) malloc(sizeof(Exc_data))) == NULL) {
-       excerror(ed, EXCERRMALLOC, "main", "exit");
-    }
-    memset(ed,0x00,sizeof(Exc_data));
-
-    ed->app = app_context;
-    ed->toplevel = toplevel;
-
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-       fprintf( stderr, "GetFontList Err\n" );
-       sprintf(err, "%s", ERROR_1);
-       AskUser(ed->toplevel, ed, err, &ans, "error");
-/*     AskUser(ed->toplevel, ed, msg1, &ans, "error");*/
-       excexit(ed);
-    }
-    FalFreeFontList(fontlist);
-
-
-/* make main window */
-    n = 0;
-    XtSetArg( args[n], XmNautoUnmanage, False ) ; n++ ;
-    XtSetArg(args[n], XmNtitle, maintitle); n++;
-    mainw = XmCreateTemplateDialog(toplevel, "mainw", args, n);
-
-    row = XtVaCreateManagedWidget("row", xmRowColumnWidgetClass, mainw,
-                                 XmNradioBehavior, True,
-                                 XmNradioAlwaysOne, True,
-                                 NULL);
-    expfunc = excCreateRadioButton(row, "expfunc", explabel,
-                                  (XtCallbackProc) callexpCB, (XtPointer) ed);
-
-    impfunc = excCreateRadioButton(row, "impfunc", implabel,
-                                  (XtCallbackProc) callimpCB, (XtPointer) ed);
-
-    exit = excCreatePushButton(mainw, "exit", exitlabel,
-                              (XtCallbackProc) exitCB, (XtPointer) ed);
-
-/*    help = excCreatePushButton(mainw, "help", helplabel,
-                              (XtCallbackProc) helpCB, (XtPointer) ed);
-*/
-    XtVaSetValues(mainw,
-                 XmNmessageWindow, exit,
-                 NULL);
-
-    XtManageChild(mainw);
-    
-/*    XtRealizeWidget(toplevel);*/
-
-    XtAppMainLoop(app_context);
-}
-
-void callexpCB(Widget widget, Exc_data * ed, XtPointer call_data)
-{
-    XtUnmanageChild(mainw);
-    udcexp(ed);
-}
-void callimpCB(Widget widget, Exc_data * ed, XtPointer call_data)
-{
-    XtUnmanageChild(mainw);
-    udcimp(ed);
-}
-void exitCB(Widget widget, Exc_data * ed, XtPointer call_data)
-{
-    excexit(ed);
-}
-/*void helpCB(Widget widget, Exc_data * ed, XtPointer call_data)
-{
-}*/
diff --git a/cde/programs/dtudcexch/udcexp.c b/cde/programs/dtudcexch/udcexp.c
deleted file mode 100644 (file)
index 5efef75..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: udcexp.c /main/5 1996/10/14 14:45:34 barstow $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#include "excutil.h"
-#include <Xm/MessageB.h>
-#include <Xm/RowColumn.h>
-#include <Xm/List.h>
-#include <Xm/Form.h>
-#include <Xm/Label.h>
-
-void   setselectedcode();
-
-extern char *maintitle;
-
-void udcexp(Exc_data * ed)
-{
-    ed->function = EXPORT;
-    strcpy(ed->bdfmode,"w");
-
-    PopupSelectXLFD(ed->toplevel);
-}
-
-void createbdf(Exc_data * ed)
-{
-    int i = 0;
-    char *comment_list[] = {""};
-    int comment_num = 0;
-    char *msg;
-    int        ans;
-
-    msg = GETMESSAGE(10, 2, "Failed to make the BDF file");
-
-    i =  ExpGpftoBDF(ed->fontfile, ed->bdffile,
-                    ed->code_num, ed->gpf_code_list,
-                    comment_num, comment_list, 0);
-    if (i != 0) {
-       AskUser(ed->toplevel, ed, msg, &ans, "error");
-    }
-    excterminate(ed);
-}
-
-void selcharokCB(Widget widget, ListData * ld, XtPointer call_data)
-{
-    int                num;
-    Exc_data   *ed;
-    int                ans;
-    char       *msg;
-
-    msg = GETMESSAGE(10, 4, "No indexes are selected");
-
-    XtVaGetValues(ld->list, XmNselectedItemCount, &num, NULL);
-    if (num == 0) {
-/*     AskUser(widget, ld->ed, msg, &ans, "error");*/
-       return;
-    } else {
-       setselectedcode(ld);
-       XtUnmanageChild(XtParent(widget));
-       ed = ld->ed;
-       freeld(ld);
-       getbdffn(ed);
-    }
-}
-void selcharcancelCB(Widget widget, ListData * ld, XtPointer call_data)
-{
-    Exc_data   *ed;
-
-    ed = ld->ed;
-    freeld(ld);
-    excterminate(ed);
-}
-
-XmString * setxmslist(ListData * ld)
-{
-    char       **cp;
-    XmString   *xmslist, *xmsp;
-    int                i;
-
-    if ((xmslist = (XmString *) calloc(ld->existcode_num, sizeof(XmString *)))
-       == NULL) {
-       excerror(ld->ed, EXCERRMALLOC, "setxmslist", "exit");
-    }
-    cp = ld->existcode_c;
-    xmsp = xmslist;
-    for (i = 0; i < ld->existcode_num; i++) {
-       *xmsp = XmStringCreateLocalized(*cp);
-       xmsp++;
-       cp++;
-    }
-    return (xmslist);
-}
-
-void freexmslist(ListData * ld, XmString * xmslist)
-{
-    XmString   *xmsp;
-    int                i;
-
-    if (xmslist != NULL) {
-       xmsp = xmslist;
-       for (i = 0; i < ld->existcode_num; i++) {
-           XmStringFree(*xmsp);
-           xmsp++;
-       }
-       free(xmslist);
-    }
-}
-
-void selcharcd(Exc_data * ed)
-{
-    Widget             mainw, selcd, ok, cancel;
-    Widget             slctLabel, form;
-    Arg                        args[20];
-    Cardinal           n;
-    char               *oklabel;
-    char               *cancellabel;
-    XmString           *xmslist;
-    extern ListData    *ld;
-    char               *p;
-
-    oklabel = GETMESSAGE(10, 6, "OK");
-    cancellabel = GETMESSAGE(10, 8, "Cancel");
-
-    n = 0;
-    XtSetArg(args[n], XmNautoUnmanage, False); n++;
-    XtSetArg(args[n], XmNtitle, maintitle); n++;
-    mainw = XmCreateTemplateDialog(ed->toplevel, "mainw", args, n);
-
-    n = 0;
-    form = XmCreateForm( mainw, "form", args, n);
-    XtManageChild(form);
-
-    p = GETMESSAGE(10, 10, "glyph indexes");
-    n = 0;
-    XtSetArg( args[n], XmNx,           20 ) ;  n++;
-    XtSetArg( args[n], XmNheight,       20 ) ; n++ ;
-    XtSetArg( args[n], XmNtopAttachment, XmATTACH_FORM ) ; n++ ;
-    XtSetArg( args[n], XmNtopOffset,    10 ) ; n++ ;
-    slctLabel = XmCreateLabel( form, p, args, n);
-    XtManageChild(slctLabel);
-
-    n = 0;
-    xmslist = setxmslist(ld);
-    XtSetArg( args[n], XmNleftAttachment,      XmATTACH_FORM ) ; n++ ;
-    XtSetArg( args[n], XmNleftOffset,  20 ) ;          n++ ;
-    XtSetArg( args[n], XmNtopAttachment,       XmATTACH_WIDGET ); n++ ;
-    XtSetArg( args[n], XmNtopOffset,   5 ) ;           n++ ;
-    XtSetArg( args[n], XmNwidth,       200 ) ;         n++ ;
-    XtSetArg (args[n], XmNtopWidget,   slctLabel );    n++;
-    XtSetArg(args[n], XmNitems, xmslist); n++;
-    XtSetArg(args[n], XmNitemCount, ld->existcode_num); n++;
-    XtSetArg(args[n], XmNvisibleItemCount, 10); n++;
-    XtSetArg(args[n], XmNlistSizePolicy, XmCONSTANT); n++;
-    XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAS_NEEDED); n++;
-    XtSetArg(args[n], XmNselectionPolicy, XmEXTENDED_SELECT); n++;    
-    selcd = XmCreateScrolledList(form, "Select codes", args, n);
-    freexmslist(ld, xmslist);
-    XtManageChild(selcd);
-
-    ld->list = selcd;
-
-    ok = excCreatePushButton(mainw, "ok", oklabel,
-                            (XtCallbackProc) selcharokCB, (XtPointer) ld);
-
-    cancel = excCreatePushButton(mainw, "cancel", cancellabel,
-                                (XtCallbackProc) selcharcancelCB,
-                                (XtPointer) ld);
-
-    XtManageChild(mainw);
-}
-
-void setselectedcode(ListData *ld)
-{
-    int                *position_list;
-    int                position_count;
-    int                i;
-    int                *codep;
-
-    XmListGetSelectedPos(ld->list, &position_list, &position_count);
-
-    ld->ed->code_num = position_count;
-    ld->ed->gpf_code_list = (int *) calloc(position_count, sizeof(int));
-    codep = ld->ed->gpf_code_list;
-
-    for (i = 0; i < position_count; i++) {
-       *codep = *((ld->existcode)+(position_list[i]-1));
-       codep++;
-    }
-}
diff --git a/cde/programs/dtudcexch/udcimp.c b/cde/programs/dtudcexch/udcimp.c
deleted file mode 100644 (file)
index a132e2b..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: udcimp.c /main/4 1996/09/02 18:51:02 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#include "excutil.h"
-#include "FaLib.h"
-void addcharptn();
-void setcodelists();
-
-extern ListData        *ld;
-extern int num_gr;
-extern FalGlyphRegion  *gr;
-extern FalFontData fullFontData;
-
-void udcimp(Exc_data * ed)
-{
-    ed->function = IMPORT;
-    strcpy(ed->bdfmode,"r");
-    getbdffn(ed);
-}
-
-int checkcode(int code)
-{
-    int i, j;
-    int code1, code2;
-
-    for (i = 0; i < num_gr; i++) {
-       code1 = smaller(gr[i].start, gr[i].end);
-       code2 = bigger(gr[i].start, gr[i].end);
-       if ((code >= code1) && (code <= code2)) { /*in udc area */
-           for (j = 0; j < ld->existcode_num; j++) {
-               if (code == ld->existcode[j])
-                   return (1); /* the font has same glyph index */
-           }
-           return (0);
-       }
-    }
-    return (-1); /* out of udc area */
-}
-       
-
-int checkcodes(int code_num, int * code_list)
-{
-    int *codep;
-    int i, ans;
-    int exist = 0;
-
-    codep = code_list;
-    for (i = 0; i < code_num; i++) {
-       ans = checkcode(*codep);
-       if (ans == -1) {
-           return (-1);
-       } else if (ans == 1) {
-           exist = 1;
-       }
-       codep++;
-    }
-    return (exist);
-}
-
-void getcharcd(Exc_data * ed)
-{
-    int        code_num;
-    int        *code_list;
-    int        i;
-    char *msg;
-    char *msg2;
-    char *msg3;
-    int        ans, ans2;
-
-    msg = GETMESSAGE(12, 2, "Glyph images in this BDF file can't be added to the font.");
-    msg2 = GETMESSAGE(12, 4, "Failed to open the selected BDF font. You have no right to access for the font file, or the format of the file is not consistent.");
-    msg3 = GETMESSAGE(12, 6, "There are one or more glyph images being overwritten. Overwrite?");
-
-    i = ImpBDFCodeList(ed->bdffile, &code_num, &code_list);
-
-    if (i != 0) { /* bad BDF format */
-       AskUser(ed->toplevel, ed, msg2, &ans, "error");
-       freeld(ld);
-       excterminate(ed);
-    }
-
-    ans2 = checkcodes(code_num, code_list);
-    if (ans2 == -1) { /* out of UDC code exists */
-       AskUser(ed->toplevel, ed, msg, &ans, "error");
-       freeld(ld);
-       excterminate(ed);
-    } else if (ans2 == 1) { /* font file has same glyph index */
-       AskUser(ed->toplevel, ed, msg3, &ans, "warning");
-       if (ans != 1) {
-           freeld(ld);
-           excterminate(ed);
-       }
-    }    
-
-/* set twe codelists */
-    setcodelists(ld, code_num, code_list);
-
-    if (ImpBDFCodeListFree(&code_list) != 0) {
-       fprintf(stderr,"error in ImpBDFCodeListFree\n");
-    }
-
-/* add gryph images to font */
-    addcharptn(ed);
-}
-
-void addcharptn(Exc_data * ed)
-{
-    int i;
-    int ans;
-    char *msg;
-    char *msg2;
-    char *msg3;
-
-    int mask;
-    FalFontDataList    *fulllist = NULL;
-    FalFontID          fontid;
-
-    msg = GETMESSAGE(12, 8, "Failed to open the selected font. You have no right to access for the font file, or the format of the file is not consistent.");
-    msg2 = GETMESSAGE(12, 10, "Glyph images in this BDF file can't be added to the font.");
-    msg3 = GETMESSAGE(12, 12, "Failed in the registration of the font file.");
-
-    mask =  FAL_FONT_MASK_XLFDNAME | FAL_FONT_MASK_GLYPH_INDEX |
-           FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UPDATE |
-           FAL_FONT_MASK_UNDEFINED | FAL_FONT_MASK_CODE_SET;
-
-    i = ImpBDFCheck(ed->bdffile, ed->fontfile);
-    if (i != 0) {
-       AskUser(ed->toplevel, ed, msg2, &ans, "error");
-       excterminate(ed);
-    }
-    
-    fontid = FalOpenSysFont(&fullFontData, mask, &fulllist);
-    if (fontid == 0) {
-       AskUser(ld->ed->toplevel, ld->ed, msg, &ans, "error");
-       excterminate(ed);
-    }
-    i = 0;
-    i = ImpBDFtoGpf(ed->bdffile, ed->fontfile,
-                   ed->code_num, ed->bdf_code_list);
-    FalCloseFont( fontid );
-    if (i != 0) {
-       AskUser(ed->toplevel, ed, msg3, &ans, "error");
-    }
-
-    excterminate(ed);
-}
-
-void setcodelists(ListData *ld, int code_num, int *code_list)
-{
-    int                *c1, *c2;
-    int                i;
-    Exc_data   *ed;
-
-    ld->ed->code_num = code_num;
-
-    if ((c1 = (int *) calloc(code_num, sizeof(int))) == NULL) {
-       ed = ld->ed;
-       freeld(ld);
-       excerror(ed, EXCERRMALLOC, "setcodelists", "exit");
-    }
-    ld->ed->bdf_code_list = c1;
-    c2 = code_list;
-    for (i = 0; i < code_num; i++)
-    {
-       *c1 = *c2;
-       c1++;
-       c2++;
-    }
-    
-    if ((c1 = (int *) calloc(code_num, sizeof(int))) == NULL) {
-       ed = ld->ed;
-       freeld(ld);
-       excerror(ed, EXCERRMALLOC, "setcodelists", "exit");
-    }
-    ld->ed->gpf_code_list = c1;
-    c2 = code_list;
-    for (i = 0; i < code_num; i++)
-    {
-       *c1 = *c2;
-       c1++;
-       c2++;
-    }
-}
diff --git a/cde/programs/dtudcexch/xlfdutil.c b/cde/programs/dtudcexch/xlfdutil.c
deleted file mode 100644 (file)
index 88bbfb1..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: xlfdutil.c /main/2 1996/10/14 14:45:50 barstow $ */
-/*
- *  All Rights Reserved, Copyright (c) FUJITSU LIMITED 1995
- *
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- *
- *  Authors: Seiya Miyazaki     FUJITSU LIMITED
- *           Hiroyuki Chiba     Fujitsu Basic Software Corporation
- *
- */
-
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <nl_types.h>
-
-#include <Xm/Xm.h>
-
-#include <Xm/Form.h>
-#include <Xm/PushB.h>
-#include <Xm/Text.h>
-#include <Xm/TextF.h>
-#include <Xm/Label.h>
-#include <Xm/SeparatoG.h>
-#include <Xm/List.h>
-#include <Xm/ToggleB.h>
-#include <Xm/MessageB.h>
-
-#include "FaLib.h"
-#include "falxlfd.h"
-
-#include "selectxlfd.h"
-
-#ifdef DEBUG
-#undef Dprintf
-#define Dprintf fprintf
-#else
-#define Dprintf
-#endif /* DEBUG */
-
-/*
- * parameters
- */
-static char* skipSpace() ;
-
-extern FalFontDataList         *font_L ;
-extern FalxFontDataBuff        KeyBuff ;
-extern FalxCodeList            *CodeList ;
-extern FalxStyleList           *StyleList ;
-extern FalxSizeList            *SizeList ;
-extern int                     SelectedOffset ;
-extern int                     getmask ;
-
-extern char    *fullPathName ;
-
-
-extern Widget  toplevel ;
-extern Widget
-       xlfdWform, cpyWform,
-       slctBLabel[BUTTONITEMS],slctBText[BUTTONITEMS], slctButton[BUTTONITEMS], 
-       listPop[BUTTONITEMS],   listW[BUTTONITEMS], 
-       errorMD, msgBox ;
-
-
-/****************************************************************
- * functions for get font infomation
-****************************************************************/
-
-int
-GetXLFDInfomations()
-{
-       Dprintf( stdout, "GetXLFDInfomations()\n" ) ;
-
-       /* initialize */
-       getmask         = 0 ;
-       SelectedOffset  = 0 ;
-       fullPathName    = NULL ;
-       FalxInitDataBuff( &KeyBuff ) ;
-
-       /* get UDC informations */
-       if( FalxGetFontList( &font_L, XtDisplayOfObject( toplevel ) ) ){
-               Dprintf( stderr, "GetXLFDInfomations() : FalxGetFontList() error.\n" ) ;
-               return(-1);
-       }
-
-       /* create code area list */
-       if( FalxCreateCodeList( &CodeList, font_L ) ){
-               Dprintf( stderr, "\nGetXLFDInfomations() : FalxCreateCodeList() error.\n" ) ;
-               return(-1);
-       }
-
-       /* create style list */
-       if( FalxCreateStyleList( &StyleList, font_L ) ){
-               Dprintf( stderr, "\nGetXLFDInfomations() : FalxCreateStyleList() error.\n" ) ;
-               return(-1);
-       }
-
-       /* create size list */
-       if( FalxCreateSizeList( &SizeList, font_L ) ){
-               Dprintf( stderr, "\nGetXLFDInfomations() : FalxCreateSizeList() error.\n" ) ;
-               return(-1);
-       }
-
-       return(0) ;
-}
-
-
-
-
-
-int
-GetItemsToDisplay( num, itemcnt, xms_list )
-int            num ;
-int            *itemcnt ;
-XmString       **xms_list ;
-{
-       int             i, j, cnt ;
-       char            *sp ,string[256], buf[256] ;
-       Arg             args[1];
-       int             length, maxlength ;
-       FalxXlfdList    *xlist ;
-
-       int             tmp_cnt ;
-       char            **tmp_dlist, *str ;
-       XmString        *xms ;
-       int             rlen ;
-       int             rtn ;
-
-
-       switch( num ){
-           case 0 :    /* XLFD         */
-               /* set key data         */
-               for( i=1; i<BUTTONITEMS; i++ ){
-                   if( (str = XmTextGetString( slctBText[i] )) == NULL ){
-                       exit(-1) ;
-                   }
-                   if( *str == ' ' || *str == NULL )   continue ;
-                   if( SetKeyBuff( i, str ) ){
-                       exit(-1) ;
-                   }
-               }
-               rtn = FalxGetXlfdList( &xlist, font_L, &KeyBuff, getmask ) ;
-               if( rtn )       return( rtn ) ;
-               tmp_cnt  = xlist->num ;
-               tmp_dlist = xlist->list ;
-               break ;
-           case 1 :    /* code area    */
-               tmp_cnt = CodeList->num ;
-               tmp_dlist = (char **)malloc( sizeof(char *) * tmp_cnt ) ;
-               if( tmp_dlist == NULL )         return(-1) ;
-               for( i=0; i<tmp_cnt; i++ ){
-                   sp = string ;
-                   rlen = sprintf( sp, "CS:%d ", (CodeList->dlist[i]->fontset) ) ;
-                   sp += rlen ;
-                   for( j=0; j<CodeList->dlist[i]->code_area_num; j++ ){
-                       rlen = sprintf( sp, "%x - %x ",
-                                CodeList->dlist[i]->alist[j]->udc_start,
-                                CodeList->dlist[i]->alist[j]->udc_end   ) ;
-                       sp += rlen ;
-                   }
-                   if( (tmp_dlist[i] = strdup( string )) == NULL ){
-                       return(-1) ;
-                   }
-               }
-               break ;
-           case 2 :    /* style        */
-               tmp_cnt  = StyleList->num ;
-               tmp_dlist = (char **)malloc( sizeof(char *) * tmp_cnt ) ;
-               for( i=0; i<tmp_cnt; i++ ){
-                   if( (tmp_dlist[i] = strdup( StyleList->list[i] )) == NULL ){
-                       return(-1) ;
-                   }
-               }
-               break ;
-           case 3 :    /* size         */
-               tmp_cnt = SizeList->num ;
-               tmp_dlist = (char **)malloc( sizeof(char *) * tmp_cnt ) ;
-               for( i=0; i<tmp_cnt; i++ ){
-                   sprintf( string, "%d ", SizeList->list[i] ) ;
-                   if( (tmp_dlist[i] = strdup( string )) == NULL ){
-                       return(-1) ;
-                   }
-               }
-               break ;
-           default :   /* error        */
-               return(-1) ;
-       }
-       if( (xms = (XmString *)calloc( tmp_cnt, sizeof(XmString) )) == NULL ){
-           return( -1 ) ;
-       }
-
-       /*
-       *       set list for display
-       */
-       maxlength = 0 ;
-               for ( i=0; i<tmp_cnt; i++ ){
-           xms[i] = XmStringCreateLocalized( tmp_dlist[i] );
-               }
-
-       /*
-       *       free allocated memory
-       */
-
-       switch( num ){
-           case 0 :    /* XLFD         */
-               FalxFreeXlfdList( xlist ) ;
-               break ;
-           case 1 :    /* code area    */
-           case 2 :    /* style        */
-           case 3 :    /* size         */
-               for( i=0; i<tmp_cnt; i++ ){
-                   free( tmp_dlist[i] ) ;
-               }
-               free( tmp_dlist ) ;
-               break ;
-           default :   /* error        */
-               return(-1) ;
-       }
-
-
-       *itemcnt  = tmp_cnt ;
-       *xms_list = xms ;
-
-       return(0) ;
-
-}
-
-
-
-
-static char*
-skipSpace( str, skipcnt )
-char   *str ;
-int    skipcnt ;
-{
-       int     i, spacecnt ;
-       char    *sp ;
-       int     len ;
-
-       if( *str == NULL )      return( NULL ) ;
-       len = strlen( str ) ;
-       sp = str ;
-       for( i=0,spacecnt=0; i<len-1; i++, sp++ ) {
-           if( *sp == NULL )   return( NULL ) ;
-           if( *sp == ' ' )    spacecnt++ ;
-           if( spacecnt == skipcnt )   break ;
-       }
-       sp++ ;
-       return( sp ) ;
-}
-
-
-
-
-int
-SetKeyBuff( num, str )
-int    num ;
-char   *str ;
-{
-       int     i, j ;
-       int     cdset, start, end ;
-       FalxUdcArea     *tmp_list ;
-       char    hyp, *sp ;
-
-       switch( num ){
-           case 0 :            /* XLFD         */
-               KeyBuff.FontData.xlfdname = str ;
-               break ;
-           case 1 :            /* code area    */
-               getmask |= FAL_FONT_MASK_CODE_SET ;
-               if( KeyBuff.FileData.list != NULL ){
-                   free( KeyBuff.FileData.list ) ;
-               }
-               KeyBuff.FileData.list   = NULL ;
-               tmp_list                = NULL ;
-
-               sp = str ;
-               if( sscanf( sp, "CS:%d ", &cdset ) != 1 ){
-                       return(-1) ;
-               }
-               if( (sp = skipSpace( sp, 1 )) == NULL ) return( -1 ) ;
-               num = 0 ;
-               KeyBuff.FontData.cd_set = cdset ;
-               while( sscanf( sp, "%x %c %x ", &start, &hyp, &end ) == 3 ){
-                   if( hyp != '-' )    break ;
-                   if( tmp_list == NULL ){
-                       tmp_list = (FalxUdcArea *)malloc( sizeof(FalxUdcArea) ) ;
-                   }else{
-                       tmp_list = (FalxUdcArea *)realloc( KeyBuff.FileData.list,
-                                        sizeof(FalxUdcArea) * (num+1) ) ;
-                   }
-                   if( tmp_list == NULL )      return(-1) ;
-                   tmp_list[num].udc_start = (int)start ;
-                   tmp_list[num].udc_end   = (int)end   ;
-                   num ++ ;
-                   if( (sp = skipSpace( sp, 3 )) == NULL )     break  ;
-               }
-               if( num == 0 )  return(-1) ;
-               KeyBuff.FileData.code_area_num  = num ;
-               KeyBuff.FileData.list           = tmp_list ;
-               break ;
-           case 2 :            /* style        */
-               getmask |= FAL_FONT_MASK_STYLE_NAME ;
-               KeyBuff.FontData.style.name = str ;
-               break ;
-           case 3 :            /* size         */
-               getmask |= FAL_FONT_MASK_LETTER_W ;
-               getmask |= FAL_FONT_MASK_LETTER_H ;
-               KeyBuff.FontData.letter.w = atoi( str ) ;
-               KeyBuff.FontData.letter.h = atoi( str ) ;
-               break ;
-           default :
-               return(-1) ;
-       }
-       return(0);
-}
-
-
diff --git a/cde/programs/dtudcfonted/Imakefile b/cde/programs/dtudcfonted/Imakefile
deleted file mode 100644 (file)
index 36befed..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Imakefile 1.8 - Fujitsu source for CDEnext    96/06/10 13:34:37      */
-/* $TOG: Imakefile /main/20 1997/04/30 15:51:07 samborn $ */
-
-   LOCAL_XLIBPATH =
-
-      DESTDIR     = $(CDE_INSTALLATION_TOP)
-          BINDIR  = /bin
-
-UDC_INC_PATH1     =  -I./
-UDC_INC_PATH2     =  -I./include
-UDC_INC_PATH3     =  -I./libfal
-UDC_INC_PATH4     =  -I./libfal/include
-
-UDC_INC_PATH5     =  -I$(DTSVCSRC)/DtXpm
-UDC_INC_PATH6     =  -I$(TOP)/../x11/xc
-
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-
-DEFINES = $(OPT2)
-
-     INCLUDES     =    $(UDC_INC_PATH1)\
-                       $(UDC_INC_PATH2)\
-                       $(UDC_INC_PATH3)\
-                       $(UDC_INC_PATH4)\
-                       $(UDC_INC_PATH5)\
-                       $(UDC_INC_PATH6)
-
-        DEPLIBS   = $(DEPDTSVCLIB) $(DEPTTLIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB)
-LOCAL_LIBRARIES   = $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) ./libfuty/liboakfuty.a ./libfal/libfal.a
-
-
-         SRCS     = comsub.c cpyw.c mtfgui.c ufont.c util.c\
-                    selectx.c cpyx.c xutil.c code.c
-
-         OBJS     = comsub.o ufont.o cpyw.o mtfgui.o util.o\
-                    cpyx.o xutil.o selectx.o code.o
-
-/* Sun needs the widechar library */
-#ifdef SunArchitecture
-SYS_LIBRARIES = DtClientSysLibs -lw
-#else
-SYS_LIBRARIES = DtClientSysLibs
-#endif
-
-#define IHaveSubdirs
-#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
-
-SUBDIRS = \
-       libfal          \
-       libfuty         \
-       dtaddcpf        \
-       dtbdftocpf      \
-       dtcpftobdf      \
-       dtcpftogpf      \
-       dtcpgpf         \
-       dtgpftobdf      \
-       dtgpftocpf      \
-       dtlsgpf
-
-MakeSubdirs($(SUBDIRS))
-DependSubdirs($(SUBDIRS))
-
-ComplexProgramTarget(dtudcfonted)
-
-install::
-       @if [ -d $(DESTDIR)/app-defaults/C ]; then set +x; \
-       else (set -x; $(MKDIRHIER) $(DESTDIR)/app-defaults/C); fi ; \
-       if [ -d $(DESTDIR)/app-defaults/ja_JP ]; then set +x; \
-       else (set -x; $(MKDIRHIER) $(DESTDIR)/app-defaults/ja_JP); fi ; \
-       if [ -f $(DESTDIR)/app-defaults/C/Dtudcfonted ]; then set +x; \
-       else (set +x ; echo "installing" "in $(DESTDIR)/app-defaults/C" ; \
-       $(CP) ./resource/Dtudcfonted $(DESTDIR)/app-defaults/C; \
-       chmod 0444 $(DESTDIR)/app-defaults/C/Dtudcfonted); fi ; \
-       if [ -f $(DESTDIR)/app-defaults/ja_JP/Dtudcfonted ]; then set +x; \
-       else (set +x ; echo "installing" "in $(DESTDIR)/app-defaults/ja_JP" ; \
-       $(CP) ./resource/Dtudcfonted.ja_JP $(DESTDIR)/app-defaults/ja_JP/Dtudcfonted; \
-       chmod 0444 $(DESTDIR)/app-defaults/ja_JP/Dtudcfonted); fi
diff --git a/cde/programs/dtudcfonted/README b/cde/programs/dtudcfonted/README
deleted file mode 100644 (file)
index bb90ae4..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-$XConsortium: README /main/3 1996/07/04 02:23:02 cde-fuj $
-UDC font editor and UDC data exchange utility README
-
-
-1) Environment
-
-1.1) XLOCALEDIR environment variable
-
-       - If the NLS database ("XLC_LOCALE" files) locates
-       in different directory from where specified at building 
-       time, set the full path name of the correct directory to
-       the XLOCALEDIR environment variable.
-
-1.2) Editable Fonts
-
-       - Currently, only jisx0208 fonts in Japanese locale is 
-       defined in NLS database to have UDC. So the dtudcfonted
-       will not show the edit view in other locales than Japanese.
-
-       - If the "fonts.list" file exists in the directories showed 
-       below, dtudcfonted and dtudcexch read and get directories
-       from this file to search fonts.
-
-               /usr/dt/config/
-               /usr/dt/config/$LANG
-               $DTUDCFONTS/
-               $DTUDCFONTS/$LANG
-
-       - If the system place fonts in different directories other
-       than listed in this file, you need to add them in it.
-
diff --git a/cde/programs/dtudcfonted/code.c b/cde/programs/dtudcfonted/code.c
deleted file mode 100644 (file)
index d7fa9dd..0000000
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* code.c 1.37 - Fujitsu source for CDEnext    96/10/30 13:13:47      */
-/* $XConsortium: code.c /main/6 1996/11/08 01:57:21 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-#include       <stdio.h>
-#include       <string.h>
-#include       <X11/keysym.h>
-#include       <Xm/Xm.h>
-#include       <Xm/Label.h>
-#include       <Xm/List.h>
-#include       <Xm/RowColumn.h>
-#include       <Xm/SeparatoG.h>
-#include        <Xm/Text.h>
-#include        <Xm/PushB.h>
-#include        <Xm/Frame.h>
-#include        <Xm/Form.h>
-#include       <Xm/MwmUtil.h>
-#include       <X11/Intrinsic.h>
-#include       "falfont.h"
-#include       "xoakufont.h"
-
-#define NUM 0x80
-
-static Display *display=NULL;
-static int     screen;
-static Boolean open_font;
-static Widget toggle[NUM];
-static Widget text;
-static Window BaseW;
-static Widget set_widget;
-static Widget code_w=0;
-static int font_w, font_h;
-static unsigned long fg, bg;
-static unsigned char *ptn, *clr;
-static Pixmap no_pix;
-static int len, code1;
-static char *FontName=NULL;
-static FalFontID       fid;
-
-extern FalFontID font_id;
-extern int CodePoint;
-extern Resource resource;
-
-static void
-OpenFont()
-{
-    int                        mask;
-    FalFontData     font_data;
-    static FalFontDataList     *copylist;
-    extern FalFontData  fullFontData;
-
-    if(strcmp(FontName, fullFontData.xlfdname) == 0) {
-       fid = font_id;
-        return;
-    }
-    mask =  FAL_FONT_MASK_XLFDNAME | FAL_FONT_MASK_DEFINED |
-                                       FAL_FONT_MASK_UNDEFINED;
-    font_data.xlfdname = FontName;
-    if (! CodePoint) {
-       mask |= FAL_FONT_MASK_GLYPH_INDEX;
-    }
-
-    fid = FalOpenSysFont(&font_data, mask, &copylist);
-}
-
-static void
-CloseFont()
-{
-    if (fid != font_id) {
-        FalCloseFont(fid);
-       fid = 0;
-    }
-}
-
-static void
-DrawCode(w, low_code)
-Widget w;
-int low_code;
-{
-    int hi_code;
-    char *f = NULL;
-    XImage image;
-    GC gc = XDefaultGC(display, 0);
-
-    hi_code = (code1 & 0xff) << 8;
-    image.width = font_w;
-    image.height = font_h;
-    image.xoffset = 0;
-    image.format = XYBitmap;
-    image.byte_order = LSBFirst;
-    image.bitmap_unit = 8;
-    image.bitmap_bit_order = MSBFirst;
-    image.bitmap_pad = 8;
-    image.depth = 1;
-    image.bytes_per_line = (font_w - 1) / 8 + 1;
-    XSetForeground(display, gc, fg);
-    XSetBackground(display, gc, bg);
-
-    if (open_font) {
-       f = (char *)FalReadFont(fid, hi_code | low_code, font_w, font_h);
-       if(f == NULL || f == (char *)FAL_ERROR) {
-           return;
-       }
-       if( EXISTS_FLAG == 0 ) {
-           memcpy(ptn, f, len);
-           image.data = (char *)ptn;
-       } else {
-           image.data = (char *)clr;
-       }
-       XPutImage(display, XtWindow(toggle[low_code]), gc, &image, 0, 0, 6, 6, font_w, font_h);
-    } else {
-       if (ptnGet(hi_code | low_code, ptn) == 0) {
-           image.data = (char *)ptn;
-       } else {
-           image.data = (char *)clr;
-       }
-       XPutImage(display, XtWindow(toggle[low_code]), gc, &image, 0, 0, 6, 6, font_w, font_h);
-    }
-}
-
-static void
-SetPixmap(start_code)
-{
-    int hi_code, low_code;
-    char *f = NULL;
-    XImage image;
-    GC gc = XDefaultGC(display, 0);
-
-    hi_code = (start_code & 0xff) << 8;
-    image.width = font_w;
-    image.height = font_h;
-    image.xoffset = 0;
-    image.format = XYBitmap;
-    image.byte_order = LSBFirst;
-    image.bitmap_unit = 8;
-    image.bitmap_bit_order = MSBFirst;
-    image.bitmap_pad = 8;
-    image.depth = 1;
-    image.bytes_per_line = (font_w - 1) / 8 + 1;
-    XSetForeground(display, gc, fg);
-    XSetBackground(display, gc, bg);
-
-    if (open_font) {
-       for (low_code=0; low_code < NUM; low_code++) {
-           f = (char *)FalReadFont(fid, hi_code | low_code, font_w, font_h);
-           if(f == NULL || f == (char *)FAL_ERROR) {
-               return;
-           }
-           if( EXISTS_FLAG == 0 ) {
-               memcpy(ptn, f, len);
-               image.data = (char *)ptn;
-           } else {
-               image.data = (char *)clr;
-           }
-           XPutImage(display, XtWindow(toggle[low_code]), gc, &image, 0, 0, 6, 6, font_w, font_h);
-       }
-    } else {
-       for (low_code=0; low_code < NUM; low_code++) {
-           if (ptnGet(hi_code | low_code, ptn) == 0) {
-               image.data = (char *)ptn;
-           } else {
-               image.data = (char *)clr;
-           }
-           XPutImage(display, XtWindow(toggle[low_code]), gc, &image, 0, 0, 6, 6, font_w, font_h);
-       }
-    }
-}
-
-static void
-Code1Call(w, start_code, data)
-Widget w;
-int start_code;
-XmListCallbackStruct *data;
-{
-    code1 = start_code + data->item_position -1;
-    SetPixmap(code1);
-}
-
-static void
-Code2Call(w, code2, data)
-Widget w;
-int code2;
-XmPushButtonCallbackStruct *data;
-{
-    char asc[16];
-    sprintf(asc, "%2.2X%2.2X", code1, code2);
-    XtVaSetValues(text, XmNvalue, asc, NULL);
-    DrawCode(w, code2);
-}
-
-static void
-PrevPage(w, scroll)
-Widget w, scroll;
-{
-    int *list;
-    int num;
-    if (XmListGetSelectedPos(scroll, &list, &num)) {
-        if(list[0] > 1) {
-           XmListSelectPos(scroll, list[0] - 1, True);
-           XmListSetPos(scroll, list[0] - 1);
-       }
-    }
-}
-
-static void
-NextPage(w, scroll)
-Widget w, scroll;
-{
-    int *list;
-    int num, item;
-    XtVaGetValues(scroll, XmNitemCount, &item, NULL);
-    if (XmListGetSelectedPos(scroll, &list, &num)) {
-        if(list[0] < item) {
-           XmListSelectPos(scroll, list[0] + 1, True);
-           XmListSetBottomPos(scroll, list[0] + 1);
-       }
-    }
-}
-
-static void
-Cancel()
-{
-    XtUnmapWidget(XtParent(code_w));
-}
-
-static void
-Apply()
-{
-    char *asc;
-    XtVaGetValues(text, XmNvalue, &asc, NULL);
-    XtVaSetValues(set_widget, XmNvalue, asc, NULL);
-    XtFree(asc);
-    Cancel();
-}
-
-static void
-CreateItem(item, item_count, start_code)
-XmString *item;
-int *item_count;
-int *start_code;
-{
-    int count;
-    int start, end;
-    char str[5];
-    FalFontinfo         finfo;
-    extern int begin_code, last_code;
-
-    if (open_font) {
-       if (FalQueryFont(fid, &finfo) == FAL_ERROR) {
-            *item_count = 0;
-           CloseFont();
-           return;
-       }
-       font_w = finfo.width;
-       font_h = finfo.height;
-       start = (finfo.top & 0xff00) >> 8;
-       end = (finfo.bottom & 0xff00) >> 8;
-    } else {
-       font_w = edg.width;
-       font_h = edg.height;
-       start = (begin_code & 0xff00) >> 8;
-       end = (last_code & 0xff00) >> 8;
-    }
-    if (CodePoint) {
-       if (start < 0x80)
-           start = 80;
-       if (end < 0x80)
-           start = 80;
-    } else {
-       if (start > 0x7f)
-           start = 0x7f;
-       if (end > 0x7f)
-           end = 0x7f;
-    }
-    *start_code = start;
-    for (count=0;start <= end; start++, count++) {
-       sprintf(str, "%X", start);
-       item[count] = XmStringCreateLocalized(str);
-    }
-    *item_count = count;
-}
-
-static Widget
-CreateCodeWindow(w)
-Widget w;
-{
-    Widget top, base1, base2, base3, base4;
-    Widget frame, scroll, label, sep, form;
-    Widget push1, push2, push3, push4;
-    Arg args[16];
-    int n, i;
-    XmString item[128];
-    XmString xcs;
-    int item_count, start_code, add_c;
-    char add[9];
-
-    n = 0;
-    XtSetArg(args[n], XmNmwmFunctions, MWM_FUNC_ALL | MWM_FUNC_CLOSE |
-                                       MWM_FUNC_RESIZE); n++;
-    XtSetArg(args[n], XmNmwmDecorations, MWM_DECOR_ALL); n++;
-    top = XmCreateFormDialog(w, "code", args, n);
-    
-    base1 = XtVaCreateManagedWidget("base1", xmRowColumnWidgetClass, top,
-                                       XmNorientation, XmVERTICAL, NULL);
-
-    frame = XtVaCreateManagedWidget("frame", xmFrameWidgetClass, base1,
-                                       NULL);
-
-    base2 = XtVaCreateManagedWidget("base2", xmRowColumnWidgetClass, frame,
-                                       XmNorientation, XmHORIZONTAL, NULL);
-
-    CreateItem(item, &item_count, &start_code);
-    code1 = start_code;
-    n = 0 ;
-    XtSetArg(args[n], XmNitems, item); n++;
-    XtSetArg(args[n], XmNitemCount, item_count); n++;
-    XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmSTATIC); n++;
-    scroll = XmCreateScrolledList(base2, "scroll", args, n);
-    XtManageChild(scroll);
-    XtAddCallback(scroll, XmNbrowseSelectionCallback,
-                       (XtCallbackProc)Code1Call, (XtPointer) (intptr_t) start_code);
-    XtAddCallback(scroll, XmNdefaultActionCallback,
-                       (XtCallbackProc)Code1Call, (XtPointer) (intptr_t) start_code);
-    XmListSelectPos(scroll, 1, False);
-
-    base3 = XtVaCreateManagedWidget("base3", xmRowColumnWidgetClass, base2,
-                                       XmNorientation, XmHORIZONTAL,
-                                       XmNpacking, XmPACK_COLUMN,
-                                       XmNradioAlwaysOne, True,
-                                       XmNradioBehavior , True,
-                                       XmNmarginHeight, 0,
-                                       XmNmarginWidth, 0,
-                                       XmNspacing, 0,
-                                       XmNnumColumns, 9, NULL);
-
-
-    len = (font_w / 8 + 1) * font_h;
-    ptn = (unsigned char *) malloc(len);
-    clr = (unsigned char *) malloc(len);
-    memset(clr, 0, len);
-    XtVaGetValues(w, XmNforeground, &fg, XmNbackground, &bg, NULL);
-    no_pix = XCreatePixmapFromBitmapData(display, BaseW, (char *)clr,
-               font_w, font_h, fg, bg, DefaultDepth(display, screen));
-
-    XtVaCreateManagedWidget("", xmLabelWidgetClass, base3, NULL);
-    for (i=0; i < 16; i++) {
-       sprintf(add, "%2.1X", i);
-       XtVaCreateManagedWidget(add, xmLabelWidgetClass, base3, NULL);
-    }
-    if (CodePoint)
-       add_c = 8;
-    else
-       add_c = 0;
-    for (i=0; i < NUM; i++) {
-       if ((i % 16) == 0) {
-           snprintf(add, sizeof(add), "%2.1X", add_c++);
-           XtVaCreateManagedWidget(add, xmLabelWidgetClass, base3, NULL);
-       }
-       toggle[i] = XtVaCreateWidget("toggle",
-                                       xmPushButtonWidgetClass, base3,
-                                       XmNwidth, font_w,
-                                       XmNheight, font_h,
-                                       XmNlabelType, XmPIXMAP,
-                                       XmNlabelPixmap, no_pix, NULL);
-       XtAddCallback(toggle[i], XmNactivateCallback,
-                               (XtCallbackProc)Code2Call, (XtPointer) (intptr_t) i);
-       XtAddCallback(toggle[i], XmNarmCallback,
-                               (XtCallbackProc)DrawCode, (XtPointer) (intptr_t) i);
-       XtAddCallback(toggle[i], XmNdisarmCallback,
-                               (XtCallbackProc)DrawCode, (XtPointer) (intptr_t) i);
-       XtAddEventHandler(toggle[i], ExposureMask, False,
-                               (XtEventHandler)DrawCode, (XtPointer) (intptr_t) i);
-    }
-    XtManageChildren(toggle, NUM);
-
-    base4 = XtVaCreateManagedWidget("base4", xmFormWidgetClass, base1, NULL);
-
-    xcs = XmStringCreateLocalized(resource.l_code);
-    label = XtVaCreateManagedWidget("code", xmLabelWidgetClass, base4,
-                                       XmNlabelString, xcs,
-                                       XmNleftAttachment, XmATTACH_POSITION,
-                                       XmNleftPosition, 30, NULL);
-
-    text = XtVaCreateManagedWidget("text", xmTextWidgetClass, base4,
-                                       XmNeditable, False,
-                                       XmNcursorPositionVisible, False,
-                                       XmNcolumns, 4,
-                                       XmNleftAttachment, XmATTACH_WIDGET,
-                                       XmNleftWidget, label, NULL);
-
-    sep = XtVaCreateManagedWidget("sep", xmSeparatorGadgetClass, base1,
-                                       XmNorientation, XmHORIZONTAL, NULL);
-
-    form = XtVaCreateManagedWidget("sep", xmFormWidgetClass, base1, NULL);
-
-    xcs = XmStringCreateLocalized(resource.previous);
-    push1 = XtVaCreateManagedWidget("PreviousPage", xmPushButtonWidgetClass, form,
-                                       XmNleftAttachment, XmATTACH_POSITION,
-                                       XmNlabelString, xcs,
-                                       XmNleftPosition, 10, NULL);
-    XtAddCallback(push1, XmNactivateCallback,
-                               (XtCallbackProc)PrevPage, (XtPointer)scroll);
-    XmStringFree(xcs);
-
-    xcs = XmStringCreateLocalized(resource.next);
-    push2 = XtVaCreateManagedWidget("NextPage", xmPushButtonWidgetClass, form,
-                                       XmNleftAttachment, XmATTACH_POSITION,
-                                       XmNlabelString, xcs,
-                                       XmNleftPosition, 35, NULL);
-    XtAddCallback(push2, XmNactivateCallback,
-                               (XtCallbackProc)NextPage, (XtPointer)scroll);
-    XmStringFree(xcs);
-
-    xcs = XmStringCreateLocalized(resource.apply);
-    push3 = XtVaCreateManagedWidget("Apply", xmPushButtonWidgetClass, form,
-                                       XmNleftAttachment, XmATTACH_POSITION,
-                                       XmNlabelString, xcs,
-                                       XmNleftPosition, 60, NULL);
-    XtAddCallback(push3, XmNactivateCallback, (XtCallbackProc)Apply, NULL);
-    XmStringFree(xcs);
-
-    xcs = XmStringCreateLocalized(resource.l_cancel);
-    push4 = XtVaCreateManagedWidget("Cancel", xmPushButtonWidgetClass, form,
-                                       XmNleftAttachment, XmATTACH_POSITION,
-                                       XmNlabelString, xcs,
-                                       XmNleftPosition, 80, NULL);
-    XtAddCallback(push4, XmNactivateCallback, (XtCallbackProc)Cancel, NULL);
-    XmStringFree(xcs);
-
-    return(top);
-}
-
-void
-CodeWindow(widget, font_name, load_font)
-    Widget     widget;
-    char *     font_name;
-    Boolean    load_font;
-{
-    static Boolean     old_load_font;
-    extern int CodePoint;
-
-    set_widget = widget;
-
-    BaseW = XtWindow(widget);
-    display = XtDisplay(widget);
-    screen  = DefaultScreen(display);
-    if (FontName == NULL || strcmp(font_name, FontName) ||
-                               load_font != old_load_font) {
-       old_load_font = load_font;
-       if (code_w) {
-           XtDestroyWidget(code_w);
-           code_w = 0;
-           free(ptn);
-           free(clr);
-           if (fid != 0) {
-               CloseFont();
-           }
-       }
-       if (FontName)
-           free(FontName);
-       FontName = (char *)malloc(strlen(font_name)+1);
-       strcpy(FontName, font_name);
-
-       if (load_font) {
-           OpenFont();
-           if (fid == 0)
-               return;
-           open_font = True;
-       } else {
-           open_font = False;
-       }
-
-       code_w = CreateCodeWindow(widget);
-        XtManageChild(code_w);
-    } else {
-        XtMapWidget(XtParent(code_w));
-    }
-}
diff --git a/cde/programs/dtudcfonted/comsub.c b/cde/programs/dtudcfonted/comsub.c
deleted file mode 100644 (file)
index 5692781..0000000
+++ /dev/null
@@ -1,1612 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* comsub.c 1.36 - Fujitsu source for CDEnext    96/09/09 15:30:40      */
-/* $XConsortium: comsub.c /main/8 1996/09/19 19:36:37 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include <stdio.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <math.h>
-#include <locale.h>
-
-#include <X11/Intrinsic.h>
-#include "fssxeg.h"
-#include "falfont.h"
-#include "ufontrsrc.h"
-
-static void writePtn();
-static void sig_receive();
-char   *get_cmd_path() ; 
-
-extern Resource resource;
-
-/***********************************************************************
- manage the character patterns 
- **********************************************************************/
-
-#define        GUADDPTNN       100     /* number of charcters for memory allocation  */
-/* this structure corresopnds to single font file */
-typedef struct {               /* area to manage character patterns    */
-    char       flag;           /* invalid(=0)/valid(=1)                */
-    int                width;          /* pattern width                        */
-    int                height;         /* pattern height                       */
-    int                nptn;           /* number of characters in editting     */
-    int                nmaxptn;        /* maximum number of characters in editting */
-    int                ptnsize;        /* size per byte of single pattern      */
-    UINT       ptnmemsize;     /* size of memory of whole patterns     */
-    USHORT     *ntoc;          /* character list / relative code       */
-    USHORT     *ctop;          /* relative code / bitmap area          */
-    char       *ptn;           /* pointer to the bimap area            */
-    int        cptnnum;                /* current pattern number               */
-} PATTERN_MNG;
-
-static PATTERN_MNG     pm;             /* Pattern_Manage */
-
-/* selection window for XLFD */
-extern  FalFontData     fullFontData;
-extern  FalFontData     copyFontData;
-extern int CodePoint;
-
-char                   *fullpath=NULL;
-int                    begin_code=0, last_code=0;
-
-FalCodeRegion  CodeArea[10];
-char           AreaStr[160];
-
-#define FAL_ERROR_STR resource.falerrmsg[((fal_utyerrno & 0xff) > 25) ? 0 : (fal_utyerrno & 0xff)]
-
-FalFontID              font_id;
-
-static char *
-get_locale()
-{
-    char *loc;
-
-    if ((loc = getenv("LANG")) != NULL) {
-       return(loc);
-    } else {
-       return("C");
-    }
-}
-
-/* contents :  convert the sequential number in the editor into 
- *             relative code in the system area 
- * values   :  -1   : terminated abnormally 
- *             else : relative code 
- */
-
-int
-ptnSqToNo( num )
-int    num;                    /* sequential number    */
-{
-    if( (pm.flag == 0) || (num >= pm.nptn) )
-       return( -1 );
-
-    return( pm.ntoc[num] );
-}
-
-
-
-
-/* contents :  convert the relative code in the system area into 
- *             sequential number in the editor 
- * values   :  -1   : terminated abnormally 
- *             else : sequential number 
- */
-
-int
-ptnNoToSq( ncode )
-int    ncode;                  /* relative code        */
-{
-    int                sq;
-
-    if( pm.flag == 0 )
-       return( -1 );
-
-    for( sq=0   ; sq < pm.nptn   ; sq++ ) {
-       if( pm.ntoc[sq] == ncode )
-           return( sq );
-    }
-
-    return( -1 );
-}
-
-
-
-
-/*
- * contents : convert the character code into relative code 
- * values   : relative code 
- * caution  : There is no security against unusal character code. 
- */
-
-int
-codeToNo( code )
-int    code;                   /* character code */
-{
-    return( code - begin_code);
-}
-
-
-
-
-/*
- * contents : convert the relative code into character code 
- * values   : character code 
- * caution  : There is no security against unusal character code. 
- */
-
-int
-noToCode( sno )
-int    sno;                    /* relative code */
-{
-    return( sno + begin_code);
-}
-
-
-/*
- * contents : judge the input code with the system defined character area 
- * values   : 0 : in the system defined area 
- *          -1 : not in the system defined area
- */
-
-int
-codeCheck( code )
-int    code;
-{
-    if (code < begin_code || code > last_code) {
-       return( -1 );
-    }
-    return( 0 );
-}
-
-/*
- * contents : allocate memories for character patterns
- *
- * values   :  ID : sequential number of the area
- *             -1 : terminated abnormally 
- */
-
-static int
-ptnOpen(n, maxc, width, height)
-int    n;                      /* initial number of charcters  */
-int    maxc;
-int    width;                  /* pattern width                */
-int    height;                 /* pattern height               */
-{
-    int                i;
-    int                fpsize;
-
-    if( (n < 0) || (width <= 0) || (height <= 0) )
-       return( -1 );
-
-    if( pm.flag != 0 ) {
-       return( -1 );
-    }
-
-    pm.width   = width;
-    pm.height  = height;
-    pm.nptn    = 0;
-    pm.nmaxptn = n + GUADDPTNN;
-    pm.ptnsize = height * ((width+7)/8);
-    fpsize = pm.ptnsize + 1;
-    pm.ptnmemsize = (UINT) ( fpsize * pm.nmaxptn ) ;
-
-    if(( pm.ntoc = (USHORT *)calloc(maxc, sizeof(USHORT)) ) == NULL) {
-       return( -1 );
-    }
-    if(( pm.ctop = (USHORT *)calloc(maxc, sizeof(USHORT)) ) == NULL ) {
-       free( pm.ntoc );
-       return( -1 );
-    }
-    if(( pm.ptn  = (char   *)malloc(fpsize*pm.nmaxptn) ) == NULL ) {
-       free( pm.ctop );
-       free( pm.ntoc );
-       return( -1 );
-    }
-
-    for( i=0   ; i < maxc   ; i++ ) {
-       pm.ntoc[i] = 0xFFFF;
-       pm.ctop[i] = 0xFFFF;
-    }
-    /* set null to each character pattern area */
-    for( i=0   ; i < pm.nmaxptn   ; i++ ) {
-       pm.ptn[fpsize * i] = 0;
-    }
-    pm.cptnnum = 0;
-    pm.flag = 1;
-
-    return( 0 );
-}
-
-
-
-
-/*
- * contents :  set free memories for character patterns
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally 
- */
-
-int
-ptnClose()
-{
-    if( pm.flag == 0 ) {
-       return( -1 );
-    }
-    pm.flag = 0;
-    free( pm.ntoc );
-    free( pm.ctop );
-    free( pm.ptn );
-
-    return( 0 );
-}
-
-
-
-
-/*
- * contents :  add character pattern to the character management area 
- *
- * values   :  0  : same code was exists and replaced it 
- *             1  : add new pattern 
- *             -1 : terminated abnormally
- */
-
-int
-ptnAdd( code, ptn )
-int    code;                   /* code to be add       */
-char   *ptn;                   /* pointer to the pattern */
-{
-    int                fpsize;
-    int                ncode;
-    USHORT     pno;
-    char       *pf;
-    char       *pp;
-    int                i;
-    char       *re_ptn;
-    UINT       re_ptnmemsize;
-    int                cpn;
-
-    if( pm.flag == 0 )
-       return( -1 );
-
-    fpsize = pm.ptnsize + 1;
-    ncode = codeToNo( code );
-
-    if( (pno = pm.ctop[ncode]) != 0xFFFF ) {
-       pf = pm.ptn + fpsize*pno;
-       pp = pf + 1;
-       for( i=0   ; i < pm.ptnsize   ; i++ ) 
-           pp[i] = ptn[i];
-       return( 0 );
-    }
-
-    if( pm.nptn >= pm.nmaxptn ) {
-       re_ptnmemsize = pm.ptnmemsize + GUADDPTNN*fpsize;
-       if(pm.ptn == NULL) {
-           re_ptn = malloc( re_ptnmemsize );
-       } else {
-           re_ptn = realloc(pm.ptn, re_ptnmemsize);
-       }
-       if (re_ptn == NULL) {
-           return( -1 );
-       }
-       pm.ptnmemsize = re_ptnmemsize;
-       pm.ptn     = re_ptn;
-       for( i=pm.nmaxptn   ; i < pm.nmaxptn + GUADDPTNN   ; i++ ) {
-           pm.ptn[fpsize * i] = 0;
-       }
-       pm.nmaxptn += GUADDPTNN;
-    }
-
-    cpn = pm.cptnnum + 1;
-    for( i=0   ; i < pm.nmaxptn   ; i++, cpn++ ) {
-       if( cpn >= pm.nmaxptn ) {
-           cpn = 0;
-       }
-       if( pm.ptn[fpsize * cpn] == 0 ) {
-           break;
-       }
-    }
-    pm.cptnnum     = cpn;
-
-    pm.ctop[ncode] = (USHORT) cpn;
-    pf = pm.ptn + fpsize*cpn;
-    pp = pf + 1;
-    pf[0] = 1;
-    for( i=0   ; i < pm.ptnsize   ; i++ ) 
-       pp[i] = ptn[i];
-
-    for( i=pm.nptn   ; i >=0   ; i-- ) {
-       if( ncode > (int)pm.ntoc[i] ) {
-           break;
-       }
-       pm.ntoc[i+1] = pm.ntoc[i];
-    }
-    pm.ntoc[i+1] = (USHORT) ncode;
-    pm.nptn      += 1;
-
-    return( 1 );
-}
-
-
-/*
- * contents :  get a character pattern from the character management area 
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally 
- */
-
-int
-ptnGet( code, ptn )
-int    code;
-char   *ptn;
-{
-    int                ncode;
-    int                fpsize;
-    USHORT     pno;
-    char       *pf;
-    char       *pp;
-    int                i;
-
-    if( (pm.flag == 0) || (codeCheck(code) == -1) )
-       return( -1 );
-
-    ncode  = codeToNo( code );
-    fpsize = pm.ptnsize +1;
-
-    if( (pno = pm.ctop[ncode]) == 0xFFFF )
-       return( -1 );
-
-    pf = pm.ptn + pno*fpsize;
-    pp = pf +1;
-
-    for( i=0   ; i < pm.ptnsize   ; i++ )
-       ptn[i] = pp[i];
-
-    return( 0 );
-}
-
-
-/*
- * contents :  judge the character pattern exist or not 
- * values   :  1  : exists
- *             0  : not exists
- *             -1 : terminated abnormally 
- */
-
-int
-ptnSense( code )
-int    code;
-{
-    if( (pm.flag == 0) || (codeCheck(code) == -1) )
-       return( -1 );
-
-    if( pm.ctop[ codeToNo(code) ] == 0xFFFF )
-       return( 0 );
-    else
-       return( 1 );
-}
-
-
-/*
- * contents :  delete the character pattern 
- * values   :  1  : deleted 
- *             0  : the pattern does not exist
- *             -1 : terminated abnormally
- */
-
-int
-ptnDel( code )
-int    code;
-{
-    int                ncode;
-    int                fpsize;
-    USHORT     pno;
-    char       *pf;
-    int                i;
-
-    if( (pm.flag == 0) || (codeCheck(code) == -1) )
-       return( -1 );
-
-    ncode  = codeToNo( code );
-    fpsize = pm.ptnsize +1;
-
-    if( (pno = pm.ctop[ncode]) == 0xFFFF ) {
-       return( 0 );
-    }
-
-    pf = pm.ptn + pno*fpsize;
-
-    pf[0] = 0;
-    pm.ctop[ncode] = 0xFFFF;
-
-    for( i=0   ; i < pm.nptn   ; i++ ) {
-       if( (int)pm.ntoc[i] == ncode )
-           break;
-    }
-    for(      ; i < pm.nptn   ; i++ )
-       pm.ntoc[i] = pm.ntoc[i+1];
-
-    pm.nptn --;
-    return( 1 );
-}
-
-
-/*
- * contents :  get the infomation of the character
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally 
- */
-
-int
-ptnGetInfo( n, width, height )
-int    *n;                     /* the number of characters in editting */
-int    *width;                 /* pattern width        */
-int    *height;                /* pattern height       */
-{
-    if( pm.flag == 0 )
-       return( -1 );
-
-    *n = pm.nptn;
-    *width = pm.width;
-    *height = pm.height;
-    
-    return( 0 );
-}
-
-
-/********************************************************************
- *    handle bit map file(1)                                        *
- ********************************************************************/
-
-struct {                       /* infomation of character pattern */
-    int                width;          /* pattern width */
-    int                height;         /* pattern height */
-    int                xbytesize;
-} bitInfo = { 16, 16 ,2 };
-
-
-/*
- * contents : set infomation for handling bit-mapped files 
- */
-
-static void
-bitSetInfo( width, height)
-int    width;                  /* pattern width        */
-int    height;                 /* pattern height       */
-{
-    bitInfo.width     = width;
-    bitInfo.height    = height;
-    bitInfo.xbytesize = (width+7)/8;
-
-    return;
-}
-
-
-/*
- * contents : set the bit at specefied coordinate on 
- */
-
-void
-bitSet( ptn, cx, cy )
-char   *ptn;
-int    cx;
-int    cy;
-{
-    if((cx < 0) || (bitInfo.width <= cx) || (cy < 0) || (bitInfo.height <= cy))
-       return;
-    ptn[ bitInfo.xbytesize*cy + cx/8 ] |= (char)( 0x80 >> (cx%8) );
-}
-
-
-/*
- * contents : set the bit at specefied coordinate off
- */
-
-void
-bitReset( ptn, cx, cy )
-char   *ptn;
-int    cx;
-int    cy;
-{
-    if((cx < 0) || (bitInfo.width <= cx) || (cy < 0) || (bitInfo.height <= cy))
-       return;
-    ptn[ bitInfo.xbytesize*cy + cx/8 ] &= ~(char)( 0x80 >> (cx%8) );
-}
-
-
-/*
- * contents : returns 1 ( bit on ) or 0 ( bit off )
- */
-
-int
-bitRead( ptn, cx, cy )
-char   *ptn;
-int    cx;
-int    cy;
-{
-    if((cx < 0) || (bitInfo.width <= cx) || (cy < 0) || (bitInfo.height <= cy))
-       return( 0 );
-    return( ptn[ bitInfo.xbytesize*cy + cx/8 ] 
-               &
-          (char)( 0x80 >> (cx%8) ) ?   1   :   0
-    );
-}
-
-
-/*
- * contents : clear the specefied bitmap file
- */
-
-void
-bitPtnClear( ptn )
-char   *ptn;
-{
-    int                i;
-
-    for( i=0   ; i < bitInfo.height * bitInfo.xbytesize    ; i++ )
-       ptn[i] = 0;
-}
-
-
-/*
- * contents : copy the bit-mapped file
- */
-
-void
-bitPtnCopy( d_ptn, s_ptn )
-char   *d_ptn;                 /* pointer of the destination file      */
-char   *s_ptn;                 /* pointer of the source file           */
-{
-    int        i;
-
-    for( i=0   ; i < bitInfo.height * bitInfo.xbytesize   ; i++ )
-       d_ptn[i] = s_ptn[i];
-}
-
-
-
-/************************************************************************
- *    handle bit map file(2)                                           *
- *    caution : You must call bitSetInfo() before use these functions. *
- *                                                                     *
- ************************************************************************/
-
-/*
- * contents :  draw lines between desired two points
- * values   :  0  : terminated normally 
- *             -1 : outside of the edtting pane 
- */
-
-int
-bitDrawLine( ptn, x1, y1, x2, y2 ,mode )
-char   *ptn;                   /* pointer of the bit map file */
-int    x1;
-int    y1;
-int    x2;
-int    y2;
-int    mode;                   /* 0: erase 1: draw     */
-{
-    float      dx, dy;
-    float      x, y;
-    float      delta;
-    int                i;
-
-    if( (x1 < 0) || (x2 < 0) || (y1 < 0) || (y2 < 0) ||
-       (bitInfo.width  <= x1) || (bitInfo.width <= x2) ||
-       (bitInfo.height <= y1) || (bitInfo.height <= y2) )
-       return( -1 );
-
-    dx = x2 - x1;
-    dy = y2 - y1;
-     x = x1 + 0.5;
-     y = y1 + 0.5;
-
-    delta = abs((int)dx) > abs((int)dy) ?   dx  :   dy;
-    if( delta < 0 )
-       delta = -delta;
-    if( delta == 0)
-       delta = 0.75;
-    dx /= delta;
-    dy /= delta;
-
-    for(i=0   ; i <= (int)delta   ; i++ ) {
-       mode == 0 ? bitReset(ptn,(int)x,(int)y)   :   bitSet(ptn,(int)x,(int)y);
-       x += dx;
-       y += dy;
-    }
-    return( 0 );
-}
-
-
-/*
- * contents :  draw circle
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally
- */
-
-int
-bitDrawCircle( ptn, x1, y1, x2, y2, mode )
-char   *ptn;
-int    x1;
-int    y1;
-int    x2;
-int    y2;
-int    mode;
-{
-    int                dx, dy;
-    int                i,x;            
-    double     rad, half;
-
-    if( (x1 < 0) || (y1 < 0) || (x2 < 0.0) || ( y2 < 0.0) ) {
-       return( -1 );
-    }
-
-    dx = abs(x2 - x1);
-    dy = abs(y2 - y1);
-    rad = sqrt((double)(dx * dx + dy * dy)) + 0.5;
-    half = rad * sqrt(2.0)/2;
-    for (i = 0; i <= (int)half; i++) {
-       x = (int)sqrt(rad * rad - (double)(i*i));
-       if( mode ) {
-           bitSet  (ptn, x1 - x, y1 - i);
-           bitSet  (ptn, x1 - x, y1 + i);
-           bitSet  (ptn, x1 + x, y1 - i);
-           bitSet  (ptn, x1 + x, y1 + i);
-           bitSet  (ptn, x1 - i, y1 - x);
-           bitSet  (ptn, x1 - i, y1 + x);
-           bitSet  (ptn, x1 + i, y1 - x);
-           bitSet  (ptn, x1 + i, y1 + x);
-       } else {
-           bitReset(ptn, x1 - x, y1 - i);
-           bitReset(ptn, x1 - x, y1 + i);
-           bitReset(ptn, x1 + x, y1 - i);
-           bitReset(ptn, x1 + x, y1 + i);
-           bitReset(ptn, x1 - i, y1 - x);
-           bitReset(ptn, x1 - i, y1 + x);
-           bitReset(ptn, x1 + i, y1 - x);
-           bitReset(ptn, x1 + i, y1 + x);
-       }
-    }
-    return( 0 );
-}
-
-
-/*
- * contents :  draw rectangle
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally
- */
-
-int
-bitDrawRect( ptn, x, y, width, height, mode )
-char   *ptn;
-int    x;
-int    y;
-int    width;
-int    height;
-int    mode;
-{
-    int                i;
-
-    width --;
-    height --;
-
-    if( (x < 0) || (y < 0) || (width < 0) || (height < 0) ||
-       (bitInfo.width <= width +x) || (bitInfo.height <= height +y) )
-       return( -1 );
-
-    for( i=x   ; i <= width+x   ; i++ ) {
-       if( mode == 0 ) {
-           bitReset( ptn, i, y );
-           bitReset( ptn, i, height+y ); 
-       }
-       else {
-           bitSet( ptn, i, y );
-           bitSet( ptn, i, height+y ); 
-       }
-    }
-    for( i=y+1   ; i < height +y   ; i++ ) {
-       if( mode == 0 ) {
-           bitReset( ptn, x, i );
-           bitReset( ptn, x+width, i ); 
-       }
-       else {
-           bitSet( ptn, x, i );
-           bitSet( ptn, x +width, i ); 
-       }
-    }
-       
-    return( 0 );
-}
-
-
-/*
- * contents :  clear the inside of the specefied rectangle 
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally 
- */
-
-int 
-bitDrawCls( ptn, x, y, width, height )
-char   *ptn;
-int    x;
-int    y;
-int    width;  
-int    height;
-{
-    int                i, j;
-
-    width --;
-    height --;
-
-    if( (x < 0) || (y < 0) || (width < 0) || (height < 0) ||
-       (bitInfo.width <= width +x) || (bitInfo.height <= height +y) )
-       return( -1 );
-
-    for( i=x   ; i <= width +x   ; i++ ) {
-       for( j=y   ; j <= height +y   ; j++ )
-           bitReset( ptn, i, j );
-    }
-
-    return( 0 );
-}
-
-
-/*
- * contents :  paint out the inside of the desired rectangle 
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally 
- */
-
-int
-bitDrawSet( ptn, x, y, width, height )
-char   *ptn;
-int    x;
-int    y;
-int    width;
-int    height; 
-{
-    int                i, j;
-
-    width --;
-    height --;
-
-    if( (x < 0) || (y < 0) || (width < 0) || (height < 0) ||
-       (bitInfo.width <= width +x) || (bitInfo.height <= height +y) )
-       return( -1 );
-
-    for( i=x   ; i <= width +x   ; i++ ) {
-       for( j=y   ; j <= height +y   ; j++ )
-           bitSet( ptn, i, j );
-    }
-    return(0);
-}
-
-
-/*
- * contents :  reverse the inside of the desired rectangle 
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally 
- */
-
-int
-bitDrawRev( ptn, x, y, width, height )
-char   *ptn;   
-int    x;
-int    y;
-int    width;
-int    height;
-{
-    int                i, j;
-
-    width --;
-    height --;
-
-    if( (x < 0) || (y < 0) || (width < 0) || (height < 0) ||
-       (bitInfo.width <= width +x) || (bitInfo.height <= height +y) )
-       return( -1 );
-
-    for( i=x   ; i <= width +x   ; i++ ) {
-       for( j=y   ; j <= height +y   ; j++ ) {
-           if( bitRead( ptn, i, j ) == 0 )
-               bitSet ( ptn, i, j );
-           else
-               bitReset( ptn, i, j );
-       }
-    }
-
-    return( 0 );
-}
-
-
-static char cut_buffer[MAXPTNBYTE];
-static int cut_buffer_w=0;
-static int cut_buffer_h=0;
-/*
- * contents :  copy the specified rectangle area
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally
- */
-
-int
-bitDrawCpy(ptn, sx, sy, width, height, cut_flag)
-char   *ptn;
-int    sx;
-int    sy;
-int    width;
-int    height;
-int    cut_flag;
-{
-    int                i, j;
-
-    if ((sx < 0) || (sy < 0) || (width < 2) || (height < 2) ||
-       (bitInfo.width < width +sx) || (bitInfo.height < height +sy))
-       return( -1 );
-
-    cut_buffer_w = width;
-    cut_buffer_h = height;
-
-    for (i=0; i < width; i++) {
-       for (j=0; j < height; j++) {
-           if (bitRead(ptn, i + sx, j + sy) != 0)
-               bitSet(cut_buffer, i, j);
-           else
-               bitReset(cut_buffer, i, j);
-           if (cut_flag)
-               bitReset(ptn, i + sx, j + sy);
-       }
-    }
-    return( 0 );
-}
-
-int
-bitDrawPaste(ptn, dx, dy)
-char   *ptn;
-int    dx;
-int    dy;
-{
-    int                i, j;
-    int                width, height;
-
-    if((dx < 0) || (dy < 0) || (cut_buffer == 0) ||
-                       (cut_buffer_w == 0) || (cut_buffer_h == 0))
-       return( -1 );
-
-    width  = (cut_buffer_w <= bitInfo.width - dx)
-                               ? cut_buffer_w : bitInfo.width - dx;
-    height = (cut_buffer_h <= bitInfo.height - dy)
-                               ? cut_buffer_h : bitInfo.height - dy;
-
-    for (i=0; i < width; i++) {
-       for (j=0; j < height; j++) {
-           if( bitRead(cut_buffer, i, j) != 0 )
-               bitSet (ptn, i + dx, j + dy);
-           else
-               bitReset(ptn, i + dx, j + dy);
-       }
-    }
-    return( 0 );
-}
-
-
-
-/*
- * contents :  rotate the inside of the area specified 
- * values   :          0  : terminated normally 
- *             -1 : terminated abnormally 
- */
-
-int
-bitDrawRoll( ptn, x, y, width, height )
-char   *ptn;
-int    x;
-int    y;
-int    width;
-int    height;
-{
-    char *point;
-    int xx, yy;
-    int count;
-
-    if( (x < 0) || (y < 0) || (width < 0) || (height < 0) ||
-       (bitInfo.width < width +x) || (bitInfo.height < height +y) )
-       return( -1 );
-
-    point = (char *)malloc((width * height) * sizeof(int));
-
-    for(count=0,yy=0; yy < height; yy++) {
-       for(xx=0; xx < width; xx++ ) {
-           point[count++] = bitRead(ptn, x + xx, y + yy);
-           bitReset(ptn, x + xx, y + yy);
-       }
-    }
-
-    for(count=0,yy=0; yy < height; yy++) {
-       for(xx=0; xx < width; xx++ ) {
-           point[count++] == 0 ? bitReset(ptn, x + height - yy - 1, y + xx)
-                               : bitSet(ptn, x + height - yy - 1, y + xx);
-       }
-    }
-
-    free(point);
-    return( 0 );
-}
-
-
-/*
- * contents :  reverse the top-bottom symmetry of the rectangle specified 
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally
- */
-
-int
-bitDrawSymV( ptn, x, y, width, height )
-char   *ptn;
-int    x;
-int    y;
-int    width;
-int    height; 
-{
-    int                k, j;
-    int                d1, d2;
-
-    width --;
-    height --;
-
-    if( (x < 0) || (y < 0) || (width < 0) || (height < 0) ||
-       (bitInfo.width <= width +x) || (bitInfo.height <= height +y) )
-       return( -1 );
-
-    for( k=0   ; k <= width   ; k++ ) {
-       for( j=0   ; j <(height+1)/2   ; j++ ) {
-           d1 = bitRead( ptn, x +k,        y +j );
-           d2 = bitRead( ptn, x +k, y + height -j );
-
-           d1 == 0 ? bitReset( ptn, x +k, y +height -j )
-                     : bitSet( ptn, x +k, y +height -j );
-           d2 == 0 ? bitReset( ptn, x +k,        y +j )
-                     : bitSet( ptn, x +k,        y +j );
-       }
-    }
-    return( 0 );
-}
-
-
-/*
- * contents :  reverse the left-right symmetry of the rectangle specified 
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally 
- */
-
-int
-bitDrawSymH( ptn, x, y, width, height )
-char   *ptn;
-int    x;
-int    y;
-int    width;
-int    height;
-{
-    int                k, j;
-    int                d1, d2;
-
-    width --;
-    height --;
-
-    if( (x < 0) || (y < 0) || (width < 0) || (height < 0) ||
-       (bitInfo.width <= width +x) || (bitInfo.height <= height +y) )
-       return( -1 );
-
-    for( k=0   ; k < (width+1)/2   ; k++ ) {
-       for( j=0   ; j <= height   ; j++ ) {
-           d1 = bitRead( ptn, x +k,        y +j );
-           d2 = bitRead( ptn, x +width -k, y +j );
-
-           d1 == 0 ? bitReset( ptn, x +width -k, y +j )
-                     : bitSet( ptn, x +width -k, y +j );
-           d2 == 0 ? bitReset( ptn, x +k,        y +j )
-                     : bitSet( ptn, x +k,        y +j );
-       }
-    }
-    return( 0 );
-}
-
-
-static char *
-char_set(char *str)
-{
-    int i, count;
-    char *p;
-    for (i=strlen(str),p=&(str[i]),count=0; i && count < 2; i--,p--) {
-       if (*p == '-')
-           count ++;
-    }
-    if (count == 2)
-       return(p + 2);
-    else
-       return(str);
-}
-
-
-/****************************************************************
- *   read and write SNF file                                   *
- *                                                             *
- *                                                             *
- ****************************************************************/
-
-/*
- * contents : read character patterns from specified SNF file
- * values   : number of the area that was allocated to manage font file 
- *             -1 : terminated abnormally 
- *             -2 : file is locked 
- */
-int
-readSNF(fdata, width, height, err)
-FalFontData **fdata;
-int    *width;
-int    *height;
-char   *err;
-{
-    FalFontinfo                finfo;
-    int                        start, end;
-    int                        code;
-    int                        mask;
-    int                        i;
-    char               *ptn;
-    static FalFontDataList     *fulllist;
-    char               *mes;
-
-    FalGlyphRegion     *gr, *gr_p;
-    int                        num_gr;
-    char               tmp[16];
-    unsigned int       s, e;
-
-
-    if (fulllist) {
-       FalFreeFontList(fulllist);
-       fulllist = NULL;
-    }
-    mask =  FAL_FONT_MASK_XLFDNAME | FAL_FONT_MASK_UPDATE |
-               FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    if (fullFontData.cd_set != -1) {
-       mask |= FAL_FONT_MASK_CODE_SET;
-    }
-    if (! CodePoint) {
-       mask |= FAL_FONT_MASK_GLYPH_INDEX;
-    }
-    if (FalGetFontList(&fullFontData, mask, &fulllist) == FAL_ERROR) {
-       strcpy(err, FAL_ERROR_STR);
-       return(-1);
-    }
-    if(fulllist == NULL) {
-       strcpy(err, resource.mn_no_font);
-       return(-1);
-    }
-    if (fulllist->num != 1) {
-       FalFreeFontList(fulllist);
-       fulllist = NULL;
-       strcpy(err, resource.mn_plural_font);
-       return(-1);
-    }
-    *fdata = &(fulllist->list[0]);
-    font_id = FalOpenSysFont(&fullFontData, mask, &fulllist);
-    mes = 0;
-    if (font_id == 0 && (fal_utyerrno & 0xff) == FAL_ERR_FNT_OPN) {
-       mes = (char *) malloc(strlen(resource.mn_no_perm)+strlen(fal_err_file)+10);
-       if (mes == NULL) {
-           strcpy(err, resource.mn_no_mem);
-           FalFreeFontList(fulllist);
-           return( -1 );
-       }
-       sprintf(mes, "%sfile: %s", resource.mn_no_perm, fal_err_file);
-
-       mask &= ~FAL_FONT_MASK_UPDATE;
-        font_id = FalOpenSysFont(&fullFontData, mask, &fulllist);
-        if (font_id == 0) {
-           free(mes);
-           strcpy(err, FAL_ERROR_STR);
-           FalFreeFontList(fulllist);
-           return( -1 );
-       }
-    } else if (font_id == 0) {
-       strcpy(err, FAL_ERROR_STR);
-       FalFreeFontList(fulllist);
-       return( -1 );
-    }
-    if (fullpath != NULL)
-       FalFree(fullpath);
-    if (FalFontIDToFileName(font_id, &fullpath) == FAL_ERROR) {
-       strcpy(err, FAL_ERROR_STR);
-       if (mes)
-           free(mes);
-       return( -1 );
-    }
-
-    if( FalQueryFont( font_id, &finfo ) == FAL_ERROR ) {
-       strcpy(err, FAL_ERROR_STR);
-       FalCloseFont( font_id );
-       if (mes)
-           free(mes);
-       return( -1 );
-    }
-    *width = finfo.width;
-    *height = finfo.height;
-
-    fullFontData.cd_set = (* fdata)->cd_set;
-    if (CodePoint) {
-       if (FalGetUDCCPArea(get_locale(),(* fdata)->cd_set,
-               char_set(( *fdata)->xlfdname), (FalCodeRegion **) &gr, &num_gr) == FAL_ERROR) {
-           strcpy(err, FAL_ERROR_STR);
-           FalCloseFont( font_id );
-           if (mes)
-               free(mes);
-           return( -1 );
-       }
-    } else {
-       if (FalGetUDCGIArea(get_locale(),(* fdata)->cd_set,
-               char_set(( *fdata)->xlfdname), &gr, &num_gr) == FAL_ERROR) {
-           strcpy(err, FAL_ERROR_STR);
-           FalCloseFont( font_id );
-           if (mes)
-               free(mes);
-           return( -1 );
-       }
-    }
-    if (! num_gr) {
-       FalCloseFont( font_id );
-       strcpy(err, resource.mn_not_udc);
-       if (mes)
-           free(mes);
-       return( -1 );
-    }
-    if (mes) {
-       Error_message2(NULL, mes);
-       free(mes);
-       fullFontData.prm = True;
-    }
-    start = gr->start; 
-    end = gr->end;     
-    for (i=0, gr_p=gr; i < num_gr; i++, gr_p++) {
-       CodeArea[i].start = gr_p->start;
-       CodeArea[i].end = gr_p->end;
-       s = (gr_p->start & 0xff00) >> 8;
-       e = (gr_p->end & 0xff00) >> 8;
-       if (i == 0) {
-           sprintf(tmp, "0x%x:0x%x", s, e);
-           strcpy(AreaStr, tmp);
-       } else {
-           sprintf(tmp, ",0x%x:0x%x", s, e);
-           strcat(AreaStr, tmp);
-       }
-       if (start > gr_p->start)
-           start = gr_p->start;
-       if (end < gr_p->end)
-           end = gr_p->end;
-    }
-    CodeArea[i].start = -1;
-    begin_code = start;
-    last_code = end;
-
-    if (start > end) {
-       FalCloseFont( font_id );
-       sprintf(err, "%s\nStart address = %x End address = %x\n", resource.mn_illegal_area, start, end);
-       return( -1 );
-    }
-
-    if( ptnOpen(1, end - start + 1, finfo.width, finfo.height) < 0 ) {
-       FalCloseFont( font_id );
-       strcpy(err, resource.mn_no_mem);
-       return( -1 );
-    }
-    bitSetInfo( finfo.width, finfo.height );
-
-    for (i=0, gr_p=gr; i < num_gr; i++, gr_p++) {
-       if (start > gr_p->start)
-           gr_p->start = start;
-       if (end < gr_p->end)
-           gr_p->end = end;
-       start = gr_p->end;
-
-       if (! CodePoint) {
-               for (code=gr_p->start; code <= gr_p->end; code++) {
-                   if (code & 0x80) {
-                       code &= 0xff00;
-                       code += 0x100;
-                       continue;
-                   }
-
-                   ptn  = (char *)FalReadFont( font_id, code, finfo.width, finfo.height );
-                   if( ptn == (char *)FAL_ERROR ) {
-                       strcpy(err, FAL_ERROR_STR);
-                       FalFree(gr);
-                       FalCloseFont( font_id );
-
-                       ptnClose();
-                       return( -1 );
-                   }
-                   if( EXISTS_FLAG == 0 ) {
-                       if( ptnAdd( code, ptn ) != 1 ) {
-                           FalFree(gr);
-                           strcpy(err, resource.mn_no_read);
-                           FalCloseFont( font_id );
-
-                           ptnClose();
-                           return( -1 );
-                       }
-                   }
-               }
-       } else {
-               for (code=gr_p->start; code <= gr_p->end; code++) {
-                   if (! (code & 0x80)) {
-                       code &= 0xff00;
-                       code |= 0x80;
-                       continue;
-                   }
-
-                   ptn  = (char *)FalReadFont( font_id, code, finfo.width, finfo.height );
-                   if( ptn == (char *)FAL_ERROR ) {
-                       strcpy(err, FAL_ERROR_STR);
-                       FalFree(gr);
-                       FalCloseFont( font_id );
-
-                       ptnClose();
-                       return( -1 );
-                   }
-                   if( EXISTS_FLAG == 0 ) {
-                       if( ptnAdd( code, ptn ) != 1 ) {
-                           FalFree(gr);
-                           strcpy(err, resource.mn_no_read);
-                           FalCloseFont( font_id );
-
-                           ptnClose();
-                           return( -1 );
-                       }
-                   }
-               }
-       }
-    }
-    FalFree(gr);
-    *err = 0;
-    return( 0 );
-}
-
-static void
-bicopy(s1, s2, size)
-char *s1, *s2;
-int size;
-{
-    register int i;
-    for(i=size; i; i--, s1++, s2++)
-       *s2 = *s1;
-}
-
-int
-copySNF(start, end, ptn, num, err)
-int    start;
-int    end;
-char   ***ptn;
-int    *num;
-char   *err;
-{
-    FalFontID          fid;
-    int                        mask;
-    char               ** _ptn, **p;
-    int                        i;
-    static FalFontDataList     *copylist;
-    int                        count;
-    char               *point;
-    int                        size;
-
-    mask =  FAL_FONT_MASK_XLFDNAME | FAL_FONT_MASK_DEFINED |
-                                               FAL_FONT_MASK_UNDEFINED;
-    if (copyFontData.cd_set != -1) {
-       mask |= FAL_FONT_MASK_CODE_SET;
-    }
-    if (! CodePoint) {
-       mask |= FAL_FONT_MASK_GLYPH_INDEX;
-    }
-
-    fid = FalOpenSysFont(&copyFontData, mask, &copylist);
-    if (fid == 0) {
-       strcpy(err, FAL_ERROR_STR);
-       FalFreeFontList(copylist);
-       return( -1 );
-    }
-
-    _ptn = (char **)malloc(sizeof(char *) * (end - start + 1));
-    if (! CodePoint) {
-        for (i = start, count = 0, p = _ptn; i <= end; i++) {
-           if (i & 0x80) {
-               i &= 0xff00;
-               i += 0x100;
-               continue;
-           }
-           point  = (char *)FalReadFont( fid, i, pm.width, pm.height );
-           if( point == (char *)FAL_ERROR ) {
-               strcpy(err, FAL_ERROR_STR);
-               FalCloseFont( fid );
-               return( -1 );
-           }
-           if (EXISTS_FLAG != 0)
-               continue;
-           size = pm.height * ((pm.width+7)/8);
-           *p  = (char *) XtMalloc(size);
-           bicopy(point, *p, size);
-           count++; p++;
-        }
-    } else {
-        for (i = start, count = 0, p = _ptn; i <= end; i++) {
-           if (! (i & 0x80)) {
-               i &= 0xff00;
-               i |= 0x80;
-               continue;
-           }
-           point  = (char *)FalReadFont( fid, i, pm.width, pm.height );
-           if( point == (char *)FAL_ERROR ) {
-               strcpy(err, FAL_ERROR_STR);
-               FalCloseFont( fid );
-               return( -1 );
-           }
-           if (EXISTS_FLAG != 0)
-               continue;
-           size = pm.height * ((pm.width+7)/8);
-           *p  = (char *) XtMalloc(size);
-           bicopy(point, *p, size);
-           count++; p++;
-        }
-    }
-    *num = count;
-    *ptn = _ptn;
-    FalCloseFont( fid );
-    if (count == 0) {
-       strcpy(err, resource.mg_non_code);
-       return( -1 );
-    }
-    return( 0 );
-}
-
-void
-freeSNF(addr, count)
-char **addr;
-int count;
-{
-    char **p;
-    for (p=addr; count; count--, p++)
-       XtFree(*p);
-    XtFree((char *)addr);
-}
-
-static int     sig_flg = 0;            /* flag for signal              */
-
-/*
- * contents :  write character patterns to the specified SNF file 
- * values   :  0  : terminated normally 
- *             -1 : terminated abnormally 
- *           1xxx : process is not completed ¡Êxxx:persents finished¡Ë
- * 
- *
- */
-
-int
-writeSNF( restart, err )
-int            restart;        /* ON:continue OFF:initial      */
-int            *err;           /* errors :                     */
-{
-    static int         pfstdi[2];
-    static FILE                *fstdi;
-    static int         nptn;
-    static int         width, height;
-    static int         n;
-    static int         persents = 0;
-    char               *argv[8];
-    int                        code;
-    int                        endst;
-    int                        persents_;
-       
-    char       ptn[MAXPTNBYTE];
-    char       code_set[2];
-
-    FalGIInf   *gi;
-    int                num_gi;
-
-    char       *command;
-
-    /* get command path */
-    if (!(command = (char *)get_cmd_path(getenv("PATH"), resource.l_ptog_cmd))){
-        command = resource.l_ptog;
-    }
-
-    if (fullFontData.cd_set == FAL_FONT_CS0)
-       sprintf(code_set, "0");
-    else if (fullFontData.cd_set == FAL_FONT_CS1)
-       sprintf(code_set, "1");
-    else if (fullFontData.cd_set == FAL_FONT_CS2)
-       sprintf(code_set, "2");
-    else if (fullFontData.cd_set == FAL_FONT_CS3)
-       sprintf(code_set, "3");
-
-    /* signal set */
-    signal( SIGPIPE, sig_receive );
-    sig_flg = 0;
-
-    if( restart == 0 ) {
-
-       persents = 0;
-
-       if( ptnGetInfo( &nptn, &width, &height ) != 0 ) {
-           *err = 100;
-           return( -1 );
-       }
-
-       if( pipe(pfstdi) !=0 ) {
-           *err = 101;
-           return( -1 );
-       }
-
-       switch( fork() ) {
-       case -1:
-           close( pfstdi[0] );    
-           close( pfstdi[1] );    
-           *err = 102;
-           return( -1 );
-       case 0:
-           close( 0 );                 /** 0 ... stdin **/
-
-           dup(   pfstdi[0] );
-           close( pfstdi[0] );
-           close( pfstdi[1] );    
-           argv[0] = resource.l_ptog_cmd;
-           argv[1] = "-codeset";
-           argv[2] = code_set;
-           argv[3] = "-xlfd";
-           argv[4] = fullFontData.xlfdname;
-           argv[5] = "-init";
-           argv[6] = "-f";
-           argv[7] = NULL;
-           execv (command, argv );
-           exit( 103 );
-       }
-
-
-       close( pfstdi[0] );
-       fstdi = (FILE *)fdopen( pfstdi[1], "w" );
-       fprintf( fstdi, "numfonts:%d\n", nptn );
-       fprintf( fstdi, "width:%d\n",    width );
-       fprintf( fstdi, "height:%d\n",   height );
-
-       bitSetInfo( width, height );
-       n = 0;
-    }
-
-    while( (n < nptn) && ( sig_flg == 0) ) {
-       code = noToCode( ptnSqToNo(n) );
-       if( ptnGet(code, ptn ) != 0 ) {
-           fclose( fstdi );
-           close( pfstdi[1] );
-           *err = 104;
-           return( -1 );
-       }
-
-        if (CodePoint) {
-           fal_code_to_glyph(get_locale(), code, &gi, &num_gi);
-           fprintf( fstdi, "code:0x%x\n", gi[0].glyph_index );
-           FalFreeGI(gi, num_gi);
-       } else {
-           fprintf( fstdi, "code:0x%x\n", code );
-       }
-       writePtn(ptn, width, height, fstdi);
-
-       n++;
-       if ( sig_flg != 0 )
-           break;
-       if( n == nptn ) {
-           persents = 0;
-           return( 1101 );
-       }
-       if( (persents_ = (n*100)/nptn) != persents ) {
-               persents = persents_;
-               return( 1000 + persents );
-       }
-    }
-
-    if(sig_flg == 0 )    fprintf( fstdi,  "enddata\n" );
-
-    fclose( fstdi );
-    close( pfstdi[1] );
-
-    wait( &endst );
-
-
-    if ( WIFEXITED(endst) && !WEXITSTATUS(endst) ) {
-       *err = 0;
-       return( 0 );
-    }
-    else {
-       if ( WIFEXITED(endst) ) 
-           *err = WEXITSTATUS(endst);
-       else{
-           if ( WIFSTOPPED(endst) )
-               *err = ( WTERMSIG(endst) << 8 );
-       }
-       return( -1 );
-    }
-}
-
-
-/*
- * contents : set flag when dtudcfonted received signal
- */
-
-static void
-sig_receive()
-{
-    sig_flg = 1;
-    return;
-}
-
-
-/*
- * contents : convert bit map file into SNF file 
- */
-
-static void
-writePtn(ptn, width, height, fp)
-char   *ptn;
-int    width;
-int    height;
-FILE   *fp;
-{
-    int                i, j, k;
-    int                nbyte;
-    int                tw;
-    char       p, *pbuf;
-    static char        buf[ (MAXPTNSIZE+1)*MAXPTNSIZE+1 ];
-
-    nbyte = (width + 7) / 8;
-
-    pbuf = buf;
-    for (i=0   ; i < height   ; i++) {
-       for (j=0, tw=width   ; j < nbyte   ; j++ ) {
-           p = *ptn++;
-           for ( k=0   ; (k < 8) && (tw > 0)   ; k++, tw--) {
-               if (p & 0x80)
-                   *pbuf++ = '0';
-               else
-                   *pbuf++ = '-';
-               p = p << 1;
-           }
-       }
-       *pbuf++ = '\n';
-    }
-    *pbuf = '\0';
-    fprintf(fp, "%s", buf);
-}
diff --git a/cde/programs/dtudcfonted/cpyw.c b/cde/programs/dtudcfonted/cpyw.c
deleted file mode 100644 (file)
index f97afb8..0000000
+++ /dev/null
@@ -1,619 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* cpyw.c 1.9 - Fujitsu source for CDEnext    96/10/30 13:31:40      */
-/* $XConsortium: cpyw.c /main/7 1996/11/08 01:53:38 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-
-#include <stdio.h>
-
-#include <X11/Intrinsic.h>
-
-#include "xoakufont.h"
-#include "util.h"
-
-
-extern Resource resource ;
-extern Widget  cpyDialog;
-
-/**
- **  create and display the "User defined character ecitor :Copy" window
- ** ==================================================================
- **/
-
-void   PopdownCpyPtn();
-void   DoCpyProc();
-void   CpyPtnCB();
-void   CpyCB();
-
-/* static */ TextField SrcTf;
-/* static */ TextField DestTf;
-
-
-/**
- **  contents : initialize the "Copy" window 
- ** --------------------
- **
- **
- **/
-
-void
-InitCpyPtn()
-{
-       /* initialize font infomation */
-}
-
-
-/**
- **  contents : create and pop up the "Copy" window 
- ** ----------------------------------
- **
- **/
-
-void
-CpyPtnCB()
-{
-    extern void CpyPtnXLFD();
-    CpyPtnXLFD();
-}
-
-
-/**
- **  contents : pop down the "Copy" window 
- ** ----------------------
- **/
-
-void
-PopdownCpyPtn()
-{
-    ForcePopdownDialog(cpyDialog);
-}
-
-
-/**  contents : 
- **  get the character strings of source code area from the input field 
- ** --------------------------------------
- **/
-
-String
-CpySrcCodeTfValue()
-{
-    return(GetTextFieldValue(&SrcTf));
-}
-
-
-/**  contents : 
- **  get the character strings of destination code area from input field 
- ** --------------------------------------
- **/
-
-String
-CpyDestCodeTfValue()
-{
-    return(GetTextFieldValue(&DestTf));
-}
-
-
-/**
- **  contents : pop up the copy confirmation window 
- ** --------------------------------
- **/
-
-void
-PopupCpyNotice( message )
-String message;
-{
-    char bmsg[512] = "";
-
-    static NoticeButton buttons[] = {
-       NBTNARGS( DoCpyProc, NULL, NULL, True, False ),
-       NBTNARGS( NULL, NULL, NULL, True, False ),
-    };
-    static NButton BTN = NBUTTONS( buttons );
-
-    snprintf(bmsg, sizeof(bmsg), "%s%s", resource.mn_cpy_lost, message);
-    SetItemLabel(&BTN, 0, resource.l_ok);
-    SetItemLabel(&BTN, 1, resource.l_cancel);
-    PopupNotice( cpyPtnW, bmsg, D_WARNING, &BTN, False, resource.l_warning_title);
-}
-
-
-/**
- **  contents : "Copy" button callback 
- ** ------------------------
- **  execute the copy processing 
- **/
-
-/*ARGSUSED*/
-void
-CpyCB(w, cdata)
-Widget w;
-XtPointer cdata;
-{
-    extern Boolean BeforeCpyCheck();
-    if (BeforeCpyCheck(cdata)){
-       PopdownCpyPtn();
-       DoCpyProc();
-    }
-}
-
-
-
-/**
- **  "Add/Delete" window 
- ** ===================================================================
- **/
-
-/**
- **  contents : pop down the "Add/Delete" window 
- ** ------------------------------
- **/
-
-static void
-PopdownMngPtn()
-{
-    PopdownDialog(mngPtnW);
-}
-
-/**
- **  contents : "Add" button callback 
- ** ------------------------
- **/
-
-static void
-AddCB()
-{
-    int s_code, e_code;
-    extern Boolean BeforeMngCheck();
-    extern void DoAddProc();
-
-    if (BeforeMngCheck(&s_code, &e_code)){
-       DoAddProc(s_code, e_code);
-       PopdownMngPtn();
-    }
-}
-
-/**
- **  contents : "Delete" button callback 
- ** ------------------------
- **/
-
-static void
-DelCB()
-{
-    int s_code, e_code;
-    extern void DoDelProc();
-    extern Boolean BeforeMngCheck();
-
-    if (BeforeMngCheck(&s_code, &e_code)){
-       DoDelProc(s_code, e_code);
-    }
-}
-
-static ButtonItems add_btn[] = {
-    BTNARGS( (void(*)(struct _WidgetRec*,void*,void*)) AddCB, NULL, NULL, True, True ),
-    BTNARGS( (void(*)(struct _WidgetRec*,void*,void*)) DelCB, NULL, NULL, True, False ),
-    BTNARGS( (void(*)(struct _WidgetRec*,void*,void*)) PopdownMngPtn, NULL, NULL, True, False ),
-};
-static Button AddBTN = BUTTONS( add_btn );
-
-static TextField MngCodeTf;
-
-/**
- **  contents : create and pop up the "Add/Delete" window 
- ** ------------------------------------
- **/
-
-void
-MngPtnCB()
-{
-    if (! mngPtnW){
-       Widget  rowcol;
-
-       SetItemLabel(&AddBTN, 0, resource.l_add);
-       SetItemLabel(&AddBTN, 1, resource.l_delete);
-       SetItemLabel(&AddBTN, 2, resource.l_cancel);
-       rowcol =
-       CreateDialogAndButtons( toplevel, resource.l_add_title,
-
-           NULL, &AddBTN, XtNumber(add_btn), &mngPtnW);
-
-       CreateTextField(rowcol, "wgkTxtF",
-           resource.l_manage_code, &MngCodeTf, 4);
-    }
-    PopupDialog(mngPtnW);
-}
-
-
-
-
-/**
- **  contents : get the character strings of code for add or delete from the input field 
- ** --------------------------------------------
- **/
-
-String
-MngCodeTfValue()
-{
-    return(GetTextFieldValue(&MngCodeTf));
-}
-
-
-
-/**
- **  the delete confirmation window 
- ** ===================================================================
- **/
-
-static Widget  CreateDelNotice();
-static void    drawDelPtn();
-static void    drawDelCode();
-static void    CBdnOblB_del();
-static void    EHdnBulB_disp();
-void   EHStaT_disp();                  /* add 1995.09.20 */
-
-static Widget  dnStaT_code[D_MAX], dnBulB_disp[D_MAX], dnPopW;
-
-/**
- **  contents : pop up the delete confirmation window 
- ** --------------------------
- **/
-
-void
-PopupDelNotice( owner )
-Widget owner;
-{
-    int i;
-     Widget delNoticeW = NULL;
-
-    delNoticeW = CreateDelNotice(owner);
-    XtVaSetValues(XtParent(delNoticeW), XmNmappedWhenManaged, False, NULL);
-    XtManageChild(delNoticeW);
-
-    for ( i=0 ; i < dn.disp_num ; i++ ) {
-       /* moved from paneDelNotice body */
-       dl[i].disp_winID = XtWindow( dnBulB_disp[i] );
-
-       drawDelCode(i);
-       drawDelPtn(i);
-    }
-    XtVaSetValues(XtParent(delNoticeW), XmNmappedWhenManaged, True, NULL);
-
-    XBell(XtDisplayOfObject(delNoticeW), 0);
-}
-
-
-/**
- **  contents : clear the image of deleted character 
- ** ----------------------------------------------
- **/
-
-static void
-dstrypaneDelNotice()
-{
-    int        i;
-
-    for ( i=0; i<dn.disp_num; i++ ){
-       XFree((char *) dl[i].dispImage);
-    }
-}
-
-
-/**
- **  contents : "OK" button callback 
- ** ----------------------------
- **/
-
-static void
-DelOkCB()
-{
-    CBdnOblB_del();
-    PopdownMngPtn();
-}
-
-
-/**
- **  contents : callback of the delete list 
- ** ------------------------------------
- **/
-
-static void
-delScProc( value )
-int value;
-{
-    int                i;
-    extern int RelToAbsSq();
-
-    dn.sq_top = RelToAbsSq( dn.sq_start, value - dn.sq_start);
-    for ( i=0 ; i < dn.disp_num ; i++ ) {
-       drawDelCode(i);
-       drawDelPtn(i);
-    }
-}
-
-
-/**
- **  contents : create the delete confirmation window 
- ** --------------------------
- **/
-
-static Widget
-CreateDelNotice(owner)
-Widget owner;
-{
-    Widget form, listBase, itemform[D_MAX];
-    char buf[64];
-    int        i, val, min, max;
-    int c ;
-    extern int AbsSqToRel();
-    extern void AddDestroyProc();
-
-    static NoticeButton buttons[] = {
-       NBTNARGS( (void(*)(struct _WidgetRec*,void*,void*)) DelOkCB, NULL, NULL, True, False ),
-       NBTNARGS( NULL, NULL, NULL, True, False ),
-    };
-    static NButton BTN = NBUTTONS( buttons );
-    c = AbsSqToRel( dn.sq_start, dn.sq_end) + 1;
-    if (c == 1) {
-       sprintf(buf, "%s(%d %s)", resource.mg_start_del_s,
-                                       c, resource.mg_start_del_cs );
-    } else {
-       sprintf(buf, "%s(%d %s)", resource.mg_start_del_m,
-                                       c, resource.mg_start_del_cm );
-    }
-    SetItemLabel(&BTN, 0, resource.l_ok);
-    SetItemLabel(&BTN, 1, resource.l_cancel);
-    form = CreateTemplateDialog( owner, buf, D_QUESTION, &BTN,
-               resource.l_question_title, &dnPopW);
-    AddDestroyProc(dnPopW, dstrypaneDelNotice);
-
-    if ( dn.disp_num < (AbsSqToRel( dn.sq_start, dn.sq_end) + 1)) {
-
-       val = AbsSqToRel( dn.sq_start, dn.sq_top) + dn.sq_start;
-       min = dn.sq_start;
-       max = AbsSqToRel( dn.sq_start, dn.sq_end) + dn.sq_start +1;
-       listBase = CreateScrollBase( form, "listBase",
-                               min, max, val, dn.disp_num, delScProc );
-    }
-    else{
-       listBase =
-       CreateRowColumn( form, "listBase", L_VERTICAL, 4,2,2 );
-    }
-
-    for(i=0; i<dn.disp_num; i++) {
-       /* create form for the codes and fonts to be deleted */
-       itemform[i] = CreateForm( listBase, "listBase" );
-
-       /* create widgets for the codes to be deleted in the list */
-       dnStaT_code[i] = CreateLabel( itemform[i], "label", "    " );
-       AddTopAttachForm( dnStaT_code[i], 0 );
-       AddLeftAttachForm( dnStaT_code[i], 0 );
-       AddBottomAttachForm( dnStaT_code[i], 0 );
-
-       /* create widgets for the image of the codes to be deleted in the list */
-       dnBulB_disp[i] = CreateDrawingArea( itemform[i], "image",
-                       edg.width, edg.height, EHdnBulB_disp, i);
-       AddLeftAttachWidget( dnBulB_disp[i], dnStaT_code[i], 0 );
-
-       /* */
-       dl[i].dispImage  = XCreateImage( xl.display,
-               DefaultVisual( xl.display, DefaultScreen(xl.display) ),
-               1, XYBitmap, 0, dl[i].ptn, dn.ptn_w, dn.ptn_h, 8, 0);
-       dl[i].dispImage->bitmap_bit_order = MSBFirst;
-       dl[i].dispImage->byte_order       = MSBFirst;
-
-    }
-    XtManageChildren( itemform, dn.disp_num );
-    return(dnPopW);
-}
-
-
-/**
- **  contents : delete characters from editor 
- ** -----------------------------------------
- **  
- **/
-
-static void
-CBdnOblB_del()
-{
-    int                code;   /* code number for check */
-    int                ncode;  /* sequential number in the codeset system area */
-    int                sq_now; /* sequential number in the editor */
-    char       mode;   /* notify the modification of the edit list */
-    extern void chgEdCode();
-
-    XtSetSensitive( dnPopW, FALSE );
-    mode = OFF;
-    for( sq_now=dn.sq_end ; sq_now >= dn.sq_start ; sq_now-- ) {
-       ncode = ptnSqToNo(sq_now);
-       if ( codeCheck( noToCode(ncode)))
-           continue;
-       if (ptnSense( noToCode(ncode) ) == 1) {
-           ptnDel( noToCode(ncode) );
-           edlist.nptn--;
-           edg.flag = ON;
-           mode = ON;          
-       }
-    }
-
-    /* update the current character */
-
-    sq_now++;
-    for ( ; sq_now < (edlist.sqstart + edlist.nptn); sq_now++) {
-       ncode = ptnSqToNo(sq_now);
-        if (( ncode >= 0) && ( codeCheck( noToCode( ncode)) == 0))
-            break;
-    }
-    if(sq_now > (edlist.sqstart + edlist.nptn -1)) {
-        sq_now--;
-        for ( ; sq_now >= edlist.sqstart; sq_now--) {
-           ncode = ptnSqToNo(sq_now);
-            if (( ncode >= 0) && ( codeCheck( noToCode( ncode)) == 0))
-               break;
-        }
-    } 
-
-    /* check the existence of the current character */
-    if( (sq_now != -1) && ((ncode = ptnSqToNo(sq_now)) != -1) ){
-       code = noToCode( ncode );
-    } else {
-       /* There is no characters on the editor, dtudcfonted does not 
-       * display any character on the editing pane and forbid users
-       * to input.
-       * It can realize to put 0 to the first parameter of chgEdCode().
-       */
-       code = 0;
-    }
-    if(codeCheck( code )) {
-       code = 0;
-    }
-
-    /* */
-    if( ptnSense( edg.code ) == 1 ) {
-       ptnAdd( edg.code, edg.ptn );
-    }
-
-    /* renew the current character */
-    if (mode == ON) {
-       chgEdCode( code, mode );
-    }
-    XtSetSensitive( dnPopW,  TRUE );
-}
-
-
-/**
- **  contents : display the image of the character to be deleted 
- ** ------------------------
- **
- **/
-
-static void
-drawDelPtn( i )
-int    i;      /* window number */
-{
-    if ( RelToAbsSq( dn.sq_top, i) <= dn.sq_end) {
-       ptnGet( noToCode(ptnSqToNo(RelToAbsSq( dn.sq_top, i))),
-                                                               dl[i].ptn );
-       XPutImage(xl.display, dl[i].disp_winID, xl.borderGC,
-                       dl[i].dispImage, 0,0,0,0, dn.ptn_w, dn.ptn_h );
-    } else {
-       return;
-    }
-}
-
-
-/**
- **  contents : display the code of the character to be deleted 
- ** ----------------------
- **
- **/
-
-static void
-drawDelCode( i )
-int    i;      /* window number */
-{
-    char       str[20];
-
-    if ( RelToAbsSq( dn.sq_top, i) <= dn.sq_end) {
-       sprintf(str, "%4x ", noToCode(ptnSqToNo(RelToAbsSq( dn.sq_top, i))));
-       SetLabelString(dnStaT_code[i], str);
-    } else {
-       return;
-    }
-}
-
-
-/**
- **  contents : re-display the code of the character to be deleted 
- ** --------------------------------------------------------------
- **/
-
-/*ARGSUSED*/
-static void
-EHdnBulB_disp( widget, i )
-Widget         widget;
-int            i;                      /* widget that have some ivent */
-{
-    drawDelPtn( i );
-}
-
-
-
-/**
- **  notify error message
- ** ===================================================================
- **
- **/
-
-/**
- **  contents : inner functions of DispMngErrorMessage()
- ** ----------------------------------
- **/
-
-static void
-DispErrorMessage( owner, title, msg )
-Widget owner;
-String title;
-String msg;
-{
-    static NoticeButton buttons[] = {
-       NBTNARGS( NULL, NULL, NULL, True, False ),
-    };
-    static NButton BTN = NBUTTONS( buttons );
-
-    SetItemLabel(&BTN, 0, resource.l_ok);
-    PopupNotice( owner, msg, D_ERROR, &BTN, False, title );
-}
-
-
-/**
- **  contents : display "Add" or "Delete" error 
- ** --------------------------------
- **/
-
-void
-DispMngErrorMessage( msg )
-String msg;
-{
-    DispErrorMessage( mngPtnW, resource.l_error_title, msg );
-}
-
-
-/**
- **  contents : display "Copy" error 
- ** --------------------------
- **/
-
-void
-DispCpyErrorMessage( msg )
-String msg;
-{
-    DispErrorMessage( cpyPtnW, resource.l_error_title, msg );
-}
diff --git a/cde/programs/dtudcfonted/cpyx.c b/cde/programs/dtudcfonted/cpyx.c
deleted file mode 100644 (file)
index 5ac25d3..0000000
+++ /dev/null
@@ -1,944 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* cpyx.c 1.29 - Fujitsu source for CDEnext    96/10/30 13:13:45      */
-/* $XConsortium: cpyx.c /main/8 1996/11/08 01:52:55 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <nl_types.h>
-
-#include<X11/Xlib.h>
-#include<X11/Xutil.h>
-#include<X11/Xatom.h>
-
-#include <Xm/XmAll.h>
-
-/*
- * There is no public header file for this function (only an
- * internal header XmStringI.h).
- */
-extern XtPointer _XmStringUngenerate (XmString string,
-                        XmStringTag tag,
-                        XmTextType tag_type,
-                        XmTextType output_type);
-
-#include "util.h"
-#include "selectxlfd.h"
-#include "xoakufont.h"
-
-#include "xpm.h"
-#ifdef XPM
-#define ReadXpm XpmCreatePixmapFromData
-#else
-#define ReadXpm _DtXpmCreatePixmapFromData
-#endif
-#include "pixmaps/arrow.pm"
-
-static Widget  CreateCopyXLFD() ;
-static void    CpyXLFDCB() ;
-
-extern int     CreateOtherLabelAndText();
-extern Widget  xlfdCreateScrolledList();
-extern int     GetItemsToDisplay();
-
-extern void    xlfdPopupDialog();
-
-extern void    InitCpyPtn() ;
-extern void    _unmap();
-extern void    CpyCB() ;
-extern void    PopdownCpyPtn() ;
-extern void    AddPopupProc() ;
-
-extern FalFontData fullFontData;
-
-/*
- * parameters
- */
-
-FalFontData     copyFontData;
-
-extern  Widget toplevel ;
-Widget cpyDialog=NULL;
-static Widget codeLabel[COPYLABELS];
-static Widget codeText[COPYLABELS+1];
-
-extern TextField SrcTf;
-extern TextField DestTf;
-
-extern char AreaStr[160];
-
-/*
- *  resource database
- */
-extern Resource resource ;
-
-#define CS0 "Codeset 0"
-#define CS1 "Codeset 1"
-#define CS2 "Codeset 2"
-#define CS3 "Codeset 3"
-
-#define FAL_ERROR_STR resource.falerrmsg[((fal_utyerrno & 0xff) > 25) ? 0 : (fal_utyerrno & 0xff)]
-
-static Widget          pull1, pull2, pull3, pull4, scrolllist;
-static int     xlf_count = 0;
-static XmString *xlf=NULL;
-static int     udc_count = 0;
-static Boolean udc_flag = False;
-static int     *udc=NULL;
-static int     udc_val;
-static int     sty_count = 0;
-static Boolean sty_flag = False;
-static char    **sty=NULL;
-static char    *sty_val=NULL;
-static int     wls_count = 0;
-static Boolean wls_flag = False;
-static int     *wls=NULL;
-static int     wls_val;
-static int     hls_count = 0;
-static Boolean hls_flag = False;
-static int     *hls=NULL;
-static int     hls_val;
-static Widget       *button1=NULL;
-static Widget       *button2=NULL;
-static Widget       *button3=NULL;
-static Widget       *button4=NULL;
-static Widget       focus_widget=NULL;
-
-/****************************************************************
- * callbacks                                                   *
- ***************************************************************/
-
-
-/*ARGSUSED*/
-static void
-CpyXLFDCB(w, client_data, call_data)
-Widget w;
-caddr_t        client_data, *call_data;
-{
-    char       *str;
-    XmStringTable      st;
-    /* get font file name (str:  XLFD name)    */
-    /* get font file name (str:  XLFD name)    */
-    XtVaGetValues(scrolllist, XmNselectedItems, &st, NULL);
-    if( st == NULL ){
-        copyFontData.xlfdname = NULL;
-       return ;
-    }
-    str = _XmStringUngenerate(st[0], NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-    copyFontData.xlfdname = str;
-    if(udc_flag == True)
-       copyFontData.cd_set = udc_val;
-    else
-       copyFontData.cd_set = -1;
-}
-
-
-void
-CpyPtnXLFD()
-{
-    if( cpyDialog == NULL )
-    {
-       CreateCopyXLFD( toplevel ) ;
-
-       /*
-        * add callbacks
-        */
-       XtAddCallback(cpyDialog, XmNokCallback, (XtCallbackProc)_unmap, NULL);
-       XtAddCallback(cpyDialog, XmNokCallback,
-                                       (XtCallbackProc)CpyXLFDCB, NULL);
-       XtAddCallback(cpyDialog, XmNokCallback, (XtCallbackProc)CpyCB, NULL);
-
-       XtAddCallback(cpyDialog, XmNcancelCallback,
-                               (XtCallbackProc)_unmap, (XtPointer)1);
-       XtAddCallback(cpyDialog, XmNcancelCallback,
-                               (XtCallbackProc)CpyXLFDCB,  (XtPointer)1);
-       XtAddCallback(cpyDialog, XmNcancelCallback,
-                               (XtCallbackProc)CpyCB, (XtPointer)1);
-       XtAddCallback(cpyDialog, XmNhelpCallback, (XtCallbackProc)_unmap, NULL);
-       XtAddCallback(cpyDialog, XmNhelpCallback,
-                               (XtCallbackProc)PopdownCpyPtn, NULL);
-
-       AddPopupProc( cpyDialog, InitCpyPtn ) ;
-
-       SrcTf.w1  = codeText[0] ;
-       SrcTf.w2  = codeText[1] ;
-       DestTf.w1 = codeText[2] ;
-       DestTf.w2 = NULL;
-
-    }
-    xlfdPopupDialog( cpyDialog );
-}
-
-
-static void
-create_xlfd()
-{
-       int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-       FalFontData key;
-       FalFontDataList *fontlist;
-       FalFontData *f;
-       int i;
-
-       if (udc_flag == True) {
-               key.cd_set = udc_val;
-               mask |= FAL_FONT_MASK_CODE_SET;
-       }
-       if (sty_flag == True) {
-               key.style.name = sty_val;
-               mask |= FAL_FONT_MASK_STYLE_NAME;
-       }
-       if (wls_flag == True) {
-               key.size.w = wls_val;
-               mask |= FAL_FONT_MASK_SIZE_W;
-       }
-       if (hls_flag == True) {
-               key.size.h = hls_val;
-               mask |= FAL_FONT_MASK_SIZE_H;
-       }
-       xlf_count = 0;
-       if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-               return;
-       }
-       if(fontlist->num == 0) {
-               FalFreeFontList(fontlist);
-               return;
-       }
-       xlf = (XmString *)XtMalloc(sizeof(XmString) * fontlist->num);
-       for (i=0, f=fontlist->list; i < fontlist->num; i++, f++) {
-           xlf[xlf_count++] = XmStringCreateLocalized(f->xlfdname);
-       }
-       FalFreeFontList(fontlist);
-}
-
-static void
-udc_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-       moji = _XmStringUngenerate(label, NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if(strncmp(moji, "*", 1) == 0) {
-               udc_flag = False;
-       } else if(strcmp(moji, CS0) == 0) {
-               udc_val = FAL_FONT_CS0;
-               udc_flag = True;
-       } else if(strcmp(moji, CS1) == 0) {
-               udc_val = FAL_FONT_CS1;
-               udc_flag = True;
-       } else if(strcmp(moji, CS2) == 0) {
-               udc_val = FAL_FONT_CS2;
-               udc_flag = True;
-       } else if(strcmp(moji, CS3) == 0) {
-               udc_val = FAL_FONT_CS3;
-               udc_flag = True;
-       } else {
-               udc_flag = False;
-       }
-       XtFree(moji);
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-sty_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-       if (sty_val) {
-               XtFree(sty_val);
-               sty_val = NULL;
-       }
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-       moji = _XmStringUngenerate(label, NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if(strncmp(moji, "*", 1) == 0) {
-               sty_flag = False;
-       }
-       else {
-               sty_val = XtMalloc(sizeof(char) * (strlen(moji) + 1));
-               strcpy(sty_val, moji);
-               sty_flag = True;
-       }
-       XtFree(moji);
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-wls_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-       moji = _XmStringUngenerate(label, NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if(strncmp(moji, "*", 1) == 0) {
-               wls_flag = False;
-       }
-       else {
-               wls_val = atoi(moji);
-               wls_flag = True;
-       }
-       XmStringFree(label);
-       XtFree(moji);
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-hls_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-       moji = _XmStringUngenerate(label, NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if(strncmp(moji, "*", 1) == 0) {
-               hls_flag = False;
-       }
-       else {
-               hls_val = atoi(moji);
-               hls_flag = True;
-       }
-       XmStringFree(label);
-       XtFree(moji);
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-button_set1()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (sty_flag == True) {
-        key.style.name = sty_val;
-        mask |= FAL_FONT_MASK_STYLE_NAME;
-    }
-    if (wls_flag == True) {
-        key.size.w = wls_val;
-        mask |= FAL_FONT_MASK_SIZE_W;
-    }
-    if (hls_flag == True) {
-        key.size.h = hls_val;
-        mask |= FAL_FONT_MASK_SIZE_H;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-        for (j=0; j<udc_count; j++) 
-           XtSetSensitive(button1[j], False);
-       return;
-    }
-    if(fontlist->num == 0) {
-       FalFreeFontList(fontlist);
-        for (j=0; j<udc_count; j++) 
-           XtSetSensitive(button1[j], False);
-        return;
-    }
-    for (j=0; j<udc_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-            if(udc[j] == f->cd_set) {
-               found = True;
-                break;
-            }
-        }
-       if(found == False)
-           XtSetSensitive(button1[j], False);
-       else
-           XtSetSensitive(button1[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-static void
-button_set2()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (udc_flag == True) {
-        key.cd_set = udc_val;
-        mask |= FAL_FONT_MASK_CODE_SET;
-    }
-    if (wls_flag == True) {
-        key.size.w = wls_val;
-        mask |= FAL_FONT_MASK_SIZE_W;
-    }
-    if (hls_flag == True) {
-        key.size.h = hls_val;
-        mask |= FAL_FONT_MASK_SIZE_H;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-        for (j=0; j<sty_count; j++)
-           XtSetSensitive(button2[j], False);
-       return;
-    }
-    if(fontlist->num == 0) {
-        for (j=0; j<sty_count; j++)
-           XtSetSensitive(button2[j], False);
-       FalFreeFontList(fontlist);
-        return;
-    }
-    for (j=0; j<sty_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-           if(strcmp(sty[j], f->style.name) == 0) {
-               found = True;
-               break;
-           }
-        }
-       if(found == False)
-           XtSetSensitive(button2[j], False);
-       else
-           XtSetSensitive(button2[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-static void
-button_set3()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (udc_flag == True) {
-        key.cd_set = udc_val;
-        mask |= FAL_FONT_MASK_CODE_SET;
-    }
-    if (sty_flag == True) {
-        key.style.name = sty_val;
-        mask |= FAL_FONT_MASK_STYLE_NAME;
-    }
-    if (hls_flag == True) {
-        key.size.h = hls_val;
-        mask |= FAL_FONT_MASK_SIZE_H;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-       for (j=0; j<wls_count; j++)
-           XtSetSensitive(button3[j], False);
-       return;
-    }
-    if(fontlist->num == 0) {
-       for (j=0; j<wls_count; j++)
-           XtSetSensitive(button3[j], False);
-       FalFreeFontList(fontlist);
-        return;
-    }
-    for (j=0; j<wls_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-            if(wls[j] == f->size.w) {
-               found = True;
-                break;
-            }
-        }
-       if(found == False)
-           XtSetSensitive(button3[j], False);
-       else
-           XtSetSensitive(button3[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-static void
-button_set4()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (udc_flag == True) {
-        key.cd_set = udc_val;
-        mask |= FAL_FONT_MASK_CODE_SET;
-    }
-    if (sty_flag == True) {
-        key.style.name = sty_val;
-        mask |= FAL_FONT_MASK_STYLE_NAME;
-    }
-    if (wls_flag == True) {
-        key.size.w = wls_val;
-        mask |= FAL_FONT_MASK_SIZE_W;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-        for (j=0; j<hls_count; j++)
-           XtSetSensitive(button4[j], False);
-       return;
-    }
-    if(fontlist->num == 0) {
-        for (j=0; j<hls_count; j++)
-           XtSetSensitive(button4[j], False);
-       FalFreeFontList(fontlist);
-        return;
-    }
-    for (j=0; j<hls_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-            if(hls[j] == f->size.h) {
-                found = True;
-                break;
-            }
-        }
-        if (found == False)
-           XtSetSensitive(button4[j], False);
-       else
-           XtSetSensitive(button4[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-
-static void
-font_init()
-{
-       FalFontDataList *fontlist;
-       FalFontData     *f;
-       Boolean         found;
-       int             i, j;
-       char            tmp[16];
-       char            err[128];
-       Widget          button;
-       extern void     data_sort();
-       extern void     Error_message();
-
-       xlf_count = udc_count = sty_count = wls_count = hls_count = 0;
-       if (FalGetFontList(NULL, FAL_FONT_MASK_DEFINED |
-                       FAL_FONT_MASK_UNDEFINED, &fontlist) == FAL_ERROR) {
-               snprintf(err, sizeof(err), "%s", FAL_ERROR_STR);
-               Error_message((Widget)NULL, err);
-               return;
-       }
-       if(fontlist->num == 0) {
-               FalFreeFontList(fontlist);
-               snprintf(err, sizeof(err), "%s", resource.mn_no_font);
-               Error_message((Widget)NULL, err);
-               return;
-       }
-       xlf = (XmString *)XtMalloc(sizeof(XmString) * fontlist->num);
-       udc = (int *)XtMalloc(sizeof(int) * fontlist->num);
-       sty = (char **)XtMalloc(sizeof(char *) * fontlist->num);
-       wls = (int *)XtMalloc(sizeof(int) * fontlist->num);
-       hls = (int *)XtMalloc(sizeof(int) * fontlist->num);
-       for (i=0, f=fontlist->list; i < fontlist->num; i++, f++) {
-           xlf[xlf_count++] = XmStringCreateLocalized(f->xlfdname);
-           for (j=0,found=False; j<udc_count; j++) {
-               if(udc[j] == f->cd_set) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               udc[udc_count++] = f->cd_set;
-           }
-           for (j=0,found=False; j<sty_count; j++) {
-               if(strcmp(sty[j], f->style.name) == 0) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               sty[sty_count] = XtMalloc(sizeof(char) * (strlen(f->style.name) + 1));
-               strcpy(sty[sty_count++], f->style.name);
-           }
-           if (f->size.w != -1) {
-           for (j=0,found=False; j<wls_count; j++) {
-               if(wls[j] == f->size.w) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               wls[wls_count++] = f->size.w;
-           }
-           }
-           for (j=0,found=False; j<hls_count; j++) {
-               if(hls[j] == f->size.h) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               hls[hls_count++] = f->size.h;
-           }
-       }
-       FalFreeFontList(fontlist);
-
-       data_sort(udc, udc_count);
-       data_sort(wls, wls_count);
-       data_sort(hls, hls_count);
-
-       button1 = (Widget *) XtMalloc(sizeof(Widget) * udc_count);
-       button2 = (Widget *) XtMalloc(sizeof(Widget) * sty_count);
-       button3 = (Widget *) XtMalloc(sizeof(Widget) * wls_count);
-       button4 = (Widget *) XtMalloc(sizeof(Widget) * hls_count);
-
-       button = XmCreatePushButton(pull1, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)udc_call, NULL);
-       for (i=0; i < udc_count; i++) {
-               if(udc[i] == FAL_FONT_CS0)
-                       snprintf(tmp, sizeof(tmp), "%s", CS0);
-               else if(udc[i] == FAL_FONT_CS1)
-                       snprintf(tmp, sizeof(tmp), "%s", CS1);
-               else if(udc[i] == FAL_FONT_CS2)
-                       snprintf(tmp, sizeof(tmp), "%s", CS2);
-               else if(udc[i] == FAL_FONT_CS3)
-                       snprintf(tmp, sizeof(tmp), "%s", CS3);
-               else
-                       snprintf(tmp, sizeof(tmp), "Codeset %x?", udc[i]);
-               button1[i] = XmCreatePushButton(pull1, tmp, NULL, 0);
-               XtManageChild(button1[i]);
-               XtAddCallback(button1[i], XmNactivateCallback,
-                                               (XtCallbackProc)udc_call, NULL);
-       }
-
-       button = XmCreatePushButton(pull2, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)sty_call, NULL);
-       for (i=0; i < sty_count; i++) {
-               button2[i] = XmCreatePushButton(pull2, sty[i], NULL, 0);
-               XtManageChild(button2[i]);
-               XtAddCallback(button2[i], XmNactivateCallback,
-                                               (XtCallbackProc)sty_call, NULL);
-       }
-
-       button = XmCreatePushButton(pull3, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)wls_call, NULL);
-       for (i=0; i < wls_count; i++) {
-               snprintf(tmp, sizeof(tmp), "%d", wls[i]);
-               button3[i] = XmCreatePushButton(pull3, tmp, NULL, 0);
-               XtManageChild(button3[i]);
-               XtAddCallback(button3[i], XmNactivateCallback,
-                                               (XtCallbackProc)wls_call, NULL);
-       }
-
-       button = XmCreatePushButton(pull4, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)hls_call, NULL);
-       for (i=0; i < hls_count; i++) {
-               snprintf(tmp, sizeof(tmp), "%d", hls[i]);
-               button4[i] = XmCreatePushButton(pull4, tmp, NULL, 0);
-               XtManageChild(button4[i]);
-               XtAddCallback(button4[i], XmNactivateCallback,
-                                               (XtCallbackProc)hls_call, NULL);
-       }
-}
-
-/*ARGSUSED*/
-static void
-arrow_change(w, wid)
-Widget w;
-Widget wid;
-{
-    if (XtIsSensitive(wid)) {
-       XtSetSensitive(wid, False);
-    } else {
-       XtSetSensitive(wid, True);
-    }
-}
-
-static void
-focus(w)
-Widget w;
-{
-    focus_widget = w;
-}
-
-static void
-code_input()
-{
-    char       *str;
-    XmStringTable      st;
-    extern void        CodeWindow();
-    XtVaGetValues(scrolllist, XmNselectedItems, &st, NULL);
-    if( st == NULL ){
-       return ;
-    }
-    str = _XmStringUngenerate(st[0], NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-    CodeWindow(focus_widget, str, True);
-}
-
-static void
-code_input2()
-{
-    extern void        CodeWindow();
-    CodeWindow(codeText[2], fullFontData.xlfdname, False);
-}
-
-static Widget
-CreateCopyXLFD( top )
-Widget top ;
-{
-
-       int             n;
-       Arg             args[16];
-       XmString        xms, xms1, xms2 ;
-        Widget          frame, row, label1, row1, row2, row3, row4, row5;
-       Widget          sep, cas1, cas2, cas3, cas4;
-       Widget          arrow, code;
-       XmString        str;
-       extern Pixmap   arrow_pix;
-       Display             *disp;
-       Window              root;
-       Pixmap              mask;
-       XpmAttributes       attr;
-
-       udc_flag = sty_flag = wls_flag = hls_flag = False;
-
-        /*
-       *  create base window
-       */
-       n = 0 ;
-       XtSetArg( args[n], XmNautoUnmanage,     False ) ;        n++ ;
-       xms = XmStringCreateLocalized( resource.l_copy ) ;
-       XtSetArg( args[n], XmNokLabelString,    xms ) ;         n++ ;
-       xms1 = XmStringCreateLocalized( resource.l_overlay ) ;
-       XtSetArg( args[n], XmNcancelLabelString, xms1 ) ;       n++ ;
-       xms2 = XmStringCreateLocalized( resource.quit_label) ;
-       XtSetArg( args[n], XmNhelpLabelString,  xms2 ) ;        n++ ;
-       XtSetArg( args[n], XmNnoResize,         True ) ;        n++ ;
-       XtSetArg( args[n], XmNminimizeButtons,  True ) ;        n++ ;
-       XtSetArg( args[n], XmNtitle,    resource.l_copy_title) ;        n++ ;
-       cpyDialog = XmCreateTemplateDialog( top, "copy_dialog", args, n );
-
-       XmStringFree( xms ) ;
-       XmStringFree( xms1 ) ;
-       XmStringFree( xms2 ) ;
-
-       n = 0;
-       pull1 = XmCreatePulldownMenu(top, "pull", args, n);
-       pull2 = XmCreatePulldownMenu(top, "pull", args, n);
-       pull3 = XmCreatePulldownMenu(top, "pull", args, n);
-       pull4 = XmCreatePulldownMenu(top, "pull", args, n);
-
-       n = 0 ;
-       row  = XmCreateRowColumn( cpyDialog, "BaseForm", args, n );
-       XtManageChild( row );
-
-       n = 0;
-       frame = XmCreateFrame( row, "frame", args, n);
-       XtManageChild( frame );
-
-       n = 0 ;
-       row1  = XmCreateRowColumn( frame, "row", args, n );
-       XtManageChild( row1 );
-
-       n = 0;
-       str = XmStringCreateLocalized(resource.l_selectitem) ;
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       label1 = XmCreateLabel( row1, "SelectItems", args, n);
-       XtManageChild( label1 );
-       XmStringFree(str);
-
-       n = 0 ;
-       row2  = XmCreateRowColumn( row1, "row", args, n );
-       XtManageChild( row2 );
-
-       n = 0 ;
-       str = XmStringCreateLocalized(resource.l_codeset) ;
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull1);  n++;
-       cas1  = XmCreateOptionMenu( row2, "CodeSet", args, n );
-       XtManageChild( cas1 );
-       XtAddCallback(XmOptionButtonGadget(cas1), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set1, NULL);
-       XmStringFree(str);
-       n = 0 ;
-       str = XmStringCreateLocalized(resource.l_style) ;
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull2);  n++;
-       cas2  = XmCreateOptionMenu( row2, "Style", args, n );
-       XtAddCallback(XmOptionButtonGadget(cas2), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set2, NULL);
-       XtManageChild( cas2 );
-       XmStringFree(str);
-
-       n = 0 ;
-       str = XmStringCreateLocalized(resource.l_width) ;
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull3);  n++;
-       cas3  = XmCreateOptionMenu( row2, "Width", args, n );
-       XtManageChild( cas3 );
-       XtAddCallback(XmOptionButtonGadget(cas3), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set3, NULL);
-       XmStringFree(str);
-
-       n = 0 ;
-       str = XmStringCreateLocalized(resource.l_height) ;
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull4);  n++;
-       cas4  = XmCreateOptionMenu( row2, "Height", args, n );
-       XtManageChild( cas4 );
-       XtAddCallback(XmOptionButtonGadget(cas4), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set4, NULL);
-       XmStringFree(str);
-
-       font_init();
-
-       n = 0;
-        XtSetArg(args[n], XmNvisibleItemCount, 10) ;   n++ ;
-        XtSetArg(args[n], XmNlistSizePolicy, XmCONSTANT) ;     n++ ;
-        XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmSTATIC) ;       n++ ;
-        XtSetArg(args[n], XmNselectionPolicy, XmSINGLE_SELECT) ;       n++ ;
-        XtSetArg(args[n], XmNitems, xlf) ;     n++ ;
-        XtSetArg(args[n], XmNitemCount, xlf_count) ;   n++ ;
-       scrolllist = XmCreateScrolledList(row, "scrolllist", args, n);
-       XtManageChild(scrolllist);
-
-       n = 0;
-       sep = XmCreateSeparator(row, "sep", args, n);
-       XtManageChild(sep);
-
-       n = 0 ;
-       row3  = XmCreateRowColumn( row, "row", args, n );
-       XtManageChild( row3 );
-
-       if (! arrow_pix) {
-           disp = XtDisplay(row);
-           root = DefaultRootWindow(disp);
-           attr.valuemask = 0;
-           ReadXpm(disp, root, arrow_pm, &arrow_pix, &mask, &attr);
-       }
-
-       n = 0 ;
-        XtSetArg(args[n], XmNorientation, XmHORIZONTAL) ;      n++ ;
-       row4  = XmCreateRowColumn( row3, "row", args, n );
-       XtManageChild( row4 );
-
-       xms = XmStringCreateLocalized(resource.l_copy_src_code);
-       n = 0;
-       XtSetArg(args[n], XmNlabelString, xms); n++ ;
-       codeLabel[0] = XmCreateLabel(row4 , "copylabel", args, n);
-       XtManageChild(codeLabel[0]);
-       XmStringFree( xms ) ;
-
-       n = 0;
-       XtSetArg(args[n], XmNcolumns,   4);                     n++;
-       XtSetArg(args[n], XmNmaxLength, 4);                     n++;
-       XtSetArg(args[n], XmNeditable,  True);                  n++;
-       XtSetArg(args[n], XmNcursorPositionVisible, True);      n++;
-       focus_widget = codeText[0] = XmCreateText(row4 , "copytext",
-                                                               args, n);
-       XtManageChild(codeText[0]);
-
-       XtAddCallback(codeText[0], XmNfocusCallback, (XtCallbackProc)focus, NULL);
-
-       n = 0;
-       XtSetArg(args[n], XmNlabelPixmap, arrow_pix);  n++;
-       XtSetArg(args[n], XmNlabelType, XmPIXMAP); n++;
-       XtSetArg(args[n], XmNindicatorOn, False); n++;
-       XtSetArg(args[n], XmNshadowThickness, 2); n++;
-       XtSetArg(args[n], XmNfillOnSelect, False); n++;
-       XtSetArg(args[n], XmNhighlightThickness, 0); n++;
-       arrow = XmCreateToggleButton(row4, "arrow", args, n);
-       XtManageChild(arrow);
-
-       n = 0;
-       XtSetArg(args[n], XmNcolumns,   4);                     n++;
-       XtSetArg(args[n], XmNmaxLength, 4);                     n++;
-       XtSetArg(args[n], XmNeditable,  True);                  n++;
-       XtSetArg(args[n], XmNcursorPositionVisible, True);      n++;
-       codeText[1] = XmCreateText(row4 , "copytext", args, n);
-       XtManageChild(codeText[1]);
-       XtSetSensitive(codeText[1], False);
-
-       XtAddCallback(codeText[1], XmNfocusCallback, (XtCallbackProc)focus, NULL);
-
-       XtAddCallback(arrow, XmNvalueChangedCallback,
-                       (XtCallbackProc)arrow_change, (XtPointer)codeText[1]);
-
-       n = 0;
-       xms = XmStringCreateLocalized(resource.code) ;
-       XtSetArg(args[n], XmNlabelString, xms); n++;
-       XtSetArg(args[n], XmNhighlightThickness, 0); n++;
-       code = XmCreatePushButton(row4, "Code", args, n);
-       XtManageChild(code);
-       XmStringFree(xms);
-
-       XtAddCallback(code, XmNactivateCallback,
-                       (XtCallbackProc)code_input, (XtPointer)NULL);
-
-       n = 0 ;
-        XtSetArg(args[n], XmNorientation, XmHORIZONTAL) ;      n++ ;
-       row5  = XmCreateRowColumn( row3, "row", args, n );
-       XtManageChild( row5 );
-
-        xms = XmStringCreateLocalized(resource.l_copy_dest_code);
-
-       n = 0;
-       XtSetArg(args[n], XmNlabelString, xms); n++ ;
-       codeLabel[1] = XmCreateLabel(row5 , "copylabel", args, n);
-       XtManageChild(codeLabel[1]);
-       XmStringFree( xms ) ;
-
-       n = 0;
-       XtSetArg(args[n], XmNcolumns,   4);                     n++;
-       XtSetArg(args[n], XmNmaxLength, 4);                     n++;
-       XtSetArg(args[n], XmNeditable,  True);                  n++;
-       XtSetArg(args[n], XmNcursorPositionVisible, True);      n++;
-       codeText[2] = XmCreateText(row5 , "copytext", args, n);
-       XtManageChild(codeText[2]);
-
-       n = 0;
-       xms = XmStringCreateLocalized(resource.code) ;
-       XtSetArg(args[n], XmNlabelString, xms); n++;
-       XtSetArg(args[n], XmNhighlightThickness, 0); n++;
-       code = XmCreatePushButton(row5, "Code", args, n);
-       XtManageChild(code);
-       XmStringFree(xms);
-
-       XtAddCallback(code, XmNactivateCallback,
-                       (XtCallbackProc)code_input2, (XtPointer)NULL);
-
-       return( cpyDialog ) ;
-}
diff --git a/cde/programs/dtudcfonted/dtaddcpf/Imakefile b/cde/programs/dtudcfonted/dtaddcpf/Imakefile
deleted file mode 100644 (file)
index 444aa58..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/8 1996/09/09 11:19:28 drk $
-
-        DESTDIR = $(CDE_INSTALLATION_TOP)
-        BINDIR  = /bin
-
-        OPT1 = -DDEFAULT_CODESET='"'3'"'
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-        OPT3 = -DSNFFONTC='"'$(SNFFONTC)'"'
-
-        DEFINES     = $(OPT1) $(OPT2) $(OPT3)
-
-         INCLUDES  = -I../include -I../libfal/include
-
-  LOCAL_LIBRARIES  = ../libfuty/liboakfuty.a ../libfal/libfal.a $(XLIB) -lc
-
-
-             SRCS  = addcpf.c
-
-             OBJS  = addcpf.o
-
-         SHLIBDIR  = ../../../usr/bin
-
-ComplexProgramTarget(dtaddcpf)
diff --git a/cde/programs/dtudcfonted/dtaddcpf/addcpf.c b/cde/programs/dtudcfonted/dtaddcpf/addcpf.c
deleted file mode 100644 (file)
index 7b2162c..0000000
+++ /dev/null
@@ -1,960 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: addcpf.c /main/9 1996/11/08 02:00:29 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include       <stdio.h>
-#include       <locale.h>
-#include       <fcntl.h>
-#include       <signal.h>
-#include       <sys/types.h>
-#include       <sys/stat.h>
-#ifndef SVR4
-#if !defined( SYSV )
-#include       <sys/resource.h>
-#endif
-#include       <sys/wait.h>
-#else
-#include       <wait.h>
-#endif
-
-#include       <unistd.h>
-#include       <string.h>
-#include       <stdlib.h>
-
-#include       "bdfgpf.h"
-
-#include       <X11/Xmd.h>
-#include       <X11/Xproto.h>
-#include       "fontstruct.h"
-
-#include       "FaLib.h"
-#include       "snfstruct.h"
-#include       "udcutil.h"
-
-#include       <errno.h>
-
-
-static int     rw_init() ;
-static int     readSnf() ;
-static int     readSnf_with_init() ;
-static int     readSnfHeader() ;
-static int     readBdfHeaderAndPut() ;
-static int     mergePtn() ;
-static int     ModifyPtn() ;
-static int     InsertPtn() ;
-static int     writeSnf() ;
-static void    put_error_and_exit();
-static void    put_help();
-static int     readBdfToMemory_with_init() ;
-
-extern int     fal_glyph_to_code() ;
-
-static struct ptobhead WriteSnf;
-
-static char    *targ_file = NULL;      /* UDC_file_name */
-static char    *com = NULL;            /* command_name */
-static char    *spacing ;
-static char    *char_set ;
-static char    *util_locale ;
-
-static pid_t   gtob_pid = 0;
-static pid_t   btop_pid = 0;
-#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__)
-static int     chld_stat ;
-#else
-static union   wait    chld_stat ;
-#endif
-
-static void
-sigint_out()
-{
-       if (WriteSnf.out_file) {
-               Unlink_Tmpfile( WriteSnf.out_file, com );
-       }
-       exit( 0 );
-}
-
-main( argc, argv )
-int    argc;
-char   *argv[];
-{
-       int     code_area , init, modify, help, no_infile, no_style;
-       int     fupd = 0 ;
-       int     init_all, rtn, i;
-#ifndef ROOT_ONLY
-       int     exit_stat;
-#endif
-       struct btophead ReadSnf;        /* output file (GPF) */
-       struct ptobhead ReadGpf;        /* input file (CPF) */
-       struct stat     statbuf;
-       char            snf_file[BUFSIZE] ;
-       char            buf[BUFSIZE];
-       char            *style ;
-       char            *xlfdname, *cbuf ;
-       int             chk_fd;
-       FalGlyphRegion  *gr ;
-       int             num_gr ;
-       char            *ep ;
-
-       int     code_no;
-       char    *codeset = DEFAULT_CODESET;
-
-       if( (util_locale = (char *)getenv( "LANG" )) == NULL ){
-           util_locale = "C" ;
-       }
-       ReadSnf.in_file = ReadGpf.in_file = WriteSnf.out_file = NULL;
-       com = argv[0];
-       COMM_SETDEFAULTSTYLE( style ) ; 
-       cbuf = xlfdname = ep = '\0' ;
-
-       gr = NULL ;
-       num_gr = 0 ;
-       spacing = char_set = NULL ;
-
-       if (!( bdftopcf = get_cmd_path( getenv( "PATH" ), BDFTOPCF_CMD ))) {
-               bdftopcf = BDFTOPCF;
-       }
-       if (!( oakgtobdf = get_cmd_path( getenv( "PATH" ), SNFTOBDF_CMD ))) {
-               oakgtobdf = SNFTOBDF;
-       }
-       if (!( bdftosnf = get_cmd_path( getenv( "PATH" ), BDFTOSNF_CMD ))) {
-               bdftosnf = BDFTOSNF;
-       }
-
-       code_area = NORMAL;
-       init = modify = help = no_infile = no_style = init_all = 0;
-
-       for ( i = 1; i < argc; i++ ) {
-               if ( !strcmp( argv[i], "-g" ) ) {
-                       if ( ( i < argc-1) && (*argv[i+1] != '-' ) ) {
-                               ReadSnf.in_file = argv[++i];
-                       }
-               } else if ( !strcmp( argv[i], "-p" ) ) {
-                       if ( (i < argc-1) && (*argv[i+1] != '-') ){
-                               ReadGpf.in_file = argv[++i];
-                       } else {
-                               no_infile = 1;
-                       }
-               } else if ( !strcmp( argv[i], "-init" ) ) {
-                       init = 1;
-               } else if ( !strcmp( argv[i], "-modify" ) ) {
-                       modify = 1;
-               } else if ( !strcmp( argv[i], "-system" ) ) {
-                       code_area |= SYSTM;
-               } else if ( !strcmp( argv[i], "-help" ) ) {
-                       help = 1;
-               } else if ( !strcmp( argv[i], "-style" ) ) {
-                       if ( ( i < argc-1 ) && ( *argv[i+1] != '-' ) ){
-                               style = argv[++i];
-                       } else {
-                               no_style = 1;
-                       }
-               } else if ( !strcmp( argv[i], "-codeset" ) ) {
-                       if ( ( i < argc - 1 ) && ( *argv[i+1] != '-' )){
-                               codeset = argv[++i];
-                               COMM_SET_CODESET( codeset, code_area ) ;
-                       }
-               } else if ( !strcmp( argv[i], "-xlfd" ) ) {
-                       if ( i < argc - 1 ){
-                               xlfdname = argv[++i];
-                       }
-               } else if ( COMM_SBOPT_STRCMP( argv, i ) ) {
-                   COMM_SBOPT_SETSBOPT( code_area ) ;
-               } else if ( !strcmp( argv[i], "-f" ) ) {
-                       fupd = 1;
-               } else {
-                   put_help(argv[0]);
-                   exit( 1 );
-               }
-       }
-
-       /* help_message */
-       if ( help == 1 ) {
-               put_help( argv[0] );
-               exit( 0 );
-       }
-       COMM_SBOPT_CHECKSBOPT( argv[0], code_area ) ;
-
-       if ( no_infile ) {
-                USAGE1("%s : The input file name following -p option cannot be omitted.\n", argv[0] );
-               exit( 1 );
-       }
-
-       ep = (char *)strchr( codeset, '\0' ) ;
-       code_no = (int)strtol( codeset, &cbuf, 10 ) ;
-       if ( cbuf == codeset || cbuf != ep ) {
-               USAGE2("%s : The codeset number is not right.¡Ê %s ¡Ë\n",
-                       argv[0], codeset );
-               exit( 1 );
-       }
-
-       if ( no_style ) {
-                USAGE1("%s : The style is not specified.\n", argv[0] ) ;
-               exit( 1 );
-       }
-
-       if ( ReadSnf.in_file == NULL && xlfdname == NULL ) {
-               if ( code_area & SYSTM ) {
-                        USAGE1("%s : The GPF output file name cannot be omitted.\n", argv[0] );
-               } else {        /* string of charcter size */
-                        USAGE1("%s : The character size specification cannot be omitted.\n", argv[0] );
-               }
-               exit( 1 );
-       }
-
-       /* open GPF file */
-       if ( !(code_area & SYSTM) ) {
-           if( xlfdname ) {
-               if ( GetUdcFileName( argv[0], code_no, xlfdname, snf_file ) ) {
-                               USAGE1("%s : Failed to get font file. Terminates abnormally.\n", argv[0]);
-                       exit( 1 );
-               }
-               ReadSnf.in_file = snf_file ;
-           } else {
-               
-
-               switch ( GetFileName( argv[0], ReadSnf.in_file, style, code_no, snf_file ) ) {
-               case 0:
-                       ReadSnf.in_file = snf_file;
-                       break;
-               case -1:
-                       exit(1);
-               default:
-                        USAGE1("%s : The font file name cannot be obtained. Terminates abnormally.\n", argv[0]);
-                       exit(1);
-               }
-           }
-           if ( GetUdcRegion( argv[0], code_no, ReadSnf.in_file, &num_gr, &gr ) ) {
-               USAGE1("%s : This font cannot get UDC code region. Terminates abnormally.\n", argv[0]);
-               exit( 1 );
-           }
-       } else {
-           num_gr = 1 ;
-           if( (gr = (FalGlyphRegion *)malloc( sizeof(FalGlyphRegion) * num_gr )) == NULL ) {
-               USAGE1("%s : malloc error. Terminates abnormally.\n", argv[0]);
-               exit( 1 );
-           }
-           gr[0].start = MIN_CODE ;
-           gr[0].end   = MAX_CODE ;
-       }
-       /*
-        * refuse proportional fonts
-        */
-       if ( GetUdcFontName( ReadSnf.in_file, NULL, &xlfdname ) ) {
-           USAGE1("%s : This font cannot get XLFD. Terminates abnormally.\n", argv[0]);
-           exit( 1 );
-       }
-       GETSPACINGSTR( spacing, xlfdname ) ;
-       if ( !strcmp( "p", spacing ) || !strcmp( "P", spacing ) ) {
-           USAGE2("%s cannot edit proportional fonts.(SPACING \"%s\")\n", argv[0], spacing );
-           exit( 1 );
-       }
-       GETCHARSETSTR( char_set, xlfdname ) ;
-
-       /* get ReadSnf.in_file */
-       if ((targ_file = GetRealFileName( ReadSnf.in_file )) == NULL){
-                USAGE2("%s : It was not possible to refer to the substance of the font file. \"%s\"\n", argv[0], ReadSnf.in_file);
-               exit(1);
-       }
-       WriteSnf.snf_file = targ_file;
-
-       if ( ( chk_fd = open( targ_file, O_RDWR ) ) < 0  ) {
-           USAGE2("%s : The font file of substance \"%s\" cannot be opened.\n", argv[0] , targ_file );
-           exit( 1 );
-       }
-       if( !fupd ){
-           if ( isLock( chk_fd ) == 1 ) {
-               USAGE1("%s : Editing by other application. \n", argv[0] );
-               close( chk_fd );
-               exit( 1 );
-           }
-       }
-       close( chk_fd );
-
-       /* We read whole characters from gpf file. */
-       ReadSnf.start_code = MIN_CODE;
-       ReadSnf.end_code   = MAX_CODE;
-       ReadSnf.code_category = ALL_CODE;
-
-       switch ( code_area ) {
-       case    SYSTM:
-               ReadGpf.start_code = MIN_CODE;
-               ReadGpf.end_code   = MAX_CODE;
-               ReadGpf.code_category = ALL_CODE;
-               break;
-       case    SYSTM | CDSET1 :
-               ReadGpf.start_code = MIN_CODE;
-               ReadGpf.end_code   = MAX_CODE;
-               ReadGpf.code_category = ALL_CODE;
-               break;
-       default:
-               COMM_SBFNT_SETUDCAREA( argv[0], ReadGpf, char_set, code_area, num_gr, gr ) ;
-       }
-
-       COMM_SBFNT_CONVCODETOGI( char_set, ReadSnf ) ;
-       COMM_SBFNT_CONVCODETOGI( char_set, ReadGpf ) ;
-
-       signal( SIGHUP , (void(*)())sigint_out );
-       signal( SIGINT , (void(*)())sigint_out );
-       signal( SIGQUIT, (void(*)())sigint_out );
-       signal( SIGTERM, (void(*)())sigint_out );
-
-
-       /*
-        * rw_init() 
-        *
-        * GPFTOBDF, BDFTOGPF
-        *
-        *  (ReadSnf.in_file)  -->  GPFTOBDF ==H 
-        *                                     H
-        *                                      dtaddcpf  <-- (ReadGpf.in_file)
-        *                                     H
-        * (WriteSnf.out_file) <--  BDFTOGPF ==H
-        *
-        */
-       if ( rtn = rw_init( &ReadGpf, &ReadSnf, &WriteSnf, init_all ) ) {
-               if ( WriteSnf.out_file ) {
-                       Unlink_Tmpfile( WriteSnf.out_file, argv[0] );
-               }
-               put_error_and_exit( &ReadGpf, &ReadSnf, &WriteSnf, rtn, argv[0] );
-       }
-
-       if ( rtn = ReadGpfHeader( &ReadGpf, buf ) ) {
-               if ( WriteSnf.out_file ) {
-                       Unlink_Tmpfile( WriteSnf.out_file, argv[0] );
-               }
-               put_error_and_exit( &ReadGpf, &ReadSnf, &WriteSnf, rtn, argv[0] );
-       }
-
-       if ( init_all ) {
-               /* We read only header of gpf file. */
-               rtn = readSnfHeader( &ReadGpf, &ReadSnf, &WriteSnf, buf );
-       } else if ( init ) {
-               /* We read characters in UDC area from gpf file. */
-               rtn = readSnf_with_init( &ReadGpf, &ReadSnf, &WriteSnf,
-                   init, buf, num_gr, gr );
-       } else {
-               /* We read whole characters from gpf file. */
-               rtn = readSnf( &ReadGpf, &ReadSnf, &WriteSnf, buf );
-       }
-       if ( rtn ) {
-               if ( WriteSnf.out_file ) {
-                       Unlink_Tmpfile( WriteSnf.out_file, argv[0] );
-               }
-               put_error_and_exit( &ReadGpf, &ReadSnf, &WriteSnf, rtn, argv[0] );
-       }
-
-       fclose( ReadSnf.input );
-       WaitID( gtob_pid, chld_stat ) ;
-
-       if ( ( rtn = mergePtn( argv[0], &ReadGpf, &ReadSnf, buf, code_area, modify, argv[0], num_gr, gr, code_no ) ) ) {
-               if ( WriteSnf.out_file ) {
-                       Unlink_Tmpfile( WriteSnf.out_file, argv[0] );
-               }
-               put_error_and_exit( &ReadGpf, &ReadSnf, &WriteSnf, rtn, argv[0] );
-       }
-
-       /* write SNF output file */
-       if ( ( rtn = writeSnf( &ReadSnf, &WriteSnf ) ) ) {
-               if ( WriteSnf.out_file ) {
-                       Unlink_Tmpfile( WriteSnf.out_file, argv[0] );
-               }
-               put_error_and_exit( &ReadGpf, &ReadSnf, &WriteSnf, rtn, argv[0] );
-       }
-
-#ifdef ROOT_ONLY
-       if ( pclose( WriteSnf.output ) ) {
-               Unlink_Tmpfile( WriteSnf.out_file, argv[0] );
-               put_error_and_exit( &ReadGpf, &ReadSnf, &WriteSnf, PCLOSE_ERROR, argv[0] );
-       }
-#else
-       fclose( WriteSnf.output );
-       WaitID( btop_pid, chld_stat ) ;
-#if !defined( SVR4 ) && !defined( SYSV ) && !defined(__FreeBSD__)
-       if ( !WIFEXITED(chld_stat) ) {
-#else
-       if ( ! ( WIFEXITED(chld_stat) && !WEXITSTATUS(chld_stat) ) ) {
-#endif
-           USAGE4("%s: The error occurred by %s (%08x). Cannot write %s\n",
-                   argv[0], bdftopcf, chld_stat, WriteSnf.out_file);
-               Unlink_Tmpfile( WriteSnf.out_file, argv[0] );
-               put_error_and_exit( &ReadGpf, &ReadSnf, &WriteSnf,
-                                           FATAL_ERROR, argv[0] );
-       }
-#endif
-       signal( SIGHUP , SIG_IGN );
-       signal( SIGINT , SIG_IGN );
-       signal( SIGQUIT, SIG_IGN );
-       signal( SIGTERM, SIG_IGN );
-
-       if ( ( stat( WriteSnf.out_file, &statbuf ) ) ||
-            ( statbuf.st_size == 0 )
-           ) {
-               Unlink_Tmpfile( WriteSnf.out_file, argv[0] );
-               put_error_and_exit( &ReadGpf, &ReadSnf, &WriteSnf,
-                                               BDF_WRITE, argv[0] );
-       }
-       if ( stat( WriteSnf.snf_file, &statbuf ) ) {
-               Unlink_Tmpfile( WriteSnf.out_file, argv[0] );
-               exit( 1 );
-       }
-       exit( Make_NewFefFile(
-               WriteSnf.snf_file, WriteSnf.out_file,
-               FONT_FILE_PARM,
-               (uid_t)statbuf.st_uid, (gid_t)statbuf.st_gid,
-               argv[0] ));
-}
-
-static
-rw_init(r_gpf, r_snf, w_snf, init_all )
-struct ptobhead        *r_gpf;
-struct btophead        *r_snf;
-struct ptobhead        *w_snf;
-int            init_all;
-{
-       FontInfoRec     *finf;
-       int     fd[2], snf_fd, permission;
-       char    buf[BUFSIZE];
-#ifdef ROOT_ONLY
-       char    command[BUFSIZE], *ep ;
-#else
-       int     pfd[2], ofd;
-#endif
-
-       if ( r_gpf->in_file == NULL ) {
-               r_gpf->input = stdin;
-       } else {
-               if ( ( r_gpf->input = fopen(r_gpf->in_file, "r")) == NULL ) {
-                       return  GPF_OPEN_IN;
-               }
-       }
-
-       /* SNF format */
-       if ( ChkPcfFontFile( w_snf->snf_file ) ) {
-               permission = 0 ;
-               if( (snf_fd = open( w_snf->snf_file, O_RDONLY ) ) >= 0 ) {
-                   COMM_SNF_FILEVERSION( snf_fd, finf, buf, permission ) ;
-                   if ( permission < 0 ) {
-                           return      BDF_INVAL;
-                   }
-               } else {
-                   return BDF_OPEN_IN;
-               }
-       }
-       if (pipe(fd) != 0) {
-               return  PIPE_ERROR;
-       }
-       switch (gtob_pid = fork()) {
-       case    0:
-               close( fd[0] );
-               close( 1 );
-               if ( dup( fd[1] ) < 0 ) {
-                       return  DUP_ERROR;
-               }
-
-               close( fd[1] );
-
-               /* SNFTOBDF */
-               execl( oakgtobdf, oakgtobdf, r_snf->in_file, 0 );
-               return  EXEC_ERROR;
-
-       case    -1:
-               return  FORK_ERROR;
-
-       default:
-               break;
-       }
-       close( fd[1] );
-       if ( ( r_snf->input = fdopen( fd[0], "r" ) ) == NULL ) {
-               return  FDOPEN_ERROR;
-       }
-
-       if ( !( w_snf->out_file = GetTmpPath( targ_file ) ) ) {
-               return  MKTMP_ERROR;
-       }
-
-#ifdef ROOT_ONLY
-       if( ChkPcfFontFile( w_snf->snf_file ) == 0 ) {
-               sprintf(command, "%s > %s", bdftopcf, w_snf->out_file) ;
-       } else {
-               COMM_SNF_POPEN( permission, w_snf->snf_file, w_snf->out_file, ep, buf, command ) ;
-       }
-       if ((w_snf->output = popen(command, "w")) == NULL) {
-               return(POPEN_ERROR);
-       }
-#else  /* ROOT_ONLY */
-       if ( pipe( pfd ) != 0 ) {
-               return  PIPE_ERROR;
-       }
-       switch (btop_pid = fork()) {
-       case    0:
-               if ( ( ofd = open( w_snf->out_file, O_WRONLY | O_CREAT, 0664 ) ) < 0 ) {
-                       return  BDF_OPEN_OUT;
-               }
-               close( 0 );
-               if ( dup(pfd[0]) < 0 ) {
-                       return  DUP_ERROR;
-               }
-               close( pfd[0] );
-               close( pfd[1] );
-               close( 1 );
-               if( dup( ofd ) < 0 ) {
-                       close( ofd );
-                       return  DUP_ERROR;
-               }
-               close( ofd );
-               if ( ChkPcfFontFile( w_snf->snf_file ) == 0 ) {
-                       execl( bdftopcf, bdftopcf, 0 );
-                       return  PCFFONTC_ERROR;
-               }
-
-               COMM_SNF_EXECLBDFTOSNF( permission, buf, w_snf->snf_file ) ;
-               return SNFFONTC_ERROR;
-
-       case    -1:
-                                       return  FORK_ERROR;
-                               
-                   default:
-               break;
-       }
-       close( pfd[0] );
-       if ( ( w_snf->output = fdopen( pfd[1], "w" ) ) == NULL ) {
-               return  FDOPEN_ERROR;
-       }
-#endif /* ROOT_ONLY */
-       return  0;
-}
-
-
-static
-readSnf(r_gpf, r_snf, w_snf, buf)
-struct ptobhead *r_gpf;
-struct btophead *r_snf;
-struct ptobhead *w_snf;
-char                   *buf;
-{
-       int     nchar, rtn;
-
-       if ( ( rtn = readBdfHeaderAndPut( r_snf, w_snf, buf ) ) ) {
-               return  rtn;
-       }
-
-       nchar = r_snf->num_chars + r_gpf->num_chars;
-
-       if ( ( r_snf->code = (int *)malloc( sizeof(int) * nchar ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-
-       if ( ( r_snf->ptn = (char **)malloc( sizeof(char *) * nchar ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-
-       return  ReadBdfToMemory( r_snf, buf ) ;
-}
-
-static
-readSnf_with_init(r_gpf, r_snf, w_snf, init, buf, num_gr, gr )
-struct ptobhead *r_gpf;
-struct btophead *r_snf;
-struct ptobhead *w_snf;
-int            init;
-char           *buf;
-int            num_gr ;
-FalGlyphRegion *gr ;
-{
-       int     nchar, rtn;
-
-
-       if ( ( rtn = readBdfHeaderAndPut( r_snf, w_snf, buf ) ) ) {
-               return  rtn;
-       }
-
-       nchar = r_snf->num_chars + r_gpf->num_chars;
-
-       if ( ( r_snf->code = (int *)malloc( sizeof(int) * nchar ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-
-       if ( ( r_snf->ptn = (char **)malloc( sizeof(char *) * nchar ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-
-       return  readBdfToMemory_with_init( r_snf, init, buf, num_gr, gr ) ;
-}
-
-
-static
-readSnfHeader(r_gpf, r_snf, w_snf, buf)
-struct ptobhead *r_gpf;
-struct btophead *r_snf;
-struct ptobhead *w_snf;
-char   *buf;
-{
-       int     rtn;
-
-       if ( ( rtn = readBdfHeaderAndPut( r_snf, w_snf, buf ) ) ) {
-               return  rtn;
-       }
-
-       r_snf->num_chars = 0;
-
-       if ( ( r_snf->code = (int *)malloc( sizeof(int) * r_gpf->num_chars ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-       if ( ( r_snf->ptn = (char **)malloc( sizeof(char *) * r_gpf->num_chars ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-       return  0;
-}
-
-static
-readBdfHeaderAndPut(r_snf, w_snf, buf)
-struct btophead *r_snf;
-struct ptobhead *w_snf;
-char   *buf;
-{
-       char    *p;
-       int     getstat = 0;
-
-       while ( 1 ) {
-               if ( fgets( buf, BUFSIZE, r_snf->input ) == NULL ) {
-                       return  BDF_INVAL;
-               }
-               p = buf;
-               SCAN_TO_NONSP( p )
-                   if ( !strncmp( p, SIZE, strlen( SIZE ) ) ) {
-                       if ( ( sscanf( p, "SIZE %f%d",
-                           &(r_snf->bdf_point), &(r_snf->bdf_xdpi))) != 2 ) {
-                               return  BDF_INVAL;
-                       }
-                       fprintf( w_snf->output, "%s", buf );
-                       getstat |= 0x01;
-
-               } else if ( !strncmp( p, FONTBOUNDINGBOX, strlen( FONTBOUNDINGBOX ) ) ) {
-                       if ( ( sscanf( p, "FONTBOUNDINGBOX %d%d%d%d",
-                           &(r_snf->bdf_width), &(r_snf->bdf_height),
-                           &(r_snf->bdf_x), &(r_snf->bdf_y) )) != 4) {
-                               return  BDF_INVAL;
-                       }
-                       fprintf( w_snf->output, "%s", buf );
-                       getstat |= 0x02;
-
-               } else if ( !strncmp( p, CHARS, strlen( CHARS ) ) ) {
-                       if ( ( sscanf( p, "CHARS %d", &( r_snf->num_chars ) ) ) != 1 ) {
-                               return  BDF_INVAL;
-                       }
-                       getstat |= 0x04;
-                       break;
-               } else {
-                       fprintf( w_snf->output, "%s", buf );
-               }
-       }
-
-       if ( getstat != 0x07 ) {
-               return  BDF_INVAL;
-       }
-       return  0;
-}
-
-#define        DispCodePoint( command, char_set, gidx, dspcode, code_no, locale ){\
-       if( COMM_SBFNT_ISSBFNT( (char_set) ) ){\
-               dspcode = DISPCODEPOINT( (char_set), (gidx) ) ;\
-       }else{\
-           if( fal_glyph_to_code( (locale), (char_set), FALGETFALCODESET((code_no)), (gidx), &(dspcode) ) ){\
-               USAGE3("%s : Failed to convert glyph index into code point.(0x%x charset: %s)\n", (command), (gidx), (char_set) ) ;\
-               return -1 ;\
-           }\
-       }\
-}
-
-static
-mergePtn(com, r_gpf, r_snf, buf, code_area, modify, prog_name, num_gr, gr, code_no)
-char           *com ;
-struct ptobhead *r_gpf;
-struct btophead *r_snf;
-char           *buf;
-int            code_area;
-int            modify;
-char           *prog_name;
-int            num_gr ;
-FalGlyphRegion *gr ;
-int            code_no ;
-{
-       int     code, rtn, msize, i, j, dspcode;
-       char    *ptn;
-
-       if ( ( r_gpf->p_width != r_snf->bdf_width )
-           || ( r_gpf->p_height != r_snf->bdf_height )
-           ) {
-               r_gpf->zoomf = 1;
-
-               msize = ( r_gpf->p_width + 7 ) / 8 * r_gpf->p_height;
-
-               if ( ( ptn = (char *)malloc( msize ) ) == NULL ) {
-                       return  MALLOC_ERROR;
-               }
-               r_gpf->ptn = &ptn;
-
-       } else {
-               r_gpf->zoomf = 0;
-       }
-
-       for ( i = 0; i < r_gpf->num_chars; i++ ) {
-               if ( ( rtn = GetGpfCode( r_gpf, buf, &code ) ) < 0 ) {
-                       return  rtn;
-               } else if ( rtn == FILE_END ) {
-                       break;
-               }
-               if( COMM_SBFNT_ISSBFNT( char_set ) ) CONVGLYPHINDEX( code ) ;
-               if (
-               ( code < r_gpf->start_code) || ( code > r_gpf->end_code ) 
-               ||( !IN_CODE( r_gpf->code_category, SHIFT_ON( code ) ) )
-               ||(
-                   (r_gpf->code_category == ALL_CODE) &&
-                   !( code_area & SYSTM ) &&
-                   IsInRegion( code, num_gr, gr )
-                   )
-               ) {
-                   DispCodePoint( com, char_set, code, dspcode, code_no, util_locale ) ;
-                   USAGE2("%s : The font of a specified code cannot be added/changed \"0x%x\".\n", prog_name, dspcode );
-                   fgets(buf, BUFSIZE, r_gpf->input);
-                   continue;
-               }
-
-               for ( j = 0; j < r_snf->num_chars; j++ ) {
-                   if ( r_snf->code[j] == code ) {
-                       if ( !modify ) {
-                           DispCodePoint( com, char_set, code, dspcode, code_no, util_locale ) ;
-                           USAGE2("%s : The font has already been registered in a specified code. \"0x%x\"\n", prog_name, dspcode );
-                           fgets( buf, BUFSIZE, r_gpf->input );
-                           break;
-                       }
-                       if ( ( rtn = ModifyPtn( r_gpf, r_snf, buf, j ) ) ) {
-                           return      rtn;
-                       }
-                       break;
-                   } else if ( r_snf->code[j] > code ) {
-                       if ( ( rtn = InsertPtn( r_gpf, r_snf, buf, code, j ) ) ) {
-                           return      rtn;
-                       }
-                       break;
-                   }
-               }
-               if ( j == r_snf->num_chars ) {
-                       if ( ( rtn = InsertPtn( r_gpf, r_snf, buf, code, j ) ) ) {
-                               return  rtn;
-                       }
-               }
-       }
-       return  0;
-}
-
-
-static
-ModifyPtn( r_gpf, r_snf, buf, ix )
-struct ptobhead *r_gpf;
-struct btophead *r_snf;
-char   *buf;
-int    ix;
-{
-       int     mwidth, msize, rtn;
-
-       mwidth = ( r_gpf->p_width + 7 ) / 8;
-       msize = mwidth * r_gpf->p_height;
-
-       if ( r_gpf->zoomf ) {
-               if ( ( rtn = GetGpfPtn( r_gpf, buf, r_gpf->ptn[0], mwidth, msize ) ) ) {
-                       return  rtn;
-               }
-               if ( ( rtn = PtnZoom( r_snf->ptn[ix], r_gpf->ptn[0],
-                   r_gpf->p_width, r_gpf->p_height,
-                   r_snf->bdf_width, r_snf->bdf_height ) ) ) {
-                       return  rtn;
-               }
-       } else {
-               if ( ( rtn = GetGpfPtn( r_gpf, buf, r_snf->ptn[ix], mwidth, msize ) ) ) {
-                       return  rtn;
-               }
-       }
-       return  0;
-}
-
-static
-InsertPtn( r_gpf, r_snf, buf, code, ix )
-struct ptobhead *r_gpf;
-struct btophead *r_snf;
-char   *buf;
-int    code;
-int    ix;
-{
-       int     mwidth, msize, rtn, i;
-
-       for ( i = r_snf->num_chars; i > ix; i-- ) {
-               r_snf->code[i] = r_snf->code[i-1];
-               r_snf->ptn[i] = r_snf->ptn[i-1];
-       }
-       r_snf->code[ix] = code;
-
-       r_snf->num_chars++;
-
-       mwidth = (r_snf->bdf_width + 7) / 8;
-       msize = mwidth * r_snf->bdf_height;
-
-       if ( ( r_snf->ptn[ix] = (char *)malloc( msize ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-
-       if ( r_gpf->zoomf ) {
-               mwidth = (r_gpf->p_width + 7) / 8;
-               msize = mwidth * r_gpf->p_height;
-               if ( ( rtn = GetGpfPtn( r_gpf, buf, r_gpf->ptn[0], mwidth, msize ) ) ) {
-                       return  rtn;
-               }
-               if ( ( rtn = PtnZoom( r_snf->ptn[ix], r_gpf->ptn[0],
-                   r_gpf->p_width, r_gpf->p_height,
-                   r_snf->bdf_width, r_snf->bdf_height ) ) ) {
-                       return  rtn;
-               }
-       } else {
-               if ( ( rtn = GetGpfPtn( r_gpf, buf, r_snf->ptn[ix], mwidth, msize ) ) ) {
-                       return  rtn;
-               }
-       }
-       return(0);
-}
-
-static
-writeSnf( r_snf, w_snf )
-struct btophead *r_snf;
-struct ptobhead *w_snf;
-{
-       w_snf->zoomf = 0;
-       w_snf->num_chars = r_snf->num_chars;
-       w_snf->code = r_snf->code;
-       w_snf->ptn = r_snf->ptn;
-       w_snf->bdf_width = r_snf->bdf_width;
-       w_snf->bdf_height = r_snf->bdf_height;
-
-       w_snf->bdf_x = r_snf->bdf_x;
-       w_snf->bdf_y = r_snf->bdf_y;
-
-       w_snf->bdf_point = r_snf->bdf_point;
-       w_snf->bdf_xdpi = r_snf->bdf_xdpi;
-
-       return  WritePtnToBdf( w_snf );
-}
-
-
-
-static void
-put_error_and_exit(ptob_in, btop, ptob_out, er_no, prog_name)
-struct ptobhead *ptob_in;
-struct btophead *btop;
-struct ptobhead *ptob_out;
-int    er_no;
-char   *prog_name;
-{
-       ErrMsgTable_AndExit( er_no, ptob_in->in_file, ptob_out->out_file,
-           btop->in_file,    NULL,
-           ptob_in->bdf_file,
-           prog_name
-           );
-       return;
-}
-
-
-
-static void
-put_help( prog_name )
-char   *prog_name;
-{
-        USAGE1("Usage: %s -xlfd xlfd_name \n", prog_name);
-        USAGE("\t\t[-g character_size][-p character_pattern_file_name]\n");
-       USAGE("\t\t[-style style]");
-       USAGE("\t\t[-init]\t(clear whole glyphs of gpf file that used for user defined characters)\n" ) ;
-       USAGE("\t\t[-modify]\t(permits the change of font)\n");
-       COMM_HELP_MSG ;
-       USAGE1("%s can insert or modify glyphs in the following code area.\n", prog_name);
-       USAGE("codeset \t\tcode area\n");
-       USAGE("----------------------------------------\n");
-       DispUdcCpArea() ;
-       USAGE("The xlfd name and character size may be obtained using dtlsgpf command.\n");
-       return;
-}
-
-
-
-static int
-readBdfToMemory_with_init(head, init, buf, num_gr, gr )
-struct btophead *head;
-int    init;
-char   *buf;
-int    num_gr ;
-FalGlyphRegion *gr ;
-{
-    int            code, mwidth, num_char, bsize, rtn ;
-    char    *ptn;
-
-    num_char = 0;
-    mwidth = (head->bdf_width + 7) / 8;
-    bsize = mwidth * head->bdf_height;
-    while(1) {
-       if ((rtn = GetBdfCode(head, buf, &code)) < 0) {
-           return(rtn);        /* contain BDF_INVAL */
-       } else if (rtn == FILE_END) {
-           head->num_chars = num_char;
-           break;
-       }
-       rtn = IsInRegion( code, num_gr, gr ) ;
-       if (
-          ( code < head->start_code) || ( code > head->end_code ) 
-           ||( !IN_CODE( head->code_category, SHIFT_ON( code ) ) )
-           ||(
-                   (head->code_category == ALL_CODE)
-               && ( (init)? ((rtn)?0:1) : ((rtn)?1:0) )
-           ||( COMM_ISDEFAULTCHAR( code ) )
-           )
-       ) {
-           continue;
-       }
-       head->code[num_char] = code;
-       if ((ptn = head->ptn[num_char++] =
-           (char *)malloc(bsize)) == NULL) {
-           return(MALLOC_ERROR);
-       }
-       if ((rtn = GetBdfPtn(head, buf, ptn, mwidth, bsize)) != 0) {
-           return(rtn);
-       }
-    }
-    return(0);
-}
-
-
-
diff --git a/cde/programs/dtudcfonted/dtbdftocpf/Imakefile b/cde/programs/dtudcfonted/dtbdftocpf/Imakefile
deleted file mode 100644 (file)
index 8dd75cb..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/8 1996/09/09 11:19:34 drk $
-
-        DESTDIR = $(CDE_INSTALLATION_TOP)
-        BINDIR  = /bin
-
-        OPT1 = -DDEFAULT_CODESET='"'3'"'
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-        OPT3 = -DSNFFONTC='"'$(SNFFONTC)'"'
-
-        DEFINES     = $(OPT1) $(OPT2) $(OPT3)
-
-         INCLUDES  = -I../include -I../libfal/include
-
-  LOCAL_LIBRARIES  = ../libfuty/liboakfuty.a ../libfal/libfal.a $(XLIB) -lc
-
-             SRCS  = bdftocpf.c
-
-             OBJS  = bdftocpf.o
-
-ComplexProgramTarget(dtbdftocpf)
diff --git a/cde/programs/dtudcfonted/dtbdftocpf/bdftocpf.c b/cde/programs/dtudcfonted/dtbdftocpf/bdftocpf.c
deleted file mode 100644 (file)
index 0cd4b18..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: bdftocpf.c /main/6 1996/11/08 02:01:17 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include       <stdio.h>
-#include       <signal.h>
-#include       <sys/types.h>
-#include       <sys/stat.h>
-#include       <string.h>
-#include       <stdlib.h>
-#include       <unistd.h>
-#include       "bdfgpf.h"
-#include       "udcutil.h"
-
-static void put_error();
-static void put_help() ;
-static void Usage() ;
-static void    sigint_out() ;
-static int     CnvBDFtoGPF() ;
-
-static struct btophead Head;
-
-static void
-sigint_out()
-{
-    if (Head.out_file) {
-       unlink(Head.out_file);
-    }
-    exit(0);
-}
-
-main(argc, argv)
-int    argc;
-char   *argv[];
-{
-    int        rtn, i;
-    char   *GetTmpPath();
-    struct stat        st;
-
-    for (i=1; i<argc; i++) {
-       if (!strcmp(argv[i], "-help")) {
-           put_help(argv[0]);
-           exit(0);
-       }
-    }
-
-    if (!(argc % 2)) {
-       Usage(argv[0]);
-    }
-       
-    Head.in_file = Head.out_file = Head.text_file = NULL;
-    Head.p_width = Head.p_height = USE_ORG_SIZE;
-
-
-    Head.start_code = MIN_CODE ;
-    Head.end_code = MAX_CODE ;
-    Head.code_category = ALL_CODE;
-
-    for (i=1; i<argc; i+=2) {
-       if (!strcmp(argv[i], "-p")) {
-           Head.out_file = argv[i+1];
-       } else if (!strcmp(argv[i], "-bdf")) {
-           Head.in_file = argv[i+1];
-       } else if (!strcmp(argv[i], "-width")) {
-           Head.p_width = atoi(argv[i+1]);
-           if ((Head.p_width > MAX_FONT_WIDTH) ||
-               (Head.p_width < MIN_FONT_WIDTH)) {
-               USAGE2("%s: The specification of the character width is improper.\"%s\"\n",
-                       argv[0], argv[i+1]);
-               exit(PARAM_ERROR * (-1));
-           }
-       } else if (!strcmp(argv[i], "-height")) {
-           Head.p_height = atoi(argv[i+1]);
-           if ((Head.p_height > MAX_FONT_HEIGHT) ||
-               (Head.p_height < MIN_FONT_HEIGHT)) {
-               USAGE2("%s: The specification of the character height is improper.\"%s\"\n",
-                       argv[0], argv[i+1]);
-               exit(PARAM_ERROR * (-1));
-           }
-       } else {
-           Usage(argv[0]);
-       }
-    }
-
-    if (Head.in_file == NULL) {
-       Head.input = stdin;
-    } else {
-       char    *spacing ;
-       char    *xlfdname ;
-       spacing = xlfdname = NULL ;
-       /* refuse proportional fonts */
-       if ( GetUdcFontName( NULL, Head.in_file, &xlfdname ) ) {
-           USAGE1("%s : This font cannot get XLFD. Terminates abnormally.\n", argv[0]);
-           exit( 1 );
-       }
-       GETSPACINGSTR( spacing, xlfdname ) ;
-       if ( !strcmp( "p", spacing ) || !strcmp( "P", spacing ) ) {
-           USAGE2("%s cannot edit proportional fonts.(SPACING \"%s\")\n", argv[0], spacing );
-           exit( 1 );
-       }
-       if ((Head.input = fopen(Head.in_file, "r")) == NULL) {
-           USAGE2("%s:  The BDF file cannot be opened.\"%s\"\n",
-               argv[0], Head.in_file); 
-           exit(BDF_OPEN * (-1));
-       }
-    }
-
-    signal(SIGHUP, (void(*)())sigint_out);
-    signal(SIGINT, (void(*)())sigint_out);
-    signal(SIGQUIT, (void(*)())sigint_out);
-    signal(SIGTERM, (void(*)())sigint_out);
-
-    if (Head.out_file == NULL) {
-       Head.output = stdout;
-    } else {
-       if (stat(Head.out_file, &st) != 0) {
-           if ((Head.output = fopen(Head.out_file, "w")) == NULL) {
-               USAGE2("%s: The character pattern file cannot be opened. \"%s\"\n",
-                   argv[0], Head.out_file); 
-               exit(GPF_OPEN *(-1));
-           }
-       } else {
-           Head.text_file = Head.out_file;
-           if ((Head.out_file = GetTmpPath( Head.out_file )) == NULL) {
-               USAGE1("%s: Failed convert.\n", argv[0]); 
-               exit(FATAL_ERROR * (-1));
-           }
-           if ((Head.output = fopen(Head.out_file, "w")) == NULL) {
-               USAGE2("%s: The character pattern file cannot be opened. \"%s\"\n",
-                   argv[0], Head.out_file); 
-               exit(GPF_OPEN * (-1));
-           }
-       }
-    }
-
-    if ((rtn = CnvBDFtoGPF(&Head))) {
-       if (Head.in_file != NULL) {
-           fclose(Head.input);
-       }
-       if (Head.out_file != NULL) {
-           fclose(Head.output);
-           unlink(Head.out_file);
-       }
-       put_error(&Head, rtn, argv[0]);
-       exit(rtn * (-1));
-    }
-
-    if (Head.in_file != NULL) {
-       fclose(Head.input);
-    }
-    if (Head.out_file != NULL) {
-       fclose(Head.output);
-       signal(SIGHUP, SIG_IGN);
-       signal(SIGINT, SIG_IGN);
-       signal(SIGQUIT, SIG_IGN);
-       signal(SIGTERM, SIG_IGN);
-       if (Head.text_file != NULL) {
-           Link_NewFile(Head.out_file, Head.text_file);
-           unlink(Head.out_file);
-       }
-    }
-    exit(0);
-}
-
-static
-CnvBDFtoGPF(head)
-struct btophead *head;
-{
-    char    bdfbuf[BUFSIZE];
-    int            rtn;
-
-    if ((rtn = ReadBdfHeader(head, bdfbuf)) < 0) {
-       return(rtn);
-    }
-
-    if (head->p_width == USE_ORG_SIZE) {
-       head->p_width = head->bdf_width;
-    }
-    if (head->p_height == USE_ORG_SIZE) {
-       head->p_height = head->bdf_height;
-    }
-    if ((head->p_width != head->bdf_width) ||
-        (head->p_height != head->bdf_height)) {
-       head->zoomf = 1;
-    } else {
-       head->zoomf = 0;
-    }
-
-    if ((head->code = (int *)malloc(sizeof(int)*head->num_chars)) == NULL) {
-       return(FATAL_ERROR);
-    }
-
-    if ((head->ptn = (char **)malloc(sizeof(char *)*head->num_chars)) == NULL) {
-       return(FATAL_ERROR);
-    }
-
-    if ((rtn = ReadBdfToMemory(head, bdfbuf))) {
-       return(rtn);
-    }
-
-    WriteGpfHeader(head);
-
-    if ((rtn = WritePtnToGpf(head))) {
-       return(rtn);
-    }
-
-    return(0);
-}
-
-static void
-put_error(head, er_no, prog_name)
-struct btophead *head;
-int    er_no;
-char   *prog_name;
-{
-    switch(er_no) {
-       case FATAL_ERROR :
-           USAGE1("%s: Failed convert.\n", prog_name);
-           break;
-
-       case BDF_OPEN :
-           USAGE2("%s: The BDF file cannot be opened. \"%s\"\n",
-               prog_name, head->in_file);
-           break;
-
-       case BDF_READ :
-           USAGE2("%s:  The BDF file cannot be read. \"%s\"\n",
-               prog_name, head->in_file);
-           break;
-
-       case BDF_INVAL :
-           USAGE2("%s: The format of the BDF file is illegal. \"%s\"\n",
-               prog_name, head->in_file);
-           break;
-
-       case GPF_OPEN :
-           USAGE2("%s: The character pattern file cannot be opened. \"%s\"\n",
-               prog_name, head->out_file);
-           break;
-
-       case GPF_WRITE :
-           USAGE2("%s: It is not possible to write to the character pattern file. \"%s\"\n",
-               prog_name, head->out_file);
-           break;
-
-       default :
-           break;
-    }
-}
-
-static void
-put_help(prog_name)
-char   *prog_name;
-{
-    USAGE1("Usage: %s [-p character_pattern_file_name] [-bdf BDF_file_name]\n", prog_name); 
-    USAGE("\t\t[-width character_width] [-height character_height] [-help]\n\n");
-}
-
-static void
-Usage(prog_name)
-char   *prog_name;
-{
-    put_help(prog_name);
-    exit(PARAM_ERROR * (-1));
-}
diff --git a/cde/programs/dtudcfonted/dtcpftobdf/Imakefile b/cde/programs/dtudcfonted/dtcpftobdf/Imakefile
deleted file mode 100644 (file)
index 00d5a0a..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/8 1996/09/09 11:19:37 drk $
-
-        DESTDIR = $(CDE_INSTALLATION_TOP)
-        BINDIR  = /bin
-
-        OPT1 = -DDEFAULT_CODESET='"'3'"'
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-        OPT3 = -DSNFFONTC='"'$(SNFFONTC)'"'
-
-        DEFINES     = $(OPT1) $(OPT2) $(OPT3)
-
-        INCLUDES   = -I../include -I../libfal/include
-
- LOCAL_LIBRARIES   = ../libfuty/liboakfuty.a ../libfal/libfal.a $(XLIB) -lc
-
-            SRCS   = cpftobdf.c
-
-            OBJS   = cpftobdf.o
-
-ComplexProgramTarget(dtcpftobdf)
diff --git a/cde/programs/dtudcfonted/dtcpftobdf/cpftobdf.c b/cde/programs/dtudcfonted/dtcpftobdf/cpftobdf.c
deleted file mode 100644 (file)
index 53d1f16..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: cpftobdf.c /main/6 1996/11/08 02:02:03 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include       <stdio.h>
-#include       <signal.h>
-#include       <string.h>
-#include       <stdlib.h>
-#include       <unistd.h>
-#include       "bdfgpf.h"
-#include       "udcutil.h"
-
-static void    put_error();
-static void    put_help() ;
-static void    Usage() ;
-static int     CnvGPFtoBDF() ;
-static void    sigint_out() ;
-
-static struct ptobhead Head;
-
-static void
-sigint_out()
-{
-       if ( Head.out_file ) {
-               unlink( Head.out_file );
-       }
-       exit( 0 );
-}
-
-main( argc, argv )
-int    argc;
-char   *argv[];
-{
-       int     rtn, i;
-       char    *GetTmpPath();
-       char    *spacing ;
-       char    *xlfdname ;
-
-       for ( i = 1; i < argc; i++ ) {
-               if ( !strcmp( argv[i], "-help" ) ) {
-                       put_help( argv[0] );
-                       exit( 0 );
-               }
-       }
-
-       if ( !( argc % 2 ) ) {
-               Usage(argv[0]);
-       }
-
-       spacing = xlfdname = NULL ;
-       Head.in_file = Head.bdf_file = Head.snf_file = Head.out_file = NULL;
-       Head.start_code = MIN_CODE ;
-       Head.end_code   = MAX_CODE ;
-       Head.code_category = ALL_CODE;
-
-       if (!( bdftopcf = get_cmd_path( getenv( "PATH"), BDFTOPCF_CMD ))){
-               bdftopcf = BDFTOPCF;
-       }
-       if (!( oakgtobdf = get_cmd_path( getenv( "PATH"), SNFTOBDF_CMD ))) {
-               oakgtobdf = SNFTOBDF;
-       }
-
-       for ( i = 1; i < argc; i+=2 ) {
-               if ( !strcmp( argv[i], "-bdf" ) ) {
-                       Head.bdf_file = argv[ i+1 ];
-               } else if ( !strcmp( argv[i], "-p" ) ) {
-                       Head.in_file = argv[i+1];
-               } else if ( !strcmp( argv[i], "-g" ) ) {
-                       Head.snf_file = argv[i+1];
-               } else {
-                       Usage( argv[0] );
-               }
-       }
-
-       if ( Head.in_file == NULL ) {
-               Head.input = stdin;
-       } else {
-               if ( ( Head.input = fopen( Head.in_file, "r" ) ) == NULL ) {
-                       USAGE2("%s: The character pattern file cannot be opened. \"%s\"\n", argv[0], Head.in_file );
-                       exit( GPF_OPEN * (-1) );
-               }
-       }
-
-       signal( SIGHUP, (void(*)())sigint_out );
-       signal( SIGINT, (void(*)())sigint_out );
-       signal( SIGQUIT, (void(*)())sigint_out );
-       signal( SIGTERM, (void(*)())sigint_out );
-
-       if ( Head.bdf_file == NULL ) {
-               if ( Head.snf_file == NULL ) {
-                       USAGE1("%s: If the output is stdout, the user defined font file name cannot be omitted.\n", argv[0]);
-                       exit(PARAM_ERROR * (-1));
-               }
-               Head.output = stdout;
-       } else {
-               if ( ! ( Head.out_file = GetTmpPath( Head.bdf_file ) ) ) {
-                       exit( FATAL_ERROR * ( -1 ) );
-               }
-
-               if ( ( Head.output = fopen( Head.out_file, "w" ) ) == NULL ) {
-                       USAGE2("%s: The work file for the output cannot be opened. \"%s\"\n", argv[0], Head.out_file );
-                       exit( BDF_OPEN * (-1) );
-               }
-       }
-       /* refuse proportional fonts */
-       if ( GetUdcFontName( Head.snf_file, Head.bdf_file, &xlfdname ) ) {
-           USAGE1("%s : This font cannot get XLFD. Terminates abnormally.\n", argv[0]);
-           if ( Head.in_file != NULL ) {
-               fclose( Head.input );
-           }
-           if ( Head.out_file != NULL ) {
-               fclose( Head.output );
-               unlink( Head.out_file );
-           }
-           exit( 1 );
-       }
-       GETSPACINGSTR( spacing, xlfdname ) ;
-       if ( !strcmp( "p", spacing ) || !strcmp( "P", spacing ) ) {
-           USAGE2("%s cannot edit proportional fonts.(SPACING \"%s\")\n", argv[0], spacing );
-           if ( Head.in_file != NULL ) {
-               fclose( Head.input );
-           }
-           if ( Head.out_file != NULL ) {
-               fclose( Head.output );
-               unlink( Head.out_file );
-           }
-           exit( 1 );
-       }
-
-       if ( ( rtn = CnvGPFtoBDF( &Head ) ) ) {
-               if ( Head.in_file != NULL ) {
-                       fclose( Head.input );
-               }
-               if ( Head.out_file != NULL ) {
-                       fclose( Head.output );
-                       unlink( Head.out_file );
-               }
-               put_error( &Head, rtn, argv[0] );
-               exit( rtn * (-1) );
-       }
-
-       if ( Head.in_file != NULL ) {
-               fclose( Head.input );
-       }
-       if ( Head.out_file != NULL ) {
-               fclose( Head.output );
-               signal( SIGHUP, SIG_IGN );
-               signal( SIGINT, SIG_IGN );
-               signal( SIGQUIT, SIG_IGN );
-               signal( SIGTERM, SIG_IGN );
-               if ( Head.bdf_file != NULL ) {
-                       Link_NewFile( Head.out_file, Head.bdf_file );
-                       unlink( Head.out_file );
-               }
-       }
-       exit( 0 );
-}
-
-static
-CnvGPFtoBDF( head )
-struct ptobhead        *head;
-{
-       char    textbuf[BUFSIZE] ;
-       int     rtn ;
-
-       if ( ( rtn = ReadGpfHeader( head, textbuf ) ) ) {
-               return  rtn;
-       }
-
-       if ( ( rtn = WriteBdfHeader( head ) ) ) {
-               return  rtn;
-       }
-
-       if ( ( head->p_width != head->bdf_width ) 
-               || ( head->p_height != head->bdf_height )
-       ) {
-               head->zoomf = 1;
-       } else {
-               head->zoomf = 0;
-       }
-
-       if ( ( head->code = (int *)malloc( sizeof(int) * head->num_chars ) ) == NULL ) {
-               return  FATAL_ERROR;
-       }
-
-       if ( ( head->ptn = (char **)malloc( sizeof( char * ) * head->num_chars ) ) == NULL ) {
-               return  FATAL_ERROR;
-       }
-
-       if ( ( rtn = ReadGpfToMemory( head, textbuf ) ) ) {
-               return  rtn;
-       }
-
-       if ( ( rtn = WritePtnToBdf( head ) ) ) {
-               return  rtn;
-       }
-
-       return  0;
-}
-
-static void
-put_error( head, er_no, prog_name )
-struct ptobhead        *head;
-int    er_no;
-char   *prog_name;
-{
-       switch( er_no ) {
-       case    FATAL_ERROR:
-               USAGE1("%s: Failed convert.\n", prog_name );
-               break;
-
-       case    BDF_OPEN:
-               USAGE2("%s: The BDF file cannot be opened. \"%s\"\n", prog_name, head->bdf_file );
-               break;
-
-       case    BDF_READ:
-               USAGE2("%s: The BDF file cannot be read. \"%s\"\n", prog_name, head->bdf_file );
-               break;
-
-       case BDF_WRITE:
-               USAGE2("%s: It is not possible to write to the BDF file. \"%s\"\n", prog_name, head->out_file );
-               break;
-
-       case    BDF_INVAL:
-               if ( head->snf_file ) {
-                       USAGE2("%s:  The information from the font file cannot be obtained.\"%s\"\n", prog_name, head->snf_file );
-               } else {
-                       USAGE2("%s: The format of the BDF file is illegal. \"%s\"\n", prog_name, head->bdf_file );
-               }
-               break;
-
-       case    GPF_OPEN:
-               USAGE2("%s:  The character pattern file cannot be opened. \"%s\"\n", prog_name, head->in_file );
-               break;
-
-       case    GPF_READ:
-               USAGE2("%s:  The character pattern file cannot be read. \"%s\"\n", prog_name, head->in_file );
-               break;
-
-       case    GPF_INVAL:
-               USAGE2("%s:  The format of the character pattern file is illegal. \"%s\"\n", prog_name, head->in_file );
-               break;
-
-       default:
-               break;
-       }
-}
-
-static void
-put_help( prog_name )
-char   *prog_name;
-{
-       USAGE1("Usage: %s [-bdf BDF_file_name] [-p chracter_pattern_file_name]\n", prog_name);
-       USAGE("\t\t[-g user_defined_character_file_name] [-help]\n");
-}
-
-static void
-Usage( prog_name )
-char   *prog_name;
-{
-       put_help( prog_name );
-       exit( PARAM_ERROR * (-1) );
-}
-
diff --git a/cde/programs/dtudcfonted/dtcpftogpf/Imakefile b/cde/programs/dtudcfonted/dtcpftogpf/Imakefile
deleted file mode 100644 (file)
index 0fd45d1..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/8 1996/09/09 11:19:41 drk $
-
-        DESTDIR = $(CDE_INSTALLATION_TOP)
-        BINDIR  = /bin
-
-        OPT1 = -DDEFAULT_CODESET='"'3'"'
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-        OPT3 = -DSNFFONTC='"'$(SNFFONTC)'"'
-
-        DEFINES     = $(OPT1) $(OPT2) $(OPT3)
-
-       INCLUDES   = -I../include -I../libfal/include
-
-LOCAL_LIBRARIES   = ../libfuty/liboakfuty.a ../libfal/libfal.a $(XLIB) -lc
-
-           SRCS   = cpftogpf.c
-
-           OBJS   = cpftogpf.o
-
-ComplexProgramTarget(dtcpftogpf)
diff --git a/cde/programs/dtudcfonted/dtcpftogpf/cpftogpf.c b/cde/programs/dtudcfonted/dtcpftogpf/cpftogpf.c
deleted file mode 100644 (file)
index 7a12ced..0000000
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: cpftogpf.c /main/7 1996/11/08 02:02:48 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include       <stdlib.h>
-#include       <stdio.h>
-#include       <fcntl.h>
-#include       <signal.h>
-#include       <sys/types.h>
-#ifndef SVR4
-#if !defined( SYSV )
-#include       <sys/resource.h>
-#endif
-#include       <sys/wait.h>
-#else
-#include       <wait.h>
-#endif
-#include       <sys/stat.h>
-#include       <string.h>
-
-#include       <unistd.h>
-
-#include       <X11/Xmd.h>
-#include       <X11/Xproto.h>
-
-#include       "bdfgpf.h"
-
-#include       "snfstruct.h"
-#include       "fontstruct.h"
-
-#include       "FaLib.h"
-#include       "udcutil.h"
-
-#include       <errno.h>
-
-
-static void    sigint_out() ;
-static void    put_error_and_exit();
-static void    put_help();
-static int     CnvGPFtoBDF() ;
-
-static struct ptobhead Head;
-
-static char    *targ_file = NULL;      /* UDC character filename */
-static char    *com = NULL;            /* command name */
-static char    *spacing ;
-static char    *char_set ;
-
-
-static void
-sigint_out()
-{
-       if (Head.out_file) {
-               Unlink_Tmpfile(Head.out_file, com);
-       }
-       exit(0);
-}
-
-main( argc, argv )
-int    argc;
-char   *argv[];
-{
-       FontInfoRec   *finf;
-       int     help, no_infile, style_err, rtn, i;
-       struct  stat    statbuf;
-       char    snf_file[BUFSIZE], buf[BUFSIZE];
-       int     pfd[2], fd, snf_fd, permission;
-       int     exit_stat;
-       char    *style ;        /* style */
-       int     chk_fd;
-       pid_t   chld_pid = 0;
-#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__)
-       int     chld_stat ;
-#else
-       union   wait    chld_stat ;
-#endif
-       int     code_no, code_area ;
-       FalFontData     key ;
-       char    *xlfdname, *cbuf, *ep ;
-       char    *codeset = DEFAULT_CODESET ;
-
-       /* format */
-       Head.in_file = Head.bdf_file = Head.snf_file = Head.out_file = NULL;
-       help = no_infile = style_err = 0;
-       com = argv[0];
-       COMM_SETDEFAULTSTYLE( style ) ;
-       memset( &key, '\0', sizeof(FalFontData) ) ;
-       xlfdname = cbuf = ep = '\0' ;
-       spacing = char_set = NULL ;
-       code_no = code_area = 0 ;
-
-       if (!( bdftopcf = get_cmd_path( getenv( "PATH" ), BDFTOPCF_CMD ))) {
-               bdftopcf = BDFTOPCF;
-       }
-       if (!( oakgtobdf = get_cmd_path( getenv( "PATH" ), SNFTOBDF_CMD ))) {
-               oakgtobdf = SNFTOBDF;
-       }
-       if (!( bdftosnf = get_cmd_path( getenv( "PATH" ), BDFTOSNF_CMD ))) {
-               bdftosnf = BDFTOSNF;
-       }
-
-       Head.code_category = ALL_CODE;
-       Head.start_code = MIN_CODE;
-       Head.end_code   = MAX_CODE;
-
-       for (i=1; i<argc; i++) {
-               if ( !strcmp( argv[i], "-system" ) ) {
-                       code_area |= SYSTM ;
-               } else if ( !strcmp( argv[i], "-help" ) ) {
-                       help = 1;
-               } else if ( !strcmp( argv[i], "-g" ) ) {
-                       if ( ( i < argc-1 ) && ( *argv[i+1] != '-' ) ) {
-                               Head.snf_file = argv[++i];
-                       }
-               } else if (!strcmp(argv[i], "-p")) {
-                       if ( ( i < argc-1 ) && ( *argv[i+1] != '-' ) ) {
-                               Head.in_file = argv[++i];
-                       } else {
-                               no_infile = 1;
-                       }
-               } else if ( !strcmp(argv[i], "-style" ) ) {
-                       if ( ( i < argc-1 ) && ( *argv[i+1] != '-' ) ){
-                               style = argv[++i];
-                       } else {
-                               style_err = 1;
-                       }
-
-               } else if ( !strcmp( argv[i], "-codeset" ) ) {
-                       if (
-                               ( ( i < argc-1 ) && ( *argv[i+1] != '-' ) ) &&
-                               ( strlen( argv[i + 1] ) == 1 )
-                       ) {
-                               if ( *argv[i+1] == '1' )        code_area |= CDSET1 ;
-                               codeset = argv[++i] ;
-                       } else {
-                               put_help( argv[0] );
-                               exit( 1 );
-                       }
-               } else if ( !strcmp( argv[i], "-xlfd" ) ) {
-                       if ( i < argc-1 ) {
-                               xlfdname = argv[++i] ;
-                       } else {
-                               put_help( argv[0] );
-                               exit( 1 );
-                       }
-               } else {
-                       put_help( argv[0] );
-                       exit( 1 );
-               }
-       }
-
-       ep = (char *)strchr( codeset, '\0' ) ;
-       code_no = (int)strtol( codeset, &cbuf, 10 ) ;
-       if( cbuf == codeset || cbuf != ep ) {
-           USAGE1("%s : The code set number is not right.\n", argv[0] ) ;
-           exit(1) ;
-       }
-
-       if ( help ) {
-               put_help( argv[0] );
-               exit( 0 );
-       }
-
-       if ( no_infile ) {
-               USAGE1("%s : The input file name following -p option cannot be omitted.\n", argv[0] );
-               exit( 1 );
-       }
-
-       if ( style_err ) {
-               USAGE1("%s : The style is not specified.\n", argv[0] );
-               exit( 1 );
-       }
-
-       if ( Head.snf_file == NULL && xlfdname == NULL ) {
-               if ( code_area & SYSTM ) {
-                       USAGE1("%s : The SNF output file name cannot be omitted.\n", argv[0] );
-               } else {
-                       USAGE1("%s : The character size specification cannot be omitted.\n", argv[0] );
-               }
-               exit( 1 );
-       }
-
-       if ( !( code_area & SYSTM ) ) {
-
-
-           if( xlfdname ) { 
-               if( GetUdcFileName( com, code_no, xlfdname, snf_file ) ) {
-                   USAGE1("%s : The font file name cannot be obtained. Terminates abnormally.\n", com );
-                   exit( 1 );
-               }
-               Head.snf_file = snf_file;
-           } else { 
-               switch ( GetFileName( argv[0], Head.snf_file, style, code_no, snf_file ) ) {
-               case    0:
-                   Head.snf_file = snf_file;
-                   break;
-               case    -1:
-                   /* output GetFileName() */
-                   exit( 1 );
-               default:
-                   USAGE1("%s : The font file name cannot be obtained. Terminates abnormally.\n", argv[0] );
-                   exit( 1 );
-               }
-           } 
-       }
-
-       /*
-        * refuse proportional fonts
-        */
-       if ( GetUdcFontName( Head.snf_file, NULL, &xlfdname ) ) {
-           USAGE1("%s : This font cannot get XLFD. Terminates abnormally.\n", argv[0]);
-           exit( 1 );
-       }
-       GETSPACINGSTR( spacing, xlfdname ) ;
-       if ( !strcmp( "p", spacing ) || !strcmp( "P", spacing ) ) {
-           USAGE2("%s cannot edit proportional fonts.(SPACING \"%s\")\n", argv[0], spacing );
-           exit( 1 );
-       }
-       GETCHARSETSTR( char_set, xlfdname ) ;
-
-       COMM_SET_CODECATEGORY( char_set, code_area, Head) ;
-
-       if ( ( targ_file = GetRealFileName( Head.snf_file ) ) == NULL ){
-               USAGE2("%s : It was not possible to refer to the substance of the font file. \"%s\"\n", argv[0], Head.snf_file );
-               exit( 1 );
-       }
-
-
-       if ( ( chk_fd = open( targ_file, O_RDWR ) ) < 0  ) {
-               USAGE2("%s : The font file of substance \"%s\" cannot be opened.\n", argv[0] , targ_file );
-       exit( 1 );
-       }
-       if ( isLock( chk_fd ) == 1 ) {
-               USAGE1("%s : Editing by other application.\n", argv[0] );
-               close( chk_fd );
-               exit( 1 );
-       }
-       close( chk_fd );
-
-       /* 
-        * open input file(CPF) 
-        */
-       if ( Head.in_file == NULL ) {
-               Head.input = stdin;
-       } else {
-               if ( ( Head.input = fopen( Head.in_file, "r" ) ) == NULL ) {
-                       put_error_and_exit( &Head, GPF_OPEN_IN, argv[0] );
-               }
-       }
-
-       /* 
-        * get GPF filename
-        */
-       if ( !( Head.out_file = GetTmpPath( targ_file ) ) ) {
-               put_error_and_exit( &Head, MKTMP_ERROR, argv[0] );
-       }
-
-       permission = 0;
-       if ( ( snf_fd = open( Head.snf_file, O_RDONLY ) ) >= 0 ) {
-               if ( ChkPcfFontFile( Head.snf_file) ) {
-                       /* snf file */
-                       COMM_SNF_FILEVERSION( snf_fd, finf, buf, permission ) ;
-                       if( permission < 0 ) {
-                               put_error_and_exit( &Head, BDF_INVAL, argv[0] );
-                       }
-               } else {
-                       /* pcf */
-                       close( snf_fd );
-               }
-
-       } else {
-               put_error_and_exit( &Head, BDF_OPEN_IN, argv[0] );
-       }
-
-
-       if ( pipe( pfd ) != 0 ) {
-               put_error_and_exit( &Head, PIPE_ERROR, argv[0] );
-       }
-
-       signal( SIGHUP , (void(*)())sigint_out );
-       signal( SIGINT , (void(*)())sigint_out );
-       signal( SIGQUIT, (void(*)())sigint_out );
-       signal( SIGTERM, (void(*)())sigint_out );
-
-       switch ( chld_pid = fork() ) {
-       case    0:
-               if ( ( fd = open( Head.out_file, O_WRONLY | O_CREAT, 0664 ) ) < 0 ) {
-                       put_error_and_exit( &Head, BDF_OPEN_OUT, argv[0] );
-               }
-               close(0);
-               if ( dup( pfd[0] ) < 0 ) {
-                       put_error_and_exit( &Head, DUP_ERROR, argv[0] );
-               }
-               close( pfd[0] );
-               close( pfd[1] );
-               close( 1 );
-               if ( dup( fd ) < 0 ) {
-                       put_error_and_exit( &Head, DUP_ERROR, argv[0] );
-               }
-
-
-               if ( ChkPcfFontFile( Head.snf_file ) == 0 ) {
-                       execl( bdftopcf, bdftopcf, 0 );
-                       /* exec error */
-                       put_error_and_exit( &Head, PCFFONTC_ERROR, argv[0] );
-               }
-
-               COMM_SNF_EXECLBDFTOSNF( permission, buf, Head.snf_file ) ;
-               /* exec error */
-               put_error_and_exit( &Head, SNFFONTC_ERROR, argv[0] );
-
-       case    -1:
-               /* fork() error */
-               put_error_and_exit( &Head, FORK_ERROR, argv[0] );
-
-       default:
-               break;
-       }
-
-       close( pfd[0] );
-       if ( ( Head.output = fdopen( pfd[1], "w" ) ) == NULL ) {
-               close( pfd[1] );
-               kill( chld_pid, SIGKILL );
-               WaitID( chld_pid, chld_stat ) ;
-               put_error_and_exit( &Head, FDOPEN_ERROR, argv[0] );
-       }
-
-       if ( ( rtn = CnvGPFtoBDF( &Head ) ) ) {
-               fclose( Head.input );
-               fclose( Head.output );
-               close( pfd[1] );
-               kill( chld_pid, SIGKILL );
-               WaitID( chld_pid, chld_stat ) ;
-               Unlink_Tmpfile( Head.out_file, argv[0] );
-               put_error_and_exit( &Head, rtn, argv[0] );
-       }
-       fclose( Head.output );
-       close( pfd[1] );
-       wait( &exit_stat );
-#if !defined( SVR4 ) && !defined( SYSV ) && !defined(__FreeBSD__)
-       if ( !WIFEXITED(exit_stat) ) {
-#else
-       if (! ( WIFEXITED(exit_stat) && !WEXITSTATUS(exit_stat) ) ) {
-#endif
-               USAGE3("%s: The error occurred by %s (%08x).\n", argv[0], bdftopcf, exit_stat );
-               Unlink_Tmpfile( Head.out_file, argv[0] );
-               exit( 1 );
-       }
-       fclose( Head.input );
-       signal( SIGHUP , SIG_IGN );
-       signal( SIGINT , SIG_IGN );
-       signal( SIGQUIT, SIG_IGN );
-       signal( SIGTERM, SIG_IGN );
-
-       sleep(1) ;
-       if ( (stat( Head.out_file,&statbuf ) ) ||
-           ( statbuf.st_size == 0 ) ) {
-               Unlink_Tmpfile( Head.out_file, argv[0] );
-               put_error_and_exit( &Head, BDF_WRITE, argv[0] );
-       }
-       if ( stat( targ_file, &statbuf ) ) {
-               Unlink_Tmpfile( Head.out_file, argv[0] );
-               put_error_and_exit( &Head, BDF_WRITE, argv[0] );
-       }
-
-       exit ( Make_NewFefFile( targ_file, Head.out_file,
-           FONT_FILE_PARM, (uid_t)statbuf.st_uid, (gid_t)statbuf.st_gid, argv[0]) );
-}
-
-
-static
-CnvGPFtoBDF( head )
-struct ptobhead *head;
-{
-       int         rtn;
-       char    textbuf[BUFSIZE];
-
-       if ( ( rtn = ReadGpfHeader( head, textbuf ) ) ) {
-               return  rtn;
-       }
-
-       if ( ( rtn = WriteBdfHeader( head ) ) ) {
-               return  rtn;
-       }
-
-       if ( ( head->p_width != head->bdf_width ) ||
-               ( head->p_height != head->bdf_height ) 
-       ) {
-               head->zoomf = 1;
-       } else {
-               head->zoomf = 0;
-       }
-
-       if ( ( head->code = (int *)malloc( sizeof(int) * head->num_chars ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-
-       if ( ( head->ptn = (char **)malloc( sizeof(char *)*head->num_chars ) ) == NULL ) {
-               return  MALLOC_ERROR;
-       }
-
-       if ( ( rtn = ReadGpfToMemory(head, textbuf ) ) ) {
-               return  rtn;
-       }
-
-       if ( ( rtn = WritePtnToBdf( head ) ) ) {
-               return  rtn;
-       }
-
-       return  0;
-}
-
-
-static void
-put_error_and_exit( ptob, er_no, prog_name )
-struct ptobhead *ptob;
-int    er_no;
-char   *prog_name;
-{
-       ErrMsgTable_AndExit( er_no, ptob->snf_file, ptob->out_file,
-           ptob->in_file,  NULL,
-           ptob->bdf_file,
-           prog_name
-           );
-       return;
-}
-
-
-static void
-put_help( prog_name )
-char   *prog_name;
-{
-       USAGE1("Usage: %s -xlfd xlfd_name\n", prog_name);
-       USAGE("\t\t[-g character_size][-p character_pattern_file_name]\n" );
-       USAGE("\t\t [-style style] \n");
-       COMM_HELP_MSG ;
-       USAGE("The character size may be obtained using the dtlsgpf command.\n");
-       USAGE("\n");
-}
diff --git a/cde/programs/dtudcfonted/dtcpgpf/Imakefile b/cde/programs/dtudcfonted/dtcpgpf/Imakefile
deleted file mode 100644 (file)
index 4b1dac8..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/8 1996/09/09 11:19:44 drk $
-
-        DESTDIR = $(CDE_INSTALLATION_TOP)
-        BINDIR  = /bin
-
-        OPT1 = -DDEFAULT_CODESET='"'3'"'
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-        OPT3 = -DSNFFONTC='"'$(SNFFONTC)'"'
-
-        DEFINES     = $(OPT1) $(OPT2) $(OPT3)
-
-    UDC_INC_PATH1 = -I../libfal/include
-    UDC_INC_PATH2 = -I../include
-    UDC_INC_PATH3 = -I./
-
-         INCLUDES = $(UDC_INC_PATH1) $(UDC_INC_PATH2) $(UDC_INC_PATH3)
-
-LOCAL_LIBRARIES   = ../libfuty/liboakfuty.a ../libfal/libfal.a $(XLIB) -lc
-
-             SRCS = cpgpf.c
-
-             OBJS = cpgpf.o
-
-ComplexProgramTarget(dtcpgpf)
diff --git a/cde/programs/dtudcfonted/dtcpgpf/cpgpf.c b/cde/programs/dtudcfonted/dtcpgpf/cpgpf.c
deleted file mode 100644 (file)
index 85effe7..0000000
+++ /dev/null
@@ -1,1210 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: cpgpf.c /main/6 1996/11/08 02:03:36 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include       <stdio.h>
-#include       <locale.h>
-#include       <fcntl.h>
-#include       <signal.h>
-#include       <sys/types.h>
-#include       <sys/stat.h>
-#ifndef SVR4
-#if !defined( SYSV )
-#include       <sys/resource.h>
-#endif
-#include       <sys/wait.h>
-#else
-#include       <wait.h>
-#endif
-
-#include       <unistd.h>
-#include       <string.h>
-#include       <stdlib.h>
-
-#include       "bdfgpf.h"
-
-#include       <X11/Xmd.h>
-#include       <X11/Xproto.h>
-#include       "fontstruct.h"
-
-#include       "FaLib.h"
-#include       "snfstruct.h"
-#include       "udcutil.h"
-
-#include       <errno.h>
-
-#define        START_CODE      0
-#define        END_CODE        1
-#define        INPUT_FONT      0
-#define        OUTPUT_FONT     1
-
-#define RESIZE_BY_RATE( a, r )   ((int)( (float)(a) * (r)))
-#define DEF_RESOLUTION ((78 / 72.27) * 100)
-
-static void    put_error_and_exit();
-static void    put_help();
-static void    sigint_out() ;
-static void    getDefaultCh() ;
-static void    MkFontProp() ;
-
-static int     CpyGpfInit() ;
-static int     writeGpf() ;
-static int     check_width() ;
-static int     check_height() ;
-static int     check_width_height() ;
-static int     getGpfFileName() ;
-static int     readGpf() ;
-static int     readBdfHeaderAndPut() ;
-static int     check_code() ;
-static int     readBdfToMemory() ;
-static int     cpg_atoi() ;
-static int     is_in_udcregion() ; 
-
-extern int     fal_code_to_glyph() ;
-
-static struct ptobhead WriteGpf;
-
-static char    *targ_file = NULL;      /* UDC_file_name */
-static char    *com = NULL;            /* command_name */
-static char    create_font[BUFSIZE] ;
-static int     new_target = 0 ;
-static unsigned int    firstCol, lastCol, firstRow, lastRow ;
-static char    *locale ;
-static char    *spacing ;
-static char    *char_set ;
-static char    *xlfdname ;
-
-
-static void
-sigint_out()
-{
-    if (WriteGpf.out_file) {
-       Unlink_Tmpfile( WriteGpf.out_file, com );
-    }
-    exit( 0 );
-}
-
-
-main( argc, argv )
-int    argc;
-char   **argv ;
-{
-       int     code_area , help, no_infile, no_style, type ;
-       int     rtn, i, exit_code ;
-#ifndef ROOT_ONLY
-       int     exit_stat;
-#endif
-       struct btophead InputGpf;       /* input file  */
-       struct btophead OutputGpf;      /* output file */
-       struct stat     statbuf;
-       char            isnf_file[BUFSIZE] ;
-       char            osnf_file[BUFSIZE] ;
-       char            readbuf[BUFSIZE];
-       char            *istyle, *ostyle ;
-       char            *ixlfdname, *oxlfdname ;
-       int             chk_fd;
-       FalGlyphRegion  *gr ;
-       int             num_gr ;
-       char            *start_code, *end_code ;
-       int             startcode, endcode ;
-
-       int     code_no;
-       char    *codeset = DEFAULT_CODESET;
-
-       /*
-        * initiation of parameters
-        */
-       com = argv[0];
-       *create_font = '\0' ;
-       if( (locale = (char *)getenv( "LANG" )) == NULL ){
-           locale = "C" ;
-       }
-
-       memset( &InputGpf, 0, sizeof(struct btophead) ) ;
-       memset( &OutputGpf, 0, sizeof(struct btophead) ) ;
-       memset( &WriteGpf, 0, sizeof(struct ptobhead) ) ;
-
-       COMM_SETDEFAULTSTYLE( istyle ) ;
-       COMM_SETDEFAULTSTYLE( ostyle ) ;
-
-       InputGpf.in_file = OutputGpf.in_file = WriteGpf.out_file = NULL;
-       ixlfdname = oxlfdname = '\0' ;
-       spacing = char_set = xlfdname = NULL ;
-
-       gr              = NULL ;
-       num_gr          = 0 ;
-       firstCol = firstRow = 0xff ;
-       lastCol = lastRow = 0 ;
-
-       start_code = end_code = '\0' ;
-       startcode       = MIN_CODE ;
-       endcode         = MAX_CODE ;
-
-       /* get full path of font compilers */
-       if (!( bdftopcf = get_cmd_path( getenv( "PATH" ), BDFTOPCF_CMD ))) {
-               bdftopcf = BDFTOPCF;
-       }
-       if (!( oakgtobdf = get_cmd_path( getenv( "PATH" ), SNFTOBDF_CMD ))) {
-               oakgtobdf = SNFTOBDF;
-       }
-       if (!( bdftosnf = get_cmd_path( getenv( "PATH" ), BDFTOSNF_CMD ))) {
-               bdftosnf = BDFTOSNF;
-       }
-       /*****************************************************************
-       * check options
-       *****************************************************************/
-       code_area = NORMAL;
-       help = no_infile = no_style = type = 0;
-
-       for ( i = 1; i < argc; i++ ) {
-               if ( *argv[i] != '-' ) {
-                   if( !InputGpf.in_file ){
-                       InputGpf.in_file = argv[i] ;
-                   }else if( !OutputGpf.in_file ){
-                       OutputGpf.in_file = argv[i] ;
-                   } else {
-                       put_help(com);
-                       exit( 1 );
-                   }
-               }else if ( !strcmp( argv[i], "-ig" ) ) {
-                   if ( ( i < argc-1) && (*argv[i+1] != '-' ) ) {
-                       InputGpf.in_file = argv[++i];
-                   } else {
-                       no_infile = 1;
-                   }
-               } else if ( !strcmp( argv[i], "-og" ) ) {
-                   if ( (i < argc-1) && (*argv[i+1] != '-') ){
-                       OutputGpf.in_file = argv[++i];
-                   } else {
-                       no_infile = 2;
-                   }
-               } else if ( !strcmp( argv[i], "-system" ) ) {
-                       code_area |= SYSTM;
-               } else if ( !strcmp( argv[i], "-help" ) ) {
-                       help = 1;
-               } else if ( !strcmp(argv[i], "-width") ) {
-                   if ((i < argc-1) && (*argv[i+1] != '-')) {
-                       OutputGpf.p_width =  check_width( com, argv[++i]);
-                       if (OutputGpf.p_width == 0) {
-                           exit(1);
-                       }
-                   } else {
-                       USAGE1("%s : The character width is not specified.\n", com);
-                       exit( 1 );
-                   }
-               } else if ( !strcmp(argv[i], "-height") ) {
-                   if ((i < argc-1) && (*argv[i+1] != '-')) {
-                       OutputGpf.p_height = check_height( argv[0], argv[++i]);
-                       if (OutputGpf.p_height == 0) {
-                           exit(1);
-                       }
-                   } else {
-                       USAGE1("%s :  The character height is not specified.\n", com);
-                       exit(1);
-                   }
-               } else if ( !strcmp(argv[i], "-start") ) {
-                   if ((i < argc-1) && (*argv[i+1] != '-')) {
-                       start_code = argv[++i] ;
-                   } else {
-                       USAGE1("%s : The extract start code is not specified.\n", com);
-                       exit( 1 );
-                   }
-               } else if ( !strcmp(argv[i], "-end" ) ) {
-                   if ( ( i < argc-1 ) && ( *argv[i+1] != '-' ) ) {
-                       end_code = argv[++i] ;
-                   } else {
-                       USAGE1("%s : The extract end code is not specified.\n", com);
-                       exit( 1 );
-                   }
-               } else if ( !strcmp( argv[i], "-istyle" ) ) {
-                   if ( ( i < argc-1 ) && ( *argv[i+1] != '-' ) ){
-                       istyle = argv[++i];
-                   } else {
-                       no_style = 1;
-                   }
-               } else if ( !strcmp( argv[i], "-ostyle" ) ) {
-                   if ( ( i < argc-1 ) && ( *argv[i+1] != '-' ) ){
-                       ostyle = argv[++i];
-                   } else {
-                       no_style = 2;
-                   }
-               } else if ( !strcmp( argv[i], "-codeset" ) ) {
-                   if ( ( i < argc - 1 ) && ( *argv[i+1] != '-' )){
-                       codeset = argv[++i];
-                       COMM_SET_CODESET( codeset, code_area ) ;
-                   }
-               } else if ( !strcmp( argv[i], "-ixlfd" ) ) {
-                   if ( i < argc - 1 ){
-                       ixlfdname = argv[++i];
-                   }
-               } else if ( !strcmp( argv[i], "-oxlfd" ) ) {
-                   if ( i < argc - 1 ){
-                       oxlfdname = argv[++i];
-                   }
-               } else if ( COMM_SBOPT_STRCMP( argv, i ) ) {
-                   COMM_SBOPT_SETSBOPT( code_area ) ;
-               } else if ( COMM_TYPE_STRCMP( argv, i ) ) {
-                   COMM_TYPE_SETTYPE( argc, argv, i, type ) ;
-               } else {
-                   put_help(com);
-                   exit( 1 );
-               }
-       }
-
-       /* help_message */
-       if ( help == 1 ) {
-               put_help( com );
-               exit( 0 );
-       }
-       COMM_SBOPT_CHECKSBOPT( com, code_area ) ;
-
-       if ( no_infile ) {
-           if ( no_infile == 1 )
-                USAGE1("%s : The font file name for input cannot be omitted.\n", com );
-           else
-                USAGE1("%s : The font file name for output cannot be omitted.\n", com );
-           exit( 1 );
-       }
-
-       if ( (code_no = cpg_atoi( codeset)) == -1 ) {
-           USAGE1("%s : The code set number is illegal.\n", com );
-           exit( 1 );
-       }
-
-       if ( no_style ) {
-           if ( no_style == 1 )
-                USAGE1("%s : The style for input cannot be omitted.\n", com );
-           else
-                USAGE1("%s : The style for output cannot be omitted.\n", com );
-           USAGE1("%s : The style is not specified.\n", com ) ;
-           exit( 1 );
-       }
-
-       /*****************************************************************
-       * get file name
-       *****************************************************************/
-       /* copy origin */
-       if ( getGpfFileName( com, &InputGpf, code_area, code_no, ixlfdname, isnf_file, istyle ) ) {
-           exit( 1 );
-       }
-
-       /* copy target */
-       if ( getGpfFileName( com, &OutputGpf, code_area, code_no, oxlfdname, osnf_file, ostyle ) ) {
-           exit( 1 );
-       }
-
-       /*
-        * refuse proportional fonts
-        */
-       if( ( !stat( OutputGpf.in_file, &statbuf ) )){
-           if ( GetUdcFontName( OutputGpf.in_file, NULL, &xlfdname ) ) {
-               USAGE2("%s : This font cannot get XLFD(%s). Terminates abnormally.\n", com, OutputGpf.in_file );
-               exit( 1 );
-           }
-           GETSPACINGSTR( spacing, xlfdname ) ;
-           if ( !strcmp( "p", spacing ) || !strcmp( "P", spacing ) ) {
-               USAGE2("%s : cannot edit proportional fonts.(SPACING \"%s\")\n", com, spacing );
-               exit( 1 );
-           }
-       }else{
-           /* new file */
-           if( !(code_area & SYSTM) ){
-               USAGE2("%s : \"%s\" does not exists.\n", com, OutputGpf.in_file );
-               exit( 1 );
-           }
-       }
-       if( xlfdname )  free( xlfdname ) ;
-       if ( GetUdcFontName( InputGpf.in_file, NULL, &xlfdname ) ) {
-           USAGE2("%s : This font cannot get XLFD(%s). Terminates abnormally.\n", com, InputGpf.in_file );
-           exit( 1 );
-       }
-       GETSPACINGSTR( spacing, xlfdname ) ;
-       if ( !strcmp( "p", spacing ) || !strcmp( "P", spacing ) ) {
-           USAGE2("%s : cannot edit proportional fonts.(SPACING \"%s\")\n", com, spacing );
-           exit( 1 );
-       }
-       GETCHARSETSTR( char_set, xlfdname ) ;
-
-       /*****************************************************************
-       * get UDC code region
-       *****************************************************************/
-       if ( !(code_area & SYSTM) ) {
-           if ( GetUdcRegion( com, code_no, InputGpf.in_file, &num_gr, &gr ) ) {
-               USAGE1("%s : This font cannot get UDC code region. Terminates abnormally.\n", com);
-               exit( 1 );
-           }
-       } else {
-           num_gr = 1 ;
-           if( (gr = (FalGlyphRegion *)malloc( sizeof(FalGlyphRegion) * num_gr )) == NULL ) {
-               USAGE1("%s : malloc error. Terminates abnormally.\n", com);
-               exit( 1 );
-           }
-           gr[0].start = MIN_CODE ;
-           gr[0].end   = MAX_CODE ;
-       }
-
-       /*
-        * check specified code region
-        */
-       if( start_code && end_code ) {
-           if( (startcode = check_code(com, start_code, START_CODE, char_set, num_gr, gr )) < 0 ) {
-               exit( 1 );
-           }
-           if( (endcode = check_code(com, end_code, END_CODE, char_set, num_gr, gr )) < 0 ) {
-               exit( 1 );
-           }
-
-           if ( startcode > endcode ) {
-               USAGE1("%s : The specification of extract start/end code is improper.\n", com);
-               exit( 1 );
-           }
-
-           if( is_in_udcregion( startcode, endcode, num_gr, gr ) ){
-               USAGE3("%s : The specified code \"%s-%s\" is outside of the UDC code region.\n", com, start_code, end_code );
-               USAGE("The UDC code region of specified font is showed below.\n" );
-               for( i=0; i<num_gr; i++ )
-                   USAGE2("\t0x%x-0x%x\n", gr[i].start, gr[i].end );
-               exit( 1 );
-           }
-       }
-
-       /*****************************************************************
-       * check status of font file
-       *****************************************************************/
-       /* get InputGpf.in_file */
-       if ((targ_file = GetRealFileName( OutputGpf.in_file )) == NULL){
-           if( errno == ENOENT && (code_area & SYSTM) ){
-               /* create new file */
-               if ( ( chk_fd = open( OutputGpf.in_file, O_RDWR | O_CREAT, 0644 ) ) < 0  ) {
-                   USAGE2("%s : The font file of substance \"%s\" cannot be create.\n", com , OutputGpf.in_file );
-                   exit( 1 );
-               }
-               targ_file = OutputGpf.in_file ;
-               new_target = 1 ;
-               close( chk_fd );
-           }else{
-                USAGE2("%s : It is not possible to refer to the substance of the font file. \"%s\"\n", com, OutputGpf.in_file);
-               exit(1);
-           }
-       }
-       WriteGpf.snf_file = targ_file;
-
-       if ( ( chk_fd = open( targ_file, O_RDWR ) ) < 0  ) {
-           USAGE2("%s : The font file of substance \"%s\" cannot be opened.\n", com , targ_file );
-           exit( 1 );
-       }
-       if ( isLock( chk_fd ) == 1 ) {
-           USAGE2("%s : \"%s\" is opened by other application. \n", WriteGpf.snf_file, com );
-           close( chk_fd );
-           exit( 1 );
-       }
-       close( chk_fd );
-
-       /*****************************************************************
-       * set code category to inner structure
-       *****************************************************************/
-
-       WriteGpf.start_code     = MIN_CODE;
-       WriteGpf.end_code       = MAX_CODE;
-       WriteGpf.code_category  = ALL_CODE;
-
-       COMM_SBFNT_SETUDCAREA( argv[0], OutputGpf, char_set, code_area, num_gr, gr ) ;
-
-       /*
-        * CpyGpfInit() 
-        *
-        * GPFTOBDF, BDFTOGPF
-        *
-        *  (InputGpf.in_file)  --> GPFTOBDF ==H 
-        *                                     H
-        *  (OutputGpf.in_file) --> GPFTOBDF ==H 
-        *                                     H
-        *                                  dtcpgpf
-        *                                     H
-        * (WriteGpf.out_file) <--  BDFTOGPF ==H
-        *
-        */
-
-       signal( SIGHUP , (void(*)())sigint_out );
-       signal( SIGINT , (void(*)())sigint_out );
-       signal( SIGQUIT, (void(*)())sigint_out );
-       signal( SIGTERM, (void(*)())sigint_out );
-
-       if ( rtn = CpyGpfInit( &InputGpf, &OutputGpf, &WriteGpf, type ) ) {
-           if ( WriteGpf.out_file ) {
-               Unlink_Tmpfile( WriteGpf.out_file, com );
-           }
-           put_error_and_exit( &InputGpf, &WriteGpf, rtn, com );
-       }
-
-       /* read copy origin */
-       if ( (rtn = readGpf( &InputGpf, readbuf, startcode, endcode, num_gr, gr )) ){
-           if ( WriteGpf.out_file ) {
-               Unlink_Tmpfile( WriteGpf.out_file, com );
-           }
-           put_error_and_exit( &InputGpf, &WriteGpf, rtn, com );
-       }
-       fclose( InputGpf.input );
-
-       /* read copy target */
-       if( (rtn = readBdfHeaderAndPut(&OutputGpf, &WriteGpf, readbuf)) ) {
-           if ( WriteGpf.out_file ) {
-               Unlink_Tmpfile( WriteGpf.out_file, com );
-           }
-           put_error_and_exit( &InputGpf, &WriteGpf, rtn, com );
-       }
-       fclose( OutputGpf.input );
-       wait( 0 );
-
-       /*
-        * write SNF output file
-        */
-       if ( ( rtn = writeGpf( &InputGpf, &OutputGpf, &WriteGpf ) ) ) {
-           if ( WriteGpf.out_file ) {
-               Unlink_Tmpfile( WriteGpf.out_file, com );
-           }
-           put_error_and_exit( &InputGpf, &WriteGpf, rtn, com );
-       }
-
-#ifdef ROOT_ONLY
-       if ( pclose( WriteGpf.output ) ) {
-               Unlink_Tmpfile( WriteGpf.out_file, com );
-               put_error_and_exit( &InputGpf, &WriteGpf, PCLOSE_ERROR, com );
-       }
-#else
-       fclose( WriteGpf.output );
-       wait( &exit_stat );
-#if !defined( SVR4 ) && !defined( SYSV )
-       if ( !WIFEXITED(exit_stat) ) {
-#else
-       if ( ! ( WIFEXITED(exit_stat) && !WEXITSTATUS(exit_stat) ) ) {
-#endif
-                USAGE3("%s: The error occurred by %s (%08x).\n", com, oakgtobdf, exit_stat);
-               Unlink_Tmpfile( WriteGpf.out_file, com );
-               put_error_and_exit( &InputGpf, &WriteGpf, FATAL_ERROR, com );
-       }
-#endif
-       signal( SIGHUP , SIG_IGN );
-       signal( SIGINT , SIG_IGN );
-       signal( SIGQUIT, SIG_IGN );
-       signal( SIGTERM, SIG_IGN );
-
-       sleep( 1 );
-       if ( ( stat( WriteGpf.out_file, &statbuf ) ) || ( statbuf.st_size == 0 )
-           ) {
-               Unlink_Tmpfile( WriteGpf.out_file, com );
-               put_error_and_exit( &InputGpf, &WriteGpf, BDF_WRITE, com );
-       }
-       if ( stat( WriteGpf.snf_file, &statbuf ) ) {
-               Unlink_Tmpfile( WriteGpf.out_file, com );
-               exit( 1 );
-       }
-       exit_code = Make_NewFefFile( WriteGpf.snf_file, WriteGpf.out_file,
-           FONT_FILE_PARM, (uid_t)statbuf.st_uid, (gid_t)statbuf.st_gid, com ) ;
-
-       if( !exit_code ){
-           if( *create_font != '\0' && new_target )
-               fprintf( stdout, "%s : New font <%s> is created.\n", com, create_font );
-       }
-       exit( exit_code );
-}
-
-
-static int
-getGpfFileName( com, gpfinf, code_area, code_no, xlfdname, snf_file, style )
-char   *com ;
-struct btophead        *gpfinf ;
-int    code_area ;
-int    code_no ;
-char   *xlfdname ;
-char   *snf_file ;
-char   *style ;
-{
-
-
-       if ( gpfinf->in_file == NULL && xlfdname == NULL ) {
-           if ( code_area & SYSTM ) {
-               USAGE1("%s : The GPF output file name cannot be omitted.\n", com );
-           } else {    /* string of charcter size */
-               USAGE1("%s : The character size specification cannot be omitted.\n", com );
-           }
-           return -1 ;
-       }
-
-       /* open GPF file */
-       if ( !(code_area & SYSTM) ) {
-           if( xlfdname ) {
-               if ( GetUdcFileName( com, code_no, xlfdname, snf_file ) ) {
-                   USAGE2("%s : Failed to get font file.( XLFD: %s ) Terminates abnormally.\n", com, xlfdname );
-                   return -1 ;
-               }
-               gpfinf->in_file = snf_file ;
-           } else {
-
-               switch ( GetFileName( com, gpfinf->in_file, style, code_no, snf_file ) ) {
-               case 0:
-                       gpfinf->in_file = snf_file;
-                       break;
-               case -1:
-                       return -1 ;
-               default:
-                        USAGE1("%s : The font file name cannot be obtained. Terminates abnormally.\n", com);
-                       return -1 ;
-               }
-           }
-       }
-
-       return 0 ;
-}
-
-
-static 
-CpyGpfInit(i_gpf, o_gpf, w_gpf, type )
-struct btophead        *i_gpf;
-struct btophead        *o_gpf;
-struct ptobhead        *w_gpf;
-int            type ;
-{
-       FontInfoRec     *finf;
-       int     ifd[2], ofd[2], snf_fd, permission;
-       char    buf[BUFSIZE];
-#ifdef ROOT_ONLY
-       char    command[BUFSIZE], *ep ;
-#else
-       int     pfd[2], out_fd ;
-#endif
-
-       /* SNF format */
-       if( !new_target ){
-           if ( ChkPcfFontFile( w_gpf->snf_file ) ) {
-               permission = 0 ;
-               if( (snf_fd = open( w_gpf->snf_file, O_RDONLY ) ) >= 0 ) {
-                   COMM_SNF_FILEVERSION( snf_fd, finf, buf, permission ) ;
-                   if ( permission < 0 ) {
-                       return BDF_INVAL;
-                   }
-               } else {
-                   return BDF_OPEN_IN;
-               }
-           }
-       }else{
-           COMM_SNF_NEWTARGET( permission ) ;
-       }
-
-       /* open pipe for copy origin gpf */
-       if (pipe(ifd) != 0) {
-               return  PIPE_ERROR;
-       }
-       switch ( fork() ) {
-       case    0:
-               close( ifd[0] );
-               close( 1 );
-               if ( dup( ifd[1] ) < 0 ) {
-                   return      DUP_ERROR;
-               }
-               close( ifd[1] );
-               /* SNFTOBDF */
-               execl( oakgtobdf, oakgtobdf, i_gpf->in_file, 0 );
-               return  EXEC_ERROR;
-       case    -1:
-               return  FORK_ERROR;
-       default:
-               break;
-       }
-       close( ifd[1] );
-       if ( ( i_gpf->input = fdopen( ifd[0], "r" ) ) == NULL ) {
-               return  FDOPEN_ERROR;
-       }
-
-       /* open pipe for copy target gpf */
-       if (pipe(ofd) != 0) {
-               return  PIPE_ERROR;
-       }
-       switch ( fork() ) {
-       case    0:
-               close( ofd[0] );
-               close( 1 );
-               if ( dup( ofd[1] ) < 0 ) {
-                   return      DUP_ERROR;
-               }
-               close( ofd[1] );
-               /* SNFTOBDF */
-               if( !new_target ){
-                   execl( oakgtobdf, oakgtobdf, o_gpf->in_file, "-H", 0 );
-               }else{
-                   execl( oakgtobdf, oakgtobdf, i_gpf->in_file, "-H", 0 );
-               }
-               return  EXEC_ERROR;
-       case    -1:
-               return  FORK_ERROR;
-       default:
-               break;
-       }
-       close( ofd[1] );
-       if ( ( o_gpf->input = fdopen( ofd[0], "r" ) ) == NULL ) {
-               return  FDOPEN_ERROR;
-       }
-
-       /* open pipe for target gpf */
-       if ( !( w_gpf->out_file = GetTmpPath( targ_file ) ) ) {
-               return  MKTMP_ERROR;
-       }
-
-#ifdef ROOT_ONLY
-       if( ChkPcfFontFile( w_gpf->snf_file ) == 0 ) {
-               sprintf(command, "%s > %s", bdftopcf, w_gpf->out_file) ;
-       } else {
-               COMM_SNF_POPEN( permission, w_gpf->snf_file, w_gpf->out_file, ep, buf, command ) ;
-       }
-       if ((w_gpf->output = popen(command, "w")) == NULL) {
-               return(POPEN_ERROR);
-       }
-#else  /* ROOT_ONLY */
-       if ( pipe( pfd ) != 0 ) {
-               return  PIPE_ERROR;
-       }
-       switch ( fork() ) {
-       case    0:
-           if ( ( out_fd = open( w_gpf->out_file, O_WRONLY | O_CREAT, 0664 ) ) < 0 ) {
-               return  BDF_OPEN_OUT;
-           }
-           close( 0 );
-           if ( dup(pfd[0]) < 0 ) {
-               return  DUP_ERROR;
-           }
-           close( pfd[0] );
-           close( pfd[1] );
-           close( 1 );
-           if( dup( out_fd ) < 0 ) {
-               close( out_fd );
-               return  DUP_ERROR;
-           }
-           close( out_fd );
-           /* pcf format */
-           if ( ChkPcfFontFile( w_gpf->snf_file ) == 0 ) {
-               execl( bdftopcf, bdftopcf, 0 );
-               return  PCFFONTC_ERROR;
-           }
-           /* snf format */
-           if( type )  permission = type ;
-           COMM_SNF_EXECLBDFTOSNF( permission, buf, w_gpf->snf_file ) ;
-           return SNFFONTC_ERROR;
-
-       case    -1:
-           return FORK_ERROR;
-       default:
-               break;
-       }
-       close( pfd[0] );
-       if ( ( w_gpf->output = fdopen( pfd[1], "w" ) ) == NULL ) {
-           return      FDOPEN_ERROR;
-       }
-#endif /* ROOT_ONLY */
-       return  0;
-}
-
-
-
-static int
-readGpf(i_gpf, buf, startcode, endcode, num_gr, gr)
-struct btophead *i_gpf;
-char                   *buf;
-int            startcode ;
-int            endcode ;
-FalGlyphRegion *gr ;
-{
-       int     nchar, rtn;
-
-       if ( ( rtn = ReadBdfHeader( i_gpf, buf ) ) ) {
-           return rtn;
-       }
-
-       nchar = i_gpf->num_chars ;
-
-       if ( ( i_gpf->code = (int *)malloc( sizeof(int) * nchar ) ) == NULL ) {
-           return MALLOC_ERROR;
-       }
-
-       if ( ( i_gpf->ptn = (char **)malloc( sizeof(char *) * nchar ) ) == NULL ) {
-           return MALLOC_ERROR;
-       }
-
-       return  readBdfToMemory( i_gpf, buf, startcode, endcode, num_gr, gr ) ;
-}
-
-
-
-static int
-readBdfHeaderAndPut(o_gpf, w_gpf, buf)
-struct btophead *o_gpf;
-struct ptobhead *w_gpf;
-char           *buf;
-{
-       FILE    *fp ;
-       char    *p;
-       int     getstat, zoom, property ;
-
-       getstat = zoom = property = 0 ;
-
-       if( o_gpf->p_width || o_gpf->p_height ){
-           zoom = 1 ;
-       }
-       if ( (fp = fopen( w_gpf->out_file, "w" )) == NULL ) {
-           return BDF_OPEN_HEAD ;
-       }
-
-       while ( 1 ) {
-               if ( fgets( buf, BUFSIZE, o_gpf->input ) == NULL ) {
-                       fclose(fp) ;
-                       return  BDF_INVAL;
-               }
-               p = buf;
-               SCAN_TO_NONSP( p )
-               if ( !strncmp( p, SIZE, strlen( SIZE ) ) ) {
-                       if ( ( sscanf( p, "SIZE %f%d",
-                           &(o_gpf->bdf_point), &(o_gpf->bdf_xdpi))) != 2 ) {
-                               fclose(fp) ;
-                               return  BDF_INVAL;
-                       }
-                       fprintf( fp, "%s", buf );
-                       getstat |= 0x01;
-
-               } else if ( !strncmp( p, FONTBOUNDINGBOX, strlen( FONTBOUNDINGBOX ) ) ) {
-                       if ( ( sscanf( p, "FONTBOUNDINGBOX %d%d%d%d",
-                           &(o_gpf->bdf_width), &(o_gpf->bdf_height),
-                           &(o_gpf->bdf_x), &(o_gpf->bdf_y) )) != 4) {
-                               fclose(fp) ;
-                               return  BDF_INVAL;
-                       }
-                       /* -width / -height */
-                       if( zoom ){
-                           /* -width / -height */
-                           if( o_gpf->p_width )  o_gpf->bdf_width  = o_gpf->p_width ;
-                           if( o_gpf->p_height ) o_gpf->bdf_height = o_gpf->p_height ;
-                           fprintf( fp, "FONTBOUNDINGBOX %d %d %d %d\n",
-                               o_gpf->bdf_width, o_gpf->bdf_height,
-                               o_gpf->bdf_x, o_gpf->bdf_y );
-                       }else{
-                           fprintf( fp, "%s", buf );
-                       }
-                       getstat |= 0x02;
-
-               } else if ( !strncmp( p, "ENDPROPERTIES", strlen( "ENDPROPERTIES" ) ) ) {
-                       fprintf( fp, "%s", buf );
-                       fclose(fp) ;
-                       getstat |= 0x04;
-                       break;
-               } else {
-
-                   if( zoom ){
-                       if ( !strncmp( p, "STARTPROPERTIES", strlen( "STARTPROPERTIES" ) ) ) {
-                           property = 1 ;
-                           fprintf( fp, "%s", buf );
-                       } else if ( !strncmp( p, "FONT ", strlen( "FONT " ) ) ) {
-                           char        font[BUFSIZE] ;
-                           if( property ){
-                               if( (sscanf( buf, "FONT \"%s\"", font )) != 1 ){
-                                   fclose(fp) ;
-                                   return      BDF_INVAL;
-                               }
-                               MkFontProp( o_gpf->bdf_height, font, create_font ) ;
-                               fprintf( fp, "FONT \"%s\"\n", create_font ) ;
-                           }else{
-                               if( (sscanf( buf, "FONT %s", font )) != 1 ){
-                                   fclose(fp) ;
-                                   return      BDF_INVAL;
-                               }
-                               MkFontProp( o_gpf->p_height, font, create_font ) ;
-                               fprintf( fp, "FONT %s\n", create_font ) ;
-                           }
-                       } else if ( !strncmp( p, "PIXEL_SIZE ", strlen( "PIXEL_SIZE " ) ) ) {
-                           fprintf( fp, "PIXEL_SIZE %d\n", o_gpf->bdf_height ) ;
-                       } else if ( !strncmp( p, "AVERAGE_WIDTH ", strlen( "AVERAGE_WIDTH " ) ) ) {
-                           fprintf( fp, "AVERAGE_WIDTH %d\n", o_gpf->bdf_height*10 ) ;
-                       } else if ( !strncmp( p, "POINT_SIZE ", strlen( "POINT_SIZE " ) ) ) {
-                           fprintf( fp, "POINT_SIZE %d\n", o_gpf->bdf_height*10 );
-                       } else if ( !strncmp( p, "RESOLUTION ", strlen( "RESOLUTION " ) ) ) {
-                           int resol ;
-                           if( (sscanf( buf, "RESOLUTION %d\n", &resol )) != 1 ){
-                               fclose(fp) ;
-                               return  BDF_INVAL;
-                           }
-                           fprintf( fp, "RESOLUTION %d\n", (int)((resol<0)?DEF_RESOLUTION:resol) );
-                       } else if ( !strncmp( p, "X_HEIGHT ", strlen( "X_HEIGHT " ) ) ) {
-                           fprintf( fp, "X_HEIGHT %d\n", o_gpf->bdf_height );
-                       } else if ( !strncmp( p, "QUAD_WIDTH ", strlen( "QUAD_WIDTH " ) ) ) {
-                           fprintf( fp, "QUAD_WIDTH %d\n", o_gpf->bdf_width );
-                       } else if ( !strncmp( p, "FONT_ASCENT ", strlen( "FONT_ASCENT " ) ) ) {
-                           fprintf( fp, "FONT_ASCENT %d\n", (o_gpf->bdf_height + o_gpf->bdf_y) );
-                       } else if ( !strncmp( p, "FONT_DESCENT ", strlen( "FONT_DESCENT " ) ) ) {
-                           fprintf( fp, "FONT_DESCENT %d\n", -(o_gpf->bdf_y) );
-                       } else if ( !strncmp( p, "DEFAULT_CHAR ", strlen( "DEFAULT_CHAR " ) ) ) {
-                           fprintf( fp, "DEFAULT_CHAR %d\n", ((firstRow << 8) + firstCol) );
-                       } else {
-                           fprintf( fp, "%s", buf );
-                       }
-                   } else {    /* zoom */
-                       fprintf( fp, "%s", buf );
-                   }
-               }
-
-       }       /* while loop */
-       fclose(fp) ;
-       if ( getstat != 0x07 ) {
-               return  BDF_INVAL;
-       }
-
-       return  0;
-}
-
-
-static 
-writeGpf( i_gpf, o_gpf, w_gpf )
-struct btophead *i_gpf;
-struct btophead *o_gpf;
-struct ptobhead *w_gpf;
-{
-       FILE    *fp ;
-       char    rdbuf[BUFSIZE] ;
-
-       /* put BDF header from temporary file */
-       if ( (fp = fopen( w_gpf->out_file, "r" )) == NULL ) {
-           return BDF_OPEN_HEAD ;
-       }
-       while( fgets( rdbuf, BUFSIZE, fp ) != (char *)NULL ){
-           fprintf( w_gpf->output, "%s", rdbuf ) ;
-       }
-       if( feof(fp) != 0 ){
-           fclose(fp) ;
-       }else{
-           fclose(fp) ;
-           return BDF_READ_HEAD ;
-       }
-
-       /* set specified width or height */
-       w_gpf->bdf_width        = o_gpf->bdf_width ;
-       w_gpf->bdf_height       = o_gpf->bdf_height ;
-       w_gpf->bdf_x            = o_gpf->bdf_x;
-       w_gpf->bdf_y            = o_gpf->bdf_y;
-       w_gpf->bdf_point        = o_gpf->bdf_point;
-       w_gpf->bdf_xdpi         = o_gpf->bdf_xdpi;
-
-       w_gpf->p_width          = i_gpf->bdf_width;
-       w_gpf->p_height         = i_gpf->bdf_height;
-
-       if( w_gpf->bdf_width != w_gpf->p_width ||
-           w_gpf->bdf_height != w_gpf->p_height ) {
-           w_gpf->zoomf = 1;
-       }else{
-           w_gpf->zoomf = 0;
-       }
-
-       w_gpf->num_chars        = i_gpf->num_chars;
-       w_gpf->code             = i_gpf->code;
-       w_gpf->ptn              = i_gpf->ptn;
-
-       return  WritePtnToBdf( w_gpf );
-}
-
-
-
-static int
-check_width( prog_name, len_str )
-char   *prog_name;
-char   *len_str;
-{
-       return( check_width_height( prog_name, len_str, 0) );
-}
-
-
-static int
-check_height( prog_name, len_str )
-char   *prog_name;
-char   *len_str;
-{
-       return( check_width_height( prog_name, len_str, 1) );
-}
-
-static int
-check_width_height( prog_name, len_str, mode )
-char   *prog_name;
-char   *len_str;
-int    mode;           /* width ... 0 , height ... 1 */
-{
-       int             ret;
-       char    *tmp;
-
-       ret = (int)strtol( len_str, &tmp, 10 ); /* <-- ret = atoi( len_str ) */
-       if ((tmp == len_str) || (ret < MIN_FONT_WIDTH) || (ret > MAX_FONT_WIDTH)) {
-               switch( mode ) {
-               case 0:
-                       USAGE2("%s : The specification of the character width is improper.\"%s\"¡¥\n",
-                           prog_name, len_str);
-                       break;
-               case 1:
-                       USAGE2("%s : The specification of the character height is improper.\"%s\"¡¥\n",
-                           prog_name, len_str);
-                       break;
-               default:
-                       break;
-               }
-               return(0);
-       }
-       return( ret );
-}
-
-
-
-static int
-check_code( prog_name, code_str, mode, charset, num_gr, gr )
-char   *prog_name;
-char   *code_str;
-int    mode;           /* start_code ... 0, end_code ... 1 */
-char   *charset ;
-int    num_gr ;
-FalGlyphRegion *gr ;
-{
-       int             err_flg = 0;
-       int             code_num;
-       char    *tmp;
-       FalGIInf        *gi ;
-       int             num_gi ;
-       int             i, code ;
-
-       code = (int)strtol(code_str, &tmp, 16);
-       if ( tmp == code_str ) {
-           err_flg = 1;
-       }
-
-       if( COMM_SBFNT_ISSBFNT( charset ) ) {
-           code_num = code ;
-           CONVGLYPHINDEX( code_num ) ;
-       } else {
-           if( fal_code_to_glyph( locale, code, &gi, &num_gi) ) {
-               USAGE2("%s : Failed to convert code point into glyph index.\"%s\" \n", prog_name, code_str ) ;
-               err_flg = 1;
-           }
-           if( num_gi==1 ){
-               code_num = gi[0].glyph_index ;
-               err_flg = 0 ;
-           }else{
-               for( i=0; i<num_gi; i++ ) {
-                   if( !strcmp( gi[i].charset_str, char_set ) ) {
-                       code_num = gi[i].glyph_index ;
-                       err_flg = 0 ;
-                       break ;
-                   } else              err_flg = 1 ;
-               }
-           }
-       }
-       if( !err_flg ) {
-           for( i=0; i<num_gr; i++ ) {
-               if( (code_num >= gr[i].start) && (code_num <= gr[i].end) )
-                   return( code_num );
-           }
-           err_flg = 1 ;
-       }
-       if (err_flg) {
-           switch( mode ) {
-           case 0:
-               USAGE2("%s : The specification of the extract start code is improper.\"%s\"¡¥\n",
-                   prog_name, code_str);
-               break;
-           case 1:
-               USAGE2("%s : The specification of the extract end code is improper.\"%s\"¡¥\n",
-                   prog_name, code_str);
-               break;
-           default:
-               USAGE2("%s : The specification of the extract code is improper.\"%s\"¡¥\n",
-                   prog_name, code_str);
-           }
-           return(-1);
-       }
-       return(-1);
-
-}
-
-
-
-static int
-readBdfToMemory(head, buf, startcode, endcode, num_gr, gr)
-struct btophead *head;
-char   *buf;
-int    startcode ;
-int    endcode ;
-int    num_gr ;
-FalGlyphRegion *gr ;
-{
-       int         code, mwidth, num_char, bsize, rtn;
-       char    *ptn;
-
-       num_char = 0;
-       mwidth = (head->bdf_width + 7) / 8;
-       bsize = mwidth * head->bdf_height;
-       while(1) {
-           if ((rtn = GetBdfCode(head, buf, &code)) < 0) {
-               return(rtn);    /* contain BDF_INVAL */
-           } else if (rtn == FILE_END) {
-               head->num_chars = num_char;
-               break;
-           }
-           if ( !IsInRegion( code, num_gr, gr ) &&
-               ( startcode > code || endcode < code )
-           ){
-               continue;
-           }
-           getDefaultCh( (unsigned int)code ) ;
-
-           head->code[num_char] = code;
-           if ( ( ptn = head->ptn[num_char++] = (char *)malloc( bsize ) ) == NULL ) {
-               return(MALLOC_ERROR);
-           }
-           if ((rtn = GetBdfPtn(head, buf, ptn, mwidth, bsize)) != 0) {
-               return(rtn);
-           }
-       }
-       return(0);
-}
-
-
-static void
-getDefaultCh( code )
-unsigned int   code ;
-{
-       unsigned int    cbuf ;
-       cbuf = code ;
-       if( (cbuf & 0xff) < firstCol )  firstCol = cbuf & 0xff ;
-       if( (cbuf >> 8)   < firstRow )  firstRow = cbuf >> 8 ;
-       if( (cbuf & 0xff) > lastCol )   lastCol = cbuf & 0xff ;
-       if( (cbuf >> 8)   > lastRow )   lastRow = cbuf >> 8 ;
-}
-
-
-static int
-cpg_atoi( numstr )
-char   *numstr ;
-{
-       int     val ;
-       char    *ep, *cbuf ;
-
-       ep = (char *)strchr( numstr, '\0' ) ;
-       val = (int)strtol( numstr, &cbuf, 10 ) ;
-       if ( cbuf == numstr || cbuf != ep ) {
-           return -1 ;
-       }
-       return val ;
-}
-
-static int
-is_in_udcregion( start, end, num_gr, gr ) 
-int    start, end, num_gr ;
-FalGlyphRegion *gr ;
-{
-       int     i ;
-       if( start < gr[0].start && end < gr[0].start ){
-           return -1 ;
-       }
-       for( i=0; i<num_gr-1; i++ ){
-           if( (start > gr[i].end && start < gr[i+1].start )
-            && (end > gr[i].end && end < gr[i+1].start )
-           )
-           return -1 ;
-       }
-       if( start > gr[num_gr-1].end && end > gr[num_gr-1].end ){
-           return -1 ;
-       }
-       return 0 ;
-}
-
-
-static void
-MkFontProp(font_height, font, output)
-int            font_height ;
-char           *font;
-char           *output;
-{
-       char    fbuf[BUFSIZE], split[BUFSIZE] ;
-       char    *ep, *pix_sz, *point_sz, *rsl_x, *av_width, *char_set ;
-
-       snprintf( fbuf, sizeof(fbuf), "%s", font ) ;
-       snprintf( split, sizeof(split), "%s", font ) ;
-       ep = fbuf ;
-       ep += strlen( fbuf ) ;
-       ep-- ;
-       if( *ep == '"' )        *ep = '\0' ;
-       POINTXLFDELM( pix_sz, fbuf, XLFD_ELM_PIXEL_SIZE ) ;
-       POINTXLFDELM( point_sz, split, XLFD_ELM_POINT_SIZE ) ;
-       POINTXLFDELM( rsl_x, split, XLFD_ELM_RESOLUTION_X ) ;
-       POINTXLFDELM( av_width, split, XLFD_ELM_AVERAGE_WIDTH ) ;
-       POINTXLFDELM( char_set, fbuf, XLFD_ELM_CHARSET_REGISTRY ) ;
-       *pix_sz = '\0' ;
-       *av_width = '\0' ;
-
-       sprintf(output, "%s-%d-%s-%d%s", fbuf,
-                       font_height,    /* pixel size */
-                       rsl_x,
-                       font_height*10, /* average width */
-                       char_set );
-}
-
-
-
-static void
-put_error_and_exit(ptob_in, ptob_out, er_no, prog_name)
-struct btophead *ptob_in;
-struct ptobhead *ptob_out;
-int    er_no;
-char   *prog_name;
-{
-       ErrMsgTable_AndExit( er_no, ptob_in->in_file, ptob_out->out_file,
-           NULL, NULL, NULL, prog_name );
-       return;
-}
-
-
-
-static void
-put_help( prog_name )
-char   *prog_name;
-{
-        USAGE1("Usage: %s -ixlfd oxlfd  -oxlfd oxlfd\n", prog_name);
-       USAGE("\t[in_character_size][out_character_size]\n");
-       USAGE("\t[-start start_code][-end end_code]\n");
-       USAGE("\t[-istyle ostyle][-ostyle ostyle]");
-       COMM_HELP_MSG ;
-       USAGE1("%s can copy glyphs of gpf file in the following code area.\n", prog_name);
-       USAGE("codeset \t\tcode area\n");
-       USAGE("----------------------------------------\n");
-       DispUdcCpArea() ;
-       USAGE("If the -start and -end option is omitted, the start/end code of each extractive area is specified.\n");
-       USAGE("The xlfd name and character size may be obtained using dtlsgpf command.\n");
-       return;
-}
-
diff --git a/cde/programs/dtudcfonted/dtgpftobdf/Imakefile b/cde/programs/dtudcfonted/dtgpftobdf/Imakefile
deleted file mode 100644 (file)
index e4e5a80..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/8 1996/09/09 11:19:48 drk $
-
-        DESTDIR = $(CDE_INSTALLATION_TOP)
-        BINDIR  = /bin
-
-        OPT1 = -DDEFAULT_CODESET='"'3'"'
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-        OPT3 = -DSNFFONTC='"'$(SNFFONTC)'"'
-
-        DEFINES     = $(OPT1) $(OPT2) $(OPT3)
-
-       INCLUDES   = -I../libfal/include\
-                    -I../include
-
-LOCAL_LIBRARIES   = ../libfuty/liboakfuty.a ../libfal/libfal.a $(XLIB) -lc
-
-           SRCS   = gpftobdf.c
-
-           OBJS   = gpftobdf.o
-
-ComplexProgramTarget(dtgpftobdf)
diff --git a/cde/programs/dtudcfonted/dtgpftobdf/bdftosnf.h b/cde/programs/dtudcfonted/dtgpftobdf/bdftosnf.h
deleted file mode 100644 (file)
index 133df48..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: bdftosnf.h /main/4 1996/06/25 20:13:29 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include<X11/Xfuncs.h>
-
-#ifndef MIN
-#define MIN(a,b) ((a)>(b)?(b):(a))
-#endif
-#ifndef MAX
-#define MAX(a,b) ((a)>(b)?(a):(b))
-#endif
-
-typedef struct _GlyphMap {
-    char       *bits;
-    int                h;
-    int                w;
-    int                widthBytes;
-} GlyphMap;
-
-/*
- * a structure to hold all the pointers to make it easy to pass them all
- * around. Much like the FONT structure in the server.
- */
-
-typedef struct _TempFont {
-    FontInfoPtr pFI;
-    CharInfoPtr pCI;
-    unsigned char *pGlyphs;
-    FontPropPtr pFP;
-    CharInfoPtr pInkCI;
-    CharInfoPtr pInkMin;
-    CharInfoPtr pInkMax;
-} TempFont; /* not called font since collides with type in X.h */
-
-#ifdef vax
-
-#      define DEFAULTGLPAD     1               /* default padding for glyphs */
-#      define DEFAULTBITORDER  LSBFirst        /* default bitmap bit order */
-#      define DEFAULTBYTEORDER LSBFirst        /* default bitmap byte order */
-#      define DEFAULTSCANUNIT  1               /* default bitmap scan unit */
-#else
-# ifdef sun
-
-#  if (sun386 || sun5)
-#      define DEFAULTGLPAD     4               /* default padding for glyphs */
-#      define DEFAULTBITORDER  LSBFirst        /* default bitmap bit order */
-#      define DEFAULTBYTEORDER LSBFirst        /* default bitmap byte order */
-#      define DEFAULTSCANUNIT  1               /* default bitmap scan unit */
-#  else
-#      define DEFAULTGLPAD     4               /* default padding for glyphs */
-#      define DEFAULTBITORDER  MSBFirst        /* default bitmap bit order */
-#      define DEFAULTBYTEORDER MSBFirst        /* default bitmap byte order */
-#      define DEFAULTSCANUNIT  1               /* default bitmap scan unit */
-#  endif
-
-# else
-#  ifdef apollo
-
-#      define DEFAULTGLPAD     2               /* default padding for glyphs */
-#      define DEFAULTBITORDER  MSBFirst        /* default bitmap bit order */
-#      define DEFAULTBYTEORDER MSBFirst        /* default bitmap byte order */
-#      define DEFAULTSCANUNIT  1               /* default bitmap scan unit */
-
-#  else
-#   ifdef ibm032
-
-#      define DEFAULTGLPAD     1               /* default padding for glyphs */
-#      define DEFAULTBITORDER  MSBFirst        /* default bitmap bit order */
-#      define DEFAULTBYTEORDER MSBFirst        /* default bitmap byte order */
-#      define DEFAULTSCANUNIT  1               /* default bitmap scan unit */
-
-#   else
-#    ifdef hpux
-
-#      define DEFAULTGLPAD     2               /* default padding for glyphs */
-#      define DEFAULTBITORDER  MSBFirst        /* default bitmap bit order */
-#      define DEFAULTBYTEORDER MSBFirst        /* default bitmap byte order */
-#      define DEFAULTSCANUNIT  1               /* default bitmap scan unit */
-
-#    else
-#     ifdef pegasus
-
-#      define DEFAULTGLPAD     4               /* default padding for glyphs */
-#      define DEFAULTBITORDER  MSBFirst        /* default bitmap bit order */
-#      define DEFAULTBYTEORDER MSBFirst        /* default bitmap byte order */
-#      define DEFAULTSCANUNIT  1               /* default bitmap scan unit */
-
-#     else
-#      ifdef macII
-
-#       define DEFAULTGLPAD     4               /* default padding for glyphs */
-#       define DEFAULTBITORDER  MSBFirst        /* default bitmap bit order */
-#      define DEFAULTBYTEORDER MSBFirst        /* default bitmap byte order */
-#      define DEFAULTSCANUNIT  1               /* default bitmap scan unit */
-
-#      else
-#       ifdef mips
-#        ifdef MIPSEL
-
-#        define DEFAULTGLPAD     4             /* default padding for glyphs */
-#        define DEFAULTBITORDER  LSBFirst      /* default bitmap bit order */
-#        define DEFAULTBYTEORDER LSBFirst      /* default bitmap byte order */
-#        define DEFAULTSCANUNIT  1             /* default bitmap scan unit */
-
-#        else
-#        define DEFAULTGLPAD     4             /* default padding for glyphs */
-#        define DEFAULTBITORDER  MSBFirst      /* default bitmap bit order */
-#        define DEFAULTBYTEORDER MSBFirst      /* default bitmap byte order */
-#        define DEFAULTSCANUNIT  1             /* default bitmap scan unit */
-#        endif
-
-#       else
-#        define DEFAULTGLPAD     1             /* default padding for glyphs */
-#        define DEFAULTBITORDER  MSBFirst      /* default bitmap bit order */
-#        define DEFAULTBYTEORDER MSBFirst      /* default bitmap byte order */
-#        define DEFAULTSCANUNIT  1             /* default bitmap scan unit */
-
-#       endif
-#       endif
-#      endif
-#     endif
-#    endif
-#   endif
-#  endif
-# endif
-
-#define GLWIDTHBYTESPADDED(bits,nbytes) \
-       ((nbytes) == 1 ? (((bits)+7)>>3)        /* pad to 1 byte */ \
-       :(nbytes) == 2 ? ((((bits)+15)>>3)&~1)  /* pad to 2 bytes */ \
-       :(nbytes) == 4 ? ((((bits)+31)>>3)&~3)  /* pad to 4 bytes */ \
-       :(nbytes) == 8 ? ((((bits)+63)>>3)&~7)  /* pad to 8 bytes */ \
-       : 0)
-
diff --git a/cde/programs/dtudcfonted/dtgpftobdf/gpftobdf.c b/cde/programs/dtudcfonted/dtgpftobdf/gpftobdf.c
deleted file mode 100644 (file)
index 9bbc0b9..0000000
+++ /dev/null
@@ -1,1575 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: gpftobdf.c /main/5 1996/11/08 02:04:24 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "font.h"
-#include "misc.h"
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <X11/Xmd.h>
-#include <ctype.h>
-#include <errno.h>
-#include "fontstruct.h"
-#include "snfstruct.h"
-#include <time.h>
-#include "bdftosnf.h"
-#include <memory.h>
-#if defined( SVR4 )
-#include <sys/mman.h>
-#endif
-
-#include "udccom.h"
-#include "udcutil.h"
-
-#define        GLYPHPADOPTIONS                 4
-#define SIZEOF_COMPRESSED_METRIC       5
-
-#include       "gtobdf.h"
-#include       "pcf.h"
-
-typedef        struct  pcf_tmp {
-       FontInfoRec     info;
-       int     ntables;
-       PCFTablePtr     tables;
-       int     nprops;
-       FontPropPtr     props;
-       char    *isStringProp;
-       int     str_length;
-       char    *string;
-       int     nbitmaps;
-       CARD32  bmp_fmt;        /* bitOrder ,byteOrder, glyph, scan */
-       CARD32  *offsets;
-       int     sizebitmaps;
-       char    *bitmaps;
-       CARD32  enc_fmt;
-       CARD16  *encodingOffsets;
-       size_t  pcf_bufsz;
-       caddr_t         pcf_buffer;
-
-       /* scale width  */
-       CARD32  swd_fmt ;
-       int     swd_num ;
-       CARD32  *swidth ;
-
-       /* glyph name   */
-       CARD32  glyph_fmt ;
-       unsigned int    glyphs ;
-       int     *glyph_offset ;
-       char    *glyph_name ;
-
-       /* metrics      */
-       int     compress ;
-       CARD32  mtr_fmt ;
-       int     mtr_num ;
-       xCharInfo       *metrics;
-
-} PcfTmp;
-
-typedef struct prop_tmp {
-       char    *font_name;
-       FontPropRec     psize;
-       FontPropRec     resolution;
-} PropTmp;
-
-
-
-static char    *readfontfile();
-static void    Anafprop();
-static void    pSIZE();
-static void    pPROPS();
-static void    pCHARS();
-static void    pfixCHARS();
-static int     getarg();
-
-static Bool    seekToType() ;
-static void    getMetric() ;
-static Bool    getAccel() ;
-static Bool    getProperties() ;
-static void    putPtn() ;
-static void    ByteSwap() ;
-static void    invertBits() ;
-
-static int     getINT16() ;
-static int     getINT32() ;
-static CARD32  getLSB32();
-static char    *make_toptn();
-static void    pSIZE_pcf();
-static PcfTmp  *openPcfFont();
-static void    setProp();
-static void    pPROPS_pcf();
-static void    pCHARS_pcf();
-static void    BitOrderInvert();
-static char    *bufp,buf[2048];
-
-extern int     ChkPcfFontFile();
-
-
-main( argc,argv )
-int    argc;
-char   *argv[];
-{
-       int         i,k;
-
-
-       char        *fp;                /* font                         */
-       FontInfoRec *fip;               /* font information             */
-       CharInfoRec *cip, *wkcip;       /* character information        */
-       unsigned int glyphstotal;       /* glyph                        */
-       unsigned int charInfoNum ;      /* character information's number */
-       unsigned int charNum;           /* define character number         */
-       char        *glyphPtr;          /* glyph                        */
-       FontPropRec *fpropPtr,*fplistPtr;       /* font property list   */
-       FontPropRec psprop;             /* point size property          */
-       FontPropRec resprop;            /* resolution property          */
-       char        *fpropvnPtr;
-
-       unsigned int fplistNum;         /* font property number         */
-       char        *fontname;          /* fontname                     */
-       time_t      clock;
-       struct      tm *tm;
-       char        tmbuf[80] ;
-
-       char fname[1024];               /* snf filename                 */
-       int  bitorder;                  /* bitorder                     */
-       int byteorder;                  /* byteorder                    */
-       int scanunit;                   /* scanunit                     */
-       int glyphPad ;                  /* glyph                        */
-       int outLevel;                   /* output information level     */
-       int fix;
-
-
-       int     isPcf;
-
-       PcfTmp  *pcf;
-       PropTmp         proptmp;
-       char    *tmpfname;
-       extern  char    *GetRealFileName();
-
-
-       if (getarg(argc,argv,fname,&bitorder,&byteorder,&scanunit,&glyphPad,
-           &outLevel,&fix) != 0) {
-               exit( -1 );
-       }
-
-       /*
-        *  read to fontfile 
-        */
-       if ( ( tmpfname = GetRealFileName( fname ) ) == NULL ) {
-               USAGE("dtgpftobdf: cannot refer to substance file.\n" );
-               exit( -1 );
-       }
-       if ( strcmp( tmpfname, fname ) != 0 ){
-               strcpy( fname, tmpfname );
-       }
-
-       if ( ChkPcfFontFile( fname ) == 0 ){
-               /* pcf font */
-               isPcf = 1;
-               if ( !( pcf = openPcfFont( fname ) ) ) {
-                       USAGE("dtgpftobdf: cannot open font\n" );
-                       exit( -1 );
-               }
-       } else {
-               /* snf font */
-               isPcf = 0;
-               if ( ( fp = readfontfile( fname ) ) == (char *)-1 ) {
-                       exit( -1 );
-               }
-       }
-
-
-       if ( !isPcf ) {
-               /* SNF format */
-               COMM_SNF_GETHEADER( fip, fp ) ;
-               /* font file check */
-               if ((fip->version1 != fip->version2) || 
-                   (fip->version1 != FONT_FILE_VERSION)) {
-                       USAGE("dtgpftobdf: illegal font version\n");
-                       exit( -1 );
-               }
-
-               cip = (CharInfoRec *)((char *)fip + sizeof(FontInfoRec));
-
-               charInfoNum = (fip->lastCol - fip->firstCol + 1)
-                   *(fip->lastRow - fip->firstRow + 1);
-               glyphPtr = ((char *)cip) + ( charInfoNum * sizeof(CharInfoRec) );
-
-               charNum = charInfoNum ;
-               wkcip = cip ;
-
-               glyphstotal = fip->maxbounds.byteOffset;
-
-               glyphPad = (((fip->maxbounds.metrics.rightSideBearing
-                   - fip->maxbounds.metrics.leftSideBearing)+31)/32)*4;
-
-               if ( fix == TRUE ) {
-                   for ( i = 0; i < charInfoNum; i++ ) {
-                       if ( wkcip->exists == FALSE ) {
-                           charNum-- ;
-                       }
-                       wkcip++;
-                   }
-               } else {
-                   glyphstotal = 0 ;
-                   for ( i = 0; i < charInfoNum; i++ ) {
-                       if (wkcip->exists == FALSE) {
-                           charNum-- ;
-                           wkcip++;
-                           continue;
-                       }
-                       glyphstotal += (wkcip->metrics.ascent
-                           + wkcip->metrics.descent) * glyphPad;
-                       wkcip++;
-                   }
-               }
-
-               fpropPtr = (FontPropRec *)(glyphPtr + glyphstotal);
-               fpropvnPtr = ((char *)fpropPtr) + (fip->nProps) * sizeof(FontPropRec);
-
-       }
-
-
-       if ( isPcf ) {
-               setProp( pcf, &proptmp );
-       } else {
-               fontname = (char *)0;
-               Anafprop( 
-                   fip, fpropPtr, fpropvnPtr, 
-                   &fontname, &psprop, &resprop, 
-                   &fplistPtr, &fplistNum 
-                   );
-       }
-
-       /*
-        *¡¡output to BDF information
-        */
-       bufp = buf;
-       memcpy(bufp,"STARTFONT 2.1\n",14);
-       bufp += 14;
-       memcpy(bufp,"COMMENT\n",8);
-       bufp += 8;
-       memcpy(bufp,"COMMENT  This BDF was created by dtgpftobdf.\n",45 );
-       bufp += 45 ;
-       memcpy(bufp,"COMMENT\n",8);
-       bufp += 8;
-       time(&clock);
-       tm = localtime(&clock);
-
-       snprintf( tmbuf, sizeof(tmbuf), "%s", asctime(tm) ) ;
-
-       k = sprintf(bufp,"COMMENT    Created date : %s\n",tmbuf );
-       bufp += k-1;
-       memcpy(bufp,"COMMENT\n",8);
-       bufp += 8;
-
-       if ( isPcf ) {
-               k = sprintf(bufp,"FONT %s\n",proptmp.font_name);
-               bufp += k;
-               *bufp = '\0';
-               fprintf( stdout,"%s",buf );
-               pSIZE_pcf( &proptmp );
-               fprintf( stdout,"FONTBOUNDINGBOX %d %d %d %d\n",
-                   pcf->info.maxbounds.metrics.rightSideBearing 
-                   - pcf->info.maxbounds.metrics.leftSideBearing,
-                   pcf->info.maxbounds.metrics.ascent 
-                   + pcf->info.maxbounds.metrics.descent,
-                   pcf->info.maxbounds.metrics.leftSideBearing,
-                   - ( pcf->info.maxbounds.metrics.descent )
-                       );
-               pPROPS_pcf( pcf );
-               if ( outLevel == FALSE ) {
-                       pCHARS_pcf( pcf, fix );
-               }
-       } else {
-               k = sprintf( bufp,"FONT %s\n",fontname );
-               bufp += k;
-               *bufp = '\0';
-               fprintf( stdout,"%s",buf );
-               pSIZE( &psprop, &resprop );
-               fprintf( stdout,"FONTBOUNDINGBOX %d %d %d %d\n",
-                   cip->metrics.rightSideBearing 
-                   - cip->metrics.leftSideBearing,
-                   cip->metrics.ascent + cip->metrics.descent,
-                   cip->metrics.leftSideBearing,
-                   -(cip->metrics.descent)
-                       );
-               pPROPS( fip,fplistPtr,fplistNum );
-               if ( outLevel == FALSE ) {
-                   if ( fix == TRUE ) {
-                       pfixCHARS( fip,cip,glyphPtr,charNum, glyphPad );
-                   } else {
-                       pCHARS(fip,cip,glyphPtr,charNum,glyphPad);
-                   }
-               }
-
-       }
-
-       fprintf( stdout,"ENDFONT\n" );
-       exit( 0 );
-}
-
-/*
- * read to font file
- *
- */
-static char    *readfontfile( fname )
-char   *fname;
-{
-       int     fd;
-       char    *fp = NULL;
-       struct stat stat;
-
-       fd = open( fname,O_RDONLY );
-       if ( fd < 0 ) {
-               USAGE("dtgpftobdf: can't open file.\n" );
-               return  ( char * )-1;
-       }
-#if defined( SVR4 )
-       if ( fstat( fd,&stat ) == 0 ) {
-               fp = (char *)mmap( 0, stat.st_size, PROT_READ, MAP_SHARED, fd, 0 );
-               if ( fp == (char *)-1 ) {
-                       if ( ( fp = ( char * )malloc( stat.st_size ) ) == NULL ) {
-                               USAGE("dtgpftobdf: malloc error.\n" );
-                               close( fd );
-                               return  ( char * )-1;
-                       }
-/*                     if ( read( fd, fp, stat.st_size ) < 0 ) {*/
-                       if ( read( fd, fp, stat.st_size ) != stat.st_size ) {
-                               USAGE("dtgpftobdf: can't read file.\n" );
-                               close( fd );
-                               return  ( char * )-1;
-                       }
-               }
-       } else {
-               USAGE("dtgpftobdf: can't read file\n" );
-               close( fd );
-               return  ( char * )-1;
-       }
-       close( fd );
-#else  /* pfa */
-       if ( fstat(fd,&stat) == 0 ) {
-               if ( ( fp = (char *)malloc(stat.st_size) ) == NULL ) {
-                       USAGE("dtgpftobdf: malloc error.\n" );
-                       close( fd );
-                       return  ( char * )-1;
-               }
-               if ( read( fd, fp, stat.st_size ) < 0 ) {
-                       USAGE("dtgpftobdf: can't read file.\n" );
-                       close( fd );
-                       free(fp);
-                       return  ( char * )-1;
-               }
-       } else {
-               USAGE("dtgpftobdf: can't read file\n" );
-               close( fd );
-               return  ( char * )-1;
-       }
-       close( fd );
-#endif /* pfa */
-       return  fp;
-}
-
-
-#define getINT8( p ) ( *p++ ) ;
-
-static CARD32
-getLSB32( p )
-unsigned char *p;
-{
-       CARD32  c;
-
-       c = *p++;
-       c |= (CARD32)(*p++) << 8;
-       c |= (CARD32)(*p++) << 16;
-       c |= (CARD32)(*p) << 24;
-
-       return  c;
-}
-
-
-static int
-getINT32( p, format )
-unsigned char  *p;
-CARD32 format;
-{
-       CARD32  c;
-
-       if ( PCF_BYTE_ORDER(format) == MSBFirst ) {
-               c = (CARD32)(*p++) << 24;
-               c |= (CARD32)(*p++) << 16;
-               c |= (CARD32)(*p++) << 8;
-               c |= (CARD32)(*p);
-       } else {
-               c = (CARD32)(*p++);
-               c |= (CARD32)(*p++) << 8;
-               c |= (CARD32)(*p++) << 16;
-               c |= (CARD32)(*p) << 24;
-       }
-
-       return ( int )c;
-}
-
-static int
-getINT16( p, format )
-unsigned char  *p;
-CARD32 format;
-{
-       CARD32  c;
-
-       if ( PCF_BYTE_ORDER(format) == MSBFirst ) {
-               c = (CARD32)(*p++) << 8;
-               c |= (CARD32)(*p);
-       } else {
-               c = (CARD32)(*p++);
-               c |= (CARD32)(*p) << 8;
-       }
-
-       return ( int )c;
-}
-
-static Bool
-seekToType( tables, ntables, type, formatp, sizep, offsetp)
-PCFTablePtr    tables;
-int    ntables;
-CARD32 type;
-CARD32 *formatp;
-CARD32 *sizep;
-CARD32 *offsetp;
-{
-       int     i;
-
-       for ( i = 0; i < ntables; i++ ) {
-               if ( getLSB32( (unsigned char *)&tables[i].type) == type) {
-                       *formatp = getLSB32( (unsigned char *)&tables[i].format);
-                       *sizep = getLSB32( (unsigned char *)&tables[i].size);
-                       *offsetp = getLSB32( (unsigned char *)&tables[i].offset);
-                       return  TRUE;
-               }
-       }
-       return  FALSE;
-}
-
-
-static void
-getMetric( buf, format, metric )
-caddr_t        buf;
-CARD32 format;
-xCharInfo      *metric;
-{
-       metric->leftSideBearing = getINT16( (unsigned char *)buf, format);
-       buf += 2;
-       metric->rightSideBearing = getINT16( (unsigned char *)buf, format);
-       buf += 2;
-       metric->characterWidth = getINT16( (unsigned char *)buf, format);
-       buf += 2;
-       metric->ascent = getINT16( (unsigned char *)buf, format);
-       buf += 2;
-       metric->descent = getINT16( (unsigned char *)buf, format);
-       buf += 2;
-       metric->attributes = getINT16( (unsigned char *)buf, format);
-       buf += 2;
-}
-
-static Bool
-getAccel( pFontInfo, maxink, buf_top, tables, ntables, type )
-FontInfoPtr    pFontInfo;
-xCharInfo      *maxink;
-caddr_t        buf_top;
-PCFTablePtr    tables;
-int    ntables;
-CARD32 type;
-{
-       CARD32  format;
-       CARD32  size;
-       CARD32  offset;
-       caddr_t         buffer;
-
-       if ( !seekToType( tables, ntables, type, &format, &size, &offset)) {
-               return  FALSE;
-       }
-
-       buffer = buf_top + offset;
-       format = getLSB32( (unsigned char *)buffer);
-       buffer += 4;
-       if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT )
-           && !PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS )
-           ) {
-               return  FALSE;
-       }
-       pFontInfo->noOverlap = *buffer++;
-       pFontInfo->constantMetrics = *buffer++;
-       pFontInfo->terminalFont = *buffer++;
-       pFontInfo->constantWidth = *buffer++;
-       pFontInfo->inkInside = *buffer++;
-       pFontInfo->inkMetrics = *buffer++;
-       pFontInfo->drawDirection = *buffer++;
-       /* natural alignment */
-
-       buffer++;
-
-       pFontInfo->fontAscent = getINT32( (unsigned char *)buffer, format);
-       buffer += 4;
-
-       pFontInfo->fontDescent = getINT32((unsigned char *)buffer, format);
-       buffer +=4;
-
-       buffer += 4;
-
-       getMetric(buffer, format, &pFontInfo->minbounds.metrics);
-       buffer += 12;
-
-       getMetric(buffer, format, &pFontInfo->maxbounds.metrics);
-       buffer += 12;
-
-       if ( PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) ) {
-               buffer += 12;
-               getMetric( buffer, format, maxink);
-       } else {
-               *maxink = pFontInfo->maxbounds.metrics;
-       }
-
-       return  TRUE;
-}
-
-static Bool
-getProperties( pcf, buf_top, tables, ntables)
-PcfTmp *pcf;
-caddr_t        buf_top;
-PCFTablePtr    tables;
-int    ntables;
-{
-       CARD32  format;
-       CARD32  size;
-       CARD32  offset;
-       caddr_t         buffer;
-       int     i;
-
-       if ( !seekToType( tables, ntables, (CARD32)PCF_PROPERTIES, &format, &size, &offset ) ) {
-               return  FALSE;
-       }
-
-       buffer = buf_top + offset;
-       format = getLSB32( (unsigned char *)buffer );
-       buffer += 4;
-       if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) {
-               return  FALSE;
-       }
-       pcf->nprops = getINT32((unsigned char *)buffer, format);
-       buffer += 4;
-
-       if ( !( pcf->props = ( FontPropPtr )malloc( pcf->nprops * sizeof( FontPropRec ) ) ) ) {
-               return  FALSE;
-       }
-
-       if ( !( pcf->isStringProp = ( char * )malloc(pcf->nprops * sizeof( char ) ) ) ) {
-               return  FALSE;
-       }
-
-       for ( i = 0; i < pcf->nprops; i++ ) {
-               pcf->props[i].name = getINT32((unsigned char *)buffer, format);
-               buffer += 4;
-               pcf->isStringProp[i] = *buffer++;
-               pcf->props[i].value = getINT32((unsigned char *)buffer, format);
-               buffer += 4;
-       }
-       if ( pcf->nprops & 3 ) {
-               i = 4 - (pcf->nprops & 3);
-               buffer += i;
-       }
-
-       pcf->str_length = getINT32((unsigned char *)buffer, format);
-       buffer += 4;
-
-       pcf->string = (char *)buffer;
-       return  TRUE;
-}
-
-
-static PcfTmp  *
-openPcfFont( fontname )
-char   *fontname;
-{
-       PcfTmp  *pcf_tmp;
-
-       CARD32  format;
-       CARD32  size;
-       CARD32  offset;
-       CARD32  *bitmapSizes;
-       xCharInfo       maxink;
-       caddr_t         buffp;
-       struct stat     st;
-
-       pcf_tmp = ( PcfTmp * )calloc( 1, sizeof( PcfTmp ) );
-       if ( !pcf_tmp ) {
-               USAGE("dtgpftobdf : calloc() error.\n" ) ;
-               goto Bail;
-       }
-
-       if ( stat( fontname, &st ) ) {
-               goto Bail;
-       }
-
-       if ( ( pcf_tmp->pcf_buffer = readfontfile( fontname)) == (char *)-1 ) {
-               goto Bail;
-       }
-
-       pcf_tmp->pcf_bufsz = st.st_size;
-
-       if ( (format = getLSB32( (unsigned char *)pcf_tmp->pcf_buffer )) != PCF_FILE_VERSION ) {
-               USAGE1("dtgpftobdf : pcf file version(0x%x) error.\n", format ) ;
-               goto Bail;
-       }
-
-       pcf_tmp->ntables = getLSB32( (unsigned char *)(pcf_tmp->pcf_buffer + 4) );
-       pcf_tmp->tables = (PCFTablePtr)(pcf_tmp->pcf_buffer + 8 );
-
-       if ( !getAccel( 
-           &pcf_tmp->info, &maxink, pcf_tmp->pcf_buffer,
-           pcf_tmp->tables, pcf_tmp->ntables, (CARD32)PCF_BDF_ACCELERATORS
-           )
-           ) {
-               if ( !getAccel( 
-                   &pcf_tmp->info, &maxink, pcf_tmp->pcf_buffer,
-                   pcf_tmp->tables, pcf_tmp->ntables, (CARD32)PCF_ACCELERATORS
-                   )
-                   ) {
-                       USAGE("dtgpftobdf : Cannot get accelerators.\n" ) ;
-                       goto Bail;
-               }
-       }
-
-       if ( !getProperties( 
-           pcf_tmp, pcf_tmp->pcf_buffer, 
-           pcf_tmp->tables, pcf_tmp->ntables
-           )
-           ) {
-               USAGE("dtgpftobdf : getProperties error.\n" ) ;
-               goto Bail;
-       }
-       if ( !seekToType( 
-           pcf_tmp->tables, pcf_tmp->ntables, 
-           (CARD32)PCF_BITMAPS, &format, &size, &offset
-           )
-           ) {
-               USAGE("dtgpftobdf : PCF_BITMAPS error.\n" ) ;
-               goto Bail;
-       }
-
-       buffp = pcf_tmp->pcf_buffer + offset;
-
-       format = getLSB32( (unsigned char *)buffp);
-       buffp += 4;
-
-       if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) {
-               USAGE("dtgpftobdf : error.!PCF_FORMAT_MATCH(PCF_BITMAPS)\n" ) ;
-               goto Bail;
-       }
-
-       pcf_tmp->nbitmaps = getINT32( (unsigned char *)buffp, format);
-       buffp += 4;
-       pcf_tmp->offsets = (CARD32 *)buffp;
-       buffp += sizeof( *pcf_tmp->offsets) * pcf_tmp->nbitmaps;
-
-
-       bitmapSizes = (CARD32 *)buffp;
-       pcf_tmp->sizebitmaps 
-           = getINT32( (unsigned char *)&bitmapSizes[PCF_GLYPH_PAD_INDEX(format)], format);
-       pcf_tmp->bmp_fmt = format;
-       buffp += sizeof( *bitmapSizes) * GLYPHPADOPTIONS;
-       pcf_tmp->bitmaps = buffp;
-       buffp += pcf_tmp->sizebitmaps;
-
-       if ( !seekToType( 
-           pcf_tmp->tables, pcf_tmp->ntables, 
-           (CARD32)PCF_BDF_ENCODINGS, &format, &size, &offset
-           )
-           ) {
-               USAGE("dtgpftobdf : error.(PCF_BDF_ENCODINGS)\n" ) ;
-               goto Bail;
-       }
-
-       buffp = pcf_tmp->pcf_buffer + offset;
-       format = getLSB32( (unsigned char *)buffp);
-       buffp += 4;
-       if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) {
-               USAGE("dtgpftobdf : error.!PCF_FORMAT_MATCH(PCF_BDF_ENCODINGS)\n" ) ;
-               goto Bail;
-       }
-
-       pcf_tmp->info.firstCol = getINT16( (unsigned char *)buffp, format);
-       buffp += 2;
-       pcf_tmp->info.lastCol = getINT16( (unsigned char *)buffp, format);
-       buffp += 2;
-       pcf_tmp->info.firstRow = getINT16( (unsigned char *)buffp, format);
-       buffp += 2;
-       pcf_tmp->info.lastRow = getINT16( (unsigned char *)buffp, format);
-       buffp += 2;
-       pcf_tmp->info.chDefault = getINT16( (unsigned char *)buffp, format);
-       buffp += 2;
-
-       pcf_tmp->info.allExist  = FALSE;
-       pcf_tmp->enc_fmt = format;
-       pcf_tmp->encodingOffsets = (CARD16 *)buffp;
-
-       /*
-       * get scale width infomations 
-       */
-       if ( !seekToType( 
-           pcf_tmp->tables, pcf_tmp->ntables, 
-           (CARD32)PCF_SWIDTHS, &format, &size, &offset
-           )
-           ) {
-               goto Bail;
-       }
-
-       buffp = pcf_tmp->pcf_buffer + offset;
-       format = getLSB32( (unsigned char*)buffp);
-       buffp += 4;
-       if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) {
-               goto Bail;
-       }
-       pcf_tmp->swd_fmt = (CARD32)format ;
-       pcf_tmp->swd_num = getINT32( (unsigned char*)buffp, format ) ;
-       buffp += 4;
-
-       pcf_tmp->swidth = (CARD32 *)buffp ;
-
-       /*
-       * get glyph names
-       */
-       if ( !seekToType( 
-           pcf_tmp->tables, pcf_tmp->ntables, 
-           (CARD32)PCF_GLYPH_NAMES, &format, &size, &offset
-           )
-           ) {
-               goto Bail;
-       }
-
-       buffp = pcf_tmp->pcf_buffer + offset;
-       format = getLSB32( (unsigned char*)buffp);
-       buffp += 4;
-       if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) {
-               goto Bail;
-       }
-       pcf_tmp->glyphs = getINT32( (unsigned char*)buffp, format ) ;
-       buffp += 4;
-       pcf_tmp->glyph_offset = (int *)buffp ;
-       buffp += 4 * (pcf_tmp->glyphs + 1) ;
-       pcf_tmp->glyph_name = (char *)buffp ;
-       pcf_tmp->glyph_fmt = (CARD32)format ;
-
-       /*
-       * get metrics
-       */
-       if ( !seekToType( 
-           pcf_tmp->tables, pcf_tmp->ntables, 
-           (CARD32)PCF_METRICS, &format, &size, &offset
-           )
-           ) {
-               goto Bail;
-       }
-
-       buffp = pcf_tmp->pcf_buffer + offset;
-       format = getLSB32( (unsigned char*)buffp);
-       buffp += 4;
-       if ( PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) ) {
-           pcf_tmp->compress = 0 ;
-           pcf_tmp->mtr_num = getINT32( (unsigned char*)buffp, format ) ;
-           buffp += 4;
-       }else if ( PCF_FORMAT_MATCH( format, PCF_COMPRESSED_METRICS ) ) {
-           pcf_tmp->compress = 1 ;
-           pcf_tmp->mtr_num = (int)getINT16( (unsigned char*)buffp, format ) ;
-           buffp += 2;
-       }else{
-               goto Bail;
-       }
-       pcf_tmp->metrics = (xCharInfo *)buffp ;
-       pcf_tmp->mtr_fmt = (CARD32)format ;
-
-       return  pcf_tmp;
-
-Bail:
-       if ( pcf_tmp ) {
-               free( pcf_tmp );
-       }
-       return  NULL;
-}
-
-
-static void
-Anafprop(fip,fpropPtr,fpropvnPtr,fontname,ps,res,fplistPtr,fplistNum)
-FontInfoRec            *fip;
-FontPropRec    *fpropPtr;
-char   *fpropvnPtr;
-char   **fontname;
-FontPropRec    **fplistPtr;
-FontPropRec    *ps;
-FontPropRec    *res;
-unsigned int   *fplistNum;
-{
-       FontPropRec     *wkp ,*wklp;
-       int     i, fpnL;
-       char    *fpnp;
-
-       *fplistNum = fip->nProps - 1;
-       *fplistPtr = (FontPropRec *)malloc(*fplistNum * sizeof(FontPropRec));
-       wkp = fpropPtr;
-       wklp = *fplistPtr;
-       for (i = 0; i < fip->nProps; i++) {
-               fpnp = fpropvnPtr + wkp->name;
-               fpnL = strlen(fpnp);
-               if ((fpnL == 4) && (strncmp(fpnp,"FONT",4) == 0)) {
-                       *fontname = fpropvnPtr + wkp->value;
-                       wkp++;
-                       continue;
-               }
-               if (fpnL == 10) {
-                       if (strncmp(fpnp,"POINT_SIZE",10) == 0) {
-                               ps->value = wkp->value;
-                       }
-                       if (strncmp(fpnp,"RESOLUTION",10) == 0) {
-                               res->value = wkp->value;
-                       }
-               }
-               wklp->name = (CARD32) (intptr_t) fpropvnPtr + wkp->name;
-               if (wkp->indirect == TRUE) {
-                       wklp->value = (INT32) (intptr_t) fpropvnPtr + wkp->value;
-               } else {
-                       wklp->value = wkp->value;
-               }
-               wklp->indirect = wkp->indirect;
-               wkp++;
-               wklp++;
-       }
-}
-
-
-
-static void
-setProp( pcf, proptmp )
-PcfTmp *pcf;
-PropTmp        *proptmp;
-{
-       int     i, fpnL;
-       char    *fpnp;
-
-       for ( i = 0; i < pcf->nprops; i++ ) {
-               fpnp = pcf->string + pcf->props[i].name;
-               fpnL = strlen(fpnp);
-               if ( ( fpnL == 4 ) && ( strncmp( fpnp,"FONT", 4 ) == 0 ) ) {
-                       proptmp->font_name = pcf->string + pcf->props[i].value;
-                       continue;
-               }
-               if ( fpnL == 10 ) {
-                       if ( strncmp( fpnp,"POINT_SIZE", 10 ) == 0 ) {
-                               proptmp->psize.value = pcf->props[i].value;
-                       } else if ( strncmp( fpnp, "RESOLUTION", 10 ) == 0 ) {
-                               proptmp->resolution.value = pcf->props[i].value;
-                       }
-               }
-       }
-}
-
-
-
-/*
- *  output to SIZE (SIZE point resolutionX resolutionY) 
- * 
- */
-static void
-pSIZE( ps, res )
-FontPropRec *ps, *res;
-{
-       int     k;
-       float   f;
-       char    buf1[16], buf2[16];
-
-       f = ps->value / 10.0;
-       if ( ( ps->value % 10 ) != 0 ) {
-               sprintf( buf1, "%.1f", f );
-       } else {
-               sprintf( buf1, "%.0f", f );
-       }
-       k = ( ( res->value * 72.27 ) / 100.0 ) + 1;
-       sprintf( buf2, "%d %d", k, k );
-       fprintf( stdout, "SIZE %s %s\n", buf1, buf2 );
-       return;
-}
-
-
-/* output to SIZE of pcf font */
-
-static void    
-pSIZE_pcf( proptmp )
-PropTmp        *proptmp;
-{
-       int     k;
-       float   f;
-       char    buf1[16],buf2[16];
-
-       f = proptmp->psize.value / 10.0;
-       if ( ( proptmp->psize.value % 10 ) != 0 ) {
-               snprintf( buf1, sizeof(buf1), "%.1f",f );
-       } else {
-               snprintf( buf1, sizeof(buf1), "%.0f",f);
-       }
-       k = ( ( proptmp->resolution.value * 72.27 ) / 100.0 ) + 1;
-       snprintf( buf2, sizeof(buf2), "%d %d", k, k );
-       fprintf( stdout,"SIZE %s %s\n", buf1, buf2 );
-       return;
-}
-
-
-
-static void
-pPROPS( fip,fplistPtr,fplistNum )
-FontInfoRec    *fip;
-FontPropRec    *fplistPtr;
-unsigned int   fplistNum;
-{
-       FontPropRec     *wkp;
-       int     i, k;
-
-       bufp = buf;
-       k = snprintf( bufp, sizeof(buf), "STARTPROPERTIES %d\n", fplistNum+3 );
-       bufp += k;
-       k = snprintf( bufp, sizeof(buf) - (bufp - buf), "FONT_ASCENT %d\n", fip->fontAscent );
-       bufp += k;
-       k = snprintf( bufp, sizeof(buf) - (bufp - buf), "FONT_DESCENT %d\n", fip->fontDescent );
-       bufp += k;
-       k = snprintf( bufp, sizeof(buf) - (bufp - buf), "DEFAULT_CHAR %d\n", fip->chDefault );
-       bufp += k;
-       wkp = fplistPtr;
-       for ( i = 0; i < fplistNum; i++ ) {
-               if ( wkp->indirect == TRUE ) {
-                       k = snprintf( bufp, sizeof(buf) - (bufp - buf), "%s \"%s\"\n", (char *) (intptr_t) wkp->name, (char *) (intptr_t) wkp->value );
-                       bufp += k;
-               } else {
-                       k = snprintf( bufp, sizeof(buf) - (bufp - buf), "%s %d\n", (char *) (intptr_t) wkp->name, wkp->value );
-                       bufp += k;
-               }
-               wkp++;
-       }
-       k = snprintf( bufp, sizeof(buf) - (bufp - buf), "ENDPROPERTIES\n" );
-       bufp += k;
-       *bufp = '\0';
-       fprintf( stdout, "%s", buf );
-       return;
-
-}
-
-
-/* output to font property information of pcf fontpcf */
-static void    
-pPROPS_pcf( pcf )
-PcfTmp *pcf;
-{
-       FontPropPtr     wkp;
-       int     i, k;
-
-       bufp = buf;
-       k = sprintf( bufp, "STARTPROPERTIES %d\n", pcf->nprops+3 );
-       bufp += k;
-       k = sprintf( bufp, "FONT_ASCENT %d\n", 
-           (pcf->info.fontAscent >= pcf->info.maxbounds.metrics.ascent)
-           ? pcf->info.fontAscent : pcf->info.maxbounds.metrics.ascent
-           );
-       bufp += k;
-       k = sprintf( bufp, "FONT_DESCENT %d\n",
-           (pcf->info.fontDescent >= pcf->info.maxbounds.metrics.descent)
-           ? pcf->info.fontDescent : pcf->info.maxbounds.metrics.descent
-           );
-       bufp += k;
-       k = sprintf( bufp, "DEFAULT_CHAR %d\n", pcf->info.chDefault );
-       bufp += k;
-       wkp = pcf->props;
-       for ( i = 0; i < pcf->nprops; i++ ) {
-               if ( pcf->isStringProp[i] ) {
-                       k = sprintf(bufp,"%s \"%s\"\n", 
-                           pcf->string + wkp->name, pcf->string + wkp->value
-                           );
-                       bufp += k;
-               } else {
-                       k = sprintf(bufp,"%s %d\n", 
-                           pcf->string + wkp->name, wkp->value
-                           );
-                       bufp += k;
-               }
-               wkp++;
-       }
-       k = sprintf( bufp, "ENDPROPERTIES\n" );
-       bufp += k;
-       *bufp = '\0';
-       fprintf( stdout,"%s",buf );
-       return;
-
-}
-
-
-
-/*
- * output to character information and patern
- *
- */
-static void    
-pCHARS(fip,cip,glyphPtr,charNum,glyphPad)
-FontInfoRec    *fip;
-CharInfoRec    *cip;
-char   *glyphPtr;
-unsigned int   charNum;
-unsigned int   glyphPad;
-
-{
-       CharInfoRec     *wkp;
-       int     i, j;
-       unsigned int    frow, lrow, row, fcol, lcol, col;
-       unsigned int    bbw, bbh;
-       unsigned int    bml;
-       char    *glyph;
-
-       fprintf( stdout, "CHARS %d\n", charNum );
-
-       frow = fip->firstRow;
-       lrow = fip->lastRow;
-       fcol = fip->firstCol;
-       lcol = fip->lastCol;
-       wkp = cip;
-       glyph = glyphPtr;
-       row = frow;
-
-       for ( i = 0; i < 256; i++ ) {
-               cvtp[i] = &cvt[i];
-       }
-
-       for ( row = frow; row <= lrow; row++ ) {
-               for ( col = fcol; col <= lcol; col++ ) {
-                       if ( wkp->exists == FALSE ) {
-                               wkp++;
-                               continue;
-                       }
-                       fprintf( stdout, "STARTCHAR %.2x%.2x\n", row,col );
-                       fprintf( stdout, "ENCODING %d\n", (row << 8) + col );
-                       fprintf( stdout, "SWIDTH 256 0\nDWIDTH %d %d\n",
-                           wkp->metrics.characterWidth,0 );
-                       bbw = wkp->metrics.rightSideBearing
-                           - wkp->metrics.leftSideBearing;
-                       bbh = wkp->metrics.ascent + wkp->metrics.descent;
-                       fprintf( stdout, "BBX %d %d %d %d\nBITMAP\n", bbw, bbh,
-                           wkp->metrics.leftSideBearing,
-                           - ( wkp->metrics.descent ));
-                       bml = (bbw + 7) / 8;
-                       for ( i = 0; i < bbh; i++ ) {
-                               bufp = buf;
-                               for ( j = 0; j < bml; j++ ) {
-                                       sprintf( bufp, "%s", (char *) cvtp[(unsigned char)glyph[j]] );
-                                       bufp += 2;
-                               }
-                               fprintf( stdout, "%.*s\n", bml*2, buf );
-                               glyph += glyphPad;
-                       }
-                       fprintf( stdout,"ENDCHAR\n" );
-                       wkp++;
-               }
-       }
-       return;
-}
-
-
-/*
- * output to character information and patern
- *
- */
-static void    
-pfixCHARS(fip,cip,glyphPtr,charNum,glyphPad)
-FontInfoRec    *fip;
-CharInfoRec    *cip;
-char   *glyphPtr;
-unsigned int   charNum;
-unsigned int   glyphPad;
-{
-       CharInfoRec     *wkp;
-       register int    i, j, k;
-       unsigned int    frow,lrow,fcol,lcol;
-       register int    row, col;
-       unsigned int    bbw, bbh, bbox, bboy;
-       unsigned int    xd, yd;
-       unsigned int    bml;
-       register char   *glyph;
-       char    fixbuf[240], *fixbufp;
-       int     fixdl;
-
-       fprintf( stdout,"CHARS %d\n",charNum );
-
-       for ( i = 0; i < 256; i++ ) {
-               cvtp[i] = &cvt[i];
-       }
-
-       frow = fip->firstRow;
-       lrow = fip->lastRow;
-       fcol = fip->firstCol;
-       lcol = fip->lastCol;
-       xd =  cip->metrics.characterWidth;
-       yd = 0;
-       bbw = cip->metrics.rightSideBearing - cip->metrics.leftSideBearing;
-       bbh = cip->metrics.ascent + cip->metrics.descent;
-       bbox = cip->metrics.leftSideBearing;
-       bboy = -(cip->metrics.descent);
-
-       fixbufp = fixbuf;
-       fixdl = sprintf( fixbufp, "SWIDTH 256 0\nDWIDTH %d %d\n", xd, yd );
-       fixbufp += fixdl;
-       k = sprintf(fixbufp,"BBX %d %d %d %d\nBITMAP\n", 
-           bbw, bbh, bbox, bboy 
-           );
-       fixdl += k;
-
-       bml = (bbw + 7) / 8;
-       wkp = cip;
-       glyph = glyphPtr;
-       for ( row = frow; row <= lrow; row++ ) {
-               for ( col = fcol; col <= lcol; col++ ) {
-                       if ( wkp->exists == FALSE ) {
-                               wkp++;
-                               continue;
-                       }
-                       bufp = buf;
-                       memcpy(bufp,"STARTCHAR ",10);
-                       bufp += 10;
-                       memcpy(bufp,cvtp[row],2);
-                       bufp += 2;
-                       memcpy(bufp,cvtp[col],3);
-                       bufp += 3;
-                       memcpy(bufp,"ENCODING ",9);
-                       bufp += 9;
-                       k = sprintf(bufp,"%d\n",(row << 8) + col);
-                       bufp += k;
-                       memcpy(bufp,fixbuf,fixdl);
-                       bufp += fixdl;
-                       for (i = 0; i < bbh; i++) {
-                               for (j = 0; j < bml; j++) {
-                                       memcpy(bufp, cvtp[(unsigned char)glyph[j]],3);
-                                       bufp += 2;
-                               }
-                               bufp ++;
-                               glyph += glyphPad;
-                       }
-                       memcpy( bufp, "ENDCHAR\n", 8 );
-                       bufp += 8;
-                       *bufp = '\0';
-                       fprintf( stdout, "%s", buf );
-                       wkp++;
-               }
-       }
-       return;
-}
-
-
-static void
-putPtn( bits, width, height)
-unsigned char   *bits;          /* 1 byte boundary , no byte swap data */
-int     width, height;
-{
-       int     bytewidth;
-       int     i, j;
-
-       bytewidth = ( width + 7) / 8;
-
-       for ( i = height; i-- > 0;) {
-               for ( j = bytewidth; j-- > 0; bits++) {
-                       fprintf(stdout, "%.2x", *bits);
-               }
-               fprintf(stdout, "\n");
-       }
-
-}
-
-static void
-ByteSwap( p, scan)
-char    *p;
-int     scan;
-{
-       char    w;
-
-       switch( scan) {
-       case 1:
-               break;
-       case 2:
-               w = *p;
-               *p = *(p + 1);
-               *(p + 1) = w;
-               break;
-       case 4:
-               w = *p;
-               *p = *(p + 3);
-               *(p + 3) = w;
-               w = *(p + 1);
-               *(p + 1) = *(p + 2);
-               *(p + 2) = w;
-               break;
-       }
-}
-
-static unsigned char _reverse_byte[0x100] = {
-                       0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
-                       0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
-                       0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
-                       0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
-                       0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
-                       0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
-                       0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
-                       0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
-                       0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
-                       0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
-                       0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
-                       0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
-                       0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
-                       0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
-                       0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
-                       0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
-                       0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
-                       0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
-                       0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
-                       0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
-                       0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
-                       0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
-                       0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
-                       0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
-                       0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
-                       0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
-                       0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
-                       0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
-                       0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
-                       0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
-                       0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
-                       0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
-};
-
-static void
-BitOrderInvert(buf, nbytes)
-register unsigned char *buf;
-register int nbytes;
-{
-       register unsigned char *rev = _reverse_byte;
-
-       for (; --nbytes >= 0; buf++)
-               *buf = rev[*buf];
-}
-
-static void
-invertBits( src, format, width, height, dest)
-char    *src;
-CARD32  format;
-int     width, height;
-char    *dest;
-{
-       int     bit, byte, glyph, scan;
-       int     src_bytewidth, dest_bytewidth;
-       char    work[8];
-       int     i, j;
-
-       bit = PCF_BIT_ORDER( format);
-       byte = PCF_BYTE_ORDER( format);
-       glyph = PCF_GLYPH_PAD( format);
-       scan = PCF_SCAN_UNIT( format);
-
-       src_bytewidth = (( width + ( 8 * glyph ) - 1)/( 8 * glyph)) * glyph;
-       dest_bytewidth = ( width + 7) /8;
-
-       for ( i = 0; i < height; i++, src += src_bytewidth,
-           dest += dest_bytewidth) {
-               for ( j = 0; j < src_bytewidth; j += scan) {
-                       memcpy( work, src + j, scan);
-                       if ( bit == LSBFirst)
-                               BitOrderInvert( (unsigned char *)work, scan);
-                       if ( byte == LSBFirst)
-                               ByteSwap( work, scan);
-                       if (( j + scan) >= dest_bytewidth) {
-                               memcpy( dest + j, work, dest_bytewidth - j);
-                               break;
-                       }
-                       memcpy( dest + j, work, scan);
-               }
-       }
-
-}
-
-static void
-pCHARS_pcf (pcf, fix)
-PcfTmp  *pcf;
-int    fix ;
-{
-       char    *bmp_ptn = NULL;
-       char    *bitmap = NULL;
-       int     ptn_width = 0, ptn_height = 0;
-       int     bmp_width = 0, bmp_height = 0;
-       int     cpy_height = 0;
-       int     row, col;
-       int     row_width;
-       int     encoding;
-       int     encodingOffset;
-       int     nencoding;
-       int     bmp_adj = 0, ptn_adj = 0;
-       int     adj_hi;
-       int     width_bytes;
-       INT16   bl, br, ba, bd, bdw ;
-       unsigned char   cl, cr, ca, cd, cdw ;
-       unsigned char   *comp ;
-       int     bbw, bbh, bbx, bby, dwidth ;
-
-       fprintf(stdout,"CHARS %d\n",pcf->nbitmaps);
-
-       row_width = pcf->info.lastCol - pcf->info.firstCol + 1;
-       nencoding = row_width * (pcf->info.lastRow - pcf->info.firstRow + 1);
-
-       if( fix == TRUE ) {
-           bmp_width = pcf->info.maxbounds.metrics.leftSideBearing 
-                   + pcf->info.maxbounds.metrics.rightSideBearing ;
-           bmp_height = pcf->info.fontAscent + pcf->info.fontDescent ;
-           ptn_width  = bmp_width ;
-           ptn_height = pcf->info.maxbounds.metrics.ascent +
-                       pcf->info.maxbounds.metrics.descent;
-
-           if (!(bmp_ptn = make_toptn( ptn_width, ptn_height)))
-                   return;
-
-           if ( ( adj_hi = pcf->info.fontAscent - pcf->info.maxbounds.metrics.ascent ) > 0) {
-                   width_bytes =  8 * PCF_GLYPH_PAD( pcf->bmp_fmt);
-                   width_bytes = (( width_bytes + bmp_width - 1)/width_bytes) * PCF_GLYPH_PAD( pcf->bmp_fmt);
-                   bmp_adj = width_bytes * adj_hi;
-                   ptn_adj = 0;
-                   if (( cpy_height = bmp_height - adj_hi) > ptn_height)
-                           cpy_height = ptn_height ;
-           } else if ( adj_hi < 0) {
-                   adj_hi *= -1;
-                   width_bytes = ( ptn_width + 7) / 8;
-                   bmp_adj = 0;
-                   ptn_adj = width_bytes * adj_hi;
-                   if (( cpy_height = ptn_height - adj_hi) > bmp_height)
-                           cpy_height = bmp_height ;
-           } else {
-                   bmp_adj = 0;
-                   ptn_adj = 0;
-                   cpy_height = ptn_height ;
-           }
-       }
-
-
-       for ( encoding = 0; encoding < nencoding; encoding++) {
-               if(fix == TRUE) memset( bmp_ptn, '\0', (ptn_width + 7)/8 * ptn_height);
-               encodingOffset = getINT16( (unsigned char *)(pcf->encodingOffsets + encoding), pcf->enc_fmt);
-               if (encodingOffset == 0xFFFF) continue;
-
-               row = pcf->info.firstRow + encoding / row_width;
-               col = pcf->info.firstCol + encoding % row_width;
-
-               fprintf(stdout,"STARTCHAR %s\n",pcf->glyph_name + 
-                   getINT32( (unsigned char*)&pcf->glyph_offset[encodingOffset],
-                   pcf->glyph_fmt) );
-               fprintf(stdout,"ENCODING %d\n",(row << 8) + col);
-
-               fprintf( stdout,"SWIDTH %d 0\n", getINT32( (unsigned char*)(pcf->swidth + encodingOffset), pcf->swd_fmt) );
-
-               if( pcf->compress ){
-                   comp = (unsigned char*)pcf->metrics + 
-                               encodingOffset * SIZEOF_COMPRESSED_METRIC ;
-                   cl  = getINT8( comp ) ;
-                   cr  = getINT8( comp ) ;
-                   cdw = getINT8( comp ) ;
-                   ca  = getINT8( comp ) ;
-                   cd  = getINT8( comp ) ;
-
-                   dwidth = (int)(cdw - 0x80) ;
-                   bbw = (int)((cr - 0x80) - (cl - 0x80)) ;
-                   bbh = (int)((ca - 0x80) + (cd - 0x80)) ;
-                   bbx = (int)(cl - 0x80) ;
-                   bby = (int)( -(cd - 0x80) ) ;
-               }else{
-                   bl = getINT16( (unsigned char *)&pcf->metrics[encodingOffset].leftSideBearing, pcf->mtr_fmt ) ;
-                   br = getINT16( (unsigned char *)&pcf->metrics[encodingOffset].rightSideBearing, pcf->mtr_fmt ) ;
-                   bdw = getINT16( (unsigned char *)&pcf->metrics[encodingOffset].characterWidth, pcf->mtr_fmt ) ;
-                   ba = getINT16( (unsigned char *)&pcf->metrics[encodingOffset].ascent, pcf->mtr_fmt ) ;
-                   bd = getINT16( (unsigned char *)&pcf->metrics[encodingOffset].descent, pcf->mtr_fmt ) ;
-                   dwidth = bdw ;
-                   bbw = br-bl ;
-                   bbh = ba+bd ;
-                   bbx = bl ;
-                   bby = -bd ;
-               }
-               fprintf( stdout,"DWIDTH %d 0\n", dwidth ) ;
-               fprintf( stdout,"BBX %d %d %d %d\nBITMAP\n", bbw, bbh, bbx, bby ) ;
-
-               if( fix == FALSE ) {
-                   bmp_width = pcf->info.maxbounds.metrics.leftSideBearing 
-                           + pcf->info.maxbounds.metrics.rightSideBearing ;
-                   bmp_height = pcf->info.fontAscent + pcf->info.fontDescent ;
-                   ptn_width  = bbw ;
-                   ptn_height = bbh ;
-
-                   if (!(bmp_ptn = make_toptn( ptn_width, ptn_height)))
-                           return;
-
-                   if ( ( adj_hi = pcf->info.fontAscent - pcf->info.maxbounds.metrics.ascent ) > 0) {
-                       width_bytes =  8 * PCF_GLYPH_PAD( pcf->bmp_fmt);
-                       width_bytes = (( width_bytes + bmp_width - 1)/width_bytes) * PCF_GLYPH_PAD( pcf->bmp_fmt);
-                       bmp_adj = width_bytes * adj_hi;
-                       ptn_adj = 0;
-                       if (( cpy_height = bmp_height - adj_hi) > ptn_height)
-                               cpy_height = ptn_height ;
-                   } else if ( adj_hi < 0) {
-                       adj_hi *= -1;
-                       width_bytes = ( ptn_width + 7) / 8;
-                       bmp_adj = 0;
-                       ptn_adj = width_bytes * adj_hi;
-                       if (( cpy_height = ptn_height - adj_hi) > bmp_height)
-                               cpy_height = bmp_height ;
-                   } else {
-                       bmp_adj = 0;
-                       ptn_adj = 0;
-                       cpy_height = ptn_height ;
-                   }
-                   memset( bmp_ptn, '\0', (ptn_width + 7)/8 * ptn_height);
-               }
-
-               bitmap = pcf->bitmaps + getINT32( (unsigned char *)(pcf->offsets + encodingOffset),
-                   pcf->bmp_fmt);
-                /* Only do this if non-NULL... */
-                if (bmp_ptn)
-                {
-                    invertBits( bitmap + bmp_adj, pcf->bmp_fmt,
-                                ptn_width, cpy_height, bmp_ptn + ptn_adj);
-                    putPtn( (unsigned char *)bmp_ptn, ptn_width, ptn_height );
-                }
-                else
-                {
-                    fprintf(stderr, "%s: bmp_ptn is NULL", __FUNCTION__);
-                }
-
-                fprintf(stdout,"ENDCHAR\n");
-               if( fix == FALSE )      free(bmp_ptn);
-       }
-       if( fix == TRUE )       free(bmp_ptn);
-       return;
-}
-
-static char *
-make_toptn( width, height)
-int     width, height;
-{
-       int     byte_width;
-
-       byte_width = (width + 7)/8;
-
-       return (char *)malloc( byte_width * height);
-}
-
-
-
-
-static int     
-getarg(argc,argv,fname,bitorder,byteorder,scanunit,glyphPad,outLevel,fix)
-int  argc;
-char *argv[];
-char *fname;
-int  *bitorder;
-int  *byteorder;
-int  *scanunit;
-int  *glyphPad;
-int  *outLevel;
-int  *fix;
-{
-       int i;
-       int already;
-       char *arg;
-       char *usage="dtgpftobdf [-H] [-V] [-help]  font_file_name";
-
-       *glyphPad = DEFAULTGLPAD;
-       *bitorder = DEFAULTBITORDER;
-       *scanunit = DEFAULTSCANUNIT;
-       *byteorder = DEFAULTBYTEORDER;
-       *outLevel = FALSE;
-       *fix = FALSE ;
-       already = 0 ;
-
-       for (i = 1; i < argc; i++ ) {
-               arg = argv[i];
-               if (*arg == '-') {
-                       *arg++;
-                       switch (*arg) {
-                       case 'p' :
-                               *glyphPad = atoi(arg+1) ;
-                               if (*glyphPad != 1 &&
-                                   *glyphPad != 2 &&
-                                   *glyphPad != 4 &&
-                                   *glyphPad != 8 ) {
-                                       USAGE("dtgpftobdf : illegal padding number (1/2/4/8)\n");
-                                       return  -1;
-                               }
-                               break;
-                       case 'H' :
-                               *outLevel = TRUE ;
-                               break;
-                       case 'h' :
-                               USAGE1("usage: %s\n",usage);
-                               return (-1);
-                       case 'V' :
-                               *fix = TRUE ;
-                               break;
-                       default :
-                               USAGE1("dtgpftobdf : illegal option -- %s\n",arg);
-                               USAGE1("usage: %s\n",usage);
-                               return  -1;
-                       }
-
-               } else {
-                       if (already == FALSE) {
-                               strcpy(fname,arg);
-                               already = TRUE;
-                       } else {
-                               USAGE1("dtgpftobdf : extra parameter --- %s\n",arg);
-                               USAGE1("usage: %s\n", usage );
-                               return  -1;
-                       }
-               }
-       }
-       if (already == FALSE) {
-               USAGE("dtgpftobdf : require file name\n");
-               USAGE1("usage: %s\n",usage);
-               return  -1;
-       }
-       return  0;
-}
-
diff --git a/cde/programs/dtudcfonted/dtgpftobdf/gtobdf.h b/cde/programs/dtudcfonted/dtgpftobdf/gtobdf.h
deleted file mode 100644 (file)
index 4bcc53c..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: gtobdf.h /main/3 1996/06/25 20:13:05 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-static
-unsigned int
- cvt[256]=
-{0x30300a00,0x30310a00,0x30320a00,0x30330a00,0x30340a00,0x30350a00,0x30360a00,
- 0x30370a00,0x30380a00,0x30390a00,0x30610a00,0x30620a00,0x30630a00,0x30640a00,
- 0x30650a00,0x30660a00,
- 0x31300a00,0x31310a00,0x31320a00,0x31330a00,0x31340a00,0x31350a00,
- 0x31360a00,0x31370a00,0x31380a00,0x31390a00,0x31610a00,0x31620a00,0x31630a00,
- 0x31640a00,0x31650a00,0x31660a00,
- 0x32300a00,0x32310a00,0x32320a00,0x32330a00,0x32340a00,0x32350a00,
- 0x32360a00,0x32370a00,0x32380a00,0x32390a00,0x32610a00,0x32620a00,0x32630a00,
- 0x31640a00,0x32650a00,0x32660a00,
- 0x33300a00,0x33310a00,0x33320a00,0x33330a00,0x33340a00,0x33350a00,
- 0x33360a00,0x33370a00,0x33380a00,0x33390a00,0x33610a00,0x33620a00,0x33630a00,
- 0x33640a00,0x33650a00,0x33660a00,
- 0x34300a00,0x34310a00,0x34320a00,0x34330a00,0x34340a00,0x34350a00,
- 0x34360a00,0x34370a00,0x34380a00,0x34390a00,0x34610a00,0x34620a00,0x34630a00,
- 0x34640a00,0x34650a00,0x34660a00,
- 0x35300a00,0x35310a00,0x35320a00,0x35330a00,0x35340a00,0x35350a00,
- 0x35360a00,0x35370a00,0x35380a00,0x35390a00,0x35610a00,0x35620a00,0x35630a00,
- 0x35640a00,0x35650a00,0x35660a00,
- 0x36300a00,0x36310a00,0x36320a00,0x36330a00,0x36340a00,0x36350a00,
- 0x36360a00,0x36370a00,0x36380a00,0x36390a00,0x36610a00,0x36620a00,0x36630a00,
- 0x36640a00,0x36650a00,0x36660a00,
- 0x37300a00,0x37310a00,0x37320a00,0x37330a00,0x37340a00,0x37350a00,
- 0x37360a00,0x37370a00,0x37380a00,0x37390a00,0x37610a00,0x37620a00,0x37630a00,
- 0x37640a00,0x37650a00,0x37660a00,
- 0x38300a00,0x38310a00,0x38320a00,0x38330a00,0x38340a00,0x38350a00,
- 0x38360a00,0x38370a00,0x38380a00,0x38390a00,0x38610a00,0x38620a00,0x38630a00,
- 0x38640a00,0x38650a00,0x38660a00,
- 0x39300a00,0x39310a00,0x39320a00,0x39330a00,0x39340a00,0x39350a00,
- 0x39360a00,0x39370a00,0x39380a00,0x39390a00,0x39610a00,0x39620a00,0x39630a00,
- 0x39640a00,0x39650a00,0x39660a00,
- 0x61300a00,0x61310a00,0x61320a00,0x61330a00,0x61340a00,0x61350a00,
- 0x61360a00,0x61370a00,0x61380a00,0x61390a00,0x61610a00,0x61620a00,0x61630a00,
- 0x61640a00,0x61650a00,0x61660a00,
- 0x62300a00,0x62310a00,0x62320a00,0x62330a00,0x62340a00,0x62350a00,
- 0x62360a00,0x62370a00,0x62380a00,0x62390a00,0x62610a00,0x62620a00,0x62630a00,
- 0x62640a00,0x62650a00,0x62660a00,
- 0x63300a00,0x63310a00,0x63320a00,0x63330a00,0x63340a00,0x63350a00,
- 0x63360a00,0x63370a00,0x63380a00,0x63390a00,0x63610a00,0x63620a00,0x63630a00,
- 0x63640a00,0x63650a00,0x63660a00,
- 0x64300a00,0x64310a00,0x64320a00,0x64330a00,0x64340a00,0x64350a00,
- 0x64360a00,0x64370a00,0x64380a00,0x64390a00,0x64610a00,0x64620a00,0x64630a00,
- 0x64640a00,0x64650a00,0x64660a00,
- 0x65300a00,0x65310a00,0x65320a00,0x65330a00,0x65340a00,0x65350a00,
- 0x65360a00,0x65370a00,0x65380a00,0x65390a00,0x65610a00,0x65620a00,0x65630a00,
- 0x65640a00,0x65650a00,0x65660a00,
- 0x66300a00,0x66310a00,0x66320a00,0x66330a00,0x66340a00,0x66350a00,
- 0x66360a00,0x66370a00,0x66380a00,0x66390a00,0x66610a00,0x66620a00,0x66630a00,
- 0x66640a00,0x66650a00,0x66660a00 };
-static
-unsigned int *cvtp[256];
-       
-       
diff --git a/cde/programs/dtudcfonted/dtgpftocpf/Imakefile b/cde/programs/dtudcfonted/dtgpftocpf/Imakefile
deleted file mode 100644 (file)
index ef50992..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/6 1996/09/09 11:19:51 drk $
-
-        DESTDIR = $(CDE_INSTALLATION_TOP)
-        BINDIR  = /bin
-
-        OPT1 = -DDEFAULT_CODESET='"'3'"'
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-        OPT3 = -DSNFFONTC='"'$(SNFFONTC)'"'
-
-        DEFINES     = $(OPT1) $(OPT2) $(OPT3)
-
-       INCLUDES   = -I../include -I../libfal/include
-
-        DEPLIBS   = ../libfuty/liboakfuty.a ../libfal/libfal.a $(DEPXLIB)
-LOCAL_LIBRARIES   = ../libfuty/liboakfuty.a ../libfal/libfal.a $(XLIB)
-  SYS_LIBRARIES   = -lc
-
-           SRCS   = gpftocpf.c
-
-           OBJS   = gpftocpf.o
-
-ComplexProgramTarget(dtgpftocpf)
diff --git a/cde/programs/dtudcfonted/dtgpftocpf/gpftocpf.c b/cde/programs/dtudcfonted/dtgpftocpf/gpftocpf.c
deleted file mode 100644 (file)
index ca79262..0000000
+++ /dev/null
@@ -1,674 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: gpftocpf.c /main/6 1996/11/08 02:05:11 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#include       <stdio.h>
-#include       <fcntl.h>
-#include       <signal.h>
-#include       <sys/types.h>
-#include        <sys/stat.h>
-#ifndef SVR4
-#if !defined ( SYSV )
-#include        <sys/resource.h>
-#endif
-#include        <sys/wait.h>
-#else
-#include        <wait.h>
-#endif
-#include       <errno.h>
-#include       <locale.h>
-#include       <string.h>
-#include       <unistd.h>
-#include       <stdlib.h>
-#include       "bdfgpf.h"
-
-#include       <X11/Xmd.h>
-#include       <X11/Xproto.h>
-#include       "snfstruct.h"
-#include       "FaLib.h"
-#include       "udcutil.h"
-
-#define        START_CODE      0
-#define        END_CODE        1
-
-static int     CnvBDFtoGPF() ;
-static int     check_width() ;
-static int     check_height() ;
-static int     check_width_height() ;
-static int     check_code() ;
-static int     readBdfToMemory() ;
-static void    sigint_out() ;
-static void    put_error_and_exit();
-static void    put_help();
-static void    Usage();
-
-extern int     fal_code_to_glyph() ;
-
-static struct btophead Head;
-static char    *locale ;
-static char    *spacing ;
-static char    *char_set ;
-
-
-static void
-sigint_out()
-{
-       if ( Head.out_file ) {
-               unlink( Head.out_file );
-       }
-       exit( 0 );
-}
-
-main( argc, argv )
-int    argc;
-char   *argv[];
-{
-       int     help, code_area, fd[2], rtn, i;
-       struct stat     st;
-       char   snf_file[BUFSIZE];
-       char    *style ;
-       int     code_no ;
-       int     num_gr ;
-       FalGlyphRegion  *gr ;
-       char    *xlfdname, *cbuf, *ep ;
-       char    *codeset = DEFAULT_CODESET ;
-       char    *start_code, *end_code ;
-
-       /* format */
-       if( (locale = (char *)getenv( "LANG" )) == NULL ){
-           locale = "C" ;
-       }
-
-       Head.in_file = Head.out_file = Head.text_file = NULL;
-       Head.p_width = Head.p_height = USE_ORG_SIZE;
-
-       Head.code_category = ALL_CODE ;
-       Head.start_code = MIN_CODE;
-       Head.end_code   = MAX_CODE;
-       help = code_area = 0;
-       COMM_SETDEFAULTSTYLE( style ) ;
-       xlfdname = cbuf = start_code = end_code = ep = '\0' ;
-       spacing = char_set = NULL ;
-       gr = '\0' ;
-       num_gr = 0 ;
-
-       if ( ! ( oakgtobdf = get_cmd_path( getenv( "PATH" ), SNFTOBDF_CMD ) ) ) {
-               oakgtobdf = SNFTOBDF;
-       }
-       /*
-        *      check options
-        */
-       for ( i = 1; i < argc; i++ ) {
-               if ( !strcmp(argv[i], "-help" ) ) {
-                   help = 1;
-               } else if ( !strcmp(argv[i], "-system" ) ) {
-                   code_area |= SYSTM;
-               } else if ( !strcmp( argv[i], "-codeset" ) ) {
-                   if ( 
-                       ( (i+1) < argc ) && 
-                       ( strlen( argv[i+1] ) == 1 )
-                   ) {
-                       if ( *argv[i+1] == '1' ) code_area |= CDSET1;
-                       codeset = argv[++i] ;
-                   } else {
-                       put_help( argv[0] );
-                       exit( 1 );
-                   }
-               } else if ( COMM_SBOPT_STRCMP( argv, i ) ) {
-                   COMM_SBOPT_SETSBOPT( code_area ) ;
-               } else {
-                       continue ;
-               }
-       }
-
-       if ( help ) {
-           put_help( argv[0] );
-           exit( 0 );
-       }
-
-       ep = (char *)strchr( codeset, '\0' ) ;
-       code_no = (int)strtol( codeset, &cbuf, 10 ) ;
-       if( cbuf == codeset || cbuf != ep ) {
-               USAGE1("%s : The code set number is not right.\n", argv[0] ) ;
-               exit(1) ;
-       }
-
-       COMM_SBOPT_CHECKSBOPT( argv[0], code_area ) ;
-
-       /*
-        *      get parameters
-        */
-       for (i=1; i<argc; i++) {
-               if ( !strcmp(argv[i], "-g") ) {
-                       if((i < argc-1) && (*argv[i+1] != '-')){
-                               Head.in_file = argv[++i];
-                       }
-
-               } else if ( !strcmp(argv[i], "-p") ) {
-                       if ((i < argc-1) && (*argv[i+1] != '-')){
-                               Head.out_file = argv[++i];
-                       } else {
-                               USAGE1("%s : The output file name following -p option cannot be omitted.\n",
-                                   argv[0]);
-                               exit(1);
-                       }
-
-               } else if ( !strcmp(argv[i], "-width") ) {
-                       if ((i < argc-1) && (*argv[i+1] != '-')) {
-                               Head.p_width =  check_width( argv[0], argv[++i]);
-                               if (Head.p_width == 0) {
-                                       exit(1);
-                               }
-                       }
-                       else {
-                               USAGE1("%s : The character width is not specified.\n", argv[0]);
-                               exit( 1 );
-                       }
-
-               } else if ( !strcmp(argv[i], "-height") ) {
-                       if ((i < argc-1) && (*argv[i+1] != '-')) {
-                               Head.p_height = check_height( argv[0], argv[++i]);
-                               if (Head.p_height == 0) {
-                                       exit(1);
-                               }
-                       }
-                       else {
-                               USAGE1("%s :  The character height is not specified.\n", argv[0]);
-                               exit(1);
-                       }
-
-               } else if ( !strcmp(argv[i], "-start") ) {
-                       if ((i < argc-1) && (*argv[i+1] != '-')) {
-                               start_code = argv[++i] ;
-                       } else {
-                               USAGE1("%s : The extract start code is not specified.\n",
-                                   argv[0]);
-                               exit( 1 );
-                       }
-
-               } else if ( !strcmp(argv[i], "-end" ) ) {
-                       if ( ( i < argc-1 ) && ( *argv[i+1] != '-' ) ) {
-                               end_code = argv[++i] ;
-                       } else {
-                               USAGE1("%s : The extract end code is not specified.\n",
-                                   argv[0]);
-                               exit( 1 );
-                       }
-
-               } else if ( !strcmp(argv[i], "-style" ) ) {
-                       if ( ( i < argc-1 ) && ( *argv[i+1] != '-' ) ){
-                               style = argv[++i];
-                       } else {
-                               USAGE1("%s : The style is not specified.\n", argv[0]);
-                               exit( 1 );
-                       }
-               } else if ( !strcmp(argv[i], "-xlfd" ) ) {
-                       if ( i < argc-1 ){
-                               xlfdname = argv[++i];
-                       } else {
-                               USAGE1("%s : The XLFD name is not specified.\n", argv[0]);
-                               exit( 1 );
-                       }
-               } else if ( !strcmp(argv[i], "-help" ) 
-                       || !strcmp(argv[i], "-system") 
-                       || COMM_SBOPT_STRCMP( argv, i ) 
-               ) {
-                       continue;
-
-               } else if ( !strcmp( argv[i], "-codeset" ) ) {
-                       i++;
-                       continue;
-
-               } else {
-                       Usage(argv[0]);
-               }
-       }
-
-       if ( Head.in_file == NULL && xlfdname == NULL ) {
-               if ( code_area & SYSTM ) {
-                       USAGE1("%s : The GPF output file name cannot be omitted.\n", argv[0] );
-               } else {
-                       USAGE1("%s : The specification of the character size cannot be omitted.\n", argv[0] );
-               }
-               exit( 1 );
-       }
-
-       signal( SIGHUP , (void(*)())sigint_out );
-       signal( SIGINT , (void(*)())sigint_out );
-       signal( SIGQUIT, (void(*)())sigint_out );
-       signal( SIGTERM, (void(*)())sigint_out );
-
-       if ( !(code_area & SYSTM ) ) {
-
-           if( xlfdname ) {
-               if( GetUdcFileName( argv[0], code_no, xlfdname, snf_file ) ) {
-                       USAGE1("%s : The font file name cannot be obtained. Terminates abnormally.\n", argv[0]);
-                       exit(1) ;
-               }
-               Head.in_file = snf_file;
-           } else {
-               switch (GetFileName(argv[0], Head.in_file, style, code_no, snf_file)) {
-               case    0:
-                       Head.in_file = snf_file;
-                       break;
-               case    -1:
-                       exit(1);
-               default:
-                       USAGE1("%s : The font file name cannot be obtained. Terminates abnormally.\n", argv[0]);
-                       exit(1);
-               }
-           }
-           if( GetUdcRegion( argv[0], code_no, Head.in_file, &num_gr, &gr ) ) {
-                   USAGE1("%s : The font file cannot get UDC code area.\n", argv[0]);
-                   exit(1) ;
-           }
-       } else {
-           num_gr = 1 ;
-           if( (gr = (FalGlyphRegion *)malloc( sizeof(FalGlyphRegion) * num_gr )) == NULL ) {
-               USAGE1("%s : malloc error occurred. Terminates abnormally.\n", argv[0]);
-               exit(1) ;
-           }
-           gr[0].start = MIN_CODE ;
-           gr[0].end   = MAX_CODE ;
-       }
-       /*
-        * refuse proportional fonts
-        */
-       if ( GetUdcFontName( Head.in_file, NULL, &xlfdname ) ) {
-           USAGE1("%s : This font cannot get XLFD. Terminates abnormally.\n", argv[0]);
-           exit( 1 );
-       }
-       GETSPACINGSTR( spacing, xlfdname ) ;
-       if ( !strcmp( "p", spacing ) || !strcmp( "P", spacing ) ) {
-           USAGE2("%s cannot edit proportional fonts.(SPACING \"%s\")\n", argv[0], spacing );
-           exit( 1 );
-       }
-       GETCHARSETSTR( char_set, xlfdname ) ;
-
-       switch( code_area ) {
-           case SYSTM :
-               Head.code_category      = ALL_CODE ;
-               Head.start_code         = MIN_CODE ;
-               Head.end_code           = MAX_CODE ;
-               break ;
-           case SYSTM | CDSET1 :
-               Head.code_category      = ALL_CODE ;
-               Head.start_code         = MIN_CODE ;
-               Head.end_code           = MAX_CODE ;
-               break ;
-           default :
-               COMM_SBFNT_SETUDCAREA( argv[0], Head, char_set, code_area, num_gr, gr ) ;
-               break ;
-       }
-
-       if( start_code && end_code ) {
-           Head.start_code = check_code(argv[0], start_code, START_CODE, char_set, num_gr, gr );
-           if(Head.start_code < 0) {
-                   exit( 1 );
-           }
-           Head.end_code = check_code(argv[0], end_code, END_CODE, char_set, num_gr, gr );
-           if(Head.end_code < 0) {
-                   exit( 1 );
-           }
-       }
-
-       if ( Head.start_code > Head.end_code ) {
-               USAGE1("%s : The specification of extract start/end code is improper.\n", argv[0]);
-               exit( 1 );
-       }
-
-       COMM_SBFNT_CONVCODETOGI( char_set, Head ) ;
-
-       /* open to output file */
-       if ( Head.out_file == NULL ) {
-               Head.output = stdout;
-       } else {
-               if ( stat(Head.out_file, &st) != 0 ) {
-                       if ((Head.output = fopen(Head.out_file, "w")) == NULL) {
-                               put_error_and_exit( &Head, GPF_OPEN_OUT, argv[0] );
-                       }
-               } else {
-                       Head.text_file = Head.out_file;
-                       if ( ( Head.out_file = GetTmpPath( Head.out_file ) ) == NULL ) {
-                               put_error_and_exit( &Head, MKTMP_ERROR, argv[0] );
-                       }
-                       if ( ( Head.output = fopen( Head.out_file, "w" ) ) == NULL ) {
-                               put_error_and_exit( &Head, GPF_OPEN_OUT, argv[0] );
-                       }
-               }
-       }
-
-       if ( pipe( fd ) != 0 ) {
-               put_error_and_exit( &Head, PIPE_ERROR, argv[0] );
-       }
-
-       switch( fork() ) {
-       case    0:
-               close( fd[0] );
-               close( 1 );
-               if ( dup( fd[1] ) < 0 ) {
-                       put_error_and_exit( &Head, DUP_ERROR, argv[0] );
-               }
-               close( fd[1] );
-               execl( oakgtobdf, oakgtobdf, Head.in_file, 0 );
-               put_error_and_exit( &Head, EXEC_ERROR, argv[0] );
-
-       case    -1:
-               /* fork fail */
-               put_error_and_exit( &Head, FORK_ERROR, argv[0] );
-
-       default:
-               close( fd[1] );
-               Head.input = fdopen( fd[0], "r" );
-       }
-
-       if ( rtn = CnvBDFtoGPF( &Head, num_gr, gr, code_area ) ) {
-               wait( 0 );
-               fclose( Head.input );
-               if ( Head.out_file ) {
-                       unlink( Head.out_file );
-               }
-               put_error_and_exit( &Head, rtn, argv[0] );
-       }
-       wait(0);
-       fclose( Head.input );
-       signal( SIGHUP,  SIG_IGN );
-       signal( SIGINT,  SIG_IGN );
-       signal( SIGQUIT, SIG_IGN );
-       signal( SIGTERM, SIG_IGN );
-       if ( Head.text_file ) {
-               fclose( Head.output );
-               Link_NewFile( Head.out_file, Head.text_file );
-               unlink( Head.out_file );
-       }
-       exit( 0 );
-}
-
-
-static int
-CnvBDFtoGPF( head, num_gr, gr, code_area )
-struct btophead *head;
-int    num_gr ;
-FalGlyphRegion *gr ;
-int    code_area ;
-{
-       int         rtn;
-       char    bdfbuf[BUFSIZE];
-
-       /* readto BDF head information */
-       if ((rtn = ReadBdfHeader(head, bdfbuf))) {
-               return(rtn);
-       }
-
-       if (head->p_width == USE_ORG_SIZE) {
-               head->p_width = head->bdf_width;
-       }
-       if (head->p_height == USE_ORG_SIZE) {
-               head->p_height = head->bdf_height;
-       }
-
-       if ((head->p_width != head->bdf_width) ||
-           (head->p_height != head->bdf_height)) {
-               head->zoomf = 1;
-       } else {
-               head->zoomf = 0;
-       }
-
-       if ((head->code = (int *)malloc(sizeof(int)*head->num_chars)) == NULL) {
-               return(MALLOC_ERROR);
-       }
-
-       if ((head->ptn = (char **)malloc(sizeof(char *)*head->num_chars)) == NULL) {
-               return(MALLOC_ERROR);
-       }
-
-       if ((rtn = readBdfToMemory(head, bdfbuf, num_gr, gr, code_area))) {
-               return(rtn);
-       }
-
-       WriteGpfHeader(head);
-
-       if ((rtn = WritePtnToGpf(head))) {
-               return(rtn);
-       }
-
-       return(0);
-}
-
-
-static void
-put_error_and_exit(btop, er_no, prog_name)
-struct btophead *btop;
-int    er_no;
-char   *prog_name;
-{
-       ErrMsgTable_AndExit( er_no, btop->in_file, NULL,
-           NULL,          btop->out_file,
-           NULL,
-           prog_name
-           );
-       return;
-}
-
-
-
-
-
-static void
-put_help(prog_name)
-char   *prog_name;
-{
-       USAGE1("Usage : %s -xlfd xlfd_name\n", prog_name);
-       USAGE("\t\t[-g character_size][-p character_pattern_file_name]\n");
-       USAGE("\t\t[-style style]\n");
-       USAGE("\t\t[-start start_code] [-end end_code]\n");
-       USAGE("\t\t[-width character_width] [-height character_height]\n");
-       COMM_HELP_MSG ;
-       USAGE1("%s can extract glyphs in cpf file format in the following code area.\n", prog_name);
-       USAGE("codeset \t\tcode area\n");
-       USAGE("----------------------------------------\n");
-       DispUdcCpArea() ;
-       USAGE("If the -start and -end option is omitted, the start/end code of each extractive area is specified.\n");
-       USAGE("The xlfd name and character size may be obtained using dtlsgpf command.\n");
-       return;
-}
-
-static void
-Usage(prog_name)
-char   *prog_name;
-{
-       put_help( prog_name );
-       exit(1);
-}
-
-
-static int
-check_width( prog_name, len_str )
-char   *prog_name;
-char   *len_str;
-{
-       return( check_width_height( prog_name, len_str, 0) );
-}
-
-
-static int
-check_height( prog_name, len_str )
-char   *prog_name;
-char   *len_str;
-{
-       return( check_width_height( prog_name, len_str, 1) );
-}
-
-static int
-check_width_height( prog_name, len_str, mode )
-char   *prog_name;
-char   *len_str;
-int    mode;           /* width ... 0 , height ... 1 */
-{
-       int             ret;
-       char    *tmp;
-
-       ret = (int)strtol( len_str, &tmp, 10 ); /* <-- ret = atoi( len_str ) */
-       if ((tmp == len_str) || (ret < MIN_FONT_WIDTH) || (ret > MAX_FONT_WIDTH)) {
-               switch( mode ) {
-               case 0:
-                       USAGE2("%s : The specification of the character width is improper.\"%s\"¡¥\n",
-                           prog_name, len_str);
-                       break;
-               case 1:
-                       USAGE2("%s : The specification of the character height is improper.\"%s\"¡¥\n",
-                           prog_name, len_str);
-                       break;
-               default:
-                       break;
-               }
-               return(0);
-       }
-       return( ret );
-}
-
-
-
-
-
-
-static int
-check_code( prog_name, code_str, mode, charset, num_gr, gr )
-char   *prog_name;
-char   *code_str;
-int    mode;           /* start_code ... 0, end_code ... 1 */
-char   *charset ;
-int    num_gr ;
-FalGlyphRegion *gr ;
-{
-       int             err_flg = 0;
-       int             code_num;
-       char    *tmp;
-       FalGIInf        *gi = NULL;
-       int             num_gi ;
-       int             i, code ;
-
-       code = (int)strtol(code_str, &tmp, 16);
-       if ( tmp == code_str ) {
-           err_flg = 1;
-       }
-
-       if( COMM_SBFNT_ISSBFNT( charset ) ) {
-           code_num = code ;
-           CONVGLYPHINDEX( code_num ) ;
-       } else {
-           if( fal_code_to_glyph( locale, code, &gi, &num_gi) ) {
-               USAGE2("%s : Failed to convert code point into glyph index.\"%s\" \n", prog_name, code_str ) ;
-               err_flg = 1;
-           }
-           if( num_gi==1 ){
-               code_num = gi[0].glyph_index ;
-               err_flg = 0 ;
-           }else{
-               for( i=0; i<num_gi; i++ ) {
-                   if( !strcmp( gi[i].charset_str, char_set ) ) {
-                       code_num = gi[i].glyph_index ;
-                       err_flg = 0 ;
-                       break ;
-                   } else              err_flg = 1 ;
-               }
-           }   
-       }
-
-       XFree(gi);
-
-       if( !err_flg ) {
-           for( i=0; i<num_gr; i++ ) {
-               if( (code_num >= gr[i].start) && (code_num <= gr[i].end) )
-                   return( code_num );
-           }
-       }
-       
-       switch( mode ) {
-       case 0:
-               USAGE2("%s : The specification of the extract start code is improper.\"%s\"¡¥\n",
-                   prog_name, code_str);
-               break;
-       case 1:
-               USAGE2("%s : The specification of the extract end code is improper.\"%s\"¡¥\n",
-                   prog_name, code_str);
-               break;
-       default:
-               USAGE2("%s : The specification of the extract code is improper.\"%s\"¡¥\n",
-                   prog_name, code_str);
-       }
-       return(-1);
-}
-
-
-static int
-readBdfToMemory(head, buf, num_gr, gr, code_area)
-struct btophead *head;
-char   *buf;
-int    num_gr ;
-FalGlyphRegion *gr ;
-int    code_area ;
-{
-       int         code, mwidth, num_char, bsize, rtn;
-       char    *ptn;
-
-       num_char = 0;
-       mwidth = (head->bdf_width + 7) / 8;
-       bsize = mwidth * head->bdf_height;
-       while(1) {
-           if ((rtn = GetBdfCode(head, buf, &code)) < 0) {
-               return(rtn);    /* contain BDF_INVAL */
-           } else if (rtn == FILE_END) {
-               head->num_chars = num_char;
-               break;
-           }
-           if (
-               ( code < head->start_code) || ( code > head->end_code ) 
-               ||( !IN_CODE( head->code_category, SHIFT_ON( code ) ) )
-               ||(
-                   (head->code_category == ALL_CODE) &&
-                   !( code_area & SYSTM ) &&
-                   IsInRegion( code, num_gr, gr ) 
-               )
-           ) {
-               continue;
-           }
-
-           head->code[num_char] = code;
-           if ( ( ptn = head->ptn[num_char++] = (char *)malloc( bsize ) ) == NULL ) {
-               return(MALLOC_ERROR);
-           }
-           if ((rtn = GetBdfPtn(head, buf, ptn, mwidth, bsize)) != 0) {
-               return(rtn);
-           }
-       }
-       return(0);
-}
-
-
diff --git a/cde/programs/dtudcfonted/dtlsgpf/Imakefile b/cde/programs/dtudcfonted/dtlsgpf/Imakefile
deleted file mode 100644 (file)
index 5937b80..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/6 1996/09/09 11:19:55 drk $
-
-
-        DESTDIR = $(CDE_INSTALLATION_TOP)
-        BINDIR  = /bin
-        FONTLIST    = /config
-
-        OPT1 = -DDEFAULT_CODESET='"'3'"'
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-        OPT3 = -DSNFFONTC='"'$(SNFFONTC)'"'
-        OPT4 = -DDTUDCFONTSLISTDIR='"'$(CDE_INSTALLATION_TOP)$(FONTLIST)'"'
-
-       DEFINES     = $(OPT1) $(OPT2) $(OPT3) $(OPT4)
-
-       INCLUDES   = -I../include\
-                    -I../libfal\
-                    -I../libfal/include
-
-        DEPLIBS   = ../libfuty/liboakfuty.a ../libfal/libfal.a $(DEPXLIB)
-LOCAL_LIBRARIES   = ../libfuty/liboakfuty.a ../libfal/libfal.a $(XLIB)
-  SYS_LIBRARIES   = -lc
-
-           SRCS   = lsgpf.c
-
-           OBJS   = lsgpf.o
-
-ComplexProgramTarget(dtlsgpf)
diff --git a/cde/programs/dtudcfonted/dtlsgpf/lsgpf.c b/cde/programs/dtudcfonted/dtlsgpf/lsgpf.c
deleted file mode 100644 (file)
index a8f217d..0000000
+++ /dev/null
@@ -1,928 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: lsgpf.c /main/7 1996/11/08 02:05:57 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include       <stdio.h>
-#include       <errno.h>
-#include       <locale.h>
-#include       <string.h>
-
-#include       "FaLib.h"
-#include       "falfont.h"
-#include       "bdfgpf.h"
-#include       "udcutil.h"
-
-
-static void    dsp_info_list();
-static void    dsp_title();    
-static void    dspinfo_1line();
-static void    disp_no_fontslist();
-static void    sort_offset_list() ;
-static int     sort_fontlist() ;
-static void    dsp_error_title() ;
-static int     dsp_error_files() ;
-
-static void    put_help();
-static int     search_fontfile_name() ;
-static int     get_new_target() ;
-
-static char    *utillocale ;
-static char    *fontdir ;
-static char    *command_name ;
-
-typedef struct {
-       int             num;
-       struct {
-               int     start;
-               int     end;
-       }entry[BUFSIZE];
-}MISS_ENTRY;
-
-/* request for sort */
-#define        REQ_STYLE       (1<<1)
-#define        REQ_CHARSIZE    (1<<2)
-#define        REQ_LETTER      (1<<3)
-#define        REQ_DELEQUAL    (1<<16)
-
-/* error flag */
-#define        NO_FONT         (1<<1)
-#define        SAME_FONT       (1<<2)
-#define        REDEFINED_FONT  (1<<3)
-
-/* request flag */
-#define        A_OPT   (1<<1)
-#define        L_OPT   (1<<2)
-#define        X_OPT   (1<<3)
-#define        C_OPT   (1<<4)
-
-int
-main( argc, argv )
-int    argc;
-char   *argv[];
-{
-       FalFontDataList *lst_m; /* font information list struct */
-       FalFontData     key;    /* font reference information creation struct */
-       MISS_ENTRY      unknown_m ;     /* error */
-       int             i, j;
-       int             code_sw;        /* code set flag */
-
-       int             mask;
-       int             code_set ;
-       int             errflg ;
-       int             dsp_opt ;
-
-       /* initialize */
-       command_name = argv[0] ;
-       errflg = 0 ;
-       unknown_m.num = 0;
-       code_sw = 0;
-       dsp_opt = 0 ;
-
-       /* get locale strings */
-       if( (utillocale = (char *)getenv( "LANG" )) == NULL ){
-           utillocale = "C" ;
-       }
-
-       if( (fontdir = (char *)getenv( "DTUDCFONTS" )) == (char *)NULL ) {
-               fontdir = DTUDCFONTSLISTDIR ;
-       }
-
-       /*
-        * dtlsgpf check on which options are required.
-        */
-       for (i=1 ; i < argc ; i++) {
-
-           if (!strcmp(argv[i], "-help")) {
-               put_help(argv[0]);
-               exit(0);
-           }
-           if (*argv[i] != '-') {
-               put_help(argv[0]);
-               exit(1);
-           }
-
-           if ( !strcmp( argv[i], "-codeset" ) ) {
-               char    *cbuf ;
-               if ( (i+1) >= argc ){
-                   put_help( argv[0] );
-                   exit( 1 );
-               }
-               i++;
-               code_set = (int)strtol( argv[i], &cbuf, 10 ) ;
-               if( argv[i] == cbuf ) {
-                   put_help( argv[0] );
-                   exit( 1 );
-               }
-               code_sw = 1 ;
-           }
-
-           for (j=1;  argv[i][j] != '\0' ; j++) {
-               char    req ;   
-               req = argv[i][j] ;
-               if ( req == 'l')        dsp_opt |= L_OPT ;
-               else if ( req == 'a')   dsp_opt |= A_OPT ;
-               else if ( req == 'x')   dsp_opt |= X_OPT ;
-               else if ( req == 'C')   dsp_opt |= C_OPT ;
-               else {
-                       put_help(argv[0]);
-                       exit( 1 );
-               }
-           }
-       }
-
-       /* "-ax" -> "-a" */
-       if( dsp_opt == ( A_OPT | X_OPT ) )      dsp_opt = A_OPT ;
-
-       /*
-        * display information list of UDC code region
-        */
-       if( dsp_opt & C_OPT ){
-           fprintf(stdout ,"codeset\t\tcode area\n");
-           fprintf(stdout ,"--------------------------------------------\n");
-           if ( DispUdcCpArea( stdout ) == -1 ){
-               ErrMsgTable_FalGetFontList( argv[0], fal_utyerror, fal_utyderror );
-               exit( 1 );
-           }
-           exit( 0 );
-       }
-
-       /*
-        * get an information list of UDC fonts
-        */
-       mask = 0;
-       mask =  FAL_FONT_MASK_UNDEFINED | FAL_FONT_MASK_DEFINED ;
-       if( code_sw ) {
-               mask |= FAL_FONT_MASK_CODE_SET ;
-               key.cd_set = FALGETFALCODESET( code_set ) ;
-       }
-
-       /* get font information list */
-       if ( FalGetFontList( &key, mask, &lst_m ) == FAL_ERROR ){
-               ErrMsgTable_FalGetFontList( argv[0], fal_utyerror, fal_utyderror );
-               exit( 1 );
-       }
-
-       /* sort element of font infomation list */
-       if( sort_fontlist( lst_m ) == FAL_ERROR ) {
-               FalFreeFontList( lst_m );
-               return FAL_ERROR ;
-       }
-
-       /*
-        * dtlsgpf shows UDC informations as user's request.
-        */
-       dsp_title( stdout, dsp_opt );
-       if ( lst_m->num == 0) {
-           disp_no_fontslist( dsp_opt ) ;
-       } else {
-           dsp_info_list( argv[0], dsp_opt, lst_m, &unknown_m, &errflg );
-           if (unknown_m.num != 0) {
-               if( dsp_opt & L_OPT ) {
-                   dsp_error_title(argv[0], &errflg, dsp_opt );
-                   if( dsp_error_files( lst_m, &unknown_m ) ) {
-                       exit( 1 );
-                   }
-               }
-           }
-       }
-
-       FalFreeFontList( lst_m );
-       exit( 0 );
-}
-
-
-
-
-static void
-dsp_info_list( com, dspopt, lst, unknown_file_lst, errflg )
-char           *com;
-int            dspopt;
-FalFontDataList        *lst;
-MISS_ENTRY     *unknown_file_lst;
-int            *errflg ;
-{
-       FalFontDataList srt_lst;
-       int     i, j ;
-       int     entry, entry_end;
-       int     ret;
-       char    *filename;      /* file base's name */
-       char    fname[BUFSIZE];
-       char    tmpfname[BUFSIZE];
-       int     srt_cnt, *sort_list, cnt, mask ;
-
-       if( lst->num == 0 ){
-            return ;
-       }
-
-       srt_lst.num = lst->num ;
-       srt_lst.list = (FalFontData *)malloc( sizeof(FalFontData) * lst->num ) ;
-       if( srt_lst.list == NULL ) {
-               USAGE("dtlsgpf : malloc error.\n" ) ;
-               exit(1) ;
-       }
-
-       for (i=0, srt_cnt=0 ; i < lst->num ; i++) {
-               int     letter_cmp;
-
-               entry = entry_end = i;
-               for (j=i ;
-                   (j < lst->num) &&
-                   !strcmp(lst->list[j].style.name, lst->list[entry].style.name) &&
-                   (lst->list[j].size.h == lst->list[entry].size.h  ) ;
-                   j++)
-               {
-                   if( (lst->list[j].letter.h == 0) ||
-                       (lst->list[j].letter.w == 0) )  break ;
-                       entry_end = j;
-               }
-
-               if ( entry == entry_end ) {
-                   if ( dspopt & L_OPT || dspopt & X_OPT )
-                       dspinfo_1line( lst->list[entry], stdout,
-                                       unknown_file_lst, entry,
-                                       errflg, dspopt );       
-                   else        memmove( &(srt_lst.list[srt_cnt++]),
-                                           &(lst->list[entry]),
-                                           sizeof(FalFontData) );
-                   continue;
-               }
-
-               letter_cmp = lst->list[entry].letter.h;
-               for (j=entry ; j <= entry_end ; j++) {
-                       if (lst->list[j].letter.h != letter_cmp) {
-                               break;
-                       }
-               }
-
-               if (j > entry_end) {
-                       ret = GetDefaultFile( lst->list[entry].size.h,
-                           lst->list[entry].style.name, fname);
-                       if ( ret < 0 ) {
-                           fname[0]='\0';
-                           for ( j = entry; j <= entry_end; j++ ) {
-                               if ( dspopt & L_OPT || dspopt & X_OPT )
-                                   dspinfo_1line( lst->list[j], stdout,
-                                               unknown_file_lst, j,
-                                               errflg, dspopt );
-                               else    memmove(
-                                           &(srt_lst.list[srt_cnt++]),
-                                           &(lst->list[j]),
-                                           sizeof(FalFontData) );
-                           }
-                           i = entry_end;
-                           continue ;
-                       }
-                       for( j = entry; j <= entry_end; j++ ) {
-                           ret = search_fontfile_name(
-                                   lst->list[j], tmpfname,
-                                   unknown_file_lst, j, errflg
-                                    ) ;
-                           if( ret == -1 )             continue ;
-                           else if( ret == -2 )        exit(1) ;
-                           filename = falcom_get_base_name( tmpfname ) ;
-                           if ( !strcmp( filename, fname ) ){
-                               if ( dspopt & L_OPT || dspopt & X_OPT )
-                                   dspinfo_1line( lst->list[j], stdout,
-                                                   unknown_file_lst, j,
-                                                   errflg, dspopt );
-                               else    memmove(
-                                           &(srt_lst.list[srt_cnt++]),
-                                           &(lst->list[j]),
-                                           sizeof(FalFontData) );
-                               break;
-                           }
-                       }
-                       i = entry_end;
-                       continue;
-               }
-
-
-               ret = GetDefaultFile( 
-                               lst->list[entry].size.h, 
-                               lst->list[entry].style.name, 
-                               fname
-                       );
-               if( ret ) {
-                   switch ( ret ) {
-                       case    -1:
-                           for ( j = entry; j <= entry_end; j++ ) {
-                               if ( dspopt & L_OPT || dspopt & X_OPT )
-                                   dspinfo_1line(
-                                               lst->list[j], stdout,
-                                               unknown_file_lst, j,
-                                               errflg, dspopt );
-                               else    memmove(
-                                           &(srt_lst.list[srt_cnt++]),
-                                           &(lst->list[j]),
-                                           sizeof(FalFontData) );
-                           }
-                           break ;
-                       case    -2:
-                           unknown_file_lst->entry[ unknown_file_lst->num ].start = entry;
-                           unknown_file_lst->entry[ unknown_file_lst->num ].end   = entry_end;
-                           unknown_file_lst->num++;
-                           *errflg |= REDEFINED_FONT ;
-                           break ;
-                       case    -3:
-                           USAGE4("%s : The user defined character information file cannot be read.\"%s/%s/%s \"\n\n",
-                           com, fontdir, utillocale, UDFLIST_DEF );
-                           exit(1) ;
-                       case    -4:
-                           USAGE4("%s : The mistake is found in the description of the user defined character information file.\"%s/%s/%s \"\n\n",
-                           com, utillocale, fontdir, UDFLIST_DEF );
-                           for ( j = entry; j <= entry_end; j++ ) {
-                               if ( dspopt & L_OPT || dspopt & X_OPT )
-                                   dspinfo_1line( lst->list[j], stdout,
-                                               unknown_file_lst, j,
-                                               errflg, dspopt );
-                               else    memmove(
-                                           &(srt_lst.list[srt_cnt++]),
-                                           &(lst->list[j]),
-                                           sizeof(FalFontData) );
-                           }
-                           break ;
-                   }
-                   i = entry_end;
-                   continue;
-               }
-
-               for ( j = entry; j <= entry_end; j++ ) {
-                       ret = search_fontfile_name(
-                               lst->list[j], tmpfname,
-                               unknown_file_lst, j, errflg
-                               ) ;
-                       if( ret == -1 )         continue ;
-                       else if( ret == -2 )    exit(1) ;
-                       filename = falcom_get_base_name( tmpfname ) ;
-                       if ( !strcmp( filename, fname ) ){
-                           if ( dspopt & L_OPT || dspopt & X_OPT )
-                               dspinfo_1line( lst->list[j], stdout,
-                                           unknown_file_lst, j,
-                                           errflg, dspopt );   
-                           else        memmove(
-                                           &(srt_lst.list[srt_cnt++]),
-                                           &(lst->list[j]),
-                                           sizeof(FalFontData) );
-                           break;
-                       }
-               }
-               if ( j > entry_end ) {
-                       unknown_file_lst->entry[ unknown_file_lst->num ].start = entry;
-                       unknown_file_lst->entry[ unknown_file_lst->num ].end  = entry_end;
-                       unknown_file_lst->num++;
-                       *errflg |= REDEFINED_FONT ;
-               }
-               i = entry_end;
-       }
-
-       /*
-        * dtlsgpf displays the infomations of user defined characters. 
-        */
-       if ( !(dspopt & L_OPT) ) { /* display character size and style */
-               srt_lst.num = srt_cnt ;
-
-           if ( dspopt & A_OPT ) 
-               mask = REQ_STYLE | REQ_CHARSIZE | REQ_LETTER | REQ_DELEQUAL ; 
-           else 
-               mask = REQ_CHARSIZE | REQ_DELEQUAL ; 
-
-               sort_offset_list( &srt_lst, mask, &sort_list, &cnt ) ;
-
-               for (i=0 ; i<cnt; i++)
-                   dspinfo_1line( srt_lst.list[sort_list[i]], stdout,
-                                   unknown_file_lst, sort_list[i],
-                                   errflg, dspopt );
-               free( sort_list ) ;
-               free( srt_lst.list ) ;
-       }
-}
-
-
-
-
-static void
-dsp_error_title(com, errflg, dspopt )
-char   *com;
-int    *errflg ;
-int    dspopt ;
-{
-    USAGE("\n\n" );
-    if( dspopt & A_OPT ) {
-       if( *errflg & SAME_FONT )
-           USAGE1("%s :  There are fonts that are same character size and have same style, \ncode set and XLFD. It is not possible to select user defined character fonts uniquely.\n\n", com);
-       USAGE("Please inquire of the system manager.\n\n");
-    } else {
-       if( *errflg & NO_FONT )
-           USAGE1("\n%s : Mistake is found in the name of user defined character fonts \nfollowing character size and style.\n\n", com);
-       if( *errflg & REDEFINED_FONT )
-           USAGE3(" Please describe the following file name in the user defined character \ninformation file(%s/%s/%s).\n\n",
-           fontdir, utillocale, UDFLIST_DEF );
-    }
-}
-
-
-
-
-
-static int
-dsp_error_files( lst, unknown )
-FalFontDataList *lst;
-MISS_ENTRY     *unknown;
-{
-       int     i,j;
-       int     entry_start, entry_end;
-       char    *filename;
-       char    tmp_fname[BUFSIZE];
-       int     ret ;
-
-       if ( unknown->num == 0 ){
-               return  0;
-       }
-       for (i=0 ; i<unknown->num ; i++) {
-               entry_start = unknown->entry[i].start;
-               entry_end = unknown->entry[i].end;
-
-               USAGE1("\tcode set \t%d \n",
-                       FALCODESETTONUM( lst->list[entry_start].cd_set ) ) ;
-               USAGE1("\tcharacter_size \t%d\n",
-                       lst->list[entry_start].size.h ) ;
-               USAGE1("\tstyle \t\t%s \n", lst->list[entry_start].style.name ) ;
-               USAGE("\n" );
-               for ( j = entry_start; j <= entry_end; j++ ) {
-                       ret = search_fontfile_name( lst->list[j], tmp_fname, NULL, 0, 0 ) ;
-                       if( ret == -1 ){
-                               USAGE("\t\tThere is no font file that is required." );
-                               USAGE1("\t%s\n", lst->list[j].xlfdname );
-                               continue ;
-                       } else if( ret == -2 ){
-                           return -1 ;
-                       }
-                       filename = tmp_fname ;
-                       USAGE1("\t\t%s", filename );
-                       USAGE1("\t%s\n", lst->list[j].xlfdname );
-               }
-               USAGE("\n" );
-       }
-       USAGE("\n" );
-       return  0;
-}
-
-
-
-#define SORTOFFSETNUM {\
-       offset = size_offset_list[j] ;\
-       size_offset_list[j] = size_offset_list[i] ;\
-       size_offset_list[i] = offset ;\
-}
-
-
-static void
-sort_offset_list( flist, mask, sort_list, data_cnt )
-FalFontDataList        *flist ;
-int            mask ;
-int            **sort_list ;
-int            *data_cnt ;
-{
-       int     *size_offset_list ;
-       int     cnt, i, j ;
-       int     offset ;
-       int     exist ;
-
-       if( flist->num == 0 ){
-           return ;
-       }
-
-       if( (size_offset_list = (int *)malloc( flist->num * sizeof(int) )) == NULL )
-       {
-               USAGE("dtlsgpf: malloc error.\n" );
-               exit(1) ;
-       }
-       for( i=0 ; i < flist->num; i++ )        size_offset_list[i] = -1 ;
-
-       for( i=0, cnt=0; i < flist->num; i++ ) {
-           if( mask & REQ_DELEQUAL ) {
-               exist = REQ_DELEQUAL ;
-               for( j=0; j<cnt; j++ ) {
-                       if( size_offset_list[j] == -1 ) break ;
-                       if( (mask & REQ_CHARSIZE) &&
-                       (flist->list[size_offset_list[j]].size.h == flist->list[i].size.h) 
-                       ) {
-                               exist |= REQ_CHARSIZE ;
-                       }
-                       if( (mask & REQ_LETTER) &&
-                       (flist->list[size_offset_list[j]].letter.h == flist->list[i].letter.h)
-                       ) {
-                               exist |= REQ_LETTER ;
-                       }
-                       if( (mask & REQ_STYLE) &&
-                       !strcmp(flist->list[size_offset_list[j]].style.name, flist->list[i].style.name)
-                       ) {
-                               exist |= REQ_STYLE ;
-                       }
-                       if( exist == mask )     break ;
-                       else                    exist = REQ_DELEQUAL ;
-               }       /* size_offset_list */
-               if( exist == mask )     continue ;
-           }   /* REQ_DELEQUAL */
-           size_offset_list[cnt++] = i ;
-       }       /* flist */
-       /* sort data */
-       for( i=0; i<cnt-1; i++ ) {
-           for( j=i+1; j<cnt; j++ ) {
-               if( mask & REQ_LETTER ) {
-                   if( flist->list[size_offset_list[i]].letter.h >
-                       flist->list[size_offset_list[j]].letter.h)
-                   {
-                       SORTOFFSETNUM ;
-                   }
-               }
-               if( mask & REQ_CHARSIZE ) {
-                   if( flist->list[size_offset_list[i]].size.h >
-                       flist->list[size_offset_list[j]].size.h)
-                   {
-                       SORTOFFSETNUM ;
-                   }
-               }
-               if( mask & REQ_STYLE ) {
-                   if( strcoll(flist->list[size_offset_list[i]].style.name,
-                               flist->list[size_offset_list[j]].style.name) > 0 )
-                   {
-                       SORTOFFSETNUM ;
-                   }
-               }
-           }
-       }
-       *sort_list = size_offset_list ;
-       *data_cnt  = cnt ;
-}
-
-
-
-static void
-dsp_title( fp, dspopt )
-FILE   *fp;
-int    dspopt ;
-{
-    if( dspopt & L_OPT || dspopt & X_OPT ) {
-       fprintf(fp, "\n" ) ;
-
-       if( dspopt & X_OPT )    fprintf(fp, " code set" );
-       if( dspopt & L_OPT )    fprintf(fp, "\tfilename\t" );
-        if( (dspopt != X_OPT) && (dspopt != (L_OPT | X_OPT)) )
-           fprintf(fp, "character size\t" );
-       COMM_DSP_LETTER_T ;
-       if( dspopt & A_OPT )    fprintf(fp, "style \t" );
-       COMM_DSP_PRM ;
-       if( dspopt != X_OPT )   fprintf(fp, "\n" ) ;
-       if( dspopt & X_OPT )    fprintf(fp, "\tXLFD\n" );
-       fprintf(fp ,"-----------------------------------------------------------------------------\n");
-    }
-}
-
-
-
-
-
-static void
-dspinfo_1line( data, fp, unknown_file_lst, offset, errflg, dspopt )
-FalFontData    data;
-FILE           *fp;
-MISS_ENTRY     *unknown_file_lst;
-int            offset ;
-int            *errflg ;
-int            dspopt ;
-{
-       int     dsp_on ;
-       char    *namep;
-       char    tmp_fname[BUFSIZE];
-       int     ret ;
-
-       dsp_on = 0;
-
-       /* get font informations */
-       ret = search_fontfile_name( data, tmp_fname, unknown_file_lst, offset, errflg ) ;
-       if( ret == -1 )         return ;
-       else if( ret == -2 )    exit(1) ;
-       namep = tmp_fname ;
-
-       /* display font informations */
-       if( dspopt & X_OPT )    fprintf( fp, "%d \t", FALCODESETTONUM( data.cd_set ) );
-
-       if( dspopt & L_OPT )    fprintf( fp, "%s\t", namep );
-
-       if( (dspopt != X_OPT) &&
-           (dspopt != (L_OPT | X_OPT))
-       ) {
-           fprintf( fp, "%d", data.size.h );
-       }
-
-       if( dspopt & A_OPT ) {
-           if( data.letter.h ) {
-               if( !(dspopt & L_OPT) )
-                   fprintf( fp, ".%d", data.letter.h );
-               else
-                   fprintf( fp, "\t%4d", data.letter.h );
-           } 
-           fprintf( fp, "\t" );
-           fprintf( fp, "%s", data.style.name );
-       }
-
-       if( dspopt & L_OPT ) {
-           fprintf( fp, "\t" );
-           if( data.prm & FAL_FONT_DISPLAY ) {
-               fprintf( fp, "display");
-               dsp_on = 1;
-           }
-           if( data.prm & FAL_FONT_PRINTER ) {
-               if( dsp_on ) {
-                   fprintf( fp, " & ");
-               }
-               fprintf( fp, "printer");
-           }
-       }
-       if( dspopt != X_OPT ){
-           fprintf( fp, "\n");
-           if( dspopt & X_OPT )        fprintf( fp, "\t" );
-       }
-       if( dspopt & X_OPT )    fprintf( fp, "%s\n", data.xlfdname );
-       if( dspopt != X_OPT ){
-           if( dspopt & X_OPT )        fprintf( fp, "\n" );
-       }
-}
-
-
-
-
-
-static void
-disp_no_fontslist( dspopt )
-int    dspopt ;
-{
-    fprintf( stdout, "\nThere are no fonts that are used for user defined character.\n" ) ;
-}
-
-
-static void
-put_help( prog_name )
-char   *prog_name;
-{
-       USAGE1("Usage : %s [-lax][-la][-lx][-C][-codeset number][-help]\n", prog_name);
-       USAGE("\t-l       :  display of file name and character size\n");
-       USAGE("\t-a       :  display of style(FAMILY_NAME) information\n");
-       USAGE("\t-x       :  display of XLFD information\n");
-       USAGE("\t-C       :  display of code area informations\n");
-       USAGE("\t-codeset :  specification of the codeset\n");
-       USAGE("\t-help    :  display of of the command parameter informations\n");
-
-       USAGE("        (If the option is not specified, only the character size are displayed.)\n");
-}
-
-
-
-static int
-search_fontfile_name( data, fname, unknown_file_lst, offset, errflg )
-FalFontData    data ;
-char           *fname ;
-MISS_ENTRY     *unknown_file_lst;
-int            offset ;
-int            *errflg ;
-{
-       FalFontID       fid ;
-       FalFontDataList *flist ;
-       int             mask ;
-       char            *tmp_fname ;
-
-       mask = 
-               FAL_FONT_MASK_UNDEFINED | FAL_FONT_MASK_DEFINED |
-               FAL_FONT_MASK_XLFDNAME | 
-               FAL_FONT_MASK_SIZE_H |
-               FAL_FONT_MASK_STYLE_NAME | FAL_FONT_MASK_CODE_SET
-               ;
-
-       if( data.size.w >= 0 )  mask |= FAL_FONT_MASK_SIZE_W ;
-       if( data.letter.w )     mask |= FAL_FONT_MASK_LETTER_W ;
-       if( data.letter.h )     mask |= FAL_FONT_MASK_LETTER_H ;
-       if( data.letter.x )     mask |= FAL_FONT_MASK_LETTER_X ;
-       if( data.letter.y )     mask |= FAL_FONT_MASK_LETTER_Y ;
-
-       if( data.style.def )    mask |= FAL_FONT_MASK_STYLE_DEF ;
-       if( data.shape.name )   mask |= FAL_FONT_MASK_SHAPE_NAME ;
-       if( data.shape.def )    mask |= FAL_FONT_MASK_SHAPE_DEF ;
-       COMM_SBCHR_SETFONTDATA( data, mask ) ;
-       if( data.prm )          mask |= FAL_FONT_MASK_PERMISSION ;
-
-       fid = FalOpenSysFont( &data, mask, &flist ) ;
-       if( fid == 0 ) {
-               memset( fname, '\0', sizeof(fname) ) ;
-               if( flist ){
-                   FalFreeFontList( flist ) ;
-                   if( unknown_file_lst ) {
-                       unknown_file_lst->entry[ unknown_file_lst->num ].start = offset ;
-                       unknown_file_lst->entry[ unknown_file_lst->num ].end  = offset ;
-                       unknown_file_lst->num++;
-                       *errflg |= SAME_FONT ;
-                   }
-                   return(-1);
-               } else {
-                 switch( fal_utyerror ) {
-                  case _FAL_OPEN_ER :
-                  case _FAL_READ_ER :
-                  case _FAL_STAT_ER :
-                       switch( fal_utyderror ) {
-                       case EACCES :
-                       case ENOENT :
-                           if( unknown_file_lst ) {
-                               unknown_file_lst->entry[ unknown_file_lst->num ].start = offset ;
-                               unknown_file_lst->entry[ unknown_file_lst->num ].end  = offset ;
-                               unknown_file_lst->num++;
-                               *errflg |= NO_FONT ;
-                           }
-                           return(-1) ;
-                       default :
-                           USAGE2("System call error occurred. fal_utyerror = %d fal_utyderror = %d\n", fal_utyerror, fal_utyderror ) ;
-                           return(-2) ;
-                       }
-                  case _FAL_FONT_ER :
-                       if( unknown_file_lst ) {
-                           unknown_file_lst->entry[ unknown_file_lst->num ].start = offset ;
-                           unknown_file_lst->entry[ unknown_file_lst->num ].end  = offset ;
-                           unknown_file_lst->num++;
-                           *errflg |= NO_FONT ;
-                       }
-                       return(-1) ;
-                  case _FAL_MALOC_ER :
-                       USAGE("malloc error occurred.\n" ) ;
-                       return(-2) ;
-                  default :
-                       USAGE1("%s : cannot get font information list.\n", command_name ) ;
-                       return(-2) ;
-                 }
-               }
-       } 
-       if( FalFontIDToFileName( fid, &tmp_fname ) == FAL_ERROR ) {
-               USAGE1("%s : cannot get file name.\n", command_name ) ;
-               FalCloseFont( fid ) ;
-               return(-2) ;
-       }
-       strcpy( fname, tmp_fname ) ;
-       FalFree( tmp_fname ) ;
-       FalCloseFont( fid ) ;
-       return(0) ;
-}
-
-
-
-static int
-sort_fontlist( lst )
-FalFontDataList *lst;
-{
-       int             i,j;
-       FalFontDataList srt;
-       FalFontData             target;
-       int                     target_entry;
-
-       if( lst->num == 0 ){
-            return(0) ;
-       }
-
-       srt.num  = lst->num;
-
-       if (( srt.list = (FalFontData *)malloc(sizeof(FalFontData) * srt.num)) == NULL) {
-               return  FAL_ERROR;
-       }
-       memmove (srt.list, lst->list, sizeof(FalFontData) * srt.num);
-       /* start to sort */
-       for ( i=0 ; i < srt.num -1 ; i++ ) {
-
-               memmove( &target, &(srt.list[i]), sizeof(FalFontData));
-               target_entry = i;
-
-               for ( j=i+1 ; j < srt.num ; j++ ) {
-                       if ( get_new_target( &target, &(srt.list[j]) ) ) {
-                               memmove( &target, &(srt.list[j]), sizeof(FalFontData));
-                               target_entry = j;
-                       }
-               }
-               if (target_entry != i) {
-                       memmove( &target, &(srt.list[target_entry]), 
-                           sizeof(FalFontData)
-                           );
-                       memmove( &(srt.list[i+1]), &(srt.list[i]), 
-                           sizeof(FalFontData)*(target_entry -i)
-                           );
-                       memmove( &(srt.list[i]), &target, 
-                           sizeof(FalFontData)
-                           );
-               }
-       }
-       free(lst->list);
-       lst->list = srt.list;
-       return(0);
-}
-
-
-/* sort flag                      */
-/* return data ¡§   sort    ... 1 */
-/*                  no sort ... 0 */
-
-static int
-get_new_target( target, choose )
-FalFontData    *target;
-FalFontData    *choose;
-{
-       FalFontData     diff;
-       DEF_STR_CHK ;
-       DEF_STR_SET ;
-
-       diff.style.def = choose->style.def - target->style.def;
-       str_chk.style =  strcmp( choose->style.name, target->style.name ) ;
-
-       NEW_TARGET_SET( diff, choose, target, str_chk ) ; 
-
-       diff.shape.def = choose->shape.def - target->shape.def;
-       if( (choose->shape.name != NULL) && (target->shape.name != NULL) ) {
-           str_chk.shape =  strcmp( choose->shape.name, target->shape.name ) ;
-       }
-
-       diff.cd_set   = choose->cd_set   - target->cd_set;
-       diff.size.h   = choose->size.h   - target->size.h;
-       diff.size.w   = choose->size.w   - target->size.w;
-       diff.letter.h = choose->letter.h - target->letter.h;
-       diff.letter.w = choose->letter.w - target->letter.w;
-
-       /* codeset */
-       if ( diff.cd_set < 0 )          return  1; 
-       if ( diff.cd_set > 0 )          return  0; 
-
-       /* character size height */
-       if ( diff.size.h < 0 )          return  1; 
-       if ( diff.size.h > 0 )          return  0; 
-
-       /* letter size height */
-       if ( diff.letter.h < 0 )        return  1; 
-       if ( diff.letter.h > 0 )        return  0; 
-
-       /* character size wide */
-       if ( diff.size.w < 0 )          return  1; 
-       if ( diff.size.w > 0 )          return  0; 
-
-       /* letter size wide */
-       if ( diff.letter.w < 0 )        return  1; 
-       if ( diff.letter.w > 0 )        return  0; 
-
-       /* style */
-       if ( target->style.def == FAL_FONT_UNKNOWN ) {
-               if ( choose->style.def > 0 )    return  1; 
-               /* style is FAL_FONT_UNKNOWN both "target" and "choose" */
-               if ( str_chk.style < 0 )        return  1; 
-               if ( str_chk.style > 0)         return  0; 
-       } else if ( choose->style.def == FAL_FONT_UNKNOWN ) {
-               return  0;
-       }
-       /* target->style.def and choose->style.def is not FAL_FONT_UNKNOWN */
-       if ( diff.style.def < 0 )       return  1; 
-       if ( diff.style.def > 0 )       return  0; 
-
-       NEW_TARGET_CHK( diff, choose, target, str_chk ) ;
-
-       /* character style */
-       if ( target->shape.def == FAL_FONT_UNKNOWN ) {  
-               if ( choose->shape.def > 0 )    return  1; 
-               if ( str_chk.shape < 0 )        return  1; 
-               if ( str_chk.shape > 0 )        return  0; 
-       } else if (choose->shape.def == FAL_FONT_UNKNOWN ) {
-               return  0;
-       }
-       if ( diff.shape.def < 0 )       return  1; 
-       if ( diff.shape.def > 0 )       return  0; 
-
-       return  0;
-}
-
diff --git a/cde/programs/dtudcfonted/dtudcfonted.1 b/cde/programs/dtudcfonted/dtudcfonted.1
deleted file mode 100644 (file)
index 42bf576..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-.\" $XConsortium: dtudcfonted.1 /main/2 1996/10/29 15:41:16 drk $
-.\"---
-.\"    (c) Copyright 1996 FUJITSU Ltd.
-.\"---
-.TH dtudcfonted 1X "20 Feb. 1996""
-.BH "20 Feb. 1996""
-.SH NAME
-dtudcfonted - the User Defined Characters (UDCs) Font Editor
-.SH SYNOPSIS
-dtudcfonted [options]
-.SH DESCRIPTION
-The UDCs Editor provides the facilities that enable the user to edit
-User Defined Characters font.
-.P
-The UDCs Editor uses lines and geometric shape drawing tools in order
-to create new User Defined Character or modify existing ones.
-It support PCF (Portable Compoled Formet) and SNF (Server Natural Format)
-formats.
-.sp .5
-.SS Key Supported Tasks
-.RS
-.P
-- Modify size of window.
-.P
-- Modify location of window.
-.P
-- Iconify window.
-.P
-- Edit a User Defined Character or existing icon.
-.P
-- Save the current font.
-.P
-- Undo the last operation.
-.P
-- Cut, copy, and paste areas within the UDCs Editor editing area.
-.P
-- Rotate selected area.
-.P
-- Copy User Defined Character.
-.RE
-.SH OPTIONS
-The following options are available from the command line:
-.sp 1.5
-.BI \-pane_size " pane_size"
-.sp .5
-This option takes a size of UDCs Editor editing area.
-.sp 1.5
-.BI \-codepoint
-.sp .5
-This option specifies code format.
-If you do not set this optiton, UDCs editor uses Glyph Index code.
-If you do set this optiton, UDCs editor uses Code point code.
-.sp 1.5
-.SH RETURN VALUE
- Exit values are:
-.IP "\f30\fP" .5i
-Successful completion.
-.IP "\f3>0\fP" .5i
-Error condition occurred.
-.sp 1.5
-.SH EXAMPLES
-.IP "dtudcfonted" .5i
-Starts the UDCs Editor.
-.sp 1.5
-.IP NOTE:   .5i
-UDCs Editor uses with root user.
-.sp 1.5
-.SH FILES
-Files used by this component.
-.IP "/.../dt/app-defaults/C/Dtudcfonted       App-defaults file. " .5i
-.IP "/.../dt/app-defaults/ja_JP/Dtudcfonted   App-defaults file. " .5i
diff --git a/cde/programs/dtudcfonted/dtudcfonted.msg b/cde/programs/dtudcfonted/dtudcfonted.msg
deleted file mode 100644 (file)
index 4d810bb..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-$ $XConsortium: dtudcfonted.msg
-$ *************************************<+>*************************************
-$ *****************************************************************************
-$ **
-$ **  File:        dtudcfonted.msg
-$ **
-$ **  Project:     Fujitsu DT UDC Font Editor
-$ **
-$ **  Description:
-$ **  -----------
-$ **  This file is the source for the message catalog for dtudcfonted
-$ **
-$ **
-$ *****************************************************************************
-$ **
-$ **     (c) Copyright 1996 Fujitsu Ltd.
-$ **
-$set 2
-$ *****************************************************************************
-$ ** _DtMessage set for ufont.c
-$ *****************************************************************************
-
-$ This is footer message when registration of the character.
-2 Registration processing inside.
-
-$ Message4-8 are error messages when registration of the character.
-4 Failed in the registration of the character.
-6 Illegal code.
-8 Because the memory allocation cannot be done, it is not possible to add.
-
-$ Message10-16 are error messages when copying of the character.
-10 There is no character of the specified code.
-12 The mistake is found in the specified copy origin code.
-14 The mistake is found in the specified copy target code.
-16 There is no character in the specified area.
-
-$ This is footer message.
-18 Please wait for a while.
-
-$ This is error message when copying of the character.
-20 No copy origin code file is specified.
-
-$ Message22-24 are error message of user defined character
-22 Informations of user defined character cannot collect.\nThere is no font specified.
-24 Informations of user defined character cannot collect.\nThere are plural fonts specified.
-
-$ UDC is User Defined Character.
-26 The specified font do not have any UDCs areas.
-
-28 There are no memories any more.
-30 The information of UDCs area is illegal.
-32 The font file cannot read.\nPattern area was broken.
-
-$ Dtudcfonted is name of this application.
-34 Dtudcfonted cannot edit proportional character font.
-
-36 There are unsaved edits.\nDo you want to save them before opening?
-38 There are unsaved edits.\nDo you want to save them before exiting?
-40 When the copy processing is done, the glyph\nimage within the following ranges is changed.\nDo you want to do the copy processing?\n\n
-42 No write permission for this font. You should change the file access mode before saving.\n
-
-$ There are user-visible labels in font-open dialog.
-100 Select Items
-102 -        CodeSet:
-104 -          Style:
-106 -          Width:
-108 -         Height:
-110 Open
-112 Quit
-
-$ There are user-visible labels in menubar.
-114 Font
-116 Edit
-118 Character
-120 Information
-
-$ There are user-visible labels in File menu.
-122 Open...
-124 Save
-126 Exit
-
-$ There are user-visible labels in Edit menu.
-$ Message135 is copy of cut&copy
-128 Clear
-130 Set
-132 Reverse
-134 Cut
-135 Copy
-136 Paste
-138 Rotate
-140 Vertical Roll
-142 Horizontal Roll
-144 Undo
-
-$ There are user-visible labels in Character menu.
-$ Message148 is copy of character
-146 Add/Delete...
-148 Copy...
-
-$ There are user-visible labels in Information menu.
-150 XLFD name...
-152 Code Area...
-
-$ There are user-visible labels in add/delete dialog.
-154 Add
-156 Delete
-158 Cancel
-
-$ There are user-visible labels in copy dialog.
-$ Message166 is label of execute button
-160 Code(hex):
-162 Copy origin code(hex):
-164 Copy target code(hex):
-166 Copy
-168 Overlay
-170 OK
-
-$ There are user-visible labels in unsaved edits.
-172 Save
-174 Do not Save
-176 Save and Exit
-178 Do not Save and Exit
-
-$ There are user-visible labels in delete notice dialog.
-$ This format is `Message180 (?? Message182)' and `Message184 (?? Message186)'.
-$ These Message180 and Message182 are used in only one character.
-$ These Message184 and Message186 are used in plural characters.
-180 The following character will be deleted.
-182 character
-184 The following characters will be deleted.
-186 characters
-188 Register completed
-190 Code :
-192 Code range :
-
-$ There are footer message label.
-194 Message :
-
-$ There are user-visible labels in code dialog.
-196 code...
-198 Page up
-200 Page down
-202 Apply
-
-$ There are title.
-204 dtudcfonted - Question
-206 dtudcfonted - Warning
-208 dtudcfonted - Error
-210 dtudcfonted - Copy
-212 dtudcfonted - Open
-214 dtudcfonted - Add/Delete
-216 dtudcfonted - XLFD
-218 dtudcfonted - CodeArea
-
-$ There are information message.
-230 File name
-232 XLFD name
-234 Code area
-
-$ There are error message of libfal.
-300 Fatal error occurred.
-301 Cannot open the font file.
-302 Cannot read the font file.
-303 There is no more memory.
-304 Fatal error occurred.
-305 The specified font file does not exist.
-306 This font is not a pcf or snf font.
-307 Cannot open fonts.list file.
-308 The format of fonts.list file is illegal.
-309 The descriptions of the fonts.list file are incorrect.
-310 The format of fonts.list file is illegal.
-311 Cannot open fonts.dir file.
-312 Cannot read fonts.dir file.
-313 Cannot read font properties.
-314 Cannot get FONT property.
-315 Cannot get FAMILY_NAME property.
-316 This font file is already opened by other application.
-317 Cannot lock font file.
-318 Cannot unlock font file.
-319 Cannot get lock information from the font file.
-320 Cannot find the specified font file.
-321 Cannot read NLS database.
-322 Cannot get charset names from NLS database.
-323 Charset name not defined in NLS database.
-324 The specified font has not been opened.
-325 Fatal error occurred.
diff --git a/cde/programs/dtudcfonted/fssxeg.h b/cde/programs/dtudcfonted/fssxeg.h
deleted file mode 100644 (file)
index e200dfa..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* fssxeg.h 1.5 - Fujitsu source for CDEnext    96/07/18 13:19:30      */
-/* $XConsortium: fssxeg.h /main/4 1996/07/19 20:32:54 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-
-#include "udccom.h"    /* 1995.10.09 */
-#include "FaLib.h"
-
-typedef                int             INT;
-typedef                short int       SHORT;
-typedef                long int        LONG;
-typedef                char            CHAR;
-typedef                unsigned int    UINT;
-typedef                unsigned short  USHORT;
-typedef                unsigned char   UCHAR;
-
-#define        ON                      1
-#define        OFF                     0
-
-#define        MAXPTNSIZE      128     
-#define        MAXPTNBYTE      MAXPTNSIZE*((MAXPTNSIZE+7)/8)
-                               
-
-#define ERROR_VAL      fal_utyerror
-#define EXISTS_FLAG    fal_utyexists
-
-#define        EDPANE_SIZE     400     
-#define        EDLIST_MAX      30      
diff --git a/cde/programs/dtudcfonted/include/FaLib.h b/cde/programs/dtudcfonted/include/FaLib.h
deleted file mode 100644 (file)
index 40aed4c..0000000
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: FaLib.h /main/5 1996/06/25 20:08:31 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#ifndef _FALIB_H
-#define _FALIB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define FAL_ERROR              -1
-
-extern int fal_utyerror;       /* library error information */
-extern int fal_utyderror;      /* library error information */
-extern int fal_utyexists;      /* existence's flag of font pattern */
-
-extern unsigned long fal_utyerrno ;    /* library error information */
-extern char    fal_err_file[] ;
-
-/*
- *
- * structure of the font information
- *
- */
-
-/*
- * the equipment of output permission
- */
-#define FAL_FONT_DISPLAY       1
-#define FAL_FONT_PRINTER       2
-
-
-#define FAL_FONT_GLYPH_INDEX   -1
-/*
- * codeset
- */
-#define FAL_FONT_CS0           1
-#define FAL_FONT_CS1           2
-#define FAL_FONT_CS2           3
-#define FAL_FONT_CS3           4
-
-#define FAL_FONT_CS4           5
-#define FAL_FONT_CS5           6
-#define FAL_FONT_CS6           7
-#define FAL_FONT_CS7           8
-#define FAL_FONT_CS8           9
-
-/*
- * font search mask
- */
-#define        FAL_FONT_MASK_XLFDNAME          (1L<<1)
-#define        FAL_FONT_MASK_SIZE_W            (1L<<2)
-#define        FAL_FONT_MASK_SIZE_H            (1L<<3)
-#define        FAL_FONT_MASK_LETTER_W          (1L<<4)
-#define        FAL_FONT_MASK_LETTER_H          (1L<<5)
-#define        FAL_FONT_MASK_LETTER_X          (1L<<6)
-#define        FAL_FONT_MASK_LETTER_Y          (1L<<7)
-#define        FAL_FONT_MASK_STYLE_DEF         (1L<<8)
-#define        FAL_FONT_MASK_STYLE_NAME        (1L<<9)
-#define        FAL_FONT_MASK_SHAPE_DEF         (1L<<10)
-#define        FAL_FONT_MASK_SHAPE_NAME        (1L<<11)
-
-
-#define        FAL_FONT_MASK_CODE_SET          (1L<<14)
-#define        FAL_FONT_MASK_PERMISSION        (1L<<15)
-#define        FAL_FONT_MASK_DEL_EQUALDATA     (1L<<16)
-#define        FAL_FONT_MASK_CHECK_ALL         0x1FFFF
-
-#define        FAL_FONT_MASK_GLYPH_INDEX       (1L<<17)
-#define        FAL_FONT_MASK_UPDATE            (1L<<18)
-#define        FAL_FONT_MASK_DEFINED           (1L<<19)
-#define        FAL_FONT_MASK_UNDEFINED         (1L<<20)
-
-
-/*
- * undefined the character style,shape
- */
-#define        FAL_FONT_UNKNOWN        0
-
-/*
- * definition's data of character style
- */
-#define        FAL_FONT_MINCHO                 1
-#define        FAL_FONT_STR_MINCHO             "mincho"
-#define        FAL_FONT_GOTHIC                 2
-#define        FAL_FONT_STR_GOTHIC             "gothic"
-#define        FAL_FONT_MARU_GOTHIC            3
-#define        FAL_FONT_STR_MARU_GOTHIC        "maru_gothic"
-#define        FAL_FONT_TEXTBOOK               4
-#define        FAL_FONT_STR_TEXTBOOK           "textbook"
-#define        FAL_FONT_BRASH_GYOU             5
-#define        FAL_FONT_STR_BRASH_GYOU         "brash_gyou"
-#define        FAL_FONT_BRASH_KAI              6
-#define        FAL_FONT_STR_BRASH_KAI          "brash_kai"
-#define        FAL_FONT_HANDWRITING            7
-#define        FAL_FONT_STR_HANDWRITING        "handwriting"
-
-/*
- * definition's data of character shape
- */
-#define        FAL_FONT_ZENKAKU                1
-#define        FAL_FONT_STR_ZENKAKU            "zenkaku"
-#define        FAL_FONT_HANKAKU                2
-#define        FAL_FONT_STR_HANKAKU            "hankaku"
-#define        FAL_FONT_QUARTER                3
-#define        FAL_FONT_STR_QUARTER            "1/4kaku"
-
-/*
- *     structures for font informations
- */
-typedef struct {
-       int     width;          /* width */
-       int     height;         /* height */
-       int     top;            /* the head code */
-       int     bottom;         /* the final code */
-} FalFontinfo ;
-
-typedef struct {
-       int     num;
-       char    **path;
-} FalFontPath;
-
-typedef struct {
-       int     def;            /* definition data */
-       char    *name;          /* the information of the character line */
-}FalFontDB;
-
-
-/*
- * structure of the font information
- */
-typedef struct {
-       char    *xlfdname;      /* xlfd name */
-       struct {
-               int     w;      /* the width of the character size */
-               int     h;      /* the height of the character size */
-       }size;
-       struct {
-               int     w;      /* the width of the letter size */
-               int     h;      /* the height of the letter size */
-               int     x;      /* position x of the letter size */
-               int     y;      /* position y of the letter size */
-       }letter;
-       FalFontDB       style;  /* character style */
-       FalFontDB       shape;  /* character shape */
-       FalFontDB       reserve ; /* reserve  */
-       int     cd_set;         /* codeset */
-       int     prm;            /* the equipment of output permission */
-}FalFontData;
-
-typedef struct {
-       int     num;            /* the number of font data*/
-       FalFontData     *list;  /* the pointer to the array of 
-                                       FalFontData structure */
-}FalFontDataList;
-
-/*
- *     UDC infomations
- */
-typedef struct _FalCodeRegion {
-       int     start ;         /* first code */
-       int     end ;           /* last code */
-} FalCodeRegion ;
-
-typedef struct _FalGlyphRegion {
-       int     start ;         /* first glyph index */
-       int     end ;           /* last glyph index */
-} FalGlyphRegion ;
-
-typedef struct _FalGIInf {
-       char    *charset_str;   /* charcter set */
-       int     glyph_index;    /* glyph index */
-} FalGIInf;
-
-/*
- * structure of the font identifier
- */
-#include <X11/Xos.h>
-#include <X11/Xmd.h>
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include <stdlib.h>
-#include <dirent.h>
-
-#ifdef Bool
-#undef Bool
-#endif
-
-#include  "snfstruct.h"
-#include  "fontstruct.h"
-#include  "pcf.h"
-
-struct pcf_inf {
-       FontInfoRec     info;
-       xCharInfo       org_bounds;
-       PCFTablePtr     tables;
-       int     ntables;
-       CARD32  bmp_fmt;        /* bitOrder ,byteOrder, glyph, scan */
-       int     nbitmaps;
-       CARD32  *offsets;
-       int     sizebitmaps;
-       char    *bitmaps;
-       CARD32  enc_fmt;
-       CARD16  *encodingOffsets;
-};
-
-typedef struct _Oak_Finf {
-    int        ismmap;         /* used mmap()? */
-    int        fsize;          /* file size */
-    int        fd;             /* file descripter */
-    int        isFef;
-    char       *buf;           /* font file allocated on memory */
-    char       *fname;         /* name of font file */
-/* added by Rudie */
-    int        isPcf;  
-    struct     pcf_inf pcfinf;
-/* added by Rudie */
-    FontInfoPtr          pFinf;
-    CharInfoPtr   pCinf;
-    unsigned char *pGlyphs;
-    unsigned int  width;
-    unsigned int  height;
-    unsigned int  start;
-    unsigned int  end;
-    int                  sptnBufL;
-    char          *sptnBuf;
-    int           dptnBufL;
-    char          *dptnBuf;
-    int           dbufL;
-    char          *dbuf;
-} Oak_FontInf;
-
-typedef Oak_FontInf * FalFontID;       /* font distinction */
-
-/*
- *     function prototypes
- */
-extern FalFontID       FalOpenSysFont(
-#if NeedFunctionPrototypes
-       FalFontData*            /* open_font_data */,
-       int                     /* font_data_mask */,
-       FalFontDataList**       /* missing_font_list_return */
-#endif
-) ;
-
-extern int     FalGetFontList(
-#if NeedFunctionPrototypes
-       FalFontData*            /* key_data */,
-       int                     /* mask */,
-       FalFontDataList**       /* list_ret */
-#endif
-) ;
-
-extern int     FalFreeFontList(
-#if NeedFunctionPrototypes
-       FalFontDataList*        /* list */
-#endif
-) ;
-
-extern char    *
-FalReadFont(
-#if NeedFunctionPrototypes
-       FalFontID       /* fid */ ,
-       int             /* code */ ,
-       int             /* width */ ,
-       int             /* height */
-#endif
-) ;
-
-extern int     FalQueryFont(
-#if NeedFunctionPrototypes
-       FalFontID       /* fid */ ,
-       FalFontinfo*    /* fontinfo */
-#endif
-) ;
-
-extern int     FalFontOfFontID(
-#if NeedFunctionPrototypes
-       FalFontID       /* fid */,
-       FalFontData*    /* fontdata */
-#endif
-) ;
-
-extern int     FalCloseFont(
-#if NeedFunctionPrototypes
-       FalFontID       /* fid */
-#endif
-) ;
-
-extern int     FalFontIDToFileName(
-#if NeedFunctionPrototypes
-       FalFontID       /* fid */ ,
-       char**          /* file_name */ 
-#endif
-) ;
-
-extern int     FalFree(
-#if NeedFunctionPrototypes
-       void*   /* list */ 
-#endif
-) ;
-
-extern int     FalGetUDCCPArea(
-#if NeedFunctionPrototypes
-       char*           /* locale */ ,
-       int             /* code_set */ ,
-       char*           /* charset_str */ ,
-       FalCodeRegion** /* cr */ ,
-       int*            /* num_cr */
-#endif
-) ;
-
-extern int     FalGetUDCGIArea(
-#if NeedFunctionPrototypes
-       char*           /* locale */ ,
-       int             /* codeset */ ,
-       char*           /* charset_str */ ,
-       FalGlyphRegion**        /* gr */ ,
-       int*            /* num_gr */
-#endif
-) ;
-
-extern FalFontID       FalOpenFont() ;
-
-/*
- * Code set
- */
-#define        FALGETFALCODESET( cd_set )      ( ((cd_set)==-1) ? FAL_FONT_GLYPH_INDEX : (cd_set)+1 )
-
-#define        FALCODESETTONUM( cd_set ) ( ((cd_set)==FAL_FONT_GLYPH_INDEX) ? -1 : (cd_set)-1 )
-
-/*
- * fal_utyerrno
- */
-#define        FAL_FUNCNUM_GFLST       0x0
-#define        FAL_FUNCNUM_SRCHFNM     0x0
-#define        FAL_FUNCNUM_OPNFNT      0x0
-#define        FAL_FUNCNUM_FRFLST      0x0
-#define        FAL_FUNCNUM_RDFNT       0x0
-#define        FAL_FUNCNUM_QRY         0x0
-#define        FAL_FUNCNUM_FID         0x0
-#define        FAL_FUNCNUM_IDTOFNM     0x0
-#define        FAL_FUNCNUM_CLSFNT      0x0
-#define        FAL_FUNCNUM_CPA         0x0
-#define        FAL_FUNCNUM_GIA         0x0
-#define        FAL_FUNCNUM_FREE        0x0
-
-#define        FAL_ERR_NON             0x00
-
-#define        FAL_ERR_FNT_OPN         0x01
-#define        FAL_ERR_FNT_RD          0x02
-#define        FAL_ERR_MALLOC          0x03
-#define        FAL_ERR_PARM            0x04
-#define        FAL_ERR_STAT            0x05
-#define        FAL_ERR_FONT            0x06
-#define        FAL_ERR_FDATA_OPN       0x07
-#define        FAL_ERR_FDATA_RD        0x08
-#define        FAL_ERR_FDATA_DSC       0x09
-#define        FAL_ERR_FPATH           0x0a
-
-#define        FAL_ERR_FNTDIR_OPN      0x0b
-#define        FAL_ERR_FNTDIR_RD       0x0c
-#define        FAL_ERR_PROP_RD         0x0d
-#define        FAL_ERR_PROP_FONT       0x0e
-#define        FAL_ERR_PROP_FNAME      0x0f
-#define FAL_ERR_LCKD           0x10
-#define FAL_ERR_FILELCK                0x11
-#define FAL_ERR_FILEUNLCK      0x12
-#define FAL_ERR_FILEGETLCK     0x13
-#define FAL_ERR_NOFONT         0x14
-
-#define        FAL_ERR_XLC_CRTDB       0x15
-#define        FAL_ERR_XLC_GETCHARST   0x16
-#define        FAL_ERR_XLC_NOCHARST    0x17
-
-#define        FAL_ERR_FID_RD          0x18
-#define        FAL_ERR_FATAL           0x19
-
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _FALIB_H */
-
diff --git a/cde/programs/dtudcfonted/include/bdfgpf.h b/cde/programs/dtudcfonted/include/bdfgpf.h
deleted file mode 100644 (file)
index 4f0c005..0000000
+++ /dev/null
@@ -1,617 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: bdfgpf.h /main/7 1996/06/25 20:08:09 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#include "udccom.h"
-
-struct btophead {
-    char    *in_file;
-    char    *out_file;
-    char    *text_file;
-    FILE    *input;
-    FILE    *output;
-    int            num_chars;
-    int     p_width;
-    int     p_height;
-    int            bdf_width;
-    int            bdf_height;
-
-       int     bdf_x;
-       int     bdf_y;
-    float   bdf_point;
-    int     bdf_xdpi;
-    int     *code;
-    char    **ptn;
-    int            zoomf;
-
-       int     code_category;
-    int            start_code;
-    int            end_code;
-};
-
-struct ptobhead {
-    char    *in_file;
-    char    *out_file;
-    char    *bdf_file;
-    char    *snf_file;
-    FILE    *input;
-    FILE    *output;
-    int     num_chars;
-    int     p_width;   
-    int     p_height;
-    int     bdf_width;
-    int     bdf_height;
-
-       int     bdf_x;
-       int     bdf_y;
-    float   bdf_point;
-    int     bdf_xdpi;
-
-       int     reserve ;
-    int     *code;
-    char    **ptn;
-    int     zoomf;
-
-       int     code_category;
-    int     start_code;
-    int     end_code;
-               
-};
-
-#define        MIN_CODE        0x0000
-#define        MAX_CODE        0xFFFF
-
-#define        ALL_CODE        0
-
-extern char *oakgtobdf;        
-extern char *bdftosnf;
-extern char *bdftopcf;
-
-
-
-#define TAB_CD         0x09
-#define USE_ORG_SIZE    -1
-#define MAX_FONT_WIDTH  999
-#define MIN_FONT_WIDTH  2
-#define MAX_FONT_HEIGHT 999
-#define MIN_FONT_HEIGHT 2
-
-#ifdef BUFSIZE
-#undef BUFSIZE
-#endif /* BUFSIZE */
-#define BUFSIZE        1024
-
-/* KeyWord for BDF file */
-
-#define STARTFONT              "STARTFONT "
-#define STARTFONTsz            10      
-#define FONTBOUNDINGBOX                "FONTBOUNDINGBOX "
-#define FONTBOUNDINGBOXsz      16      
-#define SIZE                   "SIZE "
-#define SIZEsz                 5       
-#define CHARS                  "CHARS "
-#define CHARSsz                        6       
-#define STARTCHAR              "STARTCHAR "
-#define STARTCHARsz            10
-#define ENCODING               "ENCODING "
-#define ENCODINGsz             9
-#define BITMAP                 "BITMAP"
-#define BITMAPsz               6
-#define ENDCHAR                        "ENDCHAR"
-#define ENDCHARsz              7               
-#define ENDFONT                        "ENDFONT"
-#define ENDFONTsz              7       
-
-#define CHARSET_REGISTRY       "CHARSET_REGISTRY "
-#define CHARSET_REGISTRYsz     17
-
-
-/* KeyWord for GPF file */
-
-#define NUMFONTS               "numfonts:"
-#define NUMFONTSsz             9
-#define WIDTH                  "width:"
-#define WIDTHsz                        6
-#define HEIGHT                 "height:"
-#define HEIGHTsz               7
-#define CODE                   "code:"
-#define CODEsz                 5
-#define ENDDATA                        "enddata"
-#define ENDDATAsz              7
-
-#define FILE_END       99
-
-#define FATAL_ERROR    -1
-#define        BDF_OPEN        -2
-#define BDF_OPEN_IN    -2
-#define BDF_READ       -3
-#define BDF_WRITE      -4
-#define BDF_INVAL      -5
-#define        GPF_OPEN        -6
-#define GPF_OPEN_IN    -6
-#define GPF_READ       -7
-#define GPF_WRITE      -8 
-#define GPF_INVAL      -9
-#define PARAM_ERROR    -10
-
-#define BDF_OPEN_OUT   -11
-#define GPF_OPEN_OUT   -12
-#define BDF_OPEN_HEAD  -13
-#define BDF_READ_HEAD  -14
-
-/* system_ call error */
-#define        MALLOC_ERROR    -15
-#define        FORK_ERROR      -16
-#define        EXEC_ERROR      -17
-#define        PIPE_ERROR      -18
-#define        DUP_ERROR       -19
-#define        POPEN_ERROR     -20
-#define        PCLOSE_ERROR    -21
-#define        FDOPEN_ERROR    -22
-#define        STAT_ERROR      -23
-#define        MKTMP_ERROR     -24
-
-#define        PCFFONTC_ERROR  -25
-#define        SNFFONTC_ERROR  -26
-
-#define SCAN_TO_NONSP(p) {\
-    while (*(p) != 0) {\
-       if ((*(p) == ' ') || (*(p) == TAB_CD) || (*(p) == 0xa1)) {\
-           (p)++;\
-       } else {\
-           break;\
-       }\
-    }\
-}
-
-#define SCAN_TO_SP(p) {\
-    while (*(p) != 0) {\
-       if ((*(p) == ' ') || (*(p) == TAB_CD) || (*(p) == 0xa1)) {\
-           break;\
-       } else {\
-           (p)++;\
-       }\
-    }\
-}
-
-
-#if defined( SVR4 ) || defined( SYSV )
-#define WaitID( chld_pid, chld_stat )  waitpid( (chld_pid), &(chld_stat), WUNTRACED )
-#else
-#define WaitID( chld_pid, chld_stat ) {\
-    for(;;){\
-       int rtn ;\
-       rtn = wait3( &(chld_stat), WUNTRACED, NULL );\
-       if( rtn == (chld_pid) ) break ;\
-       if( rtn == -1 ){\
-           if( errno == EINTR ) continue ;\
-           else                    break ;\
-       }\
-    }\
-}
-#endif
-
-#ifndef        DEFAULT_CODESET
-#define        DEFAULT_CODESET         "3"
-#endif
-
-/*
- * tempory file
- */
-#define TempFileKey            "XXXXXX"
-#define TEMPFILEKEY            TempFileKey
-#ifndef        DEFAULT_TMPPATH
-#define        DEFAULT_TMPPATH         "/var/tmp/"
-#endif /* DEFAULT_TMPPATH */
-
-/*
- * Function prototypes
- */
-extern int     falcom_atoi(
-#if NeedFunctionPrototypes
-    char*      /* str  */,
-    char       /* ed_cod */,
-    int*       /* val */
-#endif
-);
-
-extern int     GetDefaultFile(
-#if NeedFunctionPrototypes
-    int                /* size */,
-    char*      /* style */,
-    char*      /* fname */
-#endif
-);
-
-extern int     get_default_file(
-#if NeedFunctionPrototypes
-    FILE*      /* fp */,
-    int                /* size */,
-    char*      /* style */,
-    char*      /* fname */
-#endif
-);
-
-extern char    *falcom_get_base_name(
-#if NeedFunctionPrototypes
-    char*      /* str */       
-#endif
-);
-
-extern int     GetFileName(
-#if NeedFunctionPrototypes
-    char*      /* com */,
-    char*      /* size_str */,
-    char*      /* style */,
-    int        /* codeset */,
-    char*      /* ofile */
-#endif
-);
-
-extern void    ErrMsgTable_FalGetFontList(
-#if NeedFunctionPrototypes
-    char*      /* com */,
-    int                /* utyerr */,
-    int                /* utyderr */
-#endif
-);
-
-extern void    fal_cut_tailslash(
-#if NeedFunctionPrototypes
-    char*      /* name */
-#endif
-);
-
-extern char    *GetRealFileName( 
-#if NeedFunctionPrototypes
-    char*      /* name */
-#endif
-);
-
-extern int     IsInRegion(
-#if NeedFunctionPrototypes
-    int                        /* code  */,
-    int                        /* num_gr */,
-    FalGlyphRegion*    /* gr  */
-#endif
-);
-
-extern int     GetUdcFileName( 
-#if NeedFunctionPrototypes
-    char*      /* com  */,
-    int                /* code_no  */,
-    char*      /* xlfdname  */,
-    char*      /* fname */
-#endif
-);
-
-extern int     GetUdcRegion( 
-#if NeedFunctionPrototypes
-    char*              /* com */,
-    int                        /* codeset */,
-    char*              /* gpf_file */,
-    int*               /* num_gr */,
-    FalGlyphRegion**   /* gr */
-#endif
-);
-
-extern int     DispUdcCpArea( 
-#if NeedFunctionPrototypes
-    FILE*      /* fp */
-#endif
-);
-
-extern int     GetUdcFontName( 
-#if NeedFunctionPrototypes
-    char*      /* gpf_file */,
-    char*      /* bdf_file */,
-    char**     /* fontname */
-#endif
-);
-
-extern int     FileLock( 
-#if NeedFunctionPrototypes
-    int        /* fd */
-#endif
-);
-
-extern int     FileUnLock( 
-#if NeedFunctionPrototypes
-    int        /* fd */
-#endif
-);
-
-extern int     isLock( 
-#if NeedFunctionPrototypes
-    int        /* fd */
-#endif
-);
-
-extern int     ReadBdfHeader( 
-#if NeedFunctionPrototypes
-    struct btophead*   /* head */,
-    char*              /* buf */
-#endif
-);
-
-extern int     ReadGpfHeader(
-#if NeedFunctionPrototypes
-    struct ptobhead*   /* head */,
-    char*              /* buf */
-#endif
-);
-
-extern int     WriteBdfHeader(
-#if NeedFunctionPrototypes
-    struct ptobhead*   /* head */
-#endif
-);
-
-extern void    WriteGpfHeader(
-#if NeedFunctionPrototypes
-    struct btophead*   /* head */
-#endif
-);
-
-extern int     WritePtnToBdf(
-#if NeedFunctionPrototypes
-    struct ptobhead*   /* head */
-#endif
-);
-
-extern int     putDefaultChars(
-#if NeedFunctionPrototypes
-    struct ptobhead*   /* head */
-#endif
-);
-
-extern int     WritePtnToGpf(
-#if NeedFunctionPrototypes
-    struct btophead*   /* head */
-#endif
-);
-
-extern int     ReadBdfToMemory(
-#if NeedFunctionPrototypes
-    struct btophead*   /* head */,
-    char*              /* buf */
-#endif
-);
-
-extern int     ReadBdfToMemory_with_init(
-#if NeedFunctionPrototypes
-    struct btophead*   /* head */,
-    int                        /* init_start */,
-    int                        /* init_end */,
-    char*              /* buf */
-#endif
-);
-
-extern int     GetBdfCode(
-#if NeedFunctionPrototypes
-    struct btophead*   /* head */,
-    char*              /* buf */,
-    int*               /* code */
-#endif
-);
-
-extern int     GetBdfPtn(
-#if NeedFunctionPrototypes
-    struct btophead*   /* head */,
-    char*              /* buf */,
-    char*              /* ptn */,
-    int                        /* mwidth */,
-    int                        /* bsize */
-#endif
-);
-
-extern int     ReadGpfToMemory(
-#if NeedFunctionPrototypes
-    struct ptobhead*   /* head */,
-    char*              /* buf */
-#endif
-);
-
-extern int     GetGpfCode(
-#if NeedFunctionPrototypes
-    struct ptobhead*   /* head */,
-    char*              /* buf */,
-    int*               /* code */
-#endif
-);
-
-extern int     GetGpfPtn(
-#if NeedFunctionPrototypes
-    struct ptobhead*   /* head */,
-    char*              /* buf */,
-    char*              /* ptn */,
-    int                        /* mwidth */,
-    int                        /* bsize */
-#endif
-);
-
-extern void    GetBdfLinePtn(
-#if NeedFunctionPrototypes
-    char*      /* mem */,
-    char*      /* buf */,
-    int        /* width */
-#endif
-);
-
-extern void    GetGpfLinePtn(
-#if NeedFunctionPrototypes
-    char*      /* mem */,
-    char*      /* buf */,
-    int        /* width */
-#endif
-);
-
-extern int     PutBdfPtn(
-#if NeedFunctionPrototypes
-    unsigned char*     /* ptn */,
-    int                        /* width */,
-    int                        /* height */,
-    FILE*              /* fp */
-#endif
-);
-
-extern int     PutGpfPtn(
-#if NeedFunctionPrototypes
-    char*      /* ptn */,
-    int                /* width */,
-    int                /* height */,
-    FILE*      /* fp */
-#endif
-);
-
-extern int     PtnZoom(
-#if NeedFunctionPrototypes
-    char*      /* dmem */,
-    char*      /* smem */,
-    int                /* sw */,
-    int                /* sh */,
-    int                /* dw */,
-    int                /* dh */
-#endif
-);
-
-extern char    *GetTmpPath( 
-#if NeedFunctionPrototypes
-    char*      /* path */
-#endif
-);
-
-extern int     ChkNumString( 
-#if NeedFunctionPrototypes
-    char*      /* str */
-#endif
-);
-
-extern void    ErrMsgTable_AndExit(
-#if NeedFunctionPrototypes
-    int                /* er_no */,
-    char*      /* snf_in */,
-    char*      /* snf_out */,
-    char*      /* gpf_in */,
-    char*      /* gpf_out */,
-    char*      /* bdf_in */,
-    char*      /* prog_name  */
-#endif
-);
-
-extern void    fatal_err_msg( 
-#if NeedFunctionPrototypes
-    int                /* er_no */,
-    char*      /* prog_name */
-#endif
-);
-
-extern void    ChatchSig() ;
-
-extern void    Put_File_Create_Err_Msg( 
-#if NeedFunctionPrototypes
-    int                /* msg_level */,
-    char*      /* org_name */,
-    char*      /* tmp_name */,
-    char*      /* save_name */,
-    char*      /* com */
-#endif
-);
-
-extern int     Make_NewFefFile( 
-#if NeedFunctionPrototypes
-    char*      /* org_name */,
-    char*      /* tmp_name */,
-    mode_t     /* mode */,
-    uid_t      /* owner */,
-    gid_t      /* group */,
-    char*      /* com */
-#endif
-);
-
-extern int     Unlink_Tmpfile( 
-#if NeedFunctionPrototypes
-    char*      /* file */,
-    char*      /* com */
-#endif
-);
-
-extern int     Chmod_File ( 
-#if NeedFunctionPrototypes
-    char*      /* fname */,
-    mode_t     /* mode */,
-    char*      /* com */
-#endif
-);
-
-extern int     Chown_File ( 
-#if NeedFunctionPrototypes
-    char*      /* fname */,
-    uid_t      /* owner */,
-    gid_t      /* group */,
-    char*      /* com */
-#endif
-);
-
-extern int     ChkPcfFontFile( 
-#if NeedFunctionPrototypes
-    char*      /* filename */
-#endif
-);
-
-extern int     ChkSnfFontFile( 
-#if NeedFunctionPrototypes
-    char*      /* filename */
-#endif
-);
-
-extern char    *get_cmd_path( 
-#if NeedFunctionPrototypes
-    char*      /* path */,
-    char*      /* cmd */
-#endif
-);
-
-extern int     SetCmdPath( 
-#if NeedFunctionPrototypes
-    char*      /* com  */,
-    char**     /* path  */,
-    char*      /* dflt_path  */,
-    char*      /* cmd */
-#endif
-);
-
-extern int
-Link_NewFile(
-#if NeedFunctionPrototypes
-    char *     /* rd_file */,
-    char *     /* wr_file */
-#endif
-) ;
-
diff --git a/cde/programs/dtudcfonted/include/snfstruct.h b/cde/programs/dtudcfonted/include/snfstruct.h
deleted file mode 100644 (file)
index f8820b8..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: snfstruct.h /main/2 1996/02/10 16:25:06 cde-fuj $ */
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-(c) Copyright 1995 FUJITSU LIMITED
-This is source code modified by FUJITSU LIMITED under the Joint
-Development Agreement for the CDEnext PST.
-This is unpublished proprietary source code of FUJITSU LIMITED
-
-******************************************************************/
-#ifndef SNFSTRUCT_H
-#define SNFSTRUCT_H 1
-#include "font.h"
-#include "misc.h"
-#include <X11/Xlib.h>
-
-/*
- * This file describes the Server Natural Font format.
- * SNF fonts are both CPU-dependent and frame buffer bit order dependent.
- * This file is used by:
- *     1)  the server, to hold font information read out of font files.
- *     2)  font converters
- *
- * Each font file contains the following
- * data structures, with no padding in-between.
- *
- *     1)  The XFONTINFO structure
- *             hand-padded to a two-short boundary.
- *             maxbounds.byteoffset is the total number of bytes in the
- *                     glpyh array
- *             maxbounds.bitOffset is thetotal width of the unpadded font
- *
- *     2)  The XCHARINFO array
- *             indexed directly with character codes, both on disk
- *             and in memory.
- *
- *     3)  Character glyphs
- *             padded in the server-natural way, and
- *             ordered in the device-natural way.
- *             End of glyphs padded to 32-bit boundary.
- *
- *     4)  nProps font properties
- *
- *     5)  a sequence of null-terminated strings, for font properties
- */
-
-#define FONT_FILE_VERSION      4
-
-typedef struct _FontProp { 
-       CARD32  name;           /* offset of string */
-       INT32   value;          /* number or offset of string */
-       Bool    indirect;       /* value is a string offset */
-} FontPropRec;
-
-/*
- * the following macro definitions describe a font file image in memory
- */
-#define ADDRCharInfoRec( pfi)  \
-       ((CharInfoRec *) &(pfi)[1])
-
-#define ADDRCHARGLYPHS( pfi)   \
-       (((char *) &(pfi)[1]) + BYTESOFCHARINFO(pfi))
-
-/*
- * pad out glyphs to a CARD32 boundary
- */
-#define ADDRXFONTPROPS( pfi)  \
-       ((DIXFontProp *) ((char *)ADDRCHARGLYPHS( pfi) + BYTESOFGLYPHINFO(pfi)))
-
-#define ADDRSTRINGTAB( pfi)  \
-       ((char *)ADDRXFONTPROPS( pfi) + BYTESOFPROPINFO(pfi))
-
-#define        BYTESOFFONTINFO(pfi)    (sizeof(FontInfoRec))
-#define BYTESOFCHARINFO(pfi)   (sizeof(CharInfoRec) * n2dChars(pfi))
-#define        BYTESOFPROPINFO(pfi)    (sizeof(FontPropRec) * (pfi)->nProps)
-#define        BYTESOFSTRINGINFO(pfi)  ((pfi)->lenStrings)
-#define        BYTESOFGLYPHINFO(pfi)   (((pfi)->maxbounds.byteOffset+3) & ~0x3)
-#define BYTESOFINKINFO(pfi)    (sizeof(CharInfoRec) * (2 + n2dChars(pfi)))
-#endif /* SNFSTRUCT_H */
-
diff --git a/cde/programs/dtudcfonted/include/udccom.h b/cde/programs/dtudcfonted/include/udccom.h
deleted file mode 100644 (file)
index cc596b7..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: udccom.h /main/5 1996/07/19 20:31:51 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#include "udcopt.h"
-
-/* default path of dtaddcpf */
-#define DFLTPATH       "/usr/dt/lib/dtudcfonted/dtaddcpf"
-#define DFLTCMD                "dtaddcpf"
-
-/* commands for exchange font format */
-#define SNFTOBDF_CMD   "dtgpftobdf"
-#define BDFTOPCF_CMD   "bdftopcf"
-
-/* default path for commands */
-#define SNFTOBDF       "/usr/dt/lib/dtudcfonted/dtgpftobdf"
-#ifndef FONTC
-#define BDFTOPCF        "/usr/bin/X11/bdftopcf"
-#else
-#define BDFTOPCF        FONTC
-#endif
-#define        PCFTOBDF        SNFTOBDF
-
-/* suffix of font file */
-#define BDFSUFFIX      ".bdf"
-#define PCFSUFFIX      ".pcf"
-
-/* font information file */
-#define DTUDCFONTS             "DTUDCFONTS"
-
-#ifndef DTUDCFONTSLISTDIR
-#define        DTUDCFONTSLISTDIR       "/usr/dt/config"
-#endif
-
-/* default font path */
-#ifndef        DTUDCFONTPATH
-#define        DTUDCFONTPATH           "/usr/lib/X11/fonts/misc"
-#endif
-
-/* defines for UDC fonts */
-#define        FONTS_LIST_FILE         "fonts.list"
-#define        UDFLIST_DEF             "udflist.def"
-
-#define        FONTSDIR                "fonts.dir"
-
diff --git a/cde/programs/dtudcfonted/include/udcopt.h b/cde/programs/dtudcfonted/include/udcopt.h
deleted file mode 100644 (file)
index 4608523..0000000
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: udcopt.h /main/4 1996/11/08 01:59:43 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-/***********************************************************************
- * SNF format font
- **********************************************************************/
-#define BDFTOSNF_CMD   "bdftosnf"
-#ifndef SNFFONTC
-#define BDFTOSNF       "/usr/bin/X11/bdftosnf"
-#else
-#define BDFTOSNF       SNFFONTC
-#endif
-#define SNFSUFFIX      ".snf"
-
-#define FONT_FILE_PARM 0
-
-#define        COMM_SNF_POPEN( permission, snf_file, out_file, ep, buf, command ) { \
-       snprintf( (buf), sizeof((buf)), " -i " ) ; \
-       snprintf( (command), sizeof((command)), "%s %s > %s", bdftosnf, (buf), (out_file) ); \
-}
-#define        COMM_SNF_FILEVERSION( snf_fd, finf, buf, permission ) { \
-       read( (snf_fd), (buf), sizeof(FontInfoRec) ); \
-       close( (snf_fd) ); \
-       (finf) = (FontInfoRec *) (buf) ; \
-       if( \
-           ((finf)->version1 != FONT_FILE_VERSION) || \
-           ((finf)->version2 != FONT_FILE_VERSION) \
-       ) \
-           (permission) = -1 ; \
-}
-#define COMM_SNF_NEWTARGET( permission )       (permission) = 0
-#define        COMM_SNF_EXECLBDFTOSNF( permission, buf, snf_file ) { \
-       execl( bdftosnf, bdftosnf, "-i", 0 ); \
-}
-#define        COMM_SNF_GETHEADER( fip, fp ) { \
-       (fip) = (FontInfoRec *)(fp); \
-}
-
-#define        FAL_FONT_PRM    0
-#define        CHK_PROTECT_KEY( protect_key_data, openfontfile,\
-                       fal_utyerror, fal_utyderror ) 
-/* case of a snf former font */
-#define        FAL_GET_SNF_HEADER( buf, protect_key_data, fal_utyerror, fal_utyderror, fd, finf, openfontfile ) { \
-       (finf)->pFinf = ( FontInfoPtr )(buf); \
-       if ( \
-           ((finf)->pFinf->version1 != (finf)->pFinf->version2) || \
-           ((finf)->pFinf->version1 != FONT_FILE_VERSION) \
-       ) { \
-           set_errfile_str( fal_err_file, (openfontfile) ) ; \
-           (fal_utyerror) = _FAL_FONT_ER; \
-           (fal_utyderror) = 0; \
-           fal_utyerrno = FAL_ERR_FONT ; \
-           fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ; \
-           goto FalError01 ; \
-       } else { \
-           (finf)->isFef = TRUE ; \
-           (finf)->isPcf = FALSE; \
-       } \
-}
-
-/* falReadGpfProp() */
-#define        FAL_READ_SNF_HEADER( finf, protect_key_data, fal_utyerror, fal_utyderror ) { \
-    (finf)->isFef = TRUE; \
-    (finf)->isPcf = FALSE; \
-    (finf)->pFinf = ( FontInfoPtr )(finf)->buf ; \
-    if ( /* not a snf or fef format */ \
-       ((finf)->pFinf->version1 != (finf)->pFinf->version2) || \
-       ((finf)->pFinf->version1 != FONT_FILE_VERSION) \
-    ) { \
-       return _FAL_TRY_NEXT ; \
-    } \
-} 
-
-#define        ISOPTFONT( file )       1
-
-/***********************************************************************
- * glyph index
- **********************************************************************/
-#define        SHIFTMASK       0x7F7F
-#define SHIFT_OFF(co)  (co)
-#define SHIFT_ON(co)   (co)
-#define DEFAULTCHAR    0x2121
-#define CONVGLYPHINDEX( code ) (code)
-
-#define DISPCODEPOINT( char_set, code ) (code)
-
-#define        FAL_OPT_CONVGITOCP( codeset, code )
-#define        FAL_OPT_CONVCPTOGI( codeset, code )
-
-/***********************************************************************
- * options for commands
- **********************************************************************/
-#define        NORMAL  0
-#define        SYSTM   1
-
-#define        CDSET1  (1<<2)
-
-/* UDC code area */
-#define IN_CODE( cc, co )        (( cc ) ? 1 : 1 )
-
-/* libfuty */
-#define        COMM_SBOPT_CHECKSBOPT( com, code_area )
-
-#define        COMM_SBOPT_STRCMP( argv, cnt )  (((argv)[(cnt)] ? 0 : 0 ))
-#define        COMM_SBOPT_SETSBOPT( codearea )
-
-#define        COMM_TYPE_STRCMP( argv, cnt )   ( ((argv)[(cnt)] ? 0 : 0 ))
-#define        COMM_TYPE_SETTYPE( argc, argv, cnt, type )
-
-/***********************************************************************
- * options for commands
- **********************************************************************/
-#define        COMM_SETDEFAULTSTYLE( style )   (style) = (char *)NULL
-
-#define        COMM_SETSTYLE_TO_FONTDATA( style, key, mask ) { \
-       if( style ) { \
-           char        stylebuf[ BUFSIZE ] ; \
-           snprintf( stylebuf, sizeof(stylebuf), "%s", style ) ; \
-           key.style.name = stylebuf ; \
-           mask |= FAL_FONT_MASK_STYLE_NAME ; \
-       } \
-}
-#define COMM_ISDEFAULTCHAR( code )     0
-
-#define        get_charset_registry(head, p)
-#define        put_default_chars(head, nchar, rtn) {\
-    if ( !(nchar) ) \
-    {\
-       (nchar)++;\
-       fprintf( (head)->output, "CHARS %d\n", (nchar) );\
-       if ( ( (rtn) = putDefaultChars( (head) ) ) != 0 ) {\
-           return (rtn);\
-       }\
-    } else {\
-       fprintf( (head)->output, "CHARS %d\n", (nchar) );\
-    }\
-}
-#define        put_default_encode( head ) {\
-    fprintf((head)->output, "STARTCHAR %04x\n", DEFAULTCHAR );\
-    fprintf((head)->output, "ENCODING %d\n", DEFAULTCHAR );\
-}
-#define        put_default_bitmap(head, bytew, posbit, i, j, ptnbuf, ptnbuf2, tmp) { \
-    for ((i) = 0; (i) < (bytew); (i)++) \
-       *((ptnbuf) + (i)) = (unsigned char)0x00;\
-    for ((j) = 0; (j) < (head)->bdf_height; (j)++) {\
-       for ((i) = 0; (i) < (bytew); (i)++) \
-           fprintf((head)->output, "%.2x", *((ptnbuf) + (i)));\
-       fprintf((head)->output, "\n");\
-    }\
-}
-#define        COMM_SBFNT_ISSBFNT( p ) 0
-#define        COMM_SBFNT_CONVCODETOGI( char_set, head )
-#define        COMM_SBFNT_SETUDCAREA( com, head, char_set, code_area, num_gr, gr ) { \
-       (head).code_category    = ALL_CODE ; \
-       (head).start_code       = (gr)[0].start ; \
-       (head).end_code         = (gr)[(num_gr)-1].end ; \
-}
-#define        COMM_SET_CODESET( codeset, code_area )
-#define        COMM_SET_CODECATEGORY( char_set, code_area, head )
-
-/*
- * help message
- */
-#define COMM_HELP_MSG { \
-       USAGE("              [-codeset number] [-help]\n"); \
-       USAGE("\n"); \
-}
-#define        COMM_DSP_LETTER_T
-#define COMM_DSP_PRM
-#define        COMM_HELP_MSG_STYLE     USAGE("style      (The default value is mincho style.)\n")
-
-/***********************************************************************
- * Options for libfal
- **********************************************************************/
-#define COMM_SBCHR_SETFONTDATA( data, mask )
-#define COMM_SBCHR_STRDUP_P( data, odata )
-
-#define FAL_DB_OPTION  static  FalFontDB       *fal_db_opt
-#define        CHK_KEY_STR_OPTION( mask, key, flg )
-#define        FAL_FREE_FONTLIST_OPTION( list )
-#define        FAL_CLEAR_DATA_OPTION( tmp )
-#define        SET_STRUCT_OPTION( dup_p, elm, tmp_data, fal_utyerror, fal_db_group )
-#define        FAL_EQ_DATA_OPTION( flg, data, tmp_data )
-#define        FAL_CMP_DATA_OPTION( mask, op1, key )
-#define        DEF_STR_CHK     struct { int    style, shape; }str_chk 
-#define        DEF_STR_SET { \
-       str_chk.style = 0; \
-       str_chk.shape = 0; \
-}
-
-#define        NEW_TARGET_SET( diff, choose, target, str_chk )
-#define        NEW_TARGET_CHK( diff, choose, target, str_chk )
-
-
-/***********************************************************************
- * udflist.def
- **********************************************************************/
-#define        COMM_GET_DEFAULTFILE_ERROR( buf, com, ret, height, style, list_d, list_c, list_l, statbuf ) {\
-       buf[0] = '\0' ;\
-}
-#define        COMM_DISPERRORFILE( com, lst, style, i, size_str ) {\
-       USAGE1("%s : Two or more corresponding user defined characters exist.\n", com);\
-       USAGE("\tcode set\tXLFD\n" );\
-       USAGE("\t--------------------------------------------------\n" );\
-       for ( i = 0 ; i < lst->num; i++ ) {\
-           USAGE2("\t%d\t%s\n", lst->list[i].cd_set-1, lst->list[i].xlfdname );\
-       }\
-}
-
-/***********************************************************************
- * fonts.list
- **********************************************************************/
-#define GETLISTFILEPATH( locale, srch_path, list_d, list_c, list_l, list_file ) { \
-       if ( ( (locale) = getenv( "FAL_LANG" ) ) == NULL ) { \
-           if( ((locale) = (char *)getenv( "LANG" )) == NULL ){\
-               (locale) = "C" ;\
-           }\
-       } \
-       if ( ( (srch_path) = getenv( DTUDCFONTS ) ) == NULL ) { \
-           snprintf( (list_d), sizeof(list_d), "%s/%s", DTUDCFONTSLISTDIR, (list_file) ); \
-           snprintf( (list_c), sizeof(list_c), "%s/C/%s", DTUDCFONTSLISTDIR, (list_file) ); \
-           snprintf( (list_l), sizeof(list_l), "%s/%s/%s", DTUDCFONTSLISTDIR, (locale), (list_file) ); \
-       } else { \
-           snprintf( (list_d), sizeof(list_d), "%s/%s", (srch_path), (list_file) ); \
-           snprintf( (list_c), sizeof(list_c), "%s/C/%s", (srch_path), (list_file) ); \
-           snprintf( (list_l), sizeof(list_l), "%s/%s/%s", (srch_path), (locale), (list_file) ); \
-       } \
-}
-
-#define        SET_EXECDEFAULT( mask, def, undef ) { \
-    if( !((mask) & FAL_FONT_MASK_DEFINED) && !((mask) & FAL_FONT_MASK_UNDEFINED) ){ \
-       (def)   = FALSE ; \
-       (undef) = TRUE ; \
-    }else{ \
-       if( (mask) & FAL_FONT_MASK_DEFINED )    (def)   = TRUE ; \
-       else                                    (def)   = FALSE ; \
-       if( (mask) & FAL_FONT_MASK_UNDEFINED )  (undef) = TRUE ; \
-       else                                    (undef) = FALSE ; \
-    } \
-}
-
-/*************************< end of udcopt.h >**************************/
diff --git a/cde/programs/dtudcfonted/include/udcutil.h b/cde/programs/dtudcfonted/include/udcutil.h
deleted file mode 100644 (file)
index 98001cf..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: udcutil.h /main/3 1996/11/08 01:58:55 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#ifndef PRINT_USAGE
-#define USAGE(a)
-#define USAGE1(a, b)
-#define USAGE2(a, b, c)
-#define USAGE3(a, b, c, d)
-#define USAGE4(a, b, c, d, e)
-#else
-#define USAGE(a)               fprintf(stderr, a)
-#define USAGE1(a, b)           fprintf(stderr, a, b)
-#define USAGE2(a, b, c)                fprintf(stderr, a, b, c)
-#define USAGE3(a, b, c, d)     fprintf(stderr, a, b, c, d)
-#define USAGE4(a, b, c, d, e)  fprintf(stderr, a, b, c, d, e)
-#endif
-
-#define        UDC_LINE_MAX    2048
-
-/* macro for get character strings */
-
-#define AllocString( str, orgstr, rtn ){ \
-       (str) = (char *)malloc( sizeof(char) * (strlen((orgstr))+1) ) ;\
-       if( !(str) ){\
-               return( (rtn) ) ;\
-       }\
-       strcpy( (str), (orgstr) ) ;\
-}
-
-#define AddString( str, addstr, rtn ){ \
-       (str) = (char *)realloc( (str), sizeof(char) * ( strlen((str)) + strlen((addstr)) + 1 ) ) ;\
-       if( !(str) ){\
-               return( (rtn) ) ;\
-       }\
-       strcat( (str), (addstr) ) ;\
-}
-
-#define ResizeString( str, rtn ){ \
-       (str) = (char *)realloc( (str), sizeof(char) * ( strlen((str)) + 1 ) ) ;\
-       if( !(str) ){\
-               return( (rtn) ) ;\
-       }\
-}
-
-#define FreeString( str ){ \
-       if( (str) ) {\
-               free( (str) ) ;\
-       }\
-       (str) = NULL ;\
-}
-
-/* access to "fonts.dir" */
-
-#define   XLFD_ELM_CNT                 14
-
-#define XLFD_ELM_FOUNDRY               1
-#define XLFD_ELM_FAMILY_NAME           2
-#define XLFD_ELM_WEIGHT_NAME           3
-#define XLFD_ELM_SLANT                 4
-#define XLFD_ELM_SETWIDTH_NAME         5
-#define XLFD_ELM_ADD_STYLE_NAME                6
-#define XLFD_ELM_PIXEL_SIZE            7
-#define XLFD_ELM_POINT_SIZE            8
-#define XLFD_ELM_RESOLUTION_X          9
-#define XLFD_ELM_RESOLUTION_Y          10
-#define XLFD_ELM_SPACING               11
-#define XLFD_ELM_AVERAGE_WIDTH         12
-#define XLFD_ELM_CHARSET_REGISTRY      13
-#define XLFD_ELM_CHARSET_ENCODING      14
-
-
-static int     udc_font_elm_cnt ;
-static char    udc_font_str_buffer[UDC_LINE_MAX] ;
-static char    *udc_font_sp ;
-
-#define POINTXLFDELM( sp, xlfdname, elm_num ) { \
-       udc_font_sp = (xlfdname) ; \
-       udc_font_elm_cnt = 0 ;\
-       while(*udc_font_sp){\
-           if(*udc_font_sp == '-')     udc_font_elm_cnt++ ;\
-           if( udc_font_elm_cnt == (elm_num) ){\
-               break ;\
-           }\
-           udc_font_sp++ ;\
-       }\
-       (sp) = udc_font_sp ;\
-}
-
-#define GETXLFDELMSTR( sp, xlfdname, elm_num ) { \
-       snprintf( udc_font_str_buffer, sizeof(udc_font_str_buffer), "%s", (xlfdname) ) ; \
-       udc_font_sp = udc_font_str_buffer ; \
-       udc_font_elm_cnt = 0 ;\
-       while(*udc_font_sp){\
-           if(*udc_font_sp == '-')     udc_font_elm_cnt++ ;\
-           if( udc_font_elm_cnt == (elm_num) ){\
-               udc_font_sp++ ;\
-               break ;\
-           }\
-           udc_font_sp++ ;\
-       }\
-       (sp) = udc_font_sp ;\
-       while(*udc_font_sp){\
-           if(*udc_font_sp == '-')     udc_font_elm_cnt++ ;\
-           if( udc_font_elm_cnt == (elm_num)+1 ){\
-               *udc_font_sp = '\0' ;\
-               break ;\
-           }\
-           udc_font_sp++ ;\
-       }\
-}
-
-#define GETCHARSETSTR( char_set, xlfdname ) { \
-       snprintf( udc_font_str_buffer, sizeof(udc_font_str_buffer), "%s", (xlfdname) ) ; \
-       POINTXLFDELM( (char_set), udc_font_str_buffer, XLFD_ELM_CHARSET_REGISTRY ) ; \
-       (char_set)++ ; \
-}
-
-#define GETSPACINGSTR( spacing, xlfdname ) { \
-       GETXLFDELMSTR( (spacing), (xlfdname), XLFD_ELM_SPACING ) ; \
-}
-
-
diff --git a/cde/programs/dtudcfonted/libfal/Imakefile b/cde/programs/dtudcfonted/libfal/Imakefile
deleted file mode 100644 (file)
index 061d8b2..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/16 1996/09/09 11:45:13 drk $
-#define DoNormalLib    YES
-#define DoSharedLib    NO
-#define DoDebugLib     NO
-#define DoProfileLib   NO
-#define LibName                fal
-#define LibHeaders     NO
-#define LibInstall     NO
-          FALDESTDIR  = $(CDE_INSTALLATION_TOP)
-          FONTLIST    = config
-          XLOCALEDIR  = $(XPROJECTROOT)/lib/X11/locale
-          XFONTDIR    = $(XPROJECTROOT)/lib/X11/fonts
-
-UDCFONTPATH = $(XFONTDIR)/misc
-FALOPT1       = -DDTUDCFONTPATH='"'$(XFONTDIR)/misc'"'
-FALOPT2       = -DXLOCALEDIR='"'$(XLOCALEDIR)'"'
-FALOPT3       = -DDTUDCFONTSLISTDIR='"'$(FALDESTDIR)/$(FONTLIST)'"'
-
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-
-       DEPEND_DEFINES = $(DEPENDDEFINES)
-        DEFINES       = $(FALOPT1) $(FALOPT2) $(OPT2) $(FALOPT3)
-
-      UDC_INC_PATH1   = -I./include
-      UDC_INC_PATH2   = -I../include
-      UDC_INC_PATH3   = -I./
-
-       INCLUDES   = \
-                    $(UDC_INC_PATH1)\
-                    $(UDC_INC_PATH2)\
-                    $(UDC_INC_PATH3)
-
-SRCS1  = falfont.c readpcf.c \
-       syncx.c
-
-SRCS2 = _faludcInf.c \
-       _fallcCT.c _fallcCharSet.c _fallcConv.c _fallcDB.c \
-       _fallcDefConv.c _fallcDynamic.c _fallcEuc.c _fallcFile.c \
-       _fallcGenConv.c _fallcGeneric.c _fallcInit.c _fallcPrTxt.c \
-       _fallcPubWrap.c _fallcPublic.c _fallcRM.c _fallcSjis.c \
-       _fallcStd.c _fallcTxtPr.c _fallcUTF.c _fallcUtil.c \
-       _fallcWrap.c \
-       _falomGeneric.c _falQuarks.c _falSetLocale.c _falrm.c
-
-SRCS3  = _falutilbitmap.c
-
-SRCS  = $(SRCS1) $(SRCS2) $(SRCS3)
-
-OBJS   = falfont.o readpcf.o \
-       syncx.o \
-       _faludcInf.o \
-       _fallcCT.o _fallcCharSet.o _fallcConv.o _fallcDB.o \
-       _fallcDefConv.o _fallcDynamic.o _fallcEuc.o _fallcFile.o \
-       _fallcGenConv.o _fallcGeneric.o _fallcInit.o _fallcPrTxt.o \
-       _fallcPubWrap.o _fallcPublic.o _fallcRM.o _fallcSjis.o \
-       _fallcStd.o _fallcTxtPr.o _fallcUTF.o _fallcUtil.o \
-       _fallcWrap.o _falomGeneric.o _falQuarks.o _falSetLocale.o \
-       _falrm.o \
-       _falutilbitmap.o
-
-all::
-       $(RM) fonts.list;\
-       $(CP) ./fonts.list.header ./fonts.list ;\
-       chmod ug+w fonts.list;\
-       key=`echo $(UDCFONTPATH) | sed -e 's/:/ /g'` ; \
-       for dir in $$key ; \
-       do \
-           echo $$dir: >> ./fonts.list ;\
-       done
-
-#include <Library.tmpl>
-
-install:: 
-       if [ -d $(DESTDIR)/$(FALDESTDIR)/$(FONTLIST) ]; then set +x; \
-       else (set -x; $(MKDIRHIER) $(DESTDIR)/$(FALDESTDIR)/$(FONTLIST)); fi ; \
-       (set -x ; $(CP) ./fonts.list $(DESTDIR)/$(FALDESTDIR)/$(FONTLIST) ; \
-       chmod 0644 $(DESTDIR)/$(FALDESTDIR)/$(FONTLIST)/fonts.list )
-
-DependTarget()
diff --git a/cde/programs/dtudcfonted/libfal/_falQuarks.c b/cde/programs/dtudcfonted/libfal/_falQuarks.c
deleted file mode 100644 (file)
index f41726e..0000000
+++ /dev/null
@@ -1,456 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* Quarks.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:31:17      */ 
-/* $XConsortium: _falQuarks.c /main/2 1996/09/09 13:20:21 rswiston $ */
-
-/***********************************************************
-Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard,
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-/*
-
-Copyright (c) 1987, 1988, 1990  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-#include "_fallibint.h"
-#include <X11/Xresource.h>
-
-/* Not cost effective, at least for vanilla MIT clients */
-/* #define PERMQ */
-
-typedef unsigned long Signature;
-typedef unsigned long Entry;
-#ifdef PERMQ
-typedef unsigned char Bits;
-#endif
-
-static XrmQuark nextQuark = 1; /* next available quark number */
-static unsigned long quarkMask = 0;
-static Entry zero = 0;
-static Entry *quarkTable = &zero; /* crock */
-static unsigned long quarkRehash;
-static XrmString **stringTable = NULL;
-#ifdef PERMQ
-static Bits **permTable = NULL;
-#endif
-static XrmQuark nextUniq = -1; /* next quark from falrmUniqueQuark */
-
-#define QUANTUMSHIFT   8
-#define QUANTUMMASK    ((1 << QUANTUMSHIFT) - 1)
-#define CHUNKPER       8
-#define CHUNKMASK      ((CHUNKPER << QUANTUMSHIFT) - 1)
-
-#define LARGEQUARK     ((Entry)0x80000000L)
-#define QUARKSHIFT     18
-#define QUARKMASK      ((LARGEQUARK - 1) >> QUARKSHIFT)
-#define XSIGMASK       ((1L << QUARKSHIFT) - 1)
-
-#define STRQUANTSIZE   (sizeof(XrmString) * (QUANTUMMASK + 1))
-#ifdef PERMQ
-#define QUANTSIZE      (STRQUANTSIZE + \
-                        (sizeof(Bits) * ((QUANTUMMASK + 1) >> 3))
-#else
-#define QUANTSIZE      STRQUANTSIZE
-#endif
-
-#define HASH(sig) ((sig) & quarkMask)
-#define REHASHVAL(sig) ((((sig) % quarkRehash) + 2) | 1)
-#define REHASH(idx,rehash) ((idx + rehash) & quarkMask)
-#define NAME(q) stringTable[(q) >> QUANTUMSHIFT][(q) & QUANTUMMASK]
-#ifdef PERMQ
-#define BYTEREF(q) permTable[(q) >> QUANTUMSHIFT][((q) & QUANTUMMASK) >> 3]
-#define ISPERM(q) (BYTEREF(q) & (1 << ((q) & 7)))
-#define SETPERM(q) BYTEREF(q) |= (1 << ((q) & 7))
-#define CLEARPERM(q) BYTEREF(q) &= ~(1 << ((q) & 7))
-#endif
-
-/* Permanent memory allocation */
-
-#define WALIGN sizeof(unsigned long)
-#define DALIGN sizeof(double)
-
-#define NEVERFREETABLESIZE ((8192-12) & ~(DALIGN-1))
-static char *neverFreeTable = NULL;
-static int  neverFreeTableSize = 0;
-
-static char *permalloc(length)
-    register unsigned int length;
-{
-    char *ret;
-
-    if (neverFreeTableSize < length) {
-       if (length >= NEVERFREETABLESIZE)
-           return Xmalloc(length);
-       if (! (ret = Xmalloc(NEVERFREETABLESIZE)))
-           return (char *) NULL;
-       neverFreeTableSize = NEVERFREETABLESIZE;
-       neverFreeTable = ret;
-    }
-    ret = neverFreeTable;
-    neverFreeTable += length;
-    neverFreeTableSize -= length;
-    return(ret);
-}
-
-#ifndef WORD64
-typedef struct {char a; double b;} TestType1;
-typedef struct {char a; unsigned long b;} TestType2;
-#endif
-
-#ifdef XTHREADS
-static char *_falpermalloc();
-
-char *falpermalloc(length)
-    unsigned int length;
-{
-    char *p;
-
-    _XLockMutex(_Xglobal_lock);
-    p = _falpermalloc(length);
-    _XUnlockMutex(_Xglobal_lock);
-    return p;
-}
-#define falpermalloc _falpermalloc
-
-static
-#endif /* XTHREADS */
-char *falpermalloc(length)
-    unsigned int length;
-{
-    int i;
-
-    if (neverFreeTableSize && length < NEVERFREETABLESIZE) {
-#ifndef WORD64
-       if ((sizeof(TestType1) !=
-            (sizeof(TestType2) - sizeof(unsigned long) + sizeof(double))) &&
-           !(length & (DALIGN-1)) &&
-           (i = (NEVERFREETABLESIZE - neverFreeTableSize) & (DALIGN-1))) {
-           neverFreeTableSize -= DALIGN - i;
-           neverFreeTable += DALIGN - i;
-       } else
-#endif
-           if (i = (NEVERFREETABLESIZE - neverFreeTableSize) & (WALIGN-1)) {
-               neverFreeTableSize -= WALIGN - i;
-               neverFreeTable += WALIGN - i;
-           }
-    }
-    return permalloc(length);
-}
-
-static Bool
-ExpandQuarkTable()
-{
-    unsigned long oldmask, newmask;
-    register char c, *s;
-    register Entry *oldentries, *entries;
-    register Entry entry;
-    register int oldidx, newidx, rehash;
-    Signature sig;
-    XrmQuark q;
-
-    oldentries = quarkTable;
-    if (oldmask = quarkMask)
-       newmask = (oldmask << 1) + 1;
-    else {
-       if (!stringTable) {
-           stringTable = (XrmString **)Xmalloc(sizeof(XrmString *) *
-                                               CHUNKPER);
-           if (!stringTable)
-               return False;
-           stringTable[0] = (XrmString *)NULL;
-       }
-#ifdef PERMQ
-       if (!permTable)
-           permTable = (Bits **)Xmalloc(sizeof(Bits *) * CHUNKPER);
-       if (!permTable)
-           return False;
-#endif
-       stringTable[0] = (XrmString *)falpermalloc(QUANTSIZE);
-       if (!stringTable[0])
-           return False;
-#ifdef PERMQ
-       permTable[0] = (Bits *)((char *)stringTable[0] + STRQUANTSIZE);
-#endif
-       newmask = 0x1ff;
-    }
-    entries = (Entry *)Xmalloc(sizeof(Entry) * (newmask + 1));
-    if (!entries)
-       return False;
-    bzero((char *)entries, sizeof(Entry) * (newmask + 1));
-    quarkTable = entries;
-    quarkMask = newmask;
-    quarkRehash = quarkMask - 2;
-    for (oldidx = 0; oldidx <= oldmask; oldidx++) {
-       if (entry = oldentries[oldidx]) {
-           if (entry & LARGEQUARK)
-               q = entry & (LARGEQUARK-1);
-           else
-               q = (entry >> QUARKSHIFT) & QUARKMASK;
-           for (sig = 0, s = NAME(q); c = *s++; )
-               sig = (sig << 1) + c;
-           newidx = HASH(sig);
-           if (entries[newidx]) {
-               rehash = REHASHVAL(sig);
-               do {
-                   newidx = REHASH(newidx, rehash);
-               } while (entries[newidx]);
-           }
-           entries[newidx] = entry;
-       }
-    }
-    if (oldmask)
-       Xfree((char *)oldentries);
-    return True;
-}
-
-#if NeedFunctionPrototypes
-XrmQuark _falrmInternalStringToQuark(
-    register _Xconst char *name, register int len, register Signature sig,
-    Bool permstring)
-#else
-XrmQuark _falrmInternalStringToQuark(name, len, sig, permstring)
-    register XrmString name;
-    register int len;
-    register Signature sig;
-    Bool permstring;
-#endif
-{
-    register XrmQuark q;
-    register Entry entry;
-    register int idx, rehash;
-    register int i;
-    register char *s1, *s2;
-    char *new;
-
-    rehash = 0;
-    idx = HASH(sig);
-    _XLockMutex(_Xglobal_lock);
-    while (entry = quarkTable[idx]) {
-       if (entry & LARGEQUARK)
-           q = entry & (LARGEQUARK-1);
-       else {
-           if ((entry - sig) & XSIGMASK)
-               goto nomatch;
-           q = (entry >> QUARKSHIFT) & QUARKMASK;
-       }
-       for (i = len, s1 = (char *)name, s2 = NAME(q); --i >= 0; ) {
-           if (*s1++ != *s2++)
-               goto nomatch;
-       }
-       if (*s2) {
-nomatch:    if (!rehash)
-               rehash = REHASHVAL(sig);
-           idx = REHASH(idx, rehash);
-           continue;
-       }
-#ifdef PERMQ
-       if (permstring && !ISPERM(q)) {
-           Xfree(NAME(q));
-           NAME(q) = (char *)name;
-           SETPERM(q);
-       }
-#endif
-       _XUnlockMutex(_Xglobal_lock);
-       return q;
-    }
-    if (nextUniq == nextQuark)
-       goto fail;
-    if ((nextQuark + (nextQuark >> 2)) > quarkMask) {
-       if (!ExpandQuarkTable())
-           goto fail;
-       _XUnlockMutex(_Xglobal_lock);
-       return _falrmInternalStringToQuark(name, len, sig, permstring);
-    }
-    q = nextQuark;
-    if (!(q & QUANTUMMASK)) {
-       if (!(q & CHUNKMASK)) {
-           if (!(new = Xrealloc((char *)stringTable,
-                                sizeof(XrmString *) *
-                                ((q >> QUANTUMSHIFT) + CHUNKPER))))
-               goto fail;
-           stringTable = (XrmString **)new;
-#ifdef PERMQ
-           if (!(new = Xrealloc((char *)permTable,
-                                sizeof(Bits *) *
-                                ((q >> QUANTUMSHIFT) + CHUNKPER))))
-               goto fail;
-           permTable = (Bits **)new;
-#endif
-       }
-       new = falpermalloc(QUANTSIZE);
-       if (!new)
-           goto fail;
-       stringTable[q >> QUANTUMSHIFT] = (XrmString *)new;
-#ifdef PERMQ
-       permTable[q >> QUANTUMSHIFT] = (Bits *)(new + STRQUANTSIZE);
-#endif
-    }
-    if (!permstring) {
-       s2 = (char *)name;
-#ifdef PERMQ
-       name = Xmalloc(len+1);
-#else
-       name = permalloc(len+1);
-#endif
-       if (!name)
-           goto fail;
-       for (i = len, s1 = (char *)name; --i >= 0; )
-           *s1++ = *s2++;
-       *s1++ = '\0';
-#ifdef PERMQ
-       CLEARPERM(q);
-    }
-    else {
-       SETPERM(q);
-#endif
-    }
-    NAME(q) = (char *)name;
-    if (q <= QUARKMASK)
-       entry = (q << QUARKSHIFT) | (sig & XSIGMASK);
-    else
-       entry = q | LARGEQUARK;
-    quarkTable[idx] = entry;
-    nextQuark++;
-    _XUnlockMutex(_Xglobal_lock);
-    return q;
- fail:
-    _XUnlockMutex(_Xglobal_lock);
-    return NULLQUARK;
-}
-
-#if NeedFunctionPrototypes
-XrmQuark falrmStringToQuark(
-    _Xconst char *name)
-#else
-XrmQuark falrmStringToQuark(name)
-    XrmString name;
-#endif
-{
-    register char c, *tname;
-    register Signature sig = 0;
-
-    if (!name)
-       return (NULLQUARK);
-    
-    for (tname = (char *)name; c = *tname++; )
-       sig = (sig << 1) + c;
-
-    return _falrmInternalStringToQuark(name, tname-(char *)name-1, sig, False);
-}
-
-#if NeedFunctionPrototypes
-XrmQuark falrmPermStringToQuark(
-    _Xconst char *name)
-#else
-XrmQuark falrmPermStringToQuark(name)
-    XrmString name;
-#endif
-{
-    register char c, *tname;
-    register Signature sig = 0;
-
-    if (!name)
-       return (NULLQUARK);
-
-    for (tname = (char *)name; c = *tname++; )
-       sig = (sig << 1) + c;
-
-    return _falrmInternalStringToQuark(name, tname-(char *)name-1, sig, True);
-}
-
-XrmQuark falrmUniqueQuark()
-{
-    XrmQuark q;
-
-    _XLockMutex(_Xglobal_lock);
-    if (nextUniq == nextQuark)
-       q = NULLQUARK;
-    else
-       q = nextUniq--;
-    _XUnlockMutex(_Xglobal_lock);
-    return q;
-}
-
-XrmString falrmQuarkToString(quark)
-    register XrmQuark quark;
-{
-    XrmString s;
-
-    _XLockMutex(_Xglobal_lock);
-    if (quark <= 0 || quark >= nextQuark)
-       s = NULLSTRING;
-    else {
-#ifdef PERMQ
-       /* We have to mark the quark as permanent, since the caller might hold
-        * onto the string pointer forver.
-        */
-       SETPERM(quark);
-#endif
-       s = NAME(quark);
-    }
-    _XUnlockMutex(_Xglobal_lock);
-    return s;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_falSetLocale.c b/cde/programs/dtudcfonted/libfal/_falSetLocale.c
deleted file mode 100644 (file)
index 0dc641b..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* SetLocale.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:31:29   */ 
-/* $XConsortium: _falSetLocale.c /main/1 1996/04/08 15:15:08 cde-fuj $ */
-
-/*
- * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
- *                      and Nippon Telegraph and Telephone Corporation
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the names of OMRON, NTT Software, and NTT
- * not be used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. OMRON, NTT Software,
- * and NTT make no representations about the suitability of this
- * software for any purpose.  It is provided "as is" without express or
- * implied warranty.
- *
- * OMRON, NTT SOFTWARE, AND NTT, DISCLAIM ALL WARRANTIES WITH REGARD
- * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS, IN NO EVENT SHALL OMRON, NTT SOFTWARE, OR NTT, BE
- * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- *     Authors: Li Yuhong              OMRON Corporation
- *              Tetsuya Kato           NTT Software Corporation
- *              Hiroshi Kuribayashi    OMRON Corporation
- *   
- */
-/*
-
-Copyright (c) 1987  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-#include "_fallibint.h"
-#include "_fallcint.h"
-#include <X11/Xlocale.h>
-#include <X11/Xos.h>
-
-#ifdef X_LOCALE
-
-/* alternative setlocale() for when the OS does not provide one */
-
-#ifdef X_NOT_STDC_ENV
-extern char *getenv();
-#endif
-
-#define MAXLOCALE      64      /* buffer size of locale name */
-
-#if NeedFunctionPrototypes
-char *
-_falsetlocale(
-    int                  category,
-    _Xconst char *name
-)
-#else
-char *
-_falsetlocale(category, name)
-    int                category;
-    char       *name;
-#endif
-{
-    static char *xsl_name;
-    char *old_name;
-    XrmMethods methods;
-    XPointer state;
-
-    if (category != LC_CTYPE && category != LC_ALL)
-       return NULL;
-    if (!name) {
-       if (xsl_name)
-           return xsl_name;
-       return "C";
-    }
-    if (!*name)
-       name = getenv("LC_CTYPE");
-    if (!name || !*name)
-       name = getenv("LANG");
-    if (!name || !*name)
-       name = "C";
-    old_name = xsl_name;
-    xsl_name = (char *)name;
-    methods = _falrmInitParseInfo(&state);
-    xsl_name = old_name;
-    if (!methods)
-       return NULL;
-    name = (*methods->lcname)(state);
-    xsl_name = Xmalloc(strlen(name) + 1);
-    if (!xsl_name) {
-       xsl_name = old_name;
-       (*methods->destroy)(state);
-       return NULL;
-    }
-    strcpy(xsl_name, name);
-    if (old_name)
-       Xfree(old_name);
-    (*methods->destroy)(state);
-    return xsl_name;
-}
-
-#else /* X_LOCALE */
-
-/*
- * _fallcMapOSLocaleName is an implementation dependent routine that derives
- * the LC_CTYPE locale name as used in the sample implementation from that
- * returned by setlocale.
- * Should match the code in Xt ExtractLocaleName.
- */
-
-char *
-_fallcMapOSLocaleName(osname, siname)
-    char *osname;
-    char *siname;
-{
-#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(AIXV3) || defined(ultrix) || defined(WIN32)
-#ifdef hpux
-#define SKIPCOUNT 2
-#define STARTCHAR ':'
-#define ENDCHAR ';'
-#else
-#ifdef ultrix
-#define SKIPCOUNT 2
-#define STARTCHAR '\001'
-#define ENDCHAR '\001'
-#else
-#ifdef WIN32
-#define SKIPCOUNT 1
-#define STARTCHAR '='
-#define ENDCHAR ';'
-#define WHITEFILL
-#else
-#if defined(AIXV3)
-#define STARTCHAR ' '
-#define ENDCHAR ' '
-#else
-#if !defined(sun) || defined(SVR4)
-#define STARTCHAR '/'
-#endif
-#define ENDCHAR '/'
-#endif
-#endif
-#endif
-#endif
-
-    char           *start;
-    char           *end;
-    int             len;
-#ifdef SKIPCOUNT
-    int                    n;
-#endif
-
-    start = osname;
-#ifdef SKIPCOUNT
-    for (n = SKIPCOUNT;
-        --n >= 0 && start && (start = strchr (start, STARTCHAR));
-        start++)
-       ;
-    if (!start)
-       start = osname;
-#endif
-#ifdef STARTCHAR
-    if (start && (start = strchr (start, STARTCHAR))) {
-       start++;
-#endif
-       if (end = strchr (start, ENDCHAR)) {
-           len = end - start;
-           strncpy(siname, start, len);
-           *(siname + len) = '\0';
-#ifdef WHITEFILL
-           for (start = siname; start = strchr(start, ' '); )
-               *start++ = '-';
-#endif
-           return siname;
-#ifdef STARTCHAR
-       }
-#endif
-    }
-#ifdef WHITEFILL
-    if (strchr(osname, ' ')) {
-       strcpy(siname, osname);
-       for (start = siname; start = strchr(start, ' '); )
-           *start++ = '-';
-       return siname;
-    }
-#endif
-#undef STARTCHAR
-#undef ENDCHAR
-#undef WHITEFILL
-#endif
-    return osname;
-}
-
-#endif  /* X_LOCALE */
diff --git a/cde/programs/dtudcfonted/libfal/_fallcCT.c b/cde/programs/dtudcfonted/libfal/_fallcCT.c
deleted file mode 100644 (file)
index 4905272..0000000
+++ /dev/null
@@ -1,906 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcCT.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:33        */ 
-/* $XConsortium: _fallcCT.c /main/1 1996/04/08 15:15:33 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#include "_fallibint.h"
-#include "_fallcPubI.h"
-#include <X11/Xos.h>
-#include <stdio.h>
-
-typedef struct _StateRec {
-    XlcCharSet charset;
-    XlcCharSet GL_charset;
-    XlcCharSet GR_charset;
-    XlcCharSet ext_seg_charset;
-    int ext_seg_left;
-} StateRec, *State;
-
-typedef struct _CTDataRec {
-    char *name;
-    char *encoding;            /* Compound Text encoding */
-} CTDataRec, *CTData;
-
-typedef struct _CTInfoRec {
-    XlcCharSet charset;
-    int encoding_len;
-    char *encoding;            /* Compound Text encoding */
-    int ext_segment_len;
-    char *ext_segment;         /* extended segment */
-    struct _CTInfoRec *next;
-} CTInfoRec, *CTInfo;
-
-static CTDataRec default_ct_data[] =
-{
-    { "ISO8859-1:GL", "\033(B" },
-    { "ISO8859-1:GR", "\033-A" },
-    { "ISO8859-2:GR", "\033-B" },
-    { "ISO8859-3:GR", "\033-C" },
-    { "ISO8859-4:GR", "\033-D" },
-    { "ISO8859-7:GR", "\033-F" },
-    { "ISO8859-6:GR", "\033-G" },
-    { "ISO8859-8:GR", "\033-H" },
-    { "ISO8859-5:GR", "\033-L" },
-    { "ISO8859-9:GR", "\033-M" },
-    { "JISX0201.1976-0:GL", "\033(J" },
-    { "JISX0201.1976-0:GR", "\033)I" },
-
-    { "GB2312.1980-0:GL", "\033$(A" },
-    { "GB2312.1980-0:GR", "\033$)A" },
-    { "JISX0208.1983-0:GL", "\033$(B" },
-    { "JISX0208.1983-0:GR", "\033$)B" },
-    { "KSC5601.1987-0:GL", "\033$(C" },
-    { "KSC5601.1987-0:GR", "\033$)C" },
-#ifdef notdef
-    { "JISX0212.1990-0:GL", "\033$(D" },
-    { "JISX0212.1990-0:GR", "\033$)D" },
-    { "CNS11643.1986-1:GL", "\033$(G" },
-    { "CNS11643.1986-1:GR", "\033$)G" },
-    { "CNS11643.1986-2:GL", "\033$(H" },
-    { "CNS11643.1986-2:GR", "\033$)H" },
-
-    /* Non-Standard Character Set Encodings */
-    { "TIS620.2533-1:GR", "\033-T"},
-#endif
-} ; 
-
-#define XctC0          0x0000
-#define XctHT          0x0009
-#define XctNL          0x000a
-#define XctESC         0x001b
-#define XctGL          0x0020
-#define XctC1          0x0080
-#define XctCSI         0x009b
-#define XctGR          0x00a0
-
-#define XctCntrlFunc   0x0023
-#define XctMB          0x0024
-#define XctOtherCoding 0x0025
-#define XctGL94                0x0028
-#define XctGR94                0x0029
-#define XctGR96                0x002d
-#define XctNonStandard 0x002f
-#define XctIgnoreExt   0x0030
-#define XctNotIgnoreExt        0x0031
-#define XctLeftToRight 0x0031
-#define XctRightToLeft 0x0032
-#define XctDirection   0x005d
-#define XctDirectionEnd        0x005d
-
-#define XctGL94MB      0x2428
-#define XctGR94MB      0x2429
-#define XctExtSeg      0x252f
-#define XctOtherSeg    0x2f00
-
-#define XctESCSeq      0x1b00
-#define XctCSISeq      0x9b00
-
-#define SKIP_I(str)    while (*(str) >= 0x20 && *(str) <=  0x2f) (str)++;
-#define SKIP_P(str)    while (*(str) >= 0x30 && *(str) <=  0x3f) (str)++;
-
-typedef struct {
-    XlcSide side;
-    int char_size;
-    int set_size;
-    int ext_seg_length;
-    int version;
-    CTInfo ct_info;
-} CTParseRec, *CTParse;
-
-static CTInfo ct_list = NULL;
-
-static CTInfo
-_XlcGetCTInfoFromEncoding(encoding, length)
-    register char *encoding;
-    register int length;
-{
-    register CTInfo ct_info;
-
-    for (ct_info = ct_list; ct_info; ct_info = ct_info->next) {
-       if (length >= ct_info->encoding_len) {
-           if (ct_info->ext_segment) {
-               if (!strncmp(ct_info->encoding, encoding, 4) &&
-                   !strncmp(ct_info->ext_segment, encoding + 6,
-                            ct_info->ext_segment_len))
-                   return ct_info;
-           } else if (!strncmp(ct_info->encoding, encoding,
-                               ct_info->encoding_len)) {
-               return ct_info;
-           }
-       }
-    }
-
-    return (CTInfo) NULL;
-}
-
-static unsigned int
-_XlcParseCT(parse, text, length)
-    register CTParse parse;
-    char **text;
-    int *length;
-{
-    unsigned int ret = 0;
-    unsigned char ch;
-    register unsigned char *str = (unsigned char *) *text;
-
-    bzero((char *) parse, sizeof(CTParseRec));
-
-    switch (ch = *str++) {
-       case XctESC:
-           if (*str == XctOtherCoding && *(str + 1) == XctNonStandard
-               && *(str + 2) >= 0x30 && *(str + 2) <= 0x3f && *length >= 6) {
-
-               /* non-standard encodings */
-               parse->side = XlcGLGR;
-               parse->set_size = 0;
-               str += 2;
-               if (*str <= 0x34) {
-                   parse->char_size = *str - 0x30;
-                   if (parse->char_size == 0) parse->char_size = 1;
-                   ret = XctExtSeg;
-                   parse->ct_info = _XlcGetCTInfoFromEncoding(*text, *length);
-               } else
-                   ret = XctOtherSeg;
-               str++;
-               parse->ext_seg_length = (*str - 128) * 128 + *(str + 1) - 128;
-               str += 2;
-
-               goto done;
-           } else if (*str == XctCntrlFunc && *length >= 4 &&
-                      *(str + 1) >= 0x20 && *(str + 1) <= 0x2f &&
-                      (*(str + 2) == XctIgnoreExt ||
-                       *(str + 2) == XctNotIgnoreExt)) {
-               
-               /* ignore extension or not */
-               str++;
-               parse->version = *str++ - 0x20;
-               ret = *str++;
-
-               goto done;
-           }
-           
-           if (*str == XctMB) {        /* multiple-byte sets */
-               parse->char_size = 2;
-               str++;
-           } else
-               parse->char_size = 1;
-       
-           switch (*str) {
-               case XctGL94:
-                   parse->side = XlcGL;
-                   parse->set_size = 94;
-                   ret = (parse->char_size == 1) ? XctGL94 : XctGL94MB;
-                   break;
-               case XctGR94:
-                   parse->side = XlcGR;
-                   parse->set_size = 94;
-                   ret = (parse->char_size == 1) ? XctGR94 : XctGR94MB;
-                   break;
-               case XctGR96:
-                   if (parse->char_size == 1) {
-                       parse->side = XlcGR;
-                       parse->set_size = 96;
-                       ret = XctGR96;
-                   }
-                   break;
-           }
-           if (ret) {
-               str++;
-               if (*str >= 0x24 && *str <= 0x2f) {     /* non-standard */
-                   ret = 0;
-                   str++;
-               }
-           }
-
-           SKIP_I(str)
-
-           if (ret && *str < 0x40)                     /* non-standard */
-               ret = 0;
-
-           if (*str < 0x30 || *str > 0x7e || (char *) str - *text >= *length)
-               break;
-           
-           if (ret == 0)
-               ret = XctESCSeq;
-           else {
-               if (parse->char_size == 2) {
-                   if (*str >= 0x70)
-                       parse->char_size = 4;
-                   else if (*str >= 0x60)
-                       parse->char_size = 3;
-               }
-               parse->ct_info = _XlcGetCTInfoFromEncoding(*text, *length);
-           }
-           str++;
-           goto done;
-       case XctCSI:
-           /* direction */
-           if (*str == XctLeftToRight && *(str + 1) == XctDirection) {
-               ret = XctLeftToRight;
-               str += 2;
-               goto done;
-           } else if (*str == XctRightToLeft && *(str + 1) == XctDirection) {
-               ret = XctRightToLeft;
-               str += 2;
-               goto done;
-           } else if (*str == XctDirectionEnd) {
-               ret = XctDirectionEnd;
-               str++;
-               goto done;
-           }
-
-           SKIP_P(str)
-           SKIP_I(str)
-
-           if (*str < 0x40 && *str > 0x7e)
-               break;
-
-           ret = XctCSISeq;
-           str++;
-           goto done;
-    }
-
-    if (ch & 0x80) {
-       if (ch < 0xa0)
-           ret = XctC1;
-       else
-           ret = XctGR;
-    } else {
-       if (ch == XctHT || ch == XctNL)
-           ret = ch;
-       else if (ch < 0x20)
-           ret = XctC0;
-       else
-           ret = XctGL;
-    }
-
-    return ret;
-
-done:
-    *length -= (char *) str - *text;
-    *text = (char *) str;
-
-    return ret;
-}
-
-XlcCharSet
-_fallcAddCT(name, encoding)
-    char *name;
-    char *encoding;
-{
-    CTInfo ct_info;
-    XlcCharSet charset;
-    CTParseRec parse;
-    char *ct_ptr = encoding;
-    int length;
-    unsigned int type;
-
-    length = strlen(encoding);
-
-    switch (type = _XlcParseCT(&parse, &ct_ptr, &length)) {
-       case XctExtSeg:
-       case XctGL94:
-       case XctGL94MB:
-       case XctGR94:
-       case XctGR94MB:
-       case XctGR96:
-           if (parse.ct_info)          /* existed */
-               return parse.ct_info->charset;
-           break;
-       default:
-           return (XlcCharSet) NULL;
-    }
-
-    charset = _fallcCreateDefaultCharSet(name, encoding);
-    if (charset == NULL)
-       return (XlcCharSet) NULL;
-    _fallcAddCharSet(charset);
-
-    ct_info = (CTInfo) Xmalloc(sizeof(CTInfoRec));
-    if (ct_info == NULL)
-       return (XlcCharSet) NULL;
-    
-    ct_info->charset = charset;
-    ct_info->encoding = charset->ct_sequence;
-    ct_info->encoding_len = strlen(ct_info->encoding);
-    if (type == XctExtSeg) {
-       ct_info->ext_segment = ct_info->encoding + 6;
-       ct_info->ext_segment_len = strlen(ct_info->ext_segment);
-    } else {
-       ct_info->ext_segment = NULL;
-       ct_info->ext_segment_len = 0;
-    }
-    ct_info->next = ct_list;
-    ct_list = ct_info;
-
-    return charset;
-}
-
-static CTInfo
-_XlcGetCTInfoFromCharSet(charset)
-    register XlcCharSet charset;
-{
-    register CTInfo ct_info;
-
-    for (ct_info = ct_list; ct_info; ct_info = ct_info->next)
-       if (ct_info->charset == charset)
-           return ct_info;
-
-    return (CTInfo) NULL;
-}
-
-Bool
-_fallcParseCharSet(charset)
-    XlcCharSet charset;
-{
-    CTParseRec parse;
-    char *ptr, buf[BUFSIZ];
-    unsigned int type;
-    int length;
-
-    if (charset->ct_sequence == NULL)
-       return False;
-
-    ptr = charset->ct_sequence;
-    length = strlen(ptr);
-
-    type = _XlcParseCT(&parse, &ptr, &length);
-       
-    if (charset->name) {
-       charset->xrm_name = falrmStringToQuark(charset->name);
-
-       snprintf(buf, sizeof(buf), "%s", charset->name);
-       if (ptr = strchr(buf, ':'))
-           *ptr = '\0';
-       charset->xrm_encoding_name = falrmStringToQuark(buf);
-       charset->encoding_name = falrmQuarkToString(charset->xrm_encoding_name);
-    } else {
-       charset->xrm_name = 0;
-       charset->encoding_name = NULL;
-       charset->xrm_encoding_name = 0;
-    }
-
-    charset->side = parse.side;
-    charset->char_size = parse.char_size;
-    charset->set_size = parse.set_size;
-
-    return True;
-}
-
-static void init_converter();
-
-Bool
-_fallcInitCTInfo()
-{
-    register XlcCharSet charset;
-    register CTData ct_data;
-    register int num;
-
-    if (ct_list == NULL) {
-       num = sizeof(default_ct_data) / sizeof(CTDataRec);
-       for (ct_data = default_ct_data; num-- > 0; ct_data++) {
-           charset = _fallcAddCT(ct_data->name, ct_data->encoding);
-           if (charset == NULL)
-               continue;
-       }
-       init_converter();
-    }
-
-    return True;
-}
-
-
-static int
-_XlcCheckCTSequence(state, ctext, ctext_len)
-    State state;
-    char **ctext;
-    int *ctext_len;
-{
-    XlcCharSet charset;
-    CTParseRec parse;
-    CTInfo ct_info;
-    int length;
-
-    _XlcParseCT(&parse, ctext, ctext_len);
-
-    ct_info = parse.ct_info;
-    if (parse.ext_seg_length > 0) {    /* XctExtSeg or XctOtherSeg */
-       if (ct_info) {
-           length = ct_info->ext_segment_len;
-           *ctext += length;
-           *ctext_len -= length;
-           state->ext_seg_left = parse.ext_seg_length - length;
-           state->ext_seg_charset = ct_info->charset;
-       } else {
-           state->ext_seg_left = parse.ext_seg_length;
-           state->ext_seg_charset = NULL;
-       }
-    } else if (ct_info) {
-       if (charset = ct_info->charset) {
-           if (charset->side == XlcGL)
-               state->GL_charset = charset;
-           else if (charset->side == XlcGR)
-               state->GR_charset = charset;
-       }
-    }
-
-    return 0;
-}
-
-
-static void
-init_state(conv)
-    XlcConv conv;
-{
-    State state = (State) conv->state;
-    static XlcCharSet GL_charset = NULL;
-    static XlcCharSet GR_charset = NULL;
-
-    if (GL_charset == NULL) {
-       GL_charset = _fallcGetCharSet("ISO8859-1:GL");
-       GR_charset = _fallcGetCharSet("ISO8859-1:GR");
-    }
-
-    state->GL_charset = state->charset = GL_charset;
-    state->GR_charset = GR_charset;
-    state->ext_seg_charset = NULL;
-    state->ext_seg_left = 0;
-}
-
-static int
-cttocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register State state = (State) conv->state;
-    register unsigned char ch;
-    int length;
-    XlcCharSet charset = NULL;
-    char *ctptr, *bufptr;
-    int ctext_len, buf_len;
-
-    ctptr = *((char **) from);
-    bufptr = *((char **) to);
-    ctext_len = *from_left;
-    buf_len = *to_left;
-
-    while (ctext_len > 0 && buf_len > 0) {
-       if (state->ext_seg_left > 0) {
-           length = min(state->ext_seg_left, ctext_len);
-           length = min(length, buf_len);
-
-           ctext_len -= length;
-           state->ext_seg_left -= length;
-
-           if (state->ext_seg_charset) {
-               charset = state->ext_seg_charset;
-               buf_len -= length;
-               if (charset->side == XlcGL) {
-                   while (length-- > 0)
-                       *bufptr++ = *ctptr++ & 0x7f;
-               } else if (charset->side == XlcGR) {
-                   while (length-- > 0)
-                       *bufptr++ = *ctptr++ | 0x80;
-               } else {
-                   while (length-- > 0)
-                       *bufptr++ = *ctptr++;
-               }
-
-               if (state->ext_seg_left < 1)
-                   state->ext_seg_charset = NULL;
-           }
-           break;
-       }
-       ch = *((unsigned char *) ctptr);
-       if (ch == 0x1b || ch == 0x9b) {
-           length = _XlcCheckCTSequence(state, &ctptr, &ctext_len);
-           if (length < 0)
-               return -1;
-           if (state->ext_seg_left > 0 && charset)
-               break;
-       } else {
-           if (charset) {
-               if (charset != (ch & 0x80 ? state->GR_charset :
-                               state->GL_charset))
-                   break;
-           } else
-               charset = ch & 0x80 ? state->GR_charset : state->GL_charset;
-
-           if ((ch < 0x20 && ch != '\0' && ch != '\n' && ch != '\t') ||
-                   (ch >= 0x80 && ch < 0xa0))
-               return -1;
-
-           *bufptr++ = *ctptr++;
-           ctext_len--;
-           buf_len--;
-       }
-    }
-
-    if (charset)
-       state->charset = charset;
-    if (num_args > 0)
-       *((XlcCharSet *) args[0]) = state->charset;
-
-    *from_left -= ctptr - *((char **) from);
-    *from = (XPointer) ctptr;
-
-    *to_left -= bufptr - *((char **) to);
-    *to = (XPointer) bufptr;
-
-    return 0;
-}
-
-static int
-cstoct(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    XlcSide side;
-    unsigned char min_ch, max_ch;
-    register unsigned char ch;
-    int length;
-    CTInfo ct_info;
-    XlcCharSet charset;
-    char *csptr, *ctptr;
-    int csstr_len, ct_len;
-
-    if (num_args < 1)
-       return -1;
-    
-    csptr = *((char **) from);
-    ctptr = *((char **) to);
-    csstr_len = *from_left;
-    ct_len = *to_left;
-    
-    charset = (XlcCharSet) args[0];
-
-    ct_info = _XlcGetCTInfoFromCharSet(charset);
-    if (ct_info == NULL)
-       return -1;
-
-    side = charset->side;
-
-    if (ct_info->ext_segment) {
-       if (charset != state->ext_seg_charset && state->ext_seg_left < 1) {
-           length = ct_info->encoding_len;
-           if (ct_len < length)
-               return -1;
-           strcpy(ctptr, ct_info->encoding);
-           ctptr[4] = ((ct_info->ext_segment_len + csstr_len) / 128) | 0x80;
-           ctptr[5] = ((ct_info->ext_segment_len + csstr_len) % 128) | 0x80;
-           ctptr += length;
-           ct_len -= length;
-           state->ext_seg_left = csstr_len;
-       }
-       length = min(state->ext_seg_left, csstr_len);
-       state->ext_seg_left -= length;
-
-       if (side == XlcGL) {
-           while (length-- > 0)
-               *ctptr++ = *csptr++ & 0x7f;
-       } else if (side == XlcGR) {
-           while (length-- > 0)
-               *ctptr++ = *csptr++ | 0x80;
-       } else {
-           while (length-- > 0)
-               *ctptr++ = *csptr++;
-       }
-       state->ext_seg_charset = (state->ext_seg_left > 0) ? charset : NULL;
-    } else {
-       if ((side == XlcGR && charset != state->GR_charset) ||
-           (side == XlcGL && charset != state->GL_charset)) {
-
-           ct_len -= ct_info->encoding_len;
-           if (ct_len < 0)
-               return -1;
-           strcpy(ctptr, ct_info->encoding);
-           ctptr += ct_info->encoding_len;
-       }
-
-       min_ch = 0x20;
-       max_ch = 0x7f;
-
-       if (charset->set_size == 94) {
-           max_ch--;
-           if (charset->char_size > 1 || side == XlcGR)
-               min_ch++;
-       }
-
-       while (csstr_len > 0 && ct_len > 0) {
-           ch = *((unsigned char *) csptr++) & 0x7f;
-           if (ch < min_ch || ch > max_ch)
-               if (ch != 0x00 && ch != 0x09 && ch != 0x0a && ch != 0x1b)
-                   continue;   /* XXX */
-           if (side == XlcGL)
-               *ctptr++ = ch & 0x7f;
-           else if (side == XlcGR)
-               *ctptr++ = ch | 0x80;
-           else
-               *ctptr++ = ch;
-           csstr_len--;
-           ct_len--;
-       }
-       if (side == XlcGR)
-           state->GR_charset = charset;
-       else if (side == XlcGL)
-           state->GL_charset = charset;
-    }
-
-    *from_left -= csptr - *((char **) from);
-    *from = (XPointer) csptr;
-
-    *to_left -= ctptr - *((char **) to);
-    *to = (XPointer) ctptr;
-
-    return 0;
-}
-
-static int
-strtocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    register char *src, *dst;
-    unsigned char side;
-    register length;
-
-    src = (char *) *from;
-    dst = (char *) *to;
-
-    length = min(*from_left, *to_left);
-    side = *((unsigned char *) src) & 0x80;
-
-    while (side == (*((unsigned char *) src) & 0x80) && length-- > 0)
-       *dst++ = *src++;
-    
-    *from_left -= src - (char *) *from;
-    *from = (XPointer) src;
-    *to_left -= dst - (char *) *to;
-    *to = (XPointer) dst;
-
-    if (num_args > 0)
-       *((XlcCharSet *)args[0]) = side ? state->GR_charset : state->GL_charset;
-
-    return 0;
-}
-
-static int
-cstostr(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    char *csptr, *string_ptr;
-    int csstr_len, str_len;
-    unsigned char ch;
-    int unconv_num = 0;
-
-    if (num_args < 1 || (state->GL_charset != (XlcCharSet) args[0] &&
-       state->GR_charset != (XlcCharSet) args[0]))
-       return -1;
-    
-    csptr = *((char **) from);
-    string_ptr = *((char **) to);
-    csstr_len = *from_left;
-    str_len = *to_left;
-
-    while (csstr_len-- > 0 && str_len > 0) {
-       ch = *((unsigned char *) csptr++);
-       if ((ch < 0x20 && ch != 0x00 && ch != 0x09 && ch != 0x0a) ||
-           ch == 0x7f || ((ch & 0x80) && ch < 0xa0)) {
-           unconv_num++;
-           continue;
-       }
-       *((unsigned char *) string_ptr++) = ch;
-       str_len--;
-    }
-
-    *from_left -= csptr - *((char **) from);
-    *from = (XPointer) csptr;
-
-    *to_left -= string_ptr - *((char **) to);
-    *to = (XPointer) string_ptr;
-
-    return unconv_num;
-}
-
-
-static void
-close_converter(conv)
-    XlcConv conv;
-{
-    if (conv->state)
-       Xfree((char *) conv->state);
-
-    Xfree((char *) conv);
-}
-
-static XlcConv
-create_conv(methods)
-    XlcConvMethods methods;
-{
-    register XlcConv conv;
-
-    conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
-    if (conv == NULL)
-       return (XlcConv) NULL;
-
-    conv->state = (XPointer) Xmalloc(sizeof(StateRec));
-    if (conv->state == NULL)
-       goto err;
-    
-    conv->methods = methods;
-
-    init_state(conv);
-
-    return conv;
-
-err:
-    close_converter(conv);
-
-    return (XlcConv) NULL;
-}
-
-static XlcConvMethodsRec cttocs_methods = {
-    close_converter,
-    cttocs,
-    init_state
-} ;
-
-static XlcConv
-open_cttocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(&cttocs_methods);
-}
-
-static XlcConvMethodsRec cstoct_methods = {
-    close_converter,
-    cstoct,
-    init_state
-} ;
-
-static XlcConv
-open_cstoct(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(&cstoct_methods);
-}
-
-static XlcConvMethodsRec strtocs_methods = {
-    close_converter,
-    strtocs,
-    init_state
-} ;
-
-static XlcConv
-open_strtocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(&strtocs_methods);
-}
-
-static XlcConvMethodsRec cstostr_methods = {
-    close_converter,
-    cstostr,
-    init_state
-} ;
-
-static XlcConv
-open_cstostr(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(&cstostr_methods);
-}
-
-static void
-init_converter()
-{
-    _fallcSetConverter((XLCd) NULL, XlcNCompoundText, (XLCd) NULL, XlcNCharSet,
-                    open_cttocs);
-    _fallcSetConverter((XLCd) NULL, XlcNString, (XLCd) NULL, XlcNCharSet,
-                    open_strtocs);
-
-    _fallcSetConverter((XLCd) NULL, XlcNCharSet, (XLCd) NULL, XlcNCompoundText,
-                    open_cstoct);
-    _fallcSetConverter((XLCd) NULL, XlcNCharSet, (XLCd) NULL, XlcNString,
-                    open_cstostr);
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcCharSet.c b/cde/programs/dtudcfonted/libfal/_fallcCharSet.c
deleted file mode 100644 (file)
index 5dc19fd..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcCharSet.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:33   */ 
-/* $XConsortium: _fallcCharSet.c /main/1 1996/04/08 15:15:44 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#include <stdio.h>
-#include "_fallibint.h"
-#include "_fallcPublic.h"
-
-#if NeedVarargsPrototypes
-char *
-_fallcGetCSValues(XlcCharSet charset, ...)
-#else
-char *
-_fallcGetCSValues(charset, va_alist)
-    XlcCharSet charset;
-    va_dcl
-#endif
-{
-    va_list var;
-    XlcArgList args;
-    char *ret;
-    int num_args;
-
-    Va_start(var, charset);
-    _fallcCountVaList(var, &num_args);
-    va_end(var);
-
-    Va_start(var, charset);
-    _fallcVaToArgList(var, num_args, &args);
-    va_end(var);
-
-    if (args == (XlcArgList) NULL)
-       return (char *) NULL;
-    
-    if (charset->get_values)
-       ret = (*charset->get_values)(charset, args, num_args);
-    else
-       ret = args->name;
-
-    Xfree(args);
-
-    return ret;
-}
-
-typedef struct _XlcCharSetListRec {
-    XlcCharSet charset;
-    struct _XlcCharSetListRec *next;
-} XlcCharSetListRec, *XlcCharSetList;
-
-static XlcCharSetList charset_list = NULL;
-
-XlcCharSet
-_fallcGetCharSet(name)
-    char *name;
-{
-    XlcCharSetList list;
-    XrmQuark xrm_name;
-    
-    xrm_name = falrmStringToQuark(name);
-
-    for (list = charset_list; list; list = list->next) {
-       if (xrm_name == list->charset->xrm_name)
-           return (XlcCharSet) list->charset;
-    }
-
-    return (XlcCharSet) NULL;
-}
-
-Bool
-_fallcAddCharSet(charset)
-    XlcCharSet charset;
-{
-    XlcCharSetList list;
-
-    if (_fallcGetCharSet(charset->name))
-       return False;
-
-    list = (XlcCharSetList) Xmalloc(sizeof(XlcCharSetListRec));
-    if (list == NULL)
-       return False;
-    
-    list->charset = charset;
-    list->next = charset_list;
-    charset_list = list;
-
-    return True;
-}
-
-static XlcResource resources[] = {
-    { XlcNName, NULLQUARK, sizeof(char *),
-      XOffsetOf(XlcCharSetRec, name), XlcGetMask },
-    { XlcNEncodingName, NULLQUARK, sizeof(char *),
-      XOffsetOf(XlcCharSetRec, encoding_name), XlcGetMask },
-    { XlcNSide, NULLQUARK, sizeof(XlcSide),
-      XOffsetOf(XlcCharSetRec, side), XlcGetMask },
-    { XlcNCharSize, NULLQUARK, sizeof(int),
-      XOffsetOf(XlcCharSetRec, char_size), XlcGetMask },
-    { XlcNSetSize, NULLQUARK, sizeof(int),
-      XOffsetOf(XlcCharSetRec, set_size), XlcGetMask },
-    { XlcNControlSequence, NULLQUARK, sizeof(char *),
-      XOffsetOf(XlcCharSetRec, ct_sequence), XlcGetMask }
-};
-
-static char *
-get_values(charset, args, num_args)
-    register XlcCharSet charset;
-    register XlcArgList args;
-    register int num_args;
-{
-    if (resources[0].xrm_name == NULLQUARK)
-       _fallcCompileResourceList(resources, XlcNumber(resources));
-
-    return _fallcGetValues((XPointer) charset, resources, XlcNumber(resources),
-                        args, num_args, XlcGetMask);
-}
-
-XlcCharSet
-_fallcCreateDefaultCharSet(name, ct_sequence)
-    char *name;
-    char *ct_sequence;
-{
-    XlcCharSet charset;
-
-    charset = (XlcCharSet) Xmalloc(sizeof(XlcCharSetRec));
-    if (charset == NULL)
-       return (XlcCharSet) NULL;
-    bzero((char *) charset, sizeof(XlcCharSetRec));
-    
-    charset->name = (char *) Xmalloc(strlen(name) + strlen(ct_sequence) + 2);
-    if (charset->name == NULL) {
-       Xfree((char *) charset);
-       return (XlcCharSet) NULL;
-    }
-    strcpy(charset->name, name);
-    charset->ct_sequence = charset->name + strlen(name) + 1;
-    strcpy(charset->ct_sequence, ct_sequence);
-    charset->get_values = get_values;
-
-    _fallcParseCharSet(charset);
-
-    return (XlcCharSet) charset;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcConv.c b/cde/programs/dtudcfonted/libfal/_fallcConv.c
deleted file mode 100644 (file)
index 5735b31..0000000
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcConv.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:34      */ 
-/* $XConsortium: _fallcConv.c /main/1 1996/04/08 15:15:57 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#include "_fallibint.h"
-#include "_fallcPubI.h"
-#include <stdio.h>
-
-typedef XlcConv (*XlcConverter)();
-
-typedef struct _fallcConverterListRec {
-    XLCd from_lcd;
-    char *from;
-    XrmQuark from_type;
-    XLCd to_lcd;
-    char *to;
-    XrmQuark to_type;
-    XlcConverter converter;
-    struct _fallcConverterListRec *next;
-} XlcConverterListRec, *XlcConverterList;
-
-static XlcConverterList conv_list = NULL;
-
-static void
-close_converter(conv)
-    XlcConv conv;
-{
-    (*conv->methods->close)(conv);
-}
-
-static XlcConv
-get_converter(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    XrmQuark from_type;
-    XLCd to_lcd;
-    XrmQuark to_type;
-{
-    register XlcConverterList list, prev = NULL;
-    XlcConv conv;
-
-    for (list = conv_list; list; list = list->next) {
-       if (list->from_lcd == from_lcd && list->to_lcd == to_lcd 
-           && list->from_type == from_type && list->to_type == to_type) {
-
-           if (prev && prev != conv_list) {    /* XXX */
-               prev->next = list->next;
-               list->next = conv_list;
-               conv_list = list;
-           }
-
-           return (*list->converter)(from_lcd, list->from, to_lcd, list->to);
-       }
-
-       prev = list;
-    }
-    
-    return (XlcConv) NULL;
-}
-
-Bool
-_fallcSetConverter(from_lcd, from, to_lcd, to, converter)
-    XLCd from_lcd;
-    char *from;
-    XLCd to_lcd;
-    char *to;
-    XlcOpenConverterProc converter;
-{
-    register XlcConverterList list;
-    register XrmQuark from_type, to_type;
-
-    from_type = falrmStringToQuark(from);
-    to_type = falrmStringToQuark(to);
-
-    for (list = conv_list; list; list = list->next) {
-       if (list->from_lcd == from_lcd && list->to_lcd == to_lcd 
-           && list->from_type == from_type && list->to_type == to_type) {
-
-           list->converter = converter;
-           return True;
-       }
-    }
-
-    list = (XlcConverterList) Xmalloc(sizeof(XlcConverterListRec));
-    if (list == NULL)
-       return False;
-    
-    list->from_lcd = from_lcd;
-    list->from = from;
-    list->from_type = from_type;
-    list->to_lcd = to_lcd;
-    list->to = to;
-    list->to_type = to_type;
-    list->converter = converter;
-    list->next = conv_list;
-    conv_list = list;
-
-    return True;
-}
-
-typedef struct _ConvRec {
-    XlcConv from_conv;
-    XlcConv to_conv;
-} ConvRec, *Conv;
-
-static int
-indirect_convert(lc_conv, from, from_left, to, to_left, args, num_args)
-    XlcConv lc_conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    Conv conv = (Conv) lc_conv->state;
-    XlcConv from_conv = conv->from_conv;
-    XlcConv to_conv = conv->to_conv;
-    XlcCharSet charset;
-    char buf[BUFSIZ], *cs;
-    XPointer tmp_args[1];
-    int cs_left, ret, length, unconv_num = 0;
-
-    if (from == NULL || *from == NULL) {
-       if (from_conv->methods->reset)
-           (*from_conv->methods->reset)(from_conv);
-
-       if (to_conv->methods->reset)
-           (*to_conv->methods->reset)(to_conv);
-
-       return 0;
-    }
-
-    while (*from_left > 0) {
-       cs = buf;
-       cs_left = BUFSIZ;
-       tmp_args[0] = (XPointer) &charset;
-
-       ret = (*from_conv->methods->convert)(from_conv, from, from_left, &cs,
-                                            &cs_left, tmp_args, 1);
-       if (ret < 0)
-           break;
-
-       length = cs_left = cs - buf;
-       cs = buf;
-
-       tmp_args[0] = (XPointer) charset;
-
-       ret = (*to_conv->methods->convert)(to_conv, &cs, &cs_left, to, to_left,
-                                          tmp_args, 1);
-       if (ret < 0) {
-           unconv_num += length / charset->char_size;
-           continue;
-       }
-       
-       if (*to_left < 1)
-           break;
-    }
-
-    return unconv_num;
-}
-
-static void
-close_indirect_converter(lc_conv)
-    XlcConv lc_conv;
-{
-    Conv conv = (Conv) lc_conv->state;
-
-    if (conv) {
-       if (conv->from_conv)
-           close_converter(conv->from_conv);
-       if (conv->to_conv)
-           close_converter(conv->to_conv);
-
-       Xfree((char *) conv);
-    }
-
-    Xfree((char *) lc_conv);
-}
-
-static void
-reset_indirect_converter(lc_conv)
-    XlcConv lc_conv;
-{
-    Conv conv = (Conv) lc_conv->state;
-
-    if (conv) {
-       if (conv->from_conv && conv->from_conv->methods->reset)
-           (*conv->from_conv->methods->reset)(conv->from_conv);
-       if (conv->to_conv && conv->to_conv->methods->reset)
-           (*conv->to_conv->methods->reset)(conv->to_conv);
-    }
-}
-
-static XlcConvMethodsRec conv_methods = {
-    close_indirect_converter,
-    indirect_convert,
-    reset_indirect_converter
-} ;
-
-static XlcConv
-open_indirect_converter(from_lcd, from, to_lcd, to)
-    XLCd from_lcd;
-    char *from;
-    XLCd to_lcd;
-    char *to;
-{
-    XlcConv lc_conv, from_conv, to_conv;
-    Conv conv;
-    XrmQuark from_type, to_type;
-    static XrmQuark QChar, QCharSet, QCTCharSet = (XrmQuark) 0;
-
-    if (QCTCharSet == (XrmQuark) 0) {
-       QCTCharSet = falrmStringToQuark(XlcNCTCharSet);
-       QCharSet = falrmStringToQuark(XlcNCharSet);
-       QChar = falrmStringToQuark(XlcNChar);
-    }
-
-    from_type = falrmStringToQuark(from);
-    to_type = falrmStringToQuark(to);
-
-    if (from_type == QCharSet || from_type == QChar || to_type == QCharSet ||
-       to_type == QChar)
-       return (XlcConv) NULL;
-
-    lc_conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
-    if (lc_conv == NULL)
-       return (XlcConv) NULL;
-    
-    lc_conv->methods = &conv_methods;
-
-    lc_conv->state = (XPointer) Xmalloc(sizeof(ConvRec));
-    if (lc_conv->state == NULL)
-       goto err;
-    
-    conv = (Conv) lc_conv->state;
-
-    from_conv = get_converter(from_lcd, from_type, from_lcd, QCTCharSet);
-    if (from_conv == NULL)
-       from_conv = get_converter(from_lcd, from_type, from_lcd, QCharSet);
-    if (from_conv == NULL)
-       from_conv = get_converter((XLCd)NULL, from_type, (XLCd)NULL, QCharSet);
-    if (from_conv == NULL)
-       from_conv = get_converter(from_lcd, from_type, from_lcd, QChar);
-    if (from_conv == NULL)
-       goto err;
-    conv->from_conv = from_conv;
-
-    to_conv = get_converter(to_lcd, QCTCharSet, to_lcd, to_type);
-    if (to_conv == NULL)
-       to_conv = get_converter(to_lcd, QCharSet, to_lcd, to_type);
-    if (to_conv == NULL)
-       to_conv = get_converter((XLCd) NULL, QCharSet, (XLCd) NULL, to_type);
-    if (to_conv == NULL)
-       goto err;
-    conv->to_conv = to_conv;
-
-    return lc_conv;
-
-err:
-    close_indirect_converter(lc_conv);
-
-    return (XlcConv) NULL;
-}
-
-XlcConv
-_fallcOpenConverter(from_lcd, from, to_lcd, to)
-    XLCd from_lcd;
-    char *from;
-    XLCd to_lcd;
-    char *to;
-{
-    XlcConv conv;
-    XrmQuark from_type, to_type;
-
-    from_type = falrmStringToQuark(from);
-    to_type = falrmStringToQuark(to);
-
-    if (conv = get_converter(from_lcd, from_type, to_lcd, to_type))
-       return conv;
-    
-    return open_indirect_converter(from_lcd, from, to_lcd, to);
-}
-
-void
-_fallcCloseConverter(conv)
-    XlcConv conv;
-{
-    close_converter(conv);
-}
-
-int
-_fallcConvert(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    return (*conv->methods->convert)(conv, from, from_left, to, to_left, args,
-                                    num_args);
-}
-
-void
-_fallcResetConverter(conv)
-    XlcConv conv;
-{
-    if (conv->methods->reset)
-       (*conv->methods->reset)(conv);
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcDB.c b/cde/programs/dtudcfonted/libfal/_fallcDB.c
deleted file mode 100644 (file)
index 2471519..0000000
+++ /dev/null
@@ -1,1280 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcDB.c 1.3 - Fujitsu source for CDEnext    96/02/29 18:02:53        */ 
-/* $XConsortium: _fallcDB.c /main/1 1996/04/08 15:16:07 cde-fuj $ */
-/*
- *
- * Copyright IBM Corporation 1993
- *
- * All Rights Reserved
- *
- * License to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of IBM not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- *
- * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND 
- * NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL
- * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
-*/
-#ifndef        NOT_X_ENV
-
-#include "syncx.h"
-#include <X11/Xresource.h>
-#include "_fallibint.h"
-#include "_fallcPubI.h"
-
-#else  /* NOT_X_ENV */
-
-#define        Xmalloc malloc
-#define        Xrealloc        realloc
-#define        Xfree   free
-
-#endif /* NOT_X_ENV */
-
-/* specifying NOT_X_ENV allows users to just use
-   the database parsing routine. */
-/* For UDC/VW */
-#ifndef        BUFSIZE
-#define        BUFSIZE 2048
-#endif
-
-#ifdef COMMENT
-#ifdef  BUFSIZE
-#undef BUFSIZE
-#endif
-#define BUFSIZE 6144 /* 2048*3 */
-#endif
-
-#include <stdio.h>
-
-typedef struct _DatabaseRec {
-    char *category;
-    char *name;
-    char **value;
-    int value_num;
-    struct _DatabaseRec *next;
-} DatabaseRec, *Database;
-
-typedef enum {
-    S_NULL,    /* outside category */
-    S_CATEGORY,        /* inside category */
-    S_NAME,    /* has name, expecting values */
-    S_VALUE
-} ParseState;
-
-typedef enum {
-    T_NEWLINE,
-    T_COMMENT,
-    T_SEMICOLON,
-    T_DOUBLE_QUOTE,
-    T_LEFT_BRACE,
-    T_RIGHT_BRACE,
-    T_SPACE,
-    T_TAB,
-    T_BACKSLASH,
-    T_NUMERIC_HEX,
-    T_NUMERIC_DEC,
-    T_NUMERIC_OCT,
-    T_DEFAULT
-} Token;
-
-typedef struct {
-    Token token;       /* token id */
-    char *name;                /* token sequence */
-    int len;           /* length of token sequence */
-    int (*parse_proc)(); /* parsing procedure */
-} TokenTable;
-
-static int f_newline();
-static int f_comment();
-static int f_semicolon();
-static int f_double_quote();
-static int f_left_brace();
-static int f_right_brace();
-static int f_white();
-static int f_backslash();
-static int f_numeric();
-static int f_default();
-
-static TokenTable token_tbl[] = {
-    { T_NEWLINE,       "\n",   1,      f_newline },
-    { T_COMMENT,       "#",    1,      f_comment },
-    { T_SEMICOLON,     ";",    1,      f_semicolon },
-    { T_DOUBLE_QUOTE,  "\"",   1,      f_double_quote },
-    { T_LEFT_BRACE,    "{",    1,      f_left_brace },
-    { T_RIGHT_BRACE,   "}",    1,      f_right_brace },
-    { T_SPACE,         " ",    1,      f_white },
-    { T_TAB,           "\t",   1,      f_white },
-    { T_BACKSLASH,     "\\",   1,      f_backslash },
-    { T_NUMERIC_HEX,   "\\x",  2,      f_numeric },
-    { T_NUMERIC_DEC,   "\\d",  2,      f_numeric },
-    { T_NUMERIC_OCT,   "\\o",  2,      f_numeric },
-    { T_DEFAULT,       " ",    1,      f_default },    /* any character */
-     0
-};
-
-#define        SYM_NEWLINE     '\n'
-#define        SYM_COMMENT     '#'
-#define        SYM_SEMICOLON   ';'
-#define        SYM_DOUBLE_QUOTE        '"'
-#define        SYM_LEFT_BRACE  '{'
-#define        SYM_RIGHT_BRACE '}'
-#define        SYM_SPACE       ' '
-#define        SYM_TAB         '\t'
-#define        SYM_BACKSLASH   '\\'
-
-/************************************************************************/
-
-#define MAX_NAME_NEST  64
-
-typedef struct {
-    ParseState pre_state;
-    char *category;
-    char *name[MAX_NAME_NEST];
-    int nest_depth;
-    char **value;
-    int value_len;
-    int value_num;
-    int bufsize;        /* bufMaxSize >= bufsize >= 0 */
-    int bufMaxSize;     /* default : BUFSIZE */
-    char *buf;
-} DBParseInfo;
-
-static DBParseInfo parse_info;
-
-static void init_parse_info()
-{
-    static int first = 1;
-    char *ptr;
-    int  size;
-    if(first == 1){
-       bzero(&parse_info, sizeof(DBParseInfo));
-       parse_info.buf = (char *)Xmalloc(BUFSIZE);
-       parse_info.bufMaxSize = BUFSIZE;
-       first = 0;
-       return ;
-    }
-    ptr = parse_info.buf;
-    size = parse_info.bufMaxSize;
-    bzero(&parse_info, sizeof(DBParseInfo));
-    parse_info.buf = ptr;
-    parse_info.bufMaxSize = size;
-}
-
-static void
-clear_parse_info()
-{
-    int i;
-    char *ptr;
-    int size;
-    parse_info.pre_state = S_NULL;
-    if(parse_info.category != NULL){
-       Xfree(parse_info.category);
-    }
-    for(i = 0; i <= parse_info.nest_depth; ++i){
-       if(parse_info.name[i]){
-           Xfree(parse_info.name[i]);
-       }
-    }
-    if(parse_info.value){
-       if(*parse_info.value){
-           Xfree(*parse_info.value);
-       }
-       Xfree((char *)parse_info.value);
-    }
-    ptr = parse_info.buf;
-    size = parse_info.bufMaxSize;
-    bzero(&parse_info, sizeof(DBParseInfo));
-    parse_info.buf = ptr;
-    parse_info.bufMaxSize = size;
-}
-
-static Bool
-realloc_parse_info(len)
-int len;
-{
-    char *p;
-
-
-    parse_info.bufMaxSize = BUFSIZE * 
-           ((parse_info.bufsize + len)/BUFSIZE + 1);
-    p = (char *)Xrealloc(parse_info.buf, parse_info.bufMaxSize);
-    if(p == NULL){
-        return(False);
-    }
-    parse_info.buf = p;
-
-    return(True);
-}
-/************************************************************************/
-typedef struct _Line {
-    char *str;
-    int cursize;
-    int maxsize;
-    int seq;
-} Line;
-
-static void
-free_line(line)
-    Line *line;
-{
-    if(line->str != NULL){
-       Xfree(line->str);
-    }
-    bzero(line, sizeof(Line));
-}
-
-static int
-realloc_line(line, size)
-    Line *line;
-    int size;
-{
-    char *str = line->str;
-
-    if(str != NULL){
-       str = (char *)Xrealloc(str, size);
-    }else{
-       str = (char *)Xmalloc(size);
-    }
-    if(str == NULL){
-       /* malloc error */
-       bzero(line, sizeof(Line));
-       return 0;
-    }
-    line->str = str;
-    line->maxsize = size;
-    return 1;
-}
-
-#define        iswhite(ch)     ((ch) == SYM_SPACE   || (ch) == SYM_TAB)
-
-static void
-zap_comment(str, quoted)
-    char *str;
-    int *quoted;
-{
-    char *p = str;
-#ifdef never
-    *quoted = 0;
-    if(*p == SYM_COMMENT){
-       int len = strlen(str);
-       if(p[len - 1] == SYM_NEWLINE){
-           *p++ = SYM_NEWLINE;
-       }
-       *p = '\0';
-    }
-#else
-    while(*p){
-       if(*p == SYM_DOUBLE_QUOTE){
-           if(p == str || p[-1] != SYM_BACKSLASH){
-               /* unescaped double quote changes quoted state. */
-               *quoted = *quoted ? 0 : 1;
-           }
-       }
-       if(*p == SYM_COMMENT && !*quoted){
-           int pos = p - str;
-           if(pos == 0 ||
-              iswhite(p[-1]) && (pos == 1 || p[-2] != SYM_BACKSLASH)){
-               int len = strlen(p);
-               if(len > 0 && p[len - 1] == SYM_NEWLINE){
-                   /* newline is the identifier for finding end of value.
-                      therefore, it should not be removed. */
-                   *p++ = SYM_NEWLINE;
-               }
-               *p = '\0';
-               break;
-           }
-       }
-       ++p;
-    }
-#endif
-}
-
-static int
-read_line(fd, line)
-    FILE *fd;
-    Line *line;
-{
-    char buf[BUFSIZE], *p;
-    int len;
-    int quoted = 0;    /* quoted by double quote? */
-    char *str;
-    int cur;
-
-    str = line->str;
-    cur = line->cursize = 0;
-
-    while((p = fgets(buf, BUFSIZE, fd)) != NULL){
-       ++line->seq;
-       zap_comment(p, &quoted);        /* remove comment line */
-       len = strlen(p);
-       if(len == 0){
-           if(cur > 0){
-               break;
-           }
-           continue;
-       }
-       if(cur + len + 1 > line->maxsize){
-           /* need to reallocate buffer. */
-           if(! realloc_line(line, line->maxsize + BUFSIZE)){
-               goto err;       /* realloc error. */
-           }
-           str = line->str;
-       }
-       strncpy(str + cur, p, len);
-
-       cur += len;
-       str[cur] = '\0';
-       if(!quoted){
-           if(cur > 1 && str[cur - 2] == SYM_BACKSLASH &&
-              str[cur - 1] == SYM_NEWLINE){
-               /* the line is ended backslash followed by newline.
-                  need to concatinate the next line. */
-               cur -= 2;
-               str[cur] = '\0';
-           }else{
-               break;
-           }
-       }
-    }
-    if(quoted){
-       /* error.  still in quoted state. */
-       goto err;
-    }
-    return line->cursize = cur;
-
- err:;
-    return -1;
-}
-
-/************************************************************************/
-
-static Token
-get_token(str)
-    char *str;
-{
-    switch(*str){
-    case SYM_NEWLINE:  return T_NEWLINE;
-    case SYM_COMMENT:  return T_COMMENT;
-    case SYM_SEMICOLON:        return T_SEMICOLON;
-    case SYM_DOUBLE_QUOTE:     return T_DOUBLE_QUOTE;
-    case SYM_LEFT_BRACE:       return T_LEFT_BRACE;
-    case SYM_RIGHT_BRACE:      return T_RIGHT_BRACE;
-    case SYM_SPACE:    return T_SPACE;
-    case SYM_TAB:      return T_TAB;
-    case SYM_BACKSLASH:
-       switch(str[1]){
-       case 'x': return T_NUMERIC_HEX;
-       case 'd': return T_NUMERIC_DEC;
-       case 'o': return T_NUMERIC_OCT;
-       }
-       return T_BACKSLASH;
-    default:
-       return T_DEFAULT;
-    }
-}
-
-static int
-get_word(str, word)
-    char *str;
-    char *word;
-{
-    char *p = str, *w = word;
-    Token token;
-    int token_len;
-
-    while(*p != '\0'){
-       token = get_token(p);
-       token_len = token_tbl[token].len;
-       if(token == T_BACKSLASH){
-           p += token_len;
-           if(*p == '\0'){
-               break;
-           }
-           token = get_token(p);
-           token_len = token_tbl[token].len;
-       }else if(token != T_COMMENT &&
-                token != T_DEFAULT){
-           break;
-       }
-       strncpy(w, p, token_len);
-       p += token_len; w += token_len;
-    }
-    *w = '\0';
-    return p - str;    /* return number of scanned chars */
-}
-
-static int
-get_quoted_word(str, word)
-    char *str;
-    char *word;
-{
-    char *p = str, *w = word;
-    Token token;
-    int token_len;
-
-    if(*p == SYM_DOUBLE_QUOTE){
-       ++p;
-    }
-    while(*p != '\0'){
-       token = get_token(p);
-       token_len = token_tbl[token].len;
-       if(token == T_DOUBLE_QUOTE){
-           p += token_len;
-           goto found;
-       }
-       if(token == T_BACKSLASH){
-           p += token_len;
-           if(*p == '\0'){
-               break;
-           }
-           token = get_token(p);
-           token_len = token_tbl[token].len;
-       }
-       strncpy(w, p, token_len);
-       p += token_len; w += token_len;
-    }
-    /* error. cannot detect next double quote */
-    return 0;
-
- found:;
-    *w = '\0';
-    return p - str;
-}
-
-/************************************************************************/
-
-static int
-append_value_list()
-{
-    char **value_list = parse_info.value;
-    char *value = NULL;
-    int value_num = parse_info.value_num;
-    int value_len = parse_info.value_len;
-    char *str = parse_info.buf;
-    int len = parse_info.bufsize;
-    char *p;
-
-    if(len < 1){
-       return 1; /* return with no error */
-    }
-
-    if(value_list == (char **)NULL){
-       value_list = (char **)Xmalloc(sizeof(char *) * 2);
-       *value_list = NULL;
-    }else{
-       value_list = (char **)
-           Xrealloc(value_list, sizeof(char *) * (value_num + 2));
-    }
-    if(value_list == (char **)NULL){
-       goto err;
-    }
-
-    value = *value_list;
-    if(value == NULL){
-       value = (char *)Xmalloc(value_len + len + 1);
-    }else{
-       value = (char *)Xrealloc(value, value_len + len + 1);
-    }
-    if(value == NULL){
-       goto err;
-    }
-    if(value != *value_list){
-       int delta, i;
-       delta = value - *value_list;
-       *value_list = value;
-       for(i = 1; i < value_num; ++i){
-           value_list[i] += delta;
-       }
-    }
-
-    value_list[value_num] = p = &value[value_len];
-    value_list[value_num + 1] = NULL;
-    strncpy(p, str, len);
-    p[len] = 0;
-
-    parse_info.value = value_list;
-    parse_info.value_num = value_num + 1;
-    parse_info.value_len = value_len + len + 1;
-    parse_info.bufsize = 0;
-    return 1;
-
- err:;
-    if(value_list){
-       Xfree((char **)value_list);
-    }
-
-    Xfree(value);
-
-    parse_info.value = (char **)NULL;
-    parse_info.value_num = 0;
-    parse_info.value_len = 0;
-    parse_info.bufsize = 0;
-    return 0;
-}
-
-static int 
-construct_name(name)
-    char *name;
-{
-    register int i, len = 0;
-    char *p = name;
-
-    for(i = 0; i <= parse_info.nest_depth; ++i){
-       len += strlen(parse_info.name[i]) + 1;
-    }
-
-    strcpy(p, parse_info.name[0]);
-    p += strlen(parse_info.name[0]);
-    for(i = 1; i <= parse_info.nest_depth; ++i){
-       *p++ = '.';
-       strcpy(p, parse_info.name[i]);
-       p += strlen(parse_info.name[i]);
-    }
-    return *name != '\0';
-}
-
-static int
-store_to_database(db)
-    Database *db;
-{
-    Database new = (Database)NULL;
-    char name[BUFSIZE];
-
-    if(parse_info.pre_state == S_VALUE){
-       if(! append_value_list()){
-           goto err;
-       }
-    }
-
-    if(parse_info.name[parse_info.nest_depth] == NULL){
-       goto err;
-    }
-
-    new = (Database)Xmalloc(sizeof(DatabaseRec));
-    if(new == (Database)NULL){
-       goto err;
-    }
-    bzero(new, sizeof(DatabaseRec));
-
-    new->category = (char *)Xmalloc(strlen(parse_info.category) + 1);
-    if(new->category == NULL){
-       goto err;
-    }
-    strcpy(new->category, parse_info.category);
-
-    if(! construct_name(name)){
-       goto err;
-    }
-    new->name = (char *)Xmalloc(strlen(name) + 1);
-    if(new->name == NULL){
-       goto err;
-    }
-    strcpy(new->name, name);
-    new->next = *db;
-    new->value = parse_info.value;
-    new->value_num = parse_info.value_num;
-    *db = new;
-
-    Xfree(parse_info.name[parse_info.nest_depth]);
-    parse_info.name[parse_info.nest_depth] = NULL;
-
-    parse_info.value = (char **)NULL;
-    parse_info.value_num = 0;
-    parse_info.value_len = 0;
-
-    return 1;
-
- err:;
-    if(new){
-       if(new->category){
-           Xfree(new->category);
-       }
-       if(new->name){
-           Xfree(new->name);
-       }
-       Xfree(new);
-    }
-    if(parse_info.value){
-       if(*parse_info.value){
-           Xfree(*parse_info.value);
-       }
-       Xfree((char **)parse_info.value);
-       parse_info.value = (char **)NULL;
-       parse_info.value_num = 0;
-       parse_info.value_len = 0;
-    }
-    return 0;
-}
-
-#define END_MARK       "END"
-#define        END_MARK_LEN    3 /*strlen(END_MARK)*/
-
-static int
-check_category_end(str)
-    char *str;
-{
-    char *p;
-    int len;
-
-    p = str;
-    if(strncmp(p, END_MARK, END_MARK_LEN)){
-       return 0;
-    }
-    p += END_MARK_LEN;
-
-    while(iswhite(*p)){
-       ++p;
-    }
-    len = strlen(parse_info.category);
-    if(strncmp(p, parse_info.category, len)){
-       return 0;
-    }
-    p += len;
-    return p - str;
-}
-
-/************************************************************************/
-
-static int
-f_newline(str, token, db)
-    char *str;
-    Token token;
-    Database *db;
-{
-    switch(parse_info.pre_state){
-    case S_NULL:
-    case S_CATEGORY:
-       break;
-    case S_NAME:
-       goto err; /* no value */
-    case S_VALUE:
-       if(!store_to_database(db)){
-           goto err;
-       }
-       parse_info.pre_state = S_CATEGORY;
-       break;
-    default:
-       goto err;
-    }
-    return token_tbl[token].len;
-
- err:;
-    return 0;
-}
-
-static int
-f_comment(str, token, db)
-    char *str;
-    Token token;
-    Database *db;
-{
-    /* NOTE: comment is already handled in read_line(),
-       so this function is not necessary. */
-
-    char *p = str;
-
-    while(*p != SYM_NEWLINE && *p != '\0'){
-       ++p;    /* zap to the end of line */
-    }
-    return p - str;
-}
-
-static int
-f_white(str, token, db)
-    char *str;
-    Token token;
-    Database *db;
-{
-    char *p = str;
-
-    while(iswhite(*p)){
-       ++p;
-    }
-    return p - str;
-}
-
-static int
-f_semicolon(str, token, db)
-    char *str;
-    Token token;
-    Database *db;
-{
-    switch(parse_info.pre_state){
-    case S_NULL:
-    case S_CATEGORY:
-    case S_NAME:
-       goto err;
-    case S_VALUE:
-       if(! append_value_list()){
-           goto err;
-       }
-       parse_info.pre_state = S_VALUE;
-       break;
-    default:
-       goto err;
-    }
-    return token_tbl[token].len;
-
- err:;
-    return 0;
-}
-
-static int
-f_left_brace(str, token, db)
-    char *str;
-    Token token;
-    Database *db;
-{
-    switch(parse_info.pre_state){
-    case S_NULL:
-    case S_CATEGORY:
-       goto err;
-    case S_NAME:
-       if(parse_info.name[parse_info.nest_depth] == NULL ||
-          parse_info.nest_depth + 1 > MAX_NAME_NEST){
-           goto err;
-       }
-       ++parse_info.nest_depth;
-       parse_info.pre_state = S_CATEGORY;
-       break;
-    case S_VALUE:
-    default:
-       goto err;
-    }
-    return token_tbl[token].len;
-
- err:
-    return 0;
-}
-
-static int
-f_right_brace(str, token, db)
-    char *str;
-    Token token;
-    Database *db;
-{
-    if(parse_info.nest_depth < 1){
-       goto err;
-    }
-
-    switch(parse_info.pre_state){
-    case S_NULL:
-    case S_NAME:
-       goto err;
-    case S_VALUE:
-       if(! store_to_database(db)){
-           goto err;
-       }
-       /* fall into next case */
-    case S_CATEGORY:
-       if(parse_info.name[parse_info.nest_depth] != NULL){
-           Xfree(parse_info.name[parse_info.nest_depth]);
-           parse_info.name[parse_info.nest_depth] = NULL;
-       }
-       --parse_info.nest_depth;
-       parse_info.pre_state = S_CATEGORY;
-       break;
-    default:
-       goto err;
-    }
-    return token_tbl[token].len;
-
- err:;
-    return 0;
-}
-
-static int
-f_double_quote(str, token, db)
-    char *str;
-    Token token;
-    Database *db;
-{
-    char word[BUFSIZE];
-    int len = 0;
-
-    switch(parse_info.pre_state){
-    case S_NULL:
-    case S_CATEGORY:
-       goto err;
-    case S_NAME:
-    case S_VALUE:
-       len = get_quoted_word(str, word);
-       if(len < 1){
-           goto err;
-       }
-       if( (parse_info.bufsize + (int)strlen(word) +1) 
-                                       >= parse_info.bufMaxSize){
-           if(realloc_parse_info(strlen(word) +1) == False){
-               goto err;
-           }
-       }
-       strcpy(&parse_info.buf[parse_info.bufsize], word);
-       parse_info.bufsize += strlen(word);
-       parse_info.pre_state = S_VALUE;
-       break;
-    default:
-       goto err;
-    }
-    return len;        /* including length of token */
-
- err:;
-    return 0;
-}
-
-static int
-f_backslash(str, token, db)
-    char *str;
-    Token token;
-    Database *db;
-{
-    return f_default(str, token, db);
-}
-
-static int
-f_numeric(str, token, db)
-    char *str;
-    Token token;
-    Database *db;
-{
-    char word[BUFSIZE], *p;
-    int len;
-    int token_len;
-
-    switch(parse_info.pre_state){
-    case S_NULL:
-    case S_CATEGORY:
-       goto err;
-    case S_NAME:
-    case S_VALUE:
-       token_len = token_tbl[token].len;
-       p = str + token_len;
-       len = get_word(p, word);
-       if(len < 1){
-           goto err;
-       }
-       if( (parse_info.bufsize + token_len + (int)strlen(word) +1) 
-                                       >= parse_info.bufMaxSize){
-           if(realloc_parse_info(token_len + strlen(word) +1) == False){
-               goto err;
-           }
-       }
-       strncpy(&parse_info.buf[parse_info.bufsize], str, token_len);
-       strcpy(&parse_info.buf[parse_info.bufsize + token_len], word);
-       parse_info.bufsize += token_len + strlen(word);
-       parse_info.pre_state = S_VALUE;
-       break;
-    default:
-       goto err;
-    }
-    return len + token_len;
-
- err:;
-    return 0;
-}
-
-static int
-f_default(str, token, db)
-    char *str;
-    Token token;
-    Database *db;
-{
-    char word[BUFSIZE], *p;
-    int len;
-
-    len = get_word(str, word);
-    if(len < 1){
-       goto err;
-    }
-
-    switch(parse_info.pre_state){
-    case S_NULL:
-       if(parse_info.category != NULL){
-           goto err;
-       }
-       p = (char *)Xmalloc(strlen(word) + 1);
-       if(p == NULL){
-           goto err;
-       }
-       strcpy(p, word);
-       parse_info.category = p;
-       parse_info.pre_state = S_CATEGORY;
-       break;
-    case S_CATEGORY:
-       if(parse_info.nest_depth == 0){
-           if(check_category_end(str)){
-               /* end of category is detected.
-                  clear context and zap to end of this line */
-               clear_parse_info();
-               len = strlen(str);
-               break;
-           }
-       }
-       p = (char *)Xmalloc(strlen(word) + 1);
-       if(p == NULL){
-           goto err;
-       }
-       strcpy(p, word);
-       if(parse_info.name[parse_info.nest_depth] != NULL){
-           Xfree(parse_info.name[parse_info.nest_depth]);
-       }
-       parse_info.name[parse_info.nest_depth] = p;
-       parse_info.pre_state = S_NAME;
-       break;
-    case S_NAME:
-    case S_VALUE:
-       if( (parse_info.bufsize + (int)strlen(word) +1 ) 
-                                       >= parse_info.bufMaxSize){
-           if(realloc_parse_info(strlen(word) +1) == False){
-               goto err;
-           }
-       }
-       strcpy(&parse_info.buf[parse_info.bufsize], word);
-       parse_info.bufsize += strlen(word);
-       parse_info.pre_state = S_VALUE;
-       break;
-    default:
-       goto err;
-    }
-    return len;
-
- err:;
-    return 0;
-}
-
-/************************************************************************/
-
-#ifdef DEBUG
-static void
-PrintDatabase(db)
-    Database db;
-{
-    Database p = db;
-    int i = 0, j;
-
-    printf("***\n*** BEGIN Database\n***\n");
-    while(p){
-       printf("%3d: ", i++);
-       printf("%s, %s, ", p->category, p->name);
-       printf("\t[%d: ", p->value_num);
-       for(j = 0; j < p->value_num; ++j){
-           printf("%s, ", p->value[j]);
-       }
-       printf("]\n");
-       p = p->next;
-    }
-    printf("***\n*** END   Database\n***\n");
-}
-#endif
-
-static void
-DestroyDatabase(db)
-    Database db;
-{
-    Database p = db;
-
-    while(p){
-       if(p->category != NULL){
-           Xfree(p->category);
-       }
-       if(p->name != NULL){
-           Xfree(p->name);
-       }
-       if(p->value != (char **)NULL){
-           if(*p->value != NULL){
-               Xfree(*p->value);
-           }
-           Xfree((char *)p->value);
-       }
-       db = p->next;
-       Xfree((char *)p);
-       p = db;
-    }
-}
-
-static int
-CountDatabase(db)
-    Database db;
-{
-    Database p = db;
-    int cnt = 0;
-
-    while(p){
-       ++cnt;
-       p = p->next;
-    }
-    return cnt;
-}
-
-static Database
-CreateDatabase(dbfile)
-    char *dbfile;
-{
-    Database db = (Database)NULL;
-    FILE *fd;
-    Line line;
-    char *p;
-    Token token;
-    int token_len;
-    int len;
-    int error = 0;
-
-    fd = fopen(dbfile, "r");
-    if(fd == (FILE *)NULL){
-       return NULL;
-    }
-
-    bzero(&line, sizeof(Line));
-    init_parse_info();
-
-    do {
-       int rc = read_line(fd, &line);
-       if(rc < 0){
-           error = 1;
-           break;
-       }else if(rc == 0){
-           break;
-       }
-       p = line.str;
-       while(*p){
-           token = get_token(p);
-           len = (*token_tbl[token].parse_proc)(p, token, &db);
-           if(len < 1){
-               error = 1;
-               break;
-           }
-           p += len;
-       }
-    } while (!error);
-
-    if(parse_info.pre_state != S_NULL){
-       clear_parse_info();
-       error = 1;
-    }
-    if(error){
-#ifdef DEBUG
-       fprintf(stderr, "database format error at line %d.\n", line.seq);
-#endif
-       DestroyDatabase(db);
-       db = (Database)NULL;
-    }
-
-    fclose(fd);
-    free_line(&line);
-
-#ifdef DEBUG
-    PrintDatabase(db);
-#endif
-
-    return db;
-}
-
-/************************************************************************/
-
-#ifndef        NOT_X_ENV
-
-/* locale framework functions */
-
-typedef struct _XlcDatabaseRec {
-    XrmQuark category_q;
-    XrmQuark name_q;
-    Database db;
-    struct _XlcDatabaseRec *next;
-} XlcDatabaseRec, *XlcDatabase;
-
-typedef        struct _XlcDatabaseListRec {
-    XrmQuark name_q;
-    XlcDatabase lc_db;
-    Database database;
-    int ref_count;
-    struct _XlcDatabaseListRec *next;
-} XlcDatabaseListRec, *XlcDatabaseList;
-
-/* database cache list (per file) */
-static XlcDatabaseList _db_list = (XlcDatabaseList)NULL;
-
-/************************************************************************/
-/*     _fallcGetResource(lcd, category, class, value, count)           */
-/*----------------------------------------------------------------------*/
-/*     This function retrieves XLocale database information.           */
-/************************************************************************/
-void
-_fallcGetResource(lcd, category, class, value, count)
-    XLCd lcd;
-    char *category;
-    char *class;
-    char ***value;
-    int *count;
-{
-    XLCdPublicMethodsPart *methods = XLC_PUBLIC_METHODS(lcd);
-
-    (*methods->get_resource)(lcd, category, class, value, count);
-    return;
-}
-
-/************************************************************************/
-/*     _fallcGetLocaleDataBase(lcd, category, class, value, count)     */
-/*----------------------------------------------------------------------*/
-/*     This function retrieves XLocale database information.           */
-/************************************************************************/
-void
-_fallcGetLocaleDataBase(lcd, category, name, value, count)
-    XLCd lcd;
-    char *category;
-    char *name;
-    char ***value;
-    int *count;
-{
-    XlcDatabase lc_db = (XlcDatabase)XLC_PUBLIC(lcd, xlocale_db);
-    XrmQuark category_q, name_q;
-
-    category_q = falrmStringToQuark(category);
-    name_q = falrmStringToQuark(name);
-    for(; lc_db->db; ++lc_db){
-       if(category_q == lc_db->category_q && name_q == lc_db->name_q){
-           *value = lc_db->db->value;
-           *count = lc_db->db->value_num;
-           return;
-       }
-    }
-    *value = (char **)NULL;
-    *count = 0;
-}
-
-/************************************************************************/
-/*     _fallcDestroyLocaleDataBase(lcd)                                        */
-/*----------------------------------------------------------------------*/
-/*     This function destroy the XLocale Database that bound to the    */
-/*     specified lcd.  If the XLocale Database is referred from some   */
-/*     other lcd, this function just decreases reference count of      */
-/*     the database.  If no locale refers the database, this function  */
-/*     remove it from the cache list and free work area.               */
-/************************************************************************/
-void
-_fallcDestroyLocaleDataBase(lcd)
-    XLCd lcd;
-{
-    XlcDatabase lc_db = (XlcDatabase)XLC_PUBLIC(lcd, xlocale_db);
-    XlcDatabaseList p, prev;
-
-    for(p = _db_list, prev = (XlcDatabaseList)NULL; p;
-       prev = p, p = p->next){
-       if(p->lc_db == lc_db){
-           if((-- p->ref_count) < 1){
-               if(p->lc_db != (XlcDatabase)NULL){
-                   Xfree((char *)p->lc_db);
-               }
-               DestroyDatabase(p->database);
-               if(prev == (XlcDatabaseList)NULL){
-                   _db_list = p->next;
-               }else{
-                   prev->next = p->next;
-               }
-               Xfree((char*)p);
-           }
-           break;
-       }
-    }
-    XLC_PUBLIC(lcd, xlocale_db) = (XPointer)NULL;
-}
-
-/************************************************************************/
-/*     _fallcCreateLocaleDataBase(lcd)                                 */
-/*----------------------------------------------------------------------*/
-/*     This function create an XLocale database which correspond to    */
-/*     the specified XLCd.                                             */
-/************************************************************************/
-XPointer
-_fallcCreateLocaleDataBase(lcd)
-    XLCd lcd;
-{
-    XlcDatabaseList list, new;
-    Database p, database = (Database)NULL;
-    XlcDatabase lc_db = (XlcDatabase)NULL;
-    XrmQuark name_q;
-    char pathname[256], *name;
-    int i, n;
-
-    name = _fallcFileName(lcd, "locale");
-    if(name == NULL){
-       return (XPointer)NULL;
-    }
-    strcpy(pathname, name);
-    Xfree(name);
-
-    name_q = falrmStringToQuark(pathname);
-    for(list = _db_list; list; list = list->next){
-       if(name_q == list->name_q){
-           list->ref_count++;
-           return XLC_PUBLIC(lcd, xlocale_db) = (XPointer)list->lc_db;
-       }
-    }
-
-    database = CreateDatabase(pathname);
-    if(database == (Database)NULL){
-       return (XPointer)NULL;
-    }
-    n = CountDatabase(database);
-    lc_db = (XlcDatabase)Xmalloc(sizeof(XlcDatabaseRec) * (n + 1));
-    if(lc_db == (XlcDatabase)NULL){
-       goto err;
-    }
-    bzero(lc_db, sizeof(XlcDatabaseRec) * (n + 1));
-    for(p = database, i = 0; p && i < n; p = p->next, ++i){
-       lc_db[i].category_q = falrmStringToQuark(p->category);
-       lc_db[i].name_q = falrmStringToQuark(p->name);
-       lc_db[i].db = p;
-    }
-
-    new = (XlcDatabaseList)Xmalloc(sizeof(XlcDatabaseListRec));
-    if(new == (XlcDatabaseList)NULL){
-       goto err;
-    }
-    new->name_q = name_q;
-    new->lc_db = lc_db;
-    new->database = database;
-    new->ref_count = 1;
-    new->next = _db_list;
-    _db_list = new;
-
-    return XLC_PUBLIC(lcd, xlocale_db) = (XPointer)lc_db;
-
- err:;
-    DestroyDatabase(database);
-    if(lc_db != (XlcDatabase)NULL){
-       Xfree((char *)lc_db);
-    }
-    return (XPointer)NULL;
-}
-
-#endif /* NOT_X_ENV */
diff --git a/cde/programs/dtudcfonted/libfal/_fallcDefConv.c b/cde/programs/dtudcfonted/libfal/_fallcDefConv.c
deleted file mode 100644 (file)
index 3f6c1eb..0000000
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcDefConv.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:35   */ 
-/* $XConsortium: _fallcDefConv.c /main/1 1996/04/08 15:16:17 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#include "_fallibint.h"
-#include "_fallcPubI.h"
-
-typedef struct _StateRec {
-    XlcCharSet charset;
-    XlcCharSet GL_charset;
-    XlcCharSet GR_charset;
-    XlcConv ct_conv;
-    int (*to_converter)();
-} StateRec, *State;
-
-static int
-strtostr(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register char *src, *dst;
-    unsigned char side;
-    register length;
-
-    if (from == NULL || *from == NULL)
-       return 0;
-
-    src = (char *) *from;
-    dst = (char *) *to;
-
-    length = min(*from_left, *to_left);
-
-    if (num_args > 0) {
-       side = *((unsigned char *) src) & 0x80;
-       while (side == (*((unsigned char *) src) & 0x80) && length-- > 0)
-           *dst++ = *src++;
-    } else {
-       while (length-- > 0)
-           *dst++ = *src++;
-    }
-    
-    *from_left -= src - (char *) *from;
-    *from = (XPointer) src;
-    *to_left -= dst - (char *) *to;
-    *to = (XPointer) dst;
-
-    if (num_args > 0) {
-       State state = (State) conv->state;
-
-       *((XlcCharSet *)args[0]) = side ? state->GR_charset : state->GL_charset;
-    }
-
-    return 0;
-}
-
-static int
-wcstostr(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register wchar_t *src, side;
-    register char *dst;
-    register length;
-
-    if (from == NULL || *from == NULL)
-       return 0;
-
-    src = (wchar_t *) *from;
-    dst = (char *) *to;
-
-    length = min(*from_left, *to_left);
-
-    if (num_args > 0) {
-       side = *src & 0x80;
-       while (side == (*src & 0x80) && length-- > 0)
-           *dst++ = *src++;
-    } else {
-       while (length-- > 0)
-           *dst++ = *src++;
-    }
-    
-    *from_left -= src - (wchar_t *) *from;
-    *from = (XPointer) src;
-    *to_left -= dst - (char *) *to;
-    *to = (XPointer) dst;
-
-    if (num_args > 0) {
-       State state = (State) conv->state;
-
-       *((XlcCharSet *)args[0]) = side ? state->GR_charset : state->GL_charset;
-    }
-
-    return 0;
-}
-
-static int
-cstostr(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register char *src, *dst;
-    unsigned char side;
-    register length;
-
-    if (from == NULL || *from == NULL)
-       return 0;
-
-    if (num_args > 0) {
-       State state = (State) conv->state;
-       XlcCharSet charset = (XlcCharSet) args[0];
-
-       if (charset != state->GL_charset && charset != state->GR_charset)
-           return -1;
-    }
-
-    src = (char *) *from;
-    dst = (char *) *to;
-
-    length = min(*from_left, *to_left);
-
-    if (num_args > 0) {
-       side = *((unsigned char *) src) & 0x80;
-       while (side == (*((unsigned char *) src) & 0x80) && length-- > 0)
-           *dst++ = *src++;
-    } else {
-       while (length-- > 0)
-           *dst++ = *src++;
-    }
-    
-    *from_left -= src - (char *) *from;
-    *from = (XPointer) src;
-    *to_left -= dst - (char *) *to;
-    *to = (XPointer) dst;
-
-    if (num_args > 0) {
-       State state = (State) conv->state;
-
-       *((XlcCharSet *)args[0]) = side ? state->GR_charset : state->GL_charset;
-    }
-
-    return 0;
-}
-
-static int
-strtowcs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register char *src;
-    register wchar_t *dst;
-    register length;
-
-    if (from == NULL || *from == NULL)
-       return 0;
-
-    if (num_args > 0) {
-       State state = (State) conv->state;
-       XlcCharSet charset = (XlcCharSet) args[0];
-
-       if (charset != state->GL_charset && charset != state->GR_charset)
-           return -1;
-    }
-
-    src = (char *) *from;
-    dst = (wchar_t *) *to;
-
-    length = min(*from_left, *to_left);
-
-    while (length-- > 0)
-       *dst++ = (wchar_t) *src++;
-    
-    *from_left -= src - (char *) *from;
-    *from = (XPointer) src;
-    *to_left -= dst - (wchar_t *) *to;
-    *to = (XPointer) dst;
-
-    return 0;
-}
-
-
-static void
-close_converter(conv)
-    XlcConv conv;
-{
-    if (conv->state)
-       Xfree((char *) conv->state);
-
-    Xfree((char *) conv);
-}
-
-static XlcConv
-create_conv(methods)
-    XlcConvMethods methods;
-{
-    register XlcConv conv;
-    State state;
-    static XlcCharSet GL_charset = NULL;
-    static XlcCharSet GR_charset = NULL;
-
-    if (GL_charset == NULL) {
-       GL_charset = _fallcGetCharSet("ISO8859-1:GL");
-       GR_charset = _fallcGetCharSet("ISO8859-1:GR");
-    }
-
-    conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
-    if (conv == NULL)
-       return (XlcConv) NULL;
-
-    conv->state = NULL;
-
-    state = (State) Xmalloc(sizeof(StateRec));
-    if (state == NULL)
-       goto err;
-    
-    state->GL_charset = state->charset = GL_charset;
-    state->GR_charset = GR_charset;
-
-    conv->methods = methods;
-    conv->state = (XPointer) state;
-
-    return conv;
-
-err:
-    close_converter(conv);
-
-    return (XlcConv) NULL;
-}
-
-static XlcConvMethodsRec strtostr_methods = {
-    close_converter,
-    strtostr,
-    NULL
-} ;
-
-static XlcConv
-open_strtostr(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(&strtostr_methods);
-}
-
-static XlcConvMethodsRec wcstostr_methods = {
-    close_converter,
-    wcstostr,
-    NULL
-} ;
-
-static XlcConv
-open_wcstostr(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(&wcstostr_methods);
-}
-
-static XlcConvMethodsRec cstostr_methods = {
-    close_converter,
-    cstostr,
-    NULL
-} ;
-
-static XlcConv
-open_cstostr(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(&cstostr_methods);
-}
-
-static XlcConvMethodsRec strtowcs_methods = {
-    close_converter,
-    strtowcs,
-    NULL
-} ;
-
-static XlcConv
-open_strtowcs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(&strtowcs_methods);
-}
-
-XLCd
-_fallcDefaultLoader(name)
-    char *name;
-{
-    XLCd lcd;
-
-    if (strcmp(name, "C"))
-       return (XLCd) NULL;
-
-    lcd = _fallcCreateLC(name, _fallcPublicMethods);
-
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar, open_strtowcs);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCompoundText, open_strtostr);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNString, open_strtostr);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet, open_strtostr);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNChar, open_strtostr);/* XXX */
-
-    _fallcSetConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte, open_wcstostr);
-    _fallcSetConverter(lcd, XlcNWideChar, lcd, XlcNCompoundText, open_wcstostr);
-    _fallcSetConverter(lcd, XlcNWideChar, lcd, XlcNString, open_wcstostr);
-    _fallcSetConverter(lcd, XlcNWideChar, lcd, XlcNCharSet, open_wcstostr);
-
-    _fallcSetConverter(lcd, XlcNString, lcd, XlcNMultiByte, open_strtostr);
-    _fallcSetConverter(lcd, XlcNString, lcd, XlcNWideChar, open_strtowcs);
-
-    _fallcSetConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte, open_cstostr);
-    _fallcSetConverter(lcd, XlcNCharSet, lcd, XlcNWideChar, open_strtowcs);
-
-    return lcd;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcDynamic.c b/cde/programs/dtudcfonted/libfal/_fallcDynamic.c
deleted file mode 100644 (file)
index 8c743d3..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: _fallcDynamic.c /main/3 1996/05/08 19:00:37 drk $ */
-/* lcDynamic.c 1.1 - Fujitsu source for CDEnext    95/12/07 10:56:55   */ 
-/*
- * Copyright 1995 by FUJITSU LIMITED
- * This is source code modified by FUJITSU LIMITED under the Joint
- * Development Agreement for the CDEnext PST.
- * This is unpublished proprietry source code of FUJITSU LIMITED
- *
- * Modifier: Takanori Tateno   FUJITSU LIMITED
- *
- */
-#include <stdio.h>
-#include <string.h>
-#include "_fallibint.h"
-#ifdef USE_DYNAMIC_LOADER
-
-#ifndef XLOCALEDIR
-#define XLOCALEDIR "/usr/lib/X11/locale"
-#endif
-
-#define LCLIBNAME    "xi18n.so"
-
-extern void *dlopen();
-extern void *dlsym();
-extern int dlclose();
-extern char *dlerror();
-
-#define LAZY       1
-#define NOW        2
-#define GLOBAL     0x100
-
-XLCd
-_fallcDynamicLoader(name)
-    char *name;
-{
-    char libpath[1024];
-    XLCdMethods _fallcGenericMethods;
-    XLCd lcd;
-    void *nlshandler;
-
-    sprintf(libpath,"%s/%s/%s",
-               XLOCALEDIR,name,LCLIBNAME);
-    nlshandler = dlopen(libpath,LAZY);
-    _fallcGenericMethods = (XLCdMethods)dlsym(nlshandler,
-                               "genericMethods");
-    lcd = _fallcCreateLC(name,_fallcGenericMethods);
-    
-
-    return lcd;
-}
-#endif /* USE_DYNAMIC_LOADER */
diff --git a/cde/programs/dtudcfonted/libfal/_fallcEuc.c b/cde/programs/dtudcfonted/libfal/_fallcEuc.c
deleted file mode 100644 (file)
index 102e5a5..0000000
+++ /dev/null
@@ -1,1492 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcEuc.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:36       */ 
-/* $XConsortium: _fallcEuc.c /main/1 1996/04/08 15:16:38 cde-fuj $ */
-/******************************************************************
-
-        Copyright 1992, 1993 by FUJITSU LIMITED
-        Copyright 1993 by Fujitsu Open Systems Solutions, Inc.
-
-Permission to use, copy, modify, distribute and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and
-that both that copyright notice and this permission notice appear
-in supporting documentation, and that the name of FUJITSU LIMITED and
-Fujitsu Open Systems Solutions, Inc. not be used in advertising or
-publicity pertaining to distribution of the software without specific,
-written prior permission.
-FUJITSU LIMITED and Fujitsu Open Systems Solutions, Inc. makes no
-representations about the suitability of this software for any purpose.
-It is provided "as is" without express or implied warranty.
-
-FUJITSU LIMITED AND FUJITSU OPEN SYSTEMS SOLUTIONS, INC. DISCLAIMS ALL
-WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL FUJITSU OPEN SYSTEMS
-SOLUTIONS, INC. AND FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT
-OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-OF THIS SOFTWARE.
-
-    Authors: Shigeru Yamada            (yamada@ossi.com)
-             Jeffrey Bloomfield                (jeffb@ossi.com)
-             Yoshiyuki Segawa          (segawa@ossi.com)
-
-*****************************************************************/
-
-#include "_fallibint.h"
-#include "_fallcGeneric.h"
-
-#include <ctype.h>
-#ifdef WIN32
-#define isascii __isascii
-#endif
-
-#define CS0     codesets[0]             /* Codeset 0 - 7-bit ASCII      */
-#define CS1     codesets[1]             /* Codeset 1 - Kanji            */
-#define CS2     codesets[2]             /* Codeset 2 - Half-Kana        */
-#define CS3     codesets[3]             /* Codeset 3 - User defined     */
-
-#define SS2    0x8e    /* Single-shift char: CS2 */
-#define SS3    0x8f    /* Single-shift char: CS3 */
-
-#define ASCII_CODESET   0
-#define KANJI_CODESET   1
-#define KANA_CODESET    2
-#define USERDEF_CODESET 3
-#define MAX_CODESETS  
-
-#define GR     0x80    /* begins right-side (non-ascii) region */
-#define GL     0x7f    /* ends left-side (ascii) region        */
-
-#define isleftside(c)  (((c) & GR) ? 0 : 1)
-#define isrightside(c) (!isleftside(c))
-
-#define BIT8OFF(c)     ((c) & GL)
-#define BIT8ON(c)      ((c) | GR)
-
-typedef unsigned char   Uchar;
-typedef unsigned long   Ulong;
-typedef unsigned int   Uint;
-
-static CodeSet GetCodeSetFromCharSet();
-static CodeSet wc_codeset();
-
-#define BADCHAR(min_ch, c)  (BIT8OFF(c) < (char)min_ch && BIT8OFF(c) != 0x0 && \
-                            BIT8OFF(c) != '\t' && BIT8OFF(c) != '\n' && \
-                            BIT8OFF(c) != 0x1b)
-
-/*
- * Notes:
- * 1. Defining FORCE_INDIRECT_CONVERTER (see _fallcEucLoader())
- *    forces indirect (charset) conversions (e.g. wcstocs()<->cstombs()).
- * 2. Using direct converters (e.g. mbstowcs()) decreases conversion
- *    times by 20-40% (depends on specific converter used).
- */
-
-static int
-euc_mbstowcs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-
-    XLCd lcd = (XLCd)conv->state;
-
-    register Uchar ch;
-    register int chr_len = 0;
-    register int sshift =  False;
-    register int shift_mult = 0;
-    register Uint chrcode;
-
-    Uint wc_encode = 0;
-    Uint wc_tmp = 0;
-
-    int cs0flg = False;
-    int cs1flg = False;
-    int length;
-    int num_conv;
-    int unconv_num = 0;
-
-    Bool new_char;
-
-    XPointer inbufptr = *from;
-    wchar_t *outbufptr = (wchar_t *) *to;
-    wchar_t *outbuf_base = outbufptr;
-
-    CodeSet *codesets = XLC_GENERIC(lcd, codeset_list); 
-    int codeset_num = XLC_GENERIC(lcd, codeset_num);
-    Ulong wc_shift = XLC_GENERIC(lcd, wc_shift_bits);
-
-
-    if (*from_left > *to_left)
-       *from_left = *to_left;
-
-    for (new_char = True; *from_left > 0;) {
-
-       ch = *inbufptr++;
-
-       if (isleftside(ch)) {                           /* CS0 */
-            if (ASCII_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           if( cs0flg == True) {
-               new_char = True;
-               cs0flg = False;
-           }
-           length = CS0->length;
-           *outbufptr++ = (wchar_t)ch;
-           (*from_left)--;
-           continue;
-       }
-       else if (ch == SS2) {                           /* CS2 */
-           if (KANA_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           if (sshift == True || cs1flg == True) {
-               cs1flg = False;
-               unconv_num++;
-               continue;
-           }
-           length = CS2->length;
-           wc_encode = CS2->wc_encoding;
-           chrcode = 0;
-           sshift = True;
-           cs0flg = True;
-           (*from_left)--;
-           continue;
-       }
-       else if (ch == SS3) {                           /* CS3 */
-           if (USERDEF_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           if (sshift == True || cs1flg == True) {
-               cs1flg = False;
-               unconv_num++;
-               continue;
-           }
-           length = CS3->length;
-           if (*from_left < 1 )
-               unconv_num++;
-           wc_encode = CS3->wc_encoding;
-           chrcode = 0;
-           sshift = True;
-           cs0flg = True;
-           (*from_left)--;
-           continue;
-
-       } else {                                        /* CS1 */
-           if (KANJI_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           if (sshift == False) {
-               length = CS1->length;
-               if (*from_left < 1)
-                   unconv_num++;
-               wc_encode = CS1->wc_encoding;
-           }
-           chrcode = BIT8OFF(ch);
-           cs0flg = True;
-           cs1flg = True;
-           (*from_left)--;
-       }
-
-       if (new_char) {                         /* begin new character */
-           chr_len = length;
-           shift_mult = length - 1;
-           new_char = False;
-       }
-
-       chrcode <<= (wc_shift * shift_mult);
-       shift_mult--;
-       wc_tmp |= chrcode; 
-
-       if (--chr_len == 0) {
-           wc_tmp |= wc_encode;
-           *outbufptr++ = wc_tmp;
-
-           new_char = True;
-           sshift = False;
-           cs0flg = False;
-           cs1flg = False;
-           wc_tmp  = (Uint)0;
-       }
-
-    }  /* end for */
-
-    *to = (XPointer)outbufptr;
-
-    if (cs0flg == True || cs1flg == True)      /* error check on last char */
-       unconv_num++;
-
-    if ((num_conv = (int)(outbufptr - outbuf_base)) > 0)
-        *to_left = (*to_left) - num_conv;
-
-    return unconv_num;
-}
-
-
-static int
-euc_wcstombs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    wchar_t *inbufptr = (wchar_t *) *from;
-    register XPointer outbufptr = *to;
-    XPointer outbuf_base = outbufptr;
-    wchar_t  wch;
-    register length;
-    Uchar tmp;
-    int num_conv;
-    int unconv_num = 0;
-
-    XLCd lcd = (XLCd)conv->state;
-    CodeSet codeset;
-    Ulong wc_encoding_mask = XLC_GENERIC(lcd, wc_encode_mask);
-    Ulong wc_shift = XLC_GENERIC(lcd, wc_shift_bits);
-    Ulong wch_encode;
-
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    for (; *from_left > 0 ; (*from_left)-- ) {
-
-       wch = *inbufptr++;
-
-       if (!(codeset = wc_codeset(lcd, wch))) {
-           unconv_num++;
-           (*from_left)--;
-           continue;
-       }
-
-       length = codeset->length;
-       wch ^= (wchar_t)codeset->wc_encoding;
-
-       if (codeset->parse_info)        /* put out SS2 or SS3 */
-           *outbufptr++ = *codeset->parse_info->encoding;
-
-       do {
-           length--;
-           tmp = (wch>>(wchar_t)(length * wc_shift));
-
-           if (codeset->side == XlcGR)
-               tmp = BIT8ON(tmp);
-
-           *outbufptr++ = (Uchar)tmp;
-       } while (length);
-    }
-
-    *to = (XPointer)outbufptr;
-
-    if ((num_conv = (int)(outbufptr - outbuf_base)) > 0)
-       *to_left -= num_conv;
-
-    return unconv_num;
-}
-
-
-static int
-euc_mbtocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd)conv->state;
-    XlcCharSet charset;
-    CodeSet *codesets = XLC_GENERIC(lcd, codeset_list);
-    int codeset_num = XLC_GENERIC(lcd, codeset_num);
-    int length;
-    int unconv_num = 0;
-    int min_ch = 0;
-    register char *src = *from, *dst = *to;
-
-
-    if (isleftside(*src)) {                    /* 7-bit (CS0) */
-       if (ASCII_CODESET >= codeset_num)
-           return -1;
-       charset = *CS0->charset_list;
-    }
-    else if ((Uchar)*src == SS2) {             /* half-kana (CS2) */
-       if (KANA_CODESET >= codeset_num)
-           return -1;
-       charset = *CS2->charset_list;
-       src++;
-       (*from_left)--;
-    }
-    else if ((Uchar)*src == SS3) {             /* user-def */
-       if (USERDEF_CODESET >= codeset_num)
-           return -1;
-       charset = *CS3->charset_list;
-       src++;
-       (*from_left)--;
-    }
-    else  {                                    /* Kanji (CS1) */
-       if (KANJI_CODESET >= codeset_num)
-           return -1;
-       charset = *CS1->charset_list;
-    }
-
-    if(*from_left < charset->char_size || *to_left < charset->char_size)
-       return -1;
-
-    min_ch = 0x20;
-    if (charset->set_size == 94)
-       if (charset->char_size > 1 || charset->side == XlcGR)
-           min_ch = 0x21;
-
-    length = charset->char_size;
-    do {
-       if(BADCHAR(min_ch, *src)) {
-           unconv_num++;
-           break;
-       }
-       switch (charset->side) {
-           case XlcGL:
-               *dst++ = BIT8OFF(*src++);
-               break;
-           case XlcGR:
-               *dst++ = BIT8ON(*src++);
-               break;
-           default:
-               *dst++ = *src++;
-               break;
-           }
-    } while (--length);
-
-    if (unconv_num)
-       src += charset->char_size - length;
-
-    *to = dst;
-    *from = src;
-    *from_left -= charset->char_size;
-    *to_left -= charset->char_size;
-
-    if (num_args > 0)
-       *((XlcCharSet *) args[0]) = charset;
-
-    return unconv_num;
-}
-
-
-static int
-euc_mbstocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd)conv->state;
-    char *tmp_from, *tmp_to;
-    int tmp_from_left, tmp_to_left;
-    XlcCharSet charset, tmp_charset;
-    XPointer tmp_args[1];
-    int unconv_num = 0, ret;
-
-
-/* Determine the charset of the segment and convert one characater: */
-
-    tmp_args[0] = (XPointer) &charset; /* charset from euc_mbtocs() */
-    while
-      ((ret = euc_mbtocs(conv, from, from_left, to, to_left, tmp_args, 1)) > 0)
-       unconv_num += ret;
-    if ( ret < 0 )
-       return ret;
-
-    tmp_from = *from;
-    tmp_from_left = *from_left;
-    tmp_to_left = *to_left;
-    tmp_to = *to;
-
-
-/* Convert remainder of the segment: */
-
-    tmp_args[0] = (XPointer) &tmp_charset;
-    while( (ret = euc_mbtocs(conv, &tmp_from, &tmp_from_left, &tmp_to,
-      &tmp_to_left, tmp_args, 1)) >= 0 ) {
-
-       if (ret > 0) {
-           unconv_num += ret;
-           continue;
-       }
-
-       if (tmp_charset != charset)  /* quit on end of segment */
-           break;
-
-       *from = tmp_from;
-       *from_left = tmp_from_left;
-       *to = tmp_to;
-       *to_left = tmp_to_left;
-    } 
-
-    if (num_args > 0)
-       *((XlcCharSet *) args[0]) = charset;
-    
-    return unconv_num;
-}
-
-
-static int
-euc_wcstocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd)conv->state;
-    wchar_t *wcptr = (wchar_t *) *from;
-    register char *bufptr = (char *) *to;
-    wchar_t wch;
-    char *tmpptr;
-    register length;
-    CodeSet codeset;
-    Ulong wc_encoding;
-    int unconv_num = 0;
-    int wcstr_len = *from_left, buf_len = *to_left;
-
-
-    if (!(codeset = wc_codeset(lcd, *wcptr)))
-       return -1;
-
-    wc_encoding = codeset->wc_encoding;
-
-    if (wcstr_len < buf_len / codeset->length)
-       buf_len = wcstr_len * codeset->length;
-
-    for ( ; wcstr_len > 0 && buf_len > 0; wcptr++, wcstr_len--) {
-       wch = *wcptr;
-
-       if ((wch & XLC_GENERIC(lcd, wc_encode_mask)) != wc_encoding)
-           break;
-
-       length = codeset->length;
-
-       buf_len -= length;
-       bufptr += length;
-       tmpptr = bufptr - 1;
-
-       while (length--) {
-           *tmpptr-- = codeset->length == 1 && codeset->side == XlcGR ?
-             BIT8ON(wch) : BIT8OFF(wch);
-           wch >>= (wchar_t)XLC_GENERIC(lcd, wc_shift_bits);
-       }
-    }
-
-    if (num_args > 0)
-       *((XlcCharSet *) args[0]) = *codeset->charset_list;
-
-    *from_left -= wcptr - (wchar_t *) *from;
-    *from = (XPointer) wcptr;
-
-    *to_left -= bufptr - *to;
-    *to = bufptr;
-
-    return 0;
-}
-
-
-static int
-euc_cstombs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd)conv->state;
-    register char *csptr = *from;
-    register char *bufptr = *to;
-    int csstr_len = *from_left;
-    register buf_len = *to_left;
-    int length;
-    CodeSet codeset;
-    int cvt_length;
-
-
-    if (num_args < 1)
-       return -1;
-    
-    if (!(codeset = GetCodeSetFromCharSet(lcd, (XlcCharSet) args[0])))
-       return -1;
-
-    cvt_length = 0;
-    csstr_len /= codeset->length;
-    buf_len /= codeset->length;
-
-    if (codeset->parse_info)
-       csstr_len *= 2;
-
-    if (csstr_len < buf_len)
-       buf_len = csstr_len;
-
-    cvt_length += buf_len * codeset->length;
-
-    if (bufptr) {
-       while (buf_len--) {
-           if (codeset->parse_info)    /* put out SS2 or SS3 */
-               *bufptr++ = *codeset->parse_info->encoding;
-
-           length = codeset->length;
-           while (length--)
-               *bufptr++ = codeset->side == XlcGR ?
-                 BIT8ON(*csptr++) : BIT8OFF(*csptr++);
-       }
-    }
-
-    *from_left -= csptr - *from;
-    *from = csptr;
-    if (bufptr)
-       *to += cvt_length;
-    *to_left -= cvt_length;
-
-    return 0;
-}
-
-
-static int
-euc_cstowcs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd)conv->state;
-    register char *csptr = *from;
-    wchar_t *bufptr = (wchar_t *) *to;
-    wchar_t *toptr = (wchar_t *) *to;
-    int csstr_len = *from_left;
-    register buf_len = *to_left;
-    wchar_t wch;
-    int length;
-    Ulong wc_shift_bits = XLC_GENERIC(lcd, wc_shift_bits);
-    CodeSet codeset;
-
-    
-    if (num_args < 1)
-       return -1;
-    
-    if (!(codeset = GetCodeSetFromCharSet(lcd, (XlcCharSet) args[0])))
-        return -1;
-
-    csstr_len /= codeset->length;
-    if (csstr_len < buf_len)
-       buf_len = csstr_len;
-    *to_left -= buf_len;
-
-    if (bufptr) {
-
-       toptr += buf_len;
-       *to = (XPointer) toptr;
-       
-        while (buf_len--) {
-
-            wch = (wchar_t) BIT8OFF(*csptr);
-            csptr++;
-
-            length = codeset->length - 1;
-            while (length--) {
-                wch = (wch << wc_shift_bits) | BIT8OFF(*csptr);
-                csptr++;
-            }
-            *bufptr++ = wch | codeset->wc_encoding;
-        }
-    }
-    *from_left -= csptr - *from;
-    *from = csptr;
-
-    return 0;
-}
-
-
-static CodeSet
-wc_codeset(lcd, wch)
-    XLCd lcd;
-    wchar_t wch;
-{
-
-    register CodeSet *codesets = XLC_GENERIC(lcd, codeset_list);
-    register int end = XLC_GENERIC(lcd, codeset_num);
-    register Ulong widech = (Ulong)(wch & XLC_GENERIC(lcd, wc_encode_mask));
-
-    for (; --end >= 0; codesets++)
-       if ( widech == (*codesets)->wc_encoding )
-           return *codesets;
-
-    return NULL;
-}
-
-
-static CodeSet
-GetCodeSetFromCharSet(lcd, charset)
-    XLCd lcd;
-    XlcCharSet charset;
-{
-    register CodeSet *codeset = XLC_GENERIC(lcd, codeset_list);
-    register XlcCharSet *charset_list;
-    register codeset_num, num_charsets;
-
-    codeset_num = XLC_GENERIC(lcd, codeset_num);
-
-    for ( ; codeset_num-- > 0; codeset++) {
-       num_charsets = (*codeset)->num_charsets;
-       charset_list = (*codeset)->charset_list;
-
-       for ( ; num_charsets-- > 0; charset_list++)
-           if (*charset_list == charset)
-               return *codeset;
-    }
-
-    return (CodeSet) NULL;
-}
-
-
-static XlcConv
-create_conv(lcd, methods)
-    XLCd lcd;
-    XlcConvMethods methods;
-{
-    XlcConv conv;
-
-    conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
-    if (conv == NULL)
-       return (XlcConv) NULL;
-    
-    conv->methods = methods;
-    conv->state = (XPointer) lcd;
-    return conv;
-}
-
-
-/*
- *    Stripped down Direct CT converters for EUC
- *
- */
-
-typedef struct _CTDataRec {
-    int side;
-    int length;
-    char *name;
-    Ulong wc_encoding;
-    char sshift;
-    char *ct_encoding;
-    int ct_encoding_len;
-    int set_size;
-    Uchar min_ch;
-    Uchar ct_type;
-} CTDataRec, *CTData;
-
-typedef struct _StateRec {
-    CTData GL_charset;
-    CTData GR_charset;
-    CTData charset;
-} StateRec, *State;
-
-static enum { CT_STD, CT_NSTD, CT_DIR, CT_EXT0, CT_EXT1, CT_EXT2, CT_VER }
-                ct_types;
-
-static CTDataRec ctdata[] =
-{
-  { XlcGL,      1, "ISO8859-1:GL",       0, 0, "\033(B"   ,  3, 0, 0, CT_STD  },
-  { XlcGR,      1, "ISO8859-1:GR",       0, 0, "\033-A"   ,  3, 0, 0, CT_STD  },
-  { XlcGL,      1, "JISX0201.1976-0:GL", 0, 0, "\033(J"   ,  3, 0, 0, CT_STD  },
-  { XlcGR,      1, "JISX0201.1976-0:GR", 0, 0, "\033)I"   ,  3, 0, 0, CT_STD  },
-  { XlcGL,      2, "JISX0208.1983-0:GL", 0, 0, "\033$(B"  ,  4, 0, 0, CT_STD  },
-  { XlcGR,      2, "JISX0208.1983-0:GR", 0, 0, "\033$)B"  ,  4, 0, 0, CT_STD  },
-  { XlcGL,      2, "JISX0212.1990-0:GL", 0, 0, "\033$(D"  ,  4, 0, 0, CT_STD  },
-  { XlcGR,      2, "JISX0212.1990-0:GR", 0, 0, "\033$)D"  ,  4, 0, 0, CT_STD  },
-  { XlcUnknown, 0, "Ignore-Ext-Status?", 0, 0, "\033#"    ,  2, 0, 0, CT_VER  },
-  { XlcUnknown, 0, "NonStd-?-OctetChar", 0, 0, "\033%/0"  ,  4, 0, 0, CT_NSTD },
-  { XlcUnknown, 1, "NonStd-1-OctetChar", 0, 0, "\033%/1"  ,  4, 0, 0, CT_NSTD },
-  { XlcUnknown, 2, "NonStd-2-OctetChar", 0, 0, "\033%/2"  ,  4, 0, 0, CT_NSTD },
-  { XlcUnknown, 3, "NonStd-3-OctetChar", 0, 0, "\033%/3"  ,  4, 0, 0, CT_NSTD },
-  { XlcUnknown, 4, "NonStd-4-OctetChar", 0, 0, "\033%/4"  ,  4, 0, 0, CT_NSTD },
-  { XlcUnknown, 0, "Extension-2"       , 0, 0, "\033%/"   ,  3, 0, 0, CT_EXT2 },
-  { XlcUnknown, 0, "Extension-0"       , 0, 0, "\033"     ,  1, 0, 0, CT_EXT0 },
-  { XlcUnknown, 0, "Begin-L-to-R-Text",  0, 0, "\2331]"   ,  3, 0, 0, CT_DIR  },
-  { XlcUnknown, 0, "Begin-R-to-L-Text",  0, 0, "\2332]"   ,  3, 0, 0, CT_DIR  },
-  { XlcUnknown, 0, "End-Of-String",      0, 0, "\233]"    ,  2, 0, 0, CT_DIR  },
-  { XlcUnknown, 0, "Extension-1"       , 0, 0, "\233"     ,  1, 0, 0, CT_EXT1 },
-};
-
-/* Note on above table:  euc_ctstombs() and euc_ctstowcs() parser depends on
- * certain table entries occurring in decreasing string length--
- *   1.  CT_EXT2 and CT_EXT0 entries must occur after CT_NSTD entries.
- *   2.  CT_DIR and CT_EXT1 entries must occur after CT_DIR entries.
- */
-
-static CTData ctd_endp = ctdata + ((sizeof(ctdata) / sizeof(CTDataRec))) - 1;
-static CTData ctdptr[sizeof(ctdata) / sizeof(CTDataRec)];
-static enum { Ascii, Kanji, Kana, Userdef } cs_nums;
-
-
-/*
- * initCTptr(): Set ctdptr[] to point at ctdata[], indexed by codeset_num.
- */
-static void
-initCTptr(lcd)
-    XLCd lcd;
-{
-    int num_codesets = XLC_GENERIC(lcd, codeset_num);
-    int num_charsets;
-    int i, j;
-    CodeSet *codesets = XLC_GENERIC(lcd, codeset_list);
-    CodeSet codeset;
-    XlcCharSet charset;
-    CTData ctdp = ctdata;
-
-    ctdptr[Ascii] = &ctdata[0];                /* failsafe */
-
-    for (i = 0; i < num_codesets; i++) {
-
-       codeset = codesets[i];
-       num_charsets = codeset->num_charsets;
-
-       for (j = 0; j < num_charsets; j++) {
-
-           charset = codeset->charset_list[j];
-
-           for (ctdp = ctdata; ctdp <= ctd_endp; ctdp++)
-
-               if (! strcmp(ctdp->name, charset->name)) {
-
-                   ctdptr[codeset->cs_num] = ctdp;
-
-                   ctdptr[codeset->cs_num]->wc_encoding = codeset->wc_encoding;
-
-                   ctdptr[codeset->cs_num]->set_size =
-                     charset->set_size;
-
-                   ctdptr[codeset->cs_num]->min_ch =
-                     charset->set_size == 94 &&
-                     (ctdptr[codeset->cs_num]->length > 1 ||
-                     ctdptr[codeset->cs_num]->side == XlcGR) ? 0x21 : 0x20;
-
-                   if (codeset->parse_info) {
-                       ctdptr[codeset->cs_num]->sshift =
-                         *codeset->parse_info->encoding;
-                   }
-
-                   break;
-               }
-       }
-    }
-}
-
-
-#define SKIP_I(str)     while (*(str) >= 0x20 && *(str) <=  0x2f) (str)++;
-#define SKIP_P(str)     while (*(str) >= 0x30 && *(str) <=  0x3f) (str)++;
-
-static int
-euc_ctstowcs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd)conv->state;
-    Ulong wc_shift_bits = XLC_GENERIC(lcd, wc_shift_bits);
-    register XPointer inbufptr = *from;
-    XPointer inbuf_base;
-    register wchar_t *outbufptr = (wchar_t *) *to;
-    wchar_t *outbuf_base = outbufptr;
-    register clen, length;
-    int num_conv;
-    int unconv_num = 0;
-    unsigned int ct_seglen = 0;
-    Uchar ct_type = 0;
-    register shift_mult;
-    wchar_t wc_tmp;
-    wchar_t wch;
-    Ulong wc_encoding;
-    CTData ctdp = ctdata;
-
-
-    if (*from_left > *to_left)
-       *from_left = *to_left;
-
-    for (length = ctdata[Ascii].length; *from_left > 0; (*from_left) -= length)
-    {
-       ct_type = CT_STD;
-       if (*inbufptr == '\033' || *inbufptr == (char)'\233') {
-           for (ctdp = ctdata; ctdp <= ctd_endp ; ctdp++) {
-
-               if(!strncmp(inbufptr, ctdp->ct_encoding, ctdp->ct_encoding_len))
-               {
-                   inbufptr += ctdp->ct_encoding_len;
-                   (*from_left) -= ctdp->ct_encoding_len;
-                   if (ctdp->length) {
-                       length = ctdp->length;
-                       if( *from_left < length ) {
-                           *to = (XPointer)outbufptr;
-                           *to_left -= outbufptr - outbuf_base;
-                           return( unconv_num + *from_left );
-                       }
-                   }
-                   ct_type = ctdp->ct_type;
-                   break;
-               }
-           }
-           if (ctdp > ctd_endp)        /* failed to match CT sequence */
-               unconv_num++;
-       }
-
-/* The following code insures that non-standard encodings, direction, extension,
- * and version strings are ignored; subject to change in future.
- */
-       switch (ct_type) {
-       case CT_STD:
-           break;
-       case CT_EXT2:
-           inbufptr++;
-           (*from_left)--;
-       case CT_NSTD:
-           ct_seglen = (BIT8OFF(*inbufptr) << 7) + BIT8OFF(*(inbufptr+1)) + 2;
-           inbufptr += ct_seglen;
-           (*from_left) -= ct_seglen;
-           continue;
-       case CT_EXT0:
-           inbuf_base = inbufptr;
-           SKIP_I(inbufptr);
-           inbufptr++;
-           ct_seglen = (unsigned)(inbufptr - inbuf_base);
-           *(from_left) -= ct_seglen;
-           continue;
-       case CT_EXT1:
-           inbuf_base = inbufptr;
-           SKIP_P(inbufptr);
-           SKIP_I(inbufptr);
-           inbufptr++;
-           ct_seglen = (unsigned)(inbufptr - inbuf_base);
-           *(from_left) -= ct_seglen;
-           continue;
-       case CT_DIR:
-           continue;
-       case CT_VER:
-           inbufptr += 2;
-           *(from_left) -= 2;
-           continue;
-       }
-
-       wc_encoding = (ctdp == ctdptr[Kana] && isleftside(*inbufptr)) ?
-           ctdptr[Ascii]->wc_encoding: ctdp->wc_encoding;
-
-       shift_mult = length - 1;
-       wch = (wchar_t)0;
-       clen = length;
-
-       do {
-           wc_tmp = BIT8OFF(*inbufptr++) << (wc_shift_bits * shift_mult);
-           wch |= wc_tmp;
-           shift_mult--;
-       } while (--clen);
-
-       *outbufptr++ = wch | wc_encoding;
-    }
-
-    *to = (XPointer)outbufptr;
-
-    if ((num_conv = (int)(outbufptr - outbuf_base)) > 0)
-       (*to_left) -= num_conv;
-
-    return unconv_num;
-
-}
-
-
-#define byte1                  (length == codeset->length - 1)
-#define byte2                  (byte1 == 0)
-#define kanji                  (codeset->cs_num == 1)
-#define kana                   (codeset->cs_num == 2)
-#define userdef                        (codeset->cs_num == 3)
-
-static int
-euc_wcstocts(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register ct_len = *to_left;
-    register wchar_t *inbufptr = (wchar_t *) *from;
-    register char *ctptr = *to;
-    XPointer ct_base = ctptr;
-    wchar_t  wch;
-    register length;
-    register unconv_num = 0;
-    Uchar tmp;
-    Uchar t1 = 0, t2;
-    int num_conv;
-
-    StateRec ct_state;
-    XLCd lcd = (XLCd)conv->state;
-    CTData charset;
-    CodeSet codeset;
-    Ulong wc_encoding_mask = XLC_GENERIC(lcd, wc_encode_mask);
-    Ulong wc_shift = XLC_GENERIC(lcd, wc_shift_bits);
-
-
-/* Initial State: */
-    ct_state.GL_charset = ctdptr[0]; /* Codeset 0 */
-    ct_state.GR_charset = NULL;
-
-    if (*from_left > *to_left)
-       *from_left = *to_left;
-
-    for (; *from_left > 0 ; (*from_left)-- ) {
-
-       wch = *inbufptr++;
-
-       if (!(codeset = wc_codeset(lcd, wch))) {
-           unconv_num++;
-           (*from_left)--;
-           continue;
-       }
-
-       charset = ctdptr[codeset->cs_num];
-
-       length = codeset->length;
-       wch ^= (wchar_t)codeset->wc_encoding;
-
-       if ( (charset->side == XlcGR && charset != ct_state.GR_charset) ||
-            (charset->side == XlcGL && charset != ct_state.GL_charset) ) {
-
-           ct_len -= ctdptr[codeset->cs_num]->ct_encoding_len;
-
-           if (ct_len < 0) {
-               unconv_num++;
-               break;
-           }
-
-           if (ctptr) {
-               strcpy(ctptr, ctdptr[codeset->cs_num]->ct_encoding);
-               ctptr += ctdptr[codeset->cs_num]->ct_encoding_len;
-           }
-       }
-
-       if (charset->side == XlcGR)
-           ct_state.GR_charset = charset;
-       else if (charset->side == XlcGL)
-           ct_state.GL_charset = charset;
-
-       do {
-
-           length--;
-           tmp = wch>>(wchar_t)( (Ulong)length * wc_shift);
-
-           if (kana) {
-               if (BADCHAR(charset->min_ch, (char)tmp)) {
-                   unconv_num++;
-                   break;
-               }
-               *ctptr++ = (char)BIT8ON(tmp);
-           }
-
-           else if (byte1 && (kanji || userdef))
-               t1 = tmp;
-
-           else if (byte2 && (kanji || userdef)) {
-               if (BADCHAR(charset->min_ch, (char)t1) ||
-                 BADCHAR(charset->min_ch, (char)tmp)) {
-                   unconv_num++;
-                   break;
-               }
-               *ctptr++ = (char)t1;
-               *ctptr++ = (char)tmp;
-           }
-
-           else {
-               if (BADCHAR(charset->min_ch, (char)tmp)) {
-                   unconv_num++;
-                   break;
-               }
-               *ctptr++ = (char)tmp;
-           }
-
-
-       } while (length); 
-
-    }  /* end for */
-
-    *to = (XPointer)ctptr;
-
-    if ((num_conv = (int)(ctptr - ct_base)) > 0)
-       (*to_left) -= num_conv;
-
-    return unconv_num;
-}
-#undef byte1
-#undef byte2
-#undef kana
-#undef kanji
-#undef userdef
-
-
-#define byte1  (ctdp->length == clen)
-#define kana    (ctdp == ctdptr[Kana] && isrightside(*inbufptr))
-#define kanji   (ctdp == ctdptr[Kanji])
-#define userdef (ctdp == ctdptr[Userdef])
-
-static int
-euc_ctstombs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register XPointer inbufptr = *from;
-    register XPointer outbufptr = *to;
-    XPointer inbuf_base;
-    XPointer outbuf_base = outbufptr;
-    register clen, length;
-    int unconv_num = 0;
-    int num_conv;
-    unsigned int ct_seglen = 0;
-    Uchar ct_type = 0;
-    CTData ctdp = &ctdata[0];  /* default */
-
-
-    if (*from_left > *to_left)
-       *from_left = *to_left;
-
-    for (length = ctdata[Ascii].length; *from_left > 0; (*from_left) -= length)
-    {
-       ct_type = CT_STD;
-       if (*inbufptr == '\033' || *inbufptr == (char)'\233') {
-
-           for (ctdp = ctdata; ctdp <= ctd_endp ; ctdp++) {
-
-               if(!strncmp(inbufptr, ctdp->ct_encoding, ctdp->ct_encoding_len))
-               {
-                   inbufptr += ctdp->ct_encoding_len;
-                   (*from_left) -= ctdp->ct_encoding_len - 1;
-                   if (ctdp->length) {
-                       length = ctdp->length;
-                       if( *from_left < length ) {
-                           *to = (XPointer)outbufptr;
-                           *to_left -= outbufptr - outbuf_base;
-                           return( unconv_num + *from_left );
-                       }
-                   }
-                   ct_type = ctdp->ct_type;
-                   break;
-               }
-           }
-           if (ctdp > ctd_endp)        /* failed to match CT sequence */
-               unconv_num++;
-       }
-
-/* The following code insures that non-standard encodings, direction, extension,
- * and version strings are ignored; subject to change in future.
- */
-       switch (ct_type) {
-       case CT_STD:
-           break;
-       case CT_EXT2:
-           inbufptr++;
-           (*from_left)--;
-       case CT_NSTD:
-           ct_seglen = (BIT8OFF(*inbufptr) << 7) + BIT8OFF(*(inbufptr+1)) + 2;
-           inbufptr += ct_seglen;
-           (*from_left) -= ct_seglen;
-           continue;
-       case CT_EXT0:
-           inbuf_base = inbufptr;
-           SKIP_I(inbufptr);
-           inbufptr++;
-           ct_seglen = (unsigned)(inbufptr - inbuf_base);
-           *(from_left) -= ct_seglen;
-           continue;
-       case CT_EXT1:
-           inbuf_base = inbufptr;
-           SKIP_P(inbufptr);
-           SKIP_I(inbufptr);
-           inbufptr++;
-           ct_seglen = (unsigned)(inbufptr - inbuf_base);
-           *(from_left) -= ct_seglen;
-           continue;
-       case CT_DIR:
-           continue;
-       case CT_VER:
-           inbufptr += 2;
-           *(from_left) -= 2;
-           continue;
-       }
-
-       clen = length;
-       do {
-
-           if (byte1)
-               if (kanji) {
-                   *inbufptr = BIT8ON(*inbufptr);
-                   *(inbufptr+1) = BIT8ON(*(inbufptr+1));
-               }
-               else if (kana || userdef)
-                   *outbufptr++ = ctdp->sshift;
-
-           *outbufptr++ = *inbufptr++;
-
-       } while (--clen);
-    }
-
-    *to = outbufptr;
-
-    if ((num_conv = (int)(outbufptr - outbuf_base)) > 0)
-       (*to_left) -= num_conv;
-
-    return unconv_num;
-
-}
-#undef byte1
-#undef kana
-#undef kanji
-#undef userdef
-
-
-static int
-euc_mbstocts(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register ct_len = *to_left;
-    int cs_num;
-    int clen, length;
-    int unconv_num = 0;
-    int num_conv;
-    XPointer inbufptr = *from;
-    register char *ctptr = *to;
-    XPointer ct_base = ctptr;
-
-    StateRec ct_state;
-    CTData charset;
-    XLCd lcd = (XLCd) conv->state;
-    int codeset_num = XLC_GENERIC(lcd, codeset_num);
-
-
-/* Initial State: */
-    ct_state.GL_charset = ctdptr[Ascii];
-    ct_state.GR_charset = NULL;
-
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    for (;*from_left > 0; (*from_left) -= length) {
-
-       if (isleftside(*inbufptr)) {            /* 7-bit (CS0) */
-           if (ASCII_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           cs_num = Ascii;
-           charset = ctdptr[Ascii];
-       }
-       else if ((Uchar)*inbufptr == SS2) {     /* Kana */
-           if (KANA_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           cs_num = Kana;
-           charset = ctdptr[Kana];
-           inbufptr++;
-           (*from_left)--;
-       }
-       else if ((Uchar)*inbufptr == SS3) {     /* Userdef */
-           if (USERDEF_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           cs_num = Userdef;
-           charset = ctdptr[Userdef];
-           inbufptr++;
-           (*from_left)--;
-       }
-       else {
-           if (KANJI_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           cs_num = Kanji;
-           charset = ctdptr[Kanji];
-       }
-
-       length = charset->length;
-
-       if (BADCHAR(charset->min_ch, *inbufptr))
-            continue;
-
-       if ( (charset->side == XlcGR && charset != ct_state.GR_charset) ||
-            (charset->side == XlcGL && charset != ct_state.GL_charset) ) {
-
-           ct_len -= ctdptr[cs_num]->ct_encoding_len;
-           if (ct_len < 0) {
-               unconv_num++;
-               break;
-           }
-       
-           if (ctptr) {
-               strcpy(ctptr, ctdptr[cs_num]->ct_encoding);
-               ctptr += ctdptr[cs_num]->ct_encoding_len;
-           }
-       }
-
-       if (charset->side == XlcGR)
-           ct_state.GR_charset = charset;
-       else if (charset->side == XlcGL)
-           ct_state.GL_charset = charset;
-
-       clen = length;
-       do {
-           *ctptr++ = charset == ct_state.GR_charset ?
-             BIT8ON(*inbufptr++) : BIT8OFF(*inbufptr++);
-       } while (--clen); 
-    }
-
-    *to = (XPointer)ctptr;
-
-    if ((num_conv = (int)(ctptr - ct_base)) > 0)
-       (*to_left) -= num_conv;
-    return unconv_num;
-
-}
-
-
-static void
-close_converter(conv)
-    XlcConv conv;
-{
-       Xfree((char *) conv);
-}
-
-enum { MBSTOCS, WCSTOCS, MBTOCS, CSTOMBS, CSTOWCS, MBSTOWCS, WCSTOMBS,
-       CTSTOWCS, CTSTOMBS, WCSTOCTS, MBSTOCTS };
-
-static XlcConvMethodsRec conv_methods[] = {
-    {close_converter, euc_mbstocs,  NULL },
-    {close_converter, euc_wcstocs,  NULL },
-    {close_converter, euc_mbtocs,   NULL },
-    {close_converter, euc_cstombs,  NULL },
-    {close_converter, euc_cstowcs,  NULL },
-    {close_converter, euc_mbstowcs, NULL },
-    {close_converter, euc_wcstombs, NULL },
-    {close_converter, euc_ctstowcs, NULL },
-    {close_converter, euc_ctstombs, NULL },
-    {close_converter, euc_wcstocts, NULL },
-    {close_converter, euc_mbstocts, NULL },
-};
-
-
-static XlcConv
-open_mbstocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[MBSTOCS]);
-}
-
-static XlcConv
-open_wcstocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[WCSTOCS]);
-}
-
-static XlcConv
-open_mbtocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[MBTOCS]);
-}
-
-static XlcConv
-open_cstombs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[CSTOMBS]);
-}
-
-static XlcConv
-open_cstowcs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[CSTOWCS]);
-}
-
-static XlcConv
-open_mbstowcs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[MBSTOWCS]);
-}
-
-static XlcConv
-open_wcstombs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[WCSTOMBS]);
-}
-
-static XlcConv
-open_ctstowcs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[CTSTOWCS]);
-}
-
-static XlcConv
-open_ctstombs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[CTSTOMBS]);
-}
-
-static XlcConv
-open_wcstocts(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[WCSTOCTS]);
-}
-
-static XlcConv
-open_mbstocts(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[MBSTOCTS]);
-}
-
-XLCd
-_fallcEucLoader(name)
-    char *name;
-{
-    XLCd lcd;
-
-    lcd = _fallcCreateLC(name, _fallcGenericMethods);
-    if (lcd == NULL)
-       return lcd;
-
-
-    if ((_fallcCompareISOLatin1(XLC_PUBLIC_PART(lcd)->codeset, "euc"))) {
-       _fallcDestroyLC(lcd);
-       return (XLCd) NULL;
-    }
-
-    initCTptr(lcd);
-
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet, open_mbstocs);
-    _fallcSetConverter(lcd, XlcNWideChar, lcd, XlcNCharSet, open_wcstocs);
-    _fallcSetConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte, open_cstombs);
-    _fallcSetConverter(lcd, XlcNCharSet, lcd, XlcNWideChar, open_cstowcs);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNChar, open_mbtocs);
-
-#ifndef FORCE_INDIRECT_CONVERTER
-    _fallcSetConverter(lcd, XlcNCompoundText, lcd, XlcNMultiByte, open_ctstombs);
-    _fallcSetConverter(lcd, XlcNCompoundText, lcd, XlcNWideChar, open_ctstowcs);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCompoundText, open_mbstocts);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar, open_mbstowcs);
-    _fallcSetConverter(lcd, XlcNWideChar, lcd, XlcNCompoundText, open_wcstocts);
-    _fallcSetConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte, open_wcstombs);
-#endif
-
-    return lcd;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcFile.c b/cde/programs/dtudcfonted/libfal/_fallcFile.c
deleted file mode 100644 (file)
index 8fb0c0f..0000000
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcFile.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:36      */ 
-/* $XConsortium: _fallcFile.c /main/1 1996/04/08 15:16:48 cde-fuj $ */
-/*
- *
- * Copyright IBM Corporation 1993
- *
- * All Rights Reserved
- *
- * License to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of IBM not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- *
- * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND 
- * NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL
- * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
-*/
-#include <stdio.h>
-#include <ctype.h>
-#include "_fallibint.h"
-#include "_fallcPubI.h"
-#include <X11/Xos.h>
-#ifdef X_NOT_STDC_ENV
-extern char *getenv();
-#endif
-
-/************************************************************************/
-
-#define        iscomment(ch)   ((ch) == '#' || (ch) == '\0')
-#define isreadable(f)  ((access((f), R_OK) != -1) ? 1 : 0)
-/*
-#define        isspace(ch)     ((ch) == ' ' || (ch) == '\t' || (ch) == '\n')
-*/
-
-static int
-parse_line(line, argv, argsize)
-    char *line;
-    char **argv;
-    int argsize;
-{
-    int argc = 0;
-    char *p = line;
-
-    while(argc < argsize){
-       while(isspace(*p)){
-           ++p;
-       }
-       if(*p == '\0'){
-           break;
-       }
-       argv[argc++] = p;
-       while(! isspace(*p) && *p != '\0'){
-           ++p;
-       }
-       if(*p == '\0'){
-           break;
-       }
-       *p++ = '\0';
-    }
-
-    return argc;
-}
-
-#ifndef XLOCALEDIR
-#define XLOCALEDIR "/usr/lib/X11/locale"
-#endif
-
-static void
-xlocaledir(path)
-    char *path;
-{
-    char *dir, *p = path;
-    int len;
-
-    dir = getenv("XLOCALEDIR");
-    if(dir != NULL){
-       len = strlen(dir);
-       strcpy(p, dir);
-       p[len++] = ':';
-       p += len;
-    }
-    strcpy(p, XLOCALEDIR);
-}
-
-static int
-parse_path(path, argv, argsize)
-    char *path;
-    char **argv;
-    int argsize;
-{
-    char *p = path;
-    int i, n;
-
-    while((p = strchr(p, ':')) != NULL){
-       *p = ' ';       /* place space on delimter */
-    }
-    n = parse_line(path, argv, argsize);
-    if(n == 0){
-       return 0;
-    }
-    for(i = 0; i < n; ++i){
-       int len;
-       p = argv[i];
-       len = strlen(p);
-       if(p[len - 1] == '/'){
-           /* eliminate slash */
-           p[len - 1] = '\0';
-       }
-    }
-    return n;
-}
-
-enum { LtoR, RtoL };
-
-static char *
-_XlcResolveName(lc_name, file_name, direction)
-    char *lc_name;
-    char *file_name;
-    int direction;     /* mapping direction */
-{
-    FILE *fp;
-    char buf[BUFSIZE], *name = NULL;
-
-    fp = fopen(file_name, "r");
-    if(fp == (FILE *)NULL){
-       return NULL;
-    }
-
-    while(fgets(buf, BUFSIZE, fp) != NULL){
-       char *p = buf;
-       int n;
-       char *args[2], *from, *to;
-       while(isspace(*p)){
-           ++p;
-       }
-       if(iscomment(*p)){
-           continue;
-       }
-       n = parse_line(p, args, 2);             /* get first 2 fields */
-       if(n != 2){
-           continue;
-       }
-       if(direction == LtoR){
-           from = args[0], to = args[1];       /* left to right */
-       }else{
-           from = args[1], to = args[0];       /* right to left */
-       }
-       if(! strcmp(from, lc_name)){
-           name = Xmalloc(strlen(to) + 1);
-           if(name != NULL){
-               strcpy(name, to);
-           }
-           break;
-       }
-    }
-    if(fp != (FILE *)NULL){
-       fclose(fp);
-    }
-    return name;
-}
-
-/*
-#define        isupper(ch)     ('A' <= (ch) && (ch) <= 'Z')
-#define        tolower(ch)     ((ch) - 'A' + 'a')
-*/
-static char *
-lowercase(dst, src)
-    char *dst;
-    char *src;
-{
-    char *s, *t;
-
-    for(s = src, t = dst; *s; ++s, ++t){
-       *t = isupper(*s) ? tolower(*s) : *s;
-    }
-    *t = '\0';
-    return dst;
-}
-
-/************************************************************************/
-char *
-_fallcFileName(lcd, category)
-    XLCd lcd;
-    char *category;
-{
-    char lc_name[BUFSIZE];
-    char cat[BUFSIZE], dir[BUFSIZE];
-    int i, n;
-    char *args[256];
-    char *file_name = NULL;
-
-    if(lcd == (XLCd)NULL){
-       return NULL;
-    }
-
-    if(! _fallcResolveLocaleName(XLC_PUBLIC(lcd, siname), lc_name,
-                              NULL, NULL, NULL)){
-       return NULL;
-    }
-
-    lowercase(cat, category);
-    xlocaledir(dir);
-    n = parse_path(dir, args, 256);
-    for(i = 0; i < n; ++i){
-       char buf[BUFSIZE], *name;
-       sprintf(buf, "%s/%s.dir", args[i], cat);
-       name = _XlcResolveName(lc_name, buf, RtoL);
-       if(name == NULL){
-           continue;
-       }
-       if(*name == '/'){
-           /* supposed to be absolute path name */
-           file_name = name;
-       }else{
-           sprintf(buf, "%s/%s", args[i], name);
-           Xfree(name);
-           file_name = Xmalloc(strlen(buf) + 1);
-           if(file_name == NULL){
-               break;
-           }
-           strcpy(file_name, buf);
-       }
-       if(isreadable(file_name)){
-           break;
-       }
-       Xfree(file_name);
-       file_name = NULL;
-       /* Then, try with next dir */
-    }
-    return file_name;
-}
-
-/************************************************************************/
-#ifndef LOCALE_ALIAS
-#define LOCALE_ALIAS    "locale.alias"
-#endif
-
-int
-_fallcResolveLocaleName(lc_name, full_name, language, territory, codeset)
-    char *lc_name;
-    char *full_name;
-    char *language;
-    char *territory;
-    char *codeset;
-{
-    char dir[BUFSIZE], buf[BUFSIZE], *name = NULL;
-    int i, n;
-    char *args[256];
-
-    xlocaledir(dir);
-    n = parse_path(dir, args, 256);
-    for(i = 0; i < n; ++i){
-       sprintf(buf, "%s/%s", args[i], LOCALE_ALIAS);
-       name = _XlcResolveName(lc_name, buf, LtoR);
-       if(name != NULL){
-           break;
-       }
-    }
-
-    if(name != NULL){
-       snprintf(buf, sizeof(buf), "%s", name);
-       Xfree(name);
-    }else{
-       snprintf(buf, sizeof(buf), "%s", lc_name);
-    }
-    if(full_name != NULL){
-       strcpy(full_name, buf);
-    }
-
-    if(language || territory || codeset){
-       char *ptr, *name_p;
-       /*
-        * Decompose locale name
-        */
-       if(language) *language = '\0';
-       if(territory) *territory = '\0';
-       if(codeset) *codeset = '\0';
-
-       name_p = buf;
-       ptr = language;
-       while (1) {
-           if (*name_p == '_') {
-               if (ptr)
-                   *ptr = '\0';
-               ptr = territory;
-           } else if (*name_p == '.') {
-               if (ptr)
-                   *ptr = '\0';
-               ptr = codeset;
-           } else {
-               if (ptr)
-                   *ptr++ = *name_p;
-               if (*name_p == '\0')
-                   break;
-           }
-           name_p++;
-       }
-    }
-
-    return (buf[0] != '\0') ? 1 : 0;
-}
-
-/************************************************************************/
-#ifndef        LOCALE_DIR
-#define        LOCALE_DIR      "locale.dir"
-#endif
-
-int
-_fallcResolveDBName(lc_name, file_name)
-    char *lc_name;
-    char *file_name;
-{
-    char dir[BUFSIZE], buf[BUFSIZE], *name = NULL;
-    int i, n;
-    char *args[256];
-
-    xlocaledir(dir);
-    n = parse_path(dir, args, 256);
-    for(i = 0; i < n; ++i){
-       sprintf(buf, "%s/%s", args[i], LOCALE_DIR);
-       name = _XlcResolveName(lc_name, buf, RtoL);
-       if(name != NULL){
-           break;
-       }
-    }
-    if(name == NULL){
-       return 0;
-    }
-    strcpy(buf, name);
-    Xfree(name);
-    if(file_name != NULL){
-       strcpy(file_name, buf);
-    }
-    return 1;
-}
-
-/************************************************************************/
-int
-_fallcResolveI18NPath(path_name)
-    char *path_name;
-{
-    if(path_name != NULL){
-       xlocaledir(path_name);
-    }
-    return 1;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcGenConv.c b/cde/programs/dtudcfonted/libfal/_fallcGenConv.c
deleted file mode 100644 (file)
index 4f4643a..0000000
+++ /dev/null
@@ -1,2420 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcGenConv.c 1.5 - Fujitsu source for CDEnext    96/03/14 15:45:41   */ 
-/* $XConsortium: _fallcGenConv.c /main/1 1996/04/08 15:17:00 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- * 
- *   Modifier: Masayoshi Shimamura     FUJITSU LIMITED 
- * 
- */
-
-
-#include "_fallibint.h"
-#include "_fallcGeneric.h"
-#include <stdio.h>
-
-typedef struct _CTDataRec {
-    char *name;
-    char *encoding;             /* Compound Text encoding */
-} CTDataRec, *CTData;
-
-static CTDataRec default_ct_data[] =
-{
-    { "ISO8859-1:GL", "\033(B" },
-    { "ISO8859-1:GR", "\033-A" },
-    { "ISO8859-2:GR", "\033-B" },
-    { "ISO8859-3:GR", "\033-C" },
-    { "ISO8859-4:GR", "\033-D" },
-    { "ISO8859-7:GR", "\033-F" },
-    { "ISO8859-6:GR", "\033-G" },
-    { "ISO8859-8:GR", "\033-H" },
-    { "ISO8859-5:GR", "\033-L" },
-    { "ISO8859-9:GR", "\033-M" },
-    { "JISX0201.1976-0:GL", "\033(J" },
-    { "JISX0201.1976-0:GR", "\033)I" },
-
-    { "GB2312.1980-0:GL", "\033$(A" },
-    { "GB2312.1980-0:GR", "\033$)A" },
-    { "JISX0208.1983-0:GL", "\033$(B" },
-    { "JISX0208.1983-0:GR", "\033$)B" },
-    { "KSC5601.1987-0:GL", "\033$(C" },
-    { "KSC5601.1987-0:GR", "\033$)C" },
-#ifdef notdef
-    { "JISX0212.1990-0:GL", "\033$(D" },
-    { "JISX0212.1990-0:GR", "\033$)D" },
-    { "CNS11643.1986-1:GL", "\033$(G" },
-    { "CNS11643.1986-1:GR", "\033$)G" },
-    { "CNS11643.1986-2:GL", "\033$(H" },
-    { "CNS11643.1986-2:GR", "\033$)H" },
-
-    /* Non-Standard Character Set Encodings */
-    { "TIS620.2533-1:GR", "\033-T"},
-#endif
-} ;
-
-static CTDataRec directionality_data[] =
-{
-    { "BEGIN_LEFT-TO-RIGHT_TEXT", "\2331]" },
-    { "BEGIN_RIGHT-TO-LEFT_TEXT", "\2332]" },
-    { "END_OF_STRING", "\233]" },
-};
-
-typedef struct _StateRec {
-    XLCd lcd;
-    XlcCharSet charset;                /* charset of current state */
-    XlcCharSet GL_charset;     /* charset of initial state in GL */
-    XlcCharSet GR_charset;     /* charset of initial state in GR */
-} StateRec, *State;
-
-#define GR      0x80    /* begins right-side (non-ascii) region */
-#define GL      0x7f    /* ends left-side (ascii) region        */
-#define ESC    0x1b
-#define CSI    0x9b
-#define STX    0x02
-
-#define isleftside(c)   (((c) & GR) ? 0 : 1)
-#define isrightside(c)  (!isleftside(c))
-
-/* -------------------------------------------------------------------------- */
-/*                             Misc                                          */
-/* -------------------------------------------------------------------------- */
-
-static int
-compare(src, encoding, length)
-    register char *src;
-    register char *encoding;
-    register int length;
-{
-    char *start = src;
-
-    while (length-- > 0) {
-       if (*src++ != *encoding++)
-           return 0;
-       if (*encoding == '\0')
-           return src - start;
-    }
-
-    return 0;
-}
-
-static unsigned long
-conv_to_dest(conv, code)
-    Conversion conv;
-    unsigned long code;
-{
-    int i;
-    int conv_num = conv->conv_num;
-    FontScope convlist = conv->convlist;
-
-    for (i = 0; i < conv_num; i++) {
-       if (convlist[i].start <= code && code <= convlist[i].end) {
-           switch (convlist[i].shift_direction) {
-           case '+':
-               return(code + convlist[i].shift);
-           case '-':
-               return(code - convlist[i].shift);
-            default:
-               return(code);
-           }
-       }
-    }
-
-    return(code);
-}
-
-static unsigned long
-conv_to_source(conv, code)
-    Conversion conv;
-    unsigned long code;
-{
-    int i;
-    int conv_num;
-    FontScope convlist;
-    unsigned long start_p;
-    unsigned long start_m;
-    unsigned long end_p;
-    unsigned long end_m;
-
-    if (!conv)
-       return(code);
-
-    conv_num = conv->conv_num;
-    convlist = conv->convlist;
-
-    for (i = 0; i < conv_num; i++) {
-        start_p = convlist[i].start + convlist[i].shift;
-        start_m = convlist[i].start - convlist[i].shift;
-        end_p = convlist[i].end + convlist[i].shift;
-        end_m = convlist[i].end - convlist[i].shift;
-
-        switch (convlist[i].shift_direction) {
-       case '+':
-           if (start_p <= code && code <= end_p)
-               return(code - convlist[i].shift);
-            break;
-       case '-':
-           if (start_m <= code && code <= end_m)
-               return(code + convlist[i].shift);
-            break;
-        default:
-           continue;
-       }
-    }
-
-    return(code);
-}
-
-static unsigned long
-mb_to_gi(mb, codeset)
-    unsigned long mb;
-    CodeSet codeset;
-{
-    int i;
-    unsigned long mb_tmp, mask = 0;
-
-    if (codeset->mbconv) {
-       mb_tmp = conv_to_dest(codeset->mbconv, mb);
-       if (mb_tmp != mb)
-           return(mb_tmp);
-    }
-
-    if (codeset->side == XlcC0 || codeset->side == XlcGL || 
-       codeset->side == XlcC1 || codeset->side == XlcGR) {
-
-        for (i = 0; i < codeset->length; i++)
-           mask = (mask << 8) | GL;
-       mb = mb & mask;
-    }
-
-    return(mb);
-}
-
-static unsigned long
-gi_to_mb(glyph_index, codeset)
-    unsigned long glyph_index;
-    CodeSet codeset;
-{
-    int i;
-    unsigned long mask = 0;
-
-    if (codeset->side == XlcC1 || codeset->side == XlcGR) {
-        for (i = 0; i < codeset->length; i++)
-           mask = (mask << 8) | GR;
-       glyph_index = glyph_index | mask;
-    }
-
-    if (codeset->mbconv)
-        return( conv_to_source(codeset->mbconv, glyph_index) );
-
-    return(glyph_index);
-}
-
-static Bool
-gi_to_wc(lcd, glyph_index, codeset, wc)
-    XLCd lcd;
-    unsigned long glyph_index;
-    CodeSet codeset;
-    wchar_t *wc;
-{
-    unsigned char mask = 0;
-    unsigned long wc_encoding = codeset->wc_encoding;
-    int i, length = codeset->length;
-    unsigned long wc_shift_bits = XLC_GENERIC(lcd, wc_shift_bits);
-
-    for (i = wc_shift_bits; i > 0; i--)
-       mask = (mask << 1) | 0x01;
-
-    for (*wc = 0, length--; length >= 0; length--)
-       *wc = (*wc << wc_shift_bits) | ((glyph_index >> (length * 8 )) & mask);
-
-    *wc = *wc | wc_encoding;
-
-    return(True);
-}
-
-static Bool
-wc_to_gi(lcd, wc, glyph_index, codeset)
-    XLCd lcd;
-    wchar_t wc;
-    unsigned long *glyph_index;
-    CodeSet *codeset;
-{
-    int i;
-    unsigned char mask = 0;
-    unsigned long wc_encoding;
-    unsigned long wc_encode_mask = XLC_GENERIC(lcd, wc_encode_mask);
-    unsigned long wc_shift_bits = XLC_GENERIC(lcd, wc_shift_bits);
-    int codeset_num = XLC_GENERIC(lcd, codeset_num);
-    CodeSet *codeset_list = XLC_GENERIC(lcd, codeset_list);
-
-    wc_encoding = wc & wc_encode_mask;
-    for (*codeset = NULL, i = 0; i < codeset_num; i++) {
-       if (wc_encoding == codeset_list[i]->wc_encoding) {
-           *codeset = codeset_list[i];
-           break;
-        }
-    }
-    if (*codeset == NULL)
-       return(False);
-
-    for (i = wc_shift_bits; i > 0; i--)
-       mask = (mask << 1) | 0x01;
-
-    wc = wc & ~wc_encode_mask;
-    for (*glyph_index = 0, i = (*codeset)->length - 1; i >= 0; i--)
-       *glyph_index = (*glyph_index << 8) | 
-                     ( ((unsigned long)wc >> (i * wc_shift_bits)) & mask );
-
-    return(True);
-}
-
-static CodeSet
-byteM_parse_codeset(lcd, inbufptr)
-    XLCd lcd;
-    XPointer inbufptr;
-{
-    unsigned char ch;
-    CodeSet codeset;
-    ByteInfoList byteM;
-    ByteInfoListRec byteM_rec;
-    ByteInfo byteinfo;
-    ByteInfoRec byteinfo_rec;
-    Bool hit;
-    int i, j, k;
-
-    int codeset_num               = XLC_GENERIC(lcd, codeset_num);
-    CodeSet *codeset_list         = XLC_GENERIC(lcd, codeset_list);
-
-    for (i = 0; i < codeset_num; i++) {
-        codeset = codeset_list[i];
-        byteM = codeset->byteM;
-        if (codeset->side != XlcNONE || byteM == NULL)
-           continue;
-
-        for (j = 0; j < codeset->length; j++) {
-           ch = *((unsigned char *)(inbufptr + j)); 
-           byteM_rec = byteM[j];
-           byteinfo = byteM_rec.byteinfo;
-
-           for (hit=False,k=0; k < byteM_rec.byteinfo_num; k++) {
-               byteinfo_rec = byteinfo[k];
-               if (byteinfo_rec.start <= ch && ch <= byteinfo_rec.end) {
-                   hit = True;
-                   break;
-                }
-            }
-
-            if (!hit)
-               break;
-        }
-
-        if (hit)
-           return(codeset);
-    }
-
-    return(NULL);
-}                
-
-static CodeSet
-GLGR_parse_codeset(lcd, ch)
-    XLCd lcd;
-    unsigned char ch;
-{
-    int i;
-    CodeSet initial_state_GL      = XLC_GENERIC(lcd, initial_state_GL);
-    CodeSet initial_state_GR      = XLC_GENERIC(lcd, initial_state_GR);
-    CodeSet *codeset_list         = XLC_GENERIC(lcd, codeset_list);
-    int codeset_num               = XLC_GENERIC(lcd, codeset_num);
-
-    XlcSide side = XlcGL;
-    CodeSet codeset = initial_state_GL;
-
-    if (isrightside(ch)) {
-        side = XlcGR;
-        codeset = initial_state_GR;
-    }
-
-    if (codeset)
-       return(codeset);
-
-    for (i = 0; i < codeset_num; i++) {
-       codeset = codeset_list[i];
-       if (codeset->side == side)
-           return(codeset);
-    }
-    
-    return(NULL);
-}
-
-static XlcCharSet
-gi_parse_charset(glyph_index, codeset)
-    unsigned long glyph_index;
-    CodeSet codeset;
-{
-    int i;
-    size_t table_size = sizeof(default_ct_data) / sizeof(default_ct_data[0]);
-    XlcCharSet *charset_list = codeset->charset_list;
-    int num_charsets = codeset->num_charsets;
-    ExtdSegment ctextseg = codeset->ctextseg;
-    XlcCharSet charset;
-    int area_num;
-    FontScope area;
-
-    /* lockup ct sequence */
-    for (i = 0; i < num_charsets; i++) {
-       charset = charset_list[i];
-        if (*charset->ct_sequence != '\0')
-           break;
-    }
-    if (i >= num_charsets)
-       return(NULL);
-
-    /* Standard Character Set Encoding ? */
-    for (i = 0; i < table_size; i++)
-        if (compare(charset->ct_sequence, 
-              default_ct_data[i].encoding, strlen(charset->ct_sequence)))
-           goto check_extended_seg;
-
-    return(charset);
-
-check_extended_seg:
-    if (!ctextseg)
-        return(charset);
-
-    area = ctextseg->area;
-    area_num = ctextseg->area_num;
-
-    for (i = 0; i < area_num; i++) {
-
-        if (area[i].start <= glyph_index && glyph_index <= area[i].end) {
-
-           charset = ctextseg->charset;
-
-            if (*charset->ct_sequence == '\0')
-                return(NULL);
-
-           break;
-       }
-    }
-
-    return(charset);
-}
-
-static Bool
-ct_parse_csi(inbufptr, ctr_seq_len)
-    XPointer inbufptr;
-    int *ctr_seq_len;
-{
-    int i;
-    int num = sizeof(directionality_data) / sizeof(directionality_data[0]);
-
-    for (i = 0; i < num; i++) {
-       if ( !(*ctr_seq_len = strlen(directionality_data[i].encoding)) )
-           continue;
-
-       if ( strncmp(inbufptr, directionality_data[i].encoding, 
-                                               *ctr_seq_len) == 0)
-            return(True);
-    }
-
-    return(False);
-}
-
-static int
-cmp_esc_sequence(inbufptr, ct_sequence, encoding_name)
-    XPointer inbufptr;
-    char *ct_sequence;
-    char *encoding_name;
-{
-    size_t table_size = sizeof(default_ct_data) / sizeof(default_ct_data[0]);
-    int i, seq_len, name_len, total_len;
-    unsigned char byte_m, byte_l;
-
-    /* check esc sequence */
-    if ( !(seq_len = strlen(ct_sequence) ) )
-       return(0);
-    if ( strncmp(inbufptr, ct_sequence, seq_len) != 0)
-       return(0);
-
-    /* Standard Character Set Encoding ? */
-    for (i = 0; i < table_size; i++) {
-        if (compare(ct_sequence, 
-                default_ct_data[i].encoding, strlen(ct_sequence)))
-            return(seq_len);
-    }
-
-    /*
-     *   Non-Standard Character Set Encoding
-     *
-     * +-----+-----+-----+-----+-----+-----+-----+----   ----+-----+-----+
-     * |     esc sequence      |  M  |  L  |     encoding name     | STX |
-     * +-----+-----+-----+-----+-----+-----+-----+----   ----+-----+-----+
-     *           4bytes         1byte 1byte     variable length     1byte 
-     *                            |                                         |
-     *                            +-----------------------------------------+
-     *                              name length  = ((M - 128) * 128) + (L - 128)
-     */
-
-    /* get length of encoding name */
-    inbufptr += seq_len;
-    byte_m = *inbufptr++;
-    byte_l = *inbufptr++;
-    name_len = ((byte_m - 128) * 128) + (byte_l - 128);
-    total_len = seq_len + name_len;
-
-    /* compare encoding names */
-    if ( strncmp(inbufptr, encoding_name, name_len - 3) != 0 )
-       return(0);
-
-    /* check STX (Start of Text) */
-    inbufptr = inbufptr + name_len - 3;
-    if ( *inbufptr != STX )
-       return(0);
-
-    return(total_len);
-}
-
-static Bool
-ct_parse_charset(lcd, inbufptr, charset, ctr_seq_len)
-    XLCd lcd;
-    XPointer inbufptr;
-    XlcCharSet *charset;
-    int *ctr_seq_len;
-{
-    int i, j;
-    ExtdSegment ctextseg;
-    int num_charsets;
-    XlcCharSet *charset_list;
-    CodeSet codeset;
-    int codeset_num       = XLC_GENERIC(lcd, codeset_num);
-    CodeSet *codeset_list = XLC_GENERIC(lcd, codeset_list);
-    int segment_conv_num  = XLC_GENERIC(lcd, segment_conv_num);
-    SegConv segment_conv  = XLC_GENERIC(lcd, segment_conv);
-
-
-    /* get charset from XLC_XLOCALE by escape sequence */
-
-    for (i = 0; i < codeset_num; i++) {
-       codeset = codeset_list[i];
-
-       num_charsets = codeset->num_charsets;
-       charset_list = codeset->charset_list;
-       ctextseg     = codeset->ctextseg;
-
-       for (j = 0; j < num_charsets; j++) {
-           *charset = charset_list[j];
-            if ( *ctr_seq_len = cmp_esc_sequence(inbufptr, 
-                   (*charset)->ct_sequence, (*charset)->encoding_name) )
-               return(True);
-       }
-
-       if (ctextseg) {
-           *charset = ctextseg->charset;
-            if ( *ctr_seq_len = cmp_esc_sequence(inbufptr, 
-                   (*charset)->ct_sequence, (*charset)->encoding_name) )
-               return(True);
-       }
-    }
-
-    /* get charset from XLC_SEGMENTCONVERSION by escape sequence */
-
-    if (!segment_conv)
-       return(False);
-
-    for (i = 0; i < segment_conv_num; i++) {
-       *charset = segment_conv[i].source;
-        if ( *ctr_seq_len = cmp_esc_sequence(inbufptr, 
-               (*charset)->ct_sequence, (*charset)->encoding_name) )
-           return(True);
-       *charset = segment_conv[i].dest;
-        if ( *ctr_seq_len = cmp_esc_sequence(inbufptr, 
-               (*charset)->ct_sequence, (*charset)->encoding_name) )
-           return(True);
-    }
-    
-    return(False);
-}
-
-static Bool
-segment_conversion(lcd, charset, glyph_index)
-    XLCd lcd;
-    XlcCharSet *charset;
-    unsigned long *glyph_index;
-{
-    int i;
-    int segment_conv_num = XLC_GENERIC(lcd, segment_conv_num);
-    SegConv segment_conv = XLC_GENERIC(lcd, segment_conv);
-    FontScopeRec range;
-    ConversionRec conv_rec;
-
-    if (!segment_conv)
-       return(True);
-
-    for (i = 0; i < segment_conv_num; i++) {
-       if (segment_conv[i].source == *charset)
-           break;
-    }
-
-    if (i >= segment_conv_num)
-       return(True);
-
-    range = segment_conv[i].range;
-    if (*glyph_index < range.start || range.end < *glyph_index)
-       return(True);
-    
-    *charset = segment_conv[i].dest;
-    conv_rec.conv_num = segment_conv[i].conv_num;
-    conv_rec.convlist = segment_conv[i].conv;
-    *glyph_index = conv_to_dest(&conv_rec, *glyph_index);
-
-    return(True);
-}
-
-CodeSet
-_fallcGetCodeSetFromName(lcd, name)
-    XLCd lcd;
-    char *name;
-{
-    int i, j;
-    XlcCharSet charset;
-    int num_charsets;
-    XlcCharSet *charset_list;
-    CodeSet codeset;
-
-    int codeset_num       = XLC_GENERIC(lcd, codeset_num);
-    CodeSet *codeset_list = XLC_GENERIC(lcd, codeset_list);
-
-    for (i = 0; i < codeset_num; i++) {
-        codeset = codeset_list[i];
-
-        num_charsets = codeset->num_charsets;
-        charset_list = codeset->charset_list;
-
-        for (j = 0; j < num_charsets; j++) {
-            charset = charset_list[j];
-
-            if (!strlen(charset->name))
-                continue;
-            if ( strcmp(charset->name, name) == 0)
-                return(codeset);
-        }
-    }
-
-    return(NULL);
-}
-
-static Bool
-_XlcGetCodeSetFromCharSet(lcd, charset, codeset, glyph_index)
-    XLCd lcd;
-    XlcCharSet charset;
-    CodeSet *codeset;
-    unsigned long *glyph_index;
-{
-    int i, j, num;
-    CodeSet *codeset_list = XLC_GENERIC(lcd, codeset_list);
-    XlcCharSet *charset_list;
-    int codeset_num, num_charsets;
-    Conversion ctconv;
-    unsigned long glyph_index_tmp;
-    ExtdSegment ctextseg;
-    size_t table_size = sizeof(default_ct_data) / sizeof(default_ct_data[0]);
-
-    codeset_num = XLC_GENERIC(lcd, codeset_num);
-
-    for (num = 0 ; num < codeset_num; num++) {
-        *codeset = codeset_list[num];
-        ctconv = (*codeset)->ctconv;
-       ctextseg = (*codeset)->ctextseg;
-
-        num_charsets = (*codeset)->num_charsets;
-        charset_list = (*codeset)->charset_list;
-
-        glyph_index_tmp = conv_to_source(ctconv, *glyph_index);
-
-        /* Standard Character Set Encoding ? */
-        for (i = 0; i < table_size; i++) {
-            if (compare(charset->ct_sequence, 
-                  default_ct_data[i].encoding, strlen(charset->ct_sequence)))
-               break;
-        }
-
-        if (i < table_size) {
-
-            /* Standard Character Set Encoding */
-           if (glyph_index_tmp == *glyph_index) {
-                for (j = 0; j < num_charsets; j++) {
-                    if (charset_list[j] == charset) {
-                        goto end_loop;
-                    }
-                }
-            }
-
-       } else {
-
-            /* Non-Standard Character Set Encoding */
-            for (j = 0; j < num_charsets; j++) {
-                if (charset_list[j] == charset) {
-                    goto end_loop;
-                }
-            }
-
-            if (glyph_index_tmp != *glyph_index) {
-               if (ctextseg->charset == charset) {
-                   goto end_loop;
-                }
-            }
-
-       }
-
-    }
-
-end_loop:
-    if (num < codeset_num) {
-       *glyph_index = glyph_index_tmp;
-       return(True);
-    }
-
-    return(False);
-}
-
-static Bool
-check_string_encoding(codeset)
-    CodeSet codeset;
-{
-    int i;
-    XlcCharSet charset;
-    XlcCharSet *charset_list = codeset->charset_list;
-    int num_charsets = codeset->num_charsets;
-
-    for (i = 0; i < num_charsets; i++) {
-        charset = charset_list[i];
-        if ( strcmp(charset->encoding_name, "ISO8859-1") == 0 || 
-            charset->string_encoding)
-            return(True);
-    }
-
-    return(False);
-}
-
-/* -------------------------------------------------------------------------- */
-/*                             Init                                          */
-/* -------------------------------------------------------------------------- */
-
-static void
-init_state(conv)
-    XlcConv conv;
-{
-    register State state = (State) conv->state;
-
-    /* for CT */
-    state->charset = NULL;
-    state->GL_charset = _fallcGetCharSet("ISO8859-1:GL");
-    state->GR_charset = _fallcGetCharSet("ISO8859-1:GR");
-}
-
-/* -------------------------------------------------------------------------- */
-/*                             Convert                                       */
-/* -------------------------------------------------------------------------- */
-
-static int
-mbstowcs_org(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    XLCd lcd = state->lcd;
-
-    unsigned char ch;
-    unsigned long mb = 0;
-    wchar_t wc;
-
-    int length = 0, len_left = 0;
-    int unconv_num = 0;
-    int num;
-    Bool ss_flag = 0;
-
-    CodeSet codeset = NULL;
-    ParseInfo parse_info;
-
-    XPointer inbufptr = *from;
-    wchar_t *outbufptr = (wchar_t *) *to;
-    int from_size = *from_left;
-
-    unsigned char *mb_parse_table = XLC_GENERIC(lcd, mb_parse_table);
-    ParseInfo *mb_parse_list      = XLC_GENERIC(lcd, mb_parse_list);
-
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    while (*from_left && *to_left) {
-
-       ch = *inbufptr++;
-       (*from_left)--;
-
-       /* null ? */
-       if (!ch) {
-            if (outbufptr) {*outbufptr++ = L'\0';}
-           (*to_left)--;
-
-           /* error check */
-            if (len_left) {
-               unconv_num += (length - len_left);
-               len_left = 0;
-            }
-
-           continue;
-       }
-
-       /* same mb char data */
-        if (len_left)
-           goto output_one_wc;
-
-        /* next mb char data for single shift ? */
-       if (mb_parse_table) {
-           if ((num = mb_parse_table[ch]) > 0) {
-               parse_info = mb_parse_list[num - 1];
-
-                codeset = parse_info->codeset;
-               length = len_left = codeset->length;
-               mb = 0;
-               ss_flag = 1;
-
-               continue;
-           }
-        } 
-    
-       /* next mb char data for byteM ? */
-       if (codeset = byteM_parse_codeset(lcd, (inbufptr - 1)))
-           goto next_mb_char;
-
-       /* next mb char data for GL or GR side ? */
-       if (codeset = GLGR_parse_codeset(lcd, ch))
-           goto next_mb_char;
-           
-        /* can't find codeset for the ch */
-        unconv_num++;
-        continue;
-
-next_mb_char:
-        length = len_left = codeset->length;
-       mb = 0;
-       ss_flag = 0;
-
-output_one_wc:
-       mb = (mb << 8) | ch;  /* 1 byte left shift */
-       len_left--;
-
-        /* last of one mb char data */
-        if (!len_left) {
-            gi_to_wc(lcd, mb_to_gi(mb, codeset), codeset, &wc);
-            if (outbufptr) {*outbufptr++ = wc;}
-           (*to_left)--;
-        }
-
-    } /* end of while */
-
-    /* error check on last char */
-    if (len_left) {
-       inbufptr -= (length - len_left + ss_flag);
-       (*from_left) += (length - len_left + ss_flag);
-       unconv_num += (length - len_left + ss_flag);
-    }
-
-    *from = *from + from_size;
-    *from_left = 0;
-    *to = (XPointer)outbufptr;
-
-    return unconv_num;
-}
-
-static int
-wcstombs_org(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    XLCd lcd = state->lcd;
-
-    char *encoding;
-    unsigned long mb, glyph_index;
-    wchar_t wc;
-
-    int length;
-    int unconv_num = 0;
-
-    CodeSet codeset;
-
-    wchar_t *inbufptr = (wchar_t *) *from;
-    XPointer outbufptr = *to;
-    int from_size = *from_left;
-    
-    char *default_string = XLC_PUBLIC(lcd, default_string);
-    int defstr_len = strlen(default_string);
-
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    while (*from_left && *to_left) {
-
-        wc = *inbufptr++;
-        (*from_left)--;
-
-        /* null ? */
-        if (!wc) {
-            if (outbufptr) {*outbufptr++ = '\0';}
-            (*to_left)--;
-
-            continue;
-        }
-
-        /* convert */
-       if ( !wc_to_gi(lcd, wc, &glyph_index, &codeset) ) {
-
-           /* output default_string of falDefaultString() */
-            if (*to_left < defstr_len)
-               break;
-           if (outbufptr) {strncpy((char *)outbufptr, default_string, defstr_len);}
-
-           if (outbufptr) {outbufptr += defstr_len;}
-           (*to_left) -= defstr_len;
-
-            unconv_num++;
-
-        } else {
-            mb = gi_to_mb(glyph_index, codeset);
-           if (codeset->parse_info) {
-
-               /* output shift sequence */
-               encoding = codeset->parse_info->encoding;
-                length = strlen(encoding);
-                if (*to_left < length)
-                   break;
-               if (outbufptr) {strncpy((char *)outbufptr, encoding, length);}
-
-               if (outbufptr) {outbufptr += length;}
-               (*to_left) -= length;
-            }
-
-            /* output characters */
-           length = codeset->length;
-            if (*to_left < length)
-               break;
-           if (outbufptr) {strncpy((char *)outbufptr, ((char *)&mb)+sizeof(mb)-length, length);}
-
-           if (outbufptr) {outbufptr += length;}
-           (*to_left) -= length;
-        }
-
-    } /* end of while */
-
-    *from = *from + from_size;
-    *from_left = 0;
-    *to = outbufptr;
-
-    return unconv_num;
-}
-
-static int
-wcstocts(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    size_t table_size = sizeof(default_ct_data) / sizeof(default_ct_data[0]);
-    State state = (State) conv->state;
-    XLCd lcd = state->lcd;
-
-    unsigned long glyph_index;
-    wchar_t wc;
-
-    int i, total_len, seq_len, name_len;
-    int unconv_num = 0;
-    Bool first_flag = True, standard_flag;
-    XlcSide side;
-
-    CodeSet codeset;
-    XlcCharSet charset, old_charset = NULL;
-    char *ct_sequence;
-    XPointer p;
-
-    wchar_t *inbufptr = (wchar_t *) *from;
-    XPointer outbufptr = *to;
-    int from_size = *from_left;
-
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    while (*from_left && *to_left) {
-
-        wc = *inbufptr++;
-        (*from_left)--;
-
-        /* null ? */
-        if (!wc) {
-            if (outbufptr) {*outbufptr++ = '\0';}
-            (*to_left)--;
-
-            continue;
-        }
-
-        /* convert */
-       if ( !wc_to_gi(lcd, wc, &glyph_index, &codeset) ) {
-            unconv_num++;
-           continue;
-        }
-
-        /* parse charset */
-        if ( !(charset = gi_parse_charset(glyph_index, codeset)) ) {
-            unconv_num++;
-           continue;
-        }
-
-        /* Standard Character Set Encoding ? */
-       standard_flag = False;
-        for (i = 0; i < table_size; i++)
-            if (compare(charset->ct_sequence, 
-                    default_ct_data[i].encoding, strlen(charset->ct_sequence)))
-                standard_flag = True;
-
-        /*
-         *   Non-Standard Character Set Encoding
-         *
-         * +-----+-----+-----+-----+-----+-----+-----+----   ----+-----+-----+
-         * |     esc sequence      |  M  |  L  |     encoding name     | STX |
-         * +-----+-----+-----+-----+-----+-----+-----+----   ----+-----+-----+
-         *           4bytes         1byte 1byte     variable length     1byte 
-         *                        |                                         |
-         *                        +-----------------------------------------+
-         *                          name length  = ((M - 128) * 128) + (L - 128)
-         */
-
-        /* make encoding data */
-       ct_sequence = charset->ct_sequence;
-       side = charset->side;
-        seq_len = strlen(charset->ct_sequence);
-       if (standard_flag) {
-            name_len = 0;
-           total_len = seq_len;
-       } else {
-            name_len = 2 + strlen(charset->encoding_name) + 1;
-           total_len = seq_len + name_len;
-       }
-
-        /* output escape sequence of CT */
-       if ( (charset != old_charset) &&
-           !(first_flag && (strcmp(charset->encoding_name,"ISO8859-1")==0))) {
-
-           if (*to_left < total_len + 1) {
-                unconv_num++;
-               break;
-           }
-
-           if (outbufptr) {
-               strcpy((char *)outbufptr, charset->ct_sequence);
-               outbufptr += seq_len;
-
-                if (!standard_flag) {
-                   *outbufptr++ = name_len / 128 + 128;
-                   *outbufptr++ = name_len % 128 + 128;
-                   strcpy((char *)outbufptr, charset->encoding_name);
-                   outbufptr = outbufptr + name_len - 2 - 1;
-                   *outbufptr++ = STX;
-                }
-           }
-
-           (*to_left) -= total_len;
-
-           first_flag = False;
-           old_charset = charset;
-       }
-
-        /* output glyph index */
-       if (codeset->ctconv)
-            glyph_index = conv_to_dest(codeset->ctconv, glyph_index);
-        if (*to_left < charset->char_size) {
-            unconv_num++;
-           break;
-        }
-
-        p = ((XPointer)&glyph_index) + sizeof(glyph_index) - charset->char_size;
-       for (i = 0; i < charset->char_size; i++) {
-           if (side == XlcC0 || side == XlcGL) {
-               if (outbufptr) {*outbufptr++ = *p++ & GL;}
-           } else if (side == XlcC1 || side == XlcGR) {
-               if (outbufptr) {*outbufptr++ = *p++ | GR;}
-           } else {
-               if (outbufptr) {*outbufptr++ = *p++;}
-            }
-        }
-
-       (*to_left) -= charset->char_size;
-
-    } /* end of while */
-
-    *from = *from + from_size;
-    *from_left = 0;
-    *to = outbufptr;
-
-    return unconv_num;
-}
-
-static int
-ctstowcs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    XLCd lcd = state->lcd;
-
-    unsigned char ch;
-    unsigned long glyph_index = 0;
-    wchar_t wc;
-
-    int ctr_seq_len = 0, gi_len_left = 0, gi_len = 0;
-    int unconv_num = 0;
-
-    CodeSet codeset = NULL;
-    XlcCharSet charset_tmp;
-
-    XPointer inbufptr = *from;
-    wchar_t *outbufptr = (wchar_t *) *to;
-    int from_size = *from_left;
-
-
-    init_state(conv);
-
-    if (from == NULL || *from == NULL) {
-       init_state(conv);
-        return( 0 );
-    }
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    while (*from_left && *to_left) {
-
-       ch = *inbufptr++;
-       (*from_left)--;
-
-       /* null ? */
-       if (!ch) {
-            if (outbufptr) {*outbufptr++ = L'\0';}
-           (*to_left)--;
-
-           /* error check */
-            if (gi_len_left) {
-               unconv_num += (gi_len - gi_len_left);
-               gi_len_left = 0;
-            }
-
-           continue;
-       }
-
-       /* same glyph_index data */
-        if (gi_len_left)
-           goto output_one_wc;
-
-        /* control sequence ? */
-        if (ch == CSI) {
-            if ( !ct_parse_csi(inbufptr - 1, &ctr_seq_len) )
-               goto skip_the_seg;
-
-           if (*from_left < ctr_seq_len) {
-               inbufptr--;
-               (*from_left)++;
-               unconv_num += *from_left;
-               break;
-           }
-
-            /* skip the control sequence */
-           inbufptr += (ctr_seq_len - 1);
-           *from_left -= (ctr_seq_len - 1);
-
-            continue;
-       }
-
-        /* escape sequence ? */
-        if (ch == ESC) {
-           if ( !ct_parse_charset(lcd, 
-                       inbufptr - 1, &state->charset, &ctr_seq_len) )
-               goto skip_the_seg;
-
-           if (*from_left < ctr_seq_len) {
-               inbufptr--;
-               (*from_left)++;
-               unconv_num += *from_left;
-               break;
-           }
-
-            /* skip the escape sequence */
-           inbufptr += (ctr_seq_len - 1);
-           *from_left -= (ctr_seq_len - 1);
-
-            continue;
-        } 
-
-       /* check current state */
-        if (state->charset) {
-           if (state->charset->side == XlcC0 || 
-                       state->charset->side == XlcGL) {
-               state->GL_charset = state->charset;
-
-            } else if (state->charset->side == XlcC1 || 
-                       state->charset->side == XlcGR) {
-               state->GR_charset = state->charset;
-           }   
-       } else {
-            if (isleftside(ch))
-               state->charset = state->GL_charset;
-            else
-               state->charset = state->GR_charset;
-        }
-
-       gi_len = gi_len_left = state->charset->char_size;
-       glyph_index = 0;
-
-output_one_wc:
-        if (state->charset->side == XlcC1 || state->charset->side == XlcGR)
-            glyph_index = (glyph_index << 8) | (ch & GL);
-        else
-            glyph_index = (glyph_index << 8) | ch;
-
-       gi_len_left--;
-
-        /* last of one glyph_index data */
-        if (!gi_len_left) {
-
-           /* segment conversion */
-           charset_tmp = state->charset;
-           if ( !segment_conversion(lcd, &charset_tmp, &glyph_index) ) {
-               unconv_num += gi_len;
-               continue;
-            }
-
-            /* get codeset */
-            if ( !_XlcGetCodeSetFromCharSet(lcd, charset_tmp, 
-                                               &codeset, &glyph_index) ) {
-               unconv_num += gi_len;
-               continue;
-            }
-
-            /* convert glyph index to wicd char */
-            gi_to_wc(lcd, glyph_index, codeset, &wc);
-            if (outbufptr) {*outbufptr++ = wc;}
-           (*to_left)--;
-        }
-
-        continue;
-
-skip_the_seg:
-       /* skip until next escape or control sequence */
-        while ( *from_left ) {
-           ch = *inbufptr++;
-           (*from_left)--;
-           unconv_num++;
-
-            if (ch == ESC || ch == CSI) {
-               inbufptr--;
-               (*from_left)++;
-               unconv_num--;
-               break;
-           }
-        }
-
-        if ( !(*from_left) )
-           break;
-
-    } /* end of while */
-
-    /* error check on last char */
-    if (gi_len_left) {
-       inbufptr -= (gi_len - gi_len_left);
-       (*from_left) += (gi_len - gi_len_left);
-       unconv_num += (gi_len - gi_len_left);
-    }
-
-    *from = *from + from_size;
-    *from_left = 0;
-    *to = (XPointer)outbufptr;
-
-    return unconv_num;
-}
-
-static int
-mbstocts(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XPointer buf = Xmalloc((*from_left) * sizeof(wchar_t));
-    XPointer buf_ptr1 = buf;
-    int buf_left1 = (*from_left);
-    XPointer buf_ptr2 = buf_ptr1;
-    int buf_left2;
-    int unconv_num;
-
-    unconv_num = mbstowcs_org(conv, 
-               from, from_left, &buf_ptr1, &buf_left1, args, num_args);
-    if (unconv_num < 0)
-        goto ret;
-
-    buf_left2 = (buf_ptr1 - buf_ptr2) / sizeof(wchar_t);
-
-    unconv_num += wcstocts(conv, 
-               &buf_ptr2, &buf_left2, to, to_left, args, num_args);
-    if (unconv_num < 0)
-        goto ret;
-
-ret:
-    if (buf)
-       Xfree((char *)buf);
-
-    return unconv_num;
-}
-
-static int
-mbstostr(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    XLCd lcd = state->lcd;
-
-    unsigned char ch;
-    unsigned long mb = 0;
-
-
-    int length = 0, len_left = 0;
-    int unconv_num = 0;
-    int num;
-    Bool ss_flag = 0;
-
-    CodeSet codeset = NULL;
-    ParseInfo parse_info;
-
-    XPointer inbufptr = *from;
-    XPointer outbufptr = *to;
-    int from_size = *from_left;
-
-    unsigned char *mb_parse_table = XLC_GENERIC(lcd, mb_parse_table);
-    ParseInfo *mb_parse_list      = XLC_GENERIC(lcd, mb_parse_list);
-
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    while (*from_left && *to_left) {
-
-       ch = *inbufptr++;
-       (*from_left)--;
-
-       /* null ? */
-       if (!ch) {
-            if (outbufptr) {*outbufptr++ = '\0';}
-           (*to_left)--;
-
-            /* error check */
-            if (len_left) {
-                unconv_num += (length - len_left);
-                len_left = 0;
-            }
-
-           continue;
-       }
-
-        /* same mb char data */
-        if (len_left)
-            goto output_one_mb;
-
-        /* next mb char data for single shift ? */
-       if (mb_parse_table) {
-           if ((num = mb_parse_table[ch]) > 0) {
-               parse_info = mb_parse_list[num - 1];
-
-                codeset = parse_info->codeset;
-                length = len_left = codeset->length;
-                mb = 0;
-                ss_flag = 1;
-
-                continue;
-           }
-        } 
-    
-       /* next char data : byteM ? */
-       if (codeset = byteM_parse_codeset(lcd, (inbufptr - 1)))
-           goto next_mb_char;
-
-       /* next char data : GL or GR side ? */
-       if (codeset = GLGR_parse_codeset(lcd, ch))
-           goto next_mb_char;
-           
-        /* can't find codeset for the ch */
-        unconv_num++;
-        continue;
-
-next_mb_char:
-        length = len_left = codeset->length;
-        mb = 0;
-        ss_flag = 0;
-
-output_one_mb:
-        mb = (mb << 8) | ch;  /* 1 byte left shift */
-        len_left--;
-
-        /* last of one mb char data */
-        if (!len_left) {
-            if (check_string_encoding(codeset)) {
-                if (outbufptr) {*outbufptr++ = mb & 0xff;}
-               (*to_left)--;
-            } else {
-               unconv_num++;
-            }
-        }
-
-    } /* end of while */
-
-    /* error check on last char */
-    if (len_left) {
-        inbufptr -= (length - len_left + ss_flag);
-        (*from_left) += (length - len_left + ss_flag);
-        unconv_num += (length - len_left + ss_flag);
-    }
-
-    *from = *from + from_size;
-    *from_left = 0;
-    *to = (XPointer)outbufptr;
-
-    return unconv_num;
-}
-
-static int
-mbtocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    XLCd lcd = state->lcd;
-
-    unsigned char ch;
-    unsigned long mb = 0;
-    unsigned long glyph_index;
-
-    int length = 0, len_left = 0, char_len;
-    int unconv_num = 0;
-    int i, num;
-    XlcSide side;
-
-    CodeSet codeset = NULL;
-    XlcCharSet charset = NULL;
-    ParseInfo parse_info;
-    XPointer p;
-
-    XPointer inbufptr = *from;
-    XPointer outbufptr = *to;
-    int from_size = *from_left;
-
-
-    unsigned char *mb_parse_table = XLC_GENERIC(lcd, mb_parse_table);
-    ParseInfo *mb_parse_list      = XLC_GENERIC(lcd, mb_parse_list);
-
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    while (*from_left && *to_left) {
-
-       ch = *inbufptr++;
-       (*from_left)--;
-
-       /* null ? */
-       if (!ch) {
-            unconv_num = 1;
-            if (len_left)
-               unconv_num += (length - len_left);
-           break;
-       }
-
-       /* same mb char data */
-        if (len_left)
-           goto output;
-
-        /* next mb char data for single shift ? */
-       if (mb_parse_table) {
-           if ((num = mb_parse_table[ch]) > 0) {
-               parse_info = mb_parse_list[num - 1];
-
-                codeset = parse_info->codeset;
-               length = len_left = codeset->length;
-               mb = 0;
-
-               continue;
-           }
-        } 
-    
-       /* next mb char data for byteM ? */
-       if (codeset = byteM_parse_codeset(lcd, (inbufptr - 1)))
-           goto next_mb_char;
-
-       /* next mb char data for GL or GR side ? */
-       if (codeset = GLGR_parse_codeset(lcd, ch))
-           goto next_mb_char;
-           
-        /* can't find codeset for the ch */
-        unconv_num = 1;
-        break;
-
-next_mb_char:
-        length = len_left = codeset->length;
-       mb = 0;
-
-output:
-       mb = (mb << 8) | ch;  /* 1 byte left shift */
-       len_left--;
-
-        /* last of one mb char data */
-        if (!len_left) {
-            glyph_index = mb_to_gi(mb, codeset);
-            if (!(charset = gi_parse_charset(glyph_index, codeset))) {
-                unconv_num = length;
-                break;
-            }
-            char_len = charset->char_size;
-           side = charset->side;
-
-            /* output glyph index */
-            if (codeset->ctconv)
-                glyph_index = conv_to_dest(codeset->ctconv, glyph_index);
-            if (*to_left < char_len) {
-                unconv_num = length;
-                break;
-            }
-
-            p = ((XPointer)&glyph_index) + sizeof(glyph_index) - char_len;
-            for (i = 0; i < char_len; i++) {
-                if (side == XlcC0 || side == XlcGL) {
-                    if (outbufptr) {*outbufptr++ = *p++ & GL;}
-                } else if (side == XlcC1 || side == XlcGR) {
-                    if (outbufptr) {*outbufptr++ = *p++ | GR;}
-                } else {
-                    if (outbufptr) {*outbufptr++ = *p++;}
-                }
-            }
-
-            (*to_left) -= char_len;
-
-            break;
-        }
-
-    } /* end of while */
-
-    /* error end */
-    if (unconv_num) {
-        *from = *from + from_size;
-        *from_left = 0;
-        *to = outbufptr;
-       return -1;
-    }
-
-    /* nomal end */
-    *from = inbufptr;
-    *to = outbufptr;
-
-    if (num_args > 0)
-        *((XlcCharSet *) args[0]) = charset;
-
-    return 0;
-}
-
-static int
-mbstocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    int ret;
-    XlcCharSet charset_old, charset = NULL;
-    XPointer tmp_args[1];
-
-    XPointer inbufptr;
-    int        in_left;
-    XPointer outbufptr;
-    int        out_left;
-    tmp_args[0] = (XPointer) &charset;
-
-    ret = mbtocs(conv, from, from_left, to, to_left, tmp_args, 1);
-    charset_old = charset;
-    inbufptr = *from;
-    in_left = *from_left;
-    outbufptr = *to;
-    out_left = *to_left;
-
-    while ( ret == 0 && *from_left && *to_left && charset_old == charset ) {
-       charset_old = charset;
-       inbufptr = *from;
-       in_left = *from_left;
-       outbufptr = *to;
-       out_left = *to_left;
-        ret = mbtocs(conv, from, from_left, to, to_left, tmp_args, 1);
-    }
-
-    *from = inbufptr;
-    *from_left = in_left;
-    *to = outbufptr;
-    *to_left = out_left;
-
-    if (num_args > 0)
-        *((XlcCharSet *) args[0]) = charset_old;
-
-    /* error end */
-    if (ret != 0)
-       return( -1 );
-
-    return(0);
-}
-
-static int
-wcstostr(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    XLCd lcd = state->lcd;
-
-    char *encoding;
-    unsigned long mb, glyph_index;
-    wchar_t wc;
-
-    int length;
-    int unconv_num = 0;
-
-    CodeSet codeset;
-
-    wchar_t *inbufptr = (wchar_t *) *from;
-    XPointer outbufptr = *to;
-    int from_size = *from_left;
-    
-    char *default_string = XLC_PUBLIC(lcd, default_string);
-    int defstr_len = strlen(default_string);
-
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    while (*from_left && *to_left) {
-
-        wc = *inbufptr++;
-        (*from_left)--;
-
-        /* null ? */
-        if (!wc) {
-            if (outbufptr) {*outbufptr++ = '\0';}
-            (*to_left)--;
-
-            continue;
-        }
-
-        /* convert */
-       if ( !wc_to_gi(lcd, wc, &glyph_index, &codeset) ) {
-
-           /* output default_string of falDefaultString() */
-            if (*to_left < defstr_len)
-               break;
-           if (outbufptr) {strncpy((char *)outbufptr, default_string, defstr_len);}
-
-           if (outbufptr) {outbufptr += defstr_len;}
-           (*to_left) -= defstr_len;
-
-            unconv_num++;
-
-        } else {
-            mb = gi_to_mb(glyph_index, codeset);
-           if (codeset->parse_info) {
-
-               /* output shift sequence */
-               encoding = codeset->parse_info->encoding;
-                length = strlen(encoding);
-                if (*to_left < length)
-                   break;
-               if (check_string_encoding(codeset)) {
-                   if (outbufptr) {strncpy((char *)outbufptr, encoding, length);}
-                   if (outbufptr) {outbufptr += length;}
-                   (*to_left) -= length;
-                }
-            }
-
-            /* output characters */
-           length = codeset->length;
-            if (*to_left < length)
-               break;
-            if (check_string_encoding(codeset)) {
-               if (outbufptr) {strncpy((char *)outbufptr, 
-                       ((char *)&mb) + sizeof(mb) - length, length);}
-               if (outbufptr) {outbufptr += length;}
-               (*to_left) -= length;
-            } else {
-               unconv_num++;
-            }
-        }
-
-    } /* end of while */
-
-    *from = *from + from_size;
-    *from_left = 0;
-    *to = outbufptr;
-
-    return unconv_num;
-}
-
-static int
-wctocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    XLCd lcd = state->lcd;
-
-    wchar_t wc;
-    unsigned long glyph_index;
-
-    int i, char_len;
-    int unconv_num = 0;
-    XlcSide side;
-
-    CodeSet codeset;
-    XlcCharSet charset;
-    XPointer p;
-
-    wchar_t *inbufptr = (wchar_t *) *from;
-    XPointer outbufptr = *to;
-    int from_size = *from_left;
-
-
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    if (*from_left && *to_left) {
-
-        wc = *inbufptr++;
-        (*from_left)--;
-
-        /* null ? */
-        if (!wc) {
-            unconv_num = 1;
-            goto end;
-        }
-
-        /* convert */
-       if ( !wc_to_gi(lcd, wc, &glyph_index, &codeset) ) {
-            unconv_num = 1;
-           goto end;
-        }
-
-        if ( !(charset = gi_parse_charset(glyph_index, codeset)) ) {
-            unconv_num = 1;
-           goto end;
-        }
-       char_len = charset->char_size;
-       side = charset->side;
-
-        /* output glyph index */
-       if (codeset->ctconv)
-            glyph_index = conv_to_dest(codeset->ctconv, glyph_index);
-        if (*to_left < char_len) {
-            unconv_num++;
-           goto end;
-        }
-
-        p = ((XPointer)&glyph_index) + sizeof(glyph_index) - char_len;
-       for (i = 0; i < char_len; i++) {
-           if (side == XlcC0 || side == XlcGL) {
-               if (outbufptr) {*outbufptr++ = *p++ & GL;}
-           } else if (side == XlcC1 || side == XlcGR) {
-               if (outbufptr) {*outbufptr++ = *p++ | GR;}
-           } else {
-               if (outbufptr) {*outbufptr++ = *p++;}
-            }
-        }
-
-       (*to_left) -= char_len;
-
-    }
-
-end:
-
-     /* error end */
-    if (unconv_num) {
-        *from = *from + from_size;
-        *from_left = 0;
-        *to = outbufptr;
-        return -1;
-    }
-
-    /* nomal end */
-    *from = (XPointer)inbufptr;
-    *to = outbufptr;
-
-    if (num_args > 0)
-        *((XlcCharSet *) args[0]) = charset;
-
-    return 0;
-}
-
-static int
-wcstocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    int ret;
-    XlcCharSet charset_old, charset = NULL;
-    XPointer tmp_args[1];
-
-    wchar_t *inbufptr;
-    int        in_left;
-    XPointer outbufptr;
-    int        out_left;
-    tmp_args[0] = (XPointer) &charset;
-
-    ret = wctocs(conv, from, from_left, to, to_left, tmp_args, 1);
-    charset_old = charset;
-    inbufptr = (wchar_t *)(*from);
-    in_left = *from_left;
-    outbufptr = *to;
-    out_left = *to_left;
-
-    while ( ret == 0 && *from_left && *to_left && charset_old == charset ) {
-       charset_old = charset;
-       inbufptr = (wchar_t *)(*from);
-       in_left = *from_left;
-       outbufptr = *to;
-       out_left = *to_left;
-        ret = wctocs(conv, from, from_left, to, to_left, tmp_args, 1);
-    }
-
-    *from = (XPointer)inbufptr;
-    *from_left = in_left;
-    *to = outbufptr;
-    *to_left = out_left;
-
-    if (num_args > 0)
-        *((XlcCharSet *) args[0]) = charset_old;
-
-    /* error end */
-    if (ret != 0)
-       return( -1 );
-
-    return(0);
-}
-
-static int
-ctstombs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XPointer buf = Xmalloc((*from_left) * sizeof(wchar_t));
-    XPointer buf_ptr1 = buf;
-    int buf_left1 = (*from_left);
-    XPointer buf_ptr2 = buf_ptr1;
-    int buf_left2;
-    int unconv_num;
-
-    unconv_num = ctstowcs(conv, 
-               from, from_left, &buf_ptr1, &buf_left1, args, num_args);
-    if (unconv_num < 0)
-        goto ret;
-
-    buf_left2 = (buf_ptr1 - buf_ptr2) / sizeof(wchar_t);
-
-    unconv_num += wcstombs_org(conv, 
-               &buf_ptr2, &buf_left2, to, to_left, args, num_args);
-    if (unconv_num < 0)
-        goto ret;
-
-ret:
-    if (buf)
-       Xfree((char *)buf);
-
-    return unconv_num;
-}
-
-static int
-strtombs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    XLCd lcd = state->lcd;
-
-    char *encoding;
-    unsigned long mb, glyph_index;
-    unsigned char ch;
-
-    int length;
-    int unconv_num = 0;
-
-    CodeSet codeset;
-
-    XPointer inbufptr = *from;
-    XPointer outbufptr = *to;
-    int from_size = *from_left;
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    while (*from_left && *to_left) {
-
-        ch = *inbufptr++;
-        (*from_left)--;
-
-        /* null ? */
-        if (!ch) {
-            if (outbufptr) {*outbufptr++ = '\0';}
-            (*to_left)--;
-
-            continue;
-        }
-
-        /* convert */
-        if (isleftside(ch)) {
-           glyph_index = ch;
-           codeset = _fallcGetCodeSetFromName(lcd, "ISO8859-1:GL");
-       } else {
-           glyph_index = ch & GL;
-           codeset = _fallcGetCodeSetFromName(lcd, "ISO8859-1:GR");
-       }
-
-        if (!codeset) {
-           unconv_num++;
-           continue;
-        }
-
-        mb = gi_to_mb(glyph_index, codeset);
-       if (codeset->parse_info) {
-
-           /* output shift sequence */
-           encoding = codeset->parse_info->encoding;
-            length = strlen(encoding);
-            if (*to_left < length)
-               break;
-           if (outbufptr) {strncpy((char *)outbufptr, encoding, length);}
-
-           if (outbufptr) {outbufptr += length;}
-           (*to_left) -= length;
-        }
-
-        /* output characters */
-       length = codeset->length;
-        if (*to_left < length)
-           break;
-       if (outbufptr) {strncpy((char *)outbufptr, ((char *)&mb)+sizeof(mb)-length, length);}
-
-       if (outbufptr) {outbufptr += length;}
-       (*to_left) -= length;
-
-    } /* end of while */
-
-    *from = *from + from_size;
-    *from_left = 0;
-    *to = outbufptr;
-
-    return unconv_num;
-}
-
-static int
-strtowcs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    State state = (State) conv->state;
-    XLCd lcd = state->lcd;
-
-    unsigned char ch;
-    unsigned long glyph_index;
-    wchar_t wc;
-
-    int unconv_num = 0;
-    CodeSet codeset;
-
-    XPointer inbufptr = *from;
-    wchar_t *outbufptr = (wchar_t *)*to;
-    int from_size = *from_left;
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    while (*from_left && *to_left) {
-
-        ch = *inbufptr++;
-        (*from_left)--;
-
-        /* null ? */
-        if (!ch) {
-            if (outbufptr) {*outbufptr++ = L'\0';}
-            (*to_left)--;
-
-            continue;
-        }
-
-        /* convert */
-        if (isleftside(ch)) {
-           glyph_index = ch;
-           codeset = _fallcGetCodeSetFromName(lcd, "ISO8859-1:GL");
-       } else {
-           glyph_index = ch & GL;
-           codeset = _fallcGetCodeSetFromName(lcd, "ISO8859-1:GR");
-       }
-
-        if (!codeset) {
-           unconv_num++;
-           continue;
-        }
-
-        gi_to_wc(lcd, glyph_index, codeset, &wc);
-       if (outbufptr) {*outbufptr++ = wc;}
-       (*to_left)--;
-
-    } /* end of while */
-
-    *from = *from + from_size;
-    *from_left = 0;
-    *to = (XPointer)outbufptr;
-
-    return unconv_num;
-}
-
-/* -------------------------------------------------------------------------- */
-/*                             Close                                         */
-/* -------------------------------------------------------------------------- */
-
-static void
-close_converter(conv)
-    XlcConv conv;
-{
-    if (conv->state) {
-       Xfree((char *) conv->state);
-    }
-
-    if (conv->methods) {
-       Xfree((char *) conv->methods);
-    }
-
-    Xfree((char *) conv);
-}
-
-/* -------------------------------------------------------------------------- */
-/*                             Open                                          */
-/* -------------------------------------------------------------------------- */
-
-static XlcConv
-create_conv(lcd, methods)
-    XLCd lcd;
-    XlcConvMethods methods;
-{
-    XlcConv conv;
-    State state;
-
-    conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
-    if (conv == NULL)
-       return (XlcConv) NULL;
-    
-    conv->methods = (XlcConvMethods) Xmalloc(sizeof(XlcConvMethodsRec));
-    if (conv->methods == NULL)
-       goto err;
-    *conv->methods = *methods;
-    if (XLC_PUBLIC(lcd, is_state_depend))
-       conv->methods->reset = init_state;
-
-    conv->state = (XPointer) Xmalloc(sizeof(StateRec));
-    if (conv->state == NULL)
-       goto err;
-    bzero((char *) conv->state, sizeof(StateRec));
-    
-    state = (State) conv->state;
-    state->lcd = lcd;
-    init_state(conv);
-    
-    return conv;
-
-err:
-    close_converter(conv);
-
-    return (XlcConv) NULL;
-}
-
-static XlcConvMethodsRec mbstowcs_methods = {
-    close_converter,
-    mbstowcs_org,
-    NULL
-} ;
-
-static XlcConv
-open_mbstowcs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &mbstowcs_methods);
-}
-
-static XlcConvMethodsRec mbstocts_methods = {
-    close_converter,
-    mbstocts,
-    NULL
-} ;
-
-static XlcConv
-open_mbstocts(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &mbstocts_methods);
-}
-
-static XlcConvMethodsRec mbstostr_methods = {
-    close_converter,
-    mbstostr,
-    NULL
-} ;
-
-static XlcConv
-open_mbstostr(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &mbstostr_methods);
-}
-
-static XlcConvMethodsRec mbstocs_methods = {
-    close_converter,
-    mbstocs,
-    NULL
-} ;
-
-static XlcConv
-open_mbstocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &mbstocs_methods);
-}
-
-static XlcConvMethodsRec mbtocs_methods = {
-    close_converter,
-    mbtocs,
-    NULL
-} ;
-
-static XlcConv
-open_mbtocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &mbtocs_methods);
-}
-
-static XlcConvMethodsRec wcstombs_methods = {
-    close_converter,
-    wcstombs_org,
-    NULL
-} ;
-
-static XlcConv
-open_wcstombs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &wcstombs_methods);
-}
-
-static XlcConvMethodsRec wcstocts_methods = {
-    close_converter,
-    wcstocts,
-    NULL
-} ;
-
-static XlcConv
-open_wcstocts(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &wcstocts_methods);
-}
-
-static XlcConvMethodsRec wcstostr_methods = {
-    close_converter,
-    wcstostr,
-    NULL
-} ;
-
-static XlcConv
-open_wcstostr(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &wcstostr_methods);
-}
-
-static XlcConvMethodsRec wcstocs_methods = {
-    close_converter,
-    wcstocs,
-    NULL
-} ;
-
-static XlcConv
-open_wcstocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &wcstocs_methods);
-}
-
-static XlcConvMethodsRec wctocs_methods = {
-    close_converter,
-    wctocs,
-    NULL
-} ;
-
-static XlcConv
-open_wctocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &wctocs_methods);
-}
-
-static XlcConvMethodsRec ctstombs_methods = {
-    close_converter,
-    ctstombs,
-    NULL
-} ;
-
-static XlcConv
-open_ctstombs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &ctstombs_methods);
-}
-
-static XlcConvMethodsRec ctstowcs_methods = {
-    close_converter,
-    ctstowcs,
-    NULL
-} ;
-
-static XlcConv
-open_ctstowcs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &ctstowcs_methods);
-}
-
-static XlcConvMethodsRec strtombs_methods = {
-    close_converter,
-    strtombs,
-    NULL
-} ;
-
-static XlcConv
-open_strtombs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &strtombs_methods);
-}
-
-static XlcConvMethodsRec strtowcs_methods = {
-    close_converter,
-    strtowcs,
-    NULL
-} ;
-
-static XlcConv
-open_strtowcs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &strtowcs_methods);
-}
-
-/* -------------------------------------------------------------------------- */
-/*                             Loader                                        */
-/* -------------------------------------------------------------------------- */
-
-XLCd
-_fallcGenericLoader(name)
-    char *name;
-{
-    XLCd lcd;
-
-    lcd = _fallcCreateLC(name, _fallcGenericMethods);
-    if (lcd == NULL)
-       return lcd;
-
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar,     open_mbstowcs);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCompoundText, open_mbstocts);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNString,       open_mbstostr);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet,      open_mbstocs);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNChar,         open_mbtocs);
-
-    _fallcSetConverter(lcd, XlcNWideChar,  lcd, XlcNMultiByte,    open_wcstombs);
-    _fallcSetConverter(lcd, XlcNWideChar,  lcd, XlcNCompoundText, open_wcstocts);
-    _fallcSetConverter(lcd, XlcNWideChar,  lcd, XlcNString,       open_wcstostr);
-    _fallcSetConverter(lcd, XlcNWideChar,  lcd, XlcNCharSet,      open_wcstocs);
-    _fallcSetConverter(lcd, XlcNWideChar,  lcd, XlcNChar,         open_wctocs);
-
-    _fallcSetConverter(lcd, XlcNCompoundText, lcd, XlcNMultiByte, open_ctstombs);
-    _fallcSetConverter(lcd, XlcNCompoundText, lcd, XlcNWideChar,  open_ctstowcs);
-
-    _fallcSetConverter(lcd, XlcNString,    lcd, XlcNMultiByte,    open_strtombs);
-    _fallcSetConverter(lcd, XlcNString,    lcd, XlcNWideChar,     open_strtowcs);
-
-    return lcd;
-}
-
diff --git a/cde/programs/dtudcfonted/libfal/_fallcGeneric.c b/cde/programs/dtudcfonted/libfal/_fallcGeneric.c
deleted file mode 100644 (file)
index a23d6f0..0000000
+++ /dev/null
@@ -1,1195 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcGeneric.c 1.4 - Fujitsu source for CDEnext    96/02/29 18:02:54   */ 
-/* $XConsortium: _fallcGeneric.c /main/2 1996/09/27 19:03:31 drk $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-/*
- * Copyright 1995 by FUJITSU LIMITED
- * This is source code modified by FUJITSU LIMITED under the Joint
- * Development Agreement for the CDEnext PST.
- * This is unpublished proprietry source code of FUJITSU LIMITED
- *
- * Modifier: Takanori Tateno   FUJITSU LIMITED
- *
- */
-
-#include <stdio.h>
-#include "_fallibint.h"
-#include "_fallcGeneric.h"
-
-static XLCd create();
-static Bool initialize();
-static void destroy();
-
-static XLCdPublicMethodsRec genericMethods = {
-    { NULL },                   /* use default methods */
-    {
-       NULL,
-       create,
-       initialize,
-       destroy,
-       NULL
-    }
-};
-
-XLCdMethods _fallcGenericMethods = (XLCdMethods) &genericMethods;
-
-static XLCd
-create(name, methods)
-    char *name;
-    XLCdMethods methods;
-{
-    XLCd lcd;
-    XLCdPublicMethods new;
-
-    lcd = (XLCd) Xmalloc(sizeof(XLCdRec));
-    if (lcd == NULL)
-        return (XLCd) NULL;
-    bzero((char *) lcd, sizeof(XLCdRec));
-
-    lcd->core = (XLCdCore) Xmalloc(sizeof(XLCdGenericRec));
-    if (lcd->core == NULL)
-       goto err;
-    bzero((char *) lcd->core, sizeof(XLCdGenericRec));
-
-    new = (XLCdPublicMethods) Xmalloc(sizeof(XLCdPublicMethodsRec));
-    if (new == NULL)
-       goto err;
-    *new = *((XLCdPublicMethods) methods);
-    lcd->methods = (XLCdMethods) new;
-
-    return lcd;
-
-err:
-    Xfree(lcd);
-    return (XLCd) NULL;
-}
-
-static Bool
-string_to_encoding(str, encoding)
-    char *str;
-    char *encoding;
-{
-    char *next;
-    long value;
-    int base;
-
-    while (*str) {
-       if (*str == '\\') {
-           switch (*(str + 1)) {
-               case 'x':
-               case 'X':
-                   base = 16;
-                   break;
-               default:
-                   base = 8;
-                   break;
-           }
-           value = strtol(str + 2, &next, base);
-           if (str + 2 != next) {
-               *((unsigned char *) encoding++) = (unsigned char) value;
-               str = next;
-               continue;
-           }
-       }
-       *encoding++ = *str++;
-    }
-
-    *encoding = '\0';
-
-    return True;
-}
-
-static Bool
-string_to_ulong(str, value)
-char   *str;
-unsigned long  *value;
-{
-     char      *tmp1 = str;
-     int        base;
-
-     if(*tmp1++ != '\\'){
-         tmp1--;
-         base = 10;
-     }else{
-         switch(*tmp1++){
-         case 'x':
-              base = 16;
-              break;
-         case 'o':
-              base = 8;
-              break;
-         case 'd':
-              base = 10;
-              break;
-         default:
-              return(False);
-         }
-     }
-    *value = (unsigned) strtol(tmp1, NULL, base);
-     return(True);
-}
-
-
-static Bool
-add_charset(codeset, charset)
-    CodeSet codeset;
-    XlcCharSet charset;
-{
-    XlcCharSet *new_list;
-    int num;
-
-    if (num = codeset->num_charsets)
-        new_list = (XlcCharSet *) Xrealloc(codeset->charset_list,
-                                        (num + 1) * sizeof(XlcCharSet));
-    else
-        new_list = (XlcCharSet *) Xmalloc(sizeof(XlcCharSet));
-
-    if (new_list == NULL)
-       return False;
-
-    new_list[num] = charset;
-    codeset->charset_list = new_list;
-    codeset->num_charsets = num + 1;
-
-    return True;
-}
-
-static CodeSet
-add_codeset(gen)
-    XLCdGenericPart *gen;
-{
-    CodeSet new, *new_list;
-    int num;
-
-    new = (CodeSet) Xmalloc(sizeof(CodeSetRec));
-    if (new == NULL)
-        return NULL;
-    bzero((char *) new, sizeof(CodeSetRec));
-
-    if (num = gen->codeset_num)
-        new_list = (CodeSet *) Xrealloc(gen->codeset_list,
-                                        (num + 1) * sizeof(CodeSet));
-    else
-        new_list = (CodeSet *) Xmalloc(sizeof(CodeSet));
-
-    if (new_list == NULL)
-        goto err;
-
-    new_list[num] = new;
-    gen->codeset_list = new_list;
-    gen->codeset_num = num + 1;
-
-    return new;
-
-err:
-    Xfree(new);
-
-    return NULL;
-}
-
-static Bool
-add_parse_list(gen, type, encoding, codeset)
-    XLCdGenericPart *gen;
-    EncodingType type;
-    char *encoding;
-    CodeSet codeset;
-{
-    ParseInfo new, *new_list;
-    char *str;
-    unsigned char ch;
-    int num;
-
-    str = (char *) Xmalloc(strlen(encoding) + 1);
-    if (str == NULL)
-        return False;
-    strcpy(str, encoding);
-
-    new = (ParseInfo) Xmalloc(sizeof(ParseInfoRec));
-    if (new == NULL)
-        goto err;
-    bzero((char *) new, sizeof(ParseInfoRec));
-
-    if (gen->mb_parse_table == NULL) {
-        gen->mb_parse_table = (unsigned char *) Xmalloc(256); /* 2^8 */
-        if (gen->mb_parse_table == NULL)
-            goto err;
-        bzero((char *) gen->mb_parse_table, 256);
-    }
-
-    if (num = gen->mb_parse_list_num)
-        new_list = (ParseInfo *) Xrealloc(gen->mb_parse_list,
-                                          (num + 2) * sizeof(ParseInfo));
-    else {
-        new_list = (ParseInfo *) Xmalloc(2 * sizeof(ParseInfo));
-    }
-
-    if (new_list == NULL)
-        goto err;
-
-    new_list[num] = new;
-    new_list[num + 1] = NULL;
-    gen->mb_parse_list = new_list;
-    gen->mb_parse_list_num = num + 1;
-
-    ch = (unsigned char) *str;
-    if (gen->mb_parse_table[ch] == 0)
-        gen->mb_parse_table[ch] = num + 1;
-
-    new->type = type;
-    new->encoding = str;
-    new->codeset = codeset;
-
-    if (codeset->parse_info == NULL)
-        codeset->parse_info = new;
-
-    return True;
-
-err:
-    Xfree(str);
-    if (new)
-        Xfree(new);
-
-    return False;
-}
-
-static void
-free_charset(lcd)
-    XLCd lcd;
-{
-    XLCdGenericPart *gen = XLC_GENERIC_PART(lcd);
-    CodeSet *codeset;
-    ParseInfo *parse_info;
-    int num;
-
-    if (gen->mb_parse_table)
-        Xfree(gen->mb_parse_table);
-    if (num = gen->mb_parse_list_num) {
-        for (parse_info = gen->mb_parse_list; num-- > 0; parse_info++) {
-            if ((*parse_info)->encoding)
-                Xfree((*parse_info)->encoding);
-            Xfree(*parse_info);
-        }
-        Xfree(gen->mb_parse_list);
-    }
-
-    if (num = gen->codeset_num)
-        Xfree(gen->codeset_list);
-}
-/* For VW/UDC */
-
-#define FORWARD  (unsigned long)'+'
-#define BACKWARD (unsigned long)'-'
-
-static char *getscope(str,scp)
-char *str;
-FontScope scp;
-{
-    char buff[256],*next;
-    unsigned long start=0,end=0,dest=0,shift=0,direction=0;
-    sscanf(str,"[\\x%lx,\\x%lx]->\\x%lx", &start, &end, &dest);
-    if( dest ){
-        if(dest >= start ){
-            shift = dest - start;
-            direction = FORWARD ;
-        } else {
-            shift = start - dest;
-            direction = BACKWARD;
-        }
-    }
-    scp->start = start      ;
-    scp->end   = end        ;
-    scp->shift = shift      ;
-    scp->shift_direction
-               = direction  ;
-    /* .......... */
-    while(*str){
-        if(*str == ',' && *(str+1) == '['){
-            break;
-        }
-        str++;
-    }
-    next = str+1 ;
-    return(next);
-}
-static int count_scopemap(str)
-char *str;
-{
-    char *ptr;
-    int num=0;
-    for(ptr=str;*ptr;ptr++){
-        if(*ptr == ']'){
-            num ++;
-        }
-    }
-    return(num);
-}
-FontScope falparse_scopemaps(str,size)
-char *str;
-int *size;
-{
-        int num=0,i;
-        FontScope scope,sc_ptr;
-        char *str_sc;
-        num = count_scopemap(str);
-        scope = (FontScope )Xmalloc(num * sizeof(FontScopeRec));
-        if(scope == NULL) {
-                return (NULL);
-        }
-        for (i=0,str_sc=str,sc_ptr=scope;
-                        i < num; i++,sc_ptr++){
-                str_sc = getscope(str_sc,sc_ptr);
-        }
-        *size = num;
-        return (scope);
-}
-
-void
-dbg_printValue(str,value,num)
-char *str;
-char **value;
-int num;
-{
-/*
-    int i;
-    for(i=0;i<num;i++){
-        fprintf(stderr,"%s value[%d] = %s\n",str,i,value[i]);
-    }
-*/
-}
-
-void
-dmpscope(name,sc,num)
-FontScope sc;
-int num;
-{
-/*
-    int i;
-    fprintf(stderr,"dmpscope %s\n",name);
-    for(i=0;i<num;i++){
-        fprintf(stderr,"%x %x %x %x \n",
-                sc[i].start,
-                sc[i].end,
-                sc[i].shift,
-                sc[i].shift_direction);
-    }
-    fprintf(stderr,"dmpscope end\n");
-*/
-}
-
-static XlcCharSet srch_charset_define(name,new)
-char *name;
-int *new;
-{
-    XlcCharSet charset = NULL;
-    *new = 0;
-    charset = _fallcGetCharSet(name);
-    if (charset == NULL &&
-        (charset = _fallcCreateDefaultCharSet(name, ""))) {
-        _fallcAddCharSet(charset);
-        *new = 1;
-    }
-    return(charset);
-}
-
-static int
-read_charset_define(lcd,gen)
-XLCd lcd;
-XLCdGenericPart *gen;
-{
-    int i=0;
-    char csd[16],cset_name[256];
-    char name[BUFSIZ];
-    XlcCharSet charsetd;
-    char **value;
-    int num,new,side=0;
-    char *tmp;
-
-    for(i=0;;i++){ /* loop start */
-        charsetd = 0;
-        sprintf(csd, "csd%d", i);
-
-        /* charset_name   */
-        sprintf(name, "%s.%s", csd , "charset_name");
-        _fallcGetResource(lcd, "XLC_CHARSET_DEFINE", name, &value, &num);
-        dbg_printValue(name,value,num);
-        if (num > 0) {
-            snprintf(cset_name, sizeof(cset_name), "%s", value[0]);
-            snprintf(name, sizeof(name), "%s.%s", csd , "side");
-            _fallcGetResource(lcd, "XLC_CHARSET_DEFINE", name, &value, &num);
-            if (num > 0) {
-                dbg_printValue(name,value,num);
-                if( !_fallcNCompareISOLatin1(value[0], "none", 4) ){
-                    side =  XlcNONE ;
-                    strcat(cset_name,":none");
-                } else
-                if( !_fallcNCompareISOLatin1(value[0], "GL", 2) ){
-                    side =  XlcGL ;
-                    strcat(cset_name,":GL");
-                } else {
-                    side =  XlcGR ;
-                    strcat(cset_name,":GR");
-                }
-                if (charsetd == NULL &&
-                    (charsetd = srch_charset_define(cset_name,&new)) == NULL)
-                    return 0;
-            }
-        } else {
-            if(i == 0){
-                continue ;
-            } else {
-                break ;
-            }
-        }
-        if(new){
-            tmp = (char *)Xmalloc(strlen(cset_name)+1);
-            if(tmp == NULL){
-                return 0;
-            }
-            strcpy(tmp,cset_name);
-            charsetd->name = tmp;
-        }
-        /* side   */
-        charsetd->side =  side ;
-        /* length */
-        snprintf(name, sizeof(name), "%s.%s", csd , "length");
-        _fallcGetResource(lcd, "XLC_CHARSET_DEFINE", name, &value, &num);
-        if (num > 0) {
-            dbg_printValue(name,value,num);
-            charsetd->char_size = atoi(value[0]);
-        }
-        /* gc_number */
-        snprintf(name, sizeof(name), "%s.%s", csd , "gc_number");
-        _fallcGetResource(lcd, "XLC_CHARSET_DEFINE", name, &value, &num);
-        if (num > 0) {
-            dbg_printValue(name,value,num);
-            charsetd->set_size = atoi(value[0]);
-        }
-        /* string_encoding */
-        snprintf(name, sizeof(name), "%s.%s", csd , "string_encoding");
-        _fallcGetResource(lcd, "XLC_CHARSET_DEFINE", name, &value, &num);
-        if (num > 0) {
-            dbg_printValue(name,value,num);
-            if(!strcmp("False",value[0])){
-                charsetd->string_encoding = False;
-            } else {
-                charsetd->string_encoding = True;
-            }
-        }
-        /* sequence */
-        snprintf(name, sizeof(name), "%s.%s", csd , "sequence");
-        _fallcGetResource(lcd, "XLC_CHARSET_DEFINE", name, &value, &num);
-        if (num > 0) {
-            dbg_printValue(name,value,num);
-/*
-            if(charsetd->ct_sequence){
-                Xfree(charsetd->ct_sequence);
-            }
-*/
-            tmp = (char *)Xmalloc(strlen(value[0])+1);
-            if(tmp == NULL){
-                return 0;
-            }
-            charsetd->ct_sequence = tmp;
-            string_to_encoding(value[0],tmp);
-        }
-        /* encoding_name */
-        snprintf(name, sizeof(name), "%s.%s", csd , "encoding_name");
-        _fallcGetResource(lcd, "XLC_CHARSET_DEFINE", name, &value, &num);
-        if (num > 0) {
-            dbg_printValue(name,value,num);
-/*
-            if(charsetd->encoding_name){
-                Xfree(charsetd->encoding_name);
-            }
-*/
-            tmp = (char *)Xmalloc(strlen(value[0]) + 1);
-            strcpy(tmp,value[0]);
-            charsetd->encoding_name = tmp;
-            charsetd->xrm_encoding_name =
-                falrmStringToQuark(tmp);
-        }
-    }
-    return 1;
-}
-
-SegConv
-faladd_conversion(gen)
-XLCdGenericPart *gen;
-{
-    SegConv new_list;
-    int num;
-
-    if (num = gen->segment_conv_num){
-        new_list = (SegConv) Xrealloc(gen->segment_conv,
-                                        (num + 1) * sizeof(SegConvRec));
-    } else {
-        new_list = (SegConv) Xmalloc(sizeof(SegConvRec));
-    }
-
-    if (new_list == NULL)
-        return False;
-
-    gen->segment_conv = new_list;
-    gen->segment_conv_num = num + 1;
-
-    return (&new_list[num]);
-
-}
-static int
-read_segmentconversion(lcd,gen)
-XLCd lcd;
-XLCdGenericPart *gen;
-{
-    int i=0;
-    char conv[16];
-    char name[BUFSIZ];
-    char **value;
-    int num,new;
-    SegConv conversion;
-    for(i=0 ; ; i++){ /* loop start */
-        conversion = 0;
-        sprintf(conv, "conv%d", i);
-
-        /* length                */
-        sprintf(name, "%s.%s", conv , "length");
-        _fallcGetResource(lcd, "XLC_SEGMENTCONVERSION", name, &value, &num);
-        if (num > 0) {
-            char *tmp;
-            if (conversion == NULL &&
-                (conversion = faladd_conversion(gen)) == NULL) {
-                return 0;
-            }
-            dbg_printValue(name,value,num);
-        } else {
-            if(i == 0){
-                continue;
-            } else {
-                break ;
-            }
-        }
-        conversion->length = atoi(value[0]);
-
-        /* source_encoding       */
-        sprintf(name, "%s.%s", conv , "source_encoding");
-        _fallcGetResource(lcd, "XLC_SEGMENTCONVERSION", name, &value, &num);
-        if (num > 0) {
-            char *tmp;
-            dbg_printValue(name,value,num);
-            tmp = (char *)Xmalloc(strlen(value[0])+1);
-            if(tmp == NULL){
-                return 0;
-            }
-            strcpy(tmp,value[0]);
-            conversion->source_encoding = tmp;
-            conversion->source = srch_charset_define(tmp,&new);
-            if(new){
-                tmp = (char *)Xmalloc(strlen(conversion->source_encoding)+1);
-                if(tmp == NULL){
-                    return 0;
-                }
-                strcpy(tmp,conversion->source_encoding);
-                conversion->source->name = tmp;
-            }
-        }
-        /* destination_encoding  */
-        sprintf(name, "%s.%s", conv , "destination_encoding");
-        _fallcGetResource(lcd, "XLC_SEGMENTCONVERSION", name, &value, &num);
-        if (num > 0) {
-            char *tmp;
-            dbg_printValue(name,value,num);
-            tmp = (char *)Xmalloc(strlen(value[0])+1);
-            if(tmp == NULL){
-                return 0;
-            }
-            strcpy(tmp,value[0]);
-            conversion->destination_encoding = tmp;
-            conversion->dest = srch_charset_define(tmp,&new);
-            if(new){
-                tmp = (char *)Xmalloc(
-                    strlen(conversion->destination_encoding)+1);
-                if(tmp == NULL){
-                    return 0;
-                }
-                strcpy(tmp,conversion->destination_encoding);
-                conversion->dest->name = tmp;
-            }
-        }
-        /* range                 */
-        sprintf(name, "%s.%s", conv , "range");
-        _fallcGetResource(lcd, "XLC_SEGMENTCONVERSION", name, &value, &num);
-        if (num > 0) {
-            char *tmp;
-            dbg_printValue(name,value,num);
-            sscanf(value[0],"\\x%lx,\\x%lx",
-                &(conversion->range.start),
-                &(conversion->range.end));
-        }
-        /* conversion            */
-        sprintf(name, "%s.%s", conv , "conversion");
-        _fallcGetResource(lcd, "XLC_SEGMENTCONVERSION", name, &value, &num);
-        if (num > 0) {
-            char *tmp;
-            dbg_printValue(name,value,num);
-            conversion->conv =
-                falparse_scopemaps(value[0],&conversion->conv_num);
-        }
-    }  /* loop end */
-
-    return 1;
-}
-
-static ExtdSegment create_ctextseg(value,num)
-char **value;
-int num;
-{
-    ExtdSegment ret;
-    char side_str[128],*ptr;
-    char cset_name[128],*tmp;
-    int i,new;
-    FontScope scope;
-    ret = (ExtdSegment)Xmalloc(sizeof(ExtdSegmentRec));
-    if(ret == NULL){
-        return (0);
-    }
-    if(strchr(value[0],':')){
-        ret->name = (char *)Xmalloc(strlen(value[0])+1);
-        if(ret->name == NULL){
-            XFree(ret);
-            return(NULL);
-        }
-        strcpy(ret->name,value[0]);
-        ptr = strchr(ret->name,':');
-        *ptr = 0;
-        ptr++;
-        if( !_fallcNCompareISOLatin1(ptr, "none", 4) ){
-            ret->side =  XlcNONE ;
-            snprintf(cset_name,sizeof(cset_name),"%s:%s",ret->name,"none");
-        } else
-        if( !_fallcNCompareISOLatin1(ptr, "GL", 2) ){
-            ret->side =  XlcGL ;
-            snprintf(cset_name,sizeof(cset_name),"%s:%s",ret->name,"GL");
-        } else {
-            ret->side =  XlcGR ;
-            snprintf(cset_name,sizeof(cset_name),"%s:%s",ret->name,"GR");
-        }
-    } else {
-        ret->name = (char *)Xmalloc(strlen(value[0])+1);
-        if(ret->name == NULL){
-            XFree(ret);
-            return(NULL);
-        }
-        strcpy(ret->name,value[0]);
-    }
-    ret->area = (FontScope)Xmalloc((num - 1)*sizeof(FontScopeRec));
-    if(ret->area == NULL){
-        XFree(ret->name);
-        XFree(ret);
-        return(NULL);
-    }
-    ret->area_num  = num - 1;
-    scope = ret->area ;
-    for(i=1;i<num;i++){
-        sscanf(value[i],"\\x%lx,\\x%lx", &scope[i-1].start, &scope[i-1].end);
-    }
-    ret->charset = srch_charset_define(cset_name,&new);
-    if(new){
-        tmp = (char *)Xmalloc(strlen(cset_name)+1);
-        if(tmp == NULL){
-            XFree(ret->area);
-            XFree(ret->name);
-            XFree(ret);
-            return NULL;
-        }
-        strcpy(tmp,cset_name);
-        ret->charset->name = tmp;
-    }
-    return(ret);
-}
-/* For VW/UDC end */
-
-static Bool
-load_generic(lcd)
-    XLCd lcd;
-{
-    XLCdGenericPart *gen = XLC_GENERIC_PART(lcd);
-    char **value;
-    int num;
-    unsigned long l;
-    int i;
-    int M,ii;
-
-    gen->codeset_num = 0;
-
-    /***** wc_encoding_mask *****/
-    _fallcGetResource(lcd, "XLC_XLOCALE", "wc_encoding_mask", &value, &num);
-    if (num > 0) {
-       if (string_to_ulong(value[0], &l) == False) 
-           goto err;
-       gen->wc_encode_mask = l;
-    }
-    /***** wc_shift_bits *****/
-    _fallcGetResource(lcd, "XLC_XLOCALE", "wc_shift_bits", &value, &num);
-    if (num > 0)
-       gen->wc_shift_bits = atoi(value[0]);
-    if (gen->wc_shift_bits < 1)
-       gen->wc_shift_bits = 8;
-#ifndef X_NOT_STDC_ENV
-    /***** use_stdc_env *****/
-    _fallcGetResource(lcd, "XLC_XLOCALE", "use_stdc_env", &value, &num);
-    if (num > 0 && !_fallcCompareISOLatin1(value[0], "True"))
-       gen->use_stdc_env = True;
-    else
-       gen->use_stdc_env = False;
-    /***** force_convert_to_mb *****/
-    _fallcGetResource(lcd, "XLC_XLOCALE", "force_convert_to_mb", &value, &num);
-    if (num > 0 && !_fallcCompareISOLatin1(value[0], "True"))
-       gen->force_convert_to_mb = True;
-    else
-       gen->force_convert_to_mb = False;
-#endif
-    
-    for (i = 0; ; i++) {
-       CodeSetRec *codeset = NULL;
-       char cs[16];
-       char name[BUFSIZ];
-
-       sprintf(cs, "cs%d", i);
-
-       /***** codeset.side *****/
-       sprintf(name, "%s.%s", cs , "side");
-       _fallcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
-       if (num > 0) {
-           char *tmp;
-
-           if (codeset == NULL && (codeset = add_codeset(gen)) == NULL)
-               goto err;
-
-            /* 3.4.1 side */
-            if( !_fallcNCompareISOLatin1(value[0], "none", 4) ){
-                codeset->side =  XlcNONE ;
-            } else
-            if( !_fallcNCompareISOLatin1(value[0], "GL", 2) ){
-                codeset->side =  XlcGL ;
-            } else {
-                codeset->side =  XlcGR ;
-            }
-
-           tmp = strrchr(value[0], ':');
-           if (tmp != NULL && !_fallcCompareISOLatin1(tmp + 1, "Default")) {
-               if (codeset->side == XlcGR)
-                   gen->initial_state_GR = codeset;
-               else
-                   gen->initial_state_GL = codeset;
-           }
-       }
-
-       /***** codeset.length *****/
-       sprintf(name, "%s.%s", cs , "length");
-       _fallcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
-       if (num > 0) {
-           if (codeset == NULL && (codeset = add_codeset(gen)) == NULL)
-               goto err;
-           codeset->length = atoi(value[0]);
-           if (codeset->length < 1)
-               codeset->length = 1;
-       }
-
-       /***** codeset.mb_encoding *****/
-       sprintf(name, "%s.%s", cs, "mb_encoding");
-       _fallcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
-       if (num > 0) {
-           static struct { 
-               char *str;
-               int type;
-           } shifts[] = {
-               {"<SS>", E_SS},
-               {"<LSL>", E_LSL},
-               {"<LSR>", E_LSR},
-               0
-           };
-           int j;
-
-           if (codeset == NULL && (codeset = add_codeset(gen)) == NULL)
-               goto err;
-           for ( ; num-- > 0; value++) {
-               char encoding[256];
-               char *tmp = *value;
-               int type = E_SS;    /* for BC */
-               for (j = 0; shifts[j].str; j++) {
-                   if (!_fallcNCompareISOLatin1(tmp, shifts[j].str,
-                                              strlen(shifts[j].str))) {
-                       type = shifts[j].type;
-                       tmp += strlen(shifts[j].str);
-                       break;
-                   }
-               }
-               if (string_to_encoding(tmp, encoding) == False)
-                       goto err;
-               add_parse_list(gen, type, encoding, codeset);
-           }
-       }
-
-       /***** codeset.wc_encoding *****/
-       sprintf(name, "%s.%s", cs, "wc_encoding");
-       _fallcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
-       if (num > 0) {
-           if (codeset == NULL && (codeset = add_codeset(gen)) == NULL)
-               goto err;
-           if (string_to_ulong(value[0], &l) == False) 
-               goto err;
-           codeset->wc_encoding = l;
-       }
-  
-       /***** codeset.ct_encoding *****/
-       sprintf(name, "%s.%s", cs, "ct_encoding");
-       _fallcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
-       if (num > 0) {
-           XlcCharSet charset;
-           char *encoding;
-
-           if (codeset == NULL && (codeset = add_codeset(gen)) == NULL)
-               goto err;
-           for ( ; num-- > 0; value++) {
-               string_to_encoding(*value, name);
-               charset = NULL;
-               if ((encoding = strchr(name, ':')) &&
-                   (encoding = strchr(encoding + 1, ':'))) {
-                   *encoding++ = '\0';
-                   charset = _fallcAddCT(name, encoding);
-               }
-               if (charset == NULL) {
-                   charset = _fallcGetCharSet(name);
-                   if (charset == NULL &&
-                       (charset = _fallcCreateDefaultCharSet(name, ""))) {
-                       charset->side = codeset->side;
-                       charset->char_size = codeset->length;
-                       _fallcAddCharSet(charset);
-                   }
-               }
-               if (charset) {
-                   if (add_charset(codeset, charset) == False)
-                       goto err;
-               }
-           }
-       }
-
-       if (codeset == NULL)
-           break;
-       codeset->cs_num = i;
-        /* For VW/UDC */
-        /***** 3.4.2 byteM (1 <= M <= length)*****/
-        for(M=1; M-1  < codeset->length; M++){
-            long start,end;
-            ByteInfo tmpb;
-
-            sprintf(name,"%s.%s%d",cs,"byte",M);
-            _fallcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
-
-            if( M == 1){
-                if(num < 1) {
-                    codeset->byteM = NULL ;
-                    break ;
-                }
-                codeset->byteM =
-                    (ByteInfoListRec *)Xmalloc(
-                         (codeset->length)*sizeof(ByteInfoListRec));
-                if(codeset->byteM == NULL){
-                    goto err;
-                }
-            }
-
-            if(num > 0){
-                dbg_printValue(name,value,num);
-                (codeset->byteM)[M-1].M = M;
-                (codeset->byteM)[M-1].byteinfo_num = num;
-                (codeset->byteM)[M-1].byteinfo =
-                    (ByteInfo)Xmalloc( num * sizeof(ByteInfoRec));
-                for(ii = 0 ; ii < num ; ii++){
-                    char tmp[128];
-                    tmpb = (codeset->byteM)[M-1].byteinfo ;
-                    /* default 0x00 - 0xff */
-                    sscanf(value[ii], "\\x%lx,\\x%lx", (long unsigned *) &start, (long unsigned *) &end);
-                    tmpb[ii].start = (unsigned char)start;
-                    tmpb[ii].end  = (unsigned char)end;
-                }
-            }
-            /* .... */
-        }
-
-
-        /***** codeset.mb_conversion *****/
-        sprintf(name, "%s.%s", cs, "mb_conversion");
-        _fallcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
-        if (num > 0) {
-                dbg_printValue(name,value,num);
-                codeset->mbconv = Xmalloc(sizeof(ConversionRec));
-                codeset->mbconv->convlist =
-                falparse_scopemaps(value[0],&(codeset->mbconv->conv_num));
-                dmpscope("mb_conv",codeset->mbconv->convlist,
-                        codeset->mbconv->conv_num);
-                /* [\x%x,\x%x]->\x%x,... */
-        }
-        /***** codeset.ct_conversion *****/
-        sprintf(name, "%s.%s", cs, "ct_conversion");
-        _fallcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
-        if (num > 0) {
-                dbg_printValue(name,value,num);
-                codeset->ctconv = Xmalloc(sizeof(ConversionRec));
-                codeset->ctconv->convlist =
-                falparse_scopemaps(value[0],&(codeset->ctconv->conv_num));
-                dmpscope("ctconv",codeset->ctconv->convlist,
-                        codeset->ctconv->conv_num);
-                /* [\x%x,\x%x]->\x%x,... */
-        }
-        /***** codeset.ct_conversion_file *****/
-        sprintf(name, "%s.%s", cs, "ct_conversion_file");
-        _fallcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
-        if (num > 0) {
-                dbg_printValue(name,value,num);
-                /* [\x%x,\x%x]->\x%x,... */
-        }
-        /***** codeset.ct_extended_segment *****/
-        sprintf(name, "%s.%s", cs, "ct_extended_segment");
-        _fallcGetResource(lcd, "XLC_XLOCALE", name, &value, &num);
-        if (num > 0) {
-                dbg_printValue(name,value,num);
-                codeset->ctextseg = create_ctextseg(value,num);
-                /* [\x%x,\x%x]->\x%x,... */
-        }
-        /* For VW/UDC end */
-
-    }
-        
-    read_charset_define(lcd,gen);       /* For VW/UDC */
-    read_segmentconversion(lcd,gen);    /* For VW/UDC */
-
-    return True;
-
-err:
-    free_charset(lcd);
-
-    return False;
-}
-
-static Bool
-initialize(lcd)
-    XLCd lcd;
-{
-    XLCdPublicMethods superclass = (XLCdPublicMethods) _fallcPublicMethods;
-
-    XLC_PUBLIC_METHODS(lcd)->superclass = superclass;
-
-    if (superclass->pub.initialize) {
-       if ((*superclass->pub.initialize)(lcd) == False)
-           return False;
-    }
-
-    if(load_generic(lcd) == False)
-       return False;
-
-    return True;
-}
-/* VW/UDC start 95.01.08 */
-static void 
-freeByteM(codeset)
-    CodeSet codeset;
-{
-    int i;
-    ByteInfoList blst;
-    if(codeset->byteM == NULL) {
-       return ;
-    }
-    blst = codeset->byteM;
-    for(i=0;i<codeset->length;i++){
-       if(blst[i].byteinfo){
-           Xfree(blst[i].byteinfo);
-           blst[i].byteinfo = NULL;
-       }
-    }
-    Xfree(codeset->byteM); 
-    codeset->byteM = NULL;
-}
-static void 
-freeConversion(codeset)
-    CodeSet codeset;
-{
-    int i;
-    Conversion mbconv,ctconv;
-    if( codeset->mbconv ) {
-       mbconv = codeset->mbconv;
-       /*  ...  */
-       if(mbconv->convlist){
-           Xfree(mbconv->convlist);
-           mbconv->convlist = NULL;
-       }
-       Xfree(mbconv);
-       codeset->mbconv = NULL;
-    }
-    if( codeset->ctconv ) {
-       ctconv = codeset->ctconv;
-       /*  ...  */
-       if(ctconv->convlist){
-           Xfree(ctconv->convlist);
-           ctconv->convlist = NULL;
-       }
-       Xfree(ctconv);
-       codeset->ctconv = NULL;
-    }
-}
-static void 
-freeExtdSegment(codeset)
-    CodeSet codeset;
-{
-    int i;
-    ExtdSegment ctextseg;
-    if(codeset->ctextseg == NULL) {
-       return ;
-    }
-    ctextseg = codeset->ctextseg;
-    if(ctextseg->name){
-       Xfree(ctextseg->name);
-       ctextseg->name = NULL;
-    }
-    if(ctextseg->area){
-       Xfree(ctextseg->area);
-       ctextseg->area = NULL;
-    }
-    Xfree(codeset->ctextseg); 
-    codeset->ctextseg = NULL;
-}
-static void 
-freeParseInfo(codeset)
-    CodeSet codeset;
-{
-    int i;
-    ParseInfo parse_info;
-    if(codeset->parse_info == NULL) {
-       return ;
-    }
-    parse_info = codeset->parse_info;
-    if(parse_info->encoding){
-       Xfree(parse_info->encoding);
-       parse_info->encoding = NULL;
-    }
-    Xfree(codeset->parse_info); 
-    codeset->parse_info = NULL;
-}
-static void
-destroy_CodeSetList(gen)
-    XLCdGenericPart *gen ;
-{
-    CodeSet *codeset = gen->codeset_list;
-    int i;
-    if(gen->codeset_num == 0) {
-       return;
-    }
-    for(i=0;i<gen->codeset_num;i++){
-        freeByteM(codeset[i]);
-       freeConversion(codeset[i]);
-       freeExtdSegment(codeset[i]);
-       freeParseInfo(codeset[i]);
-       if(codeset[i]->charset_list){
-           Xfree(codeset[i]->charset_list);
-           codeset[i]->charset_list = NULL;
-       }
-       Xfree(codeset[i]); codeset[i]=NULL;
-    }
-    Xfree(codeset); gen->codeset_list = NULL;
-}
-/*  */
-static void
-destroy_SegConv(gen)
-    XLCdGenericPart *gen ;
-{
-    SegConv seg = gen->segment_conv;
-    int i;
-    if(gen->segment_conv_num == 0) {
-       return;
-    }
-    for(i=0;i<gen->segment_conv_num;i++){
-       if(seg[i].source_encoding){
-           Xfree(seg[i].source_encoding);
-           seg[i].source_encoding = NULL;
-       }
-       if(seg[i].destination_encoding){
-           Xfree(seg[i].destination_encoding); 
-           seg[i].destination_encoding = NULL;
-       }
-       if(seg[i].conv){
-           Xfree(seg[i].conv); seg[i].conv = NULL;
-       }
-    }
-    Xfree(seg); gen->segment_conv = NULL;
-}
-
-static void
-destroy_gen(lcd)
-    XLCd lcd;
-{
-    XLCdGenericPart *gen = XLC_GENERIC_PART(lcd);
-    destroy_SegConv(gen);
-    destroy_CodeSetList(gen);
-    if(gen->mb_parse_table){
-       Xfree(gen->mb_parse_table);
-       gen->mb_parse_table = NULL;
-    }
-    if(gen->mb_parse_list){
-       Xfree(gen->mb_parse_list);
-       gen->mb_parse_list = NULL;
-    }
-}
-/* VW/UDC end 95.01.08 */
-static void
-destroy(lcd)
-    XLCd lcd;
-{
-    XLCdPublicMethods superclass = XLC_PUBLIC_METHODS(lcd)->superclass;
-
-    destroy_gen(lcd); /* ADD 1996.01.08 */
-    if (superclass && superclass->pub.destroy)
-       (*superclass->pub.destroy)(lcd);
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcGeneric.h b/cde/programs/dtudcfonted/libfal/_fallcGeneric.h
deleted file mode 100644 (file)
index 98bdaae..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* XlcGeneric.h 1.3 - Fujitsu source for CDEnext    95/12/07 10:53:07  */ 
-/* $XConsortium: _fallcGeneric.h /main/1 1996/04/08 15:17:24 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-/*
- * Copyright 1995 by FUJITSU LIMITED
- * This is source code modified by FUJITSU LIMITED under the Joint
- * Development Agreement for the CDEnext PST.
- * This is unpublished proprietry source code of FUJITSU LIMITED
- *
- * Modifier: Takanori Tateno   FUJITSU LIMITED
- *
- */
-
-#ifndef _XLCGENERIC_H_
-#define _XLCGENERIC_H_
-
-#include "_fallcPubI.h"
-
-typedef struct _ByteInfo {
-     unsigned char start,end;
-} ByteInfoRec, *ByteInfo;
-
-typedef struct _ByteInfoList {
-    int        M;                          /* 1 <= M <= length */
-    int        byteinfo_num;
-    ByteInfo   byteinfo;
-} ByteInfoListRec, *ByteInfoList;
-
-/* conversion_type values */
-#define LOCALCONV      1
-#define FILECONV       2
-#define FUNCTIONCONV   4
-
-typedef struct _Conversion {
-    unsigned long      conversion_type;
-    int                conv_num;
-    FontScope          convlist;
-    char               *cnv_file;
-    XlcConv                    cnvfunc;
-} ConversionRec, *Conversion;
-
-typedef struct _ExtdSegment {
-    char       *name;
-    XlcSide    side;
-    FontScope  area;
-    int        area_num;
-    XlcCharSet  charset;
-} ExtdSegmentRec, *ExtdSegment;
-
-typedef struct _SegConvRec {
-    int                length;
-    char               *source_encoding;
-    XlcCharSet         source;
-    char               *destination_encoding;
-    XlcCharSet         dest;
-    FontScopeRec       range;
-    int                conv_num;
-    FontScope          conv;
-} SegConvRec, *SegConv;
-
-typedef struct _ParseInfoRec *ParseInfo;
-
-typedef struct _CodeSetRec {
-    XlcCharSet                 *charset_list;
-    int                num_charsets;
-    int                cs_num;
-    XlcSide            side;
-    int                length;
-    ByteInfoList       byteM;
-    Conversion                 mbconv;
-    Conversion                 ctconv;
-    ExtdSegment        ctextseg;
-    ParseInfo          parse_info;
-    unsigned long      wc_encoding;
-} CodeSetRec, *CodeSet;
-
-typedef enum {
-    E_GL,                      /* GL encoding */
-    E_GR,                      /* GR encoding */
-    E_SS,                      /* single shift */
-    E_LSL,                     /* locking shift left */
-    E_LSR,                     /* locking shift right */
-    E_LAST
-} EncodingType;
-
-typedef struct _ParseInfoRec {
-    EncodingType       type;
-    char               *encoding;
-    CodeSet            codeset;
-} ParseInfoRec;
-
-/*
- * XLCd private data
- */
-
-#define XLC_GENERIC(lcd, x)    (((XLCdGeneric) lcd->core)->gen.x)
-#define XLC_GENERIC_PART(lcd)  (&(((XLCdGeneric) lcd->core)->gen))
-
-typedef struct _XLCdGenericPart {
-    int                codeset_num;
-    CodeSet            *codeset_list;
-    unsigned char      *mb_parse_table;
-    int                mb_parse_list_num;
-    ParseInfo          *mb_parse_list;
-    unsigned long      wc_encode_mask;
-    unsigned long      wc_shift_bits;
-    CodeSet            initial_state_GL;
-    CodeSet            initial_state_GR;
-    int                segment_conv_num;  /* UDC */
-    SegConv            segment_conv;      /* UDC */
-#ifndef X_NOT_STDC_ENV
-    Bool               use_stdc_env;
-    Bool               force_convert_to_mb;
-#endif
-} XLCdGenericPart;
-
-typedef struct _XLCdGenericRec {
-    XLCdCoreRec        core;   
-    XLCdPublicPart     pub;
-    XLCdGenericPart    gen;    
-} XLCdGenericRec, *XLCdGeneric;
-
-extern XLCdMethods _fallcGenericMethods;
-
-#endif  /* _XLCGENERIC_H_ */
diff --git a/cde/programs/dtudcfonted/libfal/_fallcInit.c b/cde/programs/dtudcfonted/libfal/_fallcInit.c
deleted file mode 100644 (file)
index 64faac6..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcInit.c 1.4 - Fujitsu source for CDEnext    96/03/11 17:13:15      */ 
-/* $XConsortium: _fallcInit.c /main/1 1996/04/08 15:17:36 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- *
- *   Modifier: Masayoshi Shimamura      FUJITSU LIMITED 
- *
- */
-
-#include "_fallibint.h"
-#include "_fallcint.h"
-
-#define USE_GENERIC_LOADER
-#define USE_DEFAULT_LOADER
-/*** #define USE_EUC_LOADER ***/
-/*** #define USE_SJIS_LOADER ***/
-/*** #define USE_JIS_LOADER ***/
-/*** #define USE_UTF_LOADER ***/
-
-extern XLCd _fallcDefaultLoader(
-#if NeedFunctionPrototypes
-    char*
-#endif
-);
-
-#ifdef DYNAMIC_LOAD
-#ifdef sun
-extern XLCd _falsunOsDynamicLoad(
-#if NeedFunctionPrototypes
-    char*
-#endif
-);
-#endif /* sun */
-
-#ifdef AIXV3
-extern XLCd _falaixOsDynamicLoad(
-#if NeedFunctionPrototypes
-    char*
-#endif
-);
-#endif /* AIXV3 */
-#endif
-
-#ifdef USE_GENERIC_LOADER
-extern XLCd _fallcGenericLoader(
-#if NeedFunctionPrototypes
-    char*
-#endif
-);
-#endif
-
-#ifdef USE_UTF_LOADER
-extern XLCd _fallcUtfLoader(
-#if NeedFunctionPrototypes
-    char*
-#endif
-);
-#endif
-
-#ifdef USE_EUC_LOADER
-extern XLCd _fallcEucLoader(
-#if NeedFunctionPrototypes
-    char*
-#endif
-);
-#endif
-
-#ifdef USE_SJIS_LOADER
-extern XLCd _fallcSjisLoader(
-#if NeedFunctionPrototypes
-    char*
-#endif
-);
-#endif
-
-#ifdef USE_JIS_LOADER
-extern XLCd _XlcJisLoader(
-#if NeedFunctionPrototypes
-    char*
-#endif
-);
-#endif
-
-#ifdef USE_DYNAMIC_LOADER
-extern XLCd _fallcDynamicLoader(
-#if NeedFunctionPrototypes
-    char*
-#endif
-);
-#endif
-
-/*
- * The _fallcInitLoader function initializes the locale object loader list
- * with vendor specific manner.
- */
-
-void
-_fallcInitLoader()
-{
-#ifdef USE_GENERIC_LOADER
-    _fallcAddLoader(_fallcGenericLoader, XlcHead);
-#endif
-
-#ifdef USE_DEFAULT_LOADER
-    _fallcAddLoader(_fallcDefaultLoader, XlcHead);
-#endif
-
-#ifdef USE_EUC_LOADER
-    _fallcAddLoader(_fallcEucLoader, XlcHead);
-#endif
-
-#ifdef USE_SJIS_LOADER
-    _fallcAddLoader(_fallcSjisLoader, XlcHead);
-#endif
-
-#ifdef USE_JIS_LOADER
-    _fallcAddLoader(_XlcJisLoader, XlcHead);
-#endif
-
-#ifdef USE_UTF_LOADER
-    _fallcAddLoader(_fallcUtfLoader, XlcHead);
-#endif
-
-#ifdef DYNAMIC_LOAD
-#ifdef sun
-    _fallcAddLoader(_falsunOsDynamicLoad, XlcHead);
-#endif /* sun */
-
-#ifdef AIXV3
-    _fallcAddLoader(_falaixOsDynamicLoad, XlcHead);
-#endif /* AIXV3 */
-#endif /* DYNAMIC_LOAD */
-
-#ifdef USE_DYNAMIC_LOADER
-    _fallcAddLoader(_fallcDynamicLoader, XlcHead);
-#endif
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcPrTxt.c b/cde/programs/dtudcfonted/libfal/_fallcPrTxt.c
deleted file mode 100644 (file)
index a352a18..0000000
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcPrTxt.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:38     */ 
-/* $XConsortium: _fallcPrTxt.c /main/1 1996/04/08 15:17:49 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#include "_fallibint.h"
-#include "_fallcPubI.h"
-#include "_falutil.h"
-#include <X11/Xatom.h>
-
-static XPointer *
-alloc_list(is_wide_char, count, nitems)
-    Bool is_wide_char;
-    int count;
-    int nitems;
-{
-    if (is_wide_char) {
-       wchar_t **wstr_list;
-
-       wstr_list = (wchar_t **) Xmalloc(count * sizeof(wchar_t *));
-       if (wstr_list == NULL)
-           return (XPointer *) NULL;
-
-       *wstr_list = (wchar_t *) Xmalloc(nitems * sizeof(wchar_t));
-       if (*wstr_list == NULL) {
-           Xfree(wstr_list);
-           return (XPointer *) NULL;
-       }
-
-       return (XPointer *) wstr_list;
-    } else {
-       char **str_list;
-
-       str_list = (char **) Xmalloc(count * sizeof(char *));
-       if (str_list == NULL)
-           return (XPointer *) NULL;
-
-       *str_list = (char *) Xmalloc(nitems);
-       if (*str_list == NULL) {
-           Xfree(str_list);
-           return (XPointer *) NULL;
-       }
-
-       return (XPointer *) str_list;
-    }
-}
-
-static void
-copy_list(is_wide_char, text, list, count)
-    Bool is_wide_char;
-    XPointer text;
-    XPointer *list;
-    int count;
-{
-    int length;
-
-    if (is_wide_char) {
-       wchar_t *wc_text, *wstr, **wstr_list;
-       
-       wc_text = (wchar_t *) text;
-       wstr_list = (wchar_t **) list;
-
-       for (wstr = *wstr_list; count > 0; count--, wstr_list++) {
-           _falwcscpy(wstr, wc_text);
-           *wstr_list = wstr;
-           length = _falwcslen(wstr) + 1;
-           wstr += length;
-           wc_text += length;
-       }
-    } else {
-       char *mb_text, *str, **str_list;
-       
-       mb_text = (char *) text;
-       str_list = (char **) list;
-
-       for (str = *str_list; count > 0; count--, str_list++) {
-           strcpy(str, mb_text);
-           *str_list = str;
-           length = strlen(str) + 1;
-           str += length;
-           mb_text += length;
-       }
-    }
-}
-
-static int
-_XTextPropertyToTextList(lcd, dpy, text_prop, to_type, list_ret, count_ret)
-    XLCd lcd;
-    Display *dpy;
-    XTextProperty *text_prop;
-    char *to_type;
-    XPointer **list_ret;
-    int *count_ret;
-{
-    XlcConv conv;
-    char *from_type;
-    XPointer from, to, buf;
-    char *str_ptr, *last_ptr;
-    Atom encoding;
-    int from_left, to_left, buf_len, ret;
-    int unconv_num, nitems = text_prop->nitems;
-    Bool is_wide_char = False;
-
-    if (strcmp(XlcNWideChar, to_type) == 0)
-       is_wide_char = True;
-
-    if (nitems <= 0) {
-       *list_ret = NULL;
-       *count_ret = 0;
-       return Success;
-    }
-
-    if (text_prop->format != 8)
-       return XConverterNotFound;
-
-    encoding = text_prop->encoding;
-    if (encoding == XA_STRING)
-       from_type = XlcNString;
-    else if (encoding == falInternAtom(dpy, "COMPOUND_TEXT", False))
-       from_type = XlcNCompoundText;
-    else if (encoding == falInternAtom(dpy, XLC_PUBLIC(lcd, encoding_name), False))
-       from_type = XlcNMultiByte;
-    else
-       return XConverterNotFound;
-
-    if (is_wide_char) {
-       buf_len = text_prop->nitems + 1;
-       buf = (XPointer) Xmalloc(buf_len * sizeof(wchar_t));
-    } else {
-       buf_len = text_prop->nitems * XLC_PUBLIC(lcd, mb_cur_max) + 1;
-       buf = (XPointer) Xmalloc(buf_len);
-    }
-    if (buf == NULL)
-       return XNoMemory;
-    to = buf;
-    to_left = buf_len;
-
-    conv = _fallcOpenConverter(lcd, from_type, lcd, to_type);
-    if (conv == NULL) {
-       Xfree(buf);
-       return XConverterNotFound;
-    }
-
-    last_ptr = str_ptr = (char *) text_prop->value;
-    unconv_num = *count_ret = 0;
-
-    while (1) {
-       if (nitems == 0 || *str_ptr == 0) {
-           if (nitems)
-               str_ptr++;
-           from = (XPointer) last_ptr;
-           from_left = str_ptr - last_ptr;
-           last_ptr = str_ptr;
-
-           ret = _fallcConvert(conv, &from, &from_left, &to, &to_left, NULL, 0);
-
-           if (ret < 0)
-               continue;
-
-           unconv_num += ret;
-           (*count_ret)++;
-
-           if (nitems == 0)
-               break;
-           _fallcResetConverter(conv);
-       } else
-           str_ptr++;
-
-       nitems--;
-    }
-
-    _fallcCloseConverter(conv);
-
-    if (is_wide_char)
-       *((wchar_t *) to) = (wchar_t) 0;
-    else
-       *((char *) to) = '\0';
-    to_left--;
-
-    *list_ret = alloc_list(is_wide_char, *count_ret, buf_len - to_left);
-    if (*list_ret)
-       copy_list(is_wide_char, buf, *list_ret, *count_ret);
-
-    Xfree(buf);
-
-    return unconv_num;
-}
-
-int
-_falmbTextPropertyToTextList(lcd, dpy, text_prop, list_ret, count_ret)
-    XLCd lcd;
-    Display *dpy;
-    XTextProperty *text_prop;
-    char ***list_ret;
-    int *count_ret;
-{
-    return _XTextPropertyToTextList(lcd, dpy, text_prop, XlcNMultiByte,
-                                   (XPointer **) list_ret, count_ret);
-}
-
-int
-_falwcTextPropertyToTextList(lcd, dpy, text_prop, list_ret, count_ret)
-    XLCd lcd;
-    Display *dpy;
-    XTextProperty *text_prop;
-    wchar_t ***list_ret;
-    int *count_ret;
-{
-    return _XTextPropertyToTextList(lcd, dpy, text_prop, XlcNWideChar,
-                                   (XPointer **) list_ret, count_ret);
-}
-
-void
-_falwcFreeStringList(lcd, list)
-    XLCd lcd;
-    wchar_t **list;
-{
-    if (list) {
-        if (*list)
-            Xfree(*list);
-        Xfree(list);
-    }
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcPubI.h b/cde/programs/dtudcfonted/libfal/_fallcPubI.h
deleted file mode 100644 (file)
index 97be182..0000000
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* XlcPubI.h 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:05     */ 
-/* $XConsortium: _fallcPubI.h /main/1 1996/04/08 15:17:59 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#ifndef _XLCPUBLICI_H_
-#define _XLCPUBLICI_H_
-
-#include "_fallcPublic.h"
-
-#define XLC_PUBLIC(lcd, x)     (((XLCdPublic) lcd->core)->pub.x)
-#define XLC_PUBLIC_PART(lcd)   (&(((XLCdPublic) lcd->core)->pub))
-#define XLC_PUBLIC_METHODS(lcd)        (&(((XLCdPublicMethods) lcd->methods)->pub))
-
-/*
- * XLCd public methods
- */
-
-typedef struct _XLCdPublicMethodsRec *XLCdPublicMethods;
-
-typedef XLCd (*XlcPubCreateProc)(
-#if NeedFunctionPrototypes
-    char*              /* name */,
-    XLCdMethods                /* methods */
-#endif
-);
-
-typedef Bool (*XlcPubInitializeProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */
-#endif
-);
-
-typedef void (*XlcPubDestroyProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */
-#endif
-);
-
-typedef char* (*XlcPubGetValuesProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    XlcArgList         /* args */,
-    int                        /* num_args */
-#endif
-);
-
-typedef void (*XlcPubGetResourceProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    char*              /* category */,
-    char*              /* class */,
-    char***            /* value */,
-    int*               /* count */
-#endif
-);
-
-typedef struct _XLCdPublicMethodsPart {
-    XLCdPublicMethods superclass;
-    XlcPubCreateProc create;
-    XlcPubInitializeProc initialize;
-    XlcPubDestroyProc destroy;
-    XlcPubGetValuesProc get_values;
-    XlcPubGetResourceProc get_resource;
-} XLCdPublicMethodsPart;
-
-typedef struct _XLCdPublicMethodsRec {
-    XLCdMethodsRec core;
-    XLCdPublicMethodsPart pub;
-} XLCdPublicMethodsRec;
-
-/*
- * XLCd public data
- */
-
-typedef struct _XLCdPublicPart {
-    char *siname;                      /* for _fallcMapOSLocaleName() */
-    char *language;                    /* language part of locale name */
-    char *territory;                   /* territory part of locale name */
-    char *codeset;                     /* codeset part of locale name */
-    char *encoding_name;               /* encoding name */
-    int mb_cur_max;                    /* ANSI C MB_CUR_MAX */
-    Bool is_state_depend;              /* state-depend encoding */
-    char *default_string;              /* for falDefaultString() */
-    XPointer xlocale_db;
-} XLCdPublicPart;
-
-typedef struct _XLCdPublicRec {
-    XLCdCoreRec core;  
-    XLCdPublicPart pub;
-} XLCdPublicRec, *XLCdPublic;
-
-extern XLCdMethods _fallcPublicMethods;
-
-_XFUNCPROTOBEGIN
-
-extern XLCd _fallcCreateLC(
-#if NeedFunctionPrototypes
-    char*              /* name */,
-    XLCdMethods                /* methods */
-#endif
-);
-
-extern void _fallcDestroyLC(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */
-#endif
-);
-
-extern Bool _fallcParseCharSet(
-#if NeedFunctionPrototypes
-    XlcCharSet         /* charset */
-#endif
-);
-
-extern XlcCharSet _fallcCreateDefaultCharSet(
-#if NeedFunctionPrototypes
-    char*              /* name */,
-    char*              /* control_sequence */
-#endif
-);
-
-extern XlcCharSet _fallcAddCT(
-#if NeedFunctionPrototypes
-    char*              /* name */,
-    char*              /* control_sequence */
-#endif
-);
-
-extern XrmMethods _falrmDefaultInitParseInfo(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    XPointer*          /* state */
-#endif
-);
-
-extern int _falmbTextPropertyToTextList(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* dpy */,
-    XTextProperty*     /* text_prop */,
-    char***            /* list_ret */,
-    int*               /* count_ret */
-#endif
-);
-
-extern int _falwcTextPropertyToTextList(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* dpy */,
-    XTextProperty*     /* text_prop */,
-    wchar_t***         /* list_ret */,
-    int*               /* count_ret */
-#endif
-);
-
-extern int _falmbTextListToTextProperty(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* dpy */,
-    char**             /* list */,
-    int                        /* count */,
-    XICCEncodingStyle  /* style */,
-    XTextProperty*     /* text_prop */
-#endif
-);
-
-extern int _falwcTextListToTextProperty(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* dpy */,
-    wchar_t**          /* list */,
-    int                        /* count */,
-    XICCEncodingStyle  /* style */,
-    XTextProperty*     /* text_prop */
-#endif
-);
-
-extern void _falwcFreeStringList(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    wchar_t**          /* list */
-#endif
-);
-
-extern int _fallcResolveLocaleName(
-#if NeedFunctionPrototypes
-    char*              /* lc_name */,
-    char*              /* full_name */,
-    char*              /* language */,
-    char*              /* territory */,
-    char*              /* codeset */
-#endif
-);
-
-extern int _fallcResolveDBName(
-#if NeedFunctionPrototypes
-    char*              /* lc_name */,
-    char*              /* file_name */
-#endif
-);
-
-extern int _fallcResolveI18NPath(
-#if NeedFunctionPrototypes
-    char*              /* path_name */
-#endif
-);
-
-extern XPointer _fallcCreateLocaleDataBase(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */
-#endif
-);
-
-extern void _fallcDestroyLocaleDataBase(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */
-#endif
-);
-
-extern void _fallcGetLocaleDataBase(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    char*              /* category */,
-    char*              /* name */,
-    char***            /* value */,
-    int*               /* count */
-#endif
-);
-
-_XFUNCPROTOEND
-
-#endif  /* _XLCPUBLICI_H_ */
diff --git a/cde/programs/dtudcfonted/libfal/_fallcPubWrap.c b/cde/programs/dtudcfonted/libfal/_fallcPubWrap.c
deleted file mode 100644 (file)
index 9aa5be5..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcPubWrap.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:39   */ 
-/* $XConsortium: _fallcPubWrap.c /main/1 1996/04/08 15:18:09 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#include "_fallibint.h"
-#include "_fallcPubI.h"
-
-#if NeedVarargsPrototypes
-char *
-_falGetLCValues(XLCd lcd, ...)
-#else
-char *
-_falGetLCValues(lcd, va_alist)
-    XLCd lcd;
-    va_dcl
-#endif
-{
-    va_list var;
-    XlcArgList args;
-    char *ret;
-    int num_args;
-    XLCdPublicMethodsPart *methods = XLC_PUBLIC_METHODS(lcd);
-
-    Va_start(var, lcd);
-    _fallcCountVaList(var, &num_args);
-    va_end(var);
-
-    Va_start(var, lcd);
-    _fallcVaToArgList(var, num_args, &args);
-    va_end(var);
-
-    if (args == (XlcArgList) NULL)
-       return (char *) NULL;
-    
-    ret = (*methods->get_values)(lcd, args, num_args);
-
-    Xfree(args);
-
-    return ret;
-}
-
-void
-_fallcDestroyLC(lcd)
-    XLCd lcd;
-{
-    XLCdPublicMethods methods = (XLCdPublicMethods) lcd->methods;
-
-    (*methods->pub.destroy)(lcd);
-}
-
-XLCd
-_fallcCreateLC(name, methods)
-    char *name;
-    XLCdMethods methods;
-{
-    XLCdPublicMethods pub_methods = (XLCdPublicMethods) methods;
-    XLCd lcd;
-
-    lcd = (*pub_methods->pub.create)(name, methods);
-    if (lcd == NULL)
-       return (XLCd) NULL;
-
-    if (lcd->core->name == NULL) {
-       lcd->core->name = (char*) Xmalloc(strlen(name) + 1);
-       if (lcd->core->name == NULL) 
-           goto err;
-       strcpy(lcd->core->name, name);
-    }
-    
-    if (lcd->methods == NULL)
-       lcd->methods = methods;
-
-    if ((*pub_methods->pub.initialize)(lcd) == False)
-       goto err;
-    
-    return lcd;
-
-err:
-    _fallcDestroyLC(lcd);
-
-    return (XLCd) NULL;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcPublic.c b/cde/programs/dtudcfonted/libfal/_fallcPublic.c
deleted file mode 100644 (file)
index 075da39..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcPublic.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:39    */ 
-/* $XConsortium: _fallcPublic.c /main/1 1996/04/08 15:18:20 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#include <stdio.h>
-#include "_fallibint.h"
-#include "_fallcPubI.h"
-
-static char *default_string();
-
-static XLCd create();
-static Bool initialize();
-static void destroy();
-static char *get_values();
-
-static XLCdPublicMethodsRec publicMethods = {
-    {
-       destroy,
-       _fallcDefaultMapModifiers,
-       NULL,
-       NULL,
-       _falrmDefaultInitParseInfo,
-       _falmbTextPropertyToTextList,
-       _falwcTextPropertyToTextList,
-       _falmbTextListToTextProperty,
-       _falwcTextListToTextProperty,
-       _falwcFreeStringList,
-       default_string,
-       NULL,
-       NULL
-    }, 
-    {
-       NULL,
-       create,
-       initialize,
-       destroy,
-       get_values,
-       _fallcGetLocaleDataBase
-    }
-};
-
-XLCdMethods _fallcPublicMethods = (XLCdMethods) &publicMethods;
-
-static char *
-default_string(lcd)
-    XLCd lcd;
-{
-    return XLC_PUBLIC(lcd, default_string);
-}
-
-static XLCd
-create(name, methods)
-    char *name;
-    XLCdMethods methods;
-{
-    XLCd lcd;
-    XLCdPublicMethods new;
-
-    lcd = (XLCd) Xmalloc(sizeof(XLCdRec));
-    if (lcd == NULL)
-        return (XLCd) NULL;
-    bzero((char *) lcd, sizeof(XLCdRec));
-
-    lcd->core = (XLCdCore) Xmalloc(sizeof(XLCdPublicRec));
-    if (lcd->core == NULL)
-       goto err;
-    bzero((char *) lcd->core, sizeof(XLCdPublicRec));
-
-    new = (XLCdPublicMethods) Xmalloc(sizeof(XLCdPublicMethodsRec));
-    if (new == NULL)
-       goto err;
-    *new = *((XLCdPublicMethods) methods);
-    lcd->methods = (XLCdMethods) new;
-
-    return lcd;
-
-err:
-    Xfree(lcd);
-    return (XLCd) NULL;
-}
-
-static Bool
-load_public(lcd)
-    XLCd lcd;
-{
-    XLCdPublicPart *pub = XLC_PUBLIC_PART(lcd);
-    char **values, *str;
-    int num;
-
-    if(_fallcCreateLocaleDataBase(lcd) == NULL)
-       return False;
-
-    _fallcGetResource(lcd, "XLC_XLOCALE", "mb_cur_max", &values, &num);
-    if (num > 0) {
-       pub->mb_cur_max = atoi(values[0]);
-       if (pub->mb_cur_max < 1)
-           pub->mb_cur_max = 1;
-    } else
-       pub->mb_cur_max = 1;
-
-    _fallcGetResource(lcd, "XLC_XLOCALE", "state_dependent", &values, &num);
-    if (num > 0 && !_fallcCompareISOLatin1(values[0], "True"))
-       pub->is_state_depend = True;
-    else
-       pub->is_state_depend = False;
-
-    _fallcGetResource(lcd, "XLC_XLOCALE", "encoding_name", &values, &num);
-    str = (num > 0) ? values[0] : "STRING";
-    pub->encoding_name = (char*) Xmalloc(strlen(str) + 1);
-    if (pub->encoding_name == NULL)
-       return False;
-    strcpy(pub->encoding_name, str);
-
-    return True;
-}
-
-static Bool
-initialize_core(lcd)
-    XLCd lcd;
-{
-    XLCdMethods methods = lcd->methods;
-    XLCdMethods core = &publicMethods.core;
-
-    if (methods->close == NULL)
-       methods->close = core->close;
-
-    if (methods->map_modifiers == NULL)
-       methods->map_modifiers = core->map_modifiers;
-
-    if (methods->open_om == NULL)
-       _falInitOM(lcd);
-
-    if (methods->init_parse_info == NULL)
-       methods->init_parse_info = core->init_parse_info;
-
-    if (methods->mb_text_prop_to_list == NULL)
-       methods->mb_text_prop_to_list = core->mb_text_prop_to_list;
-
-    if (methods->wc_text_prop_to_list == NULL)
-       methods->wc_text_prop_to_list = core->wc_text_prop_to_list;
-
-    if (methods->mb_text_list_to_prop == NULL)
-       methods->mb_text_list_to_prop = core->mb_text_list_to_prop;
-
-    if (methods->wc_text_list_to_prop == NULL)
-       methods->wc_text_list_to_prop = core->wc_text_list_to_prop;
-
-    if (methods->wc_free_string_list == NULL)
-       methods->wc_free_string_list = core->wc_free_string_list;
-
-    if (methods->default_string == NULL)
-       methods->default_string = core->default_string;
-
-    return True;
-}
-
-extern Bool _fallcInitCTInfo();
-
-static Bool
-initialize(lcd)
-    XLCd lcd;
-{
-    XLCdPublicMethodsPart *methods = XLC_PUBLIC_METHODS(lcd);
-    XLCdPublicMethodsPart *pub_methods = &publicMethods.pub;
-    XLCdPublicPart *pub = XLC_PUBLIC_PART(lcd);
-    char lang[128], terr[128], code[128], *str;
-    char *name;
-#if !defined(X_NOT_STDC_ENV) && !defined(X_LOCALE)
-    char siname[256];
-    char *_fallcMapOSLocaleName();
-#endif
-
-    _fallcInitCTInfo();
-
-    if (initialize_core(lcd) == False)
-       return False;
-
-    name = lcd->core->name;
-#if !defined(X_NOT_STDC_ENV) && !defined(X_LOCALE)
-    name = _fallcMapOSLocaleName(name, siname);
-#endif
-       
-    if (_fallcResolveLocaleName(name, NULL, lang, terr, code) == 0)
-       return False;
-
-    str = (char*) Xmalloc(strlen(name) + strlen(lang) + strlen(terr) +
-                         strlen(code) + 4);
-    if (str == NULL)
-       return False;
-
-    strcpy(str, name);
-    pub->siname = str;
-    str += strlen(str) + 1;
-
-    strcpy(str, lang);
-    pub->language = str;
-    str += strlen(str) + 1;
-
-    strcpy(str, terr);
-    pub->territory = str;
-    str += strlen(str) + 1;
-
-    strcpy(str, code);
-    pub->codeset = str;
-
-    if (pub->default_string == NULL)
-       pub->default_string = "";
-
-    if (methods->get_values == NULL)
-       methods->get_values = pub_methods->get_values;
-
-    if (methods->get_resource == NULL)
-       methods->get_resource = pub_methods->get_resource;
-
-    return load_public(lcd);
-}
-
-static void
-destroy_core(lcd)
-       XLCd    lcd;
-{
-    if (lcd->core) {
-       if (lcd->core->name)
-            Xfree(lcd->core->name);
-       Xfree(lcd->core);
-    }
-
-    if (lcd->methods)
-       Xfree(lcd->methods);
-
-    Xfree(lcd);
-}
-
-static void
-destroy(lcd)
-    XLCd lcd;
-{
-    XLCdPublicPart *pub = XLC_PUBLIC_PART(lcd);
-
-    _fallcDestroyLocaleDataBase(lcd);
-
-    if (pub->siname)
-       Xfree(pub->siname);
-    if (pub->encoding_name)
-       Xfree(pub->encoding_name);
-
-    destroy_core(lcd);
-}
-
-static XlcResource resources[] = {
-    { XlcNCodeset, NULLQUARK, sizeof(char *),
-      XOffsetOf(XLCdPublicRec, pub.codeset), XlcGetMask },
-    { XlcNDefaultString, NULLQUARK, sizeof(char *),
-      XOffsetOf(XLCdPublicRec, pub.default_string), XlcGetMask },
-    { XlcNEncodingName, NULLQUARK, sizeof(char *),
-      XOffsetOf(XLCdPublicRec, pub.encoding_name), XlcGetMask },
-    { XlcNLanguage, NULLQUARK, sizeof(char *),
-      XOffsetOf(XLCdPublicRec, pub.language), XlcGetMask },
-    { XlcNMbCurMax, NULLQUARK, sizeof(int),
-      XOffsetOf(XLCdPublicRec, pub.mb_cur_max), XlcGetMask },
-    { XlcNStateDependentEncoding, NULLQUARK, sizeof(Bool),
-      XOffsetOf(XLCdPublicRec, pub.is_state_depend), XlcGetMask },
-    { XlcNTerritory, NULLQUARK, sizeof(char *),
-      XOffsetOf(XLCdPublicRec, pub.territory), XlcGetMask }
-};
-
-static char *
-get_values(lcd, args, num_args)
-    register XLCd lcd;
-    register XlcArgList args;
-    register int num_args;
-{
-    XLCdPublic pub = (XLCdPublic) lcd->core;
-
-    if (resources[0].xrm_name == NULLQUARK)
-       _fallcCompileResourceList(resources, XlcNumber(resources));
-
-    return _fallcGetValues((XPointer) pub, resources, XlcNumber(resources), args,
-                        num_args, XlcGetMask);
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcPublic.h b/cde/programs/dtudcfonted/libfal/_fallcPublic.h
deleted file mode 100644 (file)
index 733e898..0000000
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* XlcPublic.h 1.3 - Fujitsu source for CDEnext    95/12/07 10:53:08   */ 
-/* $XConsortium: _fallcPublic.h /main/1 1996/04/08 15:18:31 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-/*
- * Copyright 1995 by FUJITSU LIMITED
- * This is source code modified by FUJITSU LIMITED under the Joint
- * Development Agreement for the CDEnext PST.
- * This is unpublished proprietry source code of FUJITSU LIMITED
- *
- * Modifier: Takanori Tateno   FUJITSU LIMITED
- *
- */
-
-#ifndef _XLCPUBLIC_H_
-#define _XLCPUBLIC_H_
-
-#include "_fallcint.h"
-
-#define XlcNCharSize           "charSize"
-#define XlcNCodeset            "codeset"
-#define XlcNControlSequence    "controlSequence"
-#define XlcNDefaultString      "defaultString"
-#define XlcNEncodingName       "encodingName"
-#define XlcNLanguage           "language"
-#define XlcNMbCurMax           "mbCurMax"
-#define XlcNName               "name"
-#define XlcNSetSize            "setSize"
-#define XlcNSide               "side"
-#define XlcNStateDependentEncoding "stateDependentEncoding"
-#define XlcNTerritory          "territory"
-
-typedef enum {
-    XlcUnknown, XlcC0, XlcGL, XlcC1, XlcGR, XlcGLGR, XlcOther, XlcNONE
-} XlcSide;
-
-typedef struct _FonScope {
-        unsigned long   start;
-        unsigned long   end;
-        unsigned long   shift;
-        unsigned long   shift_direction;
-} FontScopeRec, *FontScope;
-
-typedef struct _UDCArea {
-        unsigned long  start,end;
-} UDCAreaRec, *UDCArea;
-
-typedef struct _XlcCharSetRec *XlcCharSet;
-
-typedef char* (*XlcGetCSValuesProc)(
-#if NeedFunctionPrototypes
-    XlcCharSet         /* charset */,
-    XlcArgList         /* args */,
-    int                        /* num_args */
-#endif
-);
-
-typedef struct _XlcCharSetRec {
-    char               *name;          /* character set name */
-    XrmQuark           xrm_name;
-    char               *encoding_name; /* XLFD encoding name */
-    XrmQuark           xrm_encoding_name;
-    XlcSide            side;           /* GL, GR or others */
-    int                char_size;      /* number of bytes per character */
-    int                set_size;       /* graphic character sets */
-    char               *ct_sequence;   /* control sequence of CT */
-    XlcGetCSValuesProc         get_values;
-    /* UDC */
-    Bool               string_encoding;
-    UDCArea            udc_area;
-    int                udc_area_num;
-} XlcCharSetRec;
-
-/*
- * conversion methods
- */
-
-typedef struct _XlcConvRec *XlcConv;
-
-typedef XlcConv (*XlcOpenConverterProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* from_lcd */,
-    char*              /* from_type */,
-    XLCd               /* to_lcd */,
-    char*              /* to_type */
-#endif
-);
-
-typedef void (*XlcCloseConverterProc)(
-#if NeedFunctionPrototypes
-    XlcConv            /* conv */
-#endif
-);
-
-typedef int (*XlcConvertProc)(
-#if NeedFunctionPrototypes
-    XlcConv            /* conv */,
-    XPointer*          /* from */,
-    int*               /* from_left */,
-    XPointer*          /* to */,
-    int*               /* to_left */,
-    XPointer*          /* args */,
-    int                        /* num_args */
-#endif
-);
-
-typedef void (*XlcResetConverterProc)(
-#if NeedFunctionPrototypes
-    XlcConv            /* conv */
-#endif
-);
-
-typedef struct _XlcConvMethodsRec{
-    XlcCloseConverterProc      close;
-    XlcConvertProc             convert;
-    XlcResetConverterProc      reset;
-} XlcConvMethodsRec, *XlcConvMethods;
-
-/*
- * conversion data
- */
-
-#define XlcNMultiByte          "multiByte"
-#define XlcNWideChar           "wideChar"
-#define XlcNCompoundText       "compoundText"
-#define XlcNString             "string"
-#define XlcNCharSet            "charSet"
-#define XlcNCTCharSet          "CTcharSet"
-#define XlcNChar               "char"
-
-typedef struct _XlcConvRec {
-    XlcConvMethods             methods;
-    XPointer                   state;
-} XlcConvRec;
-
-
-_XFUNCPROTOBEGIN
-
-extern Bool _falInitOM(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */
-#endif
-);
-
-extern Bool _XInitIM(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */
-#endif
-);
-
-extern char *_falGetLCValues(
-#if NeedVarargsPrototypes
-    XLCd               /* lcd */,
-    ...
-#endif
-);
-
-extern XlcCharSet _fallcGetCharSet(
-#if NeedFunctionPrototypes
-    char*              /* name */
-#endif
-);
-
-extern Bool _fallcAddCharSet(
-#if NeedFunctionPrototypes
-    XlcCharSet         /* charset */
-#endif
-);
-
-extern char *_fallcGetCSValues(
-#if NeedVarargsPrototypes
-    XlcCharSet         /* charset */,
-    ...
-#endif
-);
-
-extern XlcConv _fallcOpenConverter(
-#if NeedFunctionPrototypes
-    XLCd               /* from_lcd */,
-    char*              /* from_type */,
-    XLCd               /* to_lcd */,
-    char*              /* to_type */
-#endif
-);
-
-extern void _fallcCloseConverter(
-#if NeedFunctionPrototypes
-    XlcConv            /* conv */
-#endif
-);
-
-extern int _fallcConvert(
-#if NeedFunctionPrototypes
-    XlcConv            /* conv */,
-    XPointer*          /* from */,
-    int*               /* from_left */,
-    XPointer*          /* to */,
-    int*               /* to_left */,
-    XPointer*          /* args */,
-    int                        /* num_args */
-#endif
-);
-
-extern void _fallcResetConverter(
-#if NeedFunctionPrototypes
-    XlcConv            /* conv */
-#endif
-);
-
-extern Bool _fallcSetConverter(
-#if NeedFunctionPrototypes
-    XLCd                       /* from_lcd */,
-    char*                      /* from_type */,
-    XLCd                       /* to_lcd */,
-    char*                      /* to_type */,
-    XlcOpenConverterProc       /* open_converter */
-#endif
-);
-
-extern void _fallcGetResource(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    char*              /* category */,
-    char*              /* class */,
-    char***            /* value */,
-    int*               /* count */
-#endif
-);
-
-extern char *_fallcFileName(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    char*              /* category */
-#endif
-);
-
-extern int _falwcslen(
-#if NeedFunctionPrototypes
-    wchar_t*           /* wstr */
-#endif
-);
-
-extern wchar_t *_falwcscpy(
-#if NeedFunctionPrototypes
-    wchar_t*           /* wstr1 */,
-    wchar_t*           /* wstr2 */
-#endif
-);
-
-extern int _fallcCompareISOLatin1(
-#if NeedFunctionPrototypes
-    char*              /* str1 */,
-    char*              /* str2 */
-#endif
-);
-
-extern int _fallcNCompareISOLatin1(
-#if NeedFunctionPrototypes
-    char*              /* str1 */,
-    char*              /* str2 */,
-    int                        /* len */
-#endif
-);
-
-_XFUNCPROTOEND
-
-#endif  /* _XLCPUBLIC_H_ */
diff --git a/cde/programs/dtudcfonted/libfal/_fallcRM.c b/cde/programs/dtudcfonted/libfal/_fallcRM.c
deleted file mode 100644 (file)
index 682e274..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcRM.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:40        */ 
-/* $XConsortium: _fallcRM.c /main/1 1996/04/08 15:18:41 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#include "_fallibint.h"
-#include "_fallcPubI.h"
-#include <stdio.h>
-
-typedef struct _StateRec {
-    XLCd lcd;
-    XlcConv conv;
-} StateRec, *State;
-
-static void
-mbinit(state)
-    XPointer state;
-{
-    _fallcResetConverter(((State) state)->conv);
-}
-
-static char
-mbchar(state, str, lenp)
-    XPointer state;
-    char *str;
-    int *lenp;
-{
-    XlcConv conv = ((State) state)->conv;
-    XlcCharSet charset;
-    char *from, *to, buf[BUFSIZ];
-    int from_left, to_left;
-    XPointer args[1];
-
-    from = str;
-    *lenp = from_left = XLC_PUBLIC(((State) state)->lcd, mb_cur_max);
-    to = buf;
-    to_left = BUFSIZ;
-    args[0] = (XPointer) &charset;
-
-    _fallcConvert(conv, (XPointer *) &from, &from_left, (XPointer *) &to,
-               &to_left, args, 1);
-    
-    *lenp -= from_left;
-
-    /* XXX */
-    return buf[0];
-}
-
-static void
-mbfinish(state)
-    XPointer state;
-{
-}
-
-static char *
-lcname(state)
-    XPointer state;
-{
-    return ((State) state)->lcd->core->name;
-}
-
-static void
-destroy(state)
-    XPointer state;
-{
-    _fallcCloseConverter(((State) state)->conv);
-    _falCloseLC(((State) state)->lcd);
-    Xfree((char *) state);
-}
-
-static XrmMethodsRec rm_methods = {
-    mbinit,
-    mbchar,
-    mbfinish,
-    lcname,
-    destroy
-} ;
-
-XrmMethods
-_falrmDefaultInitParseInfo(lcd, rm_state)
-    XLCd lcd;
-    XPointer *rm_state;
-{
-    State state;
-
-    state = (State) Xmalloc(sizeof(StateRec));
-    if (state == NULL)
-       return (XrmMethods) NULL;
-
-    state->lcd = lcd;
-    state->conv = _fallcOpenConverter(lcd, XlcNMultiByte, lcd, XlcNChar);
-    if (state->conv == NULL) {
-       Xfree((char *) state);
-
-       return (XrmMethods) NULL;
-    }
-    
-    *rm_state = (XPointer) state;
-    
-    return &rm_methods;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcSjis.c b/cde/programs/dtudcfonted/libfal/_fallcSjis.c
deleted file mode 100644 (file)
index e06e6dc..0000000
+++ /dev/null
@@ -1,1575 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcSjis.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:40      */ 
-/* $XConsortium: _fallcSjis.c /main/1 1996/04/08 15:18:51 cde-fuj $ */
-/****************************************************************
-
-        Copyright 1992, 1993 by FUJITSU LIMITED
-        Copyright 1993 by Fujitsu Open Systems Solutions, Inc.
-       Copyright 1994 by Sony Corporation
-
-Permission to use, copy, modify, distribute and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and
-that both that copyright notice and this permission notice appear
-in supporting documentation, and that the name of FUJITSU LIMITED,
-Fujitsu Open Systems Solutions, Inc. and Sony Corporation  not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-FUJITSU LIMITED, Fujitsu Open Systems Solutions, Inc. and
-Sony Corporation make no representations about the suitability of
-this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-FUJITSU LIMITED, FUJITSU OPEN SYSTEMS SOLUTIONS, INC. AND SONY
-CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL FUJITSU OPEN SYSTEMS SOLUTIONS, INC., FUJITSU LIMITED
-AND SONY CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
-OR PERFORMANCE OF THIS SOFTWARE.
-
-    Authors: Jeffrey Bloomfield                (jeffb@ossi.com)
-            Shigeru Yamada             (yamada@ossi.com)
-             Yoshiyuki Segawa          (segawa@ossi.com)
-    Modifier:Makoto Wakamatsu   Sony Corporation
-                               makoto@sm.sony.co.jp
-
-*****************************************************************/
-
-#include "_fallibint.h"
-#include "_fallcGeneric.h"
-
-#include <ctype.h>
-#ifdef WIN32
-#define isascii __isascii
-#endif
-
-#define CS0    codesets[0]             /* Codeset 0 - 7-bit ASCII      */
-#define CS1    codesets[1]             /* Codeset 1 - Kanji            */
-#define CS2    codesets[2]             /* Codeset 2 - Half-Kana        */
-#define CS3    codesets[3]             /* Codeset 3 - User defined     */
-
-#define ascii          (codeset->cs_num == 0)
-#define kanji          (codeset->cs_num == 1)
-#define kana           (codeset->cs_num == 2)
-#define userdef                (codeset->cs_num == 3)
-
-#define        ASCII_CODESET   0
-#define KANJI_CODESET  1
-#define KANA_CODESET   2
-#define USERDEF_CODESET        3
-#define MAX_CODESETS   4
-
-#define GR     0x80    /* begins right-side (non-ascii) region */
-#define GL     0x7f    /* ends left-side (ascii) region        */
-
-#define isleftside(c)  (((c) & GR) ? 0 : 1)
-#define isrightside(c) (!isleftside(c))
-
-typedef unsigned char   Uchar;
-typedef unsigned long  Ulong;
-typedef unsigned int   Uint;
-
-/* Acceptable range for 2nd byte of SJIS multibyte char */
-#define VALID_MULTIBYTE(c) \
-                       ((0x40<=((Uchar)c) && ((Uchar)c)<=0x7e) \
-                       || (0x80<=((Uchar)c) && ((Uchar)c)<=0xfc))
-
-#ifndef iskanji
-#define iskanji(c)     ((0x81<=((Uchar)c) && ((Uchar)c)<=0x9f) \
-                       || (0xe0<=((Uchar)c) && ((Uchar)c)<=0xef))
-#endif /* !iskanji */
-
-#ifndef iskana
-#define iskana(c)      (0xa1<=((Uchar)c) && ((Uchar)c)<=0xdf)
-#endif /* !iskana */
-
-#define        isuserdef(c)    (0xf0<=((Uchar)c) && ((Uchar)c)<=0xfc)
-
-#define BIT8OFF(c)     ((c) & GL)
-#define BIT8ON(c)      ((c) | GR)
-
-
-static void jis_to_sjis();
-static void sjis_to_jis();
-static CodeSet wc_codeset();
-
-
-/*
- * Notes:
- * 1.  16-bit widechar format is limited to 14 data bits.  Since the 2nd byte
- *     of SJIS multibyte chars are in the ranges of 0x40 - 7E and 0x80 - 0xFC,
- *     SJIS cannot map directly into 16 bit widechar format within the confines
- *     of a single codeset.  Therefore, for SJIS widechar conversion, SJIS Kanji
- *     is mapped into the JIS codeset.  (The algorithms used in jis_to_sjis()
- *     and sjis_to_jis() are from Ken Lunde (lunde@mv.us.adobe.com) and are in
- *     the public domain.)
- * 2.  Defining FORCE_INDIRECT_CONVERTER (see _fallcEucLoader())
- *     forces indirect (charset) conversions (e.g. wcstocs()<->cstombs()).
- * 3.  Using direct converters (e.g. mbstowcs()) decreases conversion
- *     times by 20-40% (depends on specific converter used).
- */
-
-
-static int
-sjis_mbstowcs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-
-    XLCd lcd = (XLCd)conv->state;
-
-    register int chr_len = 0;
-    register int outbuf = 0;
-    register int shift_mult = 0;
-    register Uint chrcode = 0;
-
-    Uchar ch, ch2;
-    Uint wc_encode = 0;
-    Uint wc_tmp = 0;
-
-    Bool new_char;
-
-    int firstbyte;
-    int length;
-    int num_conv;
-    int unconv_num = 0;
-
-    XPointer inbufptr = *from;
-    wchar_t *outbufptr = (wchar_t *) *to;
-    wchar_t *outbuf_base = outbufptr;
-
-    CodeSet *codesets = XLC_GENERIC(lcd, codeset_list); 
-    int codeset_num = XLC_GENERIC(lcd, codeset_num);
-    Ulong wc_shift = XLC_GENERIC(lcd, wc_shift_bits);
-
-
-    if (*from_left > *to_left)
-       *from_left = *to_left;
-
-     for (new_char = True, firstbyte = True; *from_left > 0; (*from_left)--) {
-
-       ch = *inbufptr++;
-
-       if (firstbyte) {
-           if (ASCII_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           if (isascii(ch)) {
-               length = CS0->length;
-               *outbufptr++ = (wchar_t)ch;
-               continue;
-           }
-           else if (iskanji(ch)) {
-               if (KANJI_CODESET >= codeset_num) {
-                   unconv_num++;
-                   (*from_left)--;
-                   continue;
-               }
-               firstbyte = False;
-               length = CS1->length;
-               if (*from_left < length || *to_left < length)
-                   return -1;
-               wc_encode = CS1->wc_encoding;
-               ch2 = *inbufptr;
-               sjis_to_jis(&ch, &ch2);
-               chrcode = ch;
-           }
-           else if (iskana(ch)) {
-               if (KANA_CODESET >= codeset_num) {
-                   unconv_num++;
-                   (*from_left)--;
-                   continue;
-               }
-               length = CS2->length;
-               wc_encode = CS2->wc_encoding;
-               chrcode = BIT8OFF(ch);
-           }
-           else if (isuserdef(ch)) {
-               if (USERDEF_CODESET >= codeset_num) {
-                   unconv_num++;
-                   (*from_left)--;
-                   continue;
-               }
-               firstbyte = False;
-               length = CS3->length;
-               if (*from_left < length || *to_left < length)
-                   return -1;
-               wc_encode = CS3->wc_encoding;
-               ch2 = *inbufptr;
-               sjis_to_jis(&ch, &ch2);
-               chrcode = ch;
-           }
-           else /* unknown */ {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-       } else {                        /* 2nd byte of multibyte char */
-           if (!VALID_MULTIBYTE((Uchar) *(inbufptr-1))) {
-               unconv_num++;
-               firstbyte = True;
-           }
-           chrcode = ch2;
-       }
-
-       if (new_char) {
-           chr_len = length;
-           shift_mult = length - 1;
-           new_char = False;
-       }
-
-       chrcode <<= (wc_shift * shift_mult);
-       shift_mult--;
-       wc_tmp |= chrcode;
-       if (--chr_len == 0) {
-           wc_tmp |= wc_encode;
-           *outbufptr++ = wc_tmp;
-
-           firstbyte = True;
-           new_char = True;
-           wc_tmp = (Uint)0;
-       }
-
-    } /* end for */
-
-    *to = (XPointer)outbufptr;
-
-    if ((num_conv = outbufptr - outbuf_base) > 0)
-       (*to_left) -= num_conv;
-
-    return unconv_num;
-}
-
-
-#define byte1          (length == codeset->length - 1)
-#define byte2          (byte1 == 0)
-
-static int
-sjis_wcstombs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register wchar_t *inbufptr = (wchar_t *) *from;
-    register XPointer outbufptr = *to;
-    XPointer outbuf_base = outbufptr;
-    wchar_t  wch;
-    register length;
-    Uchar tmp;
-    Uchar t1, t2;
-    int num_conv;
-    int unconv_num = 0;
-
-    XLCd lcd = (XLCd)conv->state;
-    CodeSet codeset;
-    Ulong wc_encoding_mask = XLC_GENERIC(lcd, wc_encode_mask);
-    Ulong wc_shift = XLC_GENERIC(lcd, wc_shift_bits);
-
-
-
-    if (*from_left > *to_left)
-       *from_left = *to_left;
-
-    for (; *from_left > 0 ; (*from_left)-- ) {
-
-       wch = *inbufptr++;
-
-       if (!(codeset = wc_codeset(lcd, wch))) {
-           unconv_num++;
-           (*from_left)--;
-           continue;
-       }
-
-       length = codeset->length;
-       wch ^= (wchar_t)codeset->wc_encoding;
-
-       do {
-           length--;
-           tmp = wch>>(wchar_t)( (Ulong)length * wc_shift);
-
-           if (kana)
-               tmp = BIT8ON(tmp);
-
-           else if (byte1 && (kanji || userdef)) {
-               t1 = BIT8OFF(tmp);
-               continue;
-           }
-
-           else if (byte2 && (kanji || userdef)) {
-               t2 = BIT8OFF(tmp);
-               jis_to_sjis(&t1, &t2);
-               *outbufptr++ = (char)t1;
-               tmp = t2;
-           }
-
-           *outbufptr++ = (char)tmp;
-       } while (length); 
-
-    }  /* end for */
-
-    *to = (XPointer)outbufptr;
-
-    if ((num_conv = (int)(outbufptr - outbuf_base)) > 0)
-       (*to_left) -= num_conv;
-
-    return unconv_num;
-}
-#undef byte1
-#undef byte2
-
-/*
- * sjis<->jis conversion for widechar kanji (See Note at top of file)
- */
-static void
-sjis_to_jis(p1, p2)
-    Uchar *p1;
-    Uchar *p2;
-{
-  register Uchar c1 = *p1;
-  register Uchar c2 = *p2;
-  register Uchar adjust = c2 < 0x9f;
-  register Uchar rowOffset = c1 < 0xa0 ? 0x70 : 0xb0;
-  register Uchar cellOffset = adjust ? (0x1f + (c2 > 0x7f)) : 0x7e;
-
-  *p1 = ((c1 - rowOffset) << 1) - adjust;
-  *p2 -= cellOffset;
-}
-
-static void
-jis_to_sjis(p1, p2)
-    Uchar *p1;
-    Uchar *p2;
-{
-  register Uchar c1 = *p1;
-  register Uchar c2 = *p2;
-  register Uchar rowOffset = c1 < 0x5f ? 0x70 : 0xb0;
-  register Uchar cellOffset = c1 % 2 ? 0x1f + (c2 > 0x5f) : 0x7e;
-
-  *p1 = ((Uchar)(c1 + 1) >> 1) + rowOffset;
-  *p2 = c2 + cellOffset;
-}
-
-static CodeSet
-wc_codeset(lcd, wch)
-    XLCd lcd;
-    wchar_t wch;
-{
-    register CodeSet *codesets = XLC_GENERIC(lcd, codeset_list);
-#if !defined(__sony_news)  ||  defined(SVR4)
-    register int end = XLC_GENERIC(lcd, codeset_num);
-    register Ulong widech = (Ulong)(wch & XLC_GENERIC(lcd, wc_encode_mask));
-
-    for (; --end >= 0; codesets++)
-       if ( widech == (*codesets)->wc_encoding )
-           return *codesets;
-
-    return NULL;
-#else
-    if( iskanji(wch >> 8) )
-       return( codesets[1] );
-    if( iskana(wch & 0xff) )
-       return( codesets[2] );
-    return( codesets[0] );
-#endif
-}
-    
-
-static int
-sjis_mbtocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd)conv->state;
-    XlcCharSet charset = NULL;
-    int char_size = 0;
-    int unconv_num = 0;
-    register char *src = *from, *dst = *to;
-    CodeSet *codesets = XLC_GENERIC(lcd, codeset_list);
-    int codeset_num = XLC_GENERIC(lcd, codeset_num);
-
-
-    if (iskanji(*src)) {
-       if (KANJI_CODESET >= codeset_num)
-           return -1;
-       charset = *CS1->charset_list;
-       char_size = charset->char_size;
-
-       if (*from_left >= char_size && *to_left >= char_size) {
-           *dst++ = *src++;
-           *dst++ = *src++; 
-           if (!VALID_MULTIBYTE((Uchar) *(src-1))) /* check 2nd byte */
-               unconv_num++;
-           sjis_to_jis((Uchar *)(dst-2), (Uchar *)(dst-1));
-       } else
-           return -1;
-    }
-    else if (isuserdef(*src)) {
-       if (USERDEF_CODESET >= codeset_num)
-           return -1;
-       charset = *CS3->charset_list;
-       char_size = charset->char_size;
-       
-       if (*from_left >= char_size && *to_left >= char_size) {
-           *dst++ = *src++;
-           *dst++ = *src++; 
-           if (!VALID_MULTIBYTE((Uchar) *(src-1))) /* check 2nd byte */
-               unconv_num++;
-           sjis_to_jis((Uchar *)(dst-2), (Uchar *)(dst-1));
-       } else
-           return -1;
-    }
-    else if (isascii(*src)) {
-       if (ASCII_CODESET >= codeset_num)
-           return -1;
-       charset = *CS0->charset_list;
-       char_size = charset->char_size;
-
-       if (*from_left >= char_size && *to_left >= char_size)
-           *dst++ = *src++;
-       else
-           return -1;
-    }
-    else if (iskana(*src)) {
-       if (KANA_CODESET >= codeset_num)
-           return  -1;
-       charset = *CS2->charset_list;
-       char_size = charset->char_size;
-
-       if (*from_left >= char_size && *to_left >= char_size)
-           *dst++ = *src++;
-       else
-          return -1;
-    }
-    else       /* unknown */
-       return -1;
-
-    *from_left -= char_size;
-    *to_left -= char_size;
-
-    *to = dst;
-    *from = src;
-
-    if (num_args > 0)
-       *((XlcCharSet *) args[0]) = charset;
-
-    return unconv_num;
-}
-
-
-static int
-sjis_mbstocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd) conv->state;
-    char *tmp_from, *tmp_to;
-    int tmp_from_left, tmp_to_left;
-    XlcCharSet charset, tmp_charset;
-    XPointer tmp_args[1];
-    int unconv_num = 0, ret;
-
-
-
-/* Determine the charset of the segment and convert one characater: */
-
-    tmp_args[0] = (XPointer) &charset; /* charset from sjis_mbtocs() */
-    while
-      ((ret = sjis_mbtocs(conv, from, from_left, to, to_left, tmp_args, 1)) > 0)
-       unconv_num += ret;
-    if ( ret < 0 )
-       return ret;
-
-    tmp_from = *from;
-    tmp_from_left = *from_left;
-    tmp_to_left = *to_left;
-    tmp_to = *to;
-
-/* Convert remainder of the segment: */
-
-    tmp_args[0] = (XPointer) &tmp_charset;
-    while( (ret = sjis_mbtocs(conv, &tmp_from, &tmp_from_left, &tmp_to,
-      &tmp_to_left, tmp_args, 1)) >= 0 ) {
-
-       if (ret > 0) {
-           unconv_num += ret;
-           continue;
-       }
-
-       if (tmp_charset != charset)  /* quit on end of segment */
-           break;
-
-       *from = tmp_from;
-       *from_left = tmp_from_left;
-       *to = tmp_to;
-       *to_left = tmp_to_left;
-    } 
-
-    if (num_args > 0)
-       *((XlcCharSet *) args[0]) = charset;
-    
-    return unconv_num;
-}
-
-static int
-sjis_wcstocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd) conv->state;
-    wchar_t *wcptr = *((wchar_t **)from);
-    register char *bufptr = *((char **) to);
-    wchar_t wch;
-    char *tmpptr;
-    register length;
-    CodeSet codeset;
-    Ulong wc_encoding;
-    int buf_len = *to_left;
-    int unconv_num = 0;
-    int wcstr_len = *from_left;
-
-
-    if (!(codeset = wc_codeset(lcd, *wcptr)))
-       return -1;
-
-    if (wcstr_len < buf_len / codeset->length)
-       buf_len = wcstr_len * codeset->length;
-
-#if !defined(__sony_news)  ||  defined(SVR4)
-    wc_encoding = codeset->wc_encoding;
-
-    for ( ; wcstr_len > 0 && buf_len > 0; wcptr++, wcstr_len--) {
-       wch = *wcptr;
-
-       if ((wch & XLC_GENERIC(lcd, wc_encode_mask)) != wc_encoding)
-           break;
-
-       length = codeset->length;
-
-       buf_len -= length;
-       bufptr += length;
-       tmpptr = bufptr - 1;
-
-       while (length--) {
-           *tmpptr-- = kana ? BIT8ON(wch) : BIT8OFF(wch);
-           wch >>= (wchar_t)XLC_GENERIC(lcd, wc_shift_bits);
-       }
-    }
-#else
-    length = codeset->length;
-    for( ; wcstr_len > 0  &&  buf_len > 0; wcptr++, wcstr_len-- ) {
-       wch = *wcptr;
-       if( codeset != wc_codeset( lcd, wch ) )
-           break;
-
-       buf_len -= length;
-       if( length == 2 ) {
-           unsigned short      code;
-
-           code = sjis2jis( wch & 0xffff );
-           *bufptr++ = code >> 8;
-           *bufptr++ = code & 0xff;
-       }
-       else
-           *bufptr++ = wch & 0xff;
-    }
-#endif
-
-    if (num_args > 0)
-       *((XlcCharSet *) args[0]) = *codeset->charset_list;
-
-    *from_left -= wcptr - (wchar_t *) *from;
-    *from = (XPointer) wcptr;
-
-    *to_left -= bufptr - *to;
-    *to = bufptr;
-
-    return 0;
-}
-
-static CodeSet
-GetCodeSetFromCharSet(lcd, charset)
-    XLCd lcd;
-    XlcCharSet charset;
-{
-    register CodeSet *codeset = XLC_GENERIC(lcd, codeset_list);
-    register XlcCharSet *charset_list;
-    register codeset_num, num_charsets;
-
-    codeset_num = XLC_GENERIC(lcd, codeset_num);
-
-    for ( ; codeset_num-- > 0; codeset++) {
-       num_charsets = (*codeset)->num_charsets;
-       charset_list = (*codeset)->charset_list;
-
-       for ( ; num_charsets-- > 0; charset_list++)
-           if (*charset_list == charset)
-               return *codeset;
-    }
-
-    return (CodeSet) NULL;
-}
-
-
-static int
-sjis_cstombs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    char **from;
-    int *from_left;
-    char **to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd) conv->state;
-    register char *csptr = *from;
-    register char *bufptr = *to;
-    int csstr_len = *from_left;
-    register buf_len = *to_left;
-    int length;
-    CodeSet codeset;
-    EncodingType type;
-    int cvt_length = 0;
-    CodeSet *codesets = XLC_GENERIC(lcd, codeset_list); 
-
-
-    if (num_args < 1)
-       return -1;
-    
-    if (!(codeset = GetCodeSetFromCharSet(lcd, (XlcCharSet) args[0])))
-       return -1;
-
-    csstr_len /= codeset->length;
-    buf_len /= codeset->length;
-    if (csstr_len < buf_len)
-       buf_len = csstr_len;
-    
-    cvt_length += buf_len * codeset->length;
-
-    if (bufptr) {
-       while (buf_len--) {
-           length = codeset->length;
-           while (length--)
-               *bufptr++ = codeset->length == 1 && codeset->side == XlcGR ?
-                 BIT8ON(*csptr++) : BIT8OFF(*csptr++);
-
-           if (codeset->length == 2)
-               jis_to_sjis((Uchar *)(bufptr-2), (Uchar *)(bufptr-1));
-       }
-    }
-
-    *from_left -= csptr - *from;
-    *from = csptr;
-
-    if (bufptr)
-       *to += cvt_length;
-    *to_left -= cvt_length;
-
-
-    return 0;
-}
-
-static int
-sjis_cstowcs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd) conv->state;
-    register char *csptr = (char *) *from;
-    wchar_t *bufptr = (wchar_t *) *to;
-    wchar_t *toptr = (wchar_t *) *to;
-    int csstr_len = *from_left;
-    register buf_len = *to_left;
-    wchar_t wch;
-    int length;
-    Ulong wc_shift_bits = (int)XLC_GENERIC(lcd, wc_shift_bits);
-    CodeSet codeset;
-
-
-    if (num_args < 1)
-       return -1;
-
-    if (!(codeset = GetCodeSetFromCharSet(lcd, (XlcCharSet) args[0])))
-       return -1;
-
-    csstr_len /= codeset->length;
-    if (csstr_len < buf_len)
-       buf_len = csstr_len;
-
-    *to_left -= buf_len;
-
-    if (bufptr) {
-
-       toptr += buf_len;
-       *to = (XPointer) toptr;
-
-       while (buf_len--) {
-           wch = (wchar_t) BIT8OFF(*csptr);
-           csptr++;
-
-           length = codeset->length - 1;
-           while (length--) {
-               wch = (wch << wc_shift_bits) | BIT8OFF(*csptr);
-               csptr++;
-           }
-           *bufptr++ = wch | codeset->wc_encoding;
-       }
-    }
-
-    *from_left -= csptr - *from;
-    *from = csptr;
-
-    return 0;
-}
-
-
-/*
- *    Stripped down Direct CT converters for SJIS
- *
- */
-
-#define BADCHAR(min_ch, c)  (BIT8OFF(c) < (char)min_ch && BIT8OFF(c) != 0x0 && \
-                            BIT8OFF(c) != '\t' && BIT8OFF(c) != '\n' && \
-                            BIT8OFF(c) != 0x1b)
-
-typedef struct _CTDataRec {
-    int side;
-    int length;
-    char *name;
-    Ulong wc_encoding;
-    char *ct_encoding;
-    int ct_encoding_len;
-    int set_size;
-    Uchar min_ch;
-    Uchar ct_type;
-} CTDataRec, *CTData;
-
-typedef struct _StateRec {
-    CTData GL_charset;
-    CTData GR_charset;
-    CTData charset;
-} StateRec, *State;
-
-static enum { CT_STD, CT_NSTD, CT_DIR, CT_EXT0, CT_EXT1, CT_EXT2, CT_VER }
-               ct_types;
-
-static CTDataRec ctdata[] =
-{
-    { XlcGL,      1, "ISO8859-1:GL",       0, "\033(B"   ,  3, 0, 0, CT_STD  },
-    { XlcGR,      1, "ISO8859-1:GR",       0, "\033-A"   ,  3, 0, 0, CT_STD  },
-    { XlcGL,      1, "JISX0201.1976-0:GL", 0, "\033(J"   ,  3, 0, 0, CT_STD  },
-    { XlcGR,      1, "JISX0201.1976-0:GR", 0, "\033)I"   ,  3, 0, 0, CT_STD  },
-    { XlcGL,      2, "JISX0208.1983-0:GL", 0, "\033$(B"  ,  4, 0, 0, CT_STD  },
-    { XlcGR,      2, "JISX0208.1983-0:GR", 0, "\033$)B"  ,  4, 0, 0, CT_STD  },
-    { XlcGL,      2, "JISX0212.1990-0:GL", 0, "\033$(D"  ,  4, 0, 0, CT_STD  },
-    { XlcGR,      2, "JISX0212.1990-0:GR", 0, "\033$)D"  ,  4, 0, 0, CT_STD  },
-    { XlcUnknown, 0, "Ignore-Ext-Status?", 0, "\033#"    ,  2, 0, 0, CT_VER  },
-    { XlcUnknown, 0, "NonStd-?-OctetChar", 0, "\033%/0"  ,  4, 0, 0, CT_NSTD },
-    { XlcUnknown, 1, "NonStd-1-OctetChar", 0, "\033%/1"  ,  4, 0, 0, CT_NSTD },
-    { XlcUnknown, 2, "NonStd-2-OctetChar", 0, "\033%/2"  ,  4, 0, 0, CT_NSTD },
-    { XlcUnknown, 3, "NonStd-3-OctetChar", 0, "\033%/3"  ,  4, 0, 0, CT_NSTD },
-    { XlcUnknown, 4, "NonStd-4-OctetChar", 0, "\033%/4"  ,  4, 0, 0, CT_NSTD },
-    { XlcUnknown, 0, "Extension-2"       , 0, "\033%/"   ,  3, 0, 0, CT_EXT2 },
-    { XlcUnknown, 0, "Extension-0"       , 0, "\033"     ,  1, 0, 0, CT_EXT0 },
-    { XlcUnknown, 0, "Begin-L-to-R-Text",  0, "\2331]"   ,  3, 0, 0, CT_DIR  },
-    { XlcUnknown, 0, "Begin-R-to-L-Text",  0, "\2332]"   ,  3, 0, 0, CT_DIR  },
-    { XlcUnknown, 0, "End-Of-String",      0, "\233]"    ,  2, 0, 0, CT_DIR  },
-    { XlcUnknown, 0, "Extension-1"       , 0, "\233"     ,  1, 0, 0, CT_EXT1 },
-};
-
-/* Note on above table:  sjis_ctstombs() and sjis_ctstowcs() parser depends on
- * certain table entries occurring in decreasing string length--
- *   1.  CT_EXT2 and CT_EXT0 entries must occur after CT_NSTD entries.
- *   2.  CT_DIR and CT_EXT1 entries must occur after CT_DIR entries.
- */
-
-static CTData ctdptr[sizeof(ctdata) / sizeof(CTDataRec)];
-static CTData ctd_endp = ctdata + ((sizeof(ctdata) / sizeof(CTDataRec))) - 1;
-static enum { Ascii, Kanji, Kana, Userdef } cs_nums;
-
-
-/*
- * initCTptr(): Set ctptr[] to point at ctdata[], indexed by codeset_num.
- */
-static void
-initCTptr(lcd)
-    XLCd lcd;
-{
-    int num_codesets = XLC_GENERIC(lcd, codeset_num);
-    int num_charsets;
-    int i, j;
-    CodeSet *codesets = XLC_GENERIC(lcd, codeset_list);
-    CodeSet codeset;
-    XlcCharSet charset;
-    CTData ctdp = ctdata;
-
-    ctdptr[Ascii] = &ctdata[0];         /* failsafe */
-
-    for (i = 0; i < num_codesets; i++) {
-
-       codeset = codesets[i];
-       num_charsets = codeset->num_charsets;
-
-       for (j = 0; j < num_charsets; j++) {
-
-           charset = codeset->charset_list[j];
-
-           for (ctdp = ctdata; ctdp <= ctd_endp; ctdp++)
-
-               if (! strcmp(ctdp->name, charset->name)) {
-
-                   ctdptr[codeset->cs_num] = ctdp;
-
-                   ctdptr[codeset->cs_num]->wc_encoding = codeset->wc_encoding;
-
-                   ctdptr[codeset->cs_num]->set_size =
-                     charset->set_size;
-
-                   ctdptr[codeset->cs_num]->min_ch =
-                     charset->set_size == 94 &&
-                     (ctdptr[codeset->cs_num]->length > 1 ||
-                     ctdptr[codeset->cs_num]->side == XlcGR) ? 0x21 : 0x20;
-
-                   break;
-               }
-       }
-    }
-}
-
-
-static int
-sjis_mbstocts(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register ct_len = *to_left;
-    int cs_num;
-    int clen;
-    int unconv_num = 0;
-    int num_conv;
-    XPointer inbufptr = *from;
-    register char *ctptr = *to;
-    XPointer ct_base = ctptr;
-
-    StateRec ct_state;
-    CTData charset;
-    XLCd lcd = (XLCd) conv->state;
-    int codeset_num = XLC_GENERIC(lcd, codeset_num);
-
-
-/* Initial State: */
-
-    ct_state.GL_charset = ctdptr[Ascii];
-    ct_state.GR_charset = NULL;
-
-
-    if (*from_left > *to_left)
-        *from_left = *to_left;
-
-    for (;*from_left > 0; (*from_left) -= charset->length) {
-
-       if (iskanji(*inbufptr)) {
-           if (KANJI_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           cs_num = Kanji;
-           charset = ctdptr[Kanji];
-           if (!VALID_MULTIBYTE((Uchar) *(inbufptr+1)))
-               unconv_num++;
-       }
-       else if (isuserdef(*inbufptr)) {
-           if (USERDEF_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           cs_num = Userdef;
-           charset = ctdptr[Userdef];
-           if (!VALID_MULTIBYTE((Uchar) *(inbufptr+1)))
-               unconv_num++;
-       }
-       else if (isascii(*inbufptr)) {
-           if (ASCII_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           cs_num = Ascii;
-           charset = ctdptr[Ascii];
-       }
-       else if (iskana(*inbufptr)) {
-           if (KANA_CODESET >= codeset_num) {
-               unconv_num++;
-               (*from_left)--;
-               continue;
-           }
-           cs_num = Kana;
-           charset = ctdptr[Kana];
-       }
-       else {           /* unknown */
-           unconv_num++;
-           (*from_left)--;
-           continue;
-       }
-
-       if ( (charset->side == XlcGR && charset != ct_state.GR_charset) ||
-            (charset->side == XlcGL && charset != ct_state.GL_charset) ) {
-
-           ct_len -= ctdptr[cs_num]->ct_encoding_len;
-           if (ct_len < 0) {
-               unconv_num++;
-               break;
-           }
-       
-           if (ctptr) {
-               strcpy(ctptr, ctdptr[cs_num]->ct_encoding);
-               ctptr += ctdptr[cs_num]->ct_encoding_len;
-           }
-       }
-
-       clen = charset->length;
-       do {
-           *ctptr++ = *inbufptr++;
-       } while (--clen); 
-
-       if (charset->length >= 2) {
-           sjis_to_jis((Uchar *)(ctptr-2), (Uchar *)(ctptr-1));
-           if (BADCHAR(charset->min_ch, *(ctptr-2)) ||
-                 BADCHAR(charset->min_ch, *(ctptr-1))) {
-               unconv_num++;
-               continue;
-           }
-       }
-       else
-           if (BADCHAR(charset->min_ch, *(ctptr-1))) {
-               unconv_num++;
-               continue;
-           }
-
-       if (charset->side == XlcGR)
-           ct_state.GR_charset = charset;
-       else if (charset->side == XlcGL)
-           ct_state.GL_charset = charset;
-    }
-
-    *to = (XPointer)ctptr;
-
-    if ((num_conv = (int)(ctptr - ct_base)) > 0)
-       (*to_left) -= num_conv;
-
-    return unconv_num;
-
-}
-
-
-#define byte1          (length == codeset->length - 1)
-#define byte2          (byte1 == 0)
-
-static int
-sjis_wcstocts(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register ct_len = *to_left;
-    register wchar_t *inbufptr = (wchar_t *) *from;
-    register char *ctptr = *to;
-    XPointer ct_base = ctptr;
-    wchar_t  wch;
-    register length;
-    Uchar tmp;
-    Uchar t1 = 0, t2;
-    int num_conv;
-
-    StateRec ct_state;
-    XLCd lcd = (XLCd)conv->state;
-    CTData charset;
-    CodeSet codeset;
-    int unconv_num = 0;
-    Ulong wc_encoding_mask = XLC_GENERIC(lcd, wc_encode_mask);
-    Ulong wc_shift = XLC_GENERIC(lcd, wc_shift_bits);
-
-
-/* Initial State: */
-    ct_state.GL_charset = ctdptr[0]; /* Codeset 0 */
-    ct_state.GR_charset = NULL;
-
-    if (*from_left > *to_left)
-       *from_left = *to_left;
-
-    for (; *from_left > 0 ; (*from_left)-- ) {
-
-       wch = *inbufptr++;
-
-        if (!(codeset = wc_codeset(lcd, wch))) {
-            unconv_num++;
-            (*from_left)--;
-            continue;
-        }
-
-       charset = ctdptr[codeset->cs_num];
-
-       length = codeset->length;
-       wch ^= (wchar_t)codeset->wc_encoding;
-
-       if ( (charset->side == XlcGR && charset != ct_state.GR_charset) ||
-            (charset->side == XlcGL && charset != ct_state.GL_charset) ) {
-
-           ct_len -= ctdptr[codeset->cs_num]->ct_encoding_len;
-           if (ct_len < 0) {
-               unconv_num++;
-               break;
-           }
-
-           if (ctptr) {
-               strcpy(ctptr, ctdptr[codeset->cs_num]->ct_encoding);
-               ctptr += ctdptr[codeset->cs_num]->ct_encoding_len;
-           }
-
-       }
-
-       if (charset->side == XlcGR)
-           ct_state.GR_charset = charset;
-       else if (charset->side == XlcGL)
-           ct_state.GL_charset = charset;
-
-       do {
-           length--;
-           tmp = wch>>(wchar_t)( (Ulong)length * wc_shift);
-
-           if (kana) {
-               if (BADCHAR(charset->min_ch, (char)tmp)) {
-                   unconv_num++;
-                   break;
-               }
-               *ctptr++ = (char)BIT8ON(tmp);
-           }
-
-           else if (byte1 && (kanji || userdef)) {
-               t1 = tmp;
-           }
-
-           else if (byte2 && (kanji || userdef)) {
-               if (BADCHAR(charset->min_ch, (char)t1) ||
-                 BADCHAR(charset->min_ch, (char)tmp)) {
-                   unconv_num++;
-                   break;
-               }
-
-               *ctptr++ = (char)BIT8OFF(t1);
-               *ctptr++ = (char)BIT8OFF(tmp);
-           }
-
-           else {
-               if (BADCHAR(charset->min_ch, (char)tmp)) {
-                   unconv_num++;
-                   break;
-               }
-               *ctptr++ = (char)tmp;
-           }
-       } while (length); 
-
-    }  /* end for */
-
-    *to = (XPointer)ctptr;
-
-    if ((num_conv = (int)(ctptr - ct_base)) > 0)
-       (*to_left) -= num_conv;
-
-    return unconv_num;
-}
-#undef byte1
-#undef byte2
-
-#define SKIP_I(str)    while (*(str) >= 0x20 && *(str) <=  0x2f) (str)++;
-#define SKIP_P(str)    while (*(str) >= 0x30 && *(str) <=  0x3f) (str)++;
-
-static int
-sjis_ctstombs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    register XPointer inbufptr =  *from;
-    register XPointer outbufptr =  *to;
-    XPointer inbuf_base;
-    XPointer outbuf_base = outbufptr;
-    register clen, length;
-    int unconv_num = 0;
-    int num_conv;
-    unsigned int ct_seglen = 0;
-    Uchar ct_type;
-    CTData ctdp = ctdata;      /* default */
-
-
-    if (*from_left > *to_left)
-       *from_left = *to_left;
-
-    for (length = ctdata[Ascii].length; *from_left > 0 ; (*from_left) -= length)
-    {
-       ct_type = CT_STD;
-       if (*inbufptr == '\033' || *inbufptr == (char)'\233') {
-
-           for (ctdp = ctdata; ctdp <= ctd_endp ; ctdp++) {
-
-               if(!strncmp(inbufptr, ctdp->ct_encoding, ctdp->ct_encoding_len))
-               {
-                   inbufptr += ctdp->ct_encoding_len;
-                   (*from_left) -= ctdp->ct_encoding_len;
-                   if( ctdp->length ) {
-                       length = ctdp->length;
-                       if( *from_left < length ) {
-                           *to = (XPointer)outbufptr;
-                           *to_left -= outbufptr - outbuf_base;
-                           return( unconv_num + *from_left );
-                       }
-                   }
-                   ct_type = ctdp->ct_type;
-                   break;
-               }
-           }
-           if (ctdp > ctd_endp)        /* failed to match CT sequence */
-               unconv_num++;
-       }
-
-/* The following code insures that non-standard encodings, direction, extension,
- * and version strings are ignored; subject to change in future.
- */
-       switch (ct_type) {
-         case CT_STD:
-           break;
-         case CT_EXT2:
-           inbufptr++;
-           (*from_left)--;
-         case CT_NSTD:
-           ct_seglen = (BIT8OFF(*inbufptr) << 7) + BIT8OFF(*(inbufptr+1)) + 2;
-           inbufptr += ct_seglen;
-           (*from_left) -= ct_seglen;
-           continue;
-         case CT_EXT0:
-           inbuf_base = inbufptr;
-           SKIP_I(inbufptr);
-           inbufptr++;
-           ct_seglen = (unsigned)(inbufptr - inbuf_base);
-           (*from_left) -= ct_seglen;
-           continue;
-         case CT_EXT1:
-           inbuf_base = inbufptr;
-           SKIP_P(inbufptr);
-           SKIP_I(inbufptr);
-           inbufptr++;
-           ct_seglen = (unsigned)(inbufptr - inbuf_base);
-           (*from_left) -= ct_seglen;
-           continue;
-         case CT_DIR:
-           continue;
-         case CT_VER:
-           inbufptr += 2;
-           (*from_left) -= 2;
-           continue;
-       }
-
-       clen = length;
-       do {
-           *outbufptr++ = *inbufptr++;
-       } while (--clen);
-
-       if (length >= 2)
-           jis_to_sjis((Uchar *)(outbufptr-2), (Uchar *)(outbufptr-1));
-    }
-
-    *to = (XPointer)outbufptr;
-
-    if ((num_conv = (int)(outbufptr - outbuf_base)) > 0)
-       (*to_left) -= num_conv;
-
-    return unconv_num;
-}
-
-
-static int
-sjis_ctstowcs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    XPointer *from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XLCd lcd = (XLCd)conv->state;
-    Ulong wc_shift_bits = XLC_GENERIC(lcd, wc_shift_bits);
-    register XPointer inbufptr = *from;
-    XPointer inbuf_base;
-    register wchar_t *outbufptr = (wchar_t *) *to;
-    wchar_t *outbuf_base = outbufptr;
-    register clen, length;
-    int num_conv;
-    int unconv_num = 0;
-    unsigned int ct_seglen = 0;
-    Uchar ct_type = 0;
-    register shift_mult;
-    wchar_t wc_tmp;
-    wchar_t wch;
-    Ulong wc_encoding;
-    CTData ctdp = ctdata;
-
-
-    if (*from_left > *to_left)
-       *from_left = *to_left;
-  
-    for (length = ctdata[Ascii].length; *from_left > 0; (*from_left) -= length )
-    {
-       ct_type = CT_STD;
-       if (*inbufptr == '\033' || *inbufptr == (char)'\233') {
-           for (ctdp = ctdata; ctdp <= ctd_endp ; ctdp++) {
-
-               if(!strncmp(inbufptr, ctdp->ct_encoding, ctdp->ct_encoding_len))
-               {
-                   inbufptr += ctdp->ct_encoding_len;
-                   (*from_left) -= ctdp->ct_encoding_len;
-                   if( ctdp->length ) {
-                       length = ctdp->length;
-                       if( *from_left < length ) {
-                           *to = (XPointer)outbufptr;
-                           *to_left -= outbufptr - outbuf_base;
-                           return( unconv_num + *from_left );
-                       }
-                   }
-                   ct_type = ctdp->ct_type;
-                   break;
-               }
-           }
-           if (ctdp > ctd_endp)        /* failed to match CT sequence */
-               unconv_num++;
-       }
-
-/* The following block of code insures that non-standard encodings, direction,
- * extension, and version strings are ignored; subject to change in future.
- */
-       switch (ct_type) {
-         case CT_STD:
-           break;
-         case CT_EXT2:
-           inbufptr++;
-           (*from_left)--;
-         case CT_NSTD:
-           ct_seglen = (BIT8OFF(*inbufptr) << 7) + BIT8OFF(*(inbufptr+1)) + 2;
-           inbufptr += ct_seglen;
-           (*from_left) -= ct_seglen;
-           continue;
-         case CT_EXT0:
-           inbuf_base = inbufptr;
-           SKIP_I(inbufptr);
-           inbufptr++;
-           ct_seglen = (unsigned)(inbufptr - inbuf_base);
-           (*from_left) -= ct_seglen;
-           continue;
-         case CT_EXT1:
-           inbuf_base = inbufptr;
-           SKIP_P(inbufptr);
-           SKIP_I(inbufptr);
-           inbufptr++;
-           ct_seglen = (unsigned)(inbufptr - inbuf_base);
-           (*from_left) -= ct_seglen;
-           continue;
-         case CT_DIR:
-           continue;
-         case CT_VER:
-           inbufptr += 2;
-           (*from_left) -= 2;
-           continue;
-       }
-#if !defined(__sony_news)  ||  defined(SVR4)
-       wc_encoding = (ctdp == ctdptr[Kana] && isleftside(*inbufptr)) ?
-           ctdptr[Ascii]->wc_encoding : ctdp->wc_encoding;
-
-       shift_mult = length - 1;
-       wch = (wchar_t)0;
-       clen = length;
-
-       do {
-           wc_tmp = BIT8OFF(*inbufptr++) << (wc_shift_bits * shift_mult);
-           wch |= wc_tmp;
-           shift_mult--;
-       } while (--clen);
-       *outbufptr++ = wch | wc_encoding;
-#else
-       if( length == 1 )
-           *outbufptr++ = (unsigned char)*inbufptr++;
-       else if( length == 2 ) {
-           unsigned short      code;
-           code = (*inbufptr << 8) | *(inbufptr+1);
-           *outbufptr++ = jis2sjis( code );
-           inbufptr += 2;
-       }
-#endif
-    }
-    *to = (XPointer)outbufptr;
-
-    if ((num_conv = (int)(outbufptr - outbuf_base)) > 0)
-       (*to_left) -= num_conv ;
-
-    return unconv_num;
-
-}
-#undef BADCHAR
-
-static void
-close_converter(conv)
-    XlcConv conv;
-{
-       Xfree((char *) conv);
-}
-
-
-static XlcConv
-create_conv(lcd, methods)
-    XLCd lcd;
-    XlcConvMethods methods;
-{
-    XlcConv conv;
-
-    conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
-    if (conv == NULL)
-       return (XlcConv) NULL;
-    
-    conv->methods = methods;
-    conv->state = (XPointer) lcd;
-    return conv;
-}
-
-
-enum { MBSTOCS, WCSTOCS, MBTOCS, CSTOMBS, CSTOWCS, MBSTOWCS, WCSTOMBS,
-       WCSTOCTS, MBSTOCTS, CTSTOMBS, CTSTOWCS };
-
-static XlcConvMethodsRec conv_methods[] = {
-    {close_converter, sjis_mbstocs,  NULL },
-    {close_converter, sjis_wcstocs,  NULL },
-    {close_converter, sjis_mbtocs,   NULL },
-    {close_converter, sjis_cstombs,  NULL },
-    {close_converter, sjis_cstowcs,  NULL },
-    {close_converter, sjis_mbstowcs, NULL },
-    {close_converter, sjis_wcstombs, NULL },
-    {close_converter, sjis_wcstocts, NULL },
-    {close_converter, sjis_mbstocts, NULL },
-    {close_converter, sjis_ctstombs, NULL },
-    {close_converter, sjis_ctstowcs, NULL },
-};
-
-
-static XlcConv
-open_mbstocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[MBSTOCS]);
-}
-
-static XlcConv
-open_wcstocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[WCSTOCS]);
-}
-
-static XlcConv
-open_mbtocs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[MBTOCS]);
-}
-
-static XlcConv
-open_cstombs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[CSTOMBS]);
-}
-
-static XlcConv
-open_cstowcs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[CSTOWCS]);
-}
-
-static XlcConv
-open_mbstowcs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[MBSTOWCS]);
-}
-
-static XlcConv
-open_wcstombs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[WCSTOMBS]);
-}
-
-static XlcConv
-open_wcstocts(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[WCSTOCTS]);
-}
-
-static XlcConv
-open_mbstocts(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[MBSTOCTS]);
-}
-
-static XlcConv
-open_ctstombs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[CTSTOMBS]);
-}
-
-static XlcConv
-open_ctstowcs(from_lcd, from_type, to_lcd, to_type)
-    XLCd from_lcd;
-    char *from_type;
-    XLCd to_lcd;
-    char *to_type;
-{
-    return create_conv(from_lcd, &conv_methods[CTSTOWCS]);
-}
-
-XLCd
-_fallcSjisLoader(name)
-    char *name;
-{
-    XLCd lcd;
-    CodeSet *codeset_list;
-
-    lcd = _fallcCreateLC(name, _fallcGenericMethods);
-    if (lcd == NULL)
-       return lcd;
-
-    if ((_fallcCompareISOLatin1(XLC_PUBLIC_PART(lcd)->codeset, "sjis"))) {
-       _fallcDestroyLC(lcd);
-       return (XLCd) NULL;
-    }
-
-    initCTptr(lcd);
-
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet, open_mbstocs);
-    _fallcSetConverter(lcd, XlcNWideChar, lcd, XlcNCharSet, open_wcstocs);
-    _fallcSetConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte, open_cstombs);
-    _fallcSetConverter(lcd, XlcNCharSet, lcd, XlcNWideChar, open_cstowcs);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNChar, open_mbtocs);
-
-#ifndef FORCE_INDIRECT_CONVERTER
-    _fallcSetConverter(lcd, XlcNCompoundText, lcd, XlcNMultiByte, open_ctstombs);
-    _fallcSetConverter(lcd, XlcNCompoundText, lcd, XlcNWideChar, open_ctstowcs);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCompoundText, open_mbstocts);
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar, open_mbstowcs);
-    _fallcSetConverter(lcd, XlcNWideChar, lcd, XlcNCompoundText, open_wcstocts);
-    _fallcSetConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte, open_wcstombs);
-#endif
-
-
-    return lcd;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcStd.c b/cde/programs/dtudcfonted/libfal/_fallcStd.c
deleted file mode 100644 (file)
index af50f9a..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcStd.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:41       */ 
-/* $XConsortium: _fallcStd.c /main/1 1996/04/08 15:19:02 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#include "_fallibint.h"
-#include "_fallcPubI.h"
-
-int
-_fallcmbtowc(lcd, wstr, str, len)
-    XLCd lcd;
-    wchar_t *wstr;
-    char *str;
-    int len;
-{
-    static XLCd last_lcd = NULL;
-    static XlcConv conv = NULL;
-    XPointer from, to;
-    int from_left, to_left;
-    wchar_t tmp_wc;
-
-    if (lcd == NULL) {
-       lcd = _fallcCurrentLC();
-       if (lcd == NULL)
-           return -1;
-    }
-    if (str == NULL)
-       return XLC_PUBLIC(lcd, is_state_depend);
-
-    if (conv && lcd != last_lcd) {
-       _fallcCloseConverter(conv);
-       conv = NULL;
-    }
-
-    last_lcd = lcd;
-
-    if (conv == NULL) {
-       conv = _fallcOpenConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar);
-       if (conv == NULL)
-           return -1;
-    }
-
-    from = (XPointer) str;
-    from_left = len;
-    to = (XPointer) (wstr ? wstr : &tmp_wc);
-    to_left = 1;
-
-    if (_fallcConvert(conv, &from, &from_left, &to, &to_left, NULL, 0) < 0)
-       return -1;
-
-    return (len - from_left);
-}
-
-int
-_fallcwctomb(lcd, str, wc)
-    XLCd lcd;
-    char *str;
-    wchar_t wc;
-{
-    static XLCd last_lcd = NULL;
-    static XlcConv conv = NULL;
-    XPointer from, to;
-    int from_left, to_left, length;
-
-    if (lcd == NULL) {
-       lcd = _fallcCurrentLC();
-       if (lcd == NULL)
-           return -1;
-    }
-    if (str == NULL)
-       return XLC_PUBLIC(lcd, is_state_depend);
-
-    if (conv && lcd != last_lcd) {
-       _fallcCloseConverter(conv);
-       conv = NULL;
-    }
-
-    last_lcd = lcd;
-
-    if (conv == NULL) {
-       conv = _fallcOpenConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte);
-       if (conv == NULL)
-           return -1;
-    }
-
-    from = (XPointer) &wc;
-    from_left = 1;
-    to = (XPointer) str;
-    length = to_left = XLC_PUBLIC(lcd, mb_cur_max);
-
-    if (_fallcConvert(conv, &from, &from_left, &to, &to_left, NULL, 0) < 0)
-       return -1;
-
-    return (length - to_left);
-}
-
-int
-_fallcmbstowcs(lcd, wstr, str, len)
-    XLCd lcd;
-    wchar_t *wstr;
-    char *str;
-    int len;
-{
-    XlcConv conv;
-    XPointer from, to;
-    int from_left, to_left, ret;
-
-    if (lcd == NULL) {
-       lcd = _fallcCurrentLC();
-       if (lcd == NULL)
-           return -1;
-    }
-    
-    conv = _fallcOpenConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar);
-    if (conv == NULL)
-       return -1;
-
-    from = (XPointer) str;
-    from_left = strlen(str);
-    to = (XPointer) wstr;
-    to_left = len;
-
-    if (_fallcConvert(conv, &from, &from_left, &to, &to_left, NULL, 0) < 0)
-       ret = -1;
-    else {
-       ret = len - to_left;
-       if (wstr && to_left > 0)
-           wstr[ret] = (wchar_t) 0;
-    }
-
-    _fallcCloseConverter(conv);
-
-    return ret;
-}
-
-int
-_fallcwcstombs(lcd, str, wstr, len)
-    XLCd lcd;
-    char *str;
-    wchar_t *wstr;
-    int len;
-{
-    XlcConv conv;
-    XPointer from, to;
-    int from_left, to_left, ret;
-
-    if (lcd == NULL) {
-       lcd = _fallcCurrentLC();
-       if (lcd == NULL)
-           return -1;
-    }
-
-    conv = _fallcOpenConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte);
-    if (conv == NULL)
-       return -1;
-
-    from = (XPointer) wstr;
-    from_left = _falwcslen(wstr);
-    to = (XPointer) str;
-    to_left = len;
-
-    if (_fallcConvert(conv, &from, &from_left, &to, &to_left, NULL, 0) < 0)
-       ret = -1;
-    else {
-       ret = len - to_left;
-       if (str && to_left > 0)
-           str[ret] = '\0';
-    }
-
-    _fallcCloseConverter(conv);
-
-    return ret;
-}
-
-
-int
-_falmbtowc(wstr, str, len)
-    wchar_t *wstr;
-    char *str;
-    int len;
-{
-    return _fallcmbtowc((XLCd) NULL, wstr, str, len);
-}
-
-int
-_falmblen(str, len)
-    char *str;
-    int len;
-{
-    return _falmbtowc((wchar_t *) NULL, str, len);
-}
-
-int
-_falwctomb(str, wc)
-    char *str;
-    wchar_t wc;
-{
-    return _fallcwctomb((XLCd) NULL, str, wc);
-}
-
-int
-_falmbstowcs(wstr, str, len)
-    wchar_t *wstr;
-    char *str;
-    int len;
-{
-    return _fallcmbstowcs((XLCd) NULL, wstr, str, len);
-}
-
-int
-_falwcstombs(str, wstr, len)
-    char *str;
-    wchar_t *wstr;
-    int len;
-{
-    return _fallcwcstombs((XLCd) NULL, str, wstr, len);
-}
-
-wchar_t *
-_falwcscpy(wstr1, wstr2)
-    register wchar_t *wstr1, *wstr2;
-{
-    wchar_t *wstr_tmp = wstr1;
-
-    while (*wstr1++ = *wstr2++)
-       ;
-
-    return wstr_tmp;
-}
-
-wchar_t *
-_falwcsncpy(wstr1, wstr2, len)
-    register wchar_t *wstr1, *wstr2;
-    register len;
-{
-    wchar_t *wstr_tmp = wstr1;
-
-    while (len-- > 0)
-       if (!(*wstr1++ = *wstr2++))
-           break;
-
-    while (len-- > 0)
-       *wstr1++ = (wchar_t) 0;
-
-    return wstr_tmp;
-}
-
-int
-_falwcslen(wstr)
-    register wchar_t *wstr;
-{
-    register wchar_t *wstr_ptr = wstr;
-
-    while (*wstr_ptr)
-       wstr_ptr++;
-    
-    return wstr_ptr - wstr;
-}
-
-int
-_falwcscmp(wstr1, wstr2)
-    register wchar_t *wstr1, *wstr2;
-{
-    for ( ; *wstr1 && *wstr2; wstr1++, wstr2++)
-       if (*wstr1 != *wstr2)
-           break;
-
-    return *wstr1 - *wstr2;
-}
-
-int
-_falwcsncmp(wstr1, wstr2, len)
-    register wchar_t *wstr1, *wstr2;
-    register len;
-{
-    for ( ; *wstr1 && *wstr2 && len > 0; wstr1++, wstr2++, len--)
-       if (*wstr1 != *wstr2)
-           break;
-
-    if (len <= 0)
-       return 0;
-
-    return *wstr1 - *wstr2;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcTxtPr.c b/cde/programs/dtudcfonted/libfal/_fallcTxtPr.c
deleted file mode 100644 (file)
index b6e93ab..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcTxtPr.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:41     */ 
-/* $XConsortium: _fallcTxtPr.c /main/1 1996/04/08 15:19:12 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#include "_fallibint.h"
-#include "_fallcPubI.h"
-#include "_falutil.h"
-#include <X11/Xatom.h>
-#include <stdio.h>
-
-static int
-get_buf_size(is_wide_char, list, count)
-    Bool is_wide_char;
-    XPointer list;
-    int count;
-{
-    register length = 0;
-    register char **mb_list;
-    register wchar_t **wc_list;
-
-    if (list == NULL)
-       return 0;
-
-    if (is_wide_char) {
-       wc_list = (wchar_t **) list;
-       for ( ; count-- > 0; wc_list++) {
-           if (*wc_list)
-               length += _falwcslen(*wc_list) + 1;
-       }
-       length *= 5;    /* XXX */
-    } else {
-       mb_list = (char **) list;
-       for ( ; count-- > 0; mb_list++) {
-           if (*mb_list)
-               length += strlen(*mb_list) + 1;
-       }
-       length *= 3;    /* XXX */
-    }
-    length = (length / BUFSIZ + 1) * BUFSIZ;   /* XXX */
-
-    return length;
-}
-
-static int
-_XTextListToTextProperty(lcd, dpy, from_type, list, count, style, text_prop)
-    XLCd lcd;
-    Display *dpy;
-    char *from_type;
-    XPointer list;
-    int count;
-    XICCEncodingStyle style;
-    XTextProperty *text_prop;
-{
-    Atom encoding;
-    XlcConv conv;
-    char *to_type;
-    char **mb_list;
-    wchar_t **wc_list;
-    XPointer from;
-    char *to, *buf, *value;
-    int from_left, to_left, buf_len, nitems, unconv_num, ret, i;
-    Bool is_wide_char = False;
-
-    if (strcmp(XlcNWideChar, from_type) == 0)
-       is_wide_char = True;
-
-    buf_len = get_buf_size(is_wide_char, list, count);
-    if ((buf = (char *) Xmalloc(buf_len)) == NULL)
-       return XNoMemory;
-    
-    switch (style) {
-       case XStringStyle:
-       case XStdICCTextStyle:
-           encoding = XA_STRING;
-           to_type = XlcNString;
-           break;
-       case XCompoundTextStyle:
-           encoding = falInternAtom(dpy, "COMPOUND_TEXT", False);
-           to_type = XlcNCompoundText;
-           break;
-       case XTextStyle:
-           encoding = falInternAtom(dpy, XLC_PUBLIC(lcd, encoding_name), False);
-           to_type = XlcNMultiByte;
-           if (is_wide_char == False) {
-               nitems = 0;
-               mb_list = (char **) list;
-               to = buf;
-               for (i = 0; i < count; i++) {
-                   strcpy(to, *mb_list);
-                   from_left = strlen(*mb_list) + 1;
-                   nitems += from_left;
-                   to += from_left;
-                   mb_list++;
-               }
-               unconv_num = 0;
-               goto done;
-           }
-           break;
-       default:
-           Xfree(buf);
-           return XConverterNotFound;
-    }
-
-    if (count < 1) {
-       nitems = 0;
-       goto done;
-    }
-
-retry:
-    conv = _fallcOpenConverter(lcd, from_type, lcd, to_type);
-    if (conv == NULL) {
-       Xfree(buf);
-       return XConverterNotFound;
-    }
-
-    if (is_wide_char)
-       wc_list = (wchar_t **) list;
-    else
-       mb_list = (char **) list;
-
-    to = buf;
-    to_left = buf_len;
-
-    unconv_num = 0;
-
-    for (i = 1; to_left > 0; i++) {
-       if (is_wide_char) {
-           from = (XPointer) *wc_list;
-           from_left = _falwcslen(*wc_list);
-           wc_list++;
-       } else {
-           from = (XPointer) *mb_list;
-           from_left = strlen(*mb_list);
-           mb_list++;
-       }
-
-       ret = _fallcConvert(conv, &from, &from_left, (XPointer *) &to, &to_left,
-                         NULL, 0);
-
-       if (ret < 0)
-           continue;
-
-       if (ret > 0 && style == XStdICCTextStyle && encoding == XA_STRING) {
-           _fallcCloseConverter(conv);
-           encoding = falInternAtom(dpy, "COMPOUND_TEXT", False);
-           to_type = XlcNCompoundText;
-           goto retry;
-       }
-
-       unconv_num += ret;
-       *to++ = '\0';
-       to_left--;
-
-       if (i >= count)
-           break;
-
-       _fallcResetConverter(conv);
-    }
-
-    _fallcCloseConverter(conv);
-
-    nitems = to - buf;
-done:
-    if (nitems <= 0)
-       nitems = 1;
-    value = (char *) Xmalloc(nitems);
-    if (value == NULL) {
-       Xfree(buf);
-       return XNoMemory;
-    }
-    if (nitems == 1)
-       *value = 0;
-    else
-       memcpy(value, buf, nitems);
-    nitems--;
-    Xfree(buf);
-
-    text_prop->value = (unsigned char *) value;
-    text_prop->encoding = encoding;
-    text_prop->format = 8;
-    text_prop->nitems = nitems;
-
-    return unconv_num;
-}
-
-int
-_falmbTextListToTextProperty(lcd, dpy, list, count, style, text_prop)
-    XLCd lcd;
-    Display *dpy;
-    char **list;
-    int count;
-    XICCEncodingStyle style;
-    XTextProperty *text_prop;
-{
-    return _XTextListToTextProperty(lcd, dpy, XlcNMultiByte, (XPointer) list,
-                                   count, style, text_prop);
-}
-
-int
-_falwcTextListToTextProperty(lcd, dpy, list, count, style, text_prop)
-    XLCd lcd;
-    Display *dpy;
-    wchar_t **list;
-    int count;
-    XICCEncodingStyle style;
-    XTextProperty *text_prop;
-{
-    return _XTextListToTextProperty(lcd, dpy, XlcNWideChar, (XPointer) list,
-                                   count, style, text_prop);
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcUTF.c b/cde/programs/dtudcfonted/libfal/_fallcUTF.c
deleted file mode 100644 (file)
index f14a4e6..0000000
+++ /dev/null
@@ -1,1566 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcUTF.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:41       */ 
-/* $XConsortium: _fallcUTF.c /main/2 1996/09/27 19:03:38 drk $ */
-/******************************************************************
-
-              Copyright 1993 by SunSoft, Inc.
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and
-that both that copyright notice and this permission notice appear
-in supporting documentation, and that the name of SunSoft, Inc.
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-SunSoft, Inc. makes no representations about the suitability of
-this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-SunSoft Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL SunSoft, Inc. BE LIABLE FOR ANY SPECIAL, INDIRECT
-OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
-OR PERFORMANCE OF THIS SOFTWARE.
-
-  Author: Hiromu Inukai (inukai@Japan.Sun.COM) SunSoft, inc.
-
-******************************************************************/
-#include "_fallcUTF.h"
-
-static long    getutfrune();
-static void our_wctomb(
-#if NeedFunctionPrototypes
-                      unsigned short r, 
-                      char **bufptr, 
-                      int *buf_len
-#endif
-);
-static int our_mbtowc(
-#if NeedFunctionPrototypes   
-                     unsigned long *p, 
-                     char *s, 
-                     size_t n
-#endif
-);
-static void    latin2rune(
-#if NeedFunctionPrototypes
-                          unsigned char c, 
-                          Rune *r
-#endif
-);
-static void    jis02012rune(
-#if NeedFunctionPrototypes
-                            unsigned char c, 
-                            Rune *r
-#endif
-);
-static void    jis02082rune(
-#if NeedFunctionPrototypes
-                            unsigned char c, 
-                            Rune *r
-#endif
-);
-static void    ksc2rune(
-#if NeedFunctionPrototypes
-                        unsigned char c, 
-                        Rune *r
-#endif
-);
-static void    gb2rune(
-#if NeedFunctionPrototypes
-                       unsigned char c, 
-                       Rune *r
-#endif
-);
-static void    init_latin1tab();
-static void    init_latin2tab();
-static void    init_latin3tab();
-static void    init_latin4tab();
-static void    init_latin5tab();
-static void    init_latin6tab();
-static void    init_latin7tab();
-static void    init_latin8tab();
-static void    init_latin9tab();
-static void    init_jis0201tab();
-static void    init_jis0208tab();
-static void    init_ksc5601tab();
-static void    init_gb2312tab();
-
-
-static char    *int_locale = NULL;
-static long    *tabkuten = NULL;
-static long    *tabksc5601 = NULL;
-static long    *tabgb = NULL;
-
-static UtfData utfdata_list = (UtfData)NULL;
-
-static XlcUTFDataRec default_utf_data[] = 
-{
-    {"ISO8859-1", XlcGL, init_latin1tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGR, init_latin1tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGL, init_latin2tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGR, init_latin2tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGL, init_latin3tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGR, init_latin3tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGL, init_latin4tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGR, init_latin4tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGL, init_latin5tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGR, init_latin5tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGL, init_latin6tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGR, init_latin6tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGL, init_latin7tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGR, init_latin7tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGL, init_latin8tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGR, init_latin8tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGL, init_latin9tab, latin2rune, N11n_none, 0x20},
-    {"ISO8859-1", XlcGR, init_latin9tab, latin2rune, N11n_none, 0x20},
-    {"JISX0201.1976-0", XlcGL, init_jis0201tab, jis02012rune, N11n_none, 0x20},
-    {"JISX0201.1976-0", XlcGR, init_jis0201tab, jis02012rune, N11n_none, 0x20},
-    {"JISX0208.1983-0", XlcGL, init_jis0208tab, jis02082rune, N11n_ja, 0x2222},
-    {"JISX0208.1983-0", XlcGR, init_jis0208tab, jis02082rune, N11n_ja, 0x2222},
-    {"KSC5601.1987-0", XlcGL, init_ksc5601tab, ksc2rune, N11n_ko, 0x2160},
-    {"KSC5601.1987-0", XlcGR, init_ksc5601tab, ksc2rune, N11n_ko, 0x2160},
-    {"GB2312.1980-0", XlcGL, init_gb2312tab, gb2rune, N11n_zh, 0x2175},
-    {"GB2312.1980-0", XlcGR, init_gb2312tab, gb2rune, N11n_zh, 0x2175},
-};
-
-
-static void
-set_latin_nop(table, default_val)
-long   *table;
-long   default_val;
-{
-    register int i;
-    for(i = 0; i < 0x1fff; i++)
-       table[i] = default_val;
-    return;
-}
-
-static void
-set_latin_tab(fptr, table, fb_default)
-FILE   *fptr;
-long   *table;
-long   fb_default;
-{
-    int                i = 0;
-    int                j = 0;
-    int                rv = 0;
-    long       value;
-
-    for(i = 0; i < NRUNE; i++)
-       table[i] = -1;
-    while((rv = fscanf(fptr, "%lx", (long unsigned *) &value)) != EOF) {
-       if(rv != 0 && value >= 0) {
-           table[value] = j++;
-       } else {
-           set_latin_nop(table, fb_default);
-           return;
-       }
-    }
-}
-
-extern int _fallcResolveI18NPath();
-#define TBL_DATA_DIR   "tbl_data"
-
-static void
-init_latin1tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp = NULL;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, tab8859_1);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_latin_tab(fp, tbl, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_latin_nop(tbl, fb_default);
-    }
-}
-
-static void
-init_latin2tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, tab8859_2);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_latin_tab(fp, tbl, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_latin_nop(tbl, fb_default);
-    }
-}
-
-static void
-init_latin3tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, tab8859_3);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_latin_tab(fp, tbl, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_latin_nop(tbl, fb_default);
-    }
-}
-
-static void
-init_latin4tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, tab8859_4);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_latin_tab(fp, tbl, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_latin_nop(tbl, fb_default);
-    }
-}
-
-static void
-init_latin5tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, tab8859_5);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_latin_tab(fp, tbl, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_latin_nop(tbl, fb_default);
-    }
-}
-
-static void
-init_latin6tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, tab8859_6);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_latin_tab(fp, tbl, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_latin_nop(tbl, fb_default);
-    }
-}
-
-static void
-init_latin7tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, tab8859_7);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_latin_tab(fp, tbl, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_latin_nop(tbl, fb_default);
-    }
-}
-
-static void
-init_latin8tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, tab8859_8);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_latin_tab(fp, tbl, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_latin_nop(tbl, fb_default);
-    }
-}
-
-static void
-init_latin9tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, tab8859_9);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_latin_tab(fp, tbl, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_latin_nop(tbl, fb_default);
-    }
-}
-
-static void
-init_jis0201tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-       int i;
-       for(i = 0; i < NRUNE; i++)
-           tbl[i] = -1;
-}
-
-static void
-set_cjk_nop(to_tbl, to_max, default_val)
-long   **to_tbl;
-long   default_val;
-int    to_max;
-{
-    register int i;
-    for(i = 0; i < to_max; i++)
-       (*to_tbl)[i] = default_val;
-    return;
-}
-
-static void
-set_table(fptr, to_tbl, from_tbl, to_max, fb_default)
-FILE   *fptr;
-long   **to_tbl, *from_tbl;
-int    to_max;
-long   fb_default;
-{
-    register int       i = 0;
-    int                j = 0;
-    int                rv = 0;
-    long       value;
-
-    for(i = 0; i < NRUNE; i++)
-       from_tbl[i] = -1;
-    while((rv = fscanf(fptr, "%lx", (long unsigned *) &value)) != EOF) {
-       if(rv != 0) {
-           (*to_tbl)[j++] = value;
-       } else {
-           set_cjk_nop(to_tbl, to_max, fb_default);
-           break;
-       }
-    }
-    for(i = 0; i < to_max; i++) {
-       if((value = (*to_tbl)[i]) != -1){
-           from_tbl[abs(value)] = i;
-       }
-    }
-}
-
-
-       
-static void
-init_jis0208tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    if((tabkuten = (long *)Xmalloc(KUTENMAX * sizeof(long))) == NULL) {
-       return;
-    }
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, jis0208);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_table(fp, &tabkuten, tbl, KUTENMAX, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_cjk_nop(&tabkuten, KUTENMAX, fb_default);
-    }
-}
-
-static void
-init_ksc5601tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    if((tabksc5601 = (long *)Xmalloc(KSCMAX * sizeof(long))) == NULL) {
-       return;
-    }
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, ksc5601);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_table(fp, &tabksc5601, tbl, KSCMAX, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_cjk_nop(&tabksc5601, KSCMAX, fb_default);
-    }
-}
-
-static void
-init_gb2312tab(tbl, fb_default)
-long   *tbl;
-long   fb_default;
-{
-    FILE       *fp;
-    char       dirname[BUFSIZE];
-    char       filename[BUFSIZE];
-    char       *p, *q;
-
-    if((tabgb = (long *)Xmalloc(GBMAX * sizeof(long))) == NULL) {
-       return;
-    }
-    _fallcResolveI18NPath(dirname);
-    p = dirname;
-    while(p) {
-       q = strchr(p, ':');
-       if(q) {
-           *q = '\0';
-       }
-       sprintf(filename, "%s/%s/%s", p, TBL_DATA_DIR, gb2312);
-       fp = fopen(filename, "r");
-       if(fp) {
-           set_table(fp, &tabgb, tbl, GBMAX, fb_default);
-           fclose(fp);
-           return;
-       }
-       if(q) {
-           p = q + 1;
-       } else {
-           p = q;
-       }
-    }
-    if(!fp) {
-       set_cjk_nop(&tabgb, GBMAX, fb_default);
-    }
-}
-
-static UtfData
-make_entry()
-{
-    UtfData tmp = (UtfData)Xmalloc(sizeof(UtfDataRec));
-    bzero(tmp, sizeof(UtfDataRec));
-    return tmp;
-}
-
-static int     once = 0;
-static int
-_XlcInitUTFInfo(lcd)
-XLCd   lcd;
-{
-    if(!once) {
-       int     i;
-       CodeSet *codeset_list = XLC_GENERIC(lcd, codeset_list);
-       int     codeset_num = XLC_GENERIC(lcd, codeset_num);
-       UtfData pdata;
-
-       if(!utfdata_list) {
-           utfdata_list = make_entry();
-       }
-       pdata = utfdata_list;
-       for(i=0; i < codeset_num; i++) {
-           XlcCharSet  charset = *codeset_list[i]->charset_list;
-           while(pdata->next) {
-               if(charset == pdata->charset) {
-                   break;
-               }
-               pdata = pdata->next;
-           }
-           if(pdata->next) {
-               continue;
-           } else {
-               int j;
-               for(j = 0; j < MAX_UTF_CHARSET; j++) {
-                   if(_fallcCompareISOLatin1(charset->encoding_name, default_utf_data[j].name) ||
-                      charset->side != default_utf_data[j].side) {
-                       continue;
-                   } else {
-                       pdata->initialize = default_utf_data[j].initialize;
-                       pdata->fromtbl = (long *)Xmalloc(NRUNE * sizeof(long));
-                       (*pdata->initialize)(pdata->fromtbl, default_utf_data[j].fallback_value);
-                       pdata->already_init = True;
-                       pdata->charset = charset;
-                       pdata->cstorune = default_utf_data[j].cstorune;
-                       pdata->type = default_utf_data[j].type;
-                       pdata->next = make_entry();
-                       break;
-                   }
-               }
-           }
-       }
-       once = 1;
-    }
-    return 1;
-}
-
-static int
-utftocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv    conv;
-    char       **from;
-    int                *from_left;
-    char       **to;
-    int                *to_left;
-    XPointer   *args;
-    int                num_args;
-{
-    char       *utfptr;
-    char       *bufptr;
-    int                utf_len, buf_len;
-    long       l;
-    XlcCharSet tmpcharset = (XlcCharSet)NULL;
-    UtfData    pdata = utfdata_list;
-
-    if (from == NULL || *from == NULL)
-       return 0;
-
-    utfptr = *from;
-    bufptr = *to;
-    utf_len = *from_left;
-    buf_len = *to_left;
-
-    while(utf_len > 0 && buf_len > 0) {
-       char *p = utfptr;
-       if((l = getutfrune(&p, &utf_len)) == -2) {
-           return -1;
-       } else {
-           while(pdata->next) {
-               long    r;
-               long    *tbl;
-
-               tbl = pdata->fromtbl;
-               tbl += l;
-               if((r = *tbl) == -1) {
-                   if(tmpcharset) {
-                           goto end;
-                   } else {
-                       pdata = pdata->next;
-                       continue;
-                   }
-               } else {
-                   utfptr = p;
-                   if(!tmpcharset) tmpcharset = pdata->charset;
-               }
-               if(r < 128) {
-                   *bufptr++ = r;
-                   buf_len--;
-               } else {
-                   switch(pdata->type) {
-                       case N11n_ja:
-                           *bufptr++ = (r/100 + ' ');
-                           *bufptr++ = (r%100 + ' ');
-                           break;
-                       case N11n_ko:
-                           *bufptr++ = (r/94 + 0x21);
-                           *bufptr++ = (r%94 + 0x21);
-                           break;
-                       case N11n_zh:
-                           *bufptr++ = 0x20 + (r/100);
-                           *bufptr++ = 0x20 + (r%100);
-                           break;
-                       default:
-                           break;
-                   }
-                   buf_len -= 2;
-               }
-               break;
-           }
-           if(!tmpcharset) return (-1); /* Unknown Codepoint */
-       }
-    }
-end:
-    if((num_args > 0) && tmpcharset)
-       *((XlcCharSet *) args[0]) = tmpcharset;
-
-    *from_left -= utfptr - *from;
-    *from = utfptr;
-
-    *to_left -= bufptr - *to;
-    *to = bufptr;
-
-    return 0;
-}
-
-static int
-utf1tocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv    conv;
-    char       **from;
-    int                *from_left;
-    char       **to;
-    int                *to_left;
-    XPointer   *args;
-    int                num_args;
-{
-    char       **ptr = NULL;
-    char       char_ptr[UTFmax];
-    int                i = 0;
-    unsigned long      dummy = (unsigned long)0;
-
-    if (from == NULL || *from == NULL)
-       return utftocs(conv, from, from_left, to, to_left, args, num_args);
-
-    ptr = from;
-    for(i = 0; i < UTFmax; char_ptr[i++] = *(*ptr)++);
-    i=0;
-    while(our_mbtowc(&dummy, (char*)&char_ptr[0], i) <= 0)
-       i++;
-    utftocs(conv, from, &i, to, to_left, args, num_args);
-}
-
-static int
-ucstocs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv    conv;
-    XPointer   *from;
-    int                *from_left;
-    char       **to;
-    int                *to_left;
-    XPointer   *args;
-    int                num_args;
-{
-    wchar_t    *ucsptr;
-    char       *bufptr;
-    int                ucs_len, buf_len;
-    XlcCharSet tmpcharset = (XlcCharSet)NULL;
-    UtfData    pdata = utfdata_list;
-
-    if (from == NULL || *from == NULL)
-       return 0;
-
-    ucsptr = (wchar_t *)*from;
-    bufptr = *to;
-    ucs_len = *from_left;
-    buf_len = *to_left;
-
-    while(ucs_len > 0 && buf_len > 0) {
-           while(pdata->next) {
-               long    r;
-               long    *tbl;
-
-               tbl = pdata->fromtbl;
-               tbl += *ucsptr;
-               if((r = *tbl) == -1) {
-                   if(tmpcharset) {
-                           goto end;
-                   } else {
-                       pdata = pdata->next;
-                       continue;
-                   }
-               } else {
-                   if(!tmpcharset) tmpcharset = pdata->charset;
-               }
-               ucsptr++;
-               if(r < 128) {
-                   *bufptr++ = r;
-                   ucs_len--;
-                   buf_len--;
-               } else {
-                   switch(pdata->type) {
-                       case N11n_ja:
-                           *bufptr++ = (r/100 + ' ');
-                           *bufptr++ = (r%100 + ' ');
-                           break;
-                       case N11n_ko:
-                           *bufptr++ = (r/94 + 0x21);
-                           *bufptr++ = (r%94 + 0x21);
-                           break;
-                       case N11n_zh:
-                           *bufptr++ = 0x20 + (r/100);
-                           *bufptr++ = 0x20 + (r%100);
-                           break;
-                       default:
-                           break;
-                   }
-                   ucs_len--;
-                   buf_len -= 2;
-               }
-               break;
-           }
-           if(!tmpcharset) return (-1); /* Unknown Codepoint */
-    }
-end:
-    if((num_args > 0) && tmpcharset)
-       *((XlcCharSet *) args[0]) = tmpcharset;
-
-    *from_left -= ucsptr - (wchar_t *)*from;
-    *from = (XPointer)ucsptr;
-
-    *to_left -= bufptr - *to;
-    *to = bufptr;
-
-    return 0;
-}
-
-static long
-#if NeedFunctionPrototypes
-getutfrune(char **read_from, int *from_len)
-#else
-getutfrune(read_from, from_len)
-char **read_from;
-int *from_len;
-#endif
-{
-       int c, i;
-       char str[UTFmax]; /* MB_LEN_MAX really */
-       unsigned long l;
-       int n;
-
-       str[0] = '\0';
-       for(i = 0; i <= UTFmax;) {
-               c = **read_from;
-               (*read_from)++;
-               str[i++] = c;
-               n = our_mbtowc(&l, str, i);
-               if(n == -1)
-                       return(-2);
-               if(n > 0) {
-                       *from_len -= n;
-                       return(l);
-               }
-       }
-       return(-2);
-}
-
-static
-cstoutf(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    char **from;
-    int *from_left;
-    char **to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XlcCharSet charset;
-    char *csptr, *utfptr;
-    int csstr_len, utf_len;
-    int               cmp_len = 0;
-    void       (*putrune)(
-#if NeedFunctionPrototypes
-                            unsigned char c,
-                            Rune *r
-#endif
-                          ) = NULL;
-    Rune       r = (Rune)0;
-    UtfData    pdata = utfdata_list;
-
-    if (from == NULL || *from == NULL)
-       return 0;
-    
-    if (num_args < 1)
-        return -1;
-
-    csptr = *from;
-    utfptr = *to;
-    csstr_len = *from_left;
-    utf_len = *to_left;
-
-    charset = (XlcCharSet)args[0];
-    cmp_len = strchr(charset->name, ':') - charset->name;
-    while(pdata->next) {
-        if(!_fallcNCompareISOLatin1(charset->name, pdata->charset->name, cmp_len)) {
-           putrune = pdata->cstorune;
-           break;
-       } else {
-           pdata = pdata->next;
-       }
-    }
-    if(!putrune)
-       return -1;
-
-    while(csstr_len-- > 0 && utf_len > 0) {
-       (*putrune)(*csptr++, &r);
-       if(!r) {
-           continue;
-       }
-       our_wctomb(r, &utfptr, &utf_len);
-       r = 0;
-    }
-    *from_left -= csptr - *from;
-    *from = csptr;
-    *to_left -= utfptr - *to;
-    *to = utfptr;
-    return 0;
-}
-
-static
-cstoucs(conv, from, from_left, to, to_left, args, num_args)
-    XlcConv conv;
-    char **from;
-    int *from_left;
-    XPointer *to;
-    int *to_left;
-    XPointer *args;
-    int num_args;
-{
-    XlcCharSet charset;
-    char *csptr;
-    wchar_t *ucsptr;
-    int csstr_len, ucs_len;
-    int               cmp_len = 0;
-    void       (*putrune)(
-#if NeedFunctionPrototypes
-                            unsigned char c,
-                            Rune *r
-#endif
-                          ) = NULL;
-    Rune       r = (Rune)0;
-    UtfData    pdata = utfdata_list;
-
-    if (from == NULL || *from == NULL)
-       return 0;
-    
-    if (num_args < 1)
-        return -1;
-
-    csptr = *from;
-    ucsptr = (wchar_t *)*to;
-    csstr_len = *from_left;
-    ucs_len = *to_left;
-    charset = (XlcCharSet)args[0];
-    cmp_len = strchr(charset->name, ':') - charset->name;
-
-    while(pdata->next) {
-        if(!_fallcNCompareISOLatin1(charset->name, pdata->charset->name, cmp_len)) {
-           putrune = pdata->cstorune;
-           break;
-       } else {
-           pdata = pdata->next;
-       }
-    }
-    if(!putrune)
-       return -1;
-
-    while(csstr_len-- > 0 && ucs_len > 0) {
-       (*putrune)(*csptr++, &r);
-       if(!r) {
-           continue;
-       }
-       *ucsptr = (long)r;
-       ucsptr++;
-       ucs_len--;
-       r = 0;
-    }
-    *from_left -= csptr - *from;
-    *from = csptr;
-    *to_left -= ucsptr - (wchar_t *)*to;
-    *to = (XPointer)ucsptr;
-    return 0;
-}
-
-static void
-#if NeedFunctionPrototypes
-our_wctomb(Rune r, char **utfptr, int *utf_len)
-#else
-our_wctomb(r, utfptr, utf_len)
-Rune r;
-char **utfptr;
-int *utf_len;
-#endif
-{
-       long l = (long)r;
-
-        if(!utfptr || !*utfptr)
-                return;               /* no shift states */
-        if(l & ~Wchar2) {
-                if(l & ~Wchar4) {
-                        if(l & ~Wchar5) {
-                                /* 6 bytes */
-                                *(*utfptr)++ = T6 | ((l >> 5*Bitx) & Mask6);
-                                *(*utfptr)++ = Tx | ((l >> 4*Bitx) & Maskx);
-                                *(*utfptr)++  = Tx | ((l >> 3*Bitx) & Maskx);
-                                *(*utfptr)++  = Tx | ((l >> 2*Bitx) & Maskx);
-                                *(*utfptr)++  = Tx | ((l >> 1*Bitx) & Maskx);
-                                *(*utfptr)++  = Tx |  (l & Maskx);
-                                *utf_len -= 6;
-                                return;
-                        }
-                        /* 5 bytes */
-                         *(*utfptr)++ = T5 |  (l >> 4*Bitx);
-                         *(*utfptr)++ = Tx | ((l >> 3*Bitx) & Maskx);
-                         *(*utfptr)++ = Tx | ((l >> 2*Bitx) & Maskx);
-                         *(*utfptr)++ = Tx | ((l >> 1*Bitx) & Maskx);
-                         *(*utfptr)++ = Tx |  (l & Maskx);
-                         *utf_len -= 5;
-                         return;
-                }
-                if(l & ~Wchar3) {
-                        /* 4 bytes */
-                         *(*utfptr)++ = T4 |  (l >> 3*Bitx);
-                         *(*utfptr)++ = Tx | ((l >> 2*Bitx) & Maskx);
-                         *(*utfptr)++ = Tx | ((l >> 1*Bitx) & Maskx);
-                         *(*utfptr)++ = Tx |  (l & Maskx);
-                         *utf_len -= 4;
-                         return;
-                }
-                /* 3 bytes */
-                 *(*utfptr)++ = T3 |  (l >> 2*Bitx);
-                 *(*utfptr)++ = Tx | ((l >> 1*Bitx) & Maskx);
-                 *(*utfptr)++ = Tx |  (l & Maskx);
-                 *utf_len -= 3;
-                 return;
-        }
-        if(l & ~Wchar1) {
-                /* 2 bytes */
-                 *(*utfptr)++ = T2 | (l >> 1*Bitx);
-                 *(*utfptr)++ = Tx | (l & Maskx);
-                 *utf_len -= 2;
-                 return;
-        }
-        /* 1 byte */
-         *(*utfptr)++ = T1 | l;
-         *utf_len -= 1;
-         return;
-}
-
-static void
-#if NeedFunctionPrototypes
-latin2rune(unsigned char c, Rune *r)
-#else
-latin2rune(c, r)
-unsigned char c;
-Rune *r;
-#endif
-{
-       *r = (Rune)c;
-       return;
-}
-
-static void
-#if NeedFunctionPrototypes
-ksc2rune(unsigned char c, Rune *r)
-#else
-ksc2rune(c, r)
-unsigned char c;
-Rune *r;
-#endif
-{
-        static enum { init, cs1last} state = init;
-        static int korean646 = 1; /* fixed to 1 for now. */
-        static int lastc;
-       unsigned char   ch = (c|0x80); /* XXX */
-        int n;
-        long l;
-
-        switch(state)
-        {
-        case init:
-                if (ch < 128){
-                        if(korean646 && (ch=='\\')){
-                                emit(0x20A9);
-                        } else {
-                                emit(ch);
-                        }
-                }else{
-                        lastc = ch;
-                        state = cs1last;
-                }
-                return;
-        
-        case cs1last: /* 2nd byte of codeset 1 (KSC 5601) */
-                n = ((lastc&0x7f)-33)*94 + (ch&0x7f)-33;
-                if((l = tabksc5601[n]) == 0){
-                   emit(BADMAP);
-                } else {
-                        emit(l);
-                }
-                state = init;
-                return;
-        }
-}
-
-static void
-#if NeedFunctionPrototypes
-jis02012rune(unsigned char c, Rune *r)
-#else
-jis02012rune(c, r)
-unsigned char c;
-Rune *r;
-#endif
-{
-/* To Be Implemented */
-}
-
-static void
-#if NeedFunctionPrototypes
-gb2rune(unsigned char c, Rune *r)
-#else
-gb2rune(c, r)
-unsigned char c;
-Rune *r;
-#endif
-{
-        static enum { state0, state1 } state = state0;
-        static int lastc;
-        long n, ch;
-       unsigned char   ch1 = (c|0x80); /* XXX */
-
-again:
-        switch(state)
-        {
-        case state0:    /* idle state */
-                if(ch1 >= 0xA1){
-                        lastc = ch1;
-                        state = state1;
-                        return;
-                }
-                emit(ch1);
-                return;
-
-        case state1:    /* seen a font spec */
-                if(ch1 >= 0xA1)
-                        n = (lastc-0xA0)*100 + (ch1-0xA0);
-                else {
-                        emit(BADMAP);
-                        state = state0;
-                        return;
-                }
-                ch = tabgb[n];
-                if(ch < 0){
-                        emit(BADMAP);
-                } else
-                        emit(ch);
-                state = state0;
-        }
-}
-
-static void
-#if NeedFunctionPrototypes
-jis02082rune(unsigned char c, Rune *r)
-#else
-jis02082rune(c, r)
-unsigned char c;
-Rune *r;
-#endif
-{
-        static enum { state0, state1} state = state0;
-        static int lastc;
-       unsigned char   ch = (c|0x80); /* XXX */
-        int n;
-        long l;
-
-again:
-        switch(state)
-        {
-        case state0:    /* idle state */
-                lastc = ch;
-               state = state1;
-               return;
-
-        case state1:    /* two part char */
-                if((lastc&0x80) != (ch&0x80)){
-                        emit(lastc);
-                        state = state0;
-                        goto again;
-                }
-                if(CANS2J(lastc, ch)){
-                        int h = lastc, l = ch;
-                        S2J(h, l);
-                        n = h*100 + l - 3232;
-                } else
-                        n = (lastc&0x7F)*100 + (ch&0x7f) - 3232; /* kuten */
-                if((l = tabkuten[n]) == -1){
-                       emit(BADMAP);
-                } else {          
-                        if(l < 0){
-                                l = -l;
-                        }
-                        emit(l);
-                }        
-                state = state0;
-        }
-}
-
-static int
-#if NeedFunctionPrototypes
-our_mbtowc(unsigned long *p, char *s, size_t n)
-#else
-our_mbtowc(p, s, n)
-unsigned long *p;
-char *s;
-size_t n;
-#endif
-{
-       unsigned char *us;
-       int c0, c1, c2, c3, c4, c5;
-       unsigned long wc;
-
-       if(s == 0)
-               return 0;               /* no shift states */
-
-       if(n < 1)
-               goto badlen;
-       us = (unsigned char*)s;
-       c0 = us[0];
-       if(c0 >= T3) {
-               if(n < 3)
-                       goto badlen;
-               c1 = us[1] ^ Tx;
-               c2 = us[2] ^ Tx;
-               if((c1|c2) & T2) {
-                       goto bad;
-               }
-               if(c0 >= T5) {
-                       if(n < 5)
-                               goto badlen;
-                       c3 = us[3] ^ Tx;
-                       c4 = us[4] ^ Tx;
-                       if((c3|c4) & T2) {
-                               goto bad;
-                       }
-                       if(c0 >= T6) {
-                               /* 6 bytes */
-                               if(n < 6)
-                                       goto badlen;
-                               c5 = us[5] ^ Tx;
-                               if(c5 & T2) {
-                                       goto bad;
-                               }
-                               wc = ((((((((((c0 & Mask6) << Bitx) |
-                                       c1) << Bitx) | c2) << Bitx) |
-                                       c3) << Bitx) | c4) << Bitx) | c5;
-                               if(wc <= Wchar5) {
-                                       goto bad;
-                               }
-                               *p = wc;
-                               return 6;
-                       }
-                       /* 5 bytes */
-                       wc = ((((((((c0 & Mask5) << Bitx) |
-                               c1) << Bitx) | c2) << Bitx) |
-                               c3) << Bitx) | c4;
-                       if(wc <= Wchar4) {
-                               goto bad;
-                       }
-                       *p = wc;
-                       return 5;
-               }
-               if(c0 >= T4) {
-                       /* 4 bytes */
-                       if(n < 4)
-                               goto badlen;
-                       c3 = us[3] ^ Tx;
-                       if(c3 & T2) {
-                               goto bad;
-                       }
-                       wc = ((((((c0 & Mask4) << Bitx) |
-                               c1) << Bitx) | c2) << Bitx) |
-                               c3;
-                       if(wc <= Wchar3) {
-                               goto bad;
-                       }
-                       *p = wc;
-                       return 4;
-               }
-               /* 3 bytes */
-               wc = ((((c0 & Mask3) << Bitx) |
-                       c1) << Bitx) | c2;
-               if(wc <= Wchar2) {
-                       goto bad;
-               }
-               *p = wc;
-               return 3;
-       }
-       if(c0 >= T2) {
-               /* 2 bytes */
-               if(n < 2)
-                       goto badlen;
-               c1 = us[1] ^ Tx;
-               if(c1 & T2) {
-                       goto bad;
-               }
-               wc = ((c0 & Mask2) << Bitx) |
-                       c1;
-               if(wc <= Wchar1) {
-                       goto bad;
-               }
-               *p = wc;
-               return 2;
-       }
-       /* 1 byte */
-       if(c0 >= Tx) {
-               goto bad;
-       }
-       *p = c0;
-       return 1;
-
-bad:
-       errno = EILSEQ;
-       return -1;
-badlen:
-       return -2;
-}
-
-static void
-close_converter(conv)
-    XlcConv conv;
-{
-    Xfree((char *) conv);
-}
-
-static XlcConv
-create_conv(lcd, methods)
-    XLCd       lcd;
-    XlcConvMethods     methods;
-{
-    XlcConv conv;
-
-    conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
-    if (conv == (XlcConv) NULL)
-       return (XlcConv) NULL;
-
-    conv->methods = methods;
-
-    conv->state = NULL;
-    _XlcInitUTFInfo(lcd);
-
-    return conv;
-
-err:
-    close_converter(conv);
-
-    return (XlcConv) NULL;
-}
-
-static XlcConvMethodsRec mbtocs_methods = {
-    close_converter,
-    utf1tocs,
-    NULL
-};
-
-static XlcConv
-open_mbtocs(from_lcd, from, to_lcd, to)
-    XLCd from_lcd;
-    char *from;
-    XLCd to_lcd;
-    char *to;
-{
-    return create_conv(from_lcd, &mbtocs_methods);
-}
-
-static XlcConvMethodsRec mbstocs_methods = {
-    close_converter,
-    utftocs,
-    NULL
-};
-
-static XlcConv
-open_mbstocs(from_lcd, from, to_lcd, to)
-    XLCd from_lcd;
-    char *from;
-    XLCd to_lcd;
-    char *to;
-{
-    return create_conv(from_lcd, &mbstocs_methods);
-}
-
-static XlcConvMethodsRec wcstocs_methods = {
-    close_converter,
-    ucstocs,
-    NULL
-};
-
-static XlcConv
-open_wcstocs(from_lcd, from, to_lcd, to)
-    XLCd from_lcd;
-    char *from;
-    XLCd to_lcd;
-    char *to;
-{
-    return create_conv(from_lcd, &wcstocs_methods);
-}
-
-static XlcConvMethodsRec cstombs_methods = {
-    close_converter,
-    cstoutf,
-    NULL
-};
-
-static XlcConv
-open_cstombs(from_lcd, from, to_lcd, to)
-    XLCd from_lcd;
-    char *from;
-    XLCd to_lcd;
-    char *to;
-{
-    return create_conv(from_lcd, &cstombs_methods);
-}
-
-static XlcConvMethodsRec cstowcs_methods = {
-    close_converter,
-    cstoucs,
-    NULL
-};
-
-static XlcConv
-open_cstowcs(from_lcd, from, to_lcd, to)
-    XLCd from_lcd;
-    char *from;
-    XLCd to_lcd;
-    char *to;
-{
-    return create_conv(from_lcd, &cstowcs_methods);
-}
-
-
-XLCd
-_fallcUtfLoader(name)
-    char *name;
-{
-    XLCd lcd;
-
-    lcd = _fallcCreateLC(name, _fallcGenericMethods);
-    if (lcd == (XLCd) NULL)
-       return lcd;
-    
-    if ((_fallcCompareISOLatin1(XLC_PUBLIC_PART(lcd)->codeset, "utf"))) {
-       _fallcDestroyLC(lcd);
-       return (XLCd) NULL;
-    }
-
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet, open_mbstocs);
-    _fallcSetConverter(lcd, XlcNWideChar, lcd, XlcNCharSet, open_wcstocs);
-
-    _fallcSetConverter(lcd, XlcNMultiByte, lcd, XlcNChar, open_mbtocs);
-
-    _fallcSetConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte, open_cstombs);
-    _fallcSetConverter(lcd, XlcNCharSet, lcd, XlcNWideChar, open_cstowcs);
-
-    return lcd;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcUTF.h b/cde/programs/dtudcfonted/libfal/_fallcUTF.h
deleted file mode 100644 (file)
index fcac14b..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* XlcUTF.h 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:06      */ 
-/* $XConsortium: _fallcUTF.h /main/1 1996/04/08 15:19:33 cde-fuj $ */
-/******************************************************************
-
-              Copyright 1993 by SunSoft, Inc.
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and
-that both that copyright notice and this permission notice appear
-in supporting documentation, and that the name of SunSoft, Inc.
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-SunSoft, Inc. makes no representations about the suitability of
-this software for any purpose.  It is provided "as is" without
-express or implied warranty.
-
-SunSoft Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL SunSoft, Inc. BE LIABLE FOR ANY SPECIAL, INDIRECT
-OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
-OR PERFORMANCE OF THIS SOFTWARE.
-
-  Author: Hiromu Inukai (inukai@Japan.Sun.COM) SunSoft, inc.
-
-******************************************************************/
-#include "_fallibint.h"
-#include "_fallcGeneric.h"
-#include <X11/Xos.h>
-#include <stdio.h>
-
-typedef unsigned short Rune;           /* 16 bits */
-#define                Runeerror       0x80    /* decoding error in UTF */
-#define                Runeself        0x80    /* rune and UTF sequences are the same (<) */
-#define                UTFmax          3       /* maximum bytes per rune */
-
-#define                BADMAP  (0xFFFD)
-#define                ESC     033
-#define                NRUNE   65536
-#define                NLATIN  0x6ff
-#define                LATINMAX 256
-#define                KUTENMAX 8407
-#define                KSCMAX  8743
-#define                GBMAX   8795
-#define                tab8859_1       "tab8859_1"
-#define                tab8859_2       "tab8859_2"
-#define                tab8859_3       "tab8859_3"
-#define                tab8859_4       "tab8859_4"
-#define                tab8859_5       "tab8859_5"
-#define                tab8859_6       "tab8859_6"
-#define                tab8859_7       "tab8859_7"
-#define                tab8859_8       "tab8859_8"
-#define                tab8859_9       "tab8859_9"
-#define                jis0208         "jis0208"
-#define                ksc5601         "ksc5601"
-#define                gb2312          "gb2312"
-
-#define emit(x)    *r = (Rune)x;
-
-typedef enum {
-       N11n_none,              /* No need to normalize (1byte) */
-       N11n_ja,                /* Normalize for ja */
-       N11n_ko,                /* Normalize for ko */
-       N11n_zh                 /* Normalize for zh */
-} NormalizeType;
-
-typedef struct  _UtfDataRec {
-       XlcCharSet              charset;
-       void                    (*initialize)( /* Table Initializer */
-#if NeedNestedPrototypes
-                                             long *tbl,
-                                             long fallback
-#endif
-                                               );
-       long                    *fromtbl;       /* UTF -> CharSet */
-       NormalizeType           type;           /* Normalize type */
-       void                    (*cstorune)(   /* CharSet -> UTF */
-#if NeedNestedPrototypes
-                                           unsigned char c,
-                                           Rune *r
-#endif
-                                           );
-       Bool                    already_init;
-        struct _UtfDataRec     *next;          /* next entry     */
-} UtfDataRec, *UtfData;
-
-typedef struct _XlcUTFDataRec {
-    char       *name;
-    XlcSide    side;
-    void       (*initialize)();
-    void       (*cstorune)(
-#if NeedNestedPrototypes
-                           unsigned char c,
-                           Rune *r
-#endif
-                           );
-    NormalizeType      type;
-    long               fallback_value;
-} XlcUTFDataRec, *XlcUTFData;
-
-typedef struct _StateRec {
-    XlcCharSet charset;
-    XlcCharSet GL_charset;
-    XlcCharSet GR_charset;
-} StateRec, *State;
-
-#define MAX_UTF_CHARSET        (sizeof(default_utf_data)/sizeof(XlcUTFDataRec))
-
-#define Char1 Runeself
-#define Rune1 Runeself
-#define Char21 0xA1
-#define Rune21 0x0100
-#define Char22 0xF6
-#define Rune22 0x4016
-#define Char3 0xFC
-#define Rune3 0x10000  /* really 0x38E2E */
-#define Esc 0xBE
-#define Bad Runeerror
-
-#define T1     0x00
-#define        Tx      0x80
-#define T2     0xC0
-#define T3     0xE0
-#define T4     0xF0
-#define T5     0xF8
-#define T6     0xFC
-
-#define Bit1   7
-#define Bitx   6
-#define Bit2   5
-#define Bit3   4
-#define Bit4   3
-#define Bit5   2
-#define Bit6   2
-
-#define Mask1  (1<<Bit1)-1
-#define Maskx  (1<<Bitx)-1
-#define Mask2  (1<<Bit2)-1
-#define Mask3  (1<<Bit3)-1
-#define Mask4  (1<<Bit4)-1
-#define Mask5  (1<<Bit5)-1
-#define Mask6  (1<<Bit6)-1
-
-#define Wchar1 (1<<Bit1)-1
-#define Wchar2 (1<<(Bit2+Bitx))-1
-#define Wchar3 (1<<(Bit3+2*Bitx))-1
-#define Wchar4 (1<<(Bit4+3*Bitx))-1
-#define Wchar5 (1<<(Bit5+4*Bitx))-1
-
-#ifndef        EILSEQ
-#define EILSEQ  123
-#endif
-
-#define J2S(_h, _l) { \
-        /* lower: 21-7e >> 40-9d,9e-fb >> 40-7e,(skip 7f),80-fc */ \
-        if (((_l) += (((_h)-- % 2) ? 0x1f : 0x7d)) > 0x7e) (_l)++; \
-        /* upper: 21-7e >> 81-af >> 81-9f,(skip a0-df),e0-ef */ \
-        if (((_h) = ((_h) / 2 + 0x71)) > 0x9f) (_h) += 0x40; \
-}
-#define S2J(_h, _l) { \
-        /* lower: 40-7e,80-fc >> 21-5f,61-dd >> 21-7e,7f-dc */ \
-        if (((_l) -= 0x1f) > 0x60) (_l)--; \
-        /* upper: 81-9f,e0-ef >> 00-1e,5f-6e >> 00-2e >> 21-7d */ \
-        if (((_h) -= 0x81) > 0x5e) (_h) -= 0x40; (_h) *= 2, (_h) += 0x21; \
-        /* upper: ,21-7d >> ,22-7e ; lower: ,7f-dc >> ,21-7e */ \
-        if ((_l) > 0x7e) (_h)++, (_l) -= 0x5e; \
-}
-#define ISJKANA(_b)     (0xa0 <= (_b) && (_b) < 0xe0)
-#define CANS2JH(_h)     ((0x81 <= (_h) && (_h) < 0xf0) && !ISJKANA(_h))
-#define CANS2JL(_l)     (0x40 <= (_l) && (_l) < 0xfd && (_l) != 0x7f)
-#define CANS2J(_h, _l)  (CANS2JH(_h) && CANS2JL(_l))
-
diff --git a/cde/programs/dtudcfonted/libfal/_fallcUtil.c b/cde/programs/dtudcfonted/libfal/_fallcUtil.c
deleted file mode 100644 (file)
index 908c9a9..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcUtil.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:42      */ 
-/* $XConsortium: _fallcUtil.c /main/1 1996/04/08 15:19:43 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <X11/Xos.h>
-#include "_fallibint.h"
-
-#ifdef X_NOT_STDC_ENV
-#ifndef toupper
-#define toupper(c)      ((int)(c) - 'a' + 'A')
-#endif
-#endif
-
-int 
-_fallcCompareISOLatin1(str1, str2)
-    char *str1, *str2;
-{
-    register char ch1, ch2;
-
-    for ( ; (ch1 = *str1) && (ch2 = *str2); str1++, str2++) {
-        if (islower(ch1))
-            ch1 = toupper(ch1);
-        if (islower(ch2))
-            ch2 = toupper(ch2);
-
-        if (ch1 != ch2)
-            break;
-    }
-
-    return *str1 - *str2;
-}
-
-int 
-_fallcNCompareISOLatin1(str1, str2, len)
-    char *str1, *str2;
-    int len;
-{
-    register char ch1, ch2;
-
-    for ( ; (ch1 = *str1) && (ch2 = *str2) && len; str1++, str2++, len--) {
-        if (islower(ch1))
-            ch1 = toupper(ch1);
-        if (islower(ch2))
-            ch2 = toupper(ch2);
-
-        if (ch1 != ch2)
-            break;
-    }
-
-    if (len == 0)
-        return 0;
-
-    return *str1 - *str2;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcWrap.c b/cde/programs/dtudcfonted/libfal/_fallcWrap.c
deleted file mode 100644 (file)
index 7309a7b..0000000
+++ /dev/null
@@ -1,637 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* lcWrap.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:42      */ 
-/* $XConsortium: _fallcWrap.c /main/1 1996/04/08 15:19:54 cde-fuj $ */
-/*
-
-Copyright (c) 1991  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-/*
- * Copyright 1991 by the Open Software Foundation
- * Copyright 1993 by the TOSHIBA Corp.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the names of Open Software Foundation and TOSHIBA
- * not be used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.  Open Software
- * Foundation and TOSHIBA make no representations about the suitability of this
- * software for any purpose.  It is provided "as is" without express or
- * implied warranty.
- *
- * OPEN SOFTWARE FOUNDATION AND TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO
- * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN OR TOSHIBA BE
- * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- * 
- *              M. Collins             OSF  
- *
- *              Katsuhisa Yano         TOSHIBA Corp.
- */                            
-
-#include <stdint.h>
-#include "_fallibint.h"
-#include "_fallcint.h"
-#if defined(__linux__)
-#include <locale.h>
-#else
-#include <X11/Xlocale.h>
-#endif
-#include <X11/Xos.h>
-#ifdef WIN32
-#undef close
-#endif
-#include "_falutil.h"
-
-#ifdef __STDC__
-#define Const const
-#else
-#define Const /**/
-#endif
-
-#ifdef X_NOT_STDC_ENV
-extern char *getenv();
-#endif
-
-extern void _fallcInitLoader(
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-#ifdef XTHREADS
-LockInfoPtr _Xi18n_lock;
-#endif
-
-#if NeedFunctionPrototypes
-char *
-falSetLocaleModifiers(
-    _Xconst char   *modifiers
-)
-#else
-char *
-falSetLocaleModifiers(modifiers)
-    char        *modifiers;
-#endif
-{
-    XLCd lcd = _fallcCurrentLC();
-    char *user_mods;
-
-    if (!lcd)
-       return (char *) NULL;
-    if (!modifiers)
-       return lcd->core->modifiers;
-    user_mods = getenv("XMODIFIERS");
-    modifiers = (*lcd->methods->map_modifiers) (lcd,
-                                               user_mods, (char *)modifiers);
-    if (modifiers) {
-       if (lcd->core->modifiers)
-           Xfree(lcd->core->modifiers);
-       lcd->core->modifiers = (char *)modifiers;
-    }
-    return (char *)modifiers;
-}
-
-Bool
-falSupportsLocale()
-{
-    return _fallcCurrentLC() != (XLCd)NULL;
-}
-
-Bool _fallcValidModSyntax(mods, valid_mods)
-    char *mods;
-    char **valid_mods;
-{
-    int i;
-    char **ptr;
-
-    while (mods && (*mods == '@')) {
-       mods++;
-       if (*mods == '@')
-           break;
-       for (ptr = valid_mods; *ptr; ptr++) {
-           i = strlen(*ptr);
-           if (strncmp(mods, *ptr, i) || ((mods[i] != '=')
-#ifdef WIN32
-                                          && (mods[i] != '#')
-#endif
-                                          ))
-               continue;
-           mods = strchr(mods+i+1, '@');
-           break;
-       }
-    }
-    return !mods || !*mods;
-}
-
-static Const char *im_valid[] = {"im", (char *)NULL};
-
-/*ARGSUSED*/
-char *
-_fallcDefaultMapModifiers (lcd, user_mods, prog_mods)
-    XLCd lcd;
-    char *user_mods;
-    char *prog_mods;
-{
-    int i;
-    char *mods;
-
-    if (!_fallcValidModSyntax(prog_mods, (char **)im_valid))
-       return (char *)NULL;
-    if (!_fallcValidModSyntax(user_mods, (char **)im_valid))
-       return (char *)NULL;
-    i = strlen(prog_mods) + 1;
-    if (user_mods)
-       i += strlen(user_mods);
-    mods = Xmalloc(i);
-    if (mods) {
-       strcpy(mods, prog_mods);
-       if (user_mods)
-           strcat(mods, user_mods);
-#ifdef WIN32
-       {
-           char *s;
-           for (s = mods; s = strchr(s, '@'); s++) {
-               for (s++; *s && *s != '='; s++) {
-                   if (*s == '#') {
-                       *s = '=';
-                       break;
-                   }
-               }
-           }
-       }
-#endif
-    }
-    return mods;
-}
-
-typedef struct _XLCdListRec {
-    struct _XLCdListRec *next;
-    XLCd lcd;
-    int ref_count;
-} XLCdListRec, *XLCdList;
-
-static XLCdList lcd_list = NULL;
-
-typedef struct _XlcLoaderListRec {
-    struct _XlcLoaderListRec *next;
-    XLCdLoadProc proc;
-} XlcLoaderListRec, *XlcLoaderList;
-
-static XlcLoaderList loader_list = NULL;
-
-void
-_fallcRemoveLoader(proc)
-    XLCdLoadProc proc;
-{
-    XlcLoaderList loader, prev;
-
-    if (loader_list == NULL)
-       return;
-
-    prev = loader = loader_list;
-    if (loader->proc == proc) {
-       loader_list = loader->next;
-       Xfree(loader);
-       return;
-    }
-
-    while (loader = loader->next) {
-       if (loader->proc == proc) {
-           prev->next = loader->next;
-           Xfree(loader);
-           return;
-       }
-       prev = loader;
-    }
-
-    return;
-}
-
-Bool
-_fallcAddLoader(proc, position)
-    XLCdLoadProc proc;
-    XlcPosition position;
-{
-    XlcLoaderList loader, last;
-
-    _fallcRemoveLoader(proc);          /* remove old loader, if exist */
-
-    loader = (XlcLoaderList) Xmalloc(sizeof(XlcLoaderListRec));
-    if (loader == NULL)
-       return False;
-
-    loader->proc = proc;
-
-    if (loader_list == NULL)
-       position = XlcHead;
-
-    if (position == XlcHead) {
-       loader->next = loader_list;
-       loader_list = loader;
-    } else {
-       last = loader_list;
-       while (last->next)
-           last = last->next;
-       
-       loader->next = NULL;
-       last->next = loader;
-    }
-
-    return True;
-}
-
-XLCd
-_falOpenLC(name)
-    char *name;
-{
-    XLCd lcd;
-    XlcLoaderList loader;
-    XLCdList cur;
-#if !defined(X_NOT_STDC_ENV) && !defined(X_LOCALE)
-    char siname[256];
-    char *_fallcMapOSLocaleName();
-#endif
-
-    if (name == NULL) {
-       name = setlocale (LC_CTYPE, (char *)NULL);
-#if !defined(X_NOT_STDC_ENV) && !defined(X_LOCALE)
-       name = _fallcMapOSLocaleName (name, siname); 
-#endif
-    }
-
-    _XLockMutex(_Xi18n_lock);
-
-    /*
-     * search for needed lcd, if found return it
-     */
-    for (cur = lcd_list; cur; cur = cur->next) {
-       if (!strcmp (cur->lcd->core->name, name)) {
-           lcd = cur->lcd;
-           cur->ref_count++;
-           goto found;
-       }
-    }
-
-    if (!loader_list)
-       _fallcInitLoader();
-
-    /*
-     * not there, so try to get and add to list
-     */
-    for (loader = loader_list; loader; loader = loader->next) {
-       lcd = (*loader->proc)(name);
-       if (lcd) {
-           cur = (XLCdList) Xmalloc (sizeof(XLCdListRec));
-           if (cur) {
-               cur->lcd = lcd;
-               cur->ref_count = 1;
-               cur->next = lcd_list;
-               lcd_list = cur;
-           } else {
-               (*lcd->methods->close)(lcd);
-               lcd = (XLCd) NULL;
-           }
-           break;
-       }
-    }
-
-found:
-    _XUnlockMutex(_Xi18n_lock);
-    return lcd;
-}
-
-void
-_falCloseLC(lcd)
-    XLCd lcd;
-{
-    XLCdList cur, *prev;
-
-    for (prev = &lcd_list; cur = *prev; prev = &cur->next) {
-       if (cur->lcd == lcd) {
-           if (--cur->ref_count < 1) {
-               (*lcd->methods->close)(lcd);
-               *prev = cur->next;
-               Xfree(cur);
-           }
-           break;
-       }
-    }
-}
-
-/*
- * Get the XLCd for the current locale
- */
-
-XLCd
-_fallcCurrentLC()
-{
-    XLCd lcd;
-    static XLCd last_lcd = NULL;
-
-    lcd = _falOpenLC((char *) NULL);
-
-    if (last_lcd)
-       _falCloseLC(last_lcd);
-    
-    last_lcd = lcd;
-
-    return lcd;
-}
-
-XrmMethods
-_falrmInitParseInfo(state)
-    XPointer *state;
-{
-    XLCd lcd = _falOpenLC((char *) NULL);
-    
-    if (lcd == (XLCd) NULL)
-       return (XrmMethods) NULL;
-    
-    return (*lcd->methods->init_parse_info)(lcd, state);
-}
-
-int
-falmbTextPropertyToTextList(dpy, text_prop, list_ret, count_ret)
-    Display *dpy;
-    XTextProperty *text_prop;
-    char ***list_ret;
-    int *count_ret;
-{
-    XLCd lcd = _fallcCurrentLC();
-    
-    if (lcd == NULL)
-       return XLocaleNotSupported;
-
-    return (*lcd->methods->mb_text_prop_to_list)(lcd, dpy, text_prop, list_ret,
-                                                count_ret);
-}
-
-int
-falwcTextPropertyToTextList(dpy, text_prop, list_ret, count_ret)
-    Display *dpy;
-    XTextProperty *text_prop;
-    wchar_t ***list_ret;
-    int *count_ret;
-{
-    XLCd lcd = _fallcCurrentLC();
-    
-    if (lcd == NULL)
-       return XLocaleNotSupported;
-
-    return (*lcd->methods->wc_text_prop_to_list)(lcd, dpy, text_prop, list_ret,
-                                                count_ret);
-}
-
-int
-falmbTextListToTextProperty(dpy, list, count, style, text_prop)
-    Display *dpy;
-    char **list;
-    int count;
-    XICCEncodingStyle style;
-    XTextProperty *text_prop;
-{
-    XLCd lcd = _fallcCurrentLC();
-    
-    if (lcd == NULL)
-       return XLocaleNotSupported;
-
-    return (*lcd->methods->mb_text_list_to_prop)(lcd, dpy, list, count, style,
-                                                text_prop);
-}
-
-int
-falwcTextListToTextProperty(dpy, list, count, style, text_prop)
-    Display *dpy;
-    wchar_t **list;
-    int count;
-    XICCEncodingStyle style;
-    XTextProperty *text_prop;
-{
-    XLCd lcd = _fallcCurrentLC();
-    
-    if (lcd == NULL)
-       return XLocaleNotSupported;
-
-    return (*lcd->methods->wc_text_list_to_prop)(lcd, dpy, list, count, style,
-                                                text_prop);
-}
-
-void
-falwcFreeStringList(list)
-    wchar_t **list;
-{
-    XLCd lcd = _fallcCurrentLC();
-    
-    if (lcd == NULL)
-       return;
-
-    (*lcd->methods->wc_free_string_list)(lcd, list);
-}
-
-char *
-falDefaultString()
-{
-    XLCd lcd = _fallcCurrentLC();
-    
-    if (lcd == NULL)
-       return (char *) NULL;
-    
-    return (*lcd->methods->default_string)(lcd);
-}
-
-void
-_fallcCopyFromArg(src, dst, size)
-    char *src;
-    register char *dst;
-    register int size;
-{
-    if (size == sizeof(long))
-       *((long *) dst) = (long) src;
-#ifdef LONG64
-    else if (size == sizeof(int))
-       *((int *) dst) = (int) (intptr_t) src;
-#endif
-    else if (size == sizeof(short))
-       *((short *) dst) = (short) (intptr_t) src;
-    else if (size == sizeof(char))
-       *((char *) dst) = (char) (intptr_t) src;
-    else if (size == sizeof(XPointer))
-       *((XPointer *) dst) = (XPointer) src;
-    else if (size > sizeof(XPointer))
-       memcpy(dst, (char *) src, size);
-    else
-       memcpy(dst, (char *) &src, size);
-}
-
-void
-_fallcCopyToArg(src, dst, size)
-    register char *src;
-    register char **dst;
-    register int size;
-{
-    if (size == sizeof(long))
-       *((long *) *dst) = *((long *) src);
-    else if (size == sizeof(short))
-       *((short *) *dst) = *((short *) src);
-    else if (size == sizeof(char))
-       *((char *) *dst) = *((char *) src);
-    else if (size == sizeof(XPointer))
-       *((XPointer *) *dst) = *((XPointer *) src);
-    else
-       memcpy(*dst, src, size);
-}
-
-void
-_fallcCountVaList(var, count_ret)
-    va_list var;
-    int *count_ret;
-{
-    register int count;
-
-    for (count = 0; va_arg(var, char *); count++)
-       va_arg(var, XPointer);
-    
-    *count_ret = count;
-}
-
-void
-_fallcVaToArgList(var, count, args_ret)
-    va_list var;
-    register int count;
-    XlcArgList *args_ret;
-{
-    register XlcArgList args;
-
-    *args_ret = args = (XlcArgList) Xmalloc(sizeof(XlcArg) * count);
-    if (args == (XlcArgList) NULL)
-       return;
-    
-    for ( ; count-- > 0; args++) {
-       args->name = va_arg(var, char *);
-       args->value = va_arg(var, XPointer);
-    }
-}
-
-void
-_fallcCompileResourceList(resources, num_resources)
-    register XlcResourceList resources;
-    register int num_resources;
-{
-    for ( ; num_resources-- > 0; resources++)
-       resources->xrm_name = falrmPermStringToQuark(resources->name);
-}
-
-char *
-_fallcGetValues(base, resources, num_resources, args, num_args, mask)
-    XPointer base;
-    XlcResourceList resources;
-    int num_resources;
-    XlcArgList args;
-    int num_args;
-    unsigned long mask;
-{
-    XlcResourceList res;
-    XrmQuark xrm_name;
-    int count;
-
-    for ( ; num_args-- > 0; args++) {
-       res = resources;
-       count = num_resources;
-       xrm_name = falrmPermStringToQuark(args->name);
-
-       for ( ; count-- > 0; res++) {
-           if (xrm_name == res->xrm_name && (mask & res->mask)) {
-                   _fallcCopyToArg(base + res->offset, &args->value, res->size);
-               break;
-           }
-       }
-
-       if (count < 0)
-           return args->name;
-    }
-
-    return NULL;
-}
-
-char *
-_fallcSetValues(base, resources, num_resources, args, num_args, mask)
-    XPointer base;
-    XlcResourceList resources;
-    int num_resources;
-    XlcArgList args;
-    int num_args;
-    unsigned long mask;
-{
-    XlcResourceList res;
-    XrmQuark xrm_name;
-    int count;
-
-    for ( ; num_args-- > 0; args++) {
-       res = resources;
-       count = num_resources;
-       xrm_name = falrmPermStringToQuark(args->name);
-
-       for ( ; count-- > 0; res++) {
-           if (xrm_name == res->xrm_name && (mask & res->mask)) {
-               _fallcCopyFromArg(args->value, base + res->offset, res->size);
-               break;
-           }
-       }
-
-       if (count < 0)
-           return args->name;
-    }
-
-    return NULL;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_fallcint.h b/cde/programs/dtudcfonted/libfal/_fallcint.h
deleted file mode 100644 (file)
index 445460b..0000000
+++ /dev/null
@@ -1,1034 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* Xlcint.h 1.4 - Fujitsu source for CDEnext    95/12/07 10:53:09      */ 
-/* $XConsortium: _fallcint.h /main/1 1996/04/08 15:20:05 cde-fuj $ */
-/*
-
-Copyright (c) 1991  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-/*
- * Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
- *                      and Nippon Telegraph and Telephone Corporation
- * Copyright 1991 by the Open Software Foundation
- * Copyright 1993 by the TOSHIBA Corp.
- * Copyright 1993, 1994 by Sony Corporation
- * Copyright 1993, 1994 by the FUJITSU LIMITED
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the names of OMRON, NTT Software, NTT, Open
- * Software Foundation, and Sony Corporation not be used in advertising
- * or publicity pertaining to distribution of the software without specific, 
- * written prior permission. OMRON, NTT Software, NTT, Open Software
- * Foundation, and Sony Corporation  make no representations about the 
- * suitability of this software for any purpose.  It is provided "as is" 
- * without express or implied warranty.
- *
- * OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, AND SONY 
- * CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT 
- * SHALL OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, OR SONY 
- * CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
- * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- * 
- *     Authors: Li Yuhong              OMRON Corporation
- *              Tatsuya Kato           NTT Software Corporation
- *              Hiroshi Kuribayashi    OMRON Coproration
- *              Muneiyoshi Suzuki      Nippon Telegraph and Telephone Co.
- * 
- *              M. Collins             OSF  
- *              Katsuhisa Yano         TOSHIBA Corp.
- *               Makoto Wakamatsu       Sony Corporation
- *               Takashi Fujiwara      FUJITSU LIMITED
- */                            
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#ifndef        _XLCINT_H_
-#define        _XLCINT_H_
-
-#include <X11/Xresource.h>
-#include "_falutil.h"
-#include "_falvarargs.h"
-
-typedef Bool (*XFilterEventProc)(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* window */,
-    XEvent*            /* event */,
-    XPointer           /* client_data */
-#endif
-);
-
-typedef struct _XIMFilter {
-    struct _XIMFilter *next;
-    Window window;
-    unsigned long event_mask;
-    int start_type, end_type;
-    XFilterEventProc filter;
-    XPointer client_data;
-} XFilterEventRec, *XFilterEventList;
-
-typedef struct {
-    char    *name;
-    XPointer value;
-} XIMArg;
-
-#ifdef offsetof
-#define XOffsetOf(s_type,field) offsetof(s_type,field)
-#else
-#define XOffsetOf(s_type,field) ((unsigned int)&(((s_type*)NULL)->field))
-#endif
-
-#define XIMNumber(arr) ((unsigned int) (sizeof(arr) / sizeof(arr[0])))
-
-/*
- * define secondary data structs which are part of Input Methods
- * and Input Context
- */
-typedef struct {
-    char               *resource_name;         /* Resource string */
-    XrmQuark           xrm_name;               /* Resource name quark */
-    int                        resource_size;          /* Size in bytes of data */
-    long               resource_offset;        /* Offset from base */
-    unsigned short     mode;                   /* Read Write Permission */
-    unsigned short     id;                     /* Input Method Protocol */
-} XIMResource, *XIMResourceList;
-
-/*
- * data block describing the visual attributes associated with
- * an input context
- */
-typedef struct {
-    XRectangle         area;
-    XRectangle         area_needed;
-    XPoint             spot_location;
-    Colormap           colormap;
-    Atom               std_colormap;
-    unsigned long      foreground;
-    unsigned long      background;
-    Pixmap             background_pixmap;
-    XFontSet            fontset;
-    int                        line_spacing;
-    Cursor             cursor;
-    XIMCallback                start_callback;
-    XIMCallback                done_callback;
-    XIMCallback                draw_callback;
-    XIMCallback                caret_callback;
-    XIMPreeditState    preedit_state;
-    XIMCallback                state_notify_callback;
-} ICPreeditAttributes, *ICPreeditAttributesPtr;
-
-typedef struct {
-    XRectangle         area;
-    XRectangle         area_needed;
-    Colormap           colormap;
-    Atom               std_colormap;
-    unsigned long      foreground;
-    unsigned long      background;
-    Pixmap             background_pixmap;
-    XFontSet            fontset;
-    int                        line_spacing;
-    Cursor             cursor;
-    XIMCallback                start_callback;
-    XIMCallback                done_callback;
-    XIMCallback                draw_callback;
-} ICStatusAttributes, *ICStatusAttributesPtr;
-
-/*
- * Methods for Xrm parsing
- */
-
-typedef void (*XmbInitProc)(
-#if NeedFunctionPrototypes
-    XPointer           /* state */
-#endif
-);
-
-typedef char (*XmbCharProc)(
-#if NeedFunctionPrototypes
-    XPointer           /* state */,
-    char*              /* str */,
-    int*               /* lenp */
-#endif
-);
-
-typedef void (*XmbFinishProc)(
-#if NeedFunctionPrototypes
-    XPointer           /* state */
-#endif
-);
-
-typedef char* (*XlcNameProc)(
-#if NeedFunctionPrototypes
-    XPointer           /* state */
-#endif
-);
-
-typedef void (*XrmDestroyProc)(
-#if NeedFunctionPrototypes
-    XPointer           /* state */
-#endif
-);
-
-typedef struct {
-    XmbInitProc                mbinit;
-    XmbCharProc                mbchar;
-    XmbFinishProc      mbfinish;
-    XlcNameProc                lcname;
-    XrmDestroyProc     destroy;
-} XrmMethodsRec, *XrmMethods;
-
-typedef struct _XLCd *XLCd; /* need forward reference */
-
-/*
- * define an LC, it's methods, and data.
- */
-
-typedef void (*XCloseLCProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */
-#endif
-);
-
-typedef char* (*XlcMapModifiersProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    char*              /* user_mods */,
-    char*              /* prog_mods */
-#endif
-);
-
-typedef XOM (*XOpenOMProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* display */,
-    XrmDatabase                /* rdb */,
-    _Xconst char*      /* res_name */,
-    _Xconst char*      /* res_class */
-#endif
-);
-
-typedef XIM (*XOpenIMProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* display */,
-    XrmDatabase                /* rdb */,
-    char*              /* res_name */,
-    char*              /* res_class */
-#endif
-);
-
-typedef Bool (*XRegisterIMInstantiateCBProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* display */,
-    XrmDatabase                /* rdb */,
-    char*              /* res_name */,
-    char*              /* res_class */,
-    XIMProc            /* callback */,
-    XPointer*          /* client_data */
-#endif
-);
-
-typedef Bool (*XUnregisterIMInstantiateCBProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* display */,
-    XrmDatabase                /* rdb */,
-    char*              /* res_name */,
-    char*              /* res_class */,
-    XIMProc            /* callback */,
-    XPointer*          /* client_data */
-#endif
-);
-
-typedef XrmMethods (*XrmInitParseInfoProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    XPointer*          /* state */
-#endif
-);
-
-typedef int (*falmbTextPropertyToTextListProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* display */,
-    XTextProperty*     /* text_prop */,
-    char***            /* list_return */,
-    int*               /* count_return */
-#endif
-);
-
-typedef int (*falwcTextPropertyToTextListProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* display */,
-    XTextProperty*     /* text_prop */,
-    wchar_t***         /* list_return */,
-    int*               /* count_return */
-#endif
-);
-
-typedef int (*falmbTextListToTextPropertyProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* display */,
-    char**             /* list */,
-    int                        /* count */,
-    XICCEncodingStyle  /* style */,
-    XTextProperty*     /* text_prop_return */
-#endif
-);
-
-typedef int (*falwcTextListToTextPropertyProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* display */,
-    wchar_t**          /* list */,
-    int                        /* count */,
-    XICCEncodingStyle  /* style */,
-    XTextProperty*     /* text_prop_return */
-#endif
-);
-
-typedef void (*falwcFreeStringListProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    wchar_t**          /* list */
-#endif
-);
-
-typedef char* (*falDefaultStringProc)(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */
-#endif
-);
-
-typedef struct {
-    XCloseLCProc                       close;
-    XlcMapModifiersProc                        map_modifiers;
-    XOpenOMProc                                open_om;
-    XOpenIMProc                                open_im;
-    XrmInitParseInfoProc               init_parse_info;
-    falmbTextPropertyToTextListProc    mb_text_prop_to_list;
-    falwcTextPropertyToTextListProc    wc_text_prop_to_list;
-    falmbTextListToTextPropertyProc    mb_text_list_to_prop;
-    falwcTextListToTextPropertyProc    wc_text_list_to_prop;
-    falwcFreeStringListProc            wc_free_string_list;
-    falDefaultStringProc                       default_string;
-    XRegisterIMInstantiateCBProc       register_callback;
-    XUnregisterIMInstantiateCBProc     unregister_callback;
-} XLCdMethodsRec, *XLCdMethods;
-
-
-typedef struct {
-    char*              name;                   /* name of this LC */
-    char*              modifiers;              /* modifiers of locale */
-} XLCdCoreRec, *XLCdCore;
-
-
-typedef struct _XLCd {
-    XLCdMethods                methods;                /* methods of this LC */
-    XLCdCore           core;                   /* data of this LC */
-    XPointer           opaque;                 /* LDX specific data */
-} XLCdRec;
-
-typedef int XlcPosition;
-
-#define XlcHead                0
-#define XlcTail                -1
-
-typedef struct {
-    char *name;
-    XPointer value;
-} XlcArg, *XlcArgList;
-
-typedef struct _XlcResource {
-    char *name;
-    XrmQuark xrm_name;
-    int size;
-    int offset;
-    unsigned long mask;
-} XlcResource, *XlcResourceList;
-
-#define XlcCreateMask  (1L<<0)
-#define XlcDefaultMask (1L<<1)
-#define XlcGetMask     (1L<<2)
-#define XlcSetMask     (1L<<3)
-#define XlcIgnoreMask  (1L<<4)
-
-#define XlcNumber(arr) (sizeof(arr) / sizeof(arr[0]))
-
-typedef Status (*XCloseOMProc)(
-#if NeedFunctionPrototypes
-    XOM                        /* om */
-#endif
-);
-
-typedef char* (*XSetOMValuesProc)(
-#if NeedFunctionPrototypes
-    XOM                        /* om */,
-    XlcArgList         /* args */,
-    int                        /* num_args */
-#endif
-);
-
-typedef char* (*XGetOMValuesProc)(
-#if NeedFunctionPrototypes
-    XOM                        /* om */,
-    XlcArgList         /* args */,
-    int                        /* num_args */
-#endif
-);
-
-typedef XOC (*XCreateOCProc)(
-#if NeedFunctionPrototypes
-    XOM                        /* om */,
-    XlcArgList         /* args */,
-    int                        /* num_args */
-#endif
-);
-
-typedef struct _XOMMethodsRec {
-    XCloseOMProc       close;
-    XSetOMValuesProc   set_values;
-    XGetOMValuesProc   get_values;
-    XCreateOCProc      create_oc;
-} XOMMethodsRec, *XOMMethods;
-
-typedef struct _XOMCoreRec {
-    XLCd lcd;                          /* lcd */
-    Display *display;                  /* display */
-    XrmDatabase rdb;                   /* database */
-    char *res_name;                    /* resource name */
-    char *res_class;                   /* resource class */
-    XOC oc_list;                       /* xoc list */
-    XlcResourceList resources;         /* xom resources */
-    int num_resources;                 /* number of xom resources */
-    XOMCharSetList required_charset;   /* required charset list */
-    XOMOrientation orientation_list;   /* orientation list */
-    Bool directional_dependent;                /* directional-dependent */
-    Bool contextual_drawing;           /* contextual drawing */
-    Bool context_dependent;            /* context-dependent drawing */
-} XOMCoreRec, *XOMCore;
-
-typedef struct _XOM {
-    XOMMethods methods;
-    XOMCoreRec core;
-} XOMRec;
-
-typedef void (*XDestroyOCProc)(
-#if NeedFunctionPrototypes
-    XOC                        /* oc */
-#endif
-);
-
-typedef char* (*XSetOCValuesProc)(
-#if NeedFunctionPrototypes
-    XOC                        /* oc */,
-    XlcArgList         /* args */,
-    int                        /* num_args */
-#endif
-);
-
-typedef char* (*XGetOCValuesProc)(
-#if NeedFunctionPrototypes
-    XOC                        /* oc */,
-    XlcArgList         /* args */,
-    int                        /* num_args */
-#endif
-);
-
-/*
- * X Font Sets are an instantiable object, so we define it, the 
- * object itself, a method list and data
- */
-
-/* 
- * XFontSet object method list
- */
-
-typedef int (*XmbTextEscapementProc)(
-#if NeedFunctionPrototypes
-    XFontSet           /* font_set */,
-    _Xconst char*      /* text */,
-    int                        /* text_len */
-#endif
-);
-
-typedef int (*XmbTextExtentsProc)(
-#if NeedFunctionPrototypes
-    XFontSet           /* font_set */,
-    _Xconst char*      /* text */,
-    int                        /* text_len */,
-    XRectangle*                /* overall_ink_extents */,
-    XRectangle*                /* overall_logical_extents */
-#endif
-);
-
-typedef Status (*XmbTextPerCharExtentsProc)(
-#if NeedFunctionPrototypes
-    XFontSet           /* font_set */,
-    _Xconst char*      /* text */,
-    int                        /* text_len */,
-    XRectangle*                /* ink_extents_buffer */,
-    XRectangle*                /* logical_extents_buffer */,
-    int                        /* buffer_size */,
-    int*               /* num_chars */,
-    XRectangle*                /* max_ink_extents */,
-    XRectangle*                /* max_logical_extents */
-#endif
-);
-
-typedef int (*XmbDrawStringProc)(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Drawable           /* drawable */,
-    XFontSet           /* font_set */,
-    GC                 /* gc */,
-    int                        /* x */,
-    int                        /* y */,
-    _Xconst char*      /* text */,
-    int                        /* text_len */
-#endif
-);
-
-typedef void (*XmbDrawImageStringProc)(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Drawable           /* drawable */,
-    XFontSet           /* font_set */,
-    GC                 /* gc */,
-    int                        /* x */,
-    int                        /* y */,
-    _Xconst char*      /* text */,
-    int                        /* text_len */
-#endif
-);
-
-typedef int (*XwcTextEscapementProc)(
-#if NeedFunctionPrototypes
-    XFontSet           /* font_set */,
-    _Xconst wchar_t*   /* text */,
-    int                        /* text_len */
-#endif
-);
-
-typedef int (*XwcTextExtentsProc)(
-#if NeedFunctionPrototypes
-    XFontSet           /* font_set */,
-    _Xconst wchar_t*   /* text */,
-    int                        /* text_len */,
-    XRectangle*                /* overall_ink_extents */,
-    XRectangle*                /* overall_logical_extents */
-#endif
-);
-
-typedef Status (*XwcTextPerCharExtentsProc)(
-#if NeedFunctionPrototypes
-    XFontSet           /* font_set */,
-    _Xconst wchar_t*   /* text */,
-    int                        /* text_len */,
-    XRectangle*                /* ink_extents_buffer */,
-    XRectangle*                /* logical_extents_buffer */,
-    int                        /* buffer_size */,
-    int*               /* num_chars */,
-    XRectangle*                /* max_ink_extents */,
-    XRectangle*                /* max_logical_extents */
-#endif
-);
-
-typedef int (*XwcDrawStringProc)(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Drawable           /* drawable */,
-    XFontSet           /* font_set */,
-    GC                 /* gc */,
-    int                        /* x */,
-    int                        /* y */,
-    _Xconst wchar_t*   /* text */,
-    int                        /* text_len */
-#endif
-);
-
-typedef void (*XwcDrawImageStringProc)(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Drawable           /* drawable */,
-    XFontSet           /* font_set */,
-    GC                 /* gc */,
-    int                        /* x */,
-    int                        /* y */,
-    _Xconst wchar_t*   /* text */,
-    int                        /* text_len */
-#endif
-);
-
-typedef struct {
-    XDestroyOCProc             destroy;
-    XSetOCValuesProc           set_values;
-    XGetOCValuesProc           get_values;
-
-    /* multi-byte text drawing methods */
-
-    XmbTextEscapementProc      mb_escapement;
-    XmbTextExtentsProc         mb_extents;
-    XmbTextPerCharExtentsProc  mb_extents_per_char;
-    XmbDrawStringProc          mb_draw_string;
-    XmbDrawImageStringProc     mb_draw_image_string;
-
-    /* wide character text drawing methods */
-
-    XwcTextEscapementProc      wc_escapement;
-    XwcTextExtentsProc         wc_extents;
-    XwcTextPerCharExtentsProc  wc_extents_per_char;
-    XwcDrawStringProc          wc_draw_string;
-    XwcDrawImageStringProc     wc_draw_image_string;
-} XOCMethodsRec, *XOCMethods;
-
-
-/*
- * XOC independent data
- */
-
-typedef struct {
-    XOM om;                            /* XOM */
-    XOC next;                          /* next XOC */
-    XlcResourceList resources;         /* xoc resources */
-    int num_resources;                 /* number of xoc resources */
-    char *base_name_list;              /* base font name list */
-    Bool om_automatic;                 /* OM Automatic */
-    XOMFontInfo font_info;             /* font info */
-    XFontSetExtents font_set_extents;          /* font set extents */
-    char *default_string;              /* default string */
-    XOMCharSetList missing_list;       /* missing charset list */
-    XOrientation orientation;          /* orientation */
-    char *res_name;                    /* resource name */
-    char *res_class;                   /* resource class */
-} XOCCoreRec, *XOCCore;
-
-typedef struct _XOC {
-    XOCMethods methods;
-    XOCCoreRec core;
-} XOCRec;
-
-
-/* current Ultrix compiler gets horribly confused */
-#if defined(FUNCPROTO) && defined(ultrix)
-#undef NeedFunctionPrototypes
-#endif
-
-
-/*
- * X Input Managers are an instantiable object, so we define it, the 
- * object itself, a method list and data.
- */
-
-/*
- * an Input Manager object method list
- */
-typedef struct {
-    Status (*close)(
-#if NeedFunctionPrototypes
-       XIM
-#endif
-       );
-    char* (*set_values)(
-#if NeedFunctionPrototypes
-       XIM, XIMArg*
-#endif
-       );
-    char* (*get_values)(
-#if NeedFunctionPrototypes
-       XIM, XIMArg*
-#endif
-       );
-    XIC (*create_ic)(
-#if NeedFunctionPrototypes
-       XIM, XIMArg*
-#endif
-       );
-    int (*ctstombs)(
-#if NeedFunctionPrototypes
-       XIM, char*, int, char*, int, Status *
-#endif
-       );
-    int (*ctstowcs)(
-#if NeedFunctionPrototypes
-       XIM, char*, int, wchar_t*, int, Status *
-#endif
-       );
-} XIMMethodsRec, *XIMMethods;
-
-/*
- * Input Manager LC independent data
- */
-typedef struct {
-    XLCd               lcd;                    /* LC of this input method */
-    XIC                        ic_chain;               /* list of ICs for this IM */
-
-    Display *          display;                /* display */
-    XrmDatabase        rdb;
-    char *             res_name;
-    char *             res_class;
-
-    XIMValuesList      *im_values_list;
-    XIMValuesList      *ic_values_list;
-    XIMStyles          *styles;
-    XIMCallback                 destroy_callback;
-    char *             im_name;                /* XIMMODIFIER name */
-    XIMResourceList    im_resources;           /* compiled IM resource list */
-    unsigned int       im_num_resources;
-    XIMResourceList    ic_resources;           /* compiled IC resource list */
-    unsigned int       ic_num_resources;
-    Bool               visible_position;
-} XIMCoreRec, *XIMCore;
-
-
-
-/*
- * An X Input Manager (IM).  Implementations may need to extend this data 
- * structure to accommodate additional data, state information etc.
- */
-typedef struct _XIM {
-    XIMMethods         methods;                /* method list of this IM */
-    XIMCoreRec         core;                   /* data of this IM */
-} XIMRec;
-
-
-
-/*
- * X Input Contexts (IC) are an instantiable object, so we define it, the 
- * object itself, a method list and data for this object
- */
-
-/*
- * Input Context method list
- */ 
-typedef struct {
-    void (*destroy)(
-#if NeedFunctionPrototypes
-       XIC
-#endif
-       );
-    void (*set_focus)(
-#if NeedFunctionPrototypes
-       XIC
-#endif
-       );
-    void (*unset_focus)(
-#if NeedFunctionPrototypes
-       XIC
-#endif
-       );
-    char* (*set_values)(
-#if NeedFunctionPrototypes
-       XIC, XIMArg*
-#endif
-       );
-    char* (*get_values)(
-#if NeedFunctionPrototypes
-       XIC, XIMArg*
-#endif
-       );
-    char* (*mb_reset)(
-#if NeedFunctionPrototypes
-       XIC
-#endif
-       );
-    wchar_t* (*wc_reset)(
-#if NeedFunctionPrototypes
-       XIC
-#endif
-       );
-    int (*mb_lookup_string)(
-#if NeedFunctionPrototypes
-       XIC, XKeyEvent*, char*, int, KeySym*, Status*
-#endif
-       );
-    int (*wc_lookup_string)(
-#if NeedFunctionPrototypes
-       XIC, XKeyEvent*, wchar_t*, int, KeySym*, Status*
-#endif
-       );
-} XICMethodsRec, *XICMethods;
-
-
-/*
- * Input Context LC independent data
- */
-typedef struct {
-    XIM                        im;                     /* XIM this IC belongs too */
-    XIC                        next;                   /* linked list of ICs for IM */
-
-    Window             client_window;          /* window IM can use for */
-                                               /* display or subwindows */
-    XIMStyle           input_style;            /* IM's input style */
-    Window             focus_window;           /* where key events go */
-    unsigned long      filter_events;          /* event mask from IM */
-    XIMCallback                geometry_callback;      /* client callback */
-    char *             res_name;
-    char *             res_class;
-
-    XIMCallback                destroy_callback;
-    XIMCallback                string_conversion_callback;
-    XIMStringConversionText     string_conversion;
-    XIMResetState      reset_state;
-    XIMHotKeyTriggers  *hotkey;
-    XIMHotKeyState     hotkey_state;
-
-    ICPreeditAttributes        preedit_attr;           /* visuals of preedit area */
-    ICStatusAttributes status_attr;            /* visuals of status area */
-} XICCoreRec, *XICCore;
-
-
-/*
- * an Input Context.  Implementations may need to extend this data 
- * structure to accommodate additional data, state information etc.
- */
-typedef struct _XIC {
-    XICMethods         methods;                /* method list of this IC */
-    XICCoreRec         core;                   /* data of this IC */
-} XICRec;
-
-/* current Ultrix compiler gets horribly confused */
-#if !defined(NeedFunctionPrototypes) && defined(FUNCPROTO)
-#define NeedFunctionPrototypes 1
-#endif
-
-typedef XLCd (*XLCdLoadProc)(
-#if NeedFunctionPrototypes
-    char*
-#endif
-);
-
-_XFUNCPROTOBEGIN
-
-extern XLCd _falOpenLC(
-#if NeedFunctionPrototypes
-    char*              /* name */
-#endif
-);
-
-extern void _falCloseLC(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */
-#endif
-);
-
-extern XLCd _fallcCurrentLC(
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern Bool _fallcValidModSyntax(
-#if NeedFunctionPrototypes
-    char*      /* mods */,
-    char**     /* valid */
-#endif
-);
-
-extern char *_fallcDefaultMapModifiers(
-#if NeedFunctionPrototypes
-    XLCd       /* lcd */,
-    char*      /* user_mods */,
-    char*      /* prog_mods */
-#endif
-);
-
-extern void _XIMCompileResourceList(
-#if NeedFunctionPrototypes
-    XIMResourceList    /* res */,
-    unsigned int       /* num_res */
-#endif
-);
-
-extern void _XCopyToArg(
-#if NeedFunctionPrototypes
-    XPointer           /* src */,
-    XPointer*          /* dst */,
-    unsigned int       /* size */
-#endif
-);
-
-extern char ** _falParseBaseFontNameList(
-#if NeedFunctionPrototypes
-    char*              /* str */,
-    int*               /* num */
-#endif
-);
-
-extern XrmMethods _falrmInitParseInfo(
-#if NeedFunctionPrototypes
-       XPointer*       /* statep */
-#endif
-);
-
-extern void _XRegisterFilterByMask(
-#if NeedFunctionPrototypes
-    Display*           /* dpy */,
-    Window             /* window */,
-    unsigned long      /* event_mask */,
-    Bool (*)(
-#if NeedNestedPrototypes
-            Display*   /* display */,
-            Window     /* window */,
-            XEvent*    /* event */,
-            XPointer   /* client_data */
-#endif
-            )          /* filter */,
-    XPointer           /* client_data */
-#endif
-);
-
-extern void _XRegisterFilterByType(
-#if NeedFunctionPrototypes
-    Display*           /* dpy */,
-    Window             /* window */,
-    int                        /* start_type */,
-    int                        /* end_type */,
-    Bool (*)(
-#if NeedNestedPrototypes
-            Display*   /* display */,
-            Window     /* window */,
-            XEvent*    /* event */,
-            XPointer   /* client_data */
-#endif
-            )          /* filter */,
-    XPointer           /* client_data */
-#endif
-);
-
-extern void _XUnregisterFilter(
-#if NeedFunctionPrototypes
-    Display*           /* dpy */,
-    Window             /* window */,
-    Bool (*)(
-#if NeedNestedPrototypes
-            Display*   /* display */,
-            Window     /* window */,
-            XEvent*    /* event */,
-            XPointer   /* client_data */
-#endif
-            )          /* filter */,
-    XPointer           /* client_data */
-#endif
-);
-
-extern void _fallcCountVaList(
-#if NeedFunctionPrototypes
-    va_list            /* var */,
-    int*               /* count_return */
-#endif
-);
-
-extern void _fallcVaToArgList(
-#if NeedFunctionPrototypes
-    va_list            /* var */,
-    int                        /* count */,
-    XlcArgList*                /* args_return */
-#endif
-);
-
-extern void _fallcCompileResourceList(
-#if NeedFunctionPrototypes
-    XlcResourceList    /* resources */,
-    int                        /* num_resources */
-#endif
-);
-
-extern char *_fallcGetValues(
-#if NeedFunctionPrototypes
-    XPointer           /* base */,
-    XlcResourceList    /* resources */,
-    int                        /* num_resources */,
-    XlcArgList         /* args */,
-    int                        /* num_args */,
-    unsigned long      /* mask */
-#endif
-);
-
-extern char *_fallcSetValues(
-#if NeedFunctionPrototypes
-    XPointer           /* base */,
-    XlcResourceList    /* resources */,
-    int                        /* num_resources */,
-    XlcArgList         /* args */,
-    int                        /* num_args */,
-    unsigned long      /* mask */
-#endif
-);
-
-extern Bool _fallcAddLoader(
-#if NeedFunctionPrototypes
-    XLCdLoadProc       /* proc */,
-    XlcPosition                /* position */
-#endif
-);
-
-extern void _fallcRemoveLoader(
-#if NeedFunctionPrototypes
-    XLCdLoadProc       /* proc */
-#endif
-);
-
-_XFUNCPROTOEND
-
-#endif /* _XLCINT_H_ */
diff --git a/cde/programs/dtudcfonted/libfal/_fallibint.h b/cde/programs/dtudcfonted/libfal/_fallibint.h
deleted file mode 100644 (file)
index cf313a1..0000000
+++ /dev/null
@@ -1,1244 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* Xlibint.h 1.2 - Fujitsu source for CDEnext    95/12/07 10:53:12     */ 
-/* $XConsortium: _fallibint.h /main/1 1996/04/08 15:21:22 cde-fuj $ */
-
-/*
-
-Copyright (c) 1984, 1985, 1987, 1989  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-/*
- *     Xlibint.h - Header definition and support file for the internal
- *     support routines used by the C subroutine interface
- *     library (Xlib) to the X Window System.
- *
- *     Warning, there be dragons here....
- */
-/*
- * Copyright 1995 by FUJITSU LIMITED
- * This is source code modified by FUJITSU LIMITED under the Joint
- * Development Agreement for the CDEnext PST.
- * This is unpublished proprietry source code of FUJITSU LIMITED
- *
- * Modifier: Takanori Tateno   FUJITSU LIMITED
- *
- */
-
-
-#if !defined(NEED_EVENTS) && !NeedFunctionPrototypes
-#define _XEVENT_
-#endif
-
-#include "syncx.h"
-
-#ifdef WIN32
-#define _XFlush _XFlushIt
-#endif
-
-struct _XGC
-{
-    XExtData *ext_data;        /* hook for extension to hang data */
-    GContext gid;      /* protocol ID for graphics context */
-    Bool rects;                /* boolean: TRUE if clipmask is list of rectangles */
-    Bool dashes;       /* boolean: TRUE if dash-list is really a list */
-    unsigned long dirty;/* cache dirty bits */
-    XGCValues values;  /* shadow structure of values */
-};
-
-struct _XDisplay
-{
-       XExtData *ext_data;     /* hook for extension to hang data */
-       struct _XFreeFuncs *free_funcs; /* internal free functions */
-       int fd;                 /* Network socket. */
-       int conn_checker;         /* ugly thing used by _XEventsQueued */
-       int proto_major_version;/* maj. version of server's X protocol */
-       int proto_minor_version;/* minor version of server's X protocol */
-       char *vendor;           /* vendor of the server hardware */
-        XID resource_base;     /* resource ID base */
-       XID resource_mask;      /* resource ID mask bits */
-       XID resource_id;        /* allocator current ID */
-       int resource_shift;     /* allocator shift to correct bits */
-       XID (*resource_alloc)(); /* allocator function */
-       int byte_order;         /* screen byte order, LSBFirst, MSBFirst */
-       int bitmap_unit;        /* padding and data requirements */
-       int bitmap_pad;         /* padding requirements on bitmaps */
-       int bitmap_bit_order;   /* LeastSignificant or MostSignificant */
-       int nformats;           /* number of pixmap formats in list */
-       ScreenFormat *pixmap_format;    /* pixmap format list */
-       int vnumber;            /* Xlib's X protocol version number. */
-       int release;            /* release of the server */
-       struct _XSQEvent *head, *tail;  /* Input event queue. */
-       int qlen;               /* Length of input event queue */
-       unsigned long last_request_read; /* seq number of last event read */
-       unsigned long request;  /* sequence number of last request. */
-       char *last_req;         /* beginning of last request, or dummy */
-       char *buffer;           /* Output buffer starting address. */
-       char *bufptr;           /* Output buffer index pointer. */
-       char *bufmax;           /* Output buffer maximum+1 address. */
-       unsigned max_request_size; /* maximum number 32 bit words in request*/
-       struct _XrmHashBucketRec *db;
-       int (*synchandler)();   /* Synchronization handler */
-       char *display_name;     /* "host:display" string used on this connect*/
-       int default_screen;     /* default screen for operations */
-       int nscreens;           /* number of screens on this server*/
-       Screen *screens;        /* pointer to list of screens */
-       unsigned long motion_buffer;    /* size of motion buffer */
-       unsigned long flags;       /* internal connection flags */
-       int min_keycode;        /* minimum defined keycode */
-       int max_keycode;        /* maximum defined keycode */
-       KeySym *keysyms;        /* This server's keysyms */
-       XModifierKeymap *modifiermap;   /* This server's modifier keymap */
-       int keysyms_per_keycode;/* number of rows */
-       char *xdefaults;        /* contents of defaults from server */
-       char *scratch_buffer;   /* place to hang scratch buffer */
-       unsigned long scratch_length;   /* length of scratch buffer */
-       int ext_number;         /* extension number on this display */
-       struct _XExten *ext_procs; /* extensions initialized on this display */
-       /*
-        * the following can be fixed size, as the protocol defines how
-        * much address space is available. 
-        * While this could be done using the extension vector, there
-        * may be MANY events processed, so a search through the extension
-        * list to find the right procedure for each event might be
-        * expensive if many extensions are being used.
-        */
-       Bool (*event_vec[128])();  /* vector for wire to event */
-       Status (*wire_vec[128])(); /* vector for event to wire */
-       KeySym lock_meaning;       /* for XLookupString */
-       struct _XLockInfo *lock;   /* multi-thread state, display lock */
-       struct _XInternalAsync *async_handlers; /* for internal async */
-       unsigned long bigreq_size; /* max size of big requests */
-       struct _XLockPtrs *lock_fns; /* pointers to threads functions */
-       void (*idlist_alloc)();    /* XID list allocator function */
-       /* things above this line should not move, for binary compatibility */
-       struct _XKeytrans *key_bindings; /* for XLookupString */
-       Font cursor_font;          /* for XCreateFontCursor */
-       struct _XDisplayAtoms *atoms; /* for falInternAtom */
-       unsigned int mode_switch;  /* keyboard group modifiers */
-       unsigned int num_lock;  /* keyboard numlock modifiers */
-       struct _XContextDB *context_db; /* context database */
-       Bool (**error_vec)();      /* vector for wire to error */
-       /*
-        * Xcms information
-        */
-       struct {
-          XPointer defaultCCCs;  /* pointer to an array of default XcmsCCC */
-          XPointer clientCmaps;  /* pointer to linked list of XcmsCmapRec */
-          XPointer perVisualIntensityMaps;
-                                 /* linked list of XcmsIntensityMap */
-       } cms;
-       struct _XIMFilter *im_filters;
-       struct _XSQEvent *qfree; /* unallocated event queue elements */
-       unsigned long next_event_serial_num; /* inserted into next queue elt */
-       struct _XExten *flushes; /* Flush hooks */
-       struct _XConnectionInfo *im_fd_info; /* _XRegisterInternalConnection */
-       int im_fd_length;       /* number of im_fd_info */
-       struct _XConnWatchInfo *conn_watchers; /* XAddConnectionWatch */
-       int watcher_count;      /* number of conn_watchers */
-       XPointer filedes;       /* struct pollfd cache for _XWaitForReadable */
-       int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
-       XID resource_max;       /* allocator max ID */
-       int xcmisc_opcode;      /* major opcode for XC-MISC */
-       struct _XkbInfoRec *xkb_info; /* XKB info */
-       struct _XtransConnInfo *trans_conn; /* transport connection object */
-};
-
-#define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n)
-
-/*
- * define the following if you want the Data macro to be a procedure instead
- */
-#ifdef CRAY
-#define DataRoutineIsProcedure
-#endif /* CRAY */
-
-#ifndef _XEVENT_
-/*
- * _QEvent datatype for use in input queueing.
- */
-typedef struct _XSQEvent
-{
-    struct _XSQEvent *next;
-    XEvent event;
-    unsigned long qserial_num; /* so multi-threaded code can find new ones */
-} _XQEvent;
-#endif
-
-#ifdef XTHREADS                        /* for xReply */
-#define NEED_REPLIES
-#endif
-
-#if NeedFunctionPrototypes     /* prototypes require event type definitions */
-#define NEED_EVENTS
-#define NEED_REPLIES
-#endif
-#include <X11/Xproto.h>
-#include <errno.h>
-#define _XBCOPYFUNC _Xbcopy
-#include <X11/Xfuncs.h>
-#include <X11/Xosdefs.h>
-
-/* Utek leaves kernel macros around in include files (bleah) */
-#ifdef dirty
-#undef dirty
-#endif
-
-#ifndef X_NOT_STDC_ENV
-#include <stdlib.h>
-#include <string.h>
-#else
-char *malloc(), *realloc(), *calloc();
-void exit();
-#ifdef SYSV
-#include <string.h>
-#else
-#include <strings.h>
-#endif
-#endif
-
-/*
- * The following definitions can be used for locking requests in multi-threaded
- * address spaces.
- */
-#ifdef XTHREADS
-/* Author: Stephen Gildea, MIT X Consortium
- *
- * declarations for C Threads locking
- */
-
-#include <X11/Xfuncproto.h>
-
-struct _XLockPtrs {
-    /* used by all, including extensions; do not move */
-    void (*lock_display)();
-    void (*unlock_display)();
-};
-
-typedef struct _LockInfoRec *LockInfoPtr;
-
-#if defined(WIN32) && !defined(_XLIBINT_)
-#define _XCreateMutex_fn (*_XCreateMutex_fn_p)
-#define _XFreeMutex_fn (*_XFreeMutex_fn_p)
-#define _XLockMutex_fn (*_XLockMutex_fn_p)
-#define _XUnlockMutex_fn (*_XUnlockMutex_fn_p)
-#define _Xglobal_lock (*_Xglobal_lock_p)
-#endif
-
-/* in XlibInt.c */
-extern void (*_XCreateMutex_fn)(
-#if NeedFunctionPrototypes
-    LockInfoPtr /* lock */
-#endif
-);
-extern void (*_XFreeMutex_fn)(
-#if NeedFunctionPrototypes
-    LockInfoPtr /* lock */
-#endif
-);
-extern void (*_XLockMutex_fn)(
-#if NeedFunctionPrototypes
-    LockInfoPtr        /* lock */
-#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
-    , char * /* file */
-    , int /* line */
-#endif
-#endif
-);
-extern void (*_XUnlockMutex_fn)(
-#if NeedFunctionPrototypes
-    LockInfoPtr        /* lock */
-#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
-    , char * /* file */
-    , int /* line */
-#endif
-#endif
-);
-
-extern LockInfoPtr _Xglobal_lock;
-
-#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
-#define LockDisplay(d)      if ((d)->lock_fns) (*(d)->lock_fns->lock_display)((d),__FILE__,__LINE__)
-#define UnlockDisplay(d)     if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)((d),__FILE__,__LINE__)
-#define _XLockMutex(lock)              if (_XLockMutex_fn) (*_XLockMutex_fn)(lock,__FILE__,__LINE__)
-#define _XUnlockMutex(lock)    if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock,__FILE__,__LINE__)
-#else
-/* used everywhere, so must be fast if not using threads */
-#define LockDisplay(d)      if ((d)->lock_fns) (*(d)->lock_fns->lock_display)(d)
-#define UnlockDisplay(d)     if ((d)->lock_fns) (*(d)->lock_fns->unlock_display)(d)
-#define _XLockMutex(lock)              if (_XLockMutex_fn) (*_XLockMutex_fn)(lock)
-#define _XUnlockMutex(lock)    if (_XUnlockMutex_fn) (*_XUnlockMutex_fn)(lock)
-#endif
-#define _XCreateMutex(lock)    if (_XCreateMutex_fn) (*_XCreateMutex_fn)(lock);
-#define _XFreeMutex(lock)      if (_XFreeMutex_fn) (*_XFreeMutex_fn)(lock);
-
-#else /* XTHREADS */
-#define LockDisplay(dis)
-#define _XLockMutex(lock)
-#define _XUnlockMutex(lock)
-#define UnlockDisplay(dis)
-#define _XCreateMutex(lock)
-#define _XFreeMutex(lock)
-#endif
-
-#define Xfree(ptr) free((ptr))
-
-/*
- * Note that some machines do not return a valid pointer for malloc(0), in
- * which case we provide an alternate under the control of the
- * define MALLOC_0_RETURNS_NULL.  This is necessary because some
- * Xlib code expects malloc(0) to return a valid pointer to storage.
- */
-#ifdef MALLOC_0_RETURNS_NULL
-
-# define Xmalloc(size) malloc(((size) == 0 ? 1 : (size)))
-# define Xrealloc(ptr, size) realloc((ptr), ((size) == 0 ? 1 : (size)))
-# define Xcalloc(nelem, elsize) calloc(((nelem) == 0 ? 1 : (nelem)), (elsize))
-
-#else
-
-# define Xmalloc(size) malloc((size))
-# define Xrealloc(ptr, size) realloc((ptr), (size))
-# define Xcalloc(nelem, elsize) calloc((nelem), (elsize))
-
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-#define LOCKED 1
-#define UNLOCKED 0
-
-#ifdef X_NOT_STDC_ENV
-extern int errno;                      /* Internal system error number. */
-#endif
-
-#ifndef BUFSIZE
-#define BUFSIZE 2048                   /* X output buffer size. */
-#endif
-#ifndef PTSPERBATCH
-#define PTSPERBATCH 1024               /* point batching */
-#endif
-#ifndef WLNSPERBATCH
-#define WLNSPERBATCH 50                        /* wide line batching */
-#endif
-#ifndef ZLNSPERBATCH
-#define ZLNSPERBATCH 1024              /* thin line batching */
-#endif
-#ifndef WRCTSPERBATCH
-#define WRCTSPERBATCH 10               /* wide line rectangle batching */
-#endif
-#ifndef ZRCTSPERBATCH
-#define ZRCTSPERBATCH 256              /* thin line rectangle batching */
-#endif
-#ifndef FRCTSPERBATCH
-#define FRCTSPERBATCH 256              /* filled rectangle batching */
-#endif
-#ifndef FARCSPERBATCH
-#define FARCSPERBATCH 256              /* filled arc batching */
-#endif
-#ifndef CURSORFONT
-#define CURSORFONT "cursor"            /* standard cursor fonts */
-#endif
-
-/*
- * Display flags
- */
-#define XlibDisplayIOError     (1L << 0)
-#define XlibDisplayClosing     (1L << 1)
-#define XlibDisplayNoXkb       (1L << 2)
-#define XlibDisplayPrivSync    (1L << 3)
-#define XlibDisplayProcConni   (1L << 4) /* in _XProcessInternalConnection */
-#define XlibDisplayReadEvents  (1L << 5) /* in _XReadEvents */
-#define XlibDisplayReply       (1L << 5) /* in _XReply */
-#define XlibDisplayWriting     (1L << 6) /* in _XFlushInt, _XSend */
-
-/*
- * X Protocol packetizing macros.
- */
-
-/*   Need to start requests on 64 bit word boundaries
- *   on a CRAY computer so add a NoOp (127) if needed.
- *   A character pointer on a CRAY computer will be non-zero
- *   after shifting right 61 bits of it is not pointing to
- *   a word boundary.
- */
-#ifdef WORD64
-#define WORD64ALIGN if ((long)dpy->bufptr >> 61) {\
-           dpy->last_req = dpy->bufptr;\
-           *(dpy->bufptr)   = X_NoOperation;\
-           *(dpy->bufptr+1) =  0;\
-           *(dpy->bufptr+2) =  0;\
-           *(dpy->bufptr+3) =  1;\
-             dpy->request++;\
-             dpy->bufptr += 4;\
-         }
-#else /* else does not require alignment on 64-bit boundaries */
-#define WORD64ALIGN
-#endif /* WORD64 */
-
-
-/*
- * GetReq - Get the next available X request packet in the buffer and
- * return it. 
- *
- * "name" is the name of the request, e.g. CreatePixmap, OpenFont, etc.
- * "req" is the name of the request pointer.
- *
- */
-
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
-#define GetReq(name, req) \
-        WORD64ALIGN\
-       if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
-               _XFlush(dpy);\
-       req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
-       req->reqType = X_##name;\
-       req->length = (SIZEOF(x##name##Req))>>2;\
-       dpy->bufptr += SIZEOF(x##name##Req);\
-       dpy->request++
-
-#else  /* non-ANSI C uses empty comment instead of "##" for token concatenation */
-#define GetReq(name, req) \
-        WORD64ALIGN\
-       if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
-               _XFlush(dpy);\
-       req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
-       req->reqType = X_/**/name;\
-       req->length = (SIZEOF(x/**/name/**/Req))>>2;\
-       dpy->bufptr += SIZEOF(x/**/name/**/Req);\
-       dpy->request++
-#endif
-
-/* GetReqExtra is the same as GetReq, but allocates "n" additional
-   bytes after the request. "n" must be a multiple of 4!  */
-
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
-#define GetReqExtra(name, n, req) \
-        WORD64ALIGN\
-       if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\
-               _XFlush(dpy);\
-       req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
-       req->reqType = X_##name;\
-       req->length = (SIZEOF(x##name##Req) + n)>>2;\
-       dpy->bufptr += SIZEOF(x##name##Req) + n;\
-       dpy->request++
-#else
-#define GetReqExtra(name, n, req) \
-        WORD64ALIGN\
-       if ((dpy->bufptr + SIZEOF(x/**/name/**/Req) + n) > dpy->bufmax)\
-               _XFlush(dpy);\
-       req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
-       req->reqType = X_/**/name;\
-       req->length = (SIZEOF(x/**/name/**/Req) + n)>>2;\
-       dpy->bufptr += SIZEOF(x/**/name/**/Req) + n;\
-       dpy->request++
-#endif
-
-
-/*
- * GetResReq is for those requests that have a resource ID 
- * (Window, Pixmap, GContext, etc.) as their single argument.
- * "rid" is the name of the resource. 
- */
-
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
-#define GetResReq(name, rid, req) \
-        WORD64ALIGN\
-       if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
-           _XFlush(dpy);\
-       req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
-       req->reqType = X_##name;\
-       req->length = 2;\
-       req->id = (rid);\
-       dpy->bufptr += SIZEOF(xResourceReq);\
-       dpy->request++
-#else
-#define GetResReq(name, rid, req) \
-        WORD64ALIGN\
-       if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
-           _XFlush(dpy);\
-       req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
-       req->reqType = X_/**/name;\
-       req->length = 2;\
-       req->id = (rid);\
-       dpy->bufptr += SIZEOF(xResourceReq);\
-       dpy->request++
-#endif
-
-/*
- * GetEmptyReq is for those requests that have no arguments
- * at all. 
- */
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
-#define GetEmptyReq(name, req) \
-        WORD64ALIGN\
-       if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
-           _XFlush(dpy);\
-       req = (xReq *) (dpy->last_req = dpy->bufptr);\
-       req->reqType = X_##name;\
-       req->length = 1;\
-       dpy->bufptr += SIZEOF(xReq);\
-       dpy->request++
-#else
-#define GetEmptyReq(name, req) \
-        WORD64ALIGN\
-       if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
-           _XFlush(dpy);\
-       req = (xReq *) (dpy->last_req = dpy->bufptr);\
-       req->reqType = X_/**/name;\
-       req->length = 1;\
-       dpy->bufptr += SIZEOF(xReq);\
-       dpy->request++
-#endif
-
-#ifdef WORD64
-#define MakeBigReq(req,n) \
-    { \
-    char _BRdat[4]; \
-    unsigned long _BRlen = req->length - 1; \
-    req->length = 0; \
-    memcpy(_BRdat, ((char *)req) + (_BRlen << 2), 4); \
-    memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \
-    memcpy(((char *)req) + 4, _BRdat, 4); \
-    Data32(dpy, (long *)&_BRdat, 4); \
-    }
-#else
-#define MakeBigReq(req,n) \
-    { \
-    long _BRdat; \
-    unsigned long _BRlen = req->length - 1; \
-    req->length = 0; \
-    _BRdat = ((long *)req)[_BRlen]; \
-    memmove(((char *)req) + 8, ((char *)req) + 4, _BRlen << 2); \
-    ((unsigned long *)req)[1] = _BRlen + n + 2; \
-    Data32(dpy, &_BRdat, 4); \
-    }
-#endif
-
-#define SetReqLen(req,n,badlen) \
-    if ((req->length + n) > (unsigned)65535) { \
-       if (dpy->bigreq_size) { \
-           MakeBigReq(req,n) \
-       } else { \
-           n = badlen; \
-           req->length += n; \
-       } \
-    } else \
-       req->length += n
-
-#define SyncHandle() \
-       if (dpy->synchandler) (*dpy->synchandler)(dpy)
-
-#define FlushGC(dpy, gc) \
-       if ((gc)->dirty) _XFlushGCCache((dpy), (gc))
-/*
- * Data - Place data in the buffer and pad the end to provide
- * 32 bit word alignment.  Transmit if the buffer fills.
- *
- * "dpy" is a pointer to a Display.
- * "data" is a pinter to a data buffer.
- * "len" is the length of the data buffer.
- */
-#ifndef DataRoutineIsProcedure
-#define Data(dpy, data, len) \
-       if (dpy->bufptr + (len) <= dpy->bufmax) {\
-               memcpy(dpy->bufptr, data, (int)len);\
-               dpy->bufptr += ((len) + 3) & ~3;\
-       } else\
-               _XSend(dpy, data, len)
-#endif /* DataRoutineIsProcedure */
-
-
-/* Allocate bytes from the buffer.  No padding is done, so if
- * the length is not a multiple of 4, the caller must be
- * careful to leave the buffer aligned after sending the
- * current request.
- *
- * "type" is the type of the pointer being assigned to.
- * "ptr" is the pointer being assigned to.
- * "n" is the number of bytes to allocate.
- *
- * Example: 
- *    xTextElt *elt;
- *    BufAlloc (xTextElt *, elt, nbytes)
- */
-
-#define BufAlloc(type, ptr, n) \
-    if (dpy->bufptr + (n) > dpy->bufmax) \
-        _XFlush (dpy); \
-    ptr = (type) dpy->bufptr; \
-    dpy->bufptr += (n);
-
-#ifdef WORD64
-#define Data16(dpy, data, len) _XData16(dpy, (short *)data, len)
-#define Data32(dpy, data, len) _XData32(dpy, (long *)data, len)
-#else
-#define Data16(dpy, data, len) Data((dpy), (char *)(data), (len))
-#define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len))
-#define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))
-#ifdef LONG64
-#define Data32(dpy, data, len) _XData32(dpy, (long *)data, len)
-#else
-#define Data32(dpy, data, len) Data((dpy), (char *)(data), (len))
-#define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))
-#endif
-#endif /* not WORD64 */
-
-#define PackData16(dpy,data,len) Data16 (dpy, data, len)
-#define PackData32(dpy,data,len) Data32 (dpy, data, len)
-
-/* Xlib manual is bogus */
-#define PackData(dpy,data,len) PackData16 (dpy, data, len)
-
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-#define max(a,b) (((a) > (b)) ? (a) : (b))
-
-#define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \
-                            (((cs)->rbearing|(cs)->lbearing| \
-                              (cs)->ascent|(cs)->descent) == 0))
-
-/* 
- * CI_GET_CHAR_INFO_1D - return the charinfo struct for the indicated 8bit
- * character.  If the character is in the column and exists, then return the
- * appropriate metrics (note that fonts with common per-character metrics will
- * return min_bounds).  If none of these hold true, try again with the default
- * char.
- */
-#define CI_GET_CHAR_INFO_1D(fs,col,def,cs) \
-{ \
-    cs = def; \
-    if (col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
-       if (fs->per_char == NULL) { \
-           cs = &fs->min_bounds; \
-       } else { \
-           cs = &fs->per_char[(col - fs->min_char_or_byte2)]; \
-           if (CI_NONEXISTCHAR(cs)) cs = def; \
-       } \
-    } \
-}
-
-#define CI_GET_DEFAULT_INFO_1D(fs,cs) \
-  CI_GET_CHAR_INFO_1D (fs, fs->default_char, NULL, cs)
-
-
-
-/*
- * CI_GET_CHAR_INFO_2D - return the charinfo struct for the indicated row and 
- * column.  This is used for fonts that have more than row zero.
- */
-#define CI_GET_CHAR_INFO_2D(fs,row,col,def,cs) \
-{ \
-    cs = def; \
-    if (row >= fs->min_byte1 && row <= fs->max_byte1 && \
-       col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
-       if (fs->per_char == NULL) { \
-           cs = &fs->min_bounds; \
-       } else { \
-           cs = &fs->per_char[((row - fs->min_byte1) * \
-                               (fs->max_char_or_byte2 - \
-                                fs->min_char_or_byte2 + 1)) + \
-                              (col - fs->min_char_or_byte2)]; \
-           if (CI_NONEXISTCHAR(cs)) cs = def; \
-        } \
-    } \
-}
-
-#define CI_GET_DEFAULT_INFO_2D(fs,cs) \
-{ \
-    unsigned int r = (fs->default_char >> 8); \
-    unsigned int c = (fs->default_char & 0xff); \
-    CI_GET_CHAR_INFO_2D (fs, r, c, NULL, cs); \
-}
-
-
-#ifdef MUSTCOPY
-
-/* for when 32-bit alignment is not good enough */
-#define OneDataCard32(dpy,dstaddr,srcvar) \
-  { dpy->bufptr -= 4; Data32 (dpy, (char *) &(srcvar), 4); }
-
-#else
-
-/* srcvar must be a variable for large architecture version */
-#define OneDataCard32(dpy,dstaddr,srcvar) \
-  { *(CARD32 *)(dstaddr) = (srcvar); }
-
-#endif /* MUSTCOPY */
-
-typedef struct _XInternalAsync {
-    struct _XInternalAsync *next;
-    Bool (*handler)();
-    XPointer data;
-} _XAsyncHandler;
-
-typedef struct _XAsyncEState {
-    unsigned long min_sequence_number;
-    unsigned long max_sequence_number;
-    unsigned char error_code;
-    unsigned char major_opcode;
-    unsigned short minor_opcode;
-    unsigned char last_error_received;
-    int error_count;
-} _XAsyncErrorState;
-
-#define DeqAsyncHandler(dpy,handler) { \
-    if (dpy->async_handlers == (handler)) \
-       dpy->async_handlers = (handler)->next; \
-    else \
-       _XDeqAsyncHandler(dpy, handler); \
-    }
-
-/*
- * This structure is private to the library.
- */
-typedef struct _XFreeFuncs {
-    void (*atoms)();           /* _XFreeAtomTable */
-    int (*modifiermap)();      /* XFreeModifierMap */
-    void (*key_bindings)();    /* _XFreeKeyBindings */
-    void (*context_db)();      /* _XFreeContextDB */
-    void (*defaultCCCs)();     /* _XcmsFreeDefaultCCCs */
-    void (*clientCmaps)();     /* _XcmsFreeClientCmaps */
-    void (*intensityMaps)();   /* _XcmsFreeIntensityMaps */
-    void (*im_filters)();      /* _XFreeIMFilters */
-    void (*xkb)();             /* _XkbFreeInfo */
-} _XFreeFuncRec;
-
-/*
- * This structure is private to the library.
- */
-typedef struct _XExten {       /* private to extension mechanism */
-       struct _XExten *next;   /* next in list */
-       XExtCodes codes;        /* public information, all extension told */
-       int (*create_GC)();     /* routine to call when GC created */
-       int (*copy_GC)();       /* routine to call when GC copied */
-       int (*flush_GC)();      /* routine to call when GC flushed */
-       int (*free_GC)();       /* routine to call when GC freed */
-       int (*create_Font)();   /* routine to call when Font created */
-       int (*free_Font)();     /* routine to call when Font freed */
-       int (*close_display)(); /* routine to call when connection closed */
-       int (*error)();         /* who to call when an error occurs */
-        char *(*error_string)();  /* routine to supply error string */
-       char *name;             /* name of this extension */
-       void (*error_values)(); /* routine to supply error values */
-       void (*before_flush)(); /* routine to call when sending data */
-       struct _XExten *next_flush; /* next in list of those with flushes */
-} _XExtension;
-
-/* extension hooks */
-
-_XFUNCPROTOBEGIN
-
-#ifdef DataRoutineIsProcedure
-extern void Data();
-#endif
-extern int _XError(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */,
-    xError*    /* rep */
-#endif
-);
-extern int _XIOError(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */
-#endif
-);
-extern int (*_XIOErrorFunction)(
-#if NeedNestedPrototypes
-    Display*   /* dpy */
-#endif
-);
-extern int (*_XErrorFunction)(
-#if NeedNestedPrototypes
-    Display*           /* dpy */,
-    XErrorEvent*       /* error_event */
-#endif
-);
-extern void _XEatData(
-#if NeedFunctionPrototypes
-    Display*           /* dpy */,
-    unsigned long      /* n */
-#endif
-);
-extern char *_XAllocScratch(
-#if NeedFunctionPrototypes
-    Display*           /* dpy */,
-    unsigned long      /* nbytes */
-#endif
-);
-extern char *_XAllocTemp(
-#if NeedFunctionPrototypes
-    Display*           /* dpy */,
-    unsigned long      /* nbytes */
-#endif
-);
-extern void _XFreeTemp(
-#if NeedFunctionPrototypes
-    Display*           /* dpy */,
-    char*              /* buf */,
-    unsigned long      /* nbytes */
-#endif
-);
-extern Visual *_XVIDtoVisual(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */,
-    VisualID   /* id */
-#endif
-);
-extern unsigned long _XSetLastRequestRead(
-#if NeedFunctionPrototypes
-    Display*           /* dpy */,
-    xGenericReply*     /* rep */
-#endif
-);
-extern int _XGetHostname(
-#if NeedFunctionPrototypes
-    char*      /* buf */,
-    int                /* maxlen */
-#endif
-);
-extern Screen *_XScreenOfWindow(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */,
-    Window     /* w */
-#endif
-);
-extern Bool _XAsyncErrorHandler(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */,
-    xReply*    /* rep */,
-    char*      /* buf */,
-    int                /* len */,
-    XPointer   /* data */
-#endif
-);
-extern char *_XGetAsyncReply(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */,
-    char*      /* replbuf */,
-    xReply*    /* rep */,
-    char*      /* buf */,
-    int                /* len */,
-    int                /* extra */,
-    Bool       /* discard */
-#endif
-);
-extern _XFlush(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */
-#endif
-);
-extern int _XEventsQueued(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */,
-    int        /* mode */
-#endif
-);
-extern _XReadEvents(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */
-#endif
-);
-extern _XRead(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */,
-    char*      /* data */,
-    long       /* size */
-#endif
-);
-extern _XReadPad(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */,
-    char*      /* data */,
-    long       /* size */
-#endif
-);
-extern _XSend(
-#if NeedFunctionPrototypes
-    Display*           /* dpy */,
-    _Xconst char*      /* data */,
-    long               /* size */
-#endif
-);
-extern Status _XReply(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */,
-    xReply*    /* rep */,
-    int                /* extra */,
-    Bool       /* discard */
-#endif
-);
-extern _XEnq(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */,
-    xEvent*    /* event */
-#endif
-);
-extern _XDeq(
-#if NeedFunctionPrototypes
-    Display*   /* dpy */,
-    _XQEvent*  /* prev */,
-    _XQEvent*  /* qelt */
-#endif
-);
-
-extern int (*XESetCreateGC(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* extension */,
-    int (*) (
-#if NeedNestedPrototypes
-             Display*                  /* display */,
-             GC                        /* gc */,
-             XExtCodes*                /* codes */
-#endif
-           )           /* proc */
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, GC, XExtCodes*
-#endif
-);
-
-extern int (*XESetCopyGC(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* extension */,
-    int (*) (
-#if NeedNestedPrototypes
-             Display*                  /* display */,
-              GC                       /* gc */,
-              XExtCodes*               /* codes */
-#endif
-            )          /* proc */            
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, GC, XExtCodes*
-#endif
-);
-
-extern int (*XESetFlushGC(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* extension */,
-    int (*) (
-#if NeedNestedPrototypes
-             Display*                  /* display */,
-              GC                       /* gc */,
-              XExtCodes*               /* codes */
-#endif
-            )          /* proc */           
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, GC, XExtCodes*
-#endif
-);
-
-extern int (*XESetFreeGC(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* extension */,
-    int (*) (
-#if NeedNestedPrototypes
-             Display*                  /* display */,
-              GC                       /* gc */,
-              XExtCodes*               /* codes */
-#endif
-            )          /* proc */           
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, GC, XExtCodes*
-#endif
-);
-
-extern int (*XESetCreateFont(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* extension */,
-    int (*) (
-#if NeedNestedPrototypes
-             Display*                  /* display */,
-              XFontStruct*             /* fs */,
-              XExtCodes*               /* codes */
-#endif
-            )          /* proc */    
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, XFontStruct*, XExtCodes*
-#endif
-);
-
-extern int (*XESetFreeFont(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* extension */,
-    int (*) (
-#if NeedNestedPrototypes
-             Display*                  /* display */,
-              XFontStruct*             /* fs */,
-              XExtCodes*               /* codes */
-#endif
-            )          /* proc */    
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, XFontStruct*, XExtCodes*
-#endif
-); 
-
-extern int (*XESetCloseDisplay(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* extension */,
-    int (*) (
-#if NeedNestedPrototypes
-             Display*                  /* display */,
-              XExtCodes*               /* codes */
-#endif
-            )          /* proc */    
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, XExtCodes*
-#endif
-);
-
-extern int (*XESetError(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* extension */,
-    int (*) (
-#if NeedNestedPrototypes
-             Display*                  /* display */,
-              xError*                  /* err */,
-              XExtCodes*               /* codes */,
-              int*                     /* ret_code */
-#endif
-            )          /* proc */    
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, xError*, XExtCodes*, int*
-#endif
-);
-
-extern char* (*XESetErrorString(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* extension */,
-    char* (*) (
-#if NeedNestedPrototypes
-               Display*                /* display */,
-                int                    /* code */,
-                XExtCodes*             /* codes */,
-                char*                  /* buffer */,
-                int                    /* nbytes */
-#endif
-              )                /* proc */             
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, int, XExtCodes*, char*, int
-#endif
-);
-
-extern void (*XESetPrintErrorValues (
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* extension */,
-    void (*)(
-#if NeedNestedPrototypes
-             Display*                  /* display */,
-             XErrorEvent*              /* ev */,
-             void*                     /* fp */
-#endif
-            )          /* proc */
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, XErrorEvent*, void*
-#endif
-);
-
-extern Bool (*XESetWireToEvent(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* event_number */,
-    Bool (*) (
-#if NeedNestedPrototypes
-              Display*                 /* display */,
-               XEvent*                 /* re */,
-               xEvent*                 /* event */
-#endif
-             )         /* proc */    
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, XEvent*, xEvent*
-#endif
-);
-
-extern Status (*XESetEventToWire(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* event_number */,
-    Status (*) (
-#if NeedNestedPrototypes
-             Display*                  /* display */,
-              XEvent*                  /* re */,
-              xEvent*                  /* event */
-#endif
-            )          /* proc */   
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, XEvent*, xEvent*
-#endif
-);
-
-extern Bool (*XESetWireToError(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* error_number */,
-    Bool (*) (
-#if NeedNestedPrototypes
-              Display*                 /* display */,
-              XErrorEvent*             /* he */,
-              xError*                  /* we */
-#endif
-            )          /* proc */   
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, XErrorEvent*, xError*
-#endif
-);
-
-extern void (*XESetBeforeFlush(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* error_number */,
-    void (*) (
-#if NeedNestedPrototypes
-              Display*                 /* display */,
-              XExtCodes*               /* codes */,
-              char*                    /* data */,
-              long                     /* len */
-#endif
-            )          /* proc */   
-#endif
-))(
-#if NeedNestedPrototypes
-    Display*, XExtCodes*, char*, long
-#endif
-);
-
-/* internal connections for IMs */
-
-typedef void (*_XInternalConnectionProc)(
-#if NeedFunctionPrototypes
-    Display*                   /* dpy */,
-    int                                /* fd */,
-    XPointer                   /* call_data */
-#endif
-);
-
-
-extern Status _XRegisterInternalConnection(
-#if NeedFunctionPrototypes
-    Display*                   /* dpy */,
-    int                                /* fd */,
-    _XInternalConnectionProc   /* callback */,
-    XPointer                   /* call_data */
-#endif
-);
-
-extern void _XUnregisterInternalConnection(
-#if NeedFunctionPrototypes
-    Display*                   /* dpy */,
-    int                                /* fd */
-#endif
-);
-
-/* Display structure has pointers to these */
-
-struct _XConnectionInfo {      /* info from _XRegisterInternalConnection */
-    int fd;
-    _XInternalConnectionProc read_callback;
-    XPointer call_data;
-    XPointer *watch_data;      /* set/used by XConnectionWatchProc */
-    struct _XConnectionInfo *next;
-};
-
-struct _XConnWatchInfo {       /* info from XAddConnectionWatch */
-    XConnectionWatchProc fn;
-    XPointer client_data;
-    struct _XConnWatchInfo *next;
-};
-
-extern int XTextHeight(
-#if NeedFunctionPrototypes
-    XFontStruct*       /* font_struct */,
-    _Xconst char*      /* string */,
-    int                        /* count */
-#endif
-);
-
-extern int XTextHeight16(
-#if NeedFunctionPrototypes
-    XFontStruct*       /* font_struct */,
-    _Xconst XChar2b*   /* string */,
-    int                        /* count */
-#endif
-);
-
-_XFUNCPROTOEND
diff --git a/cde/programs/dtudcfonted/libfal/_fallocking.h b/cde/programs/dtudcfonted/libfal/_fallocking.h
deleted file mode 100644 (file)
index fb1c8cb..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* locking.h 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:43     */ 
-/* $XConsortium: _fallocking.h /main/1 1996/04/08 15:21:32 cde-fuj $ */
-/* 
-
-Copyright (c) 1992  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
-
-*/
-
-/*
- * Author: Stephen Gildea, MIT X Consortium
- *
- * locking.h - data types for C Threads locking.
- * Used by XlibInt.c, locking.c, LockDis.c
- */
-
-#ifndef _X_locking_H_
-#define _X_locking_H_
-
-#define xmalloc(s) Xmalloc(s)
-#define xfree(s) Xfree(s)
-#include <X11/Xthreads.h>
-
-struct _XCVList {
-    xcondition_t cv;
-    xReply *buf;
-    struct _XCVList *next;
-};
-
-extern xthread_t (*_Xthread_self_fn)( /* in XlibInt.c */
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-/* Display->lock is a pointer to one of these */
-
-struct _XLockInfo {
-       xmutex_t mutex;         /* mutex for critical sections */
-       int reply_bytes_left;   /* nbytes of the reply still to read */
-       Bool reply_was_read;    /* _XReadEvents read a reply for _XReply */
-       struct _XCVList *reply_awaiters; /* list of CVs for _XReply */
-       struct _XCVList **reply_awaiters_tail;
-       struct _XCVList *event_awaiters; /* list of CVs for _XReadEvents */
-       struct _XCVList **event_awaiters_tail;
-       Bool reply_first;       /* who may read, reply queue or event queue */
-       /* for XLockDisplay */
-       int locking_level;      /* how many times into XLockDisplay we are */
-       xthread_t locking_thread; /* thread that did XLockDisplay */
-       xcondition_t cv;        /* wait if another thread has XLockDisplay */
-       xthread_t reading_thread; /* cache */
-       xthread_t conni_thread; /* thread in XProcessInternalConnection */
-       xcondition_t writers;   /* wait for writable */
-       int num_free_cvls;
-       struct _XCVList *free_cvls;
-       /* used only in XlibInt.c */
-       void (*pop_reader)(
-#if NeedNestedPrototypes
-                          Display* /* dpy */,
-                          struct _XCVList** /* list */,
-                          struct _XCVList*** /* tail */
-#endif
-                          );
-       struct _XCVList *(*push_reader)(
-#if NeedNestedPrototypes
-                                       Display *          /* dpy */,
-                                       struct _XCVList*** /* tail */
-#endif
-                                       );
-       void (*condition_wait)(
-#if NeedNestedPrototypes
-                              xcondition_t /* cv */,
-                              xmutex_t /* mutex */
-#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
-                              , char* /* file */,
-                              int /* line */
-#endif
-#endif
-                              );
-       void (*internal_lock_display)(
-#if NeedNestedPrototypes
-                                     Display* /* dpy */,
-                                     Bool /* wskip */
-#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
-                                     , char* /* file */,
-                                     int /* line */
-#endif
-#endif
-                                     );
-       /* used in XlibInt.c and locking.c */
-       void (*condition_signal)(
-#if NeedNestedPrototypes
-                                xcondition_t /* cv */
-#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
-                                , char* /* file */,
-                                int /* line */
-#endif
-#endif
-                                );
-       void (*condition_broadcast)(
-#if NeedNestedPrototypes
-                                xcondition_t /* cv */
-#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
-                                , char* /* file */,
-                                int /* line */
-#endif
-#endif
-                                   );
-       /* used in XlibInt.c and XLockDis.c */
-       void (*lock_wait)(
-#if NeedNestedPrototypes
-                         Display* /* dpy */
-#endif
-                         );
-       void (*user_lock_display)(
-#if NeedNestedPrototypes
-                                 Display* /* dpy */
-#endif
-                                 );
-       void (*user_unlock_display)(
-#if NeedNestedPrototypes
-                                   Display* /* dpy */
-#endif
-                                   );
-       struct _XCVList *(*create_cvl)(
-#if NeedNestedPrototypes
-                                      Display * /* dpy */
-#endif
-                                      );
-};
-
-#define UnlockNextEventReader(d) if ((d)->lock) \
-    (*(d)->lock->pop_reader)((d),&(d)->lock->event_awaiters,&(d)->lock->event_awaiters_tail)
-
-#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
-#define ConditionWait(d,c) if ((d)->lock) \
-       (*(d)->lock->condition_wait)(c, (d)->lock->mutex,__FILE__,__LINE__)
-#define ConditionSignal(d,c) if ((d)->lock) \
-       (*(d)->lock->condition_signal)(c,__FILE__,__LINE__)
-#define ConditionBroadcast(d,c) if ((d)->lock) \
-       (*(d)->lock->condition_broadcast)(c,__FILE__,__LINE__)
-#else
-#define ConditionWait(d,c) if ((d)->lock) \
-       (*(d)->lock->condition_wait)(c, (d)->lock->mutex)
-#define ConditionSignal(d,c) if ((d)->lock) \
-       (*(d)->lock->condition_signal)(c)
-#define ConditionBroadcast(d,c) if ((d)->lock) \
-       (*(d)->lock->condition_broadcast)(c)
-#endif
-
-typedef struct _LockInfoRec {
-       xmutex_t        lock;
-} LockInfoRec;
-
-#endif /* _X_locking_H_ */
diff --git a/cde/programs/dtudcfonted/libfal/_falomGeneric.c b/cde/programs/dtudcfonted/libfal/_falomGeneric.c
deleted file mode 100644 (file)
index 7069bb4..0000000
+++ /dev/null
@@ -1,1944 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* omGeneric.c 1.9 - Fujitsu source for CDEnext    96/04/26 11:20:11   */ 
-/* $XConsortium: _falomGeneric.c /main/4 1996/09/27 19:03:50 drk $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-/*
- * Copyright 1995 by FUJITSU LIMITED
- * This is source code modified by FUJITSU LIMITED under the Joint
- * Development Agreement for the CDEnext PST.
- * This is unpublished proprietary source code of FUJITSU LIMITED
- *
- * Modifier: Takanori Tateno   FUJITSU LIMITED
- *
- */
-
-#include "_fallibint.h"
-#include "_falomGeneric.h"
-#include <X11/Xos.h>
-#include <X11/Xatom.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#define MAXFONTS               100
-#define        PIXEL_SIZE_FIELD         7
-#define        POINT_SIZE_FIELD         8
-#define        CHARSET_ENCODING_FIELD  14
-
-extern int _falmbDefaultTextEscapement(), _falwcDefaultTextEscapement();
-extern int _falmbDefaultTextExtents(), _falwcDefaultTextExtents();
-extern Status _falmbDefaultTextPerCharExtents(), _falwcDefaultTextPerCharExtents();
-extern int _falmbDefaultDrawString(), _falwcDefaultDrawString();
-extern void _falmbDefaultDrawImageString(), _falwcDefaultDrawImageString();
-
-extern int _falmbGenericTextEscapement(), _falwcGenericTextEscapement();
-extern int _falmbGenericTextExtents(), _falwcGenericTextExtents();
-extern Status _falmbGenericTextPerCharExtents(), _falwcGenericTextPerCharExtents();
-extern int _falmbGenericDrawString(), _falwcGenericDrawString();
-extern void _falmbGenericDrawImageString(), _falwcGenericDrawImageString();
-
-extern void dbg_printValue(char *str, char **value, int num);
-
-/* For VW/UDC start */
-
-static FontData
-init_fontdata(font_data, font_data_count)
-    FontData   font_data;
-    int                font_data_count;
-{
-    FontData   fd;
-    int                i;
-
-    fd = (FontData)Xmalloc(sizeof(FontDataRec) * font_data_count);
-    if(fd == (FontData) NULL)
-       return False;
-
-    memset(fd, 0x00, sizeof(FontData) * font_data_count);
-    for(i = 0 ; i < font_data_count ; i++)
-       fd[i] = font_data[i];
-
-    return fd;
-}
-
-static VRotate
-init_vrotate(font_data, font_data_count, type, code_range, code_range_num)
-    FontData   font_data;
-    int                font_data_count;
-    int                type;
-    CodeRange  code_range;
-    int                code_range_num;
-{
-    VRotate    vrotate;
-    int                i;
-
-    if(type == VROTATE_NONE)
-       return (VRotate)NULL;
-
-    vrotate = (VRotate)Xmalloc(sizeof(VRotateRec) * font_data_count);
-    if(vrotate == (VRotate) NULL)
-       return False;
-
-    memset(vrotate, 0x00, sizeof(VRotateRec) * font_data_count);
-    for(i = 0 ; i < font_data_count ; i++) {
-       vrotate[i].charset_name = font_data[i].name;
-       vrotate[i].side = font_data[i].side;
-       if(type == VROTATE_PART) {
-           vrotate[i].num_cr = code_range_num;
-           vrotate[i].code_range = code_range;
-       }
-    }
-
-    return vrotate;
-}
-
-static Bool
-init_fontset(oc)
-    XOC oc;
-{
-    XOCGenericPart *gen;
-    FontSet font_set;
-    OMData data;
-    int count;
-
-    count = XOM_GENERIC(oc->core.om)->data_num;
-    data = XOM_GENERIC(oc->core.om)->data;
-
-    font_set = (FontSet) Xmalloc(sizeof(FontSetRec) * count);
-    if (font_set == NULL)
-       return False;
-    memset((char *) font_set, 0x00, sizeof(FontSetRec) * count);
-
-    gen = XOC_GENERIC(oc);
-    gen->font_set_num = count;
-    gen->font_set = font_set;
-
-    for ( ; count-- > 0; data++, font_set++) {
-       font_set->charset_count = data->charset_count;
-       font_set->charset_list = data->charset_list;
-
-       if((font_set->font_data = init_fontdata(data->font_data,
-                                 data->font_data_count)) == NULL)
-           goto err;
-       font_set->font_data_count = data->font_data_count;
-       if((font_set->substitute = init_fontdata(data->substitute,
-                                  data->substitute_num)) == NULL)
-           goto err;
-       font_set->substitute_num = data->substitute_num;
-       if((font_set->vmap = init_fontdata(data->vmap,
-                            data->vmap_num)) == NULL)
-           goto err;
-       font_set->vmap_num       = data->vmap_num;
-
-       if(data->vrotate_type != VROTATE_NONE) {
-           /* A vrotate member is specified primary font data */
-           /* as initial value.                               */
-           if((font_set->vrotate = init_vrotate(data->font_data,
-                                                data->font_data_count,
-                                                data->vrotate_type,
-                                                data->vrotate,
-                                                data->vrotate_num)) == NULL)
-               goto err;
-           font_set->vrotate_num = data->font_data_count;
-       }
-    }
-    return True;
-
-err:
-    if(font_set->font_data)
-       Xfree(font_set->font_data);
-    if(font_set->substitute)
-       Xfree(font_set->substitute);
-    if(font_set->vmap)
-       Xfree(font_set->vmap);
-    if(font_set->vrotate)
-       Xfree(font_set->vrotate);
-    if(font_set)
-       Xfree(font_set);
-    gen->font_set = (FontSet) NULL;
-    gen->font_set_num = 0;
-    return False;
-}
-
-/* For VW/UDC end */
-
-static char *
-get_prop_name(dpy, fs)
-    Display *dpy;
-    XFontStruct        *fs;
-{
-    unsigned long fp;
-
-    if (falGetFontProperty(fs, XA_FONT, &fp))
-       return falGetAtomName(dpy, fp); 
-
-    return (char *) NULL;
-}
-
-static FontData
-check_charset(font_set, font_name)
-    FontSet font_set;
-    char *font_name;
-{
-    FontData font_data;
-    char *last;
-    int count, length, name_len;
-
-    name_len = strlen(font_name);
-    last = font_name + name_len;
-
-    count = font_set->font_data_count;
-    font_data = font_set->font_data;
-    for ( ; count-- > 0; font_data++) {
-       length = strlen(font_data->name);
-       if (length > name_len)
-           continue;
-       
-       if (_fallcCompareISOLatin1(last - length, font_data->name) == 0)
-           return font_data;
-    }
-
-    return (FontData) NULL;
-}
-
-static int
-check_fontname(oc, name, found_num)
-    XOC oc;
-    char *name;
-    int found_num;
-{
-    Display *dpy = oc->core.om->core.display;
-    XOCGenericPart *gen = XOC_GENERIC(oc);
-    FontData data;
-    FontSet font_set;
-    XFontStruct *fs_list;
-    char **fn_list, *fname, *prop_fname = NULL;
-    int list_num, font_set_num, i;
-    int list2_num;
-    char **fn2_list = NULL;
-
-    fn_list = falListFonts(dpy, name, MAXFONTS, &list_num);
-    if (fn_list == NULL)
-       return found_num;
-
-    for (i = 0; i < list_num; i++) {
-       fname = fn_list[i];
-
-       font_set = gen->font_set;
-       font_set_num = gen->font_set_num;
-
-       for ( ; font_set_num-- > 0; font_set++) {
-           if (font_set->font_name)
-               continue;
-
-           if ((data = check_charset(font_set, fname)) == NULL) {
-               if ((fn2_list = falListFontsWithInfo(dpy, name, MAXFONTS,
-                                             &list2_num, &fs_list))
-                   && (prop_fname = get_prop_name(dpy, fs_list))
-                   && (data = check_charset(font_set, prop_fname)))
-                   fname = prop_fname;
-           }
-           if (data) {
-               font_set->side = data->side;
-               font_set->font_name = (char *) Xmalloc(strlen(fname) + 1);
-               if (font_set->font_name) {
-                   strcpy(font_set->font_name, fname);
-                   found_num++;
-               }
-           }
-           if (fn2_list) {
-               falFreeFontInfo(fn2_list, fs_list, list2_num);
-               fn2_list = NULL;
-               if (prop_fname) {
-                   Xfree(prop_fname);
-                   prop_fname = NULL;
-               }
-           }
-           if (found_num == gen->font_set_num)
-               break;
-       }
-    }
-    falFreeFontNames(fn_list);
-    return found_num;
-}
-
-
-/* For VW/UDC start */
-
-static Bool
-load_fontdata(oc, font_data, font_data_num)
-    XOC                oc;
-    FontData   font_data;
-    int                font_data_num;
-{
-    Display    *dpy = oc->core.om->core.display;
-    FontData   fd = font_data;
-
-    for( ; font_data_num-- ; fd++) {
-       if(fd->xlfd_name != (char *) NULL && fd->font == NULL) {
-           fd->font = falLoadQueryFont(dpy, fd->xlfd_name);
-           if (fd->font == NULL)
-               return False;
-       }
-    }
-    return True;
-}
-
-static Bool
-load_font(oc)
-    XOC oc;
-{
-    int i;
-    XOCGenericPart *gen = XOC_GENERIC(oc);
-    FontSet font_set = gen->font_set;
-    int num = gen->font_set_num;
-
-    for ( ; num-- > 0; font_set++) {
-       if (font_set->font_name == NULL)
-           continue;
-
-       if(load_fontdata(oc, font_set->font_data,
-                        font_set->font_data_count) != True)
-           return False;
-
-       if(load_fontdata(oc, font_set->substitute,
-                        font_set->substitute_num) != True)
-           return False;
-
-       if(font_set->font_data_count > 0 && font_set->font_data->font) {
-           font_set->font = font_set->font_data->font;
-       } else if(font_set->substitute_num > 0 ) {
-           for(i=0;i<font_set->substitute_num;i++){
-               if(font_set->substitute[i].font != NULL){
-                   font_set->font = font_set->substitute[i].font;
-               }
-           }
-       }
-
-       load_fontdata(oc, font_set->vmap, font_set->vmap_num);
-       load_fontdata(oc, (FontData) font_set->vrotate,
-                        font_set->vrotate_num);
-
-       if (font_set->font->min_byte1 || font_set->font->max_byte1)
-           font_set->is_xchar2b = True;
-       else
-           font_set->is_xchar2b = False;
-    }
-
-    return True;
-}
-
-/* For VW/UDC end */
-
-static Bool
-load_font_info(oc)
-    XOC oc;
-{
-    Display *dpy = oc->core.om->core.display;
-    XOCGenericPart *gen = XOC_GENERIC(oc);
-    FontSet font_set = gen->font_set;
-    char **fn_list;
-    int fn_num, num = gen->font_set_num;
-
-    for ( ; num-- > 0; font_set++) {
-       if (font_set->font_name == NULL)
-           continue;
-
-       if (font_set->info == NULL) {
-           fn_list = falListFontsWithInfo(dpy, font_set->font_name, 1, &fn_num,
-                                        &font_set->info);
-           if (font_set->info == NULL)
-               return False;
-           
-           falFreeFontNames(fn_list);
-       }
-    }
-
-    return True;
-}
-
-/* For Vertical Writing start */
-
-static void
-check_fontset_extents(overall, logical_ascent, logical_descent, font)
-    XCharStruct                *overall;
-    int                        *logical_ascent, *logical_descent;
-    XFontStruct                *font;
-{
-    overall->lbearing = min(overall->lbearing, font->min_bounds.lbearing);
-    overall->rbearing = max(overall->rbearing, font->max_bounds.rbearing);
-    overall->ascent   = max(overall->ascent,   font->max_bounds.ascent);
-    overall->descent  = max(overall->descent,  font->max_bounds.descent);
-    overall->width    = max(overall->width,    font->max_bounds.width);
-    *logical_ascent   = max(*logical_ascent,   font->ascent);
-    *logical_descent  = max(*logical_descent,  font->descent);
-}
-
-/* For Vertical Writing end */
-
-static void
-set_fontset_extents(oc)
-    XOC oc;
-{
-    XRectangle *ink = &oc->core.font_set_extents.max_ink_extent;
-    XRectangle *logical = &oc->core.font_set_extents.max_logical_extent;
-    XFontStruct **font_list, *font;
-    XCharStruct overall;
-    int logical_ascent, logical_descent;
-    int        num = oc->core.font_info.num_font;
-
-    font_list = oc->core.font_info.font_struct_list;
-    font = *font_list++;
-    overall = font->max_bounds;
-    overall.lbearing = font->min_bounds.lbearing;
-    logical_ascent = font->ascent;
-    logical_descent = font->descent;
-
-    /* For Vertical Writing start */
-
-    while (--num > 0) {
-       font = *font_list++;
-       check_fontset_extents(&overall, &logical_ascent, &logical_descent,
-                             font);
-    }
-
-    {
-       XOCGenericPart  *gen = XOC_GENERIC(oc);
-       FontSet         font_set = gen->font_set;
-       FontData        font_data;
-       int             font_set_num = gen->font_set_num;
-       int             font_data_count;
-
-       for( ; font_set_num-- ; font_set++) {
-           if(font_set->vmap_num > 0) {
-               font_data = font_set->vmap;
-               font_data_count = font_set->vmap_num;
-               for( ; font_data_count-- ; font_data++) {
-                   if(font_data->font != NULL) {
-                       check_fontset_extents(&overall, &logical_ascent,
-                                             &logical_descent,
-                                             font_data->font);
-                   }
-               }
-           }
-
-#ifndef   COMMENT
-           if(font_set->vrotate_num > 0) {
-               font_data = (FontData) font_set->vrotate;
-               font_data_count = font_set->vrotate_num;
-               for( ; font_data_count-- ; font_data++) {
-                   if(font_data->font != NULL) {
-                       check_fontset_extents(&overall, &logical_ascent,
-                                             &logical_descent,
-                                             font_data->font);
-                   }
-               }
-           }
-#endif /* COMMENT */
-       }
-    }
-
-    /* For Vertical Writing start */
-
-    ink->x = overall.lbearing;
-    ink->y = -(overall.ascent);
-    ink->width = overall.rbearing - overall.lbearing;
-    ink->height = overall.ascent + overall.descent;
-
-    logical->x = 0;
-    logical->y = -(logical_ascent);
-    logical->width = overall.width;
-    logical->height = logical_ascent + logical_descent;
-}
-
-static Bool
-init_core_part(oc)
-    XOC oc;
-{
-    XOCGenericPart *gen = XOC_GENERIC(oc);
-    FontSet font_set;
-    int font_set_num;
-    XFontStruct **font_struct_list;
-    char **font_name_list, *font_name_buf;
-    int        count, length;
-
-    font_set = gen->font_set;
-    font_set_num = gen->font_set_num;
-    count = length = 0;
-
-    for ( ; font_set_num-- > 0; font_set++) {
-       if (font_set->font_name == NULL)
-           continue;
-
-       length += strlen(font_set->font_name) + 1;
-       count++;
-    }
-    if (count == 0)
-        return False;
-
-    font_struct_list = (XFontStruct **) Xmalloc(sizeof(XFontStruct *) * count);
-    if (font_struct_list == NULL)
-       return False;
-
-    font_name_list = (char **) Xmalloc(sizeof(char *) * count);
-    if (font_name_list == NULL)
-       goto err;
-
-    font_name_buf = (char *) Xmalloc(length);
-    if (font_name_buf == NULL)
-       goto err;
-
-    oc->core.font_info.num_font = count;
-    oc->core.font_info.font_name_list = font_name_list;
-    oc->core.font_info.font_struct_list = font_struct_list;
-
-    font_set = gen->font_set;
-    font_set_num = gen->font_set_num;
-
-    for (count = 0; font_set_num-- > 0; font_set++, count++) {
-       if (font_set->font_name == NULL)
-           continue;
-
-       font_set->id = count;
-       if (font_set->font)
-           *font_struct_list++ = font_set->font;
-       else
-           *font_struct_list++ = font_set->info;
-       strcpy(font_name_buf, font_set->font_name);
-       Xfree(font_set->font_name);
-       *font_name_list++ = font_set->font_name = font_name_buf;
-       font_name_buf += strlen(font_name_buf) + 1;
-    }
-
-    set_fontset_extents(oc);
-
-    return True;
-
-err:
-    if (font_name_list)
-       Xfree(font_name_list);
-    Xfree(font_struct_list);
-
-    return False;
-}
-
-static char *
-get_font_name(oc, pattern)
-    XOC oc;
-    char *pattern;
-{
-    char **list, *name;
-    int count = 0;
-
-    list = falListFonts(oc->core.om->core.display, pattern, 1, &count);
-    if (list == NULL)
-       return NULL;
-
-    name = (char *) Xmalloc(strlen(*list) + 1);
-    if (name)
-       strcpy(name, *list);
-    
-    falFreeFontNames(list);
-
-    return name;
-}
-
-/* For VW/UDC start*/
-
-static char
-*get_rotate_fontname(font_name)
-    char *font_name;
-{
-    char *pattern = NULL, *ptr = NULL;
-    char *fields[CHARSET_ENCODING_FIELD];
-    char str_pixel[32], str_point[4];
-    char rotate_font[256];
-    char *rotate_font_ptr = NULL;
-    int pixel_size = 0;
-    int field_num = 0, len = 0;
-
-    if(font_name == (char *) NULL || (len = strlen(font_name)) <= 0)
-       return NULL;
-
-    pattern = (char *)Xmalloc(len + 1);
-    if(!pattern)
-       return NULL;
-    strcpy(pattern, font_name);
-
-    memset(fields, 0, sizeof(char *) * 14);
-    ptr = pattern;
-    while(isspace(*ptr)) {
-       ptr++;
-    }
-    if(*ptr == '-')
-       ptr++;
-
-    for(field_num = 0 ; field_num < CHARSET_ENCODING_FIELD && ptr && *ptr ;
-                       ptr++, field_num++) {
-       fields[field_num] = ptr;
-
-       if(ptr = strchr(ptr, '-')) {
-           *ptr = '\0';
-       }
-    }
-
-    if(field_num < CHARSET_ENCODING_FIELD) {
-       Xfree(pattern);
-       return NULL;
-    }
-
-    /* Pixel Size field : fields[6] */
-    for(ptr = fields[PIXEL_SIZE_FIELD - 1] ; ptr && *ptr; ptr++) {
-       if(!isdigit(*ptr)) {
-           Xfree(pattern);
-           return NULL;
-       }
-    }
-    pixel_size = atoi(fields[PIXEL_SIZE_FIELD - 1]);
-    snprintf(str_pixel, sizeof(str_pixel), "[ 0 ~%d %d 0 ]", pixel_size, pixel_size);
-    fields[6] = str_pixel;
-
-    /* Point Size field : fields[7] */
-    strcpy(str_point, "*");
-    fields[POINT_SIZE_FIELD - 1] = str_point;
-
-    rotate_font[0] = '\0';
-    for(field_num = 0 ; field_num < CHARSET_ENCODING_FIELD &&
-                       fields[field_num] ; field_num++) {
-       snprintf(rotate_font, sizeof(rotate_font), "%s-%s", rotate_font, fields[field_num]);
-    }
-
-    if(pattern)
-       Xfree(pattern);
-
-    rotate_font_ptr = (char *)Xmalloc(strlen(rotate_font) + 1);
-    if(!rotate_font_ptr)
-       return NULL;
-    strcpy(rotate_font_ptr, rotate_font);
-       
-    return rotate_font_ptr;
-}
-
-static Bool
-is_match_charset(font_data, font_name)
-    FontData   font_data;
-    char       *font_name;
-{
-    char *last;
-    int length, name_len;
-
-    name_len = strlen(font_name);
-    last = font_name + name_len;
-
-    length = strlen(font_data->name);
-    if (length > name_len)
-       return False;
-       
-    if (_fallcCompareISOLatin1(last - length, font_data->name) == 0)
-       return True;
-
-    return False;
-}
-
-static int
-parse_all_name(oc, font_data, pattern)
-    XOC                oc;
-    FontData   font_data;
-    char       *pattern;
-{
-
-    if(is_match_charset(font_data, pattern) != True)
-       return False;
-
-    font_data->xlfd_name = (char *)Xmalloc(strlen(pattern)+1);
-    if(font_data->xlfd_name == NULL)
-       return (-1);
-
-    strcpy(font_data->xlfd_name, pattern);
-    return True;
-}
-
-static int
-parse_omit_name(oc, font_data, pattern)
-    XOC                oc;
-    FontData   font_data;
-    char       *pattern;
-{
-    char       *font_name = (char *) NULL;
-    char       *last = (char *) NULL;
-    char       buf[BUFSIZE];
-    int                length = 0;
-
-    if(is_match_charset(font_data, pattern) == True) {
-       strcpy(buf, pattern);
-       if (font_name = get_font_name(oc, buf)) {
-           font_data->xlfd_name = (char *)Xmalloc(strlen(font_name) + 1);
-           if(font_data->xlfd_name == NULL) {
-               Xfree(font_name);
-               return (-1);
-           }
-           strcpy(font_data->xlfd_name, font_name);
-           Xfree(font_name);
-           return True;
-       }
-    }
-
-    snprintf(buf, sizeof(buf), "%s", pattern);
-    length = strlen(pattern);
-    last = buf + length - 1;
-    if (length > 1 && *last == '*' && *(last - 1) == '-') {
-       if (length > 3 && *(last - 2) == '*' && *(last - 3) == '-')
-           last -= 2;
-    } else {
-       ++last;
-       *last++ = '-';
-    }
-
-    strcpy(last, font_data->name);
-    if (font_name = get_font_name(oc, buf)) {
-       font_data->xlfd_name = (char *)Xmalloc(strlen(font_name) + 1);
-       if(font_data->xlfd_name == NULL) {
-           Xfree(font_name);
-           return (-1);
-       }
-       strcpy(font_data->xlfd_name, font_name);
-       Xfree(font_name);
-       return True;
-    }
-
-    *last = '*';
-    *(last + 1) = '-';
-    strcpy(last + 2, font_data->name);
-    if (font_name = get_font_name(oc, buf)) {
-       font_data->xlfd_name = (char *)Xmalloc(strlen(font_name) + 1);
-       if(font_data->xlfd_name == NULL) {
-           Xfree(font_name);
-           return (-1);
-       }
-       strcpy(font_data->xlfd_name, font_name);
-       Xfree(font_name);
-       return True;
-    }
-
-    return False;
-}
-
-
-typedef enum{C_PRIMARY, C_SUBSTITUTE, C_VMAP, C_VROTATE } ClassType;
-
-static int
-parse_fontdata(oc, font_data, font_data_count, name_list, name_list_count,
-               class)
-    XOC                oc;
-    FontData   font_data;
-    int                font_data_count;
-    char       **name_list;
-    int                name_list_count;
-    ClassType  class;
-{
-    char       **cur_name_list = name_list;
-    char       *font_name = (char *) NULL;
-    char       *pattern = (char *) NULL;
-    int                found_num = 0, ret = 0;
-    int                fd_count = font_data_count;
-    int                count = name_list_count;
-    Bool       is_found = False;
-
-    if(name_list == NULL || count <= 0) {
-       return False;
-    }
-
-    if(font_data == NULL || font_data_count <= 0) {
-       return False;
-    }
-
-    for ( ; font_data_count-- > 0; font_data++) {
-       is_found = False;
-       font_name = (char *) NULL;
-       count = name_list_count;
-       cur_name_list = name_list;
-       while (count-- > 0) {
-            pattern = *cur_name_list++;
-           if (pattern == NULL || *pattern == '\0')
-               continue;
-
-           /* When the font name is specified a full name. */
-           if (strchr(pattern, '*') == NULL &&
-               (font_name = get_font_name(oc, pattern))) {
-               ret = parse_all_name(oc, font_data, font_name);
-               Xfree(font_name);
-               if(ret == -1)
-                   return ret;
-               else if (ret == True) {
-                   found_num++;
-                   is_found = True;
-                   break;
-               } else
-                   continue;
-           }
-
-           /* When the font name is specified a omited name. */
-           ret = parse_omit_name(oc, font_data, pattern);
-           if(ret == -1)
-                   return ret;
-           else if (ret == True) {
-                   found_num++;
-                   is_found = True;
-                   break;
-           } else
-                   continue;
-       }
-
-       switch(class) {
-         case C_PRIMARY:
-           if(is_found != True)
-               return False;
-               break;
-         case C_SUBSTITUTE:
-         case C_VMAP:
-           if(is_found == True)
-               return True;
-           break;
-         case C_VROTATE:
-           if(is_found == True) {
-               char    *rotate_name;
-
-               if((rotate_name = get_rotate_fontname(font_data->xlfd_name)) !=
-                                 NULL) {
-                   Xfree(font_data->xlfd_name);
-                   font_data->xlfd_name = rotate_name;
-                   return True;
-               }
-               Xfree(font_data->xlfd_name);
-               return False;
-           }
-       }
-    }
-
-    if(class == C_PRIMARY && found_num == fd_count)
-       return True;
-
-    return False;
-}
-
-
-static int
-parse_vw(oc, font_set, name_list, count)
-    XOC                oc;
-    FontSet    font_set;
-    char       **name_list;
-    int                count;
-{
-    FontData   vmap = font_set->vmap;
-    VRotate    vrotate = font_set->vrotate;
-    int                vmap_num = font_set->vmap_num;
-    int                vrotate_num = font_set->vrotate_num;
-    int                ret = 0, i = 0;
-
-    if(vmap_num > 0) {
-       if(parse_fontdata(oc, vmap, vmap_num, name_list, count, C_VMAP) == -1)
-           return (-1);
-    }
-
-    if(vrotate_num > 0) {
-       ret = parse_fontdata(oc, (FontData) vrotate, vrotate_num,
-                            name_list, count, C_VROTATE);
-       if(ret == -1) {
-           return (-1);
-       } else if(ret == False) {
-           CodeRange   code_range;
-           int         num_cr;
-           int         sub_num = font_set->substitute_num;
-
-           code_range = vrotate[i].code_range;
-           num_cr = vrotate[i].num_cr;
-           for(i = 0 ; i < vrotate_num ; i++) {
-               if(vrotate[i].xlfd_name)
-                   Xfree(vrotate[i].xlfd_name);
-           }
-           Xfree(vrotate);
-
-           if(sub_num > 0) {
-               vrotate = font_set->vrotate = (VRotate)Xmalloc
-                                               (sizeof(VRotateRec) * sub_num);
-               if(font_set->vrotate == (VRotate)NULL)
-                   return (-1);
-
-               for(i = 0 ; i < sub_num ; i++) {
-                   vrotate[i].charset_name = font_set->substitute[i].name;
-                   vrotate[i].side = font_set->substitute[i].side;
-                   vrotate[i].code_range = code_range;
-                   vrotate[i].num_cr = num_cr;
-               }
-               vrotate_num = font_set->vrotate_num = sub_num;
-           } else {
-               font_set->vrotate = (VRotate)NULL;
-           }
-
-           ret = parse_fontdata(oc, (FontData) vrotate, vrotate_num,
-                                name_list, count, C_VROTATE);
-           if(ret == -1)
-               return (-1);
-       }
-    }
-
-    return True;
-}
-
-static int
-parse_fontname(oc)
-    XOC oc;
-{
-    XOCGenericPart *gen = XOC_GENERIC(oc);
-    FontSet font_set;
-    char *base_name, **name_list;
-    int font_set_num = 0;
-    int found_num = 0;
-    int count = 0;
-    int        ret;
-    int i;
-
-    name_list = _falParseBaseFontNameList(oc->core.base_name_list, &count);
-    if (name_list == NULL)
-       return -1;
-
-    font_set = gen->font_set;
-    font_set_num = gen->font_set_num;
-
-    for( ; font_set_num-- > 0 ; font_set++) {
-       if(font_set->font_name)
-           continue;
-
-       if(font_set->font_data_count > 0) {
-           ret = parse_fontdata(oc, font_set->font_data,
-                                font_set->font_data_count,
-                                name_list, count, C_PRIMARY);
-           if(ret == -1) {
-               goto err;
-           } else if(ret == True) {
-               font_set->font_name = (char *)Xmalloc
-                       (strlen(font_set->font_data->xlfd_name) + 1);
-               if(font_set->font_name == (char *) NULL)
-                   goto err;
-               strcpy(font_set->font_name, font_set->font_data->xlfd_name);
-               font_set->side = font_set->font_data->side;
-
-               if(parse_vw(oc, font_set, name_list, count) == -1)
-                   goto err;
-               found_num++;
-
-           /* The substitute font is serched, when the primary fonts */
-           /* is not found. */
-           } else {
-               /* The primary information is free from FontSet structure */
-               font_set->font_data_count = 0;
-               if(font_set->font_data) {
-                   Xfree(font_set->font_data);
-                   font_set->font_data = (FontData) NULL;
-               }
-
-               /* A vrotate member is replaced to substitute information */
-               /* from primary information. */
-               font_set->vrotate_num = 0;
-               if(font_set->vrotate) {
-                   Xfree(font_set->vrotate);
-                   font_set->vrotate = (VRotate) NULL;
-               }
-
-               ret = parse_fontdata(oc, font_set->substitute,
-                                    font_set->substitute_num,
-                                    name_list, count, C_SUBSTITUTE);
-               if(ret == -1) {
-                   goto err;
-               } else if(ret == True) {
-                   for(i=0;i<font_set->substitute_num;i++){
-                       if(font_set->substitute[i].xlfd_name != NULL){
-                               break;
-                       }
-                   }
-                   font_set->font_name = (char *)Xmalloc
-                               (strlen(font_set->substitute[i].xlfd_name) + 1);
-                   if(font_set->font_name == (char *) NULL)
-                       goto err;
-                   strcpy(font_set->font_name,font_set->substitute[i].xlfd_name);
-                   font_set->side = font_set->substitute[i].side;
-                   if(parse_vw(oc, font_set, name_list, count) == -1)
-                       goto err;
-                   found_num++;
-               }
-           }
-       } else if(font_set->substitute_num > 0) {
-           ret = parse_fontdata(oc, font_set->substitute,
-                                font_set->substitute_num,
-                                name_list, count, C_SUBSTITUTE);
-           if(ret == -1) {
-               goto err;
-           } else if(ret == True) {
-               for(i=0;i<font_set->substitute_num;i++){
-                   if(font_set->substitute[i].xlfd_name != NULL){
-                       break;
-                   }
-               }
-               font_set->font_name = (char *)Xmalloc
-                       (strlen(font_set->substitute[i].xlfd_name) + 1);
-               if(font_set->font_name == (char *) NULL)
-                   goto err;
-               strcpy(font_set->font_name,font_set->substitute[i].xlfd_name);
-               font_set->side = font_set->substitute[i].side;
-               if(parse_vw(oc, font_set, name_list, count) == -1)
-                   goto err;
-
-               found_num++;
-           }
-       }
-    }
-
-    base_name = (char *) Xmalloc(strlen(oc->core.base_name_list) + 1);
-    if (base_name == NULL)
-       goto err;
-
-    strcpy(base_name, oc->core.base_name_list);
-    oc->core.base_name_list = base_name;
-
-    falFreeStringList(name_list);              
-
-    return found_num;
-
-err:
-    falFreeStringList(name_list);              
-
-    return -1;
-}
-
-/* For VW/UDC end*/
-
-static Bool
-set_missing_list(oc)
-    XOC oc;
-{
-    XOCGenericPart *gen = XOC_GENERIC(oc);
-    FontSet font_set;
-    char **charset_list, *charset_buf;
-    int        count, length, font_set_num;
-
-    font_set = gen->font_set;
-    font_set_num = gen->font_set_num;
-    count = length = 0;
-
-    for ( ; font_set_num-- > 0; font_set++) {
-       if (font_set->info || font_set->font) 
-           continue;
-       
-       /* Change 1996.01.23 start */
-       if(font_set->font_data_count <= 0 ||
-          font_set->font_data == (FontData)NULL) {
-           if(font_set->substitute_num <= 0 ||
-              font_set->substitute == (FontData)NULL)
-               if(font_set->charset_list != NULL){
-                length += 
-                 strlen(font_set->charset_list[0]->encoding_name) + 1;
-               } else {
-                 length += 1;
-               }
-           else
-               length += strlen(font_set->substitute->name) + 1;
-       } else {
-           length += strlen(font_set->font_data->name) + 1;
-       }
-       /* Change 1996.01.23 end */
-       count++;
-    }
-
-    if (count < 1)
-       return True;
-
-    charset_list = (char **) Xmalloc(sizeof(char *) * count);
-    if (charset_list == NULL)
-       return False;
-
-    charset_buf = (char *) Xmalloc(length);
-    if (charset_buf == NULL) {
-       Xfree(charset_list);
-       return False;
-    }
-
-    oc->core.missing_list.charset_list = charset_list;
-    oc->core.missing_list.charset_count = count;
-
-    font_set = gen->font_set;
-    font_set_num = gen->font_set_num;
-
-    for ( ; font_set_num-- > 0; font_set++) {
-       if (font_set->info || font_set->font) 
-           continue;
-
-       /* Change 1996.01.23 start */
-       if(font_set->font_data_count <= 0 ||
-          font_set->font_data == (FontData)NULL) {
-           if(font_set->substitute_num <= 0 ||
-              font_set->substitute == (FontData)NULL)
-               if(font_set->charset_list != NULL){
-                strcpy(charset_buf,
-                       font_set->charset_list[0]->encoding_name);
-               } else {
-                strcpy(charset_buf, "");
-               }
-           else
-               strcpy(charset_buf, font_set->substitute->name);
-       } else {
-           strcpy(charset_buf, font_set->font_data->name);
-       }
-       /* Change 1996.01.23 end */
-       *charset_list++ = charset_buf;
-       charset_buf += strlen(charset_buf) + 1;
-    } 
-
-    return True;
-}
-
-static Bool
-create_fontset(oc)
-    XOC oc;
-{
-    XOMGenericPart *gen = XOM_GENERIC(oc->core.om);
-    int found_num;
-
-    if (init_fontset(oc) == False)
-        return False;
-
-    found_num = parse_fontname(oc);
-    if (found_num <= 0) {
-       if (found_num == 0)
-           set_missing_list(oc);
-       return False;
-    }
-
-    if (gen->on_demand_loading == True) {
-       if (load_font_info(oc) == False)
-           return False;
-    } else {
-       if (load_font(oc) == False)
-           return False;
-    }
-
-    if (init_core_part(oc) == False)
-       return False;
-
-    if (set_missing_list(oc) == False)
-       return False;
-
-    return True;
-}
-
-/* For VW/UDC start */
-static void
-free_fontdataOC(dpy,font_data, font_data_count)
-    Display    *dpy;
-    FontData   font_data;
-    int                font_data_count;
-{
-    for( ; font_data_count-- ; font_data++) {
-       if(font_data->xlfd_name){
-           Xfree(font_data->xlfd_name);
-           font_data->xlfd_name = NULL;
-       }
-       if(font_data->font){                            /* ADD 1996.01.7 */
-           if(font_data->font->fid)                    /* Add 1996.01.23 */
-               falFreeFont(dpy,font_data->font);               /* ADD 1996.01.7 */
-           else                                        /* Add 1996.01.23 */
-               falFreeFontInfo(NULL, font_data->font, 1);/* Add 1996.01.23 */
-           font_data->font = NULL;
-       }
-/* XOM to kyoutuu shite shiyou sushiteiru ryouiki
-   kokoha free_fontdataOM() de free sareru
-
-       if(font_data->scopes){
-           Xfree(font_data->scopes);
-           font_data->scopes = NULL;
-       }
-       if(font_data->name){
-           Xfree(font_data->name);
-           font_data->name = NULL;
-       }
-*/
-    }
-}
-
-static void
-destroy_fontdata(gen,dpy)
-    XOCGenericPart *gen ;
-    Display *dpy ;
-{
-    FontSet    font_set = (FontSet) NULL;
-    int                font_set_num = 0;
-
-    if (gen->font_set) {
-       font_set = gen->font_set;
-       font_set_num = gen->font_set_num;
-       for( ; font_set_num-- ; font_set++) {
-           if(font_set->font_data) {
-               free_fontdataOC(dpy,
-                       font_set->font_data, font_set->font_data_count);
-               Xfree(font_set->font_data);
-               font_set->font_data = NULL;
-           }
-           if(font_set->substitute) {
-               free_fontdataOC(dpy,
-                       font_set->substitute, font_set->substitute_num);
-               Xfree(font_set->substitute);
-               font_set->substitute = NULL;
-           }
-           if(font_set->vmap) {
-               free_fontdataOC(dpy,
-                       font_set->vmap, font_set->vmap_num);
-               Xfree(font_set->vmap);
-               font_set->vmap = NULL;
-           }
-           if(font_set->vrotate) {
-               free_fontdataOC(dpy,
-                       (FontData)font_set->vrotate,
-                             font_set->vrotate_num);
-               Xfree(font_set->vrotate);
-               font_set->vrotate = NULL;
-           }
-       }
-       Xfree(gen->font_set);
-       gen->font_set = NULL;
-    }
-}
-/* For VW/UDC end */
-
-static void
-destroy_oc(oc)
-    XOC oc;
-{
-    Display *dpy = oc->core.om->core.display;
-    XOCGenericPart *gen = XOC_GENERIC(oc);
-    XFontStruct **font_list, *font;
-    FontSet    font_set = (FontSet) NULL;
-    int                font_set_num = 0;
-    int                count = 0;
-
-    if (gen->mbs_to_cs)
-       _fallcCloseConverter(gen->mbs_to_cs);
-
-    if (gen->wcs_to_cs)
-       _fallcCloseConverter(gen->wcs_to_cs);
-
-/* For VW/UDC start */ /* Change 1996.01.8 */
-    destroy_fontdata(gen,dpy); 
-/*
-*/
-/* For VW/UDC end */
-
-    if (oc->core.base_name_list)
-       Xfree(oc->core.base_name_list);
-
-    if (oc->core.font_info.font_name_list)
-       falFreeStringList(oc->core.font_info.font_name_list);
-
-    if (font_list = oc->core.font_info.font_struct_list) {
-       Xfree(oc->core.font_info.font_struct_list);
-    }
-
-    if (oc->core.missing_list.charset_list)
-       falFreeStringList(oc->core.missing_list.charset_list);
-
-#ifdef notdef
-    if (oc->core.res_name)
-       Xfree(oc->core.res_name);
-    if (oc->core.res_class)
-       Xfree(oc->core.res_class);
-#endif
-    
-    Xfree(oc);
-}
-
-static char *
-set_oc_values(oc, args, num_args)
-    XOC oc;
-    XlcArgList args;
-    int num_args;
-{
-    if (oc->core.resources == NULL)
-       return NULL;
-
-    return _fallcSetValues((XPointer) oc, oc->core.resources,
-                       oc->core.num_resources, args, num_args, XlcSetMask);
-}
-
-static char *
-get_oc_values(oc, args, num_args)
-    XOC oc;
-    XlcArgList args;
-    int num_args;
-{
-    if (oc->core.resources == NULL)
-       return NULL;
-
-    return _fallcGetValues((XPointer) oc, oc->core.resources,
-                        oc->core.num_resources, args, num_args, XlcGetMask);
-}
-
-static XOCMethodsRec oc_default_methods = {
-    destroy_oc,
-    set_oc_values,
-    get_oc_values,
-    _falmbDefaultTextEscapement,
-    _falmbDefaultTextExtents,
-    _falmbDefaultTextPerCharExtents,
-    _falmbDefaultDrawString,
-    _falmbDefaultDrawImageString,
-    _falwcDefaultTextEscapement,
-    _falwcDefaultTextExtents,
-    _falwcDefaultTextPerCharExtents,
-    _falwcDefaultDrawString,
-    _falwcDefaultDrawImageString
-};
-
-static XOCMethodsRec oc_generic_methods = {
-    destroy_oc,
-    set_oc_values,
-    get_oc_values,
-    _falmbGenericTextEscapement,
-    _falmbGenericTextExtents,
-    _falmbGenericTextPerCharExtents,
-    _falmbGenericDrawString,
-    _falmbGenericDrawImageString,
-    _falwcGenericTextEscapement,
-    _falwcGenericTextExtents,
-    _falwcGenericTextPerCharExtents,
-    _falwcGenericDrawString,
-    _falwcGenericDrawImageString
-};
-
-typedef struct _XOCMethodsListRec {
-    char *name;
-    XOCMethods methods;
-} XOCMethodsListRec, *XOCMethodsList;
-
-static XOCMethodsListRec oc_methods_list[] = {
-    { "default", &oc_default_methods },
-    { "generic", &oc_generic_methods }
-};
-
-static XlcResource oc_resources[] = {
-    { XNBaseFontName, NULLQUARK, sizeof(char *),
-      XOffsetOf(XOCRec, core.base_name_list), XlcCreateMask | XlcGetMask },
-    { XNOMAutomatic, NULLQUARK, sizeof(Bool),
-      XOffsetOf(XOCRec, core.om_automatic), XlcGetMask },
-    { XNMissingCharSet, NULLQUARK, sizeof(XOMCharSetList),
-      XOffsetOf(XOCRec, core.missing_list), XlcGetMask },
-    { XNDefaultString, NULLQUARK, sizeof(char *),
-      XOffsetOf(XOCRec, core.default_string), XlcGetMask },
-    { XNOrientation, NULLQUARK, sizeof(XOrientation),
-      XOffsetOf(XOCRec, core.orientation), XlcSetMask | XlcGetMask },
-    { XNResourceName, NULLQUARK, sizeof(char *),
-      XOffsetOf(XOCRec, core.res_name), XlcSetMask | XlcGetMask },
-    { XNResourceClass, NULLQUARK, sizeof(char *),
-      XOffsetOf(XOCRec, core.res_class), XlcSetMask | XlcGetMask },
-    { XNFontInfo, NULLQUARK, sizeof(XOMFontInfo),
-      XOffsetOf(XOCRec, core.font_info), XlcGetMask }
-};
-
-static XOC
-create_oc(om, args, num_args)
-    XOM om;
-    XlcArgList args;
-    int num_args;
-{
-    XOC oc;
-    XOMGenericPart *gen = XOM_GENERIC(om);
-    XOCMethodsList methods_list = oc_methods_list;
-    int count;
-
-    oc = (XOC) Xmalloc(sizeof(XOCGenericRec));
-    if (oc == NULL)
-       return (XOC) NULL;
-    bzero((char *) oc, sizeof(XOCGenericRec));
-    
-    oc->core.om = om;
-
-    if (oc_resources[0].xrm_name == NULLQUARK)
-       _fallcCompileResourceList(oc_resources, XlcNumber(oc_resources));
-    
-    if (_fallcSetValues((XPointer) oc, oc_resources, XlcNumber(oc_resources),
-                     args, num_args, XlcCreateMask | XlcDefaultMask))
-       goto err;
-
-    if (oc->core.base_name_list == NULL)
-       goto err;
-
-    oc->core.resources = oc_resources;
-    oc->core.num_resources = XlcNumber(oc_resources);
-
-    if (create_fontset(oc) == False)
-       goto err;
-
-    oc->methods = &oc_generic_methods;
-
-    if (gen->object_name) {
-       count = XlcNumber(oc_methods_list);
-
-       for ( ; count-- > 0; methods_list++) {
-           if (!_fallcCompareISOLatin1(gen->object_name, methods_list->name)) {
-               oc->methods = methods_list->methods;
-               break;
-           }
-       }
-    }
-
-    return oc;
-
-err:
-    destroy_oc(oc);
-
-    return (XOC) NULL;
-}
-
-static void
-free_fontdataOM(font_data, font_data_count)
-    FontData   font_data;
-    int                font_data_count;
-{
-    for( ; font_data_count-- ; font_data++) {
-       if(font_data->name){
-           Xfree(font_data->name);
-           font_data->name = NULL;
-       }
-       if(font_data->scopes){
-           Xfree(font_data->scopes);
-           font_data->scopes = NULL;
-       }
-    }
-}
-
-static Status
-close_om(om)
-    XOM om;
-{
-    XOMGenericPart *gen = XOM_GENERIC(om);
-    OMData data;
-    int count;
-
-    if (data = gen->data) {
-       for (count = gen->data_num; count-- > 0; data++) {
-           if (data->charset_list){
-               Xfree(data->charset_list);
-               data->charset_list = NULL;
-           }
-           /* free font_data for om */
-           if (data->font_data) {
-               free_fontdataOM(data->font_data,data->font_data_count);
-               Xfree(data->font_data);
-               data->font_data = NULL;
-           }
-           /* free substitute for om */
-           if (data->substitute) {
-               free_fontdataOM(data->substitute,data->substitute_num);
-               Xfree(data->substitute);
-               data->substitute = NULL;
-           }
-           /* free vmap for om */
-           if (data->vmap) {
-               free_fontdataOM(data->vmap,data->vmap_num);
-               Xfree(data->vmap);
-               data->vmap = NULL;
-           }
-           /* free vrotate for om */
-           if (data->vrotate) {
-#ifdef    COMMENT
-               free_fontdataOM(data->vrotate,data->vrotate_num);
-#endif /* COMMENT */
-               Xfree(data->vrotate);
-               data->vrotate = NULL;
-           }
-       }
-       Xfree(gen->data);
-       gen->data = NULL;
-    }
-
-    if (gen->object_name){
-       Xfree(gen->object_name);
-       gen->object_name = NULL;
-    }
-
-    if (om->core.res_name){
-       Xfree(om->core.res_name);
-       om->core.res_name = NULL;
-    }
-    if (om->core.res_class){
-       Xfree(om->core.res_class);
-       om->core.res_class = NULL;
-    }
-    if (om->core.required_charset.charset_list &&
-       om->core.required_charset.charset_count > 0){
-       falFreeStringList(om->core.required_charset.charset_list);
-       om->core.required_charset.charset_list = NULL;
-    } else {
-       Xfree((char*)om->core.required_charset.charset_list);
-       om->core.required_charset.charset_list = NULL;
-    }
-    if (om->core.orientation_list.orientation){
-       Xfree(om->core.orientation_list.orientation);
-       om->core.orientation_list.orientation = NULL;
-    }
-
-    Xfree(om);
-
-    return 0;
-}
-
-static char *
-set_om_values(om, args, num_args)
-    XOM om;
-    XlcArgList args;
-    int num_args;
-{
-    if (om->core.resources == NULL)
-       return NULL;
-
-    return _fallcSetValues((XPointer) om, om->core.resources,
-                        om->core.num_resources, args, num_args, XlcSetMask);
-}
-
-static char *
-get_om_values(om, args, num_args)
-    XOM om;
-    XlcArgList args;
-    int num_args;
-{
-    if (om->core.resources == NULL)
-       return NULL;
-
-    return _fallcGetValues((XPointer) om, om->core.resources,
-                        om->core.num_resources, args, num_args, XlcGetMask);
-}
-
-static XOMMethodsRec methods = {
-    close_om,
-    set_om_values,
-    get_om_values,
-    create_oc
-};
-
-static XlcResource om_resources[] = {
-    { XNRequiredCharSet, NULLQUARK, sizeof(XOMCharSetList),
-      XOffsetOf(XOMRec, core.required_charset), XlcGetMask },
-    { XNQueryOrientation, NULLQUARK, sizeof(XOMOrientation),
-      XOffsetOf(XOMRec, core.orientation_list), XlcGetMask },
-    { XNDirectionalDependentDrawing, NULLQUARK, sizeof(Bool),
-      XOffsetOf(XOMRec, core.directional_dependent), XlcGetMask },
-    { XNContextualDrawing, NULLQUARK, sizeof(Bool),
-      XOffsetOf(XOMRec, core.contextual_drawing), XlcGetMask }
-};
-
-static XOM
-create_om(lcd, dpy, rdb, res_name, res_class)
-    XLCd lcd;
-    Display *dpy;
-    XrmDatabase rdb;
-    char *res_name;
-    char *res_class;
-{
-    XOM om;
-
-    om = (XOM) Xmalloc(sizeof(XOMGenericRec));
-    if (om == NULL)
-       return (XOM) NULL;
-    bzero((char *) om, sizeof(XOMGenericRec));
-    
-    om->methods = &methods;
-    om->core.lcd = lcd;
-    om->core.display = dpy;
-    om->core.rdb = rdb;
-    if (res_name) {
-       om->core.res_name = (char *) Xmalloc(strlen(res_name) + 1);
-       if (om->core.res_name == NULL)
-           goto err;
-       strcpy(om->core.res_name, res_name);
-    }
-    if (res_class) {
-       om->core.res_class = (char *) Xmalloc(strlen(res_class) + 1);
-       if (om->core.res_class == NULL)
-           goto err;
-       strcpy(om->core.res_class, res_class);
-    }
-
-    if (om_resources[0].xrm_name == NULLQUARK)
-       _fallcCompileResourceList(om_resources, XlcNumber(om_resources));
-    
-    om->core.resources = om_resources;
-    om->core.num_resources = XlcNumber(om_resources);
-
-    return om;
-
-err:
-    close_om(om);
-
-    return (XOM) NULL;
-}
-
-static OMData
-add_data(om)
-    XOM om;
-{
-    XOMGenericPart *gen = XOM_GENERIC(om);
-    OMData new;
-    int num;
-
-    if (num = gen->data_num)
-        new = (OMData) Xrealloc(gen->data, (num + 1) * sizeof(OMDataRec));
-    else
-        new = (OMData) Xmalloc(sizeof(OMDataRec));
-
-    if (new == NULL)
-        return NULL;
-
-    gen->data_num = num + 1;
-    gen->data = new;
-
-    new += num;
-    bzero((char *) new, sizeof(OMDataRec));
-
-    return new;
-}
-
-/* For VW/UDC */
-FontData
-falread_EncodingInfo(count,value)
-int count;
-char **value;
-{
-    FontData font_data,ret;
-    char *buf, *bufptr,*scp;
-    FontScope scope;
-    int len;
-    extern FontScope falparse_scopemaps();
-    font_data = (FontData) Xmalloc(sizeof(FontDataRec) * count);
-    if (font_data == NULL)
-        return NULL;
-    bzero((char *) font_data, sizeof(FontDataRec) * count);
-
-    ret = font_data;
-    for ( ; count-- > 0; font_data++) {
-/*
-        strcpy(buf, *value++);
-*/
-       buf = *value; value++;
-        if (bufptr = strchr(buf, ':')){
-           len = (int)(bufptr - buf);
-            bufptr++ ;
-       }
-        font_data->name = (char *) Xmalloc(len + 1);
-        if (font_data->name == NULL) {
-            XFree(font_data);
-            return NULL;
-        }
-        strncpy(font_data->name, buf,len);
-       font_data->name[len] = 0;
-        if (bufptr && _fallcCompareISOLatin1(bufptr, "GL") == 0)
-            font_data->side = XlcGL;
-        else if (bufptr && _fallcCompareISOLatin1(bufptr, "GR") == 0)
-            font_data->side = XlcGR;
-        else
-            font_data->side = XlcGLGR;
-
-        if (bufptr && (scp = strchr(bufptr, '['))){
-            font_data->scopes = falparse_scopemaps(scp,&(font_data->scopes_num));
-        }
-    }
-    return(ret);
-}
-
-static CodeRange read_vrotate(count,value,type,vrotate_num)
-int count;
-char **value;
-int *type;
-int *vrotate_num;
-{
-    FontData font_data,ret;
-    char *buf, *bufptr,*scp;
-    CodeRange   range;
-    extern FontScope falparse_scopemaps();
-    if(!strcmp(value[0],"all")){
-       *type        = VROTATE_ALL ;
-       *vrotate_num = 0 ;
-       return (NULL);
-    } else if(*(value[0]) == '['){
-       *type        = VROTATE_PART ;
-        range = (CodeRange)falparse_scopemaps(value[0],vrotate_num);
-       return (range);
-    } else {
-       *type        = VROTATE_NONE ;
-       *vrotate_num = 0 ;
-       return (NULL);
-    }
-}
-
-static void
-read_vw(lcd,font_set,num)
-XLCd    lcd;
-OMData  font_set;
-int num;
-{
-    char **value, buf[BUFSIZ], *bufptr;
-    int count,i;
-
-    snprintf(buf, sizeof(buf), "fs%d.font.vertical_map", num);
-    _fallcGetResource(lcd, "XLC_FONTSET", buf, &value, &count);
-    if (count > 0){
-        dbg_printValue(buf,value,count);
-        font_set->vmap_num = count;
-        font_set->vmap = falread_EncodingInfo(count,value);
-    }
-
-    snprintf(buf, sizeof(buf), "fs%d.font.vertical_rotate", num);
-    _fallcGetResource(lcd, "XLC_FONTSET", buf, &value, &count);
-    if (count > 0){
-        dbg_printValue(buf,value,count);
-        font_set->vrotate = read_vrotate(count,value,&(font_set->vrotate_type),
-                               &(font_set->vrotate_num));
-    }
-}
-/* VW/UDC end */
-static Bool
-init_om(om)
-    XOM om;
-{
-    XLCd lcd = om->core.lcd;
-    XOMGenericPart *gen = XOM_GENERIC(om);
-    OMData data;
-    XlcCharSet *charset_list;
-    FontData font_data;
-    char **required_list;
-    XOrientation *orientation;
-    char **value, buf[BUFSIZ], *bufptr;
-    int count = 0, num = 0, length = 0;
-
-    _fallcGetResource(lcd, "XLC_FONTSET", "on_demand_loading", &value, &count);
-    if (count > 0 && _fallcCompareISOLatin1(*value, "True") == 0)
-       gen->on_demand_loading = True;
-
-    _fallcGetResource(lcd, "XLC_FONTSET", "object_name", &value, &count);
-    if (count > 0) {
-       gen->object_name = (char *) Xmalloc(strlen(*value) + 1);
-       if (gen->object_name == NULL)
-           return False;
-       strcpy(gen->object_name, *value);
-    }
-
-    for (num = 0; ; num++) {
-
-        snprintf(buf, sizeof(buf), "fs%d.charset.name", num);
-        _fallcGetResource(lcd, "XLC_FONTSET", buf, &value, &count);
-
-        if( count < 1){
-            snprintf(buf, sizeof(buf), "fs%d.charset", num);
-            _fallcGetResource(lcd, "XLC_FONTSET", buf, &value, &count);
-            if (count < 1)
-                break;
-        }
-
-       data = add_data(om);
-       if (data == NULL)
-           return False;
-       
-       charset_list = (XlcCharSet *) Xmalloc(sizeof(XlcCharSet) * count);
-       if (charset_list == NULL)
-           return False;
-       data->charset_list = charset_list;
-       data->charset_count = count;
-
-       while (count-- > 0){
-           *charset_list++ = _fallcGetCharSet(*value++);
-        }
-        snprintf(buf, sizeof(buf), "fs%d.charset.udc_area", num);
-        _fallcGetResource(lcd, "XLC_FONTSET", buf, &value, &count);
-        if( count > 0){
-            UDCArea udc;
-            int i,flag = 0;
-            udc = (UDCArea)Xmalloc(count * sizeof(UDCAreaRec));
-           if (udc == NULL)
-               return False;
-            for(i=0;i<count;i++){
-                sscanf(value[i],"\\x%lx,\\x%lx", &(udc[i].start), &(udc[i].end));
-            }
-            for(i=0;i<data->charset_count;i++){
-               if(data->charset_list[i]->udc_area == NULL){
-                   data->charset_list[i]->udc_area     = udc;
-                   data->charset_list[i]->udc_area_num = count;
-                   flag = 1;
-               }
-            }
-           if(flag == 0){
-               Xfree(udc);
-           }
-        }
-
-        snprintf(buf, sizeof(buf), "fs%d.font.primary", num);
-        _fallcGetResource(lcd, "XLC_FONTSET", buf, &value, &count);
-        if (count < 1){
-            snprintf(buf, sizeof(buf), "fs%d.font", num);
-            _fallcGetResource(lcd, "XLC_FONTSET", buf, &value, &count);
-            if (count < 1)
-                return False;
-        }
-
-       font_data = falread_EncodingInfo(count,value);
-       if (font_data == NULL)
-           return False;
-
-       data->font_data = font_data;
-       data->font_data_count = count;
-
-        snprintf(buf, sizeof(buf), "fs%d.font.substitute", num);
-        _fallcGetResource(lcd, "XLC_FONTSET", buf, &value, &count);
-        if (count > 0){
-            font_data = falread_EncodingInfo(count,value);
-            if (font_data == NULL)
-               return False;
-            data->substitute      = font_data;
-            data->substitute_num = count;
-        } else {
-            snprintf(buf, sizeof(buf), "fs%d.font", num);
-            _fallcGetResource(lcd, "XLC_FONTSET", buf, &value, &count);
-            if (count < 1) {
-                data->substitute      = NULL;
-                data->substitute_num = 0;
-           } else {
-                font_data = falread_EncodingInfo(count,value);
-                data->substitute      = font_data;
-                data->substitute_num = count;
-           }
-       }
-        read_vw(lcd,data,num);
-       length += strlen(data->font_data->name) + 1;
-    }
-
-    /* required charset list */
-    required_list = (char **) Xmalloc(sizeof(char *) * gen->data_num);
-    if (required_list == NULL)
-       return False;
-
-    bufptr = (char *) Xmalloc(length);
-    if (bufptr == NULL) {
-       Xfree(required_list);
-       return False;
-    }
-
-    om->core.required_charset.charset_list = required_list;
-    om->core.required_charset.charset_count = gen->data_num;
-
-    count = gen->data_num;
-    data = gen->data;
-
-    for ( ; count-- > 0; data++) {
-       strcpy(bufptr, data->font_data->name);
-       *required_list++ = bufptr;
-       bufptr += strlen(bufptr) + 1;
-    }
-
-    /* orientation list */
-    orientation = (XOrientation *) Xmalloc(sizeof(XOrientation) * 2);
-    if (orientation == NULL)
-       return False;
-
-    orientation[0] = XOMOrientation_LTR_TTB;
-    orientation[1] = XOMOrientation_TTB_RTL;
-    om->core.orientation_list.orientation = orientation;
-    om->core.orientation_list.num_orientation = 2;
-
-    /* directional dependent drawing */
-    om->core.directional_dependent = False;
-
-    /* contexual drawing */
-    om->core.contextual_drawing = False;
-
-    /* context dependent */
-    om->core.context_dependent = False;
-
-    return True;
-}
-
-XOM
-#if NeedFunctionPrototypes
-_falomGenericOpenOM(XLCd lcd, Display *dpy, XrmDatabase rdb,
-                 _Xconst char *res_name, _Xconst char *res_class)
-#else
-_falomGenericOpenOM(lcd, dpy, rdb, res_name, res_class)
-    XLCd lcd;
-    Display *dpy;
-    XrmDatabase rdb;
-    char *res_name;
-    char *res_class;
-#endif
-{
-    XOM om;
-
-    om = create_om(lcd, dpy, rdb, res_name, res_class);
-    if (om == NULL)
-       return (XOM) NULL;
-    
-    if (init_om(om) == False)
-       goto err;
-
-    return om;
-
-err:
-    close_om(om);
-
-    return (XOM) NULL;
-}
-
-Bool
-_falInitOM(lcd)
-    XLCd lcd;
-{
-    lcd->methods->open_om = _falomGenericOpenOM;
-
-    return True;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_falomGeneric.h b/cde/programs/dtudcfonted/libfal/_falomGeneric.h
deleted file mode 100644 (file)
index ae67c85..0000000
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* XomGeneric.h 1.6 - Fujitsu source for CDEnext    96/02/29 18:02:52  */ 
-/* $XConsortium: _falomGeneric.h /main/1 1996/04/08 15:20:29 cde-fuj $ */
-/*
- * Copyright 1992, 1993 by TOSHIBA Corp.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, provided
- * that the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of TOSHIBA not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. TOSHIBA make no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author: Katsuhisa Yano      TOSHIBA Corp.
- *                             mopi@osa.ilab.toshiba.co.jp
- */
-/*
- * Copyright 1995 by FUJITSU LIMITED
- * This is source code modified by FUJITSU LIMITED under the Joint
- * Development Agreement for the CDEnext PST.
- * This is unpublished proprietary source code of FUJITSU LIMITED
- *
- * Modifier: Takanori Tateno   FUJITSU LIMITED
- *
- */
-
-#ifndef _XOMGENERIC_H_
-#define _XOMGENERIC_H_
-
-#include "_fallcPublic.h"
-
-#define XOM_GENERIC(om)                (&((XOMGeneric) om)->gen)
-#define XOC_GENERIC(font_set)  (&((XOCGeneric) font_set)->gen)
-
-/* For VW/UDC */
-typedef struct _CodeRangeRec {
-    unsigned long       start;
-    unsigned long       end;
-    unsigned long       dmy1;
-    unsigned long       dmy2;
-} CodeRangeRec, *CodeRange;
-
-typedef struct _VRotateRec {
-    char        *charset_name;  /* Charset name                         */
-    XlcSide     side;           /* Encoding side                        */
-    int         num_cr;
-    CodeRange   code_range;
-    char        *xlfd_name;
-    XFontStruct *font;
-} VRotateRec, *VRotate;
-
-typedef enum {
-    XOMMultiByte,
-    XOMWideChar
-} XOMTextType;
-
-typedef struct _FontDataRec {
-    char       *name;
-    XlcSide    side;
-    /* For VW/UDC */
-    int        scopes_num;
-    FontScope  scopes;
-    char       *xlfd_name;
-    XFontStruct *font;
-} FontDataRec, *FontData;
-
-#define VROTATE_NONE   0
-#define VROTATE_PART   1
-#define VROTATE_ALL    2
-
-typedef struct _OMDataRec {
-    int        charset_count;
-    XlcCharSet         *charset_list;
-    int        font_data_count;
-    FontData   font_data;
-    /* For VW/UDC */
-    int substitute_num;
-    FontData substitute;
-    /* Vertical Writing */
-    int         vmap_num;
-    FontData    vmap;
-    int                vrotate_type;
-    int         vrotate_num;
-    CodeRange   vrotate;
-} OMDataRec, *OMData;
-
-typedef struct _XOMGenericPart {
-    int        data_num;
-    OMData     data;
-    Bool       on_demand_loading;
-    char       *object_name;
-} XOMGenericPart;
-
-typedef struct _XOMGenericRec {
-    XOMMethods                 methods;
-    XOMCoreRec                 core;
-    XOMGenericPart     gen;
-} XOMGenericRec, *XOMGeneric;
-
-/*
- * XOC dependent data
- */
-
-typedef struct _FontSetRec {
-    int                id;
-    int                charset_count;
-    XlcCharSet                 *charset_list;
-    int                font_data_count;
-    FontData           font_data;
-    char               *font_name;
-    XFontStruct        *info;
-    XFontStruct        *font;
-    XlcSide            side;
-    Bool               is_xchar2b;
-    /* For VW/UDC */
-    int                substitute_num;
-    FontData           substitute;
-    /* Vertical Writing */
-    int         vmap_num;
-    FontData    vmap;
-    int         vrotate_num;
-    VRotate     vrotate;
-} FontSetRec, *FontSet;
-
-typedef struct _XOCGenericPart {
-    XlcConv            mbs_to_cs;
-    XlcConv            wcs_to_cs;
-    int                font_set_num;
-    FontSet            font_set;
-} XOCGenericPart;
-
-typedef struct _XOCGenericRec {
-    XOCMethods                 methods;
-    XOCCoreRec                 core;   
-    XOCGenericPart     gen;
-} XOCGenericRec, *XOCGeneric;
-
-_XFUNCPROTOBEGIN
-
-extern XOM _falomGenericOpenOM(
-#if NeedFunctionPrototypes
-    XLCd               /* lcd */,
-    Display*           /* dpy */,
-    XrmDatabase                /* rdb */,
-    _Xconst char*      /* res_name */,
-    _Xconst char*      /* res_class */
-#endif
-);
-
-extern XlcConv _XomInitConverter(
-#if NeedFunctionPrototypes
-    XOC                        /* oc */,
-    XOMTextType                /* type */
-#endif
-);
-
-extern int _XomConvert(
-#if NeedFunctionPrototypes
-    XOC                        /* oc */,
-    XlcConv            /* conv */,
-    XPointer*          /* from */,
-    int*               /* from_left */,
-    XPointer*          /* to */,
-    int*               /* to_left */,
-    XPointer*          /* args */,
-    int                        /* num_args */
-#endif
-);
-
-_XFUNCPROTOEND
-
-#endif  /* _XOMGENERIC_H_ */
diff --git a/cde/programs/dtudcfonted/libfal/_falrm.c b/cde/programs/dtudcfonted/libfal/_falrm.c
deleted file mode 100644 (file)
index e768601..0000000
+++ /dev/null
@@ -1,2624 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* Xrm.c 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:11         */ 
-/* $XConsortium: _falrm.c /main/1 1996/04/08 15:21:43 cde-fuj $ */
-
-/***********************************************************
-Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-/*
-
-Copyright (c) 1987, 1988, 1990  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-#include       <stdio.h>
-#include       <ctype.h>
-#include       "_fallibint.h"
-#include       <X11/Xresource.h>
-#include       "_fallcint.h"
-#ifdef XTHREADS
-#include       "_falloking.h"
-#endif
-#include       "_falrmI.h"
-#include       <X11/Xos.h>
-
-#ifdef __STDC__
-#define Const const
-#else
-#define Const /**/
-#endif
-#if defined(__STDC__) && !defined(NORCONST)
-#define RConst const
-#else
-#define RConst /**/
-#endif
-
-/*
-
-These Xrm routines allow very fast lookup of resources in the resource
-database.  Several usage patterns are exploited:
-
-(1) Widgets get a lot of resources at one time.  Rather than look up each from
-scratch, we can precompute the prioritized list of database levels once, then
-search for each resource starting at the beginning of the list.
-
-(2) Many database levels don't contain any leaf resource nodes.  There is no
-point in looking for resources on a level that doesn't contain any.  This
-information is kept on a per-level basis.
-
-(3) Sometimes the widget instance tree is structured such that you get the same
-class name repeated on the fully qualified widget name.  This can result in the
-same database level occurring multiple times on the search list.  The code below
-only checks to see if you get two identical search lists in a row, rather than
-look back through all database levels, but in practice this removes all
-duplicates I've ever observed.
-
-Joel McCormack
-
-*/
-
-/*
-
-The Xrm representation has been completely redesigned to substantially reduce
-memory and hopefully improve performance.
-
-The database is structured into two kinds of tables: LTables that contain
-only values, and NTables that contain only other tables.
-
-Some invariants:
-
-The next pointer of the top-level node table points to the top-level leaf
-table, if any.
-
-Within an LTable, for a given name, the tight value always precedes the
-loose value, and if both are present the loose value is always right after
-the tight value.
-
-Within an NTable, all of the entries for a given name are contiguous,
-in the order tight NTable, loose NTable, tight LTable, loose LTable.
-
-Bob Scheifler
-
-*/
-
-typedef unsigned long Signature;
-
-static XrmQuark XrmQString, XrmQANY;
-
-typedef        Bool (*DBEnumProc)(
-#if NeedNestedPrototypes    /* this is Nested on purpose, to match Xlib.h */
-    XrmDatabase*       /* db */,
-    XrmBindingList     /* bindings */,
-    XrmQuarkList       /* quarks */,
-    XrmRepresentation* /* type */,
-    XrmValue*          /* value */,
-    XPointer           /* closure */
-#endif
-);
-
-typedef struct _VEntry {
-    struct _VEntry     *next;          /* next in chain */
-    XrmQuark           name;           /* name of this entry */
-    unsigned int       tight:1;        /* 1 if it is a tight binding */
-    unsigned int       string:1;       /* 1 if type is String */
-    unsigned int       size:30;        /* size of value */
-} VEntryRec, *VEntry;
-
-
-typedef struct _DEntry {
-    VEntryRec          entry;          /* entry */
-    XrmRepresentation  type;           /* representation type */
-} DEntryRec, *DEntry;
-
-/* the value is right after the structure */
-#define StringValue(ve) (XPointer)((ve) + 1)
-#define RepType(ve) ((DEntry)(ve))->type
-/* the value is right after the structure */
-#define DataValue(ve) (XPointer)(((DEntry)(ve)) + 1)
-#define RawValue(ve) (char *)((ve)->string ? StringValue(ve) : DataValue(ve))
-
-typedef struct _NTable {
-    struct _NTable     *next;          /* next in chain */
-    XrmQuark           name;           /* name of this entry */
-    unsigned int       tight:1;        /* 1 if it is a tight binding */
-    unsigned int       leaf:1;         /* 1 if children are values */
-    unsigned int       hasloose:1;     /* 1 if has loose children */
-    unsigned int       hasany:1;       /* 1 if has ANY entry */
-    unsigned int       pad:4;          /* unused */
-    unsigned int       mask:8;         /* hash size - 1 */
-    unsigned int       entries:16;     /* number of children */
-} NTableRec, *NTable;
-
-/* the buckets are right after the structure */
-#define NodeBuckets(ne) ((NTable *)((ne) + 1))
-#define NodeHash(ne,q) NodeBuckets(ne)[(q) & (ne)->mask]
-
-/* leaf tables have an extra level of indirection for the buckets,
- * so that resizing can be done without invalidating a search list.
- * This is completely ugly, and wastes some memory, but the Xlib
- * spec doesn't really specify whether invalidation is OK, and the
- * old implementation did not invalidate.
- */
-typedef struct _LTable {
-    NTableRec          table;
-    VEntry             *buckets;
-} LTableRec, *LTable;
-
-#define LeafHash(le,q) (le)->buckets[(q) & (le)->table.mask]
-
-/* An XrmDatabase just holds a pointer to the first top-level table.
- * The type name is no longer descriptive, but better to not change
- * the Xresource.h header file.  This type also gets used to define
- * XrmSearchList, which is a complete crock, but we'll just leave it
- * and caste types as required.
- */
-typedef struct _XrmHashBucketRec {
-    NTable table;
-    XPointer mbstate;
-    XrmMethods methods;
-#ifdef XTHREADS
-    LockInfoRec linfo;
-#endif
-} XrmHashBucketRec;
-
-/* closure used in get/put resource */
-typedef struct _VClosure {
-    XrmRepresentation  *type;          /* type of value */
-    XrmValuePtr                value;          /* value itself */
-} VClosureRec, *VClosure;
-
-/* closure used in get search list */
-typedef struct _SClosure {
-    LTable             *list;          /* search list */
-    int                        idx;            /* index of last filled element */
-    int                        limit;          /* maximum index */
-} SClosureRec, *SClosure;
-
-/* placed in XrmSearchList to indicate next table is loose only */
-#define LOOSESEARCH ((LTable)1)
-
-/* closure used in enumerate database */
-typedef struct _EClosure {
-    XrmDatabase db;                    /* the database */
-    DBEnumProc proc;                   /* the user proc */
-    XPointer closure;                  /* the user closure */
-    XrmBindingList bindings;           /* binding list */
-    XrmQuarkList quarks;               /* quark list */
-    int mode;                          /* XrmEnum<kind> */
-} EClosureRec, *EClosure;
-
-/* predicate to determine when to resize a hash table */
-#define GrowthPred(n,m) ((unsigned)(n) > (((m) + 1) << 2))
-
-#define GROW(prev) \
-    if (GrowthPred((*prev)->entries, (*prev)->mask)) \
-       GrowTable(prev)
-
-/* pick a reasonable value for maximum depth of resource database */
-#define MAXDBDEPTH 100
-
-/* macro used in get/search functions */
-
-/* find an entry named ename, with leafness given by leaf */
-#define NFIND(ename) \
-    q = ename; \
-    entry = NodeHash(table, q); \
-    while (entry && entry->name != q) \
-       entry = entry->next; \
-    if (leaf && entry && !entry->leaf) { \
-       entry = entry->next; \
-       if (entry && !entry->leaf) \
-           entry = entry->next; \
-       if (entry && entry->name != q) \
-           entry = (NTable)NULL; \
-    }
-
-/* resourceQuarks keeps track of what quarks have been associated with values
- * in all LTables.  If a quark has never been used in an LTable, we don't need
- * to bother looking for it.
- */
-
-static unsigned char *resourceQuarks = (unsigned char *)NULL;
-static XrmQuark maxResourceQuark = -1;
-
-/* determines if a quark has been used for a value in any database */
-#define IsResourceQuark(q)  ((q) > 0 && (q) <= maxResourceQuark && \
-                            resourceQuarks[(q) >> 3] & (1 << ((q) & 7)))
-
-typedef unsigned char XrmBits;
-
-#define BSLASH  ((XrmBits) (1 << 5))
-#define NORMAL ((XrmBits) (1 << 4))
-#define EOQ    ((XrmBits) (1 << 3))
-#define SEP    ((XrmBits) (1 << 2))
-#define ENDOF  ((XrmBits) (1 << 1))
-#define SPACE  (NORMAL|EOQ|SEP|(XrmBits)0)
-#define RSEP   (NORMAL|EOQ|SEP|(XrmBits)1)
-#define EOS    (EOQ|SEP|ENDOF|(XrmBits)0)
-#define EOL    (EOQ|SEP|ENDOF|(XrmBits)1)
-#define BINDING        (NORMAL|EOQ)
-#define ODIGIT (NORMAL|(XrmBits)1)
-
-#define next_char(ch,str) xrmtypes[(unsigned char)((ch) = *(++(str)))]
-#define next_mbchar(ch,len,str) xrmtypes[(unsigned char)(ch = (*db->methods->mbchar)(db->mbstate, str, &len), str += len, ch)]
-
-#define is_space(bits)         ((bits) == SPACE)
-#define is_EOQ(bits)           ((bits) & EOQ)
-#define is_EOF(bits)           ((bits) == EOS)
-#define is_EOL(bits)           ((bits) & ENDOF)
-#define is_binding(bits)       ((bits) == BINDING)
-#define is_odigit(bits)                ((bits) == ODIGIT)
-#define is_separator(bits)     ((bits) & SEP)
-#define is_nonpcs(bits)                (!(bits))
-#define is_normal(bits)                ((bits) & NORMAL)
-#define is_simple(bits)                ((bits) & (NORMAL|BSLASH))
-#define is_special(bits)       ((bits) & (ENDOF|BSLASH))
-
-/* parsing types */
-static XrmBits Const xrmtypes[256] = {
-    EOS,0,0,0,0,0,0,0,
-    0,SPACE,EOL,0,0,0,0,0,
-    0,0,0,0,0,0,0,0,
-    0,0,0,0,0,0,0,0,
-    SPACE,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,
-    NORMAL,NORMAL,BINDING,NORMAL,NORMAL,NORMAL,BINDING,NORMAL,
-    ODIGIT,ODIGIT,ODIGIT,ODIGIT,ODIGIT,ODIGIT,ODIGIT,ODIGIT,
-    NORMAL,NORMAL,RSEP,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,
-    NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,
-    NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,
-    NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,
-    NORMAL,NORMAL,NORMAL,NORMAL,BSLASH,NORMAL,NORMAL,NORMAL,
-    NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,
-    NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,
-    NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,
-    NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,0
-    /* The rest will be automatically initialized to zero. */
-};
-
-void falrmInitialize()
-{
-    XrmQString = falrmPermStringToQuark("String");
-    XrmQANY = falrmPermStringToQuark("?");
-}
-
-XrmDatabase falrmGetDatabase(display)
-    Display *display;
-{
-    XrmDatabase retval;
-    LockDisplay(display);
-    retval = display->db;
-    UnlockDisplay(display);
-    return retval;
-}
-
-void falrmSetDatabase(display, database)
-    Display *display;
-    XrmDatabase database;
-{
-    LockDisplay(display);
-    display->db = database;
-    UnlockDisplay(display);
-}
-
-#if NeedFunctionPrototypes
-void falrmStringToQuarkList(
-    register _Xconst char  *name,
-    register XrmQuarkList quarks)   /* RETURN */
-#else
-void falrmStringToQuarkList(name, quarks)
-    register char       *name;
-    register XrmQuarkList quarks;   /* RETURN */
-#endif
-{
-    register XrmBits           bits;
-    register Signature         sig = 0;
-    register char              ch, *tname;
-    register int               i = 0;
-
-    if (tname = (char *)name) {
-       tname--;
-       while (!is_EOF(bits = next_char(ch, tname))) {
-           if (is_binding (bits)) {
-               if (i) {
-                   /* Found a complete name */
-                   *quarks++ = _falrmInternalStringToQuark(name,tname - name,
-                                                         sig, False);
-                   i = 0;
-                   sig = 0;
-               }
-               name = tname+1;
-           }
-           else {
-               sig = (sig << 1) + ch; /* Compute the signature. */
-               i++;
-           }
-       }
-       *quarks++ = _falrmInternalStringToQuark(name, tname - name, sig, False);
-    }
-    *quarks = NULLQUARK;
-}
-
-#if NeedFunctionPrototypes
-void falrmStringToBindingQuarkList(
-    register _Xconst char   *name,
-    register XrmBindingList bindings,   /* RETURN */
-    register XrmQuarkList   quarks)     /* RETURN */
-#else
-void falrmStringToBindingQuarkList(name, bindings, quarks)
-    register char          *name;
-    register XrmBindingList bindings;   /* RETURN */
-    register XrmQuarkList   quarks;     /* RETURN */
-#endif
-{
-    register XrmBits           bits;
-    register Signature         sig = 0;
-    register char              ch, *tname;
-    register XrmBinding        binding;
-    register int               i = 0;
-
-    if (tname = (char *)name) {
-       tname--;
-       binding = XrmBindTightly;
-       while (!is_EOF(bits = next_char(ch, tname))) {
-           if (is_binding (bits)) {
-               if (i) {
-                   /* Found a complete name */
-                   *bindings++ = binding;
-                   *quarks++ = _falrmInternalStringToQuark(name, tname - name,
-                                                         sig, False);
-
-                   i = 0;
-                   sig = 0;
-                   binding = XrmBindTightly;
-               }
-               name = tname+1;
-
-               if (ch == '*')
-                   binding = XrmBindLoosely;
-           }
-           else {
-               sig = (sig << 1) + ch; /* Compute the signature. */
-               i++;
-           }
-       }
-       *bindings = binding;
-       *quarks++ = _falrmInternalStringToQuark(name, tname - name, sig, False);
-    }
-    *quarks = NULLQUARK;
-}
-
-#ifdef DEBUG
-
-static void PrintQuarkList(quarks, stream)
-    XrmQuarkList    quarks;
-    FILE           *stream;
-{
-    Bool           firstNameSeen;
-
-    for (firstNameSeen = False; *quarks; quarks++) {
-       if (firstNameSeen) {
-           (void) fprintf(stream, ".");
-       }
-       firstNameSeen = True;
-       (void) fputs(falrmQuarkToString(*quarks), stream);
-    }
-} /* PrintQuarkList */
-
-#endif /* DEBUG */
-
-/*ARGSUSED*/
-static void mbnoop(state)
-    XPointer state;
-{
-}
-
-/*ARGSUSED*/
-static char mbchar(state, str, lenp)
-    XPointer state;
-    char *str;
-    int *lenp;
-{
-    *lenp = 1;
-    return *str;
-}
-
-/*ARGSUSED*/
-static char *lcname(state)
-    XPointer state;
-{
-    return "C";
-}
-
-static RConst XrmMethodsRec mb_methods = {
-    mbnoop,
-    mbchar,
-    mbnoop,
-    lcname,
-    mbnoop
-};
-
-static XrmDatabase NewDatabase()
-{
-    register XrmDatabase db;
-
-    db = (XrmDatabase) Xmalloc(sizeof(XrmHashBucketRec));
-    if (db) {
-       _XCreateMutex(&db->linfo);
-       db->table = (NTable)NULL;
-       db->methods = _falrmInitParseInfo(&db->mbstate);
-       if (!db->methods)
-           db->methods = (XrmMethods)&mb_methods;
-    }
-    return db;
-}
-
-/* move all values from ftable to ttable, and free ftable's buckets.
- * ttable is quaranteed empty to start with.
- */
-static void MoveValues(ftable, ttable)
-    LTable ftable;
-    register LTable ttable;
-{
-    register VEntry fentry, nfentry;
-    register VEntry *prev;
-    register VEntry *bucket;
-    register VEntry tentry;
-    register int i;
-
-    for (i = ftable->table.mask, bucket = ftable->buckets; i >= 0; i--) {
-       for (fentry = *bucket++; fentry; fentry = nfentry) {
-           prev = &LeafHash(ttable, fentry->name);
-           tentry = *prev;
-           *prev = fentry;
-           /* chain on all with same name, to preserve invariant order */
-           while ((nfentry = fentry->next) && nfentry->name == fentry->name)
-               fentry = nfentry;
-           fentry->next = tentry;
-       }
-    }
-    Xfree((char *)ftable->buckets);
-}
-
-/* move all tables from ftable to ttable, and free ftable.
- * ttable is quaranteed empty to start with.
- */
-static void MoveTables(ftable, ttable)
-    NTable ftable;
-    register NTable ttable;
-{
-    register NTable fentry, nfentry;
-    register NTable *prev;
-    register NTable *bucket;
-    register NTable tentry;
-    register int i;
-
-    for (i = ftable->mask, bucket = NodeBuckets(ftable); i >= 0; i--) {
-       for (fentry = *bucket++; fentry; fentry = nfentry) {
-           prev = &NodeHash(ttable, fentry->name);
-           tentry = *prev;
-           *prev = fentry;
-           /* chain on all with same name, to preserve invariant order */
-           while ((nfentry = fentry->next) && nfentry->name == fentry->name)
-               fentry = nfentry;
-           fentry->next = tentry;
-       }
-    }
-    Xfree((char *)ftable);
-}
-
-/* grow the table, based on current number of entries */
-static void GrowTable(prev)
-    NTable *prev;
-{
-    register NTable table;
-    register int i;
-
-    table = *prev;
-    i = table->mask;
-    if (i == 255) /* biggest it gets */
-       return;
-    while (i < 255 && GrowthPred(table->entries, i))
-       i = (i << 1) + 1;
-    i++; /* i is now the new size */
-    if (table->leaf) {
-       register LTable ltable;
-       LTableRec otable;
-
-       ltable = (LTable)table;
-       /* cons up a copy to make MoveValues look symmetric */
-       otable = *ltable;
-       ltable->buckets = (VEntry *)Xmalloc(i * sizeof(VEntry));
-       if (!ltable->buckets) {
-           ltable->buckets = otable.buckets;
-           return;
-       }
-       ltable->table.mask = i - 1;
-       bzero((char *)ltable->buckets, i * sizeof(VEntry));
-       MoveValues(&otable, ltable);
-    } else {
-       register NTable ntable;
-
-       ntable = (NTable)Xmalloc(sizeof(NTableRec) + i * sizeof(NTable));
-       if (!ntable)
-           return;
-       *ntable = *table;
-       ntable->mask = i - 1;
-       bzero((char *)NodeBuckets(ntable), i * sizeof(NTable));
-       *prev = ntable;
-       MoveTables(table, ntable);
-    }
-}
-
-/* merge values from ftable into *pprev, destroy ftable in the process */
-static void MergeValues(ftable, pprev, override)
-    LTable ftable;
-    NTable *pprev;
-    Bool override;
-{
-    register VEntry fentry, tentry;
-    register VEntry *prev;
-    register LTable ttable;
-    VEntry *bucket;
-    int i;
-    register XrmQuark q;
-
-    ttable = (LTable)*pprev;
-    if (ftable->table.hasloose)
-       ttable->table.hasloose = 1;
-    for (i = ftable->table.mask, bucket = ftable->buckets;
-        i >= 0;
-        i--, bucket++) {
-       for (fentry = *bucket; fentry; ) {
-           q = fentry->name;
-           prev = &LeafHash(ttable, q);
-           tentry = *prev;
-           while (tentry && tentry->name != q)
-               tentry = *(prev = &tentry->next);
-           /* note: test intentionally uses fentry->name instead of q */
-           /* permits serendipitous inserts */
-           while (tentry && tentry->name == fentry->name) {
-               /* if tentry is earlier, skip it */
-               if (!fentry->tight && tentry->tight) {
-                   tentry = *(prev = &tentry->next);
-                   continue;
-               }
-               if (fentry->tight != tentry->tight) {
-                   /* no match, chain in fentry */
-                   *prev = fentry;
-                   prev = &fentry->next;
-                   fentry = *prev;
-                   *prev = tentry;
-                   ttable->table.entries++;
-               } else if (override) {
-                   /* match, chain in fentry, splice out and free tentry */
-                   *prev = fentry;
-                   prev = &fentry->next;
-                   fentry = *prev;
-                   *prev = tentry->next;
-                   /* free the overridden entry */
-                   Xfree((char *)tentry);
-                   /* get next tentry */
-                   tentry = *prev;
-               } else {
-                   /* match, discard fentry */
-                   prev = &tentry->next;
-                   tentry = fentry; /* use as a temp var */
-                   fentry = fentry->next;
-                   /* free the overpowered entry */
-                   Xfree((char *)tentry);
-                   /* get next tentry */
-                   tentry = *prev;
-               }
-               if (!fentry)
-                   break;
-           }
-           /* at this point, tentry cannot match any fentry named q */
-           /* chain in all bindings together, preserve invariant order */
-           while (fentry && fentry->name == q) {
-               *prev = fentry;
-               prev = &fentry->next;
-               fentry = *prev;
-               *prev = tentry;
-               ttable->table.entries++;
-           }
-       }
-    }
-    Xfree((char *)ftable->buckets);
-    Xfree((char *)ftable);
-    /* resize if necessary, now that we're all done */
-    GROW(pprev);
-}
-
-/* merge tables from ftable into *pprev, destroy ftable in the process */
-static void MergeTables(ftable, pprev, override)
-    NTable ftable;
-    NTable *pprev;
-    Bool override;
-{
-    register NTable fentry, tentry;
-    NTable nfentry;
-    register NTable *prev;
-    register NTable ttable;
-    NTable *bucket;
-    int i;
-    register XrmQuark q;
-
-    ttable = *pprev;
-    if (ftable->hasloose)
-       ttable->hasloose = 1;
-    if (ftable->hasany)
-       ttable->hasany = 1;
-    for (i = ftable->mask, bucket = NodeBuckets(ftable);
-        i >= 0;
-        i--, bucket++) {
-       for (fentry = *bucket; fentry; ) {
-           q = fentry->name;
-           prev = &NodeHash(ttable, q);
-           tentry = *prev;
-           while (tentry && tentry->name != q)
-               tentry = *(prev = &tentry->next);
-           /* note: test intentionally uses fentry->name instead of q */
-           /* permits serendipitous inserts */
-           while (tentry && tentry->name == fentry->name) {
-               /* if tentry is earlier, skip it */
-               if ((fentry->leaf && !tentry->leaf) ||
-                   (!fentry->tight && tentry->tight &&
-                    (fentry->leaf || !tentry->leaf))) {
-                   tentry = *(prev = &tentry->next);
-                   continue;
-               }
-               nfentry = fentry->next;
-               if (fentry->leaf != tentry->leaf ||
-                   fentry->tight != tentry->tight) {
-                   /* no match, just chain in */
-                   *prev = fentry;
-                   *(prev = &fentry->next) = tentry;
-                   ttable->entries++;
-               } else {
-                   if (fentry->leaf)
-                       MergeValues((LTable)fentry, prev, override);
-                   else
-                       MergeTables(fentry, prev, override);
-                   /* bump to next tentry */
-                   tentry = *(prev = &(*prev)->next);
-               }
-               /* bump to next fentry */
-               fentry = nfentry;
-               if (!fentry)
-                   break;
-           }
-           /* at this point, tentry cannot match any fentry named q */
-           /* chain in all bindings together, preserve invariant order */
-           while (fentry && fentry->name == q) {
-               *prev = fentry;
-               prev = &fentry->next;
-               fentry = *prev;
-               *prev = tentry;
-               ttable->entries++;
-           }
-       }
-    }
-    Xfree((char *)ftable);
-    /* resize if necessary, now that we're all done */
-    GROW(pprev);
-}
-
-void falrmCombineDatabase(from, into, override)
-    XrmDatabase        from, *into;
-    Bool override;
-{
-    register NTable *prev;
-    register NTable ftable, ttable, nftable;
-
-    if (!*into) {
-       *into = from;
-    } else if (from) {
-       _XLockMutex(&from->linfo);
-       _XLockMutex(&(*into)->linfo);
-       if (ftable = from->table) {
-           prev = &(*into)->table;
-           ttable = *prev;
-           if (!ftable->leaf) {
-               nftable = ftable->next;
-               if (ttable && !ttable->leaf) {
-                   /* both have node tables, merge them */
-                   MergeTables(ftable, prev, override);
-                   /* bump to into's leaf table, if any */
-                   ttable = *(prev = &(*prev)->next);
-               } else {
-                   /* into has no node table, link from's in */
-                   *prev = ftable;
-                   *(prev = &ftable->next) = ttable;
-               }
-               /* bump to from's leaf table, if any */
-               ftable = nftable;
-           } else {
-               /* bump to into's leaf table, if any */
-               if (ttable && !ttable->leaf)
-                   ttable = *(prev = &ttable->next);
-           }
-           if (ftable) {
-               /* if into has a leaf, merge, else insert */
-               if (ttable)
-                   MergeValues((LTable)ftable, prev, override);
-               else
-                   *prev = ftable;
-           }
-       }
-       (from->methods->destroy)(from->mbstate);
-       _XFreeMutex(&from->linfo);
-       Xfree((char *)from);
-       _XUnlockMutex(&(*into)->linfo);
-    }
-}
-
-void falrmMergeDatabases(from, into)
-    XrmDatabase        from, *into;
-{
-    falrmCombineDatabase(from, into, True);
-}
-
-/* store a value in the database, overriding any existing entry */
-static void PutEntry(db, bindings, quarks, type, value)
-    XrmDatabase                db;
-    XrmBindingList     bindings;
-    XrmQuarkList       quarks;
-    XrmRepresentation  type;
-    XrmValuePtr                value;
-{
-    register NTable *pprev, *prev;
-    register NTable table;
-    register XrmQuark q;
-    register VEntry *vprev;
-    register VEntry entry;
-    NTable *nprev, *firstpprev;
-
-#define NEWTABLE(q,i) \
-    table = (NTable)Xmalloc(sizeof(LTableRec)); \
-    if (!table) \
-       return; \
-    table->name = q; \
-    table->hasloose = 0; \
-    table->hasany = 0; \
-    table->mask = 0; \
-    table->entries = 0; \
-    if (quarks[i]) { \
-       table->leaf = 0; \
-       nprev = NodeBuckets(table); \
-    } else { \
-       table->leaf = 1; \
-       if (!(nprev = (NTable *)Xmalloc(sizeof(VEntry *)))) \
-           return; \
-       ((LTable)table)->buckets = (VEntry *)nprev; \
-    } \
-    *nprev = (NTable)NULL; \
-    table->next = *prev; \
-    *prev = table
-
-    if (!db || !*quarks)
-       return;
-    table = *(prev = &db->table);
-    /* if already at leaf, bump to the leaf table */
-    if (!quarks[1] && table && !table->leaf)
-       table = *(prev = &table->next);
-    pprev = prev;
-    if (!table || (quarks[1] && table->leaf)) {
-       /* no top-level node table, create one and chain it in */
-       NEWTABLE(NULLQUARK,1);
-       table->tight = 1; /* arbitrary */
-       prev = nprev;
-    } else {
-       /* search along until we need a value */
-       while (quarks[1]) {
-           q = *quarks;
-           table = *(prev = &NodeHash(table, q));
-           while (table && table->name != q)
-               table = *(prev = &table->next);
-           if (!table)
-               break; /* not found */
-           if (quarks[2]) {
-               if (table->leaf)
-                   break; /* not found */
-           } else {
-               if (!table->leaf) {
-                   /* bump to leaf table, if any */
-                   table = *(prev = &table->next);
-                   if (!table || table->name != q)
-                       break; /* not found */
-                   if (!table->leaf) {
-                       /* bump to leaf table, if any */
-                       table = *(prev = &table->next);
-                       if (!table || table->name != q)
-                           break; /* not found */
-                   }
-               }
-           }
-           if (*bindings == XrmBindTightly) {
-               if (!table->tight)
-                   break; /* not found */
-           } else {
-               if (table->tight) {
-                   /* bump to loose table, if any */
-                   table = *(prev = &table->next);
-                   if (!table || table->name != q ||
-                       !quarks[2] != table->leaf)
-                       break; /* not found */
-               }
-           }
-           /* found that one, bump to next quark */
-           pprev = prev;
-           quarks++;
-           bindings++;
-       }
-       if (!quarks[1]) {
-           /* found all the way to a leaf */
-           q = *quarks;
-           entry = *(vprev = &LeafHash((LTable)table, q));
-           while (entry && entry->name != q)
-               entry = *(vprev = &entry->next);
-           /* if want loose and have tight, bump to next entry */
-           if (entry && *bindings == XrmBindLoosely && entry->tight)
-               entry = *(vprev = &entry->next);
-           if (entry && entry->name == q &&
-               (*bindings == XrmBindTightly) == entry->tight) {
-               /* match, need to override */
-               if ((type == XrmQString) == entry->string &&
-                   entry->size == value->size) {
-                   /* update type if not String, can be different */
-                   if (!entry->string)
-                       RepType(entry) = type;
-                   /* identical size, just overwrite value */
-                   memcpy(RawValue(entry), (char *)value->addr, value->size);
-                   return;
-               }
-               /* splice out and free old entry */
-               *vprev = entry->next;
-               Xfree((char *)entry);
-               (*pprev)->entries--;
-           }
-           /* this is where to insert */
-           prev = (NTable *)vprev;
-       }
-    }
-    /* keep the top table, because we may have to grow it */
-    firstpprev = pprev;
-    /* iterate until we get to the leaf */
-    while (quarks[1]) {
-       /* build a new table and chain it in */
-       NEWTABLE(*quarks,2);
-       if (*quarks++ == XrmQANY)
-           (*pprev)->hasany = 1;
-       if (*bindings++ == XrmBindTightly) {
-           table->tight = 1;
-       } else {
-           table->tight = 0;
-           (*pprev)->hasloose = 1;
-       }
-       (*pprev)->entries++;
-       pprev = prev;
-       prev = nprev;
-    }
-    /* now allocate the value entry */
-    entry = (VEntry)Xmalloc(((type == XrmQString) ?
-                            sizeof(VEntryRec) : sizeof(DEntryRec)) +
-                           value->size);
-    if (!entry)
-       return;
-    entry->name = q = *quarks;
-    if (*bindings == XrmBindTightly) {
-       entry->tight = 1;
-    } else {
-       entry->tight = 0;
-       (*pprev)->hasloose = 1;
-    }
-    /* chain it in, with a bit of type cast ugliness */
-    entry->next = *((VEntry *)prev);
-    *((VEntry *)prev) = entry;
-    entry->size = value->size;
-    if (type == XrmQString) {
-       entry->string = 1;
-    } else {
-       entry->string = 0;
-       RepType(entry) = type;
-    }
-    /* save a copy of the value */
-    memcpy(RawValue(entry), (char *)value->addr, value->size);
-    (*pprev)->entries++;
-    /* this is a new leaf, need to remember it for search lists */
-    if (q > maxResourceQuark) {
-       unsigned oldsize = (maxResourceQuark + 1) >> 3;
-       unsigned size = ((q | 0x7f) + 1) >> 3; /* reallocate in chunks */
-       if (resourceQuarks)
-           resourceQuarks = (unsigned char *)Xrealloc((char *)resourceQuarks,
-                                                      size);
-       else
-           resourceQuarks = (unsigned char *)Xmalloc(size);
-       if (resourceQuarks) {
-           bzero((char *)&resourceQuarks[oldsize], size - oldsize);
-           maxResourceQuark = (size << 3) - 1;
-       } else {
-           maxResourceQuark = -1;
-       }
-    }
-    if (q > 0 && resourceQuarks)
-       resourceQuarks[q >> 3] |= 1 << (q & 0x7);
-    GROW(firstpprev);
-
-#undef NEWTABLE
-}
-
-void falrmQPutResource(pdb, bindings, quarks, type, value)
-    XrmDatabase                *pdb;
-    XrmBindingList      bindings;
-    XrmQuarkList       quarks;
-    XrmRepresentation  type;
-    XrmValuePtr                value;
-{
-    if (!*pdb) *pdb = NewDatabase();
-    _XLockMutex(&(*pdb)->linfo);
-    PutEntry(*pdb, bindings, quarks, type, value);
-    _XUnlockMutex(&(*pdb)->linfo);
-}
-
-#if NeedFunctionPrototypes
-void falrmPutResource(
-    XrmDatabase     *pdb,
-    _Xconst char    *specifier,
-    _Xconst char    *type,
-    XrmValuePtr            value)
-#else
-void falrmPutResource(pdb, specifier, type, value)
-    XrmDatabase     *pdb;
-    char           *specifier;
-    char           *type;
-    XrmValuePtr            value;
-#endif
-{
-    XrmBinding     bindings[MAXDBDEPTH+1];
-    XrmQuark       quarks[MAXDBDEPTH+1];
-
-    if (!*pdb) *pdb = NewDatabase();
-    _XLockMutex(&(*pdb)->linfo);
-    falrmStringToBindingQuarkList(specifier, bindings, quarks);
-    PutEntry(*pdb, bindings, quarks, falrmStringToQuark(type), value);
-    _XUnlockMutex(&(*pdb)->linfo);
-}
-
-#if NeedFunctionPrototypes
-void falrmQPutStringResource(
-    XrmDatabase     *pdb,
-    XrmBindingList  bindings,
-    XrmQuarkList    quarks,
-    _Xconst char    *str)
-#else
-void falrmQPutStringResource(pdb, bindings, quarks, str)
-    XrmDatabase     *pdb;
-    XrmBindingList  bindings;
-    XrmQuarkList    quarks;
-    char           *str;
-#endif
-{
-    XrmValue   value;
-
-    if (!*pdb) *pdb = NewDatabase();
-    value.addr = (XPointer) str;
-    value.size = strlen(str)+1;
-    _XLockMutex(&(*pdb)->linfo);
-    PutEntry(*pdb, bindings, quarks, XrmQString, &value);
-    _XUnlockMutex(&(*pdb)->linfo);
-}
-
-/*     Function Name: GetDatabase
- *     Description: Parses a string and stores it as a database.
- *     Arguments: db - the database.
- *                 str - a pointer to the string containing the database.
- *                 filename - source filename, if any.
- *                 doall - whether to do all lines or just one
- */
-
-/*
- * This function is highly optimized to inline as much as possible. 
- * Be very careful with modifications, or simplifications, as they 
- * may adversely affect the performance.
- *
- * Chris Peterson, MIT X Consortium            5/17/90.
- */
-
-#define LIST_SIZE 101
-#define BUFFER_SIZE 100
-
-static void GetIncludeFile();
-
-static void GetDatabase(db, str, filename, doall)
-    XrmDatabase db;
-    register char *str;
-    char *filename;
-    Bool doall;
-{
-    register char *ptr;
-    register XrmBits bits = 0;
-    register char c;
-    int len;
-    register Signature sig;
-    register char *ptr_max;
-    register XrmQuarkList t_quarks;
-    register XrmBindingList t_bindings;
-
-    int alloc_chars = BUFSIZ;
-    char buffer[BUFSIZ], *value_str;
-    XrmQuark quarks[LIST_SIZE];
-    XrmBinding bindings[LIST_SIZE];
-    XrmValue value;
-    Bool only_pcs;
-    Bool dolines;
-
-    if (!db)
-       return;
-
-    if (!(value_str = Xmalloc(sizeof(char) * alloc_chars)))
-       return;
-
-    (*db->methods->mbinit)(db->mbstate);
-    str--;
-    dolines = True;
-    while (!is_EOF(bits) && dolines) {
-       dolines = doall;
-
-       /*
-        * First: Remove extra whitespace. 
-        */
-
-       do {
-           bits = next_char(c, str);
-       } while is_space(bits);
-
-       /*
-        * Ignore empty lines.
-        */
-
-       if (is_EOL(bits))
-           continue;           /* start a new line. */
-
-       /*
-        * Second: check the first character in a line to see if it is
-        * "!" signifying a comment, or "#" signifying a directive.
-        */
-
-       if (c == '!') { /* Comment, spin to next newline */
-           while (is_simple(bits = next_char(c, str))) {}
-           if (is_EOL(bits))
-               continue;
-           while (!is_EOL(bits = next_mbchar(c, len, str))) {}
-           str--;
-           continue;           /* start a new line. */
-       }
-
-       if (c == '#') { /* Directive */
-           /* remove extra whitespace */
-           only_pcs = True;
-           while (is_space(bits = next_char(c, str))) {};
-           /* only "include" directive is currently defined */
-           if (!strncmp(str, "include", 7)) {
-               str += (7-1);
-               /* remove extra whitespace */
-               while (is_space(bits = next_char(c, str))) {};
-               /* must have a starting " */
-               if (c == '"') {
-                   char *fname = str+1;
-                   len = 0;
-                   do {
-                       if (only_pcs) {
-                           bits = next_char(c, str);
-                           if (is_nonpcs(bits))
-                               only_pcs = False;
-                       }
-                       if (!only_pcs)
-                           bits = next_mbchar(c, len, str);
-                   } while (c != '"' && !is_EOL(bits));
-                   /* must have an ending " */
-                   if (c == '"')
-                       GetIncludeFile(db, filename, fname, str - len - fname);
-               }
-           }
-           /* spin to next newline */
-           if (only_pcs) {
-               while (is_simple(bits))
-                   bits = next_char(c, str);
-               if (is_EOL(bits))
-                   continue;
-           }
-           while (!is_EOL(bits))
-               bits = next_mbchar(c, len, str);
-           str--;
-           continue;           /* start a new line. */
-       }
-
-       /*
-        * Third: loop through the LHS of the resource specification
-        * storing characters and converting this to a Quark.
-        *
-        * If the number of quarks is greater than LIST_SIZE - 1.  This
-        * function will trash your memory.
-        *
-        * If the length of any quark is larger than BUFSIZ this function
-        * will also trash memory.
-        */
-       
-       t_bindings = bindings;
-       t_quarks = quarks;
-
-       sig = 0;
-       ptr = buffer;
-       *t_bindings = XrmBindTightly;   
-       for(;;) {
-           if (!is_binding(bits)) {
-               while (!is_EOQ(bits)) {
-                   *ptr++ = c;
-                   sig = (sig << 1) + c; /* Compute the signature. */
-                   bits = next_char(c, str);
-               }
-
-               *t_quarks++ = _falrmInternalStringToQuark(buffer, ptr - buffer,
-                                                       sig, False);
-
-               if (is_separator(bits))  {
-                   if (!is_space(bits))
-                       break;
-
-                   /* Remove white space */
-                   do {
-                       *ptr++ = c;
-                       sig = (sig << 1) + c; /* Compute the signature. */
-                   } while (is_space(bits = next_char(c, str)));
-
-                   /* 
-                    * The spec doesn't permit it, but support spaces
-                    * internal to resource name/class 
-                    */
-
-                   if (is_separator(bits))
-                       break;
-                   t_quarks--;
-                   continue;
-               }
-
-               if (c == '.')
-                   *(++t_bindings) = XrmBindTightly;
-               else
-                   *(++t_bindings) = XrmBindLoosely;
-
-               sig = 0;
-               ptr = buffer;
-           }
-           else {
-               /*
-                * Magic unspecified feature #254.
-                *
-                * If two separators appear with no Text between them then
-                * ignore them.
-                *
-                * If anyone of those separators is a '*' then the binding 
-                * will be loose, otherwise it will be tight.
-                */
-
-               if (c == '*')
-                   *t_bindings = XrmBindLoosely;
-           }
-
-           bits = next_char(c, str);
-       }
-
-       *t_quarks = NULLQUARK;
-
-       /*
-        * Make sure that there is a ':' in this line.
-        */
-
-       if (c != ':') {
-           char oldc;
-
-           /*
-            * A parsing error has occurred, toss everything on the line
-            * a new_line can still be escaped with a '\'.
-            */
-
-           while (is_normal(bits))
-               bits = next_char(c, str);
-           if (is_EOL(bits))
-               continue;
-           bits = next_mbchar(c, len, str);
-           do {
-               oldc = c;
-               bits = next_mbchar(c, len, str);
-           } while (c && (c != '\n' || oldc == '\\'));
-           str--;
-           continue;
-       }
-
-       /*
-        * I now have a quark and binding list for the entire left hand
-        * side.  "c" currently points to the ":" separating the left hand
-        * side for the right hand side.  It is time to begin processing
-        * the right hand side.
-        */
-
-       /* 
-        * Fourth: Remove more whitespace
-        */
-
-       for(;;) {
-           if (is_space(bits = next_char(c, str)))
-               continue;
-           if (c != '\\')
-               break;
-           bits = next_char(c, str);
-           if (c == '\n')
-               continue;
-           str--;
-           bits = BSLASH;
-           c = '\\';
-           break;
-       }
-
-       /* 
-        * Fifth: Process the right hand side.
-        */
-
-       ptr = value_str;
-       ptr_max = ptr + alloc_chars - 4;
-       only_pcs = True;
-       len = 1;
-
-       for(;;) {
-
-           /*
-            * Tight loop for the normal case:  Non backslash, non-end of value
-            * character that will fit into the allocated buffer.
-            */
-
-           if (only_pcs) {
-               while (is_normal(bits) && ptr < ptr_max) {
-                   *ptr++ = c;
-                   bits = next_char(c, str);
-               }
-               if (is_EOL(bits))
-                   break;
-               if (is_nonpcs(bits)) {
-                   only_pcs = False;
-                   bits = next_mbchar(c, len, str);
-               }
-           }
-           while (!is_special(bits) && ptr + len <= ptr_max) {
-               len = -len;
-               while (len)
-                   *ptr++ = str[len++];
-               bits = next_mbchar(c, len, str);
-           }
-
-           if (is_EOL(bits)) {
-               str--;
-               break;
-           }
-
-           if (c == '\\') {
-               /*
-                * We need to do some magic after a backslash.
-                */
-               Bool read_next = True;
-
-               if (only_pcs) {
-                   bits = next_char(c, str);
-                   if (is_nonpcs(bits))
-                       only_pcs = False;
-               }
-               if (!only_pcs)
-                   bits = next_mbchar(c, len, str);
-
-               if (is_EOL(bits)) {
-                   if (is_EOF(bits))
-                       continue;
-               } else if (c == 'n') {
-                   /*
-                    * "\n" means insert a newline.
-                    */
-                   *ptr++ = '\n';
-               } else if (c == '\\') {
-                   /*
-                    * "\\" completes to just one backslash.
-                    */
-                   *ptr++ = '\\';
-               } else {
-                   /*
-                    * pick up to three octal digits after the '\'.
-                    */
-                   char temp[3];
-                   int count = 0;
-                   while (is_odigit(bits) && count < 3) {
-                       temp[count++] = c;
-                       if (only_pcs) {
-                           bits = next_char(c, str);
-                           if (is_nonpcs(bits))
-                               only_pcs = False;
-                       }
-                       if (!only_pcs)
-                           bits = next_mbchar(c, len, str);
-                   }
-
-                   /*
-                    * If we found three digits then insert that octal code
-                    * into the value string as a character.
-                    */
-
-                   if (count == 3) {
-                       *ptr++ = (unsigned char) ((temp[0] - '0') * 0100 +
-                                                 (temp[1] - '0') * 010 +
-                                                 (temp[2] - '0'));
-                   }
-                   else {
-                       int tcount;
-
-                       /* 
-                        * Otherwise just insert those characters into the 
-                        * string, since no special processing is needed on
-                        * numerics we can skip the special processing.
-                        */
-
-                       for (tcount = 0; tcount < count; tcount++) {
-                           *ptr++ = temp[tcount]; /* print them in
-                                                     the correct order */
-                       }
-                   }
-                   read_next = False;
-               }
-               if (read_next) {
-                   if (only_pcs) {
-                       bits = next_char(c, str);
-                       if (is_nonpcs(bits))
-                           only_pcs = False;
-                   }
-                   if (!only_pcs)
-                       bits = next_mbchar(c, len, str);
-               }
-           }
-
-           /* 
-            * It is important to make sure that there is room for at least
-            * four more characters in the buffer, since I can add that
-            * many characters into the buffer after a backslash has occurred.
-            */
-
-           if (ptr + len > ptr_max) {
-               char * temp_str;
-
-               alloc_chars += BUFSIZ/10;               
-               temp_str = Xrealloc(value_str, sizeof(char) * alloc_chars);
-
-               if (!temp_str) {
-                   Xfree(value_str);
-                   (*db->methods->mbfinish)(db->mbstate);
-                   return;
-               }
-
-               ptr = temp_str + (ptr - value_str); /* reset pointer. */
-               value_str = temp_str;
-               ptr_max = value_str + alloc_chars - 4;
-           }
-       }
-
-       /*
-        * Lastly: Terminate the value string, and store this entry 
-        *         into the database.
-        */
-
-       *ptr++ = '\0';
-
-       /* Store it in database */
-       value.size = ptr - value_str;
-       value.addr = (XPointer) value_str;
-       
-       PutEntry(db, bindings, quarks, XrmQString, &value);
-    }
-
-    Xfree(value_str);
-    (*db->methods->mbfinish)(db->mbstate);
-}
-
-#if NeedFunctionPrototypes
-void falrmPutStringResource(
-    XrmDatabase *pdb,
-    _Xconst char*specifier,
-    _Xconst char*str)
-#else
-void falrmPutStringResource(pdb, specifier, str)
-    XrmDatabase *pdb;
-    char       *specifier;
-    char       *str;
-#endif
-{
-    XrmValue   value;
-    XrmBinding bindings[MAXDBDEPTH+1];
-    XrmQuark   quarks[MAXDBDEPTH+1];
-
-    if (!*pdb) *pdb = NewDatabase();
-    falrmStringToBindingQuarkList(specifier, bindings, quarks);
-    value.addr = (XPointer) str;
-    value.size = strlen(str)+1;
-    _XLockMutex(&(*pdb)->linfo);
-    PutEntry(*pdb, bindings, quarks, XrmQString, &value);
-    _XUnlockMutex(&(*pdb)->linfo);
-}
-
-
-#if NeedFunctionPrototypes
-void falrmPutLineResource(
-    XrmDatabase *pdb,
-    _Xconst char*line)
-#else
-void falrmPutLineResource(pdb, line)
-    XrmDatabase *pdb;
-    char       *line;
-#endif
-{
-    if (!*pdb) *pdb = NewDatabase();
-    _XLockMutex(&(*pdb)->linfo);
-    GetDatabase(*pdb, line, (char *)NULL, False);
-    _XUnlockMutex(&(*pdb)->linfo);
-}
-
-#if NeedFunctionPrototypes
-XrmDatabase falrmGetStringDatabase(
-    _Xconst char    *data)
-#else
-XrmDatabase falrmGetStringDatabase(data)
-    char           *data;
-#endif
-{
-    XrmDatabase     db;
-
-    db = NewDatabase();
-    _XLockMutex(&db->linfo);
-    GetDatabase(db, data, (char *)NULL, True);
-    _XUnlockMutex(&db->linfo);
-    return db;
-}
-
-/*     Function Name: ReadInFile
- *     Description: Reads the file into a buffer.
- *     Arguments: filename - the name of the file.
- *     Returns: An allocated string containing the contents of the file.
- */
-
-static char *
-ReadInFile(filename)
-char * filename;
-{
-    register int fd, size;
-    char * filebuf;
-
-    if ( (fd = OpenFile(filename)) == -1 )
-       return (char *)NULL;
-
-    GetSizeOfFile(filename, size);
-       
-    if (!(filebuf = Xmalloc(size + 1))) { /* leave room for '\0' */
-       close(fd);
-       return (char *)NULL;
-    }
-
-    size = ReadFile(fd, filebuf, size);
-    if (size < 0) {
-       CloseFile(fd);
-       Xfree(filebuf);
-       return (char *)NULL;
-    }
-    CloseFile(fd);
-
-    filebuf[size] = '\0';      /* NULL terminate it. */
-    return filebuf;
-}
-
-static void
-GetIncludeFile(db, base, fname, fnamelen)
-    XrmDatabase db;
-    char *base;
-    char *fname;
-    int fnamelen;
-{
-    int len;
-    char *str;
-    char realfname[BUFSIZ];
-
-    if (fnamelen <= 0 || fnamelen >= BUFSIZ)
-       return;
-    if (*fname != '/' && base && (str = strrchr(base, '/'))) {
-       len = str - base + 1;
-       if (len + fnamelen >= BUFSIZ)
-           return;
-       strncpy(realfname, base, len);
-       strncpy(realfname + len, fname, fnamelen);
-       realfname[len + fnamelen] = '\0';
-    } else {
-       strncpy(realfname, fname, fnamelen);
-       realfname[fnamelen] = '\0';
-    }
-    if (!(str = ReadInFile(realfname)))
-       return;
-    GetDatabase(db, str, realfname, True);
-    Xfree(str);
-}
-
-#if NeedFunctionPrototypes
-XrmDatabase falrmGetFileDatabase(
-    _Xconst char    *filename)
-#else
-XrmDatabase falrmGetFileDatabase(filename)
-    char           *filename;
-#endif
-{
-    XrmDatabase db;
-    char *str;
-
-    if (!(str = ReadInFile(filename)))
-       return (XrmDatabase)NULL;
-
-    db = NewDatabase();
-    _XLockMutex(&db->linfo);
-    GetDatabase(db, str, filename, True);
-    _XUnlockMutex(&db->linfo);
-    Xfree(str);
-    return db;
-}
-
-#if NeedFunctionPrototypes
-Status falrmCombineFileDatabase(
-    _Xconst char    *filename,
-    XrmDatabase     *target,
-    Bool             override)
-#else
-Status falrmCombineFileDatabase(filename, target, override)
-    char        *filename;
-    XrmDatabase *target;
-    Bool         override;
-#endif
-{
-    XrmDatabase db;
-    char *str;
-
-    if (!(str = ReadInFile(filename)))
-       return 0;
-    if (override) {
-       db = *target;
-       if (!db)
-           *target = db = NewDatabase();
-    } else
-       db = NewDatabase();
-    _XLockMutex(&db->linfo);
-    GetDatabase(db, str, filename, True);
-    _XUnlockMutex(&db->linfo);
-    Xfree(str);
-    if (!override)
-       falrmCombineDatabase(db, target, False);
-    return 1;
-}
-
-/* call the user proc for every value in the table, arbitrary order.
- * stop if user proc returns True.  level is current depth in database.
- */
-/*ARGSUSED*/
-static Bool EnumLTable(table, names, classes, level, closure)
-    LTable             table;
-    XrmNameList                names;
-    XrmClassList       classes;
-    register int       level;
-    register EClosure  closure;
-{
-    register VEntry *bucket;
-    register int i;
-    register VEntry entry;
-    XrmValue value;
-    XrmRepresentation type;
-    Bool tightOk;
-
-    closure->bindings[level] = (table->table.tight ?
-                               XrmBindTightly : XrmBindLoosely);
-    closure->quarks[level] = table->table.name;
-    level++;
-    tightOk = !*names;
-    closure->quarks[level + 1] = NULLQUARK;
-    for (i = table->table.mask, bucket = table->buckets;
-        i >= 0;
-        i--, bucket++) {
-       for (entry = *bucket; entry; entry = entry->next) {
-           if (entry->tight && !tightOk)
-               continue;
-           closure->bindings[level] = (entry->tight ?
-                                       XrmBindTightly : XrmBindLoosely);
-           closure->quarks[level] = entry->name;
-           value.size = entry->size;
-           if (entry->string) {
-               type = XrmQString;
-               value.addr = StringValue(entry);
-           } else {
-               type = RepType(entry);
-               value.addr = DataValue(entry);
-           }
-           if ((*closure->proc)(&closure->db, closure->bindings+1,
-                                closure->quarks+1, &type, &value,
-                                closure->closure))
-               return True;
-       }
-    }
-    return False;
-}
-
-static Bool EnumAllNTable(table, level, closure)
-    NTable             table;
-    register int       level;
-    register EClosure  closure;
-{
-    register NTable *bucket;
-    register int i;
-    register NTable entry;
-    XrmQuark empty = NULLQUARK;
-
-    if (level >= MAXDBDEPTH)
-       return False;
-    for (i = table->mask, bucket = NodeBuckets(table);
-        i >= 0;
-        i--, bucket++) {
-       for (entry = *bucket; entry; entry = entry->next) {
-           if (entry->leaf) {
-               if (EnumLTable((LTable)entry, &empty, &empty, level, closure))
-                   return True;
-           } else {
-               closure->bindings[level] = (entry->tight ?
-                                           XrmBindTightly : XrmBindLoosely);
-               closure->quarks[level] = entry->name;
-               if (EnumAllNTable(entry, level+1, closure))
-                   return True;
-           }
-       }
-    }
-    return False;
-}
-
-/* recurse on every table in the table, arbitrary order.
- * stop if user proc returns True.  level is current depth in database.
- */
-static Bool EnumNTable(table, names, classes, level, closure)
-    NTable             table;
-    XrmNameList                names;
-    XrmClassList       classes;
-    register int       level;
-    register EClosure  closure;
-{
-    register NTable    entry;
-    register XrmQuark  q;
-    register unsigned int leaf;
-    Bool (*get)();
-    Bool bilevel;
-
-/* find entries named ename, leafness leaf, tight or loose, and call get */
-#define ITIGHTLOOSE(ename) \
-    NFIND(ename); \
-    if (entry) { \
-       if (leaf == entry->leaf) { \
-           if (!leaf && !entry->tight && entry->next && \
-               entry->next->name == q && entry->next->tight && \
-               (bilevel || entry->next->hasloose) && \
-               EnumLTable((LTable)entry->next, names+1, classes+1, \
-                          level, closure)) \
-               return True; \
-           if ((*get)(entry, names+1, classes+1, level, closure)) \
-               return True; \
-           if (entry->tight && (entry = entry->next) && \
-               entry->name == q && leaf == entry->leaf && \
-               (*get)(entry, names+1, classes+1, level, closure)) \
-               return True; \
-       } else if (entry->leaf) { \
-           if ((bilevel || entry->hasloose) && \
-               EnumLTable((LTable)entry, names+1, classes+1, level, closure))\
-               return True; \
-           if (entry->tight && (entry = entry->next) && \
-               entry->name == q && (bilevel || entry->hasloose) && \
-               EnumLTable((LTable)entry, names+1, classes+1, level, closure))\
-               return True; \
-       } \
-    }
-
-/* find entries named ename, leafness leaf, loose only, and call get */
-#define ILOOSE(ename) \
-    NFIND(ename); \
-    if (entry && entry->tight && (entry = entry->next) && entry->name != q) \
-       entry = (NTable)NULL; \
-    if (entry) { \
-       if (leaf == entry->leaf) { \
-           if ((*get)(entry, names+1, classes+1, level, closure)) \
-               return True; \
-       } else if (entry->leaf && (bilevel || entry->hasloose)) { \
-           if (EnumLTable((LTable)entry, names+1, classes+1, level, closure))\
-               return True; \
-       } \
-    }
-
-    if (level >= MAXDBDEPTH)
-       return False;
-    closure->bindings[level] = (table->tight ?
-                               XrmBindTightly : XrmBindLoosely);
-    closure->quarks[level] = table->name;
-    level++;
-    if (!*names) {
-       if (EnumAllNTable(table, level, closure))
-           return True;
-    } else {
-       if (names[1] || closure->mode == XrmEnumAllLevels) {
-           get = EnumNTable; /* recurse */
-           leaf = 0;
-           bilevel = !names[1];
-       } else {
-           get = EnumLTable; /* bottom of recursion */
-           leaf = 1;
-           bilevel = False;
-       }
-       if (table->hasloose && closure->mode == XrmEnumAllLevels) {
-           NTable *bucket;
-           int i;
-           XrmQuark empty = NULLQUARK;
-
-           for (i = table->mask, bucket = NodeBuckets(table);
-                i >= 0;
-                i--, bucket++) {
-               q = NULLQUARK;
-               for (entry = *bucket; entry; entry = entry->next) {
-                   if (!entry->tight && entry->name != q &&
-                       entry->name != *names && entry->name != *classes) {
-                       q = entry->name;
-                       if (entry->leaf) {
-                           if (EnumLTable((LTable)entry, &empty, &empty,
-                                          level, closure))
-                               return True;
-                       } else {
-                           if (EnumNTable(entry, &empty, &empty,
-                                          level, closure))
-                               return True;
-                       }
-                   }
-               }
-           }
-       }
-
-       ITIGHTLOOSE(*names);   /* do name, tight and loose */
-       ITIGHTLOOSE(*classes); /* do class, tight and loose */
-       if (table->hasany) {
-           ITIGHTLOOSE(XrmQANY); /* do ANY, tight and loose */
-       }
-       if (table->hasloose) {
-           while (1) {
-               names++;
-               classes++;
-               if (!*names)
-                   break;
-               if (!names[1] && closure->mode != XrmEnumAllLevels) {
-                   get = EnumLTable; /* bottom of recursion */
-                   leaf = 1;
-               }
-               ILOOSE(*names);   /* loose names */
-               ILOOSE(*classes); /* loose classes */
-               if (table->hasany) {
-                   ILOOSE(XrmQANY); /* loose ANY */
-               }
-           }
-           names--;
-           classes--;
-       }
-    }
-    /* now look for matching leaf nodes */
-    entry = table->next;
-    if (!entry)
-       return False;
-    if (entry->leaf) {
-       if (entry->tight && !table->tight)
-           entry = entry->next;
-    } else {
-       entry = entry->next;
-       if (!entry || !entry->tight)
-           return False;
-    }
-    if (!entry || entry->name != table->name)
-       return False;
-    /* found one */
-    level--;
-    if ((!*names || entry->hasloose) &&
-       EnumLTable((LTable)entry, names, classes, level, closure))
-       return True;
-    if (entry->tight && entry == table->next && (entry = entry->next) &&
-       entry->name == table->name && (!*names || entry->hasloose))
-       return EnumLTable((LTable)entry, names, classes, level, closure);
-    return False;
-
-#undef ITIGHTLOOSE
-#undef ILOOSE
-}
-
-/* call the proc for every value in the database, arbitrary order.
- * stop if the proc returns True.
- */
-Bool falrmEnumerateDatabase(db, names, classes, mode, proc, closure)
-    XrmDatabase                db;
-    XrmNameList                names;
-    XrmClassList       classes;
-    int                        mode;
-    DBEnumProc         proc;
-    XPointer           closure;
-{
-    XrmBinding  bindings[MAXDBDEPTH+2];
-    XrmQuark   quarks[MAXDBDEPTH+2];
-    register NTable table;
-    EClosureRec        eclosure;
-    Bool retval = False;
-
-    if (!db)
-       return False;
-    _XLockMutex(&db->linfo);
-    eclosure.db = db;
-    eclosure.proc = proc;
-    eclosure.closure = closure;
-    eclosure.bindings = bindings;
-    eclosure.quarks = quarks;
-    eclosure.mode = mode;
-    table = db->table;
-    if (table && !table->leaf && !*names && mode == XrmEnumOneLevel)
-       table = table->next;
-    if (table) {
-       if (!table->leaf)
-           retval = EnumNTable(table, names, classes, 0, &eclosure);
-       else
-           retval = EnumLTable((LTable)table, names, classes, 0, &eclosure);
-    }
-    _XUnlockMutex(&db->linfo);
-    return retval;
-}
-
-static void PrintBindingQuarkList(bindings, quarks, stream)
-    XrmBindingList      bindings;
-    XrmQuarkList       quarks;
-    FILE               *stream;
-{
-    Bool       firstNameSeen;
-
-    for (firstNameSeen = False; *quarks; bindings++, quarks++) {
-       if (*bindings == XrmBindLoosely) {
-           (void) fprintf(stream, "*");
-       } else if (firstNameSeen) {
-           (void) fprintf(stream, ".");
-       }
-       firstNameSeen = True;
-       (void) fputs(falrmQuarkToString(*quarks), stream);
-    }
-}
-
-/* output out the entry in correct file syntax */
-/*ARGSUSED*/
-static Bool DumpEntry(db, bindings, quarks, type, value, data)
-    XrmDatabase                *db;
-    XrmBindingList      bindings;
-    XrmQuarkList       quarks;
-    XrmRepresentation   *type;
-    XrmValuePtr                value;
-    XPointer           data;
-{
-    FILE                       *stream = (FILE *)data;
-    register unsigned int      i;
-    register char              *s;
-    register char              c;
-
-    if (*type != XrmQString)
-       (void) putc('!', stream);
-    PrintBindingQuarkList(bindings, quarks, stream);
-    s = value->addr;
-    i = value->size;
-    if (*type == XrmQString) {
-       (void) fputs(":\t", stream);
-       if (i)
-           i--;
-    }
-    else
-       (void) fprintf(stream, "=%s:\t", XrmRepresentationToString(*type));
-    if (i && (*s == ' ' || *s == '\t'))
-       (void) putc('\\', stream); /* preserve leading whitespace */
-    while (i--) {
-       c = *s++;
-       if (c == '\n') {
-           if (i)
-               (void) fputs("\\n\\\n", stream);
-           else
-               (void) fputs("\\n", stream);
-       } else if (c == '\\')
-           (void) fputs("\\\\", stream);
-       else if ((c < ' ' && c != '\t') ||
-                ((unsigned char)c >= 0x7f && (unsigned char)c < 0xa0))
-           (void) fprintf(stream, "\\%03o", (unsigned char)c);
-       else
-           (void) putc(c, stream);
-    }
-    (void) putc('\n', stream);
-    return ferror(stream) != 0;
-}
-
-#ifdef DEBUG
-
-void falPrintTable(table, file)
-    NTable table;
-    FILE *file;
-{
-    XrmBinding  bindings[MAXDBDEPTH+1];
-    XrmQuark   quarks[MAXDBDEPTH+1];
-    EClosureRec closure;
-    XrmQuark   empty = NULLQUARK;
-
-    closure.db = (XrmDatabase)NULL;
-    closure.proc = DumpEntry;
-    closure.closure = (XPointer)file;
-    closure.bindings = bindings;
-    closure.quarks = quarks;
-    closure.mode = XrmEnumAllLevels;
-    if (table->leaf)
-       EnumLTable((LTable)table, &empty, &empty, 0, &closure);
-    else
-       EnumNTable(table, &empty, &empty, 0, &closure);
-}
-
-#endif /* DEBUG */
-
-#if NeedFunctionPrototypes
-void falrmPutFileDatabase(
-    XrmDatabase db,
-    _Xconst char *fileName)
-#else
-void falrmPutFileDatabase(db, fileName)
-    XrmDatabase db;
-    char       *fileName;
-#endif
-{
-    FILE       *file;
-    XrmQuark empty = NULLQUARK;
-
-    if (!db) return;
-    if (!(file = fopen(fileName, "w"))) return;
-    if (falrmEnumerateDatabase(db, &empty, &empty, XrmEnumAllLevels,
-                            DumpEntry, (XPointer) file))
-       unlink((char *)fileName);
-    fclose(file);
-}
-
-/* macros used in get/search functions */
-
-/* find entries named ename, leafness leaf, tight or loose, and call get */
-#define GTIGHTLOOSE(ename,looseleaf) \
-    NFIND(ename); \
-    if (entry) { \
-       if (leaf == entry->leaf) { \
-           if (!leaf && !entry->tight && entry->next && \
-               entry->next->name == q && entry->next->tight && \
-               entry->next->hasloose && \
-               looseleaf((LTable)entry->next, names+1, classes+1, closure)) \
-               return True; \
-           if ((*get)(entry, names+1, classes+1, closure)) \
-               return True; \
-           if (entry->tight && (entry = entry->next) && \
-               entry->name == q && leaf == entry->leaf && \
-               (*get)(entry, names+1, classes+1, closure)) \
-               return True; \
-       } else if (entry->leaf) { \
-           if (entry->hasloose && \
-               looseleaf((LTable)entry, names+1, classes+1, closure)) \
-               return True; \
-           if (entry->tight && (entry = entry->next) && \
-               entry->name == q && entry->hasloose && \
-               looseleaf((LTable)entry, names+1, classes+1, closure)) \
-               return True; \
-       } \
-    }
-
-/* find entries named ename, leafness leaf, loose only, and call get */
-#define GLOOSE(ename,looseleaf) \
-    NFIND(ename); \
-    if (entry && entry->tight && (entry = entry->next) && entry->name != q) \
-       entry = (NTable)NULL; \
-    if (entry) { \
-       if (leaf == entry->leaf) { \
-           if ((*get)(entry, names+1, classes+1, closure)) \
-               return True; \
-       } else if (entry->leaf && entry->hasloose) { \
-           if (looseleaf((LTable)entry, names+1, classes+1, closure)) \
-               return True; \
-       } \
-    }
-
-/* add tight/loose entry to the search list, return True if list is full */
-/*ARGSUSED*/
-static Bool AppendLEntry(table, names, classes, closure)
-    LTable             table;
-    XrmNameList                names;
-    XrmClassList       classes;
-    register SClosure  closure;
-{
-    /* check for duplicate */
-    if (closure->idx >= 0 && closure->list[closure->idx] == table)
-       return False;
-    if (closure->idx == closure->limit)
-       return True;
-    /* append it */
-    closure->idx++;
-    closure->list[closure->idx] = table;
-    return False;
-}
-
-/* add loose entry to the search list, return True if list is full */
-/*ARGSUSED*/
-static Bool AppendLooseLEntry(table, names, classes, closure)
-    LTable             table;
-    XrmNameList                names;
-    XrmClassList       classes;
-    register SClosure  closure;
-{
-    /* check for duplicate */
-    if (closure->idx >= 0 && closure->list[closure->idx] == table)
-       return False;
-    if (closure->idx >= closure->limit - 1)
-       return True;
-    /* append it */
-    closure->idx++;
-    closure->list[closure->idx] = LOOSESEARCH;
-    closure->idx++;
-    closure->list[closure->idx] = table;
-    return False;
-}
-
-/* search for a leaf table */
-static Bool SearchNEntry(table, names, classes, closure)
-    NTable             table;
-    XrmNameList                names;
-    XrmClassList       classes;
-    SClosure           closure;
-{
-    register NTable    entry;
-    register XrmQuark  q;
-    register unsigned int leaf;
-    Bool               (*get)();
-
-    if (names[1]) {
-       get = SearchNEntry; /* recurse */
-       leaf = 0;
-    } else {
-       get = AppendLEntry; /* bottom of recursion */
-       leaf = 1;
-    }
-    GTIGHTLOOSE(*names, AppendLooseLEntry);   /* do name, tight and loose */
-    GTIGHTLOOSE(*classes, AppendLooseLEntry); /* do class, tight and loose */
-    if (table->hasany) {
-       GTIGHTLOOSE(XrmQANY, AppendLooseLEntry); /* do ANY, tight and loose */
-    }
-    if (table->hasloose) {
-       while (1) {
-           names++;
-           classes++;
-           if (!*names)
-               break;
-           if (!names[1]) {
-               get = AppendLEntry; /* bottom of recursion */
-               leaf = 1;
-           }
-           GLOOSE(*names, AppendLooseLEntry);   /* loose names */
-           GLOOSE(*classes, AppendLooseLEntry); /* loose classes */
-           if (table->hasany) {
-               GLOOSE(XrmQANY, AppendLooseLEntry); /* loose ANY */
-           }
-       }
-    }
-    /* now look for matching leaf nodes */
-    entry = table->next;
-    if (!entry)
-       return False;
-    if (entry->leaf) {
-       if (entry->tight && !table->tight)
-           entry = entry->next;
-    } else {
-       entry = entry->next;
-       if (!entry || !entry->tight)
-           return False;
-    }
-    if (!entry || entry->name != table->name)
-       return False;
-    /* found one */
-    if (entry->hasloose &&
-       AppendLooseLEntry((LTable)entry, names, classes, closure))
-       return True;
-    if (entry->tight && entry == table->next && (entry = entry->next) &&
-       entry->name == table->name && entry->hasloose)
-       return AppendLooseLEntry((LTable)entry, names, classes, closure);
-    return False;
-}
-
-Bool falrmQGetSearchList(db, names, classes, searchList, listLength)
-    XrmDatabase     db;
-    XrmNameList            names;
-    XrmClassList    classes;
-    XrmSearchList   searchList;        /* RETURN */
-    int                    listLength;
-{
-    register NTable    table;
-    SClosureRec                closure;
-
-    if (listLength <= 0)
-       return False;
-    closure.list = (LTable *)searchList;
-    closure.idx = -1;
-    closure.limit = listLength - 2;
-    if (db) {
-       _XLockMutex(&db->linfo);
-       table = db->table;
-       if (*names) {
-           if (table && !table->leaf) {
-               if (SearchNEntry(table, names, classes, &closure)) {
-                   _XUnlockMutex(&db->linfo);
-                   return False;
-               }
-           } else if (table && table->hasloose &&
-                      AppendLooseLEntry((LTable)table, names, classes,
-                                        &closure)) {
-               _XUnlockMutex(&db->linfo);
-               return False;
-           }
-       } else {
-           if (table && !table->leaf)
-               table = table->next;
-           if (table && 
-               AppendLEntry((LTable)table, names, classes, &closure)) {
-               _XUnlockMutex(&db->linfo);
-               return False;
-           }
-       }
-       _XUnlockMutex(&db->linfo);
-    }
-    closure.list[closure.idx + 1] = (LTable)NULL;
-    return True;
-}
-
-Bool falrmQGetSearchResource(searchList, name, class, pType, pValue)
-            XrmSearchList      searchList;
-    register XrmName           name;
-    register XrmClass          class;
-            XrmRepresentation  *pType;  /* RETURN */
-            XrmValue           *pValue; /* RETURN */
-{
-    register LTable *list;
-    register LTable table;
-    register VEntry entry;
-    int flags;
-
-/* find tight or loose entry */
-#define VTIGHTLOOSE(q) \
-    entry = LeafHash(table, q); \
-    while (entry && entry->name != q) \
-       entry = entry->next; \
-    if (entry) \
-       break
-
-/* find loose entry */
-#define VLOOSE(q) \
-    entry = LeafHash(table, q); \
-    while (entry && entry->name != q) \
-       entry = entry->next; \
-    if (entry) { \
-       if (!entry->tight) \
-           break; \
-       if ((entry = entry->next) && entry->name == q) \
-           break; \
-    }
-
-    list = (LTable *)searchList;
-    /* figure out which combination of name and class we need to search for */
-    flags = 0;
-    if (IsResourceQuark(name))
-       flags = 2;
-    if (IsResourceQuark(class))
-       flags |= 1;
-    if (!flags) {
-       /* neither name nor class has ever been used to name a resource */
-       table = (LTable)NULL;
-    } else if (flags == 3) {
-       /* both name and class */
-       while (table = *list++) {
-           if (table != LOOSESEARCH) {
-               VTIGHTLOOSE(name);  /* do name, tight and loose */
-               VTIGHTLOOSE(class); /* do class, tight and loose */
-           } else {
-               table = *list++;
-               VLOOSE(name);  /* do name, loose only */
-               VLOOSE(class); /* do class, loose only */
-           }
-       }
-    } else {
-       /* just one of name or class */
-       if (flags == 1)
-           name = class;
-       while (table = *list++) {
-           if (table != LOOSESEARCH) {
-               VTIGHTLOOSE(name); /* tight and loose */
-           } else {
-               table = *list++;
-               VLOOSE(name); /* loose only */
-           }
-       }
-    }
-    if (table) {
-       /* found a match */
-       if (entry->string) {
-           *pType = XrmQString;
-           pValue->addr = StringValue(entry);
-       } else {
-           *pType = RepType(entry);
-           pValue->addr = DataValue(entry);
-       }
-       pValue->size = entry->size;
-       return True;
-    }
-    *pType = NULLQUARK;
-    pValue->addr = (XPointer)NULL;
-    pValue->size = 0;
-    return False;
-
-#undef VTIGHTLOOSE
-#undef VLOOSE
-}
-
-/* look for a tight/loose value */
-static Bool GetVEntry(table, names, classes, closure)
-    LTable             table;
-    XrmNameList                names;
-    XrmClassList       classes;
-    VClosure           closure;
-{
-    register VEntry entry;
-    register XrmQuark q;
-
-    /* try name first */
-    q = *names;
-    entry = LeafHash(table, q);
-    while (entry && entry->name != q)
-       entry = entry->next;
-    if (!entry) {
-       /* not found, try class */
-       q = *classes;
-       entry = LeafHash(table, q);
-       while (entry && entry->name != q)
-           entry = entry->next;
-       if (!entry)
-           return False;
-    }
-    if (entry->string) {
-       *closure->type = XrmQString;
-       closure->value->addr = StringValue(entry);
-    } else {
-       *closure->type = RepType(entry);
-       closure->value->addr = DataValue(entry);
-    }
-    closure->value->size = entry->size;
-    return True;
-}
-
-/* look for a loose value */
-static Bool GetLooseVEntry(table, names, classes, closure)
-    LTable             table;
-    XrmNameList                names;
-    XrmClassList       classes;
-    VClosure           closure;
-{
-    register VEntry    entry;
-    register XrmQuark  q;
-
-#define VLOOSE(ename) \
-    q = ename; \
-    entry = LeafHash(table, q); \
-    while (entry && entry->name != q) \
-       entry = entry->next; \
-    if (entry && entry->tight && (entry = entry->next) && entry->name != q) \
-       entry = (VEntry)NULL;
-
-    /* bump to last component */
-    while (names[1]) {
-       names++;
-       classes++;
-    }
-    VLOOSE(*names);  /* do name, loose only */
-    if (!entry) {
-       VLOOSE(*classes); /* do class, loose only */
-       if (!entry)
-           return False;
-    }
-    if (entry->string) {
-       *closure->type = XrmQString;
-       closure->value->addr = StringValue(entry);
-    } else {
-       *closure->type = RepType(entry);
-       closure->value->addr = DataValue(entry);
-    }
-    closure->value->size = entry->size;
-    return True;
-
-#undef VLOOSE
-}
-
-/* recursive search for a value */
-static Bool GetNEntry(table, names, classes, closure)
-    NTable             table;
-    XrmNameList                names;
-    XrmClassList       classes;
-    VClosure           closure;
-{
-    register NTable    entry;
-    register XrmQuark  q;
-    register unsigned int leaf;
-    Bool               (*get)();
-    NTable             otable;
-
-    if (names[2]) {
-       get = GetNEntry; /* recurse */
-       leaf = 0;
-    } else {
-       get = GetVEntry; /* bottom of recursion */
-       leaf = 1;
-    }
-    GTIGHTLOOSE(*names, GetLooseVEntry);   /* do name, tight and loose */
-    GTIGHTLOOSE(*classes, GetLooseVEntry); /* do class, tight and loose */
-    if (table->hasany) {
-       GTIGHTLOOSE(XrmQANY, GetLooseVEntry); /* do ANY, tight and loose */
-    }
-    if (table->hasloose) {
-       while (1) {
-           names++;
-           classes++;
-           if (!names[1])
-               break;
-           if (!names[2]) {
-               get = GetVEntry; /* bottom of recursion */
-               leaf = 1;
-           }
-           GLOOSE(*names, GetLooseVEntry);   /* do name, loose only */
-           GLOOSE(*classes, GetLooseVEntry); /* do class, loose only */
-           if (table->hasany) {
-               GLOOSE(XrmQANY, GetLooseVEntry); /* do ANY, loose only */
-           }
-       }
-    }
-    /* look for matching leaf tables */
-    otable = table;
-    table = table->next;
-    if (!table)
-       return False;
-    if (table->leaf) {
-       if (table->tight && !otable->tight)
-           table = table->next;
-    } else {
-       table = table->next;
-       if (!table || !table->tight)
-           return False;
-    }
-    if (!table || table->name != otable->name)
-       return False;
-    /* found one */
-    if (table->hasloose &&
-       GetLooseVEntry((LTable)table, names, classes, closure))
-       return True;
-    if (table->tight && table == otable->next) {
-       table = table->next;
-       if (table && table->name == otable->name && table->hasloose)
-           return GetLooseVEntry((LTable)table, names, classes, closure);
-    }
-    return False;
-}
-
-Bool falrmQGetResource(db, names, classes, pType, pValue)
-    XrmDatabase         db;
-    XrmNameList                names;
-    XrmClassList       classes;
-    XrmRepresentation  *pType;  /* RETURN */
-    XrmValuePtr                pValue;  /* RETURN */
-{
-    register NTable table;
-    VClosureRec closure;
-
-    if (db && *names) {
-       _XLockMutex(&db->linfo);
-       closure.type = pType;
-       closure.value = pValue;
-       table = db->table;
-       if (names[1]) {
-           if (table && !table->leaf) {
-               if (GetNEntry(table, names, classes, &closure)) {
-                   _XUnlockMutex(&db->linfo);
-                   return True;
-               }
-           } else if (table && table->hasloose &&
-                   GetLooseVEntry((LTable)table, names, classes, &closure)) {
-               _XUnlockMutex (&db->linfo);
-               return True;
-           }
-       } else {
-           if (table && !table->leaf)
-               table = table->next;
-           if (table && GetVEntry((LTable)table, names, classes, &closure)) {
-               _XUnlockMutex(&db->linfo);
-               return True;
-           }
-       }
-       _XUnlockMutex(&db->linfo);
-    }
-    *pType = NULLQUARK;
-    pValue->addr = (XPointer)NULL;
-    pValue->size = 0;
-    return False;
-}
-
-#if NeedFunctionPrototypes
-Bool falrmGetResource(db, name_str, class_str, pType_str, pValue)
-    XrmDatabase         db;
-    _Xconst char       *name_str;
-    _Xconst char       *class_str;
-    XrmString          *pType_str;  /* RETURN */
-    XrmValuePtr                pValue;      /* RETURN */
-#else
-Bool falrmGetResource(db, name_str, class_str, pType_str, pValue)
-    XrmDatabase         db;
-    XrmString          name_str;
-    XrmString          class_str;
-    XrmString          *pType_str;  /* RETURN */
-    XrmValuePtr                pValue;      /* RETURN */
-#endif
-{
-    XrmName            names[MAXDBDEPTH+1];
-    XrmClass           classes[MAXDBDEPTH+1];
-    XrmRepresentation   fromType;
-    Bool               result;
-
-    XrmStringToNameList(name_str, names);
-    XrmStringToClassList(class_str, classes);
-    result = falrmQGetResource(db, names, classes, &fromType, pValue);
-    (*pType_str) = falrmQuarkToString(fromType);
-    return result;
-}
-
-/* destroy all values, plus table itself */
-static void DestroyLTable(table)
-    LTable table;
-{
-    register int i;
-    register VEntry *buckets;
-    register VEntry entry, next;
-
-    buckets = table->buckets;
-    for (i = table->table.mask; i >= 0; i--, buckets++) {
-       for (next = *buckets; entry = next; ) {
-           next = entry->next;
-           Xfree((char *)entry);
-       }
-    }
-    Xfree((char *)table->buckets);
-    Xfree((char *)table);
-}
-
-/* destroy all contained tables, plus table itself */
-static void DestroyNTable(table)
-    NTable table;
-{
-    register int i;
-    register NTable *buckets;
-    register NTable entry, next;
-
-    buckets = NodeBuckets(table);
-    for (i = table->mask; i >= 0; i--, buckets++) {
-       for (next = *buckets; entry = next; ) {
-           next = entry->next;
-           if (entry->leaf)
-               DestroyLTable((LTable)entry);
-           else
-               DestroyNTable(entry);
-       }
-    }
-    Xfree((char *)table);
-}
-
-char *falrmLocaleOfDatabase(db)
-    XrmDatabase db;
-{
-    char* retval;
-    _XLockMutex(&db->linfo);
-    retval = (*db->methods->lcname)(db->mbstate);
-    _XUnlockMutex(&db->linfo);
-    return retval;
-}
-
-void falrmDestroyDatabase(db)
-    XrmDatabase   db;
-{
-    register NTable table, next;
-
-    if (db) {
-       _XLockMutex(&db->linfo);
-       for (next = db->table; table = next; ) {
-           next = table->next;
-           if (table->leaf)
-               DestroyLTable((LTable)table);
-           else
-               DestroyNTable(table);
-       }
-       _XFreeMutex(&db->linfo);
-       (*db->methods->destroy)(db->mbstate);
-       Xfree((char *)db);
-    }
-}
diff --git a/cde/programs/dtudcfonted/libfal/_falrmI.h b/cde/programs/dtudcfonted/libfal/_falrmI.h
deleted file mode 100644 (file)
index 9ae8644..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* XrmI.h 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:12        */ 
-/* $XConsortium: _falrmI.h /main/1 1996/04/08 15:22:08 cde-fuj $ */
-/*
-
-Copyright (c) 1990  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-
-/*
- * Macros to abstract out reading the file, and getting its size.
- *
- * You may need to redefine these for various other operating systems. 
- */
-
-#include       <X11/Xos.h>
-#include        <sys/stat.h>                        
-
-#ifdef WIN32
-#define OpenFile(name)                 open((name), O_RDONLY|O_TEXT)
-#else
-#define OpenFile(name)                 open((name), O_RDONLY)
-#endif
-#define CloseFile(fd)           close((fd))
-#define ReadFile(fd,buf,size)  read((fd), (buf), (size))
-#define GetSizeOfFile(name,size)                    \
-{                                                   \
-    struct stat status_buffer;                      \
-    if ( (stat((name), &status_buffer)) == -1 )     \
-       size = -1;                                  \
-    else                                            \
-       size = status_buffer.st_size;               \
-}
diff --git a/cde/programs/dtudcfonted/libfal/_faludcInf.c b/cde/programs/dtudcfonted/libfal/_faludcInf.c
deleted file mode 100644 (file)
index 725eecc..0000000
+++ /dev/null
@@ -1,693 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: _faludcInf.c /main/4 1996/10/15 10:28:13 drk $ */
-/* udcInf.c 1.4 - Fujitsu source for CDEnext    96/03/19 13:41:00      */ 
-/*
- * Copyright 1995 by FUJITSU LIMITED
- * This is source code modified by FUJITSU LIMITED under the Joint
- * Development Agreement for the CDEnext PST.
- * This is unpublished proprietry source code of FUJITSU LIMITED
- *
- * Modifier: Takanori Tateno   FUJITSU LIMITED
- *
- */
-#include <stdio.h>
-#include <stdint.h>
-#include <locale.h>
-#include "syncx.h"
-#include "_fallibint.h"
-#include "_fallcint.h"
-#include "_fallcPubI.h"
-#include "_fallcGeneric.h"
-#include "_falomGeneric.h"
-
-/*
-   external symbols 
-*/
-extern FontData falread_EncodingInfo();
-extern int fal_get_codeset();
-
-extern int fal_utyderror ;
-extern int fal_utyerror ;
-
-extern unsigned long fal_utyerrno ;
-
-#define FAL_ERROR -1
-
-
-/*
-    UDC structure define
-*/
-typedef struct _FalGlyphRegion {
-    unsigned long  start;
-    unsigned long  end;
-} FalGlyphRegion ;
-
-/*
- *  "code" no jyoui "i" byte me wo "unsigned char" toshite kaesu.
- */
-static unsigned char getbyte(code,i)
-unsigned long code;
-int          i;
-{
-    unsigned long byteL;
-    unsigned char byte;
-    byteL = code  >> (8*(3-i));
-    byte = (unsigned char)(0x000000ff & byteL);
-    return(byte);
-}
-/*
-    get codeset which described by charset_str and locale.
-    for examples ...
-    locale          :  ja_JP
-    charset_str     :  JISX0208.1983-0
-*/
-
-fal_get_codeset(locale,charset_str,codeset,num_codeset)
-char *locale;
-char *charset_str;
-int  **codeset;
-int  *num_codeset;
-{
-    XLCdRec lcdrec;
-    XLCd     lcd;
-    XLCdPublicRec xlcdp;
-    XPointer rdb;
-    int num = 0,count,num_ret=0,i,*ret;
-    char **value,buf[128],*ptr;
-
-
-    fal_utyderror = 0;
-    fal_utyerror = 0;
-
-    if((locale == NULL) || (charset_str == NULL)){
-        fal_utyerror = 5;
-        fal_utyderror = 1;
-       fal_utyerrno = 0x04 ;
-        return(FAL_ERROR);
-    }
-    if(codeset == NULL){
-        fal_utyerror = 5;
-        fal_utyderror = 2;
-       fal_utyerrno = 0x04 ;
-        return(FAL_ERROR);
-    }
-
-    /*    create XLCd     */
-    xlcdp.pub.siname = locale;
-    lcdrec.core = (XLCdCore)&xlcdp;
-    lcd = &lcdrec;
-        /* create X RDB (X NLS DB) */
-    rdb = _fallcCreateLocaleDataBase(lcd);
-    if(rdb == NULL){
-        fal_utyerror = 1;
-       fal_utyerrno = 0x15 ;
-        return(FAL_ERROR);
-    }
-
-    for(num=0;;num++){
-        /* XLC_FONTSET */
-        sprintf(buf, "fs%d.font.primary", num);
-        _fallcGetLocaleDataBase(lcd, "XLC_FONTSET", buf, &value, &count);
-        if(count < 1){
-            break ;
-        }
-        for(i=0;i<count;i++){
-            strcpy(buf,value[i]);
-            ptr = (char *)strchr(buf,(int)':');
-            *ptr = 0;
-            if(!_fallcCompareISOLatin1(charset_str,buf)){
-                num_ret += 1;
-                if(num_ret == 1){
-                    ret = (int *)Xmalloc(sizeof(int));
-                } else {
-                   ret = 
-                        (int *)Xrealloc(ret,num_ret*sizeof(int)); 
-                }
-                if(ret == NULL){
-                   fal_utyerrno = 0x03 ;
-                    return(FAL_ERROR);
-                }
-               ret[num_ret-1]=num;
-                break ;
-            }
-        }
-    }
-    if(num_ret == 0){
-        *num_codeset = 0;
-        *codeset = NULL;
-        return (0xff);
-    }
-
-    *num_codeset = num_ret;
-    *codeset = ret;
-    return 0;
-}
-
-static Bool gi_to_vgi(gi,vgi,scope)
-unsigned long  gi,*vgi;
-FontScope      scope;
-{
-    if(scope->shift_direction == (unsigned long)'+'){
-        gi  -= scope->shift;
-    } else {
-        gi  += scope->shift;
-    }
-    if(gi >= scope->start && gi <= scope->end){
-       *vgi = gi;
-        return(True);
-    }
-    return(False);
-}
-
-static void shift_area(udc,scope)
-FalGlyphRegion *udc;
-FontScope scope;
-{
-    if(scope->shift_direction == (unsigned long)'+'){
-        udc->start += scope->shift;
-        udc->end   += scope->shift;
-    } else {
-        udc->start -= scope->shift;
-        udc->end   -= scope->shift;
-    }
-}
-
-/*
-    get UDC area with glyph index.
-    for examples ...
-    locale          :  ja_JP
-    charset_str     :  JISX0208.1983-0
-*/
-FalGetUDCGIArea(locale,codeset,charset_str,gr,num_gr)
-char *locale;
-int codeset;
-char *charset_str;
-FalGlyphRegion  **gr;
-int  *num_gr;
-{
-    XLCdRec lcdrec;
-    XLCd     lcd;
-    XLCdPublicRec xlcdp;
-    XPointer rdb;
-    FalGlyphRegion *udc;
-    int num = 0,count,num_ret=0;
-    int i,j,k;
-    char **value,buf[128],ptr;
-    FontData font_data;
-
-
-    fal_utyderror = 0;
-    fal_utyerror = 0;
-    fal_utyerrno = 0x00 ;
-
-    if((locale == NULL) || (charset_str == NULL)){
-        fal_utyerror = 5;
-        fal_utyderror = 1;
-       fal_utyerrno = 0x04;
-       fal_utyerrno |= (0x0b<<8) ;
-        return(FAL_ERROR);
-    }
-    if(gr == NULL){
-        fal_utyerror = 5;
-        fal_utyderror = 1;
-       fal_utyerrno = 0x04;
-       fal_utyerrno |= (0x0b<<8) ;
-        return(FAL_ERROR);
-    }
-    if(num_gr == NULL){
-        fal_utyerror = 5;
-        fal_utyderror = 2;
-       fal_utyerrno = 0x04;
-       fal_utyerrno |= (0x0b<<8) ;
-        return(FAL_ERROR);
-    }
-
-        /* create XLCd */
-    xlcdp.pub.siname = locale;
-    lcdrec.core = (XLCdCore)&xlcdp;
-    lcd = &lcdrec;
-        /* create X RDB (X NLS DB) */
-    rdb = _fallcCreateLocaleDataBase(lcd);
-    if(rdb == NULL){
-        fal_utyerror = 1;
-       fal_utyerrno = 0x15 ;
-       fal_utyerrno |= (0x0b<<8) ;
-        return(FAL_ERROR);
-    }
-    udc = NULL;
-
-        /* XLC_FONTSET */
-        sprintf(buf, "fs%d.charset.udc_area", codeset-1);
-        _fallcGetLocaleDataBase(lcd, "XLC_FONTSET", buf, &value, &count);
-        if(count > 0){
-            udc = (FalGlyphRegion *)Xmalloc(count * sizeof(FalGlyphRegion));
-            if(udc == NULL){
-               fal_utyerrno = 0x03 ;
-               fal_utyerrno |= (0x0b<<8) ;
-               return(FAL_ERROR);
-            }
-            for(i=0;i<count;i++){
-                sscanf(value[i],"\\x%lx,\\x%lx", &(udc[i].start), &(udc[i].end));
-            }
-        }
-
-    *num_gr = count;
-
-        sprintf(buf, "fs%d.font.primary", codeset-1);
-        _fallcGetLocaleDataBase(lcd, "XLC_FONTSET", buf, &value, &count);
-        if(count > 0){
-           font_data = falread_EncodingInfo(count,value);
-            for(i=0;i<count;i++){
-                if( !_fallcCompareISOLatin1(font_data[i].name,charset_str)){
-                    for(j=0;j<(*num_gr);j++){
-                       for(k=0;k<font_data[i].scopes_num;k++){
-                           if(udc[j].start == font_data[i].scopes[k].start
-                                  && font_data[i].scopes[k].shift){
-                                shift_area(&udc[j],&(font_data[i].scopes[k]));
-                            }
-                       }
-                   }
-               }
-           }
-        }
-
-    *gr = udc;
-    return 0;
-}
-
-/* 
- *      Code convert wo tomonau UDC area no kakutoku
- *      GetUDCCPArea() / glyph_to_code()           
- *
- */
-
-int fal_gi_to_vgi(lcd,locale,charset_str,codeset,gi,vgi,charsetname)
-XLCd   lcd;
-char   *locale;
-char   *charset_str;
-int    codeset;
-unsigned long  gi;
-unsigned long  *vgi;
-char    *charsetname;
-{
-    FalGlyphRegion *udc;
-    int num = 0,count,num_ret=0;
-    int i,j,k;
-    char **value,buf[128],ptr;
-    FontData font_data = NULL;
-
-
-    sprintf(buf, "fs%d.charset.name", codeset-1);
-    _fallcGetLocaleDataBase(lcd, "XLC_FONTSET", buf, &value, &count);
-    if(count > 0){
-        strcpy(charsetname,value[0]);
-    }
-    sprintf(buf, "fs%d.font.primary", codeset-1);
-    _fallcGetLocaleDataBase(lcd, "XLC_FONTSET", buf, &value, &count);
-    if(count > 0){
-       font_data = falread_EncodingInfo(count,value);
-        for(i=0;i<count;i++){
-            if( !_fallcCompareISOLatin1(font_data[i].name,charset_str)){
-                for(k=0;k<font_data[i].scopes_num;k++){
-                   if( gi_to_vgi(gi,vgi,&(font_data[i].scopes[k])) == True){
-                       XFree(font_data);
-                       return(True);
-                    }
-               }
-           }
-        }
-    }
-/*
-    free_fontdata(font_data);
-*/
-    *vgi = gi;
-    XFree(font_data);
-    return(True);
-}
-
-Bool falnon_standard(lcd,charset)
-XLCd   lcd;
-XlcCharSet     charset;
-{
-    char buf[256];
-    int count,i;
-    char **value;
-    if(charset->ct_sequence == NULL){
-            return(False);
-    }
-    for(i=0;;i++){
-       sprintf(buf, "csd%d.charset_name", i);
-       _fallcGetLocaleDataBase(lcd, "XLC_CHARSET_DEFINE", buf, &value, &count);
-       if(count > 0){
-           if(!_fallcNCompareISOLatin1(value[0], 
-                       charset->name,strlen(value[0])) ){
-               return(True);
-           }
-       } else {
-            return(False);
-       }
-    }
-}
-
-void
-falmake_none_standard(from,charset,src)
-char *from;
-XlcCharSet     charset;
-char *src;
-{
-    int name_len,seq_len,i;
-    name_len = 2 + strlen(charset->encoding_name) + 1;
-    seq_len = strlen(charset->ct_sequence);
-    strcpy(from,charset->ct_sequence);
-    from[seq_len]    = name_len / 128 + 128;
-    from[seq_len+1]  = name_len % 128 + 128;
-    strcpy(&from[seq_len + 2],charset->encoding_name);
-    from[seq_len+name_len-1]  = 0x02;  /* STX */
-    strcpy(&from[seq_len + name_len],src);
-}
-int 
-fal_glyph_to_code(locale,charset_str,codeset,glyph_index,codepoint)
-char   *locale;
-char   *charset_str;
-int    codeset;
-unsigned long  glyph_index;
-unsigned long  *codepoint;
-{
-    XLCd       lcd;
-    unsigned char *from; int   from_left;
-    unsigned char *to  ; int   to_left = 10;
-    unsigned char *dst;
-    unsigned char byte;
-    unsigned long from32[25];
-    unsigned long to32[25];
-    int             i,j;
-    char tmp[256],charsetname[256],src[10];
-    XlcConv    conv;
-    XlcCharSet         charset;
-    XPointer args[2];
-
-    from = (unsigned char *)from32;
-    to   = (unsigned char *)to32;
-    dst  = (unsigned char *)to32;
-
-    memset(dst,0,25);
-       
-    lcd = (XLCd) (uintptr_t) _fallcGenericLoader(locale);
-
-    fal_gi_to_vgi(lcd,locale,charset_str,codeset,
-       glyph_index,&glyph_index,charsetname);
-
-    for(i=0,j=0;i<4;i++){
-       byte = getbyte(glyph_index,i);
-       if(byte){
-           src[j] = byte;
-            j ++;
-       }
-    }
-    src[j] = 0;
-
-
-    /* get charset */
-/*
-    sprintf(tmp,"%s%s",charset_str,":GL");
-    charset_name = strdup(tmp);
-*/
-    charset = _fallcGetCharSet(charsetname);
-    if(charset == NULL){
-       fal_utyerrno = 0x16 ;
-       return(FAL_ERROR);
-    }
-    /* make ct */
-    if( falnon_standard(lcd,charset)) {
-        falmake_none_standard(from,charset,src);
-    } else if(charset->ct_sequence){
-        snprintf((char *)from, sizeof(from32), "%s%s", charset->ct_sequence,src);
-    } else {
-        snprintf((char *)from, sizeof(from32), "%s", src);
-    }
-    /* compound text -> multi byte */
-    conv = _fallcOpenConverter(lcd, XlcNCompoundText, lcd, XlcNMultiByte);
-    from_left = strlen((char *)from);
-    _fallcConvert(conv,(XPointer *)&from,&from_left,
-                     (XPointer *)&to,  &to_left,args,0);
-    _fallcCloseConverter(conv);
-    _fallcDestroyLC(lcd);
-
-    *codepoint = 0;
-    for(i=0;dst[i];i++){
-        *codepoint = ((*codepoint << 8) | dst[i]) ;
-    }
-    return(0);
-}
-
-typedef struct _FalCodeRegion {
-       unsigned long start,end;
-} FalCodeRegion ;
-
-int
-FalGetUDCCPArea(locale,codeset,charset_str,cr,num_cr)
-char           *locale;
-int            codeset;
-char           *charset_str;
-FalCodeRegion **cr;
-int  *num_cr;
-{
-    int i,num_gr,ret;
-    FalGlyphRegion *gr;
-    FalCodeRegion  *crr;
-
-    fal_utyerror  = 0;
-    fal_utyderror = 0;
-
-    if(cr == NULL){
-        fal_utyerror  = 5;
-        fal_utyderror = 1;
-       fal_utyerrno = 0x04 ;
-       fal_utyerrno |= (0x0a<<8) ;
-        return(FAL_ERROR);
-    }
-    if(num_cr == NULL){
-        fal_utyerror  = 5;
-        fal_utyderror = 2;
-       fal_utyerrno = 0x04 ;
-       fal_utyerrno |= (0x0a<<8) ;
-        return(FAL_ERROR);
-    }
-
-    ret = FalGetUDCGIArea(locale,codeset,charset_str,&gr,&num_gr);
-    if(ret == FAL_ERROR){
-       fal_utyerrno &= 0xff ;
-       fal_utyerrno |= (0x0a<<8) ;
-       return(ret);
-    }
-
-    crr = (FalCodeRegion *)Xmalloc(num_gr*sizeof(FalCodeRegion));
-    if(crr == NULL){
-       Xfree(gr);
-       fal_utyerrno = 0x03 ;
-       fal_utyerrno |= (0x0a<<8) ;
-       return(FAL_ERROR);
-    }
-
-    for(i=0;i<num_gr;i++){
-       ret = fal_glyph_to_code(locale,charset_str,codeset,
-               gr[i].start, &(crr[i].start));
-       if(ret == FAL_ERROR){
-           fal_utyerrno |= (0x0a<<8) ;
-           Xfree(gr);
-           Xfree(crr);
-           return(ret);
-       }
-       ret = fal_glyph_to_code(locale,charset_str,codeset,
-               gr[i].end, &(crr[i].end));
-       if(ret == FAL_ERROR){
-           fal_utyerrno |= (0x0a<<8) ;
-           Xfree(gr);
-           Xfree(crr);
-           return(ret);
-       }
-    }
-    Xfree(gr);
-    *cr = crr;
-    *num_cr = num_gr;
-    return(0);
-}
-
-/*
- *    code_to_glyph()
- *    
- */
-typedef struct _FalGIInf {
-    char               *charset_str;
-    unsigned long      glyph_index;
-} FalGIInf ;
-
-/*
- *
- *
- */
-static Bool vgi_to_gi(gi,vgi,scope)
-unsigned long  *gi,vgi;
-FontScope      scope;
-{
-    if(vgi >= scope->start && vgi <= scope->end){
-        if(scope->shift_direction == (unsigned long)'+'){
-            *gi = vgi + scope->shift;
-        } else {
-            *gi = vgi - scope->shift;
-        }
-        return(True);
-    }
-    return(False);
-}
-/*
- *
- *
- */
-static Bool  
-fal_vgi_to_gi(lcd,locale,vglyph,glyph,charset,charsetname)
-XLCd    lcd;
-char    *locale;
-unsigned long   vglyph;
-unsigned long   *glyph;
-XlcCharSet     charset;
-char    *charsetname;
-{
-    int num = 0,count,num_ret=0;
-    int i,j,k;
-    char **value,buf[128],ptr;
-    FontData font_data = NULL;
-    CodeSet cs;
-
-    
-    for(i=0;;i++){
-        sprintf(buf, "fs%d.charset.name",i);
-        _fallcGetLocaleDataBase(lcd, "XLC_FONTSET", buf, &value, &count);
-        if(count > 0){
-            if(!_fallcNCompareISOLatin1(charset->name,value[0],
-                       strlen(charset->name))){
-               break;
-           }
-        } else {
-           fal_utyerrno = 0x17 ;
-           return(False);
-       }
-    }
-/*
-    sprintf(buf, "fs%d.charset.name", codeset-1);
-    _fallcGetLocaleDataBase(lcd, "XLC_FONTSET", buf, &value, &count);
-    if(count > 0){
-        strcpy(charsetname,value[0]);
-    }
-*/
-    sprintf(buf, "fs%d.font.primary", i);
-    _fallcGetLocaleDataBase(lcd, "XLC_FONTSET", buf, &value, &count);
-    if(count > 0){
-       font_data = falread_EncodingInfo(count,value);
-        for(i=0;i<count;i++){
-            for(k=0;k<font_data[i].scopes_num;k++){
-               if( vgi_to_gi(glyph,vglyph,&(font_data[i].scopes[k])) == True){
-                   strcpy(charsetname,font_data[i].name);
-                   XFree(font_data);
-                   return(True);
-                }
-           }
-        }
-    }
-    *glyph = vglyph;
-    XFree(font_data);
-    return(True);
-}
-int
-fal_code_to_glyph(locale,codepoint,gi,num_gi)
-char           *locale;
-unsigned long  codepoint;
-FalGIInf       **gi;
-int            *num_gi;
-{
-    XLCd        lcd;
-    unsigned char *from; int    from_left;
-    unsigned char *to  ; int    to_left = 10;
-    unsigned char *dst;
-    unsigned char byte;
-    unsigned int from32[25];
-    unsigned int to32[25];
-    int      i,j;
-    char tmp[256],charsetname[256],src[10];
-    XlcConv     conv;
-    XlcCharSet  charset;
-    XPointer args[2];
-    unsigned long glyph,vglyph;
-
-    from = (unsigned char *)from32;
-    to   = (unsigned char *)to32;
-    dst  = (unsigned char *)to32;
-    memset(dst,0,25);
-
-    lcd = (XLCd) (uintptr_t) _fallcGenericLoader(locale);
-
-    for(i=0,j=0;i<4;i++){
-       byte = getbyte(codepoint,i);
-       if(byte){
-           src[j] = byte;
-            j ++;
-       }
-    }
-    src[j] = 0;
-    snprintf((char *)from, sizeof(from32), "%s", src);
-    /* multi byte -> vgi */
-    conv = _fallcOpenConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet);
-    from_left = strlen((char *)from);
-    args[0] = (XPointer) &charset;
-    _fallcConvert(conv,(XPointer *)&from,&from_left,
-                     (XPointer *)&to,  &to_left,args,1);
-
-    /* vgi -> gi */
-    vglyph = 0;
-    for(i=0;dst[i];i++){
-        vglyph = ((vglyph << 8) | dst[i]) ;
-    }
-    if(fal_vgi_to_gi(lcd,locale,vglyph,&glyph,charset,charsetname)==False){
-        _fallcCloseConverter(conv);
-       _fallcDestroyLC(lcd);
-        *num_gi = 0;
-       return(0);
-    }
-
-    _fallcCloseConverter(conv);
-    _fallcDestroyLC(lcd);
-
-    *gi = (FalGIInf *)Xmalloc(sizeof(FalGIInf));
-    if(*gi == NULL){
-       fal_utyerrno = 0x03 ;
-        return(FAL_ERROR);
-    }
-    (*gi)->charset_str = (char *)Xmalloc(strlen(charsetname)+1);
-    strcpy((*gi)->charset_str,charsetname);
-    (*gi)->glyph_index = glyph;
-
-    *num_gi = 1;
-    return(0);
-}
-
diff --git a/cde/programs/dtudcfonted/libfal/_falutil.h b/cde/programs/dtudcfonted/libfal/_falutil.h
deleted file mode 100644 (file)
index b3aa2a4..0000000
+++ /dev/null
@@ -1,930 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* Xutil.h 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:12       */ 
-/* $XConsortium: _falutil.h /main/1 1996/04/08 15:20:39 cde-fuj $ */
-
-/***********************************************************
-
-Copyright (c) 1987  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef _XUTIL_H_
-#define _XUTIL_H_
-
-/* You must include "syncx.h" before including this file */
-
-/* 
- * Bitmask returned by XParseGeometry().  Each bit tells if the corresponding
- * value (x, y, width, height) was found in the parsed string.
- */
-#define NoValue                0x0000
-#define XValue         0x0001
-#define YValue         0x0002
-#define WidthValue     0x0004
-#define HeightValue    0x0008
-#define AllValues      0x000F
-#define XNegative      0x0010
-#define YNegative      0x0020
-
-/*
- * new version containing base_width, base_height, and win_gravity fields;
- * used with WM_NORMAL_HINTS.
- */
-typedef struct {
-       long flags;     /* marks which fields in this structure are defined */
-       int x, y;               /* obsolete for new window mgrs, but clients */
-       int width, height;      /* should set so old wm's don't mess up */
-       int min_width, min_height;
-       int max_width, max_height;
-       int width_inc, height_inc;
-       struct {
-               int x;  /* numerator */
-               int y;  /* denominator */
-       } min_aspect, max_aspect;
-       int base_width, base_height;            /* added by ICCCM version 1 */
-       int win_gravity;                        /* added by ICCCM version 1 */
-} XSizeHints;
-
-/*
- * The next block of definitions are for window manager properties that
- * clients and applications use for communication.
- */
-
-/* flags argument in size hints */
-#define USPosition     (1L << 0) /* user specified x, y */
-#define USSize         (1L << 1) /* user specified width, height */
-
-#define PPosition      (1L << 2) /* program specified position */
-#define PSize          (1L << 3) /* program specified size */
-#define PMinSize       (1L << 4) /* program specified minimum size */
-#define PMaxSize       (1L << 5) /* program specified maximum size */
-#define PResizeInc     (1L << 6) /* program specified resize increments */
-#define PAspect                (1L << 7) /* program specified min and max aspect ratios */
-#define PBaseSize      (1L << 8) /* program specified base for incrementing */
-#define PWinGravity    (1L << 9) /* program specified window gravity */
-
-/* obsolete */
-#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
-
-
-
-typedef struct {
-       long flags;     /* marks which fields in this structure are defined */
-       Bool input;     /* does this application rely on the window manager to
-                       get keyboard input? */
-       int initial_state;      /* see below */
-       Pixmap icon_pixmap;     /* pixmap to be used as icon */
-       Window icon_window;     /* window to be used as icon */
-       int icon_x, icon_y;     /* initial position of icon */
-       Pixmap icon_mask;       /* icon mask bitmap */
-       XID window_group;       /* id of related window group */
-       /* this structure may be extended in the future */
-} XWMHints;
-
-/* definition for flags of XWMHints */
-
-#define InputHint              (1L << 0)
-#define StateHint              (1L << 1)
-#define IconPixmapHint         (1L << 2)
-#define IconWindowHint         (1L << 3)
-#define IconPositionHint       (1L << 4)
-#define IconMaskHint           (1L << 5)
-#define WindowGroupHint                (1L << 6)
-#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \
-IconPositionHint|IconMaskHint|WindowGroupHint)
-#define XUrgencyHint           (1L << 8)
-
-/* definitions for initial window state */
-#define WithdrawnState 0       /* for windows that are not mapped */
-#define NormalState 1  /* most applications want to start this way */
-#define IconicState 3  /* application wants to start as an icon */
-
-/*
- * Obsolete states no longer defined by ICCCM
- */
-#define DontCareState 0        /* don't know or care */
-#define ZoomState 2    /* application wants to start zoomed */
-#define InactiveState 4        /* application believes it is seldom used; */
-                       /* some wm's may put it on inactive menu */
-
-
-/*
- * new structure for manipulating TEXT properties; used with WM_NAME, 
- * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND.
- */
-typedef struct {
-    unsigned char *value;              /* same as Property routines */
-    Atom encoding;                     /* prop type */
-    int format;                                /* prop data format: 8, 16, or 32 */
-    unsigned long nitems;              /* number of data items in value */
-} XTextProperty;
-
-#define XNoMemory -1
-#define XLocaleNotSupported -2
-#define XConverterNotFound -3
-
-typedef enum {
-    XStringStyle,              /* STRING */
-    XCompoundTextStyle,                /* COMPOUND_TEXT */
-    XTextStyle,                        /* text in owner's encoding (current locale)*/
-    XStdICCTextStyle           /* STRING, else COMPOUND_TEXT */
-} XICCEncodingStyle;
-
-typedef struct {
-       int min_width, min_height;
-       int max_width, max_height;
-       int width_inc, height_inc;
-} XIconSize;
-
-typedef struct {
-       char *res_name;
-       char *res_class;
-} XClassHint;
-
-/*
- * These macros are used to give some sugar to the image routines so that
- * naive people are more comfortable with them.
- */
-#define XDestroyImage(ximage) \
-       ((*((ximage)->f.destroy_image))((ximage)))
-#define XGetPixel(ximage, x, y) \
-       ((*((ximage)->f.get_pixel))((ximage), (x), (y)))
-#define XPutPixel(ximage, x, y, pixel) \
-       ((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))
-#define XSubImage(ximage, x, y, width, height)  \
-       ((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))
-#define XAddPixel(ximage, value) \
-       ((*((ximage)->f.add_pixel))((ximage), (value)))
-
-/*
- * Compose sequence status structure, used in calling XLookupString.
- */
-typedef struct _XComposeStatus {
-    XPointer compose_ptr;      /* state table pointer */
-    int chars_matched;         /* match state */
-} XComposeStatus;
-
-/*
- * Keysym macros, used on Keysyms to test for classes of symbols
- */
-#define IsKeypadKey(keysym) \
-  (((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal))
-
-#define IsPrivateKeypadKey(keysym) \
-  (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF))
-
-#define IsCursorKey(keysym) \
-  (((KeySym)(keysym) >= XK_Home)     && ((KeySym)(keysym) <  XK_Select))
-
-#define IsPFKey(keysym) \
-  (((KeySym)(keysym) >= XK_KP_F1)     && ((KeySym)(keysym) <= XK_KP_F4))
-
-#define IsFunctionKey(keysym) \
-  (((KeySym)(keysym) >= XK_F1)       && ((KeySym)(keysym) <= XK_F35))
-
-#define IsMiscFunctionKey(keysym) \
-  (((KeySym)(keysym) >= XK_Select)   && ((KeySym)(keysym) <= XK_Break))
-
-#define IsModifierKey(keysym) \
-  ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
-   || ((KeySym)(keysym) == XK_Mode_switch) \
-   || ((KeySym)(keysym) == XK_Num_Lock))
-/*
- * opaque reference to Region data type 
- */
-typedef struct _XRegion *Region; 
-
-/* Return values from XRectInRegion() */
-#define RectangleOut 0
-#define RectangleIn  1
-#define RectanglePart 2
-
-/*
- * Information used by the visual utility routines to find desired visual
- * type from the many visuals a display may support.
- */
-
-typedef struct {
-  Visual *visual;
-  VisualID visualid;
-  int screen;
-  int depth;
-#if defined(__cplusplus) || defined(c_plusplus)
-  int c_class;                                 /* C++ */
-#else
-  int class;
-#endif
-  unsigned long red_mask;
-  unsigned long green_mask;
-  unsigned long blue_mask;
-  int colormap_size;
-  int bits_per_rgb;
-} XVisualInfo;
-
-#define VisualNoMask           0x0
-#define VisualIDMask           0x1
-#define VisualScreenMask       0x2
-#define VisualDepthMask                0x4
-#define VisualClassMask                0x8
-#define VisualRedMaskMask      0x10
-#define VisualGreenMaskMask    0x20
-#define VisualBlueMaskMask     0x40
-#define VisualColormapSizeMask 0x80
-#define VisualBitsPerRGBMask   0x100
-#define VisualAllMask          0x1FF
-
-/*
- * This defines a window manager property that clients may use to
- * share standard color maps of type RGB_COLOR_MAP:
- */
-typedef struct {
-       Colormap colormap;
-       unsigned long red_max;
-       unsigned long red_mult;
-       unsigned long green_max;
-       unsigned long green_mult;
-       unsigned long blue_max;
-       unsigned long blue_mult;
-       unsigned long base_pixel;
-       VisualID visualid;              /* added by ICCCM version 1 */
-       XID killid;                     /* added by ICCCM version 1 */
-} XStandardColormap;
-
-#define ReleaseByFreeingColormap ((XID) 1L)  /* for killid field above */
-
-
-/*
- * return codes for XReadBitmapFile and XWriteBitmapFile
- */
-#define BitmapSuccess          0
-#define BitmapOpenFailed       1
-#define BitmapFileInvalid      2
-#define BitmapNoMemory         3
-
-/****************************************************************
- *
- * Context Management
- *
- ****************************************************************/
-
-
-/* Associative lookup table return codes */
-
-#define XCSUCCESS 0    /* No error. */
-#define XCNOMEM   1    /* Out of memory */
-#define XCNOENT   2    /* No entry in table */
-
-typedef int XContext;
-
-#define XUniqueContext()       ((XContext) falrmUniqueQuark())
-#define XStringToContext(string)   ((XContext) falrmStringToQuark(string))
-
-_XFUNCPROTOBEGIN
-
-/* The following declarations are alphabetized. */
-
-extern XClassHint *XAllocClassHint (
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern XIconSize *XAllocIconSize (
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern XSizeHints *XAllocSizeHints (
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern XStandardColormap *XAllocStandardColormap (
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern XWMHints *XAllocWMHints (
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern XClipBox(
-#if NeedFunctionPrototypes
-    Region             /* r */,
-    XRectangle*                /* rect_return */
-#endif
-);
-
-extern Region XCreateRegion(
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern char *falDefaultString(
-#if NeedFunctionPrototypes
-    void
-#endif
-);
-
-extern int XDeleteContext(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    XID                        /* rid */,
-    XContext           /* context */
-#endif
-);
-
-extern XDestroyRegion(
-#if NeedFunctionPrototypes
-    Region             /* r */
-#endif
-);
-
-extern XEmptyRegion(
-#if NeedFunctionPrototypes
-    Region             /* r */
-#endif
-);
-
-extern XEqualRegion(
-#if NeedFunctionPrototypes
-    Region             /* r1 */,
-    Region             /* r2 */
-#endif
-);
-
-extern int XFindContext(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    XID                        /* rid */,
-    XContext           /* context */,
-    XPointer*          /* data_return */
-#endif
-);
-
-extern Status XGetClassHint(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XClassHint*                /* class_hints_return */
-#endif
-);
-
-extern Status XGetIconSizes(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XIconSize**                /* size_list_return */,
-    int*               /* count_return */
-#endif
-);
-
-extern Status XGetNormalHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XSizeHints*                /* hints_return */
-#endif
-);
-
-extern Status XGetRGBColormaps(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XStandardColormap** /* stdcmap_return */,
-    int*               /* count_return */,
-    Atom               /* property */
-#endif
-);
-
-extern Status XGetSizeHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XSizeHints*                /* hints_return */,
-    Atom               /* property */
-#endif
-);
-
-extern Status XGetStandardColormap(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XStandardColormap* /* colormap_return */,
-    Atom               /* property */                      
-#endif
-);
-
-extern Status XGetTextProperty(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* window */,
-    XTextProperty*     /* text_prop_return */,
-    Atom               /* property */
-#endif
-);
-
-extern XVisualInfo *XGetVisualInfo(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    long               /* vinfo_mask */,
-    XVisualInfo*       /* vinfo_template */,
-    int*               /* nitems_return */
-#endif
-);
-
-extern Status XGetWMClientMachine(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XTextProperty*     /* text_prop_return */
-#endif
-);
-
-extern XWMHints *XGetWMHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */               
-#endif
-);
-
-extern Status XGetWMIconName(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XTextProperty*     /* text_prop_return */
-#endif
-);
-
-extern Status XGetWMName(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XTextProperty*     /* text_prop_return */
-#endif
-);
-
-extern Status XGetWMNormalHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XSizeHints*                /* hints_return */,
-    long*              /* supplied_return */ 
-#endif
-);
-
-extern Status XGetWMSizeHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XSizeHints*                /* hints_return */,
-    long*              /* supplied_return */,
-    Atom               /* property */
-#endif
-);
-
-extern Status XGetZoomHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XSizeHints*                /* zhints_return */
-#endif
-);
-
-extern XIntersectRegion(
-#if NeedFunctionPrototypes
-    Region             /* sra */,
-    Region             /* srb */,
-    Region             /* dr_return */
-#endif
-);
-
-extern void XConvertCase(
-#if NeedFunctionPrototypes
-    KeySym             /* sym */,
-    KeySym*            /* lower */,
-    KeySym*            /* upper */
-#endif
-);
-
-extern int XLookupString(
-#if NeedFunctionPrototypes
-    XKeyEvent*         /* event_struct */,
-    char*              /* buffer_return */,
-    int                        /* bytes_buffer */,
-    KeySym*            /* keysym_return */,
-    XComposeStatus*    /* status_in_out */
-#endif
-);
-
-extern Status XMatchVisualInfo(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* screen */,
-    int                        /* depth */,
-    int                        /* class */,
-    XVisualInfo*       /* vinfo_return */
-#endif
-);
-
-extern XOffsetRegion(
-#if NeedFunctionPrototypes
-    Region             /* r */,
-    int                        /* dx */,
-    int                        /* dy */
-#endif
-);
-
-extern Bool XPointInRegion(
-#if NeedFunctionPrototypes
-    Region             /* r */,
-    int                        /* x */,
-    int                        /* y */
-#endif
-);
-
-extern Region XPolygonRegion(
-#if NeedFunctionPrototypes
-    XPoint*            /* points */,
-    int                        /* n */,
-    int                        /* fill_rule */
-#endif
-);
-
-extern int XRectInRegion(
-#if NeedFunctionPrototypes
-    Region             /* r */,
-    int                        /* x */,
-    int                        /* y */,
-    unsigned int       /* width */,
-    unsigned int       /* height */
-#endif
-);
-
-extern int XSaveContext(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    XID                        /* rid */,
-    XContext           /* context */,
-    _Xconst char*      /* data */
-#endif
-);
-
-extern XSetClassHint(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XClassHint*                /* class_hints */
-#endif
-);
-
-extern XSetIconSizes(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XIconSize*         /* size_list */,
-    int                        /* count */    
-#endif
-);
-
-extern XSetNormalHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XSizeHints*                /* hints */
-#endif
-);
-
-extern void XSetRGBColormaps(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XStandardColormap* /* stdcmaps */,
-    int                        /* count */,
-    Atom               /* property */
-#endif
-);
-
-extern XSetSizeHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XSizeHints*                /* hints */,
-    Atom               /* property */
-#endif
-);
-
-extern XSetStandardProperties(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    _Xconst char*      /* window_name */,
-    _Xconst char*      /* icon_name */,
-    Pixmap             /* icon_pixmap */,
-    char**             /* argv */,
-    int                        /* argc */,
-    XSizeHints*                /* hints */
-#endif
-);
-
-extern void XSetTextProperty(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XTextProperty*     /* text_prop */,
-    Atom               /* property */
-#endif
-);
-
-extern void XSetWMClientMachine(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XTextProperty*     /* text_prop */
-#endif
-);
-
-extern XSetWMHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XWMHints*          /* wm_hints */
-#endif
-);
-
-extern void XSetWMIconName(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XTextProperty*     /* text_prop */
-#endif
-);
-
-extern void XSetWMName(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XTextProperty*     /* text_prop */
-#endif
-);
-
-extern void XSetWMNormalHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XSizeHints*                /* hints */
-#endif
-);
-
-extern void XSetWMProperties(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XTextProperty*     /* window_name */,
-    XTextProperty*     /* icon_name */,
-    char**             /* argv */,
-    int                        /* argc */,
-    XSizeHints*                /* normal_hints */,
-    XWMHints*          /* wm_hints */,
-    XClassHint*                /* class_hints */
-#endif
-);
-
-extern void XmbSetWMProperties(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    _Xconst char*      /* window_name */,
-    _Xconst char*      /* icon_name */,
-    char**             /* argv */,
-    int                        /* argc */,
-    XSizeHints*                /* normal_hints */,
-    XWMHints*          /* wm_hints */,
-    XClassHint*                /* class_hints */
-#endif
-);
-
-extern void XSetWMSizeHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XSizeHints*                /* hints */,
-    Atom               /* property */
-#endif
-);
-
-extern XSetRegion(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    GC                 /* gc */,
-    Region             /* r */
-#endif
-);
-
-extern void XSetStandardColormap(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XStandardColormap* /* colormap */,
-    Atom               /* property */
-#endif
-);
-
-extern XSetZoomHints(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Window             /* w */,
-    XSizeHints*                /* zhints */
-#endif
-);
-
-extern XShrinkRegion(
-#if NeedFunctionPrototypes
-    Region             /* r */,
-    int                        /* dx */,
-    int                        /* dy */
-#endif
-);
-
-extern Status XStringListToTextProperty(
-#if NeedFunctionPrototypes
-    char**             /* list */,
-    int                        /* count */,
-    XTextProperty*     /* text_prop_return */
-#endif
-);
-
-extern XSubtractRegion(
-#if NeedFunctionPrototypes
-    Region             /* sra */,
-    Region             /* srb */,
-    Region             /* dr_return */
-#endif
-);
-
-extern int falmbTextListToTextProperty(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    char**             /* list */,
-    int                        /* count */,
-    XICCEncodingStyle  /* style */,
-    XTextProperty*     /* text_prop_return */
-#endif
-);
-
-extern int falwcTextListToTextProperty(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    wchar_t**          /* list */,
-    int                        /* count */,
-    XICCEncodingStyle  /* style */,
-    XTextProperty*     /* text_prop_return */
-#endif
-);
-
-extern void falwcFreeStringList(
-#if NeedFunctionPrototypes
-    wchar_t**          /* list */
-#endif
-);
-
-extern Status XTextPropertyToStringList(
-#if NeedFunctionPrototypes
-    XTextProperty*     /* text_prop */,
-    char***            /* list_return */,
-    int*               /* count_return */
-#endif
-);
-
-extern int falmbTextPropertyToTextList(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    XTextProperty*     /* text_prop */,
-    char***            /* list_return */,
-    int*               /* count_return */
-#endif
-);
-
-extern int falwcTextPropertyToTextList(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    XTextProperty*     /* text_prop */,
-    wchar_t***         /* list_return */,
-    int*               /* count_return */
-#endif
-);
-
-extern XUnionRectWithRegion(
-#if NeedFunctionPrototypes
-    XRectangle*                /* rectangle */,
-    Region             /* src_region */,
-    Region             /* dest_region_return */
-#endif
-);
-
-extern XUnionRegion(
-#if NeedFunctionPrototypes
-    Region             /* sra */,
-    Region             /* srb */,
-    Region             /* dr_return */
-#endif
-);
-
-extern int XWMGeometry(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    int                        /* screen_number */,
-    _Xconst char*      /* user_geometry */,
-    _Xconst char*      /* default_geometry */,
-    unsigned int       /* border_width */,
-    XSizeHints*                /* hints */,
-    int*               /* x_return */,
-    int*               /* y_return */,
-    int*               /* width_return */,
-    int*               /* height_return */,
-    int*               /* gravity_return */
-#endif
-);
-
-extern XXorRegion(
-#if NeedFunctionPrototypes
-    Region             /* sra */,
-    Region             /* srb */,
-    Region             /* dr_return */
-#endif
-);
-
-_XFUNCPROTOEND
-
-#endif /* _XUTIL_H_ */
diff --git a/cde/programs/dtudcfonted/libfal/_falutilbitmap.c b/cde/programs/dtudcfonted/libfal/_falutilbitmap.c
deleted file mode 100644 (file)
index 8720e0c..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: _falutilbitmap.c /main/1 1996/04/08 15:22:19 cde-fuj $ */
-
-/*
-
-Copyright (c) 1990, 1994  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
-
-*/
-
-/*
- * Author:  Keith Packard, MIT X Consortium
- */
-
-/* Utility functions for reformating font bitmaps */
-
-static unsigned char _reverse_byte[0x100] = {
-       0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
-       0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
-       0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
-       0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
-       0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
-       0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
-       0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
-       0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
-       0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
-       0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
-       0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
-       0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
-       0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
-       0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
-       0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
-       0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
-       0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
-       0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
-       0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
-       0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
-       0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
-       0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
-       0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
-       0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
-       0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
-       0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
-       0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
-       0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
-       0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
-       0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
-       0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
-       0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
-};
-
-/*
- *     Invert bit order within each BYTE of an array.
- */
-void
-BitOrderInvert(buf, nbytes)
-    register unsigned char *buf;
-    register int nbytes;
-{
-    register unsigned char *rev = _reverse_byte;
-
-    for (; --nbytes >= 0; buf++)
-       *buf = rev[*buf];
-}
-
-/*
- *     Invert byte order within each 16-bits of an array.
- */
-void
-TwoByteSwap(buf, nbytes)
-    register unsigned char *buf;
-    register int nbytes;
-{
-    register unsigned char c;
-
-    for (; nbytes > 0; nbytes -= 2, buf += 2)
-    {
-       c = buf[0];
-       buf[0] = buf[1];
-       buf[1] = c;
-    }
-}
-
-/*
- *     Invert byte order within each 32-bits of an array.
- */
-void
-FourByteSwap(buf, nbytes)
-    register unsigned char *buf;
-    register int nbytes;
-{
-    register unsigned char c;
-
-    for (; nbytes > 0; nbytes -= 4, buf += 4) 
-    {
-       c = buf[0];
-       buf[0] = buf[3];
-       buf[3] = c;
-       c = buf[1];
-       buf[1] = buf[2];
-       buf[2] = c;
-    }
-}
-
-/*
- *     Repad a bitmap
- */
-
-int
-RepadBitmap (pSrc, pDst, srcPad, dstPad, width, height)
-    char       *pSrc, *pDst;
-    unsigned   srcPad, dstPad;
-    int                width, height;
-{
-    int            srcWidthBytes,dstWidthBytes;
-    int            row,col;
-    char    *pTmpSrc,*pTmpDst;
-
-    switch (srcPad) {
-    case 1:    
-       srcWidthBytes = (width+7)>>3;
-       break;
-    case 2:
-       srcWidthBytes = ((width+15)>>4)<<1;
-       break;
-    case 4:    
-       srcWidthBytes = ((width+31)>>5)<<2;
-       break;
-    case 8:    
-       srcWidthBytes = ((width+63)>>6)<<3; 
-       break;
-    default:
-       return 0;
-    }
-    switch (dstPad) {
-    case 1:    
-       dstWidthBytes = (width+7)>>3;
-       break;
-    case 2:
-       dstWidthBytes = ((width+15)>>4)<<1;
-       break;
-    case 4:    
-       dstWidthBytes = ((width+31)>>5)<<2;
-       break;
-    case 8:    
-       dstWidthBytes = ((width+63)>>6)<<3; 
-       break;
-    default:
-       return 0;
-    }
-
-    width = srcWidthBytes;
-    if (width > dstWidthBytes)
-       width = dstWidthBytes;
-    pTmpSrc= pSrc;
-    pTmpDst= pDst;
-    for (row = 0; row < height; row++)
-    {
-       for (col = 0; col < width; col++)
-           *pTmpDst++ = *pTmpSrc++;
-       while (col < dstWidthBytes)
-       {
-           *pTmpDst++ = '\0';
-           col++;
-       }
-       pTmpSrc += srcWidthBytes - width;
-    }
-    return dstWidthBytes * height;
-}
diff --git a/cde/programs/dtudcfonted/libfal/_falvarargs.h b/cde/programs/dtudcfonted/libfal/_falvarargs.h
deleted file mode 100644 (file)
index 8c48760..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* Xvarargs.h 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:13    */ 
-/* $XConsortium: _falvarargs.h /main/1 1996/04/08 15:22:42 cde-fuj $ */
-/*
-
-Copyright (c) 1985, 1986, 1987, 1988, 1989  X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from the X Consortium.
-
-*/
-
-#ifndef _XVARARGS_H_
-#define _XVARARGS_H_
-
-#ifdef __HIGHC__
-#ifndef _STDARG_H
-#define _STDARG_H
-
-typedef char *va_list;
-
-/* Amount of space required in an argument list for an arg of type TYPE.
-   TYPE may alternatively be an expression whose type is used.  */
-
-#define __va_rounded_size(TYPE)  \
-  (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
-
-#define va_start(AP, LASTARG)                                           \
- (AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG)))
-
-#define va_end(AP)
-
-#define va_arg(AP, TYPE)                                                \
- (AP += __va_rounded_size (TYPE),                                       \
-  *((TYPE *) (AP - __va_rounded_size (TYPE))))
-
-#endif /* _STDARG_H */
-
-#define Va_start(a,b) va_start(a,b)
-
-#else /* !__HIGHC__ */
-
-#if NeedVarargsPrototypes
-# include <stdarg.h>
-# define Va_start(a,b) va_start(a,b)
-#else
-# include <varargs.h>
-# define Va_start(a,b) va_start(a)
-#endif
-
-#endif /* __HIGHC__ */
-
-#endif /* _XVARARGS_H_ */
diff --git a/cde/programs/dtudcfonted/libfal/falfont.c b/cde/programs/dtudcfonted/libfal/falfont.c
deleted file mode 100644 (file)
index f84d2ac..0000000
+++ /dev/null
@@ -1,3239 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: falfont.c /main/8 1996/07/04 02:35:37 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include       <signal.h>
-#include       <locale.h>
-#include       <stdio.h>
-#include       <string.h>
-#include       <stdlib.h>
-
-#include       <sys/mman.h>
-#include       <errno.h>
-
-#include       <sys/types.h>
-#include       <sys/stat.h>
-#include       <fcntl.h>
-#include       <unistd.h>
-
-#include       "FaLib.h"
-#include       "falfont.h"
-#include       "udcutil.h"
-
-
-#define        MKFONTLIST      (1<<1)
-#define        SRCHFNAME       (1<<2)
-#define        FONTOFID        (1<<3)
-
-typedef struct _FontIDInfo {
-       FalFontID       fid ;
-       int             cd_set ;
-       int             dspcode ;
-       int             islock ;
-} FontIDInfo ;
-
-typedef struct _MngFontID {
-       int             num ;
-       FontIDInfo      **finf ;
-} MngFontID ;
-
-/*** structures for UDC fontpath ***/
-static FalFontPath     orgn = { 0, NULL };     /* for libfal */
-static FalFontPath     copy = { 0, NULL };     /* report to the user */
-static FalFontPath     wpath = { 0, NULL };    /* for libfal */
-
-/***** Variables for notice kind of error *****/
-int    fal_utyerror;
-int    fal_utyderror;
-int    fal_utyexists;
-unsigned long  fal_utyerrno ;
-char   fal_err_file[ FAL_LINE_MAX+1 ] ;
-
-char   fal_err_file_buf[ sizeof(fal_err_file) ] ;
-
-#define        fal_seterrcode( uty, der, errno, func ) { \
-    fal_utyerror  =  (uty); \
-    fal_utyderror =  (der) ; \
-    fal_utyerrno  =  (errno) ; \
-    fal_utyerrno  |= ((func)<<8) ; \
-}
-
-/***** flags *****/
-static int     execDefined ;
-static int     execUndefined ;
-static int     IsDefaultPath = FALSE ;
-static MngFontID       mngfid = { 0, NULL } ;
-static int     tmp_codeset = 0 ;
-static char    *fal_locale = NULL ;
-static char    *charset_str_buf = NULL ;
-static int     *codeset_list_sav = NULL ;
-static int     codeset_list_num = 0 ;
-
-/* declaration of inner functions */
-char   *fal_get_base_name();
-
-static FILE    *open_fonts_list() ;
-static int     falGetGlyph() ;
-static int     falGetCharIndex() ;
-static int     falZoom() ;
-static int     exline() ;
-static char    falGetMask() ;
-static int     chk_key_str() ;
-static int     fal_make_fontlist() ;
-static int     fal_sort_fontlist() ;
-static int     set_default_path() ;
-static int     cpy_default_path() ;
-static int     comp_default_path() ;
-static int     fal_clear_font_path() ;
-static int     set_font_pathlist() ;
-
-static int     fal_split_data() ;
-static int     fal_clear_data() ;
-static int     CR_to_NULL() ;
-static int     fal_cmp_data() ;
-static int     new_target() ;
-
-int    set_struct() ;
-int    fal_eq_data() ;
-
-void   set_errfile_str() ;
-
-static int     fal_init() ;
-static int     fal_add_fidinf() ;
-static int     fal_read_fidinf() ;
-static int     fal_del_fidinf() ;
-static int     fal_conv_code_to_glyph() ;
-static int     fal_conv_glyph_to_code() ;
-static int     falReadFontInfoLists() ;
-static int     fal_get_def_fontdata() ;
-static int     falgetfontlist() ;
-static int     fal_get_undef_fontdata() ;
-static void    clear_charset_info() ;
-static int     make_default_path() ;
-static int     file_lock() ;
-static int     file_unlock() ;
-static int     is_lock() ;
-
-extern int     falReadFontProp() ;
-extern int     falReadGpfProp() ;
-extern int     falInitReadPcfProp() ;
-extern int     fal_get_codeset() ;
-extern int     falInitReadPcf() ;
-extern void    falGetPcfGSize() ;
-extern int     falPcfGlyph() ;
-extern int     fal_code_to_glyph() ;
-extern int     fal_glyph_to_code() ;
-
-
-
-static int 
-fal_init()
-{
-    memset( fal_err_file, '\0', sizeof(fal_err_file) ) ;
-    memset( fal_err_file_buf, '\0', sizeof(fal_err_file_buf) ) ;
-
-    if ( !fal_locale ){
-       char    *lcl ;
-       if( (lcl = (char *)getenv( "LANG" )) == NULL ){
-           lcl = "C" ;
-       }
-       if( (fal_locale = (char *)strdup( lcl )) == NULL ){
-           fal_utyerror = _FAL_MALOC_ER;
-           fal_utyderror = 0;
-           fal_utyerrno = FAL_ERR_MALLOC ;
-           return FAL_ERROR;
-       } 
-    } 
-    return 0 ;
-}
-
-void
-set_errfile_str( obuf, ibuf )
-char   *obuf ;
-char   *ibuf ;
-{
-    char       *sp ;
-
-    if( (strlen(ibuf)+1) > sizeof(fal_err_file) ){
-       sp = ibuf ;
-       sp += ((strlen(ibuf)+1) - sizeof(fal_err_file)) ;
-       strcpy( obuf, sp ) ;
-    }else{
-       strcpy( obuf, ibuf ) ;
-    }
-}
-
-/*
- * open a fontfile by "RDONLY"
- */
-FalFontID 
-FalOpenFont( file, protect_key_data, codeset )
-char    *file;
-int     protect_key_data;
-int     codeset;
-{
-       FalFontID       __FalOpenFont();
-
-       return  __FalOpenFont( file, protect_key_data, codeset, 0 );
-}
-
-/*
- * open a fontfile by "RDWR"
- *
- *
- * lock flag
- *     1: ON ---  open mode "RDWR"
- *     0: OFF --  for "FalOpenFont()"
- */
-FalFontID
-__FalOpenFont( file, protect_key_data, codeset, lockflag )
-char   *file;
-int     protect_key_data;
-int    codeset;
-int    lockflag;
-{
-       int     fd ;
-       char    *buf;
-       char    *openfontfile;
-       struct  stat st;
-       Oak_FontInf  *finf;
-
-       if ( !(openfontfile = (char *)malloc( strlen( file ) + 1 )) ) {
-           fal_seterrcode( _FAL_MALOC_ER, 0,
-                           FAL_ERR_MALLOC , FAL_FUNCNUM_OPNFNT ) ;
-           return      (FalFontID)FAL_ERROR;
-       }
-       strcpy( openfontfile, file );
-
-       /* read a condition of a fontfile */
-       if ( stat( openfontfile, &st ) < 0 ) {
-               set_errfile_str( fal_err_file, openfontfile ) ;
-               free( openfontfile );
-               fal_utyerror = _FAL_STAT_ER;
-               fal_utyderror = errno;
-               fal_utyerrno = FAL_ERR_STAT ;
-               fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-               return  (FalFontID)FAL_ERROR;
-       }
-
-       CHK_PROTECT_KEY( protect_key_data, openfontfile, fal_utyerror, fal_utyderror ) ;
-
-       if ( st.st_size < sizeof( FontInfoRec ) ) {
-               set_errfile_str( fal_err_file, openfontfile ) ;
-               free( openfontfile );
-               fal_utyerror = _FAL_FONT_ER;
-               fal_utyderror = 0;
-               fal_utyerrno = FAL_ERR_FONT ;
-               fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-               return  (FalFontID)FAL_ERROR;
-       }
-
-       /* open a fontfile */
-       if ( lockflag == 1 ) {
-               int     ret ; 
-               if ( (fd = open( openfontfile, O_RDWR )) < 0 ) { 
-                   set_errfile_str( fal_err_file, openfontfile ) ;
-                   free( openfontfile );
-                   fal_utyerror = _FAL_OPEN_ER;
-                   fal_utyderror = errno;
-                   fal_utyerrno = FAL_ERR_FNT_OPN ;
-                   fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-                   return (FalFontID)FAL_ERROR;
-               }
-               ret = is_lock( fd ) ;
-               if( ret != 0 ){
-                   set_errfile_str( fal_err_file, openfontfile ) ;
-                   free( openfontfile );
-                   fal_utyerror = _FAL_OPEN_ER;
-                   fal_utyderror = errno;
-                   fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-                   close( fd );
-                   return (FalFontID)FAL_ERROR;
-               }
-       } else {
-               if ( (fd = open( openfontfile, O_RDONLY)) < 0 ) { 
-                   set_errfile_str( fal_err_file, openfontfile ) ;
-                   free( openfontfile );
-                   fal_utyerror = _FAL_OPEN_ER;
-                   fal_utyderror = errno;
-                   fal_utyerrno = FAL_ERR_FNT_OPN ;
-                   fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-                   return (FalFontID)FAL_ERROR;
-               }
-       }
-
-       /* read a fontfile */
-       if ( !(finf = ( Oak_FontInf * )malloc(sizeof( Oak_FontInf ) )) ) {
-               free( openfontfile );
-               fal_utyerror = _FAL_MALOC_ER;
-               fal_utyderror = 0;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-               close( fd );
-               return  (FalFontID)FAL_ERROR;
-       }
-
-
-#if    defined( SVR4 )
-       /* use "mmap()" */
-       buf = (char *)mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
-       if ( buf != (char *)-1 ) {
-           /* if "mmap" is normal end */
-           if ( lockflag == 0 ) {
-                   close( fd );
-           }
-           finf->ismmap = TRUE;
-           finf->fsize = st.st_size;
-       } else {
-#endif
-           /* if "mmap" is abnormal end , try "read()" */
-           finf->ismmap = FALSE;
-           if ( !(buf = (char *)malloc(st.st_size)) ) {
-               free( openfontfile );
-               fal_utyerror = _FAL_MALOC_ER;
-               fal_utyderror = 0;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-               free( finf );
-               close( fd );
-               return  (FalFontID)FAL_ERROR;
-           }
-           if ( read(fd, buf, st.st_size) != st.st_size ) {
-               set_errfile_str( fal_err_file, openfontfile ) ;
-               free( openfontfile );
-               fal_utyerror = _FAL_READ_ER;
-               fal_utyderror = errno;
-               fal_utyerrno = FAL_ERR_FNT_RD ;
-               fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-               free( finf );
-               free( buf );
-               close( fd );
-               return  (FalFontID)FAL_ERROR;
-           }
-#if    defined( SVR4 )
-       }
-#endif
-
-       if ( !(finf->fname = (char *)strdup( openfontfile )) ) {
-           fal_seterrcode( _FAL_MALOC_ER, 0,
-                           FAL_ERR_MALLOC , FAL_FUNCNUM_OPNFNT ) ;
-           free( openfontfile );
-           free( finf );
-           free( buf );
-           close( fd );
-           return      (FalFontID)FAL_ERROR;
-       }
-
-       /* case of a pcf font */
-       if ( strcmp( FILE_SUFFIX( openfontfile ), PCFSUFFIX ) == 0 ) {
-           if ( falInitReadPcf( &finf->pcfinf, buf ) ) {
-               fal_utyerror = _FAL_PKEY_ER;
-               fal_utyderror = 0;
-               fal_utyerrno = FAL_ERR_FONT ;
-               fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-               goto FalError01 ;
-           }
-           finf->isFef = FALSE;
-           finf->isPcf = TRUE;
-           finf->pFinf = &finf->pcfinf.info;
-       } else {
-           FAL_GET_SNF_HEADER( buf, protect_key_data, fal_utyerror, fal_utyderror, fd, finf, openfontfile ) ;
-       }
-       finf->buf = buf;
-
-       if ( finf->isFef ){
-               finf->pCinf 
-                   = (CharInfoPtr)( (char *)finf->pFinf 
-                   + sizeof( FontInfoRec ) );
-               finf->pGlyphs 
-                   = (unsigned char *)((char *)finf->pCinf
-                   + (sizeof(CharInfoRec) * GETNUMCHARS(finf->pFinf)));
-               finf->width 
-                   = finf->pFinf->maxbounds.metrics.rightSideBearing 
-                   - finf->pFinf->maxbounds.metrics.leftSideBearing;
-               finf->height 
-                   = finf->pFinf->maxbounds.metrics.ascent 
-                   + finf->pFinf->maxbounds.metrics.descent;
-       } else if ( finf->isPcf ) {
-               finf->pCinf = NULL;
-               finf->pGlyphs = NULL;
-               falGetPcfGSize( &finf->pcfinf, &finf->width, &finf->height);
-       } else {
-           fal_utyerror = _FAL_FONT_ER;
-           fal_utyderror = 0;
-           fal_utyerrno = FAL_ERR_FONT ;
-           fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-           goto FalError01 ;
-       }
-
-       finf->start = (finf->pFinf->firstRow << 8) | finf->pFinf->firstCol;
-       finf->end = (finf->pFinf->lastRow << 8) | finf->pFinf->lastCol;
-
-       finf->fd = fd;
-       finf->sptnBufL = 0;
-       finf->sptnBuf = (char *)0;
-       finf->dptnBufL = 0;
-       finf->dptnBuf = (char *)0;
-       finf->dbufL = 0;
-       finf->dbuf = (char *)0;
-
-       finf->sptnBufL = ((finf->width + 7) / 8) * (finf->height);
-       finf->sptnBuf = (char *)malloc(finf->sptnBufL); 
-       if ( finf->sptnBuf == NULL ) {
-           fal_utyerror = _FAL_MALOC_ER;
-           fal_utyderror = 0;
-           fal_utyerrno = FAL_ERR_MALLOC ;
-           fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-           goto FalError01 ;
-       }
-
-       /* Save font information */
-       if( fal_add_fidinf( (FalFontID)finf, codeset,
-               ((tmp_codeset)?tmp_codeset:codeset),
-               lockflag ) == FAL_ERROR )
-       {
-               fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-               goto FalError01 ;
-       }
-
-       /* Lock the font file */
-       if ( lockflag == 1 ) {
-           if ( file_lock( finf->fd ) == FAL_ERROR ) {
-               set_errfile_str( fal_err_file, openfontfile ) ;
-               fal_utyerror = _FAL_OPEN_ER;
-               fal_utyderror = errno;
-               fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-               goto FalError01 ;
-           }
-       }
-       free( openfontfile );
-
-       return( ( FalFontID ) finf );
-
-FalError01:
-
-#if    defined( SVR4 )
-       if ( finf->ismmap == TRUE ) {
-           munmap( buf, finf->fsize );
-       } else {
-           free( buf );
-           close( fd );
-       }
-#else
-       free( buf );
-       close( fd );
-#endif
-       set_errfile_str( fal_err_file, openfontfile ) ;
-       free( openfontfile );
-       free( finf->fname );
-       finf->fname = NULL;
-       free(finf);
-
-       return  (FalFontID)FAL_ERROR;
-}
-
-
-
-#if NeedFunctionPrototypes
-FalCloseFont(
-       FalFontID       fid )
-#else
-FalCloseFont( fid )
-FalFontID      fid;
-#endif
-{
-       int     __FalCloseFont();
-       FontIDInfo      fontid_inf ;
-
-       if( fal_read_fidinf( fid, &fontid_inf ) == FAL_ERROR ) {
-               fal_utyerrno |= (FAL_FUNCNUM_CLSFNT<<8) ;
-               return  FAL_ERROR;
-       }
-
-       return  __FalCloseFont( fid, fontid_inf.islock );
-}
-
-
-/*
- * close a fontfile
- *
- *
- * lock flag
- *     1: ON ---  open a font by "RDWR" mode
- *     0: OFF --  for "FalOpenFont()"
- */
-__FalCloseFont( fid, lockflag )
-FalFontID      fid;
-int    lockflag;
-{
-       Oak_FontInf  *finf;
-
-       finf = ( Oak_FontInf * )fid;
-
-       if ( finf == NULL ) {
-               fal_utyerror = _FAL_PARM_ER;
-               fal_utyderror = 0;
-               fal_utyerrno = FAL_ERR_PARM ;
-               fal_utyerrno |= (FAL_FUNCNUM_CLSFNT<<8) ;
-               return  FAL_ERROR;
-       }
-
-       set_errfile_str( fal_err_file_buf, finf->fname ) ;
-       free( finf->fname );
-       if ( finf->buf != NULL ) {
-#if    defined( SVR4 )
-               if ( finf->ismmap == TRUE ) {
-                       munmap( finf->buf, finf->fsize );
-                       if ( lockflag == 1 ) {
-                           close( finf->fd );
-                       }
-               } else {
-                       free( finf->buf );
-                       close( finf->fd );
-               }
-#else
-               free( finf->buf );
-               close( finf->fd );
-#endif
-
-               free( finf->sptnBuf );
-               free( finf->dptnBuf );
-               free( finf->dbuf );
-
-               free ( finf );
-       }
-       if ( lockflag == 1 ) {
-           if ( file_unlock( finf->fd ) == FAL_ERROR ) {
-               set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-               fal_utyerrno |= (FAL_FUNCNUM_CLSFNT<<8) ;
-               return  FAL_ERROR;
-           }
-       }
-
-       if ( fal_del_fidinf( fid ) == FAL_ERROR ) {
-               fal_utyerrno |= (FAL_FUNCNUM_CLSFNT<<8) ;
-               return  FAL_ERROR;
-       }
-
-       return  _FAL_OK;
-}
-
-#if NeedFunctionPrototypes
-FalQueryFont(
-       FalFontID       fid,
-       FalFontinfo     *fontinfo )
-#else
-FalQueryFont( fid, fontinfo )
-FalFontID      fid;
-FalFontinfo    *fontinfo;
-#endif
-{
-       Oak_FontInf     *finf;
-       unsigned int    inner_start, inner_end ;
-       FontIDInfo      fontid_inf ;
-
-       if( fal_read_fidinf( fid, &fontid_inf ) == FAL_ERROR ){
-               fal_utyerrno |= (FAL_FUNCNUM_QRY<<8) ;
-               return FAL_ERROR;
-       }
-       finf = ( Oak_FontInf * )fid;
-       if ( finf == NULL || fontinfo == NULL ) {
-               fal_utyerror = _FAL_PARM_ER;
-               if (finf == NULL) {
-                       fal_utyderror = _FAL_Q_P_FINF_DER;
-               } else {
-                       fal_utyderror = _FAL_Q_P_FONT_DER;
-               }
-               fal_utyerrno = FAL_ERR_PARM ;
-               fal_utyerrno |= (FAL_FUNCNUM_QRY<<8) ;
-               return  FAL_ERROR;
-       }
-
-       fontinfo->width  = (int)finf->width;
-       fontinfo->height = (int)finf->height;
-
-       if( (fal_conv_glyph_to_code( finf, fontid_inf.dspcode,
-           fontid_inf.cd_set, finf->start, &inner_start ) == FAL_ERROR ) ||
-           (fal_conv_glyph_to_code( finf, fontid_inf.dspcode,
-           fontid_inf.cd_set, finf->end, &inner_end  ) == FAL_ERROR ))
-       {
-               fal_utyerrno |= (FAL_FUNCNUM_QRY<<8) ;
-               return  FAL_ERROR;
-       }
-
-       fontinfo->top    = inner_start ;
-       fontinfo->bottom = inner_end ;
-
-       return  _FAL_OK;
-}
-
-#if NeedFunctionPrototypes
-char   *
-FalReadFont(
-       FalFontID       fid,
-       int             code,
-       int             width,
-       int             height )
-#else
-char   *
-FalReadFont( fid, code, width, height )
-FalFontID      fid;
-int            code ;
-int            width ;
-int            height ;
-#endif
-{
-       Oak_FontInf     *finf;
-       int     zoom_on ;
-       char    *toglyph;
-       int     ptnBsize;
-       unsigned int    inner_code;     /* an inside code of a file */
-
-       finf = ( Oak_FontInf * )fid;
-
-       if ( finf == NULL ) {
-               fal_utyerror = _FAL_PARM_ER;
-               fal_utyderror = _FAL_R_P_FINF_DER;
-               fal_utyerrno = FAL_ERR_PARM ;
-               fal_utyerrno |= (FAL_FUNCNUM_RDFNT<<8) ;
-               return  (char *)FAL_ERROR;
-       }
-       if (width < 0) {
-               fal_utyerror = _FAL_PARM_ER;
-               fal_utyderror = _FAL_R_P_W_DER;
-               fal_utyerrno = FAL_ERR_PARM ;
-               fal_utyerrno |= (FAL_FUNCNUM_RDFNT<<8) ;
-               return  (char *)FAL_ERROR;
-       }
-       if (height < 0) {
-               fal_utyerror = _FAL_PARM_ER;
-               fal_utyderror = _FAL_R_P_H_DER;
-               fal_utyerrno = FAL_ERR_PARM ;
-               fal_utyerrno |= (FAL_FUNCNUM_RDFNT<<8) ;
-               return  (char *)FAL_ERROR;
-       }
-
-       if (width == 0) {
-               width = finf->width;
-       }
-       if (height == 0) {
-               height = finf->height;
-       }
-       if ( (width != finf->width) || (height != finf->height) ) {
-               zoom_on = TRUE;
-       } else {
-               zoom_on = FALSE;
-       }
-
-       memset(finf->sptnBuf, 0, finf->sptnBufL);
-
-       if( fal_conv_code_to_glyph( fid, code, &inner_code ) == FAL_ERROR ) {
-               fal_utyexists = 1;
-               fal_utyerrno |= (FAL_FUNCNUM_RDFNT<<8) ;
-               return  (char *)0;
-       }
-
-       if ( finf->isPcf) {
-               /* case of a pcf font */
-               falPcfGlyph( finf->sptnBuf, finf, inner_code );
-       } else {
-               /* case of a snf font */
-               falGetGlyph( finf->sptnBuf, finf, inner_code );
-       }
-       if ( zoom_on == TRUE ) {
-               ptnBsize = ((width + 7)/8)*height;
-               if ( ptnBsize > finf->dptnBufL ) {
-                       if ( finf->dptnBuf == NULL ) {
-                               toglyph = (char *)malloc( ptnBsize );
-                       } else {
-                               toglyph = (char *)realloc( finf->dptnBuf, ptnBsize );
-                       }
-                       if ( toglyph == NULL ) {
-                               fal_utyerror = _FAL_MALOC_ER;
-                               fal_utyderror = 0;
-                               fal_utyerrno = FAL_ERR_MALLOC ;
-                               fal_utyerrno |= (FAL_FUNCNUM_RDFNT<<8) ;
-                               return  (char *)FAL_ERROR;
-                       }
-                       finf->dptnBufL = ptnBsize;
-                       finf->dptnBuf = toglyph;
-               }
-               ptnBsize = (width + 7) / 8;
-               if ( ptnBsize > finf->dbufL ) {
-                       if ( finf->dbuf == NULL ) {
-                               toglyph = (char *)malloc( ptnBsize );
-                       } else {
-                               toglyph = (char *)realloc( finf->dbuf, ptnBsize );
-                       }
-                       if ( toglyph == NULL ) {
-                               fal_utyerror = _FAL_MALOC_ER;
-                               fal_utyderror = 0;
-                               fal_utyerrno = FAL_ERR_MALLOC ;
-                               fal_utyerrno |= (FAL_FUNCNUM_RDFNT<<8) ;
-                               return  (char *)FAL_ERROR;
-                       }
-                       finf->dbufL = ptnBsize;
-                       finf->dbuf = toglyph;
-               }
-               falZoom(
-                   finf->dptnBuf, finf->sptnBuf,
-                   finf->width, finf->height, width, height, finf->dbuf
-                   );
-               return( finf->dptnBuf );
-       } else {
-               return  finf->sptnBuf;
-       }
-}
-
-static
-falGetGlyph( glyph, finf, code )
-char   *glyph;
-Oak_FontInf    *finf;
-int    code;
-{
-       int     in_dwidth, out_dwidth, ix, i, j;
-       char    *glyph_p, *inp, p_mask, falGetMask();
-       CharInfoPtr     CharInfP;
-       int     codeRow, codeCol;
-       unsigned int    inner_code;             /* an inside code of a file */
-
-       inner_code = code;
-       codeCol = inner_code & 0xff;    /* a lower byte of an inside code */
-       codeRow = (inner_code >> 8) & 0xff; /* a upper byte of a code */
-
-       /* code check */
-       if (
-           ((code < finf->start) || (code > finf->end)) || 
-           ((codeCol < finf->pFinf->firstCol) ||
-           (codeCol > finf->pFinf->lastCol)) ||
-           ((codeRow < finf->pFinf->firstRow) ||
-           (codeRow > finf->pFinf->lastRow))
-           ) {
-               fal_utyexists = 1;
-               return  0;
-       }
-
-       /* Get a character index */
-       ix = falGetCharIndex( finf, inner_code );
-       CharInfP = finf->pCinf;
-
-       if ( !CharInfP[ix].exists ) {
-               fal_utyexists = 1;
-               return  0;
-       } else {
-               fal_utyexists = 0;
-       }
-
-       in_dwidth 
-           = (finf->width + SNF_BOUND - 1)
-           / SNF_BOUND * (SNF_BOUND / 8);
-       out_dwidth = (finf->width + 7) / 8;
-
-       p_mask = falGetMask( finf->width );
-
-       glyph_p = (char *)finf->pGlyphs + CharInfP[ix].byteOffset;
-       for ( i = 0; i < finf->height; i++ ) {
-               inp = glyph_p + ( in_dwidth * i );
-               for ( j = 0; j < out_dwidth-1; j++ ) {
-                       *glyph++ = *inp++;
-               }
-               *glyph++ = *inp++ & p_mask;
-       }
-       return  0;
-}
-
-static
-falGetCharIndex( finf, code )
-Oak_FontInf    *finf;
-int    code;   /* an inside code of a file */
-{
-       int     nColperRow, nRow, nCol;
-
-       nColperRow = finf->pFinf->lastCol  - finf->pFinf->firstCol + 1;
-       nRow = ((code >> 8) & 0xff) - finf->pFinf->firstRow;
-       nCol = (code & 0xff) - finf->pFinf->firstCol;
-
-       return  ( nRow * nColperRow + nCol );
-}
-
-static
-falZoom( dmem, smem, sw, sh, dw, dh, dbuf )
-char    *dmem;
-char    *smem;
-int     sw;
-int     sh;
-int     dw;
-int     dh;
-char    *dbuf;
-{
-       int     swidth;
-       int     dwidth;
-       int     i, lcnt;
-       char    *sp, *dp;
-
-       swidth = (sw + 7) / 8;
-       dwidth = (dw + 7) / 8;
-
-       lcnt = 0;
-       sp = smem;
-       dp = dmem;
-       for ( i=0; i < sh; i++ ) {
-               lcnt += dh;
-               if ( lcnt >= sh ) {
-                       exline( sp, dbuf, sw, dw );
-                       sp += swidth;
-                       lcnt -= sh;
-                       memcpy( dp, dbuf, dwidth );
-                       dp += dwidth;
-                       for ( ; lcnt >= sh; lcnt -= sh ) {
-                               memcpy( dp, dbuf, dwidth );
-                               dp += dwidth;
-                       }
-               } else {
-                       sp += swidth;
-               }
-       }
-       return  0;
-}
-
-static
-exline( sp, dbuf, sw, dw )
-char   *sp;
-char   *dbuf;
-int    sw;
-int    dw;
-{
-       int     i, bit, sval, dval, dcnt, bcnt;
-
-       bcnt = dval = 0;
-       dcnt = 8;
-
-       for ( i = 0; i < sw; i++ ) {
-               if ( i % 8 == 0 ) {
-                       sval = *sp++;
-               }
-               bit = ( (sval & 0x80) ? 1 : 0 );
-               sval <<=  1;
-               for ( bcnt += dw; bcnt >= sw; bcnt -= sw ) {
-                       dval = ( dval << 1 ) | bit;
-                       if ( --dcnt == 0 ) {
-                               *dbuf++ = (char)dval;
-                               dval = 0;
-                               dcnt = 8;
-                       }
-               }
-       }
-       if ( dcnt != 8 ) {
-               dval <<= dcnt;
-               *dbuf = (char)dval;
-       }
-       return  0;
-}
-
-static unsigned char   _Fal_Mask_Tab[8] = {
-       0xff, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe 
-};
-
-static char
-falGetMask( width )
-int     width;
-{
-       int     ix = width % 8;
-       return  _Fal_Mask_Tab[ix];
-}
-
-
-/* a difinition of a style */
-static FalFontDB fal_db_style[] = {
-       { FAL_FONT_MINCHO,      FAL_FONT_STR_MINCHO },
-       { FAL_FONT_GOTHIC,      FAL_FONT_STR_GOTHIC },
-       { FAL_FONT_MARU_GOTHIC, FAL_FONT_STR_MARU_GOTHIC },
-       { FAL_FONT_TEXTBOOK,    FAL_FONT_STR_TEXTBOOK },
-       { FAL_FONT_BRASH_GYOU,  FAL_FONT_STR_BRASH_GYOU },
-       { FAL_FONT_BRASH_KAI,   FAL_FONT_STR_BRASH_KAI },
-       { FAL_FONT_HANDWRITING, FAL_FONT_STR_HANDWRITING },
-       { FAL_FONT_UNKNOWN,     ""}
-};
-
-/* a difinition of a shape */
-static FalFontDB fal_db_shape[] = {
-       { FAL_FONT_ZENKAKU,     FAL_FONT_STR_ZENKAKU },
-       { FAL_FONT_HANKAKU,     FAL_FONT_STR_HANKAKU },
-       { FAL_FONT_QUARTER,     FAL_FONT_STR_QUARTER },
-       { FAL_FONT_UNKNOWN,     ""}
-};
-
-FAL_DB_OPTION ;
-
-/*********************************************************/
-/* make a font information list and carry to user      */
-/*********************************************************/
-
-#if NeedFunctionPrototypes
-int
-FalGetFontList(
-       FalFontData *key_data,
-       int mask,
-       FalFontDataList **list_ret )
-#else
-int
-FalGetFontList( key_data, mask, list_ret )
-FalFontData    *key_data;      /* a structure of a searching information */
-int            mask;           /* a mask */
-FalFontDataList        **list_ret;     /* maked a address of a structure */
-#endif
-{
-
-       FalFontDataList *fls;   /* a pointer of a structure of "FalFontDataList()" */
-
-       /* clear an error's data */
-       fal_utyerror  = 0;
-       fal_utyderror = 0;
-       fal_utyerrno = 0 ;
-
-       /* change mode */
-       SET_EXECDEFAULT( mask, execDefined, execUndefined ) ;
-
-       /* interface check */
-       if ( list_ret == NULL ) {
-               fal_utyerror  = _FAL_PARM_ER;
-               fal_utyderror = _FAL_L_P_LST_DER;
-               fal_utyerrno = FAL_ERR_PARM ;
-               fal_utyerrno |= (FAL_FUNCNUM_GFLST<<8) ;
-               return FAL_ERROR ;
-       }
-
-       /* character check */
-       if ( chk_key_str( key_data, mask ) == FAL_ERROR ) {
-               fal_utyerrno |= (FAL_FUNCNUM_GFLST<<8) ;
-               return  FAL_ERROR;
-       }
-
-       /* error check */
-       if ( orgn.path == NULL ) {
-               if ( set_default_path() == FAL_ERROR ) {
-                       fal_utyerrno |= (FAL_FUNCNUM_GFLST<<8) ;
-                       return FAL_ERROR ;
-               }
-       }
-
-       /* make an structure of "FalFontDataList()" */
-       if ((fls = (FalFontDataList *)malloc( sizeof( FalFontDataList ))) == NULL){
-               fal_utyerror = _FAL_MALOC_ER;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               fal_utyerrno |= (FAL_FUNCNUM_GFLST<<8) ;
-               return FAL_ERROR ;
-       }
-
-       /* inital set for search */
-       fls->num  = 0;
-       fls->list = NULL;
-
-       /* make font infomation list */
-       if ( fal_make_fontlist( fls, key_data, mask ) == FAL_ERROR) {
-               switch( fal_utyerror ) {
-                       case _FAL_FLST_ER :
-                       case _FAL_DATA_OPEN_ER :
-                               fal_utyderror = 1;
-               }
-               FalFreeFontList( fls );
-               fal_utyerrno &= 0xff;
-               fal_utyerrno |= (FAL_FUNCNUM_GFLST<<8) ;
-               return  FAL_ERROR;
-       }
-       /* sort element of font infomation list */
-       if( fal_sort_fontlist( fls ) == FAL_ERROR ) {
-               FalFreeFontList( fls );
-               fal_utyerrno &= 0xff;
-               fal_utyerrno |= (FAL_FUNCNUM_GFLST<<8) ;
-               return FAL_ERROR ;
-       }
-
-       *list_ret = fls;
-       return  0;
-}
-
-
-
-/***********************************************************************/
-/* search a character "key" of a structure                             */
-/***********************************************************************/
-
-static int
-chk_key_str( key, mask )
-FalFontData     *key;          /* a structure of saerching information */
-int            mask;           /* a mask                               */
-{
-       int     flg = 0;
-
-       if( key == NULL ) {
-               return 0 ;
-       }
-
-       /* check a character of setting a mask */
-       /* xlfd name */
-       if ((mask & FAL_FONT_MASK_XLFDNAME) && (key->xlfdname == NULL)) {
-               flg++;
-       }
-       /* style */
-       if ((mask & FAL_FONT_MASK_STYLE_NAME) && (key->style.name == NULL)) {
-               flg++;
-       }
-       /* shape */
-       if ((mask & FAL_FONT_MASK_SHAPE_NAME) && (key->shape.name == NULL)) {
-               flg++;
-       }
-       CHK_KEY_STR_OPTION( mask, key, flg ) ;
-       /* error check */
-       if ( flg ) {
-               fal_utyerror  = _FAL_PARM_ER;
-               fal_utyderror = _FAL_L_P_KEY_DER;
-               fal_utyerrno = FAL_ERR_PARM ;
-               return FAL_ERROR ;
-       }
-       return 0 ;
-}
-
-
-/***************************************************************/
-/* read a font information and add a list or make a list       */
-/***************************************************************/
-
-
-static int
-fal_make_fontlist( fls, key, mask )
-FalFontDataList *fls;  /* a pointer of a structure of a font information list */
-FalFontData    *key;   /* a structure of searching information */
-int            mask;   /* a mask for a saerch */
-{
-       return  falReadFontInfoLists(MKFONTLIST,
-                               key, mask, fls,
-                               NULL, NULL,
-                               NULL, NULL) ;
-}
-
-
-/**************************************************/
-/* free a structure of "FalFontDataList()"        */
-/**************************************************/
-
-#if NeedFunctionPrototypes
-int
-FalFreeFontList(
-       FalFontDataList *list )
-#else
-int
-FalFreeFontList( list )
-FalFontDataList *list;
-#endif
-{
-       int     i;
-
-       /* parametter check */
-       if ( list == NULL ) {
-               fal_utyerror = _FAL_PARM_ER;
-               fal_utyerrno = FAL_ERR_PARM ;
-               fal_utyerrno |= (FAL_FUNCNUM_FRFLST<<8) ;
-               return  FAL_ERROR;
-       }
-       /* free a structure's array of "FalFontData()" */
-       if ( list->list != NULL ) {
-               for ( i = 0;  i < list->num; i++ ) {
-                       /* free a structure's character of "FalFontData()" */
-                       free( list->list[i].xlfdname );
-                       free( list->list[i].style.name );
-                       free( list->list[i].shape.name );
-                       FAL_FREE_FONTLIST_OPTION( list ) ;
-               }
-               /* free a structure's array of "FalFontData()" */
-               free( list->list );
-       }
-       list->num  = 0 ;
-       list->list = NULL ;
-
-       /* free a structure of " FalFontDataList()" */
-       free( list );
-       return  0;
-}
-
-
-/***********************************************************************/
-/* split string for "FalFontData()"                                    */
-/***********************************************************************/
-
-static int
-fal_split_data( buf, elm_num, elm)
-char   *buf;
-int    elm_num;
-char   *elm[]; 
-{
-       int         cnt;
-       int         strtop_flg;
-
-       /* check a comment */
-       if ((*buf == '#') || (*buf == '\0')) {
-               return  _FAL_TRY_NEXT;
-       }
-       /* check a pathname */
-       if ( *buf == '/' ) {
-               return  _FAL_TRY_NEXT;
-       }
-       /* divide a data */
-       for ( cnt = 0, strtop_flg = 1 ; *buf != '\0';  buf++ ){
-               if ( strtop_flg ) {
-                       elm[cnt] = buf;
-                       cnt++;
-                       strtop_flg = 0;
-               }
-               if ( *buf == ':' ) {
-                       *buf = '\0';
-                       strtop_flg++;
-               }
-       }
-       if ( cnt != elm_num ) {
-               set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-               fal_utyerror = _FAL_FLST_ER;
-               fal_utyerrno = FAL_ERR_FDATA_DSC ;
-               return  FAL_ERROR;
-       }
-       return  0;
-}
-
-/***********************************************************************/
-/* clear a structure of "FalFontData()"                                */
-/***********************************************************************/
-
-static int
-fal_clear_data(tmp)
-FalFontData     *tmp;
-{
-       /* search a character */
-       free(tmp->xlfdname);
-       free(tmp->style.name);
-       free(tmp->shape.name);
-       FAL_CLEAR_DATA_OPTION( tmp ) ;
-       memset(tmp, 0, sizeof(*tmp));
-       return 0  ;
-}
-
-static int
-fal_check_already_exist( data, lst )
-FalFontData     *data;
-FalFontDataList *lst;
-{
-       int             i;
-       int             mask ;
-
-       mask =  FAL_FONT_MASK_XLFDNAME | FAL_FONT_MASK_STYLE_NAME
-           | FAL_FONT_MASK_SIZE_H | FAL_FONT_MASK_CODE_SET ;
-
-       for ( i=0 ; i < lst->num ; i++ ){
-               switch ( fal_cmp_data( &(lst->list[i]), data, mask ) ) {
-               case 0:
-                       return(i);
-               default:
-                       continue;
-               }
-       }
-       return(-1);
-}
-
-
-
-static int
-fal_sort_fontlist( lst )
-FalFontDataList *lst;
-{
-       int             i,j;
-       FalFontDataList srt;
-       FalFontData             target;
-       int                     target_entry;
-
-       if( lst->num == 0 ){
-           return 0 ;
-       }
-
-       srt.num  = lst->num;
-
-       if (( srt.list = malloc(sizeof(FalFontData) * srt.num)) == NULL) {
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               return  FAL_ERROR;
-       }
-       memmove (srt.list, lst->list, sizeof(FalFontData) * srt.num);
-       /* start to sort */
-       for ( i=0 ; i < srt.num -1 ; i++ ) {
-
-               memmove( &target, &(srt.list[i]), sizeof(FalFontData));
-               target_entry = i;
-
-               for ( j=i+1 ; j < srt.num ; j++ ) {
-                       if ( new_target( &target, &(srt.list[j]) ) ) {
-                               memmove( &target, &(srt.list[j]), sizeof(FalFontData));
-                               target_entry = j;
-                       }
-               }
-               if (target_entry != i) {
-                       memmove( &target, &(srt.list[target_entry]), 
-                           sizeof(FalFontData)
-                           );
-                       memmove( &(srt.list[i+1]), &(srt.list[i]), 
-                           sizeof(FalFontData)*(target_entry -i)
-                           );
-                       memmove( &(srt.list[i]), &target, 
-                           sizeof(FalFontData)
-                           );
-               }
-       }
-       free(lst->list);
-       lst->list = srt.list;
-       return 0 ;
-}
-
-
-
-/***************************************/
-/* change a character for a number     */
-/***************************************/
-
-static int
-fal_atoi(str, val)
-char    *str;
-int     *val;
-{
-       char    *ptr;
-       char    *str_end;
-       int             tmp;
-
-       str_end = strchr( str, '\0' );
-
-       tmp = (int)strtol(str, &ptr, 10);
-
-       /* error check */
-       if ((ptr == str) || (ptr != str_end)) {
-               set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-               fal_utyerror = _FAL_FLST_ER;
-               fal_utyerrno = FAL_ERR_FDATA_DSC ;
-               return(FAL_ERROR);
-       }
-       *val = tmp;
-       return 0 ;
-}
-
-/*******************************/
-/* get a codeset               */
-/*******************************/
-
-static int
-fal_set_cs(str, cs)
-char    *str;
-int     *cs;
-{
-       if (!strcmp(str, "CS0")) {
-               *cs = FAL_FONT_CS0;
-       } else if (!strcmp(str, "CS1")) {
-               *cs = FAL_FONT_CS1;
-       } else if (!strcmp(str, "CS2")) {
-               *cs = FAL_FONT_CS2;
-       } else if (!strcmp(str, "CS3")) {
-               *cs = FAL_FONT_CS3;
-       } else {
-               set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-               fal_utyerror = _FAL_FLST_ER;
-               fal_utyerrno = FAL_ERR_FDATA_DSC ;
-               return(FAL_ERROR);
-       }
-       return(0);
-}
-
-
-/******************************************/
-/* get a equipment of an output permission*/
-/******************************************/
-
-
-static int
-fal_set_prm(str, prm)
-char    *str;
-int     *prm;
-{
-       int     tmp = 0;
-       for (     ; *str != '\0'  ; str++) {
-           if( *str == 'P' ) {
-               tmp |= FAL_FONT_PRINTER;
-           } else if( *str == 'D' ) {
-               tmp |= FAL_FONT_DISPLAY;
-           } else {
-               set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-               fal_utyerror = _FAL_FLST_ER;
-               fal_utyerrno = FAL_ERR_FDATA_DSC ;
-               return FAL_ERROR ;
-           }
-       }
-       *prm = tmp;
-       return 0 ;
-}
-
-static int fal_read_db( str, db )
-char    *str;
-FalFontDB       *db;
-{
-       int             i;
-
-       for(i=0 ; db[i].def != FAL_FONT_UNKNOWN ; i++) {
-               if (!strcmp(str, db[i].name)) {
-                       return(db[i].def);
-               }
-       }
-       return FAL_FONT_UNKNOWN ;
-}
-
-
-/***************************************/
-/* make a structure of "FalFontPath()" */
-/***************************************/
-
-int
-FalGetFontPath( dlist_ret )
-FalFontPath    **dlist_ret;
-{
-
-       /* clear an error data */
-       fal_utyerror  = 0;
-       fal_utyderror = 0;
-       fal_utyerrno = 0 ;
-
-       /* get current locale */
-       if( fal_init() )        return FAL_ERROR ;
-
-       /* parametter check */
-       if ( dlist_ret == NULL ) {
-               fal_utyerror = _FAL_PARM_ER;
-               fal_utyerrno = FAL_ERR_PARM ;
-               return  FAL_ERROR;
-       }
-       if ( orgn.path == NULL ) {
-               if ( set_default_path() == FAL_ERROR ) {
-                       return  FAL_ERROR;
-               }
-               if ( cpy_default_path( &copy ) == FAL_ERROR ){
-                       return  FAL_ERROR;
-               }
-       } else if ( copy.path == NULL ) {
-               if ( cpy_default_path(&copy) == FAL_ERROR ){
-                       return  FAL_ERROR;
-               }
-       } else {
-
-               if ( comp_default_path( &copy ) == FAL_ERROR ) {
-                       fal_clear_font_path( &copy );
-                       if ( cpy_default_path(&copy) == FAL_ERROR ){
-                               return  FAL_ERROR;
-                       }
-               }
-       }
-       *dlist_ret = &copy;
-       return  0;
-}
-
-static int
-set_default_path()
-{
-       return  set_font_pathlist(&orgn, 0) ;
-}
-
-static int
-cpy_default_path( p )
-FalFontPath     *p;
-{
-       int         i;
-       FalFontPath tmp;
-
-       if ((orgn.num == 0) || (orgn.path == NULL)) {
-               p->num  = 0;
-               p->path = NULL;
-               return  0;
-       }
-
-       if (
-               (tmp.path = (char **)malloc(sizeof(char *) * (orgn.num) )) 
-               == NULL
-       ){ 
-               fal_utyerror = _FAL_MALOC_ER;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               return  FAL_ERROR;
-       }
-       tmp.num = 0;
-       for ( i = 0 ; i< orgn.num ; i++ ) {
-       char    *tmp_str;
-       /* malloc & copy in strdup */
-               if ((tmp_str = (char *)strdup((orgn.path)[i])) == NULL) {
-                       fal_clear_font_path( &tmp );
-                       fal_utyerror = _FAL_MALOC_ER;
-                       fal_utyerrno = FAL_ERR_MALLOC ;
-                       return FAL_ERROR ;
-               }
-               tmp.path[i] = tmp_str;
-               tmp.num++;
-       }
-       p->num  = tmp.num;
-       p->path = tmp.path;
-       return  0;
-}
-
-static int
-comp_default_path(p)
-FalFontPath     *p;
-{
-       int         i;
-
-       if ( p->num != orgn.num ) {
-           set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-           fal_utyerrno = FAL_ERR_FPATH ;
-           return      FAL_ERROR;
-       }
-       for ( i = 0; i < p->num; i++ ) {
-           if( strcmp( p->path[i], orgn.path[i] ) ) {
-               set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-               fal_utyerrno = FAL_ERR_FPATH ;
-               return  FAL_ERROR;
-            }
-       }
-       return  0;
-}
-
-
-static int
-fal_clear_font_path( ls )
-FalFontPath     *ls;
-{
-       int             i;
-
-       if (ls->path != NULL) {
-               /* free a fontpath character */
-               for (i=0 ; i < ls->num ; i++) {
-                       if ((ls->path[i] != NULL) && (ls->path[i] == orgn.path[i])) {
-                               free(ls->path[i]);
-                       }
-               }
-               /* free a character pointer array */
-               free( ls->path );
-               ls->path = NULL;
-       }
-       ls->num = 0;
-
-       return  0;
-}
-
-
-/* access number */
-#define FAL_FONT_ELM_FILENAME   0
-#define FAL_FONT_ELM_SIZE_W    1
-#define FAL_FONT_ELM_SIZE_H    2
-#define FAL_FONT_ELM_LETTER_W   3
-#define FAL_FONT_ELM_LETTER_H   4
-#define FAL_FONT_ELM_LETTER_X   5
-#define FAL_FONT_ELM_LETTER_Y   6
-#define FAL_FONT_ELM_STYLE_NAME 7
-#define FAL_FONT_ELM_SHAPE_NAME 8
-
-#define FAL_FONT_ELM_CODE_SET   10
-#define FAL_FONT_ELM_PERMISSION 11
-#define FAL_FONT_ELM_XLFDNAME   12
-
-int
-set_struct( tmp_data, elm )
-FalFontData    *tmp_data;
-char   *elm[];
-{
-       char    *dup_p;
-
-       /* data information */
-
-       /* a width of a character size */
-       if ( fal_atoi( 
-                       elm[FAL_FONT_ELM_SIZE_W], &(tmp_data->size.w ) 
-                       ) == FAL_ERROR 
-       ) {
-               goto FalError02 ;
-       }
-       /* a height of a character size */
-       if ( fal_atoi(
-                        elm[FAL_FONT_ELM_SIZE_H], &(tmp_data->size.h )
-                        ) == FAL_ERROR
-       ) {
-               goto FalError02 ;
-       }
-       /* a width of a letter size */
-       if ( fal_atoi(
-                       elm[FAL_FONT_ELM_LETTER_W], &(tmp_data->letter.w )
-                       ) == FAL_ERROR 
-       ) {
-               goto FalError02 ;
-       }
-       /* a height of a letter size */
-       if ( fal_atoi( 
-                       elm[FAL_FONT_ELM_LETTER_H], &(tmp_data->letter.h )
-                       ) == FAL_ERROR
-       ) {
-               goto FalError02 ;
-       }
-       /* position x of a letter size */
-       if ( fal_atoi(
-                       elm[FAL_FONT_ELM_LETTER_X], &(tmp_data->letter.x )
-                       ) == FAL_ERROR
-       ) {
-               goto FalError02 ;
-       }
-       /* position y of a letter size */
-       if ( fal_atoi(
-                       elm[FAL_FONT_ELM_LETTER_Y], &(tmp_data->letter.y )
-                       ) == FAL_ERROR 
-       ) {
-               goto FalError02 ;
-       }
-       /* codeset */
-       if ( fal_set_cs(
-                       elm[FAL_FONT_ELM_CODE_SET], &(tmp_data->cd_set )
-                       ) == FAL_ERROR 
-       ) {
-               goto FalError02 ;
-       }
-       /* a equipment of an output permission */
-       if ( fal_set_prm(
-                       elm[FAL_FONT_ELM_PERMISSION], &(tmp_data->prm )
-                       ) == FAL_ERROR 
-       ) {
-               goto FalError02 ;
-       }
-
-       /* character information */
-
-       /* xlfd name */
-       if ( ( dup_p = (char *)strdup( elm[FAL_FONT_ELM_XLFDNAME] ) ) == NULL ) {
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               return  FAL_ERROR;
-       }
-       tmp_data->xlfdname = dup_p;
-
-       /* character style (character) */
-       if ( ( dup_p = (char *)strdup( elm[FAL_FONT_ELM_STYLE_NAME] ) ) == NULL) {
-               free( tmp_data->xlfdname );
-               fal_utyerror = _FAL_MALOC_ER;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               return  FAL_ERROR;
-       }
-       tmp_data->style.name = dup_p;
-
-       /* character style (numerical) */
-       tmp_data->style.def 
-               = fal_read_db( tmp_data->style.name, (FalFontDB *)&fal_db_style );
-
-       /* character shape (character) */
-       if ( ( dup_p = (char *)strdup( elm[FAL_FONT_ELM_SHAPE_NAME] ) ) == NULL ) {
-               free( tmp_data->style.name );
-               free( tmp_data->xlfdname );
-               fal_utyerror = _FAL_MALOC_ER;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               return  FAL_ERROR;
-       }
-       tmp_data->shape.name = dup_p;
-
-       /* character shape (numerical) */
-       tmp_data->shape.def 
-               = fal_read_db( tmp_data->shape.name, (FalFontDB *)&fal_db_shape );
-
-       SET_STRUCT_OPTION( dup_p, elm, tmp_data, fal_utyerror, fal_db_group ) ;
-       return  0;
-
-FalError02:
-       set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-       fal_utyerrno = FAL_ERR_FDATA_DSC ;
-       return  FAL_ERROR;
-}
-
-/* get a full path name */
-int     searchFontFileName( data, fullPathName )
-FalFontData     data;
-char    *fullPathName;
-{
-       int     rtn ;
-       rtn =   falReadFontInfoLists(SRCHFNAME,
-                               NULL, NULL, NULL,
-                               data, fullPathName,
-                               NULL, NULL) ;
-       if( fal_utyerrno != 0 ){
-           fal_utyerrno |= (FAL_FUNCNUM_SRCHFNM<<8) ;
-       }
-       return rtn ;
-}
-
-
-int     fal_eq_data( data, tmp_data )
-FalFontData     data;
-FalFontData     tmp_data;
-{
-       int     flg = 0;
-
-       /* xlfd name */
-       if ( strcmp( data.xlfdname, tmp_data.xlfdname ) != 0 ) {
-               flg++;
-       }
-
-       /* a width of a character size */
-       if ( ( flg == 0 ) && ( data.size.h != tmp_data.size.h ) ) {
-               flg++;
-       }
-
-       /* a height of a character size */
-       if ( ( flg == 0 ) && ( data.size.w != tmp_data.size.w ) ) {
-               flg++;
-       }
-       /* a height of a letter size */
-       if ( ( flg == 0 ) && ( data.letter.h != tmp_data.letter.h ) ) {
-               flg++;
-       }
-
-       /* a width of a letter size */
-       if ( ( flg == 0 ) && ( data.letter.w != tmp_data.letter.w ) ) {
-               flg++;
-       }
-
-       /* position x of a letter size */
-       if ( ( flg == 0 ) && ( data.letter.x != tmp_data.letter.x ) ) {
-               flg++;
-       }
-
-       /* position y of a letter size */
-       if ( ( flg == 0 ) && ( data.letter.y != tmp_data.letter.y ) ) {
-               flg++;
-       }
-
-       /* a definition data of a character style */
-       if ( ( flg == 0 ) && ( data.style.def != tmp_data.style.def ) ) {
-               flg++;
-       }
-
-       /* character style */
-       if ( (data.style.name != NULL) && (tmp_data.style.name != NULL) ) {
-           if ( ( flg == 0 ) && ( strcmp( data.style.name, tmp_data.style.name ) != 0 ) ) {
-               flg++;
-           }
-       }
-
-       /* a definition data of a character shape */
-       if ( ( flg == 0 ) && ( data.shape.def != tmp_data.shape.def ) ) {
-               flg++;
-       }
-
-       /* character shape */
-       if ( (data.shape.name != NULL) && (tmp_data.shape.name != NULL) ) {
-           if ( ( flg == 0 ) && ( strcmp( data.shape.name, tmp_data.shape.name ) != 0 ) ) {
-               flg++;
-           }
-       }
-
-       FAL_EQ_DATA_OPTION( flg, data, tmp_data ) ;
-
-       /* code set */
-       if ( ( flg == 0 ) && ( data.cd_set != tmp_data.cd_set ) ) {
-               flg++;
-       }
-
-       /* an equipment of an output permission */
-       if ( ( flg == 0 ) && ( data.prm != tmp_data.prm ) ) {
-               flg++;
-       }
-
-       if ( flg == 0 ) {
-               return  0;
-       } else if ( flg != 0 ) {
-               return  _FAL_TRY_NEXT;
-       } else {
-               set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-               fal_utyerrno = FAL_ERR_FDATA_DSC ;
-               return  FAL_ERROR;
-       }
-}
-
-
-static int
-CR_to_NULL(buf)
-char    *buf;
-{
-       for(  ; *buf != '\0'; buf++ ) {
-               if (*buf == '\n') {
-                       *buf = '\0';
-                       break;
-               }
-       }
-       return 0 ;
-}
-
-char *fal_get_base_name( str )
-char    *str;
-{
-       char    *str_slash;
-
-       str_slash = strrchr( str, '/');
-       if ( str_slash == NULL ) {
-               return( str );
-       }
-       return( ++str_slash );
-}
-
-
-static int
-fal_cmp_data( op1, key, mask )
-FalFontData     *op1;
-FalFontData     *key;
-int    mask ;
-{
-       if ( mask == 0 ) {
-               return(0);
-       }
-
-       if ( key == NULL ) {
-               return(0);
-       }
-
-       if ( 
-               ( mask & FAL_FONT_MASK_XLFDNAME ) 
-               && strcmp( op1->xlfdname, key->xlfdname ) 
-       ) {
-               return  _FAL_TRY_NEXT;
-       }
-       if ( 
-               ( mask & FAL_FONT_MASK_SIZE_W ) 
-               && (op1->size.w != key->size.w ) 
-       ) {
-               return  _FAL_TRY_NEXT;
-       }
-       if ( 
-               ( mask & FAL_FONT_MASK_SIZE_H ) 
-               && (op1->size.h != key->size.h )
-       ) {
-               return  _FAL_TRY_NEXT;
-       }
-       if ( 
-               ( mask & FAL_FONT_MASK_LETTER_W ) 
-               && ( op1->letter.w != key->letter.w )
-       ) {
-               return  _FAL_TRY_NEXT;
-       }
-       if ( 
-               ( mask & FAL_FONT_MASK_LETTER_H ) 
-               && ( op1->letter.h != key->letter.h ) 
-       ) {
-               return  _FAL_TRY_NEXT;
-       }
-       if ( 
-               ( mask & FAL_FONT_MASK_LETTER_X ) 
-               && ( op1->letter.x != key->letter.x )
-       ) {
-               return  _FAL_TRY_NEXT;
-       }
-       if ( 
-               ( mask & FAL_FONT_MASK_LETTER_Y ) 
-               && ( op1->letter.y != key->letter.y ) 
-       ) {
-               return  _FAL_TRY_NEXT;
-       }
-       if ( 
-               ( mask & FAL_FONT_MASK_STYLE_DEF ) 
-               && ( op1->style.def != key->style.def ) 
-       ) {
-               return  _FAL_TRY_NEXT;
-       }
-       if( (op1->style.name != NULL) && (key->style.name != NULL) ) {
-           if ( 
-               ( mask & FAL_FONT_MASK_STYLE_NAME ) 
-               && strcmp( op1->style.name, key->style.name ) 
-           ) {
-               return  _FAL_TRY_NEXT;
-           }
-       }
-       if ( 
-               ( mask & FAL_FONT_MASK_SHAPE_DEF ) 
-               && ( op1->shape.def != key->shape.def )
-       ) {
-               return  _FAL_TRY_NEXT;
-       }
-       if( (op1->shape.name != NULL) && (key->shape.name != NULL) ) {
-           if ( 
-               ( mask & FAL_FONT_MASK_SHAPE_NAME ) 
-               && strcmp( op1->shape.name, key->shape.name )
-           ) {
-               return  _FAL_TRY_NEXT;
-           }
-       }
-       FAL_CMP_DATA_OPTION( mask, op1, key ) ; 
-       if ( 
-               ( mask & FAL_FONT_MASK_CODE_SET ) 
-               && ( op1->cd_set != key->cd_set )
-       ) {
-               return  _FAL_TRY_NEXT;
-       }
-       if ( mask & FAL_FONT_MASK_PERMISSION ) {
-               int     cmp_prm;
-               cmp_prm = key->prm & (FAL_FONT_DISPLAY | FAL_FONT_PRINTER);
-               if ( ( op1->prm & cmp_prm ) != cmp_prm ) {
-                       return  _FAL_TRY_NEXT;
-               }
-       }
-       return  0;
-}
-
-
-/* sort flag                      */
-/* return data ¡§   sort    ... 1 */
-/*                  no sort ... 0 */
-
-static int
-new_target( target, choose )
-FalFontData    *target;
-FalFontData    *choose;
-{
-       FalFontData     diff;
-       DEF_STR_CHK ;
-
-       DEF_STR_SET ;
-
-       diff.style.def = choose->style.def - target->style.def;
-       if( (choose->style.name != NULL) && (target->style.name != NULL) ) {
-           str_chk.style =  strcmp( choose->style.name, target->style.name ) ;
-       }
-
-       NEW_TARGET_SET( diff, choose, target, str_chk ) ;
-
-       diff.shape.def = choose->shape.def - target->shape.def;
-       if( (choose->shape.name != NULL) && (target->shape.name != NULL) ) {
-           str_chk.shape =  strcmp( choose->shape.name, target->shape.name ) ;
-       }
-
-       diff.cd_set   = choose->cd_set   - target->cd_set;
-       diff.size.h   = choose->size.h   - target->size.h;
-       diff.size.w   = choose->size.w   - target->size.w;
-       diff.letter.h = choose->letter.h - target->letter.h;
-       diff.letter.w = choose->letter.w - target->letter.w;
-
-       /* style */
-       if ( target->style.def == FAL_FONT_UNKNOWN ) {
-               if ( choose->style.def > 0 ) { 
-                       return  1; 
-               }
-               /* style is FAL_FONT_UNKNOWN both "target" and "choose" */
-               if ( str_chk.style < 0 ) { 
-                       return  1; 
-               }
-               if ( str_chk.style > 0) { 
-                       return  0; 
-               }
-       } else if ( choose->style.def == FAL_FONT_UNKNOWN ) {
-               return  0;
-       }
-       /* target->style.def and choose->style.def is not FAL_FONT_UNKNOWN */
-       if (diff.style.def < 0) { 
-               return  1; 
-       }
-       if ( diff.style.def > 0) { 
-               return  0; 
-       }
-
-       NEW_TARGET_CHK( diff, choose, target, str_chk ) ;
-
-       /* character shape */
-       if ( target->shape.def == FAL_FONT_UNKNOWN ) {  
-               if ( choose->shape.def > 0 ) { 
-                       return  1; 
-               }
-               if ( str_chk.shape < 0 ) { 
-                       return  1; 
-               }
-               if ( str_chk.shape > 0 ) { 
-                       return  0; 
-               }
-       } else if (choose->shape.def == FAL_FONT_UNKNOWN ) {
-               return  0;
-       }
-       if ( diff.shape.def < 0 ) { 
-               return  1; 
-       }
-       if ( diff.shape.def > 0 ) { 
-               return  0; 
-       }
-
-       /* codeset */
-       if ( diff.cd_set  < 0 ) { 
-               return  1; 
-       }
-       if (diff.cd_set > 0) { 
-               return  0; 
-       }
-
-       /* character size height */
-       if ( diff.size.h < 0 ) { 
-               return  1; 
-       }
-       if ( diff.size.h > 0 ) { 
-               return  0; 
-       }
-
-       /* letter size height */
-       if ( diff.letter.h < 0 ) { 
-               return  1; 
-       }
-       if ( diff.letter.h > 0 ) { 
-               return  0; 
-       }
-
-       /* character size wide */
-       if ( diff.size.w < 0 ) { 
-               return  1; 
-       }
-       if ( diff.size.w > 0 ) { 
-               return  0; 
-       }
-
-       /* letter size wide */
-       if ( diff.letter.w < 0 ) { 
-               return  1; 
-       }
-       if ( diff.letter.w > 0 ) { 
-               return  0; 
-       }
-
-       return  0;
-}
-
-#if NeedFunctionPrototypes
-int    FalFontOfFontID(
-       FalFontID       fid,
-       FalFontData     *fontdata )
-#else
-int    FalFontOfFontID( fid, fontdata )
-FalFontID      fid;
-FalFontData    *fontdata;
-#endif
-{
-       int     rtn ;
-       rtn =   falReadFontInfoLists(FONTOFID,
-                               NULL, NULL, NULL,
-                               NULL, NULL,
-                               fid, fontdata) ;
-       if( fal_utyerrno != 0 ){
-           fal_utyerrno |= (FAL_FUNCNUM_FID<<8) ;
-       }
-       return rtn ;
-}
-
-#if NeedFunctionPrototypes
-FalFontID
-FalOpenSysFont(
-       FalFontData     *open_font_data,
-       int             font_data_mask,
-       FalFontDataList **missing_font_list_return )
-#else
-FalFontID
-FalOpenSysFont( open_font_data, font_data_mask, missing_font_list_return )
-FalFontData    *open_font_data;
-int            font_data_mask;
-FalFontDataList        **missing_font_list_return;
-#endif
-{
-       int             retFL;  /* return a data of FontList */
-       FalFontID       retOF;  /* return a data of OpenFont */
-       char    fname[FAL_LINE_MAX];
-
-       /* follow "font_data_mask" and call "FalGetFontList()" */
-       retFL = FalGetFontList( 
-                       open_font_data, font_data_mask, missing_font_list_return 
-               );
-       /* case of an abnormal end */
-       if ( retFL != 0 ) {
-               *missing_font_list_return = NULL;
-               return  0;
-       }
-
-       if ( (*missing_font_list_return)->num > 1 ) {
-               return  0;
-       } else if ( (*missing_font_list_return)->num == 1 ) {
-       /* investigator an font file name */
-               int     slct_cdset, prm, islock, dspcode ;
-               if ( 
-                       searchFontFileName( 
-                               (*missing_font_list_return)->list[0], fname 
-                       ) == FAL_ERROR 
-               ){
-                       FalFreeFontList( *missing_font_list_return  );
-                       fal_utyerrno &= 0xff ;
-                       fal_utyerrno |= (FAL_FUNCNUM_SRCHFNM<<8) ;
-                       *missing_font_list_return = NULL;
-                       return  0;
-               }
-               /* open a font by "__FalOpenFont()" */
-               slct_cdset = (*missing_font_list_return)->list[0].cd_set ;
-               dspcode  = ( font_data_mask & FAL_FONT_MASK_GLYPH_INDEX )?
-                       FAL_FONT_GLYPH_INDEX : slct_cdset ;
-               prm = ((*missing_font_list_return)->list[0].prm ) ?
-                       (*missing_font_list_return)->list[0].prm :
-                       FAL_FONT_DISPLAY | FAL_FONT_PRINTER ;
-               islock = (( font_data_mask & FAL_FONT_MASK_UPDATE )? 1 : 0 );
-               retOF = __FalOpenFont( fname, prm, dspcode, islock );
-
-               if ( retOF == (FalFontID)FAL_ERROR ) {
-               /* abnomal end */
-                       FalFreeFontList( *missing_font_list_return );
-                       fal_utyerrno &= 0xff ;
-                       fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-                       *missing_font_list_return = NULL;
-                       return  0;
-               } else {
-               /* normal end ( return  retOF ) */
-                       *missing_font_list_return = NULL;
-                       FalFreeFontList( *missing_font_list_return );
-                       if( fal_add_fidinf( retOF,
-                               dspcode, slct_cdset, islock ) == FAL_ERROR ){
-                               fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-                               return 0 ;
-                       }
-                       return  retOF;
-               }
-       } else if ( (*missing_font_list_return)->num == 0 ) {
-       /* 
-        * set NULL in "missing_font_list_return"
-        */
-               FalFreeFontList( *missing_font_list_return );
-               *missing_font_list_return = NULL;
-               return  0;
-       } else {
-       /* case abnormal */
-               *missing_font_list_return = NULL;
-               fal_utyerrno = FAL_ERR_FATAL ;
-               fal_utyerrno |= (FAL_FUNCNUM_OPNFNT<<8) ;
-               return  0;
-       }
-}
-
-
-/********************************************************
-*      function to access fonts.list 
-********************************************************/
-static
-FILE   *open_fonts_list()
-{
-
-       FILE    *fp;
-       char    *locale                 = NULL ;
-       char    *fal_search_path        = NULL ;
-       char    flist_d[FAL_LINE_MAX] ;
-       char    flist_c[FAL_LINE_MAX] ;
-       char    flist_l[FAL_LINE_MAX] ;
-
-       GETLISTFILEPATH( locale, fal_search_path, flist_d, flist_c, flist_l, FONTS_LIST_FILE ) ;
-
-       if ( ( fp = fopen( flist_l, "r" ) ) == NULL ) {
-           if( (fp = fopen( flist_c, "r" )) == NULL ) { 
-               if( (fp = fopen( flist_d, "r" )) == NULL ) { 
-                   set_errfile_str( fal_err_file, flist_d ) ;
-                   set_errfile_str( fal_err_file_buf, flist_d ) ;
-                   fal_utyerror = _FAL_DATA_OPEN_ER;
-                   fal_utyderror = errno;
-                   fal_utyerrno = FAL_ERR_FDATA_OPN ;
-               }else{
-                   /* Save full path of fonts.list. */
-                   set_errfile_str( fal_err_file_buf, flist_d ) ;
-                   if( IsDefaultPath == TRUE ) IsDefaultPath = FALSE ;
-               }
-           }else{
-               /* Save full path of fonts.list. */
-               set_errfile_str( fal_err_file_buf, flist_c ) ;
-               if( IsDefaultPath == TRUE )     IsDefaultPath = FALSE ;
-           }
-       }else{
-           /* Save full path of fonts.list. */
-           set_errfile_str( fal_err_file_buf, flist_l ) ;
-           if( IsDefaultPath == TRUE ) IsDefaultPath = FALSE ;
-       }
-
-       return( fp ) ;
-}
-
-
-
-/*
- *     functions to read "fonts.dir" files
- */
-
-/***************************************************************/
-/* read a font information and add a list or make a list       */
-/***************************************************************/
-
-
-static int
-set_font_pathlist(pathlist, nodef)
-FalFontPath    *pathlist ;
-int            nodef ;
-{
-       FILE    *fp;
-       char    buf[FAL_LINE_MAX];
-       char    *font_path = NULL ;
-       char    **tmp_list ;
-       int     num;
-
-       errno = 0;
-       /* open a font directory information file */
-       if ((fp = open_fonts_list()) == NULL) {
-           /* Make default path list */
-           if( errno == ENOENT || errno == EACCES || errno == EISDIR ){
-               if ( make_default_path(pathlist) ) {
-                   return FAL_ERROR ;
-               } 
-               return 0 ;
-           }
-           return FAL_ERROR ;
-       } 
-       memset( buf, '\0', sizeof(buf) ) ;
-
-       while ( fgets( buf, FAL_LINE_MAX, fp ) != (char *)NULL ){
-               struct  stat    statbuf ;
-               char    *ep ;
-
-               CR_to_NULL(buf);
-
-               if( buf[0] == '#' ){            /* comments */
-                   continue ;
-               }else if( buf[0] == '/' ){      /* font path */
-
-                   /* add font_path to pathlist */
-                   if( font_path ){
-                       num = pathlist->num;
-                       if (pathlist->path == NULL) {
-                           tmp_list = (char **)malloc(sizeof(char *)*(num +1));
-                       } else {
-                           tmp_list = (char **)realloc(pathlist->path, sizeof(char *)*(num+1));
-                       }
-                       if (tmp_list == NULL) {
-                           fclose( fp );
-                           free( font_path );
-                           fal_clear_font_path( pathlist );
-                           fal_utyerror = _FAL_MALOC_ER;
-                           fal_utyerrno = FAL_ERR_MALLOC ;
-                           return FAL_ERROR ;
-                       }
-                       pathlist->path = tmp_list;
-                       pathlist->path[num] = font_path;
-                       pathlist->num++;
-                   }
-
-                   /* get font_path */
-                   if ((font_path = (char *)strdup(buf)) == NULL) {
-                       fclose( fp );
-                       fal_clear_font_path( pathlist );
-                       fal_utyerror = _FAL_MALOC_ER;
-                       fal_utyerrno = FAL_ERR_MALLOC ;
-                       return FAL_ERROR ;
-                   }
-                   ep = font_path + strlen( font_path ) - 1 ;
-                   *ep = '/';                  /* ':' -> '/' */
-                   if( *(ep-1) == '/' )        *ep = '\0';
-
-                   if( stat( font_path, &statbuf ) ) {
-                       free( font_path ) ;
-                       font_path = NULL ;
-                       continue;
-                   }
-                   if( !(statbuf.st_mode & S_IFDIR) ) {
-                       free( font_path ) ;
-                       font_path = NULL ;
-                       continue;
-                   }
-
-               }else{  /* font file */
-                   if( nodef ){
-                       if( font_path ){
-                           free( font_path ) ;
-                           font_path = NULL ;
-                       }
-                   }
-                   continue ;
-               }
-
-       }
-       /* add font_path to pathlist */
-       if( font_path ){
-           num = pathlist->num;
-           if (pathlist->path == NULL) {
-                   tmp_list = (char **)malloc(sizeof(char *)*(num +1));
-           } else {
-                   tmp_list = (char **)realloc(pathlist->path, sizeof(char *)*(num+1));
-           }
-           if (tmp_list == NULL) {
-               fclose( fp );
-               free( font_path );
-               fal_clear_font_path( pathlist );
-               fal_utyerror = _FAL_MALOC_ER;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               return FAL_ERROR ;
-           }
-           pathlist->path = tmp_list;
-           pathlist->path[num] = font_path;
-           pathlist->num++;
-       }
-
-       if ( feof(fp) != 0 ){
-           fclose(fp);
-           return 0 ;
-       }
-       fclose(fp);
-       fal_clear_font_path( pathlist );
-       set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-       fal_utyerror = _FAL_READ_PATH_ER;
-       fal_utyerrno = FAL_ERR_FPATH ;
-       return  FAL_ERROR;
-}
-
-
-
-static int
-make_default_path(pathlist)
-FalFontPath    *pathlist ;
-{
-       struct  stat    statbuf ;
-       char    pbuf[FAL_LINE_MAX], *dir, *p ;
-       char    *path, **plist ;
-       char    *sp, *ep ;
-       int     len, num;
-
-       memset( pbuf, '\0', sizeof(pbuf) ) ;
-
-       p = pbuf ;
-       if( (dir = getenv( "DTUDCFONTPATH" )) != NULL ) {
-               len = strlen( dir ) ;
-               strcpy( p, dir ) ;
-               p[len++] = ':' ;
-               p += len ;
-       }
-       strcpy( p, DTUDCFONTPATH ) ;
-       strcat( p, ":" ) ;
-
-       sp = pbuf ;
-       while ( (ep = strchr( sp, ':' )) != (char *)NULL ){
-
-           /* get path */
-           *ep = '\0' ;
-           if ((path = (char *)malloc(sizeof(char) * (strlen(sp)+2))) == NULL) {
-               fal_clear_font_path( pathlist );
-               fal_utyerror = _FAL_MALOC_ER;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               return FAL_ERROR ;
-           }
-           strcpy( path, sp ) ;
-           len = strlen( sp ) ;
-           path[len++] = '/' ;
-           path[len] = '\0' ;
-           if( path[len-2] == '/' )    path[len-1] = '\0';
-
-           if( stat(path, &statbuf) ) {
-               free( path ) ;
-               sp = ep + 1 ;
-               continue;
-           }
-           if( !(statbuf.st_mode & S_IFDIR) ) {
-               free( path ) ;
-               sp = ep + 1 ;
-               continue;
-           }
-
-           /* add path to pathlist */
-           num = pathlist->num;
-           if (pathlist->path == NULL) {
-               plist = (char **)malloc(sizeof(char *)*(num +1));
-           } else {
-               plist = (char **)realloc(pathlist->path, sizeof(char *)*(num+1));
-           }
-           if (plist == NULL) {
-               fal_clear_font_path( pathlist );
-               fal_utyerror = _FAL_MALOC_ER;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               free(path);
-               return FAL_ERROR ;
-           }
-           pathlist->path = plist;
-           pathlist->path[num] = path;
-           pathlist->num++;
-           sp = ep + 1 ;
-       }
-       if( execDefined == TRUE )       execDefined = FALSE ;
-       if( IsDefaultPath == FALSE )    IsDefaultPath = TRUE ;
-       fal_utyerror = 0 ;
-       fal_utyderror = 0 ;
-       fal_utyerrno = 0 ;
-       return  0 ;
-}
-
-
-
-
-static int
-falReadFontInfoLists(func, lstkey, mask, fls, fnkey, fullpath, fid, fdata)
-int            func ;
-                           /* parameters for FalGetFontList    */
-FalFontData    *lstkey;
-int            mask;
-FalFontDataList        *fls;
-                           /* parameters for searchFontFileName        */
-FalFontData    fnkey;
-char           *fullpath;
-                           /* parameters for FalFontOfFontID   */
-FalFontID      fid ;
-FalFontData    *fdata; 
-{
-    FILE       *fp;
-    char       pname[ FAL_LINE_MAX ] ;
-    Oak_FontInf *finf;
-
-    FalFontData        tmp_data;
-    FontIDInfo fontid_inf;
-    char       *elm[FAL_DATA_ELM * 3];
-    char       buf[FAL_LINE_MAX * 3];
-
-    struct     stat    statbuf ;
-    char       *keyfname, *fontFileName, *fonts_list_file ;
-    int        i, j ;
-    int                fontnum ;
-    int                codeset_num, *codeset_list ;
-
-    keyfname = fontFileName = fonts_list_file = NULL ;
-    codeset_num = 0 ;
-    codeset_list = NULL ;
-    if( func & FONTOFID ){
-       finf = (Oak_FontInf *)fid ;
-       keyfname = finf->fname ;
-    }
-
-    /* get current locale */
-    if( fal_init() )   return FAL_ERROR ;
-
-    /* get font path list */
-    if( wpath.path==NULL ) {
-       if( set_font_pathlist( &wpath, 1 ) ) {
-           return FAL_ERROR ;
-       }
-    }
-    /*
-     * If execDefined is true, this function read detail informations
-     * of the fonts descripted in fonts.list.
-     */
-    if( execDefined == TRUE && IsDefaultPath == FALSE ) {
-       /* open an information file */
-       if ((fp = open_fonts_list()) == NULL) {
-           return FAL_ERROR ;
-       }
-       memset( pname, 0, sizeof( pname ) );
-
-       while ( fgets( buf, FAL_LINE_MAX, fp ) != ( char * ) NULL ) {
-           int     eq;
-
-           /* clear an area */
-           memset( elm, 0, sizeof( elm ) );
-           memset( &tmp_data, 0, sizeof( tmp_data ) );
-           CR_to_NULL( buf );
-
-           /*
-            * get font information of a font
-            */
-           switch( fal_get_def_fontdata(func, pname, buf, elm, &tmp_data, keyfname ) ) {
-               case    _FAL_TRY_NEXT:
-                   if( buf[0] == '/' ) {
-                       buf[strlen( buf ) -1] = '/' ;
-                       strcpy( pname, buf ) ;
-                   }
-                   continue;
-               case    0:
-                   break;
-               case    FAL_ERROR:
-               default:
-                   goto FalError ;
-           }
-
-           switch( func ) {
-           case MKFONTLIST :           /* FalGetFontList       */
-               switch( falgetfontlist(&tmp_data, lstkey, mask, fls, 1) ){
-               case _FAL_TRY_NEXT :
-                   continue ;
-               case 0:
-                   break;
-               case FAL_ERROR:
-               default:
-                   goto FalError ;
-               }
-               break ;
-           case SRCHFNAME :            /* searchFontFileName   */
-               eq = fal_eq_data( fnkey, tmp_data ) ;
-               switch ( eq ) {
-                   case 0 :
-                       sprintf( fullpath, "%s%s", pname, elm[ FAL_FONT_ELM_FILENAME ] );
-                       fal_clear_data( &tmp_data ) ;
-                       fclose(fp) ;
-                       return 0 ;
-                   case _FAL_TRY_NEXT :
-                       fal_clear_data( &tmp_data ) ;
-                       break ;
-                   default :   /* FAL_ERROR */
-                       goto FalError ;
-               }
-               break ;
-           case FONTOFID :             /* FalFontOfFontID      */
-               memmove( fdata, &tmp_data, sizeof(FalFontData) ) ;
-               fclose(fp) ;
-               return 0 ;
-           default :
-               fal_utyerrno = FAL_ERR_PARM ;
-               goto FalError ;
-           }
-
-       }       /* end of while loop */
-       /* EOF */
-       if ( feof( fp ) != 0 ) {
-           fclose( fp );
-       }else{
-           set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-           fal_utyerror = _FAL_DATA_READ_ER;
-           fal_utyerrno = FAL_ERR_FDATA_RD ;
-           fclose( fp );
-           return FAL_ERROR ;
-       }
-
-       if( (func & SRCHFNAME) && (execUndefined == FALSE) ){
-           fal_utyerrno = FAL_ERR_NOFONT ;
-           return  FAL_ERROR  ;
-       }
-
-    }  /* execDefined */
-
-    /*
-     * If execUnefined is true, this function read list of font path,
-     * and get the name of font file from fonts.dir.
-     */
-    if( execUndefined == TRUE ) {
-
-       /* 
-       * search font path
-       */
-       for( i=0; i<wpath.num; i++ ) {
-           FalFontData *p_bak ;
-
-           fonts_list_file = (char *)malloc( sizeof(char) * ( strlen(wpath.path[i]) + strlen(FONTSDIR) + 1 ) ) ;
-           if( fonts_list_file == (char *)NULL ) {
-               fal_utyerror = _FAL_MALOC_ER;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               return FAL_ERROR ;
-           }
-           sprintf( fonts_list_file, "%s%s", wpath.path[i], FONTSDIR ) ;
-
-           if( stat( fonts_list_file, &statbuf ) ) {
-               FreeString( fonts_list_file ) ;
-               continue ;
-           }
-           if( !(statbuf.st_mode & S_IFREG) ) {
-               FreeString( fonts_list_file ) ;
-               continue ;
-           }
-           errno = 0 ;
-           /* open "fonts.dir" */
-           if ((fp = fopen( fonts_list_file, "r" )) == NULL) {
-               if( errno == EACCES ) {
-                   FreeString( fonts_list_file ) ;
-                   continue ;
-               }else{
-                   set_errfile_str( fal_err_file, fonts_list_file ) ;
-                   FreeString( fonts_list_file ) ;
-                   fal_utyerror = _FAL_OPEN_ER;
-                   fal_utyderror = errno ;
-                   fal_utyerrno = FAL_ERR_FNTDIR_OPN ;
-                   return FAL_ERROR ;
-               }
-           } 
-           /* Save full path of fonts.dir */
-           set_errfile_str( fal_err_file_buf, fonts_list_file ) ;
-           FreeString( fonts_list_file ) ;
-
-           /* Get number of fonts in current path */
-           if( fgets( buf, FAL_LINE_MAX, fp ) == (char *)NULL ) {
-               set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-               fal_utyerror = _FAL_DATA_READ_ER;
-               fal_utyerrno = FAL_ERR_FNTDIR_RD ;
-               fclose(fp);
-               return  FAL_ERROR;
-           }
-           fontnum = atoi( buf );
-
-           /* Get list of font informations */
-           if( func & MKFONTLIST){
-               if ( fls->list == NULL ) {
-                   p_bak  = (FalFontData *)malloc(sizeof(FalFontData) * (fls->num + fontnum));
-               } else {
-                   p_bak  = (FalFontData *)realloc(fls->list, sizeof(FalFontData)*(fls->num + fontnum));
-               }
-               if ( p_bak == NULL ) {
-                   fal_utyerror = _FAL_MALOC_ER;
-                   fal_utyerrno = FAL_ERR_MALLOC ;
-                   return  FAL_ERROR  ;
-               }
-               fls->list = p_bak ;
-           }
-
-           memset( buf, 0, sizeof(buf));
-
-           while( fgets( buf, FAL_LINE_MAX, fp ) != (char *)NULL ) {
-               int     tmp_num, eq ;
-               char    *ep, *xlfd ;
-
-               /* set FalFontData */
-               CR_to_NULL(buf);        /* '\n' -> '\0' */
-               memset( &tmp_data, 0, sizeof(FalFontData)); 
-
-               /* parse string of font file */
-               if( (ep = strchr( buf, ' ' )) == (char *)NULL ) continue ;
-               else    *ep = 0 ;
-               /* refuse font file (not gpf) */
-               if(
-                   ( strcmp( FILE_SUFFIX(buf), PCFSUFFIX ) != 0 ) &&
-                   ( strcmp( FILE_SUFFIX(buf), SNFSUFFIX ) != 0 ) &&
-                   ( ISOPTFONT(buf) != 0 )
-               ){
-                   continue ;
-               }
-
-               /* get string of font file */
-               if( (func & SRCHFNAME) || (func & FONTOFID) ){
-                   fontFileName = (char *)malloc( sizeof(char) * ( strlen(wpath.path[i]) + strlen(buf) + 1 ) ) ;
-                   if( fontFileName == (char *)NULL ) {
-                       fal_utyerror = _FAL_MALOC_ER;
-                       fal_utyerrno = FAL_ERR_MALLOC ;
-                       return FAL_ERROR ;
-                   }
-                   sprintf( fontFileName, "%s%s", wpath.path[i], buf ) ;
-               }
-
-               /* read font file and get properties */
-               xlfd = ++ep ;
-               switch( fal_get_undef_fontdata(func, fontFileName, xlfd, &tmp_data, keyfname, &codeset_num, &codeset_list) )
-               {
-                   case _FAL_TRY_NEXT :
-                       if( (func & SRCHFNAME) || (func & FONTOFID) )   FreeString( fontFileName ) ;
-                       fal_clear_data( &tmp_data );
-                       memset( buf, 0, sizeof(buf));
-                       continue ;
-                   case 0:
-                       if( (func & FONTOFID) ) FreeString( fontFileName ) ;
-                       break;
-                   case FAL_ERROR:
-                   default:
-                       if( (func & SRCHFNAME) || (func & FONTOFID) )   FreeString( fontFileName ) ;
-                       goto FalError ;
-               }
-
-               if( !(func & FONTOFID) && (codeset_num == 0) ){
-                   if( (func & SRCHFNAME) )    FreeString( fontFileName ) ;
-                   fal_clear_data( &tmp_data );
-                   memset( buf, 0, sizeof(buf));
-                   continue ;
-               }
-
-               switch( func ) {
-               case MKFONTLIST :               /* FalGetFontList       */
-                   tmp_num = fls->num ;
-               case SRCHFNAME :                /* searchFontFileName   */
-                   /* set font data */
-                   for( j=0; j<codeset_num; j++ ) {
-                       tmp_data.cd_set = FALGETFALCODESET( codeset_list[j] ) ;
-
-                       if( func & MKFONTLIST ){        /* FalGetFontList */
-                           /* Ignore fonts already exists. */
-                           if ( fal_check_already_exist(&tmp_data, fls) >= 0 ) {
-                               continue;
-                           }
-
-                           switch( falgetfontlist(&tmp_data, lstkey, mask, fls, 1) ){
-                           case _FAL_TRY_NEXT :
-                               continue ;
-                           case 0:
-                               break;
-                           case FAL_ERROR:
-                           default:
-                               goto FalError ;
-                           }
-                       }
-                       if( func & SRCHFNAME ){         /* searchFontFileName */
-                           eq = fal_eq_data( fnkey, tmp_data ) ;
-                           switch ( eq ) {
-                               case 0 :
-                                   strcpy( fullpath, fontFileName );
-                                   fal_clear_data( &tmp_data ) ;
-                                   FreeString( fontFileName ) ;
-                                   tmp_codeset = tmp_data.cd_set ;
-                                   fclose(fp) ;
-                                   /* clear code set informations */
-                                   clear_charset_info() ;
-                                   return 0  ;
-                               case _FAL_TRY_NEXT :
-                                   break ;
-                               default :       /* FAL_ERROR */
-                                   FreeString( fontFileName ) ;
-                                   goto FalError ;
-                           }
-                       }
-                   }   /* for loop */
-                   if( func & MKFONTLIST ){    /* FalGetFontList */
-                       if( fls->num == tmp_num )       fal_clear_data( &tmp_data ) ;
-                   }
-                   if( func & SRCHFNAME ){     /* searchFontFileName */
-                       fal_clear_data( &tmp_data ) ;
-                       FreeString( fontFileName ) ;    /* _FAL_TRY_NEXT */
-                   }
-                   break ;
-
-               case FONTOFID :         /* FalFontOfFontID      */
-                   memmove( fdata, &tmp_data, sizeof(FalFontData) ) ;
-                   if( fal_read_fidinf( fid, &fontid_inf ) != FAL_ERROR )
-                       fdata->cd_set = fontid_inf.cd_set ;
-                   else {
-                       fdata->cd_set = 0 ;
-                       goto FalError ;
-                   }
-                   fclose(fp) ;
-                   return 0  ;
-
-               default :
-                   goto FalError ;
-               }
-
-               memset(buf, 0, sizeof(buf));
-           }   /* while loop */
-
-           if ( feof(fp) != 0 ) {
-               fclose(fp);
-           }else{
-               set_errfile_str( fal_err_file, fal_err_file_buf ) ;
-               fal_utyerror = _FAL_DATA_READ_ER;
-               fal_utyerrno = FAL_ERR_FNTDIR_RD ;
-               fclose(fp);
-               return  FAL_ERROR;
-           }
-
-       }       /* for loop */
-
-       /* clear code set informations */
-       clear_charset_info() ;
-
-       if( (func & SRCHFNAME) || (func & FONTOFID) ){
-           fal_utyerrno = FAL_ERR_NOFONT ;
-           return  FAL_ERROR  ;
-       }
-
-    }  /* execUndefined */
-
-    return 0  ;
-
-FalError:
-
-    clear_charset_info() ;
-    fal_clear_data( &tmp_data ) ;
-    fclose(fp) ;
-    return FAL_ERROR ;
-
-}
-
-
-/* clear code set informations */
-static void
-clear_charset_info()
-{
-       if( charset_str_buf )   free( charset_str_buf ) ;
-       charset_str_buf = NULL ;
-       if( codeset_list_sav )  free( codeset_list_sav ) ;
-       codeset_list_sav = NULL ;
-       codeset_list_num = 0 ;
-}
-
-
-static int
-fal_get_def_fontdata(func, pname, buf, elm, tmp_data, key_fname)
-int            func ;
-char           *pname ;        /* font path */
-char           *buf ;          /* buffer for fgets() */
-char           **elm ;
-FalFontData    *tmp_data ;
-char           *key_fname ;
-{
-       int     rtn ;
-       char    tmp_fname[FAL_LINE_MAX] ;
-
-       if( (rtn = fal_split_data( buf, FAL_DATA_ELM, elm )) ) {
-           return  rtn ;
-       }
-
-       if( func & FONTOFID ){
-           sprintf( tmp_fname, "%s%s", pname, elm[ FAL_FONT_ELM_FILENAME ] );
-           if( strcmp( tmp_fname, key_fname ) )        return _FAL_TRY_NEXT ;
-       }
-
-       /* set informations to structrue */
-       if ( set_struct( tmp_data, elm ) == FAL_ERROR ) {
-           return  FAL_ERROR;
-       }
-       return 0 ;
-}
-
-
-
-static int
-falgetfontlist(tmp_data, key, mask, fls, fontnum)
-FalFontData    *tmp_data ;
-FalFontData    *key ;
-int            mask ;
-FalFontDataList        *fls ;
-int            fontnum ;
-{
-    FalFontData        *p_bak ;
-
-    if( fontnum == 0 ){
-       return _FAL_TRY_NEXT ;
-    }
-
-    /* compare with key data */
-    if ( fal_cmp_data(tmp_data, key, mask) == _FAL_TRY_NEXT ) {
-       return _FAL_TRY_NEXT ;
-    }
-
-    if ( fls->list == NULL ) {
-       p_bak  = malloc(sizeof(FalFontData) * (fls->num + fontnum));
-    } else {
-       p_bak  = realloc(fls->list, sizeof(FalFontData)*(fls->num + fontnum));
-    }
-    if ( p_bak == NULL ) {
-       fal_utyerror = _FAL_MALOC_ER;
-       fal_utyerrno = FAL_ERR_MALLOC ;
-       return  FAL_ERROR  ;
-    }
-    fls->list = p_bak;
-    memmove(&(fls->list[fls->num]), tmp_data, sizeof(FalFontData));
-    fls->num++;        /* update number of fonts */
-
-    return 0 ;
-}
-
-
-
-static int
-fal_get_undef_fontdata(func, full_path, xlfd, tmp_data, key_fname, codeset_num, codeset_list)
-int            func ;
-char           *full_path ;
-char           *xlfd ;
-FalFontData    *tmp_data ;
-char           *key_fname ;
-int            *codeset_num ;
-int            **codeset_list ;
-{
-       int     rtn, pix ;
-       char    *char_set ;
-       char    xlfdname[ FAL_LINE_MAX ], *family, *pixsize ;
-       char    *cbuf, *ep ;
-
-       /* FalFontOfFontID() */
-       if( func & FONTOFID ){
-           if( strcmp( full_path, key_fname ) )  return _FAL_TRY_NEXT ;
-       }
-
-       /*
-        * parse XLFD and get font informations
-        */
-       cbuf = ep = family = pixsize = NULL ;
-       /* XLFD */
-       strcpy( xlfdname, xlfd ) ;
-       /* pixel size */
-       GETXLFDELMSTR( pixsize, xlfd, XLFD_ELM_PIXEL_SIZE ) ;
-       ep = (char *)strchr( pixsize, '\0' ) ;
-       pix = (int)strtol( pixsize, &cbuf, 10 ) ;
-       if( cbuf == pixsize || cbuf != ep ){
-           return _FAL_TRY_NEXT ;      
-       }
-       /* family name */
-       GETXLFDELMSTR( family, xlfd, XLFD_ELM_FAMILY_NAME ) ;
-
-       /* set font data */
-       if( (tmp_data->style.name = (char *)strdup( family )) == NULL ) {
-           fal_utyerror = _FAL_MALOC_ER ;
-           fal_utyerrno = FAL_ERR_MALLOC ;
-           return FAL_ERROR ;
-       }
-       if( (tmp_data->xlfdname = (char *)strdup( xlfdname )) == NULL ) {
-           fal_utyerror = _FAL_MALOC_ER ;
-           fal_utyerrno = FAL_ERR_MALLOC ;
-           return FAL_ERROR ;
-       }
-       tmp_data->size.h = pix ;
-       tmp_data->size.w = -1 ;
-
-       /* FalGetFontList() and searchFontFilename() */
-       if( (func & MKFONTLIST) || (func & SRCHFNAME) ){
-           GETCHARSETSTR( char_set, tmp_data->xlfdname ) ;
-           /* code set infomations exist */
-           if( charset_str_buf && !strcmp( charset_str_buf, char_set ) ) {
-               *codeset_num  = codeset_list_num ;
-               *codeset_list = codeset_list_sav ;
-           }else{
-               /* clear code set infomations */
-               clear_charset_info() ;
-               /* get code set infomations */
-               if( (rtn = fal_get_codeset( fal_locale, char_set, codeset_list, codeset_num )) ){
-                   return rtn ;
-               }
-               /* save code set infomations */
-               if( (charset_str_buf = (char *)strdup( char_set )) == NULL ) {
-                   fal_utyerror = _FAL_MALOC_ER ;
-                   fal_utyerrno = FAL_ERR_MALLOC ;
-                   return FAL_ERROR ;
-               }
-               codeset_list_num = *codeset_num  ;
-               codeset_list_sav = *codeset_list ;
-           }
-       }
-       return 0 ;
-}
-
-
-
-/*
- *     get file name of fonts
- */
-
-#if NeedFunctionPrototypes
-int
-FalFontIDToFileName(
-       FalFontID       fid,
-       char            **file_name )
-#else
-int
-FalFontIDToFileName( fid, file_name )
-FalFontID      fid;
-char           **file_name;
-#endif
-{
-       char            *fname ;
-       Oak_FontInf     *finf ;
-       if( fid == NULL ) {
-               fal_utyerror  = _FAL_PARM_ER ;
-               fal_utyderror = _FAL_R_P_FINF_DER ;
-               fal_utyerrno = FAL_ERR_PARM ;
-               fal_utyerrno |= (FAL_FUNCNUM_IDTOFNM<<8) ;
-               return FAL_ERROR ;
-       }
-       if( file_name == NULL ) {
-               fal_utyerror  = _FAL_PARM_ER ;
-               fal_utyderror = _FAL_R_P_W_DER ;
-               fal_utyerrno = FAL_ERR_PARM ;
-               fal_utyerrno |= (FAL_FUNCNUM_IDTOFNM<<8) ;
-               return FAL_ERROR ;
-       }
-       finf = (Oak_FontInf *)fid ;
-       if( (fname = (char *)strdup( finf->fname )) == NULL ) {
-               fal_utyerror = _FAL_MALOC_ER ;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               fal_utyerrno |= (FAL_FUNCNUM_IDTOFNM<<8) ;
-               return FAL_ERROR ;
-       }
-       *file_name = fname ;
-       return 0 ;
-}
-
-
-#if NeedFunctionPrototypes
-int
-FalFree(
-       void    *list )
-#else
-int
-FalFree( list )
-void   *list ;
-#endif
-{
-       if( list == NULL ) {
-               fal_utyerror  = _FAL_PARM_ER ;
-               fal_utyerrno = FAL_ERR_PARM ;
-               fal_utyerrno |= (FAL_FUNCNUM_FREE<<8) ;
-               return FAL_ERROR  ;
-       }
-       free( list ) ;
-       return 0  ;
-}
-
-
-
-int
-FalFreeGI( ginf, num )
-FalGIInf       *ginf ;
-int            num ;
-{
-       int     i ;
-       if( ginf == NULL ) {
-               fal_utyerror  = _FAL_PARM_ER ;
-               fal_utyerrno = FAL_ERR_PARM ;
-               return FAL_ERROR ;
-       }
-       for( i=0; i<num; i++ ) {
-               if( ginf[i].charset_str != NULL )
-                       free( ginf[i].charset_str ) ;
-       }
-       free( ginf ) ;
-       return 0  ;
-}
-
-
-/*
- *     This functions manage the relation of FontID 
- *     between code set number.
- */
-
-static int
-fal_add_fidinf( fid, dspcode, cd_set, islock )
-FalFontID      fid ;
-int            dspcode ;
-int            cd_set ;
-int            islock ;
-{
-       int             exist, i, cnt ;
-       FontIDInfo      **flist ;
-       if( fid == NULL ) {
-               fal_utyerror  = _FAL_PARM_ER ;
-               fal_utyerrno = FAL_ERR_PARM ;
-               return FAL_ERROR ;
-       }
-       exist = 0 ;
-       for( i=0; i<mngfid.num; i++ ) {
-               if( fid == mngfid.finf[i]->fid ) {
-                       exist++ ;
-                       mngfid.finf[i]->dspcode = dspcode ;
-                       mngfid.finf[i]->cd_set  = cd_set ;
-                       mngfid.finf[i]->islock  = islock ;
-                       break ;
-               }
-       }
-       /* add new data */
-       if( !exist ) {
-           if( mngfid.finf == NULL ) {
-               cnt = 0 ;
-               if( (flist = (FontIDInfo **)malloc( sizeof(FontIDInfo *) )) == NULL ) {
-                       fal_utyerror = _FAL_MALOC_ER ;
-                       fal_utyerrno = FAL_ERR_MALLOC ;
-                       return FAL_ERROR ;
-               }
-           } else {
-               cnt = mngfid.num ;
-               if( (flist = (FontIDInfo **)realloc( 
-                       mngfid.finf, sizeof(FontIDInfo *) * (cnt + 1) )) == NULL )
-               {
-                       fal_utyerror = _FAL_MALOC_ER ;
-                       fal_utyerrno = FAL_ERR_MALLOC ;
-                       return FAL_ERROR ;
-               }
-           }
-           if( (flist[cnt] = (FontIDInfo *)malloc( sizeof(FontIDInfo) )) == NULL ) {
-               fal_utyerror = _FAL_MALOC_ER ;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               free(flist);
-               return FAL_ERROR ;
-           }
-           flist[cnt]->fid     = fid ;
-           flist[cnt]->cd_set  = cd_set ;
-           flist[cnt]->dspcode         = dspcode ;
-           flist[cnt]->islock  = islock ;
-
-           mngfid.num  = cnt + 1 ;
-           mngfid.finf = flist ;
-       }
-
-       return 0 ;
-}
-
-static int
-fal_read_fidinf( fid, fontid_inf )
-FalFontID      fid ;
-FontIDInfo     *fontid_inf;
-{
-       int     i ;
-       if( fid == NULL ) {
-               fal_utyerror = _FAL_PARM_ER ;
-               fal_utyerrno = FAL_ERR_PARM ;
-               return FAL_ERROR ;
-       }
-       for( i=0; i<mngfid.num; i++ ) {
-               if( mngfid.finf[i]->fid == fid ) {
-                       fontid_inf->fid     =  fid ;
-                       fontid_inf->cd_set  =  mngfid.finf[i]->cd_set ;
-                       fontid_inf->dspcode =  mngfid.finf[i]->dspcode ;
-                       fontid_inf->islock  =  mngfid.finf[i]->islock ;
-                       return 0 ;
-               }
-       }
-       fal_utyerror = _FAL_PARM_ER ;
-       fal_utyerrno = FAL_ERR_FID_RD ;
-       return FAL_ERROR ;
-}
-
-
-static int
-fal_del_fidinf( fid )
-FalFontID      fid ;
-{
-       int     i, cnt, target ;
-       FontIDInfo      **flist ;
-
-       for( i=0; i<mngfid.num; i++ ) {
-               if( mngfid.finf[i]->fid == fid ) {
-                       target = i ;
-                       break ;
-               }
-       }
-       cnt = mngfid.num - 1 ;
-       free( mngfid.finf[target] ) ;
-       for( i=target; i<mngfid.num; i++ ) {
-               mngfid.finf[i] = mngfid.finf[i+1] ;
-       }
-       if( cnt > 0 ) {
-               if( (flist = (FontIDInfo **)realloc( 
-                       mngfid.finf, sizeof(FontIDInfo *) * cnt )) == NULL )
-               {
-                       fal_utyerror = _FAL_MALOC_ER ;
-                       fal_utyerrno = FAL_ERR_MALLOC ;
-                       return FAL_ERROR ;
-               }
-               mngfid.num = cnt ;
-               mngfid.finf = flist ;
-       } else {
-               free( mngfid.finf ) ;
-               mngfid.num = 0 ;
-               mngfid.finf = NULL ;
-       }
-       return 0 ;
-}
-
-/*
- *     convert codepoint into glyph index
- */
-
-static int
-fal_conv_code_to_glyph( fid, code, glidx )
-FalFontID      fid ;
-unsigned int   code ;
-unsigned int   *glidx ;
-{
-       Oak_FontInf     *finf ;
-       FalFontData     tmp_data ;
-       FalGIInf        *gi ;
-       FontIDInfo      fontid_inf ;
-       int             gnum ;
-       int             i ;
-       int             inner_code = 0 ;
-       char            *char_set ;
-       static FalFontID        cmpfid = 0 ;
-       static  char    charset_name[FAL_LINE_MAX] ;
-
-       finf = (Oak_FontInf *)fid ;
-       /*
-        *      get code set number
-        */
-       if( fal_read_fidinf( fid, &fontid_inf ) == FAL_ERROR ) {
-               return  FAL_ERROR;
-       }
-
-       if( fontid_inf.dspcode != FAL_FONT_GLYPH_INDEX ){
-               /*
-                *      get string of "CHARSET_REGISTRY"
-                */
-               memset( &tmp_data, 0, sizeof(FalFontData) ) ;
-
-               if( cmpfid != fid ){
-                   if( falReadGpfProp( FAL_READ_FONTINFO, finf, FAL_FONT_PRM, &tmp_data ) ) {
-                           fal_clear_data( &tmp_data ) ;
-                           return      FAL_ERROR;
-                   }
-                   GETCHARSETSTR( char_set, tmp_data.xlfdname ) ;
-                   snprintf( charset_name, sizeof(charset_name), "%s", char_set ) ;
-               }
-
-               /*
-               *       convert codepoint into glyph index
-               */
-               if( COMM_SBFNT_ISSBFNT( charset_name ) ) {
-                   inner_code = code ;
-                   FAL_OPT_CONVCPTOGI( fontid_inf.dspcode, inner_code ) ;
-               } else {
-                   if( fal_code_to_glyph( fal_locale, code, &gi, &gnum ) ) {
-                       fal_clear_data( &tmp_data ) ;
-                       return  FAL_ERROR;
-                   }
-                   if( gnum==1 ){
-                       inner_code = gi[0].glyph_index ;
-                   }else{ 
-                       for( i=0; i<gnum; i++ ) {
-                           if( !strcmp( gi[i].charset_str, char_set ) ) {
-                               inner_code = gi[i].glyph_index ;
-                               break ;
-                           }
-                       }
-                   }   
-                   FalFreeGI( gi, gnum ) ;
-               }
-               fal_clear_data( &tmp_data ) ;
-       }else{
-               inner_code = code;                      /* glyph index */
-       }
-       *glidx = inner_code ;
-
-       return 0 ;
-}
-
-
-/*
- *     convert codepoint into glyph index
- */
-
-static int
-fal_conv_glyph_to_code( finf, dspcode, cd_set, glidx, code )
-Oak_FontInf    *finf ;
-int            dspcode ;
-int            cd_set ;
-unsigned int   glidx ;
-unsigned int   *code ;
-{
-       FalFontData     tmp_data ;
-       int             inner_code ;
-       char            *char_set ;
-
-       /*
-        *      get code set number
-        */
-       if( dspcode != FAL_FONT_GLYPH_INDEX ){
-               /*
-                *      get string of "CHARSET_REGISTRY"
-                */
-               memset( &tmp_data, 0, sizeof(tmp_data) ) ;
-               if( falReadGpfProp( FAL_READ_FONTINFO, finf, FAL_FONT_PRM, &tmp_data ) ) {
-                       fal_clear_data( &tmp_data ) ;
-                       return  FAL_ERROR;
-               }
-               GETCHARSETSTR( char_set, tmp_data.xlfdname ) ;
-
-               /*
-               *       convert glyph index into codepoint 
-               */
-               if( COMM_SBFNT_ISSBFNT( char_set ) ) {
-                   inner_code = glidx ;
-                   FAL_OPT_CONVGITOCP( dspcode, inner_code ) ;
-               } else {
-                   if( fal_glyph_to_code( fal_locale, char_set, cd_set, glidx, &inner_code ) ) {
-                       fal_clear_data( &tmp_data ) ;
-                       return  FAL_ERROR;
-                   }
-               }
-               fal_clear_data( &tmp_data ) ;
-       }else{
-               inner_code = glidx ;            /* glyph index */
-       }
-       *code = inner_code ;
-
-       return 0 ;
-}
-
-
-static int 
-file_lock( fd )
-int    fd;             /* a file descripter */
-{
-       struct flock    flpar;
-
-       flpar.l_type = F_RDLCK;
-       flpar.l_start = 0;
-       flpar.l_len = 0;
-       flpar.l_whence = 0;
-
-       if ( fcntl( fd, F_SETLK, &flpar ) == -1 ) {
-               fal_utyerrno = FAL_ERR_FILELCK ;
-               return  FAL_ERROR ; 
-       }
-
-       return  0;
-}
-
-static int 
-file_unlock( fd )
-int    fd;     /* a file descripter */
-{
-       struct flock    flpar;
-
-       flpar.l_type = F_UNLCK;
-       flpar.l_start = 0;
-       flpar.l_len = 0;
-       flpar.l_whence = 0;
-
-       if ( fcntl( fd, F_SETLK, &flpar ) == -1 ){
-               fal_utyerrno = FAL_ERR_FILEUNLCK ;
-               return  FAL_ERROR ; 
-       }
-       return  0;
-}
-
-static int 
-is_lock( fd )
-int    fd;     /* file descripter */
-{
-       struct flock    flpar;
-
-       flpar.l_type = F_WRLCK;
-       flpar.l_start = 0;
-       flpar.l_len = 0;
-       flpar.l_whence = 0;
-
-       if ( fcntl( fd, F_GETLK, &flpar ) == -1 ) {
-               fal_utyerrno = FAL_ERR_FILEGETLCK ;
-               return  FAL_ERROR ; 
-       }
-
-       if ( flpar.l_type == F_UNLCK ){
-               return  0 ;
-       } else {
-               fal_utyerrno = FAL_ERR_LCKD ;
-               return  1 ;
-       }
-}
-
-/********************< end of falfont.c >*********************************/
diff --git a/cde/programs/dtudcfonted/libfal/falfont.h b/cde/programs/dtudcfonted/libfal/falfont.h
deleted file mode 100644 (file)
index 55e51d5..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: falfont.h /main/5 1996/06/25 20:05:39 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#define GETNUMCHARS(pFinf) \
-       (((pFinf)->lastCol - (pFinf)->firstCol + 1) * \
-        ((pFinf)->lastRow - (pFinf)->firstRow + 1))
-
-#define GETHIGHT(pCinf) \
-        ((pCinf)->metrics.ascent + (pCinf)->metrics.descent)
-
-#define _FAL_OK                 1
-/* fal_utyerror */
-#define _FAL_OPEN_ER           1
-#define        _FAL_DIR_NOACCSS        1
-#define _FAL_READ_ER           2
-#define _FAL_READ_PATH_ER      2
-#define _FAL_MALOC_ER          3
-#define _FAL_PKEY_ER           4
-#define _FAL_PARM_ER           5
-#define _FAL_STAT_ER           6
-#define _FAL_FONT_ER           7
-#define _FAL_FLST_ER           7
-#define _FAL_DATA_OPEN_ER      8
-#define _FAL_DATA_READ_ER      9
-
-/* fal_utyderror */
-/* FalOpenFont */
-#define _FAL_O_P_PKEY_DER 1
-#define _FAL_O_P_CS_DER   2
-/* FalQueryFont */
-#define _FAL_Q_P_FINF_DER 1
-#define _FAL_Q_P_FONT_DER 2
-/* FalReadFont */
-#define _FAL_R_P_FINF_DER 1
-#define _FAL_R_P_W_DER    2
-#define _FAL_R_P_H_DER    3
-
-/* FalGetFontList */
-#define        _FAL_L_P_LST_DER  1
-#define        _FAL_L_P_KEY_DER  2
-
-#define        _FAL_TRY_NEXT   0xFF
-
-#include  "udccom.h"
-
-#define SNF_BOUND      32
-
-
-#define        FILE_SUFFIX( file )     \
-       ( strrchr( file, '.' ) ? strrchr( file, '.' ) : "" )
-
-
-#define        FAL_DATA_ELM    13
-#define FAL_LINE_MAX   1024
-
-/* update _Oak_Finf */
-#define FAL_UPDATE_FONTINFO    1
-#define FAL_READ_FONTINFO      0
-
-/* Buffer of file name */
-extern  char    fal_err_file_buf[] ;
-
diff --git a/cde/programs/dtudcfonted/libfal/fonts.list.header b/cde/programs/dtudcfonted/libfal/fonts.list.header
deleted file mode 100644 (file)
index d3db164..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#############################################################################
-#####                                                                  #####
-#####      fonts.list                                                  #####
-#####                                                                  #####
-#####      All Rights Reserved, Copyright (C) FUJITSU LIMITED 1995     #####
-#####                                                                  #####
-#############################################################################
-#
-# This file is referenced by :
-#
-#              dtudcfonted
-#              dtudcexch
-#              dtaddcpf
-#              dtcpgpf
-#              dtgpftocpf
-#              dtcpftogpf
-#              dtgpftobdf
-#              dtbdftocpf
-#              dtcpftobdf
-#              and dtlsgpf.
-#
-# font path ==> path1:
-#               path2:
-#                 :
-#               pathN:
-#
diff --git a/cde/programs/dtudcfonted/libfal/include/font.h b/cde/programs/dtudcfonted/libfal/include/font.h
deleted file mode 100644 (file)
index 6150566..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: font.h /main/1 1995/09/14 20:54:34 cde-fuj2 $ */
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-(c) Copyright 1995 FUJITSU LIMITED
-This is source code modified by FUJITSU LIMITED under the Joint
-Development Agreement for the CDEnext PST.
-This is unpublished proprietary source code of FUJITSU LIMITED
-
-******************************************************************/
-#ifndef FONT_H
-#define FONT_H 1
-
-#include "servermd.h"
-
-#define NullCharInfo ((CharInfoPtr)0)
-#define NullFontInfo ((FontInfoPtr)0)
-#define LeftToRight 0
-#define RightToLeft 1
-/*
- * for linear char sets
- */
-#define n1dChars(pfi) ((pfi)->lastCol - (pfi)->firstCol + 1)
-#define chFirst firstCol       /* usage:  pfi->chFirst */
-#define chLast lastCol         /* usage:  pfi->chLast */
-
-/*
- * for 2D char sets
- */
-#define n2dChars(pfi)  (((pfi)->lastCol - (pfi)->firstCol + 1) * \
-                        ((pfi)->lastRow - (pfi)->firstRow + 1))
-
-#define ADDRXTHISCHARINFO( pf, ch ) \
-        ((CharInfoRec *) &((pf)->pCI[(ch) - (pf)->pFI->chFirst]))
-
-#define        GLWIDTHPIXELS(pci) \
-       ((pci)->metrics.rightSideBearing - (pci)->metrics.leftSideBearing)
-#define        GLHEIGHTPIXELS(pci) \
-       ((pci)->metrics.ascent + (pci)->metrics.descent)
-
-
-#define        GLYPHWIDTHBYTES(pci)    (((GLYPHWIDTHPIXELS(pci))+7) >> 3)
-#define        GLYPHHEIGHTPIXELS(pci)  (pci->metrics.ascent + pci->metrics.descent)
-#define        GLYPHWIDTHPIXELS(pci)   (pci->metrics.rightSideBearing \
-                                   - pci->metrics.leftSideBearing)
-#define GLWIDTHPADDED( bc)     ((bc+7) & ~0x7)
-
-#if GLYPHPADBYTES == 0 || GLYPHPADBYTES == 1
-#define        GLYPHWIDTHBYTESPADDED(pci)      (GLYPHWIDTHBYTES(pci))
-#define        PADGLYPHWIDTHBYTES(w)           (((w)+7)>>3)
-#endif
-
-#if GLYPHPADBYTES == 2
-#define        GLYPHWIDTHBYTESPADDED(pci)      ((GLYPHWIDTHBYTES(pci)+1) & ~0x1)
-#define        PADGLYPHWIDTHBYTES(w)           (((((w)+7)>>3)+1) & ~0x1)
-#endif
-
-#if GLYPHPADBYTES == 4
-#define        GLYPHWIDTHBYTESPADDED(pci)      ((GLYPHWIDTHBYTES(pci)+3) & ~0x3)
-#define        PADGLYPHWIDTHBYTES(w)           (((((w)+7)>>3)+3) & ~0x3)
-#endif
-
-#if GLYPHPADBYTES == 8 /* for a cray? */
-#define        GLYPHWIDTHBYTESPADDED(pci)      ((GLYPHWIDTHBYTES(pci)+7) & ~0x7)
-#define        PADGLYPHWIDTHBYTES(w)           (((((w)+7)>>3)+7) & ~0x7)
-#endif
-
-typedef struct _FontProp *FontPropPtr;
-typedef struct _CharInfo *CharInfoPtr;
-typedef struct _FontInfo *FontInfoPtr;
-typedef unsigned int DrawDirection;
-typedef struct _ExtentInfo *ExtentInfoPtr;
-
-
-#endif /* FONT_H */
diff --git a/cde/programs/dtudcfonted/libfal/include/fontstruct.h b/cde/programs/dtudcfonted/libfal/include/fontstruct.h
deleted file mode 100644 (file)
index b535501..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: fontstruct.h /main/3 1996/04/08 15:58:01 cde-fuj $ */
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-(c) Copyright 1995 FUJITSU LIMITED
-This is source code modified by FUJITSU LIMITED under the Joint
-Development Agreement for the CDEnext PST.
-This is unpublished proprietary source code of FUJITSU LIMITED
-
-******************************************************************/
-#ifndef FONTSTRUCT_H
-#define FONTSTRUCT_H 1
-#include "font.h"
-#include "misc.h"
-
-typedef struct _CharInfo {
-    xCharInfo  metrics;        /* info preformatted for Queries */
-    unsigned   byteOffset:24;  /* byte offset of the raster from pGlyphs */
-    Bool       exists:1;       /* true iff glyph exists for this char */
-    unsigned   pad:7;          /* must be zero for now */
-} CharInfoRec;
-
-typedef struct _FontInfo {
-    unsigned int       version1;   /* version stamp */
-    unsigned int       allExist;
-    unsigned int       drawDirection;
-    unsigned int       noOverlap;      /* true if:
-                                        * max(rightSideBearing-characterWidth)
-                                        * <= minbounds->metrics.leftSideBearing
-                                        */
-    unsigned int       constantMetrics;
-    unsigned int       terminalFont;   /* Should be deprecated!  true if:
-                                          constant metrics &&
-                                          leftSideBearing == 0 &&
-                                          rightSideBearing == characterWidth &&
-                                          ascent == fontAscent &&
-                                          descent == fontDescent
-                                       */
-    unsigned int       linear:1;       /* true if firstRow == lastRow */
-    unsigned int       constantWidth:1;  /* true if minbounds->metrics.characterWidth
-                                          *      == maxbounds->metrics.characterWidth
-                                          */
-    unsigned int       inkInside:1;    /* true if for all defined glyphs:
-                                        * leftSideBearing >= 0 &&
-                                        * rightSideBearing <= characterWidth &&
-                                        * -fontDescent <= ascent <= fontAscent &&
-                                        * -fontAscent <= descent <= fontDescent
-                                        */
-    unsigned int       inkMetrics:1;   /* ink metrics != bitmap metrics */
-                                       /* used with terminalFont */
-                                       /* see font's pInk{CI,Min,Max} */
-    unsigned int       padding:28;
-    unsigned int       firstCol;
-    unsigned int       lastCol;
-    unsigned int       firstRow;
-    unsigned int       lastRow;
-    unsigned int       nProps;
-    unsigned int       lenStrings; /* length in bytes of string table */
-    unsigned int       chDefault;  /* default character */ 
-    int                        fontDescent; /* minimum for quality typography */
-    int                        fontAscent;  /* minimum for quality typography */
-    CharInfoRec                minbounds;  /* MIN of glyph metrics over all chars */
-    CharInfoRec                maxbounds;  /* MAX of glyph metrics over all chars */
-    unsigned int       pixDepth;   /* intensity bits per pixel */
-    unsigned int       glyphSets;  /* number of sets of glyphs, for
-                                           sub-pixel positioning */
-    unsigned int       version2;   /* version stamp double-check */
-} FontInfoRec;
-
-typedef struct _ExtentInfo {
-    DrawDirection      drawDirection;
-    int                        fontAscent;
-    int                        fontDescent;
-    int                        overallAscent;
-    int                        overallDescent;
-    int                        overallWidth;
-    int                        overallLeft;
-    int                        overallRight;
-} ExtentInfoRec;
-
-#endif /* FONTSTRUCT_H */
-
diff --git a/cde/programs/dtudcfonted/libfal/include/misc.h b/cde/programs/dtudcfonted/libfal/include/misc.h
deleted file mode 100644 (file)
index 138713e..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: misc.h /main/7 1996/04/08 15:58:10 cde-fuj $ */
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-(c) Copyright 1995 FUJITSU LIMITED
-This is source code modified by FUJITSU LIMITED under the Joint
-Development Agreement for the CDEnext PST.
-This is unpublished proprietary source code of FUJITSU LIMITED
-
-******************************************************************/
-#ifndef MISC_H
-#define MISC_H 1
-/*
- *  X internal definitions 
- *
- */
-
-
-extern unsigned long globalSerialNumber;
-extern unsigned long serverGeneration;
-
-#ifndef NULL
-#if __STDC__ && !NOSTDHDRS
-#include <stddef.h>
-#else
-#define NULL            0
-#endif
-#endif
-
-#define MAXSCREENS     3
-#define MAXCLIENTS     128
-#define MAXFORMATS     8
-#define MAXVISUALS_PER_SCREEN 50
-
-typedef unsigned char *pointer;
-typedef int Bool;
-typedef unsigned long PIXEL;
-typedef unsigned long ATOM;
-
-
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-#include "os.h"        /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */
-
-#define NullBox ((BoxPtr)0)
-#define MILLI_PER_MIN (1000 * 60)
-#define MILLI_PER_SECOND (1000)
-
-    /* this next is used with None and ParentRelative to tell
-       PaintWin() what to use to paint the background. Also used
-       in the macro IS_VALID_PIXMAP */
-
-#define USE_BACKGROUND_PIXEL 3
-#define USE_BORDER_PIXEL 3
-
-
-/* byte swap a long literal */
-#define lswapl(x) ((((x) & 0xff) << 24) |\
-                  (((x) & 0xff00) << 8) |\
-                  (((x) & 0xff0000) >> 8) |\
-                  (((x) >> 24) & 0xff))
-
-/* byte swap a short literal */
-#define lswaps(x) ((((x) & 0xff) << 8) | (((x) >> 8) & 0xff))
-
-#define min(a, b) (((a) < (b)) ? (a) : (b))
-#define max(a, b) (((a) > (b)) ? (a) : (b))
-#ifndef abs
-#define abs(a) ((a) > 0 ? (a) : -(a))
-#endif
-#ifndef fabs
-#define fabs(a) ((a) > 0.0 ? (a) : -(a))       /* floating absolute value */
-#endif
-#define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0))
-/* this assumes b > 0 */
-#define modulus(a, b, d)    if (((d) = (a) % (b)) < 0) (d) += (b)
-/*
- * return the least significant bit in x which is set
- *
- * This works on 1's complement and 2's complement machines.
- * If you care about the extra instruction on 2's complement
- * machines, change to ((x) & (-(x)))
- */
-#define lowbit(x) ((x) & (~(x) + 1))
-
-#define MAXSHORT 32767
-#define MINSHORT -MAXSHORT 
-
-
-/* some macros to help swap requests, replies, and events */
-
-#define LengthRestB(stuff) \
-    (((unsigned long)stuff->length << 2) - sizeof(*stuff))
-
-#define LengthRestS(stuff) \
-    (((unsigned long)stuff->length << 1) - (sizeof(*stuff) >> 1))
-
-#define LengthRestL(stuff) \
-    ((unsigned long)stuff->length - (sizeof(*stuff) >> 2))
-
-#define SwapRestS(stuff) \
-    SwapShorts((short *)(stuff + 1), LengthRestS(stuff))
-
-#define SwapRestL(stuff) \
-    SwapLongs((long *)(stuff + 1), LengthRestL(stuff))
-
-/* byte swap a long */
-#define swapl(x, n) n = ((char *) (x))[0];\
-                ((char *) (x))[0] = ((char *) (x))[3];\
-                ((char *) (x))[3] = n;\
-                n = ((char *) (x))[1];\
-                ((char *) (x))[1] = ((char *) (x))[2];\
-                ((char *) (x))[2] = n;
-
-/* byte swap a short */
-#define swaps(x, n) n = ((char *) (x))[0];\
-                ((char *) (x))[0] = ((char *) (x))[1];\
-                ((char *) (x))[1] = n
-
-/* copy long from src to dst byteswapping on the way */
-#define cpswapl(src, dst) \
-                 ((char *)&(dst))[0] = ((char *) &(src))[3];\
-                 ((char *)&(dst))[1] = ((char *) &(src))[2];\
-                 ((char *)&(dst))[2] = ((char *) &(src))[1];\
-                 ((char *)&(dst))[3] = ((char *) &(src))[0];
-
-/* copy short from src to dst byteswapping on the way */
-#define cpswaps(src, dst)\
-                ((char *) &(dst))[0] = ((char *) &(src))[1];\
-                ((char *) &(dst))[1] = ((char *) &(src))[0];
-
-extern void SwapLongs();
-extern void SwapShorts();
-
-typedef struct _DDXPoint *DDXPointPtr;
-typedef struct _Box *BoxPtr;
-
-#endif /* MISC_H */
diff --git a/cde/programs/dtudcfonted/libfal/include/os.h b/cde/programs/dtudcfonted/libfal/include/os.h
deleted file mode 100644 (file)
index bf5a7c2..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: os.h /main/6 1996/05/28 15:33:04 ageorge $ */
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-(c) Copyright 1995 FUJITSU LIMITED
-This is source code modified by FUJITSU LIMITED under the Joint
-Development Agreement for the CDEnext PST.
-This is unpublished proprietary source code of FUJITSU LIMITED
-
-******************************************************************/
-
-
-#ifndef OS_H
-#define OS_H
-#include "misc.h"
-
-#ifdef INCLUDE_ALLOCA_H
-#include <alloca.h>
-#endif
-
-#define NullFID ((FID) 0)
-
-#define SCREEN_SAVER_ON   0
-#define SCREEN_SAVER_OFF  1
-#define SCREEN_SAVER_FORCER 2
-
-#if defined(stellar)
-#define MAX_REQUEST_SIZE 65535
-#else
-#define MAX_REQUEST_SIZE 16384
-#endif
-
-typedef pointer        FID;
-typedef struct _FontPathRec *FontPathPtr;
-typedef struct _NewClientRec *NewClientPtr;
-
-#ifndef NO_ALLOCA
-/*
- * os-dependent definition of local allocation and deallocation
- * If you want something other than Xalloc/Xfree for ALLOCATE/DEALLOCATE
- * LOCAL then you add that in here.
- */
-#if defined(__HIGHC__)
-
-extern char *alloca();
-
-#if HCVERSION < 21003
-#define ALLOCATE_LOCAL(size)   alloca((int)(size))
-pragma on(alloca);
-#else /* HCVERSION >= 21003 */
-#define        ALLOCATE_LOCAL(size)    _Alloca((int)(size))
-#endif /* HCVERSION < 21003 */
-
-#define DEALLOCATE_LOCAL(ptr)  /* as nothing */
-
-#endif /* defined(__HIGHC__) */
-
-
-#if defined(__GNUC__)
-#if !defined(__linux__)
-#ifdef alloca
-#undef alloca
-#endif
-#define alloca ___builtin_alloca
-#endif
-#define ALLOCATE_LOCAL(size) alloca((int)(size))
-#define DEALLOCATE_LOCAL(ptr)  /* as nothing */
-#else /* ! __GNUC__ */
-/*
- * warning: mips alloca is unsuitable in the server, do not use.
- */
-#if defined(vax) || defined(sun) || defined(apollo) || defined(stellar)
-/*
- * Some System V boxes extract alloca.o from /lib/libPW.a; if you
- * decide that you don't want to use alloca, you might want to fix 
- * ../os/4.2bsd/Imakefile
- */
-char *alloca();
-#define ALLOCATE_LOCAL(size) alloca((int)(size))
-#define DEALLOCATE_LOCAL(ptr)  /* as nothing */
-#endif /* who does alloca */
-#endif /* __GNUC__ */
-
-#endif /* NO_ALLOCA */
-
-#ifndef ALLOCATE_LOCAL
-#define ALLOCATE_LOCAL(size) Xalloc((unsigned long)(size))
-#define DEALLOCATE_LOCAL(ptr) Xfree((pointer)(ptr))
-#endif /* ALLOCATE_LOCAL */
-
-
-#define xalloc(size) Xalloc((unsigned long)(size))
-#define xrealloc(ptr, size) Xrealloc((pointer)(ptr), (unsigned long)(size))
-#define xfree(ptr) Xfree((pointer)(ptr))
-
-int            ReadRequestFromClient();
-#ifndef strcat
-char           *strcat();
-#endif
-#ifndef strncat
-char           *strncat();
-#endif
-#ifndef strcpy
-char           *strcpy();
-#endif
-#ifndef strncpy
-char           *strncpy();
-#endif
-Bool           CloseDownConnection();
-FontPathPtr    GetFontPath();
-FontPathPtr    ExpandFontNamePattern();
-FID            FiOpenForRead();
-void           CreateWellKnownSockets();
-int            SetDefaultFontPath();
-void           FreeFontRecord();
-int            SetFontPath();
-void           ErrorF();
-void           Error();
-void           FatalError();
-void           ProcessCommandLine();
-void           Xfree();
-void           FlushAllOutput();
-void           FlushIfCriticalOutputPending();
-unsigned long  *Xalloc();
-unsigned long  *Xrealloc();
-long           GetTimeInMillis();
-
-#endif /* OS_H */
diff --git a/cde/programs/dtudcfonted/libfal/include/pcf.h b/cde/programs/dtudcfonted/libfal/include/pcf.h
deleted file mode 100644 (file)
index ad36b92..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: pcf.h /main/2 1996/02/10 16:25:46 cde-fuj $ */
-/*
- *
- * Copyright 1990 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of M.I.T. not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  M.I.T. makes no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- (c) Copyright 1995 FUJITSU LIMITED
- This is source code modified by FUJITSU LIMITED under the Joint
- Development Agreement for the CDEnext PST.
- This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-#ifndef _PCF_H_
-#define _PCF_H_
-
-/*
- * Information used to read/write PCF fonts
- */
-
-typedef struct _PCFTable {
-    CARD32      type;
-    CARD32      format;
-    CARD32      size;
-    CARD32      offset;
-}           PCFTableRec, *PCFTablePtr;
-
-#define PCF_FILE_VERSION       (('p'<<24)|('c'<<16)|('f'<<8)|1)
-#define        PCF_FORMAT_MASK         0xffffff00
-
-#define PCF_DEFAULT_FORMAT     0x00000000
-#define PCF_INKBOUNDS          0x00000200
-#define PCF_ACCEL_W_INKBOUNDS  0x00000100
-#define PCF_COMPRESSED_METRICS 0x00000100
-
-#define PCF_FORMAT_MATCH(a,b) (((a)&PCF_FORMAT_MASK) == ((b)&PCF_FORMAT_MASK))
-
-#define PCF_GLYPH_PAD_MASK     (3<<0)
-#define PCF_BYTE_MASK          (1<<2)
-#define PCF_BIT_MASK           (1<<3)
-#define PCF_SCAN_UNIT_MASK     (3<<4)
-
-#define PCF_BYTE_ORDER(f)      (((f) & PCF_BYTE_MASK)?MSBFirst:LSBFirst)
-#define PCF_BIT_ORDER(f)       (((f) & PCF_BIT_MASK)?MSBFirst:LSBFirst)
-#define PCF_GLYPH_PAD_INDEX(f) ((f) & PCF_GLYPH_PAD_MASK)
-#define PCF_GLYPH_PAD(f)       (1<<PCF_GLYPH_PAD_INDEX(f))
-#define PCF_SCAN_UNIT_INDEX(f) (((f) & PCF_SCAN_UNIT_MASK) >> 4)
-#define PCF_SCAN_UNIT(f)       (1<<PCF_SCAN_UNIT_INDEX(f))
-#define PCF_FORMAT_BITS(f)     ((f) & (PCF_GLYPH_PAD_MASK|PCF_BYTE_MASK|PCF_BIT_MASK|PCF_SCAN_UNIT_MASK))
-
-#define PCF_SIZE_TO_INDEX(s)   ((s) == 4 ? 2 : (s) == 2 ? 1 : 0)
-#define PCF_INDEX_TO_SIZE(b)   (1<<b)
-
-#define PCF_FORMAT(bit,byte,glyph,scan) (\
-    (PCF_SIZE_TO_INDEX(scan) << 4) | \
-    (((bit) == MSBFirst ? 1 : 0) << 3) | \
-    (((byte) == MSBFirst ? 1 : 0) << 2) | \
-    (PCF_SIZE_TO_INDEX(glyph) << 0))
-
-#define PCF_PROPERTIES             (1<<0)
-#define PCF_ACCELERATORS           (1<<1)
-#define PCF_METRICS                (1<<2)
-#define PCF_BITMAPS                (1<<3)
-#define PCF_INK_METRICS                    (1<<4)
-#define        PCF_BDF_ENCODINGS           (1<<5)
-#define PCF_SWIDTHS                (1<<6)
-#define PCF_GLYPH_NAMES                    (1<<7)
-#define PCF_BDF_ACCELERATORS       (1<<8)
-
-#endif                         /* _PCF_H_ */
diff --git a/cde/programs/dtudcfonted/libfal/include/servermd.h b/cde/programs/dtudcfonted/libfal/include/servermd.h
deleted file mode 100644 (file)
index 9e79efa..0000000
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: servermd.h /main/2 1996/04/08 15:58:29 cde-fuj $ */
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-(c) Copyright 1995 FUJITSU LIMITED
-This is source code modified by FUJITSU LIMITED under the Joint
-Development Agreement for the CDEnext PST.
-This is unpublished proprietary source code of FUJITSU LIMITED
-
-******************************************************************/
-#ifndef SERVERMD_H
-#define SERVERMD_H 1
-
-/*
- * The vendor string identifies the vendor responsible for the
- * server executable.
- */
-#ifndef VENDOR_STRING
-#define VENDOR_STRING "MIT X Consortium"
-#endif
-
-/*
- * The vendor release number identifies, for the purpose of submitting
- * traceable bug reports, the release number of software produced
- * by the vendor.
- */
-#ifndef VENDOR_RELEASE
-#define VENDOR_RELEASE 4
-#endif
-
-/*
- * Machine dependent values:
- * GLYPHPADBYTES should be chosen with consideration for the space-time
- * trade-off.  Padding to 0 bytes means that there is no wasted space
- * in the font bitmaps (both on disk and in memory), but that access of
- * the bitmaps will cause odd-address memory references.  Padding to
- * 2 bytes would ensure even address memory references and would
- * be suitable for a 68010-class machine, but at the expense of wasted
- * space in the font bitmaps.  Padding to 4 bytes would be good
- * for real 32 bit machines, etc.  Be sure that you tell the font
- * compiler what kind of padding you want because its defines are
- * kept separate from this.  See server/include/font.h for how
- * GLYPHPADBYTES is used.
- *
- * Along with this, you should choose an appropriate value for
- * GETLEFTBITS_ALIGNMENT, which is used in ddx/mfb/maskbits.h.  This
- * constant choses what kind of memory references are guarenteed during
- * font access; either 1, 2 or 4, for byte, word or longword access,
- * respectively.  For instance, if you have decided to to have
- * GLYPHPADBYTES == 4, then it is pointless for you to have a
- * GETLEFTBITS_ALIGNMENT > 1, because the padding of the fonts has already
- * guarenteed you that your fonts are longword aligned.  On the other
- * hand, even if you have chosen GLYPHPADBYTES == 1 to save space, you may
- * also decide that the computing involved in aligning the pointer is more
- * costly than an odd-address access; you choose GETLEFTBITS_ALIGNMENT == 1.
- *
- * Next, choose the tuning parameters which are appropriate for your
- * hardware; these modify the behaviour of the raw frame buffer code
- * in ddx/mfb and ddx/cfb.  Defining these incorrectly will not cause
- * the server to run incorrectly, but defining these correctly will
- * cause some noticeable speed improvements:
- *
- *  AVOID_MEMORY_READ - (8-bit cfb only)
- *     When stippling pixels on the screen (polytext and pushpixels),
- *     don't read long words from the display and mask in the
- *     appropriate values.  Rather, perform multiple byte/short/long
- *     writes as appropriate.  This option uses many more instructions
- *     but runs much faster when the destination is much slower than
- *     the CPU and at least 1 level of write buffer is availible (2
- *     is much better).  Defined currently for SPARC and MIPS.
- *
- *  FAST_CONSTANT_OFFSET_MODE - (cfb and mfb)
- *     This define is used on machines which have no auto-increment
- *     addressing mode, but do have an effectively free constant-offset
- *     addressing mode.  Currently defined for MIPS and SPARC, even though
- *     I remember the cg6 as performing better without it (cg3 definitely
- *     performs better with it).
- *     
- *  LARGE_INSTRUCTION_CACHE -
- *     This define increases the number of times some loops are
- *     unrolled.  On 68020 machines (with 256 bytes of i-cache),
- *     this define will slow execution down as instructions miss
- *     the cache frequently.  On machines with real i-caches, this
- *     reduces loop overhead, causing a slight performance improvement.
- *     Currently defined for MIPS and SPARC
- *
- *  FAST_UNALIGNED_READS -
- *     For machines with more memory bandwidth than CPU, this
- *     define uses unaligned reads for 8-bit BitBLT instead of doing
- *     aligned reads and combining the results with shifts and
- *     logical-ors.  Currently defined for 68020 and vax.
- *  PLENTIFUL_REGISTERS -
- *     For machines with > 20 registers.  Currently used for
- *     unrolling the text painting code a bit more.  Currently
- *     defined for MIPS.
- */
-
-#ifdef vax
-
-#define IMAGE_BYTE_ORDER       LSBFirst        /* Values for the VAX only */
-#define BITMAP_BIT_ORDER       LSBFirst
-#define        GLYPHPADBYTES           1
-#define GETLEFTBITS_ALIGNMENT  4
-#define FAST_UNALIGNED_READS
-
-#endif /* vax */
-
-#ifdef sun
-
-#if defined(sun386) || defined(sun5)
-# define IMAGE_BYTE_ORDER      LSBFirst        /* Values for the SUN only */
-# define BITMAP_BIT_ORDER      LSBFirst
-#else
-# define IMAGE_BYTE_ORDER      MSBFirst        /* Values for the SUN only */
-# define BITMAP_BIT_ORDER      MSBFirst
-#endif
-
-#ifdef sparc
-# define AVOID_MEMORY_READ
-# define LARGE_INSTRUCTION_CACHE
-# define FAST_CONSTANT_OFFSET_MODE
-#endif
-
-#ifdef mc68020
-#define FAST_UNALIGNED_READS
-#endif
-
-#define        GLYPHPADBYTES           4
-#define GETLEFTBITS_ALIGNMENT  1
-
-#endif /* sun */
-
-#ifdef apollo
-
-#define IMAGE_BYTE_ORDER       MSBFirst        /* Values for the Apollo only*/
-#define BITMAP_BIT_ORDER       MSBFirst
-#define        GLYPHPADBYTES           2
-#define GETLEFTBITS_ALIGNMENT  4
-
-#endif /* apollo */
-
-#if defined(ibm032) || defined (ibm)
-
-#ifdef i386
-# define IMAGE_BYTE_ORDER      LSBFirst        /* Value for PS/2 only */
-#else
-# define IMAGE_BYTE_ORDER      MSBFirst        /* Values for the RT only*/
-#endif
-#define BITMAP_BIT_ORDER       MSBFirst
-#define        GLYPHPADBYTES           1
-#define GETLEFTBITS_ALIGNMENT  4
-/* ibm pcc doesn't understand pragmas. */
-
-#endif /* ibm */
-
-#ifdef hpux
-
-#define IMAGE_BYTE_ORDER       MSBFirst        /* Values for the HP only */
-#define BITMAP_BIT_ORDER       MSBFirst
-#define        GLYPHPADBYTES           2               /* to match product server */
-#define        GETLEFTBITS_ALIGNMENT   1
-
-#endif /* hpux */
-
-#if defined(M4315) || defined(M4317) || defined(M4319) || defined(M4330)
-
-#define IMAGE_BYTE_ORDER       MSBFirst        /* Values for Pegasus only */
-#define BITMAP_BIT_ORDER       MSBFirst
-#define GLYPHPADBYTES          4
-#define GETLEFTBITS_ALIGNMENT  1
-
-#define FAST_UNALIGNED_READS
-
-#endif /* tektronix */
-
-#ifdef macII
-
-#define IMAGE_BYTE_ORDER       MSBFirst        /* Values for the MacII only */
-#define BITMAP_BIT_ORDER       MSBFirst
-#define GLYPHPADBYTES          4
-#define GETLEFTBITS_ALIGNMENT  1
-
-/* might want FAST_UNALIGNED_READS for frame buffers with < 1us latency */
-
-#endif /* macII */
-
-#ifdef mips
-
-#ifdef MIPSEL
-# define IMAGE_BYTE_ORDER      LSBFirst        /* Values for the PMAX only */
-# define BITMAP_BIT_ORDER      LSBFirst
-# define GLYPHPADBYTES         4
-# define GETLEFTBITS_ALIGNMENT 1
-#else
-# define IMAGE_BYTE_ORDER      MSBFirst        /* Values for the MIPS only */
-# define BITMAP_BIT_ORDER      MSBFirst
-# define GLYPHPADBYTES         4
-# define GETLEFTBITS_ALIGNMENT 1
-#endif
-
-#define AVOID_MEMORY_READ
-#define FAST_CONSTANT_OFFSET_MODE
-#define LARGE_INSTRUCTION_CACHE
-#define PLENTIFUL_REGISTERS
-
-#endif /* mips */
-
-#ifdef stellar
-
-#define IMAGE_BYTE_ORDER       MSBFirst       /* Values for the stellar only*/
-#define BITMAP_BIT_ORDER       MSBFirst
-#define        GLYPHPADBYTES           4
-#define GETLEFTBITS_ALIGNMENT  4
-/*
- * Use SysV random number generator.
- */
-#define random rand
-
-#endif /* stellar */
-
-/* size of buffer to use with GetImage, measured in bytes. There's obviously
- * a trade-off between the amount of stack (or whatever ALLOCATE_LOCAL gives
- * you) used and the number of times the ddx routine has to be called.
- * 
- * for a 1024 x 864 bit monochrome screen  with a 32 bit word we get 
- * 8192/4 words per buffer 
- * (1024/32) = 32 words per scanline
- * 2048 words per buffer / 32 words per scanline = 64 scanlines per buffer
- * 864 scanlines / 64 scanlines = 14 buffers to draw a full screen
- */
-#if defined(stellar)
-#define IMAGE_BUFSIZE          (64*1024)
-#else
-#define IMAGE_BUFSIZE          8192
-#endif
-
-/* pad scanline to a longword */
-#if defined(ibm) && defined(i386)
-#define BITMAP_SCANLINE_UNIT   8
-#else
-#define BITMAP_SCANLINE_UNIT   32
-#endif
-#define BITMAP_SCANLINE_PAD  32
-
-#define LOG2_BITMAP_PAD                5
-#define LOG2_BYTES_PER_SCANLINE_PAD    2
-
-/* 
- *   This returns the number of padding units, for depth d and width w.
- * For bitmaps this can be calculated with the macros above.
- * Other depths require either grovelling over the formats field of the
- * screenInfo or hardwired constants.
- */
-
-typedef struct _PaddingInfo {
-       int     padRoundUp;     /* pixels per pad unit - 1 */
-       int     padPixelsLog2;  /* log 2 (pixels per pad unit) */
-       int     padBytesLog2;   /* log 2 (bytes per pad unit) */
-} PaddingInfo;
-extern PaddingInfo PixmapWidthPaddingInfo[];
-
-#define PixmapWidthInPadUnits(w, d) \
-    (((w) + PixmapWidthPaddingInfo[d].padRoundUp) >> \
-       PixmapWidthPaddingInfo[d].padPixelsLog2)
-
-/*
- *     Return the number of bytes to which a scanline of the given
- * depth and width will be padded.
- */
-#define PixmapBytePad(w, d) \
-    (PixmapWidthInPadUnits(w, d) << PixmapWidthPaddingInfo[d].padBytesLog2)
-
-#endif /* SERVERMD_H */
diff --git a/cde/programs/dtudcfonted/libfal/readpcf.c b/cde/programs/dtudcfonted/libfal/readpcf.c
deleted file mode 100644 (file)
index 1aa15c7..0000000
+++ /dev/null
@@ -1,903 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: readpcf.c /main/5 1996/06/05 16:42:29 ageorge $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include       <stdio.h>
-#include       <stdlib.h>
-#include       <string.h>
-#include       <errno.h>
-#include       <sys/types.h>
-#include       <sys/stat.h>
-#include       <sys/mman.h>
-#include       "FaLib.h"
-#include       "falfont.h"
-
-#ifndef GLYPHPADOPTIONS
-#define        GLYPHPADOPTIONS 4
-#endif
-
-static CARD32  getLSB32();
-static int     getINT32();
-static int     getINT16();
-static Bool    seekToType();
-static void    getMetric();
-static Bool    getAccel();
-int    falInitReadPcf();
-static         void    ByteSwap();
-static void    repadBits();
-int    falPcfGlyph();
-void   falGetPcfGSize();
-int    falInitReadPcfProp() ;
-int    falInitReadSnfProp() ;
-int    falReadGpfProp() ;
-
-extern void    BitOrderInvert() ;
-extern void    set_errfile_str() ;
-
-static CARD32
-getLSB32( p)
-unsigned char *p;
-{
-       CARD32  c;
-
-       c = *p++;
-       c |= (CARD32)(*p++) << 8;
-       c |= (CARD32)(*p++) << 16;
-       c |= (CARD32)(*p) << 24;
-
-       return c;
-}
-
-static int
-getINT32( p, format)
-unsigned char *p;
-CARD32      format;
-{
-       CARD32         c;
-
-       if (PCF_BYTE_ORDER(format) == MSBFirst) {
-               c = (CARD32)(*p++) << 24;
-               c |= (CARD32)(*p++) << 16;
-               c |= (CARD32)(*p++) << 8;
-               c |= (CARD32)(*p);
-       } else {
-               c = (CARD32)(*p++);
-               c |= (CARD32)(*p++) << 8;
-               c |= (CARD32)(*p++) << 16;
-               c |= (CARD32)(*p) << 24;
-       }
-
-       return (int)c;
-}
-
-static int
-getINT16( p, format)
-unsigned char *p;
-CARD32      format;
-{
-       CARD32         c;
-
-       if (PCF_BYTE_ORDER(format) == MSBFirst) {
-               c = (CARD32)(*p++) << 8;
-               c |= (CARD32)(*p);
-       } else {
-               c = (CARD32)(*p++);
-               c |= (CARD32)(*p) << 8;
-       }
-
-       return (int)c;
-}
-
-static Bool
-seekToType( tables, ntables, type, formatp, sizep, offsetp)
-PCFTablePtr tables;
-int         ntables;
-CARD32      type;
-CARD32 *formatp;
-CARD32 *sizep;
-CARD32 *offsetp;
-{
-       int     i;
-
-       for ( i = 0; i < ntables; i++) {
-               if ( getLSB32( (unsigned char *)&tables[i].type ) == type) {
-                       if ( formatp)
-                               *formatp = getLSB32( (unsigned char *)&tables[i].format);
-                       if ( sizep)
-                               *sizep = getLSB32( (unsigned char *)&tables[i].size);
-                       if ( offsetp)
-                               *offsetp = getLSB32( (unsigned char *)&tables[i].offset);
-                       return(TRUE);
-               }
-       }
-       return(FALSE);
-}
-
-
-
-static void
-getMetric( buf, format, metric)
-caddr_t buf;
-CARD32      format;
-xCharInfo  *metric;
-{
-       metric->leftSideBearing = getINT16( (unsigned char *)buf, (CARD32)format); 
-       buf += 2;
-       metric->rightSideBearing = getINT16( (unsigned char *)buf, (CARD32)format); 
-       buf += 2;
-       metric->characterWidth = getINT16( (unsigned char *)buf, (CARD32)format); 
-       buf += 2;
-       metric->ascent = getINT16( (unsigned char *)buf, (CARD32)format); 
-       buf += 2;
-       metric->descent = getINT16( (unsigned char *)buf, (CARD32)format); 
-       buf += 2;
-       metric->attributes = getINT16( (unsigned char *)buf, (CARD32)format); 
-       buf += 2;
-}
-
-static Bool
-getAccel( pFontInfo,  maxink, buf_top, tables, ntables, type)
-FontInfoPtr    pFontInfo;
-xCharInfo      *maxink;
-caddr_t                buf_top;
-PCFTablePtr    tables;
-int            ntables;
-CARD32         type;
-{
-       CARD32  format;
-       CARD32  offset;
-       caddr_t buffer;
-
-       if ( !seekToType( tables, ntables, (CARD32)type, &format, (CARD32 *)NULL, &offset))
-               return FALSE;
-
-       buffer = buf_top + offset;
-       format = getLSB32( (unsigned char *)buffer );
-       buffer += 4;
-       if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT) &&
-           !PCF_FORMAT_MATCH(format, PCF_ACCEL_W_INKBOUNDS)) {
-               return FALSE;
-       }
-       pFontInfo->noOverlap = *buffer++;
-       pFontInfo->constantMetrics = *buffer++;
-       pFontInfo->terminalFont = *buffer++;
-       pFontInfo->constantWidth = *buffer++;
-       pFontInfo->inkInside = *buffer++;
-       pFontInfo->inkMetrics = *buffer++;
-       pFontInfo->drawDirection = *buffer++;
-       /*  pFontInfo->anamorphic = FALSE; */
-       /* natural alignment */ buffer++;
-       pFontInfo->fontAscent = getINT32( (unsigned char *)buffer, (CARD32)format); 
-       buffer += 4;
-       pFontInfo->fontDescent = getINT32( (unsigned char *)buffer, (CARD32)format); 
-       buffer +=4;
-
-       /*  pFontInfo->maxOverlap = getINT32( (unsigned char *)buffer, (CARD32)format); */ buffer += 4;
-       getMetric(buffer, format, &pFontInfo->minbounds.metrics); 
-       buffer += 12;
-       getMetric(buffer, format, &pFontInfo->maxbounds.metrics); 
-       buffer += 12;
-       if (PCF_FORMAT_MATCH(format, PCF_ACCEL_W_INKBOUNDS)) {
-               buffer += 12;
-               getMetric( buffer, format, maxink);
-       } else {
-               *maxink = pFontInfo->maxbounds.metrics;
-       }
-       return TRUE;
-}
-
-int
-falInitReadPcf( pcfinf, buftop)
-struct pcf_inf *pcfinf;
-caddr_t        buftop;
-{
-       CARD32  format;
-       CARD32  offset;
-       CARD32      *bitmapSizes;
-       xCharInfo       maxink;
-       caddr_t buffp;
-
-       if ( getLSB32( (unsigned char *)buftop ) != PCF_FILE_VERSION)
-               goto Bail;
-
-       pcfinf->ntables = getLSB32( (unsigned char *)(buftop + 4) );
-
-       pcfinf->tables = (PCFTablePtr)(buftop + 8);
-
-       if ( !getAccel( &pcfinf->info, &maxink, buftop, pcfinf->tables, pcfinf->ntables, 
-           (CARD32)PCF_BDF_ACCELERATORS))
-               if ( !getAccel( &pcfinf->info, &maxink, buftop, pcfinf->tables, pcfinf->ntables, 
-                   (CARD32)PCF_ACCELERATORS))
-                       goto Bail;
-
-       pcfinf->org_bounds = pcfinf->info.maxbounds.metrics;
-
-       if ( !seekToType( pcfinf->tables, pcfinf->ntables, (CARD32)PCF_BITMAPS,
-                       &format, (CARD32 *)NULL, &offset))
-               goto Bail;
-
-       buffp = buftop + offset;
-
-       format = getLSB32( (unsigned char *)buffp ); 
-       buffp += 4;
-       if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT))
-               goto Bail;
-
-       pcfinf->nbitmaps = getINT32( (unsigned char *)buffp, (CARD32)format); 
-       buffp += 4;
-       pcfinf->offsets = (CARD32 *)buffp;
-       buffp += sizeof( *pcfinf->offsets) * pcfinf->nbitmaps;
-
-       bitmapSizes = (CARD32 *)buffp;
-       pcfinf->sizebitmaps = getINT32( (unsigned char *)&bitmapSizes[PCF_GLYPH_PAD_INDEX(format)], (CARD32)format);
-       pcfinf->bmp_fmt = format;
-       buffp += sizeof( *bitmapSizes) * GLYPHPADOPTIONS;
-       pcfinf->bitmaps = buffp;
-       buffp += pcfinf->sizebitmaps;
-
-       if ( !seekToType( pcfinf->tables, pcfinf->ntables, (CARD32)PCF_BDF_ENCODINGS,
-                       &format, (CARD32 *)NULL, &offset))
-               goto Bail;
-
-       buffp = buftop + offset;
-       format = getLSB32( (unsigned char *)buffp ); 
-       buffp += 4;
-       if (!PCF_FORMAT_MATCH(format, PCF_DEFAULT_FORMAT))
-               goto Bail;
-
-       pcfinf->info.firstCol   = getINT16( (unsigned char *)buffp, (CARD32)format); 
-       buffp += 2;
-       pcfinf->info.lastCol    = getINT16( (unsigned char *)buffp, (CARD32)format); 
-       buffp += 2;
-       pcfinf->info.firstRow   = getINT16( (unsigned char *)buffp, (CARD32)format); 
-       buffp += 2;
-       pcfinf->info.lastRow    = getINT16( (unsigned char *)buffp, (CARD32)format); 
-       buffp += 2;
-       /*
-           pcfinf->info.defaultCh      = getINT16( (unsigned char *)buffp, (CARD32)format); buffp += 2;
-       */
-       pcfinf->info.chDefault  = getINT16( (unsigned char *)buffp, (CARD32)format); 
-       buffp += 2;
-
-       pcfinf->info.allExist   = FALSE;
-       pcfinf->enc_fmt = format;
-       pcfinf->encodingOffsets = (CARD16 *)buffp;
-
-       return 0;
-Bail:
-       return -1;
-}
-
-static void
-ByteSwap( p, scan)
-char   *p;
-int    scan;
-{
-       char    w;
-
-       switch( scan) {
-       case 1:
-               break;
-       case 2:
-               w = *p;
-               *p = *(p + 1);
-               *(p + 1) = w;
-               break;
-       case 4:
-               w = *p;
-               *p = *(p + 3);
-               *(p + 3) = w;
-               w = *(p + 1);
-               *(p + 1) = *(p + 2);
-               *(p + 2) = w;
-               break;
-       }
-}
-static void
-repadBits( src, format, width, height, dest)
-char   *src;
-CARD32 format;
-int    width, height;
-char   *dest;
-{
-       int     bit, byte, glyph, scan;
-       int     src_bytewidth, dest_bytewidth;
-       char    work[8];
-       int     i, j;
-
-       bit = PCF_BIT_ORDER( format);
-       byte = PCF_BYTE_ORDER( format);
-       glyph = PCF_GLYPH_PAD( format);
-       scan = PCF_SCAN_UNIT( format);
-
-       src_bytewidth = (( width + ( 8 * glyph ) - 1)/( 8 * glyph)) * glyph;
-       dest_bytewidth = ( width + 7) /8;
-
-       for ( i = 0; i < height; i++, src += src_bytewidth,
-           dest += dest_bytewidth) {
-               for ( j = 0; j < src_bytewidth; j += scan) {
-                       memcpy( work, src + j, scan);
-                       if ( bit == LSBFirst)
-                               BitOrderInvert( work, scan );
-                       if ( byte == LSBFirst)
-                               ByteSwap( work, scan);
-                       if (( j + scan) >= dest_bytewidth) {
-                               memcpy( dest + j, work, dest_bytewidth - j);
-                               break;
-                       }
-                       memcpy( dest + j, work, scan);
-               }
-       }
-}
-
-int                    
-falPcfGlyph( glyph, finf, code)
-char   *glyph;
-Oak_FontInf  *finf;
-int    code;
-{
-       int     encode;
-       int     inner_code;
-       char    *bitmap;
-       int     encodingOffset;
-       int             codeRow, codeCol;
-       int     bytewidth;
-       int bmp_adj, ptn_adj;
-       int adj_hi;
-       int cpy_height;
-       int bmp_height;
-
-       if ( !glyph){
-               fal_utyerrno = FAL_ERR_PARM ;
-               return FAL_ERROR ;
-       }
-
-       inner_code = code;
-       codeCol = inner_code & 0xff;
-       codeRow = (inner_code >> 8) & 0xff;
-
-       /* code check */
-       if (
-           ((code < finf->start) || (code > finf->end))|| 
-           ((codeCol < finf->pFinf->firstCol)||(codeCol > finf->pFinf->lastCol))||
-           ((codeRow < finf->pFinf->firstRow)||(codeRow > finf->pFinf->lastRow))
-           ) {
-               fal_utyexists = 1;
-               return(-1);
-       }
-
-       encode = (codeRow - finf->pFinf->firstRow) * ( finf->pFinf->lastCol - finf->pFinf->firstCol + 1);
-       encode += codeCol - finf->pFinf->firstCol;
-       encodingOffset = getINT16( (unsigned char *)(finf->pcfinf.encodingOffsets + encode), finf->pcfinf.enc_fmt);
-
-       if (encodingOffset == 0xFFFF) {
-               fal_utyexists = 1;
-               return(-1);
-       }
-       fal_utyexists = 0;
-
-       bitmap = finf->pcfinf.bitmaps + getINT32( (unsigned char *)(finf->pcfinf.offsets + encodingOffset), finf->pcfinf.bmp_fmt);
-
-       bmp_height = finf->pFinf->maxbounds.metrics.ascent 
-           + finf->pFinf->maxbounds.metrics.descent;
-       if (( adj_hi = finf->pFinf->maxbounds.metrics.ascent 
-           - finf->pcfinf.org_bounds.ascent) > 0) {
-               bytewidth = 8 * PCF_GLYPH_PAD( finf->pcfinf.bmp_fmt);
-               bytewidth = (( finf->width + bytewidth - 1)/ bytewidth ) * PCF_GLYPH_PAD( finf->pcfinf.bmp_fmt);
-               bmp_adj = bytewidth * adj_hi;
-               ptn_adj = 0;
-               if (( cpy_height = bmp_height - adj_hi) > finf->height)
-                       cpy_height = finf->height;
-       } else if ( adj_hi < 0) {
-               adj_hi *= -1;
-               bytewidth = ( finf->width + 7) / 8;
-               bmp_adj = 0;
-               ptn_adj = bytewidth * adj_hi;
-               if (( cpy_height = finf->height - adj_hi) > bmp_height)
-                       cpy_height = bmp_height;
-       } else {
-               bmp_adj = 0;
-               ptn_adj = 0;
-               cpy_height = finf->height;
-       }
-
-       repadBits( bitmap + bmp_adj , finf->pcfinf.bmp_fmt, finf->width, cpy_height, glyph + ptn_adj);
-       return(0);
-}
-
-void
-falGetPcfGSize( pcfinf, widthp, heightp)
-struct pcf_inf *pcfinf;
-unsigned int   *widthp, *heightp;
-{
-       unsigned int    w, h;
-
-       w = pcfinf->org_bounds.rightSideBearing 
-           - pcfinf->org_bounds.leftSideBearing;
-       h = pcfinf->org_bounds.ascent + pcfinf->org_bounds.descent;
-
-       *widthp = w;
-       *heightp = h;
-}
-
-
-
-
-/********************************************************
- *
- * functions for collect GPF file properties
- *
- *******************************************************/
-
-#include "fontstruct.h"
-
-static char    *getPcfFontProp();
-static char    *getSnfFontProp();
-/*
-* read properties and get font style and 
-* letter size
-*/
-
-int
-falReadFontProp( file, protect_key_data, databuff, islock )
-char                   *file ;         /* name of font file */
-int                    protect_key_data ;
-FalFontData            *databuff ;
-int                    islock ;
-{
-       Oak_FontInf     finf;
-       int             fd ;
-       char            *buf;
-       char            *openfontfile;
-       struct  stat    st;
-       int             rtn ;
-
-       /* initialezation  */
-       openfontfile = file ;
-
-       /* read a condition of a fontfile */
-       if ( stat( openfontfile, &st ) < 0 ) {
-               set_errfile_str( fal_err_file, openfontfile ) ;
-               fal_utyerror = _FAL_STAT_ER;
-               fal_utyderror = errno;
-               fal_utyerrno = FAL_ERR_STAT ;
-               return  FAL_ERROR;
-       }
-
-       if ( st.st_size < sizeof( FontInfoRec ) ) {
-               fal_utyerror = _FAL_FONT_ER;
-               fal_utyderror = 0;
-               fal_utyerrno = FAL_ERR_FONT ;
-               return  FAL_ERROR;
-       }
-
-       /* open a fontfile */
-       if ( (fd = open( openfontfile, ((islock)? O_RDONLY : O_RDWR) )) < 0 ) { 
-            switch( errno ) {
-               case EACCES :
-                   return _FAL_TRY_NEXT ;
-               default :
-                   set_errfile_str( fal_err_file, openfontfile ) ;
-                   fal_utyerror = _FAL_OPEN_ER;
-                   fal_utyderror = errno;
-                   fal_utyerrno = FAL_ERR_FNT_OPN ;
-                   return      FAL_ERROR;
-            }
-       }
-
-#if    defined( SVR4 )
-       buf = (char *)mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
-       if ( buf != (char *)-1 ) {
-               /* if "mmap" is normal end */
-               close( fd );
-               finf.ismmap = TRUE;
-               finf.fsize = st.st_size;
-       } else {
-               /* if "mmap" is abnormal end , try "read()" */
-               finf.ismmap = FALSE;
-               if ( !(buf = (char *)malloc(st.st_size)) ) {
-                       fal_utyerror = _FAL_MALOC_ER;
-                       fal_utyderror = 0;
-                       fal_utyerrno = FAL_ERR_MALLOC ;
-                       close( fd );
-                       return  FAL_ERROR;
-               }
-               if ( read(fd, buf, st.st_size) != st.st_size ) {
-                       set_errfile_str( fal_err_file, openfontfile ) ;
-                       fal_utyerror = _FAL_READ_ER;
-                       fal_utyderror = errno;
-                       fal_utyerrno = FAL_ERR_FNT_RD ;
-                       free( buf );
-                       close( fd );
-                       return  FAL_ERROR;
-               }
-       }
-#else
-       finf.ismmap = FALSE;
-       if ( !(buf = (char *)malloc( st.st_size )) ) {
-               fal_utyerror = _FAL_MALOC_ER;
-               fal_utyderror = 0;
-               fal_utyerrno = FAL_ERR_MALLOC ;
-               close( fd );
-               return  FAL_ERROR;
-       }
-       if ( read(fd, buf, st.st_size) != st.st_size ) {
-               set_errfile_str( fal_err_file, openfontfile ) ;
-               fal_utyerror = _FAL_READ_ER;
-               fal_utyderror = errno;
-               fal_utyerrno = FAL_ERR_FNT_RD ;
-               free( buf );
-               close( fd );
-               return  FAL_ERROR;
-       }
-#endif
-
-       finf.fname = openfontfile ;
-       finf.buf   = buf ;
-
-       /*
-       *       open GPF font file
-       */
-       rtn = falReadGpfProp( FAL_UPDATE_FONTINFO, &finf, protect_key_data, databuff ) ;
-#if    defined( SVR4 )
-       if ( finf.ismmap == TRUE ) {
-               munmap( buf, finf.fsize );
-       } else {
-               free(buf);
-               close(fd);
-       }
-#else
-       free( buf );
-       close( fd );
-#endif
-
-       return( rtn ) ;
-}
-
-
-/*
-*      get properties of GPF format file
-*/
-int
-falReadGpfProp( updflg, finf, protect_key_data, databuff )
-int            updflg ;
-Oak_FontInf    *finf;
-int            protect_key_data ;
-FalFontData    *databuff ;
-{
-       char            *openfontfile;
-       int             rtn ;
-
-       /* initialize  */
-       openfontfile = finf->fname ;
-
-       if( updflg == FAL_UPDATE_FONTINFO ) {
-           /* case of a PCF format font */
-           if ( strcmp( FILE_SUFFIX( openfontfile ), PCFSUFFIX ) == 0 ) {
-
-               finf->isFef = FALSE;
-               finf->isPcf = TRUE;
-
-           }
-           else        /* case of a SNF format font */
-           {
-               FAL_READ_SNF_HEADER( finf, protect_key_data, fal_utyerror, fal_utyderror ) ;
-           }
-       }       /* updflg */
-
-       /*
-       *       get font properties
-       */
-       if ( finf->isFef ){
-               /* read SNF format property */
-               if ( rtn = falInitReadSnfProp( finf, (caddr_t)finf->pFinf, databuff ) ) {
-                       if( rtn == _FAL_TRY_NEXT ){
-                               return( rtn ) ;
-                       }
-                       fal_utyerror = _FAL_FONT_ER;
-                       fal_utyderror = 0;
-                       return  FAL_ERROR;
-               }
-       } else if ( finf->isPcf ) {
-               /* read PCF format property */
-               if ( rtn = falInitReadPcfProp( updflg, finf, databuff ) ) {
-                       if( rtn == _FAL_TRY_NEXT ){
-                               return( rtn ) ;
-                       }
-                       fal_utyerror = _FAL_FONT_ER;
-                       fal_utyderror = 0;
-                       return  FAL_ERROR;
-               }
-
-               if( updflg == FAL_UPDATE_FONTINFO ) {
-                       finf->pFinf = &finf->pcfinf.info;
-                       finf->pCinf = NULL;
-                       finf->pGlyphs = NULL;
-               }
-       } else {
-               fal_utyerror = _FAL_FONT_ER;
-               fal_utyderror = 0;
-               fal_utyerrno = FAL_ERR_FONT ;
-               return  FAL_ERROR;
-       }
-
-       return(0);
-}
-
-
-/*
-*      get properties of PCF format file
-*/
-int
-falInitReadPcfProp( updflg, finf, databuff )
-int            updflg ;
-Oak_FontInf    *finf;  
-FalFontData    *databuff ;
-{
-       struct pcf_inf  *pcfinf;
-       caddr_t         buftop;
-       xCharInfo       maxink;
-       caddr_t buffp;
-       int     lb, rb, as, ds ;
-
-
-
-       pcfinf = &finf->pcfinf ;
-       buftop = finf->buf ;
-
-       if ( getLSB32( (unsigned char *)buftop ) != PCF_FILE_VERSION)
-               return _FAL_TRY_NEXT ;
-
-       if( updflg == FAL_UPDATE_FONTINFO ) {
-               pcfinf->ntables = getLSB32( (unsigned char *)(buftop + 4) );
-
-               pcfinf->tables = (PCFTablePtr)(buftop + 8);
-
-               if ( !getAccel( &pcfinf->info, &maxink, buftop, pcfinf->tables,
-                       pcfinf->ntables, (CARD32)PCF_BDF_ACCELERATORS)) {
-                       if ( !getAccel( &pcfinf->info, &maxink, buftop, pcfinf->tables,
-                               pcfinf->ntables, (CARD32)PCF_ACCELERATORS)) {
-                           fal_utyerrno = FAL_ERR_FONT ;
-                           goto Bail;
-                       }
-               }
-
-       }
-
-       /*
-       *       read property 
-       */
-
-       if( updflg == FAL_UPDATE_FONTINFO ) {
-               pcfinf->org_bounds = pcfinf->info.maxbounds.metrics;
-       }
-
-       lb = pcfinf->org_bounds.leftSideBearing ;
-       rb = pcfinf->org_bounds.rightSideBearing ;
-       as = pcfinf->org_bounds.ascent  ;
-       ds = pcfinf->org_bounds.descent ;
-
-       databuff->size.w = rb - lb ;
-       databuff->size.h = as + ds ;
-
-       /*
-       * read property "FONT"
-       */
-       if ( buffp = getPcfFontProp( buftop, pcfinf->tables,
-                                    pcfinf->ntables, "FONT" )) {
-               if( (databuff->xlfdname = (char *)strdup( buffp )) == (char *)NULL ){
-                       fal_utyerrno = FAL_ERR_MALLOC ;
-                       goto Bail;
-               }
-       }else{
-               set_errfile_str( fal_err_file, finf->fname ) ;
-               fal_utyerrno = FAL_ERR_PROP_FONT ;
-               return( _FAL_TRY_NEXT ) ;
-       }
-
-       /*
-       * read property "FAMILY_NAME"
-       */
-       if ( buffp = getPcfFontProp( buftop, pcfinf->tables,
-                                    pcfinf->ntables, "FAMILY_NAME")) {
-               if( (databuff->style.name = (char *)strdup( buffp )) == NULL ){
-                       fal_utyerrno = FAL_ERR_MALLOC ;
-                       goto Bail ;
-               }
-       }else{
-               set_errfile_str( fal_err_file, finf->fname ) ;
-               fal_utyerrno = FAL_ERR_PROP_FNAME ;
-               return( _FAL_TRY_NEXT ) ;
-       }
-
-       return 0;
-Bail:
-       return -1;
-}
-
-
-
-static char *
-getPcfFontProp( buftop, tables, ntables, propname)
-caddr_t        buftop;
-PCFTablePtr    tables;
-int            ntables;
-char           *propname;
-{
-       caddr_t buffer;
-       int name_ofs;
-       int i ;
-       int nprops;
-       char *propstr ;
-       CARD32  format, offset;
-
-       if ( !seekToType( tables, ntables, (CARD32)PCF_PROPERTIES, &format, (CARD32 *)NULL, &offset))
-               return NULL;
-
-       buffer = buftop + offset;
-       format = getLSB32( (unsigned char *)buffer ); 
-       buffer += 4;
-       if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT))
-               return NULL;
-
-       nprops = getINT32( (unsigned char *)buffer, (CARD32)format); 
-       buffer += 4;
-       propstr = buffer + (4 * ((nprops * 9 + 3) / 4)) + 4;
-
-       for ( i=0; i < nprops ; i++ ) {
-               name_ofs = getINT32( (unsigned char *)buffer, (CARD32)format ) ;
-               buffer += 4 ;   /* name */
-               if ( strcmp( propstr + name_ofs, propname) == 0) {
-                       if ( *buffer) {         /* isStringProp */
-                               return( propstr + getINT32( (unsigned char *)(buffer + 1), (CARD32)format) );
-                       }else{
-                               return((char *)(intptr_t)getINT32( (unsigned char *)(buffer + 1), (CARD32)format) );
-                       }
-               }
-               buffer += 5 ;   /* isStringProp + value */
-       }
-
-       return( NULL);
-}
-
-
-/*
-*      get properties of SNF format file
-*/
-int
-falInitReadSnfProp( finf, buftop, databuff )
-Oak_FontInf            *finf;          /* pointer to the infomation structure */
-caddr_t                        buftop;         /* font file */
-FalFontData            *databuff ;
-{
-       caddr_t stprop ;
-       int     lb, rb, as, ds ;
-       char    *propptr ;
-       char    *fnt = NULL, *fam ;
-       int     nprops, bitmapSize, num_chars ;
-
-
-       /* initialize pointer */
-       nprops    = finf->pFinf->nProps ;
-       num_chars = ( finf->pFinf->lastRow - finf->pFinf->firstRow + 1 ) *
-                   ( finf->pFinf->lastCol - finf->pFinf->firstCol + 1 ) ;
-       bitmapSize = BYTESOFGLYPHINFO(finf->pFinf) ;
-
-       stprop = buftop ;
-       stprop += sizeof(FontInfoRec) ;
-       stprop += num_chars * sizeof(CharInfoRec) ;
-       stprop += bitmapSize ;
-
-       /*
-       *        read property "FONTBOUNDINGBOX"
-       */
-       lb = finf->pFinf->maxbounds.metrics.leftSideBearing ;
-       rb = finf->pFinf->maxbounds.metrics.rightSideBearing ;
-       as = finf->pFinf->maxbounds.metrics.ascent  ;
-       ds = finf->pFinf->maxbounds.metrics.descent ;
-
-       /*
-       *       read property "FONT"
-       */
-       if ( propptr = getSnfFontProp( stprop, nprops, "FONT" )) {
-               if( (fnt = (char *)strdup( propptr )) == NULL ){
-                       fal_utyerrno = FAL_ERR_MALLOC ;
-                       goto Bail;
-               }
-       }else{
-               set_errfile_str( fal_err_file, finf->fname ) ;
-               fal_utyerrno = FAL_ERR_PROP_FONT ;
-               return( _FAL_TRY_NEXT ) ;
-       }
-
-       /*
-       *       read property "FAMILY_NAME"
-       */
-       if ( propptr = getSnfFontProp( stprop, nprops, "FAMILY_NAME")) {
-               if( (fam = (char *)strdup( propptr )) == NULL ){
-                       fal_utyerrno = FAL_ERR_MALLOC ;
-                       goto Bail ;
-               }
-       }else{
-               set_errfile_str( fal_err_file, finf->fname ) ;
-               fal_utyerrno = FAL_ERR_PROP_FNAME ;
-               free(fnt);
-               return( _FAL_TRY_NEXT ) ;
-       }
-
-       /*
-       *       set data buffer
-       */
-
-       databuff->size.w = rb - lb ;
-       databuff->size.h = as + ds ;
-
-       databuff->xlfdname      = fnt ;
-       databuff->style.name    = fam ;
-
-       return 0;
-Bail:
-       free(fnt);
-       return -1;
-}
-
-
-
-static char *
-getSnfFontProp( buftop, nprops, propname )
-caddr_t                buftop;
-int            nprops ;
-char           *propname;
-{
-       caddr_t buffer;
-       int name_ofs;
-       int i ;
-       char *propstr ;
-       FontPropRec     *ProcRec ;
-
-       ProcRec = (FontPropRec *)buftop ;
-       buffer  = (char *)buftop ;
-       propstr = buffer + nprops * sizeof(FontPropRec) ;
-
-       for ( i=0; i < nprops ; i++, ProcRec++ ) {
-               name_ofs = ProcRec->name ;
-               if( strcmp( propstr + name_ofs, propname ) == 0 ){
-                       if( ProcRec->indirect ){
-                           return( propstr + ProcRec->value ) ;
-                       }else{
-                           return( (char *) (intptr_t) ProcRec->value ) ;
-                       }
-               }
-       }
-
-       return( NULL);
-}
-
-/***********************< end of readpcf.c >********************/
diff --git a/cde/programs/dtudcfonted/libfal/syncx.c b/cde/programs/dtudcfonted/libfal/syncx.c
deleted file mode 100644 (file)
index 781ab16..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: syncx.c /main/3 1996/07/04 02:32:52 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-#include <stdio.h>
-
-/*             "fal" -> "X"                                    */
-/* GetFProp.c  falGetFontProperty()            :       Xlib.h  */
-/* omDefault.c _falwcDefaultTextPerCharExtents():      omGeneric.c */
-/* IntAtom.c   falInternAtom()                 :       Xlib.h  */
-/* Font.c      falFreeFont()                   :       Xlib.h  */
-/* FontInfo.c  falFreeFontInfo()               :       Xlib.h */
-/* TextToStr.c falFreeStringList()             :       Xlib.h */
-/* FontNames.c falFreeFontNames()              :       Xlib.h */
-
-/* Bool */ falGetFontProperty()                { return 0 ; }
-/* Status */ _falwcDefaultTextPerCharExtents(){ return 0 ; }
-void   _falmbDefaultDrawImageString()  { return ; }
-/* Atom */ falInternAtom()             { return 0 ; }
-int    _falwcGenericDrawString()       { return 0 ; }
-char   **_falParseBaseFontNameList()   { return NULL ; }
-/* XFontStruct * */ falLoadQueryFont() { return 0 ; }
-falFreeFont()                          { return 0 ; }
-falFreeFontInfo()                      { return 0 ; }
-/* char        ** */ falListFonts()            { return 0 ; }
-void   _falmbGenericDrawImageString()  { return ; }
-void   _falwcDefaultDrawImageString()  { return ; }
-int    _falmbDefaultDrawString()       { return 0 ; }
-int    _falmbGenericTextEscapement()   { return 0 ; }
-void   falFreeStringList()             { return ; }
-/* falrmStringToQuark()                        { return 0 ; } */
-/* falrmPermStringToQuark()            { return 0 ; } */
-int    _falwcDefaultDrawString()       { return 0 ; }
-/* char        * */ falGetAtomName()           { return 0 ; }
-int    _falwcGenericTextExtents()      { return 0 ; }
-int    _falmbGenericTextExtents()      { return 0 ; }
-void   _falwcGenericDrawImageString()  { return ; }
-falFreeFontNames()                     { return 0 ; }
-/* falrmQuarkToString()                        { return 0 ; } */
-int    _falwcDefaultTextExtents()      { return 0 ; }
-/* Status */   _falmbGenericTextPerCharExtents(){ return 0 ; }
-int    _falmbDefaultTextEscapement()   { return 0 ; }
-int    _falwcGenericTextEscapement()   { return 0 ; }
-int    _falmbDefaultTextExtents()      { return 0 ; }
-/* char        ** */ falListFontsWithInfo()    { return 0 ; }
-int    _falwcDefaultTextEscapement()   { return 0 ; }
-/* Status */   _falwcGenericTextPerCharExtents(){ return 0 ; }
-/* _fallcMapOSLocaleName()             { return 0 ; } */
-int    _falmbGenericDrawString()       { return 0 ; }
-/* Status */   _falmbDefaultTextPerCharExtents(){ return 0 ; }
-
diff --git a/cde/programs/dtudcfonted/libfal/syncx.h b/cde/programs/dtudcfonted/libfal/syncx.h
deleted file mode 100644 (file)
index 7c42cc8..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: syncx.h /main/2 1996/06/25 20:04:52 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <X11/Xresource.h>
-#include "_falutil.h"
-
-extern XrmQuark falrmStringToQuark(
-#if NeedFunctionPrototypes
-    _Xconst char*      /* string */
-#endif
-);
-extern XrmString falrmQuarkToString(
-#if NeedFunctionPrototypes
-    XrmQuark           /* quark */
-#endif
-);
-
-extern char *falGetAtomName(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    Atom               /* atom */
-#endif
-);
-
-extern char **falListFonts(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    _Xconst char*      /* pattern */,
-    int                        /* maxnames */,
-    int*               /* actual_count_return */
-#endif
-);
-
-extern char **falListFontsWithInfo(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    _Xconst char*      /* pattern */,
-    int                        /* maxnames */,
-    int*               /* count_return */,
-    XFontStruct**      /* info_return */
-#endif
-);
-
-extern XFontStruct *falLoadQueryFont(
-#if NeedFunctionPrototypes
-    Display*           /* display */,
-    _Xconst char*      /* name */
-#endif
-);
-
diff --git a/cde/programs/dtudcfonted/libfuty/Imakefile b/cde/programs/dtudcfonted/libfuty/Imakefile
deleted file mode 100644 (file)
index e113942..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-XCOMM $XConsortium: Imakefile /main/5 1996/09/09 11:20:01 drk $
-#define DoNormalLib    YES
-#define DoSharedLib    NO
-#define DoDebugLib     NO
-#define DoProfileLib   NO
-#define LibName                oakfuty
-#define LibHeaders     NO
-#define LibInstall     NO
-       FONTLIST    = /config
-
-        OPT1 = -DDEFAULT_CODESET='"'3'"'
-#ifdef X11ProjectRoot
-        OPT2 = -DFONTC='"'$(XPROJECTROOT)/bin/bdftopcf'"'
-#else
-        OPT2 = -DFONTC='"'$(BINDIR)/bdftopcf'"'
-#endif
-        OPT3 = -DSNFFONTC='"'$(SNFFONTC)'"'
-        OPT4 = -DDTUDCFONTSLISTDIR='"'$(CDE_INSTALLATION_TOP)$(FONTLIST)'"'
-        OPT5 = -DDEFAULT_TMPPATH='"'/var/tmp/'"'
-
-       DEFINES     = $(OPT1) $(OPT2) $(OPT3) $(OPT4) $(OPT5)
-
-       INCLUDES    = -I../include -I../libfal/include -I../libfal
-
-           SRCS    = oakfuty.c getfname.c lock.c
-
-           OBJS    = oakfuty.o getfname.o lock.o
-
-#include <Library.tmpl>
-
-DependTarget()
diff --git a/cde/programs/dtudcfonted/libfuty/getfname.c b/cde/programs/dtudcfonted/libfuty/getfname.c
deleted file mode 100644 (file)
index f3fe4cb..0000000
+++ /dev/null
@@ -1,1165 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: getfname.c /main/9 1996/11/08 02:06:43 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include  <sys/types.h>
-#include  <sys/stat.h>
-#include  <locale.h>
-#include  <unistd.h>
-#include  <stdio.h>
-#include  <stdlib.h>
-#include  <errno.h>
-
-#include  "FaLib.h"
-#include  "falfont.h"
-#include  "udcutil.h"
-
-#include  <string.h>
-
-#ifndef SVR4
-#if !defined( SYSV )
-#include <sys/resource.h>
-#endif
-#include  <sys/wait.h>
-#else
-#include  <wait.h>
-#endif /* SVR4 */
-#include  <signal.h>
-
-#include  "bdfgpf.h"
-
-static         void    ErrMsgTable_GetDefaultFile();
-static int     falcom_split_data() ;
-static void    dsp_font_list() ;
-static int     search_Font_File_Name();
-
-extern int     searchFontFileName();
-extern int     falReadFontProp() ;
-
-/* 
- * get "character size" and "letter size" from a character of an interface
- *
- *     return code¡§
- *              1... get "character size"
- *              2... get "character size" and "letter size"
- *             -1... NG
- */
-
-#define        BODY_ONLY       1
-#define        BODY_AND_LETTER 2
-
-static int
-GetSize( size_str, body, letter )
-char   *size_str;      /* a character of a size */
-int    *body;          /* set "character size" (output) */
-int    *letter;        /* set "letter size" (output) */
-{
-       char    *str_dot;
-       /* char *str_end; */
-       int     bdy, ltr;
-
-       str_dot = strchr( size_str, '.');
-       /* str_end = strchr( size_str, '\0'); */
-
-       if ( str_dot == NULL) {
-               /* change a size of "character size"*/
-               if (falcom_atoi( size_str, '\0', &bdy ) ==-1) {
-                       return  -1;
-               }
-               *body = bdy;
-               return  BODY_ONLY;
-       }
-
-       /* change a size of "character size"*/
-       if (falcom_atoi( size_str, '.', &bdy ) ==-1) {
-               return  -1;
-       }
-
-       /* change a size of "letter size"*/
-       str_dot++;
-       if (falcom_atoi( str_dot, '\0', &ltr ) ==-1) {
-               return  -1;
-       }
-       *body   = bdy;
-       *letter = ltr;
-       return  BODY_AND_LETTER;
-}
-
-
-/*
- *
- * change numerical character for numarical data
- *
- */
-
-int
-#if NeedFunctionPrototypes
-falcom_atoi(
-    char       *str,   /* numerical character */
-    char       ed_code,/* an end code in numerical character */
-    int        *val    /* set numarical data */
-)
-#else
-falcom_atoi(str, ed_code, val)
-char   *str;   /* numerical character */
-char   ed_code;/* an end code in numerical character */
-int    *val;   /* set numarical data */
-#endif
-{
-       char    *ptr;
-       char    *str_end;
-       int     tmp;
-
-       /* get an end index */
-       str_end = strchr( str, ed_code );
-
-       /* change numarical data */
-       tmp = (int)strtol(str, &ptr, 10);
-
-       /* error check */
-       if ((ptr == str) || (ptr != str_end)) {
-               return(-1);
-       }
-       *val = tmp;
-       return  0;
-}
-
-
-static int
-falcom_cr_to_null(buf)
-char   *buf;
-{
-       buf = strchr( buf, '\n');
-       if (buf != NULL) {
-               *buf = '\0';
-       }
-       return  0;
-}
-
-
-
-#define        FALCOM_DATA_ELM         3
-
-#define        FALCOM_ELM_SIZE         0
-#define        FALCOM_ELM_STYLE        1
-#define        FALCOM_ELM_FNAME        2
-
-
-int
-#if NeedFunctionPrototypes
-GetDefaultFile( 
-    int                size,
-    char       *style,
-    char       *fname
-)
-#else
-GetDefaultFile( size, style, fname )
-int    size;           /* character size */
-char   *style;         /* character style */
-char   *fname;         /* buffer */
-#endif
-{
-       FILE    *fp;
-       int     ret;
-
-
-       char    *locale;
-       char    *fal_search_path;
-       char    uflist_d[BUFSIZE];
-       char    uflist_c[ BUFSIZE ];
-       char    uflist_l[ BUFSIZE ];
-
-       GETLISTFILEPATH( locale, fal_search_path, uflist_d, uflist_c, uflist_l, UDFLIST_DEF ) ;
-
-       if ( ( fp = fopen( uflist_l, "r" ) ) == NULL ) {
-           if ( ( fp = fopen( uflist_c, "r" ) ) == NULL ) {
-               if ( ( fp = fopen( uflist_d, "r" ) ) == NULL ) {
-                   return  FAL_ERROR;
-               }
-           }
-       }
-
-       ret = get_default_file( fp, size, style, fname );
-       fclose( fp );
-       return  ret;
-}
-
-
-int
-#if NeedFunctionPrototypes
-get_default_file( 
-    FILE       *fp,
-    int                size,
-    char       *style, 
-    char       *fname  
-)
-#else
-get_default_file( fp, size, style, fname )
-FILE   *fp;
-int    size;           /* character size */
-char   *style;         /* character style */
-char   *fname;         /* buffer */
-#endif
-{
-       char    buf[BUFSIZE];           /* buffer */
-       int     size_tmp;               /* size (read file) */
-       int     ret;
-       char    *elm[FALCOM_DATA_ELM];
-
-       ret = 0;
-
-       /* read from a file */
-       while( fgets(buf, BUFSIZE, fp) != (char *)NULL ) {
-
-               falcom_cr_to_null( buf );
-               if ((buf[0] == '#') || (buf[0] == '\0')) {
-                       continue;
-               }
-               if (falcom_split_data( buf, FALCOM_DATA_ELM, &elm ) == -1) {
-                       ret = -4;
-                       continue;
-               }
-               if (falcom_atoi( elm[FALCOM_ELM_SIZE], '\0', &size_tmp ) == -1) {
-                       ret = -4;
-                       continue;
-               }
-               if ( style ) {
-                   if ((size_tmp == size) && !strcmp(elm[FALCOM_ELM_STYLE], style)) {
-                       strcpy( fname, elm[FALCOM_ELM_FNAME] );
-                       fclose( fp );
-                       return  0;
-                   }
-               }
-       }
-       if (ret != 0) {
-               return  ret;
-       }
-
-       if ( feof(fp) != 0 ) {
-               return  -2;
-       }
-       return  -3;
-}
-
-/**************************************************************/
-/* read from a file and divide a data that read from file     */
-/**************************************************************/
-
-static int
-falcom_split_data( buf, entry_num, elm )
-char   *buf;           /* read a font information character array from a file */
-int    entry_num;
-char   *elm[];
-{
-       int     cnt;            /* counter */
-       int     strtop_flg;     /* flag of a head of a character array */
-
-       /* divide a data */
-       strtop_flg = 1;
-       for (cnt=0  ; *buf != '\0' && cnt < entry_num  ;  buf++){
-               /* skip a separate character */
-               if ((*buf == '\t') || (*buf == ' ')) {
-                       /* change NULL */
-                       *buf = '\0';
-                       /* skip a separate character */
-                       do {
-                               buf++;
-                       } while((*buf == '\t') || (*buf == ' '));
-                       strtop_flg = 1;
-               }
-               if (strtop_flg) {
-                       elm[cnt] = buf;
-                       cnt++;
-                       strtop_flg = 0;
-               }
-       }
-       /* check a data's number */
-       if (cnt != entry_num ) {
-               return  -1;
-       }
-       return  0;
-}
-
-
-char *
-#if NeedFunctionPrototypes
-falcom_get_base_name( char     *str )  
-#else
-falcom_get_base_name( str )
-char   *str;   /* a full path character of a file name */
-#endif
-{
-       char    *str_slash;
-
-       str_slash = strrchr( str, '/');
-       if ( str_slash == NULL ) {
-               return  str;
-       }
-       return  ++str_slash;
-}
-
-
-static int
-is_letter_size_not_only_one( lst )
-FalFontDataList        *lst;   /* a font list */
-{
-       int     i, letter_cmp;
-
-       letter_cmp = lst->list[0].letter.h;
-       for (i=0 ; i < lst->num ; i++) {
-               if (lst->list[i].letter.h != letter_cmp){
-                       return  1;
-               }
-       }
-       return  0;
-}
-
-
-/* 
- * get a real file name from a character of "size" and "style"
- *
- * return code¡§
- *              0 ... OK
- *             -1 ... NG
- *
- */
-int
-#if NeedFunctionPrototypes
-GetFileName(
-    char       *com,
-    char       *size_str,
-    char       *style, 
-    int        codeset,
-    char       *ofile  
-)
-#else
-GetFileName(com, size_str, style, codeset, ofile)
-char   *com;           /* a character of a command name(case error) */
-char   *size_str;      /* a character of "size" */
-char   *style;         /* a character of "style" */
-int    codeset;        /* a codeset */
-char   *ofile;         /* set a target file name (output) */
-#endif
-{
-       int     body, letter;
-       int     size_sw;                /* a size flag */
-       char    buf[BUFSIZE] ;          /* an area for a file name */
-       char    *filename;              /* a pointer for a file name */
-       char    fname[BUFSIZE];         /* a pointer for a file name */
-       FalFontDataList *lst;           /* a font list */
-       FalFontData     key;            /* search an information of a font */
-       unsigned int    mask;           /* search a mask of a font */
-       int     i, ret;
-       struct  stat    statbuf ;
-       char    *locale;
-
-       char    *fal_search_path;
-       char    uflist_d[ BUFSIZE ];
-       char    uflist_c[ BUFSIZE ];
-       char    uflist_l[ BUFSIZE ];
-
-       GETLISTFILEPATH( locale, fal_search_path, uflist_d, uflist_c, uflist_l, UDFLIST_DEF ) ;
-
-       /* change a character of a size */
-       if ((size_sw = GetSize(size_str, &body, &letter)) == -1) {
-               USAGE2("%s : The specification of the character size is improper.\"%s\"\n",
-                       com, size_str);
-               return  -1;
-       }
-
-       mask = 0;
-       mask |= FAL_FONT_MASK_UNDEFINED ;
-       mask |= FAL_FONT_MASK_DEFINED ;
-       memset( &key, '\0', sizeof(FalFontData) ) ;
-       /* set information to search fonts */
-
-       key.cd_set = FALGETFALCODESET( codeset ) ;
-       mask |= FAL_FONT_MASK_CODE_SET ;
-
-       switch( size_sw ) {
-       case BODY_AND_LETTER:
-               key.letter.h  = letter;         
-               mask |= FAL_FONT_MASK_LETTER_H;
-       case BODY_ONLY:
-               key.size.h    = body;           
-               mask |= FAL_FONT_MASK_SIZE_H;
-       }
-
-       /* aet and check an information of a style */
-       COMM_SETSTYLE_TO_FONTDATA( style, key, mask ) ; 
-
-       /* get a font information */
-       if (FalGetFontList( &key, mask, &lst ) == FAL_ERROR ) {
-               ErrMsgTable_FalGetFontList( com, fal_utyerror, fal_utyderror );
-               return  -1;
-       }
-
-       if ( lst->num == 0 ) {  
-               USAGE3("%s : The user defined character of the specified size and style does not exist.\"%s , %s\"\n",
-                       com, size_str, (style)?style:" ");
-               FalFreeFontList( lst );
-               return  -1;
-       }
-
-       memset( fname, '\0', sizeof(fname) ) ;
-       switch( size_sw ) {
-       case BODY_ONLY:
-
-           if ( is_letter_size_not_only_one(lst) ) {
-               ret = GetDefaultFile( key.size.h, style, buf) ; 
-               if ( ret < 0 ) {
-                   COMM_GET_DEFAULTFILE_ERROR( buf, com, ret, key.size.h, style, uflist_d, uflist_c, uflist_l, statbuf ) ;
-               }
-               for ( i = 0 ; i < lst->num; i++ ) {
-                   ret = search_Font_File_Name( lst->list[i], fname );
-                   if ( ret == FAL_ERROR ) {
-                       FalFreeFontList( lst );
-                       return  -1;
-                   }
-                   filename = falcom_get_base_name( fname );
-                   if ( (buf[0] != '\0' && fname[0] != '\0')
-                       && !strcmp( buf, filename ) ) {
-                       strcpy( ofile, fname );
-                       FalFreeFontList( lst );
-                       return  0;
-                   }
-               }
-               COMM_DISPERRORFILE( com, lst, style, i, size_str ) ;
-               FalFreeFontList( lst );
-               return  -1;
-           }
-
-       case BODY_AND_LETTER:
-               switch( lst->num ) {
-               case 1:
-                       ret = search_Font_File_Name( lst->list[0], fname );
-                       if ( ret == FAL_ERROR ) {
-                               FalFreeFontList( lst );
-                               return  -1;
-                       }
-                       strcpy( ofile, fname );
-                       FalFreeFontList( lst );
-                       return  0;
-               default:
-                       ret = GetDefaultFile( key.size.h, style, buf);
-                       if ( ret < 0 ) {
-                               buf[0]='\0';
-                       }
-                       for( i = 0 ; i < lst->num; i++ ) {
-                           ret = search_Font_File_Name( lst->list[0], fname );
-                           if ( ret == FAL_ERROR ) {
-                               FalFreeFontList( lst );
-                               return  -1;
-                           }
-                           filename = falcom_get_base_name( fname );
-                           if ( (buf[0] != '\0' && fname[0] != '\0')
-                               && !strcmp( buf, filename ) ) {
-                               strcpy( ofile, fname );
-                               FalFreeFontList( lst );
-                               return  0;
-                           }
-                       }
-                       USAGE1("%s : Two or more corresponding user defined characters exist.\n", com);
-                       for ( i = 0 ; i < lst->num; i++ ) {
-                           ret = search_Font_File_Name( lst->list[i], fname );
-                           if ( ret == FAL_ERROR ) {
-                               FalFreeFontList( lst );
-                               return  -1;
-                           }
-                           fprintf( stdout, "\t%s\n", fname );
-                       }
-                       FalFreeFontList( lst );
-                       return  -1;
-               }               /* <--- switch( lst->num ) { */
-       }                       /* <--- switch( size_sw ) { */
-       return -1 ;
-}
-
-
-/* take out an error message of "FalGetFontList()" */
-
-/*
- * Error messages(by origin)
- */
-char   *fal_errmsg_org[0xff] = {
-/* 0x00 */
-    " ",
-    "Cannot open the font file.",
-    "Cannot read the font file.",
-    "There is no more memory .",
-    "Fatal error occurred.",
-    "The specified font file does not exist.",
-    "This font is not a pcf or snf format.",
-    "Cannot open fonts.list file.",
-    "The format of fonts.list file is illegal.",
-    "The descriptions of the fonts.list file are incorrect.",
-    "The format of fonts.list file is illegal.",
-    "Cannot open fonts.dir file.",
-    "Cannot read fonts.dir file.",
-    "Cannot read font properties.",
-    "Cannot get \"FONT\" property.",
-    "Cannot get \"FAMILY_NAME\" property.",
-/* 0x10 */
-    "This font file is already opened by other application.",
-    "Cannot lock font file.",
-    "Cannot unlock font file.",
-    "Cannot get lock information from the font file.",
-    "Cannot find the specified font file.",
-    "Cannot read NLS database.",
-    "Cannot get charset names from NLS database.",
-    "Charset name not defined in NLS database.",
-    "The specified font has not been opened.",
-    "Fatal error occurred.",
-    " "," "," "," "," "," ",
-/* 0x20 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ", 
-/* 0x30 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ", 
-/* 0x40 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",
-/* 0x50 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",
-/* 0x60 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",
-/* 0x70 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",
-/* 0x80 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",
-/* 0x90 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",
-/* 0xa0 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",
-/* 0xb0 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",
-/* 0xc0 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",
-/* 0xd0 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",
-/* 0xe0 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",
-/* 0xf0 */
-    " "," "," "," "," "," "," "," "," "," "," "," "," "," "," "
-} ;
-
-
-void
-#if NeedFunctionPrototypes
-ErrMsgTable_FalGetFontList(
-    char       *com,
-    int                utyerr,
-    int                utyderr
-)
-#else
-ErrMsgTable_FalGetFontList( com, utyerr, utyderr )
-char   *com;           /* command name */
-int    utyerr;         /* fal_utyerror */
-int    utyderr;        /* fal_utyderror */
-#endif
-{
-       char    *fontsdir, *locale ;
-
-       if( (locale = (char *)getenv( "LANG" )) == NULL ){
-           locale = "C" ;
-       }
-
-       if( (fontsdir = (char *)getenv( "DTUDCFONTS" )) == NULL ) {
-           fontsdir = DTUDCFONTSLISTDIR ;
-       }
-       switch( utyerr ) {
-       case 1:
-               if( fal_utyerrno ) {
-                   USAGE2("%s : %s\n", com, fal_errmsg_org[ fal_utyerrno & 0xff ] ) ;
-                   return ;
-               }
-               USAGE4("%s : The font directory information file(%s/%s/%s) cannot be opened.\n",
-                       com, fontsdir, locale, FONTS_LIST_FILE ) ;
-               break;
-       case 2:
-               USAGE4("%s : Information cannot be read from the font directory information file(%s/%s/%s).\n", com, fontsdir, locale, FONTS_LIST_FILE );
-               break;
-       case 3:
-               USAGE1("%s : The work area cannot be secured.\n", com );
-               break;
-       case 7:
-               USAGE4("%s :  Abnormality is found in the content of the font directory information file((%s/%s/%s).\n",
-                       com , fontsdir, locale, FONTS_LIST_FILE);
-               break;
-       case 8:
-               USAGE4("%s : The font directory information file(%s/%s/%s) cannot be opened.\n",
-                       com , fontsdir, locale, FONTS_LIST_FILE);
-               break;
-       case 9:
-               USAGE4("%s : Information cannot be read from the font directory information file(%s/%s/%s).\n",
-                       com , fontsdir, locale, FONTS_LIST_FILE);
-       default:
-               if( fal_utyerrno ) {
-                   USAGE2("%s : %s\n", com, fal_errmsg_org[ fal_utyerrno & 0xff ] ) ;
-                   return ;
-               }
-               USAGE1("%s : Terminates abnormally.\n", com );
-       }
-}
-
-
-
-/* take out an error message of "GetDefaultFile()" */
-
-static void
-ErrMsgTable_GetDefaultFile( com, ret, size, style, fname )
-char   *com;                   /* a command name */
-int    ret;                    /* return code */
-int    size;                   /* a character size */
-char   *style;                 /* a character style */
-char   *fname;                 /* user defined character information file name */
-{
-       switch (ret) {
-       case -1:
-               USAGE2("%s : The user defined character information file cannot be opened. \"%s \"\n",
-                       com, fname);
-               break;
-       case -2:
-               USAGE4("%s : The representative user defined character of the character size (%d) and style (%s) is not defined.\"%s\"\n",
-                       com, size, (style)?style:" ", fname);
-               break;
-       case -3:
-               USAGE2("%s : Information cannot be read from the user defined character information file.\"%s\"\n", com, fname);
-               break;
-       case -4:
-               USAGE2("%s : The mistake is found in the description of the user defined character information file. \"%s\"\n", com, fname);
-               break;
-       }
-}
-
-
-/* 
- * if an end character of a file name is "/",it is cleared
- *
- * return code¡§none
- *      none
- */
-
-void
-#if NeedFunctionPrototypes
-fal_cut_tailslash( char *name )
-#else
-fal_cut_tailslash( name )
-char *name;
-#endif
-{
-       char *p;
-
-       p = strrchr( name, '\0');
-       if (p == NULL) {
-               return;
-       }
-       for (p-- ; (p>=name) && (*p == '/') ; p--) {
-               *p = '\0';
-       }
-}
-
-
-/* 
- * get a real file name from a link file name
- *
- * return code¡§
- *     OK¡¡¡¥¡¥a pointer of a file name
- *     NG¡¡¡¥¡¥NULL
- *
- */
-
-char   *
-#if NeedFunctionPrototypes
-GetRealFileName( char  *name )
-#else
-GetRealFileName( name )
-char   *name;
-#endif
-{
-       static char     *ret_name ;
-       char    link_name[BUFSIZE];
-       int             len;
-
-       struct stat st;
-
-       AllocString( ret_name, name, NULL ) ;
-       /* strcpy( ret_name, name ) ; */
-       fal_cut_tailslash( ret_name ); /* for example /tmp/aa/ --> /tmp/aa  */
-
-       while ( 1 ) {
-               if ( lstat( ret_name, &st ) == -1) {
-                       FreeString( ret_name ) ;
-                       return  NULL;
-               }
-               errno = 0;
-               if ( ( len = readlink( ret_name, link_name, BUFSIZE ) ) == -1 ) {
-                       if ( errno == EINVAL ) {
-                               return( ret_name ) ;
-                               /* return( strdup( ret_name ) ) ; */
-                       } else {
-                               FreeString( ret_name ) ;
-                               return  NULL;
-                       }
-               }
-               link_name[len-1] = 0;
-               if ( link_name[0] == '/' ) {
-                       /* strcpy( ret_name, link_name ) ; */
-                       FreeString( ret_name ) ;
-                       AllocString( ret_name, link_name, NULL ) ;
-               } else {
-                       char    *slash;
-
-                       slash = strrchr( ret_name, '/' );
-                       if (slash != NULL) {
-                               *slash = '\0';
-                               fal_cut_tailslash( ret_name );
-                               ResizeString( ret_name, NULL );
-                               AddString(ret_name, "/", NULL);
-                       } else {
-                               /* ret_name[0] = '\0' ; */
-                               FreeString( ret_name ) ;
-                               AllocString(ret_name, "/", NULL);
-                       }
-                       /* strcat( ret_name, "/" ) ;
-                       strcat( ret_name, link_name ) ; */
-                       AddString( ret_name, link_name, NULL ) ;
-               }
-       }
-}
-
-
-
-/*
- *     funtctions for search fonts by XLFD and NLS database
- */
-
-int
-#if NeedFunctionPrototypes
-IsInRegion(
-    int                        code ,
-    int                        num_gr ,
-    FalGlyphRegion     *gr
-)
-#else
-IsInRegion(code, num_gr, gr)
-int            code ;
-int            num_gr ;
-FalGlyphRegion *gr ;
-#endif
-{
-       int     i ;
-       if( code < MIN_CODE || code > MAX_CODE )        return -1 ;
-       for( i=0; i<num_gr; i++ ) {
-           if( gr[i].start < MIN_CODE || gr[i].end > MAX_CODE )        continue ;
-           if( gr[i].start <= code && gr[i].end >= code )
-               return 0 ;
-       }
-       return -1 ;
-}
-
-
-
-
-static int
-search_Font_File_Name( data, fname )
-FalFontData    data ;
-char           *fname ;
-{
-       FalFontID       fid ;
-       FalFontDataList *flist ;
-       int             mask ;
-       char            *tmp_fname ;
-
-       mask = FAL_FONT_MASK_UNDEFINED | FAL_FONT_MASK_DEFINED ;
-
-       if( data.xlfdname )     mask |= FAL_FONT_MASK_XLFDNAME ; 
-       if( data.size.h )       mask |= FAL_FONT_MASK_SIZE_H ;
-       if( data.size.w >= 0 )  mask |= FAL_FONT_MASK_SIZE_W ;
-       if( data.style.name )   mask |= FAL_FONT_MASK_STYLE_NAME ;
-       if( data.cd_set )       mask |= FAL_FONT_MASK_CODE_SET ;
-
-       if( data.letter.w )     mask |= FAL_FONT_MASK_LETTER_W ;
-       if( data.letter.h )     mask |= FAL_FONT_MASK_LETTER_H ;
-       if( data.letter.x )     mask |= FAL_FONT_MASK_LETTER_X ;
-       if( data.letter.y )     mask |= FAL_FONT_MASK_LETTER_Y ;
-
-       if( data.style.def )    mask |= FAL_FONT_MASK_STYLE_DEF ;
-       if( data.shape.name )   mask |= FAL_FONT_MASK_SHAPE_NAME ;
-       if( data.shape.def )    mask |= FAL_FONT_MASK_SHAPE_DEF ;
-       COMM_SBCHR_SETFONTDATA( data, mask ) ;
-       if( data.prm )          mask |= FAL_FONT_MASK_PERMISSION ;
-
-       fid = FalOpenSysFont( &data, mask, &flist ) ;
-       if( fid == 0 ) {
-           memset( fname, '\0', sizeof(fname) ) ;
-           if( flist ){
-               dsp_font_list( flist ) ;
-               FalFreeFontList( flist ) ;
-               return(-1);
-           } else {
-               switch( fal_utyerror ) {
-               case _FAL_OPEN_ER :
-               case _FAL_READ_ER :
-               case _FAL_STAT_ER :
-                   switch( fal_utyderror ) {
-                   case EACCES :
-                   case ENOENT :
-                       return(0) ;
-                   default :
-                       USAGE3("There is no font file correspond to specified font.\n(%s)\n fal_utyerror = %d fal_utyderror = %d\n",
-                       ((data.xlfdname)?data.xlfdname:"null font name"), fal_utyerror, fal_utyderror ) ;
-                       return(-2) ;
-                   }
-               case _FAL_MALOC_ER :
-                   USAGE("System call error occurred.\n" ) ;
-                   return(-2) ;
-               default :
-                   USAGE3("There is no font file correspond to specified font.\n(%s)\n fal_utyerror = %d fal_utyderror = %d\n",
-                   ((data.xlfdname)?data.xlfdname:"null font name"), fal_utyerror, fal_utyderror ) ;
-                       return(-2) ;
-               }
-           }
-       } 
-       if( FalFontIDToFileName( fid, &tmp_fname ) == FAL_ERROR ) {
-           USAGE3("There is no font file correspond to specified font.\n(%s)\n fal_utyerror = %d fal_utyderror = %d\n",
-           ((data.xlfdname)?data.xlfdname:"null font name"), fal_utyerror, fal_utyderror ) ;
-           FalCloseFont( fid ) ;
-           return(-1) ;
-       }
-       strcpy( fname, tmp_fname ) ;
-       FalFree( tmp_fname ) ;
-       FalCloseFont( fid ) ;
-
-       return(0) ;
-}
-
-
-int
-#if NeedFunctionPrototypes
-GetUdcFileName(
-    char       *com ,
-    int        code_no ,
-    char       *xlfdname ,
-    char       *fname
-)
-#else
-GetUdcFileName( com, code_no, xlfdname, fname )
-char   *com ;
-int    code_no ;
-char   *xlfdname ;
-char   *fname ;
-#endif
-{
-       FalFontData     data ;
-
-       if( !xlfdname || !fname ) {
-           USAGE1("%s: null parameter\n", com ) ;
-           return(-1) ;
-       }
-       memset( &data, '\0', sizeof(FalFontData) ) ;
-       data.size.w = -1 ;
-       data.xlfdname = xlfdname ;
-       data.cd_set = FALGETFALCODESET( code_no ) ;
-       return( search_Font_File_Name( data, fname ) ) ;
-}
-
-
-static void
-dsp_font_list( flist )
-FalFontDataList        *flist ;
-{
-       int     i ;
-
-       USAGE(" code set / size / style / xlfd\n" ) ; 
-       USAGE("-------------------------------------------------------\n" ) ; 
-       for( i=0; i<flist->num; i++ ) {
-           USAGE4("\t%d\t%d\t%s\t%s\n", 
-                   FALCODESETTONUM( flist->list[i].cd_set ),
-                   flist->list[i].size.h,
-                   flist->list[i].style.name,
-                   flist->list[i].xlfdname
-               ) ;
-       }
-}
-
-
-int
-#if NeedFunctionPrototypes
-GetUdcRegion( 
-    char       *com ,
-    int                codeset ,
-    char       *gpf_file ,
-    int                *num_gr ,
-    FalGlyphRegion     **gr
-)
-#else
-GetUdcRegion( com, codeset, gpf_file, num_gr, gr )
-char           *com ;
-int            codeset ;
-char           *gpf_file ;
-int            *num_gr ;
-FalGlyphRegion **gr ;
-#endif
-{
-       FalFontData     fdata ;
-       char    *locale, *char_set, *tmp_gpf ;  
-
-       if( (locale = (char *)getenv( "LANG" )) == NULL ){
-           locale = "C" ;
-       }
-       /* parameter check */
-       if( gpf_file == NULL || gr == NULL ) {
-               USAGE1("%s : null parameters.\n", com);
-               return( -1 ) ;
-       }
-
-       /* get font properties */
-       tmp_gpf = (char *)GetRealFileName( gpf_file ) ;
-       if( tmp_gpf == NULL ){
-               return -1 ;
-       }
-       if( falReadFontProp( tmp_gpf, FAL_FONT_PRM, &fdata, 1 ) ) {
-               USAGE1("%s : Failed to get font properties.\n", com ) ;
-               return -1 ;
-       }
-
-       GETCHARSETSTR( char_set, fdata.xlfdname ) ;
-       if( FalGetUDCGIArea( locale, FALGETFALCODESET(codeset), char_set, gr, num_gr ) == FAL_ERROR )
-       {
-               USAGE3("%s : Failed to get UDC code region. ( code set %d charset %s )\n",
-                               com, codeset, char_set ) ;
-               return( -1 );   
-       }
-
-       if( *num_gr == 0 ) {
-               USAGE3("%s : Failed to get UDC code region. ( code set %d charset %s )\n",
-                               com, codeset, char_set ) ;
-               return -1 ;
-       }
-
-       return(0) ;
-}
-
-
-
-#define        MAX_CODESET     8
-
-int
-#if NeedFunctionPrototypes
-DispUdcCpArea( FILE    *fp )
-#else
-DispUdcCpArea( fp )
-FILE   *fp ;
-#endif
-{
-       int     cd_set, j ;
-       FalFontDataList *fls ;
-       FalFontData     fdata ;
-       int             mask ;
-       FalCodeRegion   *cr ;
-       int             num_cr ;
-       char            *locale ;
-
-       if( (locale = (char *)getenv( "LANG" )) == NULL ){
-           locale = "C" ;
-       }
-       memset( &fdata, 0, sizeof(FalFontData) ) ;
-       mask = 0 ;
-       mask =  FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED |
-               FAL_FONT_MASK_CODE_SET ;
-
-       for( cd_set=0; cd_set<MAX_CODESET; cd_set++ ){
-               char    *char_set ;
-               fdata.cd_set = FALGETFALCODESET(cd_set) ;
-               if( FalGetFontList(&fdata, mask, &fls) == FAL_ERROR ){
-                   return -1 ;
-               }
-               if( fls->num == 0 ){
-                   continue ;
-               }
-               GETCHARSETSTR( char_set, fls->list[0].xlfdname ) ;
-               if( FalGetUDCCPArea( locale,
-                               fls->list[0].cd_set, char_set, &cr, &num_cr ) == FAL_ERROR ){
-                   return -1 ;
-               }
-               if( num_cr == 0 ){
-                   continue ;
-               }
-               /* display UDC code region */
-               USAGE1("  %d", cd_set ) ;
-               for( j=0; j<num_cr; j++ ){
-                   USAGE2("\t\t0x%x - 0x%x\n", cr[j].start, cr[j].end ) ;
-               }
-               if( FalFreeFontList( fls ) == FAL_ERROR ){
-                   return -1 ;
-               }
-       }
-       return 0 ;
-}
-
-
-
-int    
-#if NeedFunctionPrototypes
-GetUdcFontName( 
-    char       *gpf_file ,
-    char       *bdf_file ,
-    char       **fontname
-)
-#else
-GetUdcFontName( gpf_file, bdf_file, fontname )
-char   *gpf_file ;
-char   *bdf_file ;
-char   **fontname ;
-#endif
-{
-       FILE    *fp ;
-       pid_t   chld_pid = 0;
-#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__)
-       int     chld_stat ;
-#else
-       union   wait    chld_stat ;
-#endif
-       struct  ptobhead head ;
-       char    *p, *tmp_font ;
-       char    readbuf[BUFSIZE], fntbuf[BUFSIZE] ;
-       unsigned int    getstat;
-       int     fd[2];
-
-       p = tmp_font = NULL ;
-       /*
-        * get temorary file
-        */
-       memset( &head, 0, sizeof(struct ptobhead) ) ;
-       if( gpf_file ){
-           head.snf_file = GetRealFileName( gpf_file ) ;
-           if( head.snf_file == NULL ) return STAT_ERROR ;
-       }else if( bdf_file ){
-           head.bdf_file = GetRealFileName( bdf_file ) ;
-           if( head.bdf_file == NULL ) return STAT_ERROR ;
-       }else{
-           return STAT_ERROR ;
-       }
-
-       /*
-        * write BDF header into FIFO
-        */
-       if (head.snf_file != NULL) {
-           if (pipe(fd) != 0) {
-               return  PIPE_ERROR;
-           }
-           switch (chld_pid = fork()) {
-           case        0:
-               close(1);
-               if(dup(fd[1]) < 0) {
-                   return(DUP_ERROR);
-               }
-               close(fd[0]);
-               close(fd[1]);
-               execl( oakgtobdf, oakgtobdf, head.snf_file, "-H", 0);
-               USAGE1("Cannot execute %s\n", oakgtobdf ) ;
-               return  EXEC_ERROR;
-           case        -1:
-               return(FORK_ERROR);
-           default:
-               break;
-           }
-           close(fd[1]);
-           if((fp = (FILE *)fdopen(fd[0], "r")) == NULL) {
-               close( fd[0] );
-               kill( chld_pid, SIGKILL );
-               WaitID( chld_pid, chld_stat ) ;
-               return  FDOPEN_ERROR;
-           }
-       } else {
-           if ((fp = fopen(head.bdf_file, "r")) == NULL) {
-               return(BDF_OPEN_HEAD);
-           }
-       }
-
-       /*
-        * read BDF header
-        */
-       getstat = 0 ;
-       while ( 1 ) {
-           if (fgets(readbuf, BUFSIZE, fp) == NULL) {
-               fclose( fp );
-               if (head.snf_file != NULL) {
-                   kill( chld_pid, SIGKILL );
-                   WaitID( chld_pid, chld_stat ) ;
-               }
-               return(BDF_INVAL);
-           }
-           p = readbuf;
-           SCAN_TO_NONSP(p);
-
-           if (!strncmp( p, "ENDPROPERTIES", strlen("ENDPROPERTIES") )) {
-               fclose( fp );
-               if (head.snf_file != NULL) {
-                   kill( chld_pid, SIGKILL );
-                   WaitID( chld_pid, chld_stat ) ;
-               }
-               return(BDF_INVAL);
-           }
-           if (!strncmp( p, "FONT ", strlen("FONT ") )) {
-               char    *sp, *ep ;
-               sp = ep = p ;
-               SCAN_TO_NONSP(sp);
-               sp++ ;
-               while( *ep != '\n' ){
-                   ep++ ;
-               }
-               *ep = '\0' ;
-               snprintf(fntbuf, sizeof(fntbuf), "%s", sp) ;
-               getstat |= 0x01 ;
-               fclose( fp );
-               if (head.snf_file != NULL) {
-                   kill( chld_pid, SIGKILL );
-                   WaitID( chld_pid, chld_stat ) ;
-               }
-               break;
-           }
-       }
-
-       if( getstat != 0x01 ){
-               return BDF_INVAL ;
-       }
-
-       /*
-        * dup font name
-        */
-       if( (tmp_font = (char *)strdup( fntbuf )) == NULL ){
-           return MALLOC_ERROR ;
-       }
-       *fontname = tmp_font ;
-
-       return 0 ;
-}
-
-
diff --git a/cde/programs/dtudcfonted/libfuty/lock.c b/cde/programs/dtudcfonted/libfuty/lock.c
deleted file mode 100644 (file)
index 2e5c89b..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: lock.c /main/5 1996/11/08 02:07:28 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include       <stdio.h>
-#include       <errno.h>
-#include       <sys/types.h>
-#include       <fcntl.h>
-#include       <unistd.h>
-#include       "udcutil.h"
-
-/*
- * FileLock( fd )
- * fd: file descripter
- *
- * lock a file by a writing mode
- *
- * normal end : 0
- * abnormal end : -1
- *
- */
-
-int 
-#if NeedFunctionPrototypes
-FileLock( int fd )
-#else
-FileLock( fd )
-int    fd;             /* a file descripter */
-#endif
-{
-
-       struct flock    flpar;
-
-
-       flpar.l_type = F_RDLCK;
-       flpar.l_start = 0;
-       flpar.l_len = 0;
-       flpar.l_whence = 0;
-
-       if ( fcntl( fd, F_SETLK, &flpar ) == -1 ) {
-               USAGE("Write lock not success \n" );
-               return  -1; 
-       }
-
-       return  0;
-}
-
-
-/*
- * FileUnLock( fd )
- *
- * free a file by a writing mode
- *
- * normal end : 0
- * abnormal end : -1
- */
-
-int 
-#if NeedFunctionPrototypes
-FileUnLock( int fd )
-#else
-FileUnLock( fd )
-int    fd;     /* a file descripter */
-#endif
-{
-       struct flock    flpar;
-
-
-       flpar.l_type = F_UNLCK;
-       flpar.l_start = 0;
-       flpar.l_len = 0;
-       flpar.l_whence = 0;
-
-       if ( fcntl( fd, F_SETLK, &flpar ) == -1 ){
-               USAGE("File unlock not success \n" );
-               return  -1; 
-       }
-       return  0;
-}
-
-/*
- * isLock( fd )
- *
- * search whether file is locked by a writing mode
- *
- * 1 : file is locked by a writing mode
- * 0 : file isn't locked by a writing mode
- */
-
-int 
-#if NeedFunctionPrototypes
-isLock( int fd )
-#else
-isLock( fd )
-int    fd;     /* file descripter */
-#endif
-{
-       struct flock    flpar;
-
-
-       flpar.l_type = F_WRLCK;
-       flpar.l_start = 0;
-       flpar.l_len = 0;
-       flpar.l_whence = 0;
-
-       if ( fcntl( fd, F_GETLK, &flpar ) == -1 ) {
-               USAGE("Inquiry of file lock not sucess \n" );
-               return  -1; 
-       }
-
-       if ( flpar.l_type == F_UNLCK ){
-               return  0 ;
-       } else {
-               return  1 ;
-       }
-}
diff --git a/cde/programs/dtudcfonted/libfuty/oakfuty.c b/cde/programs/dtudcfonted/libfuty/oakfuty.c
deleted file mode 100644 (file)
index 48bddbf..0000000
+++ /dev/null
@@ -1,1720 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: oakfuty.c /main/12 1996/11/11 10:55:57 drk $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include  <sys/types.h>
-#include  <stdio.h>
-#include  <stdlib.h>
-#include  <string.h>
-#include  <errno.h>
-#ifndef SVR4
-#if !defined( SYSV )
-#include <sys/resource.h>
-#endif
-#include  <sys/wait.h>
-#else
-#include  <sys/mman.h>
-#include  <wait.h>
-#endif
-
-#include  <unistd.h>
-#include  <sys/stat.h>
-#include  <signal.h>
-#include  <fcntl.h>
-
-#include  "bdfgpf.h"
-#include  "udcutil.h"
-
-static void    exline();
-
-char   *oakgtobdf;
-char   *bdftosnf = BDFTOSNF;
-char   *bdftopcf;
-
-static int     put_file_create_err_msg = 0;
-
-#define        DEVICE_FAIL             2
-#define        WRITE_FAIL              3
-#define        OPEN_FAIL               4
-#define        READ_FAIL               5
-
-int
-#if NeedFunctionPrototypes
-ReadBdfHeader(
-    struct btophead *head,
-    char       *buf
-)
-#else
-ReadBdfHeader( head, buf )
-struct btophead *head;
-char   *buf;
-#endif
-{
-       char *p;
-       unsigned int    getstat = 0;
-
-       if (NULL == fgets(buf, BUFSIZE, head->input)) {
-               return(BDF_INVAL);
-       }
-       p = buf;
-       SCAN_TO_NONSP(p)
-
-       if (strncmp(p, STARTFONT, STARTFONTsz)) {
-               return(BDF_INVAL);
-       }
-
-       while( 1 ) {
-               if (fgets(buf, BUFSIZE, head->input) == NULL) {
-                       return (BDF_INVAL);
-               }
-               p = buf;
-               SCAN_TO_NONSP(p)
-                   if (!strncmp(p, SIZE, SIZEsz)) {
-                       if ((sscanf(p, "SIZE %f%d",
-                           &(head->bdf_point), &(head->bdf_xdpi))) != 2) {
-                               return(BDF_INVAL);
-                       }
-                       getstat |= 0x01;
-               } else if (!strncmp(p, FONTBOUNDINGBOX, FONTBOUNDINGBOXsz)) {
-                       if (sscanf(p, "FONTBOUNDINGBOX %d%d%d%d",
-                               &(head->bdf_width), &(head->bdf_height), 
-                               &(head->bdf_x), &(head->bdf_y)) != 4) {
-                               return  BDF_INVAL;
-                       }
-                       getstat |= 0x02;
-
-               } else if (!strncmp(p, CHARS, CHARSsz)) {
-                       if ((sscanf(p, "CHARS %d", &(head->num_chars))) != 1) {
-                               return(BDF_INVAL);
-                       }
-                       getstat |= 0x04;
-               } else if (!strncmp(p, STARTCHAR, STARTCHARsz)) {
-                       break;
-               }
-       }
-
-       if (getstat != 0x07) {
-               return(BDF_INVAL);
-       }
-       return  0;
-}
-
-
-int
-#if NeedFunctionPrototypes
-ReadGpfHeader(
-    struct ptobhead *head,
-    char   *buf
-)
-#else
-ReadGpfHeader(head, buf)
-struct ptobhead *head;
-char   *buf;
-#endif
-{
-       char *p;
-       unsigned int  getstat = 0;
-
-       while(1) {
-               if (getstat == 0x07) break;
-
-               if (fgets(buf, BUFSIZE, head->input) == NULL) {
-                       return  GPF_INVAL;
-               }
-               p = buf;
-               SCAN_TO_NONSP(p)
-
-                   if (!strncmp(p, NUMFONTS, NUMFONTSsz)) {
-                       if (sscanf(p, "numfonts:%d", &(head->num_chars)) != 1) {
-                               return(GPF_INVAL);
-                       }
-                       getstat |= 0x01;
-               } else if (!strncmp(p, WIDTH, WIDTHsz)) {
-                       if (sscanf(p, "width:%d", &(head->p_width)) != 1) {
-                               return(GPF_INVAL);
-                       }
-                       getstat |= 0x02;
-               } else if (!strncmp(p, HEIGHT, HEIGHTsz)) {
-                       if (sscanf(p, "height:%d", &(head->p_height)) != 1) {
-                               return(GPF_INVAL);
-                       }
-                       getstat |= 0x04;
-               }
-       }
-       return  0;
-}
-
-
-int
-#if NeedFunctionPrototypes
-WriteBdfHeader( struct ptobhead *head )
-#else
-WriteBdfHeader(head)
-struct ptobhead *head;
-#endif
-{
-       FILE    *fp;
-       int             fd[2];
-       unsigned int            getstat;
-       char  buf[BUFSIZE], *p;
-
-       pid_t   chld_pid = 0;
-#if defined( SVR4 ) || defined( SYSV ) || defined(CSRG_BASED) || defined(__linux__)
-       int     chld_stat ;
-#else
-       union   wait    chld_stat ;
-#endif
-
-
-       if (head->snf_file != NULL) {
-               if (pipe(fd) != 0) {
-                       return  PIPE_ERROR;
-               }
-               switch (chld_pid = fork()) {
-               case    0:
-                       close(1);
-                       if(dup(fd[1]) < 0) {
-                               return(DUP_ERROR);
-                       }
-                       close(fd[0]);
-                       close(fd[1]);
-                       execl( oakgtobdf, oakgtobdf, head->snf_file, 0);
-
-                       return  EXEC_ERROR;
-
-               case    -1:
-                       return(FORK_ERROR);
-
-               default:
-                       break;
-               }
-               close(fd[1]);
-               if((fp = (FILE *)fdopen(fd[0], "r")) == NULL) {
-                       close( fd[0] );
-                       kill( chld_pid, SIGKILL );
-                       WaitID( chld_pid, chld_stat ) ;
-                       return  FDOPEN_ERROR;
-               }
-       } else {
-               if ((fp = fopen(head->bdf_file, "r")) == NULL) {
-                       return(BDF_OPEN_HEAD);
-               }
-       }
-
-       getstat = 0;
-
-       while ( 1 ) {
-               if (fgets(buf, BUFSIZE, fp) == NULL) {
-                   fclose( fp );
-                   if (head->snf_file != NULL) {
-                       kill( chld_pid, SIGKILL );
-                       WaitID( chld_pid, chld_stat ) ;
-                   }
-                   return(BDF_INVAL);
-               }
-               p = buf;
-               SCAN_TO_NONSP(p);
-
-               if (!strncmp(p, CHARS, CHARSsz)) {
-                   fclose( fp );
-                   if (head->snf_file != NULL) {
-                       kill( chld_pid, SIGKILL );
-                       WaitID( chld_pid, chld_stat ) ;
-                   }
-                   break;
-               }
-
-               fprintf(head->output, "%s", buf);
-
-               if (!strncmp(p, SIZE, SIZEsz)) {
-                   if ((sscanf(p, "SIZE %f%d",
-                       &(head->bdf_point), &(head->bdf_xdpi))) != 2) {
-                       fclose(fp);
-                       if (head->snf_file != NULL) {
-                           kill( chld_pid, SIGKILL );
-                           WaitID( chld_pid, chld_stat ) ;
-                       }
-                       return(BDF_INVAL);
-                   }
-                   getstat |= 0x01;
-                   continue;
-               }
-               if (!strncmp(p, FONTBOUNDINGBOX, FONTBOUNDINGBOXsz)) {
-                   if ( sscanf( p, "FONTBOUNDINGBOX %d%d%d%d", 
-                                                   &(head->bdf_width), 
-                                                   &(head->bdf_height), 
-                                                   &(head->bdf_x), 
-                                                   &(head->bdf_y)) != 4
-                   ) {
-                       fclose(fp);
-                       if (head->snf_file != NULL) {
-                           kill( chld_pid, SIGKILL );
-                           WaitID( chld_pid, chld_stat ) ;
-                       }
-                       return  BDF_INVAL;
-                   }
-                   getstat |= 0x02;
-                   continue;
-               }
-               get_charset_registry(head, p) ; 
-       }
-
-
-       if (getstat != 0x03) {
-               return  BDF_INVAL;
-       }
-
-       return  0;
-}
-
-
-void
-#if NeedFunctionPrototypes
-WriteGpfHeader( struct btophead *head )
-#else
-WriteGpfHeader(head)
-struct btophead *head;
-#endif
-{
-       fprintf(head->output, "numfonts:%d\n", head->num_chars);
-       fprintf(head->output, "width:%d\n",    head->p_width  );
-       fprintf(head->output, "height:%d\n",   head->p_height );
-}
-
-
-
-
-int
-#if NeedFunctionPrototypes
-WritePtnToBdf( struct ptobhead *head )
-#else
-WritePtnToBdf(head)
-struct ptobhead *head;
-#endif
-{
-       int     msize, swidth, rtn, i, nchar;
-       char    *zoomptn;
-       int     bbw, bbh, bbx, bby, dw ;
-       char    glyph_name[BUFSIZE] ;
-
-       nchar = head->num_chars;
-       put_default_chars(head, nchar, rtn) ;
-
-       if (head->zoomf) {
-               msize = ((head->bdf_width + 7) / 8) * head->bdf_height;
-               if ((zoomptn = (char *)malloc(msize)) == NULL) {
-                       return(MALLOC_ERROR);
-               }
-       }
-
-       for (i=0; i<head->num_chars; i++) {
-           sprintf( glyph_name, "%x", head->code[i]);
-           swidth = (head->bdf_width * 72270)/((int)(head->bdf_point * (float)head->bdf_xdpi));
-           dw  = head->bdf_width ;
-           bbw = head->bdf_width ;
-           bbh = head->bdf_height ;
-           bbx = head->bdf_x ;
-           bby = head->bdf_y ;
-
-           fprintf(head->output, "STARTCHAR %s\n", glyph_name );
-           fprintf(head->output, "ENCODING %d\n", head->code[i]);
-           fprintf(head->output, "SWIDTH %d 0\n", swidth );
-           fprintf(head->output, "DWIDTH %d 0\n", dw );
-           fprintf(head->output, "BBX %d %d %d %d\n", bbw, bbh, bbx, bby );
-           fprintf(head->output, "BITMAP\n");
-
-           if (head->zoomf) {
-                   if ((rtn = PtnZoom(zoomptn, head->ptn[i], head->p_width,
-                       head->p_height, head->bdf_width, head->bdf_height))) {
-                           return(rtn);
-                   }
-                   if( (rtn = PutBdfPtn(zoomptn, head->bdf_width,
-                       head->bdf_height, head->output))) {
-                           return(rtn);
-                   }
-           } else {
-                   if( (rtn = PutBdfPtn(head->ptn[i],
-                       head->bdf_width, head->bdf_height, head->output))) {
-                           return(rtn);
-                   }
-           }
-           fprintf(head->output, "ENDCHAR\n");
-           free(head->ptn[i]);
-       }
-       fprintf(head->output, "ENDFONT\n");
-       return(0);
-}
-
-
-
-
-int
-#if NeedFunctionPrototypes
-putDefaultChars( struct ptobhead *head )
-#else
-putDefaultChars(head )
-struct ptobhead *head;
-#endif
-{
-       int     swidth, bytew, i, j;
-       unsigned int     posbit ;
-       unsigned char    *ptnbuf, *ptnbuf2 ;
-       unsigned char    tmp;
-
-       put_default_encode( head ) ;
-       swidth = (head->bdf_width * 72270)/((int)(head->bdf_point * (float)head->bdf_xdpi));
-       fprintf(head->output, "SWIDTH %d 0\n", swidth);
-       fprintf(head->output, "DWIDTH %d 0\n", head->bdf_width);
-       fprintf( head->output, "BBX %d %d %d %d\n", head->bdf_width, head->bdf_height, head->bdf_x, head->bdf_y );
-       fprintf(head->output, "BITMAP\n");
-
-       bytew = (head->bdf_width + 7) / 8;
-       if ((ptnbuf = (unsigned char *)malloc(bytew * 2)) == NULL) {
-               return(MALLOC_ERROR);
-       }
-       put_default_bitmap(head, bytew, posbit, i, j, ptnbuf, ptnbuf2, tmp) ;
-
-       fprintf(head->output, "ENDCHAR\n");
-       free(ptnbuf);
-       return  0;
-}
-
-
-int
-#if NeedFunctionPrototypes
-WritePtnToGpf( struct btophead *head )
-#else
-WritePtnToGpf(head)
-struct btophead *head;
-#endif
-{
-       int     msize, rtn, i;
-       char    *zoomptn;
-
-
-       if (head->zoomf) {
-               msize = ((head->p_width + 7) / 8) * head->p_height;
-               if ((zoomptn = (char *)malloc(msize)) == NULL) {
-                       return(MALLOC_ERROR);
-               }
-       }
-
-       for (i=0; i<head->num_chars; i++) {
-
-               if ( head->code[i] > 0xff ) {
-                       fprintf(head->output, "code:0x%x\n", SHIFT_ON(head->code[i]) );
-               } else {
-                       fprintf(head->output, "code:0x%x\n", head->code[i]);
-               }
-               if (head->zoomf) {
-                       if ((rtn = PtnZoom(zoomptn, head->ptn[i], head->bdf_width,
-                           head->bdf_height, head->p_width, head->p_height))) {
-                               return(rtn);
-                       }
-                       if ((rtn = PutGpfPtn(zoomptn, head->p_width,
-                           head->p_height, head->output))) {
-                               return(rtn);
-                       }
-               } else {
-                       if ((rtn = PutGpfPtn(head->ptn[i],
-                           head->bdf_width, head->bdf_height, head->output))) {
-                               return(rtn);
-                       }
-               }
-               free(head->ptn[i]);
-       }
-       fprintf(head->output, "enddata\n");
-       return(0);
-}
-
-
-int
-#if NeedFunctionPrototypes
-ReadBdfToMemory(
-    struct btophead *head,
-    char   *buf
-)
-#else
-ReadBdfToMemory(head, buf)
-struct btophead *head;
-char   *buf;
-#endif
-{
-       int         code, mwidth, num_char, bsize, rtn;
-       char    *ptn;
-
-       num_char = 0;
-       mwidth = (head->bdf_width + 7) / 8;
-       bsize = mwidth * head->bdf_height;
-       while(1) {
-               if ((rtn = GetBdfCode(head, buf, &code)) < 0) {
-                       return(rtn);    /* contain BDF_INVAL */
-               } else if (rtn == FILE_END) {
-                       head->num_chars = num_char;
-                       break;
-               }
-
-               if ( ( code > head->end_code )
-                       || ( code < head->start_code )
-                       || ( !IN_CODE( head->code_category, SHIFT_ON( code ) ) )
-                       || COMM_ISDEFAULTCHAR( code )
-               ) {
-                       continue;
-               }
-               head->code[num_char] = code;
-               if ( ( ptn = head->ptn[num_char++] = (char *)malloc( bsize ) ) == NULL ) {
-                       return(MALLOC_ERROR);
-               }
-
-               if ((rtn = GetBdfPtn(head, buf, ptn, mwidth, bsize)) != 0) {
-                       return(rtn);
-               }
-       }
-       return(0);
-}
-
-
-int
-#if NeedFunctionPrototypes
-ReadBdfToMemory_with_init(
-    struct btophead *head,
-    int        init_start,
-    int        init_end,
-    char   *buf
-)
-#else
-ReadBdfToMemory_with_init(head, init_start, init_end, buf)
-struct btophead *head;
-int    init_start;
-int    init_end;
-char   *buf;
-#endif
-{
-       int         code, mwidth, num_char, bsize, rtn;
-       char    *ptn;
-
-       num_char = 0;
-       mwidth = (head->bdf_width + 7) / 8;
-       bsize = mwidth * head->bdf_height;
-       while(1) {
-               if ((rtn = GetBdfCode(head, buf, &code)) < 0) {
-                       return(rtn);    /* contain BDF_INVAL */
-               } else if (rtn == FILE_END) {
-                       head->num_chars = num_char;
-                       break;
-               }
-
-               if ( ( code > head->end_code )
-                       || ( code < head->start_code )
-                       || ( !IN_CODE( head->code_category, SHIFT_ON( code ) ) )
-                       || ( ( code >= init_start ) && ( code <= init_end ) )
-                       || COMM_ISDEFAULTCHAR( code )
-               ) {
-                       continue;
-               }
-
-               head->code[num_char] = code;
-               if ((ptn = head->ptn[num_char++] =
-                   (char *)malloc(bsize)) == NULL) {
-                       return(MALLOC_ERROR);
-               }
-
-               if ((rtn = GetBdfPtn(head, buf, ptn, mwidth, bsize)) != 0) {
-                       return(rtn);
-               }
-       }
-       return(0);
-}
-
-
-int
-#if NeedFunctionPrototypes
-GetBdfCode(
-    struct btophead *head,
-    char   *buf,
-    int    *code
-)
-#else
-GetBdfCode(head, buf, code)
-struct btophead *head;
-char   *buf;
-int    *code;
-#endif
-{
-       char *p;
-
-       while(1) {
-               if (fgets(buf, BUFSIZE, head->input) == NULL) {
-                       return (BDF_INVAL);
-               }
-               p = buf;
-               SCAN_TO_NONSP(p)
-                   if (!strncmp(p, ENDFONT, ENDFONTsz)) {
-                       return(FILE_END);
-               }
-
-               if (!strncmp(p, ENCODING, ENCODINGsz)) {
-                       if ((sscanf(p, "ENCODING %d", code)) != 1) {
-                               return(BDF_INVAL);
-                       }
-                       break;
-               }
-       }
-       return(0);
-}
-
-
-int
-#if NeedFunctionPrototypes
-GetBdfPtn(
-    struct btophead *head,
-    char   *buf,
-    char   *ptn,
-    int    mwidth,
-    int    bsize
-)
-#else
-GetBdfPtn(head, buf, ptn, mwidth, bsize)
-struct btophead *head;
-char   *buf;
-char   *ptn;
-int    mwidth;
-int    bsize;
-#endif
-{
-       int         skip, i, j;
-       char    *p;
-
-       while(1) {
-               if (fgets(buf, BUFSIZE, head->input) == NULL) {
-                       return (BDF_INVAL);
-               }
-               p = buf;
-               SCAN_TO_NONSP(p)
-                   if (!strncmp(p, BITMAP, BITMAPsz)) {
-                       break;
-               }
-       }
-
-       ptn[bsize - 1] = 0;
-
-       for (i=0, skip=0; i<head->bdf_height; i++) {
-               if (skip) {
-                       for(j=0; j<mwidth; j++) {
-                               ptn[j] = 0;
-                       }
-                       ptn += mwidth;
-                       continue;
-               }
-               if (fgets(buf, BUFSIZE, head->input) == NULL) {
-                       return (BDF_INVAL);
-               }
-               p = buf;
-               SCAN_TO_NONSP(p);
-               if (!strncmp(p, ENDCHAR, ENDCHARsz)) {
-                       skip = 1;
-                       for(j=0; j<mwidth; j++) {
-                               ptn[j] = 0;
-                       }
-                       ptn += mwidth;
-                       continue;
-               }
-               GetBdfLinePtn(ptn, buf, head->bdf_width);
-               ptn += mwidth;
-       }
-       return(0);
-}
-
-
-int
-#if NeedFunctionPrototypes
-ReadGpfToMemory(
-    struct ptobhead *head,
-    char   *buf
-)
-#else
-ReadGpfToMemory(head, buf)
-struct ptobhead *head;
-char   *buf;
-#endif
-{
-       int         code, mwidth, num_char, bsize, rtn;
-       char    *ptn;
-
-       num_char = 0;
-       mwidth = (head->p_width + 7) / 8;
-       bsize = mwidth * head->p_height;
-       while(1) {
-               if ((rtn = GetGpfCode(head, buf, &code)) < 0) {
-                       return(rtn);    /* contain GPF_INVAL */
-               } else if (rtn == FILE_END) {
-                       head->num_chars = num_char;
-                       break;
-               }
-               if ( ( code > head->end_code ) 
-                       || (code < head->start_code ) 
-                       || ( !IN_CODE( head->code_category, SHIFT_ON( code ) ) )
-                       || COMM_ISDEFAULTCHAR( code )
-               ) {
-                       continue;
-               }
-               head->code[num_char] = code;
-               if ((ptn = head->ptn[num_char++] =
-                   (char *)malloc(bsize)) == NULL) {
-                       return(MALLOC_ERROR);
-               }
-
-               if ((rtn = GetGpfPtn(head, buf, ptn, mwidth, bsize)) != 0) {
-                       return(rtn);
-               }
-       }
-       return(0);
-}
-
-
-int
-#if NeedFunctionPrototypes
-GetGpfCode(
-    struct ptobhead *head,
-    char   *buf,
-    int    *code
-)
-#else
-GetGpfCode(head, buf, code)
-struct ptobhead *head;
-char   *buf;
-int    *code;
-#endif
-{
-       char    *p;
-
-       while(1) {
-               p = buf;
-               SCAN_TO_NONSP(p)
-
-                   if (!strncmp(p, ENDDATA, ENDDATAsz)) {
-                       return(FILE_END);
-               }
-               if (!strncmp(p, CODE, CODEsz)) {
-                       *code = (int)strtol(buf+CODEsz, NULL, 0);
-                       CONVGLYPHINDEX( *code ) ;
-                       break;
-               }
-
-               if (fgets(buf, BUFSIZE, head->input) == NULL) {
-                       return (GPF_INVAL);
-               }
-       }
-       return(0);
-}
-
-
-int
-#if NeedFunctionPrototypes
-GetGpfPtn(
-    struct ptobhead *head,
-    char    *buf,
-    char    *ptn,
-    int        mwidth,
-    int        bsize
-)
-#else
-GetGpfPtn(head, buf, ptn, mwidth, bsize)
-struct ptobhead *head;
-char    *buf;
-char    *ptn;
-int    mwidth;
-int    bsize;
-#endif
-{
-       int     skip, i, j;
-       char    *p;
-
-       for (i=0, skip=0; i<head->p_height; i++) {
-               if (skip) {
-                       for (j=0; j<mwidth; j++) {
-                               ptn[j] = 0;
-                       }
-                       ptn += mwidth;
-                       continue;
-               }
-               if (fgets(buf, BUFSIZE, head->input) == NULL) {
-                       return (GPF_INVAL);
-               }
-               p = buf;
-               SCAN_TO_NONSP(p);
-               if ((!strncmp(p, CODE, CODEsz)) ||
-                   (!strncmp(p, ENDDATA, ENDDATAsz))) {
-                       skip = 1;
-                       for (j=0; j<mwidth; j++) {
-                               ptn[j] = 0;
-                       }
-                       ptn += mwidth;
-                       continue;
-               }
-
-               GetGpfLinePtn(ptn, buf, head->p_width);
-               ptn += mwidth;
-       }
-       return(0);
-}
-
-
-void
-#if NeedFunctionPrototypes
-GetBdfLinePtn(
-    char       *mem,
-    char       *buf,
-    int        width
-)
-#else
-GetBdfLinePtn(mem, buf, width)
-char   *mem;
-char   *buf;
-int    width;
-#endif
-{
-       int     i, iend, len;
-       char   *p, str[3];
-
-       str[2] = 0;
-
-       SCAN_TO_NONSP(buf);
-
-       iend = (width + 3) / 4;
-
-       if ((len = strlen(buf)) < iend) {
-               p = buf+len;
-               for (i=0; i<(iend-len); i++) {
-                       *p++ = '0';
-               }
-               *p ='\0';
-       }
-
-       for (i=0; i<iend/2; i++) {
-               str[0] = *buf++;
-               str[1] = *buf++;
-               *mem++ = (char)strtol(str, NULL, 16);
-       }
-       if (iend%2) {
-               str[0] = *buf;
-               str[1] = 0;
-               *mem = (char)strtol(str, NULL, 16) << 4;
-       }
-}
-
-void
-#if NeedFunctionPrototypes
-GetGpfLinePtn(
-    char       *mem,
-    char       *buf,
-    int        width
-)
-#else
-GetGpfLinePtn(mem, buf, width)
-char   *mem;
-char   *buf;
-int    width;
-#endif
-{
-       unsigned int       skip, i, iend, j;
-       unsigned char   ptn;
-
-       SCAN_TO_NONSP(buf);
-
-       iend = (width + 7) / 8;
-
-       for (i=0, skip=0; i<iend; i++) {
-               if (skip) {
-                       *mem++ = 0;
-                       continue;
-               }
-               for (j=0, ptn = 0; j<8; j++) {
-                       if ((*buf == '\n') || (*buf == 0)) {
-                               skip = 1;
-                               ptn <<= (8-j);
-                               break;
-                       }
-                       if (j) ptn <<= 1;
-                       if (*buf == '0') {
-                               ptn |= 1;
-                       }
-                       buf++;
-               }
-               *mem++ = ptn;
-       }
-}
-
-
-
-
-int
-#if NeedFunctionPrototypes
-PutBdfPtn(
-    unsigned char      *ptn,
-    int        width,
-    int        height,
-    FILE       *fp
-)
-#else
-PutBdfPtn(ptn, width, height, fp)
-unsigned char  *ptn;
-int    width;
-int    height;
-FILE   *fp;
-#endif
-{
-       int         i, j, nbyte ;
-       unsigned char    *pbuf, x, c;
-       static unsigned char    *buf=NULL;
-
-       if (buf==NULL) {
-               buf = (unsigned char *)malloc(width*height+2);
-               if ( buf == NULL) {
-                       return(MALLOC_ERROR);
-               }
-       }
-       nbyte = (width + 7) / 8;
-
-       pbuf=buf;
-       for(i=0; i<height; i++) {
-               for (j=0 ; j<nbyte; j++) {
-                       x = *ptn >> 4;
-                       c = (x>=10)? 'a'-0xa : '0';
-                       *pbuf++ = c + x;
-                       x = *ptn++ & 0x0f;
-                       c = (x>=10)? 'a'-0xa : '0';
-                       *pbuf++ = c + x;
-               }
-               *pbuf++ = '\n';
-       }
-       *pbuf = '\0';
-       fprintf(fp, "%s", buf);
-       return(0);
-}
-
-
-
-
-int
-#if NeedFunctionPrototypes
-PutGpfPtn(
-    char       *ptn,
-    int        width,
-    int        height,
-    FILE       *fp
-)
-#else
-PutGpfPtn(ptn, width, height, fp)
-char   *ptn;
-int    width;
-int    height;
-FILE   *fp;
-#endif
-{
-       int         i, j, k, nbyte, tw;
-       unsigned char    p, *pbuf;
-       static unsigned char    *buf=NULL;
-
-       if (buf==NULL) {
-           buf = (unsigned char *)malloc(((width+1)*height)+1);
-           if ( buf == NULL) {
-               return(MALLOC_ERROR);
-           }
-       }
-
-       nbyte = (width + 7) / 8;
-
-       pbuf=buf;
-       for(i=0; i<height; i++) {
-           for (j=0, tw=width; j<nbyte; j++) {
-               p = *ptn++;
-               for (k=0; k<8 && tw>0; k++, tw--) {
-                   if (p & 0x80) {
-                           *pbuf++ = '0';
-                   } else {
-                           *pbuf++ = '-';
-                   }
-                   p = p << 1;
-               }
-           }
-           *pbuf++ = '\n';
-       }
-       *pbuf = '\0';
-       fprintf(fp, "%s", buf);
-       return(0);
-}
-
-
-int
-#if NeedFunctionPrototypes
-PtnZoom(
-    char       *dmem,
-    char       *smem,
-    int                sw,
-    int                sh,
-    int                dw,
-    int                dh
-)
-#else
-PtnZoom(dmem, smem, sw, sh, dw, dh)
-char   *dmem;
-char   *smem;
-int    sw;
-int    sh;
-int    dw;
-int    dh;
-#endif
-{
-       int         swidth;
-       int         dwidth;
-       int         i, lcnt;
-       char   *dbuf, *sp, *dp;
-
-       swidth = (sw + 7) / 8;
-       dwidth = (dw + 7) / 8;
-
-       if ((dbuf = (char *)malloc(dwidth)) == NULL) {
-               return(MALLOC_ERROR);
-       }
-
-       lcnt = 0;
-       sp = smem;
-       dp = dmem;
-
-       for(i=0; i < sh; i++) {
-               lcnt += dh;
-               if (lcnt >= sh) {
-                       exline(sp, dbuf, sw, dw);
-                       sp += swidth;
-                       lcnt -= sh;
-                       memcpy(dp, dbuf, dwidth);
-                       dp += dwidth;
-                       for (; lcnt >= sh; lcnt -= sh) {
-                               memcpy(dp, dbuf, dwidth);
-                               dp += dwidth;
-                       }
-               } else {
-                       sp += swidth;
-               }
-       }
-       free(dbuf);
-       return(0);
-}
-
-
-static void
-exline(sp, dbuf, sw, dw)
-char   *sp;
-char   *dbuf;
-int    sw;
-int    dw;
-{
-       unsigned int    i, bit, sval, dval, dcnt, bcnt;
-
-       bcnt = dval = 0;
-       dcnt = 8;
-
-       for(i=0; i<sw; i++) {
-               if (i % 8 == 0) {
-                       sval = *sp++;
-               }
-               bit = ((sval & 0x80) ? 1 : 0);
-               sval <<=  1;
-               for (bcnt += dw; bcnt >= sw; bcnt -= sw) {
-                       dval = (dval << 1) | bit;
-                       if (--dcnt == 0) {
-                               *dbuf++ = (char)dval;
-                               dval = 0;
-                               dcnt = 8;
-                       }
-               }
-       }
-       if (dcnt != 8) {
-               dval <<= dcnt;
-               *dbuf = (char)dval;
-       }
-}
-
-
-char *
-#if NeedFunctionPrototypes
-GetTmpPath( char *path )
-#else
-GetTmpPath( path )
-char   *path;
-#endif
-{
-       char    *p=NULL, *sp, *buf ;
-       int     len ;
-       struct  stat    statbuf ;
-
-       /* Get directory of temporary file */
-       if( !(p = (char *)getenv( "TMPDIR" )) ){
-           p = DEFAULT_TMPPATH ;
-       }
-       /* Get memory for temporary file name */
-       sp = p ;
-       len = strlen(p) ;
-       if( *(sp + len -1) == '/' ){
-           len += (strlen( TEMPFILEKEY ) + 1) ;
-       }else{
-           len += (strlen( TEMPFILEKEY ) +1 + 1) ;
-       }
-       if ((buf = (char *)malloc( len )) == NULL) {
-           return NULL;
-       }
-       /* Get temporary file path */
-       strcpy( buf, p ) ;
-       sp = buf + strlen(buf) -1 ;
-       if( *sp == '/' )        *sp-- = '\0' ;
-       sprintf( sp+1, "/%s", TEMPFILEKEY ) ;
-       /* Get temporary file name */
-       return mktemp( buf ) ;
-}
-
-
-int
-#if NeedFunctionPrototypes
-Link_NewFile( char *rd_file, char *wr_file )
-#else
-Link_NewFile( rd_file, wr_file )
-char   *rd_file ;
-char   *wr_file ;
-#endif
-{
-       FILE    *rfp, *wfp ;
-       int     i, c ;
-       int     rfd, wfd ;
-       struct  stat    statbuf ;
-       unsigned char   bufc ;
-       char    *buf ;
-       int     ismmap = 0 ;
-
-       if( stat( wr_file, &statbuf ) == -1 ){
-           if( (wfd = open( wr_file, O_CREAT | O_WRONLY, 0644 )) == -1 ){
-               return -1 ;
-           }
-       }else{
-           if( (wfd = open( wr_file, O_WRONLY | O_TRUNC )) == -1 ){
-               return -1 ;
-           }
-       }
-       if( stat( rd_file, &statbuf ) == -1 ){
-           close(wfd) ; 
-           return -1 ;
-       }
-       if( (rfd = open( rd_file, O_RDONLY )) == -1 ){
-           close(wfd) ; 
-           return -1 ;
-       }
-
-#if    defined( SVR4 )
-       if( (buf = (char *)mmap(0, statbuf.st_size, PROT_READ, MAP_SHARED, rfd, 0)) == (char *)-1 ){
-#endif /* SVR4 */
-           if( !(buf = (char *)malloc(statbuf.st_size)) ){
-               close(wfd) ; 
-               close(rfd) ; 
-               return -1 ;
-           }
-           if( read(rfd, buf, statbuf.st_size) != statbuf.st_size ){
-               close(wfd) ; 
-               close(rfd) ; 
-               free(buf) ;
-               return -1 ;
-           }
-#if    defined( SVR4 )
-       }else{
-           ismmap = 1 ;
-       }
-#endif /* SVR4 */
-
-       close(rfd) ; 
-
-       if( write(wfd, buf, statbuf.st_size) != statbuf.st_size ){
-#if    defined( SVR4 )
-           if( ismmap ){
-               munmap(buf, statbuf.st_size) ;
-           }else{
-#endif /* SVR4 */
-               free(buf) ;
-#if    defined( SVR4 )
-           }
-#endif /* SVR4 */
-           close(wfd) ; 
-           return (DEVICE_FAIL);
-       }
-#if    defined( SVR4 )
-       if( ismmap ){
-           munmap(buf, statbuf.st_size) ;
-       }else{
-#endif /* SVR4 */
-           free(buf) ;
-#if    defined( SVR4 )
-       }
-#endif /* SVR4 */
-       close(wfd) ;
-
-       return 0 ;
-}
-
-
-int
-#if NeedFunctionPrototypes
-ChkNumString( char     *str )
-#else
-ChkNumString( str )
-char   *str;
-#endif
-{
-       char    *tmp;
-       int             num;
-
-       num = (int)strtol( str, &tmp, 10 );
-       if ((num == 0)&&(tmp == str)) {
-               return(-1);
-       }
-       if ((size_t)(tmp - str) != strlen(str)){
-               return(-1);
-       }
-       return( 0 );
-}
-
-
-void
-#if NeedFunctionPrototypes
-ErrMsgTable_AndExit(
-    int                er_no,
-    char       *snf_in,
-    char       *snf_out,
-    char       *gpf_in,
-    char       *gpf_out,
-    char       *bdf_in,
-    char       *prog_name 
-)
-#else
-ErrMsgTable_AndExit(er_no, snf_in, snf_out, gpf_in, gpf_out, bdf_in, prog_name)
-int    er_no;
-char   *snf_in;
-char   *snf_out;
-char   *gpf_in;
-char   *gpf_out;
-char   *bdf_in;
-char   *prog_name ;
-#endif
-{
-       int     rtn = 0 ;
-       switch(er_no) {
-       case 0:
-               break;
-       case BDF_OPEN_IN :
-               USAGE2("%s : The input font file cannot be opened.\"%s\"\A1\A5\n", prog_name, (snf_in != NULL)? snf_in : "\0" );
-               rtn = OPEN_FAIL ;
-               break;
-
-       case BDF_OPEN_OUT :
-               USAGE2("%s : The output font file cannot be opened.\"%s\"\A1\A5\n", prog_name, (snf_out != NULL)? snf_out : "\0" );
-               rtn = OPEN_FAIL ;
-               break;
-
-
-       case BDF_READ :
-               USAGE2("%s : Information from the font file cannot be extracted.\"%s\"\A1\A5 \n", prog_name, (snf_in != NULL) ? snf_in : "\0" );
-               rtn = READ_FAIL ;
-               break;
-
-       case BDF_WRITE :
-               USAGE2("%s : It is not possible to write to the font file.\"%s\"\A1\A5\n", prog_name, (snf_out != NULL) ? snf_out : "\0" );
-               rtn = DEVICE_FAIL ;
-               break;
-
-       case BDF_INVAL :
-               USAGE2("%s : The format of the font file is illegal.\"%s\"\A1\A5 \n", prog_name, (snf_in != NULL) ? snf_in : "\0" );
-               rtn = 1 ;
-               break;
-
-       case BDF_OPEN_HEAD :
-               USAGE2("%s : The BDF file cannot be opened.\"%s\"\A1\A5\n", prog_name, (bdf_in != NULL)? bdf_in : "\0" );
-               rtn = OPEN_FAIL ;
-               break;
-
-       case BDF_READ_HEAD :
-               USAGE2("%s : Information of the BDF file cannot be extracted.\"%s\"\A1\A5 \n", prog_name, (bdf_in != NULL) ? bdf_in : "\0" );
-               rtn = READ_FAIL ;
-               break;
-
-       case GPF_OPEN_IN :
-               USAGE2("%s : The input character pattern file cannot be opened.\"%s\"\A1\A5\n", prog_name, (gpf_in != NULL) ? gpf_in : "\0" );
-               rtn = OPEN_FAIL ;
-               break;
-
-       case GPF_OPEN_OUT :
-               USAGE2("%s : The output character pattern file cannot be opened.\"%s\"\A1\A5\n", prog_name, (gpf_out != NULL) ? gpf_out : "\0" );
-               rtn = OPEN_FAIL ;
-               break;
-
-       case GPF_READ :
-               USAGE2("%s : The character pattern file cannot be read.\"%s\"\A1\A5\n", prog_name, (gpf_in != NULL) ? gpf_in : "\0" );
-               rtn = READ_FAIL ;
-               break;
-
-       case GPF_WRITE :
-               USAGE2("%s : It is not possible to write to the character pattern file.\"%s\"\A1\A5\n", prog_name, (gpf_out != NULL) ? gpf_out : "\0" );
-               rtn = DEVICE_FAIL ;
-               break;
-
-       case GPF_INVAL :
-               USAGE2("%s : The format of the character pattern file is illegal.\"%s\"\A1\A5\n", prog_name, (gpf_in != NULL) ? gpf_in : "\0" );
-               rtn = 1 ;
-               break;
-
-       default :
-               fatal_err_msg( er_no, prog_name );
-               rtn = 1 ;
-               break;
-       }
-       exit(rtn);
-}
-
-
-void
-#if NeedFunctionPrototypes
-fatal_err_msg( 
-    int                er_no,
-    char       *prog_name
-)
-#else
-fatal_err_msg( er_no, prog_name )
-int    er_no;
-char   *prog_name;
-#endif
-{
-       USAGE1("%s : The font file failed to be converted. ", prog_name);
-       switch( er_no ) {
-       case MALLOC_ERROR:
-               USAGE("There is no memory any more.\n");
-               break;
-       case FORK_ERROR:
-               USAGE("The child process cannot be created.\n" );
-               break;
-       case EXEC_ERROR:
-               USAGE("Cannot execute dtgpftobdf.\n" );
-               break;
-       case PIPE_ERROR:
-               USAGE("The pipe buffer cannot be open.\n" );
-               break;
-       case DUP_ERROR:
-               USAGE("The file descripter cannot be duplicated.\n" );
-               break;
-       case POPEN_ERROR:
-               USAGE("The X font compiler cannot be executed.\n" );
-               break;
-       case PCLOSE_ERROR:
-               USAGE("The pipe buffer cannot be close.\n" );
-               break;
-       case FDOPEN_ERROR:
-               USAGE("The file descripter cannot be got.\n" );
-               break;
-       case STAT_ERROR:
-               USAGE("The status of font cannot be got.\n" );
-               break;
-       case MKTMP_ERROR:
-               USAGE("The temporally file cannot be got.\n" );
-               break;
-       case PCFFONTC_ERROR:
-               USAGE("Cannot execute bdftopcf.\n" );
-               break;
-       case SNFFONTC_ERROR:
-               USAGE("Cannot execute bdftosnf.\n" );
-               break;
-       default:
-               USAGE1("Terminates abnormally. ( err_code(%d) )\n", er_no);
-               break;
-       }
-       return;
-}
-
-
-
-static int     sig_flg=0;
-
-#define        GPF_BUCK_UP_FAIL        1
-#define        GPF_MODIFY_FAIL         2
-#define        RESTORE_FAIL            3
-#define        CATCH_SIGNAL            10
-
-void
-ChatchSig()
-{
-       sig_flg = 1;
-}
-
-void
-#if NeedFunctionPrototypes
-Put_File_Create_Err_Msg( 
-    int                msg_level,
-    char       *org_name,
-    char       *tmp_name,
-    char       *save_name,
-    char       *com
-)
-#else
-Put_File_Create_Err_Msg( msg_level, org_name, tmp_name, save_name, com )
-int    msg_level;
-char   *org_name;
-char   *tmp_name;
-char   *save_name;
-char   *com;
-#endif
-{
-       switch( msg_level ) {
-       case GPF_BUCK_UP_FAIL:
-               USAGE1("%s : Failed to write temporary file. Terminates abnormally.\n", com );
-               put_file_create_err_msg = DEVICE_FAIL ;
-               break;
-
-       case GPF_MODIFY_FAIL:
-               USAGE1("%s : Failed in the renewal of the font file. Terminates abnormally.\n", com );
-               put_file_create_err_msg = WRITE_FAIL ;
-               break;
-
-       case RESTORE_FAIL:
-               USAGE3("%s : The file before updating cannot be changed to former file name.\tPlease execute the following command after the inquiry the system manager.\n\t mv %s %s\n",
-                       com, save_name, org_name);
-               put_file_create_err_msg = WRITE_FAIL ;
-               break;
-
-       case CATCH_SIGNAL:
-               USAGE1("%s : The signal was received. Terminates abnormally.\n", com);
-               put_file_create_err_msg = 1 ;
-               break;
-       }
-}
-
-int
-#if NeedFunctionPrototypes
-Make_NewFefFile( 
-    char       *org_name,
-    char       *tmp_name,
-    mode_t     mode,
-    uid_t      owner,
-    gid_t      group,
-    char       *com
-)
-#else
-Make_NewFefFile( org_name, tmp_name, mode, owner, group, com )
-char   *org_name;
-char   *tmp_name;
-mode_t mode;
-uid_t  owner;
-gid_t  group;
-char   *com;
-#endif
-{
-       struct  stat    statbuf;
-       char    *save_name = NULL;
-       int             ret_val;
-       int             msg_level;
-       int             rtn ;
-
-#ifndef SVR4
-       signal( SIGHUP , (void(*)())ChatchSig);
-       signal( SIGINT , (void(*)())ChatchSig);
-       signal( SIGQUIT, (void(*)())ChatchSig);
-       signal( SIGTERM, (void(*)())ChatchSig);
-#else
-       sigset( SIGHUP , (void(*)())ChatchSig);
-       sigset( SIGINT , (void(*)())ChatchSig);
-       sigset( SIGQUIT, (void(*)())ChatchSig);
-       sigset( SIGTERM, (void(*)())ChatchSig);
-#endif
-
-       errno = 0;
-       if (sig_flg || ((save_name = GetTmpPath( org_name )) == NULL)) {
-               msg_level = (sig_flg) ? CATCH_SIGNAL : GPF_BUCK_UP_FAIL;
-               Put_File_Create_Err_Msg( msg_level, org_name, tmp_name,
-                                                       (char *)NULL, com );
-               Unlink_Tmpfile ( tmp_name, com );
-               return(put_file_create_err_msg);
-       }
-
-       if (sig_flg || ((rtn=Link_NewFile( org_name, save_name )) != 0)) {
-               msg_level = (sig_flg) ? CATCH_SIGNAL : GPF_BUCK_UP_FAIL;
-               Put_File_Create_Err_Msg( msg_level, org_name, tmp_name,
-                                                       save_name, com );
-               Unlink_Tmpfile ( save_name, com );
-               Unlink_Tmpfile ( tmp_name, com );
-               free(save_name);
-               return( (put_file_create_err_msg == DEVICE_FAIL)?
-                       put_file_create_err_msg : rtn );
-       }
-
-       if (sig_flg || ((rtn=Link_NewFile( tmp_name, org_name )) != 0)) {
-               msg_level = (sig_flg) ? CATCH_SIGNAL : GPF_MODIFY_FAIL;
-               Put_File_Create_Err_Msg( msg_level, org_name, tmp_name,
-                                                       save_name, com );
-               if ( (rtn=Link_NewFile( save_name, org_name )) != 0 ) {
-                       Put_File_Create_Err_Msg( RESTORE_FAIL, org_name,
-                                                   tmp_name, save_name, com );
-                       Unlink_Tmpfile ( tmp_name, com );
-               } else {
-                       Unlink_Tmpfile ( tmp_name, com );
-                       Unlink_Tmpfile ( save_name, com );
-               }
-               free(save_name);
-               return( (put_file_create_err_msg == DEVICE_FAIL)?
-                       put_file_create_err_msg : rtn );
-       }
-
-       ret_val = 0;
-       ret_val += Unlink_Tmpfile ( tmp_name,  com );
-       ret_val += Unlink_Tmpfile ( save_name, com );
-
-       free(save_name);
-       return( (ret_val)? 1 : 0 );
-}
-
-
-int
-#if NeedFunctionPrototypes
-Unlink_Tmpfile( 
-    char       *file,
-    char       *com
-)
-#else
-Unlink_Tmpfile( file, com )
-char   *file;
-char   *com;
-#endif
-{
-       errno = 0;
-       if ( unlink( file ) != 0 ) {
-               USAGE2("%s : The work file cannot be deleted. Please unlink the following files\tafter the inquiry the system manager.\"%s\" \n", com, file );
-               return(1);
-       }
-       return(0);
-}
-
-
-int
-#if NeedFunctionPrototypes
-Chmod_File ( 
-    char       *fname,
-    mode_t     mode,
-    char       *com
-)
-#else
-Chmod_File ( fname, mode, com )
-char   *fname;
-mode_t mode;
-char   *com;
-#endif
-{
-       errno = 0;
-       if ( mode == 0 )        return( 0 ) ;
-       if ( chmod (fname, mode) != 0) {
-               USAGE3("%s : Failed in the mode change of the following files. Please change the mode to %o\tafter the inquiry the system manager.\"%s\" \n", com, (int)mode, fname );
-               return( 1 );
-       }
-       return( 0 );
-}
-
-
-int
-#if NeedFunctionPrototypes
-Chown_File ( 
-    char       *fname,
-    uid_t      owner,
-    gid_t      group,
-    char       *com
-)
-#else
-Chown_File ( fname, owner, group, com )
-char   *fname;
-uid_t  owner;
-gid_t  group;
-char   *com;
-#endif
-{
-       errno = 0;
-       if ( chown (fname, owner, group) != 0) {
-               USAGE2("%s : Failed in setteing of the owner and the group of the following files. \tPlease change to the file of the owner and the group of following ID \tafter the inquiry the system manager.\"%s\"\n", com, fname );
-               USAGE1("\t\t Owner ID \A1\A7%d\n", (int)owner);
-               USAGE1("\t\t Group ID \A1\A7%d\n", (int)group);
-               return( 1 );
-       }
-       return( 0 );
-}
-
-
-
-
-int    
-#if NeedFunctionPrototypes
-ChkPcfFontFile( char   *filename )
-#else
-ChkPcfFontFile( filename )
-char   *filename;
-#endif
-{
-       char    *suffix;
-
-       if ( !filename ) {
-               return  -1;
-       }
-       suffix = ( char * )strrchr( filename, '.' );
-       if ( !suffix ) {
-               return  -1;
-       }
-
-       return  strcmp( PCFSUFFIX, suffix );
-}
-
-
-int    
-#if NeedFunctionPrototypes
-ChkSnfFontFile( char   *filename )
-#else
-ChkSnfFontFile( filename )
-char   *filename;
-#endif
-{
-       char    *suffix;
-
-       if ( !filename ) {
-               return  -1;
-       }
-       suffix = ( char * )strrchr( filename, '.' );
-       if ( !suffix ) {
-               return  -1;
-       }
-
-       return  strcmp( SNFSUFFIX, suffix );
-}
-
-
-char   *
-#if NeedFunctionPrototypes
-get_cmd_path( 
-    char       *path,
-    char       *cmd
-)
-#else
-get_cmd_path( path, cmd )
-char   *path;
-char   *cmd;
-#endif
-{
-       char    *cmd_path = NULL;
-       struct stat     st;
-       char    *end;
-       char    chr_sv;
-
-       if ( !path || !cmd ) {
-               return  NULL;
-       }
-
-       for ( ; end = ( char * )strchr( path, ':' ); path = end + 1 ) {
-               chr_sv = *end;
-               *end = 0;
-               AllocString( cmd_path, path, NULL ) ;
-               *end = chr_sv;
-
-               AddString( cmd_path, "/", NULL ) ;
-               AddString( cmd_path, cmd, NULL ) ;
-
-               if ( stat( cmd_path, &st ) == 0 ) {
-                   if( st.st_mode & S_IFREG ) {
-                       cmd_path = realloc( cmd_path, strlen( cmd_path ) + 1 );
-                       return  cmd_path;
-                   }
-               }
-               FreeString( cmd_path ) ;
-       }
-       free(cmd_path);
-       AllocString( cmd_path, path, NULL ) ;
-       AddString( cmd_path, "/", NULL ) ;
-       AddString( cmd_path, cmd, NULL ) ;
-       if ( stat( cmd_path, &st ) == 0 ) {
-           if( st.st_mode & S_IFREG ) {
-               cmd_path = realloc( cmd_path, strlen( cmd_path ) + 1 );
-               return  cmd_path;
-           }
-       }
-       free( cmd_path );
-       return  NULL;
-}
-
-int
-#if NeedFunctionPrototypes
-SetCmdPath( 
-    char       *com ,
-    char       **path ,
-    char       *dflt_path ,
-    char       *cmd 
-)
-#else
-SetCmdPath( com, path, dflt_path, cmd )
-char   *com ;
-char   **path ;
-char   *dflt_path ;
-char   *cmd ;
-#endif
-{
-       struct  stat    statbuf ;
-       char    *pbuf ;
-
-       if( stat( dflt_path, &statbuf ) ){
-           if( !( pbuf = (char *)get_cmd_path( getenv( "PATH" ), cmd )) ){
-               USAGE2("%s: There is not \"%s\" command in \"PATH\".\n", com, cmd ) ;
-               return -1 ;
-           }
-           if( stat( pbuf, &statbuf ) ){
-               USAGE2("%s: There is not \"%s\" command.\n", com, cmd ) ;
-               free(pbuf);
-               return STAT_ERROR ;
-           }
-           if( !(statbuf.st_mode & S_IXUSR) ){
-               USAGE2("%s: \"%s\" command don't have permission to execute.\n", com, cmd ) ;
-               free(pbuf);
-               return STAT_ERROR ;
-           }
-       }else{
-           if( !(statbuf.st_mode & S_IXUSR) ){
-               USAGE2("%s: \"%s\" command don't have permission to execute.\n", com, cmd ) ;
-               return STAT_ERROR ;
-           }
-           pbuf = dflt_path ;
-       }
-       *path = pbuf ;
-       return 0 ;
-}
-
-/*****************************< end of oakfuty.c >************************/
diff --git a/cde/programs/dtudcfonted/mtfgui.c b/cde/programs/dtudcfonted/mtfgui.c
deleted file mode 100644 (file)
index 9dd3aee..0000000
+++ /dev/null
@@ -1,687 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* mtfgui.c 1.21 - Fujitsu source for CDEnext    96/10/30 13:13:46      */
-/* $XConsortium: mtfgui.c /main/11 1996/11/08 01:55:01 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-
-#include <stdio.h>
-#include <locale.h>
-#include <X11/Intrinsic.h>
-#include <Xm/MessageB.h>
-
-#include "xoakufont.h"
-#include "util.h"
-
-void CBeOblB_aEnd();
-void EHeStaT_list();
-void CBeScro();
-void EHeBulB_eMEv();
-void EHeBulB_eExp();
-void EHeBulB_dExp();
-static void EHStaT_disp();
-
-extern Resource resource;
-
-extern int efctPtnNum();
-extern char *char_set();
-
-extern char *fullpath;
-extern FalFontData fullFontData;
-
-extern FalCodeRegion CodeArea[16];
-
-/********************************************************************
- structure of widgets
- ********************************************************************/
-extern Widget  toplevel;
-       Widget  editPopW,
-               wgeScro,
-               wgeBulB_edit;
-static Widget  wgeStaT_form[EDLIST_MAX],
-               wgeStaT_disp[EDLIST_MAX],
-               wgeStaT_list[EDLIST_MAX],
-               wgeBulB_disp;
-
-/**********************************************************************
- display windows
- **********************************************************************/
-
-/*
- * contents : displays the "User Defined Charactrer editor" window
- */
-
-static Widget CreateEditPtn();
-void OpenCB();
-void MngPtnCB();
-void CpyPtnCB();
-void CBeRecB_color();
-void CBeRecB_obj();
-void CBeOblB_aAdd();
-void CBeOblB_rCmd();
-void CBeOblB_rCmdp();
-void CBeOblB_rCan();
-
-
-/**
- **  contents : manage the codes list 
- ** ===================================================================
- **/
-
-static void
-XlfdCB()
-{
-  Widget       dialog;
-  Arg          args[5];
-  char         mess[1024];
-  int          n;
-  XmString     cs, cs1, cs2;
-
-  sprintf(mess, "%s : %s", resource.file_name, fullpath);
-  cs = XmStringCreateLocalized(mess);
-  cs1 = XmStringSeparatorCreate();
-  cs2 = XmStringConcat(cs, cs1);
-  XmStringFree(cs);
-  XmStringFree(cs1);
-  sprintf(mess, "%s : %s", resource.xlfd_name, fullFontData.xlfdname);
-  cs1 = XmStringCreateLocalized(mess);
-  cs = XmStringConcat(cs2, cs1);
-  XmStringFree(cs1);
-  XmStringFree(cs2);
-  n = 0;
-  XtSetArg (args[n], XmNtitle, resource.l_xlfd_title); n++;
-  XtSetArg (args[n], XmNmessageString, cs); n++;
-  XtSetArg (args[n], XmNdialogStyle, XmDIALOG_MODELESS); n++;
-  dialog = XmCreateInformationDialog (toplevel, "Xlfd_name", args, n);
-  XtUnmanageChild (XmMessageBoxGetChild(dialog, XmDIALOG_CANCEL_BUTTON));
-  XtUnmanageChild (XmMessageBoxGetChild(dialog, XmDIALOG_HELP_BUTTON));
-  XtManageChild (dialog);
-  XmStringFree(cs);
-}
-
-static void
-CodeAreaCB()
-{
-    char       mess[256];
-    char       tmp[16];
-    Widget     dialog;
-    Arg                args[5];
-    int                n;
-    XmString   cs;
-
-    sprintf(mess, "%s : ", resource.codearea);
-    switch (fullFontData.cd_set) {
-       case FAL_FONT_CS0:
-           strcat(mess, "CS0:");
-           break;
-       case FAL_FONT_CS1:
-           strcat(mess, "CS1:");
-           break;
-       case FAL_FONT_CS2:
-           strcat(mess, "CS2:");
-           break;
-       case FAL_FONT_CS3:
-           strcat(mess, "CS3:");
-           break;
-    }
-
-    for (n=0; CodeArea[n].start != -1; n++) {
-       sprintf(tmp, " %X - %X ", CodeArea[n].start, CodeArea[n].end);
-       strcat(mess, tmp);
-    }
-    cs = XmStringCreateLocalized(mess);
-    n = 0;
-    XtSetArg (args[n], XmNtitle, resource.l_codearea_title); n++;
-    XtSetArg (args[n], XmNmessageString, cs); n++;
-    XtSetArg (args[n], XmNdialogStyle, XmDIALOG_MODELESS); n++;
-    XtSetArg (args[n], XmNdefaultButtonType, XmDIALOG_CANCEL_BUTTON); n++;
-    dialog = XmCreateInformationDialog (toplevel, "UDCarea", args, n);
-    XtUnmanageChild (XmMessageBoxGetChild(dialog, XmDIALOG_CANCEL_BUTTON));
-    XtUnmanageChild (XmMessageBoxGetChild(dialog, XmDIALOG_HELP_BUTTON));
-    XtManageChild (dialog);
-    XmStringFree(cs);
-}
-
-void
-ListSetLabelStr(i, str)
-int i;
-String str;
-{
-    SetLabelString( wgeStaT_list[i], str );
-}
-
-void
-ListSelectItem(i)
-int i;
-{
-    XtVaSetValues( wgeStaT_list[i],
-       XmNbackground, (XtArgVal) resource.foreground,
-       XmNforeground, (XtArgVal) resource.background,
-       NULL);
-    xl.list_winID = XtWindow( wgeStaT_disp[i] ) ;
-}
-
-void
-ListUnselectItem(i)
-int i;
-{
-    XtVaSetValues( wgeStaT_list[i],
-       XmNbackground, (XtArgVal) resource.background,
-       XmNforeground, (XtArgVal) resource.foreground,
-       NULL);
-    xl.list_winID = 0 ;
-}
-
-void
-ListSetGlyphImage( i )
-int    i ;
-{
-       int     code ;
-
-       dl_glyph[i].disp_winID = XtWindow(wgeStaT_disp[i]);
-       code = noToCode(ptnSqToNo(sq_disp[i]));
-       if (codeCheck(code)) {
-               XClearWindow(xl.display, dl_glyph[i].disp_winID);
-               return;
-       }
-       if (code == edg.code && xl.dispImage != NULL) {
-               XPutImage(xl.display, dl_glyph[i].disp_winID, xl.borderGC,
-                               xl.dispImage, 0,0,0,0, edg.width, edg.height );
-       } else {
-               if (dl_glyph[i].dispImage)
-                   XFree((char *)dl_glyph[i].dispImage);
-               if (ptnGet(code, dl_glyph[i].ptn))
-                   return ;
-               dl_glyph[i].dispImage  = XCreateImage( xl.display,
-                   DefaultVisual(xl.display, DefaultScreen(xl.display)), 1,
-                   XYBitmap, 0, dl_glyph[i].ptn, edg.width, edg.height, 8, 0);
-               dl_glyph[i].dispImage->bitmap_bit_order = MSBFirst;
-               dl_glyph[i].dispImage->byte_order       = MSBFirst;
-
-               XPutImage(xl.display, dl_glyph[i].disp_winID, xl.borderGC,
-                       dl_glyph[i].dispImage, 0,0,0,0, edg.width, edg.height);
-       }
-}
-
-/*ARGSUSED*/
-static void
-EHStaT_disp( widget, i )
-Widget         widget;
-int            i;                      /* widget that have some ivent */
-{
-    ListSetGlyphImage( i );
-}
-
-/**
- **  contents : create the icon
- ** ===================================================================
- **/
-
-
-/**
- **  contents : set callback functions for UDC editor window 
- ** ===================================================================
- **/
-
-static void _create_editptn_after();
-
-static Widget FooterMessage;
-static Widget codeLabel;
-
-static menuButtonItems menu_btn[] = {
-    MENUBTNARGS( 'F' ),
-    MENUBTNARGS( 'E' ),
-    MENUBTNARGS( 'C' ),
-    MENUBTNARGS( 'I' ),
-};
-static MButton MenuBTN = MBUTTONS( menu_btn );
-
-static ButtonItems file_btn[] = {
-    BTNARGS( OpenCB, NULL, 'O', True, False),
-    BTNARGS( CBeOblB_aAdd,   NULL, 'S', True, False),
-    BTNARGS( NULL,           NULL, NULL, NULL, NULL),
-    BTNARGS( CBeOblB_aEnd,   NULL, 'E', True, False),
-};
-static Button FileBTN = BUTTONS( file_btn );
-
-static ButtonItems edit_btn[] = {
-    BTNARGS( CBeOblB_rCmd, PROC_CLS,  'C', True, False),
-    BTNARGS( CBeOblB_rCmd, PROC_SET,  'S', True, False),
-    BTNARGS( CBeOblB_rCmd, PROC_REV,  'R', True, False),
-    BTNARGS( CBeOblB_rCmdp, PROC_CUT,  'U', True, False),
-    BTNARGS( CBeOblB_rCmdp, PROC_CPY,  'O', True, False),
-    BTNARGS( CBeOblB_rCmdp, PROC_PASTE,'P', True, False),
-    BTNARGS( CBeOblB_rCmd, PROC_ROLL, 'A', True, False),
-    BTNARGS( CBeOblB_rCmd, PROC_SYMV, 'V', True, False),
-    BTNARGS( CBeOblB_rCmd, PROC_SYMH, 'H', True, False),
-    BTNARGS( CBeOblB_rCan, NULL,      'N', True, False),
-};
-static Button EditBTN = BUTTONS( edit_btn );
-
-static ButtonItems char_btn[] = {
-    BTNARGS( MngPtnCB, NULL, 'A', True, False ),
-    BTNARGS( CpyPtnCB, NULL, 'C', True, False ),
-};
-static Button CharBTN = BUTTONS( char_btn );
-
-static ButtonItems info_btn[] = {
-    BTNARGS( XlfdCB, NULL, 'X', True, False ),
-    BTNARGS( CodeAreaCB, NULL, 'C', True, False ),
-};
-static Button InfoBTN = BUTTONS( info_btn );
-
-static ExclusiveItems draw_ex[] = {
-    EXARGS( PROC_POINT,  "pencil",    True, CBeRecB_obj, True  ),
-    EXARGS( PROC_LINE,   "line",      True, CBeRecB_obj, False ),
-    EXARGS( PROC_RECT,   "rectangle", True, CBeRecB_obj, False ),
-    EXARGS( PROC_CIRCLE, "circle",    True, CBeRecB_obj, False ),
-    EXARGS( PROC_ERASE,  "erase",     True, CBeRecB_obj, False ),
-    EXARGS( PROC_SELECT, "select",    True, CBeRecB_obj, False ),
-};
-static Exclusive DrawEX = EXCLUSIVE( draw_ex );
-
-static void
-Unset()
-{
-    XtSetSensitive(EditBTN.w[0], False);
-    XtSetSensitive(EditBTN.w[1], False);
-    XtSetSensitive(EditBTN.w[2], False);
-    XtSetSensitive(EditBTN.w[3], False);
-    XtSetSensitive(EditBTN.w[4], False);
-    XtSetSensitive(EditBTN.w[5], False);
-    XtSetSensitive(EditBTN.w[6], False);
-    XtSetSensitive(EditBTN.w[7], False);
-    XtSetSensitive(EditBTN.w[8], False);
-    XtSetSensitive(EditBTN.w[9], False);
-}
-
-void
-SelectSet()
-{
-    XtSetSensitive(EditBTN.w[0], True);
-    XtSetSensitive(EditBTN.w[1], True);
-    XtSetSensitive(EditBTN.w[2], True);
-    XtSetSensitive(EditBTN.w[3], True);
-    XtSetSensitive(EditBTN.w[4], True);
-    XtSetSensitive(EditBTN.w[6], True);
-    XtSetSensitive(EditBTN.w[7], True);
-    XtSetSensitive(EditBTN.w[8], True);
-}
-
-void
-SelectUnset()
-{
-    XtSetSensitive(EditBTN.w[0], False);
-    XtSetSensitive(EditBTN.w[1], False);
-    XtSetSensitive(EditBTN.w[2], False);
-    XtSetSensitive(EditBTN.w[3], False);
-    XtSetSensitive(EditBTN.w[4], False);
-    XtSetSensitive(EditBTN.w[6], False);
-    XtSetSensitive(EditBTN.w[7], False);
-    XtSetSensitive(EditBTN.w[8], False);
-}
-
-void
-CopySet()
-{
-    XtSetSensitive(EditBTN.w[5], True);
-}
-
-void
-UndoSet()
-{
-    XtSetSensitive(EditBTN.w[9], True);
-}
-
-void
-UndoUnset()
-{
-    XtSetSensitive(EditBTN.w[9], False);
-}
-
-/**
- **  contents : create the UDC editor window 
- ** --------------------------------
- **/
-
-void
-PopupEditPtn(owner)
-Widget owner;
-{
-    if (! editPtnW){
-       editPtnW = CreateEditPtn(owner);
-       _create_editptn_after();
-    }
-    XtPopup(editPtnW, XtGrabNone);
-}
-
-static Widget
-CreateEditPtn(owner)
-Widget owner;
-{
-    int                slimax;
-    int                i;
-    Widget     baseForm, pop, font_menu, edit_menu, char_menu, info_menu;
-    Widget     listBase, listFrame, rc, editFrame, figure_w;
-    Widget     imageFrame, imageForm, editPane, image;
-    extern Widget CreateFrame();
-    extern Widget CreatePixButton();
-
-    Arg arg[1];
-
-
-    SetItemLabel(&MenuBTN, 0, resource.l_font);
-    SetItemLabel(&MenuBTN, 1, resource.l_edit);
-    SetItemLabel(&MenuBTN, 2, resource.l_manage);
-    SetItemLabel(&MenuBTN, 3, resource.l_info);
-    baseForm = (Widget)
-    CreateMenuBarAndFooterMessageForm( owner, "dtudcfonted",
-       &MenuBTN, XtNumber(menu_btn), &pop, &FooterMessage );
-
-    editPopW = pop;
-
-    AddDeleteProc(pop, CBeOblB_aEnd);
-
-    font_menu = GetMenuWidget( &MenuBTN, 0 );
-    edit_menu = GetMenuWidget( &MenuBTN, 1 );
-    char_menu = GetMenuWidget( &MenuBTN, 2 );
-    info_menu = GetMenuWidget( &MenuBTN, 3 );
-
-    SetItemLabel(&FileBTN, 0, resource.l_open_w);
-    SetItemLabel(&FileBTN, 1, resource.l_save);
-    SetItemLabel(&FileBTN, 3, resource.l_exit);
-
-    SetItemLabel(&EditBTN, 0, resource.l_clear);
-    SetItemLabel(&EditBTN, 1, resource.l_set);
-    SetItemLabel(&EditBTN, 2, resource.l_reverse);
-    SetItemLabel(&EditBTN, 3, resource.l_cut);
-    SetItemLabel(&EditBTN, 4, resource.l_Copy);
-    SetItemLabel(&EditBTN, 5, resource.l_paste);
-    SetItemLabel(&EditBTN, 6, resource.l_roll);
-    SetItemLabel(&EditBTN, 7, resource.l_updown_roll);
-    SetItemLabel(&EditBTN, 8, resource.l_leftright_roll);
-    SetItemLabel(&EditBTN, 9, resource.l_undo);
-
-    SetItemLabel(&CharBTN, 0, resource.l_manage_w);
-    SetItemLabel(&CharBTN, 1, resource.l_copy_w);
-
-    SetItemLabel(&InfoBTN, 0, resource.l_xlfd);
-    SetItemLabel(&InfoBTN, 1, resource.l_codearea);
-
-    CreateMenuButtons( font_menu, &FileBTN, XtNumber(file_btn));
-    CreateMenuButtons( edit_menu, &EditBTN, XtNumber(edit_btn));
-    Unset();
-    CreateMenuButtons( char_menu, &CharBTN, XtNumber(char_btn));
-    CreateMenuButtons( info_menu, &InfoBTN, XtNumber(info_btn));
-
-    /* create "Character list" */
-
-    listFrame =
-    CreateFrame( baseForm, "listFrame", XmSHADOW_IN, 2);
-    AddTopAttachForm(listFrame, resource.ed_wge_topoff);
-    AddLeftAttachForm(listFrame, resource.ed_wge_lftoff);
-    AddBottomAttachForm(listFrame, resource.ed_wge_btmoff);
-
-    listBase =
-    CreateRowColumn( listFrame, "listFrame", L_VERTICAL, 4, 2, 2);
-
-    for( i=0  ;  i < edlist.nlist  ;  i++ ) {
-       wgeStaT_form[i] = CreateForm( listBase, "listform" );
-       wgeStaT_list[i] =
-       CreateLabel( wgeStaT_form[i], "label",  "0000" );
-       wgeStaT_disp[i] = CreateDrawingArea( wgeStaT_form[i], "image",
-                       edg.width, edg.height, EHStaT_disp, i ) ;
-       AddLeftAttachWidget( wgeStaT_disp[i], wgeStaT_list[i], 0 ) ;
-       XtAddEventHandler( wgeStaT_list[i],
-               ButtonPressMask|ButtonReleaseMask,
-               False, EHeStaT_list, (XtPointer) (intptr_t) i );
-       XtAddEventHandler( wgeStaT_disp[i],
-               ButtonPressMask|ButtonReleaseMask,
-               False, EHeStaT_list, (XtPointer) (intptr_t) i );
-
-       if (i==0){
-           XtVaGetValues(wgeStaT_disp[i],
-               XmNheight,      &(edlist.elem_h),
-               XmNwidth,       &(edlist.elem_w), NULL);
-
-           edlist.back = resource.pane_background;
-           edlist.border = resource.pane_foreground;
-
-           dn.elem_h = edlist.elem_h;
-           dn.elem_w = edlist.elem_w;
-
-            /*
-           */
-           edpane.pix_w  = edpane.width / edg.width;
-           edpane.pix_h  = edpane.height / edg.height;
-           if(edpane.pix_w > edpane.pix_h)
-               edpane.pix_w = edpane.pix_h;
-           else
-               edpane.pix_h = edpane.pix_w;
-           /* */
-           edpane.pix_w  = ( edpane.pix_w < 8 ) ? 8 : edpane.pix_w;
-           edpane.pix_h  = ( edpane.pix_h < 8 ) ? 8 : edpane.pix_h;
-           /* 
-           */
-           edpane.width  = edpane.pix_w * edg.width  - 1;
-           edpane.height = edpane.pix_h * edg.height - 1;
-
-           edlist.nlist = (edpane.height +2)/(int)(edlist.elem_h +8);
-           edlist.nlist =
-               (edlist.nlist<EDLIST_MAX)?edlist.nlist:EDLIST_MAX;
-       }
-    }
-
-    XtManageChildren( wgeStaT_form, edlist.nlist );
-    for( i=0  ;  i < edlist.nlist  ;  i++ ) {
-       XtManageChild( wgeStaT_list[i] );
-       XtManageChild( wgeStaT_disp[i] );       
-    }
-
-    /* create the scroll bar for Charcter list */
-    XtVaGetValues( listBase, XmNheight, &(edlist.list_h), NULL);
-
-    if (( slimax = efctPtnNum()) < edlist.nlist)  
-       slimax = edlist.nlist;
-    wgeScro = CreateScrollBar( baseForm, "scrollBar", (edpane.height+2),
-                               edlist.nlist, 0, slimax, CBeScro);
-    AddLeftAttachWidget( wgeScro, listFrame, 4 );
-    AddTopAttachForm( wgeScro, resource.ed_wge_topoff );
-    AddBottomAttachForm( wgeScro, resource.ed_wge_btmoff );
-
-    rc =
-    CreateForm( baseForm, "rc" );
-    AddTopAttachForm( rc, resource.ed_wge_topoff );
-    AddRightAttachForm( rc, resource.ed_wge_rghoff );
-    AddBottomAttachForm( rc, resource.ed_wge_btmoff );
-
-    editFrame =
-    CreateFrame( baseForm, "editFrame", XmSHADOW_IN, 2);
-    AddTopAttachForm(editFrame, resource.ed_wge_topoff);
-    AddLeftAttachWidget(editFrame, wgeScro, 4);
-    AddRightAttachWidget(editFrame, rc, 10);
-
-    figure_w =
-    CreatePixButton(rc, "Draw", &DrawEX);
-    AddTopAttachForm(figure_w, 0);
-    AddLeftAttachForm(figure_w, 0);
-    AddRightAttachForm(figure_w, 0);
-
-    imageFrame =
-    CreateCaptionFrame( rc, "Frame", "  ", XmSHADOW_IN, 1);
-    AddTopAttachWidget(XtParent(imageFrame), figure_w, 4);
-    AddLeftAttachForm(XtParent(imageFrame), 0);
-    AddRightAttachForm(XtParent(imageFrame), 0);
-    AddBottomAttachForm(XtParent(imageFrame), 0);
-
-    imageForm =
-    CreateForm( imageFrame, "separator" );
-
-    /* create the Editing pane */
-    wgeBulB_edit = editPane =
-    CreateDrawingArea( editFrame, "editPane",
-                       edpane.width, edpane.height, EHeBulB_eExp, 0);
-
-    XtAddEventHandler( editPane,
-             ButtonPressMask | ButtonMotionMask | ButtonReleaseMask,
-             False, EHeBulB_eMEv, NULL );
-    AddTopAttachForm( editPane, 2 );
-    AddLeftAttachForm( editPane, 2 );
-
-    /* create character image */
-    codeLabel = CreateLabel( imageForm, "codeLabel", "0000" );
-    AddTopAttachForm( codeLabel, 3 );
-    AddLeftAttachForm( codeLabel, 3 );
-
-    wgeBulB_disp = image = CreateDrawingArea( imageForm, "image", edg.width,
-                                       edg.height, EHeBulB_dExp, 0);
-    AddTopAttachWidget( image, codeLabel, 3 );
-    AddLeftAttachForm( image, 6 );
-
-    XtRealizeWidget( editPopW );
-
-    return(editPopW);
-}
-
-
-
-
-void
-SetCodeString(code)
-int code;
-{
-    char str[8];
-
-    if (! code){
-       str[0] = '\0';
-    }
-    else{
-       sprintf( str, "%4x:", code );
-    }
-    SetLabelString(codeLabel, str);
-}
-
-
-
-static void
-_create_editptn_after()
-{
-    int                slctloc; 
-    static char        dashPtn[] = {1,1};      /* Editing pane's border pattern */
-    extern void chgEdList();
-
-
-    /*
-     *  set X-library interface 
-     */
-    xl.display    = XtDisplayOfObject( editPopW );
-    xl.root_winID = RootWindow( xl.display, DefaultScreen(xl.display) );
-    xl.edit_winID = XtWindow( wgeBulB_edit );
-    xl.disp_winID = XtWindow( wgeBulB_disp );    
-    xl.list_winID = XtWindow( wgeStaT_disp[0] );
-
-    /*
-     *  Graphic Context ( Pixel clear ) 
-     */
-    xl.backGC     = XCreateGC( xl.display, xl.root_winID, 0, 0 );
-    XSetForeground( xl.display, xl.backGC, edpane.back );
-    XSetBackground( xl.display, xl.backGC, edpane.border );
-
-    /*
-     *  Graphic Context ( Pixel set ) 
-     */
-    xl.borderGC   = XCreateGC( xl.display, xl.root_winID, 0, 0 );
-    XSetForeground( xl.display, xl.borderGC, edpane.border );
-    XSetBackground( xl.display, xl.borderGC, edpane.back );
-
-    /*
-     *  Graphic Context ( rubber band ) 
-     */
-    xl.rubGC      = XCreateGC( xl.display, xl.root_winID, 0, 0 );
-    XSetForeground(xl.display, xl.rubGC, edpane.border ^ edpane.back);
-
-    XSetFunction  ( xl.display, xl.rubGC, GXxor );
-
-    /*
-     *  Graphc Context ( lattice of Editing pane ) 
-     */
-    xl.dashGC     = XCreateGC( xl.display, xl.root_winID, 0, 0 );
-    XSetForeground( xl.display, xl.dashGC, edpane.border );
-    XSetBackground( xl.display, xl.dashGC, edpane.back );
-
-    XSetLineAttributes( xl.display, xl.dashGC, 0,
-                       LineDoubleDash, CapButt, JoinMiter );
-    XSetDashes    ( xl.display, xl.dashGC, 0, dashPtn, 2 );
-
-    /*
-     *  display Editing pane 
-     */
-    xl.dispImage  = XCreateImage( xl.display,
-       DefaultVisual( xl.display, DefaultScreen(xl.display) ),
-       1, XYBitmap, 0, edg.ptn, edg.width, edg.height, 8, 0    );
-    xl.dispImage->bitmap_bit_order = MSBFirst;
-    xl.dispImage->byte_order       = MSBFirst;
-                   
-    /*
-     *  initialize 
-     */
-    edpane.color = ON;
-    edpane.obj   = PROC_POINT;
-    em.proc      = PROC_POINT;
-
-    if(efctPtnNum() > 0){
-       slctloc = 0;
-       SetCodeString(edg.code);
-    }
-    else{
-       slctloc = -1;    
-    }
-    chgEdList( 0, slctloc, ON );
-
-}
-
-void
-UpdateMessage(str)
-String str;
-{
-    static Boolean nomsg = False;
-
-    if (! str || ! *str){
-       if (nomsg){
-           return;
-       }
-       else{
-           nomsg = True;
-       }
-    }
-    else{
-       nomsg = False;
-    }
-    SetFooterString(FooterMessage, str);
-}
diff --git a/cde/programs/dtudcfonted/pixmaps/Circle.pm b/cde/programs/dtudcfonted/pixmaps/Circle.pm
deleted file mode 100755 (executable)
index fa93e1d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* XPM */
-/* $XConsortium: Circle.pm /main/4 1996/07/23 11:49:20 drk $ */
-/*********************************************************************
-*  (c) Copyright 1993, 1994 Hewlett-Packard Company    
-*  (c) Copyright 1993, 1994 International Business Machines Corp.
-*  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-*  (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
-*      Novell, Inc.
-**********************************************************************/
-static char * Circle [] = {
-/* width height ncolors cpp [x_hot y_hot] */
-"36 36 2 1 -1 -1",
-/* colors */
-"     s background    m black c #949494949494",
-".     s foreground    m white c white",
-/* pixels */
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"              .......               ",
-"           ...       ...            ",
-"          .             .           ",
-"         .               .          ",
-"        .                 .         ",
-"       .                   .        ",
-"      .                     .       ",
-"     .                       .      ",
-"     .                       .      ",
-"     .                       .      ",
-"    .                         .     ",
-"    .                         .     ",
-"    .                         .     ",
-"    .                         .     ",
-"    .                         .     ",
-"    .                         .     ",
-"    .                         .     ",
-"     .                       .      ",
-"     .                       .      ",
-"     .                       .      ",
-"      .                     .       ",
-"       .                   .        ",
-"        .                 .         ",
-"         .               .          ",
-"          .             .           ",
-"           ...       ...            ",
-"              .......               ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    "};
diff --git a/cde/programs/dtudcfonted/pixmaps/Eraser.pm b/cde/programs/dtudcfonted/pixmaps/Eraser.pm
deleted file mode 100755 (executable)
index f9e8234..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* XPM */
-/* $XConsortium: Eraser.pm /main/4 1996/07/23 11:49:43 drk $ */
-/*********************************************************************
-*  (c) Copyright 1993, 1994 Hewlett-Packard Company    
-*  (c) Copyright 1993, 1994 International Business Machines Corp.
-*  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-*  (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
-*      Novell, Inc.
-**********************************************************************/
-static char * Eraser [] = {
-/* width height ncolors cpp [x_hot y_hot] */
-"36 36 8 1 0 0",
-/* colors */
-"      s iconColor6    m white c yellow",
-".     s iconColor2    m white c white",
-"X    s background    m black c #949494949494",
-"o    s iconGray5     m black c #737373737373",
-"O    s iconGray1     m white c #dededededede",
-"+    s iconGray3     m white c #adadadadadad",
-"@     s iconColor3    m black c red",
-"#     s iconColor1    m black c black",
-/* pixels */
-" . . XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"o . . XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-" o . . XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"o o . . XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-" o o . . XXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"o o o . . XXXXXXXXXXXXXXXXXXXXXXXXXX",
-"Xo o o . . XXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXo o o . . XXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXo o o . . XXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXo o o . . XXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXo o o . . XXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXo o o . . XXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXo o o . . XXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXo o o ...OXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXo o o+...OXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXo oo++...OXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXo+oo++...OXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXX++oo++..ooXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXX++oo++o@.@XXXXXXXXXXXXX",
-"XXXXXXXXXXXXXX++ooo@.@O@XXXXXXXXXXXX",
-"XXXXXXXXXXXXXXX+oo@+@O@O@XXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXo@o@o@O@O@XXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXo@o@o@O@O@#########",
-"XXXXXXXXXXXXXXXXXXo@o@o@O@##########",
-"XXXXXXXXXXXXXXXXXXXo@o@o@###########",
-"XXXXXXXXXXXXXXXXXXXXo@o@############",
-"XXXXXXXXXXXXXXXXXXXXXo@#############",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
-"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/cde/programs/dtudcfonted/pixmaps/Line.pm b/cde/programs/dtudcfonted/pixmaps/Line.pm
deleted file mode 100755 (executable)
index fd911ad..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* XPM */
-/* $XConsortium: Line.pm /main/4 1996/07/23 11:50:13 drk $ */
-/*********************************************************************
-*  (c) Copyright 1993, 1994 Hewlett-Packard Company    
-*  (c) Copyright 1993, 1994 International Business Machines Corp.
-*  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-*  (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
-*      Novell, Inc.
-**********************************************************************/
-static char * Line [] = {
-/* width height ncolors cpp [x_hot y_hot] */
-"36 36 2 1 -1 -1",
-/* colors */
-"     s background    m black c #949494949494",
-".     s foreground    m white c white",
-/* pixels */
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"      .                             ",
-"       .                            ",
-"        .                           ",
-"        .                           ",
-"         .                          ",
-"          .                         ",
-"           .                        ",
-"            .                       ",
-"            .                       ",
-"             .                      ",
-"              .                     ",
-"               .                    ",
-"                .                   ",
-"                .                   ",
-"                 .                  ",
-"                  .                 ",
-"                   .                ",
-"                    .               ",
-"                    .               ",
-"                     .              ",
-"                      .             ",
-"                       .            ",
-"                        .           ",
-"                        .           ",
-"                         .          ",
-"                          .         ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    "};
diff --git a/cde/programs/dtudcfonted/pixmaps/Pencil.pm b/cde/programs/dtudcfonted/pixmaps/Pencil.pm
deleted file mode 100644 (file)
index c3d6d41..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* XPM */
-/* $XConsortium: Pencil.pm /main/4 1996/07/23 11:50:33 drk $ */
-/*********************************************************************
-*  (c) Copyright 1993, 1994 Hewlett-Packard Company    
-*  (c) Copyright 1993, 1994 International Business Machines Corp.
-*  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-*  (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
-*      Novell, Inc.
-**********************************************************************/
-static char * Pencil [] = {
-/* width height ncolors cpp [x_hot y_hot] */
-"36 36 8 1 0 0",
-/* colors */
-"     s background    m black c #949494949494",
-".     s iconColor6    m white c yellow",
-"X     s iconColor2    m white c white",
-"o    s iconGray5     m black c #737373737373",
-"O     s foreground    m white c white",
-"+    s iconGray3     m white c #adadadadadad",
-"@    s iconGray1     m white c #dededededede",
-"#    s iconGray7     m black c #424242424242",
-/* pixels */
-"                                    ",
-"                                    ",
-"                                   .",
-"                                  .X",
-"                                 .X.",
-"                                .X.X",
-"                               .X.X.",
-"                              .X.X.o",
-"                             .X.X.o.",
-"                            .X.X.o.o",
-"      OOOOO                .X.X.o.o.",
-"           OOO            .X.X.o.o.o",
-"              O          .X.X.o.o.o ",
-"               O        .X.X.o.o.o  ",
-"                O      .X.X.o.o.o   ",
-"                 O    .X.X.o.o.o    ",
-"                 O   .X.X.o.o.o     ",
-"                 O  +@XX.o.o.o      ",
-"                O   +XX@o.o.o       ",
-"              OO   +XX@ooo.o        ",
-"           OOO     +X@ooo.o         ",
-"          O       +X@ooooo          ",
-"         O        +@ooooo           ",
-"         O       +#ooooo            ",
-"          O      ###oo              ",
-"           O     ##o                ",
-"            OO  ##                  ",
-"              O##                   ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    "};
diff --git a/cde/programs/dtudcfonted/pixmaps/Rectangle.pm b/cde/programs/dtudcfonted/pixmaps/Rectangle.pm
deleted file mode 100755 (executable)
index af9490d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* XPM */
-/* $XConsortium: Rectangle.pm /main/4 1996/07/23 11:50:54 drk $ */
-/*********************************************************************
-*  (c) Copyright 1993, 1994 Hewlett-Packard Company    
-*  (c) Copyright 1993, 1994 International Business Machines Corp.
-*  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-*  (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
-*      Novell, Inc.
-**********************************************************************/
-static char * Rectangle [] = {
-/* width height ncolors cpp [x_hot y_hot] */
-"36 36 2 1 -1 -1",
-/* colors */
-"     s background    m black c #949494949494",
-".     s foreground    m white c white",
-/* pixels */
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"   ..............................   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   .                            .   ",
-"   ..............................   ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    "};
diff --git a/cde/programs/dtudcfonted/pixmaps/SelectArea.pm b/cde/programs/dtudcfonted/pixmaps/SelectArea.pm
deleted file mode 100755 (executable)
index 30679c8..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* XPM */
-/* $XConsortium: SelectArea.pm /main/4 1996/07/23 11:51:18 drk $ */
-/*********************************************************************
-*  (c) Copyright 1993, 1994 Hewlett-Packard Company    
-*  (c) Copyright 1993, 1994 International Business Machines Corp.
-*  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-*  (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
-*      Novell, Inc.
-**********************************************************************/
-static char * SelectArea [] = {
-/* width height ncolors cpp [x_hot y_hot] */
-"36 36 3 1 -1 -1",
-/* colors */
-"     s background    m black c #949494949494",
-".     s iconColor1    m black c black",
-"X     s iconColor2    m white c white",
-/* pixels */
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"    ....  ..  ..  ..  ..  ....      ",
-"    ....  ..  ..  ..  ..  ....      ",
-"    ..XXX  XX  XX  XX  XX  X..X     ",
-"    ..XXXX  XX  XX  XX  XX  ..XX    ",
-"      XX                      XX    ",
-"       X                       X    ",
-"    ..                      ..      ",
-"    ..X                     ..X     ",
-"      XX                      XX    ",
-"       X                       X    ",
-"    ..                      ..      ",
-"    ..X                     ..X     ",
-"      XX                      XX    ",
-"       X                       X    ",
-"    ..                      ..      ",
-"    ..X                     ..X     ",
-"      XX                      XX    ",
-"       X                       X    ",
-"    ..                      ..      ",
-"    ..X                     ..X     ",
-"    ....  ..  ..  ..  ..  ....XX    ",
-"    ....  ..  ..  ..  ..  ....XX    ",
-"     XXXX  XX  XX  XX  XX  XXXXX    ",
-"      XXXX  XX  XX  XX  XX  XXXX    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    ",
-"                                    "};
diff --git a/cde/programs/dtudcfonted/pixmaps/arrow.pm b/cde/programs/dtudcfonted/pixmaps/arrow.pm
deleted file mode 100755 (executable)
index 40f81d2..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/* XPM */
-/* $XConsortium: arrow.pm /main/4 1996/07/23 11:51:52 drk $ */
-static char * arrow_pm[] = {
-"14 14 3 1",
-"      c #C2C2C2C2C2C2",
-".     c #727272727272",
-"X     c #E8E8E8E8E8E8",
-"       .      ",
-"       ..     ",
-"       ...    ",
-"......... .   ",
-".........  .  ",
-"..          . ",
-"..           X",
-"..           X",
-"..          XX",
-".XXXXXXX   XX ",
-"       X  XX  ",
-"       X XX   ",
-"       XXX    ",
-"       XX     "};
diff --git a/cde/programs/dtudcfonted/resource/Dtudcfonted b/cde/programs/dtudcfonted/resource/Dtudcfonted
deleted file mode 100644 (file)
index 233e94c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-!  (c) Copyright 1995 FUJITSU LIMITED
-!  This is source code modified by FUJITSU LIMITED under the Joint
-!  Development Agreement for the CDEnext PST.
-!  This is unpublished proprietary source code of FUJITSU LIMITED
-
-*Lptog:                /usr/dt/lib/dtudcfonted/dtaddcpf
-*LptogCmd:     dtaddcpf
-
-*PaneForeground        : black
-*PaneBackground        : white
diff --git a/cde/programs/dtudcfonted/selectx.c b/cde/programs/dtudcfonted/selectx.c
deleted file mode 100644 (file)
index 6b7a0f3..0000000
+++ /dev/null
@@ -1,829 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* selectx.c 1.23 - Fujitsu source for CDEnext    96/10/30 13:13:45      */
-/* $XConsortium: selectx.c /main/7 1996/11/08 01:54:18 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <nl_types.h>
-
-#include<X11/Xlib.h>
-#include<X11/Xutil.h>
-#include<X11/Xatom.h>
-
-#include <Xm/Xm.h>
-#include <Xm/Form.h>
-#include <Xm/PushB.h>
-#include <Xm/Text.h>
-#include <Xm/TextF.h>
-#include <Xm/Label.h>
-#include <Xm/SeparatoG.h>
-#include <Xm/List.h>
-#include <Xm/ToggleB.h>
-#include <Xm/MessageB.h>
-#include <Xm/RowColumn.h>
-#include <Xm/Frame.h>
-#include <Xm/Label.h>
-
-/*
- * There is no public header file for this function (only an
- * internal header XmStringI.h).
- */
-extern XtPointer _XmStringUngenerate (XmString string,
-                        XmStringTag tag,
-                        XmTextType tag_type,
-                        XmTextType output_type);
-
-
-#include "xoakufont.h"
-#include "selectxlfd.h"
-
-extern Resource        resource ;
-
-/*
- * parameters
- */
-
-FalFontData fullFontData;
-
-void   PopupSelectXLFD() ;
-static Widget  CreateSelectXLFD() ;
-
-extern void    xlfdPopupDialog() ;
-extern int     GetListsOfItems() ;
-
-extern void    ReadCB();
-
-
-Widget xlfdDialog;
-static Widget xlfdWform;
-
-#define CS0 "Codeset 0"
-#define CS1 "Codeset 1"
-#define CS2 "Codeset 2"
-#define CS3 "Codeset 3"
-
-#define FAL_ERROR_STR resource.falerrmsg[((fal_utyerrno & 0xff) > 25) ? 0 : (fal_utyerrno & 0xff)]
-
-static Widget  pull1, pull2, pull3, pull4, scrolllist;
-static int     xlf_count = 0;
-static XmString *xlf=NULL;
-static int     udc_count = 0;
-static Boolean udc_flag = False;
-static int     *udc=NULL;
-static int     udc_val;
-static int     sty_count = 0;
-static Boolean sty_flag = False;
-static char    **sty=NULL;
-static char    *sty_val=NULL;
-static int     wls_count = 0;
-static Boolean wls_flag = False;
-static int     *wls=NULL;
-static int     wls_val;
-static int     hls_count = 0;
-static Boolean hls_flag = False;
-static int     *hls=NULL;
-static int     hls_val;
-static Widget       *button1=NULL;
-static Widget       *button2=NULL;
-static Widget       *button3=NULL;
-static Widget       *button4=NULL;
-
-/****************************************************************
- * callbacks                                                   *
- ***************************************************************/
-
-static char *
-spc(str, ch, count)
-char * str;
-char   ch;
-int    count;
-{
-    char *p;
-    p = str + strlen(str);
-    for(;count && (str < p);p--) {
-       if (*p == ch)
-           count --;
-    }
-    if (! count)
-       return(p+1);
-    else
-       return(NULL);
-}
-
-static void OpenWindowCB()
-{
-    char       *str, *p;
-    XmStringTable      st;
-
-    XtVaGetValues(scrolllist, XmNselectedItems, &st, NULL);
-    if( st == NULL ){
-       fullFontData.xlfdname = NULL;
-       return ;
-    }
-    str = (char *) _XmStringUngenerate(st[0], NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-
-    p = spc(str, '-', 4);
-    p++;
-
-    if (*p == 'p' || *p == 'P') {
-       fullFontData.xlfdname = (char *)-1;
-       return ;
-    }
-
-    fullFontData.xlfdname = str;
-    if(udc_flag == True)
-       fullFontData.cd_set = udc_val;
-    else
-       fullFontData.cd_set = -1;
-}
-
-/**
- **  contents : "Cancel" button callback 
- ** ------------------------
- **  
- ** 
- **/
-
-/*ARGSUSED*/
-static void
-OpenCancelCB( widget, clientData, callData )
-Widget         widget;
-caddr_t                clientData;
-caddr_t                callData;
-{
-    extern void ForcePopdownDialog();
-    if ( !editPtnW ){
-       exit( 0 );
-    }
-    ForcePopdownDialog(xlfdDialog);
-}
-
-
-/*
-* create selection window view
-*/
-void
-PopupSelectXLFD( top )
-Widget top ;
-{
-
-    if( xlfdDialog == NULL ){
-       if( (xlfdDialog = CreateSelectXLFD( top )) == NULL ){
-           exit( -1 ) ;
-       }
-    }
-    /* pop up select window */
-    xlfdPopupDialog( xlfdDialog );
-}
-
-
-static void
-create_xlfd()
-{
-       int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-       FalFontData key;
-       FalFontDataList *fontlist;
-       FalFontData *f;
-       int i;
-
-       if (udc_flag == True) {
-               key.cd_set = udc_val;
-               mask |= FAL_FONT_MASK_CODE_SET;
-       }
-       if (sty_flag == True) {
-               key.style.name = sty_val;
-               mask |= FAL_FONT_MASK_STYLE_NAME;
-       }
-       if (wls_flag == True) {
-               key.size.w = wls_val;
-               mask |= FAL_FONT_MASK_SIZE_W;
-       }
-       if (hls_flag == True) {
-               key.size.h = hls_val;
-               mask |= FAL_FONT_MASK_SIZE_H;
-       }
-       xlf_count = 0;
-       if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-               return;
-       }
-       if(fontlist->num == 0) {
-               FalFreeFontList(fontlist);
-               return;
-       }
-       if (xlf) {
-           for (i=0; i < xlf_count; i++) {
-               XmStringFree(xlf[i]);
-           }
-           XtFree((char *)xlf);
-       }
-       xlf = (XmString *)XtMalloc(sizeof(XmString) * fontlist->num);
-       for (i=0, f=fontlist->list; i < fontlist->num; i++, f++) {
-           xlf[xlf_count++] = XmStringCreateLocalized(f->xlfdname);
-       }
-       FalFreeFontList(fontlist);
-}
-
-static void
-udc_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-       moji = (char *) _XmStringUngenerate(label, NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if(strncmp(moji, "*", 1) == 0) {
-               udc_flag = False;
-       } else if(strcmp(moji, CS0) == 0) {
-               udc_val = FAL_FONT_CS0;
-               udc_flag = True;
-       } else if(strcmp(moji, CS1) == 0) {
-               udc_val = FAL_FONT_CS1;
-               udc_flag = True;
-       } else if(strcmp(moji, CS2) == 0) {
-               udc_val = FAL_FONT_CS2;
-               udc_flag = True;
-       } else if(strcmp(moji, CS3) == 0) {
-               udc_val = FAL_FONT_CS3;
-               udc_flag = True;
-       } else {
-               udc_flag = False;
-       }
-       XtFree(moji);
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-sty_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-       if (sty_val) {
-               XtFree(sty_val);
-               sty_val = NULL;
-       }
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-       moji = (char *) _XmStringUngenerate(label, NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if(strncmp(moji, "*", 1) == 0) {
-               sty_flag = False;
-       }
-       else {
-               sty_val = XtMalloc(sizeof(char) * (strlen(moji) + 1));
-               strcpy(sty_val, moji);
-               sty_flag = True;
-       }
-       XtFree(moji);
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-wls_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-       moji = (char *) _XmStringUngenerate(label, NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if(strncmp(moji, "*", 1) == 0) {
-               wls_flag = False;
-       }
-       else {
-               wls_val = atoi(moji);
-               wls_flag = True;
-       }
-       XmStringFree(label);
-       XtFree(moji);
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-hls_call(w)
-Widget w;
-{
-       XmString label;
-       char *moji;
-       XtVaGetValues(w, XmNlabelString, &label, NULL);
-       moji = (char *) _XmStringUngenerate(label, NULL, XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
-       if(strncmp(moji, "*", 1) == 0) {
-               hls_flag = False;
-       }
-       else {
-               hls_val = atoi(moji);
-               hls_flag = True;
-       }
-       XmStringFree(label);
-       XtFree(moji);
-       create_xlfd();
-       XtVaSetValues(scrolllist, XmNitems, xlf, XmNitemCount, xlf_count, NULL);
-}
-
-static void
-button_set1()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (sty_flag == True) {
-        key.style.name = sty_val;
-        mask |= FAL_FONT_MASK_STYLE_NAME;
-    }
-    if (wls_flag == True) {
-        key.size.w = wls_val;
-        mask |= FAL_FONT_MASK_SIZE_W;
-    }
-    if (hls_flag == True) {
-        key.size.h = hls_val;
-        mask |= FAL_FONT_MASK_SIZE_H;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-        for (j=0; j<udc_count; j++)
-           XtSetSensitive(button1[j], False);
-       return;
-    }
-    if(fontlist->num == 0) {
-        for (j=0; j<udc_count; j++)
-           XtSetSensitive(button1[j], False);
-        FalFreeFontList(fontlist);
-        return;
-    }
-    for (j=0; j<udc_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-            if(udc[j] == f->cd_set) {
-               found = True;
-                break;
-            }
-        }
-       if(found == False)
-           XtSetSensitive(button1[j], False);
-       else
-           XtSetSensitive(button1[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-static void
-button_set2()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (udc_flag == True) {
-        key.cd_set = udc_val;
-        mask |= FAL_FONT_MASK_CODE_SET;
-    }
-    if (wls_flag == True) {
-        key.size.w = wls_val;
-        mask |= FAL_FONT_MASK_SIZE_W;
-    }
-    if (hls_flag == True) {
-        key.size.h = hls_val;
-        mask |= FAL_FONT_MASK_SIZE_H;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-        for (j=0; j<sty_count; j++)
-           XtSetSensitive(button2[j], False);
-        return;
-    }
-    if(fontlist->num == 0) {
-        for (j=0; j<sty_count; j++)
-           XtSetSensitive(button2[j], False);
-        FalFreeFontList(fontlist);
-        return;
-    }
-    for (j=0; j<sty_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-           if(strcmp(sty[j], f->style.name) == 0) {
-               found = True;
-               break;
-           }
-        }
-       if(found == False)
-           XtSetSensitive(button2[j], False);
-       else
-           XtSetSensitive(button2[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-static void
-button_set3()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (udc_flag == True) {
-        key.cd_set = udc_val;
-        mask |= FAL_FONT_MASK_CODE_SET;
-    }
-    if (sty_flag == True) {
-        key.style.name = sty_val;
-        mask |= FAL_FONT_MASK_STYLE_NAME;
-    }
-    if (hls_flag == True) {
-        key.size.h = hls_val;
-        mask |= FAL_FONT_MASK_SIZE_H;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-        for (j=0; j<wls_count; j++)
-           XtSetSensitive(button3[j], False);
-        return;
-    }
-    if(fontlist->num == 0) {
-        for (j=0; j<wls_count; j++)
-           XtSetSensitive(button3[j], False);
-        FalFreeFontList(fontlist);
-        return;
-    }
-    for (j=0; j<wls_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-            if(wls[j] == f->size.w) {
-               found = True;
-                break;
-            }
-        }
-       if(found == False)
-           XtSetSensitive(button3[j], False);
-       else
-           XtSetSensitive(button3[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-static void
-button_set4()
-{
-    int                i, j;
-    int mask = FAL_FONT_MASK_DEFINED | FAL_FONT_MASK_UNDEFINED;
-    FalFontData key;
-    FalFontDataList *fontlist;
-    FalFontData *f;
-    Boolean found;
-
-    if (udc_flag == True) {
-        key.cd_set = udc_val;
-        mask |= FAL_FONT_MASK_CODE_SET;
-    }
-    if (sty_flag == True) {
-        key.style.name = sty_val;
-        mask |= FAL_FONT_MASK_STYLE_NAME;
-    }
-    if (wls_flag == True) {
-        key.size.w = wls_val;
-        mask |= FAL_FONT_MASK_SIZE_W;
-    }
-    if (FalGetFontList(&key, mask, &fontlist) == FAL_ERROR) {
-        for (j=0; j<hls_count; j++)
-           XtSetSensitive(button4[j], False);
-        return;
-    }
-    if(fontlist->num == 0) {
-        for (j=0; j<hls_count; j++)
-           XtSetSensitive(button4[j], False);
-        FalFreeFontList(fontlist);
-        return;
-    }
-    for (j=0; j<hls_count; j++) {
-        for (i=0, f=fontlist->list, found=False; i < fontlist->num; i++, f++) {
-            if(hls[j] == f->size.h) {
-                found = True;
-                break;
-            }
-        }
-        if (found == False)
-           XtSetSensitive(button4[j], False);
-       else
-           XtSetSensitive(button4[j], True);
-    }
-    FalFreeFontList(fontlist);
-}
-
-void
-data_sort(data, count)
-int *data;
-int count;
-{
-    int *p1, *p2, tmp, i;
-
-    for (; count; count--) {
-        for (i=1, p1=data, p2=data+1; i < count; i++, p1++, p2++) {
-           if( *p1 > *p2) {
-               tmp = *p2;
-               *p2 = *p1;
-               *p1 = tmp;
-           }
-       }
-    }
-}
-
-
-static void
-font_init()
-{
-       FalFontDataList *fontlist;
-       FalFontData     *f;
-       Boolean         found;
-       int             i, j;
-       char            tmp[16];
-       char            err[128];
-       Widget          button;
-       extern void Error_message();
-
-       xlf_count = udc_count = sty_count = wls_count = hls_count = 0;
-       if (FalGetFontList(NULL, FAL_FONT_MASK_DEFINED |
-                       FAL_FONT_MASK_UNDEFINED, &fontlist) == FAL_ERROR) {
-               strcpy(err, FAL_ERROR_STR);
-               Error_message((Widget)NULL, err);
-               return;
-       }
-       if(fontlist->num == 0) {
-               FalFreeFontList(fontlist);
-               strcpy(err, resource.mn_no_font);
-               Error_message((Widget)NULL, err);
-               return;
-       }
-       udc = (int *)XtMalloc(sizeof(int) * fontlist->num);
-       sty = (char **)XtMalloc(sizeof(char *) * fontlist->num);
-       wls = (int *)XtMalloc(sizeof(int) * fontlist->num);
-       hls = (int *)XtMalloc(sizeof(int) * fontlist->num);
-       for (i=0, f=fontlist->list; i < fontlist->num; i++, f++) {
-           for (j=0,found=False; j<udc_count; j++) {
-               if(udc[j] == f->cd_set) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               udc[udc_count++] = f->cd_set;
-           }
-           for (j=0,found=False; j<sty_count; j++) {
-               if(strcmp(sty[j], f->style.name) == 0) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               sty[sty_count] = XtMalloc(sizeof(char) * (strlen(f->style.name) + 1));
-               strcpy(sty[sty_count++], f->style.name);
-           }
-           if (f->size.w != -1) {
-           for (j=0,found=False; j<wls_count; j++) {
-               if(wls[j] == f->size.w) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               wls[wls_count++] = f->size.w;
-           }
-           }
-           for (j=0,found=False; j<hls_count; j++) {
-               if(hls[j] == f->size.h) {
-                       found=True;
-                       break;
-               }
-           }
-           if (found == False) {
-               hls[hls_count++] = f->size.h;
-           }
-       }
-       FalFreeFontList(fontlist);
-
-       data_sort(udc, udc_count);
-       data_sort(wls, wls_count);
-       data_sort(hls, hls_count);
-
-       button1 = (Widget *) XtMalloc(sizeof(Widget) * udc_count);
-       button2 = (Widget *) XtMalloc(sizeof(Widget) * sty_count);
-       button3 = (Widget *) XtMalloc(sizeof(Widget) * wls_count);
-       button4 = (Widget *) XtMalloc(sizeof(Widget) * hls_count);
-
-       button = XmCreatePushButton(pull1, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)udc_call, NULL);
-       for (i=0; i < udc_count; i++) {
-               if(udc[i] == FAL_FONT_CS0)
-                       sprintf(tmp, CS0);
-               else if(udc[i] == FAL_FONT_CS1)
-                       sprintf(tmp, CS1);
-               else if(udc[i] == FAL_FONT_CS2)
-                       sprintf(tmp, CS2);
-               else if(udc[i] == FAL_FONT_CS3)
-                       sprintf(tmp, CS3);
-               else
-                       sprintf(tmp, "Codeset %x?", udc[i]);
-               button1[i] = XmCreatePushButton(pull1, tmp, NULL, 0);
-               XtManageChild(button1[i]);
-               XtAddCallback(button1[i], XmNactivateCallback,
-                                               (XtCallbackProc)udc_call, NULL);
-       }
-
-       button = XmCreatePushButton(pull2, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)sty_call, NULL);
-       for (i=0; i < sty_count; i++) {
-               button2[i] = XmCreatePushButton(pull2, sty[i], NULL, 0);
-               XtManageChild(button2[i]);
-               XtAddCallback(button2[i], XmNactivateCallback,
-                                               (XtCallbackProc)sty_call, NULL);
-       }
-
-       button = XmCreatePushButton(pull3, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)wls_call, NULL);
-       for (i=0; i < wls_count; i++) {
-               sprintf(tmp, "%d", wls[i]);
-               button3[i] = XmCreatePushButton(pull3, tmp, NULL, 0);
-               XtManageChild(button3[i]);
-               XtAddCallback(button3[i], XmNactivateCallback,
-                                               (XtCallbackProc)wls_call, NULL);
-       }
-
-       button = XmCreatePushButton(pull4, "*", NULL, 0);
-       XtManageChild(button);
-       XtAddCallback(button, XmNactivateCallback,
-                                               (XtCallbackProc)hls_call, NULL);
-       for (i=0; i < hls_count; i++) {
-               sprintf(tmp, "%d", hls[i]);
-               button4[i] = XmCreatePushButton(pull4, tmp, NULL, 0);
-               XtManageChild(button4[i]);
-               XtAddCallback(button4[i], XmNactivateCallback,
-                                               (XtCallbackProc)hls_call, NULL);
-       }
-}
-
-
-static Widget
-CreateSelectXLFD( top )
-Widget top ;
-{
-
-       int             n;
-       Arg             args[16];
-       XmString        xms, xms1 ;
-       Widget          editW ;
-       Widget          frame, row1, label1, row2, cas1, cas2, cas3, cas4;
-       XmString        str;
-       udc_flag = sty_flag = wls_flag = hls_flag = False;
-
-        /*
-       *  create base window
-       */
-        n = 0 ;
-        XtSetArg( args[n], XmNautoUnmanage, False ) ;          n++ ;
-        XtSetArg( args[n], XmNnoResize, True ) ;               n++ ;
-        XtSetArg( args[n], XmNminimizeButtons, True ) ;                n++ ;
-        xms = XmStringCreateLocalized( resource.exec_label ) ;
-        XtSetArg( args[n], XmNokLabelString, xms ) ;           n++ ;
-        xms1 = XmStringCreateLocalized( resource.quit_label) ;
-        XtSetArg( args[n], XmNhelpLabelString, xms1 ) ;                n++ ;
-        XtSetArg( args[n], XmNtitle, resource.l_open_title ) ; n++ ;
-        editW = XmCreateTemplateDialog( top, "open_dialog", args, n );
-
-       XmStringFree( xms ) ;
-       XmStringFree( xms1 ) ;
-
-       n = 0;
-       pull1 = XmCreatePulldownMenu(toplevel, "pull", args, n);
-       pull2 = XmCreatePulldownMenu(toplevel, "pull", args, n);
-       pull3 = XmCreatePulldownMenu(toplevel, "pull", args, n);
-       pull4 = XmCreatePulldownMenu(toplevel, "pull", args, n);
-
-       n = 0 ;
-       xlfdWform  = XmCreateRowColumn( editW, "BaseForm", args, n );
-       XtManageChild( xlfdWform );
-
-       n = 0;
-       frame = XmCreateFrame( xlfdWform, "frame", args, n);
-       XtManageChild( frame );
-
-       n = 0 ;
-       row1  = XmCreateRowColumn( frame, "row", args, n );
-       XtManageChild( row1 );
-
-       n = 0;
-       str = XmStringCreateLocalized(resource.l_selectitem) ;
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       label1 = XmCreateLabel( row1, "SelectItems", args, n);
-       XtManageChild( label1 );
-       XmStringFree(str);
-
-       n = 0 ;
-       row2  = XmCreateRowColumn( row1, "row", args, n );
-       XtManageChild( row2 );
-
-       n = 0 ;
-       str = XmStringCreateLocalized(resource.l_codeset) ;
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull1);  n++;
-       cas1  = XmCreateOptionMenu( row2, "CodeSet", args, n );
-       XtManageChild( cas1 );
-       XtAddCallback(XmOptionButtonGadget(cas1), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set1, NULL);
-       XmStringFree(str);
-       n = 0 ;
-       str = XmStringCreateLocalized(resource.l_style) ;
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull2);  n++;
-       cas2  = XmCreateOptionMenu( row2, "Style", args, n );
-       XtAddCallback(XmOptionButtonGadget(cas2), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set2, NULL);
-       XtManageChild( cas2 );
-       XmStringFree(str);
-
-       n = 0 ;
-       str = XmStringCreateLocalized(resource.l_width) ;
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull3);  n++;
-       cas3  = XmCreateOptionMenu( row2, "Width", args, n );
-       XtManageChild( cas3 );
-       XtAddCallback(XmOptionButtonGadget(cas3), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set3, NULL);
-       XmStringFree(str);
-
-       n = 0 ;
-       str = XmStringCreateLocalized(resource.l_height) ;
-       XtSetArg(args[n], XmNlabelString, str);  n++;
-       XtSetArg(args[n], XmNsubMenuId, pull4);  n++;
-       cas4  = XmCreateOptionMenu( row2, "Height", args, n );
-       XtManageChild( cas4 );
-       XtAddCallback(XmOptionButtonGadget(cas4), XmNcascadingCallback,
-                                       (XtCallbackProc)button_set4, NULL);
-       XmStringFree(str);
-
-       font_init();
-       create_xlfd();
-
-       n = 0;
-        XtSetArg(args[n], XmNvisibleItemCount, 10) ;   n++ ;
-        XtSetArg(args[n], XmNlistSizePolicy, XmCONSTANT) ;     n++ ;
-        XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmSTATIC) ;       n++ ;
-        XtSetArg(args[n], XmNselectionPolicy, XmSINGLE_SELECT) ;       n++ ;
-        XtSetArg(args[n], XmNitems, xlf) ;     n++ ;
-        XtSetArg(args[n], XmNitemCount, xlf_count) ;   n++ ;
-       scrolllist = XmCreateScrolledList(xlfdWform, "scrolllist", args, n);
-       XtManageChild(scrolllist);
-
-        /*  
-        * Error_Messege
-        */
-
-        XtAddCallback(editW, XmNokCallback, (XtCallbackProc)OpenWindowCB, NULL);
-        XtAddCallback(editW, XmNokCallback, (XtCallbackProc)ReadCB, NULL);
-        XtAddCallback(editW, XmNhelpCallback,
-                                       (XtCallbackProc)OpenCancelCB, NULL);
-
-       return( editW ) ;
-}
-
diff --git a/cde/programs/dtudcfonted/selectxlfd.h b/cde/programs/dtudcfonted/selectxlfd.h
deleted file mode 100644 (file)
index a77ab3b..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* selectxlfd.h 1.1 - Fujitsu source for CDEnext    96/01/06 16:57:23      */
-/* $XConsortium: selectxlfd.h /main/3 1996/04/08 16:02:27 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-
-#define BUTTONITEMS     4
-#define PUSHBUTTONS     2
-#define COPYLABELS     2
-
-#define CX             12
-#define CY             -4
-
-#define XLFD_COLUMNS   38
-#define KEY_COLUMNS    15
-
-#define PIXELSIZE      7
-
-/*
- *     put data from resource database
- */
-typedef struct _Rsrc {
-       char    * xlfd_label ;      
-       char    * copy_xlfd_label ;      
-       char    * code_label ;      
-       char    * style_label ;      
-       char    * size_label ;       
-       char    * exec_label ;     
-       char    * quit_label ;     
-       char    * ok_label ;       
-       char    * cancel_label ;   
-       char    * copy_orgin ;      
-       char    * copy_target ;      
-       char    * copy_label ;   
-       char    * overlay_label ;   
-} Rsrc ;
-/***************< end of selectxlfd.h >***************/
diff --git a/cde/programs/dtudcfonted/ufont.c b/cde/programs/dtudcfonted/ufont.c
deleted file mode 100644 (file)
index 38b0b50..0000000
+++ /dev/null
@@ -1,2635 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* ufont.c 1.45 - Fujitsu source for CDEnext    96/12/03 18:34:11      */
-/* $XConsortium: ufont.c /main/14 1996/12/17 19:30:16 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-
-#define substance_source
-
-#include <stdio.h>
-#include <math.h>
-
-#include <X11/Intrinsic.h>
-
-#include "xoakufont.h"
-#include "util.h"
-
-#ifndef NO_MESSAGE_CAT
-#ifdef __ultrix
-#define _CLIENT_CAT_NAME "dtudcfonted.cat"
-#else  /* __ultrix */
-#define _CLIENT_CAT_NAME "dtudcfonted"
-#endif /* __ultrix */
-#ifdef _NO_PROTO
-extern char *_DtGetMessage();
-#else  /* _NO_PROTO */
-extern char *_DtGetMessage(
-                        char *filename,
-                        int set,
-                        int n,
-                        char *s );
-#endif /* _NO_PROTO */
-#define GETMESSAGE(set, number, string) GetMessage(set, number, string)
-static char *
-GetMessage(set, number, string)
-int set, number;
-char *string;
-{
-    char *tmp, *ret;
-    tmp = _DtGetMessage(_CLIENT_CAT_NAME, set, number, string);
-    ret = malloc(strlen(tmp) + 1);
-    strcpy(ret, tmp);
-    return (ret);
-} 
-#else /* NO_MESSAGE_CAT */
-#define GETMESSAGE(set, number, string)\
-    string
-#endif /* NO_MESSAGE_CAT */
-
-/****************************************************************
- *    Widgets                                                  *
- ***************************************************************/
-/* Widget      toplevel; */
-static Widget  dnPopW;
-Widget wgeScro, editPopW;
-
-static int     select_x, select_y, select_w, select_h;
-static int     r1_x, r1_y, r2_x, r2_y, cut_w, cut_h;
-
-extern Widget          xlfdDialog, cpyDialog  ;
-
-extern FalFontID font_id;
-
-Pixmap          arrow_pix=0;
-
-/*
- * 
- */
-static XtAppContext app; /* application context */
-static int edpane_size=0;
-void CB_set_wait_msg();
-void set_wait_msg();
-
-static void OtherFontSelect();
-void drawDelCode();
-void drawDelPtn();
-static void xeg_init();
-
-
-static void dstrypaneEditPtn();
-void chgEdCode();
-void chgEdList();
-static void chgEdPtn();
-static void DrawRectEdPn();
-static void DrawBorderEdPn();
-static void DrawPointEdPn();
-static void DrawDpPn();
-static void DrawPointDpPn();
-static void musPoint();
-static void musLine();
-static void musCircle();
-static void musRect();
-static void musRegionProc();
-static void musPasteProc();
-static void rubLine();
-static void rubBand();
-static void rubCircle();
-static void resetEditMode();
-static void copyPatterns();
-extern String MngCodeTfValue();
-extern String CpySrcCodeTfValue();
-extern String CpyDestCodeTfValue();
-char   *get_cmd_path() ;
-extern  FalFontData     fullFontData;
-extern  FalFontData     copyFontData;
-
-extern void PopupSelectXLFD();
-extern void UpdateMessage();
-extern void DispMngErrorMessage();
-extern void DispCpyErrorMessage();
-static int setRealDelArea();
-
-/****************************************************************
- * parameters                                                  *
- ***************************************************************/
-static Arg     arg[30];
-static int     n;
-
-Resource resource;
-
-/****************************************************************
- * callback routines                                           *
- ***************************************************************/
-
-static void CancelCB();
-
-static void
-ExitCB()
-{
-    exit(0);
-}
-
-int
-efctPtnNum()
-{
-    int no;
-    int sq;
-    int cnt;
-
-    for ( cnt = 0, sq = edlist.sqstart; 
-            sq < (edlist.sqstart + edlist.nptn); sq++) {
-       no = ptnSqToNo(sq);
-       if (( no >= 0) && (codeCheck( noToCode( no)) == 0))
-           cnt++;
-    }
-    return( cnt);
-}
-
-void
-Error_message(widget, message)
-Widget widget;
-char *message;
-{
-    static NoticeButton is_lock[] = {
-    NBTNARGS( ExitCB, NULL, 'E', True, False ),
-    NBTNARGS( CancelCB, NULL, 'C', True, True )
-    };
-    static NButton LockBTN = NBUTTONS( is_lock );
-
-    SetItemLabel(&LockBTN, 0, resource.l_exit);
-    SetItemLabel(&LockBTN, 1, resource.l_cancel);
-    PopupNotice( (widget), message,
-               D_ERROR,
-               &LockBTN,
-               True,
-               resource.l_question_title);
-}
-
-void
-Error_message2(widget, message)
-Widget widget;
-char *message;
-{
-    static NoticeButton is_lock[] = {
-    NBTNARGS( CancelCB, NULL, 'C', True, True )
-    };
-    static NButton LockBTN = NBUTTONS( is_lock );
-
-    if (widget == NULL)
-       widget = toplevel;
-
-    SetItemLabel(&LockBTN, 0, resource.l_ok);
-    PopupNotice( (widget), message,
-               D_ERROR,
-               &LockBTN,
-               True,
-               resource.l_question_title);
-}
-
-/*
- * contents : read a character pattern from SNF file 
- */
-/*ARGSUSED*/
-static void
-CBmOblB_edit( widget, clientData, callData )
-Widget         widget;
-caddr_t                clientData;
-caddr_t                callData;
-{
-    int                ptn_n;
-    int                ptn_w;
-    int                ptn_h;
-    int                code;
-    int                i;
-    int                ret;
-    char       err[128];
-    extern int begin_code;
-
-    extern int ptnGetInfo();
-    extern void PopupEditPtn();
-
-    /* open font file and get informations of character to be edited  */
-
-    ret = readSNF( &(edg.fdata), &(edg.width), &(edg.height), err);
-
-    if( ret == -1 ) {
-       Error_message(widget, err);
-       return;
-    }
-    dn.ptn_w = (Dimension) edg.width;
-    dn.ptn_h = (Dimension) edg.height;
-
-
-    if( xlfdDialog != NULL )
-       PopdownDialog(xlfdDialog);
-
-    /* */
-    ptnGetInfo( &ptn_n, &ptn_w, &ptn_h );
-    for( i=0 ; i<ptn_n ; i++ ) {
-       code = noToCode( ptnSqToNo(i) );
-       if( begin_code > code){
-           edlist.sqstart = i+1;
-       } else {
-           edlist.nptn++;      
-       }
-    } 
-    if( efctPtnNum() > 0) {
-       for ( i=edlist.sqstart; i<(edlist.sqstart+edlist.nptn); i++){
-           if ( codeCheck( noToCode( ptnSqToNo(i))) == 0)
-               break;
-       }
-       edg.ncode = ptnSqToNo( i );
-       edg.code = noToCode( edg.ncode );
-       ptnGet( edg.code, edg.ptn );
-    }
-    PopupEditPtn(toplevel);
-}
-
-
-
-void CBeOblB_aAdd();
-
-static Boolean do_read = False;
-static Boolean do_end = False;
-
-static void CancelCB() { }
-
-static void ContReadCB(w)
-Widget w;
-{
-    FalCloseFont(font_id);
-    editPtnW = NULL;
-    OtherFontSelect();
-    PopupSelectXLFD(toplevel);
-}
-
-static void SaveReadCB()
-{
-    CBeOblB_aAdd();
-    do_read = True;
-    PopupSelectXLFD(toplevel);
-}
-
-
-static void ContEndCB()
-{
-    FalCloseFont(font_id);
-    exit(0);
-}
-
-static void SaveEndCB()
-{
-    CBeOblB_aAdd();
-    do_end = True;
-}
-
-
-/*
- * contents : quit editting 
- */
-
-
-/*ARGSUSED*/
-static int
-QuitEditPtn( widget, clientData, callData )
-Widget         widget; 
-caddr_t                clientData;
-caddr_t                callData;
-{
-    resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-
-    if( edg.code != 0 ){
-       ptnAdd( edg.code, edg.ptn );
-    }
-    if( edg.flag == ON ){
-       return(0);
-    }
-    return(1);
-}
-
-
-
-void
-OpenCB(w, client_data, call_data)
-Widget w;
-XtPointer client_data;
-XtPointer call_data;
-{
-    static NoticeButton is_save_read_btn1[] = {
-    NBTNARGS( SaveReadCB, NULL, 'S', True, False ),
-    NBTNARGS( ContReadCB, NULL, 'O', True, False ),
-    NBTNARGS( CancelCB, NULL, 'C', True, True ),
-    };
-    static NoticeButton is_save_read_btn2[] = {
-    NBTNARGS( ContReadCB, NULL, 'O', True, False ),
-    NBTNARGS( CancelCB, NULL, 'C', True, True ),
-    };
-    static NButton SaveReadBTN1 = NBUTTONS( is_save_read_btn1 );
-    static NButton SaveReadBTN2 = NBUTTONS( is_save_read_btn2 );
-
-       if (QuitEditPtn((Widget)NULL, (caddr_t)NULL, (caddr_t)NULL)){
-           FalCloseFont(font_id);
-           editPtnW = NULL;
-           OtherFontSelect();
-           PopupSelectXLFD(toplevel);
-       }
-       else{
-           if (! fullFontData.prm) {
-               SetItemLabel(&SaveReadBTN1, 0, resource.l_do_save_exit);
-               SetItemLabel(&SaveReadBTN1, 1, resource.l_dont_save_exit);
-               SetItemLabel(&SaveReadBTN1, 2, resource.l_cancel);
-               PopupNotice( (w), resource.mn_saved_open ,
-                   D_QUESTION,
-                   &SaveReadBTN1,
-                   True,
-                   resource.l_question_title);
-           } else {
-               SetItemLabel(&SaveReadBTN2, 0, resource.l_dont_save_exit);
-               SetItemLabel(&SaveReadBTN2, 1, resource.l_cancel);
-               PopupNotice( (w), resource.mn_saved_open ,
-                   D_QUESTION,
-                   &SaveReadBTN2,
-                   True,
-                   resource.l_question_title);
-           }
-       }
-}
-
-
-void
-ReadCB(w, client_data, call_data)
-Widget w;
-XtPointer client_data;
-XtPointer call_data;
-{
-    if (fullFontData.xlfdname == NULL) {
-       return;
-    }
-    if (fullFontData.xlfdname == (char *) -1) {
-       Error_message(w, resource.mn_prop_font);
-       return;
-    }
-    CBmOblB_edit( w, client_data, call_data );
-}
-
-/****************************************************************
- * callback routines and event handler                                 *
- ***************************************************************/
-
-/*
- * contents : write character patterns to SNF file     
-*/
-
-static Boolean
-WPwriteSNF( restart )
-int    restart;
-{
-    int                rc, err;
-    char       str[MG_MAXSIZE];
-
-    switch( rc = writeSNF( restart, &err ) ) {
-    case -1:
-       if (dnPopW)
-           XtSetSensitive( dnPopW,  TRUE );
-       switch( err ) {
-       case 001:
-           sprintf(str, "%s(permission denied)", resource.me_write_snf);
-           break;
-        case 002:
-            sprintf(str, "%s(disk full)", resource.me_write_snf);
-            break;
-       case 101:
-           sprintf(str, "%s(pipe error)", resource.me_write_snf);
-           break;
-       case 102:
-           sprintf(str, "%s(fork error)", resource.me_write_snf);
-           break;
-       case 103:
-           sprintf(str, "%s(execv error)", resource.me_write_snf);
-           break;
-       case 104:
-           sprintf(str, "%s(data error)", resource.me_write_snf);
-           break;
-       default:
-           sprintf(str, "%s", resource.me_write_snf);
-       }
-       SetString( wgeStaT, str );
-       return( TRUE );
-    case 0:
-       edg.flag = 0;
-       UpdateMessage( resource.mg_register );
-       sleep(1);
-       UpdateMessage("");
-
-       if (do_read){
-           do_read = False;
-           ContReadCB((Widget)NULL);
-       }
-       if (do_end){
-           do_read = False;
-           ContEndCB();
-       }
-       return(TRUE);
-    default:
-       if( rc == 1101 )
-           sprintf( str, "%s", resource.me_wait );
-       else 
-           sprintf( str, "%s(%3d%%)", resource.mg_write_snf , rc-1000 );
-
-       SetString( wgeStaT, str );
-       XtAppAddWorkProc( app, (XtWorkProc)WPwriteSNF, (XtPointer)ON );
-       if( rc == 1101 ){
-           XSync( xl.display,0 );
-       }
-       return( TRUE );
-    }
-}
-
-
-
-/*
- * contents : write character patterns to SNF file
- */
-
-void
-CBeOblB_aAdd()
-{
-    char       str[MG_MAXSIZE];
-
-    resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-    SetString( wgeStaT, resource.mg_write_snf );
-
-    if( edg.code != 0 )
-       ptnAdd( edg.code, edg.ptn );
-
-    if( edg.flag == ON ) {
-       sprintf( str, "%s", resource.mg_write_snf );
-       if (dnPopW)
-           XtSetSensitive( dnPopW,  FALSE );
-
-       XtAppAddWorkProc( app, (XtWorkProc)WPwriteSNF, (XtPointer)OFF );
-       return;
-    } 
-    else{
-       SetString( wgeStaT, "" );
-    }
-}
-
-
-
-/* 
- * contents : destroy the editor window
- */
-
-static void
-OtherFontSelect()
-{
-    dstrypaneEditPtn();
-    xeg_init();
-}
-
-
-
-/*
- * contents : close dtudcfonted
- */
-
-/*ARGSUSED*/
-void
-CBeOblB_aEnd( widget, clientData, callData )
-Widget         widget; 
-caddr_t                clientData;
-caddr_t                callData;
-{
-    static NoticeButton is_save_exit_btn[] = {
-    NBTNARGS( SaveEndCB, NULL, 'S', True, False ),
-    NBTNARGS( ContEndCB, NULL, 'E', True, False ),
-    NBTNARGS( CancelCB,  NULL, 'C', True, True ),
-    };
-    static NButton SaveEndBTN = NBUTTONS( is_save_exit_btn );
-
-    resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-
-    if( edg.code != 0 )
-       ptnAdd( edg.code, edg.ptn );
-    if( edg.flag == ON ) {
-
-       SetItemLabel(&SaveEndBTN, 0, resource.l_do_save);
-       SetItemLabel(&SaveEndBTN, 1, resource.l_dont_save);
-       SetItemLabel(&SaveEndBTN, 2, resource.l_cancel);
-       PopupNotice( widget, resource.mn_saved_exit, D_QUESTION,
-                           &SaveEndBTN, True, resource.l_question_title);
-       return;
-    } else {
-        FalCloseFont(font_id);
-    }
-
-    exit(0);
-}
-
-
-
-/*ARGSUSED*/
-void
-CBeOblB_rCmd( widget, proc, callData )
-Widget         widget; 
-int            proc;   
-caddr_t                callData;
-{
-    extern void SelectUnset();
-    extern void UndoSet();
-    if (!select_x && !select_y && !select_w && !select_h)
-       return;
-    em.rsv_f = ON;
-    bitPtnCopy( em.rsv_ptn,  edg.ptn );
-    rubBand( r1_x,  r1_y,  r2_x,  r2_y );
-    switch( proc ) {
-    case PROC_CLS:
-       bitDrawCls (edg.ptn, select_x, select_y, select_w, select_h );
-       break;
-    case PROC_SET:
-       bitDrawSet (edg.ptn, select_x, select_y, select_w, select_h );
-       break;
-    case PROC_REV:
-       bitDrawRev (edg.ptn, select_x, select_y, select_w, select_h );
-       break;
-    case PROC_ROLL:
-       bitDrawRoll(edg.ptn, select_x, select_y, select_w, select_h);
-       break;
-    case PROC_SYMV:
-       bitDrawSymV(edg.ptn, select_x, select_y, select_w, select_h );
-       break;
-    case PROC_SYMH:
-       bitDrawSymH(edg.ptn, select_x, select_y, select_w, select_h );
-       break;
-    }
-    edg.flag = ON;
-    DrawRectEdPn( 0, 0,  edg.width - 1,  edg.height - 1 );
-    DrawDpPn();
-    select_x = select_y = select_w = select_h = 0;
-    SelectUnset();
-    UndoSet();
-}
-
-/*ARGSUSED*/
-void
-CBeOblB_rCmdp( widget, proc, callData )
-Widget         widget; 
-int            proc;   
-caddr_t                callData;
-{
-    extern Widget wgeBulB_edit;
-    extern void CopySet();
-    extern void UndoSet();
-    extern void SelectUnset();
-
-    switch( proc ) {
-    case PROC_CPY:
-       if (!select_x && !select_y && !select_w && !select_h)
-           return;
-       rubBand( r1_x,  r1_y,  r2_x,  r2_y );
-       bitDrawCpy(edg.ptn, select_x, select_y, select_w, select_h, False);
-       cut_w = select_w;
-       cut_h = select_h;
-       select_x = select_y = select_w = select_h = 0;
-       CopySet();
-       SelectUnset();
-       break;
-    case PROC_CUT:
-       if (!select_x && !select_y && !select_w && !select_h)
-           return;
-       em.rsv_f = ON;
-       rubBand( r1_x,  r1_y,  r2_x,  r2_y );
-       bitPtnCopy( em.rsv_ptn,  edg.ptn );
-       bitDrawCpy(edg.ptn, select_x, select_y, select_w, select_h, True);
-       cut_w = select_w;
-       cut_h = select_h;
-       edg.flag = ON;
-       DrawRectEdPn( 0, 0,  edg.width - 1,  edg.height - 1 );
-       DrawDpPn();
-       select_x = select_y = select_w = select_h = 0;
-       CopySet();
-       UndoSet();
-       SelectUnset();
-       break;
-    case PROC_PASTE:
-       XtAddEventHandler(wgeBulB_edit,
-                           ButtonReleaseMask|PointerMotionMask,
-                                   False, musPasteProc, NULL );
-    }
-}
-
-
-
-
-/*
- * contents : cancel all editting 
- */
-
-/*ARGSUSED*/
-void
-CBeOblB_rCan( widget, clientData, callData )
-Widget         widget;
-caddr_t                clientData;
-caddr_t                callData;
-{
-    extern void UndoUnset();
-    
-    resetEditMode( RES_MSG | RES_PROC | RES_SLCT );
-
-    if( em.rsv_f == ON ) {
-       bitPtnCopy( edg.ptn, em.rsv_ptn );
-       em.rsv_f = OFF;
-
-       DrawRectEdPn( 0, 0, edg.width - 1, edg.height - 1 );
-       DrawDpPn();
-        UndoUnset();
-    }
-}
-
-
-
-
-/*
- *
- *   contents : get a sequential number of the editor 
- */
-int
-RelToAbsSq( from, cnt)
-int from;
-int cnt;
-{
-    int i;
-    int no;
-
-    if ( cnt >= 0) {
-        for ( i = -1; from < (edlist.sqstart + edlist.nptn) ; from++) {
-            no = ptnSqToNo(from);
-            if (( no >= 0) && ( noToCode( no) >= 0) ) {
-                i++;
-                if ( i >= cnt)
-                    return( from);
-            }
-        }
-    } else {
-        cnt *= -1;
-        for ( i = -1; from >= edlist.sqstart; from--) {
-            no = ptnSqToNo(from);
-            if (( no >= 0) && ( noToCode( no) >= 0) ) {
-                i++;
-                if ( i >= cnt)
-                    return(from);
-            }
-        }
-    }
-    return( -1);
-}
-
-/*
- *   contents : get a relative number of the system area 
- */
-int
-AbsSqToRel( from, to)
-int from;
-int to;
-{
-    int sq;
-    int cnt;
-    int sign = 1;
-    int no;
-
-    if ( from > to) {
-       sq = from;
-       from = to;
-       to = sq;
-       sign = -1;
-    }
-
-    for ( cnt = -1, sq = from; sq <= to; sq++) {
-       no = ptnSqToNo(sq);
-       if (( no >= 0) && (codeCheck( noToCode( no)) == 0))
-           cnt++;
-    }
-
-    if ( cnt < 0)
-       cnt = 0;
-
-    cnt *= sign;
-    return( cnt);
-}
-    
-
-
-
-/*
- * contents : be the character list selected 
- */
-
-/*ARGSUSED*/
-void
-EHeStaT_list( widget, select, e )
-Widget         widget;
-int            select;
-XEvent         *e;                     /*    X Event   */
-{
-    int                sq, no;
-    int                code;
-
-    resetEditMode( RES_MSG|RES_PROC|RES_SLCT|RES_RSV );
-
-    if( (e->xbutton.button != 1) || (e->type != ButtonRelease) ||
-       (e->xbutton.x < 0) || ((int)edlist.elem_w < e->xbutton.x) ||
-       (e->xbutton.y < 0) || ((int)edlist.elem_h < e->xbutton.y)
-       )
-       return;
-
-    if( edlist.slctloc == select )
-       return;
-
-    /* */
-    sq = RelToAbsSq( edlist.sqstart + edlist.statloc, select);
-
-    if( (no = ptnSqToNo(sq)) == -1 )
-       return;
-
-    code = noToCode( no );
-    if( codeCheck( code ) == -1 )
-       return;
-
-    if( ptnSense( code) == 0 )
-       return ;
-
-    chgEdList( edlist.statloc, select, OFF );
-    if( ptnSense(edg.code) == 1 )
-       ptnAdd(edg.code, edg.ptn );
-    chgEdPtn( code );
-}
-
-
-
-
-/*
- * contents : update the character list 
- */
-
-/*ARGSUSED*/
-void
-CBeScro( widget, clientData, callData )
-Widget                 widget;
-caddr_t                        clientData;
-caddr_t                        callData;
-{
-    int                newl;
-    int         new_statloc;
-    int         new_slct;
-
-    n = 0;
-    XtSetArg( arg[n], XmNvalue,   (XtArgVal)&newl );   n++;
-    XtGetValues( wgeScro , arg, n );
-
-    if (( new_statloc = RelToAbsSq( edlist.sqstart, newl)) < 0) {
-        new_statloc = 0;
-    } else {
-        new_statloc -= edlist.sqstart;
-    }
-    /*
-     */
-    new_slct = edlist.slctloc 
-       - AbsSqToRel( edlist.sqstart + edlist.statloc, 
-                     edlist.sqstart + new_statloc);
-    chgEdList( new_statloc, new_slct, OFF);
-}
-
-
-
-
-/*
- * contents : select the edit items by mouse 
- */
-
-/*ARGSUSED*/
-void
-EHeBulB_eMEv( widget, clientData, e )
-Widget         widget;
-caddr_t                clientData;
-XEvent         *e;             /*    X Event                   */
-{
-    int                px, py;
-    int         downbutton;
-
-    if (edpane.pix_w * edpane.pix_h == 0 ) {
-       return;
-    }
-
-    if( e->type == ButtonPress ){
-       em.drag_f = ON;
-    }
-    if( (edg.code == 0) || (em.drag_f == OFF) )
-       return;
-    if( e->type == ButtonRelease ){
-       em.drag_f = OFF;
-    }
-    
-    px = e->xbutton.x / edpane.pix_w;
-    py = e->xbutton.y / edpane.pix_h;
-
-    if (( e->type == ButtonPress) || (e->type == ButtonRelease)){
-       downbutton = e->xbutton.button;
-    }else if ( e->type == MotionNotify ){
-       if ( e->xmotion.state & Button1Mask ){
-           downbutton = 1; /* select button */
-       }else if ( e->xmotion.state & Button2Mask ){
-           downbutton = 2; /* adjust button */
-       } else {
-           downbutton = 0;
-       }       
-    }
-    
-    switch( downbutton ) {
-    case 1: 
-       switch( em.proc ) {
-       case PROC_POINT:
-           resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-           musPoint( e->type, px, py );
-           break;
-       case PROC_LINE:
-           resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-           musLine( e->type, px, py );
-           break;
-       case PROC_CIRCLE:
-           resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-           musCircle( e->type, px, py );
-           break;
-       case PROC_RECT:
-           resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-           musRect( em.proc, e->type, px, py );
-           break;
-       case PROC_ERASE:
-           resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-           musPoint( e->type, px, py );
-           break;
-       case PROC_SELECT:
-           musRegionProc( em.proc, e->type, px, py );
-           break;
-       default:
-           break;
-       }
-       break;
-
-    case 2:
-       if( (0 <= px) && (px < edg.width) && (0 <= py) && (py < edg.height) ) {
-           resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-
-           switch( e->type ) {
-           case MotionNotify:
-               if( (em.adj_px == px) && (em.adj_py == py) )
-                   return;
-               break;
-           case ButtonPress:
-               em.adj_px = px;
-               em.adj_py = py;
-               if( bitRead(edg.ptn, px, py) == 0 ) {
-                   bitSet( edg.ptn, px, py );
-                   DrawPointEdPn( px,py, 1 );
-                   DrawPointDpPn( px,py, 1 );
-               }
-               else {
-                   bitReset( edg.ptn, px, py );
-                   DrawPointEdPn( px,py, 0 );
-                   DrawPointDpPn( px,py, 0 );
-               }
-               edg.flag = ON;
-               break;
-           default:
-               return;
-           }
-       }
-    default:
-       break;
-    }    
-}
-
-
-
-
-/*
- * contents : restore the editting pane 
- */
-
-/*ARGSUSED*/
-void
-EHeBulB_eExp( widget, clientData, e )
-Widget         widget;
-caddr_t                clientData;
-XEvent         *e;                     /*    X Event   */
-{
-    int                x1, y1;
-    int                x2, y2;
-
-    if (edpane.pix_w * edpane.pix_h == 0 ) {
-       return;
-    }
-       
-    x1 = e->xexpose.x / edpane.pix_w;
-    y1 = e->xexpose.y / edpane.pix_h;
-    x2 = (e->xexpose.x + e->xexpose.width - 1) / edpane.pix_w;
-    y2 = (e->xexpose.y + e->xexpose.height - 1) / edpane.pix_h;
-
-    DrawRectEdPn( x1, y1, x2, y2 );
-    DrawBorderEdPn( x1, y1, x2, y2 );
-}
-
-
-
-
-/*
- * contents : specifies the drawing operation (Pont/Line/Rectangle/Circle)
- */
-
-/*ARGSUSED*/
-void
-CBeRecB_obj( widget, obj, call)
-Widget         widget;
-int            obj;
-XmToggleButtonCallbackStruct   *call;
-{
-    extern void SelectUnset();
-
-    if (call->set == False)
-       return;
-
-    resetEditMode( RES_MSG | RES_RSV | RES_SLCT );
-
-    if (obj == PROC_ERASE)
-       edpane.color = OFF;
-    else
-       edpane.color = ON;
-    edpane.obj = obj;
-    em.proc = obj;
-    if (obj != PROC_SELECT) {
-       if (select_x || select_y || select_w || select_h) {
-           rubBand( r1_x,  r1_y,  r2_x,  r2_y );
-           select_x = select_y = select_w = select_h = 0;
-           SelectUnset();
-       }
-    }
-}
-
-
-
-
-/*
- * contents : restore the displaying pane 
- */
-
-/*ARGSUSED*/
-void
-EHeBulB_dExp( widget, clientData )
-Widget         widget; 
-caddr_t                clientData;
-{
-    if (xl.display == NULL ){
-       return;
-    }
-
-    DrawDpPn();
-}
-
-/*
- * contents : set the range to be add or deleted 
- */
-
-static int
-codeAreaSet(s_code,e_code)
-int    *s_code;
-int    *e_code;
-{
-    char       *str;
-    char       delm;
-
-    str = MngCodeTfValue();
-    delm = '\0';
-    *s_code = 0;
-    *e_code = 0;
-    if (!str || !*str){
-       return(-1);
-    }
-    sscanf( str, "%x %c %x", s_code, &delm, e_code );
-    if (str) free( str );
-    switch( delm ) {
-    case '\0':
-       *e_code = *s_code;
-       break;
-    case '-':
-       break;
-    default:
-       return(-1);
-    }
-    if( codeCheck(*s_code) || codeCheck(*e_code) ||
-       (*s_code > *e_code) ) {
-       return(-1);
-    }
-    return(0);
-}
-
-
-/****************************************************************
- * callback routines (character management window)             *
- ***************************************************************/
-
-Boolean
-BeforeMngCheck(s_code, e_code)
-int *s_code;
-int *e_code;
-{
-    if(codeAreaSet(s_code, e_code) == -1) {
-       DispMngErrorMessage( resource.me_illegal_code );
-       return(False);
-    }
-    return(True);
-}
-
-void
-DoAddProc(s_code, e_code)
-int s_code;
-int e_code;
-{
-    int                code;
-
-    int                s_ncode;
-    int                e_ncode;
-    char       ptn[MAXPTNBYTE];
-    char       mode;
-    int                i;
-
-    resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-
-    /* */
-    s_ncode = codeToNo( s_code );
-    e_ncode = codeToNo( e_code );
-    mode = OFF;
-    bitPtnClear( ptn );
-    for( i=s_ncode ; i <= e_ncode ; i++ ) {
-       code = noToCode(i);
-       if ( codeCheck( code)) 
-           continue;
-       if (ptnSense(code) == 0) {
-           if(ptnAdd(code, ptn) != 1) {
-               SetString( wgeStaT, resource.me_non_memory );
-               return;
-           }
-           edg.flag = ON;
-           mode = ON;  
-           edlist.nptn++;
-       }
-    }
-
-    /* */
-    if( ptnSense( edg.code ) == 1 ) {
-       ptnAdd( edg.code, edg.ptn );
-    }
-    /* */
-    if(mode == ON) {
-       chgEdCode( s_code, mode );
-    }
-
-    resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-}
-
-
-
-void PopupDelNotice();
-Widget CreateDelNotice();
-
-
-void
-DoDelProc( s_code, e_code )
-int s_code;
-int e_code;
-{
-    resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-
-    if( ptnSense( edg.code) == 1 )
-       ptnAdd( edg.code, edg.ptn );
-
-    dn.s_ncode = codeToNo( s_code );
-    dn.e_ncode = codeToNo( e_code );
-
-    if (setRealDelArea(&dn.s_ncode, &dn.e_ncode, &dn.sq_start, &dn.sq_end) == -1) {
-       DispMngErrorMessage( resource.me_nodelete_code );
-       return;
-    }
-    dn.sq_top  = dn.sq_start;
-    dn.disp_num = AbsSqToRel( dn.sq_start, dn.sq_end) + 1;
-    dn.disp_num = (dn.disp_num <= D_MAX) ? dn.disp_num : D_MAX;
-
-    PopupDelNotice( mngPtnW );
-
-}
-
-
-
-
-/*
- * contents : get the real range to be add or delete 
- */
-
-
-static int
-setRealDelArea(s_ncode, e_ncode, sq_start, sq_end )
-int    *s_ncode,  *e_ncode;
-int    *sq_start, *sq_end;
-{
-    int                ncode;
-    int                flg;
-    int                sq;
-    int                i;
-
-    /* first code */
-    flg = 0;
-    ncode = *e_ncode;
-    for( i=*s_ncode ; i <= ncode ; i++ ) {
-       if (((sq = ptnNoToSq(i)) != -1) && (codeCheck( noToCode(i)) == 0)) {
-           flg = 1;
-           break;
-       }
-    }
-    if (flg == 1) {
-       *s_ncode = ptnSqToNo( sq );
-       *sq_start = sq;
-    } else {
-       return(-1);
-    }
-
-    /* last code */
-    flg = 0;
-    ncode = *s_ncode;
-    for( i=*e_ncode ; i >= ncode ; i-- ) {
-       if ((( sq = ptnNoToSq(i)) != -1) && (codeCheck( noToCode(i) ) == 0)) {
-           flg = 1;
-           break;
-       }
-    }
-    *e_ncode = ptnSqToNo( sq );
-    *sq_end = sq;
-    return(0);
-}
-
-
-
-
-
-
-/****************************************************************
- * callback routines (Copy)                                    *
- ****************************************************************/
-
-static int
-CpySrcCodeCheck()
-{
-    char       *str;
-    char       delm;
-
-    str = CpySrcCodeTfValue();
-    if (!str)
-       return(-1);
-    if (!*str) {
-       free(str);
-       return(-1);
-    }
-    delm = '\0';
-    cpm.s1_code = 0;
-    cpm.s2_code = 0;
-    sscanf( str, "%x %c %x", &cpm.s1_code,&delm, &cpm.s2_code );
-    free( str );
-    switch( delm ) {
-    case '\0':
-       cpm.s2_code = cpm.s1_code;
-       break;
-    case '-':
-       break;
-    default:
-       return(-1);
-    }
-    if (cpm.s1_code > cpm.s2_code)
-       return(-1);
-    return(0);
-}
-
-static int
-CpyDestCodeCheck()
-{
-    char       *str;
-    
-    str = CpyDestCodeTfValue();
-    if (!str)
-       return(-1);
-    if (!*str){
-       free(str);
-       return(-1);
-    }
-    cpm.d1_code = 0;
-    sscanf( str, "%x", &cpm.d1_code );
-    free( str );
-
-    if( codeCheck(cpm.d1_code)  ) {
-       return(-1);
-    }
-    return(0);
-}
-
-Boolean
-BeforeCpyCheck( proc )
-int proc;
-{
-    int                s_ncode, e_ncode;
-    int                r1_code, r2_code;
-    int                no;
-    int                i;
-    char       rstr[30];
-    extern void PopupCpyNotice();
-
-    if (copyFontData.xlfdname == NULL) {
-       DispCpyErrorMessage(resource.me_non_srcfile);
-        return(False);
-    }
-
-    if (CpySrcCodeCheck() == -1){
-       DispCpyErrorMessage( resource.me_illegal_srccode );
-       return(False);
-    }
-
-    if (CpyDestCodeCheck() == -1){
-       DispCpyErrorMessage( resource.me_illegal_destcode );
-       return(False);
-    }
-
-    s_ncode = codeToNo( cpm.d1_code );
-    e_ncode = codeToNo( cpm.d1_code + cpm.s2_code - cpm.s1_code);
-    r1_code = r2_code = 0;
-    for( i=s_ncode ; i <= e_ncode ; i++ ) {
-        no = ptnSqToNo(i);
-        if (( no >= 0) && (codeCheck( noToCode( no)) == 0)) {
-           if(r1_code == 0)
-               r1_code = noToCode(i);
-           r2_code = noToCode(i);
-       }
-    }
-
-    cpm.proc = proc;
-
-    if( r1_code != 0 ) {
-       if( r1_code == r2_code ) {
-           sprintf( rstr, "%s %x¡¡", resource.l_code, r1_code );
-       } else if ( codeCheck(r1_code) && codeCheck(r2_code)){
-           sprintf( rstr, "        %x - %x", r1_code, r2_code );
-       } else {
-           sprintf( rstr, "%s %x - %x ", resource.l_code_range, r1_code, r2_code );
-       }
-       PopupCpyNotice(rstr);
-       
-       return(False);
-    }
-    return(True);
-}
-
-void
-DoCpyProc()
-{
-    extern void PopdownCpyPtn();
-
-    PopdownCpyPtn();
-
-    resetEditMode( RES_MSG | RES_PROC | RES_SLCT | RES_RSV );
-
-    copyPatterns( cpm.fdata, cpm.s1_code, cpm.s2_code, cpm.d1_code, cpm.proc );
-}
-
-/****************************************************************
- * main routine                                                        *
- ****************************************************************/
-#define R(name, class, member,def)      { \
-       name, \
-       class, \
-       XtRString, \
-       sizeof(char *), \
-       XtOffsetOf(Resource, member), \
-       XtRString, \
-       (XtPointer)def }
-
-#define RBoolean(name, class, member,def) \
-       { name, class, XtRBoolean, sizeof(XtRBoolean), \
-       XtOffsetOf(Resource, member), XtRString, (XtPointer)def }
-
-#define RDimension(name, class, member,def) \
-       { name, class, XtRDimension, sizeof(XtRDimension), \
-       XtOffsetOf(Resource, member), XtRString, (XtPointer)def }
-
-#define Rint(name, class, member,def) \
-       { name, class, XtRInt, sizeof(XtRInt), \
-       XtOffsetOf(Resource, member), XtRString, (XtPointer)def }
-
-#define RPixel(name, class, member,def) \
-       { name, class, XtRPixel, sizeof(XtRPixel), \
-       XtOffsetOf(Resource, member), XtRString, (XtPointer)def }
-
-static XtResource app_resources[] = {
-RBoolean("Codepoint", "codepoint", codepoint, "False"),
-
-R( "lptog", "Lptog", l_ptog, DFLTPATH ),
-R( "lptogCmd", "LptogCmd", l_ptog_cmd, DFLTCMD ),
-
-/* CreateCaptionFrame() */
-RBoolean( "captResize",  "CaptResize",  capt_resize,  "True"  ) ,
-Rint( "captLftoff",  "CaptLftoff",  capt_lftoff,  "2"  ) ,
-Rint( "captTopoff",  "CaptTopoff",  capt_topoff,  "2"  ) ,
-Rint( "captRghoff", "CaptRghoff", capt_rghoff, "2" ) ,
-
-RPixel( "paneBackground", "paneBackground", pane_background, "white" ),
-RPixel( "paneForeground", "PaneForeground", pane_foreground, "black" ),
-RPixel( "background", "Background", background, "white" ),
-RPixel( "foreground", "Foreground", foreground, "black" ),
-
-/* CreateMenuButtons() */
-RDimension( "menuMargin", "MenuMargin", menu_margin, "0" ) ,
-
-/* CreateDialogAndButtons() */
-RBoolean( "diaTmAutomng",  "DiaTmAutomng",  dia_tm_automng,  "False" ) ,
-RDimension( "diaTmWidth",  "DiaTmWidth",  dia_tm_width,  "4" ) ,
-RDimension( "diaTmHeight", "DiaTmHeight", dia_tm_height, "4" ) ,
-RBoolean( "diaTmResize",   "DiaTmResize",   dia_tm_resize,   "True" ) ,
-RBoolean( "diaTmMinimize", "DiaTmMinimize", dia_tm_minimize, "True" ) ,
-
-RDimension( "diaRwWidth",   "DiaRwWidth",   dia_rw_width,   "6" ) ,
-RDimension( "diaRwHeight",  "DiaRwHeight",  dia_rw_height,  "6" ) ,
-RDimension( "diaRwSpacing", "DiaRwSpacing", dia_rw_spacing, "4" ) ,
-
-/* CreateDrawingArea() */
-RDimension( "drawBorder", "DrawBorder", draw_border, "1" ) ,
-Rint( "drawTopoff", "DrawTopoff", draw_topoff, "2" ) ,
-Rint( "drawLftoff", "DrawLftoff", draw_lftoff, "2" ) ,
-
-/* PopupNotice() */
-RBoolean( "popResize",   "PopResize",   pop_resize ,   "True" ) ,
-RBoolean( "popMinimize", "PopMinimize", pop_minimize , "True" ) ,
-
-/* CreateTemplateDialog() */
-RBoolean( "tempResize",   "TempResize",   temp_resize,   "True" ) ,
-RBoolean( "tempMinimize", "TempMinimize", temp_minimize, "True" ) ,
-
-RDimension( "tempWidth",  "TempWidth",  temp_width,  "1" ) ,
-RDimension( "tempHeight", "TempHeight", temp_height, "1" ) ,
-
-/* CreateMenuBarAndFooterMessageForm() */
-Rint( "edBarTopoff", "EdBarTopoff", ed_bar_topoff, "1" ) ,
-Rint( "edBarLftoff", "EdBarLftoff", ed_bar_lftoff, "1" ) ,
-Rint( "edBarRghoff", "EdBarRghoff", ed_bar_rghoff, "1" ) ,
-
-Rint( "edFrmBtmoff", "EdFrmBtmoff", ed_frm_btmoff, "3" ) ,
-Rint( "edFrmLftoff", "EdFrmLftoff", ed_frm_lftoff, "3" ) ,
-Rint( "edFrmRghoff", "EdFrmRghoff", ed_frm_rghoff, "3" ) ,
-
-RDimension( "edMsgMargintop", "EdMsgMargintop", ed_msg_margintop, "3" ) ,
-RDimension( "edMsgMarginbtm", "EdMsgMarginbtm", ed_msg_marginbtm, "3" ) ,
-
-RDimension( "edMesgMargintop", "EdMesgMargintop", ed_mesg_margintop, "3" ) ,
-RDimension( "edMesgMarginbtm", "EdMesgMarginbtm", ed_mesg_marginbtm, "3" ) ,
-
-Rint( "edSepBtmoff", "EdSepBtmoff", ed_sep_btmoff, "3" ) ,
-Rint( "edSepLftoff", "EdSepLftoff", ed_sep_lftoff, "0" ) ,
-Rint( "edSepRghoff", "EdSepRghoff", ed_sep_rghoff, "0" ) ,
-RDimension( "edSepMargin", "EdSepMargin", ed_sep_margin, "0" ) ,
-
-Rint( "edWgeTopoff", "EdWgeTopoff", ed_wge_topoff, "10" ) ,
-Rint( "edWgeLftoff", "EdWgeLftoff", ed_wge_lftoff, "10" ) ,
-Rint( "edWgeRghoff", "EdWgeRghoff", ed_wge_rghoff, "10" ) ,
-Rint( "edWgeBtmoff", "EdWgeBtmoff", ed_wge_btmoff, "10" ) ,
-
-/* CreateFrame() */
-RBoolean( "frameResize", "FrameResize", frame_resize, "False" ) ,
-
-/* CreateScrollBase() */
-RDimension( "scllFrWidth", "ScllFrWidth", scll_fr_width, "500" ) ,
-
-RDimension( "scllFrThick", "ScllFrThick", scll_fr_thick, "2" ) ,
-
-Rint( "scllBarLftoff", "ScllBarLftoff", scll_bar_lftoff, "4" ) ,
-};
-#undef R
-#undef RBoolean
-#undef RDimension
-#undef Rint
-#undef RPixel
-
-int CodePoint = False;
-
-/*ARGSUSED*/
-static void
-xerror(d, ev)
-Display *d;
-register XErrorEvent *ev;
-{
-    fprintf (stderr, "dtudcfonted:  warning, error event receieved.\n");
-    exit(-1);
-}
-
-int
-main(argc, argv)
-int    argc;
-char   *argv[];
-{
-    static char class_name[] = "Dtudcfonted";
-    int i;
-
-    /* initialize GUI */
-    toplevel = (Widget)GuiInitialize(&app, class_name, &argc, argv);
-
-    /* get application's resources */
-    XtGetApplicationResources( toplevel, &resource,
-               app_resources, XtNumber(app_resources), NULL, 0);
-
-    if (resource.codepoint)
-       CodePoint = True;
-    /* initialize the code range */
-    for( i=1  ;  i < argc  ; i++  ) {
-       if( !strcmp(argv[i],"-pane_size") ) {
-           i++;
-           edpane_size = atoi( argv[i] );
-       } else if( !strcmp(argv[i],"-codepoint") ) {
-           CodePoint = True;
-       }
-    }
-
-    resource.mg_write_snf = GETMESSAGE(2, 2, "Registration processing inside.");
-    resource.me_write_snf = GETMESSAGE(2, 4, "Failed in the registration of the character.");
-    resource.me_illegal_code = GETMESSAGE(2, 6, "Illegal code.");
-    resource.me_non_memory = GETMESSAGE(2, 8, "Because the memory allocation cannot be done, it is not possible to add.");
-    resource.mg_non_code = GETMESSAGE(2, 10, "There is no character of the specified code.");
-    resource.me_illegal_srccode = GETMESSAGE(2, 12, "The mistake is found in the specified copy origin code.");
-    resource.me_illegal_destcode = GETMESSAGE(2, 14, "The mistake is found in the specified copy target code.");
-    resource.me_nodelete_code = GETMESSAGE(2, 16, "There is no character in the specified area.");
-    resource.me_wait = GETMESSAGE(2, 18, "Please wait for a while.");
-    resource.me_non_srcfile = GETMESSAGE(2, 20, "No copy origin code file is specified.");
-    resource.mn_no_font = GETMESSAGE(2, 22, "Informations of user defined character cannot collect.\nThere is no font specified.");
-    resource.mn_plural_font = GETMESSAGE(2, 24, "Informations of user defined character cannot collect.\nThere are plural fonts specified.");
-    resource.mn_not_udc = GETMESSAGE(2, 26, "The specified font do not have any UDCs areas.");
-    resource.mn_no_mem = GETMESSAGE(2, 28, "There are no memories any more.");
-    resource.mn_illegal_area = GETMESSAGE(2, 30, "The information of UDCs area is illegal.");
-    resource.mn_no_read = GETMESSAGE(2, 32, "The font file cannot read.\nPattern area was broken.");
-    resource.mn_prop_font = GETMESSAGE(2, 34, "Dtudcfonted cannot edit proportional character font.");
-    resource.mn_saved_open = GETMESSAGE(2, 36, "There are unsaved edits.\nDo you want to save them before opening?");
-    resource.mn_saved_exit = GETMESSAGE(2, 38, "There are unsaved edits.\nDo you want to save them before exiting?");
-    resource.mn_cpy_lost = GETMESSAGE(2, 40, "When the copy processing is done, the glyph\nimage within the following ranges is changed.\nDo you want to do the copy processing?\n\n");
-    resource.mn_no_perm = GETMESSAGE(2, 42, "No write permission for this font. You should change the file access mode before saving.\n");
-
-    resource.l_selectitem = GETMESSAGE(2, 100, "Select Items");        /* font open */
-    resource.l_codeset = GETMESSAGE(2, 102, "         CodeSet:");
-    resource.l_style = GETMESSAGE(2, 104, "           Style:");
-    resource.l_width = GETMESSAGE(2, 106, "           Width:");
-    resource.l_height = GETMESSAGE(2, 108, "          Height:");
-    resource.exec_label = GETMESSAGE(2, 110, "Open");
-    resource.quit_label = GETMESSAGE(2, 112, "Quit");
-
-    resource.l_font = GETMESSAGE(2, 114, "Font");              /* menu bar */
-    resource.l_edit = GETMESSAGE(2, 116, "Edit");
-    resource.l_manage = GETMESSAGE(2, 118, "Character");
-    resource.l_info = GETMESSAGE(2, 120, "Information");
-
-    resource.l_open_w = GETMESSAGE(2, 122, "Open");            /* font menu */
-    resource.l_save = GETMESSAGE(2, 124, "Save");
-    resource.l_exit = GETMESSAGE(2, 126, "Exit");
-
-    resource.l_clear = GETMESSAGE(2, 128, "Clear");            /* edit menu */
-    resource.l_set = GETMESSAGE(2, 130, "Set");
-    resource.l_reverse = GETMESSAGE(2, 132, "Reverse");
-    resource.l_cut = GETMESSAGE(2, 134, "Cut");
-    resource.l_Copy = GETMESSAGE(2, 135, "Copy");
-    resource.l_paste = GETMESSAGE(2, 136, "Paste");
-    resource.l_roll = GETMESSAGE(2, 138, "Rotate");
-    resource.l_updown_roll = GETMESSAGE(2, 140, "Vertical Roll");
-    resource.l_leftright_roll = GETMESSAGE(2, 142, "Horizontal Roll");
-    resource.l_undo = GETMESSAGE(2, 144, "Undo");
-
-    resource.l_manage_w = GETMESSAGE(2, 146, "Add/Delete..."); /* character menu */
-    resource.l_copy_w = GETMESSAGE(2, 148, "Copy...");
-
-    resource.l_xlfd = GETMESSAGE(2, 150, "XLFD name...");              /* information menu */
-    resource.l_codearea = GETMESSAGE(2, 152, "Code Area...");
-
-    resource.l_add = GETMESSAGE(2, 154, "Add");                /* add/delete dialog */
-    resource.l_delete = GETMESSAGE(2, 156, "Delete");
-    resource.l_cancel = GETMESSAGE(2, 158, "Cancel");
-
-    resource.l_manage_code = GETMESSAGE(2, 160, "Code(hex):"); /* copy dialog */
-    resource.l_copy_src_code = GETMESSAGE(2, 162, " Copy origin code(hex):");
-    resource.l_copy_dest_code = GETMESSAGE(2, 164, "Copy target code(hex):");
-    resource.l_copy = GETMESSAGE(2, 166, "Copy");
-    resource.l_overlay = GETMESSAGE(2, 168, "Overlay");
-    resource.l_ok = GETMESSAGE(2, 170, "OK");
-
-    resource.l_do_save = GETMESSAGE(2, 172, "Save");   /* unsaved edits */
-    resource.l_dont_save = GETMESSAGE(2, 174, "Do not Save");
-    resource.l_do_save_exit = GETMESSAGE(2, 176, "Save and Exit");
-    resource.l_dont_save_exit = GETMESSAGE(2, 178, "Do not Save and Exit");
-
-    resource.mg_start_del_s = GETMESSAGE(2, 180, "The following character will be deleted.");  /* delete notice dialog */
-    resource.mg_start_del_cs = GETMESSAGE(2, 182, "character");
-    resource.mg_start_del_m = GETMESSAGE(2, 184, "The following characters will be deleted.");
-    resource.mg_start_del_cm = GETMESSAGE(2, 186, "characters");
-    resource.mg_register = GETMESSAGE(2, 188, "Register completed");
-    resource.l_code = GETMESSAGE(2, 190, " Code : ");
-    resource.l_code_range = GETMESSAGE(2, 192, " Code range : ");
-
-    resource.message = GETMESSAGE(2, 194, "Message : ");
-
-    resource.code = GETMESSAGE(2, 196, "code...");     /* code dialog */
-    resource.previous = GETMESSAGE(2, 198, "Page up");
-    resource.next = GETMESSAGE(2, 200, "Page down");
-    resource.apply = GETMESSAGE(2, 202, "Apply");
-
-    resource.l_question_title = GETMESSAGE(2, 204, "dtudcfonted - Question");
-    resource.l_warning_title = GETMESSAGE(2, 206, "dtudcfonted - Warning");
-    resource.l_error_title = GETMESSAGE(2, 208, "dtudcfonted -  Error");
-    resource.l_copy_title = GETMESSAGE(2, 210, "dtudcfonted - Copy");
-    resource.l_open_title = GETMESSAGE(2, 212, "dtudcfonted - Open");
-    resource.l_add_title = GETMESSAGE(2, 214, "dtudcfonted - Add/Delete");
-    resource.l_xlfd_title = GETMESSAGE(2, 216, "dtudcfonted - XLFD");
-    resource.l_codearea_title = GETMESSAGE(2, 218, "dtudcfonted - CodeArea");
-
-    resource.file_name = GETMESSAGE(2, 230, "File name");
-    resource.xlfd_name = GETMESSAGE(2, 232, "XLFD name");
-    resource.codearea = GETMESSAGE(2, 234, "Code area");
-
-    resource.falerrmsg[0] = GETMESSAGE(2, 300, "Fatal error occurred.");
-    resource.falerrmsg[1] = GETMESSAGE(2, 301, "Cannot open the font file.");
-    resource.falerrmsg[2] = GETMESSAGE(2, 302, "Cannot read the font file.");
-    resource.falerrmsg[3] = GETMESSAGE(2, 303, "There is no more memory.");
-    resource.falerrmsg[4] = GETMESSAGE(2, 304, "Fatal error occurred.");
-    resource.falerrmsg[5] = GETMESSAGE(2, 305, "The specified font file does not exist.");
-    resource.falerrmsg[6] = GETMESSAGE(2, 306, "This font is not a pcf or snf font.");
-    resource.falerrmsg[7] = GETMESSAGE(2, 307, "Cannot open fonts.list file.");
-    resource.falerrmsg[8] = GETMESSAGE(2, 308, "The format of fonts.list file is illegal.");
-    resource.falerrmsg[9] = GETMESSAGE(2, 309, "The descriptions of the fonts.list file are incorrect.");
-    resource.falerrmsg[10] = GETMESSAGE(2, 310, "The format of fonts.list file is illegal.");
-    resource.falerrmsg[11] = GETMESSAGE(2, 311, "Cannot open fonts.dir file.");
-    resource.falerrmsg[12] = GETMESSAGE(2, 312, "Cannot read fonts.dir file.");
-    resource.falerrmsg[13] = GETMESSAGE(2, 313, "Cannot read font properties.");
-    resource.falerrmsg[14] = GETMESSAGE(2, 314, "Cannot get FONT property.");
-    resource.falerrmsg[15] = GETMESSAGE(2, 315, "Cannot get FAMILY_NAME property.");
-    resource.falerrmsg[16] = GETMESSAGE(2, 316, "This font file is already opened by other application.");
-    resource.falerrmsg[17] = GETMESSAGE(2, 317, "Cannot lock font file.");
-    resource.falerrmsg[18] = GETMESSAGE(2, 318, "Cannot unlock font file.");
-    resource.falerrmsg[19] = GETMESSAGE(2, 319, "Cannot get lock information from the font file.");
-    resource.falerrmsg[20] = GETMESSAGE(2, 320, "Cannot find the specified font file.");
-    resource.falerrmsg[21] = GETMESSAGE(2, 321, "Cannot read NLS database.");
-    resource.falerrmsg[22] = GETMESSAGE(2, 322, "Cannot get charset names from NLS database.");
-    resource.falerrmsg[23] = GETMESSAGE(2, 323, "Charset name not defined in NLS database.");
-    resource.falerrmsg[24] = GETMESSAGE(2, 324, "The specified font has not been opened.");
-    resource.falerrmsg[25] = GETMESSAGE(2, 325, "Fatal error occurred.");
-
-    xlfdDialog   = NULL ;
-    cpyDialog    = NULL ;
-
-    /* initialize the global values and allocate the memories */
-    xeg_init();
-
-
-    /* displays the selection window */
-    PopupSelectXLFD(toplevel);
-
-    XSetErrorHandler((XErrorHandler)xerror);
-    XSetIOErrorHandler((XIOErrorHandler)xerror);
-
-    /* main loop */
-    XtAppMainLoop(app);
-
-    return(-1);
-}
-
-
-/*
- * contents : initialize the global values 
- */
-
-static void
-xeg_init()
-{
-    int i;
-
-    edg.code = edg.ncode = 0;
-    bitPtnClear( edg.ptn );
-    edg.flag = (char)0;
-
-    edlist.nlist = EDLIST_MAX;
-    edlist.statloc = edlist.slctloc = 0;
-    edlist.nptn = 0;
-    edlist.sqstart = 0;
-    edlist.list_h = edlist.elem_w = edlist.elem_h = (Dimension)0;
-    edlist.back = resource.pane_background;
-    edlist.border = resource.pane_foreground; 
-
-    if ( edpane_size ){
-       edpane.width = edpane_size;
-       edpane.height = edpane_size;
-    } else {
-       edpane.width  = EDPANE_SIZE;
-       edpane.height = EDPANE_SIZE;
-    }
-    edpane.pix_w  = edpane.pix_h = 0;
-    edpane.color  = 0;
-    edpane.obj    = 0;
-    edpane.back   = resource.pane_background;
-    edpane.border = resource.pane_foreground;
-
-    xl.display    = NULL;
-    xl.root_winID = xl.edit_winID = xl.disp_winID = xl.list_winID =
-                       (Window)NULL;
-    xl.borderGC   = xl.backGC = xl.rubGC = xl.dashGC = (GC)NULL;
-    xl.dispImage  = NULL;
-
-    dn.elem_w = dn.elem_h = (Dimension)0;
-    dn.ptn_w  = dn.ptn_h  = (Dimension)0;
-    dn.list_h = (Dimension)0;
-    dn.s_ncode = dn.e_ncode = 0;
-    dn.sq_top = dn.sq_start = dn.sq_end = 0;
-    dn.disp_num = 0;
-
-    for ( i=0 ; i<D_MAX ; i++ ) {
-       dl[i].disp_winID = (Window)NULL;
-       dl[i].dispImage = NULL;
-       bitPtnClear( dl[i].ptn );
-    }
-    for ( i=0 ; i<EDLIST_MAX ; i++ ) {
-       dl_glyph[i].disp_winID = (Window)NULL;
-       dl_glyph[i].dispImage = NULL;
-       bitPtnClear( dl_glyph[i].ptn );
-       sq_disp[i] = 0 ;
-    }
-    em.drag_f = OFF;
-    em.adj_px = em.adj_py = 0;
-    em.proc = em.slct_f = 0;
-    em.src1_px = em.src1_py = 0;
-    em.src2_px = em.src2_py = 0;
-    em.dest_px = em.dest_py = 0;
-    em.rsv_f = (char)0;
-    bitPtnClear( em.rsv_ptn );
-
-    cpm.s1_code = cpm.s2_code = cpm.d1_code = 0;
-    cpm.proc = 0;
-
-    return;
-}
-
-
-
-/****************************************************************
- * distroy the "User defined character editor" window          *
- ****************************************************************/
-
-/*
- * contents : destroy the editting window 
- */
-
-static void
-dstrypaneEditPtn()
-{
-    int i ;
-    
-    ptnClose();
-    
-    XFree( (char *)xl.dispImage );
-    XFreeGC( xl.display, xl.borderGC );
-    XFreeGC( xl.display, xl.backGC );
-    XFreeGC( xl.display, xl.rubGC );
-    XFreeGC( xl.display, xl.dashGC );
-
-    for( i=0; i<EDLIST_MAX; i++ ){
-       if( dl_glyph[i].dispImage ){
-           XFree( (char *)dl_glyph[i].dispImage );
-           dl_glyph[i].dispImage = NULL ;
-       }
-    }
-
-    XtPopdown( editPopW );
-    XtDestroyWidget( editPopW );
-
-    return;
-}
-
-
-/****************************************************************
- * update character list                                       *
- ***************************************************************/
-
-/*
- * contents :  add the specified code to the character list 
- */
-
-void
-chgEdCode( code, mode )
-int    code;
-char   mode;
-{
-    int        ncode;
-    int        esq;
-    int        statloc; 
-    int        slctloc; 
-    int        slimax;
-
-    if( code == 0 ) {
-       esq = -1;
-    } else {
-       ncode = codeToNo( code );
-       esq = ptnNoToSq( ncode ) - edlist.sqstart;
-    }
-    if( esq < 0 ) {
-       slctloc = -1;
-       statloc = 0;
-    } else if (efctPtnNum() <= edlist.nlist) {
-       statloc = 0;
-       slctloc = AbsSqToRel(edlist.sqstart, ptnNoToSq( ncode));
-    } else {
-       if ((esq >= edlist.statloc) 
-           && (esq <= (RelToAbsSq( edlist.sqstart + edlist.statloc, 
-                           edlist.nlist - 1) - edlist.sqstart))){
-           statloc = edlist.statloc;
-            slctloc = AbsSqToRel(edlist.sqstart+statloc,
-                                       edlist.sqstart + esq);
-       } else {
-           statloc = esq;
-           slctloc = 0;
-       }
-        while( RelToAbsSq(edlist.sqstart+statloc, edlist.nlist - 1) < 0)
-           statloc = RelToAbsSq( edlist.sqstart + statloc, -1) 
-                      - edlist.sqstart; 
-       slctloc = AbsSqToRel( edlist.sqstart + statloc, edlist.sqstart + esq);
-    }
-
-    n = 0;
-    if (( slimax = efctPtnNum()) < edlist.nlist)
-       slimax = edlist.nlist;
-    XtSetArg( arg[n], XmNmaximum,   (XtArgVal)slimax );        n++;
-    XtSetArg( arg[n], XmNvalue, (XtArgVal)AbsSqToRel( edlist.sqstart, edlist.sqstart + statloc) );     n++;
-    XtSetValues( wgeScro , arg, n );
-
-    chgEdList( statloc, slctloc, mode );
-    chgEdPtn( code );
-}
-
-
-/*
- * contents : rewrite the character list 
- */
-
-void
-chgEdList( statloc, slctloc, mode  )
-int    statloc;
-int    slctloc;
-char   mode;
-{
-    int                sq;
-    int                i;
-    char       str[6];
-    int         no;
-    int                code;
-    extern void ListSetLabelStr();
-    extern void ListSetGlyphImage();
-    extern void ListUnselectItem();
-    extern void ListSelectItem();
-       
-    if((mode == ON) || (edlist.statloc != statloc)){
-       for (i=0, sq=edlist.sqstart+statloc; i < edlist.nlist; sq++){
-           no = ptnSqToNo(sq);
-           sq_disp[i] = sq ;
-
-           if ((no >= 0) && (code = noToCode(no)) >= 0 ){
-               sprintf(str, "%4x", code);
-               ListSetLabelStr(i, str);
-               ListSetGlyphImage(i) ;
-               if (i == 0)
-                   edlist.statloc = sq - edlist.sqstart;
-               i++;
-           } else if (sq > ( edlist.sqstart + edlist.nptn - 1)){
-               strcpy(str, "    ");
-               ListSetLabelStr(i, str);
-               ListSetGlyphImage(i) ;
-               i++;
-           }
-       }
-    }
-
-    if( (mode == ON) || (edlist.slctloc != slctloc) ) {
-       if((0 <= edlist.slctloc) && (edlist.slctloc < edlist.nlist)){
-           ListUnselectItem(edlist.slctloc);
-       }
-       if((0 <= slctloc) && (slctloc < edlist.nlist)){
-           ListSelectItem(slctloc);
-       }
-       edlist.slctloc = slctloc;
-    }
-}
-
-
-/*
- * contents : rewrite the editting pane 
- */
-
-static void
-chgEdPtn( code )
-int    code;
-{
-    extern void SetCodeString();
-
-       if (xl.display == NULL ){
-               return;
-       }
-       
-    if( code == 0 ) {
-       XClearWindow( xl.display, xl.edit_winID );
-       DrawBorderEdPn( 0, 0, edg.width - 1, edg.height - 1 );
-       XClearWindow( xl.display, xl.disp_winID );
-       XClearWindow( xl.display, xl.list_winID );
-       bitPtnClear( edg.ptn );
-       edg.code = 0;
-       edg.ncode = 0;
-       SetCodeString(0);
-    }
-
-    if( ptnGet( code, edg.ptn) == 0 ) {
-       edg.code = code;
-       edg.ncode = codeToNo( code );
-       DrawRectEdPn( 0, 0, edg.width - 1, edg.height - 1 );
-
-       SetCodeString(code);
-       DrawDpPn();
-    }
-}
-
-
-
-
-
-/****************************************************************
- * draw patterns to the editting pane                          * 
- ***************************************************************/
-
-/*
- * contents : draw a rectangle 
- *
- */
-
-static void
-DrawRectEdPn( x1, y1, x2, y2 )
-int    x1;
-int    y1;
-int    x2;
-int    y2;
-{
-    int        i, j, wk;
-    short    cx1, cy1, cx2, cy2;
-    XRectangle    recOn[MAXPTNSIZE*MAXPTNSIZE];
-    XRectangle    recOff[MAXPTNSIZE*MAXPTNSIZE];
-    int        nron, nroff;
-
-    if (xl.display == NULL ){
-           return;
-    }
-           
-    if( x2 < x1 ) {
-       wk = x2;
-       x2 = x1;
-       x1 = wk;
-    }
-    if( y2 < y1 ) {
-       wk = y2;
-       y2 = y1;
-       y1 = wk;
-    }
-
-    nron = nroff = 0;
-    for( j=y1   ;   j <= y2   ;  j++ ) {
-       for( i=x1   ;   i <= x2   ;   i++ ) {
-           cx1 = (short)(edpane.pix_w * i);
-           cy1 = (short)(edpane.pix_h * j);
-           cx2 = (short)(cx1 + edpane.pix_w - 1);
-           cy2 = (short)(cy1 + edpane.pix_h - 1);
-
-           if( bitRead( edg.ptn, i, j ) != 0 ) {
-               recOn[nron].x = cx1;
-               recOn[nron].y = cy1;
-               recOn[nron].width  = (USHORT)(cx2 - cx1);
-               recOn[nron].height = (USHORT)(cy2 - cy1);
-               nron++;
-           }
-           else {
-               recOff[nroff].x = cx1;
-               recOff[nroff].y = cy1;
-               recOff[nroff].width  = (USHORT)(cx2 - cx1);
-               recOff[nroff].height = (USHORT)(cy2 - cy1);
-               nroff++;
-           }
-       }
-    }
-    if( nron )
-       XFillRectangles( xl.display, xl.edit_winID, xl.borderGC, recOn, nron );
-    if( nroff )
-       XFillRectangles( xl.display, xl.edit_winID, xl.backGC,   recOff, nroff );
-}
-
-
-/*
- * contents : draw a lattice inside of the editting pane 
- */
-
-static void
-DrawBorderEdPn( x1, y1, x2, y2 )
-int    x1;
-int    y1;
-int    x2;
-int    y2;
-{
-    short      cx1, cy1;
-    short      cx2, cy2;
-    int                ndseg;
-    int                wk, i;
-    XSegment   dseg[MAXPTNSIZE*2];
-
-    if (xl.display == NULL ){
-           return;
-    }
-    
-    if( x2 < x1 ) {
-       wk = x2;
-       x2 = x1;
-       x1 = wk;
-    }
-    if( y2 < y1 ) {
-       wk = y2;
-       y2 = y1;
-       y1 = wk;
-    }
-
-    ndseg = 0;
-
-    cx1 = (short)(edpane.pix_w * x1);
-    cx2 = (short)(edpane.pix_w * x2 + edpane.pix_w - 1);
-    for( i=y1  ;  i <= y2  ;  i++ ) {
-       cy1 = (short)(edpane.pix_h * i + edpane.pix_h - 1);
-       dseg[ndseg].x1 = cx1;
-       dseg[ndseg].y1 = cy1;
-       dseg[ndseg].x2 = cx2;
-       dseg[ndseg].y2 = cy1;
-       ndseg++;
-    }
-    cy1 = (short)(edpane.pix_h * y1);
-    cy2 = (short)(edpane.pix_h * y2 + edpane.pix_h - 1);
-    for( i=x1  ;  i <= x2  ;   i++ ) {
-       cx1 = (short)(edpane.pix_w * i + edpane.pix_w - 1);
-       dseg[ndseg].x1 = cx1;
-       dseg[ndseg].y1 = cy1;
-       dseg[ndseg].x2 = cx1;
-       dseg[ndseg].y2 = cy2;
-       ndseg++;
-    }
-
-    if( ndseg ) {
-       XDrawSegments( xl.display,  xl.edit_winID,  xl.dashGC,  dseg, ndseg);
-    }
-}
-
-
-/*
- * contents : draw a dot 
- */
-
-static void
-DrawPointEdPn( x, y, mode )
-int    x;
-int    y;
-int    mode;
-{
-    int                x1, y1;
-    int                x2, y2;
-
-    if (xl.display == NULL ){
-           return;
-    }
-
-    x1 = edpane.pix_w * x;
-    y1 = edpane.pix_h * y;
-    x2 = x1 + edpane.pix_w - 1;
-    y2 = y1 + edpane.pix_h - 1;
-
-    if( mode != 0 ) {
-       XFillRectangle( xl.display, xl.edit_winID, xl.borderGC,
-                       x1, y1, x2-x1, y2-y1 );
-    } else {
-       XFillRectangle( xl.display, xl.edit_winID, xl.backGC,
-                       x1, y1, x2-x1, y2-y1 );
-    }
-}
-
-
-
-/*
- * contents : draw a current character pattern to the display pane 
- */
-
-static void
-DrawDpPn()
-{
-       if (xl.display == NULL ){
-               return;
-       }
-
-       XPutImage( xl.display,  xl.disp_winID,  xl.borderGC,  xl.dispImage,
-             0, 0, 0, 0, edg.width, edg.height );
-       if( xl.list_winID ) {
-               XPutImage( xl.display,  xl.list_winID,  xl.borderGC,
-                       xl.dispImage, 0, 0, 0, 0, edg.width, edg.height );
-       }
-}
-
-
-
-/*
- * contents : draw a dot 
- */
-
-static void
-DrawPointDpPn( x, y, mode )
-int    x;
-int    y;
-int    mode;
-{
-
-    if (xl.display == NULL ){
-           return;
-    }
-    if( mode != 0 ){
-       XDrawPoint( xl.display,  xl.disp_winID,  xl.borderGC, x,  y );
-       if (xl.list_winID)
-           XDrawPoint( xl.display,  xl.list_winID,  xl.borderGC, x,  y );
-    } else {
-       XDrawPoint( xl.display,  xl.disp_winID,  xl.backGC,   x,  y );
-       if (xl.list_winID)
-           XDrawPoint( xl.display,  xl.list_winID,  xl.backGC,   x,  y );
-    }
-}
-
-
-
-/****************************************************************
- * draw patterns by mouse                                      *
- ****************************************************************/
-
-
-/*
- * contents : draw a dot 
- */
-
-static void
-musPoint( evtype, px, py )
-int    evtype; 
-int    px;
-int    py;
-{
-    switch( evtype ) {
-    case MotionNotify:
-       if( (em.src1_px == px) && (em.src1_py == py) )
-           return;
-       break;
-    case ButtonPress:
-       em.src1_px = px;
-       em.src1_py = py;
-       break;
-    default:
-       return;
-    }
-
-    if( edpane.color == ON )
-       bitSet( edg.ptn, px, py );
-    else
-       bitReset( edg.ptn, px, py );
-    edg.flag = ON;
-    DrawPointEdPn( px, py, edpane.color );
-    DrawPointDpPn( px, py, edpane.color );
-}
-
-
-/*
- * contents : draw a line 
- */
-
-static void
-musLine( evtype, px, py )
-int    evtype;
-int    px;
-int    py;
-{
-    int                r1_x, r1_y;
-    int                r2_x, r2_y;
-    int                rx,   ry;
-    int                harf_pix_w;
-    int                harf_pix_h;
-
-    harf_pix_w = edpane.pix_w / 2;
-    harf_pix_h = edpane.pix_h / 2;
-    r1_x = em.src1_px * edpane.pix_w + harf_pix_w;
-    r1_y = em.src1_py * edpane.pix_h + harf_pix_h;
-    r2_x = em.src2_px * edpane.pix_w + harf_pix_w;
-    r2_y = em.src2_py * edpane.pix_h + harf_pix_h;
-    rx = px * edpane.pix_w + harf_pix_w;
-    ry = py * edpane.pix_h + harf_pix_h;
-
-    switch( evtype ) {
-    case MotionNotify:
-       if( (em.src2_px == px) && (em.src2_py == py) )
-           return;
-       rubLine( r1_x, r1_y, r2_x, r2_y );
-       rubLine( r1_x, r1_y, rx, ry );
-       em.src2_px = px;
-       em.src2_py = py;
-       return;
-    case ButtonPress:
-       em.src1_px = em.src2_px = px;
-       em.src1_py = em.src2_py = py;
-       return;
-    default:
-       if( (r1_x == r2_x) && (r1_y == r2_y) )
-           return;
-       rubLine( r1_x, r1_y, r2_x, r2_y );
-
-       if ((em.src2_px < 0) || (em.src2_py < 0) ||
-           (edg.width <= em.src2_px) || (edg.height <= em.src2_py))
-           return;
-
-       bitDrawLine( edg.ptn, em.src1_px, em.src1_py,
-                             em.src2_px, em.src2_py, edpane.color );
-       edg.flag = ON;
-       DrawRectEdPn( em.src1_px, em.src1_py, em.src2_px, em.src2_py );
-       DrawDpPn();
-    }
-}
-
-
-
-/*
- * contents : draw a circle 
- */
-
-static void
-musCircle( evtype, px, py )
-int    evtype; 
-int    px;
-int    py;
-{
-    int                r1_x, r1_y;
-    int                r2_x, r2_y;
-    int                rx,   ry;       
-    int                harf_pix_w;
-    int                harf_pix_h;
-    extern int bitDrawCircle();
-
-    harf_pix_w = edpane.pix_w / 2;
-    harf_pix_h = edpane.pix_h / 2;
-
-    r1_x = em.src1_px * edpane.pix_w + harf_pix_w;
-    r1_y = em.src1_py * edpane.pix_h + harf_pix_h;
-    r2_x = em.src2_px * edpane.pix_w + harf_pix_w;
-    r2_y = em.src2_py * edpane.pix_h + harf_pix_h;
-    rx = px * edpane.pix_w + harf_pix_w;
-    ry = py * edpane.pix_h + harf_pix_h;
-
-    switch( evtype ) {
-    case MotionNotify:
-       if( (em.src2_px == px) && (em.src2_py == py) ) {
-           return;
-       }
-       rubCircle( r1_x, r1_y, r2_x, r2_y );
-       rubCircle( r1_x, r1_y, rx, ry );
-       em.src2_px = px;
-       em.src2_py = py;
-       return;
-    case ButtonPress:
-       em.src1_px = em.src2_px = px;
-       em.src1_py = em.src2_py = py;
-       return;
-    default:
-       if( (em.src1_px == px) && (em.src1_py == py) ) {
-           return;
-       }
-       rubCircle( r1_x, r1_y, r2_x, r2_y );
-
-       if( (px < 0) || (py < 0) || (edg.width <= px) || (edg.height <= py) ) {
-           return;
-       }
-       bitDrawCircle( edg.ptn, em.src1_px, em.src1_py, px, py, edpane.color);
-
-       edg.flag = ON;
-       DrawRectEdPn( 0, 0, edg.width -1, edg.height -1 );
-       DrawDpPn();
-    }
-}
-
-
-/*
- * contents : draw a rectangle 
- */
-
-static void
-musRect( proc, evtype, px, py )
-int    proc;
-int    evtype;
-int    px;
-int    py;
-{
-    int                r1_x, r1_y;
-    int                r2_x, r2_y;
-    int                rx,   ry;
-    int                lux, luy;
-    int                width, height;
-    int                dpx, dpy, dp;    
-
-    if( (proc == PROC_ROLL) && (evtype != ButtonPress) ) {
-       dpx = px - em.src1_px;
-       dpy = py - em.src1_py;
-       dp = (abs(dpx) > abs(dpy) ) ? abs(dpx) : abs(dpy);
-
-       if( dpx != 0 ) 
-           px = em.src1_px + dpx/abs(dpx) * dp;
-       if( dpy != 0 ) 
-           py = em.src1_py + dpy/abs(dpy) * dp;
-    }
-
-    r1_x = em.src1_px * edpane.pix_w + edpane.pix_w / 2;
-    r1_y = em.src1_py * edpane.pix_h + edpane.pix_h / 2;
-    r2_x = em.src2_px * edpane.pix_w + edpane.pix_w / 2;
-    r2_y = em.src2_py * edpane.pix_h + edpane.pix_h / 2;
-    rx = px * edpane.pix_w + edpane.pix_w / 2;
-    ry = py * edpane.pix_h + edpane.pix_h / 2;
-
-    switch( evtype ) {
-    case MotionNotify:
-       if( (em.src2_px == px) && (em.src2_py == py) )
-           return;
-       rubBand( r1_x, r1_y, r2_x, r2_y );
-       rubBand( r1_x, r1_y, rx, ry );
-       em.src2_px = px;
-       em.src2_py = py;
-       return;
-    case ButtonPress:
-       resetEditMode( RES_SLCT );
-       em.src1_px = em.src2_px = px;
-       em.src1_py = em.src2_py = py;
-       return;
-    default:
-       resetEditMode( RES_MSG | RES_PROC );
-       rubBand( r1_x,  r1_y,  r2_x,  r2_y );
-       if( (r1_x == r2_x) || (r1_y == r2_y) )
-           return;
-       if( (em.src2_px < 0) || (em.src2_py < 0) ||
-           (edg.width <= em.src2_px) || (edg.height <= em.src2_py)     )
-           return;
-
-       lux = (em.src1_px < em.src2_px ) ?  em.src1_px   :   em.src2_px;
-       luy = (em.src1_py < em.src2_py ) ?  em.src1_py   :   em.src2_py;
-       width  = abs( em.src1_px - em.src2_px ) + 1;
-       height = abs( em.src1_py - em.src2_py ) + 1;
-
-       bitDrawRect(edg.ptn, lux, luy, width, height, edpane.color);
-
-       edg.flag = ON;
-       DrawRectEdPn( em.src1_px, em.src1_py, px, py );
-       DrawDpPn();
-    }
-}
-
-
-/*
- * contents : edit inside of the specified area (clear, reverse, rotate,etc.)
- */
-
-static void
-musRegionProc( proc, evtype, px, py )
-int    proc;
-int    evtype;
-int    px;
-int    py;
-{
-    int                rx,   ry;
-    int                dpx, dpy, dp;    
-    extern void        SelectSet();
-
-    if( (proc == PROC_ROLL) && (evtype != ButtonPress) ) {
-       dpx = px - em.src1_px;
-       dpy = py - em.src1_py;
-       dp = (abs(dpx) > abs(dpy) ) ? abs(dpx) : abs(dpy);
-
-       if( dpx != 0 ) 
-           px = em.src1_px + dpx/abs(dpx) * dp;
-       if( dpy != 0 ) 
-           py = em.src1_py + dpy/abs(dpy) * dp;
-    }
-
-    r1_x = em.src1_px * edpane.pix_w + edpane.pix_w / 2;
-    r1_y = em.src1_py * edpane.pix_h + edpane.pix_h / 2;
-    r2_x = em.src2_px * edpane.pix_w + edpane.pix_w / 2;
-    r2_y = em.src2_py * edpane.pix_h + edpane.pix_h / 2;
-    rx = px * edpane.pix_w + edpane.pix_w / 2;
-    ry = py * edpane.pix_h + edpane.pix_h / 2;
-
-    switch( evtype ) {
-    case MotionNotify:
-       if( (em.src2_px == px) && (em.src2_py == py) )
-           return;
-       rubBand( r1_x, r1_y, r2_x, r2_y );
-       rubBand( r1_x, r1_y, rx, ry );
-       em.src2_px = px;
-       em.src2_py = py;
-       return;
-    case ButtonPress:
-       if (select_x || select_y || select_w || select_h) {
-           rubBand( r1_x, r1_y, r2_x, r2_y );
-       }
-       resetEditMode( RES_SLCT );
-       em.src1_px = em.src2_px = px;
-       em.src1_py = em.src2_py = py;
-       return;
-    default:
-       resetEditMode( RES_MSG | RES_PROC );
-       select_x = select_y = select_w  = select_h = 0;
-       if( (r1_x == r2_x) || (r1_y == r2_y) ) {
-           rubBand( r1_x,  r1_y,  r2_x,  r2_y );
-           return;
-       }
-       if( (em.src2_px < 0) || (em.src2_py < 0) ||
-           (edg.width <= em.src2_px) || (edg.height <= em.src2_py)     ) {
-           rubBand( r1_x,  r1_y,  r2_x,  r2_y );
-           return;
-       }
-
-       select_x = (em.src1_px < em.src2_px ) ?  em.src1_px   :   em.src2_px;
-       select_y = (em.src1_py < em.src2_py ) ?  em.src1_py   :   em.src2_py;
-       select_w  = abs( em.src1_px - em.src2_px ) + 1;
-       select_h = abs( em.src1_py - em.src2_py ) + 1;
-       SelectSet();
-    }
-}
-
-
-/*ARGSUSED*/
-static void
-musPasteProc(w, client_data, event)
-Widget w;
-XtPointer client_data;
-XEvent *event;
-{
-    static int ox=0, oy=0;
-    int rc, tx, ty;
-    extern void UndoSet();
-    extern Widget wgeBulB_edit;
-    extern int bitDrawPaste();
-
-    switch(event->type) {
-    case MotionNotify:
-       tx = (event->xmotion.x / edpane.pix_w) * edpane.pix_w + edpane.pix_w / 2;
-       ty = (event->xmotion.y / edpane.pix_h) * edpane.pix_h + edpane.pix_h / 2;
-       if (tx == ox && ty == oy)
-           return;
-       if(ox) {
-           rubBand(ox, oy, ox + cut_w * edpane.pix_w, oy + cut_h * edpane.pix_h);
-       }
-       ox = tx;
-       oy = ty;
-       rubBand(ox, oy, ox + cut_w * edpane.pix_w, oy + cut_h * edpane.pix_h);
-       break;
-    case ButtonRelease:
-       XtRemoveEventHandler(wgeBulB_edit,
-                               ButtonReleaseMask|PointerMotionMask,
-                                   False, (XtEventHandler)musPasteProc, NULL );
-       rubBand(ox, oy, ox + cut_w * edpane.pix_w, oy + cut_h * edpane.pix_h);
-       ox = 0;
-       oy = 0;
-        bitPtnCopy( em.rsv_ptn,  edg.ptn );
-
-       tx = event->xbutton.x / edpane.pix_w;
-       ty = event->xbutton.y / edpane.pix_h;
-       rc = bitDrawPaste(edg.ptn, tx, ty);
-       if( rc == -1 )
-            return;
-       edg.flag = ON;
-       em.rsv_f = ON;
-       DrawRectEdPn( 0, 0,  edg.width - 1,  edg.height - 1 );
-       DrawDpPn();
-       UndoSet();
-       break;
-    defaults:
-       break;
-    }
-}
-
-
-
-static void
-rubLine( x1, y1, x2, y2  )
-int    x1;
-int    y1;
-int    x2;
-int    y2;
-{
-    if( x1==x2 && y1==y2 ) return;
-
-    XDrawLine( xl.display, xl.edit_winID, xl.rubGC,    x1,y1, x2,y2 );
-}
-
-
-
-static void
-rubBand( x1, y1, x2, y2  )
-int    x1;
-int    y1;
-int    x2;
-int    y2;
-{
-    if( x1==x2 && y1==y2 )
-       return;
-
-    XDrawLine( xl.display, xl.edit_winID, xl.rubGC, x1, y1, x2, y1 );
-    XDrawLine( xl.display, xl.edit_winID, xl.rubGC, x1, y1, x1, y2 );
-    XDrawLine( xl.display, xl.edit_winID, xl.rubGC, x2, y1, x2, y2 );
-    XDrawLine( xl.display, xl.edit_winID, xl.rubGC, x1, y2, x2, y2 );
-}
-
-
-
-static void
-rubCircle( ox, oy, rx, ry )
-int    ox;
-int    oy;
-int    rx;
-int    ry;
-{
-    unsigned int       r;
-    int                        x, y;
-
-    if( ox==rx && oy==ry ) return;
-
-    x = rx - ox;
-    y = ry - oy;
-    r = (unsigned int)sqrt( (double)(x*x + y*y) );
-    if ( r == 0 ) return;
-
-    x = ox - (int)r;
-    y = oy - (int)r;
-    XDrawArc( xl.display, xl.edit_winID, xl.rubGC,
-            x, y, 2*r-1, 2*r-1,
-            0, 360*64
-            );
-}
-
-
-
-static void
-resetEditMode( flag )
-UINT   flag;
-{
-    int                r1_x, r1_y;
-    int                r2_x, r2_y;
-
-    if( flag & RES_MSG )
-       SetString( wgeStaT, "" );
-
-    if( flag & RES_PROC )
-       em.proc = edpane.obj;
-
-    if( (flag & RES_SLCT) && (em.slct_f) ) {
-       r1_x = em.src1_px * edpane.pix_w + edpane.pix_w / 2;
-       r1_y = em.src1_py * edpane.pix_h + edpane.pix_h / 2;
-       r2_x = em.src2_px * edpane.pix_w + edpane.pix_w / 2;
-       r2_y = em.src2_py * edpane.pix_h + edpane.pix_h / 2;
-       rubBand( r1_x, r1_y, r2_x, r2_y );
-       em.slct_f = OFF;
-    }
-
-    if( flag & RES_RSV )
-       em.rsv_f = OFF;
-}
-
-
-/****************************************************************
- * copy character pattern                                      *
- ***************************************************************/
-
-/*
- * contents : copy or overlay the new character pattern to the current pattern 
- */
-
-/*ARGSUSED*/
-static void
-copyPatterns( fdata, s1_code, s2_code, d1_code, proc )
-FalFontData    *fdata; 
-int    s1_code;
-int    s2_code;
-int    d1_code;
-int    proc;   
-{
-    int                ret;
-    int                d1_ncode, d2_ncode;
-    int                code_d;
-    int                code_disp;
-    char       err[128];
-    int                i_s, i_d;
-    int                i;
-    char       grc_d;
-    char       **ptn;
-    char       ptn2[MAXPTNBYTE];
-    int                num;
-    extern int last_code;
-
-    ret = copySNF(s1_code, s2_code, &ptn, &num, err);
-    if( ret == -1 ) {
-       Error_message2((Widget)NULL, err);
-       return;
-    }
-
-    if (last_code < (d1_code + num))
-       last_code = d1_code + num;
-
-    if( ptnSense(edg.code) == 1 )
-       ptnAdd( edg.code, edg.ptn );
-
-    d1_ncode = codeToNo( d1_code );
-
-    for (i_d=d1_ncode, i_s=0; i_s < num; i_d++) {
-       if ( codeCheck( noToCode( i_d)))
-           continue;
-       bitPtnClear( ptn2 );
-       code_d = noToCode( i_d );
-       grc_d = ptnGet( code_d,  ptn2 );
-
-       if (grc_d == 0) {
-           if( proc == CPY_OVERLAY ) {
-               for( i=0  ;  i < edg.height*((edg.width+7)/8)  ;  i++ ) {
-                   ptn[i_s][i] |= ptn2[i];
-               }
-           }
-           ptnAdd( code_d, ptn[i_s] );
-           edg.flag = ON;
-       } else {
-           if( ptnAdd( code_d, ptn[i_s] ) != 1 ) {
-               SetString( wgeStaT, resource.me_non_memory );
-               break;
-           }
-           edlist.nptn++;
-           edg.flag = ON;
-       }
-       i_s ++;
-    }
-    d2_ncode = i_d - 1;
-    
-    code_disp = 0;
-    for( i=d1_ncode   ; i <= d2_ncode; i++ ) {
-       if ( codeCheck( noToCode(i) ) )
-           continue;
-       if( ptnSense( noToCode( i ) ) == 1 ) {
-           code_disp = noToCode( i );
-           break;
-       } 
-    }
-    freeSNF(ptn, num);
-    
-    if( (code_disp == 0) && (efctPtnNum() > 0))
-       code_disp = noToCode( ptnSqToNo(edlist.sqstart) );
-
-    chgEdCode( code_disp, ON );
-
-    resetEditMode( (UINT) (RES_MSG | RES_PROC | RES_SLCT | RES_RSV) );
-}
diff --git a/cde/programs/dtudcfonted/ufontrsrc.h b/cde/programs/dtudcfonted/ufontrsrc.h
deleted file mode 100644 (file)
index fc008b7..0000000
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* ufontrsrc.h 1.18 - Fujitsu source for CDEnext    96/10/30 13:13:44      */
-/* $XConsortium: ufontrsrc.h /main/9 1996/11/08 01:52:14 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-
-typedef struct _Resource {
-    char       *mg_write_snf;
-    char       *me_write_snf;
-    char       *me_illegal_code;
-    char       *me_non_memory;
-    char       *mg_non_code;
-    char       *me_illegal_srccode;
-    char       *me_illegal_destcode;
-    char       *me_nodelete_code;
-    char       *me_wait;
-    char       *me_non_srcfile;
-
-    char       *mn_no_font;
-    char       *mn_plural_font;
-    char       *mn_not_udc;
-    char       *mn_no_mem;
-    char       *mn_illegal_area;
-    char       *mn_no_read;
-    char       *mn_prop_font;
-    char       *mn_saved_open;
-    char       *mn_saved_exit;
-    char       *mn_cpy_lost;
-    char       *mn_no_perm;
-
-    Boolean    codepoint;
-
-    char       *l_font;
-    char       *l_edit;
-    char       *l_manage;
-    char       *l_info;
-    char       *l_open;
-    char       *l_selectitem;
-    char       *l_codeset;
-    char       *l_style;
-    char       *l_width;
-    char       *l_height;
-    char       *l_cancel;
-    char       *l_copy;
-    char       *l_overlay;
-    char       *l_add;
-    char       *l_delete;
-    char       *l_open_w;
-    char       *l_save;
-    char       *l_exit;
-    char       *l_manage_w;
-    char       *l_xlfd;
-    char       *l_codearea;
-    char       *l_copy_w;
-    char       *l_clear;
-    char       *l_set;
-    char       *l_reverse;
-    char       *l_cut;
-    char       *l_Copy;
-    char       *l_paste;
-    char       *l_roll;
-    char       *l_updown_roll;
-    char       *l_leftright_roll;
-    char       *l_undo;
-
-    char       *l_manage_code;
-    char       *l_copy_src_code;
-    char       *l_copy_dest_code;
-
-    char       *l_ok;
-
-    char       *l_question_title;
-    char       *l_warning_title;
-    char       *l_error_title;
-    char       *l_copy_title;
-    char       *l_open_title;
-    char       *l_add_title;
-    char       *l_xlfd_title;
-    char       *l_codearea_title;
-
-    char       *file_name;
-    char       *xlfd_name;
-    char       *codearea;
-
-    char       *l_do_save;
-    char       *l_dont_save;
-    char       *l_do_save_exit;
-    char       *l_dont_save_exit;
-
-    char       *l_ptog;
-    char       *l_ptog_cmd;
-
-    char       *mg_start_del_s;
-    char       *mg_start_del_cs;
-    char       *mg_start_del_m;
-    char       *mg_start_del_cm;
-
-    char       *mg_register;
-
-    char       *l_code;
-    char       *l_code_range;
-
-
-/* CreateCaptionFrame() */
-    Boolean        capt_resize ;       /* resizable:           */
-    int                    capt_lftoff ;       /* leftOffset:          */
-    int                    capt_topoff ;       /* topOffset:           */
-    int                    capt_rghoff ;       /* RightOffset:         */
-
-    Pixel          pane_background;
-    Pixel          pane_foreground;
-    Pixel          background;
-    Pixel          foreground;
-
-/* CreateMenuButtons() */
-    Dimension      menu_margin ;       /* margin:              */
-
-/* CreateDialogAndButtons() */
-    Boolean        dia_tm_automng ;    /* autoUnmanage:        */
-    Dimension      dia_tm_width ;      /* marginWidth:         */
-    Dimension      dia_tm_height ;     /* marginHeight:        */
-    Boolean        dia_tm_resize ;     /* noResize:            */
-    Boolean        dia_tm_minimize ;   /* minimizeButtons:     */
-
-    Dimension      dia_rw_width ;      /* marginWidth:         */
-    Dimension      dia_rw_height ;     /* marginHeight:        */
-    Dimension      dia_rw_spacing ;    /* spacing:             */ 
-
-/* CreateDrawingArea() */
-    Dimension      draw_border ;       /* borderWidth:         */
-    int                    draw_topoff ;       /* topOffset:           */
-    int                    draw_lftoff ;       /* leftOffset:          */
-
-/* PopupNotice() */
-    Boolean        pop_resize  ;       /* noResize:            */
-    Boolean        pop_minimize ;      /* minimizeButtons:     */
-
-/* CreateTemplateDialog() */
-    Boolean        temp_resize ;       /* noResize:            */
-    Boolean        temp_minimize ;     /* minimizeButtons:     */
-
-    Dimension      temp_width  ;       /* width:               */
-    Dimension      temp_height ;       /* height:              */
-
-/* CreateMenuBarAndFooterMessageForm() */
-
-    int                    ed_bar_topoff ;     /* topOffset:           */
-    int                    ed_bar_lftoff ;     /* leftOffset:          */
-    int                    ed_bar_rghoff ;     /* rightOffset:         */
-
-    int                    ed_frm_btmoff ;     /* bottomOffset:        */
-    int                    ed_frm_lftoff ;     /* leftOffset:          */
-    int                    ed_frm_rghoff ;     /* rightOffset:         */
-
-    Dimension      ed_msg_margintop ;  /* marginTop:           */
-    Dimension      ed_msg_marginbtm ;  /* marginBottom:        */
-
-    Dimension      ed_mesg_margintop ; /* marginTop:           */
-    Dimension      ed_mesg_marginbtm ; /* marginBottom:        */
-
-    int                    ed_sep_btmoff ;     /* bottomOffset:        */
-    int                    ed_sep_lftoff ;     /* leftOffset:          */
-    int                    ed_sep_rghoff ;     /* rightOffset:         */
-    Dimension      ed_sep_margin ;     /* margin:              */
-
-    int                    ed_wge_topoff ;     /* topOffset:           */
-    int                    ed_wge_lftoff ;     /* leftOffset:          */
-    int                    ed_wge_rghoff ;     /* rightOffset:         */
-    int                    ed_wge_btmoff ;     /* bottomOffset:        */
-
-/* CreateFrame() */
-    Boolean        frame_resize ;      /* resizable:           */
-
-/* CreateScrollBase() */
-    Dimension      scll_fr_width ;     /* width:               */
-
-    Dimension      scll_fr_thick ;     /* shadowThickness:     */
-
-    int                    scll_bar_lftoff ;   /* leftOffset:          */
-
- /*    put data from resource database */
-    char       * exec_label ;     
-    char       * quit_label ;     
-
-    char       * message ;     
-
-    char       * code ;     
-    char       * previous ;     
-    char       * next ;     
-    char       * apply ;     
-
-    char       * falerrmsg[26];
-} Resource;
-
-
-/**********/
diff --git a/cde/programs/dtudcfonted/util.c b/cde/programs/dtudcfonted/util.c
deleted file mode 100644 (file)
index f04772a..0000000
+++ /dev/null
@@ -1,1179 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* util.c 1.22 - Fujitsu source for CDEnext    96/10/30 13:31:41      */
-/* $XConsortium: util.c /main/13 1996/11/08 01:56:34 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-
-
-#include <stdlib.h>
-#include <wchar.h>
-#include <Xm/XmAll.h>
-#include <Xm/RowColumn.h>
-#include <Xm/MainW.h>
-
-#include "util.h"
-#include "ufontrsrc.h"
-#include "FaLib.h"
-
-extern Widget toplevel;
-static void _destroy();
-void _unmap();
-
-extern Resource resource ;
-
-#include "xpm.h"
-#include "pixmaps/Pencil.pm"
-#include "pixmaps/Line.pm"
-#include "pixmaps/Rectangle.pm"
-#include "pixmaps/Circle.pm"
-#include "pixmaps/Eraser.pm"
-#include "pixmaps/SelectArea.pm"
-
-#ifdef XPM
-#define ReadXpm XpmCreatePixmapFromData
-#else
-#define ReadXpm _DtXpmCreatePixmapFromData
-#endif
-#define NUMPIX 6
-
-#include "pixmaps/arrow.pm"
-
-/*ARGSUSED*/
-Widget
-CreateCaptionFrame(owner, name, labelstr, type, thickness)
-Widget owner;
-String name;
-String labelstr;
-int type;
-int thickness;
-{
-    Widget top, label, frame;
-    Arg args[20];
-    int n;
-    XmString xmstr;
-
-    n = 0;
-    top = XmCreateForm(owner, "form", args, n);
-    if (labelstr && *labelstr){
-        xmstr = XmStringCreateLocalized(labelstr);
-        n = 0;
-        XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM);  n++;
-        XtSetArg(args[n], XmNlabelString, xmstr);  n++;
-        label = XmCreateLabelGadget(top, "label", args, n);
-        XtManageChild(label);
-        XmStringFree(xmstr);
-
-        n = 0;
-        XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET);  n++;
-        XtSetArg(args[n], XmNtopWidget, label);  n++;
-    }
-    else{
-        n = 0;
-        XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM);  n++;
-    }
-    XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM);  n++;
-    XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM);  n++;
-    XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM);  n++;
-    XtSetArg(args[n], XmNresizable, resource.capt_resize  );  n++;
-    XtSetArg(args[n], XmNshadowType, type);  n++;
-    XtSetArg(args[n], XmNshadowThickness , thickness);  n++;
-    XtSetArg(args[n], XmNleftOffset, resource.capt_lftoff );  n++;
-    XtSetArg(args[n], XmNtopOffset, resource.capt_topoff );  n++;
-    XtSetArg(args[n], XmNrightOffset, resource.capt_rghoff );  n++;
-    frame = XmCreateFrame(top, "frame", args, n);
-    XtManageChild(frame);
-    XtManageChild(top);
-    return(frame);
-}
-
-/*
- *
- *     create pix button
- *
- */
-
-Widget
-CreatePixButton(owner, name, data)
-Widget owner;
-String name;
-RadioButt *data;
-{
-    Arg args[20];
-    int i, n;
-    Pixmap mask;
-    XpmAttributes attr;
-    Pixmap pix[NUMPIX];
-    Widget top;
-    Display *disp;
-    Window root;
-
-    disp = XtDisplay(owner);
-    root = DefaultRootWindow(disp);
-
-    n = 0;
-    XtSetArg(args[n], XmNborderWidth, 1); n++;
-    XtSetArg(args[n], XmNradioAlwaysOne, TRUE); n++;
-    XtSetArg(args[n], XmNradioBehavior, TRUE); n++;
-    top = XmCreateRowColumn(owner, name, args, n);
-
-    attr.valuemask = 0;
-
-    ReadXpm(disp, root, Pencil, &pix[0], &mask, &attr);
-    ReadXpm(disp, root, Line, &pix[1], &mask, &attr);
-    ReadXpm(disp, root, Rectangle, &pix[2], &mask, &attr);
-    ReadXpm(disp, root, Circle, &pix[3], &mask, &attr);
-    ReadXpm(disp, root, Eraser, &pix[4], &mask, &attr);
-    ReadXpm(disp, root, SelectArea, &pix[5], &mask, &attr);
-
-    for (i=0; i < NUMPIX; i++) {
-       n = 0;
-       XtSetArg(args[n], XmNlabelType, XmPIXMAP); n++;
-       XtSetArg(args[n], XmNlabelPixmap, pix[i]); n++;
-       XtSetArg(args[n], XmNindicatorOn, False); n++;
-       XtSetArg(args[n], XmNshadowThickness, 2); n++;
-       XtSetArg(args[n], XmNfillOnSelect, False); n++;
-       XtSetArg(args[n], XmNset, data->items[i].set); n++;
-       XtSetArg(args[n], XmNwidth, 36); n++;
-       XtSetArg(args[n], XmNheight, 36); n++;
-       data->items[i].w = XmCreateToggleButton(top, data->items[i].name, args, n);
-       XtManageChild(data->items[i].w);
-       XtAddCallback(data->items[i].w, XmNvalueChangedCallback,
-                                data->items[i].cb, data->items[i].clientdata);
-    }
-    XtManageChild(top);
-    return(top);
-}
-
-
-/*
- *
- *     returns the value what the text field has 
- *
- */
-
-#ifdef _HPUX_SOURCE
-String
-#else
-XtPointer
-#endif
-GetTextFieldValue(textf)
-TextField *textf;
-{
-    char *s1, *s2, *s3;
-    if (textf->w2 == NULL) {
-           XtVaGetValues(textf->w1, XmNvalue, &s1, NULL);
-           return(s1);
-    } else {
-       if (XtIsSensitive(textf->w2)) {
-           XtVaGetValues(textf->w1, XmNvalue, &s1, NULL);
-           XtVaGetValues(textf->w2, XmNvalue, &s2, NULL);
-           s3 = (char *) XtMalloc(strlen(s1) + strlen(s2) + 2);
-           strcpy(s3, s1);
-           strcat(s3, "-");
-           strcat(s3, s2);
-           XtFree(s1);
-           XtFree(s2);
-           return(s3);
-       } else {
-           XtVaGetValues(textf->w1, XmNvalue, &s1, NULL);
-           return(s1);
-       }
-    }
-}
-
-/*ARGSUSED*/
-static void
-arrow_change(w, data)
-TextField *data;
-{
-    if (XtIsSensitive(data->w2)) {
-       XtSetSensitive(data->w2, False);
-    } else {
-       XtSetSensitive(data->w2, True);
-    }
-}
-
-static Widget          focus_widget=NULL;
-extern char            AreaStr[160];
-extern FalFontData     fullFontData;
-
-static void
-focus(w)
-Widget w;
-{
-    focus_widget = w;
-}
-
-static void
-code_input()
-{
-    extern void CodeWindow();
-    CodeWindow(focus_widget, fullFontData.xlfdname, False);
-}
-
-/*ARGSUSED*/
-void
-CreateTextField(owner, name, labelstr, data, maxlength)
-Widget owner;
-String name;
-String labelstr;
-TextField *data;
-int maxlength;
-{
-    Widget             row, label, arrow, textfield, code;
-    Arg                        args[20];
-    register int       n;
-    Display            *disp;
-    Window             root;
-    Pixmap             mask;
-    XpmAttributes      attr;
-    XmString           xms;
-    extern Pixmap      arrow_pix;
-
-    n = 0;
-    XtSetArg(args[n], XmNorientation, (XtArgVal)XmHORIZONTAL); n++;
-    row = XmCreateRowColumn(owner, "row", args, n);
-    XtManageChild(row);
-
-    n = 0;
-    xms = XmStringCreateLocalized(labelstr);
-    XtSetArg(args[n], XmNlabelString, xms);  n++;
-    label = XmCreateLabelGadget(row, "label", args, n);
-    XtManageChild(label);
-    XmStringFree(xms);
-
-    n = 0;
-    XtSetArg(args[n], XmNcolumns, maxlength);  n++;
-    XtSetArg(args[n], XmNmaxLength, maxlength);  n++;
-    data->w1 = focus_widget = textfield =
-                               XmCreateText(row, "textField", args, n);
-    XtManageChild(textfield);
-    XtAddCallback(textfield, XmNfocusCallback, (XtCallbackProc)focus, NULL);
-
-    if (! arrow_pix) {
-       disp = XtDisplay(row);
-       root = DefaultRootWindow(disp);
-       attr.valuemask = 0;
-       ReadXpm(disp, root, arrow_pm, &arrow_pix, &mask, &attr);
-    }
-
-    n = 0;
-    XtSetArg(args[n], XmNlabelPixmap, arrow_pix);  n++;
-    XtSetArg(args[n], XmNlabelType, XmPIXMAP); n++;
-    XtSetArg(args[n], XmNindicatorOn, False); n++;
-    XtSetArg(args[n], XmNshadowThickness, 2); n++;
-    XtSetArg(args[n], XmNfillOnSelect, False); n++;
-    XtSetArg(args[n], XmNhighlightThickness, 0); n++;
-    arrow = XmCreateToggleButton(row, "arrow", args, n);
-    XtManageChild(arrow);
-    XtAddCallback(arrow, XmNvalueChangedCallback,
-                               (XtCallbackProc)arrow_change, (XtPointer)data);
-
-    n = 0;
-    XtSetArg(args[n], XmNcolumns, maxlength );  n++;
-    XtSetArg(args[n], XmNmaxLength, maxlength);  n++;
-    data->w2 = textfield = XmCreateText(row, "textField", args, n);
-    XtManageChild(textfield);
-    XtSetSensitive(textfield, False);
-    XtAddCallback(textfield, XmNfocusCallback, (XtCallbackProc)focus, NULL);
-
-    n = 0;
-    xms = XmStringCreateLocalized(resource.code) ;
-    XtSetArg(args[n], XmNlabelString, xms); n++;
-    XtSetArg(args[n], XmNhighlightThickness, 0); n++;
-    code = XmCreatePushButton(row, "Code", args, n);
-    XtManageChild(code);
-    XmStringFree(xms);
-
-    XtAddCallback(code, XmNactivateCallback,
-                       (XtCallbackProc)code_input, (XtPointer)textfield);
-}
-
-
-void
-#if __STDC__
-CreateMenuButtons( Widget owner, Button *buttons, int buttons_cnt )
-#else
-CreateMenuButtons( owner, buttons, buttons_cnt )
-Widget owner;
-Button *buttons;
-int            buttons_cnt;
-#endif
-{
-    Arg args[4];
-    char buf[64];
-    XmString xms;
-    int i, n;
-
-#define LABEL(x)       (buttons->items[(x)].label)
-#define NMNIC(x)       (buttons->items[(x)].mnemonic)
-#define SENS(x)        (buttons->items[(x)].sensitive)
-
-    buttons->w = (Widget *) malloc(sizeof(Widget)*buttons_cnt);
-
-    if (buttons->w) {
-       for (i=0; i<buttons_cnt; i++) {
-           if (LABEL(i) && *((char *) LABEL(i))){
-               n=0;
-               if (strchr(LABEL(i), NMNIC(i))){
-                   sprintf(buf, "%s", LABEL(i));
-               }else{
-                   sprintf(buf, "%s(%ld)", LABEL(i), NMNIC(i));
-               }
-               xms = XmStringCreateLocalized(buf);
-               XtSetArg(args[n],XmNlabelString, xms); n++;
-               XtSetArg(args[n],XmNmnemonic, NMNIC(i)); n++;
-               XtSetArg(args[n],XmNsensitive, SENS(i)); n++;
-               buttons->w[i] =
-               XmCreatePushButtonGadget(owner, "button", args, n);
-               if (buttons->items[i].cb){
-                   XtAddCallback(buttons->w[i], XmNactivateCallback,
-                           buttons->items[i].cb, buttons->items[i].clientdata);
-               }
-               XmStringFree(xms);
-           } else{
-               n = 0;
-               XtSetArg(args[n], XmNseparatorType, XmSHADOW_ETCHED_IN); n++;
-               XtSetArg(args[n], XmNmargin, resource.menu_margin );  n++;
-               buttons->w[i] = XmCreateSeparatorGadget(owner,
-                                                       "separater", args, n);
-           }
-           XtManageChild(buttons->w[i]);
-       }
-    }
-#undef LABEL
-#undef NMNIC
-#undef SENS
-}
-
-static Atom
-DeleteWindowAtom()
-{
-    static Atom delatom = 0;
-    if (! delatom){
-       delatom = XInternAtom(XtDisplayOfObject(toplevel),
-               "WM_DELETE_WINDOW", False);
-    }
-    return(delatom);
-}
-
-/*ARGSUSED*/
-Widget
-#if __STDC__
-CreateDialogAndButtons( Widget owner, String name, 
-       void (*delcb)(), Button *btns, int btns_cnt, Widget *pop )
-#else
-CreateDialogAndButtons( owner, name, delcb, btns, btns_cnt, pop )
-Widget owner;
-String name;
-void   (*delcb)();
-Button *btns;
-int    btns_cnt;
-Widget *pop;
-#endif
-{
-    int                n;
-    Arg                args[32];
-    Arg arg[8];
-    Widget     rowcol;
-    XmString   cs1, cs2, cs3;
-
-    n = 0;
-    XtSetArg( args[n], XmNautoUnmanage, resource. dia_tm_automng );    n++;
-    XtSetArg( args[n], XmNmarginWidth, resource.dia_tm_width  );       n++;
-    XtSetArg( args[n], XmNmarginHeight, resource.dia_tm_height  );     n++;
-    if (btns->itemcnt > 0){
-       cs1 = XmStringCreateLocalized(btns->items[0].label);
-       XtSetArg(args[n], XmNokLabelString, cs1);  n++;
-    }
-    if (btns->itemcnt > 1){
-       cs2 = XmStringCreateLocalized(btns->items[1].label);
-       XtSetArg(args[n], XmNcancelLabelString, cs2);  n++;
-    }
-    if (btns->itemcnt > 2){
-       cs3 = XmStringCreateLocalized(btns->items[2].label);
-       XtSetArg(args[n], XmNhelpLabelString, cs3);  n++;
-    }
-    XtSetArg(args[n], XmNnoResize, resource.dia_tm_resize  );  n++;
-    XtSetArg(args[n], XmNminimizeButtons, resource.dia_tm_minimize  );  n++;
-    XtSetArg(args[n], XmNtitle, name  );  n++;
-    *pop = XmCreateTemplateDialog(toplevel, "dialog", args, n);
-    if (delcb)
-       XmAddWMProtocolCallback(XtParent(*pop),
-                       DeleteWindowAtom(), delcb, 0);
-    n = 0;
-    XtSetArg( arg[n], XmNmarginWidth, resource.dia_rw_width );   n++;
-    XtSetArg( arg[n], XmNmarginHeight, resource.dia_rw_height );  n++;
-    XtSetArg( arg[n], XmNspacing, resource.dia_rw_spacing  ); n++;
-    XtSetArg( arg[n], XmNorientation, XmVERTICAL);  n++;
-    rowcol = XmCreateRowColumn( *pop, "RowCol", arg, n);
-    XtManageChild(rowcol);
-    if (btns->itemcnt > 0){
-       if (! btns->items[0].cb)
-           XtAddCallback(*pop, XmNokCallback, _unmap, 0);
-       XtAddCallback(*pop, XmNokCallback, btns->items[0].cb,
-         (btns->items[0].clientdata != NULL) ? btns->items[0].clientdata : 0);
-    }
-    if (btns->itemcnt > 1){
-       if (! btns->items[1].cb)
-           XtAddCallback(*pop, XmNcancelCallback, _unmap, 0);
-       XtAddCallback(*pop, XmNcancelCallback, btns->items[1].cb,
-         (btns->items[1].clientdata != NULL) ? btns->items[1].clientdata : 0);
-    }
-    if (btns->itemcnt > 2){
-       if (! btns->items[2].cb)
-           XtAddCallback(*pop, XmNhelpCallback, _unmap, 0);
-       XtAddCallback(*pop, XmNhelpCallback, btns->items[2].cb,
-         (btns->items[2].clientdata != NULL) ? btns->items[2].clientdata : 0);
-    }
-    n = 0;
-    XtSetValues(*pop, args, n);
-    if (btns->itemcnt == 1){
-       XmStringFree(cs1);
-    }
-    else if (btns->itemcnt == 2){
-       XmStringFree(cs1);
-       XmStringFree(cs2);
-    }
-    else if (btns->itemcnt == 3){
-       XmStringFree(cs1);
-       XmStringFree(cs2);
-       XmStringFree(cs3);
-    }
-    return(rowcol);
-}
-
-
-/* Initialize GUI */
-
-Widget
-GuiInitialize(app, class_name, ac, av)
-XtAppContext *app;
-String class_name;
-int *ac;
-String av[];
-{
-       Widget top;
-
-       XtSetLanguageProc(NULL, NULL, NULL);
-       _DtEnvControl(0);
-
-       top = XtAppInitialize(app, class_name, NULL,0, ac,av, NULL,NULL,0);
-
-       return(top);
-}
-
-Widget
-CreateDrawingArea( owner, name, width, height, proc, val )
-Widget owner;
-String name;
-int width;
-int height;
-void (*proc)();
-int val;
-{
-       int n;
-       Arg arg[16];
-       Widget drawarea;
-
-       n = 0;
-       XtSetArg(arg[n], XmNwidth, width); n++;
-       XtSetArg(arg[n], XmNheight, height); n++;
-       XtSetArg(arg[n], XmNresizePolicy, XmRESIZE_NONE); n++;
-       XtSetArg(arg[n], XmNborderWidth, resource.draw_border); n++;
-       XtSetArg(arg[n], XmNbackground, resource.pane_background); n++;
-       XtSetArg(arg[n], XmNtopAttachment, (XtArgVal)XmATTACH_FORM); n++;
-       XtSetArg(arg[n], XmNleftAttachment, (XtArgVal)XmATTACH_FORM); n++;
-       XtSetArg(arg[n], XmNtopOffset, (XtArgVal)resource.draw_topoff); n++;
-       XtSetArg(arg[n], XmNleftOffset, (XtArgVal)resource.draw_lftoff); n++;
-       drawarea = XmCreateDrawingArea(owner, name, arg, n);
-       XtManageChild( drawarea );
-       XtAddEventHandler(drawarea, ExposureMask, FALSE, proc, (XtPointer) (intptr_t) val);
-       return(drawarea);
-}
-
-
-#ifndef        USE_MACRO
-
-void
-AddLeftAttachWidget( w, ref, offset )
-Widget w;
-Widget ref;
-int offset;
-{
-    XtVaSetValues( w,
-    XmNleftAttachment, XmATTACH_WIDGET,
-    XmNleftWidget, ref,
-    XmNleftOffset, offset,
-    NULL);
-}
-
-void
-AddLeftAttachForm( w, offset )
-Widget w;
-int offset;
-{
-    XtVaSetValues( w,
-    XmNleftAttachment, XmATTACH_FORM,
-    XmNleftOffset, offset,
-    NULL);
-}
-
-void
-AddTopAttachWidget( w, ref, offset )
-Widget w;
-Widget ref;
-int offset;
-{
-    XtVaSetValues( w,
-    XmNtopAttachment, XmATTACH_WIDGET,
-    XmNtopWidget, ref,
-    XmNtopOffset, offset,
-    NULL);
-}
-
-void
-AddTopAttachForm( w, offset )
-Widget w;
-int offset;
-{
-    XtVaSetValues( w,
-    XmNtopAttachment, XmATTACH_FORM,
-    XmNtopOffset, offset,
-    NULL);
-}
-
-void
-AddRightAttachWidget( w, ref, offset )
-Widget w;
-Widget ref;
-int offset;
-{
-    XtVaSetValues( w,
-    XmNrightAttachment, XmATTACH_WIDGET,
-    XmNrightWidget, ref,
-    XmNrightOffset, offset,
-    NULL);
-}
-
-void
-AddRightAttachForm( w, offset )
-Widget w;
-int offset;
-{
-    XtVaSetValues( w,
-    XmNrightAttachment, XmATTACH_FORM,
-    XmNrightOffset, offset,
-    NULL);
-}
-
-void
-AddBottomAttachForm( w, offset )
-Widget w;
-int offset;
-{
-    XtVaSetValues( w,
-    XmNbottomAttachment, XmATTACH_FORM,
-    XmNbottomOffset, offset,
-    NULL);
-}
-#endif /* not USE_MACRO */
-
-void
-PopupDialog(w)
-Widget w;
-{
-    if (! XtIsManaged(w))
-       XtManageChild(w);
-    else
-       XRaiseWindow(XtDisplayOfObject(w), XtWindow(XtParent(w)));
-}
-
-void
-PopdownDialog(w)
-Widget w;
-{
-    if (XtIsManaged(w)){
-       XtUnmanageChild(w);
-    }
-}
-
-void
-ForcePopdownDialog(w)
-Widget w;
-{
-    if (XtIsManaged(w)){
-       XtUnmanageChild(w);
-    }
-}
-
-void
-SetLabelString(w, str)
-Widget w;
-String str;
-{
-    XmString cs;
-    cs = XmStringCreateLocalized(str);
-    XtVaSetValues( w, XmNlabelString, cs, NULL);
-    XmStringFree( cs );
-}
-
-void
-SetFooterString(w, str)
-Widget w;
-String str;
-{
-    XmString cs;
-    cs = XmStringCreateLocalized(str);
-    XtVaSetValues( w, XmNlabelString, cs, NULL);
-    XmStringFree( cs );
-       XmUpdateDisplay(w);
-}
-
-
-/***********************************************************************
- create and pop up the confirmaiton window 
- **********************************************************************/
-
-static Widget notice=NULL;
-
-static void
-format_str(st, charcnt , str)
-Widget st;
-int    charcnt ;
-char *str;
-{
-       int i ;
-       char *s, *p;
-       static char buf[512];
-       int lw;
-       int len ;
-       wchar_t wc ;
-        XmString cs;
-
-       if (! str || ! *str)    return;
-               
-       for( p=str, s=buf, lw=0; *p != 0;  ){
-
-               if ( (*p == '\n') || (charcnt <= lw) ){
-                       *s = '\n';      /* new line */
-                       lw = 0;
-                       s++;
-               }
-                if( (len = mbtowc( &wc, p, MB_CUR_MAX )) <= 0 ) break;
-                for( i=0; i<len ; i++, s++, p++ )  *s = *p ;
-
-                lw += wcwidth( wc );
-       }
-       *s = 0;
-
-       cs = XmStringCreateLocalized(buf);
-       XtVaSetValues(st, XmNlabelString, (XtArgVal)cs, (String)0 );
-       XmStringFree(cs);
-}
-
-void _unmap()
-{
-       if (notice && XtIsManaged(notice)){
-               XtUnmanageChild(notice);
-       }
-}
-
-static void _destroy(w)
-Widget w;
-{
-       if (w){
-               XtDestroyWidget(w);
-       }
-       if (w == notice){
-               notice = NULL;
-       }
-}
-
-
-/*ARGSUSED*/
-void
-PopupNotice( owner, message, type, button, do_format, title )
-Widget owner;
-char *message;
-unsigned char type;
-NButton *button;
-Boolean do_format;
-String title;
-{
-    Widget     label, help, cancel;
-    int                n;
-    Arg                args[32];
-    XmString cs1, cs2, cs3;
-
-    n = 0;
-    XtSetArg(args[n], XmNtitle, title ); n++;
-    XtSetArg(args[n], XmNnoResize, resource.pop_resize  ); n++;
-    XtSetArg(args[n], XmNminimizeButtons, resource.pop_minimize ); n++;
-    XtSetArg(args[n], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); n++;
-    XtSetArg(args[n], XmNdialogType, type);  n++;
-    notice = XmCreateMessageDialog( toplevel , "PopupNotice", args, n);
-    n = 0;
-    if (button->itemcnt > 0){
-       cs1 = XmStringCreateLocalized(button->items[0].label);
-       XtSetArg(args[n], XmNokLabelString, cs1);  n++;
-       if (button->items[0].cb)
-           XtAddCallback(notice, XmNokCallback, button->items[0].cb, NULL);
-       cancel = XmMessageBoxGetChild(notice, XmDIALOG_CANCEL_BUTTON);
-       help = XmMessageBoxGetChild(notice, XmDIALOG_HELP_BUTTON);
-    }
-    if (button->itemcnt > 1){
-       cs2 = XmStringCreateLocalized(button->items[1].label);
-       XtSetArg(args[n], XmNcancelLabelString, cs2);  n++;
-       if (button->items[1].cb)
-           XtAddCallback(notice, XmNcancelCallback, button->items[1].cb, NULL);
-    }
-    if (button->itemcnt > 2){
-       cs3 = XmStringCreateLocalized(button->items[2].label);
-       XtSetArg(args[n], XmNhelpLabelString, cs3);  n++;
-       if (button->items[2].cb)
-           XtAddCallback(notice, XmNhelpCallback, button->items[2].cb, NULL);
-       XtAddCallback(help, XmNactivateCallback, (XtCallbackProc)_unmap, NULL);
-    }
-    XtSetValues(notice, args, n);
-    XtAddCallback(notice, XmNunmapCallback, (XtCallbackProc)_destroy, NULL);
-    if (button->itemcnt == 1){
-       XmStringFree(cs1);
-       XtUnmanageChild(cancel);
-       XtUnmanageChild(help);
-    }
-    else if (button->itemcnt == 2){
-       XmStringFree(cs1);
-       XmStringFree(cs2);
-       XtUnmanageChild(help);
-    }
-    else if (button->itemcnt == 3){
-       XmStringFree(cs1);
-       XmStringFree(cs2);
-       XmStringFree(cs3);
-    }
-
-    label = XmMessageBoxGetChild(notice, XmDIALOG_MESSAGE_LABEL);
-
-    if (do_format)
-       format_str(label, 52, message);
-    else{
-       cs1 = XmStringCreateLocalized(message);
-       XtVaSetValues(notice,
-           XmNmessageString, (XtArgVal) cs1, (String) 0);
-       XtVaSetValues(notice,
-           XmNmessageAlignment, XmALIGNMENT_CENTER, (String) 0);
-       XmStringFree(cs1);
-    }
-    XtManageChild(notice);
-    XBell(XtDisplayOfObject( toplevel ), 0);
-}
-
-
-/*ARGSUSED*/
-static void
-_layout_centerEH(w, clientdata)
-Widget w;
-XtPointer clientdata;
-{
-    Widget *child;
-    int num;
-    Dimension bbw, mw, sw, cw;
-
-
-    XtVaGetValues(w, XmNchildren, &child, XmNnumChildren, &num, NULL);
-    XtVaGetValues(XtParent(w),
-       XmNwidth, &bbw,
-       XmNmarginWidth, &mw,
-       XmNshadowThickness, &sw,
-       NULL);
-    XtVaGetValues(child[0], XmNwidth, &cw, NULL);
-    XtVaSetValues(w, XmNwidth, ((int)bbw-2*((int)mw+(int)sw)), NULL);
-    XtVaSetValues(child[0], XmNx,
-                       ((((int)bbw-2*((int)mw+(int)sw))-(int)cw)/2), NULL);
-}
-
-/*ARGSUSED*/
-Widget
-CreateTemplateDialog( w, message, type, button, title, pop )
-Widget w;
-char *message;
-unsigned char type;
-NButton *button;
-String title;
-Widget *pop;
-{
-    int                n;
-    Arg                args[32];
-    XmString   cs, cs1=NULL, cs2=NULL, cs3=NULL;
-    Widget     brtnb;
-
-    n = 0;
-    cs = XmStringCreateLocalized(message);
-    XtSetArg(args[n], XmNnoResize, resource.temp_resize );  n++;
-    XtSetArg(args[n], XmNminimizeButtons, resource.temp_minimize );  n++;
-    XtSetArg(args[n], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); n++;
-    XtSetArg(args[n], XmNmessageString, cs);  n++;
-    XtSetArg(args[n], XmNmessageAlignment, XmALIGNMENT_CENTER);  n++;
-    XtSetArg(args[n], XmNtitle, title ); n++;
-
-    if (button->itemcnt > 0){
-       cs1 = XmStringCreateLocalized(button->items[0].label);
-       XtSetArg(args[n], XmNokLabelString, cs1);  n++;
-    }
-    if (button->itemcnt > 1){
-       cs2 = XmStringCreateLocalized(button->items[1].label);
-       XtSetArg(args[n], XmNcancelLabelString, cs2);  n++;
-    }
-    if (button->itemcnt > 2){
-       cs3 = XmStringCreateLocalized(button->items[2].label);
-       XtSetArg(args[n], XmNhelpLabelString, cs3);  n++;
-    }
-    *pop = XmCreateTemplateDialog(w, "TemplateDialog", args, n);
-    if (button->itemcnt > 0 && button->items[0].cb)
-       XtAddCallback(*pop, XmNokCallback, button->items[0].cb, NULL);
-    if (button->itemcnt > 1 && button->items[1].cb)
-       XtAddCallback(*pop, XmNcancelCallback, button->items[1].cb, NULL);
-    if (button->itemcnt > 2 && button->items[2].cb)
-       XtAddCallback(*pop, XmNhelpCallback, button->items[2].cb, NULL);
-
-    XmStringFree(cs);
-    if (cs1) XmStringFree(cs1);
-    if (cs2) XmStringFree(cs2);
-    if (cs3) XmStringFree(cs3);
-
-    XtAddCallback(*pop, XmNunmapCallback, (XtCallbackProc)_destroy, NULL);
-    n = 0;
-    XtSetArg(args[n], XmNwidth, resource.temp_width );  n++;
-    XtSetArg(args[n], XmNheight, resource.temp_height );  n++;
-    brtnb = XmCreateBulletinBoard(*pop, "BulletinBo", args, n);
-    XtManageChild(brtnb);
-    XtAddEventHandler(brtnb,
-       StructureNotifyMask, True, (XtEventHandler)_layout_centerEH, NULL);
-    return(brtnb);
-}
-
-
-
-
-void
-AddDeleteProc(w, delcb)
-Widget w;
-void (*delcb)();
-{
-       Atom del = DeleteWindowAtom();
-       XmAddWMProtocols( w, &del, 1);
-       XmAddWMProtocolCallback( w, del, delcb, NULL );
-}
-
-void
-AddPopupProc(w, popupcb)
-Widget w;
-void (*popupcb)();
-{
-    XtAddCallback(XtParent(w), XmNpopupCallback, popupcb, 0);
-}
-
-void
-AddDestroyProc(w, destroycb)
-Widget w;
-void (*destroycb)();
-{
-    XtAddCallback(XtParent(w), XmNdestroyCallback, destroycb, 0);
-}
-
-Widget
-CreateMenuBarAndFooterMessageForm(owner, name, buttons, bcnt, pop, footer)
-Widget owner;
-String name;
-MButton *buttons;
-int bcnt;
-Widget *pop;
-Widget *footer;
-{
-    Widget menuBar, form;
-    Widget footerFrame, footerForm, footerLabel, sep, casBtn, baseForm;
-    XmString cs;
-    char buf[64];
-    Arg arg[20];
-    int n, i;
-
-    n = 0;
-    XtSetArg( arg[n], XmNiconName, name ); n++;
-    XtSetArg( arg[n], XmNdeleteResponse, XmUNMAP ); n++;
-    XtSetArg( arg[n], XmNmwmFunctions,
-               (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE | MWM_FUNC_CLOSE)); n++;
-    *pop = XtCreatePopupShell(name, applicationShellWidgetClass, owner, arg, n);
-
-    n = 0;
-    XtSetArg( arg[n], XmNshowSeparator, True ); n++;
-    form = XmCreateMainWindow( *pop, "MainW", arg, n);
-    XtManageChild(form);
-
-    n = 0;
-    menuBar = XmCreateMenuBar( form, "menuBar", arg, n);
-    XtManageChild(menuBar);
-
-    n = 0;
-    baseForm = XmCreateForm( form, "wgeForm", arg, n);
-    XtManageChild(baseForm);
-
-    for (i=0; i<bcnt; i++){
-        n = 0;
-       XtSetArg(arg[n], XmNtearOffModel, XmTEAR_OFF_ENABLED);  n++;
-       buttons->items[i].menu =
-       XmCreatePulldownMenu(menuBar, "menu", arg, n);
-       n = 0;
-       if (strchr(buttons->items[i].label, buttons->items[i].mnemonic)){
-           sprintf(buf, "%s", buttons->items[i].label);
-       }else{
-           snprintf(buf, sizeof(buf), "%s(%s)", buttons->items[i].label, &(buttons->items[i].mnemonic));
-       }
-       cs = XmStringCreateLocalized(buf);
-       XtSetArg(arg[n],XmNmnemonic, buttons->items[i].mnemonic ); n++;
-       XtSetArg(arg[n],XmNlabelString, cs ); n++;
-       XtSetArg(arg[n],XmNsubMenuId,   buttons->items[i].menu ); n++;
-       casBtn = XmCreateCascadeButton( menuBar, "casBtnA", arg, n);
-       XtManageChild(casBtn);
-       XmStringFree(cs);
-    }
-
-    n = 0;
-    XtSetArg( arg[n], XmNshadowType,       XmSHADOW_IN ); n++;
-    footerFrame = XmCreateFrame( form, "footerFrame", arg, n);
-    XtManageChild(footerFrame);
-    XtVaSetValues(form, XmNmessageWindow, footerFrame, NULL);
-
-    n = 0;
-    XtSetArg( arg[n], XmNtopAttachment,    XmATTACH_FORM); n++;
-    XtSetArg( arg[n], XmNbottomAttachment, XmATTACH_FORM); n++;
-    XtSetArg( arg[n], XmNleftAttachment,   XmATTACH_FORM); n++;
-    XtSetArg( arg[n], XmNrightAttachment,  XmATTACH_FORM); n++;
-    footerForm = XmCreateForm( footerFrame, "footerForm", arg, n);
-    XtManageChild(footerForm);
-
-    n = 0;
-    cs = XmStringCreateLocalized(resource.message);
-    XtSetArg( arg[n], XmNlabelString,      cs); n++;
-    XtSetArg( arg[n], XmNtopAttachment,    XmATTACH_FORM); n++;
-    XtSetArg( arg[n], XmNbottomAttachment, XmATTACH_FORM); n++;
-    XtSetArg( arg[n], XmNleftAttachment,   XmATTACH_FORM); n++;
-    XtSetArg( arg[n], XmNmarginTop,    resource.ed_msg_margintop );  n++;
-    XtSetArg( arg[n], XmNmarginBottom, resource.ed_msg_marginbtm );  n++;
-    footerLabel = XmCreateLabel(footerForm, "Message", arg,n);
-    XtManageChild(footerLabel);
-    XmStringFree(cs);
-
-    n = 0;
-    cs = XmStringCreateLocalized("");
-    XtSetArg( arg[n], XmNtopAttachment,    XmATTACH_FORM); n++;
-    XtSetArg( arg[n], XmNbottomAttachment, XmATTACH_FORM); n++;
-    XtSetArg( arg[n], XmNrightAttachment,  XmATTACH_FORM); n++;
-    XtSetArg( arg[n], XmNleftAttachment,   XmATTACH_WIDGET); n++;
-    XtSetArg( arg[n], XmNleftWidget,   footerLabel); n++;
-    XtSetArg( arg[n], XmNalignment,    XmALIGNMENT_BEGINNING);  n++;
-    XtSetArg( arg[n], XmNmarginTop,    resource.ed_mesg_margintop );  n++;
-    XtSetArg( arg[n], XmNmarginBottom, resource.ed_mesg_marginbtm );  n++;
-    XtSetArg( arg[n], XmNlabelString, cs);  n++;
-    *footer = XmCreateLabelGadget(footerForm, "MessageG", arg, n);
-    XtManageChild(*footer);
-    XmStringFree(cs);
-
-    return(baseForm);
-}
-
-Widget
-GetMenuWidget( buttons, buttons_num )
-MButton *buttons;
-int buttons_num;
-{
-    return(buttons->items[buttons_num].menu);
-}
-
-Widget
-CreateForm( owner, name )
-Widget owner;
-String name;
-{
-       Widget form;
-       int n;
-       Arg arg[8];
-
-       n=0;
-       form = XmCreateForm( owner, name, arg, n );
-       XtManageChild(form);
-       return(form);
-}
-
-/*ARGSUSED*/
-Widget
-CreateLabel( owner, name, str )
-Widget owner;
-String name;
-String str;
-{
-       Widget label;
-       Arg arg[2];
-       int n=0;
-       XmString cs = XmStringCreateLocalized(str);
-       XtSetArg( arg[n], XmNlabelString, cs); n++;
-       label = XmCreateLabel( owner, "label", arg, n);
-       XtManageChild(label);
-       return(label);
-}
-
-
-/*ARGSUSED*/
-Widget
-CreateFrame(owner, name, type, thickness)
-Widget owner;
-String name;
-XtPointer type;
-XtPointer thickness;
-{
-       Widget frame;
-       Arg args[20];
-       int n;
-
-       n = 0;
-       XtSetArg(args[n], XmNresizable, resource.frame_resize );  n++;
-       XtSetArg(args[n], XmNshadowType, type);  n++;
-       XtSetArg(args[n], XmNshadowThickness , thickness);  n++;
-       frame = XmCreateFrame(owner, "frame", args, n);
-       XtManageChild(frame);
-       return(frame);
-}
-
-/*ARGSUSED*/
-Widget
-CreateRowColumn(owner, name, layout, space, marginw, marginh)
-Widget owner;
-String name;
-int layout;
-int space;
-int marginw;
-int marginh;
-{
-       Widget rc;
-       Arg args[20];
-       int n;
-
-       n = 0;
-       XtSetArg(args[n], XmNorientation, layout);  n++;
-       XtSetArg(args[n], XmNspacing, space);  n++;
-       XtSetArg(args[n], XmNmarginWidth, marginw);  n++;
-       XtSetArg(args[n], XmNmarginHeight, marginh);  n++;
-       rc = XmCreateRowColumn(owner, "rowColumn", args, n);
-       XtManageChild(rc);
-       return(rc);
-}
-
-/*ARGSUSED*/
-Widget
-CreateScrollBar( owner, name, height, val, min, max, proc )
-Widget owner;
-String name;
-int height;
-int val;
-int min;
-int max;
-void (*proc)();
-{
-    Widget sc;
-    int n;
-    Arg arg[16];
-
-    n = 0;
-    XtSetArg( arg[n], XmNsliderSize, (XtArgVal)val );  n++;
-    XtSetArg( arg[n], XmNpageIncrement, (XtArgVal)val );   n++;
-    XtSetArg( arg[n], XmNmaximum,        (XtArgVal)max );        n++;
-
-    sc = XmCreateScrollBar(owner, "wgeScro", arg, n);
-    XtManageChild( sc );
-    XtAddCallback( sc, XmNvalueChangedCallback, proc, NULL );
-    return(sc);
-}
-
-
-/*ARGSUSED*/
-static void
-_scbase_cb( w, proc, calldata )
-Widget w;
-void (*proc)();
-XmScrollBarCallbackStruct *calldata;
-{
-    (*proc)(calldata->value);
-}
-
-Widget
-CreateScrollBase( owner, name, min, max, val, vcnt, sbproc )
-Widget owner;
-String name;
-int min;
-int max;
-int val;
-int vcnt;
-void (*sbproc)();
-{
-    int n;
-    Arg arg[16];
-    Widget base, frame, rwclm, sc;
-
-    n=0;
-    XtSetArg( arg[n], XmNwidth, resource.scll_fr_width ); n++;
-    base = XmCreateForm( owner, name, arg, n );
-    XtManageChild( base );
-    n=0;
-    XtSetArg( arg[n], XmNshadowType, XmSHADOW_IN ); n++;
-    XtSetArg( arg[n], XmNshadowThickness, resource.scll_fr_thick ); n++;
-    XtSetArg( arg[n], XmNbottomAttachment, XmATTACH_FORM ); n++;
-    frame = XmCreateFrame( base, name, arg, n );
-    XtManageChild( frame );
-    n=0;
-    rwclm = XmCreateRowColumn( frame, name, arg, n );
-    XtManageChild( rwclm );
-    if (vcnt < (max-min)){
-       n=0;
-       XtSetArg( arg[n], XmNsliderSize, vcnt ); n++;
-       XtSetArg( arg[n], XmNminimum, min ); n++;
-       XtSetArg( arg[n], XmNmaximum, max ); n++;
-       XtSetArg( arg[n], XmNvalue, val ); n++;
-       XtSetArg( arg[n], XmNleftAttachment, XmATTACH_WIDGET ); n++;
-       XtSetArg( arg[n], XmNleftWidget, rwclm ); n++;
-       XtSetArg( arg[n], XmNleftOffset, resource.scll_bar_lftoff ); n++;
-       XtSetArg( arg[n], XmNtopAttachment, XmATTACH_FORM ); n++;
-       XtSetArg( arg[n], XmNbottomAttachment, XmATTACH_FORM ); n++;
-       sc = XmCreateScrollBar( base, name, arg, n );
-       XtManageChild( sc );
-       XtAddCallback( sc, XmNvalueChangedCallback,
-                               (XtCallbackProc)_scbase_cb, (XtPointer)sbproc);
-    }
-    return( rwclm );
-}
diff --git a/cde/programs/dtudcfonted/util.h b/cde/programs/dtudcfonted/util.h
deleted file mode 100644 (file)
index a329ae4..0000000
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* util.h 1.5 - Fujitsu source for CDEnext    96/09/18 13:59:22      */
-/* $XConsortium: util.h /main/5 1996/09/19 19:42:11 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-
-extern Widget GetMenuWidget();
-extern Widget CreateFrame();
-extern Widget CreateControlArea();
-extern Widget CreateScrollBar();
-extern Widget CreateDrawingArea();
-extern Widget CreateExclusive();
-extern Widget CreateLabel();
-extern Widget CreateDialogAndButtons();
-extern
-#ifdef _HPUX_SOURCE
-String
-#else
-XtPointer
-#endif
-GetTextFieldValue();
-extern Widget CreateTemplateDialog();
-extern Widget CreateScrollBase();
-extern Widget CreateForm();
-
-#include <Xm/Xm.h>
-#include <Xm/XmStrDefs.h>
-
-Widget CreateCaptionFrame();
-#ifdef _HPUX_SOURCE
-String
-#else
-XtPointer
-#endif
-GetTextFieldValue();
-void   CreateTextField();
-void   CreateButtons();
-void   CreateMenuButtons();
-void   LayoutButtonsEH();
-Widget CreateLayoutButtons();
-Widget CreateDialogAndButtons();
-Widget GuiInitialize();
-Widget CreateDrawingArea();
-void   AddTopWidget();
-void   AddLeftAttachWidget();
-void   AddLeftAttachForm();
-void   AddTopAttachWidget();
-void   AddTopAttachForm();
-void   AddRightAttachWidget();
-void   AddRightAttachForm();
-void   AddBottomAttachForm();
-void   PopupDialog();
-void   PopdownDialog();
-void   ForcePopdownDialog();
-void   SetLabelString();
-void   SetFooterString();
-void   PopupNotice();
-void   AddDeleteProc();
-Widget CreateMenuBarAndFooterMessageForm();
-Widget GetMenuWidget();
-Widget CreateForm();
-Widget CreateLabel();
-Widget CreateFrame();
-Widget CreateRowColumn();
-Widget CreateScrollBar();
-
-
-#define MarginWidth 4
-#define RowMarginWidth 11 
-#define MarginHeight 11
-#define HeightSpace 4
-#define MinimumSpace 4
-
-/*****  Exclusive Set  *****/
-
-typedef struct _ToggleButt {
-    Widget     w;
-    char *     label;
-    XtPointer  clientdata;
-    String     name;
-    XtArgVal   sensitive;
-    XtCallbackProc     cb;
-    XtArgVal   set;
-} ToggleButt;
-
-#define EXARGS( clientdata, name, sensitive, cb, set ){ \
-               NULL, \
-    (char *)   "", \
-    (XtPointer)        clientdata, \
-               name, \
-    (XtArgVal) sensitive, \
-    (XtCallbackProc)   cb, \
-    (XtArgVal) set \
-}
-
-typedef struct _RadioButt {
-    String     label;
-    ToggleButt *items;
-    int                items_cnt;
-    String     name;
-    Widget     w;
-    XtPointer  udata;
-} RadioButt;
-
-
-#define EXCLUSIVE(a) { 0, a, XtNumber(a), 0, 0, 0 }
-
-#define ExclusiveItems         ToggleButt
-#define Exclusive              RadioButt
-
-#define SetItemLabel(b,n,l) (b)->items[(n)].label = (l)
-
-/*****  PushButton Set  *****/
-
-typedef struct _ButtonItems {
-       char *  label;
-       XtCallbackProc  cb;
-       XtPointer clientdata;
-       XtArgVal  mnemonic;
-       XtArgVal  sensitive;
-       XtArgVal  deflt;
-} ButtonItems;
-
-#define BTNARGS( cb, clientdata, mnumonic, sensitive, deflt ) { \
-       (char *) "", \
-       (XtCallbackProc) cb, \
-       (XtPointer) clientdata, \
-       (XtArgVal) mnumonic, \
-       (XtArgVal) sensitive, \
-       (XtArgVal) deflt \
-}
-
-typedef struct _Button {
-       Widget          *w;
-       ButtonItems     *items;
-       int             itemcnt;
-} Button;
-
-#define BUTTONS( items ) { 0, items, XtNumber(items) }
-
-/*****  MenuButton Set  *****/
-
-typedef struct _menuButtonItems {
-       char    *label;
-       char    mnemonic;
-       Widget  menu;
-} menuButtonItems;
-
-#define MENUBTNARGS( mnumonic ) { \
-       "",    \
-       mnumonic, \
-       NULL, \
-}
-
-typedef struct _MButton {
-       menuButtonItems *items;
-       int             itemcnt;
-} MButton;
-
-#define MBUTTONS(items) {items,XtNumber((items))}
-
-
-/*****  NoticeButton Set  *****/
-
-typedef struct _NoticeButton {
-       char    *label;
-       void    (*cb)();
-} NoticeButton;
-
-#define NBTNARGS( cb, clientdata, mnumonic, sensitive, deflt) { \
-       "",    \
-       cb,    \
-}
-
-typedef struct _NButton {
-       NoticeButton    *items;
-       int             itemcnt;
-} NButton;
-
-#define NBUTTONS(items) {items,XtNumber((items))}
-
-
-/*****  TextField Set  *****/
-
-typedef struct _TextField {
-       Widget  w1;
-       Widget  w2;
-       String  label;
-} TextField;
-
-
-/*****  Function Type  *****/
-
-#define D_WARNING      XmDIALOG_WARNING
-#define D_QUESTION     XmDIALOG_QUESTION
-#define D_ERROR                XmDIALOG_ERROR
-#define D_TEMPLATE     XmDIALOG_TEMPLATE
-#define L_VERTICAL     XmVERTICAL
-#define L_HORIZONTAL   XmHORIZONTAL
-
-
-#ifdef USE_MACRO
-#define AddLeftAttachWidget( w, ref, offset ) XtVaSetValues( w, \
-       XmNleftAttachment, XmATTACH_WIDGET, \
-       XmNleftWidget, ref, \
-       XmNleftOffset, offset, \
-       0)
-
-#define AddLeftAttachForm( w, offset ) XtVaSetValues( w, \
-       XmNleftAttachment, XmATTACH_FORM, \
-       XmNleftOffset, offset, \
-       0)
-
-#define AddTopAttachWidget( w, ref, offset ) XtVaSetValues( w, \
-       XmNtopAttachment, XmATTACH_WIDGET, \
-       XmNtopWidget, ref, \
-       XmNtopOffset, offset, \
-       0)
-
-#define AddTopAttachForm( w, offset ) XtVaSetValues( w, \
-       XmNtopAttachment, XmATTACH_FORM, \
-       XmNtopOffset, offset, \
-       0)
-
-#define AddRightAttachWidget( w, ref, offset ) XtVaSetValues( w, \
-       XmNrightAttachment, XmATTACH_WIDGET, \
-       XmNrightWidget, ref, \
-       XmNrightOffset, offset, \
-       0)
-
-#define AddRightAttachForm( w, offset ) XtVaSetValues( w, \
-       XmNrightAttachment, XmATTACH_FORM, \
-       XmNrightOffset, offset, \
-       0)
-
-#define AddBottomAttachForm( w, offset ) XtVaSetValues( w, \
-       XmNbottomAttachment, XmATTACH_FORM, \
-       XmNbottomOffset, offset, \
-       0)
-#endif /* USE_MACRO */
diff --git a/cde/programs/dtudcfonted/xoakufont.h b/cde/programs/dtudcfonted/xoakufont.h
deleted file mode 100644 (file)
index a3cc7de..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* xoakufont.h 1.4 - Fujitsu source for CDEnext    96/05/30 11:20:56      */
-/* $XConsortium: xoakufont.h /main/4 1996/06/25 20:17:03 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-
-#include "fssxeg.h"
-
-extern Widget   CreateOblB();
-extern Widget   CreateOblBG();
-extern Widget   CreateToglBG();
-extern Widget   CreateToglB();
-extern Widget   CreateRecBG();
-extern Widget   CreateRecB();
-extern Widget   CreateCapt();
-extern Widget   CreateCaptG();
-extern Widget   CreateLabelG();
-extern Widget   CreateLabel();
-extern void     SetString();
-
-extern int      readSNF();
-extern int      writeSNF();
-extern int      ptnClose();
-extern int      ptnAdd();
-extern int      ptnGet();
-extern int      ptnSense();
-extern int      ptnDel();
-extern int      GetInfo();
-extern int      ptnSqToNo();
-extern int      ptnNoToSq();
-extern int      noToCode();
-extern int      noToCode2();
-extern int      codeToNo();
-extern int      codeToNo2();
-extern int      codeCheck();
-extern int      codeCheck2();
-extern void     bitSetInfo();
-extern void     bitSet();
-extern void     bitReset();
-extern int      bitRead();
-extern void     bitPtnClear();
-extern void     bitPtnCopy();
-extern int      bitDrawLine();
-extern int      bitDrawRect();
-extern int      bitDrawCls();
-extern int      bitDrawSet();
-extern int      bitDrawRev();
-extern int      bitDrawCpy();
-extern int      bitDrawMov();
-extern int      bitDrawRoll();
-extern int      bitDrawSymV();
-extern int      bitDrawSymH();
-
-#define D_MAX   10
-
-#define SetString(w,s)         UpdateMessage((s))
-
-#define        PROC_POINT      0
-#define        PROC_LINE       1
-#define        PROC_RECT       2
-#define        PROC_CLS        3
-#define        PROC_SET        4
-#define        PROC_REV        5
-#define        PROC_CUT        6
-#define        PROC_CPY        7
-#define        PROC_PASTE      8
-#define        PROC_ROLL       9
-#define        PROC_SYMV       10
-#define        PROC_SYMH       11
-#define PROC_CIRCLE    12
-#define PROC_ERASE     13
-#define PROC_SELECT    14
-
-#define        RES_MSG         (1L<<0)
-#define        RES_PROC        (1L<<1)
-#define        RES_SLCT        (1L<<2)
-#define        RES_RSV         (1L<<3)
-
-
-#define CPY_COPY       0
-#define CPY_OVERLAY    1
-
-
-#define CODE_ADD       0
-#define CODE_DEL       1
-
-#define SET_CDSET1     0
-#define SET_CDSET3     1
-
-
-#define        SET_NORMAL_U90_G1       0
-#define        SET_NORMAL_G1   1
-#define        SET_SYSTEM_G1   2
-#define        SET_NORMAL      3
-#define        SET_JEF         4
-#define        SET_SYSTEM      5
-
-
-
-#define MG_MAXSIZE     100
-
-
-
-#ifdef DEBUG
-#define Dprintf2 printf
-#define Dprintf  printf        
-#else
-#define Dprintf2
-#define Dprintf
-#endif
-
-
-/**********************************************************************
- structure 
- **********************************************************************/
-
-/* editting character */ 
-typedef struct _EditChar {
-    FalFontData *fdata;
-    int                width;
-    int                height;
-    int                code;
-    int                ncode;
-    char       ptn[MAXPTNBYTE];
-    char       flag;
-
-} EditChar; 
-
-/* character list */
-typedef struct _EditList {
-    int                nlist;
-    int                statloc;
-    int                slctloc;
-    int                nptn;
-    int                sqstart;
-    Dimension  list_h;
-    Dimension  elem_w;
-    Dimension  elem_h;
-    Pixel      back;
-    Pixel      border;
-} EditList;
-
-/* editting pane */
-typedef struct _EditPane {
-    int                width;
-    int                height;
-    int                pix_w;
-    int                pix_h;
-    int                color;
-    int                obj;
-    Pixel      back;
-    Pixel      border;
-} EditPane;
-
-/* X library */
-typedef struct _XlibInf {
-    Display    *display;
-    Window     root_winID;
-    Window     edit_winID;
-    Window     disp_winID;
-    Window     list_winID;     /* 1995.10.02 */
-    GC         borderGC;
-    GC         backGC; 
-    GC         rubGC;
-    GC         dashGC;
-    XImage     *dispImage;
-} XlibInf;
-
-
-typedef struct _DelInf {
-    Dimension  elem_w;
-    Dimension  elem_h;
-    Dimension  ptn_w;
-    Dimension  ptn_h;
-    Dimension  list_h;
-    int                s_ncode;
-    int                e_ncode;
-    int                sq_top; 
-    int                sq_start;
-    int                sq_end; 
-    int                disp_num;
-} DelInf;
-
-/* X library */
-typedef struct _DelPtnInf {
-    Window     disp_winID;
-    XImage     *dispImage;
-    char       ptn[MAXPTNBYTE];
-} DelPtnInf;
-
-/* editting pattern */
-typedef struct _EditPtnInf {
-    char       drag_f;
-    int                adj_px;
-    int                adj_py;
-    int                proc;   
-    char       slct_f;
-    int                src1_px;
-    int                src1_py;
-    int                src2_px;
-    int                src2_py;
-    int                dest_px;
-    int                dest_py;
-    char       rsv_f;
-    char       rsv_ptn[MAXPTNBYTE];    
-} EditPtnInf;
-
-/* copy patterns */
-typedef struct _CopyPtnInf {
-/*  int                size;*/
-    FalFontData        *fdata;
-    int                s1_code;
-    int                s2_code;
-    int                d1_code;
-    int                proc;
-} CopyPtnInf;
-
-/* fonts */
-typedef struct _FontInf {
-    int                        num;
-    FalFontDataList    *lp;
-    Widget             *RecB;
-} FontInf;
-
-/**********************************************************************
- **********************************************************************/
-
-#ifdef substance_source
-#define        ex
-#define        I(x)    =(x)
-#else
-#define        ex      extern
-#define        I(x)
-#endif /* substance_source */
-
-ex  Widget     toplevel        I(NULL);
-
-ex  Widget     editPtnW        I(NULL);
-ex  Widget     cpyPtnW         I(NULL);
-ex  Widget     mngPtnW         I(NULL);
-
-ex  EditChar   edg
-#ifdef substance_source
-={ 0,0,0,0,0,0,0, OFF }
-#endif /* substance_source */
-;
-ex  EditList   edlist
-#ifdef substance_source
-       ={ EDLIST_MAX, 0,0,0,0,0,0,0,0,0 }
-#endif /* substance_source */
-;
-EditPane       edpane
-#ifdef substance_source
-       ={ EDPANE_SIZE, EDPANE_SIZE, 0,0,0,0,0,0 }
-#endif /* substance_source */
-;
-ex  XlibInf    xl;
-ex  DelInf     dn
-#ifdef substance_source
-       ={ 0,0,0,0,0,0,0,0,0,0,0 }
-#endif /* substance_source */
-;
-ex  DelPtnInf  dl[D_MAX] ;
-ex  DelPtnInf  dl_glyph[EDLIST_MAX] ;           /* add dl_disp 1995.09.20 */
-ex  int                sq_disp[EDLIST_MAX] ;            /* add sq_disp 1995.09.20 */
-
-ex  EditPtnInf         em
-#ifdef substance_source
-       ={ OFF,0,0,0,0,0,0,0,0,0,0,0,0,0 }
-#endif /* substance_source */
-;
-ex  CopyPtnInf         cpm
-#ifdef substance_source
-       ={ 0,0,0,0,0 }
-#endif /* substance_source */
-;
-
-#undef ex
-#undef I
-
-/*
- * resources for font editor
- */
-
-#include"ufontrsrc.h"          /* 1995.06.28 H.Chiba */
-
-
-/*Resource resource; del 1995.05.30 H.Chiba BSC */
-
-
-#ifdef substance_source                 /* add 1995.06.29 H.Chiba -> */
-
-
-/* CreateCaptionFrame() */
-Boolean                capt_resize     = True ;                /* resizable:   */
-int            capt_lftoff     = 2 ;                   /* leftOffset:  */
-int            capt_topoff     = 2 ;                   /* topOffset:   */
-int            capt_rghoff     = 2 ;                   /* rightOffset: */
-
-Pixel          pane_background;
-Pixel          pane_foreground;
-
-/* CreateMenuButtons() */
-Dimension      menu_margin     = 0 ;                   /* margin:      */
-
-/* CreateDialogAndButtons() */
-Boolean                dia_tm_automng  = False ;               /* autoUnmanage: */
-Dimension      dia_tm_width    = 4 ;                   /* marginWidth:  */
-Dimension      dia_tm_height   = 4 ;                   /* marginHeight: */
-Boolean                dia_tm_resize   = True ;                /* noResize:     */
-Boolean                dia_tm_minimize = True ;                /* minimizeButtons: */
-
-Dimension      dia_rw_width    = 6 ;                   /* marginWidth:  */
-Dimension      dia_rw_height   = 6 ;                   /* marginHeight: */
-Dimension      dia_rw_spacing  = 4 ;                   /* spacing:      */ 
-
-/* CreateDrawingArea() */
-Dimension      draw_border     = 1 ;                   /* borderWidth: */
-int            draw_topoff     = 2 ;                   /* topOffset:   */
-int            draw_lftoff     = 2 ;                   /* leftOffset:  */
-
-/* PopupNotice() */
-Boolean                pop_resize      = True ;                /* noResize:    */
-Boolean                pop_minimize    = True ;                /* minimizeButtons: */
-
-/* CreateTemplateDialog() */
-Boolean                temp_resize     = True ;                /* noResize:    */
-Boolean                temp_minimize   = True ;                /* minimizeButtons: */
-
-Dimension      temp_width      = 1 ;                   /* width:       */
-Dimension      temp_height     = 1 ;                   /* height:      */
-
-/* CreateMenuBarAndFooterMessageForm() */
-#if 0
-ed_functions   = ( MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE | MWM_FUNC_CLOSE ) ;/* mwmFunctions:      */
-#endif
-
-int            ed_bar_topoff   = 1 ;                   /* topOffset:   */
-int            ed_bar_lftoff   = 1 ;                   /* leftOffset:  */
-int            ed_bar_rghoff   = 1 ;                   /* rightOffset: */
-
-int            ed_frm_btmoff   = 3 ;                   /* bottomOffset: */
-int            ed_frm_lftoff   = 3 ;                   /* leftOffset:   */
-int            ed_frm_rghoff   = 3 ;                   /* rightOffset:  */
-
-Dimension      ed_msg_margintop = 3 ;                  /* marginTop:    */
-Dimension      ed_msg_marginbtm = 3 ;                  /* marginBottom: */
-
-Dimension      ed_mesg_margintop = 3 ;                 /* marginTop:    */
-Dimension      ed_mesg_marginbtm = 3 ;                 /* marginBottom: */
-
-int            ed_sep_btmoff   = 3 ;                   /* bottomOffset: */
-int            ed_sep_lftoff   = 0 ;                   /* leftOffset:   */
-int            ed_sep_rghoff   = 0 ;                   /* rightOffset:  */
-Dimension      ed_sep_margin   = 0 ;                   /* margin:       */
-
-int            ed_wge_topoff   = 10 ;                  /* topOffset:    */
-int            ed_wge_lftoff   = 10 ;                  /* leftOffset:   */
-int            ed_wge_rghoff   = 10 ;                  /* rightOffset:  */
-int            ed_wge_btmoff   = 10 ;                  /* bottomOffset: */
-
-/* CreateFrame() */
-Boolean                frame_resize    = False ;               /* resizable:    */
-
-/* CreateScrollBase() */
-Dimension      scll_fr_width   = 500 ;                 /* width:        */
-
-Dimension      scll_fr_thick   = 2 ;                   /* shadowThickness: */
-
-int            scll_bar_lftoff = 4 ;                   /* leftOffset:   */
-
-#endif /* substance_source */  /* -> add 1995.06.29 H.Chiba */
-
-/**********/
diff --git a/cde/programs/dtudcfonted/xutil.c b/cde/programs/dtudcfonted/xutil.c
deleted file mode 100644 (file)
index d459b93..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* xutil.c 1.2 - Fujitsu source for CDEnext    96/02/29 17:30:54      */
-/* $XConsortium: xutil.c /main/2 1996/04/08 16:03:37 cde-fuj $ */
-/*
- *  (c) Copyright 1995 FUJITSU LIMITED
- *  This is source code modified by FUJITSU LIMITED under the Joint
- *  Development Agreement for the CDEnext PST.
- *  This is unpublished proprietary source code of FUJITSU LIMITED
- */
-
-
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <nl_types.h>
-
-#include <Xm/Xm.h>
-
-#include <Xm/Form.h>
-#include <Xm/PushB.h>
-#include <Xm/Text.h>
-#include <Xm/TextF.h>
-#include <Xm/Label.h>
-#include <Xm/SeparatoG.h>
-#include <Xm/List.h>
-#include <Xm/ToggleB.h>
-#include <Xm/MessageB.h>
-
-#include "selectxlfd.h"
-#include "xoakufont.h"
-
-/*
- * parameters
- */
-void   xlfdPopupDialog() ;
-
-extern int                     getmask ;
-
-extern Widget  toplevel ;
-extern Widget  slctBLabel[BUTTONITEMS],
-               slctBText[BUTTONITEMS], slctButton[BUTTONITEMS], 
-               listPop[BUTTONITEMS],   listW[BUTTONITEMS], errorMD, msgBox ;
-
-/****************************************************************
- * common functions 
-****************************************************************/
-
-
-/*
- * pop up and down dialog box 
- */
-
-void
-xlfdPopupDialog(w)
-Widget w;
-{
-    if (! XtIsManaged(w))
-        XtManageChild(w);
-    else
-        XRaiseWindow(XtDisplayOfObject(w), XtWindow(XtParent(w)));
-}
index 25b90f1f55f25f798fae27db9be6a96e9f34ee86..1f64e6c52ffd18fb3b3d5b02bec4b34e96b06792 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: Button.c /main/7 1995/11/14 10:03:27 rswiston $ */
-#ifdef REV_INFO
-#ifndef lint
-static char SCCSID[] = "OSF/Motif: @(#)Button.c        1.19 95/05/01";
-#endif /* lint */
-#endif /* REV_INFO */
 /******************************************************************************
 *******************************************************************************
 *
index 71f4156621f954d8a56454894790408d72f806e0..6602d956e707d5f4f6f98b7ecd90e7f5ade3d96e 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: Button.h /main/4 1995/11/01 11:22:33 rswiston $ */
-#ifdef REV_INFO
-#ifndef lint
-static char SCCSID[] = "OSF/Motif: %W% %E%";
-#endif /* lint */
-#endif /* REV_INFO */
 /******************************************************************************
 *******************************************************************************
 *
index 50536c50620f758dc605b2ef55889db2a454bea2..e606a5740e48235f077f2c8b8ca243f5e177bf59 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: ButtonP.h /main/5 1995/11/01 11:22:47 rswiston $ */
-#ifdef REV_INFO
-#ifndef lint
-static char SCCSID[] = "OSF/Motif: @(#)ButtonP.h       1.14 95/05/01";
-#endif /* lint */
-#endif /* REV_INFO */
 /******************************************************************************
 *******************************************************************************
 *
index 56d3a038e855efffe1a8929ffd3d255acf02a8cb..05a4b39a6b626d9c86ea508311a114635412ce43 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: Callback.c /main/10 1996/10/30 11:14:26 drk $ */
 /*****************************************************************************
  *
  *   File:         Callback.c
@@ -618,7 +617,7 @@ WorkspaceModifyCB (Widget    w,
         
          switch_data->buttons =
             (Widget *) XtRealloc ((char *) switch_data->buttons,
-                                 sizeof (Widget *) * switch_data->switch_count);
+                                 sizeof (Widget) * switch_data->switch_count);
 
          SwitchButtonCreate (switch_data, True);
 
index 570a2fbc96ec5405431099316b5a1967bc5ff43f..5dc7785dd7de6d998f0b0f3c92c0a6f9d52a7e13 100644 (file)
@@ -20,9 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* static char rcsid[] = 
-       "$XConsortium: Clock.c /main/8 1996/10/14 10:58:15 pascale $";
-*/
 /**---------------------------------------------------------------------
 ***    
 ***    file:           Clock.c
@@ -67,9 +64,6 @@ SOFTWARE.
 */
 
 #include <stdio.h>
-#ifdef __apollo
-#include <sys/types.h>
-#endif
 #include <sys/stat.h>
 #include <time.h>
 #include <Xm/GadgetP.h>
@@ -331,8 +325,8 @@ ClockTick(
        struct tm       tm; 
        time_t          time_value;
        char *          time_ptr;
-       register Display *      dpy = XtDisplay (w);
-       register Window         win = XtWindow (w);
+       Display *       dpy = XtDisplay (w);
+       Window          win = XtWindow (w);
 
        if (id || !w->clock.interval_id)
                w->clock.interval_id =
@@ -514,8 +508,8 @@ DrawHand(
         Dimension width,
         double fraction_of_a_circle )
 {
-       register double angle, cosangle, sinangle;
-       register double ws, wc;
+       double angle, cosangle, sinangle;
+       double ws, wc;
        Position x, y, x1, y1, x2, y2;
        double cos ();
        double sin ();
@@ -599,8 +593,8 @@ DrawClockFace(
        Boolean draw_minute_ticks =
                         ((G_ClockWidth (g) > (Dimension) (2 * SIZE_DEFAULT)) &&
                          (G_ClockHeight (g) > (Dimension) (2 * SIZE_DEFAULT)));
-       register int i;
-       register int delta =
+       int i;
+       int delta =
                        (int)(g->clock.radius - g->clock.tick_spacing) / 3;
 
        if (! XtIsManaged ((Widget)g))
index f2b2004387af4ed3215ef2cd9ddcf8a6c1eb7e2c..6224737ad39ddcdb9be9428dcfbb2813f5aa2671 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: Clock.h /main/4 1995/11/01 11:24:11 rswiston $ */
 /**---------------------------------------------------------------------
 ***    
 ***    file:           Clock.h
index 1b1d069393aee6bf1608e2ecd6f7fbeffbb57bfb..6907b373016fb0f2d024f10f3bff26e4ba3a3329 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: ClockP.h /main/4 1996/10/16 16:57:08 drk $ */
 /**---------------------------------------------------------------------
 ***    
 ***    file:           ClockP.h
index 8619c4691d6aa9209b4f7589c7410569121bab0b..c6e9737c3f7881a786b4b89c48b3e679d507e0ea 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $TOG: DataBaseLoad.c /main/9 1998/01/12 16:46:23 cshi $ */
 /*****************************************************************************
  *
  *   File:         DataBaseLoad.c
@@ -712,7 +711,7 @@ _DtPerfChkpntMsgSend("End   Front panel database read");
 
    /*  Continue the elimination of unused records  */
 
-   name_list = (char **) XtMalloc (sizeof (char **) * 2);
+   name_list = (char **) XtMalloc (sizeof (char *) * 2);
    if (switch_count != 0)
       name_list[0] = switch1->element_values[SWITCH_NAME].parsed_value;
    else
@@ -1301,7 +1300,7 @@ AllocateRecordData (RecordData ** record_data,
       *record_data_count += 10;
       *record_data = (RecordData *) 
                        XtRealloc ((char *) *record_data, 
-                                  sizeof (RecordData *) * (*record_data_count));
+                                  sizeof (RecordData) * (*record_data_count));
    }
 
    (*record_data)[*record_count].element_values = 
@@ -1951,7 +1950,7 @@ GetNameList (RecordData * record_data,
             name_list_count += 10;
            name_list = 
               (char **) XtRealloc ((char *) name_list, 
-                                   sizeof (char **) * (name_list_count + 1));
+                                   sizeof (char *) * (name_list_count + 1));
         }       
          name_list [found_count] = 
            record_data[i].element_values[name_type].parsed_value;
index cc36a1b06ea507a66cbf11908cbc912647cb204a..e3704966f002b87ce09917ef412afc36149c232e 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: DataBaseLoad.h /main/7 1996/10/30 11:14:37 drk $ */
 /*****************************************************************************
  *
  *   File:         DataBaseLoad.h
index 51d9784875197428276ef9ff548e38fbbec559b8..c20e6f0f444f5334a0fca83d9b63815bbefb7689 100644 (file)
@@ -262,15 +262,6 @@ Dtwm*keyBindings:                        DtKeyBindings
 !# Resource for internal dtwm use:
 Dtwm*useAsyncGeometry:                       True
 
-#ifdef __apollo
-
-!# Don't post the confirm dialog on a "kill" signal 
-!# Avoids possible hung node when interacting with the dialog box on the
-!# shared mode server.
-Dtwm*showFeedback:             behavior move placement quit resize restart
-
-#endif
-
 !###############    Other Popular Dtwm Resource Settings  ##########
 !#####  See also the Style Manager - Window Manager Dialogue ########
 
index 4836c83fb97d9c52270a99aa152916c9017dc48f..ebe37f80c32956b44420827bd0f4dab7f476a2df 100644 (file)
@@ -1,5 +1,3 @@
-static char rcsid[] = "$XConsortium: FAQ.wm /main/3 1995/11/01 11:26:51 rswiston $";
-
 /*************************************<+>*************************************
  *****************************************************************************
  **
index 82a67739d6b2db745ba30bfd20f6b3099bee39cf..3241de39d818a3c222ed1f8b7f8d193f7d7e44ba 100644 (file)
@@ -9,10 +9,10 @@ MWMDEFINES = $(VFORK_DEFINE) -DLARGECURSORS -DR2_COMPAT -DOPAQUE -DSHAPE \
        -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \
        -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\"
 
-DTWMDEFINES = -DWSM -DPANELIST
+DTWMDEFINES =
 
 DEPEND_DEFINES = $(DEPENDDEFINES)
-DEFINES = $(MWMDEFINES) $(DTWMDEFINES) -DMULTIBYTE -DMINIMAL_DT
+DEFINES = $(MWMDEFINES) $(DTWMDEFINES)
 INCLUDES = $(TIRPCINC)
 
 DEPLIBS = DepDtClientLibs
index dc5e593376699dfb3f77127dd817c57e8993c4e1..e7d55802523047280387527e61859eb958b79990 100644 (file)
@@ -20,9 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* static char rcsid[] = 
-       "$XConsortium: PanelS.c /main/4 1995/11/01 11:27:29 rswiston $";
-*/
 /**---------------------------------------------------------------------
 ***    
 ***    file:           PanelS.c
index 6c714addb6e734b0bd804364111b1c9f053a726e..06be294b34f498d104a1082d0ebb65913f652926 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: PanelS.h /main/3 1995/11/01 11:27:43 rswiston $ */
-#ifdef REV_INFO
-#ifndef lint
-static char SCCSID[] = "OSF/Motif: %W% %E%";
-#endif /* lint */
-#endif /* REV_INFO */
 /******************************************************************************
 *******************************************************************************
 *
index 4102aeef2e4d7a73ccd2c852e7d8d47fab3580c2..c1e30c1a0d81a212ecbc4b0ee19a933daf7ba0fe 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: PanelSP.h /main/3 1995/11/01 11:27:59 rswiston $ */
 
 #ifndef _DtPanelShellP_h
 #define _DtPanelShellP_h
index 96cf4dc43c6344031012c1613460dad74acd41e9..c8789ea558cb929af8e11047a1cb8f9fa2f05c2f 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $TOG: Parse.c /main/5 1998/01/12 16:47:01 cshi $ */
 /*****************************************************************************
  *
  *   File:         Parse.c
index ef91692612054b51ac15b2e529f51885959f39aa..f28698e470396ef7cbf007d06a662b5a05f0d1f1 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: Parse.h /main/4 1995/11/01 11:28:34 rswiston $ */
 /*****************************************************************************
  *
  *   File:         Parse.h
index 8216f50b8445eb53440f5eae3934f7a64887c7d8..5186cd69601ee292b6154e59426c008b9c55ede5 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: PopupMenu.c /main/5 1995/11/01 11:28:50 rswiston $ */
 /*****************************************************************************
  *****************************************************************************
  **
index 74e664b3b4b1582b2402e3ef560221fca76386b2..83673f82825edcb263be9108d2a6c2f595a647f3 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: PopupMenu.h /main/4 1995/11/01 11:29:18 rswiston $ */
 /*****************************************************************************
  *
  *   File:         PopupMenu.h
index ed1c163292422b4b6d93b901fe3fd16a95b04433..bd4f700e4247d3ccd0980df4785b2f3051514743 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: Print.c /main/4 1995/11/01 11:29:33 rswiston $ */
 /*****************************************************************************
  *
  *   File:         Print.c
index 0c0da589702e79db9f526bafb1a5e2d8bf4088b1..3ab2d969ae845577388ac0b99f321f790f2ef8f9 100644 (file)
@@ -1,6 +1,3 @@
-
-$XConsortium: README /main/4 1996/06/20 09:47:10 rswiston $
-
 Conditional Compilation 
 -----------------------
 
@@ -80,16 +77,9 @@ header file include flags, and macros (e.g. ABS).
     MESSAGE_CAT
        Enables message catalog code for local language support.
 
-    MINIMAL_DT
-       Enables some code for "light weight" version of dtwm. (This
-       isn't meaningful any more since we've dumped the BMS.)
-
     MOTIF_DEFAULT_ICON
        Enables the default window icon with four buttons.
 
-    MOTIF_ONE_DOT_ONE
-       Enables compatibility with Motif 1.1 libraries.
-
     NO
        Vestigal/experimental code for position help dialog (WmHelp.c).
 
@@ -97,10 +87,6 @@ header file include flags, and macros (e.g. ABS).
        Vestigal/experimental code to reduce output to feedback window
        (WmFeedback.c).
 
-    NO_MULTIBYTE
-       If defined, then code to support multibyte character sets is
-       removed. 
-
     NO_OL_COMPAT
        If defined, then code to read and interpret Open Look window
        manager hints is removed.
@@ -135,9 +121,6 @@ header file include flags, and macros (e.g. ABS).
        HP Panacom division modification to support clients running
        in their X terminals.
 
-    PANELIST
-       Front panel code.
-
     PARANOID
        If enabled, the a server grab is done around a property read. 
        (This is probably not necessary.)
@@ -152,9 +135,6 @@ header file include flags, and macros (e.g. ABS).
        Enables support for old clients that still pass window geometry
        hint information in WM_NORMAL_HINTS.
 
-    REV_INFO
-       Revision information.
-
     ROOT_ICON_MENU
        Experimental code to provide MS Windows-like traversal of focus
        between root icons with menus posted.
@@ -165,12 +145,6 @@ header file include flags, and macros (e.g. ABS).
     UNMAP_ON_RESTART
        All windows are unmapped on restart.
 
-    VERBOSE_REV_INFO
-       Revision information.
-
-    WSM
-       Workspace manager code.
-
     _BMS
        Formerly used to denote code that interfaced to the HP Broadcast
        message server. This code has been switched over to ICCC
index 5af59c497ee3301acaca72636145223bb2323446..33d167b88d52b77ef282c2201b3c5af843e04f01 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $TOG: Session.c /main/5 1997/05/20 08:20:18 samborn $ */
 /************************************************************************
  *
  *  File:       Session.c
@@ -79,9 +78,7 @@ extern String unpost_monitor_arrow_image;
  ************************************************************************/
  
 static char *
-SessionFileGetName ()
-
-
+SessionFileGetName (void)
 {
    char * home_dir;
    char * file_name;
@@ -114,9 +111,7 @@ SessionFileGetName ()
  ************************************************************************/
 
 void
-SessionRestoreData ()
-
-
+SessionRestoreData (void)
 {
    FILE * fd;
 
@@ -185,7 +180,7 @@ SessionRestoreData ()
                  max_subpanel_count += 10;
                  subpanel_data = (SubpanelData **)
                    XtRealloc ((char *) subpanel_data, 
-                              sizeof (SubpanelData **) * max_subpanel_count);
+                              sizeof (SubpanelData *) * max_subpanel_count);
               }
 
               subpanel_data[subpanel_count] = control_data->subpanel_data;
@@ -315,7 +310,7 @@ SessionRestoreData ()
 
       if (panel.dynamic_data_count > 0) {
        panel.dynamic_data_list = (DynamicComponent **)
-         XtMalloc (sizeof (DynamicComponent **) * panel.max_dynamic_data_count);
+         XtMalloc (sizeof (DynamicComponent *) * panel.max_dynamic_data_count);
       }
 
       dynamic_data_count = 0;
@@ -478,9 +473,7 @@ SessionRestoreData ()
  ************************************************************************/
 
 void
-WmFrontPanelSessionSaveData ()
-
-
+WmFrontPanelSessionSaveData (void)
 {
    FILE * fd;
 
@@ -528,7 +521,7 @@ WmFrontPanelSessionSaveData ()
                  max_subpanel_count += 10;
                  subpanel_data = (SubpanelData **)
                    XtRealloc ((char *) subpanel_data, 
-                              sizeof (SubpanelData **) * max_subpanel_count);
+                              sizeof (SubpanelData *) * max_subpanel_count);
               }
 
               subpanel_data[subpanel_count] = control_data->subpanel_data;
@@ -662,7 +655,7 @@ SessionAddFileData (char  * file_name,
        panel.max_dynamic_data_count += 10;
        panel.dynamic_data_list = (DynamicComponent **)
           XtRealloc ((char *) panel.dynamic_data_list,
-             sizeof (DynamicComponent **) * panel.max_dynamic_data_count);
+             sizeof (DynamicComponent *) * panel.max_dynamic_data_count);
    }
 
    panel.dynamic_data_list[count] = 
index a2e3d22bd7af5c90a7eb42d650e6e83f512e7a6d..af6c7c40ee5e092dc88afe4bcfee485f96b1ea3a 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: UI.c /main/7 1996/11/07 16:35:08 rswiston $ */
 /*****************************************************************************
  *
  *   File:         UI.c
@@ -697,9 +696,7 @@ PanelControlCreate (Widget parent,
  ************************************************************************/
 
 static void
-BoxCreate ()
-
-
+BoxCreate (void)
 {
    int i, j;
    BoxData * box_data;
@@ -2078,7 +2075,7 @@ SwitchCreate (BoxData * box_data)
    panel.switch_row_count =
       (int) (intptr_t) (switch_data->element_values[SWITCH_NUMBER_OF_ROWS].parsed_value);
    switch_data->buttons = 
-      (Widget *) XtMalloc (sizeof (Widget *) * switch_count);
+      (Widget *) XtMalloc (sizeof (Widget) * switch_count);
 
    switch_data->popup_data = NULL;
 
index 2037f69602810408937894dc77dd7c8c93fb6e8c..68fc0a1b06c505898e112c88ef7bf740e1eda6cc 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: UI.h /main/4 1995/11/01 11:31:06 rswiston $ */
 /*****************************************************************************
  *
  *   File:         UI.h
index dd4a7262f3610910d417b969114618cbff51582e..4cdfac56f1429e407c3d0aec9e7d62b4a3e7cfaa 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $TOG: WmBackdrop.c /main/5 1998/08/03 16:19:42 mgreess $ */
-#ifdef WSM 
 /* 
  * (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY
  * (c) Copyright 1993, 1994 International Business Machines Corp.
  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  * (c) Copyright 1993, 1994 Novell, Inc.
- */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = ""
-#endif
-#endif
+ */
 
 #define        BANDWIDTH               16
 #define        BOTTOM                   0
@@ -62,9 +55,7 @@ static char rcsid[] = ""
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#ifndef   NO_MULTIBYTE
 #include <stdlib.h>
-#endif
 #include "WmIPC.h"     /* must be after DtP.h */
 
 /**************************************
@@ -198,9 +189,7 @@ ProcessBackdropResources(
     static String none_string = NULL;
     static String no_backdrop_string = NULL;
     Boolean bNone = False;
-#ifndef NO_MULTIBYTE
     unsigned int chlen;
-#endif /* NO_MULTIBYTE */
     
     if (callFlags & CHANGE_BACKDROP)
     {
@@ -233,7 +222,6 @@ ProcessBackdropResources(
         * Strip off leading '@', if any
         */
        pch = (unsigned char *) pWS->backdrop.image;
-#ifndef NO_MULTIBYTE
        chlen = mblen ((char *)pch, MB_CUR_MAX);
        if (chlen == 1 && *pch++ == '@')
        {
@@ -251,19 +239,6 @@ ProcessBackdropResources(
                }
            }
        }
-#else /* NO_MULTIBYTE */
-       if (*pch++ == '@' && *pch)
-       {
-               int il = 1+strlen ((char *)pch);
-               unsigned char *pchD = (unsigned char *)pWS->backdrop.image;
-
-               while (il)
-               {
-                   *pchD++ = *pch++;
-                   il--;
-               }
-       }
-#endif /* NO_MULTIBYTE */
 
        /*
         * Use a copy of the string because our parsing routines
@@ -697,5 +672,4 @@ IsBackdropWindow(
     return (rval);
 }
 
-#endif /* WSM */
 /*********************        eof     ***************************/
index 577f09c593c9ee803eb7e289b5e3f54adb6e0d66..6f8c7b66c1fa7440d10772df76ba2d88bdb62ad8 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: WmBackdrop.h /main/4 1995/11/01 11:31:43 rswiston $ */
-#ifdef WSM
 /* 
  * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY 
  * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. 
  * ALL RIGHTS RESERVED 
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = ""
-#endif
-#endif
 
 /********    Public Function Declarations    ********/
 
@@ -52,5 +45,4 @@ extern Boolean IsBackdropWindow(
 
 /********    End Public Function Declarations    ********/
 
-#endif /* WSM */
 /****************************   eof    ***************************/
index c0ece79718e1a15496984377b18efd131f547812..69a7f56a25d0cb0e1211a6f69d5eff94db968ae9 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2.3
 */ 
-/*   $XConsortium: WmBitmap.h /main/3 1995/11/01 11:32:01 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index 38cb3fbc2bf257490a01e504bae6dafef23d8148..dbe26d294ad2f0b540cc83f0064f41fae50ecfe7 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.3
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmCDInfo.c /main/4 1995/11/01 11:32:15 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -69,7 +64,6 @@ unsigned int TitleTextHeight (ClientData *pcd)
 {
     unsigned int ttextheight;
 
-#ifndef NO_MULTIBYTE
     if (DECOUPLE_TITLE_APPEARANCE(pcd))
     {
        ttextheight = CLIENT_TITLE_APPEARANCE(pcd).titleHeight;
@@ -78,34 +72,6 @@ unsigned int TitleTextHeight (ClientData *pcd)
     {
        ttextheight = CLIENT_APPEARANCE(pcd).titleHeight;
     }
-#else
-
-    XFontStruct        *font;
-
-    if (DECOUPLE_TITLE_APPEARANCE(pcd))
-    {
-       font = CLIENT_TITLE_APPEARANCE(pcd).font;
-    }
-    else 
-    {
-       font = CLIENT_APPEARANCE(pcd).font;
-    }
-
-    if (font)
-    {
-       ttextheight = TEXT_HEIGHT(font) + WM_TITLE_BAR_PADDING;
-    }
-    else
-    {
-       /* 
-        * Failed to load any font! (probably due to error in 
-        * font path, toolkit, or resource converter. Set to
-        * arbitrary value for robustness.
-        *
-        */
-       ttextheight = 16; 
-    }
-#endif
     return (ttextheight);
 }
 
@@ -185,13 +151,11 @@ unsigned int UpperBorderWidth (ClientData *pcd)
     else if (decoration & MWM_DECOR_BORDER)
     {
        uswidth = FRAME_BORDER_WIDTH(pcd);
-#ifdef PANELIST
        if((pcd->clientFlags & FRONT_PANEL_BOX) &&
           (uswidth > 0))
        {
            uswidth -= 1;
        }
-#endif /* PANELIST */
     }
     else if ((decoration & MWM_DECOR_TITLE) ||
             (pcd->matteWidth > 0))
@@ -729,7 +693,6 @@ Boolean GetFramePartInfo (ClientData *pcd, int part, int *pX, int *pY, unsigned
                    rval = TRUE;
                }
                break;
-#ifdef WSM
 
        case FRAME_TITLEBAR:
                if (decor & MWM_DECOR_TITLE) {
@@ -741,7 +704,6 @@ Boolean GetFramePartInfo (ClientData *pcd, int part, int *pX, int *pY, unsigned
                    rval = TRUE;
                }
                break;
-#endif /* WSM */
 
        case FRAME_MINIMIZE:
                if (decor & MWM_DECOR_MINIMIZE) {
index fa380fbf3eba4720d4e0426aabf077977e5ec071..1eb6352e0b0a22a525311bdf53c3d9f294e5333b 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2.3
 */ 
-/*   $XConsortium: WmCDInfo.h /main/4 1995/11/01 11:32:34 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index 58a1cb1ed2a548314a2381f5c7b6ae7671282e9e..cf49770f0c483cfeb13450e060086e11854869a6 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.1
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmCDecor.c /main/7 1996/06/20 09:38:16 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987,1988,1989,1990,1991,1993 HEWLETT-PACKARD COMPANY */
 
@@ -700,7 +695,6 @@ void GenerateFrameDisplayLists (ClientData *pcd)
 
     /* produce default border with no resizing functions */
 
-#ifdef WSM
        BevelRectangle (pcd->pclientTopShadows,         /* outside */
                    pcd->pclientBottomShadows, 
                    0, 0, 
@@ -709,13 +703,6 @@ void GenerateFrameDisplayLists (ClientData *pcd)
                    FRAME_EXTERNAL_SHADOW_WIDTH,
                    FRAME_EXTERNAL_SHADOW_WIDTH,
                    FRAME_EXTERNAL_SHADOW_WIDTH);
-#else /* WSM */
-       BevelRectangle (pcd->pclientTopShadows,         /* outside */
-                   pcd->pclientBottomShadows, 
-                   0, 0, 
-                   pcd->frameInfo.width, pcd->frameInfo.height,
-                   2, 2, 2, 2);
-#endif /* WSM */
 
        if ((pcd->internalBevel > 1) &&
            !matte_width && 
@@ -751,13 +738,11 @@ void GenerateFrameDisplayLists (ClientData *pcd)
        }
        else 
        {
-#ifdef PANELIST
             if((pcd->dtwmBehaviors & DtWM_BEHAVIOR_PANEL) &&
                (pcd->clientDecoration == WM_DECOR_BORDER))
             {
                 insideBevel = 0;
             }
-#endif /* PANELIST */
            BevelRectangle (pcd->pclientBottomShadows,  /* inside */
                            pcd->pclientTopShadows, 
                            (int)(pcd->frameInfo.lowerBorderWidth-insideBevel), 
@@ -1107,11 +1092,11 @@ void GetTextBox (ClientData *pcd, XRectangle *pBox)
 {
     int x,y;
     unsigned int width,height;
-#if defined(WSM) && defined(DT_LEFT_JUSTIFIED_TITLE)
+#if defined(DT_LEFT_JUSTIFIED_TITLE)
     Dimension textWidth;
     Dimension offset;
     XmFontList  fontList;
-#endif /* WSM */
+#endif
 
     /* get size of title area */
 
@@ -1268,14 +1253,9 @@ void DrawWindowTitle (ClientData *pcd, Boolean eraseFirst)
                   textBox.x, textBox.y, textBox.width, &textBox,
                   ((wmGD.frameStyle == WmSLAB) ? False : True));
 #else /* DT_LEFT_JUSTIFIED_TITLE */
-#ifdef WSM
     WmDrawXmString(DISPLAY, win, fontList, pcd->clientTitle, clientGC,
                   textBox.x, textBox.y, textBox.width, &textBox,
                   True);
-#else
-    WmDrawXmString(DISPLAY, win, fontList, pcd->clientTitle, clientGC,
-                  textBox.x, textBox.y, textBox.width, &textBox);
-#endif
 #endif /* DT_LEFT_JUSTIFIED_TITLE */
                     
 
@@ -2276,7 +2256,6 @@ ShowInactiveClientFrame (ClientData *pcd)
 void RegenerateClientFrame (ClientData *pcd)
 {
     unsigned long decor = pcd->decor;
-#ifdef PANELIST
     /* 
      * If an embedded client, there is no frame.
      */
@@ -2287,7 +2266,6 @@ void RegenerateClientFrame (ClientData *pcd)
            return;
        }
     }
-#endif /* PANELIST */
 
     /* recompute frame information */
     SetFrameInfo (pcd);
index bb039990b96c19b10fed1e62451ffe474237a711..e405d9813f6ab8741805c18d4289724724a58ddd 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmCDecor.h /main/4 1995/11/01 11:33:13 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index 1483ff7d582f176bb6f4df4a2ae71b090f06519f..8ea971541b4c9eaab26182e7f70fee923ab57a06 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.4
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmCEvent.c /main/10 1996/08/09 15:05:39 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -55,9 +50,7 @@ static char rcsid[] = "$XConsortium: WmCEvent.c /main/10 1996/08/09 15:05:39 rsw
 #include "WmFunction.h"
 #include "WmIDecor.h"
 #include "WmKeyFocus.h"
-#ifdef PANELIST
 #include "WmPanelP.h"
-#endif /* PANELIST */
 #include "WmManage.h"
 #include "WmMenu.h"
 #include "WmProperty.h"
@@ -66,9 +59,7 @@ static char rcsid[] = "$XConsortium: WmCEvent.c /main/10 1996/08/09 15:05:39 rsw
 #include "WmWinInfo.h"
 #include "WmWinList.h"
 #include "WmWinState.h"
-#ifdef WSM
 #include "WmWrkspace.h"
-#endif /* WSM */
 
 
 /*
@@ -253,10 +244,8 @@ Boolean WmDispatchClientEvent (XEvent *event)
     {
        SetActiveScreen (PSD_FOR_CLIENT(pCD));
     }
-#ifdef WSM
     /* Get workspace specific client data */
     SetClientWsIndex (pCD);
-#endif /* WSM */
 
     /*
      * Handle events on top-level client windows.
@@ -339,7 +328,6 @@ Boolean WmDispatchClientEvent (XEvent *event)
                        BaseWinExposureProc (pCD);
                    }
                }
-#ifdef PANELIST
                else if (pCD->clientFlags & FRONT_PANEL_BOX)
                {
                /*
@@ -351,7 +339,6 @@ Boolean WmDispatchClientEvent (XEvent *event)
                 */
                    dispatchEvent = True;
                }
-#endif /* PANELIST */
            }
            break;
        }
@@ -421,7 +408,6 @@ Boolean WmDispatchClientEvent (XEvent *event)
             * This is a request to change the state of the client window from
             * iconic (minimized) to normal.
             */
-#ifdef WSM
             if (!ClientInWorkspace (ACTIVE_WS, pCD))
            {
                if (pCD->absentMapBehavior == AMAP_BEHAVIOR_IGNORE)
@@ -439,9 +425,6 @@ Boolean WmDispatchClientEvent (XEvent *event)
            {
                SetClientState (pCD, NORMAL_STATE, GetTimestamp ());
            }
-#else /* WSM */
-           SetClientState (pCD, NORMAL_STATE, GetTimestamp ());
-#endif /* WSM */
            break;
        }
 
@@ -524,9 +507,7 @@ Boolean WmDispatchClientEvent (XEvent *event)
 Boolean HandleEventsOnSpecialWindows (XEvent *pEvent)
 {
     Boolean dispatchEvent = True;
-#ifdef WSM
     WmScreenData *pSD;
-#endif /* WSM */
 
 
     /*
@@ -566,7 +547,6 @@ Boolean HandleEventsOnSpecialWindows (XEvent *pEvent)
        }
        dispatchEvent = False; /* don't have the toolkit dispatch the event */
     }
-#ifdef  WSM
     else if (!XFindContext (DISPLAY, pEvent->xany.window,
                    wmGD.mwmWindowContextType, (caddr_t *)&pSD))
     {
@@ -581,7 +561,6 @@ Boolean HandleEventsOnSpecialWindows (XEvent *pEvent)
            HandleDtWmClientMessage ((XClientMessageEvent *)pEvent);
        }
     }
-#endif /* WSM */
     else
     {
        /*
@@ -804,12 +783,10 @@ void HandleCPropertyNotify (ClientData *pCD, XPropertyEvent *propertyEvent)
            {
                ProcessWmProtocols (pCD);
            }
-#ifdef WSM
            else if (propertyEvent->atom == wmGD.xa_DT_WORKSPACE_HINTS)
            {
                (void) ProcessWorkspaceHints (pCD);
            }
-#endif /* WSM */
            else if (propertyEvent->atom == wmGD.xa_MWM_MESSAGES)
            {
                if (pCD->protocolFlags & PROTOCOL_MWM_MESSAGES)
@@ -934,7 +911,6 @@ Boolean HandleCButtonPress (ClientData *pCD, XButtonEvent *buttonEvent)
               (buttonEvent->time == baseWinTime)))
        {
 
-#ifndef MOTIF_ONE_DOT_ONE
            /*
             * Motif 1.2, ignore replayed events UNPOST_AND_REPLAY events
             * generated from the menu system (time stamps are exactly
@@ -949,12 +925,8 @@ Boolean HandleCButtonPress (ClientData *pCD, XButtonEvent *buttonEvent)
            {
                ProcessClickBPress (buttonEvent, pCD, context, subContext);
            }
-#else
-           ProcessClickBPress (buttonEvent, pCD, context, subContext);
-#endif
 
-           if (CheckForButtonAction (buttonEvent, context, subContext, pCD) 
-               && pCD)
+           if (CheckForButtonAction (buttonEvent, context, subContext, pCD))
            {
                /*
                 * Button bindings have been processed, now check for bindings
@@ -2586,12 +2558,10 @@ void HandleClientMessage (ClientData *pCD, XClientMessageEvent *clientEvent)
        {
            newState = NORMAL_STATE;
        }
-#ifdef WSM
        if (!ClientInWorkspace (ACTIVE_WS, pCD))
        {
            newState |= UNSEEN_STATE;
        }
-#endif /* WSM */
 
        SetClientState (pCD, newState, GetTimestamp ());
 
@@ -2754,8 +2724,7 @@ void DetermineActiveScreen (XEvent *pEvent)
  * 
  *************************************<->***********************************/
 
-WmScreenData * GetScreenForWindow (win)
-    Window win;
+WmScreenData * GetScreenForWindow (Window win)
 
 {
     XWindowAttributes attribs;
index a2ad26560cd23cc65fc2b7803ec5073748b1dafc..907a82be8e0d3ed070e9b79db86317bb7259affa 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmCEvent.h /main/4 1995/11/01 11:34:01 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index d0819d465364994b2e5216c9c1fb873b09c5ab09..dfa42aee52ce06fb2bce923b8d2be67d51dcb5ea 100644 (file)
 */ 
 /* 
  * Motif Release 1.2
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmCPlace.c /main/5 1996/08/09 15:18:04 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index 210323396df7605d55872138528e89a8381b8719..8f53c41862ccc4ea3c717268a9b1848c2bd2751c 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2.2
 */ 
-/*   $XConsortium: WmCPlace.h /main/4 1995/11/01 11:34:34 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index d90f2af507f5c5b80e139230400f00b6b43653cf..5d8d9ddf748c88fd678ab6df6a616641e1707f1f 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.3
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmColormap.c /main/5 1996/10/30 11:14:44 drk $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -554,7 +549,7 @@ void
 ProcessColormapList (WmScreenData *pSD, ClientData *pCD)
 
 {
-       register int i;
+       int i;
        XEvent event;
 
 
index 797a103938791203345779397f7b9aee2b12a5d4..9562e9d8ff7282cb94c0692ddf1224ad96ec624e 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmColormap.h /main/4 1995/11/01 11:35:11 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index 2a8c429dc2d468bdb917a9d86cdc6dbe03a69a05..23d5cf461edc7fc2e80fd66d19daff7bb20bfd17 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.4
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmError.c /main/6 1996/10/07 14:27:34 drk $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -41,9 +36,7 @@ static char rcsid[] = "$XConsortium: WmError.c /main/6 1996/10/07 14:27:34 drk $
 
 #include "WmGlobal.h"
 #include <stdio.h>
-#ifdef WSM
 #include <Dt/UserMsg.h>
-#endif /* WSM */
 #include "WmXSMP.h"
 
 /*
@@ -324,21 +317,15 @@ WmXtWarningHandler (char *message)
 void
 Warning (char *message)
 {
-#ifdef WSM
     char pch[MAXWMPATH+1];
 
     sprintf (pch, "%s: %s\n", 
        GETMESSAGE(20, 1, "Workspace Manager"), message);
 
     _DtSimpleError (wmGD.mwmName, DtIgnore, NULL, pch, NULL);
-#else /* WSM */
-    fprintf (stderr, "%s: %s\n", wmGD.mwmName, message);
-    fflush (stderr);
-#endif /* WSM */
 
 } /* END OF FUNCTION Warning */
 
-#ifdef WSM
 #ifdef DEBUGGER
 \f
 /******************************<->*************************************
@@ -371,4 +358,3 @@ PrintFormatted(char *f, char *s0, char *s1, char *s2, char *s3, char *s4, char *
 
 /************************    eof   **************************/
 #endif /* DEBUGGER */
-#endif /* WSM */
index abf7f1eaf1e7ef60fecf6d0d77d93d8d971d9d44..86070898160b481f1a7b513bad2b04b9d52bb0ba 100644 (file)
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmError.h /main/5 1996/09/14 14:49:17 drk $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
-#ifdef WSM
 #ifdef DEBUGGER
 extern void PrintFormatted(char *f, char *s0, char *s1, char *s2, char *s3, char *s4, char *s5, char *s6, char *s7, char *s8, char *s9);
 #endif /* DEBUGGER */
-#endif /* WSM */
 extern void WmInitErrorHandler (Display *display);
 extern int WmXErrorHandler (Display *display, XErrorEvent *errorEvent);
 extern int WmXIOErrorHandler (Display *display);
@@ -45,6 +42,4 @@ extern void Warning (char *message);
 #ifndef NO_MESSAGE_CATALOG
 extern char * GetMessage(int set, int n, char * s);
 #endif
-#ifdef WSM
 /****************************   eof    ***************************/
-#endif /* WSM */
index b1733d0d85f671aa8f28d8cd8a9cabfcf6caa995..1c0849f9611eef9ed38294a09899aca496fe05fc 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.4
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmEvent.c /main/7 1996/11/20 15:27:47 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990, 1993, 1994 HEWLETT-PACKARD COMPANY 
  * (c) Copyright 1993, 1994 International Business Machines Corp.
@@ -49,38 +44,29 @@ static char rcsid[] = "$XConsortium: WmEvent.c /main/7 1996/11/20 15:27:47 rswis
  */
 #include "WmEvent.h"
 #include "WmError.h"
-#ifdef WSM
 #include "WmBackdrop.h"
 #include "WmWrkspace.h"
-#endif /* WSM */
 #include "WmCDInfo.h"
 #include "WmCDecor.h"
 #include "WmCEvent.h"
 #include "WmColormap.h"
 #include "WmFunction.h"
 #include "WmKeyFocus.h"
-#ifdef PANELIST
 #include "WmPanelP.h"  /* for typedef in WmManage.h */
-#endif /* PANELIST */
 #include "WmManage.h"
 #include "WmMenu.h"
-#ifdef WSM
 #include "WmICCC.h"
 #include "WmProperty.h"
-#endif /* WSM */
 #include "WmWinInfo.h"
 #include "WmWinState.h"
-#ifdef PANELIST
 #include "WmResNames.h"
 #include "WmResParse.h"
 #include "WmParse.h"
 #include "WmParseP.h"
-#endif /* PANELIST */
 
 #include <Xm/RowColumnP.h> /* for MS_LastManagedMenuTime */
 extern XmMenuState _XmGetMenuState();
 
-#ifdef WSM
 /*
  * FUNCTION PARSER TABLE
  */
@@ -94,7 +80,6 @@ typedef struct {
    Boolean       (*parseProc)();
 } FunctionTableEntry;
 
-#endif /* WSM */
 
 
 /*
@@ -102,15 +87,11 @@ typedef struct {
  */
 
 extern unsigned int buttonModifierMasks[];
-#ifdef WSM
 int smAckState = SM_UNITIALIZED;
 extern FunctionTableEntry functionTable[];
 extern int F_NOP_INDEX;
-#endif /* WSM */
 
-#ifndef MOTIF_ONE_DOT_ONE
 #include <Xm/MenuShellP.h>
-#endif
 
 
 \f
@@ -684,12 +665,8 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event)
                               (short) wmGD.hotspotRectangle.width)) &&
             (event->y_root < (wmGD.hotspotRectangle.y + 
                               (short) wmGD.hotspotRectangle.height))&&
-#ifdef WSM
             (pCD || 
              (wmGD.rootButtonClick && wmGD.clickData.clickPending)))
-#else /* WSM */
-            pCD)
-#endif /* WSM */
     {
        /*   ^^^
         * Added check for NULL pCD in the above condition.
@@ -707,10 +684,8 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event)
 
        if (event->type == ButtonRelease)
        {
-#ifdef WSM
           if (pCD)
          {
-#endif /* WSM */
            /*
             * The system menu is posted from a system menu button or an
             * icon.  By doing a button release over the system menu button
@@ -725,15 +700,9 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event)
            {
                PopGadgetOut (pCD, FRAME_SYSTEM);
            }
-#ifdef MOTIF_ONE_DOT_ONE
-           TraversalOn (pCD->systemMenuSpec);
-           doXtDispatchEvent = False;
-#else
            _XmGetMenuState(XtParent(pCD->systemMenuSpec->menuWidget))
                ->MS_LastManagedMenuTime = ((XButtonEvent *)event)->time;
            doXtDispatchEvent = True;
-#endif
-#ifdef WSM
           }
          else if ((!wmGD.clickData.pCD) && 
              (((XButtonEvent *)event)->button == wmGD.clickData.button) &&
@@ -765,19 +734,13 @@ Boolean WmDispatchMenuEvent (XButtonEvent *event)
 
                 if (timeDiff < wmGD.doubleClickTime)
                 {
-#ifdef MOTIF_ONE_DOT_ONE
-                  TraversalOn (wmGD.menuActive);
-                  doXtDispatchEvent = False;
-#else
                   _XmGetMenuState (XtParent(wmGD.menuActive->menuWidget))
                       ->MS_LastManagedMenuTime =
                           ((XButtonEvent *)event)->time;
                   doXtDispatchEvent = True;
-#endif
                 }
            wmGD.clickData.clickPending = False;
            }
-#endif /* WSM */
        }
        else
        {
@@ -1247,9 +1210,6 @@ Boolean HandleKeyPress (XKeyEvent *keyEvent,
                }
 
              if ((keySpecs->wmFunction == F_Menu) ||
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-                 (keySpecs->wmFunction == F_Post_RMenu) ||
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
                  (keySpecs->wmFunction == F_Post_SMenu))
                {
                  wmGD.menuUnpostKeySpec = keySpecs;  /* menu unpost key spec */
@@ -1810,9 +1770,7 @@ void ProcessClickBPress (XButtonEvent *buttonEvent, ClientData *pCD, Context con
         wmGD.clickData.time = buttonEvent->time;
         wmGD.clickData.clickPending = True;
         wmGD.clickData.doubleClickPending = True;
-#ifdef WSM
         wmGD.clickData.bReplayed = wmGD.bReplayedButton;
-#endif /* WSM */
     }
 
 
@@ -1891,9 +1849,6 @@ void ProcessClickBRelease (XButtonEvent *buttonEvent, ClientData *pCD, Context c
 
 } /* END OF FUNCTION ProcessClickBRelease */
 
-
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  HandleDtWmClientMessage (clientEvent)
@@ -2141,9 +2096,6 @@ HandleDtWmRequest (WmScreenData *pSD, XEvent *pev)
 } /* END OF FUNCTION HandleDtWmRequest */
 
 
-#endif /* WSM */
-
-\f
 /*************************************<->*************************************
  *
  *  HandleWsEnterNotify (enterEvent)
@@ -2601,41 +2553,6 @@ Time GetTimestamp (void)
 
 } /* END OF FUNCTION GetTimestamp */
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  LastTime ()
- *
- *
- *  Description:
- *  -----------
- *  This function is used to provide a timestamp for use with X calls that
- *  require a timestamp. It returns the last timestamp processed if one
- *  exists or it generates a new one.
- *
- *
- *  Inputs:
- *  ------
- *  none
- * 
- *  Outputs:
- *  -------
- *  Return = a timestamp value - NOT CurrentTime
- *
- *************************************<->***********************************/
-
-Time LastTime ()
-{
-  Time evTime;
-
-  if (! (evTime = XtLastTimestampProcessed(DISPLAY)) )
-    evTime = GetTimestamp();
-
-  return (evTime);
-}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-\f
 /*************************************<->*************************************
  *
  *  PullExposureEvents ()
@@ -2666,20 +2583,14 @@ void PullExposureEvents (void)
      * Force the exposure events into the queue
      */
     XSync (DISPLAY, False);
-#ifdef WSM
     XSync (DISPLAY1, False);
-#endif /* WSM */
     /*
      * Selectively extract the exposure events
      */
-#ifdef WSM
     while (XCheckMaskEvent (DISPLAY, 
               ExposureMask|VisibilityChangeMask, &event) ||
           XCheckMaskEvent (DISPLAY1, 
               ExposureMask|VisibilityChangeMask, &event))
-#else /* WSM */
-    while (XCheckMaskEvent (DISPLAY, ExposureMask, &event))
-#endif /* WSM */
     {
         /*
         * Check for, and process non-widget events.  The events may be
@@ -2687,11 +2598,9 @@ void PullExposureEvents (void)
         * to an icon window, or to a "special" window management window.
         */
 
-#ifdef WSM
       switch (event.type)
       {
        case Expose:
-#endif /* WSM */
        if (event.xany.window == ACTIVE_ROOT)
        {
            dispatchEvent = WmDispatchWsEvent (&event);
@@ -2700,11 +2609,9 @@ void PullExposureEvents (void)
        {
            dispatchEvent = WmDispatchClientEvent (&event);
        }
-#ifdef WSM
        default:
        dispatchEvent = True;
       }
-#endif /* WSM */
 
        if (dispatchEvent)
        {
@@ -2718,8 +2625,6 @@ void PullExposureEvents (void)
 
 } /* END OF FUNCTION PullExposureEvents */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  ReplayedButtonEvent ()
@@ -2770,4 +2675,3 @@ ReplayedButtonEvent (
 
     return (rval);
 }
-#endif /* WSM */
index 65fcda74021bbbea472612ed59d6b20a5e3a7389..298f1a9e8badbd7f07bad9c3dba84af63505ca19 100644 (file)
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmEvent.h /main/5 1996/06/11 15:59:25 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
-#ifdef WSM
 /* Shared Variables */
 extern int smAckState;
 
-#endif /* WSM */
 
 extern Boolean CheckForButtonAction (XButtonEvent *buttonEvent, 
                                     Context context, Context subContext, 
                                     ClientData *pCD);
 extern Time GetTimestamp (void);
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-extern Time LastTime (void);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 extern Boolean HandleKeyPress (XKeyEvent *keyEvent, KeySpec *keySpecs, 
                               Boolean checkContext, Context context, 
                               Boolean onlyFirst, ClientData *pCD);
@@ -75,8 +69,6 @@ extern void WmGrabKey (Display *display, int keycode, unsigned int modifiers,
                int keyboard_mode);
 extern void WmUngrabButton (Display *display, unsigned int button,
                unsigned int modifiers, Window grab_window);
-#ifdef WSM
 extern void HandleDtWmClientMessage (XClientMessageEvent *clientEvent);
 extern void HandleDtWmRequest (WmScreenData *pSD, XEvent *pev);
 extern Boolean ReplayedButtonEvent (XButtonEvent *pevB1, XButtonEvent *pevB2);
-#endif /* WSM */
index 48a8b6293e9ef98a929d6fb3d406079690ffa7c0..1ec9519633252dace076623d50a7dc744ff925ed 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: WmFP.c /main/4 1995/11/01 11:36:41 rswiston $ */
 /*****************************************************************************
  *
  *   File:         WmFP.c
@@ -365,8 +364,7 @@ EmbeddedClientRegister (ControlData * control_data,
  ************************************************************************/
 
 static void
-EmbeddedClientSetData ()
-
+EmbeddedClientSetData (void)
 {
    WmScreenData *pSD;
    int i;
@@ -556,8 +554,7 @@ PushRecallRegister (ControlData * control_data,
  ************************************************************************/
 
 static void
-PushRecallSetData ()
-
+PushRecallSetData (void)
 {
    WmScreenData *pSD;
    int i;
index b15d01c98da3e1466200269326f362dd3a3efd13..3b8800de3e481cdf04331c2bfdd100d03b6ad755 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.3
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmFeedback.c /main/6 1996/10/23 17:20:55 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -64,9 +59,7 @@ static char rcsid[] = "$XConsortium: WmFeedback.c /main/6 1996/10/23 17:20:55 rs
 #include "WmFeedback.h"
 #include "WmFunction.h"
 #include "WmGraphics.h"
-#ifdef PANELIST
 #include "WmPanelP.h"  /* for typedef in WmManage.h */
-#endif /* PANELIST */
 #include "WmManage.h"
 #include "WmColormap.h"
 #include "stdio.h"
@@ -87,7 +80,7 @@ static char *confirm_mesg[4] = {"Switch to Default Behavior?",
 
 
 void
-initMesg()
+initMesg(void)
 {
 
     char * tmpString;
@@ -155,7 +148,6 @@ initMesg()
     }
     else
     {
-#ifdef MINIMAL_DT
        if (wmGD.dtLite)
        {
            tmpString = ((char *)GETMESSAGE(22, 9, "Log out?"));
@@ -164,9 +156,6 @@ initMesg()
        {
            tmpString = ((char *)GETMESSAGE(22, 11, "QUIT Workspace Manager?"));
        }
-#else /* MINIMAL_DT */
-       tmpString = ((char *)GETMESSAGE(22, 11, "QUIT Workspace Manager?"));
-#endif /* MINIMAL_DT */
     }
     
     if ((confirm_mesg[3] =
@@ -178,7 +167,6 @@ initMesg()
            confirm_mesg[3] = "QUIT Mwm?";
        }
        else
-#ifdef MINIMAL_DT
        if (wmGD.dtLite)
        {
            confirm_mesg[3] = "Log out?";
@@ -187,9 +175,6 @@ initMesg()
        {
            confirm_mesg[3] = "QUIT Workspace Manager?";
        }
-#else /* MINIMAL_DT */
-       tmpString = ((char *)GETMESSAGE(22, 11, "QUIT Workspace Manager?"));
-#endif /* MINIMAL_DT */
     }
     else
     {
@@ -397,7 +382,7 @@ void ShowFeedbackWindow (WmScreenData *pSD, int x, int y, unsigned int width, un
      * Make the feedback window visible (map it)
      */
 
-    if (pSD->feedbackWin)
+    if (pSD && pSD->feedbackWin)
     {
        /* Make sure the feedback window doesn't get buried */
        XRaiseWindow(DISPLAY, pSD->feedbackWin);
@@ -437,13 +422,13 @@ void PaintFeedbackWindow (WmScreenData *pSD)
        /* 
         * draw beveling 
         */
-       if (pSD->fbTop->used > 0) 
+       if (pSD->fbTop && pSD->fbTop->used > 0) 
        {
            XFillRectangles (DISPLAY, pSD->feedbackWin, 
                             pSD->feedbackAppearance.inactiveTopShadowGC,
                             pSD->fbTop->prect, pSD->fbTop->used);
        }
-       if (pSD->fbBottom->used > 0) 
+       if (pSD->fbBottom && pSD->fbBottom->used > 0) 
        {
            XFillRectangles (DISPLAY, pSD->feedbackWin, 
                             pSD->feedbackAppearance.inactiveBottomShadowGC,
@@ -658,11 +643,7 @@ void UpdateFeedbackText (WmScreenData *pSD, int x, int y, unsigned int width, un
  * 
  *************************************<->***********************************/
 
-static void OkCB (w, client_data, call_data)
-
-   Widget w;
-   caddr_t client_data;
-   caddr_t call_data;
+static void OkCB (Widget w, caddr_t client_data, caddr_t call_data)
 {
     WithdrawDialog (w);
 
@@ -700,11 +681,7 @@ static void OkCB (w, client_data, call_data)
  * 
  *************************************<->***********************************/
 
-static void CancelCB (w, client_data, call_data)
-
-   Widget w;
-   caddr_t client_data;
-   caddr_t call_data;
+static void CancelCB (Widget w, caddr_t client_data, caddr_t call_data)
 {
     WithdrawDialog (w);
 
@@ -747,7 +724,7 @@ static void CancelCB (w, client_data, call_data)
 void ConfirmAction (WmScreenData *pSD, int nbr)
 {
     Arg           args[8];
-    register int  n;
+    int  n;
     int           x, y;
     Dimension     width, height;
     Widget        dialogShellW = NULL;
index cb31980dd4c608b0e4154599c56233c3c8a4101d..004e47ab8014ee40ef5dad00cfdac75232bbbb11 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmFeedback.h /main/4 1995/11/01 11:37:25 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index b2b462d64d3aed06b8f326320e3ad2b537019bc9..1f9c50daa190b695a98599766f1db0d5e6d0056f 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.4
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmFunction.c /main/19 1998/04/20 13:00:48 mgreess $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990, 1993, 1994 HEWLETT-PACKARD COMPANY 
  * (c) Copyright 1993, 1994 International Business Machines Corp.
@@ -44,49 +39,36 @@ static char rcsid[] = "$TOG: WmFunction.c /main/19 1998/04/20 13:00:48 mgreess $
  */
 
 #include "WmGlobal.h"
-#ifndef WSM
-#include <signal.h>
-#endif
 #include <stdio.h>
 #include <X11/Xos.h>
 #include "WmICCC.h"
-#ifdef WSM
 #include "WmWrkspace.h"  /* for ClientInWorkspace() test */
 #include <Dt/EnvControlP.h>  /* for restoring **environ before an exec() */
 #include "WmResNames.h"
 #include <Dt/Message.h>
 #include <Dt/Help.h>
-#endif /* WSM */
-#ifdef PANELIST
 #include <Dt/DtStrDefs.h>
 #include "WmPanelP.h"
 #include "WmSignal.h"
 #include "WmManage.h"
-#endif /* PANELIST */
 
 /*
  * include extern functions
  */
 #include "WmFunction.h"
 #include "WmCEvent.h"
-#ifdef WSM
 #include "WmHelp.h"
-#endif /* WSM */
 #include "WmCDInfo.h"
 #include "WmColormap.h"
 #include "WmError.h"
 #include "WmEvent.h"
 #include "WmFeedback.h"
-#ifdef WSM
 #include "WmIPC.h"
-#endif /* WSM */
 #include "WmIPlace.h"
 #include "WmIconBox.h"
 #include "WmKeyFocus.h"
 #include "WmMenu.h"
-#ifdef WSM
 #include "WmPresence.h"
-#endif /* WSM */
 #include "WmProperty.h"
 #include "WmProtocol.h"
 #include "WmResParse.h"
@@ -107,15 +89,12 @@ extern pid_t vfork();
 
 static unsigned int GetEventInverseMask(XEvent *event);
 
-#ifdef WSM
-
 #if (defined(__linux__) || defined(sun) || defined(CSRG_BASED)) && !defined(_NFILE)
 #define _NFILE FOPEN_MAX
 #endif
 #define CLOSE_FILES_ON_EXEC() \
 {int ifx; for (ifx=3; ifx < _NFILE; ifx++) (void) fcntl (ifx, F_SETFD, 1);}
 
-#endif /* WSM */
 /*
  * Global Variables:
  */
@@ -127,8 +106,6 @@ static unsigned int GetEventInverseMask(XEvent *event);
 static ClientData *dirtyStackEntry = NULL;
 static ClientData *dirtyLeader = NULL;
 
-#ifdef WSM
-\f
 /***********************<->*************************************
  *
  *  F_Action (args, pCD, event)
@@ -193,9 +170,7 @@ F_Action (String actionName, ClientData *pCD, XEvent *event)
     return (True);
     
 } /* END OF FUNCTION F_Action */
-#endif /* WSM */
 
-\f
 /******************************<->*************************************
  *
  *  F_Beep (args, pCD, event)
@@ -243,8 +218,7 @@ Boolean F_Beep (String args, ClientData *pCD, XEvent *event)
  * is to restack the dirty transient relative to the second to the
  * top transient.  This function is used to support freeFamily stacking.
  */
-ClientData * FindSecondToTopTransient (pcd)
-ClientData *pcd;
+ClientData * FindSecondToTopTransient (ClientData *pcd)
 {
     ClientData *pcdNext;
     static ClientData *second;
@@ -281,7 +255,6 @@ Boolean ForceLowerWindow (ClientData *pcd)
 #endif
     XWindowChanges changes;
     Boolean restack = False;
-#ifdef WSM
     Window stackWindow;
     WmScreenData *pSD = (ACTIVE_WS)->pSD;
     unsigned int mask;
@@ -323,7 +296,6 @@ Boolean ForceLowerWindow (ClientData *pcd)
            pCLE = pCLE->prevSibling;
        }
     }
-#endif /* WSM */
 #if 0
     if (pSD->lastClient->type == MINIMIZED_STATE)
     {
@@ -336,15 +308,10 @@ Boolean ForceLowerWindow (ClientData *pcd)
 #endif
 
     changes.stack_mode = Below;
-#ifdef WSM
     if (mask)
     {
        XConfigureWindow (DISPLAY, pcd->clientFrameWin, mask, &changes);
     }
-#else /* WSM */
-    XConfigureWindow (DISPLAY, pcd->clientFrameWin, CWStackMode,
-                     &changes);
-#endif /* WSM */
 
     return (restack);
 }
@@ -386,9 +353,7 @@ Boolean F_Lower (String args, ClientData *pCD, XEvent *event)
     ClientListEntry *pStackEntry;
     String string = args;
     int flags = STACK_NORMAL;
-#ifdef WSM
     WmWorkspaceData *pWS = ACTIVE_WS;
-#endif /* WSM */
 
     if (string)
     {
@@ -405,15 +370,11 @@ Boolean F_Lower (String args, ClientData *pCD, XEvent *event)
                                                        string, F_GROUP_ALL)))
            {
                pNextEntry = pEntry->prevSibling;
-#ifdef WSM
                if (ClientInWorkspace (pWS, pEntry->pCD))
                {
-#endif /* WSM */
                Do_Lower (pEntry->pCD, pStackEntry, STACK_NORMAL);
                pStackEntry = pEntry;
-#ifdef WSM
                }
-#endif /* WSM */
            }
        }
        /* process family stacking stuff */
@@ -437,26 +398,18 @@ Boolean F_Lower (String args, ClientData *pCD, XEvent *event)
                }
                index += len;
            }
-#ifdef WSM
            if (ClientInWorkspace (pWS, pCD))
            {
-#endif /* WSM */
            Do_Lower (pCD, (ClientListEntry *) NULL, flags);
-#ifdef WSM
            }
-#endif /* WSM */
        }
     }
     else if (pCD)
     {
-#ifdef WSM
            if (ClientInWorkspace (pWS, pCD))
            {
-#endif /* WSM */
        Do_Lower (pCD, (ClientListEntry *) NULL, STACK_NORMAL);
-#ifdef WSM
            }
-#endif /* WSM */
     }
 
     /*
@@ -500,11 +453,8 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
     Boolean restackTransients;
     ClientData *pcdLeader;
     WmWorkspaceData *pWS = ACTIVE_WS;
-#ifdef WSM
     Boolean bLeaderRestacked;
-#endif /* WSM */
 
-#ifdef PANELIST
     if (pCD->pECD)
     {
        /*
@@ -514,9 +464,6 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
        return;
     }
     else 
-#else /* PANELIST */
-#endif /* PANELIST */
-#ifdef WSM
     if (ClientInWorkspace(pWS, pCD)  && 
        (!pStackEntry || ClientInWorkspace (pWS, pStackEntry->pCD)))
     {
@@ -538,7 +485,6 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
         */
        return;
     }
-#endif /* WSM */
 
     pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD;
 
@@ -584,7 +530,6 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
     }
     else /* NORMAL_STATE, MAXIMIZED_STATE, adoption */
     {
-#ifdef WSM
         /*
         * Handle restacking of primary/secondary windows
         * within the transient window tree.
@@ -629,7 +574,7 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
            }
 
        }
-#endif /* WSM */
+
        /*
         * If this is a transient window then put it below its
         * sibling transient windows.
@@ -711,11 +656,7 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
                MoveEntryInList (pWS, &pcdLeader->clientEntry, True /*above*/,
                    pStackEntry);
            }
-#ifdef WSM
            else if ((restackTransients) || (bLeaderRestacked))
-#else /* WSM */
-           else if (restackTransients)
-#endif /* WSM */
            {
                RestackTransients (pCD);
            }
@@ -732,11 +673,7 @@ void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
                MoveEntryInList (pWS, &pcdLeader->clientEntry,
                    False /*on bottom*/, (ClientListEntry *) NULL);
            }
-#ifdef WSM
            else if ((restackTransients) || (bLeaderRestacked))
-#else /* WSM */
-           else if (restackTransients)
-#endif /* WSM */
            {
                RestackTransients (pCD);
            }
@@ -823,13 +760,9 @@ Boolean F_Circle_Down (String args, ClientData *pCD, XEvent *event)
                     * on the screen.  Lower the window.
                     */
 
-#ifdef WSM
                    wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
                    F_Lower (NULL, pcdNext, (XEvent *) NULL);
-#ifdef WSM
                    wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
                    break;
                }
            }
@@ -919,13 +852,9 @@ Boolean F_Circle_Up (String args, ClientData *pCD, XEvent *event)
                     * window on the screen.  Raise the window.
                     */
 
-#ifdef WSM
                    wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
                    F_Raise (NULL, pcdNext, (XEvent *) NULL);
-#ifdef WSM
                    wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
                    break;
                }
            }
@@ -996,12 +925,6 @@ Boolean F_Focus_Color (String args, ClientData *pCD, XEvent *event)
 Boolean F_Exec (String args, ClientData *pCD, XEvent *event)
 {
     int   pid;
-#ifndef WSM
-    int   status;
-    int   w;
-    void (*intStat) ();
-    void (*quitStat) ();
-#endif /* WSM */
     char *shell;
     char *shellname;
 
@@ -1012,7 +935,6 @@ Boolean F_Exec (String args, ClientData *pCD, XEvent *event)
        putenv(wmGD.pActiveSD->displayString);
       }
     
-#ifdef PANELIST
     if (wmGD.dtSD)
     {
        /*
@@ -1021,7 +943,6 @@ Boolean F_Exec (String args, ClientData *pCD, XEvent *event)
         */
        WmFrontPanelSetBusy (True);
     }
-#endif /* PANELIST */
 
     /*
      * Fork a process to exec a shell to run the specified command:
@@ -1048,7 +969,7 @@ Boolean F_Exec (String args, ClientData *pCD, XEvent *event)
 #endif /* SYSV */
 #endif /* SVR4 */
 #endif /* NO_SETPGRP */
-#ifdef WSM 
+
        /*
         * Clean up window manager resources.
         * The X file descriptor should be automatically closed.
@@ -1067,7 +988,6 @@ Boolean F_Exec (String args, ClientData *pCD, XEvent *event)
         _DtEnvControl(DT_ENV_RESTORE_PRE_DT);
 
         CLOSE_FILES_ON_EXEC();
-#endif /* WSM */
 
        /*
         * Exec the command using $MWMSHELL if set or 
@@ -1122,28 +1042,10 @@ Boolean F_Exec (String args, ClientData *pCD, XEvent *event)
      * Have the window manager wait for the shell to complete.
      */
 
-#ifndef WSM
-    intStat = (void (*)())signal (SIGINT, SIG_IGN);
-    quitStat = (void (*)())signal (SIGQUIT, SIG_IGN);
-#endif /* WSM */
-
-#ifdef WSM
     /*
      * Don't need to wait because WSM sets SIGCLD handler
      */
-#else /* WSM */
-    while ((w = wait (&status)) != pid && (w != -1));
-
-    if (w == -1)
-    {
-       status = -1;
-    }
-#endif /* WSM */
 
-#ifndef WSM
-    signal (SIGINT, intStat);
-    signal (SIGQUIT, quitStat);
-#endif /* WSM */
 
     /*
      * Restore original DISPLAY environment variable value
@@ -1224,9 +1126,7 @@ void Do_Quit_Mwm (Boolean diedOnRestart)
        {
            if (wmGD.Screens[scr].managed)
            {
-#ifdef WSM
                SaveResources(&wmGD.Screens[scr]);
-#endif /* WSM */
                pNextEntry = wmGD.Screens[scr].lastClient;
                while (pNextEntry)
                {
@@ -1240,20 +1140,12 @@ void Do_Quit_Mwm (Boolean diedOnRestart)
                    }
                    pNextEntry = pNextEntry->prevSibling;
                }
-#if defined(PANELIST)
                UnParentControls (&wmGD.Screens[scr], False);
-#endif /* PANELIST */
 
-#ifndef WSM
-               XDeleteProperty(DISPLAY, wmGD.Screens[scr].rootWindow,
-                               wmGD.xa_MWM_INFO);
-#endif /* WSM */
            }
        }
-#ifdef WSM
        /* shut down the messaging connection */
        dtCloseIPC();
-#endif /* WSM */
        ResignFromSM();
         XSync (DISPLAY, False);
         XCloseDisplay (DISPLAY);
@@ -1300,14 +1192,9 @@ void ReBorderClient (ClientData *pCD, Boolean reMapClient)
            (!(reMapClient)))
         {
            XUnmapWindow (DISPLAY, pCD->iconWindow);
-#ifdef WSM
            XReparentWindow (DISPLAY, pCD->iconWindow, 
                ROOT_FOR_CLIENT(pCD), pCD->pWsList->iconX, 
                pCD->pWsList->iconY);
-#else /* WSM */
-           XReparentWindow (DISPLAY, pCD->iconWindow, 
-               ROOT_FOR_CLIENT(pCD), pCD->iconX, pCD->iconY);
-#endif /* WSM */
         }
 
        if (!(reMapClient))
@@ -1443,9 +1330,7 @@ static Window FindSomeReasonableClient(void)
        {
            if ((pNextEntry->type != MINIMIZED_STATE) &&
                (pCD->clientState != MINIMIZED_STATE) &&
-#ifdef WSM
                 (ClientInWorkspace (ACTIVE_WS, pCD)) &&
-#endif /* WSM */
                (pCD != pcdNoFocus))
            {
                if (pCD->transientChildren)
@@ -1471,12 +1356,8 @@ static Window FindSomeReasonableClient(void)
      * Set the focus window if one is found
      */
 
-#ifdef WSM
     if (pcdLastFocus && 
        ClientInWorkspace (ACTIVE_WS, pcdLastFocus))
-#else /* WSM */
-    if (pcdLastFocus)
-#endif /* WSM */
       focusWindow = pcdLastFocus->client;
 
     /*
@@ -1492,19 +1373,15 @@ static Window FindSomeReasonableClient(void)
        {
            pCD = pNextEntry->pCD;
 
-#ifdef WSM
           if (ClientInWorkspace (ACTIVE_WS, pCD))
          {
-#endif /* WSM */
            if ((pNextEntry->type == MINIMIZED_STATE) ||
                (pCD->clientState == MINIMIZED_STATE))
            {
                focusWindow = ICON_FRAME_WIN(pCD);
                break;
            }
-#ifdef WSM
          }
-#endif /* WSM */
            pNextEntry = pNextEntry->nextSibling;
        }
     }
@@ -1547,15 +1424,11 @@ void Do_Focus_Key (ClientData *pCD, Time focusTime, long flags)
     wmGD.replayEnterEvent = False;
 
     pcdFocus = pCD;
-#ifdef WSM
     /* 
      * Make sure the client is in the current workspace
      */
     if ((pCD) &&
        (ClientInWorkspace (ACTIVE_WS, pCD)))
-#else /* WSM */
-    if (pCD)
-#endif /* WSM */
     {
        if (pCD->clientState == MINIMIZED_STATE)
        {
@@ -1801,8 +1674,6 @@ void Do_Focus_Key (ClientData *pCD, Time focusTime, long flags)
 } /* END OF FUNCTION Do_Focus_Key */
 
 
-#ifdef WSM
-\f
 /***********************<->*************************************
  *
  *  F_Goto_Workspace (args, pCD, event)
@@ -1865,10 +1736,7 @@ F_Goto_Workspace (String args, ClientData *pCD, XEvent *event)
     return (False);
 }  /* END OF FUNCTION F_Goto_Workspace */
 
-#endif /* WSM */
 
-#ifdef WSM
-\f
 /******************************<->*************************************
  *
  *  Boolean F_Help (String args, ClientData *pCD, XEvent *event)
@@ -1894,14 +1762,10 @@ F_Goto_Workspace (String args, ClientData *pCD, XEvent *event)
 Boolean
 F_Help (String args, ClientData *pCD, XEvent *event)
 {
-#ifdef PANELIST
     Boolean rval;
 
     rval = WmDtHelp(args);
     return (rval);
-#endif /* PANELIST */    
-    
-
 }  /* END OF FUNCTION F_Help */
 
 \f
@@ -1930,7 +1794,6 @@ F_Help (String args, ClientData *pCD, XEvent *event)
 Boolean
 F_Help_Mode (String args, ClientData *pCD, XEvent *event)
 {
-#ifdef PANELIST
     /*
      * Help mode event processing interferes
      * with slide up windows. Don't continue
@@ -1941,12 +1804,9 @@ F_Help_Mode (String args, ClientData *pCD, XEvent *event)
        (void) WmDtHelpMode();
     }
     return (False);
-#endif /* PANELIST */    
-
 }  /* END OF FUNCTION F_Help_Mode */
 
-#endif /* WSM */
-\f
+
 /******************************<->*************************************
  *
  *  F_Next_Key (args, pCD, event)
@@ -2105,8 +1965,6 @@ Boolean F_Prev_Key (String args, ClientData *pCD, XEvent *event)
 
 } /* END OF FUNCTION F_Prev_Key */
 
-#ifdef PANELIST
-\f
 /***********************<->*************************************
  *
  *  F_Post_FpMenu (args, pCD, event)
@@ -2255,13 +2113,9 @@ F_Push_Recall (String args, ClientData *pCD, XEvent *event)
            }
 
            /* Make this client visible */
-#ifdef WSM
                    wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
            F_Normalize_And_Raise (NULL, pPRCD->pCD, event);
-#ifdef WSM
                    wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
        }
        else 
        {
@@ -2322,7 +2176,6 @@ F_Push_Recall (String args, ClientData *pCD, XEvent *event)
     return (True);
 
 } /* END OF FUNCTION F_Push_Recall */
-#endif /* PANELIST */
 
 \f
 /*************************************<->*************************************
@@ -2345,11 +2198,7 @@ F_Push_Recall (String args, ClientData *pCD, XEvent *event)
  *
  *************************************<->***********************************/
 
-Boolean F_Pass_Key (args, pCD, event)
-    String args;
-    ClientData *pCD;
-    XEvent *event;
-
+Boolean F_Pass_Key (String args, ClientData *pCD, XEvent *event)
 {
     if (wmGD.passKeysActive)
     {
@@ -2437,7 +2286,6 @@ Boolean F_Menu (String args, ClientData *pCD, XEvent *event)
        {
            flags |= POST_TRAVERSAL_ON;
        }
-#ifdef WSM
        /*
         * Root menu, if posted with button press, then 
         * set up to handle root menu click to make the menu
@@ -2457,7 +2305,6 @@ Boolean F_Menu (String args, ClientData *pCD, XEvent *event)
            wmGD.hotspotRectangle.width = wmGD.moveThreshold;
            wmGD.hotspotRectangle.height = wmGD.moveThreshold;
        }
-#endif /* WSM */
     }
     else if (event && 
        ((event->type == KeyPress) || (event->type == KeyRelease)))
@@ -2702,7 +2549,6 @@ Boolean F_Normalize (String args, ClientData *pCD, XEvent *event)
 
 Boolean F_Normalize_And_Raise (String args, ClientData *pCD, XEvent *event)
 {
-#ifdef PANELIST
     WmScreenData       *pSD;
     WmWorkspaceData    *pWS;
 
@@ -2728,7 +2574,7 @@ Boolean F_Normalize_And_Raise (String args, ClientData *pCD, XEvent *event)
            return (False);
        }
     }
-#endif /* PANELIST */
+
     if (pCD)
     {
         if (pCD->clientState == MINIMIZED_STATE)
@@ -2749,13 +2595,9 @@ Boolean F_Normalize_And_Raise (String args, ClientData *pCD, XEvent *event)
                                GetEventInverseMask(event));
 
             /* Raise the window and set the keyboard focus to the window */
-#ifdef WSM
            wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
             F_Raise (NULL, pCD, (XEvent *)NULL);
-#ifdef WSM
            wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
            if (wmGD.raiseKeyFocus)
            {
                F_Focus_Key (NULL, pCD,
@@ -2869,13 +2711,9 @@ Boolean F_Restore_And_Raise (String args, ClientData *pCD, XEvent *event)
            F_Restore (NULL, pCD, event);
 
             /* Raise the window and set the keyboard focus to the window */
-#ifdef WSM
            wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
             F_Raise (NULL, pCD, (XEvent *)NULL);
-#ifdef WSM
            wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
            if (wmGD.raiseKeyFocus)
            {
                F_Focus_Key (NULL, pCD,
@@ -2948,64 +2786,6 @@ Boolean F_Pack_Icons (String args, ClientData *pCD, XEvent *event)
 
 } /* END OF FUNCTION F_Pack_Icons */
 
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  F_Post_RMenu (args, pCD, event)
- *
- *
- *  Description:
- *  -----------
- *  This is the window manager function handler for posting the
- *  root window menu.
- *  This function can only be invoked by a key event.
- *
- *************************************<->***********************************/
-
-Boolean F_Post_RMenu (String args, ClientData *pCD, XEvent *event)
-{
-    MenuSpec    *rootMenu;
-    unsigned int button = NoButton;
-    int          x, y;
-    long         flags = POST_AT_XY;
-    Window       rwin, cwin;
-    int          winx, winy;
-    unsigned int mask;
-
-
-    if ((event->type == KeyPress) || (event->type == KeyRelease))
-      {
-
-       /* Find the root menu spec */
-       for (rootMenu = ACTIVE_PSD->menuSpecs;
-            rootMenu != (MenuSpec *) NULL;
-            rootMenu = rootMenu->nextMenuSpec)
-         {
-           if (strcmp(rootMenu->name, ACTIVE_PSD->rootMenu) == 0)
-             break;
-         }
-    
-       /* If we couldn't find the root menu, then do nothing. */
-       if (rootMenu == (MenuSpec *) NULL)
-         return (False);
-
-       else
-         {
-           XQueryPointer(DISPLAY, ACTIVE_ROOT,
-                         &rwin, &cwin, &x, &y, &winx, &winy, &mask);
-
-           PostMenu (rootMenu, NULL, x, y, NoButton, F_CONTEXT_ROOT,
-                     flags, event);
-         }
-      }
-
-    return (False);
-
-} /* END OF FUNCTION F_Post_RMenu */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-\f
 /*************************************<->*************************************
  *
  *  F_Post_SMenu (args, pCD, event)
@@ -3086,7 +2866,6 @@ Boolean F_Post_SMenu (String args, ClientData *pCD, XEvent *event)
        }
        else if (event->type == ButtonPress)
        {
-#ifdef WSM
            /*
             * Root menu, if posted with button press, then 
             * set up to handle root menu click to make the menu
@@ -3102,7 +2881,6 @@ Boolean F_Post_SMenu (String args, ClientData *pCD, XEvent *event)
                wmGD.hotspotRectangle.width = wmGD.moveThreshold;
                wmGD.hotspotRectangle.height = wmGD.moveThreshold;
            }
-#endif /* WSM */
            PostMenu (pCD->systemMenuSpec, pCD, 
                event->xbutton.x_root, event->xbutton.y_root,
                event->xbutton.button, menuContext, POST_AT_XY, event);
@@ -3143,7 +2921,6 @@ Boolean F_Kill (String args, ClientData *pCD, XEvent *event)
        Boolean do_save_yourself =
                pCD->protocolFlags & PROTOCOL_WM_SAVE_YOURSELF;
 
-#ifdef PANELIST
        if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL)
        {
            Widget              wPanel;
@@ -3172,9 +2949,7 @@ Boolean F_Kill (String args, ClientData *pCD, XEvent *event)
                IconBoxPopUp (pCD->pSD->pActiveWS, False);
            }
        }
-       else
-#endif /* PANELIST */
-       if (!do_delete_window && !do_save_yourself)
+       else if (!do_delete_window && !do_save_yourself)
        {
            XKillClient (DISPLAY, pCD->client);
        }
@@ -3189,7 +2964,6 @@ Boolean F_Kill (String args, ClientData *pCD, XEvent *event)
                SendClientMsg (pCD->client, (long) wmGD.xa_WM_PROTOCOLS,
                    (long) wmGD.xa_WM_DELETE_WINDOW, CurrentTime, NULL, 0);
            }
-#ifdef WSM
            /*
             * HP does not want to send a client message for both
             * delete_window AND save_yourself.  The current OSF
@@ -3197,9 +2971,6 @@ Boolean F_Kill (String args, ClientData *pCD, XEvent *event)
             * to the behavior of dt 2.01
             */
             else if (do_save_yourself)
-#else /* WSM */
-           if (do_save_yourself)
-#endif /* WSM */
            {
                /*
                 * Send a WM_SAVE_YOURSELF message and wait for a change to
@@ -3227,8 +2998,6 @@ Boolean F_Kill (String args, ClientData *pCD, XEvent *event)
 
 } /* END OF FUNCTION F_Kill */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  F_Marquee_Selection (args, pCD, event)
@@ -3295,7 +3064,6 @@ RefreshByClearing (Window win)
            XFree((char *)winChildren);
     }
 }
-#endif /* WSM */
 
 \f
 /*************************************<->*************************************
@@ -3314,14 +3082,12 @@ Boolean F_Refresh (String args, ClientData *pCD, XEvent *event)
 {
     Window win;
 
-#ifdef WSM
     if (wmGD.refreshByClearing)
     {
        RefreshByClearing (ACTIVE_ROOT);
     }
     else
     {
-#endif /* WSM */
                         /* default background_pixmap is None */
     win = XCreateWindow (DISPLAY,
                         ACTIVE_ROOT, 0, 0,
@@ -3338,9 +3104,7 @@ Boolean F_Refresh (String args, ClientData *pCD, XEvent *event)
 
     XMapWindow (DISPLAY, win);
     XDestroyWindow (DISPLAY, win);
-#ifdef WSM 
     }
-#endif /* WSM */
     XFlush (DISPLAY);
 
     return (True);
@@ -3390,14 +3154,11 @@ Boolean F_Resize (String args, ClientData *pCD, XEvent *event)
 
 Boolean F_Restart (String args, ClientData *pCD, XEvent *event)
 {
-#ifdef WSM
     if (args && *args && !strcmp (args, DTWM_REQP_NO_CONFIRM))
     {
        RestartWm (MWM_INFO_STARTUP_CUSTOM);
     }
-    else
-#endif /* WSM */
-    if (wmGD.showFeedback & WM_SHOW_FB_RESTART)
+    else if (wmGD.showFeedback & WM_SHOW_FB_RESTART)
     {
        ConfirmAction (ACTIVE_PSD, RESTART_ACTION);
     }
@@ -3463,9 +3224,7 @@ void RestartWm (long startupFlags)
             */
            
            SetMwmInfo (wmGD.Screens[scr].rootWindow, startupFlags, 0);
-#ifdef WSM
            SaveResources(&wmGD.Screens[scr]);
-#endif /* WSM */
            /*
             * Unmap client windows and reparent them to the root window.
             */
@@ -3490,17 +3249,13 @@ void RestartWm (long startupFlags)
                }
                pNextEntry = pNextEntry->prevSibling;
            }
-#if defined(PANELIST)
            UnParentControls (&wmGD.Screens[scr], True);
-#endif /* PANELIST */
        }
        
     }
     
-#ifdef WSM
     /* shut down the messaging connection */
     dtCloseIPC();
-#endif /* WSM */
     ResignFromSM();
 
     /*
@@ -3513,10 +3268,8 @@ void RestartWm (long startupFlags)
     XSetInputFocus (DISPLAY, PointerRoot, RevertToPointerRoot, CurrentTime);
     XSync (DISPLAY, False);
 
-#ifdef WSM
     CLOSE_FILES_ON_EXEC();
     _DtEnvControl(DT_ENV_RESTORE_PRE_DT); 
-#endif /* WSM */
     /*
      * Restart the window manager with the initial arguments plus
      * the restart settings.
@@ -3524,13 +3277,9 @@ void RestartWm (long startupFlags)
 
     execvp (*(wmGD.argv), wmGD.argv);
 
-#ifdef WSM
     Warning (((char *)GETMESSAGE(26, 1, 
 "The window manager restart failed. The window manager program could not \
 be found or could not be executed.")));
-#else /* WSM */
-    Warning ("Cannot restart the window manager");
-#endif /* WSM */
     Do_Quit_Mwm (True);
 
 
@@ -3572,14 +3321,9 @@ void DeFrameClient (ClientData *pCD)
         {
            XUnmapWindow (DISPLAY, pCD->iconWindow);
            XRemoveFromSaveSet (DISPLAY, pCD->iconWindow);
-#ifdef WSM
            XReparentWindow (DISPLAY, pCD->iconWindow, 
                ROOT_FOR_CLIENT(pCD), pCD->pWsList->iconX, 
                pCD->pWsList->iconY);
-#else /* WSM */
-           XReparentWindow (DISPLAY, pCD->iconWindow, 
-               ROOT_FOR_CLIENT(pCD), pCD->iconX, pCD->iconY);
-#endif /* WSM */
         }
 
         if (pCD->maxConfig)
@@ -3640,8 +3384,6 @@ void DeFrameClient (ClientData *pCD)
 
 } /* END OF FUNCTION DeFrameClient */
 
-#if defined(PANELIST)
-\f
 /******************************<->*************************************
  *
  *  F_Toggle_Front_Panel (args, pCD, event)
@@ -3739,7 +3481,6 @@ F_Version (String args, ClientData *pCD, XEvent *event)
     return (True);
 
 }  /* END OF FUNCTION F_Version */
-#endif /* PANELIST */
 
 \f
 /******************************<->*************************************
@@ -3766,7 +3507,7 @@ F_Version (String args, ClientData *pCD, XEvent *event)
 
 Boolean F_Send_Msg (String args, ClientData *pCD, XEvent *event)
 {
-    register int i;
+    int i;
 
 
     if (pCD && pCD->mwmMessagesCount)
@@ -3864,9 +3605,7 @@ Boolean F_Raise (String args, ClientData *pCD, XEvent *event)
     ClientListEntry *pStackEntry;
     String string = args;
     int flags = STACK_NORMAL;
-#ifdef WSM
        WmWorkspaceData *pWS = ACTIVE_WS;
-#endif /* WSM */
 
     if (string)
     {
@@ -3883,15 +3622,11 @@ Boolean F_Raise (String args, ClientData *pCD, XEvent *event)
                                                  F_GROUP_ALL)))
            {
                pNextEntry = pEntry->nextSibling;
-#ifdef WSM
                if (ClientInWorkspace (pWS, pEntry->pCD))
                {
-#endif /* WSM */
                Do_Raise (pEntry->pCD, pStackEntry, STACK_NORMAL);
                pStackEntry = pEntry;
-#ifdef WSM
                }
-#endif /* WSM */
            }
        }
        /* process family stacking stuff */
@@ -3915,26 +3650,18 @@ Boolean F_Raise (String args, ClientData *pCD, XEvent *event)
                }
                index += len;
            }
-#ifdef WSM
            if (ClientInWorkspace (pWS, pCD))
            {
-#endif /* WSM */
            Do_Raise (pCD, (ClientListEntry *) NULL, flags);
-#ifdef WSM
            }
-#endif /* WSM */
        }
     }
     else if (pCD)
     {
-#ifdef WSM
        if (ClientInWorkspace (pWS, pCD))
        {
-#endif /* WSM */
        Do_Raise (pCD, (ClientListEntry *) NULL, STACK_NORMAL);
-#ifdef WSM
        }
-#endif /* WSM */
     }
 
     return (True);
@@ -3969,11 +3696,8 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
     Boolean restackTransients;
     ClientData *pcdLeader;
     WmWorkspaceData *pWS = ACTIVE_WS;
-#ifdef WSM
     Boolean bLeaderRestacked;
-#endif /* WSM */
 
-#ifdef PANELIST
     if (pCD->pECD)
     {
        /*
@@ -3982,11 +3706,7 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
         */
        return;
     }
-    else 
-#else /* PANELIST */
-#endif /* PANELIST */
-#ifdef WSM
-    if (ClientInWorkspace(pWS, pCD)  && 
+    else if (ClientInWorkspace(pWS, pCD)  && 
        (!pStackEntry || ClientInWorkspace (pWS, pStackEntry->pCD)))
     {
        /* 
@@ -4007,7 +3727,6 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
         */
        return;
     }
-#endif /* WSM */
 
     pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD;
 
@@ -4060,7 +3779,6 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
     }
     else /* NORMAL_STATE, MAXIMIZED_STATE, adoption */
     {
-#ifdef WSM
         /*
         * Handle restacking of primary/secondary windows
         * within the transient window tree. Don't raise this
@@ -4101,7 +3819,7 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
            }
 
        }
-#endif /* WSM */
+
        /*
         * If this is a transient window then put it on top of its
         * sibling transient windows.
@@ -4206,11 +3924,7 @@ void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags)
   
         /* Restack the transients if needed */
   
-#ifdef WSM
         if ((restackTransients) || (bLeaderRestacked))
-#else /* WSM */
-        if (restackTransients)
-#endif /* WSM */
         {
            RestackTransients (pCD);
        }
@@ -4252,11 +3966,7 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event)
             * The window is obscured by another window, raise the window.
             */
 
-#ifdef WSM
            F_Raise (NULL, pCD, (XEvent *)NULL);
-#else /* WSM */
-           F_Raise (NULL, pcdLeader, (XEvent *)NULL);
-#endif /* WSM */
        }
        else if (CheckIfClientObscuringAny (pcdLeader) &&
                !(wmGD.systemModalActive &&
@@ -4268,7 +3978,6 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event)
             */
 
            F_Lower (NULL, pcdLeader, (XEvent *)NULL);
-#ifdef WSM
            if ((pcdLeader->secondariesOnTop == False) &&
                (pCD->transientLeader != NULL) &&
                (!IS_APP_MODALIZED(pcdLeader)))
@@ -4277,9 +3986,7 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event)
                (void) BumpPrimaryToTop (pcdLeader);
                RestackTransients (pcdLeader);
            }
-#endif /* WSM */
        }
-#ifdef WSM
         else if ((pcdLeader->secondariesOnTop == False) &&
                 (pcdLeader->transientChildren != NULL) &&
                 (!wmGD.systemModalActive) &&
@@ -4299,7 +4006,6 @@ Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event)
                RestackTransients (pcdLeader);
            }
        }
-#endif /* WSM */
     }
 
     return (True);
@@ -4339,14 +4045,12 @@ Boolean F_Refresh_Win (String args, ClientData *pCD, XEvent *event)
            h = (unsigned int) pCD->maxHeight;
        }
 
-#ifdef WSM
         if (wmGD.refreshByClearing)
        {
            RefreshByClearing (pCD->clientFrameWin);
        }
        else
        {
-#endif /* WSM */
                         /* default background_pixmap is None */
         win = XCreateWindow (DISPLAY,
                         pCD->clientBaseWin,
@@ -4362,9 +4066,7 @@ Boolean F_Refresh_Win (String args, ClientData *pCD, XEvent *event)
 
         XMapWindow (DISPLAY, win);
         XDestroyWindow (DISPLAY, win);
-#ifdef WSM
        }
-#endif /* WSM */
         XFlush (DISPLAY);
     }
 
@@ -4435,8 +4137,6 @@ void Do_Set_Behavior (Boolean dummy)
 
 } /* END OF FUNCTION Do_Set_Behavior */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  F_Set_Context (args, pCD, event)
@@ -4456,7 +4156,6 @@ Boolean F_Set_Context (String args, ClientData *pCD, XEvent *event)
     return (True);
 
 } /* END OF FUNCTION F_Set_Context */
-#endif /* WSM */
 
 \f
 /*************************************<->*************************************
@@ -4590,41 +4289,6 @@ Boolean F_Screen (String args, ClientData *pCD, XEvent *event)
 }
 
 
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  F_InvokeCommand (args, pCD, event)
- *
- *
- *  Description:
- *  -----------
- *  This is the window manager function for invoking client inserted menu
- *  commands.
- *
- *************************************<->***********************************/
-
-Boolean F_InvokeCommand (String args, ClientData *pCD, XEvent *event)
-{
-    CARD32 commandID, clientWindow;
-    Atom notifySelection;
-
-    if (args == (String) NULL) return(FALSE);
-
-    if (sscanf(args, "%d %d %ld", &commandID, &clientWindow,
-              &notifySelection) != 3)
-      return(FALSE);
-
-    SendInvokeMessage(commandID,
-                     (pCD == (ClientData *) NULL ? 0 : pCD->client),
-                     notifySelection,
-                     LastTime());
-
-    return (True);
-} /* END OF FUNCTION F_InvokeCommand */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-\f
 /*************************************<->*************************************
  *
  *  GetFunctionTimestamp (pEvent)
@@ -4718,7 +4382,7 @@ void ClearDirtyStackEntry (ClientData *pCD)
       dirtyLeader = NULL;
     }
 }
-#if defined(DEBUG) && defined(WSM)
+#if defined(DEBUG)
 \f
 /***********************<->*************************************
  *
@@ -4780,8 +4444,6 @@ F_ZZ_Debug (String subFcn, ClientData *pCD, XEvent *event)
 }
 #endif /* DEBUG */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  F_Next_Workspace (args, pCD, event)
@@ -4918,7 +4580,3 @@ DumpWindowList ()
 }
 #endif /* DEBUG */
 
-#endif /* WSM */
-
-
-
index 4ed963b7571f1c998ed65e529abb92687f902654..72dd30abfcc1e5ea241b053fe847832001651f71 100644 (file)
 /* 
  * Motif Release 1.2.3
 */ 
-/*   $XConsortium: WmFunction.h /main/5 1996/06/11 15:59:42 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
 
-#ifdef WSM
 extern Boolean F_Action (String actionName, ClientData *pCD, XEvent *event);
-#endif /* WSM */
 extern Boolean F_Beep (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Lower (String args, ClientData *pCD, XEvent *event);
 extern void Do_Lower (ClientData *pCD, ClientListEntry *pStackEntry, int flags);
@@ -46,18 +43,14 @@ extern Boolean F_Quit_Mwm (String args, ClientData *pCD, XEvent *event);
 extern void Do_Quit_Mwm (Boolean diedOnRestart);
 extern Boolean F_Focus_Key (String args, ClientData *pCD, XEvent *event);
 extern void Do_Focus_Key (ClientData *pCD, Time focusTime, long flags);
-#ifdef WSM
 extern Boolean F_Goto_Workspace (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Help (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Help_Mode (String args, ClientData *pCD, XEvent *event);
-#endif /* WSM */
 extern Boolean F_Next_Key (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Prev_Cmap (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Prev_Key (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Pass_Key (String args, ClientData *pCD, XEvent *event);
-#ifdef WSM
 extern Boolean F_Marquee_Selection (String args, ClientData *pCD, XEvent *event);
-#endif /* WSM */
 extern Boolean F_Maximize (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Menu (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Minimize (String args, ClientData *pCD, XEvent *event);
@@ -69,10 +62,8 @@ extern Boolean F_Normalize_And_Raise (String args, ClientData *pCD,
                                      XEvent *event);
 extern Boolean F_Pack_Icons (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Post_SMenu (String args, ClientData *pCD, XEvent *event);
-#ifdef PANELIST
 extern Boolean F_Post_FpMenu (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Push_Recall (String args, ClientData *pCD, XEvent *event);
-#endif /* PANELIST */
 extern Boolean F_Kill (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Refresh (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Resize (String args, ClientData *pCD, XEvent *event);
@@ -83,9 +74,7 @@ extern Boolean F_Restore_And_Raise (String args, ClientData *pCD,
 extern void Do_Restart (Boolean dummy);
 extern void RestartWm (long startupFlags);
 extern void DeFrameClient (ClientData *pCD);
-#ifdef WSM
 extern Boolean F_Send (String args, ClientData *pCD, XEvent *event);
-#endif /* WSM */
 extern Boolean F_Send_Msg (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Separator (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Raise (String args, ClientData *pCD, XEvent *event);
@@ -93,18 +82,13 @@ extern void Do_Raise (ClientData *pCD, ClientListEntry *pStackEntry, int flags);
 extern Boolean F_Raise_Lower (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Refresh_Win (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Set_Behavior (String args, ClientData *pCD, XEvent *event);
-#ifdef WSM
 extern Boolean F_Set_Context (String args, ClientData *pCD, XEvent *event);
-#endif
 extern void Do_Set_Behavior (Boolean dummy);
 extern Boolean F_Title (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Screen (String args, ClientData *pCD, XEvent *event);
-#if defined(PANELIST)
 extern Boolean F_Toggle_Front_Panel (String args, ClientData *pCD, 
                                     XEvent *event);
 extern Boolean F_Version (String args, ClientData *pCD, XEvent *event);
-#endif /* PANELIST */
-#ifdef WSM
 extern Boolean F_Next_Workspace (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Prev_Workspace (String args, ClientData *pCD, XEvent *event);
 extern Boolean F_Workspace_Presence (String args, ClientData *pCD, 
@@ -112,16 +96,10 @@ extern Boolean F_Workspace_Presence (String args, ClientData *pCD,
 #if defined(DEBUG)
 extern Boolean F_ZZ_Debug (String, ClientData *, XEvent *);
 #endif /* DEBUG */
-#endif /* WSM */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-extern Boolean F_InvokeCommand (String args, ClientData *pCD, XEvent *event);
-extern Boolean F_Post_RMenu (String args, ClientData *pCD, XEvent *event);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 extern Time GetFunctionTimestamp (XButtonEvent *pEvent);
 extern void ReBorderClient (ClientData *pCD, Boolean reMapClient);
 extern void ClearDirtyStackEntry (ClientData *pCD);    /* Fix for 5325 */
 
-#ifdef PANELIST
 
 typedef struct _WmPushRecallArg {
     int ixReg;
@@ -129,5 +107,3 @@ typedef struct _WmPushRecallArg {
     void *pArgs;
 } WmPushRecallArg;
 
-
-#endif /* PANELIST */
index bfe795fb76dcb7fcccbf8311c3fc967b26e589e0..43c9d5e551eb5a1ba45ac6b46db90680405049ff 100644 (file)
@@ -29,7 +29,6 @@
 /* 
  * Motif Release 1.2.4
 */ 
-/*   $XConsortium: WmGlobal.h /main/16 1996/10/30 11:55:23 drk $ */
 /*
  * (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY 
  * (c) Copyright 1993, 1994 International Business Machines Corp.
 #include <X11/StringDefs.h>
 #include <Xm/MwmUtil.h>
 #include <Xm/Xm.h>
-#ifdef WSM
 #include <Xm/ColorObjP.h>
 #include <Dt/Service.h>
 #include <Dt/Wsm.h>
 #include <Dt/WsmP.h>
 #include "WmParse.h"
-#ifdef PANELIST
 #include <Dt/Action.h>
-#endif /* PANELIST */
-#endif /* WSM */
 
 #if defined(sun) && defined(ALLPLANES)
 #include <X11/extensions/allplanes.h>
  * Value definitions and macros:
  */
 
-#ifdef MOTIF_ONE_DOT_ONE
-#define XmFONTLIST_DEFAULT_TAG "XmSTRING_DEFAULT_CHARSET"
-#endif
-#ifdef WSM
-
 extern int WmIdentity;
 
 /*
@@ -92,13 +82,11 @@ extern int WmIdentity;
 #define CSERVE_NORMAL             0
 #define CSERVE_NOT_AVAILABLE       1
 #define CSERVE_FAILURE             2
-#endif /* WSM */
 
 /* window manager name and class used to get resources: */
 #define        WM_RESOURCE_CLASS       "Mwm"
 #define WM_RESOURCE_NAME       "mwm"
 
-#ifdef WSM
 #define        DT_WM_RESOURCE_CLASS    "Dtwm"
 #define DT_WM_RESOURCE_NAME    "dtwm"
 
@@ -120,19 +108,9 @@ extern Pixel               FPselectcolor;
 #define MwmBehavior            (WmIdentity == MWM)
 #define DtwmBehavior           (WmIdentity == DT_MWM)
 
-#else
-#define MwmBehavior            (True)
-
-#endif /* WSM */
 
 /* ICCC atom names: */
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# define _XA_TARGETS           "TARGETS"
-# define _XA_MULTIPLE          "MULTIPLE"
-# define _XA_TIMESTAMP         "TIMESTAMP"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
 #define _XA_WM_STATE           "WM_STATE"
 #define _XA_WM_PROTOCOLS       "WM_PROTOCOLS"
 #define _XA_WM_CHANGE_STATE    "WM_CHANGE_STATE"
@@ -141,27 +119,6 @@ extern Pixel               FPselectcolor;
 #define _XA_WM_TAKE_FOCUS      "WM_TAKE_FOCUS"
 #define _XA_WM_COLORMAP_WINDOWS        "WM_COLORMAP_WINDOWS"
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/* original set of query targets */
-# define _XA_MOTIF_WM_CLIENT_WINDOW            "_MOTIF_WM_CLIENT_WINDOW"
-# define _XA_MOTIF_WM_POINTER_WINDOW           "_MOTIF_WM_POINTER_WINDOW"
-# define _XA_MOTIF_WM_ALL_CLIENTS              "_MOTIF_WM_ALL_CLIENTS"
-         
-/* menu command interface support */
-# define _XA_MOTIF_WM_DEFINE_COMMAND           "_MOTIF_WM_DEFINE_COMMAND"
-# define _XA_MOTIF_WM_INCLUDE_COMMAND          "_MOTIF_WM_INCLUDE_COMMAND"
-# define _XA_MOTIF_WM_REMOVE_COMMAND           "_MOTIF_WM_REMOVE_COMMAND"
-# define _XA_MOTIF_WM_ENABLE_COMMAND           "_MOTIF_WM_ENABLE_COMMAND"
-# define _XA_MOTIF_WM_DISABLE_COMMAND          "_MOTIF_WM_DISABLE_COMMAND"
-# define _XA_MOTIF_WM_RENAME_COMMAND           "_MOTIF_WM_RENAME_COMMAND"
-# define _XA_MOTIF_WM_INVOKE_COMMAND           "_MOTIF_WM_INVOKE_COMMAND"
-# define _XA_MOTIF_WM_REQUEST_COMMAND          "_MOTIF_WM_REQUEST_COMMAND"
-# define _XA_MOTIF_WM_WINDOW_FLAGS             "_MOTIF_WM_WINDOW_FLAGS"
-
-/* automation support */
-# define _XA_MOTIF_WM_AUTOMATION               "_MOTIF_WM_AUTOMATION"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
 /* window manager exit value on fatal errors: */
 #define WM_ERROR_EXIT_VALUE    1
 
@@ -196,12 +153,8 @@ extern Pixel               FPselectcolor;
 #define MANAGEW_CONFIRM_BOX    (1L << 4)
 #define MANAGEW_WM_RESTART_ICON        (1L << 5)
 
-#ifdef WSM
 #define MANAGEW_WM_CLIENTS     (MANAGEW_ICON_BOX | \
                                 MANAGEW_CONFIRM_BOX )
-#else /* WSM */
-#define MANAGEW_WM_CLIENTS     (MANAGEW_ICON_BOX | MANAGEW_CONFIRM_BOX)
-#endif /* WSM */
 
 /* keyboard input focus flag values (for calls to SetKeyboardFocus) */
 #define ALWAYS_SET_FOCUS       (1L << 0)
@@ -231,11 +184,7 @@ extern Pixel               FPselectcolor;
 #define TEXT_HEIGHT(pfs) (((pfs)->ascent)+((pfs)->descent))
 
 /* icon frame shadow widths */
-#ifdef WSM
 #define ICON_EXTERNAL_SHADOW_WIDTH     (wmGD.iconExternalShadowWidth)
-#else /* WSM */
-#define ICON_EXTERNAL_SHADOW_WIDTH     2
-#endif /* WSM */
 #define ICON_INTERNAL_SHADOW_WIDTH     1
 
 /* padding widths */
@@ -284,11 +233,7 @@ extern Pixel               FPselectcolor;
 
 
 /* client frame shadow widths */
-#ifdef WSM
 #define FRAME_EXTERNAL_SHADOW_WIDTH    (wmGD.frameExternalShadowWidth)
-#else /* WSM */
-#define FRAME_EXTERNAL_SHADOW_WIDTH    2
-#endif /* WSM */
 #define FRAME_INTERNAL_SHADOW_WIDTH    1
 #define FRAME_CLIENT_SHADOW_WIDTH      1
 #define FRAME_MATTE_SHADOW_WIDTH       1
@@ -317,14 +262,12 @@ extern Pixel              FPselectcolor;
 
 #define STRETCH_COUNT          8
 
-#ifdef WSM
 
 /* Workspace allocation granularity */
 #define WS_ALLOC_AMOUNT                        8
 
 /* Window list allocation granularity */
 #define WINDOW_ALLOC_AMOUNT            16
-#endif /* WSM */
 
 /* function flag masks */
 #define WM_FUNC_DEFAULT                MWM_FUNC_ALL
@@ -347,27 +290,21 @@ extern Pixel              FPselectcolor;
 #define WM_DECOR_RESIZE                (WM_DECOR_RESIZEH)
 #define WM_DECOR_ALL           (WM_DECOR_TITLEBAR | WM_DECOR_RESIZEH)
 
-#ifdef PANELIST
 #define WM_DECOR_PANEL_DEFAULT WM_DECOR_BORDER
-#endif /* PANELIST */
 
 /* icon box definitions */
 #define ICON_BOX_FUNCTIONS     (MWM_FUNC_RESIZE | MWM_FUNC_MOVE |\
                                 MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE)
 
-#ifdef PANELIST
 /* accessory panel definitions */
 #define WM_FUNC_PANEL_DEFAULT  (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE)
 #define WM_FUNC_SUBPANEL_DEFAULT (MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE|\
                                MWM_FUNC_CLOSE)
-#endif /* PANELIST */
-#ifdef WSM
 /* workspace controller definitions */
 #define CONTROL_BOX_FUNCTIONS  (MWM_FUNC_MOVE)
 
 /* workspace presence definitions */
 #define PRESENCE_BOX_FUNCTIONS (MWM_FUNC_MOVE)
-#endif /* WSM */
 
 /* show feedback definitions */
 #define WM_SHOW_FB_BEHAVIOR    (1L << 0)
@@ -387,7 +324,6 @@ extern Pixel                FPselectcolor;
 
 #define WM_SHOW_FB_DEFAULT     WM_SHOW_FB_ALL
 
-#ifdef WSM
 /* flags identifying resources to save */
 
 #define WM_RES_WORKSPACE_LIST          (1L << 0)
@@ -398,7 +334,6 @@ extern Pixel                FPselectcolor;
 #define WM_RES_ICONBOX_GEOMETRY        (1L << 5)
 #define WM_RES_WORKSPACE_COUNT         (1L << 6)
 
-#endif /* WSM */
 
 
 \f
@@ -440,9 +375,7 @@ typedef struct _WmColorData
 
 } WmColorData;
 
-#ifdef WSM
 typedef Atom WorkspaceID;
-#endif
 
 \f
 /*************************************<->*************************************
@@ -503,9 +436,7 @@ typedef struct _ButtonSpec
 #define F_CONTEXT_NORMAL       (1L << 2)
 #define F_CONTEXT_MAXIMIZE     (1L << 3)
 #define F_CONTEXT_ICONBOX      (1L << 4)
-#ifdef WSM
 #define F_CONTEXT_IFKEY                (1L << 7)
-#endif /* WSM */
 #define F_CONTEXT_WINDOW       (F_CONTEXT_NORMAL|F_CONTEXT_MAXIMIZE)
 #define F_CONTEXT_ALL          (F_CONTEXT_ROOT|F_CONTEXT_ICON|F_CONTEXT_WINDOW)
 
@@ -542,9 +473,7 @@ typedef struct _ButtonSpec
 #define FRAME_NBORDER          14
 #define FRAME_MATTE            15
 #define FRAME_MISC             FRAME_MATTE
-#ifdef WSM
 #define FRAME_TITLEBAR         17
-#endif /* WSM */
 
 /* icon part contexts */
 #define ICON_PART_NONE         0
@@ -636,9 +565,7 @@ typedef struct _ClickData
 {
     Boolean    clickPending;
     Boolean    doubleClickPending;
-#ifdef WSM
     Boolean    bReplayed;
-#endif /* WSM */
     unsigned int button;
     unsigned int state;
     unsigned int releaseState;
@@ -684,8 +611,7 @@ typedef struct _Gadget_Rectangle
 #define F_GROUP_ALL            (F_GROUP_DEFAULT | F_GROUP_TRANSIENT)
 #define F_GROUP_GROUP          (1L << 3)
 
-#ifdef WSM
-\f
+
 /*************************************<->*************************************
  *
  *  Workspace data structures ...
@@ -730,7 +656,6 @@ typedef struct _WsPresenceData
 typedef struct _WsPresenceData *PtrWsPresenceData;
 
 
-#ifdef PANELIST
 /*
  * Specific data for top level help dialog 
  */
@@ -751,7 +676,6 @@ typedef struct _WsDtHelpData
 } WsDtHelpData;
 
 typedef struct _WsDtHelpData *PtrWsDtHelpData;
-#endif /*  PANELIST */
 
 \f
 /*************************************<->*************************************
@@ -792,9 +716,7 @@ typedef struct _SessionGeom
 #define  SM_START_ACK                   1
 #define  SM_STOP_ACK                    2
 
-#endif /* WSM */
 
-\f
 /*************************************<->*************************************
  *
  *  Menu specification data structures ...
@@ -810,20 +732,6 @@ typedef struct _SessionGeom
  *
  *************************************<->***********************************/
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*
- * Used to denote where the separators belong in a pair of separators
- * used to surround a client command.
- */
-
-enum { TOP_SEPARATOR, BOTTOM_SEPARATOR };
-
-/*
- * Used to denote what kind of change to make to a client command. 
- */
-typedef enum { ENABLE, DISABLE, REMOVE, RENAME } CmdModifier;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
 typedef struct _MenuItem
 {
     int                 labelType;
@@ -837,16 +745,10 @@ typedef struct _MenuItem
     String      wmFuncArgs;
     Context     greyedContext;
     long         mgtMask;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    String       clientCommandName; /* as specified by the user in
-                                      his .mwmrc file. */
-    CARD32      clientCommandID;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     struct _MenuItem *nextMenuItem;
 
 } MenuItem;
 
-#ifdef WSM
 
 /*
  * We use the top part of mgtMask for workspace function bits.
@@ -857,7 +759,6 @@ typedef struct _MenuItem
 #define MWM_MGT_MASK   0x0000FFFF
 #define DTWM_MGT_MASK  0xFFFF0000
 
-#endif /* WSM */
 
 typedef struct _MenuButton
 {
@@ -867,14 +768,6 @@ typedef struct _MenuButton
 
 } MenuButton;
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-typedef struct _MenuExclusion
-{
-  String                 command_string;
-  struct _MenuExclusion *nextExclusion;
-} MenuExclusion;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
 typedef struct _MenuSpec
 {
     String       name;
@@ -888,49 +781,10 @@ typedef struct _MenuSpec
     unsigned int  menuButtonCount; /* number of menuButtons elements in use */
     Context      accelContext;    /* accelerator context */
     KeySpec     *accelKeySpecs;   /* list of accelerator KeySpecs */
-
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    MenuExclusion *exclusions;      /* list of client commands to be
-                                      excluded from this menu. */
-    Boolean        clientLocal;     /* this menu is owned by a client and not 
-                                      shared with any other clients */
-    CARD32         commandID;       /* if this is a client command, then this
-                                      its id value - globally unique. */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
     struct _MenuSpec *nextMenuSpec;
 
 } MenuSpec;
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/* The range to which a client command operation should apply. */
-typedef enum { SINGLE, ROOT, ALL } OpRange;
-
-typedef struct _CmdTree {
-  CARD32           commandID;   /* unique identifier for this command. */
-  CARD32           notifyWindow;/* window to receive InvokeCommand request. */
-  char            *name;        /* name of command referred to in .mwmrc. */
-  char            *defaultName; /* default label of menu. */
-  struct _CmdTree *subTrees;    /* list of child commands or command sets. */
-  struct _CmdTree *next;
-
-} CmdTree;
-
-
-typedef struct _matchlist {
-    MenuSpec          *menuspec;
-    MenuItem          *menuitem;
-    String             command_string;
-    CmdTree           *treenode;
-    WmFunction         function;
-    String             funcargs;
-    Context            greyed_context;
-    struct _matchlist *next;
-
-} MatchList;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-\f
 /*************************************<->*************************************
  *
  *  Window and function specification data structures ...
@@ -1037,9 +891,7 @@ typedef struct _AppearanceData
 {
     XmFontList fontList;                       /* resource */
     XFontStruct        *font;
-#ifndef NO_MULTIBYTE
     unsigned int       titleHeight;            /* title bar's height */
-#endif
     Boolean    saveUnder;                      /* resource */
     Pixel      background;                     /* resource */
     Pixel      foreground;                     /* resource */
@@ -1149,9 +1001,7 @@ typedef struct _IconBoxData
     int                currentCol;
     int                lastRow;
     int                lastCol;
-#ifdef WSM
     WorkspaceID                wsID;           /* workspace identifier */
-#endif /* WSM */
     struct _ClientData *pCD_iconBox;   /* ptr to its own clientdata */
     struct _IconBoxData *pNextIconBox; /* ptr to next icon box */
     struct _IconPlacementData IPD;     /* icon placement data */
@@ -1280,32 +1130,21 @@ typedef struct _WmScreenData
     Window     rootWindow;
     Widget     screenTopLevelW;
     Widget     screenTopLevelW1;       /* for internal WM components */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    Widget     utmShell;               /* DrawingArea used for UTM */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     Widget      confirmboxW[4];
-#ifdef PANELIST
     Widget     wPanelist;              /* panel object */
-#endif /* PANELIST */
-#ifdef WSM
     WsPresenceData     presence;       /* workspace presence dialog*/
     Widget     switcherW;              /* workspace switcher */
     Widget     switcherShellW;         /* shell for ws switcher */
-#endif /* WSM */
     Window     wmWorkspaceWin;         /* holds wm properties */
     Window     feedbackWin;
     Window     activeIconTextWin;
     Window     activeLabelParent;
     String     displayString;          /* used for putenv in F_Exec */
-#ifdef WSM
     int displayResolutionType;
-#endif /* WSM */
-#ifdef PANELIST
     struct _WmFpEmbeddedClientData  *pECD; /* clients living in front panel */
     int                numEmbeddedClients;
     struct _WmFpPushRecallClientData  *pPRCD; /* push_recall clients */
     int                numPushRecallClients;
-#endif /* PANELIST */
 
     /* wm state info: */
 
@@ -1316,12 +1155,7 @@ typedef struct _WmScreenData
     Colormap   workspaceColormap;
     Colormap   lastInstalledColormap;
     struct _WmWorkspaceData    *pActiveWS;     /* for this screen */
-#ifdef WSM
     struct _WmWorkspaceData    *pLastWS;       /* previously active WS */
-#endif /* WSM */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    CmdTree     *cciTree;               /* pointer to cci definitions */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 
     /* per screen caches */
     BitmapCache *bitmapCache;
@@ -1344,14 +1178,11 @@ typedef struct _WmScreenData
     GC         fadeIconGC;
     GC         fadeIconTextGC;
 
-#ifdef WSM
-    
     /* per screen configuration outline windows */
     Window     woN;            /* North outline window */
     Window     woS;            /* South outline window */
     Window     woE;            /* East outline window */
     Window     woW;            /* West outline window */
-#endif /* WSM */
 
     /* per screen feedback data */
     unsigned long fbStyle;
@@ -1372,9 +1203,6 @@ typedef struct _WmScreenData
     int     actionNbr;
 
     /* resource description file data: */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    String     rootMenu;                       /* resource */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     String     buttonBindings;                 /* resource */
     ButtonSpec *buttonSpecs;
     String     keyBindings;                    /* resource */
@@ -1394,9 +1222,6 @@ typedef struct _WmScreenData
     Boolean    decoupleTitleAppearance;        /* see clientTitleAppearance */
     int                frameBorderWidth;               /* resource */
     String     feedbackGeometry;               /* resource */
-#ifndef WSM
-    String     iconBoxGeometry;                /* resource */
-#endif /* WSM */
     String     iconBoxName;                    /* resource */
     String      iconBoxSBDisplayPolicy;         /* resource */
     int                iconBoxScheme;                  /* resource - testing */
@@ -1410,15 +1235,11 @@ typedef struct _WmScreenData
     int                transientDecoration;            /* resource */
     int                transientFunctions;             /* resource */
     Boolean    useIconBox;                     /* resource */
-#ifdef PANELIST
     int                subpanelDecoration;             /* resource */
     String      subpanelResources;              /*to restore subpanels */
     Boolean    iconBoxControl;                 /* FP control for icon box */
-#endif /* PANELIST */
     Boolean     moveOpaque;                     /* move window not outlines */
 
-#ifdef WSM
-
     /* pixel set info (from color object) */
     XmPixelSet *pPixelData;            /* all pixel data */
     XmPixelSet *pActivePixelSet;       /* ptr into pPixelData */
@@ -1427,7 +1248,6 @@ typedef struct _WmScreenData
     XmPixelSet *pSecondaryPixelSet;    /* ptr into pPixelData */
     XmPixelSet *pTextPixelSet;         /* ptr into pPixelData */
     int                colorUse;               /* indication from color obj */
-#endif /* WSM */
 
     /* client frame component appearance resources and data: */
 
@@ -1452,7 +1272,6 @@ typedef struct _WmScreenData
     ClientListEntry    *clientList;
     ClientListEntry    *lastClient;
 
-#ifdef WSM
     /* DtSessionHints for clients */
     struct _DtSessionItem     *pDtSessionItems;
     int                        totalSessionItems;
@@ -1472,12 +1291,6 @@ typedef struct _WmScreenData
     DtSvcHandle        hWsm;           /* WORKSPACEMGR message handle */
     Boolean    bMarqueeSelectionInitialized;
 
-#else /* WSM */
-    /* workspace for this screen */
-
-    struct _WmWorkspaceData    *pWS;
-#endif /* WSM */
-
 } WmScreenData;
 
 typedef struct _WmScreenData *PtrScreenData;
@@ -1509,21 +1322,12 @@ typedef struct _WmScreenData *PtrScreenData;
 #define FADE_ICON_GC(pcd) ((pcd)->pSD->fadeIconGC)
 #define FADE_ICON_TEXT_GC(pcd) ((pcd)->pSD->fadeIconTextGC)
 #define DEFAULT_PIXMAP(pcd) ((pcd)->pSD->defaultPixmap)
-#ifdef WSM
 #define ICON_PLACE(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconPlace)
 #define ICON_X(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconX)
 #define ICON_Y(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconY)
 #define P_ICON_BOX(pcd) ((pcd)->pWsList[(pcd)->currentWsc].pIconBox)
 #define ICON_FRAME_WIN(pcd) ((pcd)->pWsList[(pcd)->currentWsc].iconFrameWin)
-#else /* WSM */
-#define ICON_PLACE(pcd) ((pcd)->iconPlace)
-#define ICON_X(pcd) ((pcd)->iconX)
-#define ICON_Y(pcd) ((pcd)->iconY)
-#define P_ICON_BOX(pcd) ((pcd)->pIconBox)
-#define ICON_FRAME_WIN(pcd) ((pcd)->iconFrameWin)
-#endif /* WSM */
-
-#ifdef WSM
+
 /*
  * Definitions for Screen data
  */
@@ -1567,7 +1371,6 @@ typedef struct _WmBackdropData *PtrBackdropData;
 
 #define DEFAULT_BACKDROP_DIR CDE_INSTALLATION_TOP "/backdrops"
 
-#ifdef PANELIST
 /*
  * direction for slide-out panels
  */
@@ -1605,8 +1408,6 @@ typedef struct _WmActionArg {
     String       szExecParms;
 } WmActionArg;
 
-#endif /* PANELIST */
-#endif /* WSM */
  
 
 \f
@@ -1627,14 +1428,12 @@ typedef struct _WmWorkspaceData
 {
     int                        dataType;
 
-#ifdef WSM
     WorkspaceID                id;
     int                map_state;
     BackdropData       backdrop;
     Widget             buttonW;
     XmString           title;          /* resource (visible name) */
     String             iconBoxGeometry;/* resource */
-#endif /* WSM */
     String             name;           /* workspace name */
                                        /* (used for resource fetching) */
 
@@ -1648,11 +1447,9 @@ typedef struct _WmWorkspaceData
 
     struct _ClientData *keyboardFocus; /* ptr to client with the key focus */
     struct _ClientData *nextKeyboardFocus; /* next client to get focus */
-#ifdef WSM
     struct _ClientData **ppClients;    /* list of client data ptrs */
     unsigned int       numClients;     /* number of client in list */
     unsigned int       sizeClientList; /* size of client list */
-#endif  /* WSM */
 
 } WmWorkspaceData;
 
@@ -1682,9 +1479,6 @@ typedef struct _WmWorkspaceData *PtrWorkspaceData;
 
 #define ACTIVE_LABEL_PARENT(pcd) ((pcd)->pSD->activeLabelParent)
 
-#ifndef WSM
-#define ICON_BOX_GEOMETRY(pcd) ((pcd)->pSD->iconBoxGeometry)
-#endif /* WSM */
 #define ICON_BOX_TITLE(pcd) ((pcd)->pSD->iconBoxTitle)
 
 #define TRANSIENT_DECORATION(pcd) ((pcd)->pSD->transientDecoration)
@@ -1722,14 +1516,10 @@ typedef struct _ClientData
     long       focusPriority;
     unsigned long clientID;
     int                wmUnmapCount;
-#ifdef PANELIST
     struct _WmFpEmbeddedClientData  *pECD; /* embedded client data */
     struct _WmFpPushRecallClientData  *pPRCD; /* embedded client data */
-#endif /* PANELIST */
-#ifdef WSM
     Atom *     paInitialProperties;    /* initial window properties */
     int                numInitialProperties;   /* number of initial properties */
-#endif /* WSM */
 
     /* client supported protocols: */
 
@@ -1759,9 +1549,6 @@ typedef struct _ClientData
 #ifndef NO_OL_COMPAT
     Boolean    bPseudoTransient;               /* transientFor window group */
 #endif /* NO_OL_COMPAT */
-#ifndef WSM
-    IconBoxData *pIconBox;                     /* icon box for this win */
-#endif /* WSM */
     IconBoxData *thisIconBox;                  /* icon box data for self */
                                                /*   if this is an icon box */
     Context    grabContext;                     /* used to support icon box */
@@ -1770,10 +1557,8 @@ typedef struct _ClientData
     struct _ClientData *transientLeader;       /* trans leader of this win */
     struct _ClientData *transientChildren;     /* transients of this win */
     struct _ClientData *transientSiblings;     /* related transient win's */
-#ifdef WSM
     int                primaryStackPosition;           /* stack pos'n of primary */
     Boolean    secondariesOnTop;               /* resource */
-#endif /* WSM */
     int                primaryModalCount;              /* primary modal win count */
     int                fullModalCount;                 /* full modal win count */
 
@@ -1879,12 +1664,6 @@ typedef struct _ClientData
 
     long       iconFlags;
     XmString   iconTitle;                      /* WM_ICON_NAME field */
-#ifndef WSM
-    int                iconX;                          /* WM_HINTS field */
-    int                iconY;                          /* WM_HINTS field */
-    int                iconPlace;
-    Window     iconFrameWin;
-#endif /* WSM */
     Pixmap     iconPixmap;                     /* WM_HINTS field */
     Pixmap     iconMask;                       /* WM_HINTS field */
     Window     iconWindow;                     /* WM_HINTS field */
@@ -1893,7 +1672,6 @@ typedef struct _ClientData
                                                /* to reflect the       */
     RList      *piconBottomShadows;            /* depressed icon image */
 
-#ifdef WSM
     /* workspace data */
 
     int         absentMapBehavior;              /* resource */
@@ -1907,11 +1685,8 @@ typedef struct _ClientData
     long       dtwmFunctions;          /* _DT_WM_HINTS */
     long       dtwmBehaviors;          /* _DT_WM_HINTS */      
     Window     attachWindow;           /* _DT_WM_HINTS */
-#ifdef PANELIST
     SlideDirection     slideDirection; /* slide-up direction */
     SlideOutRec        *pSOR;                  /* slide-out record */
-#endif /* PANELIST */
-#endif /* WSM */
 #ifndef NO_SHAPE
     short       wShaped;                /* this window has a bounding shape */
 #endif /* NO_SHAPE  */
@@ -1942,15 +1717,7 @@ typedef struct _ClientData *PtrClientData;
 #define NORMAL_STATE           1
 #define MINIMIZED_STATE                2
 #define MAXIMIZED_STATE                3
-#ifdef WSM
 #define UNSEEN_STATE            8
-#endif /* WSM */
-
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# define NO_CHANGE              -1
-# define UNSET                   0
-# define SET                     1
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 
 /* clientFlags field values: */
 #define CLIENT_HINTS_TITLE             (1L << 0)
@@ -1967,13 +1734,9 @@ typedef struct _ClientData *PtrClientData;
 #define ICON_BOX                        (1L << 11)  /* one of our icon boxes */
 #define CONFIRM_BOX                     (1L << 12)  /* a confirmation box */
 
-#ifdef PANELIST
 #define FRONT_PANEL_BOX                 (1L << 14)  /* a DT 3.0 front panel */
 #define GOT_DT_WM_HINTS                (1L << 15)
-#endif /* PANELIST */
-#ifdef WSM
 #define SM_LAUNCHED                     (1L << 17) /* launched by dtsession */
-#endif /* WSM */
 
 #define SM_X                           (1L << 18) /* X from DB/dtsession */
 #define SM_Y                           (1L << 19) /* Y from DB/dtsession */
@@ -2014,8 +1777,7 @@ typedef struct _ClientData *PtrClientData;
 /* global return buffer */
 #define MAXWMPATH                              1023
 #define MAXBUF                         (MAXWMPATH+1)
-#ifdef WSM
-\f
+
 /*************************************<->*************************************
  *
  *  WsClientData
@@ -2038,7 +1800,6 @@ typedef struct _WsClientData
 
 } WsClientData;
 
-#endif /* WSM */
 
 /*
  * frame style types
@@ -2070,9 +1831,7 @@ typedef struct _WmGlobalData
     char       **environ;              /* environment vector */        
     char       *mwmName;               /* name of our executable */
     Widget     topLevelW;
-#ifdef WSM
     Widget     topLevelW1;             /* from which WM components hang */
-#endif /* WSM */
     Boolean     confirmDialogMapped;    /* confirm dialog is mapped */
     XtAppContext       mwmAppContext;  /* application context for mwm */
     XContext   windowContextType;      /* window context for XSaveContext */
@@ -2080,21 +1839,17 @@ typedef struct _WmGlobalData
 #ifndef        IBM_169380
     XContext  cmapWindowContextType;  /* list of pCD's in WM_COLORMAP_WINDOWS                                              context for XSaveContext */
 #endif
-#ifdef WSM
     XContext   mwmWindowContextType;   /* mwm win context for XSaveContext */
     Window      dtSmWindow;            /* used for contention management */
     Window      commandWindow;          /* WM_SAVE_YOURSELF win for dtwm */
-#endif /* WSM */
 
     /* presentation resource id's: */
 
     String     displayString;          /* used for putenv in F_Exec */
     Display    *display;               /* display we are running to */
-#ifdef WSM
     Display    *display1;              /* second display connection */
     int         statusColorServer;      /* CSERVE_NORMAL, CSERVE_NOT_AVAILABLE */
     DtWmpParseBuf      *pWmPB;         /* global parse buffer */
-#endif /* WSM */
     int                numScreens;             /* number of screens */
     unsigned char      **screenNames;  /* default names for screens */
     WmScreenData       *Screens;       /* array of screen info */
@@ -2159,10 +1914,6 @@ typedef struct _WmGlobalData
 
     /* Resource database used to restore client geometries, etc. */
     XrmDatabase clientResourceDB;
-#ifndef WSM
-    char       *dbFileName;
-    String     sessionClientDB;                /* resource */
-#endif
 
     /* atoms used in inter-client communication: */
 
@@ -2179,41 +1930,12 @@ typedef struct _WmGlobalData
     Atom       xa_MWM_INFO;
     Atom       xa_MWM_OFFSET;
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    Atom       *xa_WM;
-
-    Atom       xa_TARGETS;
-    Atom       xa_MULTIPLE;
-    Atom       xa_TIMESTAMP;
-
-    /* original set of query targets */
-    Atom       _MOTIF_WM_CLIENT_WINDOW;
-    Atom       _MOTIF_WM_POINTER_WINDOW;
-    Atom       _MOTIF_WM_ALL_CLIENTS   ;
-         
-    /* menu command interface support */
-    Atom       _MOTIF_WM_DEFINE_COMMAND;
-    Atom       _MOTIF_WM_INCLUDE_COMMAND;
-    Atom       _MOTIF_WM_REMOVE_COMMAND;
-    Atom       _MOTIF_WM_ENABLE_COMMAND;
-    Atom       _MOTIF_WM_DISABLE_COMMAND;
-    Atom       _MOTIF_WM_RENAME_COMMAND;
-    Atom       _MOTIF_WM_INVOKE_COMMAND;
-    Atom       _MOTIF_WM_REQUEST_COMMAND;
-    Atom       _MOTIF_WM_WINDOW_FLAGS;
-
-    /* automation support */
-    Atom        _MOTIF_WM_AUTOMATION;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
     Atom       xa_MOTIF_BINDINGS;
     Atom       xa_COMPOUND_TEXT;
     Atom       xa_SM_CLIENT_ID;
     Atom       xa_WMSAVE_HINT;
 
 
-#ifdef WSM
-
     /* atoms used for workspace management: */
 
     Atom       xa_DT_WORKSPACE_HINTS;
@@ -2234,7 +1956,7 @@ typedef struct _WmGlobalData
     Atom        xa_DT_WM_EXIT_SESSION;
     Atom        xa_DT_WM_LOCK_DISPLAY;
     Atom        xa_DT_WM_READY;
-#endif /* WSM */
+
 #ifndef NO_OL_COMPAT
     Atom       xa_OL_WIN_ATTR;
     Atom       xa_OL_DECOR_RESIZE;
@@ -2259,23 +1981,17 @@ typedef struct _WmGlobalData
     Boolean    autoKeyFocus;                   /* resource */
     int                autoRaiseDelay;                 /* resource */
     String     bitmapDirectory;                /* resource */
-#ifdef WSM
     String     backdropDirs;                   /* resource */
-#endif /* WSM */
     Boolean    clientAutoPlace;                /* resource */
     int                colormapFocusPolicy;            /* resource */
     String     configFile;                     /* resource */
-#ifdef WSM
     String     cppCommand;                     /* resource */
-#endif /* WSM */
     Boolean    deiconifyKeyFocus;              /* resource */
     int                doubleClickTime;                /* resource */
     Boolean    enableWarp;                     /* resource */
     Boolean    enforceKeyFocus;                /* resource */
     Boolean    freezeOnConfig;                 /* resource - testing */
-#ifdef WSM
     Boolean    useWindowOutline;               /* resource */
-#endif /* WSM */
     Boolean    iconAutoPlace;                  /* resource */
     Boolean    iconClick;                      /* resource */
     Boolean    interactivePlacement;           /* resource */
@@ -2292,32 +2008,21 @@ typedef struct _WmGlobalData
     Boolean     multiScreen;                   /* resource */
     String     screenList;                     /* resource */
     int                showFeedback;                   /* resource */
-#ifdef WSM
     Boolean    refreshByClearing;              /* resource */
     Boolean    rootButtonClick;                /* resource */
-#endif /* WSM */
     Boolean    startupKeyFocus;                /* resource */
     Boolean    systemButtonClick;              /* resource */
     Boolean    systemButtonClick2;             /* resource */
     Boolean    useLargeCursors;
-#if  defined(PANELIST)
     Boolean    useFrontPanel;                  /* resource */
-#endif /* PANELIST */
-#ifdef WSM
     String      helpDirectory;                 /* resource */
     Window     requestContextWin;              /* for WmRequest f.fcns */
-#endif /* WSM */
-#ifdef MINIMAL_DT
     Boolean     dtLite;                        /* resource */
     Boolean     blinkOnExec;                    /* resource */
-#endif /* MINIMAL_DT */
-#ifdef PANELIST
     WmScreenData *dtSD; /* screen for front panel */
     int         iSlideUpsInProgress;
-#endif /*PANELIST  */
     Boolean    waitForClicks;                  /* resource */
     FrameStyle frameStyle;                     /* resource */
-#ifdef WSM
     Dimension  iconExternalShadowWidth;        /* resource */
     Dimension  frameExternalShadowWidth;       /* resource */
     int                marqueeSelectGranularity;       /* resource */
@@ -2326,7 +2031,6 @@ typedef struct _WmGlobalData
     Boolean    bReplayedButton;                /* true if button replayed */
     Boolean    bSuspendSecondaryRestack;       /* overrides transient
                                                   stacking */
-#endif /* WSM */
 
     XmString   clientDefaultTitle;
     XmString   iconDefaultTitle;
@@ -2358,9 +2062,7 @@ typedef struct _WmGlobalData
 
 /* quick references to global data: */
 #define DISPLAY                wmGD.display
-#ifdef WSM
 #define DISPLAY1       wmGD.display1
-#endif /* WSM */
 #define ACTIVE_PSD     (wmGD.pActiveSD)
 #define ACTIVE_SCREEN  (wmGD.pActiveSD->screen)
 #define ACTIVE_WS      (wmGD.pActiveSD->pActiveWS)
@@ -2370,12 +2072,10 @@ typedef struct _WmGlobalData
 /* According to the xkb protocol bits 13 and 14 are interpreted as a  */
 /* two-bit unsigned numeric value and report the state keyboard group */
 #define NOLOCKMOD(state)  ((state) & ~wmGD.lockingModMask & ~(3 << 13))
-#ifdef WSM
 /* absent map behavior policy values (absentMapBehavior): */
 #define AMAP_BEHAVIOR_ADD       0
 #define AMAP_BEHAVIOR_MOVE      1
 #define AMAP_BEHAVIOR_IGNORE    2 
-#endif /* WSM */
 
 /* colormap focus policy values (colormapFocus): */
 #define CMAP_FOCUS_EXPLICIT    0
@@ -2428,9 +2128,7 @@ typedef struct _WmGlobalData
 #define MOVE_CLIENT                    1
 #define RESIZE_CLIENT                  2
 #define PLACE_CLIENT                   3
-#ifdef WSM
 #define MARQUEE_SELECT                 4
-#endif /* WSM */
 
 /* Motif input bindings file name */
 #define MOTIF_BINDINGS_FILE            ".motifbind"
@@ -2515,12 +2213,8 @@ extern char *_DtGetMessage(char *filename, int set, int n, char *s);
 # else  /* __ultrix */
 #  define _CLIENT_CAT_NAME "dtwm"
 # endif /* __ultrix */
-# ifdef WSM
-#  define GETMESSAGE(set, number, string)\
+# define GETMESSAGE(set, number, string)\
     _DtGetMessage(_CLIENT_CAT_NAME, set, number, string)
-# else
-#  define GETMESSAGE(set, number, string) (string)
-# endif /* WSM */
 #else
 # define GETMESSAGE(set, number, string)\
     string
index d6d747b4a5688f9cf95292f4eb8696d978474ac6..6e8d340945811ae0d641f3bd05e9dd712825790a 100644 (file)
 */ 
 /* 
  * Motif Release 1.2
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmGraphics.c /main/4 1995/11/01 11:38:53 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -113,7 +108,7 @@ static char rcsid[] = "$XConsortium: WmGraphics.c /main/4 1995/11/01 11:38:53 rs
 void BevelRectangle (RList *prTop, RList *prBot, int x, int y, unsigned int width, unsigned int height, unsigned int top_wid, unsigned int right_wid, unsigned int bot_wid, unsigned int left_wid)
 {
     XRectangle *prect;         /* pointer to "current" rectangle */
-    register int count;                /* counter used for beveling operation */
+    int count;         /* counter used for beveling operation */
     int join1, join2;          /* used to compute "good" bevel joints */
     int x1, y1, len;           /* used to compute bevel parameters */
     int *piTop, *piBot;
@@ -267,7 +262,7 @@ void BevelRectangle (RList *prTop, RList *prBot, int x, int y, unsigned int widt
 void BevelDepressedRectangle (RList *prTop, RList *prBot, int x, int y, unsigned int width, unsigned int height, unsigned int top_wid, unsigned int right_wid, unsigned int bot_wid, unsigned int left_wid, unsigned int in_wid)
 {
     XRectangle *prect;         /* pointer to "current" rectangle */
-    register int count;                /* counter used for beveling operation */
+    int count;         /* counter used for beveling operation */
     int join1, join2;          /* used to compute "good" bevel joints */
     int x1, y1, len;           /* used to compute bevel parameters */
     int *piTop, *piBot;
@@ -989,9 +984,7 @@ Boolean ExtendRList (RList *prl, unsigned int amt)
  *  --------
  *                     
  *************************************<->***********************************/
-RList *AllocateRList (amt)
-
-    unsigned int amt;
+RList *AllocateRList (unsigned int amt)
 {
     RList *prl;
 
@@ -1115,42 +1108,22 @@ void WmDrawString (Display *dpy, Drawable d, GC gc, int x, int y, char *string,
  *    B/W displays.
  *                     
  *************************************<->***********************************/
-#ifdef WSM
 void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist, 
                     XmString xmstring, GC gc, Position x, Position y, 
                     Dimension width,  XRectangle *pbox, Boolean bCenter)
-#else /* WSM */
-void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist, 
-                    XmString xmstring, GC gc, Position x, Position y, 
-                    Dimension width,  XRectangle *pbox)
-#endif /* WSM */
 {
     Dimension textWidth;
-#ifdef WSM
     int alignment;
-#else /* WSM */
-    int alignment = XmALIGNMENT_BEGINNING;
-#endif /* WSM */
     
 
     textWidth = XmStringWidth(xmfontlist, xmstring);
 
-#ifdef WSM
     alignment = bCenter ? XmALIGNMENT_CENTER : XmALIGNMENT_BEGINNING;
 
     if (textWidth >= pbox->width)  /* can't center text if no room */
     {                              /* left justify & clip text */
        alignment = XmALIGNMENT_BEGINNING;
     }
-#else /* WSM */
-    if (textWidth < pbox->width) {      /* center text if there's room */
-       alignment = XmALIGNMENT_CENTER;
-    }
-    else 
-    {                              /* left justify & clip text */
-       alignment = XmALIGNMENT_BEGINNING;
-    }
-#endif /* WSM */
     
     if (ACTIVE_PSD->cleanText)
     {
@@ -1165,8 +1138,6 @@ void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist,
     }
 } /* END OF FUNCTION WmDrawXmString */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  WmInstallBitmapIntoXmCache (pchName, bitmap, width, height)
@@ -1263,4 +1234,3 @@ void WmInstallBitmapDataIntoXmCache (WmScreenData *pSD,
     }
 
 } /* END OF FUNCTION WmInstallBitmapDataIntoXmCache */
-#endif /* WSM */
index c68ad3c79b65fc0e4e75743bfa69866d0cfef759..eb902e85ad867d42e5ec85a94b065d5620e9f35e 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmGraphics.h /main/4 1995/11/01 11:39:06 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -53,16 +52,10 @@ extern void StretcherCorner (RList *prTop, RList *prBot, int x, int y,
                             unsigned int cwidth, unsigned int cheight);
 extern void WmDrawString (Display *dpy, Drawable d, GC gc, int x, int y, 
                          char *string, unsigned int length);
-#ifdef WSM
 extern void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist, 
                            XmString xmstring, GC gc, Position x, Position y, 
                            Dimension width, XRectangle *pbox,
                            Boolean bCenter);
-#else /* WSM */
-extern void WmDrawXmString (Display *dpy, Window w, XmFontList xmfontlist, 
-                           XmString xmstring, GC gc, Position x, Position y, 
-                           Dimension width, XRectangle *pbox);
-#endif /* WSM */
 
 extern GC WmGetGC (WmScreenData *pSD, unsigned long gc_mask, XGCValues *pGcv);
 
index c66a2160ee616ad17af52dbedb9b577f8be69cef..198c55b01a595c0cfe26da49c42b354ce3bd1a0c 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $TOG: WmHelp.c /main/8 1997/06/18 17:30:51 samborn $ */
-#ifdef WSM
 /* 
  * (c) Copyright 1987, 1988, 1989, 1990, 1992, 1993 HEWLETT-PACKARD COMPANY 
  * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. 
  * ALL RIGHTS RESERVED 
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = ""
-#endif
-#endif
+*/
 
 /*
  * Included Files:
@@ -48,9 +41,7 @@ static char rcsid[] = ""
 #include "WmHelp.h"
 #include "WmCDecor.h"
 #include "WmResParse.h"
-#ifdef PANELIST
 #include "WmPanelP.h"
-#endif /* PANELIST */
 #include "WmResNames.h"
 #include "WmWrkspace.h"
 #include "DataBaseLoad.h"
@@ -649,7 +640,7 @@ static void WmDtCloseHelpCB (
     pTemp = pSD->cachedHelp;
 
     /* Search our Cache List for the closed help dialog */
-    while ((pTemp->helpDialog != helpDialog) && (pTemp != NULL))
+    while (pTemp && (pTemp->helpDialog != helpDialog))
     {
        pTemp = pTemp->pNext;
     }
@@ -2782,9 +2773,7 @@ wmDtErrorDialog(
     unsigned int mask;
     Dimension dWidth, dHeight;
     Position x, y;
-#ifdef PANELIST
     WmPanelistObject  pPanelist;
-#endif /* PANELIST */
 
     xmsMessage = 
            XmStringCreateLocalized (sMessage);
@@ -3048,7 +3037,6 @@ wmDtErrorDialogPopupCB(
 } /* END OF FUNCTION wmDtErrorDialogPopupCB */
 
 /****************************   eof    ***************************/
-#endif /* WSM */
 
 
 
index 9bda0e58eab93df6976dc5e11b798659e8a49445..e74a426bb525405ca7783654fe715b4156710d6e 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: WmHelp.h /main/4 1995/11/01 11:39:43 rswiston $ */
-#ifdef WSM
 /* 
  * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY 
  * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. 
  * ALL RIGHTS RESERVED 
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = ""
-#endif
-#endif
 
 #include "WmGlobal.h"
 /*
@@ -88,4 +81,3 @@ extern void WmDtWmTopicHelpCB (Widget  theWidget,
 /********    End Public Function Declarations    ********/
 
 /****************************   eof    ***************************/
-#endif /* WSM */
index f26fafa4554c60d0916b9cc9a0dc698c30b8ef90..4978ba62fc410a6a7cc0777ecac7dbb22e558d16 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2.3
 */ 
-/*   $XConsortium: WmIBitmap.h /main/3 1995/11/01 11:39:56 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -217,7 +216,6 @@ static unsigned char slant2_bits[] = {
 #endif /* MWM_NEED_SLANT2 */
 
 
-#ifdef PANELIST
 #ifdef DTWM_NEED_FNTPL
 #define fntpl_i_bm_width 50
 #define fntpl_i_bm_height 50
@@ -256,8 +254,7 @@ static unsigned char fntpl_i_bm_bits[] = {
    0x00, 0x00};
 #endif /* DTWM_NEED_FNTPL */
 
-#endif /* PANELIST */
-#ifdef WSM
+
 /*
  * Backdrop bitmap patterns
  */
@@ -299,8 +296,6 @@ static unsigned char bits6_bits[] = {
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 #endif /* DTWM_NEED_BACKBITS */
 
-#endif /* WSM */
-#ifdef PANELIST
 /*
  *
  *  Used to define the small hourglass and mask used to indicate
@@ -326,7 +321,4 @@ static unsigned char time16m_bits[] = {
    0xfe, 0x1f, 0xff, 0x3f, 0xff, 0x3f};
 #endif  /* DTWM_NEED_TIME16 */
 
-#endif /* PANELIST */
-#ifdef WSM
 /****************************   eof    ***************************/
-#endif /* WSM */
index b0d96d3a54c4dd881375d1c7bb01c6b770c7ca99..e558d77f360779930c11f9bb0bbdf42e68449921 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2.4
 */ 
-/*   $XConsortium: WmICCC.h /main/3 1995/11/01 11:40:07 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index 79e2a01393211ff690550b2f0d606219f2fb0011..726f7251b02cad3ec5630550438bdd051e6a0b21 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.3
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmIDecor.c /main/6 1996/06/20 09:38:43 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -52,9 +47,7 @@ static char rcsid[] = "$XConsortium: WmIDecor.c /main/6 1996/06/20 09:38:43 rswi
 #include "WmIconBox.h"
 #include "WmMenu.h"
 #include "WmWinInfo.h"
-#ifdef WSM
 #include "WmWrkspace.h"
-#endif /* WSM */
 
 
 
@@ -105,9 +98,7 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd)
     unsigned long attr_mask;
     int xOffset;
     int yOffset;
-#ifdef WSM
     WsClientData *pWsc = GetWsClientData (pWS, pcd);
-#endif /* WSM */
 
 
     /*
@@ -150,24 +141,13 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd)
                                ICON_APPEARANCE(pcd).background;
     }
    
-#ifdef WSM
     if ((!pcd->pSD->useIconBox) || 
        (pcd->clientFlags & (CLIENT_WM_CLIENTS | FRONT_PANEL_BOX)))
-#else
-    if ((!pcd->pSD->useIconBox) || (pcd->clientFlags & ICON_BOX))
-#endif /* WSM */
     {
-#ifdef WSM
        pWsc->iconFrameWin = XCreateWindow (DISPLAY,
                               ROOT_FOR_CLIENT(pcd),    /* parent */
                               pWsc->iconX,
                               pWsc->iconY,
-#else /* WSM */
-       pcd->iconFrameWin = XCreateWindow (DISPLAY,
-                              ROOT_FOR_CLIENT(pcd),    /* parent */
-                              pcd->iconX,
-                              pcd->iconY,
-#endif /* WSM */
                               (unsigned int) ICON_WIDTH(pcd),
                               (unsigned int) ICON_HEIGHT(pcd),
                               0,               /* border width */
@@ -188,11 +168,7 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd)
          */
 
         if ((pcd->pSD->useIconBox) && 
-#ifdef WSM
            (!(pcd->clientFlags & CLIENT_WM_CLIENTS)) &&
-#else
-           (!(pcd->clientFlags & ICON_BOX)) &&
-#endif /* WSM */
            (pcd->clientFunctions & MWM_FUNC_MINIMIZE) )
         {
             if (!InsertIconIntoBox(pWS->pIconBox, pcd))
@@ -227,12 +203,8 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd)
      * Don't adjust the icon for the icon box itself
      */
 
-#ifdef PANELIST
     if (pWS->pIconBox && (pWS->pIconBox->pCD_iconBox != pcd) &&
        !(pcd->clientFlags & FRONT_PANEL_BOX))
-#else /* PANELIST */
-    if (pWS->pIconBox && (pWS->pIconBox->pCD_iconBox != pcd))
-#endif /* PANELIST */
     {
        xOffset = IB_MARGIN_WIDTH;
        yOffset = IB_MARGIN_HEIGHT;
@@ -253,9 +225,7 @@ Boolean MakeIcon (WmWorkspaceData *pWS, ClientData *pcd)
        ReparentIconWindow (pcd, xOffset, yOffset);
     }
 
-#ifdef WSM
     if (pcd->piconTopShadows->used == 0)
-#endif /* WSM */
     MakeIconShadows (pcd, xOffset, yOffset);
 
     return(TRUE);
@@ -869,17 +839,9 @@ void DrawIconTitle (ClientData *pcd)
     GetIconTitleBox (pcd, &textBox);
 
     /* get appropriate GCs */
-#ifdef WSM
-#ifdef PANELIST
     if ((ACTIVE_PSD->useIconBox && 
        !((pcd->dtwmBehaviors & (DtWM_BEHAVIOR_PANEL)) ||
           (pcd->clientFlags & CLIENT_WM_CLIENTS))) ||
-#else /* PANELIST */
-    if ((ACTIVE_PSD->useIconBox && !(pcd->clientFlags & CLIENT_WM_CLIENTS)) || 
-#endif /* PANELIST */
-#else
-    if ((ACTIVE_PSD->useIconBox && !(pcd->clientFlags & ICON_BOX)) || 
-#endif /* WSM */
        !(wmGD.keyboardFocus == pcd)) 
     {
        iconGC = ICON_APPEARANCE(pcd).inactiveGC;
@@ -905,15 +867,9 @@ void DrawIconTitle (ClientData *pcd)
 
 
     /* paint the text */
-#ifdef WSM
     WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), ICON_APPEARANCE(pcd).fontList,
                   pcd->iconTitle, iconGC, 
                   textBox.x, textBox.y, textBox.width, &textBox, True);
-#else /* WSM */
-    WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), ICON_APPEARANCE(pcd).fontList,
-                  pcd->iconTitle, iconGC, 
-                  textBox.x, textBox.y, textBox.width, &textBox);
-#endif /* WSM */
 
 } /* END OF FUNCTION DrawIconTitle */
 
@@ -965,13 +921,8 @@ void RedisplayIconTitle (ClientData *pcd)
         * Get appropriate GCs 
         * Dim text if this is in the icon box and the client is mapped 
         */
-#ifdef WSM
        if ((ACTIVE_PSD->useIconBox && (P_ICON_BOX(pcd)) &&
            !(pcd->clientFlags & CLIENT_WM_CLIENTS)) || 
-#else
-       if ((ACTIVE_PSD->useIconBox && (P_ICON_BOX(pcd)) &&
-           !(pcd->clientFlags & ICON_BOX)) || 
-#endif /* WSM */
            !(wmGD.keyboardFocus == pcd)) 
        {
            iconGC = ICON_APPEARANCE(pcd).inactiveGC;
@@ -997,18 +948,11 @@ void RedisplayIconTitle (ClientData *pcd)
            FALSE);
 
        /* in with the new */
-#ifdef WSM
        WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), 
                       ICON_APPEARANCE(pcd).fontList,
                       pcd->iconTitle, iconGC, 
                       textBox.x, textBox.y, textBox.width, &textBox,
                       True);
-#else /* WSM */
-       WmDrawXmString(DISPLAY, ICON_FRAME_WIN(pcd), 
-                      ICON_APPEARANCE(pcd).fontList,
-                      pcd->iconTitle, iconGC, 
-                      textBox.x, textBox.y, textBox.width, &textBox);
-#endif /* WSM */
 
        /* 
         * Erase & paint text in the active icon text window
@@ -1298,7 +1242,6 @@ void ShowActiveIcon (ClientData *pcd)
        if ((!ACTIVE_PSD->useIconBox) || 
            (P_ICON_BOX(pcd) == NULL))
        {
-#ifndef MOTIF_ONE_DOT_ONE
            if (ICON_DECORATION(pcd) & ICON_IMAGE_PART)
            {
                Dimension dheight, dwidth;
@@ -1337,9 +1280,6 @@ void ShowActiveIcon (ClientData *pcd)
                            (unsigned int) ICON_WIDTH(pcd), 
                            (unsigned int) ICON_HEIGHT(pcd), False);
            }
-#else
-           XClearWindow (DISPLAY, ICON_FRAME_WIN(pcd));
-#endif
        }
        else
        {
@@ -1370,11 +1310,7 @@ void ShowActiveIcon (ClientData *pcd)
        }
 
        /* simulate exposure of window */
-#ifndef MOTIF_ONE_DOT_ONE
        IconExposureProc(pcd, False);
-#else
-       IconExposureProc(pcd, True);
-#endif
 
     }
 
@@ -1443,7 +1379,6 @@ void ShowInactiveIcon (ClientData *pcd, Boolean refresh)
            if ((!ACTIVE_PSD->useIconBox) || 
                (P_ICON_BOX(pcd) == NULL))
            {
-#ifndef MOTIF_ONE_DOT_ONE
                XmeClearBorder (DISPLAY, ICON_FRAME_WIN(pcd),
                                0, 0,
                                ICON_WIDTH(pcd), ICON_IMAGE_HEIGHT(pcd), 4);
@@ -1453,9 +1388,6 @@ void ShowInactiveIcon (ClientData *pcd, Boolean refresh)
                            0, ICON_IMAGE_HEIGHT(pcd),
                            (unsigned int) ICON_WIDTH(pcd), 
                            (unsigned int) ICON_HEIGHT(pcd), False);
-#else
-               XClearWindow (DISPLAY, ICON_FRAME_WIN(pcd));
-#endif
            }
            else
            {
@@ -1473,11 +1405,7 @@ void ShowInactiveIcon (ClientData *pcd, Boolean refresh)
        
 
         /* simulate exposure of window */
-#ifndef MOTIF_ONE_DOT_ONE
            IconExposureProc(pcd, False);
-#else
-           IconExposureProc(pcd, True);
-#endif
        }
 
     }
@@ -1519,10 +1447,8 @@ void ReparentIconWindow (ClientData *pcd, int xOffset, int yOffset)
     XWindowChanges windowChanges;
     unsigned int mask;
 
-#ifdef PANELIST
     if (!pcd->pECD)
     {
-#endif /* PANELIST */
     /*
      * Check if window size is too big
      */
@@ -1590,9 +1516,7 @@ void ReparentIconWindow (ClientData *pcd, int xOffset, int yOffset)
     /*
      * Map the icon window when the icon frame is mapped.
      */
-#ifdef PANELIST
     } /* END if (!pcd->pECD) */
-#endif /* PANELIST */
 } /* END OF FUNCTION ReparentIconWindow */
 
 \f
@@ -1842,17 +1766,10 @@ void PaintActiveIconText (ClientData *pcd, Boolean erase)
                    FALSE);
     }
 
-#ifdef WSM
     WmDrawXmString(DISPLAY, pcd->pSD->activeIconTextWin, 
                   ICON_APPEARANCE(pcd).fontList,
                   pcd->iconTitle, iconGC, 
                   textBox.x, textBox.y, textBox.width, &textBox, True);
-#else /* WSM */
-    WmDrawXmString(DISPLAY, pcd->pSD->activeIconTextWin, 
-                  ICON_APPEARANCE(pcd).fontList,
-                  pcd->iconTitle, iconGC, 
-                  textBox.x, textBox.y, textBox.width, &textBox);
-#endif /* WSM */
 
 
 } /* END OF FUNCTION PaintActiveIconText */
index 395ea40516779b4b0c5c8248baac086a607810c2..6ae98093da0fcc7df3edac183e8ed129867e2a69 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmIDecor.h /main/4 1995/11/01 11:40:37 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index 39b74c6cbddc979fbcb590d071b2e53a463c895c..1f2142ba9f4d8fffa4f9baac9b316b4808a8fe56 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $TOG: WmIPC.c /main/11 1999/09/20 15:17:25 mgreess $ */
 /* 
  * (c) Copyright 1997, The Open Group 
  */
 /* 
  * (c) Copyright 1987, 1988, 1989, 1990, 1992, 1993 HEWLETT-PACKARD COMPANY 
  * ALL RIGHTS RESERVED 
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = ""
-#endif
-#endif
+*/
 
 /*
  * Included Files:
@@ -428,12 +422,10 @@ dtReadyNotification( void )
 void 
 WmStopWaiting( void )
 {
-#ifdef PANELIST 
      if (wmGD.dtSD)
      {
         WmFrontPanelSetBusy (False);
      }
-#endif /* PANELIST */
 } /* END OF FUNCTION WmStopWaiting */
 
 
@@ -646,7 +638,6 @@ NoticeMsgCB(Tt_message m, Tt_pattern p)
        /* CDExc21081 */
        tt_message_destroy(m);
     }
-#ifdef PANELIST 
     else if (!strcmp(op, "DtActivity_Beginning")) {
        if (wmGD.dtSD) {
           WmFrontPanelSetBusy (True);
@@ -655,7 +646,6 @@ NoticeMsgCB(Tt_message m, Tt_pattern p)
        /* CDExc21081 */
        tt_message_destroy(m);
     }
-#endif /* PANELIST */
     else if (!strcmp(op, "DtTypes_Reloaded")) {
        /*
         * Blink busy light during reload.
@@ -869,11 +859,7 @@ RequestMsgCB(Tt_message m, Tt_pattern p)
                        pCD = clients[i];
                        strcpy(ptr, pCD->smClientID);
                        clientWorkspaces[i] =
-#ifdef WSM
                            pCD->pWsList[pCD->currentWsc].wsID;
-#else
-                           pCD->pSD->pWS->id;
-#endif
                    }
                }
            }
index 53c55bd2dd3fc3e44aac847cc8571d97cee9ed00..662622bfcd6cc0e5c08ca678022e46ea20434390 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $TOG: WmIPC.h /main/5 1999/09/20 15:17:55 mgreess $ */
 /* 
  * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY 
  * ALL RIGHTS RESERVED 
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = ""
-#endif
-#endif
-
 
 /********    Public Function Declarations    ********/
 
index 9bbb009a3ea5797539c1c67505afdf1866627810..723314e86a3755f0d291ca4e831742b48c61e2d1 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.1
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmIPlace.c /main/4 1995/11/01 11:41:20 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -49,9 +44,7 @@ static char rcsid[] = "$XConsortium: WmIPlace.c /main/4 1995/11/01 11:41:20 rswi
 #include "WmIDecor.h"
 #include "WmIconBox.h"
 #include "WmWinConf.h"
-#ifdef WSM
 #include "WmWrkspace.h"
-#endif /* WSM */
 
 
 /*
@@ -807,9 +800,7 @@ void PackRootIcons (void)
     ClientData *pCD;
     ClientData *pCD_active;
     int hasActiveText = 1;
-#ifdef WSM
     WsClientData *pWsc;
-#endif /* WSM */
 
     /* 
      * find context of the activeIconTextWin to get pCD and then 
@@ -846,39 +837,23 @@ void PackRootIcons (void)
                MoveIconInfo (&ACTIVE_WS->IPData, iOld, iNew);
 
                pCD = ACTIVE_WS->IPData.placeList[iNew].pCD;
-#ifdef WSM
                pWsc = GetWsClientData (ACTIVE_WS, pCD);
                pWsc->iconPlace = iNew;
                CvtIconPlaceToPosition (&ACTIVE_WS->IPData, 
                    pWsc->iconPlace, &pWsc->iconX, &pWsc->iconY);
-#else /* WSM */
-               pCD->iconPlace = iNew;
-               CvtIconPlaceToPosition (&ACTIVE_WS->IPData, 
-                   pCD->iconPlace, &pCD->iconX, &pCD->iconY);
-#endif /* WSM */
 
                if (hasActiveText && (pCD == pCD_active))
                {
                    /* hide activeIconTextWin first */
                    HideActiveIconText ((WmScreenData *)NULL);
-#ifdef WSM
                    XMoveWindow (DISPLAY, pWsc->iconFrameWin, pWsc->iconX, 
                             pWsc->iconY);
-#else /* WSM */
-                   XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), pCD->iconX, 
-                            pCD->iconY);
-#endif /* WSM */
                    ShowActiveIconText (pCD);
                }
                else
                {
-#ifdef WSM
                    XMoveWindow (DISPLAY, pWsc->iconFrameWin, pWsc->iconX, 
                             pWsc->iconY);
-#else /* WSM */
-                   XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), pCD->iconX, 
-                            pCD->iconY);
-#endif /* WSM */
                }
            }
        }
@@ -913,28 +888,21 @@ void PackRootIcons (void)
 
 void MoveIconInfo (IconPlacementData *pIPD, int p1, int p2)
 {
-#ifdef WSM
     WsClientData *pWsc;
-#endif /* WSM */
 
     /* only move if destination is empty */
     if (pIPD->placeList[p2].pCD == NULL)
     {
        pIPD->placeList[p2].pCD = pIPD->placeList[p1].pCD;
        pIPD->placeList[p2].theWidget = pIPD->placeList[p1].theWidget;
-#ifdef WSM
 
        pWsc = GetWsClientData (pIPD->placeList[p2].pCD->pSD->pActiveWS,
                                pIPD->placeList[p2].pCD);
        pWsc->iconPlace = p2;
-#else /* WSM */
-       pIPD->placeList[p2].pCD->iconPlace = p2;
-#endif /* WSM */
 
        pIPD->placeList[p1].pCD =  NULL;
        pIPD->placeList[p1].theWidget = NULL;
     }
 }
-#ifdef WSM
+
 /****************************   eof    ***************************/
-#endif /* WSM */
index d2e592b90b30dc613ebbb9c37d5e5b96ef455103..2d732063bedf1a7d933daff483e68d8526f2569c 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmIPlace.h /main/4 1995/11/01 11:41:34 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index 166f0ddd639e85fd0f8ba0d0d7aef3b3f4a4460c..062b346c22661d8d0c2f45b25550e14aece41f89 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.4
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmIconBox.c /main/7 1999/05/20 16:35:12 mgreess $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990, 1993, 1994 Hewlett-Packard Company
  * (c) Copyright 1993, 1994 International Business Machines Corp.
@@ -44,9 +39,7 @@ static char rcsid[] = "$TOG: WmIconBox.c /main/7 1999/05/20 16:35:12 mgreess $"
  */
 
 #include "WmGlobal.h"
-#ifdef WSM
 #include "WmHelp.h"
-#endif /* WSM */
 #include <X11/StringDefs.h>
 #include <X11/Intrinsic.h>
 #include <X11/Shell.h>
@@ -88,17 +81,13 @@ static char rcsid[] = "$TOG: WmIconBox.c /main/7 1999/05/20 16:35:12 mgreess $"
 #include "WmIDecor.h"
 #include "WmIPlace.h"
 #include "WmImage.h"
-#ifdef PANELIST
 #include "WmPanelP.h"  /* for typedef in WmManage.h */
-#endif /* PANELIST */
 #include "WmManage.h"
 #include "WmMenu.h"
 #include "WmResParse.h"
 #include "WmResource.h"
 #include "WmWinInfo.h"
-#ifdef WSM
 #include "WmWrkspace.h"
-#endif /* WSM */
 
 #ifndef MAX
 #define MAX(a,b) ((a)>(b)?(a):(b))
@@ -136,16 +125,13 @@ Const char *szvertical = "vertical";
 void InitIconBox (WmScreenData *pSD)
 
 {
-#ifdef WSM
     int iws;
-#endif /* WSM */
     /*
      * Start the process of making the icon boxes
      */
 
 
 
-#ifdef WSM
     /*
      * Manage a separate icon box in every workspace
      * on this screen.
@@ -155,10 +141,6 @@ void InitIconBox (WmScreenData *pSD)
        AddIconBoxForWorkspace (&pSD->pWS[iws]);
     }
 
-#else /* WSM */
-    ManageWindow (pSD, None, MANAGEW_ICON_BOX);
-#endif /* WSM */
-
     if (pSD->fadeNormalIcon)
     {
        MakeFadeIconGC (pSD);
@@ -167,8 +149,6 @@ void InitIconBox (WmScreenData *pSD)
 
 } /* END OF FUNCTION InitIconBox */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  AddIconBoxForWorkspace (pWS)
@@ -189,9 +169,7 @@ void AddIconBoxForWorkspace (WmWorkspaceData *pWS)
     ManageWindow (pWS->pSD, None, MANAGEW_ICON_BOX);
 
 } /* END OF FUNCTION AddIconBoxForWorkspace */
-#endif /* WSM */
 
-\f
 /*************************************<->*************************************
  *
  *  MakeIconBox (pWS, pCD);
@@ -291,8 +269,6 @@ Boolean MakeIconBox (WmWorkspaceData *pWS, ClientData *pCD)
 
 } /* END OF FUNCTION MakeIconBox */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  DestroyIconBox (pWS)
@@ -335,9 +311,7 @@ void DestroyIconBox (WmWorkspaceData *pWS)
     XtFree ((char *) pIBD);
    
 } /* END OF FUNCTION DestroyIconBox */
-#endif /* WSM */
 
-\f
 /*************************************<->*************************************
  *
  *  MakeShell (pWS, pIBD)
@@ -374,9 +348,7 @@ void MakeShell (WmWorkspaceData *pWS, IconBoxData *pIBD)
 
     Arg setArgs[20];
     int i;
-#ifdef WSM
     char *pchIBTitle = NULL;
-#endif /* WSM */
 
     /*
      * Create top level application shell for icon box
@@ -390,15 +362,6 @@ void MakeShell (WmWorkspaceData *pWS, IconBoxData *pIBD)
 
     XtSetArg (setArgs[i], XmNkeyboardFocusPolicy, (XtArgVal)XmEXPLICIT); i++;
 
-#ifndef WSM
-    if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW))))
-    {
-       XtSetArg (setArgs[i], XmNbackground,  
-                 (XtArgVal) pWS->pSD->clientAppearance.background ); i++;
-       XtSetArg (setArgs[i], XmNforeground,  
-                 (XtArgVal) pWS->pSD->clientAppearance.foreground ); i++;
-    }
-#else  /* WSM  */
     if (pWS->pSD->iconBoxTitle)
     {
        pchIBTitle = WmXmStringToString (pWS->pSD->iconBoxTitle);
@@ -406,7 +369,6 @@ void MakeShell (WmWorkspaceData *pWS, IconBoxData *pIBD)
        XtSetArg (setArgs[i], XmNtitle, (XtArgVal)pchIBTitle); i++;
        XtSetArg (setArgs[i], XmNiconName, (XtArgVal)pchIBTitle); i++;
     }
-#endif /* WSM */
     XtSetArg (setArgs[i], XmNmappedWhenManaged, (XtArgVal)False); i++;
     XtSetArg (setArgs[i], XmNdialogStyle, (XtArgVal)XmDIALOG_MODELESS); i++;
     XtSetArg (setArgs[i], XmNdepth, 
@@ -414,19 +376,12 @@ void MakeShell (WmWorkspaceData *pWS, IconBoxData *pIBD)
     XtSetArg (setArgs[i], XmNscreen, 
        (XtArgVal) ScreenOfDisplay (DISPLAY, pWS->pSD->screen)); i++;
 
-#ifdef WSM
     pIBD->shellWidget = (Widget) XtCreatePopupShell (WmNclient, 
                                        topLevelShellWidgetClass,
                                         pWS->workspaceTopLevelW,
                                        (ArgList)setArgs, i);
 
     if (pchIBTitle != NULL) XtFree (pchIBTitle);
-#else /* WSM */
-    pIBD->shellWidget = (Widget) XtCreatePopupShell (WmNiconBox, 
-                                       topLevelShellWidgetClass,
-                                        pWS->workspaceTopLevelW,
-                                       (ArgList)setArgs, i);
-#endif /* WSM */
 
 } /* END OF FUNCTION MakeShell */
 
@@ -473,17 +428,6 @@ void MakeScrolledWindow (WmWorkspaceData *pWS, IconBoxData *pIBD)
      */
 
     i=0;
-#ifndef WSM
-/*
-    if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW))))
-    {
-       XtSetArg (setArgs[i], XmNbackground,  
-                 (XtArgVal) pWS->pSD->clientAppearance.background ); i++;
-       XtSetArg (setArgs[i], XmNforeground,  
-                 (XtArgVal) pWS->pSD->clientAppearance.foreground ); i++;
-    }
-*/
-#endif /* WSM */
     XtSetArg (setArgs[i], XmNborderWidth,  (XtArgVal) 0 ); i++;
     XtSetArg (setArgs[i], XmNmarginWidth,  (XtArgVal) 0 ); i++;
     XtSetArg (setArgs[i], XmNmarginHeight, (XtArgVal) 0 ); i++;
@@ -495,11 +439,9 @@ void MakeScrolledWindow (WmWorkspaceData *pWS, IconBoxData *pIBD)
                                        pIBD->shellWidget,
                                        (ArgList)setArgs, i);
 
-#ifdef WSM
     XtAddCallback (pIBD->frameWidget, XmNhelpCallback,
                    WmDtWmTopicHelpCB, WM_DT_ICONBOX_TOPIC);
 
-#endif /* WSM */
     /*
      * Create scrolled window to hold row column manager 
      */
@@ -510,16 +452,6 @@ void MakeScrolledWindow (WmWorkspaceData *pWS, IconBoxData *pIBD)
 
     XtSetArg (setArgs[i], XmNborderWidth , (XtArgVal) 0 ); i++;
     XtSetArg (setArgs[i], XmNspacing , (XtArgVal) IB_MARGIN_WIDTH ); i++;
-#ifndef WSM
-
-    if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW))))
-    {
-       XtSetArg (setArgs[i], XmNbackground,  
-                 (XtArgVal) pWS->pSD->clientAppearance.background ); i++;
-       XtSetArg (setArgs[i], XmNforeground,  
-                 (XtArgVal) pWS->pSD->clientAppearance.foreground ); i++;
-    }
-#endif /* WSM */
     /*
      * do we want to get these from a resource or set it here
      * to control the appearance of the iconBox
@@ -538,10 +470,8 @@ void MakeScrolledWindow (WmWorkspaceData *pWS, IconBoxData *pIBD)
                                        pIBD->frameWidget,
                                        (ArgList)setArgs, i);
 
-#ifndef MOTIF_ONE_DOT_ONE
     XtAddCallback(pIBD->scrolledWidget, XmNtraverseObscuredCallback,
                  (XtCallbackProc) IconScrollVisibleCallback, (caddr_t)NULL);
-#endif
 
     XtAddEventHandler(pIBD->scrolledWidget, 
                        StructureNotifyMask, 
@@ -603,17 +533,6 @@ void MakeBulletinBoard (WmWorkspaceData *pWS, IconBoxData *pIBD)
 #endif /* DEBUG_ICON_BOX */
     
     XtSetArg (setArgs[i], XmNshadowThickness,(XtArgVal) 0); i++;
-#ifndef WSM
-    if (!(Monochrome (XtScreen (pWS->pSD->screenTopLevelW))))
-    {
-       XtSetArg (setArgs[i], XmNforeground,  
-                 (XtArgVal) pWS->pSD->clientAppearance.background ); i++;
-       XtSetArg (setArgs[i], XmNbottomShadowColor,  
-               (XtArgVal) pWS->pSD->clientAppearance.bottomShadowColor ); i++;
-       XtSetArg (setArgs[i], XmNtopShadowColor,  
-                 (XtArgVal) pWS->pSD->clientAppearance.topShadowColor ); i++;
-    }
-#endif /* WSM */
 
     XtSetArg (setArgs[i], XmNspacing , 0); i++; 
     XtSetArg (setArgs[i], XmNmarginHeight , 0); i++;
@@ -858,9 +777,7 @@ void InitializeIconBoxData (WmWorkspaceData *pWS, IconBoxData *pIBD)
     pIBD->scrolledWidget = NULL;
     pIBD->bBoardWidget = NULL;
     pIBD->clipWidget = NULL; 
-#ifdef WSM
     pIBD->wsID = pWS->id;
-#endif /* WSM */
 
     ToLower (pWS->pSD->iconBoxSBDisplayPolicy);
     
@@ -878,11 +795,7 @@ void InitializeIconBoxData (WmWorkspaceData *pWS, IconBoxData *pIBD)
      * iconBoxGeometry width and height are not specified
      */
 
-#ifdef WSM
     if (pWS->iconBoxGeometry == NULL) /* not set by user */
-#else /* WSM */
-    if (pWS->pSD->iconBoxGeometry == NULL) /* not set by user */
-#endif /* WSM */
     {
        /*
         * Use the iconPlacement resource 
@@ -905,13 +818,8 @@ void InitializeIconBoxData (WmWorkspaceData *pWS, IconBoxData *pIBD)
     }
     else
     {
-#ifdef WSM
        mask = XParseGeometry(pWS->iconBoxGeometry, &X, &Y, 
                              &width, &height);
-#else /* WSM */
-       mask = XParseGeometry(pWS->pSD->iconBoxGeometry, &X, &Y, 
-                             &width, &height);
-#endif /* WSM */
 
        if ((mask & WidthValue) && (width > 0))
        {
@@ -1392,13 +1300,8 @@ void SetGeometry (WmWorkspaceData *pWS, ClientData *pCD, IconBoxData *pIBD)
      * Set initial placement of icon box
      */
 
-#ifdef WSM
     mask = XParseGeometry(pWS->iconBoxGeometry, &X, &Y, 
                              &width, &height);
-#else /* WSM */
-    mask = XParseGeometry(pCD->pSD->iconBoxGeometry, 
-                         &X, &Y, &width, &height);
-#endif /* WSM */    
     
     if (mask & XValue)
     {
@@ -1678,10 +1581,7 @@ void SetGranularity (WmWorkspaceData *pWS, ClientData *pCD, IconBoxData *pIBD)
  * 
  *************************************<->***********************************/
 
-MenuItem *GetIconBoxMenuItems (pSD)
-
-    WmScreenData *pSD;
-
+MenuItem *GetIconBoxMenuItems (WmScreenData *pSD)
 {
 
     return(ParseMwmMenuStr (pSD, 
@@ -1727,10 +1627,6 @@ void MapIconBoxes (WmWorkspaceData *pWS)
         while (pibd)
         {
            XtPopup(pibd->shellWidget, XtGrabNone);
-#ifndef WSM
-           F_Raise (NULL, pibd->pCD_iconBox, (XEvent *)NULL);
-           XMapWindow (DISPLAY, pibd->pCD_iconBox->clientFrameWin);
-#endif /* WSM */
            pibd = pibd->pNextIconBox;
         }
     }
@@ -1738,8 +1634,6 @@ void MapIconBoxes (WmWorkspaceData *pWS)
   
 } /* END OF FUNCTION MapIconBoxes */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  UnmapIconBoxes (pWS)
@@ -1782,10 +1676,7 @@ void UnmapIconBoxes (WmWorkspaceData *pWS)
     }
 
 } /* END OF FUNCTION UnmapIconBoxes */
-#endif /* WSM */
 
-#if defined(PANELIST)
-\f
 /******************************<->*************************************
  *
  *  IconBoxShowing ()
@@ -1810,30 +1701,16 @@ void UnmapIconBoxes (WmWorkspaceData *pWS)
  ******************************<->***********************************/
 
     
-#ifdef PANELIST
 Boolean
 IconBoxShowing (WmWorkspaceData *pWS)
-#else /* PANELIST */
-Boolean
-IconBoxShowing (WmWorkspaceData *pWS, ControlWindowStruct *pCW)
-#endif /* PANELIST */
 {
     Boolean rval = False;
     
-#ifdef PANELIST
     if (pWS->pIconBox &&
        ClientInWorkspace (pWS, pWS->pIconBox->pCD_iconBox))
     {
        rval = True;
     }
-#else /* PANELIST */
-    if (pWS->pIconBox &&
-       ClientInWorkspace (pWS, pWS->pIconBox->pCD_iconBox) &&
-       (pCW->pWsStatus[wsIndex].wsClientStatus == CLIENT_WINDOW_OPEN))
-    {
-       rval = True;
-    }
-#endif /* PANELIST */
 
     return (rval);
     
@@ -1864,14 +1741,8 @@ IconBoxShowing (WmWorkspaceData *pWS, ControlWindowStruct *pCW)
  * 
  ******************************<->***********************************/
     
-#ifdef PANELIST
 void
 IconBoxPopUp (WmWorkspaceData *pWS, Boolean up)
-#else /* PANELIST */
-void
-IconBoxPopUp (WmWorkspaceData *pWS, 
-    ControlWindowStruct *pCW, Boolean up)
-#endif /* PANELIST */
 {
     
     IconBoxData *pibd;
@@ -1907,7 +1778,6 @@ IconBoxPopUp (WmWorkspaceData *pWS,
     }
     
 } /* END OF FUNCTION IconBoxPopUp */
-#endif /* PANELIST */
 
 
 
@@ -1937,12 +1807,10 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
     Widget iconWidget;
     IconInfo *pIconInfo;
     static XmString dummyString = NULL;
-#ifdef WSM
     WsClientData *pWsc;
     WmWorkspaceData *pWS = GetWorkspaceData (pCD->pSD, pIBD->wsID);
 
     pWsc = GetWsClientData (pWS, pCD);
-#endif /* WSM */
 
     /*
      * If we go to multiple icon boxes, find the box this client
@@ -1955,11 +1823,7 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
     if (pCD->client)
     {
 
-#ifdef WSM
         pWsc->pIconBox = tmpPointerToIconBox;
-#else /* WSM */
-        P_ICON_BOX(pCD) = tmpPointerToIconBox;
-#endif /* WSM */
 
         iconWidth = ICON_WIDTH(pCD)
                + (2 * IB_MARGIN_WIDTH); 
@@ -1967,19 +1831,11 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
         iconHeight = ICON_HEIGHT(pCD) 
                + (2 * IB_MARGIN_HEIGHT);
 
-#ifdef WSM
         pIconInfo = InsertIconInfo  (pWsc->pIconBox, pCD, (Widget) NULL);
-#else /* WSM */
-        pIconInfo = InsertIconInfo  (P_ICON_BOX(pCD), pCD, (Widget) NULL);
-#endif /* WSM */
 
        if (pIconInfo)
        {
-#ifdef WSM
            pWsc->pIconBox->numberOfIcons++;
-#else /* WSM */
-           P_ICON_BOX(pCD)->numberOfIcons++;
-#endif /* WSM */
 
            i = 0;
            XtSetArg (setArgs[i], XmNbackground,  
@@ -1987,13 +1843,8 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
            XtSetArg (setArgs[i], XmNforeground,  
                            (XtArgVal) ICON_APPEARANCE(pCD).foreground ); i++;
 
-#ifdef WSM
            XtSetArg (setArgs[i], XmNx ,  (XtArgVal) pWsc->iconX); i++;
            XtSetArg (setArgs[i], XmNy ,  (XtArgVal) pWsc->iconY); i++;
-#else /* WSM */
-           XtSetArg (setArgs[i], XmNx ,  (XtArgVal) ICON_X(pCD)); i++;
-           XtSetArg (setArgs[i], XmNy ,  (XtArgVal) ICON_Y(pCD)); i++;
-#endif /* WSM */
 
            XtSetArg (setArgs[i], XmNwidth ,  (XtArgVal) iconWidth); i++;
            XtSetArg (setArgs[i], XmNheight ,  (XtArgVal) iconHeight); i++;
@@ -2020,11 +1871,7 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
 
            iconWidget =  XtCreateManagedWidget("iconInIconBox",
                                           xmDrawnButtonWidgetClass,
-#ifdef WSM
                                           pWsc->pIconBox->bBoardWidget,
-#else /* WSM */
-                                          P_ICON_BOX(pCD)->bBoardWidget,
-#endif /* WSM */
                                           (ArgList)setArgs, i);
 
            if (dummyString == NULL)
@@ -2041,11 +1888,7 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
 
            pIconInfo->theWidget = iconWidget;
 
-#ifdef WSM
            pWsc->iconFrameWin = XtWindow (iconWidget); 
-#else /* WSM */
-           ICON_FRAME_WIN(pCD) = XtWindow (iconWidget); 
-#endif /* WSM */
 
            XtAddCallback (iconWidget, XmNactivateCallback, 
                           (XtCallbackProc)IconActivateCallback, 
@@ -2085,19 +1928,11 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
                }
            }
 
-#ifdef WSM
            ResetIconBoxMaxSize(pWsc->pIconBox->pCD_iconBox, 
                                pWsc->pIconBox->bBoardWidget);
 
            ResetArrowButtonIncrements (pWsc->pIconBox->pCD_iconBox);
 
-#else /* WSM */
-           ResetIconBoxMaxSize(P_ICON_BOX(pCD)->pCD_iconBox, 
-                               P_ICON_BOX(pCD)->bBoardWidget);
-
-           ResetArrowButtonIncrements (P_ICON_BOX(pCD)->pCD_iconBox);
-
-#endif /* WSM */
            rval = True;
        }
     } 
@@ -2131,12 +1966,7 @@ Boolean InsertIconIntoBox (IconBoxData *pIBD, ClientData *pCD)
  * 
  *************************************<->***********************************/
 
-IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
-
-    IconBoxData *pIBD;
-    ClientData *pCD;
-    Widget theWidget;
-
+IconInfo *InsertIconInfo (IconBoxData *pIBD, ClientData *pCD, Widget theWidget)
 {
     IconInfo *pII;
     int place;
@@ -2144,9 +1974,7 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
     Arg setArgs[3];
     Arg getArgs[4];
     Dimension clipWidth, clipHeight;
-#ifdef WSM
     WsClientData *pWsc;
-#endif /* WSM */
 
     place = GetNextIconPlace (&pIBD->IPD);
     if (place == NO_ICON_PLACE)
@@ -2188,7 +2016,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
 
     pII->pCD = pCD;
 
-#ifdef WSM
     pWsc = GetWsClientData (GetWorkspaceData (pCD->pSD, pIBD->wsID), pCD);
     pWsc->iconPlace = place;
 
@@ -2201,19 +2028,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
     pIBD->currentCol = pWsc->iconX / pIBD->pCD_iconBox->widthInc;
     pIBD->currentRow = pWsc->iconY / pIBD->pCD_iconBox->heightInc;
 
-#else /* WSM */
-    ICON_PLACE(pCD) = place;
-
-    CvtIconPlaceToPosition (&pIBD->IPD, ICON_PLACE(pCD),
-           &ICON_X(pCD), &ICON_Y(pCD));
-
-
-    /* update next free position */
-
-    pIBD->currentCol = ICON_X(pCD) / pIBD->pCD_iconBox->widthInc;
-    pIBD->currentRow = ICON_Y(pCD) / pIBD->pCD_iconBox->heightInc;
-
-#endif /* WSM */
 
     /* 
      * Increase bboard size if necessary
@@ -2234,7 +2048,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
        if (pIBD->currentRow > pIBD->lastRow)
        {
            pIBD->lastRow = pIBD->currentRow;
-#ifdef WSM
            if (clipHeight <= (Dimension) (pWsc->iconY + 
                                           pIBD->pCD_iconBox->heightInc))
            {
@@ -2244,16 +2057,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
                XtSetArg (setArgs[i], XmNheight, (XtArgVal) 
                          pWsc->iconY + pIBD->pCD_iconBox->heightInc); i++;
            }
-#else /* WSM */
-           if (clipHeight <= (pII->pCD->iconY + pIBD->pCD_iconBox->heightInc))
-           {
-               /*
-                * Increase bulletin board height as needed.
-                */
-               XtSetArg (setArgs[i], XmNheight, (XtArgVal) 
-                         pII->pCD->iconY + pIBD->pCD_iconBox->heightInc); i++;
-           }
-#endif /* WSM */
        }
     }
     else
@@ -2261,7 +2064,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
        if (pIBD->currentCol > pIBD->lastCol)
        {
            pIBD->lastCol = pIBD->currentCol;
-#ifdef WSM
            if (clipWidth <= (Dimension) 
                              (pWsc->iconX + pIBD->pCD_iconBox->widthInc))
            {
@@ -2272,17 +2074,6 @@ IconInfo *InsertIconInfo (pIBD, pCD, theWidget)
                (XtArgVal) pWsc->iconX +
                           pIBD->pCD_iconBox->widthInc); i++;
            }
-#else /* WSM */
-           if (clipWidth <= (pII->pCD->iconX + pIBD->pCD_iconBox->widthInc))
-           {
-               /*
-                * Increase bulletin board width as needed
-                */
-               XtSetArg (setArgs[i], XmNwidth, 
-               (XtArgVal) pII->pCD->iconX +
-                          pIBD->pCD_iconBox->widthInc); i++;
-           }
-#endif /* WSM */
        }
 
        if (pIBD->currentRow > pIBD->lastRow)
@@ -2324,12 +2115,10 @@ void DeleteIconFromBox (IconBoxData *pIBD, ClientData *pCD)
     Dimension    oldWidth, oldHeight;
     int          newWidth, newHeight;
     int          i, newCols, newRows;
-#ifdef WSM
     WmWorkspaceData *pWS = GetWorkspaceData (pCD->pSD, pIBD->wsID);
     WsClientData *pWsc;
 
     pWsc = GetWsClientData (pWS, pCD);
-#endif /* WSM */
 
     i = 0;
     XtSetArg (args[i], XmNwidth, (XtArgVal) &oldWidth ); i++;
@@ -2359,7 +2148,6 @@ void DeleteIconFromBox (IconBoxData *pIBD, ClientData *pCD)
        }
     }
 
-#ifdef WSM
     DeleteIconInfo (pWsc->pIconBox, pCD);
 
     pWsc->pIconBox->numberOfIcons--;
@@ -2368,13 +2156,6 @@ void DeleteIconFromBox (IconBoxData *pIBD, ClientData *pCD)
 
     pWsc->pIconBox = NULL;
     pWsc->iconPlace = NO_ICON_PLACE;
-#else /* WSM */
-    DeleteIconInfo (P_ICON_BOX(pCD), pCD);
-
-    pCD->pIconBox->numberOfIcons--;
-
-    theChild = XtWindowToWidget (DISPLAY, ICON_FRAME_WIN(pCD));
-#endif /* WSM */
     XtUnmanageChild (theChild);
 
     XtDestroyWidget (theChild);
@@ -2895,10 +2676,8 @@ void PackIconBox (IconBoxData *pIBD, Boolean packVert, Boolean packHorz, int pas
     int newWidth, newHeight;
     int i;
     Boolean rippling = False;
-#ifdef WSM
     WsClientData *pWsc;
     WmWorkspaceData *pWS;
-#endif /* WSM */
 
     i = 0;
     XtSetArg (args[i], XmNwidth, (XtArgVal) &oldWidth ); i++;
@@ -2973,7 +2752,6 @@ void PackIconBox (IconBoxData *pIBD, Boolean packVert, Boolean packHorz, int pas
             * We need to start rippling the icons into new positions if
             * their (x,y) position changed 
             */
-#ifdef WSM
            pWS = GetWorkspaceData (pII_2->pCD->pSD, pIBD->wsID);
            pWsc = GetWsClientData (pWS, pII_2->pCD);
            CvtIconPlaceToPosition (&pIBD->IPD, pWsc->iconPlace,
@@ -2981,13 +2759,6 @@ void PackIconBox (IconBoxData *pIBD, Boolean packVert, Boolean packHorz, int pas
 
            rippling = ((newX != pWsc->iconX) ||
                        (newY != pWsc->iconY));
-#else /* WSM */
-           CvtIconPlaceToPosition (&pIBD->IPD, pII_2->pCD->iconPlace,
-               &newX, &newY);
-
-           rippling = ((newX != pII_2->pCD->iconX) ||
-                       (newY != pII_2->pCD->iconY));
-#endif /* WSM */
        }
 
        if ((pII_2->pCD == NULL) || rippling)
@@ -3008,15 +2779,10 @@ void PackIconBox (IconBoxData *pIBD, Boolean packVert, Boolean packHorz, int pas
 
                CvtIconPlaceToPosition (&pIBD->IPD, ix2, &newX, &newY);
 
-#ifdef WSM
                pWS = GetWorkspaceData (pII_2->pCD->pSD, pIBD->wsID);
                pWsc = GetWsClientData (pWS, pII_2->pCD);
                pWsc->iconX = newX;
                pWsc->iconY = newY;
-#else /* WSM */
-               pII_2->pCD->iconX = newX;
-               pII_2->pCD->iconY = newY;
-#endif /* WSM */
 
                if (hasActiveText && (pII_2->pCD == pCD_tmp))
                {
@@ -3325,8 +3091,6 @@ void ShowClientIconState (ClientData *pCD, int newState)
 } /* END FUNCTION ShowClientIconState */
 
 
-\f
-#ifndef MOTIF_ONE_DOT_ONE
 /*************************************<->*************************************
  *
  *  IconScrollVisibleCallback
@@ -3352,9 +3116,7 @@ void IconScrollVisibleCallback (Widget w, caddr_t client_data, XmAnyCallbackStru
 */
 } /* END OF FUNCTION IconScrollVisibleCallback */
 
-#endif
 
-\f
 /*************************************<->*************************************
  *
  *  IconActivateCallback
@@ -3508,9 +3270,7 @@ void HandleIconBoxIconKeyPress (Widget icon, caddr_t dummy, XKeyEvent *keyEvent)
     if (!(XFindContext (DISPLAY, theIcon,
                        wmGD.windowContextType, (caddr_t *)&pCD)))
     {
-#ifdef WSM
        SetClientWsIndex (pCD);
-#endif /* WSM */
        keyEvent->window = ICON_FRAME_WIN(pCD);
 
        if (pCD->clientState == MINIMIZED_STATE)
@@ -3600,32 +3360,16 @@ void GetIconBoxIconRootXY (ClientData *pCD, int *pX, int *pY)
 {
 
     Window child;
-#ifdef WSM
     WsClientData *pWsc = GetWsClientData (pCD->pSD->pActiveWS, pCD);
-#endif /* WSM */
 
-#ifdef WSM
     if (pCD->pSD->useIconBox && pWsc->pIconBox)
-#else /* WSM */
-    if (pCD->pSD->useIconBox && P_ICON_BOX(pCD))
-#endif /* WSM */
     {
-#ifdef WSM
         XTranslateCoordinates(DISPLAY,
                               XtWindow(pWsc->pIconBox->bBoardWidget),
                               ROOT_FOR_CLIENT(pCD),
                               pWsc->iconX + IB_MARGIN_WIDTH,
                               pWsc->iconY + IB_MARGIN_HEIGHT,
                               pX, pY, &child);
-#else /* WSM */
-        XTranslateCoordinates(DISPLAY,
-                              XtWindow(P_ICON_BOX(pCD)->bBoardWidget),
-                              ROOT_FOR_CLIENT(pCD),
-                              ICON_X(pCD) + IB_MARGIN_WIDTH,
-                              ICON_Y(pCD) + IB_MARGIN_HEIGHT,
-                              pX, pY, &child);
-#endif /* WSM */
-
     }
     else
     {
@@ -3663,9 +3407,7 @@ Boolean IconVisible (ClientData *pCD)
      */
 
     Boolean rval = True;
-#ifdef WSM
     WsClientData *pWsc = GetWsClientData (pCD->pSD->pActiveWS, pCD);
-#endif /* WSM */
 
 
     
@@ -3685,17 +3427,10 @@ Boolean IconVisible (ClientData *pCD)
     XtSetArg (getArgs[i], XmNheight, (XtArgVal) &tmpHeight ); i++;
     XtSetArg (getArgs[i], XmNx, (XtArgVal) &tmpX ); i++;
     XtSetArg (getArgs[i], XmNy, (XtArgVal) &tmpY ); i++;
-#ifdef WSM
     XtGetValues (pWsc->pIconBox->clipWidget, getArgs, i);
     XtTranslateCoords(pWsc->pIconBox->scrolledWidget,
                         tmpX, tmpY,
                         &clipX, &clipY);
-#else /* WSM */
-    XtGetValues (P_ICON_BOX(pCD)->clipWidget, getArgs, i);
-    XtTranslateCoords(P_ICON_BOX(pCD)->scrolledWidget,
-                        tmpX, tmpY,
-                        &clipX, &clipY);
-#endif /* WSM */
 
     GetIconBoxIconRootXY(pCD, &iconX, &iconY);
 
index 9d4fd36b4a479f49ee83515b0bdfca1e9b34f775..53ba736f48da840735bae5707ebc9cf733cb46e8 100644 (file)
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmIconBox.h /main/4 1995/11/01 11:42:06 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
 
-#ifdef WSM
 extern void AddIconBoxForWorkspace (WmWorkspaceData *pWS);
-#endif /* WSM */
 extern void AddNewBox (WmWorkspaceData *pWS, IconBoxData *pIBD);
 extern void ChangeActiveIconboxIconText (Widget icon, caddr_t dummy, 
                                         XFocusChangeEvent *event);
@@ -55,19 +52,12 @@ extern void HandleIconBoxButtonMotion (Widget icon, caddr_t client_data,
                                       XEvent *pev);
 extern void HandleIconBoxIconKeyPress (Widget icon, caddr_t dummy, 
                                       XKeyEvent *keyEvent);
-#ifndef MOTIF_ONE_DOT_ONE
 extern void IconScrollVisibleCallback (Widget w, caddr_t client_data, 
                                  XmAnyCallbackStruct *call_data);
-#endif
 extern void IconActivateCallback (Widget w, caddr_t client_data, 
                                  XmAnyCallbackStruct *call_data);
-#ifdef PANELIST
 extern void IconBoxPopUp (WmWorkspaceData *pWS, Boolean up);
 extern Boolean IconBoxShowing (WmWorkspaceData *pWS);
-#else /* PANELIST */
-extern void IconBoxPopUp (WmWorkspaceData *pWS, ControlWindowStruct *pCW, Boolean up);
-extern Boolean IconBoxShowing (WmWorkspaceData *pWS, ControlWindowStruct *pCW);
-#endif /* PANELIST */
 extern Boolean IconVisible (ClientData *pCD);
 extern IconInfo *InsertIconInfo (IconBoxData *pIBD, ClientData *pCD, 
                                 Widget theWidget);
@@ -100,9 +90,7 @@ extern void SetGranularity (WmWorkspaceData *pWS, ClientData *pCD,
 extern void SetIconBoxInfo (WmWorkspaceData *pWS, ClientData *pCD);
 extern void SetNewBounds (IconBoxData *pIBD);
 extern void ShowClientIconState (ClientData *pCD, int newState);
-#ifdef WSM
 extern void UnmapIconBoxes (WmWorkspaceData *pWS);
-#endif /* WSM */
 extern void UpdateIncrements (Widget sWidget, IconBoxData *pIBD, 
                              XConfigureEvent *event);
 extern String WmXmStringToString (XmString xmString);
index 48c79f4e890015a3cb2ec473f4df9469f79538df..ab98c03feba04c4eb60c5d144137298c024022b3 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.3
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmImage.c /main/7 1996/11/14 13:50:30 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -44,22 +39,14 @@ static char rcsid[] = "$XConsortium: WmImage.c /main/7 1996/11/14 13:50:30 rswis
 #define MWM_NEED_IIMAGE
 #include "WmIBitmap.h"
 
-#ifdef MOTIF_ONE_DOT_ONE
-#include <stdio.h>
-#include <pwd.h>
-#define MATCH_CHAR 'P'         /* Default match character - defined in Xmos.p */
-#else
 #include <Xm/XmosP.h> 
 /* Copied from XmosI.h */
 extern String _XmOSInitPath( 
                         String file_name,
                         String env_pathname,
                         Boolean *user_path) ;
-#endif
-#ifdef WSM
 #include <Xm/IconFile.h>
 #include <Dt/GetDispRes.h>
-#endif
 
 #define MATCH_XBM 'B'          /* .xbm character: see XmGetPixmap */
 #define MATCH_PATH "XBMLANGPATH"
@@ -75,11 +62,6 @@ extern String _XmOSInitPath(
 #include "WmMenu.h"
 #include "WmError.h"
 
-#ifdef MOTIF_ONE_DOT_ONE
-extern char    *getenv ();
-#endif
-
-\f
 /******************************<->*************************************
  *
  *  MakeClientIconPixmap (pCD, iconBitmap, iconMask)
@@ -136,11 +118,7 @@ Pixmap MakeClientIconPixmap (
        /*
         * The bitmap was not made with usable parameters.
         */
-#ifdef WSM
        Warning (((char *)GETMESSAGE(38, 9, "Icon bitmap cannot be used on this screen")));
-#else /* WSM */
-       Warning ("Invalid root for icon bitmap");
-#endif /* WSM */
        return ((Pixmap)NULL);
     }
 
@@ -190,28 +168,21 @@ Pixmap MakeClientIconPixmap (
 Pixmap MakeNamedIconPixmap (ClientData *pCD, String iconName)
 {
     int          bitmapIndex;
-#ifdef WSM
     Pixmap     pixmap, pixmap_r, mask;
     Window     root;
     int                x, y;
     unsigned int       width, height, border_width, depth;
     String     sIconFileName;
     int                iconSizeDesired;
-#endif /* WSM */
 
     /*
      * Get the bitmap cache entry (will read data from file if necessary).
      * If unable to find the iconName file return NULL.
      */
 
-#ifdef WSM
     if ((bitmapIndex = GetBitmapIndex (PSD_FOR_CLIENT(pCD), iconName,
                        False)) < 0)
-#else /* WSM */
-    if ((bitmapIndex = GetBitmapIndex (PSD_FOR_CLIENT(pCD), iconName)) < 0)
-#endif /* WSM */
     {
-#ifdef WSM
        if ((PSD_FOR_CLIENT(pCD)->displayResolutionType == LOW_RES_DISPLAY) ||
            (PSD_FOR_CLIENT(pCD)->displayResolutionType == VGA_RES_DISPLAY))
        {
@@ -291,7 +262,6 @@ Pixmap MakeNamedIconPixmap (ClientData *pCD, String iconName)
 
        if (sIconFileName != NULL)
           XtFree (sIconFileName);
-#endif /* WSM */
        return ((Pixmap)NULL);
     }
 
@@ -426,10 +396,8 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
     Pixmap       iconPixmap;
     GC           imageGC, topGC, botGC;
     XGCValues    gcv;
-#ifdef WSM
     unsigned long gc_mask;
     XmPixelSet   *pPS = NULL;
-#endif /* WSM */
     unsigned int imageWidth;
     unsigned int imageHeight;
     int          dest_x, dest_y;
@@ -532,7 +500,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
     }
 
     /* create a GC to use */
-#ifdef WSM
     gc_mask = GCForeground | GCBackground | GCGraphicsExposures;
     if (mask)
     {
@@ -558,14 +525,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
     gcv.graphics_exposures = False;
 
     imageGC = XCreateGC (DISPLAY, iconPixmap, gc_mask, &gcv);
-#else /* WSM */
-    gcv.foreground = bg;       /* clear it first! */
-    gcv.background = bg;
-    gcv.graphics_exposures = False;
-
-    imageGC = XCreateGC (DISPLAY, iconPixmap, (GCForeground|GCBackground),
-                 &gcv);
-#endif /* WSM */
 
     /*
      * Format the image. 
@@ -591,7 +550,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
     dest_x = (imageWidth - width) / 2;
     dest_y = (imageHeight - height) / 2;
 
-#ifdef WSM
     if (mask)
     {
        if (pPS != NULL)
@@ -622,10 +580,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
     } 
 
     XChangeGC (DISPLAY, imageGC, gc_mask, &gcv);
-#else /* WSM */
-    /* set the foreground */
-    XSetForeground (DISPLAY, imageGC, fg);
-#endif /* WSM */
 
     /* copy the bitmap to the pixmap */
 #ifndef DISALLOW_DEEP_ICONS
@@ -659,7 +613,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
         * Shadowing
         */
 
-#ifdef WSM
         if (mask && (pPS != NULL))
        {
        topGC = GetHighlightGC (pSD, pPS->ts, pPS->bg,
@@ -670,7 +623,6 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
        }
        else
        {
-#endif /* WSM */
        topGC = GetHighlightGC (pSD, pCD->iconImageTopShadowColor, 
                                  pCD->iconImageBackground,
                                  pCD->iconImageTopShadowPixmap);
@@ -678,9 +630,7 @@ Pixmap MakeIconPixmap (ClientData *pCD, Pixmap bitmap, Pixmap mask, unsigned int
        botGC = GetHighlightGC (pSD, pCD->iconImageBottomShadowColor, 
                                  pCD->iconImageBackground,
                                  pCD->iconImageBottomShadowPixmap);
-#ifdef WSM
        }
-#endif /* WSM */
 
        /*
         *  CR5208 - Better fix than from OSF!
@@ -876,11 +826,7 @@ Pixmap MakeCachedLabelPixmap (WmScreenData *pSD, Widget menuW, int bitmapIndex)
 
 #define BITMAP_CACHE_INC 5
 
-#ifdef WSM
 int GetBitmapIndex (WmScreenData *pSD, char *name, Boolean bReportError)
-#else /* WSM */
-int GetBitmapIndex (WmScreenData *pSD, char *name)
-#endif /* WSM */
 {
     char         *path;
     BitmapCache  *bitmapc;
@@ -955,9 +901,7 @@ int GetBitmapIndex (WmScreenData *pSD, char *name)
                             &bitmapc->bitmap, &x, &y)
             != BitmapSuccess)
         {
-#ifdef WSM
          if (bReportError)
-#endif /* WSM */
             MWarning (((char *)GETMESSAGE(38, 7, "Unable to read bitmap file %s\n")), path);
            XtFree ((char *)bitmapc->path);
            return (-1);
@@ -965,9 +909,7 @@ int GetBitmapIndex (WmScreenData *pSD, char *name)
 
         if (bitmapc->width == 0 || bitmapc->height == 0)
         {
-#ifdef WSM
          if (bReportError)
-#endif /* WSM */
             MWarning (((char *)GETMESSAGE(38, 8, "Invalid bitmap file %s\n")), path);
            XtFree ((char *)bitmapc->path);
            return (-1);
@@ -1022,16 +964,12 @@ int GetBitmapIndex (WmScreenData *pSD, char *name)
  * 
  *************************************<->***********************************/
 
-char *BitmapPathName (string)
-    char *string;
-
+char *BitmapPathName (char *string)
 {
     static char  fileName[MAXWMPATH+1];
     char *retname;
     SubstitutionRec subs[1];
-#ifndef MOTIF_ONE_DOT_ONE
     char *homeDir = XmeGetHomeDirName();
-#endif
 
     if (!string || !*string)
     {
@@ -1051,12 +989,7 @@ char *BitmapPathName (string)
      * Handle "~/.." 
      */
     {
-#ifdef MOTIF_ONE_DOT_ONE
-       GetHomeDirName(fileName);
-#else
-       strcpy (fileName, homeDir);
-#endif
-        strncat (fileName, &(string[1]), MAXWMPATH - strlen (fileName));
+       snprintf(fileName, MAXWMPATH, "%s%s", homeDir, &(string[1]));
        return (fileName);
     }
 
@@ -1073,11 +1006,7 @@ char *BitmapPathName (string)
        if ((wmGD.bitmapDirectory[0] == '~') &&
            (wmGD.bitmapDirectory[1] == '/'))
        {
-#ifdef MOTIF_ONE_DOT_ONE
-           GetHomeDirName(fileName);
-#else
            strcpy (fileName, homeDir);
-#endif
             strncat (fileName, &wmGD.bitmapDirectory[1],
                     MAXWMPATH - strlen (fileName));
        } else {
@@ -1098,9 +1027,6 @@ char *BitmapPathName (string)
 
     /* Fall back on a path search */
 
-#ifdef MOTIF_ONE_DOT_ONE
-    return (NULL);
-#else
     {
        char *search_path;
        Boolean user_path;
@@ -1120,10 +1046,7 @@ char *BitmapPathName (string)
        XtFree(retname);
        return (fileName);
     }
-#endif
 
 } /* END OF FUNCTION BitmapPathName */
 
-#ifdef WSM
 /****************************   eof    ***************************/
-#endif /* WSM */
index eb19053c8c7a574c1489db3af747adebe0967539..f823dea73040a3fe9b20373d85aa34e7f7f85922 100644 (file)
 /* 
  * Motif Release 1.2.2
 */ 
-/*   $XConsortium: WmImage.h /main/4 1995/11/01 11:42:39 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
 extern char  *BitmapPathName (char *string);
-#ifdef WSM
 extern int    GetBitmapIndex (WmScreenData *pSD, 
                                char *name, 
                                Boolean bReportError);
-#else /* WSM */
-extern int    GetBitmapIndex (WmScreenData *pSD, char *name);
-#endif /* WSM */
 extern Pixmap MakeCachedIconPixmap (ClientData *pCD, int bitmapIndex, Pixmap mask);
 extern Pixmap MakeCachedLabelPixmap (WmScreenData *pSD, Widget menuW, int bitmapIndex);
 extern Pixmap MakeClientIconPixmap (ClientData *pCD, Pixmap iconBitmap, Pixmap iconMask);
index 42b2bd689b1cc1d4e3571063bcf05f5199d17bbc..f902586eb2d6779a73395588c435ef21443d7458 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.4
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmInitWs.c /main/18 1999/09/20 15:18:22 mgreess $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990, 1993, 1994 HEWLETT-PACKARD COMPANY 
  * (c) Copyright 1993, 1994 International Business Machines Corp.
@@ -45,14 +40,10 @@ static char rcsid[] = "$TOG: WmInitWs.c /main/18 1999/09/20 15:18:22 mgreess $"
 
 #include "WmGlobal.h"
 #include "WmResNames.h"
-#ifdef WSM
 #include "WmHelp.h"
-#endif /* WSM */
 #include "WmICCC.h"
-#ifdef PANELIST
 #define DTWM_NEED_FNTPL
 #include "WmIBitmap.h"
-#endif /* PANELIST */
 #ifndef NO_OL_COMPAT
 #include "WmOL.h"
 #endif /* NO_OL_COMPAT */
@@ -66,17 +57,12 @@ static char rcsid[] = "$TOG: WmInitWs.c /main/18 1999/09/20 15:18:22 mgreess $"
 #ifndef NO_HP_KEY_REMAP
 #include <Xm/VirtKeysP.h>
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# include <Xm/DrawingA.h>
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
 typedef struct
   {
     String default_name ;
     String new_name ;
   } str_xref_rec, *str_xref ;
 #endif /* NO_HP_KEY_REMAP */
-#ifdef WSM
 #include <Dt/GetDispRes.h>
 #include <Dt/SessionP.h>
 #include <Dt/SessionM.h>
@@ -84,7 +70,6 @@ typedef struct
 #include <Dt/Message.h>
 #include <Dt/WsmM.h>
 #include <Dt/EnvControlP.h>
-#endif /* WSM */
 
 /* Busy is also defined in the BMS  -> bms.h. This conflicts with
  * /usr/include/X11/Xasync.h on ibm.
@@ -99,9 +84,7 @@ typedef struct
 /*
  * include extern functions
  */
-#ifdef WSM
 #include "WmBackdrop.h"
-#endif /* WSM */
 #include "WmCDInfo.h"
 #include "WmColormap.h"
 #include "WmError.h"
@@ -109,20 +92,14 @@ typedef struct
 #include "WmFeedback.h"
 #include "WmFunction.h"
 #include "WmIDecor.h"
-#ifdef WSM
 #include "WmIPC.h"
-#endif /* WSM */
 #include "WmIPlace.h"
 #include "WmIconBox.h"
 #include "WmKeyFocus.h"
-#ifdef PANELIST
 #include "WmPanelP.h"  /* for typedef in WmManage.h */
-#endif /* PANELIST */
 #include "WmManage.h"
 #include "WmMenu.h"
-#ifdef WSM
 #include "WmPresence.h"
-#endif /* WSM */
 #include "WmProperty.h"
 #include "WmResCvt.h"
 #include "WmResource.h"
@@ -131,9 +108,7 @@ typedef struct
 #include "WmCDecor.h"
 #include "stdio.h"
 #include "WmResParse.h"
-#ifdef WSM
 #include <stdlib.h>
-#endif /* WSM */
 #include "WmXSMP.h"
 
 /*
@@ -142,14 +117,7 @@ typedef struct
 
 #include "WmInitWs.h"
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# include "WmWsmLib/wsm_proto.h"
-# include "WmWsmLib/utm_send.h"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-#ifdef WSM
 static void InsureDefaultBackdropDir(char **ppchBackdropDirs);
-#endif /* WSM */
 void InitWmDisplayEnv (void);
 #ifndef NO_MESSAGE_CATALOG
 void InitNlsStrings (void);
@@ -158,15 +126,10 @@ void InitNlsStrings (void);
 Boolean VirtKeys4DIN(Display *dpy); 
 #endif /* NO_HP_KEY_REMAP */
 
-#ifdef WSM
 /* limited to 3 chars max */
 #define UNSPECIFIED_SCREEN_NAME                "fbk"
 char        **dpy2Argv;    /* copy  for second display */
 int           dpy2Argc;
-#ifndef PANELIST
-WmScreenData *dtSD;       /* for the "DT screen" of the display */
-#endif /* PANELIST */
-#endif  /* WSM */
 /*
  * Global Variables:
  */
@@ -439,14 +402,8 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
     int savedArgc;
 
     wmGD.errorFlag = False;
-#ifdef WSM
-#ifndef PANELIST
-    dtSD = NULL; 
-#else /* PANELIST  */
     wmGD.dtSD = NULL;
     wmGD.iSlideUpsInProgress = 0;
-#endif /*PANELIST  */
-#endif  /* WSM */
 
     SetupWmSignalHandlers (0); /* dummy paramater */
 
@@ -460,9 +417,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
 #ifndef        IBM_169380
     wmGD.cmapWindowContextType = XUniqueContext ();
 #endif
-#ifdef WSM
     wmGD.mwmWindowContextType = XUniqueContext ();
-#endif /* WSM */
 
     /* copy argv (the XtInititalize changes the original) for use in restart */
     savedArgc = argc;
@@ -470,9 +425,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
 
     wmGD.environ = environ;
 
-#ifdef WSM
     wmGD.pWmPB = _DtWmParseNewBuf();
-#endif /* WSM */
 
 
 
@@ -485,7 +438,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
     {
         wmGD.mwmName = wmGD.argv[0];
     }
-#ifdef WSM
     if (MwmBehavior)
     {
        res_class = WM_RESOURCE_CLASS;
@@ -496,10 +448,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
     }
     wmGD.statusColorServer = CSERVE_NOT_AVAILABLE;
 
-#else /* WSM */
-    res_class = WM_RESOURCE_CLASS;
-#endif /* WSM */
-
     wmGD.display = (Display *)NULL;
     wmGD.topLevelW = (Widget)NULL;
 
@@ -547,9 +495,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
      */
     
     InitCursorInfo ();
-#ifdef WSM
     InitWmDisplayEnv ();
-#endif
     ShowWaitState (TRUE);
 
     /*
@@ -619,11 +565,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
     XtSetArg (args[argnum], XtNheight, 10);    argnum++;
     XtSetArg (args[argnum], XtNmappedWhenManaged, False);      argnum++;
     XtSetArg (args[argnum], XtNjoinSession, True);             argnum++;
-#ifdef WSM
     XtSetArg (args[argnum], XtNrestartStyle, SmRestartNever);  argnum++;
-#else
-    XtSetArg (args[argnum], XtNrestartStyle, SmRestartIfRunning); argnum++;
-#endif
     XtSetArg (args[argnum], XtNargc, savedArgc); argnum++;
     XtSetArg (args[argnum], XtNargv, wmGD.argv); argnum++;
 
@@ -652,7 +594,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
     ProcessGlobalScreenResources ();
     ProcessCommandLine (argc, argv);
 
-#ifdef WSM
     /*
      * Make sure backdrops are in our icon search path. 
      * This call MUST occur before ANY icons are looked up either
@@ -680,7 +621,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
 
         XtFree(sBdPath);
     }
-#endif /* WSM */
 
     /*
      * Allocate data and initialize for screens we manage:
@@ -730,7 +670,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
            {
                if (!processedGlobalResources)
                {
-#ifdef WSM
                    enum { 
                      XA_DT_SESSION_HINTS, XA_DT_SM_WM_PROTOCOL,
                      XA_DT_SM_START_ACK_WINDOWS, XA_DT_SM_STOP_ACK_WINDOWS,
@@ -756,7 +695,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
                    wmGD.xa_DT_WM_EXIT_SESSION = atoms[XA_DT_WM_EXIT_SESSION];
                     wmGD.xa_DT_WM_LOCK_DISPLAY = atoms[XA_DT_WM_LOCK_DISPLAY];
                     wmGD.xa_DT_WM_READY = atoms[XA_DT_WM_READY];
-#endif /* WSM */
 #ifndef NO_OL_COMPAT
                    InitOLCompat();
 #endif /* NO_OL_COMPAT */
@@ -796,7 +734,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
 
                    wmGD.pLockMaskSequence = NULL;
                    SetupLockingModifierMask ();
-#ifdef WSM
                    wmGD.requestContextWin = (Window) 0L;
                    wmGD.cppCommand = NULL;
                    wmGD.evLastButton.button = 0;
@@ -856,7 +793,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
                                          args,
                                          argnum);
 
-#endif /* WSM */
                    
 
                    /* 
@@ -887,9 +823,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
                InitWmScreen (&(wmGD.Screens[scr]), sNum);
                wmGD.Screens[scr].managed = True;
                managed++;
-#ifdef WSM
                GetDtSessionHints(&(wmGD.Screens[scr]), sNum);
-#endif /* WSM */
 
                if (!activeSet) 
                {
@@ -909,7 +843,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
            ExitWM (WM_ERROR_EXIT_VALUE);
        }
     }
-#ifdef WSM
     /*  
      * Initialize the IPC mechanism
      */
@@ -933,8 +866,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
     XtSetValues (wmGD.topLevelW, args, argnum);
     XtSetValues (wmGD.topLevelW1, args, argnum);
 
-#endif /* WSM */
-    
 
     /*
      * Prepare to have child processes (e.g., exec'ed commands).
@@ -949,7 +880,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
        ExitWM (WM_ERROR_EXIT_VALUE);
     }
 
-#ifdef WSM
 
     {
       enum { XA_DT_WORKSPACE_HINTS, XA_DT_WORKSPACE_PRESENCE,
@@ -975,7 +905,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
       wmGD.xa_DT_WORKSPACE_CURRENT = atoms[XA_DT_WORKSPACE_CURRENT];
     }
 
-#endif /* WSM */
 
     /* Initialize properties used in session management. */
     wmGD.xa_SM_CLIENT_ID =
@@ -1010,13 +939,11 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
 
        if (pSD->managed)
        {
-#ifdef WSM
            if (XDefaultScreen (wmGD.display) == pSD->screen)
            {
                wmGD.commandWindow = wmGD.Screens[scr].wmWorkspaceWin;
            }
 
-#endif /* WSM */
            /*
             * Initialize workspace colormap data.
             */
@@ -1027,14 +954,8 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
             * Process the window manager resource description file (.mwmrc):
             */
 
-#ifdef PANELIST
            ProcessWmFile (pSD, False /* not nested */);
 
-#else /* PANELIST */
-           ProcessWmFile (pSD);
-#endif /* PANELIST */
-
-
            /*
             * Setup default resources for the system menu and key bindings:
             */
@@ -1062,14 +983,11 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
        }
 
     }
-#ifdef PANELIST
     /*
      * Remove any temp config file we created if we needed to
      * convert DT 2.0 syntax to DT 3.0
      */
     DeleteTempConfigFileIfAny();
-#endif /* PANELIST */
-#ifdef WSM
     /*
      * Point second display's resource data base
      * to the first display's resource data base
@@ -1078,7 +996,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
      *  NEW LOCATION
      */
       wmGD.display1->db = wmGD.display->db;
-#endif /*  WSM */
 
     /*
      * Realize the top level widget, make the window override
@@ -1086,7 +1003,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
      */
 
     XtRealizeWidget (wmGD.topLevelW);
-#ifdef WSM
     XtRealizeWidget (wmGD.topLevelW1);
 
     /*
@@ -1095,7 +1011,6 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
      *  is required for ICCCM-style messaging).
      */
     dtInitializeMessaging (wmGD.topLevelW);
-#endif /* WSM */
 
     sAttributes.override_redirect = True;
     XChangeWindowAttributes (DISPLAY, XtWindow (wmGD.topLevelW),
@@ -1109,9 +1024,7 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
      * Use the WM_SAVE_YOURSELF protocol
      * for notification of when to save ourself
      */
-#ifdef WSM
     SetMwmSaveSessionInfo(wmGD.commandWindow);
-#endif
     /*
      * Initialize window manager event handling:
      */
@@ -1157,15 +1070,12 @@ void InitWmGlobal (int argc, char *argv [], char *environ [])
 
         for (scr = 0; scr < wmGD.numScreens; scr++)
         {
-#ifdef WSM
            int iws;
-#endif /* WSM */
             pSD = &(wmGD.Screens[scr]);
            
             if (pSD->managed)
             {
                 ACTIVE_PSD = &wmGD.Screens[scr];
-#ifdef WSM
                 MapIconBoxes (pSD->pActiveWS);
 
                ChangeBackdrop (pSD->pActiveWS);
@@ -1189,7 +1099,6 @@ XFlush (DISPLAY);
 
                 /* MapWorkspaceBox (); */
 
-#ifdef PANELIST
                /*
                 * Allocate front panel widgets
                 */
@@ -1240,12 +1149,8 @@ XFlush (DISPLAY);
                    ScanForPushRecallClients (pSD);
                    ScanForEmbeddedClients (pSD);
                }
-#endif /* PANELIST */
                
                RestoreHelpDialogs(pSD);
-#else /* WSM */
-                MapIconBoxes (pSD->pActiveWS);
-#endif /* WSM */
             }
         }
         firstTime = 0;
@@ -1253,17 +1158,12 @@ XFlush (DISPLAY);
     
     InitKeyboardFocus ();
 
-#ifndef WSM
-    InitWmDisplayEnv ();
-#endif
     ShowWaitState (FALSE);
 
-#ifdef WSM
     /*
      * Tell the rest of DT that we're up
      */
     dtReadyNotification();
-#endif /* WSM */
 
 #ifdef DEBUG_RESOURCE_DATABASE
     XrmPutFileDatabase(wmGD.display->db, "/tmp/dtwm.resDB");
@@ -1297,12 +1197,10 @@ InitWmScreen (WmScreenData *pSD, int sNum)
     Arg args[12];
     int argnum;
 
-#ifdef WSM
     int wsnum;
     WmWorkspaceData *pwsI;
     int buf_size;
     int iwsx;
-#endif /* WSM */
 
     char *pDisplayName;
 #define LENCBUFFER 256
@@ -1356,11 +1254,7 @@ InitWmScreen (WmScreenData *pSD, int sNum)
     pSD->bitmapCacheCount = 0;
     pSD->dataType = SCREEN_DATA_TYPE;
     pSD->managed = False;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    pSD->cciTree = NULL;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 
-#ifdef WSM
     pSD->initialWorkspace=NULL;
     pSD->presence.shellW = NULL;
     pSD->presence.onScreen = False;
@@ -1389,16 +1283,12 @@ InitWmScreen (WmScreenData *pSD, int sNum)
     pSD->woS = (Window) 0L;
     pSD->woE = (Window) 0L;
     pSD->woW = (Window) 0L;
-#endif /* WSM */
-#ifdef PANELIST
     pSD->wPanelist = NULL;
     pSD->pECD = NULL;
     pSD->numPushRecallClients = 0;
     pSD->numEmbeddedClients = 0;
     pSD->pPRCD = NULL;
     pSD->iconBoxControl = False;
-#endif /* PANELIST */
-#ifdef WSM
     pSD->displayResolutionType = _DtGetDisplayResolution(DISPLAY, sNum);
 
     /*
@@ -1426,7 +1316,6 @@ InitWmScreen (WmScreenData *pSD, int sNum)
        }
     } /* if wmGD.screenNames[sNum] == UNSPECIFIED_SCREEN_NAME */
 
-#endif /* WSM */
     /*
      * Save screen context
      */
@@ -1457,29 +1346,6 @@ InitWmScreen (WmScreenData *pSD, int sNum)
                                               args,
                                               argnum);
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    /* Create a DrawingArea as a child of the popupShell.  This will be used
-     * to handle UTM traffic relating to cci.  We need this
-     * particular widget to get the callbacks from conversion requests made
-     * against Mwm and the requests Mwm makes against other clients.
-     */
-    pSD->utmShell = XmCreateDrawingArea(pSD->screenTopLevelW, "UTM_Shell",
-                                       NULL, 0);
-    XtManageChild(pSD->utmShell);
-
-    /*
-     * Setup the destinationCallback handler to handle conversion
-     * requests made by Mwm against other clients.
-     */
-    XtAddCallback(pSD->utmShell, XmNdestinationCallback, UTMDestinationProc,
-                 NULL);
-
-    /* Must realize to own WM_i if unmapped, causes mwm to
-       freeze when menu is displayed. */
-    XtPopup(pSD->screenTopLevelW, XtGrabNone);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-#ifdef WSM
     argnum = 0;
     XtSetArg (args[argnum], XtNgeometry, NULL);                        argnum++;
     XtSetArg (args[argnum], XtNx, 10000);                      argnum++;
@@ -1502,7 +1368,7 @@ InitWmScreen (WmScreenData *pSD, int sNum)
                                               args,
                                               argnum);
     XtRealizeWidget (pSD->screenTopLevelW1);
-#endif /* WSM */
+
     /*
      * Fetch screen based resources
      */
@@ -1514,7 +1380,6 @@ InitWmScreen (WmScreenData *pSD, int sNum)
     MakeXorGC (pSD);
     InitIconSize(pSD);
 
-#ifdef WSM
     /*
      *  Complete initialization of workspace structures
      */
@@ -1563,24 +1428,6 @@ InitWmScreen (WmScreenData *pSD, int sNum)
        /* make first workspace in list the active one to start with */
        pSD->pActiveWS = pSD->pWS;
     }
-#else /* WSM */
-    /*
-     *  Allocate and initialize a workspace structure
-     */
-    
-    if (!(pSD->pWS = (WmWorkspaceData *) XtMalloc (sizeof(WmWorkspaceData))))
-    {
-       ShowWaitState (FALSE);
-       Warning (((char *)GETMESSAGE(40, 8, "Insufficient memory for Workspace data")));
-       ExitWM (WM_ERROR_EXIT_VALUE);
-    }
-
-    /*
-     * Set up workspace for this screen
-     */
-    InitWmWorkspace (pSD->pWS, pSD);
-    pSD->pActiveWS = pSD->pWS;
-#endif /* WSM */
 
 
     pDisplayName = DisplayString (DISPLAY);
@@ -1655,14 +1502,10 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD)
     Arg args[10];
     int argnum;
 
-#ifndef WSM
-#define DEFAULT_WS_NAME "workspace"
-#endif /* not WSM */
 
     pWS->pSD = pSD;
     pWS->pIconBox = NULL;
     pWS->dataType = WORKSPACE_DATA_TYPE;
-#ifdef WSM
     pWS->backdrop.window = 0;
     pWS->backdrop.nameAtom = 0;
     pWS->backdrop.image = NULL;
@@ -1670,16 +1513,6 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD)
     pWS->sizeClientList = 0;
     pWS->ppClients = 0;
     pWS->buttonW = NULL;
-#else /* WSM */
-
-    if ((pWS->name = (char *) 
-           XtMalloc ((1+strlen(DEFAULT_WS_NAME)) * sizeof (char))) == NULL)
-    {
-       ShowWaitState (FALSE);
-       ExitWM (WM_ERROR_EXIT_VALUE);
-    }
-    strcpy (pWS->name, DEFAULT_WS_NAME);
-#endif /* WSM */
 
     /*
      * Create widget for workspace resource hierarchy
@@ -1700,10 +1533,8 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD)
                                                args,
                                                argnum);
 
-#ifdef WSM
     /* internalize the workspace name */
     pWS->id = XInternAtom (DISPLAY, pWS->name, False);
-#endif /* WSM */
 
     /*
      * Process workspace based resources
@@ -1718,8 +1549,7 @@ void InitWmWorkspace (WmWorkspaceData *pWS, WmScreenData *pSD)
 
 } /* END OF FUNCTION  InitWmWorkspace */
 
-#ifdef WSM
-\f
+
 /******************************<->*************************************
  *
  *  InsureDefaultBackdropDir(char **ppchBackdropDirs)
@@ -1843,7 +1673,6 @@ InsureDefaultBackdropDir(char **ppchBackdropDirs)
     }
   
 } /* END OF FUNCTION InsureDefaultBackdropDirs */
-#endif /* WSM */
 
 \f
 /*************************************<->*************************************
@@ -1931,10 +1760,8 @@ void SetupWmWorkspaceWindows (void)
                        (long) ((wmGD.useStandardBehavior) ?
                         MWM_INFO_STARTUP_STANDARD : MWM_INFO_STARTUP_CUSTOM), 
                        pSD->wmWorkspaceWin);
-#ifdef WSM
            XSaveContext (DISPLAY, pSD->wmWorkspaceWin, 
                    wmGD.mwmWindowContextType, (caddr_t)pSD);
-#endif /* WSM */
        }
     }
 
@@ -2209,9 +2036,7 @@ void CopyArgv (int argc, char *argv [])
     {
        Warning (((char *)GETMESSAGE(40, 10, "Insufficient memory for window manager data")));
        wmGD.argv = argv;
-#ifdef WSM
        dpy2Argv = argv;
-#endif /* WSM */
     }
     else
     {
@@ -2220,7 +2045,6 @@ void CopyArgv (int argc, char *argv [])
            wmGD.argv[i] = argv[i];
        }
        wmGD.argv[i] = NULL;
-#ifdef WSM
        if ((dpy2Argv = (char **)XtMalloc((argc + 1) * sizeof(char *))) == NULL)
        {
            Warning (((char *)GETMESSAGE(40, 11, "Insufficient memory for window manager data")));
@@ -2235,7 +2059,6 @@ void CopyArgv (int argc, char *argv [])
            dpy2Argc = argc;
            dpy2Argv[i] = NULL;
        }
-#endif /* WSM */
     }
     
 } /* END OF FUNCTION CopyArgv */
@@ -2285,11 +2108,7 @@ void InitScreenNames (void)
            ExitWM (WM_ERROR_EXIT_VALUE);
        }
        /* default name is left justified, 3-chars max, zero terminated */
-#ifdef WSM
        sprintf((char *)wmGD.screenNames[num], UNSPECIFIED_SCREEN_NAME);
-#else  /* WSM */
-       sprintf((char *)wmGD.screenNames[num],"%d",num%1000);
-#endif /* WSM */
     }
 }
 #ifndef NO_MESSAGE_CATALOG
@@ -2299,14 +2118,12 @@ void InitNlsStrings (void)
 {
     char * tmpString;
 
-#ifdef WSM
     /*
      * Initialize messages
      */
     wmGD.okLabel=XmStringCreateLocalized((String)_DtOkString);
     wmGD.cancelLabel=XmStringCreateLocalized((String)_DtCancelString);
     wmGD.helpLabel=XmStringCreateLocalized((String)_DtHelpString);
-#endif /* WSM */    
 
     /*
      * catgets returns a pointer to an area that is over written
@@ -2325,7 +2142,6 @@ void InitNlsStrings (void)
        strcpy(wmNLS.default_icon_box_title, tmpString);
     }
 
-#ifdef WSM
     tmpString = ((char *)GETMESSAGE(40, 20, "%s: %s on line %d of configuration file %s\n"));
     if ((pWarningStringFile =
         (char *)XtMalloc ((unsigned int) (strlen(tmpString) + 1))) == NULL)
@@ -2386,7 +2202,6 @@ void InitNlsStrings (void)
     {
        strcpy(wmNLS.defaultHelpTitle, tmpString);
     }
-#endif /* WSM */
 
 } /* InitNlsStrings  */
 #endif
@@ -2437,9 +2252,7 @@ InitWmDisplayEnv (void)
     else
     {
        strcpy(wmGD.displayString, buffer);
-#ifdef WSM
        putenv(wmGD.displayString);
-#endif /* WSM */
     }
     
 } /* END OF FUNCTION  InitWmDisplayEnv */
@@ -2682,6 +2495,4 @@ VirtKeys4DIN(
 }
 #endif /* NO_HP_KEY_REMAP */
 
-#ifdef WSM
 /****************************   eof    ***************************/
-#endif /* WSM */
index 65476b0d2ad6d17d99a3ff6cda86ecdb5e422578..c7e94a02955e373d23d7679e54063e80a12c43fa 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2.2
 */ 
-/*   $XConsortium: WmInitWs.h /main/5 1996/09/14 14:50:22 drk $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -44,6 +43,4 @@ extern void InitScreenNames (void);
 #ifndef NO_MESSAGE_CATALOG
 extern void InitNlsStrings( void ) ;
 #endif
-#ifdef WSM
 extern void InitWmDisplayEnv( void ) ;
-#endif /* WSM */
index 9904e44fc1c2524182ebd678d822ce6e9d5e195f..d34587c6d24cf4937091c1ac3423707c58e99abd 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.3
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmKeyFocus.c /main/5 1996/05/17 12:53:16 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -363,14 +358,12 @@ void SetKeyboardFocus (ClientData *pCD, long focusFlags)
 
 void ResetExplicitSelectHandling (ClientData *pCD)
 {
-#ifdef WSM
     Boolean bUnseen;
 
     bUnseen = (pCD->clientState & UNSEEN_STATE) ? True : False;
     if (bUnseen)
        pCD->clientState &= ~UNSEEN_STATE;
 
-#endif /* WSM */
     if ((pCD->clientState == NORMAL_STATE) ||
        (pCD->clientState == MAXIMIZED_STATE))
     {
@@ -388,11 +381,9 @@ void ResetExplicitSelectHandling (ClientData *pCD)
 
        /* !!! grab reset if client icon window? !!! */
     }
-#ifdef WSM
 
     if (bUnseen)
        pCD->clientState |= UNSEEN_STATE;
-#endif /* WSM */
     
 
 } /* END OF FUNCTION ResetExplicitSelectHandling */    
@@ -505,9 +496,7 @@ void SetFocusIndication (ClientData *pCD)
 void ClearFocusIndication (ClientData *pCD, Boolean refresh)
 {
     ClientData *saveCD;
-#ifdef WSM
     Boolean bUnseen;
-#endif /* WSM */
 
     /* 
      * Set the "focus" to NULL to insure correct display of the frame 
@@ -517,11 +506,9 @@ void ClearFocusIndication (ClientData *pCD, Boolean refresh)
 
     saveCD = wmGD.keyboardFocus;
     wmGD.keyboardFocus = NULL;
-#ifdef WSM
     bUnseen = (pCD->clientState & UNSEEN_STATE) ? True : False;
     if (bUnseen)
        pCD->clientState &= ~UNSEEN_STATE;
-#endif /* WSM */
 
     if ((pCD->clientState == NORMAL_STATE) ||
        (pCD->clientState == MAXIMIZED_STATE))
@@ -541,10 +528,8 @@ void ClearFocusIndication (ClientData *pCD, Boolean refresh)
        ShowInactiveIcon (pCD, refresh);
     }
 
-#ifdef WSM
     if (bUnseen) 
        pCD->clientState |= UNSEEN_STATE;
-#endif /* WSM */
 
     /* restore old keyboard focus */
     wmGD.keyboardFocus = saveCD;
@@ -573,9 +558,7 @@ void ClearFocusIndication (ClientData *pCD, Boolean refresh)
  *        
  *************************************<->***********************************/
 
-ClientData *GetClientUnderPointer (pSameScreen)
-    Boolean *pSameScreen;
-
+ClientData *GetClientUnderPointer (Boolean *pSameScreen)
 {
     Window root;
     Window child;
@@ -886,9 +869,7 @@ Boolean FocusNextTransient (ClientData *pCD, unsigned long type, Boolean initiat
  *
  *************************************<->***********************************/
 
-ClientData *FindLastTransientTreeFocus (pCD, pcdNoFocus)
-    ClientData *pCD;
-    ClientData *pcdNoFocus;
+ClientData *FindLastTransientTreeFocus (ClientData *pCD, ClientData *pcdNoFocus)
 
 {
     ClientData *pcdNext;
@@ -949,10 +930,7 @@ ClientData *FindLastTransientTreeFocus (pCD, pcdNoFocus)
  *
  *************************************<->***********************************/
 
-ClientData *FindNextTFocusInSeq (pCD, startAt)
-    ClientData *pCD;
-    unsigned long startAt;
-
+ClientData *FindNextTFocusInSeq (ClientData *pCD, unsigned long startAt)
 {
     ClientData *pcdNextFocus = NULL;
     ClientData *pcdNext;
@@ -1231,10 +1209,7 @@ Boolean FocusPrevTransient (ClientData *pCD, unsigned long type, Boolean initiat
  *
  *************************************<->***********************************/
 
-ClientData *FindPrevTFocusInSeq (pCD, startAt)
-    ClientData *pCD;
-    unsigned long startAt;
-
+ClientData *FindPrevTFocusInSeq (ClientData *pCD, unsigned long startAt)
 {
     ClientData *pcdNextFocus = NULL;
     ClientData *pcdNext;
@@ -1318,9 +1293,7 @@ Boolean CheckForKeyFocus (ClientListEntry *pNextEntry, unsigned long type, Boole
      */
 
     if (((pNextEntry->type == NORMAL_STATE) &&
-#ifdef WSM
          (!(pCD->clientState & UNSEEN_STATE)) &&
-#endif /* WSM */
         (pCD->clientState != MINIMIZED_STATE)) ||
        ((pNextEntry->type == MINIMIZED_STATE) &&
         (pCD->clientState == MINIMIZED_STATE)))
@@ -1480,9 +1453,7 @@ void AutoResetKeyFocus (ClientData *pcdNoFocus, Time focusTime)
        {
            if ((pNextEntry->type != MINIMIZED_STATE) &&
                (pCD->clientState != MINIMIZED_STATE) &&
-#ifdef WSM
                (!(pCD->clientState & UNSEEN_STATE)) &&
-#endif /* WSM */
                (pCD != pcdNoFocus))
            {
                if (pCD->transientChildren)
index 8fa56b19f037625a20054ef0a084026cb2dccb89..5ef944513a4bd239191074506108283d48c1d4ad 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmKeyFocus.h /main/4 1995/11/01 11:43:42 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index 41288fdc67aa40e1a8a748cdd61fb119b0a98a6d..bf23693e200fb18d66d0daa5952ee972426621c9 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.1
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmMain.c /main/8 1998/04/20 13:01:09 mgreess $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -41,13 +36,9 @@ static char rcsid[] = "$TOG: WmMain.c /main/8 1998/04/20 13:01:09 mgreess $"
 
 #include "WmGlobal.h"
 
-#ifndef NO_MULTIBYTE
 #include <locale.h>
-#endif
-#ifdef WSM
 #include <Dt/Message.h>
 #include <Dt/EnvControlP.h>
-#endif /* WSM */
 /*
  * include extern functions
  */
@@ -56,24 +47,17 @@ static char rcsid[] = "$TOG: WmMain.c /main/8 1998/04/20 13:01:09 mgreess $"
 #include "WmEvent.h"
 #include "WmInitWs.h"
 #include "WmError.h"
-#ifdef WSM
 #include "WmIPC.h"
 #include "WmBackdrop.h"
-#endif /* WSM */
 
 
 /*
  * Function Declarations:
  */
-#ifdef WSM
 int WmReturnIdentity (int argc, char *argv[], char *environ[]);
 #define ManagedRoot(w) (!XFindContext (DISPLAY, (w), wmGD.screenContextType, \
 (caddr_t *)&pSD) ? (SetActiveScreen (pSD), True) : \
 (IsBackdropWindow (ACTIVE_PSD, (w))))
-#else /* WSM */
-#define ManagedRoot(w) (!XFindContext (DISPLAY, (w), wmGD.screenContextType, \
-(caddr_t *)&pSD) ? (SetActiveScreen (pSD), True) : False)
-#endif /* WSM */
 
 WmScreenData *pSD;
 
@@ -85,9 +69,7 @@ WmGlobalData wmGD;
 #ifndef NO_MESSAGE_CATALOG
 NlsStrings wmNLS;
 #endif
-#ifdef WSM
 int WmIdentity;
-#endif /* WSM */
 
 
 \f
@@ -120,8 +102,6 @@ main (int argc, char *argv [], char *environ [])
 
     setlocale(LC_ALL, "");
 
-#ifndef NO_MULTIBYTE
-#ifdef WSM
     /*
      * Set up environment variables for this HP DT client
      */
@@ -135,22 +115,18 @@ main (int argc, char *argv [], char *environ [])
      {
         char * foo = ((char *)GETMESSAGE(44, 1, ""));
      }
-#endif /* WSM */
     XtSetLanguageProc (NULL, (XtLanguageProc)NULL, NULL);
-#endif
-#ifdef WSM
+
     /*  
      * Get Identity
      */
     WmIdentity = WmReturnIdentity(argc, argv, environ);
-#endif /* WSM */
 
     /*
      * Initialize the workspace:
      */
 
     InitWmGlobal (argc, argv, environ);
-#ifdef WSM
 
     /*
      * Set up PATH variable if it must run as standalone command
@@ -160,7 +136,6 @@ main (int argc, char *argv [], char *environ [])
     {
        _DtEnvControl(DT_ENV_SET_BIN);
     }
-#endif /* WSM */
     
     /*
      * MAIN EVENT HANDLING LOOP:
@@ -180,7 +155,6 @@ main (int argc, char *argv [], char *environ [])
 
        wmGD.attributesWindow = 0L;
 
-#ifdef WSM
        if ((event.type == ButtonPress) || 
            (event.type == ButtonRelease))
        {
@@ -197,7 +171,6 @@ main (int argc, char *argv [], char *environ [])
                wmGD.bReplayedButton = False;
            }
        }
-#endif /* WSM */
        dispatchEvent = True;
        if (wmGD.menuActive)
        {
@@ -236,7 +209,6 @@ main (int argc, char *argv [], char *environ [])
 
 } /* END OF FUNCTION main */
 
-#ifdef WSM
 /******************************<->*************************************
  *
  *  WmReturnIdentity (argc, argv, environ)
@@ -301,7 +273,5 @@ int WmReturnIdentity ( int argc, char *argv[], char *environ[])
        return(retVal);
 
 } /* END OF FUNCTION WmReturnIdentity */
-#endif /* WSM */
-#ifdef WSM
+
 /*************************     eof   ******************************/
-#endif /* WSM */
index c2232643c21b090441ee73b4d9f31ff3e8bba7ff..738fe05979a83f24e24f0cca5bc91b6974d1c7f3 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.4
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmManage.c /main/11 1998/01/12 16:45:48 cshi $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990, 1992, 1993 HEWLETT-PACKARD COMPANY 
  */
@@ -56,11 +51,9 @@ static char rcsid[] = "$TOG: WmManage.c /main/11 1998/01/12 16:45:48 cshi $"
 #include "WmIconBox.h"
 #include "WmImage.h"
 #include "WmKeyFocus.h"
-#ifdef PANELIST
 #include "WmPanelP.h"  /* typedef needed in WmManage.h */
 #include <Dt/Message.h>
 #include "WmIPC.h"
-#endif /* PANELIST */
 #include "WmManage.h"
 #include "WmMenu.h"
 #include "WmProperty.h"
@@ -68,10 +61,8 @@ static char rcsid[] = "$TOG: WmManage.c /main/11 1998/01/12 16:45:48 cshi $"
 #include "WmWinInfo.h"
 #include "WmWinList.h"
 #include "WmWinState.h"
-#ifdef WSM
 #include "WmPresence.h"
 #include "WmWrkspace.h"
-#endif /* WSM */
 #include "WmXSMP.h"
 
 
@@ -80,8 +71,6 @@ static char rcsid[] = "$TOG: WmManage.c /main/11 1998/01/12 16:45:48 cshi $"
  * Function Declarations:
  */
 
-#ifdef PANELIST
-
 Boolean IsEmbeddedClient (
     ClientData *pCD, 
     WmFpEmbeddedClientData **ppECD);
@@ -102,8 +91,6 @@ static void ForceSubpanelWMState(Window win);
 static void ReManageWindow (ClientData *pCD);
 static void CheckPushRecallClient (ClientData *pCD);
 
-#endif /* PANELIST */
-
 
 /*
  * Global Variables:
@@ -133,11 +120,9 @@ void AdoptInitialClients (WmScreenData *pSD)
     Window  root;
     Window  parent;
     Window *clients;
-#ifdef WSM
     int nAncillaries, iAnc;
     Window *pAncillaryWindows, *pWin1;
     WmWorkspaceData *pWS0;
-#endif /* WSM */
     unsigned int     nclients;
     ClientData *pcd = NULL;
     PropWMState *wmStateProp;
@@ -145,7 +130,6 @@ void AdoptInitialClients (WmScreenData *pSD)
     int i,j;
     long manageFlags;
 
-#ifdef WSM
     /* 
      * Generate list of ancillary windows (not to be managed)
      */
@@ -167,7 +151,6 @@ void AdoptInitialClients (WmScreenData *pSD)
     *pWin1++ = XtWindow (pSD->screenTopLevelW);
     *pWin1 = pSD->activeIconTextWin;
 
-#endif /* WSM */
 
     /*
      * Look for mapped top-level windows and start managing them:
@@ -203,21 +186,11 @@ void AdoptInitialClients (WmScreenData *pSD)
        for (i = 0; i < nclients; i++)
        {
            /* determine if the client window should be managed by wm */
-#ifdef WSM
             if (InWindowList (clients[i], pAncillaryWindows, nAncillaries))
             {
                /* don't manage ancillary window manager windows */
                 continue;
            }
-#else /* WSM */
-            if ((clients[i] == XtWindow (pSD->screenTopLevelW)) ||
-               (clients[i] == XtWindow (pSD->pActiveWS->workspaceTopLevelW)) ||
-               (clients[i] == pSD->activeIconTextWin))
-            {
-               /* don't manage ancillary window manager windows */
-                continue;
-           }
-#endif /* WSM */
            if (!XFindContext (DISPLAY, clients[i], wmGD.windowContextType,
                (caddr_t *)&pcd)) 
            {
@@ -282,12 +255,10 @@ void AdoptInitialClients (WmScreenData *pSD)
        }
     }
 
-#ifdef WSM
     if (pAncillaryWindows)
     {
        XtFree ((char *) pAncillaryWindows);
     }
-#endif /* WSM  */
 
 } /* END OF FUNCTION AdoptInitialClients */
 
@@ -328,12 +299,8 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
     int initialState;
     int i;
     Boolean sendConfigNotify;
-#ifdef WSM
     WmWorkspaceData *pwsi;
-#endif /* WSM */
-#ifdef PANELIST 
     WmFpEmbeddedClientData *pECD;
-#endif /* PANELIST */
 
     /*
      * Get client information including window attributes and window
@@ -347,8 +314,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
        return;
     }
 
-
-#ifdef PANELIST
     /*
      *  Handle case of transients that derive from embedded clients.
      */
@@ -379,7 +344,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
             *   ...then we've embedded it in the front
             *   panel--no further processing required.
             */
-#ifdef WSM
            if (smAckState == SM_START_ACK)
            {
                SendClientMsg( wmGD.dtSmWindow, 
@@ -387,7 +351,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
                              (long) wmGD.xa_DT_WM_WINDOW_ACK,
                              CurrentTime, NULL, 0);
            }
-#endif /* WSM */
            return;
        }
     }
@@ -403,8 +366,7 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
            pCD->transientLeader->pAccessPanel->pCD_accessPanel;
     }
 #endif 
-#endif /* PANELIST */
-#ifdef WSM
+
     if (pCD->inputMode == MWM_INPUT_SYSTEM_MODAL)
     {
        /*
@@ -416,7 +378,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
        F_AddToAllWorkspaces(0, pCD, 0);
        pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
     }
-#endif /* WSM */
     if (manageFlags & MANAGEW_WM_RESTART)
     {
        if (manageFlags & MANAGEW_WM_RESTART_ICON)
@@ -484,7 +445,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
      * window.
      */
 
-#ifdef WSM
     if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) &&
        (pCD->transientLeader == NULL))
     {
@@ -565,21 +525,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
            }
        }
     }
-#else /* WSM */
-    if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) &&
-        (pCD->transientLeader == NULL) && 
-         !MakeIcon (pCD->pSD->pActiveWS, pCD))
-    {
-       /*
-        * Error in making an icon for the client window; clean up the wm
-        * resources; do not manage the client window.
-        */
-
-       UnManageWindow (pCD);
-       return;
-    }
-#endif /* WSM */
-
 
     /*
      * Register window contexts to facilitate event handling:
@@ -599,13 +544,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
        XSaveContext (DISPLAY, pCD->clientTitleWin, wmGD.windowContextType,
            (caddr_t)pCD);
     }
-#ifndef WSM
-    if (pCD->iconFrameWin)
-    {
-       XSaveContext (DISPLAY, pCD->iconFrameWin, wmGD.windowContextType,
-           (caddr_t)pCD);
-    }
-#endif /* WSM */
 
     if (pCD->clientCmapCount > 0)
     {
@@ -636,15 +574,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
        SetupCButtonBindings (pCD->clientBaseWin, BUTTON_SPECS(pCD));
     }
 
-#ifndef WSM
-    if (pCD->iconWindow && pCD->iconFrameWin)
-    {
-       XGrabButton (DISPLAY, AnyButton, AnyModifier, pCD->iconFrameWin, True,
-           ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,
-           GrabModeAsync, GrabModeAsync, None, wmGD.workspaceCursor);
-    }
-#endif /* WSM */
-
     /*
      * Setup key binding handling for system menu accelerators.
      */
@@ -654,7 +583,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
     {
        SetupKeyBindings (pCD->systemMenuSpec->accelKeySpecs,
                          pCD->clientFrameWin, GrabModeSync, F_CONTEXT_ALL);
-#ifdef WSM
        for (i = 0; i < pCD->numInhabited; i++)
        {
            if (!pCD->pWsList[i].pIconBox && pCD->pWsList[i].iconFrameWin)
@@ -664,36 +592,20 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
                              F_CONTEXT_ALL);
            }
        }
-#else /* WSM */
-       if (!pCD->pIconBox && pCD->iconFrameWin)
-       {
-           SetupKeyBindings (pCD->systemMenuSpec->accelKeySpecs,
-                             pCD->iconFrameWin, GrabModeSync, F_CONTEXT_ALL);
-       }
-#endif /* WSM */
     }
 
-#ifdef WSM
   for (i = 0; i < pCD->numInhabited; i++)
   {
     if (!pCD->pWsList[i].pIconBox && pCD->pWsList[i].iconFrameWin)
-#else /* WSM */
-    if (!pCD->pIconBox && pCD->iconFrameWin)
-#endif /* WSM */
     {
        static int iconKeySpec = 1;
        static int iconAccelSpec = 1;
 
         if ((iconKeySpec != 0) && KEY_SPECS(pCD))
         {
-#ifdef WSM
            iconKeySpec = SetupKeyBindings (KEY_SPECS(pCD), 
                                pCD->pWsList[i].iconFrameWin,
                                GrabModeSync, F_CONTEXT_ICON);
-#else /* WSM */
-           iconKeySpec = SetupKeyBindings (KEY_SPECS(pCD), pCD->iconFrameWin,
-                               GrabModeSync, F_CONTEXT_ICON);
-#endif /* WSM */
         }
 
         if ((iconAccelSpec != 0) && ACCELERATOR_MENU_COUNT(pCD))
@@ -703,23 +615,14 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
            iconAccelSpec = 0;
            for (n= 0; n < pSD->acceleratorMenuCount; n++)
            {
-#ifdef WSM
                iconAccelSpec += SetupKeyBindings (
                            ACCELERATOR_MENU_SPECS(pCD)[n]->accelKeySpecs,
                            pCD->pWsList[i].iconFrameWin, GrabModeSync,
                            F_CONTEXT_ICON);
-#else /* WSM */
-               iconAccelSpec += SetupKeyBindings (
-                           ACCELERATOR_MENU_SPECS(pCD)[n]->accelKeySpecs,
-                           pCD->iconFrameWin, GrabModeSync,
-                           F_CONTEXT_ICON);
-#endif /* WSM */
            }
        }
     }
-#ifdef WSM
   }
-#endif /* WSM */
 
 
     /*
@@ -731,9 +634,7 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
        DoExplicitSelectGrab (pCD->clientBaseWin);
     }
 
-#ifdef WSM
     UpdateWorkspacePresenceProperty(pCD);
-#endif /* WSM */
 
 
     /*
@@ -756,16 +657,13 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
      */
 
     initialState = pCD->clientState;
-#ifdef WSM
     if (!ClientInWorkspace (pSD->pActiveWS, pCD))
     {
        initialState |= UNSEEN_STATE;
     }
-#endif /* WSM */
     pCD->clientState = WITHDRAWN_STATE;
     pCD->clientFlags &= ~WM_INITIALIZATION;
 
-#ifdef WSM
     /* 
      * Add to stacking list using the client's zero'th workspace
      * instead of the current one because it may not be in 
@@ -773,9 +671,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
      */
     AddClientToList (GetWorkspaceData (pSD, pCD->pWsList[0].wsID),
        pCD, True /*on top*/);
-#else /* WSM */
-    AddClientToList (pSD->pActiveWS, pCD, True /*on top*/);
-#endif /* WSM */
     SetClientState (pCD, initialState, GetTimestamp());
 
     /*
@@ -799,9 +694,7 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
          !(manageFlags &
            (MANAGEW_WM_STARTUP | MANAGEW_WM_RESTART | MANAGEW_WM_CLIENTS)) &&
          (pCD->clientState != MINIMIZED_STATE) &&
-#ifdef WSM
           !(pCD->clientState & UNSEEN_STATE) &&
-#endif /* WSM */
          (pCD->inputFocusModel ||
           (pCD->protocolFlags & PROTOCOL_WM_TAKE_FOCUS)))))
     {
@@ -813,7 +706,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
        Do_Focus_Key ((ClientData *)NULL, GetTimestamp() , ALWAYS_SET_FOCUS);
     }
 
-#ifdef WSM
     if (smAckState == SM_START_ACK)
     {
        SendClientMsg( wmGD.dtSmWindow, (long) wmGD.xa_DT_SM_WM_PROTOCOL,
@@ -828,10 +720,7 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
      */
     DiscardInitialPropertyList (pCD);
 
-#endif /* WSM */
-#ifdef PANELIST
     CheckPushRecallClient (pCD);
-#endif /* PANELIST */
 
 } /* END OF FUNCTION ManageWindow */
 
@@ -856,7 +745,6 @@ ManageWindow (WmScreenData *pSD, Window clientWindow, long manageFlags)
 
 void UnManageWindow (ClientData *pCD)
 {
-#ifdef PANELIST
     if (pCD->pECD)
     {
        WmFpEmbeddedClientData *pECD;
@@ -896,7 +784,7 @@ void UnManageWindow (ClientData *pCD)
        }
        pCD->pPRCD = NULL;
     }
-#endif /* PANELIST */
+
     /*
      * Withdraw all the transient children of this window.
      */
@@ -1009,9 +897,7 @@ void WithdrawWindow (ClientData *pCD)
      * - make sure the input focus no longer is associted with the window
      * - free the icon placement (if necessary)
      */
-#ifdef WSM
     SetClientWsIndex (pCD);
-#endif /* WSM */
 
     if (!(pCD->clientFlags & WM_INITIALIZATION))
     {
@@ -1022,7 +908,6 @@ void WithdrawWindow (ClientData *pCD)
        ResetWithdrawnFocii (pCD);
        if (pCD->clientState & MINIMIZED_STATE)
        {
-#ifdef WSM
            if (wmGD.iconAutoPlace && (!(P_ICON_BOX(pCD))))
            {
                WmWorkspaceData *pWsTmp;
@@ -1047,16 +932,6 @@ void WithdrawWindow (ClientData *pCD)
                    }
                }
            }
-#else /* WSM */
-           if (wmGD.iconAutoPlace && (!(P_ICON_BOX(pCD))))
-           {
-               if (ICON_PLACE(pCD) != NO_ICON_PLACE)
-               {
-               pCD->pSD->pActiveWS->IPData.placeList[ICON_PLACE(pCD)].pCD 
-                   = NULL;
-               }
-           }
-#endif /* WSM */
            if (ICON_FRAME_WIN(pCD))
            {
                XUnmapWindow (DISPLAY, ICON_FRAME_WIN(pCD));
@@ -1070,7 +945,6 @@ void WithdrawWindow (ClientData *pCD)
            XFlush (DISPLAY);
        }
     }
-#ifdef WSM
     /* 
      * Clean up the workspace presence dialog if it's
      * connected to this client.
@@ -1084,7 +958,6 @@ void WithdrawWindow (ClientData *pCD)
        }
        pCD->pSD->presence.pCDforClient = NULL;
     }
-#endif /* WSM */
 
     /*
      * Check to see if the window is being unmanaged because the window
@@ -1112,12 +985,8 @@ void WithdrawWindow (ClientData *pCD)
     if ((pCD->clientFlags & CLIENT_REPARENTED) &&
         !(pCD->clientFlags & CLIENT_DESTROYED))
     {
-#ifdef WSM
        SetWMState (pCD->client, WithdrawnSTATE, 
                pCD->pWsList[0].iconFrameWin);
-#else /* WSM */
-       SetWMState (pCD->client, WithdrawnSTATE, ICON_FRAME_WIN(pCD));
-#endif /* WSM */
 
        if (pCD->maxConfig)
        {
@@ -1151,13 +1020,8 @@ void WithdrawWindow (ClientData *pCD)
        if (pCD->iconWindow && (pCD->clientFlags & ICON_REPARENTED))
        {
            XUnmapWindow (DISPLAY, pCD->iconWindow);
-#ifdef WSM
            XReparentWindow (DISPLAY, pCD->iconWindow, ROOT_FOR_CLIENT(pCD), 
                             pCD->pWsList[0].iconX, pCD->pWsList[0].iconY);
-#else /* WSM */
-           XReparentWindow (DISPLAY, pCD->iconWindow, ROOT_FOR_CLIENT(pCD), 
-                            ICON_X(pCD), ICON_Y(pCD));
-#endif /* WSM */
        }
     }
 
@@ -1198,11 +1062,7 @@ void WithdrawWindow (ClientData *pCD)
        XFreePixmap (DISPLAY, pCD->iconPixmap);
     }
 
-#ifdef WSM
     if ((pCD->numInhabited > 0) && ICON_FRAME_WIN(pCD))
-#else /* WSM */
-    if (ICON_FRAME_WIN(pCD))
-#endif /* WSM */
     {
         FreeIcon (pCD);
     }
@@ -1240,8 +1100,6 @@ void WithdrawWindow (ClientData *pCD)
      */
     DeleteClientContext (pCD);
 
-
-#ifdef WSM
     /* 
      * Count backward for efficiency  --  
      *     removes from end of list.
@@ -1252,7 +1110,6 @@ void WithdrawWindow (ClientData *pCD)
            GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID),
            pCD);
     }
-#endif /* WSM */
 
     /*
      * Free up window manager resources:
@@ -1301,7 +1158,6 @@ void WithdrawWindow (ClientData *pCD)
 #endif
     }
 
-#ifdef WSM
     /*
      * Insure list of initial properties has been freed.
      */
@@ -1322,7 +1178,6 @@ void WithdrawWindow (ClientData *pCD)
     {
        XtFree ((char *)pCD->pWorkspaceHints);
     }
-#endif /* WSM */
 
     if (pCD->smClientID)
        XFree (pCD->smClientID);
@@ -1401,7 +1256,6 @@ void DeleteClientContext (ClientData *pCD)
        }
        if (ICON_FRAME_WIN(pCD)) 
        {
-#ifdef WSM
             int k;
 
            for (k=0; k < pCD->numInhabited; k++)
@@ -1409,10 +1263,6 @@ void DeleteClientContext (ClientData *pCD)
                XDeleteContext (DISPLAY, pCD->pWsList[k].iconFrameWin, 
                                 wmGD.windowContextType);
            }
-#else /* WSM */
-           XDeleteContext (DISPLAY, pCD->iconFrameWin, 
-                            wmGD.windowContextType);
-#endif /* WSM */
        }
        pCD->clientFlags &= ~CLIENT_CONTEXT_SAVED;
     }
@@ -1588,10 +1438,8 @@ void FreeClientFrame (ClientData *pCD)
 
 void FreeIcon (ClientData *pCD)
 {
-#ifdef WSM
     WmWorkspaceData *pWsTmp;
     int i;
-#endif /* WSM */
 
     if (pCD->piconTopShadows) {
        FreeRList (pCD->piconTopShadows);
@@ -1606,7 +1454,6 @@ void FreeIcon (ClientData *pCD)
      * destroy frame window & all children 
      */
 
-#ifdef WSM
     if ((pCD->pSD->useIconBox) && pCD->pWsList[0].pIconBox)
     {
        /* 
@@ -1631,16 +1478,6 @@ void FreeIcon (ClientData *pCD)
            XDestroyWindow (DISPLAY, pCD->pWsList[0].iconFrameWin);
        }
     }
-#else /* WSM */
-    if (pCD->pSD->useIconBox && P_ICON_BOX(pCD))
-    {
-       DeleteIconFromBox (pCD->pSD->pActiveWS->pIconBox, pCD);
-    }
-    else
-    {
-       XDestroyWindow (DISPLAY, pCD->iconFrameWin);
-    }
-#endif /* WSM */
 
 } /* END OF FUNCTION FreeIcon */
 
@@ -1670,9 +1507,7 @@ void FreeIcon (ClientData *pCD)
 
 void WithdrawDialog (Widget dialogboxW)
 {
-#ifdef WSM
     int i;
-#endif /* WSM */
     ClientData *pCD = NULL;
 
     /*
@@ -1685,7 +1520,6 @@ void WithdrawDialog (Widget dialogboxW)
 
     XtUnmanageChild (dialogboxW);
     DeleteClientFromList (ACTIVE_WS, pCD);
-#ifdef WSM
     /* TakeClientOutOfWorkspace (ACTIVE_WS, pCD); */
 
     /* 
@@ -1698,7 +1532,7 @@ void WithdrawDialog (Widget dialogboxW)
            GetWorkspaceData(pCD->pSD, pCD->pWsList[i].wsID),
            pCD);
     }
-#endif /* WSM */
+
     ResetWithdrawnFocii (pCD);
     XUnmapWindow (DISPLAY, pCD->clientFrameWin);
 
@@ -1745,7 +1579,6 @@ void ReManageDialog (WmScreenData *pSD, Widget dialogboxW)
      * The order is important here:
      */
 
-#ifdef WSM
     /*
      * Put system modal windows in all workspaces to
      * avoid the race condition of the window coming up
@@ -1760,7 +1593,6 @@ void ReManageDialog (WmScreenData *pSD, Widget dialogboxW)
     pCD->dtwmFunctions |= DtWM_FUNCTION_OCCUPY_WS;
     F_AddToAllWorkspaces(0, pCD, 0);
     pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
-#endif /* WSM */
 
     if (pSD->clientList)
     {
@@ -1779,8 +1611,7 @@ void ReManageDialog (WmScreenData *pSD, Widget dialogboxW)
 
 } /* END OF FUNCTION ReManageDialog */
 
-#ifdef PANELIST
-\f
+
 /*************************************<->*************************************
  *
  *  RegisterEmbeddedClients (wPanelist, pECD, count)
@@ -2295,9 +2126,7 @@ ManageEmbeddedClient (
     pECD->pCD = pCD;
     pCD->pECD = (void *) pECD;
 
-#ifdef WSM
     SetClientWsIndex(pCD);
-#endif
     SetClientWMState (pCD, NormalState, NORMAL_STATE);
 
     /*
@@ -3034,4 +2863,4 @@ RegisterIconBoxControl (Widget wPanelist)
 
 } /* END OF FUNCTION RegisterIconBoxControl */
 
-#endif /* PANELIST */
+
index cf7019d42f9e863f0de3cd8521a65049439ed023..2ea75ec618a200b3db7acd871e6cf1bcbe1636b1 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmManage.h /main/4 1995/11/01 11:44:22 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -42,7 +41,6 @@ extern void FreeClientFrame (ClientData *pCD);
 extern void FreeIcon (ClientData *pCD);
 extern void WithdrawDialog (Widget dialogboxW);
 extern void ReManageDialog (WmScreenData *pSD, Widget dialogboxW);
-#ifdef PANELIST
 extern void RegisterEmbeddedClients (
        Widget wPanelist, 
        WmFpEmbeddedClientList pECD, 
@@ -63,4 +61,3 @@ extern Boolean ReparentEmbeddedClient (
        unsigned int height);
 extern void ScanForEmbeddedClients (WmScreenData *pSD);
 extern void ScanForPushRecallClients (WmScreenData *pSD);
-#endif /* PANELIST */
index 36e6aad85bc23e3ea9dffa920025d97b4233d371..8a7bc01217e3a9ec7bd9207c3d7a55e2460e4520 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.3
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmMenu.c /main/15 1996/11/20 15:20:17 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 /*
@@ -47,9 +42,6 @@ static char rcsid[] = "$XConsortium: WmMenu.c /main/15 1996/11/20 15:20:17 rswis
 #include "WmCEvent.h"
 #include "WmResource.h"
 #include "WmResParse.h"
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# include "WmDebug.h"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 #include <stdio.h>
 
 #include <X11/Shell.h>
@@ -88,35 +80,14 @@ static char rcsid[] = "$XConsortium: WmMenu.c /main/15 1996/11/20 15:20:17 rswis
 #include "WmIconBox.h"
 #include "WmImage.h"
 #include "WmError.h"
-#ifdef WSM
 #include "WmWrkspace.h"
-#endif /* WSM */
 
 
 static void UnmapCallback (Widget w, XtPointer client_data,
                           XtPointer call_data);
 static MenuItem *DuplicateMenuItems (MenuItem *menuItems);
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-static MenuExclusion *DuplicateMenuExclusions(MenuExclusion *exclusions);
-static Boolean FindClientCommandMatch (MenuSpec *menuSpec,
-                                      String clientCommand,
-                                      MenuItem **menuItem);
-static void InsertTreeOnClient (WmScreenData *pSD, ClientData *pCD,
-                               CmdTree *tree,
-                               MatchList **client_match_list,
-                               MatchList **global_match_list,
-                               MenuSpec *menuSpec, MenuItem *template,
-                               String command_so_far,
-                               Boolean duplicate_globals, Atom selection,
-                               Context greyed_context, Boolean inLine);
-static MenuSpec *MakeMenuSpec (String menuName, CARD32 commandID);
-static void UnmapPulldownCallback (Widget w, XtPointer client_data,
-                                  XtPointer call_data);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 
-
-\f
 /*************************************<->*************************************
  *
  *  MakeMenu (menuName, initialContext, accelContext, moreMenuItems,
@@ -156,9 +127,6 @@ static void UnmapPulldownCallback (Widget w, XtPointer client_data,
  * 
  *************************************<->***********************************/
 MenuSpec *MakeMenu (WmScreenData *pSD,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-                   ClientData *pCD,
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
                    String menuName, Context initialContext,
                    Context accelContext, MenuItem *moreMenuItems,
                    Boolean fSystemMenu)
@@ -220,10 +188,6 @@ MenuSpec *MakeMenu (WmScreenData *pSD,
 
     if (moreMenuItems != NULL)
     {
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-       if ((newMenuSpec = DuplicateMenuSpec(menuSpec)) == (MenuSpec *)NULL)
-           return NULL;
-#else
         if ((newMenuSpec = (MenuSpec *) XtMalloc (sizeof (MenuSpec))) == NULL)
        /* Handle insufficent memory */
         {
@@ -237,7 +201,6 @@ MenuSpec *MakeMenu (WmScreenData *pSD,
        newMenuSpec->accelContext = menuSpec->accelContext;
        newMenuSpec->accelKeySpecs = NULL;
        newMenuSpec->nextMenuSpec = NULL;
-#endif
 
        menuSpec = newMenuSpec;
     }
@@ -339,10 +302,7 @@ MenuSpec *MakeMenu (WmScreenData *pSD,
 
 \f
 /*************************************<->***********************************/
-void CheckTerminalSeparator(menuSpec, buttonWidget, manage)
-     MenuSpec *menuSpec;
-     Widget buttonWidget;
-     Boolean manage;
+void CheckTerminalSeparator(MenuSpec *menuSpec, Widget buttonWidget, Boolean manage)
 {
     CompositeWidget cw;
     WidgetList      children;
@@ -378,2504 +338,166 @@ void CheckTerminalSeparator(menuSpec, buttonWidget, manage)
        }
        else
        {
-           if (XtIsManaged((Widget)children[wPos -1]))
-           {
-               XtUnmanageChild((Widget)children[wPos -1]);
-           }
-       }
-    }
-
-} /* END OF FUNCTION CheckTerminalSeparator */
-
-
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  MakeMenuSpec (menuName, commandID)
- *  
- *
- *
- *  Description:
- *  -----------
- *  This function creates and returns a MenuSpec structure.
- *
- *
- *  Inputs:
- *  ------
- *  menuName       = name of the menu specification
- *  commandID      = client command id of the menu item to build.
- *                   0 if not for a client command.
- *
- * 
- *  Outputs:
- *  -------
- *  Return = pointer to a MenuSpec structure with zero'ed fields.
- *
- *
- *  Comments:
- *  --------
- *  A new MenuSpec structure is allocated. The name is set to the
- *  menuName argument. The menuItems list, menuButtons list and 
- *  accelerator related fields are zero'ed out to NULL values. 
- * 
- *************************************<->***********************************/
-static MenuSpec *
-MakeMenuSpec (String menuName, CARD32 commandID)
-{
-    MenuSpec *menuSpec;
-    
-    if ((menuSpec = (MenuSpec *) XtMalloc (sizeof (MenuSpec))) == NULL)
-      /* Handle insufficent memory */
-    {
-       MWarning(((char *)GETMESSAGE(48, 2,
-                "Insufficient memory for menu %s\n")), menuName);
-       return (NULL);
-    }
-    
-    menuSpec->name = XtNewString(menuName);
-    menuSpec->currentContext = F_CONTEXT_ALL;
-    menuSpec->menuWidget = (Widget) NULL;
-    menuSpec->whichButton = SELECT_BUTTON;
-    menuSpec->height = 0;
-    menuSpec->menuItems = (MenuItem *) NULL;
-    menuSpec->menuButtons = (MenuButton *) NULL;
-    menuSpec->menuButtonSize = 0;
-    menuSpec->menuButtonCount = 0;
-    menuSpec->accelContext = F_CONTEXT_ALL;
-    menuSpec->accelKeySpecs = (KeySpec *) NULL;
-    menuSpec->exclusions = (MenuExclusion *) NULL;
-    menuSpec->clientLocal = FALSE;
-    menuSpec->commandID = commandID;
-    menuSpec->nextMenuSpec = (MenuSpec *) NULL;
-    
-    return(menuSpec);
-}
-#endif
-\f
-/*************************************<->*************************************
- *
- *  DuplicateMenuItems (menuItems)
- *  
- *
- *
- *  Description:
- *  -----------
- *  This function creates an indentical duplicate of the given menuItems
- *  list.
- *
- *
- *  Inputs:
- *  ------
- *  menuItems = the linked list of menuItems to duplicate
- *
- * 
- *  Outputs:
- *  -------
- *  Return = pointer to a new MenuItems list, identical to the original
- *
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-static MenuItem *
-DuplicateMenuItems (MenuItem *menuItems)
-{
-    MenuItem *newMenuItem = (MenuItem *) NULL, *returnMenuItem, *curMenuItem;
-    
-    for (curMenuItem = menuItems;
-        curMenuItem != (MenuItem *) NULL;
-        curMenuItem = curMenuItem->nextMenuItem)
-    {
-       /* If its the first one ... */
-       if (newMenuItem == (MenuItem *) NULL)
-       {
-           newMenuItem = (MenuItem *)XtMalloc(sizeof(MenuItem));
-           returnMenuItem = newMenuItem;
-       }
-       else /* ... otherwise, get the next menuItem. */
-       {
-           newMenuItem->nextMenuItem =
-             (MenuItem *)XtMalloc(sizeof(MenuItem));
-           newMenuItem = newMenuItem->nextMenuItem;
-       }
-       
-       newMenuItem->labelType = curMenuItem->labelType;
-       if (curMenuItem->label != (String) NULL)
-         newMenuItem->label = XtNewString(curMenuItem->label);
-       else
-         newMenuItem->label = NULL;
-       newMenuItem->labelBitmapIndex = curMenuItem->labelBitmapIndex;
-       newMenuItem->mnemonic = curMenuItem->mnemonic;
-       newMenuItem->accelState = curMenuItem->accelState;
-       newMenuItem->accelKeyCode = curMenuItem->accelKeyCode;
-       if (curMenuItem->accelText != (String) NULL)
-         newMenuItem->accelText = XtNewString(curMenuItem->accelText);
-       else
-         newMenuItem->accelText = NULL;
-       newMenuItem->wmFunction = curMenuItem->wmFunction;
-
-       if ((curMenuItem->wmFunction == F_Send_Msg)
-#ifdef WSM
-           || (curMenuItem->wmFunction == F_Set_Context)
-# ifdef PANELIST
-           /*
-            * NOTE: For now, in dtwm this function is used only
-            * to copy the FrontPanel menu.  So, we know that
-            * curMenuItem->wmFuncArgs isn't going anywhere,
-            * so it's safe to simply point at it.  If at some
-            * point it becomes possible that curMenuItem->wmFuncArgs
-            * can go away, we'll need to make a (deep) copy of
-            * the WmActionArg.  11/20/96
-            */
-           || (curMenuItem->wmFunction == F_Action)
-# endif /* PANELIST */
-#endif /* WSM */
-           )
-         newMenuItem->wmFuncArgs = curMenuItem->wmFuncArgs;
-       else if (curMenuItem->wmFuncArgs != (String) NULL)
-         newMenuItem->wmFuncArgs = XtNewString(curMenuItem->wmFuncArgs);
-       else
-         newMenuItem->wmFuncArgs = NULL;
-
-       newMenuItem->greyedContext = curMenuItem->greyedContext;
-       newMenuItem->mgtMask = curMenuItem->mgtMask;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-       newMenuItem->clientCommandName = 
-         XtNewString(curMenuItem->clientCommandName);
-       newMenuItem->clientCommandID = curMenuItem->clientCommandID;
-#endif
-       newMenuItem->nextMenuItem = (MenuItem *) NULL;
-    }
-    
-    return(returnMenuItem);
-}
-
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  DuplicateMenuExclusions (exclusions)
- *  
- *
- *
- *  Description:
- *  -----------
- *  This function creates an indentical duplicate of the given menu exclusions
- *  list.
- *
- *
- *  Inputs:
- *  ------
- *  exclusions = the linked list of menu exclusions to duplicate
- *
- * 
- *  Outputs:
- *  -------
- *  Return = pointer to a new MenuExclusion list, identical to the original
- *
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-static MenuExclusion *
-DuplicateMenuExclusions (MenuExclusion *exclusions)
-{
-    MenuExclusion *newMenuExclusion = (MenuExclusion *) NULL;
-    MenuExclusion *returnMenuExclusion = (MenuExclusion *) NULL;
-    MenuExclusion *curMenuExclusion = (MenuExclusion *) NULL;
-    
-    for (curMenuExclusion = exclusions;
-        curMenuExclusion != (MenuExclusion *) NULL;
-        curMenuExclusion = curMenuExclusion->nextExclusion)
-    {
-       /* If its the first one ... */
-       if (newMenuExclusion == (MenuExclusion *) NULL)
-       {
-           newMenuExclusion =
-             (MenuExclusion *)XtMalloc(sizeof(MenuExclusion));
-           returnMenuExclusion = newMenuExclusion;
-       }
-       else /* ... otherwise, get the next menuExclusion. */
-       {
-           newMenuExclusion->nextExclusion =
-             (MenuExclusion *)XtMalloc(sizeof(MenuExclusion));
-           newMenuExclusion = newMenuExclusion->nextExclusion;
-       }
-
-       newMenuExclusion->command_string =
-         XtNewString(curMenuExclusion->command_string);
-    }
-
-    /* Make sure we properly NULL terminate the list. */
-    if (newMenuExclusion != (MenuExclusion *) NULL)
-      newMenuExclusion->nextExclusion = (MenuExclusion *) NULL;
-    
-    return(returnMenuExclusion);
-}
-#endif
-\f
-/*************************************<->*************************************
- *
- *  DuplicateMenuSpec (menuSpec)
- *  
- *
- *
- *  Description:
- *  -----------
- *  This function creates an indentical duplicate of the given menuSpec.
- *  The menuItems list in the menuSpec is also duplicated. 
- *
- *
- *  Inputs:
- *  ------
- *  menuSpec = the menuSpec to duplicate
- *
- * 
- *  Outputs:
- *  -------
- *  Return = pointer to a new MenuSpec structure with the same field
- *          values as the original
- *
- *
- *  Comments:
- *  --------
- *  A new MenuSpec structure is allocated. Most of he fields of the new
- *  structure are set to the same values as the passed in menuSpec.
- *  There are some differences between the two final structures.
- *  One difference: any fields related to push buttons and other
- *  widgets are left blank in the new MenuSpec to be filled in later.
- * 
- *************************************<->***********************************/
-MenuSpec *
-DuplicateMenuSpec (MenuSpec *menuSpec)
-{
-    MenuSpec *newMenuSpec;
-    
-    if ((newMenuSpec = (MenuSpec *) XtMalloc (sizeof (MenuSpec))) == NULL)
-      /* Handle insufficent memory */
-    {
-       Warning((char *)GETMESSAGE(48, 9,
-                "Insufficient memory for menu specification\n"));
-       return (NULL);
-    }
-    newMenuSpec->name = XtNewString(menuSpec->name);
-    newMenuSpec->currentContext = menuSpec->currentContext;
-    newMenuSpec->menuWidget = (Widget) NULL;
-    newMenuSpec->whichButton = menuSpec->whichButton;
-    newMenuSpec->height = menuSpec->height;
-    newMenuSpec->menuItems = DuplicateMenuItems(menuSpec->menuItems);
-    newMenuSpec->menuButtons = (MenuButton *) NULL;
-    newMenuSpec->menuButtonSize = 0;
-    newMenuSpec->menuButtonCount = 0;
-    newMenuSpec->accelContext = menuSpec->accelContext;
-    newMenuSpec->accelKeySpecs = (KeySpec *) NULL;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    newMenuSpec->exclusions = DuplicateMenuExclusions(menuSpec->exclusions);
-    newMenuSpec->clientLocal = TRUE;
-    newMenuSpec->commandID = menuSpec->commandID;
-#endif
-    newMenuSpec->nextMenuSpec = (MenuSpec *) NULL;
-    
-    return(newMenuSpec);
-}
-
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  MakeMenuItem (label, wmFunction, funcArgs, mnemonic, accelText)
- * 
- *
- *  Description:
- *  -----------
- *  This function creates and returns a MenuItem structure. 
- *
- *
- *  Inputs:
- *  ------
- *  label      = the display name of the menu item
- *  wmFunction = the wm function to invoke
- *  funcArgs   = the function arguments to pass to the wm function
- *  mnemonic   = the mnemonic keysym
- *  accelText  = the accelerator text
- *
- *  Outputs:
- *  -------
- *  Return = pointer to a new MenuItem structure with fields filled
- *           in as per passed arguments
- *
- *
- *  Comments:
- *  --------
- *  This function is actually used as the underlying mechanism for 
- *  MenuItem creation by MakeMenuItemFromTemplate and 
- *  MakeClientCommandMenuItem.
- *
- *  Assumptions:
- *  -----------
- *  This function assumes that ParseWmAccelerator simply takes a pointer
- *  to a string and parses the accelerator found in it. If ParseWmAccelerator
- *  is ever modified to call GetString to get more text from the parse
- *  stream (as other parse functions do) then this code will break.
- * 
- *************************************<->***********************************/
-static MenuItem *
-MakeMenuItem (String label, WmFunction wmFunction, String funcArgs,
-             KeySym mnemonic, unsigned int accelState,
-             KeyCode accelKeyCode, String accelText)
-{
-    MenuItem *menuItem;
-/*
-    unsigned char *copy_of_accelText;
-*/
-    
-    if ((menuItem = (MenuItem *) XtMalloc (sizeof (MenuItem))) == NULL)
-      /* Handle insufficent memory */
-    {
-       MWarning(((char *)GETMESSAGE(48, 10,
-                 "Insufficient memory for menu item %s\n")), label);
-       return (NULL);
-    }
-    
-    menuItem->labelType = XmSTRING;
-    menuItem->label = XtNewString(label);
-    menuItem->labelBitmapIndex = -1;
-    menuItem->mnemonic = mnemonic;
-    menuItem->clientCommandName = NULL;
-    menuItem->clientCommandID = 0;
-
-/*     
-    copy_of_accelText = (unsigned char *)XtNewString(accelText);
-    ParseWmAccelerator(&copy_of_accelText, menuItem);
-*/
-
-    menuItem->accelState = accelState;
-    menuItem->accelKeyCode = accelKeyCode;
-    menuItem->accelText = XtNewString(accelText);
-
-    menuItem->wmFunction = wmFunction;
-    menuItem->wmFuncArgs = XtNewString(funcArgs);
-    SetGreyedContextAndMgtMask(menuItem, wmFunction);
-    menuItem->nextMenuItem = (MenuItem *) NULL;
-    
-    return(menuItem);
-}
-
-\f
-/*************************************<->*************************************
- *
- *  MakeMenuItemFromTemplate (template, name, funcArgs)
- * 
- *
- *  Description:
- *  -----------
- *  This function creates and returns a MenuItem structure. 
- *
- *
- *  Inputs:
- *  ------
- *  template   = a template menuItem used to fill in fields of the
- *              new menu item
- *  name       = the display name this item should have
- *  funcArgs   = the function arguments to pass to the wm function
- *
- *  Outputs:
- *  -------
- *  Return = pointer to a new MenuItem structure with fields filled
- *           in as per template MenuItem and funcargs
- *
- *
- *  Comments:
- *  --------
- *  This function uses the values in the template MenuItem to create
- *  a new copy of the template with the given funcArgs.
- * 
- *************************************<->***********************************/
-
-static MenuItem *MakeMenuItemFromTemplate (MenuItem *template, String name,
-                                          String funcArgs)
-{
-    if (template->clientCommandName == (String) NULL)
-      return(MakeMenuItem(name, template->wmFunction, funcArgs,
-                         template->mnemonic, template->accelState,
-                         template->accelKeyCode, template->accelText));
-
-    return(MakeMenuItem(template->clientCommandName, template->wmFunction,
-                       funcArgs, template->mnemonic, template->accelState,
-                       template->accelKeyCode, template->accelText));
-}
-
-\f
-/*************************************<->*************************************
- *
- *  MakeClientCommandMenuItem (label, funcArgs)
- * 
- *
- *  Description:
- *  -----------
- *  This function creates and returns a MenuItem structure filled as
- *  appropriate for client command menu items using the given label
- *  and funcArgs. 
- *
- *
- *  Inputs:
- *  ------
- *  label      = the display label for this menu item
- *  funcArgs   = the function arguments to pass to the wm function
- *
- *  Outputs:
- *  -------
- *  Return = pointer to a new MenuItem structure with fields filled
- *           in as per arguments and client command specs
- *
- *
- *  Comments:
- *  --------
- *  This function will fill in a new MenuItem structure as appropriate for
- *  client commands. This function is used when you want to insert a client
- *  command into a menu without using a MenuItem template constructed from
- *  mwmrc.
- * 
- *************************************<->***********************************/
-
-static MenuItem *MakeClientCommandMenuItem (String label, String funcArgs)
-{
-    return(MakeMenuItem(label, F_InvokeCommand, funcArgs,
-                       (KeySym) NULL, (unsigned int)0,
-                       (KeyCode) NULL, (String)NULL));
-}
-
-\f
-/*************************************<->*************************************
- *
- *  PerformClientCommandMatch (clientCommand, menuItem, bestMatchSoFar)
- * 
- *
- *  Description:
- *  -----------
- *  This function determines whether the menuItemCommand specification 
- *  matches the clientCommand.
- *
- *  Inputs:
- *  ------
- *  clientCommand  = the clientCommand that we want to find a specification for
- *  menuItem       = the menu item we will look in for a specification
- *  bestMatchSoFar = the menu item we will return if the given menu item is
- *                  not a match or not a better match
- *
- *  Outputs:
- *  -------
- *  Return = pointer to the given menuItem if it contains a client command
- *          specification and if that specification matches the given
- *          clientCommand *and* if the match is a better match than
- *          the bestMatchSoFar. Otherwise, the bestMatchSoFar is returned,
- *          which could possibly be NULL.
- *
- *  Comments:
- *  --------
- *  If the menuItem does match, it also determines whether it is
- *  a better match than the bestMatchSoFar. If so, the menuItemCommand is
- *  returned. Otherwise, bestMatchSoFar is returned.
- *
- *  Best matching is defined as follows:
- *     1. A specification with fewer wildcards is considered a better
- *        match than one with more wildcards.
- *     2. Given two specifications with the same number of wildcards,
- *        the specification with its wildcards more towards the right
- *        than the left is considered a better match.
- * 
- *************************************<->***********************************/
-
-/* @RGC: This is kind of arbitrary, but I can't imagine there being more
-   than a small number of segments in any given command specification. */
-#define MAXSEGMENTS    100
-
-static MenuItem *PerformClientCommandMatch (String clientCommand,
-                                    MenuItem *menuItem,
-                                    MenuItem *bestMatchSoFar)
-{
-    String menuItemCommand, bestMatchStr;
-    int seglength, i;
-    int segments = 0, wildcards = 0, wildcardPositions[MAXSEGMENTS];
-    int bestSegments = 0, bestWildcards = 0;
-    int bestWildcardPositions[MAXSEGMENTS];
-    Boolean foundWildcard = FALSE;
-
-    if (menuItem == (MenuItem *) NULL)
-      return(bestMatchSoFar);
-    menuItemCommand = menuItem->label;
-    
-    /* Skip any modifier characters at the beginning of the
-       menu items client command. */
-    /* @RGC: This is kind of kludgy. We shouldn't have to know
-       the specifics of command parsing here. */
-    if (menuItemCommand[0] == '~')
-      ++menuItemCommand;
-    else if (menuItemCommand[0] == '=' && menuItemCommand[1] == '>')
-      menuItemCommand += 2;
-    else if (menuItemCommand[0] == '=')
-      ++menuItemCommand;
-    else if (menuItemCommand[0] == '-' && menuItemCommand[1] == '>')
-      menuItemCommand += 2;
-    
-    /* If the menu item doesn't even contain a client command spec,
-       then just return the existing best match. */
-    if (*menuItemCommand != '<') return(bestMatchSoFar);
-    
-    /* Run down the clientCommand and the menuItemCommand together,
-       matching along the way. If matching fails at any point, then
-       return the bestMatchSoFar.  */
-    for (segments = 0;
-        *menuItemCommand != '\0' && *clientCommand != '\0';
-        ++segments)
-    {
-       /* Skip past the '<' at the beginning of the next segment and
-          any whitespace. */
-       ++menuItemCommand; ++clientCommand;
-       while (isspace(*menuItemCommand)) ++menuItemCommand;
-       while (isspace(*clientCommand)) ++clientCommand;
-       
-       /* First check whether the current menuItemCommand segment is
-          a wildcard. */
-       if (*menuItemCommand == '*')
-       {
-           /* Since the menuItemCommand segment is a wildcard, skip
-              it and the current segment of the client command since
-              the wildcard has to match at least one segment in
-              the client command. */
-           wildcardPositions[wildcards++] = segments;
-           ++menuItemCommand;
-           while (isspace(*menuItemCommand)) ++menuItemCommand;
-           while (*clientCommand != '>' && *clientCommand != '\0')
-             ++clientCommand;
-           foundWildcard = TRUE;
-       }
-       else
-       {
-           /* Calculate how long the current segment of the
-              menuItemCommand is */
-           for (seglength = 0;
-                menuItemCommand[seglength] != '>' &&
-                menuItemCommand[seglength] != '\0';
-                ++seglength)
-             /*EMPTY*/;
-           
-           /* If we are pointing at '\0', then this isn't a match */
-           if (menuItemCommand[seglength] == '\0') return(bestMatchSoFar);
-           
-           /* Get rid of trailing white space on the segment. */
-           for (; seglength > 0; --seglength)
-           {
-               if (!isspace(menuItemCommand[seglength - 1]))
-                 break;
-           }
-           
-           /* Now string compare this segment with the clientCommand
-              segment, up to the number of characters in the menu
-              item segment. */
-           if (strncmp(menuItemCommand, clientCommand, seglength) == 0)
-           {
-               /* So far so good. Just make sure clientCommand doesn't
-                  have anything but whitespace after its seglength
-                  character. */
-               clientCommand += seglength;
-               while (isspace(*clientCommand)) ++clientCommand;
-               if (*clientCommand != '>') return(bestMatchSoFar);
-               
-               /* We have a match. Clear the foundWildcard since we
-                  have sync'ed up and keep trying to match. */
-               foundWildcard = FALSE;
-               menuItemCommand += seglength;
-               while (isspace(*menuItemCommand)) ++menuItemCommand;
-           }
-           else if (foundWildcard == FALSE)
-           {
-               /* We didn't match and there wasn't wildcard to 
-                  swallow the discrepancy. Therefore, this is not
-                  a match. */
-               return(bestMatchSoFar);
-           }
-       }
-       
-       /* We finished the current segments, we should be looking at
-          a close bracket and a following period or a close bracket and
-          a following NULL. Skip past the close brackets and optional
-          period. If we don't see those, then this isn't a match. */
-       if (menuItemCommand[0] == '>' && menuItemCommand[1] == '\0' &&
-           clientCommand[0] == '>'   && clientCommand[1] == '\0')
-       {
-           ++menuItemCommand; ++clientCommand;
-       }
-       else if (menuItemCommand[0] == '>' && menuItemCommand[1] == '.' &&
-                clientCommand[0] == '>'   && clientCommand[1] == '.')
-       {       
-           menuItemCommand += 2;
-           clientCommand += 2;
-       }
-       else return(bestMatchSoFar);
-    }
-
-    /* If we terminated the loop because only one of the two commands being
-       compared was empty, then we don't have a complete match. Return the
-       best match so far. */
-    if (*menuItemCommand != '\0' || *clientCommand != '\0')
-      return(bestMatchSoFar);
-    
-    /* So the menuItemCommand must have matched. If the current best
-       match is NULL, then just return the menuItem. Otherwise calculate some
-       matching quality metrics for the bestMatchSoFar and compare them
-       to the menuItemCommand metrics to decide which of the two to
-       return. */
-    if (bestMatchSoFar == (MenuItem *) NULL)
-      return(menuItem);
-    
-    bestMatchStr = bestMatchSoFar->label;
-    
-    /* Skip any modifier characters at the beginning of the
-       best match client command. */
-    /* @RGC: This is kind of kludgy. We shouldn't have to know
-       the specifics of command parsing here. */
-    if (bestMatchStr[0] == '~')
-      ++bestMatchStr;
-    else if (bestMatchStr[0] == '=' && bestMatchStr[1] == '>')
-      bestMatchStr += 2;
-    else if (bestMatchStr[0] == '=')
-      ++bestMatchStr;
-    else if (bestMatchStr[0] == '-' && bestMatchStr[1] == '>')
-      bestMatchStr += 2;
-    
-    /* If the best match  doesn't even contain a client command spec,
-       then just return the new match as the best match. */
-    if (*bestMatchStr != '<') return(menuItem);
-    
-    for (bestSegments = 0;
-        *bestMatchStr != '\0';
-        ++bestSegments)
-    {
-       /* Skip past the '<' at the beginning of the next segment and
-          any whitespace. */
-       ++bestMatchStr;
-       while (isspace(*bestMatchStr)) ++bestMatchStr;
-       
-       /* First check whether the current bestMatchStr segment is
-          a wildcard. @RGC: We are assuming that there is nothing
-          but possible whitespace after the *. */
-       if (*bestMatchStr == '*')
-         bestWildcardPositions[bestWildcards++] = bestSegments;
-       while (*bestMatchStr != '>' && *bestMatchStr != '\0')
-         ++bestMatchStr;
-       
-       /* Check for the closing > and .  or close > and NULL. If they
-          do not both appear then the bestMatch is bad and we should
-          return the menuItem. */
-       if (bestMatchStr[0] == '>' && bestMatchStr[1] == '\0')
-         ++bestMatchStr;
-       else if (bestMatchStr[0] == '>' && bestMatchStr[1] == '.')
-         bestMatchStr += 2;
-       else return(menuItem);
-    }
-    
-    /* Now compare the best match metrics with the menu item metrics to
-       determine who should be returned. */
-    if (bestWildcards != wildcards)
-    {
-       /* Return the menuItem with the fewest wildcards. */
-       return(bestWildcards < wildcards ? bestMatchSoFar : menuItem);
-    }
-    else
-    {
-       /* Find which menu item has the earliest wild card and return
-          the other. */
-       for (i = 0; i < wildcards; ++i)
-         if (wildcardPositions[i] != bestWildcardPositions[i])
-         {
-             return(bestWildcardPositions[i] < wildcardPositions[i] ?
-                    bestMatchSoFar : menuItem);
-         }
-       
-       /* If we got this far, then the two specifications are too
-          close to call. Return bestMatchSoFar. */
-       return(bestMatchSoFar);
-    }
-}
-
-\f
-/*************************************<->*************************************
- *
- *  ExcludeClientCommand (menuSpec, clientCommand)
- * 
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- *  menuSpec      = the menuSpec whose menuItems we want to search through
- *  clientCommand = the clientCommand that we want to find an exclusion for
- *
- *  Outputs:
- *  -------
- *  Return = TRUE if the command must be excluded from the menuSpec.
- *          FALSE if there is no exclusion preventing the insertion.
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-
-static Boolean ExcludeClientCommand (MenuSpec *menuSpec, String clientCommand)
-{
-    MenuItem placeholder;
-    MenuExclusion *curExclusion;
-
-    /* Search for an exclusion that would cause this command to be
-       excluded, if any such exclusion exists. */
-    for (curExclusion = menuSpec->exclusions;
-        curExclusion != (MenuExclusion *) NULL;
-        curExclusion = curExclusion->nextExclusion)
-    {
-       /* We don't have menu items for exclusions so just use a bogus
-          placeholder menu item with the label field set to the string
-          found in the exclusion. */
-       placeholder.label = curExclusion->command_string;
-       
-       /* If we don't get NULL back, then this exclusion matches. */
-       if (PerformClientCommandMatch(clientCommand,
-                                     &placeholder, NULL) != (MenuItem *) NULL)
-       {
-           return(TRUE);
-       }
-    }
-    return(FALSE);
-}
-
-\f
-/*************************************<->*************************************
- *
- *  ForceInLineToCascade (menuSpec, clientCommand, bestMatch)
- * 
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- *  menuSpec      = the menuSpec whose menuItems we want to search through
- *  clientCommand = the clientCommand that we want to find an force for
- *  bestMatch     = the best matching menu item that was found
- *
- *  Outputs:
- *  -------
- *  Return = TRUE if the command set must be cascaded
- *          FALSE if there is no forced cascade 
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-
-static Boolean ForceInLineToCascade (MenuSpec *menuSpec,
-                                    String clientCommand,
-                                    MenuItem **bestMatch)
-{
-    /* First find the best match in the menu spec. */
-    FindClientCommandMatch(menuSpec, clientCommand, bestMatch);
-
-    /* If the best match is not NULL, then check whether it forces
-       the client command to cascade. */
-    if (*bestMatch != (MenuItem *) NULL)
-    {
-       /* If there is a force cascade modifier, then return TRUE. */
-       if ((strncmp((*bestMatch)->label, "->", 2) == 0) ||
-           (strncmp((*bestMatch)->label, "=>", 2) == 0))
-         return(TRUE);
-    }
-
-    /* If the best match is NULL, then return FALSE. We have been
-       given no indication that the inLine command should be forced
-       to cascade. */
-    return(FALSE);
-}
-
-\f
-/*************************************<->*************************************
- *
- *  FindClientCommandMatch (menuSpec, clientCommand, menuItem)
- * 
- *
- *  Description:
- *  -----------
- *  This function searches through the list of menuItems in the given
- *  menuSpec, searching for ones which have a client command specification
- *  and, for each one that does, whether that specification matches the
- *  given client. The best matching menuItem out of all that matched
- *  is returned.
- *
- *  Inputs:
- *  ------
- *  menuSpec      = the menuSpec whose menuItems we want to search through
- *  clientCommand = the clientCommand that we want to find a specification for
- *  menuItem      = the best matching menu item
- *
- *  Outputs:
- *  -------
- *  Return = TRUE if the command may be inserted into the menuSpec.
- *          FALSE if there is an exclusion preventing the insertion.
- *          Also return the best matching menu item in the menuItem
- *          buffer argument. NULL is returned if no matching MenuItem
- *          can be found.
- *
- *  Comments:
- *  --------
- *  Best matching is defined as follows:
- *     1. A specification with fewer wildcards is considered a better
- *        match than one with more wildcards.
- *     2. Given two specifications with the same number of wildcards,
- *        the specification with its wildcards more towards the right
- *        than the left is considered a better match.
- * 
- *************************************<->***********************************/
-
-static Boolean FindClientCommandMatch (MenuSpec *menuSpec,
-                                      String clientCommand,
-                                      MenuItem **menuItem)
-{
-    MenuItem *bestMatch = (MenuItem *) NULL, *curMenuItem, placeholder;
-    MenuItem *bestExclusionItem = (MenuItem *) NULL;
-    MenuExclusion *curExclusion;
-    String    bestExclusionStr = (String) NULL;
-    
-    /* First search for a match in the menu items of the menu spec. */
-    for (curMenuItem = menuSpec->menuItems;
-        curMenuItem != (MenuItem *) NULL;
-        curMenuItem = curMenuItem->nextMenuItem)
-    {
-       bestMatch =
-         PerformClientCommandMatch(clientCommand, curMenuItem, bestMatch);
-    }
-
-    /* Now search for the best exclusion that would cause this match to be
-       excluded, if any such exclusion exists. */
-    for (curExclusion = menuSpec->exclusions;
-        curExclusion != (MenuExclusion *) NULL;
-        curExclusion = curExclusion->nextExclusion)
-    {
-       /* We don't have menu items for exclusions so just use a bogus
-          placeholder menu item with the label field set to the string
-          found in the exclusion. */
-       placeholder.label = curExclusion->command_string;
-
-       /* Find the best exclusion string in the bunch. */
-       bestExclusionItem =
-         PerformClientCommandMatch(clientCommand, &placeholder,
-                                   bestExclusionItem);
-
-       /* Save the best exclusion string since we are going to reuse
-          the placeholder menu item. */
-       if (bestExclusionItem != (MenuItem *) NULL)
-         bestExclusionStr = bestExclusionItem->label;
-    }
-
-    /* Okay, now if we found an exclusion, we need to determine if the
-       exclusion was a better match than the best match that we found.
-       If so, the item is *really* exclude. Otherwise, we return the
-       best match and let the item be included. */
-    placeholder.label = bestExclusionStr;
-    if (bestExclusionStr == (String) NULL ||
-       PerformClientCommandMatch(clientCommand, bestMatch, &placeholder) ==
-       bestMatch)
-    {
-       *menuItem = bestMatch;
-       return(TRUE);
-    }
-    else
-    {
-       *menuItem = NULL;
-       return(FALSE);
-    }
-}
-
-
-\f
-/*************************************<->*************************************
- *
- *  PerformInsertionsOnMatchList (matchlist)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *  Return = 
- *
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-
-static void PerformInsertionsOnMatchList (MatchList **matchlist)
-{
-    MatchList *curmatch;
-    MenuItem *newMenuItem, *curitem;
-    
-    if (*matchlist == (MatchList *) NULL)
-      return;
-
-    if ((*matchlist)->menuspec == (MenuSpec *) NULL)
-      {
-       /* should never get here, but if we do, then we can't
-          continue in this routine since mwm will dump.  This
-          may be caused by the cci code duplicating a global
-          menu for a client when it shouldn't be duplicated.
-          If we skip this routine, the cci command will not
-          be added which is far less disturbing than a dump. */
-       return;
-      }
-       
-    
-    for (curmatch = *matchlist;
-        curmatch != (MatchList *) NULL;
-        curmatch = curmatch->next)
-    {
-      if (curmatch->menuitem != (MenuItem *) NULL)
-       {
-         /* Find this menu item within the menuspec. */
-         for (curitem = curmatch->menuspec->menuItems;
-              curitem != curmatch->menuitem &&
-              curitem != (MenuItem *) NULL;
-              curitem = curitem->nextMenuItem)
-           /*EMPTY*/;
-         
-         /* If we didn't find the menuitem in the menuspec, then
-            don't do this match. */
-         if (curitem == (MenuItem *) NULL) continue;
-         
-         newMenuItem =
-           MakeMenuItemFromTemplate(curmatch->menuitem,
-                                    curmatch->treenode->defaultName,
-                                    curmatch->funcargs);
-         newMenuItem->wmFunction = curmatch->function;
-         newMenuItem->greyedContext = curmatch->greyed_context;
-         newMenuItem->nextMenuItem = curitem->nextMenuItem;
-         newMenuItem->clientCommandID = curmatch->treenode->commandID;
-         curitem->nextMenuItem = newMenuItem;
-       }
-      else
-       {
-         MenuItem *last = (MenuItem *) NULL;
-         
-         if (curmatch->menuspec != NULL)
-           {
-             /* Find the last menu item in the menuspec */
-             for (last = curmatch->menuspec->menuItems;
-                  last != (MenuItem *) NULL &&
-                  last->nextMenuItem != (MenuItem *) NULL;
-                  last = last->nextMenuItem)
-               {
-                 /* If the next item is f.quit and it is the last
-                    item, then stop searching now. We don't want
-                    to insert after a trailing f.kill (i.e. Close). */
-                 if ((last->nextMenuItem->wmFunction == F_Kill) &&
-                     (last->nextMenuItem->nextMenuItem == (MenuItem *) NULL))
-                   break;
-               }
-           }
-         
-         /* Create a new client command menu item */
-         newMenuItem =
-           MakeClientCommandMenuItem
-             (XtNewString(curmatch->treenode->defaultName),
-              XtNewString(curmatch->funcargs));
-         newMenuItem->wmFunction = curmatch->function;
-         newMenuItem->greyedContext = curmatch->greyed_context;
-         newMenuItem->clientCommandID = curmatch->treenode->commandID;
-         
-         /* Insert the new menu item at the end of the list */
-         if (last == (MenuItem *) NULL)
-           {
-             newMenuItem->nextMenuItem = (MenuItem *) NULL;
-             if (curmatch->menuspec != NULL)
-               curmatch->menuspec->menuItems = newMenuItem;
-             else
-               {
-                 /* again, should never get here... */
-                 return;
-               }
-           }
-         else
-           {
-             newMenuItem->nextMenuItem = last->nextMenuItem;
-             last->nextMenuItem = newMenuItem;
-           }
-       }
-    }
-}
-
-\f
-/*************************************<->*************************************
- *
- *  void
- *  DestroyMenuSpecWidgets (menuSpec)
- *
- *
- *  Description:
- *  -----------
- *
- *
- *  Inputs:
- *  ------
- *  menuSpec = pointer to MenuSpec structure
- *
- * 
- *  Outputs:
- *  -------
- *
- *  Comments:
- *  --------
- *  Destroys all the menuspec widgets so that we can rebuild the menu from
- *  scratch.
- * 
- *************************************<->***********************************/
-
-void DestroyMenuSpecWidgets (MenuSpec *menuSpec)
-{
-    /* check for bad input value - shouldn't happen. */
-    if (menuSpec == (MenuSpec *) NULL) return;
-
-    /* Destroy the menu widget */
-    if (menuSpec->menuWidget != (Widget) NULL)
-    {
-      XtDestroyWidget(XtParent(menuSpec->menuWidget));
-      menuSpec->menuWidget = (Widget) NULL;
-    }
-
-    /* Destroy the menu buttons array */
-    if (menuSpec->menuButtonSize != 0)
-    {  
-      XtFree((char *)menuSpec->menuButtons);
-      menuSpec->menuButtons = (MenuButton *) NULL;
-    }
-
-    /* Reset the counters */
-    menuSpec->menuButtonSize = 0;
-    menuSpec->menuButtonCount = 0;
-
-    /* Clear the flag that says we have processed this menu spec for
-       widget creation. (We probably don't need to do this after all
-       since CreateMenuWidgets clears it when done.) */
-    if (menuSpec->currentContext & CR_MENU_MARK)
-      menuSpec->currentContext &= ~(CR_MENU_MARK);
-
-    return;
-}
-
-\f
-/*************************************<->*************************************
- *
- *  void
- *  DestroyMenuSpec (pSD, commandID)
- *
- *
- *  Description:
- *  -----------
- *
- *
- *  Inputs:
- *  ------
- *  pSD        = screen data pointer of screen with command to remove
- *  commandID  = command id of the menuspec to be removed.
- *               if no match is found, then no removal is done.
- * 
- *  Outputs:
- *  -------
- *
- *  Comments:
- *  --------
- *  Destroy the specified menuSpec from the list of menuspecs on the
- *  specified screen. Note, there may be more than one copy of the
- *  spec floating around since duplications may have been done for
- *  some clients.
- * 
- *************************************<->***********************************/
-
-void DestroyMenuSpec (WmScreenData *pSD, CARD32 commandID)
-{
-    MenuSpec *msToKill = NULL, *pMS;
-    ClientListEntry *curClient;
-
-    /* Scan through global menu specs. */
-    if (pSD != NULL  &&  pSD->menuSpecs != NULL  &&  commandID != 0)
-      {
-       /* Scan through the list of menuSpecs and pull the mathing one
-        * out of the list.
-        */
-       if (commandID == pSD->menuSpecs->commandID)
-         {
-           /* match at head of menuSpec list. */
-           msToKill = pSD->menuSpecs;
-           pSD->menuSpecs = pSD->menuSpecs->nextMenuSpec;
-           msToKill->nextMenuSpec = NULL;
-         }
-       else
-         {
-           for (pMS = pSD->menuSpecs;
-                (pMS->nextMenuSpec != NULL &&
-                 pMS->nextMenuSpec->commandID != commandID);
-                pMS = pMS->nextMenuSpec)
-             ;
-
-           if (pMS->nextMenuSpec != NULL)
-             {
-               msToKill = pMS->nextMenuSpec;
-               pMS->nextMenuSpec = msToKill->nextMenuSpec;
-               msToKill->nextMenuSpec = NULL;
-             }
-         }
-
-       /* found it - now remove the menuSpec. */
-       if (msToKill != NULL)
-         FreeCustomMenuSpec(msToKill);
-      }
-
-
-    /* Check each client's menu spec list.  Stop searching if global. */
-    for (curClient = pSD->clientList;
-        curClient != (ClientListEntry *)NULL;
-        curClient = curClient->nextSibling)
-      {
-       /*
-        * Check the first position.
-        * If matched, then we're done with this client.
-        */
-       if (commandID == pSD->menuSpecs->commandID)
-         {
-           msToKill = curClient->pCD->systemMenuSpec;
-           curClient->pCD->systemMenuSpec = msToKill->nextMenuSpec;
-           msToKill->nextMenuSpec = NULL;
-         }
-
-       /* Check the rest of the list. */
-       else
-         {
-           for (pMS = curClient->pCD->systemMenuSpec;
-                (pMS->nextMenuSpec != (MenuSpec *)NULL)     &&
-                (pMS->nextMenuSpec->commandID != commandID) &&
-                pMS->clientLocal;
-                pMS = pMS->nextMenuSpec)
-             ;
-
-           if ((pMS->nextMenuSpec != (MenuSpec *)NULL)      &&
-               (pMS->nextMenuSpec->commandID != commandID))
-             {
-               msToKill = pMS->nextMenuSpec;
-               pMS->nextMenuSpec = msToKill->nextMenuSpec;
-               msToKill->nextMenuSpec = NULL;
-             }
-           else
-             msToKill = NULL;
-         }
-
-       if (msToKill != NULL)
-         FreeCustomMenuSpec(msToKill);
-      }
-
-    return;
-}
-
-\f
-/*************************************<->*************************************
- *
- *  ReplaceMenuSpecForClient (menuspec, pCD)
- *
- *
- *  Description:
- *  -----------
- *  Duplicates the given menuspec and replaces the given menuspec if
- *  found in the clients menuspec list with the duplicate.
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *  Return = the duplicate menuspec
- *
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-
-static MenuSpec *ReplaceMenuSpecForClient (MenuSpec *menuSpec, ClientData *pCD)
-{
-    MenuSpec *newMenuSpec, *curMenuSpec;
-
-    /* Duplicate the menu spec */
-    newMenuSpec = DuplicateMenuSpec(menuSpec);
-    
-    /* Try to find this menuspec in the list of client
-       menuspecs. If we find it then we want to replace it with
-       the new one. */
-    if (pCD->systemMenuSpec == menuSpec)
-    {
-       /* It was the head of the list. We need to handle that
-          a little special */
-       newMenuSpec->nextMenuSpec = pCD->systemMenuSpec->nextMenuSpec;
-       pCD->systemMenuSpec = newMenuSpec;
-    }
-    else
-    {
-       /* Search through the list until we find the menuspec or
-          the end of the list. */
-       for (curMenuSpec = pCD->systemMenuSpec;
-            curMenuSpec->nextMenuSpec != (MenuSpec *) NULL;
-            curMenuSpec = curMenuSpec->nextMenuSpec)
-       {
-           if (curMenuSpec->nextMenuSpec == menuSpec)
-           {
-               newMenuSpec->nextMenuSpec =
-                 curMenuSpec->nextMenuSpec->nextMenuSpec;
-               curMenuSpec->nextMenuSpec = newMenuSpec;
-               /* We found it and replaced it. Now get out of
-                  the loop. */
-               break;
-           }
-       }
-       if (curMenuSpec->nextMenuSpec == (MenuSpec *) NULL)
-       {
-           /* We didn't find it. Just stick it at the end? We
-              should have found it. I'm not sure how to handle
-              this. */
-           curMenuSpec->nextMenuSpec = newMenuSpec;
-           newMenuSpec = (MenuSpec *) NULL;
-       }
-    }
-
-    return(newMenuSpec);
-}
-
-\f
-/*************************************<->*************************************
- *
- *  FindLastMenuSpecToModify (menuspec, command_id)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *  Return = the last menu spec that would be affected by modifications
- *          to the given command id
- *
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-
-static MenuSpec * FindLastMenuSpecToModify(MenuSpec *menuSpec,
-                                          CARD32 command_id)
-{
-    MenuSpec *curMenuSpec, *lastToModify = (MenuSpec *) NULL;
-    MenuItem *curItem;
-
-    /* Search through all the menu specs in the list starting with
-       the passed in menuSpec */
-    for (curMenuSpec = menuSpec;
-        curMenuSpec != (MenuSpec *) NULL;
-        curMenuSpec = curMenuSpec->nextMenuSpec)
-    {
-       /* Try to find a menu item in this menu spec with the
-          command_id that will require modification */
-       for (curItem = curMenuSpec->menuItems;
-            curItem != (MenuItem *) NULL;
-            curItem = curItem->nextMenuItem)
-       {
-           if (curItem->clientCommandID == command_id)
-             break;
-       }
-
-       /* If we found a menu item that needs changing, then this
-          menu spec will need changing. Set the lastToModify to
-          point to this menu spec. If we find no other menu spec
-          that needs changing, then this will be the last one
-          in the list that needs changing. */
-       if (curItem != (MenuItem *) NULL)
-         lastToModify = curMenuSpec;
-    }
-
-    /* We've looked through all the menu specs starting with menuSpec
-       and we've looked at all the menu items in all of those menu
-       specs. The lastToModify variable should be set to the last
-       menu spec we saw that needed modification. Return it. */
-    return(lastToModify);
-}
-
-\f
-/*************************************<->*************************************
- *
- *  RecreateMenuWidgets (matchlist)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *  Return = 
- *
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-
-static void RecreateMenuWidgets (WmScreenData *pSD, ClientData *pCD,
-                                MatchList **matchlist)
-{
-    MatchList *current;
-    int count = 0, i;
-    MenuSpec **to_change;
-
-    /* First count how many menu specs we need to recreate widgets for */
-    for (current = *matchlist;
-        current != (MatchList *) NULL;
-        current = current->next)
-      ++count;
-
-    /* If there are no affected menuspecs, then just return. */
-    if (count == 0) return;
-
-    /* Allocate an array of menuspec pointers that is the size of the
-       number of menu specs we need to recreate widgets for */
-    to_change = (MenuSpec **)XtMalloc(sizeof(MenuSpec *) * count);
-    for (i = 0; i < count; ++i)
-      to_change[i] = (MenuSpec *) NULL;
-
-    /* Now run through all the matchlist items, storing menuspecs in
-       that array. If the menuspec is already there, then don't store
-       it again. */
-    for (current = *matchlist;
-        current != (MatchList *) NULL;
-        current = current->next)
-    {
-      for (i = 0; i < count; ++i)
-      {
-       if (to_change[i] == current->menuspec) break;
-       else if (to_change[i] == (MenuSpec *) NULL)
-       {
-         to_change[i] = current->menuspec;
-         break;
-       }
-      }
-    }
-
-    /* Run through the array, destroy all existing widgets for each
-       menuspec */
-    for (i = 0; i < count && to_change[i] != (MenuSpec *) NULL ; ++i)
-    {
-       DestroyMenuSpecWidgets(to_change[i]);
-    }
-
-    /* Run through the array again creating widgets for all the menuspecs */
-    for (i = 0; i < count && to_change[i] != (MenuSpec *) NULL; ++i)
-    {
-       to_change[i]->menuWidget =
-         CreateMenuWidget (pSD, pCD, to_change[i]->name, pSD->screenTopLevelW,
-                           TRUE, to_change[i], NULL);
-    }
-
-    /* Free the array. We're done. */
-    XtFree((char *) to_change);
-}
-
-\f
-/*************************************<->*************************************
- *
- *  FreeMatchList (matchlist)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *  Return = 
- *
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-
-static void FreeMatchList (MatchList **matchlist)
-{
-    MatchList *current, *next;
-
-    current = *matchlist;
-       
-    while (current != (MatchList *) NULL)
-    {
-       next = current->next;
-       XtFree(current->command_string);
-       XtFree(current->funcargs);
-       XtFree((char *)current);
-       current = next;
-    }
-
-    *matchlist = (MatchList *) NULL;
-}
-
-\f
-/*************************************<->*************************************
- *
- *  StoreMatchedCommand (matchlist, menuSpec, menuItem, command_string,
- *                      treenode, function, funcargs)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *  Return = 
- *
- *
- *  Comments:
- *  --------
- *  If the existing match has NULL for the menuitem, then get rid of
- *  it and replace with proposed match.
- * 
- *************************************<->***********************************/
-
-static void StoreMatchedCommand (MatchList **matchlist, MenuSpec *menuSpec,
-                                MenuItem *menuItem, String command_string,
-                                CmdTree *treenode, WmFunction function,
-                                String funcargs, Context greyed_context)
-{
-    MatchList *current, *new;
-    
-    /* If this entry does not already exist in the match list, then insert
-       it. This implies that we first have to perform a search of the list.
-       The search is very easy. We can simply compare the tuple of
-       <menuSpec,command_string> with each entry in the matchlist
-       to see if we already have that tuple stored. We can do straight
-       pointer value matching for the menuSpec and strcmp for the
-       command_string */
-    for (current = *matchlist;
-        current != (MatchList *) NULL;
-        current = current->next)
-    {
-       if (current->menuspec == menuSpec &&
-           strcmp(current->command_string, command_string) == 0)
-       {
-           /* If the currently stored menu item is NULL,
-              then replace with the new menuitem and return. */
-           if (current->menuitem == (MenuItem *) NULL)
-           {
-               current->menuitem = menuItem;
-               return;
-           }
-           /* Otherwise, we have alreay inserted this
-              command into this menuspec so don't allow
-              another insertion. */
-           else return;
-       }
-    }
-    
-    /* Well, we didn't find a match, so store the entry */
-    new = (MatchList *)XtMalloc(sizeof(MatchList));
-    new->menuspec = menuSpec;
-    new->menuitem = menuItem;
-    new->command_string = XtNewString(command_string);
-    new->treenode = treenode;
-    new->function = function;
-    new->funcargs = XtNewString(funcargs);
-    new->greyed_context = greyed_context;
-    new->next = (MatchList *) NULL;
-    
-    /* Stick it at the head of the list. It's easier. */
-    new->next = *matchlist;
-    *matchlist = new;
-}
-
-\f
-/*************************************<->*************************************
- *
- *  SearchForOtherMatches (pSD, pCD, treenode,
- *                        client_match_list, global_match_list,
- *                        menuSpec, command_string, 
- *                        function, funcargs, duplicate_globals, selection,
- *                        greyed_context)
- *
- *
- *  Description:
- *  -----------
- *  menuSpec = menu spec to exclude from search
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *  Return = 
- *
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-
-static void SearchForOtherMatches (WmScreenData *pSD, ClientData *pCD,
-                                  CmdTree *treenode,
-                                  MatchList **client_match_list,
-                                  MatchList **global_match_list,
-                                  MenuSpec *menuSpec, String command_string,
-                                  WmFunction function, String funcargs,
-                                  Boolean duplicate_globals, Atom selection,
-                                  Context greyed_context, Boolean inLine)
-{
-    MenuSpec *current, *newMenuSpec;
-    MenuItem *match;
-
-    /* Search through all of the clients menuspecs first */
-    for (current = (pCD == NULL ? NULL : pCD->systemMenuSpec);
-        current != (MenuSpec *) NULL;
-        current = current->nextMenuSpec)
-    {
-       /* If the current menu spec is a global, then just quit
-          this loop. Any menu specs from this point on will
-          have a next pointer that is still in the global list. */
-       if (menuSpec->clientLocal != TRUE)  break;
-        FindClientCommandMatch(current, command_string, &match);
-       if (match != (MenuItem *) NULL)
-       {
-           if (treenode->subTrees != (CmdTree *) NULL && inLine &&
-               (strncmp(match->label, "->", 2) == 0 ||
-                strncmp(match->label, "=>", 2) == 0))
-           {
-               CmdTree *tree;
-               for (tree = treenode->subTrees;
-                    tree != (CmdTree *) NULL;
-                    tree = tree->next)
-               {
-                   char new_command_str[1024];
-                   char new_funcargs[1024];
-                   WmFunction inLine_function;
-
-                   if (command_string == NULL)
-                     sprintf(new_command_str, "<%s>", tree->name);
-                   else
-                     sprintf(new_command_str, "%s.<%s>", command_string,
-                             tree->name);
-                   if (tree->subTrees != (CmdTree *) NULL)
-                   {
-                       /* menu to cascade to */
-                       sprintf(new_funcargs, "<%s>", tree->name);
-                       inLine_function = F_Menu;
-                   }
-                   else
-                   {
-                       sprintf(new_funcargs, "%d %ld %ld", tree->commandID,
-                               pCD->client, selection);
-                       inLine_function = F_InvokeCommand;
-                   }
-                   StoreMatchedCommand(client_match_list, current, match,
-                                       new_command_str, tree,
-                                       inLine_function, new_funcargs,
-                                       greyed_context);
-               }
-           }
-           else
-           {
-               StoreMatchedCommand(client_match_list, current, match,
-                                   command_string, treenode, function,
-                                   funcargs, greyed_context);
-           }
-       }
-    }
-
-    /* Search through all of the global menuspecs also. */
-    for (current = pSD->menuSpecs;
-        current != (MenuSpec *) NULL;
-        current = current->nextMenuSpec)
-    {
-        FindClientCommandMatch(current, command_string, &match);
-       if (match != (MenuItem *) NULL)
-       {
-           if (duplicate_globals == TRUE)
-           {
-               /* Create a duplicate of the current menuspec and
-                  store that away in the client instead of the current
-                  menuspec. */
-               newMenuSpec = ReplaceMenuSpecForClient(current, pCD);
-
-               /* Now store enough information so that we can actually
-                  create the insertion later. */
-               StoreMatchedCommand(client_match_list, newMenuSpec, NULL,
-                                   command_string, treenode, function,
-                                   funcargs, greyed_context);
-           }
-           else /* Change global menu */
-           {
-               StoreMatchedCommand(global_match_list, current, match,
-                                   command_string, treenode, function,
-                                   funcargs, greyed_context);
-           }
-       }
-    }
-}
-
-\f
-/*************************************<->*************************************
- *
- *  InsertTreeOnClient (pSD, pCD, tree, client_match_list, global_match_list,
- *                     menuSpec, templateMenuItem, command_so_far,
- *                     duplicate_globals, selection, greyed_context, inLine)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *  Return = 
- *
- *
- *  Comments:
- *  --------
- *  If duplicate_globals is TRUE, then pCD cannot be NULL.
- * 
- *************************************<->***********************************/
-
-static void InsertTreeOnClient (WmScreenData *pSD, ClientData *pCD,
-                               CmdTree *tree,
-                               MatchList **client_match_list,
-                               MatchList **global_match_list,
-                               MenuSpec *menuSpec, MenuItem *template,
-                               String command_so_far,
-                               Boolean duplicate_globals, Atom selection,
-                               Context greyed_context, Boolean inLine)
-{
-    String new_command_str;
-    int length;
-    char funcarg_buf[256];
-    MenuSpec *newMenuSpec, *last, *dupMenuSpec;
-    CmdTree *subtree;
-    MenuItem *bestMatch = (MenuItem *) NULL;
-
-    /* If the menuSpec we were given is NULL, then just return. We need to
-       at least have a starting menuSpec. */
-    if (menuSpec == (MenuSpec *) NULL)
-      return;
-
-    /* If we want global menus duplicated for a client, then the pCD
-       had better not be NULL. */
-    if (duplicate_globals && pCD == (ClientData *) NULL)
-      return;
-
-    while (tree != (CmdTree *) NULL)
-    {
-       /* The "4" below is to allow for brackets to surround the
-          tree->name, the period to separate it from the command
-          so far and a NULL. */
-       length = (command_so_far != NULL ? strlen(command_so_far) : 0) + 
-                (tree->name != NULL ? strlen(tree->name) : 0) + 4;
-       new_command_str = XtMalloc(sizeof(unsigned char) * length);
-       if (command_so_far != (String) NULL)
-         sprintf(new_command_str, "%s.<%s>", command_so_far, tree->name);
-       else
-         sprintf(new_command_str, "<%s>", tree->name);
-
-       /* If there is an exclusion preventing this command from being 
-          inserted, then just continue the loop. @RGC: This is wrong.
-          We still want to search for other matches if there is an
-          exclusion. We just don't want to allow one of those other
-          matches to be this menuSpec. */
-       if (ExcludeClientCommand(menuSpec, new_command_str))
-       {
-           tree = tree->next;
-           XtFree(new_command_str);
-           continue;
-       }
-
-       /* If tree is a command set and the inLine flag is TRUE then
-        * we need to insert the command sets commands in the current
-        * menu spec instead of creating a cascade.
-        */
-       if (tree->subTrees != (CmdTree *) NULL && inLine == TRUE &&
-           ForceInLineToCascade(menuSpec, new_command_str,
-                                &bestMatch) == FALSE)
-       {
-           /* Recursively process subtrees */
-           for (subtree = tree->subTrees;
-                subtree != (CmdTree *) NULL;
-                subtree = subtree->next)
-           {
-               /* Pass along the bestMatch. If it is a valid menu item
-                  then we want the insertion to occur at that menuitem
-                  instead of at the end of the menu. */
-               InsertTreeOnClient(pSD, pCD, subtree, client_match_list,
-                                  global_match_list, menuSpec, bestMatch,
-                                  new_command_str, duplicate_globals,
-                                  selection, greyed_context, inLine);
-           }
-           /* We don't want to search for other matches because we
-              want the items to be inserted inLine. Any other matches
-              will be found in the recursive calls. (??? or am I wrong?) */
-       }
-       /* If tree is a command set then we need to create a new
-          menuSpec. */
-       else if (tree->subTrees != (CmdTree *) NULL)
-       {
-           /* Create the name of the menu for the f.menu command. */
-           sprintf(funcarg_buf, "<%s>", tree->name);
-
-           /* Store the cascade button information so it can be
-              created later. */
-           StoreMatchedCommand(
-              (menuSpec->clientLocal ? client_match_list : global_match_list),
-              menuSpec, template, new_command_str, tree, F_Menu, funcarg_buf,
-              greyed_context);
-
-           /* We need to create a menu spec for the menu that this cascade
-              button will cascade to. Try to find one in the clients menu
-              spec list, stopping the first time we hit a global menu. If we
-              can't find one there and if we are *not* supposed to duplicate
-              globals, then try to find it in the global list. In all other
-              cases, create a new one using the funcarg_buf that we created
-              above as the name of the menuspec. */
-           for (newMenuSpec = (pCD == NULL ? NULL : pCD->systemMenuSpec);
-                newMenuSpec != (MenuSpec *) NULL;
-                newMenuSpec = newMenuSpec->nextMenuSpec)
-           {
-               if (newMenuSpec->clientLocal == FALSE)
-               {
-                   newMenuSpec = (MenuSpec *) NULL;
-                   break;
-               }
-               if (strcmp(newMenuSpec->name, funcarg_buf) == 0)
-                 break;
-           }
-
-           /* If we didn't find it in the client list, maybe we should
-              look in the global list. */
-           if (newMenuSpec == (MenuSpec *) NULL && duplicate_globals == FALSE)
-           {
-               for (newMenuSpec = pSD->menuSpecs;
-                    newMenuSpec != (MenuSpec *) NULL;
-                    newMenuSpec = newMenuSpec->nextMenuSpec)
-               {
-                   if (strcmp(newMenuSpec->name, funcarg_buf) == 0)
-                     break;
-               }
-           }
-
-           /* If we still don't have a menu spec, then create a new one. */
-           if (newMenuSpec == (MenuSpec *) NULL)
-           {
-               newMenuSpec = MakeMenuSpec(funcarg_buf,
-                                          tree == NULL ? (CARD32)NULL
-                                                       : tree->commandID);
-               if (duplicate_globals) newMenuSpec->clientLocal = TRUE;
-               else                   newMenuSpec->clientLocal = FALSE;
-
-               /* If we are duplicating globals, then add the new menu spec
-                  to the client list. Otherwise add it to the global list. */
-               if (duplicate_globals)
-                 last = pCD->systemMenuSpec;
-               else
-                 last = pSD->menuSpecs;
-
-               /* Find the last menu spec in the list. */
-               while (last != (MenuSpec *) NULL &&
-                      last->nextMenuSpec != (MenuSpec *) NULL)
-                 last = last->nextMenuSpec;
-
-               /* Put the new menu spec at the end of the list. */
-               if (last == (MenuSpec *) NULL)
-               {
-                   if (duplicate_globals)
-                     pCD->systemMenuSpec = newMenuSpec;
-                   else
-                     pSD->menuSpecs = newMenuSpec;
-               }
-               else last->nextMenuSpec = newMenuSpec;
-           }
-
-           /* Recursively process subtrees */
-           for (subtree = tree->subTrees;
-                subtree != (CmdTree *) NULL;
-                subtree = subtree->next)
-           {
-               InsertTreeOnClient(pSD, pCD, subtree, client_match_list,
-                                  global_match_list, newMenuSpec, NULL,
-                                  new_command_str, duplicate_globals,
-                                  selection, greyed_context, inLine);
-           }
-
-           /* Search for any other matches in the existing menu specs
-              for this command, excluding newMenuSpec. */
-           SearchForOtherMatches(pSD, pCD, tree,
-                                 client_match_list, global_match_list,
-                                 newMenuSpec, new_command_str,
-                                 F_Menu, funcarg_buf,
-                                 duplicate_globals, selection,
-                                 greyed_context, inLine);
-           
-       }
-       else /* the tree is a simple command */
-       {
-           /* Store away the push button information so it can be 
-              created later. */
-           sprintf(funcarg_buf, "%d %ld %ld", tree->commandID, 
-                   (pCD == NULL ? None : pCD->client), selection);
-
-           /* If the menuSpec is global and we are supposed to be
-              duplicating global menu specs, then create a duplicate
-              and replace the menuspec with the duplicate for this
-              client. */
-           if (duplicate_globals)
-             dupMenuSpec = ReplaceMenuSpecForClient(menuSpec, pCD);
-           else
-             dupMenuSpec = menuSpec;
-
-           /* Now store the match away in the appropriate match list */
-           StoreMatchedCommand((dupMenuSpec->clientLocal ?
-                                client_match_list : global_match_list),
-                               dupMenuSpec, template, new_command_str, tree,
-                               F_InvokeCommand, funcarg_buf, greyed_context);
-
-           /* Search for any other matches in the existing menu specs
-              for this command, excluding newMenuSpec. */
-           
-           SearchForOtherMatches(pSD, pCD, tree,
-                                 client_match_list, global_match_list,
-                                 dupMenuSpec, new_command_str,
-                                 F_InvokeCommand, funcarg_buf,
-                                 FALSE, /* Don't duplicate globals not associated
-                                           with this pCD. CR 9623 */
-                                 selection,
-                                 greyed_context, inLine);
-       }
-
-       /* Move on to the next tree item at this level */
-       tree = tree->next;
-       XtFree(new_command_str);
-    }
-}
-
-\f
-/*************************************<->*************************************
- *
- *  InsertTreeOnAllClients (pSD, tree, selection, active_context, inLine)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- *  pSD       = per screen data
- *  tree      = command tree
- *  selection = owned by inserting client
- * 
- *  Outputs:
- *  -------
- *  Return = 
- *
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-void InsertTreeOnAllClients (WmScreenData *pSD, CmdTree *tree, Atom selection,
-                            Context active_context, Boolean inLine)
-{
-    ClientListEntry *current;
-    MatchList *global_matchlist = (MatchList *) NULL;
-    MatchList *client_matchlist = (MatchList *) NULL;
-    Context greyed_context = F_CONTEXT_ALL;
-
-    /* If there aren't any clients, then there's nothing to do. */
-    if (pSD->clientList == (ClientListEntry *) NULL)
-      return;
-
-    /* Setup the greyed context based on the active context */
-    if (active_context & F_CONTEXT_WINDOW)
-      greyed_context &= ~(F_CONTEXT_WINDOW);
-    if (active_context & F_CONTEXT_ICON)
-      greyed_context &= ~(F_CONTEXT_ICON);
-
-    for (current = pSD->clientList;
-        current != (ClientListEntry *) NULL;
-        current = current->nextSibling)
-    {
-       /* Ignore client list entries for icons. */
-       if (current->type == MINIMIZED_STATE)
-         continue;
-       InsertTreeOnClient(pSD, current->pCD, tree, &client_matchlist,
-                          &global_matchlist, current->pCD->systemMenuSpec,
-                          NULL, NULL, FALSE, 
-                          selection, greyed_context, inLine);
-       PerformInsertionsOnMatchList(&client_matchlist);
-       RecreateMenuWidgets(pSD, current->pCD, &client_matchlist);
-        FreeMatchList(&client_matchlist);
-    }
-    PerformInsertionsOnMatchList(&global_matchlist);
-    RecreateMenuWidgets(pSD, NULL /* no pcd */, &global_matchlist);
-    FreeMatchList(&global_matchlist);
-}
-
-\f
-/*************************************<->*************************************
- *
- *  InsertTreeOnSingleClient (pSD, pCD, tree, selection, inLine)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- *  pSD       = per screen data
- *  tree      = command tree
- *  selection = owned by inserting client
- *
- * 
- *  Outputs:
- *  -------
- *  Return = 
- *
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-void InsertTreeOnSingleClient (WmScreenData *pSD, ClientData *pCD,
-                              CmdTree *tree, Atom selection,
-                              Context active_context, Boolean inLine)
-{
-    MatchList *global_matchlist = (MatchList *) NULL;
-    MatchList *client_matchlist = (MatchList *) NULL;
-    Context greyed_context = F_CONTEXT_ALL;
-
-    /* A quick sanity check */
-    if (pCD == (ClientData *) NULL)
-      return;
-
-    /* Setup the greyed context based on the active context */
-    if (active_context & F_CONTEXT_WINDOW)
-      greyed_context &= ~(F_CONTEXT_WINDOW);
-    if (active_context & F_CONTEXT_ICON)
-      greyed_context &= ~(F_CONTEXT_ICON);
-
-    InsertTreeOnClient(pSD, pCD, tree, &client_matchlist,
-                      &global_matchlist, pCD->systemMenuSpec,
-                      NULL, NULL, TRUE, selection, greyed_context, inLine);
-    PerformInsertionsOnMatchList(&client_matchlist);
-    RecreateMenuWidgets(pSD, pCD, &client_matchlist);
-    FreeMatchList(&client_matchlist);
-}
-
-\f
-/*************************************<->*************************************
- *
- *  InsertTreeOnRootMenu (pSD, tree, selection, active_context, inLine)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- *  pSD       = per screen data
- *  tree      = command tree
- *  selection = owned by inserting client
- *
- * 
- *  Outputs:
- *  -------
- *  Return = 
- *
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-void InsertTreeOnRootMenu (WmScreenData *pSD, CmdTree *tree, Atom selection,
-                          Boolean inLine)
-{
-    MatchList *global_matchlist = (MatchList *) NULL;
-    MatchList *client_matchlist = (MatchList *) NULL;
-    Context greyed_context = F_CONTEXT_WINDOW | F_CONTEXT_ICON;
-    MenuSpec *rootMenu;
-
-    /* Find the root menu spec */
-    for (rootMenu = pSD->menuSpecs;
-        rootMenu != (MenuSpec *) NULL;
-        rootMenu = rootMenu->nextMenuSpec)
-    {
-       if (strcmp(rootMenu->name, pSD->rootMenu) == 0)
-         break;
-    }
-    
-    /* If we couldn't find the root menu, then do nothing. */
-    if (rootMenu == (MenuSpec *) NULL) return;
-    
-    InsertTreeOnClient(pSD, NULL, tree, &client_matchlist,
-                      &global_matchlist, rootMenu,
-                      NULL, NULL, FALSE, selection, greyed_context, inLine);
-    PerformInsertionsOnMatchList(&client_matchlist);
-    RecreateMenuWidgets(pSD, NULL, &client_matchlist);
-    FreeMatchList(&client_matchlist);
-    PerformInsertionsOnMatchList(&global_matchlist);
-    RecreateMenuWidgets(pSD, NULL, &global_matchlist);
-    FreeMatchList(&global_matchlist);
-}
-
-\f
-/*************************************<->*************************************
- *
- *  RemoveClientCommandFromMenuSpec (menuSpec, id)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-static Boolean RemoveClientCommandFromMenuSpec (MenuSpec *menuSpec,
-                                               CARD32 id)
-{
-    MenuItem *curMenuItem, *prevMenuItem = (MenuItem *) NULL;
-    MenuItem *tmpMenuItem;
-    Boolean was_changed = FALSE;
-
-    curMenuItem = menuSpec->menuItems;
-    while (curMenuItem != (MenuItem *) NULL)
-    {
-       if (curMenuItem->clientCommandID == id)
-       {
-           tmpMenuItem = curMenuItem;
-           curMenuItem = curMenuItem->nextMenuItem;
-           if (prevMenuItem == (MenuItem *) NULL)
-               menuSpec->menuItems = tmpMenuItem->nextMenuItem;
-           else
-               prevMenuItem->nextMenuItem = tmpMenuItem->nextMenuItem;
-           FreeMenuItem(tmpMenuItem);
-           was_changed = TRUE;
-       }
-       else
-       {
-           prevMenuItem = curMenuItem;
-           curMenuItem = curMenuItem->nextMenuItem;
-       }
-    }
-    return(was_changed);
-}
-
-\f
-/*************************************<->*************************************
- *
- *  ModifyClientCommandForMenuSpec (menuSpec, id, modifier, context, newname)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-static Boolean ModifyClientCommandForMenuSpec (MenuSpec *menuSpec,
-                                              CARD32 id,
-                                              CmdModifier modifier,
-                                              Context context,
-                                              String newname)
-{
-    MenuItem *curMenuItem;
-    Boolean was_changed = FALSE;
-    int i, freebutton, buttoncount;
-
-    /* If the menuspec doesn't have any buttons or a valid menu widget
-       then we don't want to search it. */
-    if (menuSpec->menuWidget == (Widget) NULL ||
-       menuSpec->menuButtons == (MenuButton *) NULL ||
-       menuSpec->menuButtonCount == 0)
-      return(FALSE);
-
-    /* Search through all the menu buttons of the menuspec for buttons
-       which match the command ID to be removed. */
-    for (i = 0; i < menuSpec->menuButtonCount; ++i)
-    {
-       curMenuItem = menuSpec->menuButtons[i].menuItem;
-
-       if ((curMenuItem->clientCommandID == id) &&
-           (curMenuItem->wmFunction == F_InvokeCommand))
-       {
-           switch(modifier)
-           {
-             case ENABLE:
-               /* "context" is an active context */
-               curMenuItem->greyedContext &= ~(context);
-               /* Adjust the pushbutton to the state it would have had
-                  given the last posting context. */
-               if (menuSpec->currentContext & curMenuItem->greyedContext)
-                 XtSetSensitive(menuSpec->menuButtons[i].buttonWidget,
-                                FALSE);
-               else
-                 XtSetSensitive(menuSpec->menuButtons[i].buttonWidget,
-                                TRUE);
-               break;
-             case DISABLE:
-               /* "context" is a greyed context */
-               curMenuItem->greyedContext |= context;
-               /* Adjust the pushbutton to the state it would have had
-                  given the last posting context. */
-               if (menuSpec->currentContext & curMenuItem->greyedContext)
-                 XtSetSensitive(menuSpec->menuButtons[i].buttonWidget,
-                                FALSE);
-               else
-                 XtSetSensitive(menuSpec->menuButtons[i].buttonWidget,
-                                TRUE);
-               break;
-             case RENAME:
-               if (newname != NULL && *newname != '\0')
-               {
-                 /* When renaming a command, we shouldn't cause the
-                  * entire menu to be recreated.  Recreating the menu
-                  * will cause problems with tearoffs since the menu
-                  * will disappear when it is destroyed. CR 9719
-                  */
-                 XmString labelString;
-
-                 /* Change the label of the menu item */
-                 XtFree(curMenuItem->label);
-                 /* Give the menu item the new name */
-                 curMenuItem->label = XtNewString(newname);
-                 was_changed = False;  /*  all taken care of here. */
-                 
-                 /* This is needed when changing the label since
-                  * mwm will wait for a geometry reply from itself which
-                  * it can never service. CR 9719
-                  */
-                 XtVaSetValues(XtParent(XtParent(menuSpec->menuButtons[i].buttonWidget)),
-                               XmNuseAsyncGeometry, TRUE, NULL);
-
-                 labelString = XmStringGenerate(curMenuItem->label,
-                                                XmFONTLIST_DEFAULT_TAG, 
-                                                XmCHARSET_TEXT, NULL);
-                 XtVaSetValues(menuSpec->menuButtons[i].buttonWidget,
-                               XmNlabelString, labelString,
-                               NULL);
-                 XmStringFree(labelString);
-               }
-               break;
-             case REMOVE:
-               XtDestroyWidget(menuSpec->menuButtons[i].buttonWidget);
-               menuSpec->menuButtons[i].managed = FALSE;
-               menuSpec->menuButtons[i].menuItem = (MenuItem *) NULL;
-               menuSpec->menuButtons[i].buttonWidget = (Widget) NULL;
-               break;
-           }
-       }
-    }
-
-    /* If we are being asked to remove a client command, then we need
-     * to search through all the menu items as well as the buttons.
-     * Do the menu items here.
-     */
-    if (modifier == REMOVE)
-       was_changed = RemoveClientCommandFromMenuSpec(menuSpec, id);
-
-    /* Compact the menu buttons array. */
-    buttoncount = menuSpec->menuButtonCount;
-    freebutton = 0;
-    for (i = 0; i < buttoncount; ++i)
-    {
-       if (menuSpec->menuButtons[i].buttonWidget == (Widget) NULL)
-           --menuSpec->menuButtonCount;
-       else
-       {
-           menuSpec->menuButtons[freebutton].menuItem = 
-             menuSpec->menuButtons[i].menuItem;
-           menuSpec->menuButtons[freebutton].buttonWidget = 
-             menuSpec->menuButtons[i].buttonWidget;
-           menuSpec->menuButtons[freebutton].managed =
-             menuSpec->menuButtons[i].managed;
-           ++freebutton;
+           if (XtIsManaged((Widget)children[wPos -1]))
+           {
+               XtUnmanageChild((Widget)children[wPos -1]);
+           }
        }
     }
-    return(was_changed);
-}
 
-\f
+} /* END OF FUNCTION CheckTerminalSeparator */
+
+
 /*************************************<->*************************************
  *
- *  ModifyClientCommandID (pSD, pCD, range, id, modifier, context, newname)
+ *  DuplicateMenuItems (menuItems)
+ *  
  *
  *
  *  Description:
  *  -----------
+ *  This function creates an indentical duplicate of the given menuItems
+ *  list.
+ *
  *
  *  Inputs:
  *  ------
+ *  menuItems = the linked list of menuItems to duplicate
+ *
  * 
  *  Outputs:
  *  -------
+ *  Return = pointer to a new MenuItems list, identical to the original
+ *
  *
  *  Comments:
  *  --------
  * 
  *************************************<->***********************************/
-static void ModifyClientCommandID (WmScreenData *pSD,
-                                  ClientData *pCD,
-                                  OpRange range,
-                                  CARD32 id,
-                                  CmdModifier modifier,
-                                  Context context,
-                                  String newname)
+static MenuItem *
+DuplicateMenuItems (MenuItem *menuItems)
 {
-    MenuSpec *curMenuSpec;
-    ClientListEntry *curClient;
-
-    switch(range)
+    MenuItem *newMenuItem = (MenuItem *) NULL, *returnMenuItem, *curMenuItem;
+    
+    for (curMenuItem = menuItems;
+        curMenuItem != (MenuItem *) NULL;
+        curMenuItem = curMenuItem->nextMenuItem)
     {
-      case ALL:
-       /* Search through all the menu specs of all the clients. */
-       for (curClient = pSD->clientList;
-            curClient != (ClientListEntry *) NULL;
-            curClient = curClient->nextSibling)
+       /* If its the first one ... */
+       if (newMenuItem == (MenuItem *) NULL)
        {
-           for (curMenuSpec = curClient->pCD->systemMenuSpec;
-                curMenuSpec != (MenuSpec *) NULL;
-                curMenuSpec = curMenuSpec->nextMenuSpec)
-           {
-               /* If the menu spec is global then stop searching
-                  for this client. */
-               if (curMenuSpec->clientLocal == FALSE)
-                 break;
-               if (ModifyClientCommandForMenuSpec(curMenuSpec, id,
-                                                  modifier, context,
-                                                  newname) == TRUE)
-               {
-                   DestroyMenuSpecWidgets(curMenuSpec);
-                   curMenuSpec->menuWidget =
-                     CreateMenuWidget (pSD, curClient->pCD, curMenuSpec->name,
-                                       pSD->screenTopLevelW, TRUE,
-                                       curMenuSpec, NULL);
-               }
-           }
+           newMenuItem = (MenuItem *)XtMalloc(sizeof(MenuItem));
+           returnMenuItem = newMenuItem;
        }
-       /* Search through all the global menu specs. */
-       for (curMenuSpec = pSD->menuSpecs;
-            curMenuSpec != (MenuSpec *) NULL;
-            curMenuSpec = curMenuSpec->nextMenuSpec)
+       else /* ... otherwise, get the next menuItem. */
        {
-           if (ModifyClientCommandForMenuSpec(curMenuSpec, id, modifier,
-                                              context, newname) == TRUE)
-           {
-               DestroyMenuSpecWidgets(curMenuSpec);
-               curMenuSpec->menuWidget =
-                 CreateMenuWidget (pSD, NULL, curMenuSpec->name,
-                                   pSD->screenTopLevelW, TRUE,
-                                   curMenuSpec, NULL);
-           }
+           newMenuItem->nextMenuItem =
+             (MenuItem *)XtMalloc(sizeof(MenuItem));
+           newMenuItem = newMenuItem->nextMenuItem;
        }
-       break;
-      case ROOT:
-        {
+       
+       newMenuItem->labelType = curMenuItem->labelType;
+       if (curMenuItem->label != (String) NULL)
+         newMenuItem->label = XtNewString(curMenuItem->label);
+       else
+         newMenuItem->label = NULL;
+       newMenuItem->labelBitmapIndex = curMenuItem->labelBitmapIndex;
+       newMenuItem->mnemonic = curMenuItem->mnemonic;
+       newMenuItem->accelState = curMenuItem->accelState;
+       newMenuItem->accelKeyCode = curMenuItem->accelKeyCode;
+       if (curMenuItem->accelText != (String) NULL)
+         newMenuItem->accelText = XtNewString(curMenuItem->accelText);
+       else
+         newMenuItem->accelText = NULL;
+       newMenuItem->wmFunction = curMenuItem->wmFunction;
+
+       if ((curMenuItem->wmFunction == F_Send_Msg)
+           || (curMenuItem->wmFunction == F_Set_Context)
            /*
-            * This section was changed to search the entire global menu list.
-            * This was done to allow access to menu entries included using the
-            * cci/.mwmrc interface.  Before, only the actual root menu could
-            * be modified; however, the user could still include commands in
-            * other menus specified in the .mwmrc file using the f.cci command.
+            * NOTE: For now, in dtwm this function is used only
+            * to copy the FrontPanel menu.  So, we know that
+            * curMenuItem->wmFuncArgs isn't going anywhere,
+            * so it's safe to simply point at it.  If at some
+            * point it becomes possible that curMenuItem->wmFuncArgs
+            * can go away, we'll need to make a (deep) copy of
+            * the WmActionArg.  11/20/96
             */
+           || (curMenuItem->wmFunction == F_Action)
+           )
+         newMenuItem->wmFuncArgs = curMenuItem->wmFuncArgs;
+       else if (curMenuItem->wmFuncArgs != (String) NULL)
+         newMenuItem->wmFuncArgs = XtNewString(curMenuItem->wmFuncArgs);
+       else
+         newMenuItem->wmFuncArgs = NULL;
 
-
-           MenuSpec *curMenuSpec;
-
-           /* Search through all the global menu specs. */
-           for (curMenuSpec = pSD->menuSpecs;
-                curMenuSpec != (MenuSpec *) NULL;
-                curMenuSpec = curMenuSpec->nextMenuSpec)
-           {
-             if (ModifyClientCommandForMenuSpec(curMenuSpec, id, modifier,
-                                                context, newname) == TRUE)
-               {
-                 DestroyMenuSpecWidgets(curMenuSpec);
-                 curMenuSpec->menuWidget =
-                   CreateMenuWidget (pSD, NULL, curMenuSpec->name,
-                                     pSD->screenTopLevelW, TRUE,
-                                     curMenuSpec, NULL);
-               }
-           }
-        }
-       break;
-      case SINGLE:
-       /* If we weren't passed a valid pCD, then just return. */
-       if (pCD == (ClientData *) NULL) return;
-
-       /* Search through the clients menu specs. If we find one that 
-          is global then stop search if we are ENABLING or DISABLING.
-          If we are REMOVING and we find a global, we may need to 
-          perform some menu spec replacing to make the menu spec that
-          needs modification local to the client. */
-       for (curMenuSpec = pCD->systemMenuSpec;
-            curMenuSpec != (MenuSpec *) NULL;
-            curMenuSpec = curMenuSpec->nextMenuSpec)
-       {
-           if (curMenuSpec->clientLocal == FALSE)
-           {
-               MenuSpec *last, *cur;
-
-               /* Find the last global menuspec in the clients list
-                  that needs to be changed and return it. Replace
-                  all menuspecs between the current one and the
-                  "last" one that needs changing. All the replaced
-                  menuspecs will be marked as local, so that next
-                  time clientLocal is FALSE in the enclosing for
-                  loop above, there will be no global menu specs
-                  needing changes. In other words, all the required
-                  menu spec replacing will occur the first time we
-                  find a global menu spec. */
-               last = FindLastMenuSpecToModify(curMenuSpec, id);
-               if (last != (MenuSpec *) NULL)
-               {
-                   MenuSpec *newMenuSpec = (MenuSpec *) NULL;
-                   MenuSpec *firstMenuSpec = (MenuSpec *) NULL;
-                   MenuSpec *lastMenuSpec = (MenuSpec *) NULL;
-
-                   /* Replace all the global menu specs with local 
-                      ones. */
-                   for (cur = curMenuSpec;
-                        cur != (MenuSpec *) NULL && cur != last->nextMenuSpec;
-                        cur = cur->nextMenuSpec)
-                   {
-                       newMenuSpec = ReplaceMenuSpecForClient(cur, pCD);
-                       if (cur == curMenuSpec)
-                         curMenuSpec = firstMenuSpec = newMenuSpec;
-                       /* If there is only one menu spec to change,
-                          the first will also be the last. */
-                       if (cur == last)
-                         lastMenuSpec = newMenuSpec;
-                   }
-
-                   /* Now that we have replaced all the menu specs, 
-                      recreate all the widgets for the new menu specs. */
-                   for (cur = firstMenuSpec;
-                        cur != (MenuSpec *) NULL &&
-                        cur != lastMenuSpec->nextMenuSpec;
-                        cur = cur->nextMenuSpec)
-                   {
-                       DestroyMenuSpecWidgets(newMenuSpec);
-                       newMenuSpec->menuWidget = 
-                         CreateMenuWidget(pSD, pCD, newMenuSpec->name,
-                                          pSD->screenTopLevelW,
-                                          TRUE, newMenuSpec, NULL);
-                   }
-
-               }
-               /* None of the globals need changing. */
-               else break;
-           }
-           if (ModifyClientCommandForMenuSpec(curMenuSpec, id, modifier,
-                                              context, newname) == TRUE)
-           {
-               DestroyMenuSpecWidgets(curMenuSpec);
-               curMenuSpec->menuWidget =
-                 CreateMenuWidget (pSD, pCD, curMenuSpec->name,
-                                   pSD->screenTopLevelW, TRUE,
-                                   curMenuSpec, NULL);
-           }
-       }
-       break;
+       newMenuItem->greyedContext = curMenuItem->greyedContext;
+       newMenuItem->mgtMask = curMenuItem->mgtMask;
+       newMenuItem->nextMenuItem = (MenuItem *) NULL;
     }
+    
+    return(returnMenuItem);
 }
 
-\f
 /*************************************<->*************************************
  *
- *  ModifyClientCommandTree (pSD, pCD, range, tree, modifier, context, newname)
+ *  DuplicateMenuSpec (menuSpec)
+ *  
  *
  *
  *  Description:
  *  -----------
+ *  This function creates an indentical duplicate of the given menuSpec.
+ *  The menuItems list in the menuSpec is also duplicated. 
+ *
  *
  *  Inputs:
  *  ------
+ *  menuSpec = the menuSpec to duplicate
+ *
  * 
  *  Outputs:
  *  -------
+ *  Return = pointer to a new MenuSpec structure with the same field
+ *          values as the original
+ *
  *
  *  Comments:
  *  --------
+ *  A new MenuSpec structure is allocated. Most of he fields of the new
+ *  structure are set to the same values as the passed in menuSpec.
+ *  There are some differences between the two final structures.
+ *  One difference: any fields related to push buttons and other
+ *  widgets are left blank in the new MenuSpec to be filled in later.
  * 
  *************************************<->***********************************/
-void ModifyClientCommandTree (WmScreenData *pSD,
-                             ClientData *pCD,
-                             OpRange range,
-                             CmdTree *tree,
-                             CmdModifier modifier,
-                             Context context,
-                             String newname)
+MenuSpec *
+DuplicateMenuSpec (MenuSpec *menuSpec)
 {
-    CmdTree *curTree;
-    CARD32 cmdID;
-
-    /* Run through the top level of the tree. */
-    for (curTree = tree; curTree != (CmdTree *) NULL; curTree = curTree->next)
+    MenuSpec *newMenuSpec;
+    
+    if ((newMenuSpec = (MenuSpec *) XtMalloc (sizeof (MenuSpec))) == NULL)
+      /* Handle insufficent memory */
     {
-       cmdID = curTree->commandID;
-       ModifyClientCommandID(pSD, pCD, range, cmdID, modifier,
-                             context, newname);
-       if (curTree->subTrees != (CmdTree *) NULL)
-         ModifyClientCommandTree(pSD, pCD, range, curTree->subTrees,
-                                 modifier, context, newname);
+       Warning((char *)GETMESSAGE(48, 9,
+                "Insufficient memory for menu specification\n"));
+       return (NULL);
     }
+    newMenuSpec->name = XtNewString(menuSpec->name);
+    newMenuSpec->currentContext = menuSpec->currentContext;
+    newMenuSpec->menuWidget = (Widget) NULL;
+    newMenuSpec->whichButton = menuSpec->whichButton;
+    newMenuSpec->height = menuSpec->height;
+    newMenuSpec->menuItems = DuplicateMenuItems(menuSpec->menuItems);
+    newMenuSpec->menuButtons = (MenuButton *) NULL;
+    newMenuSpec->menuButtonSize = 0;
+    newMenuSpec->menuButtonCount = 0;
+    newMenuSpec->accelContext = menuSpec->accelContext;
+    newMenuSpec->accelKeySpecs = (KeySpec *) NULL;
+    newMenuSpec->nextMenuSpec = (MenuSpec *) NULL;
+    
+    return(newMenuSpec);
 }
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-\f
+
 /*************************************<->*************************************
  *
  *  static Boolean
@@ -2990,7 +612,7 @@ static Boolean AdjustPBs (MenuSpec *menuSpec, ClientData  *pCD,
                    XtSetSensitive (menuButton->buttonWidget, FALSE);
                }
            }
-#ifdef WSM
+
            if (menuItem->wmFunction == F_Remove)
            {
                /*
@@ -3000,17 +622,12 @@ static Boolean AdjustPBs (MenuSpec *menuSpec, ClientData  *pCD,
                fSupported = (pCD && (pCD->numInhabited > 1));
                XtSetSensitive (menuButton->buttonWidget, fSupported);
            }
-#endif /* WSM */
 
            if ((menuItem->mgtMask) && pCD)
            /* PushButton might not apply */
            {
-#ifdef WSM
                if ((pCD->clientFunctions & menuItem->mgtMask & MWM_MGT_MASK) ||
                    (pCD->dtwmFunctions & menuItem->mgtMask & DTWM_MGT_MASK))
-#else /* WSM */
-               if (pCD->clientFunctions & menuItem->mgtMask)
-#endif /* WSM */
                /* function applies -- manage it */
                {
                    if (!menuButton->managed)
@@ -3152,211 +769,6 @@ static Boolean SavePBInfo (MenuSpec *topMenuSpec, MenuItem *menuItem,
 
 }
 
-
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- * AdjustTearOffControl (cascade, closure, cbackdata) 
- *  
- * 
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- *
- * 
- *  Outputs:
- *  -------
- *     returns true iff the tearoff control was enabled or diabled
- *     resulting in a change in height.
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-static Boolean
-AdjustTearOffControl (Widget cascade,
-                     XtPointer closure,
-                     XtPointer cbackdata)
-{
-    Widget submenu = (Widget) closure;
-    int argn;
-    Arg args[10];
-    unsigned char tearoff_model;
-    Boolean isMwmMenu;
-
-    argn = 0;
-    XtSetArg(args[argn], XmNtearOffModel, &tearoff_model); ++argn;
-    XtGetValues(submenu, args, argn);
-
-    /* Is this a root menu or a cascade of a root menu?         */
-    /* If cbackdata is not null, then we got here by cascading. */
-    /* Cascade menus from a tearoff menu-pane are not allowed.  */
-    /* there is no way to know if the cascade is from a tearoff */
-    /* or from a cascade on a system menu.                      */
-    if ((wmGD.menuClient == NULL) && (cbackdata == NULL))
-      isMwmMenu = True;
-    else
-      isMwmMenu = False;
-
-    if ((tearoff_model == XmTEAR_OFF_ENABLED) && !isMwmMenu)
-    {
-       PRINT("Disabling the tear off\n");
-       argn = 0;
-       XtSetArg(args[argn], XmNtearOffModel, XmTEAR_OFF_DISABLED); ++argn;
-       XtSetValues(submenu, args, argn);
-
-       return (True);
-    }
-
-    /* If this was invoked as a cascadingCallback and not by hand and if
-       the menuActive field of the global data has not yet been set, then
-       we can safely assume that we have just cascaded off of a torn off
-       menu. In that case, set the menuActive field to be the menu spec of
-       the torn off menu and register an unmap callback on the cascaded
-       menu that will clear the menuActive field. */
-    if (cbackdata != (XtPointer) NULL && wmGD.menuActive == (MenuSpec *) NULL)
-    {
-       MenuSpec *menuspec;
-       Widget tearoff_widget = XtParent(cascade);
-
-       for (menuspec = wmGD.Screens[0].menuSpecs;
-            menuspec != (MenuSpec *) NULL;
-            menuspec = menuspec->nextMenuSpec)
-       {
-           if (tearoff_widget == menuspec->menuWidget)
-           {
-               wmGD.menuActive = menuspec;
-               break;
-           }
-       }
-
-       /* If we can't find a menuspec for the torn off menu, then just
-          take the first menu spec in the list of menuSpecs for the
-          active pSD. NOTE: THIS SHOULD NEVER HAPPEN. In fact if it
-          does, I'm not sure how mwm will behave having been given
-          the wrong menu spec as the active menu. */
-       if (wmGD.menuActive == (MenuSpec *) NULL)
-       {
-           wmGD.menuActive = ACTIVE_PSD->menuSpecs;
-           PRINT("Couldn't find menu spec for tear off\n");
-       }
-
-       /* Add a callback that will clear menuActive when this cascade
-          is unmapped. */
-#if 0
-       XtAddCallback (submenu, XmNunmapCallback,
-#else
-       XtAddCallback (XtParent(submenu), XmNpopdownCallback,
-#endif
-                      UnmapPulldownCallback,
-                      (XtPointer) NULL);
-    }
-
-  return (False);
-}
-\f
-
-/*************************************<->*************************************
- *
- *  static Boolean
- *  CreateClientCommandSeparator (menuItem, child_position, last_child,
- *                               newMenuItem)
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- *
- * 
- *  Outputs:
- *  -------
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-static Boolean CreateClientCommandSeparator (MenuItem *menuItem,
-                                            int       child_position,
-                                            Widget    last_child,
-                                            MenuItem **newMenuItem)
-{
-    MenuItem *curMenuItem;
-
-    /* If it is a client command, then we only want to create the
-     * separator under particular circumstances. Specifically, we
-     * want to make sure that:
-     *   1. a separator doesn't directly precede this one
-     *   2. a separator doesn't directly follow this one
-     *   3. this separator won't be the first or last item in the menu
-     *   4. the client command that this separator surrounds actually
-     *      matched something and is not an unmatched template
-     */
-
-    /* Check if a separator directly precedes this one. */
-    if (child_position > 0 && last_child != (Widget) NULL &&
-       XmIsSeparator(last_child))
-      return(FALSE);
-
-    /* Check if a separator directly follows this one. */
-    if (menuItem->nextMenuItem != (MenuItem *) NULL &&
-       menuItem->nextMenuItem->wmFunction == F_Separator &&
-       IsClientCommand(menuItem->nextMenuItem->label) == FALSE)
-      return(FALSE);
-
-    /* Make sure this separator won't be the first item in the menu. */
-    if (child_position == 0) return(FALSE);
-
-    /* Make sure this separator won't be the last item in the menu. */
-    if (menuItem->nextMenuItem == (MenuItem *) NULL)
-      return(FALSE);
-
-    /* Make sure that the client command this separator surrounds actually
-       matches something. We only do this check if the separator is the 
-       TOP separator in the separator pair. If we are looking at a bottom
-       separator then we can safely assume something matched, otherwise
-       we would have passed over it when we look at the corresponding top
-       separator. */
-    if (menuItem->labelType == TOP_SEPARATOR)
-    {
-       /* If we find a real menu item (not just a template) before we find
-          a bottom separator, then create the separator. */
-       for (curMenuItem = menuItem;
-            curMenuItem != (MenuItem *) NULL;
-            curMenuItem = curMenuItem->nextMenuItem)
-       {
-           /* If we found the closing separator, then return FALSE and
-              our new menu item position. */
-           if (curMenuItem->wmFunction == F_Separator &&
-               IsClientCommand(curMenuItem->label) &&
-               curMenuItem->labelType == BOTTOM_SEPARATOR)
-           {
-               *newMenuItem = curMenuItem;
-               return(FALSE);
-           }
-           /* If we found a real menu item, then return TRUE. */
-           if (curMenuItem->wmFunction != F_Separator &&
-               !IsClientCommand(curMenuItem->label))
-           {
-               return(TRUE);
-           }
-       }
-       /* If by some bizarre chance we get to the end of the list
-          without finding either, then return FALSE. Something is wrong. */
-       if (curMenuItem == (MenuItem *) NULL) return(FALSE);
-    }
-
-    /* Well, nothing failed so let's create it. */
-    return(TRUE);
-}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-\f
 /*************************************<->*************************************
  *
  *  CreateMenuWidget (pSD, menuName, parent, fTopLevelPane, topMenuSpec, 
@@ -3401,9 +813,6 @@ typedef struct _StrList
 } StrList;
 
 Widget CreateMenuWidget (WmScreenData *pSD,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-                        ClientData *pCD,
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
                         String menuName, Widget parent,
                         Boolean fTopLevelPane, MenuSpec *topMenuSpec,
                         MenuItem *moreMenuItems)
@@ -3421,9 +830,6 @@ Widget CreateMenuWidget (WmScreenData *pSD,
     KeySpec    *accelKeySpec;
     Dimension   menuHeight;
     Boolean     fUseTitleSep = False;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    Boolean     labelIsClientCommand = False;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     StrList    *stringsToFree = NULL, *sPtr;
     XmString    tmpstr;
 #ifndef        IBM_151913
@@ -3558,42 +964,12 @@ Widget CreateMenuWidget (WmScreenData *pSD,
     {
         i = 0;
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-       labelIsClientCommand = IsClientCommand(menuItem->label);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
        if (menuItem->wmFunction == F_Separator)
        /* 
         * Add a Separator gadget for a menu separator.
         * An immediately following title will not have a top separator.
         */
        {
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-           /* If it is a client command, then we only want to create the
-            * separator under particular circumstances. Specifically, we
-            * want to make sure that:
-            *   1. a separator doesn't directly precede this one
-            *   2. a separator doesn't directly follow this one
-            *   3. this separator won't be the first or last item in the menu
-            */
-           if (labelIsClientCommand)
-           {
-               if (CreateClientCommandSeparator(menuItem, n,
-                                                (n > 0 ? children[n - 1] :
-                                                 (Widget) NULL),
-                                                &menuItem))
-               {    
-                   /* Increment the counter here because we only increment
-                      at the end of the loop if the item is not a client
-                      command item (i.e. labelIsClientCommand == FALSE) */
-                   children[n++] =
-                     XmCreateSeparatorGadget (menuW, SEPARATOR_NAME, 
-                                              (ArgList)NULL, 0);
-                   fUseTitleSep = FALSE;
-               }
-           }
-           else
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
            {
                children[n] =
                  XmCreateSeparatorGadget (menuW, SEPARATOR_NAME, 
@@ -3603,9 +979,6 @@ Widget CreateMenuWidget (WmScreenData *pSD,
        } /* F_Separator */
 
        else
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-           if (!labelIsClientCommand)
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
        /*
          * We will use one of:
         *
@@ -3720,11 +1093,6 @@ Widget CreateMenuWidget (WmScreenData *pSD,
                            i++;
                        children[n] = XmCreateCascadeButtonGadget (menuW,
                                          CASCADE_BTN_NAME, (ArgList) args, i);
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-                       XtAddCallback(children[n], XmNcascadingCallback,
-                                     (XtCallbackProc)AdjustTearOffControl,
-                                     (XtPointer)subMenuW);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
                    }
                    else
                    /*
@@ -3842,10 +1210,7 @@ Widget CreateMenuWidget (WmScreenData *pSD,
         * Increment the children array count if we actually
         * created a new child.
         */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-       if (!labelIsClientCommand)
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-           n++;
+       n++;
 
        /*
         * Next menu item:  handle custom items and full children[]. 
@@ -3964,9 +1329,6 @@ void PostMenu (MenuSpec *menuSpec, ClientData *pCD, int x, int y, unsigned int b
     XButtonPressedEvent event;
     Window           saveWindow;
     Display          *saveDisplay;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    Boolean          menuAdjusted;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     
     if ((menuSpec == NULL) || (menuSpec->menuWidget == NULL))
     {
@@ -4006,23 +1368,13 @@ void PostMenu (MenuSpec *menuSpec, ClientData *pCD, int x, int y, unsigned int b
      *  change, we may need to remeasure things. (CR 9316)
      */
     
-#ifdef WSM
     if(pCD && pCD->clientFlags & ICON_BOX)
     {
         newContext |= F_CONTEXT_ICONBOX;
     }
 
-#endif /* WSM */
-
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    menuAdjusted =
-      AdjustTearOffControl(NULL, (XtPointer) (menuSpec->menuWidget), NULL);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-    if (AdjustPBs (menuSpec, pCD, newContext)
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-       || menuAdjusted
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-       )
+
+    if (AdjustPBs (menuSpec, pCD, newContext))
     {
         i = 0;
         XtSetArg (args[i], XtNheight, &menuHeight);  i++;
@@ -4299,36 +1651,7 @@ void MWarning (char *format, char *message)
 } /* END OF FUNCTION MWarning */
 
 
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  UnmapPulldownCallback (w, client_data, call_data)
- *
- *
- *  Description:
- *  -----------
- *
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-
-static void UnmapPulldownCallback (Widget w, XtPointer client_data,
-                                  XtPointer call_data)
-{
-    wmGD.menuActive = (MenuSpec *) NULL;
-} /* END OF FUNCTION UnmapPulldownCallback */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 
-\f
 /*************************************<->*************************************
  *
  *  TraversalOff (menuSpec)
index f31b420c9b1b1fb61b164981a246429320f77af1..71841c338fa6911e8f803fc3f378cc631368dc45 100644 (file)
 /* 
  * Motif Release 1.2.2
 */ 
-/*   $XConsortium: WmMenu.h /main/7 1996/11/20 15:20:45 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# define MAKE_MENU(pSD, pCD, mName, iC, aC, moreItems, sysMenu) \
-       MakeMenu(pSD, pCD, mName, iC, aC, moreItems, sysMenu)
-# define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \
-       CreateMenuWidget(pSD, pCD, mName, parent, fTLP, tSpec, moreItems)
-#else
-# define MAKE_MENU(pSD, pCD, mName, iC, aC, moreItems, sysMenu) \
+#define MAKE_MENU(pSD, pCD, mName, iC, aC, moreItems, sysMenu) \
        MakeMenu(pSD, mName, iC, aC, moreItems, sysMenu)
-# define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \
+#define CREATE_MENU_WIDGET(pSD, pCD, mName, parent, fTLP, tSpec, moreItems) \
        CreateMenuWidget(pSD, mName, parent, fTLP, tSpec, moreItems)
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 
 extern void ActivateCallback (Widget w, caddr_t client_data, 
                              caddr_t call_data);
 extern Widget CreateMenuWidget (WmScreenData *pSD,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-                               ClientData *pCD,
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
                                String menuName, Widget parent,
                                Boolean fTopLevelPane, MenuSpec *topMenuSpec,
                                MenuItem *moreMenuItems);
 extern void FreeCustomMenuSpec (MenuSpec *menuSpec);
 extern void MWarning (char *format, char *message);
 extern MenuSpec *MakeMenu (WmScreenData *pSD,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-                          ClientData *pCD,
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
                           String menuName, 
                           Context initialContext, Context accelContext, 
                           MenuItem *moreMenuItems, Boolean fSystemMenu);
@@ -70,24 +56,6 @@ extern void PostMenu (MenuSpec *menuSpec, ClientData *pCD, int x, int y,
 extern void TraversalOff (MenuSpec *menuSpec);
 extern void TraversalOn (MenuSpec *menuSpec);
 extern void UnpostMenu (MenuSpec *menuSpec);
-
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-extern void InsertTreeOnAllClients (WmScreenData *pSD, CmdTree *tree,
-                                   Atom selection, Context active_context,
-                                   Boolean in_line);
-extern void InsertTreeOnSingleClient (WmScreenData *pSD, ClientData *pCD,
-                                     CmdTree *tree, Atom selection,
-                                     Context active_context, Boolean in_line);
-extern void InsertTreeOnRootMenu (WmScreenData *pSD, CmdTree *tree,
-                                 Atom selection, Boolean in_line);
-extern void ModifyClientCommandTree (WmScreenData *pSD, ClientData *pCD,
-                                    OpRange range, CmdTree *tree,
-                                    CmdModifier modifier, Context context,
-                                    String newname);
-extern void DestroyMenuSpecWidgets (MenuSpec *menuspec);
-extern void DestroyMenuSpec (WmScreenData *pSD, CARD32 commandID);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
 extern MenuSpec *DuplicateMenuSpec (MenuSpec *menuSpec);
 
 #endif /* _WM_MENU_H */
index a3bae64b96fc5f43d1f2d84275f537aee84516f1..6a7f9c5a0754b16e082ea5bd32e6653f44e738e7 100644 (file)
  * (c) Copyright 1993 HEWLETT-PACKARD COMPANY 
  * ALL RIGHTS RESERVED 
  */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmOL.c /main/4 1995/11/01 11:45:08 rswiston $"
-#endif
-#endif
 
 /*
  * Included Files:
index 189d212c2f8fb76fa0532da0cfe602103823cd2a..0989557b09dc24ecf52fc4ac0db1161c2e970afd 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: WmOL.h /main/4 1995/11/01 11:45:27 rswiston $ */
 /* 
  * (c) Copyright 1989 Sun Microsystems, Inc.
  * (c) Copyright 1993 HEWLETT-PACKARD COMPANY 
 #define _WM_OL_H
 #ifndef NO_OL_COMPAT
 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = ""
-#endif
-#endif
-
 /*
  * Property Names 
  */
index 122dc51a0bcdbbe42df88ad7a32f2461980895b3..cf21528f4d0d4e6da9bb37e2b8c6ac279ce2f6c9 100644 (file)
@@ -20,9 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/*
- * $XConsortium: WmPanelP.h /main/4 1995/11/01 11:45:57 rswiston $
- */
 /******************************<+>*************************************
  **********************************************************************
  **
index 72b7bfed979fc173c6fc7973766c4620c79865d7..607bb01ebe75c8b10fedf15e053c902035b567ae 100644 (file)
@@ -20,9 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-#ifdef VERBOSE_REV_INFO
-static char rcsid[] = "$XConsortium: WmParse.c /main/5 1996/10/30 11:36:06 drk $";
-#endif /* VERBOSE_REV_INFO */
 /******************************<+>*************************************
  **********************************************************************
  **
@@ -63,9 +60,7 @@ static char rcsid[] = "$XConsortium: WmParse.c /main/5 1996/10/30 11:36:06 drk $
 #include "WmGlobal.h"
 #include "WmParse.h"
 #include "WmParseP.h"
-#ifdef MULTIBYTE
 #include <stdlib.h>
-#endif /* MULTIBYTE */
 #include <ctype.h>
 
 /*
@@ -274,7 +269,6 @@ _DtWmParseBackUp (
     if ((pchTok > pWmPB->pchLine) &&
        (pchTok < (pWmPB->pchLine +  pWmPB->cLineSize)))
     {
-#ifdef MULTIBYTE
        unsigned char *pch;
        unsigned char *pchLast;
        int chlen;
@@ -320,29 +314,6 @@ _DtWmParseBackUp (
        }
 
        pWmPB->pchNext = pchLast;
-#else /* MULTIBYTE */
-
-       /* 
-        * Replace preceding NULL with a space.
-        */
-        pchTok--;
-
-       if (*pchTok == '\0')
-       {
-           *pchTok = DTWM_CHAR_SPACE;
-       }
-
-       /* 
-        * Back up to next NULL or beginning of line.
-        */
-       while ((pchTok >= pWmPB->pchLine) && *pchTok)
-       {
-           pchTok--;
-       }
-
-       pWmPB->pchNext = pchTok + 1;
-
-#endif  /* MULTIBYTE */
     }
     return (pWmPB->pchNext);
 }
@@ -377,13 +348,9 @@ _DtWmParseBackUp (
 
 void _DtWmParseSkipWhitespaceC(unsigned char  **linePP)
 {
-#ifdef MULTIBYTE
     while (*linePP && 
           (mblen ((char *)*linePP, MB_CUR_MAX) == 1) && 
           isspace (**linePP))
-#else
-    while (*linePP && isspace (**linePP))
-#endif
     {
         (*linePP)++;
     }
@@ -449,7 +416,6 @@ _DtWmParseNextTokenC (
     unsigned char *curP;
     unsigned char *lnwsP;
     unsigned int  level = 0, checkLev, i, quoteLevel[MAX_QUOTE_DEPTH];
-#ifdef MULTIBYTE
     int            chlen;
 
     /* get rid of leading white space */
@@ -563,90 +529,6 @@ _DtWmParseNextTokenC (
                }
            }
         }
-#else /* MULTIBYTE */
-
-    /* get rid of leading white space */
-    ScanWhitespace (&lineP);
-
-    /* Return NULL if line is empty, whitespace, or begins with a comment. */
-    if ((lineP == NULL || *lineP == '\0') ||
-       (!SmBehavior && (*lineP == '#')))
-    {
-        *linePP = lineP;
-        return (NULL);
-    }
-
-    if (*lineP == '"')
-    /* Quoted string */
-    {
-       quoteLevel[level] = 1;  
-       /*
-        * Start beyond double quote and find the end of the quoted string.
-        * '\' quotes the next character.
-        * Otherwise,  matching double quote or NULL terminates the string.
-        *
-        * We use lnwsP to point to the last non-whitespace character in the
-        * quoted string.  When we have found the end of the quoted string,
-        * increment lnwsP and if lnwsP < endP, write NULL into *lnwsP.
-        * This removes any trailing whitespace without overwriting the 
-        * matching quote, needed later.  If the quoted string was all 
-        * whitespace, then this will write a NULL at the beginning of the 
-        * string that will be returned -- OK.
-        */
-       lnwsP = lineP++;                /* lnwsP points to first '"' */
-       curP = endP = lineP;            /* other pointers point beyond */
-
-        while ((*endP = *curP) && (*endP != '"'))
-       /* haven't found matching quote yet */
-        {
-           /* point curP to next character */
-           curP++;
-           if ((*endP == '\\') && (*curP != NULL))
-           /* shift quoted nonNULL character down and curP ahead */
-           {
-               if (SmBehavior)
-               {
-                   /*
-                    * Check to see if this is a quoted quote - if it is
-                    * strip off a level - if not - it's sacred leave it alone
-                    */
-                   checkLev = PeekAhead((curP - 1), quoteLevel[level]);
-                   if(checkLev > 0)
-                   {
-                       if(quoteLevel[level] >= checkLev)
-                       {
-                           if (level > 0) level--;
-                       }
-                       else if (level < MAX_QUOTE_DEPTH)
-                       {
-                           level++;
-                           quoteLevel[level] = checkLev;
-                       }
-                       
-                       for(i = 0;i < (checkLev - 2);i++)
-                       {
-                           *endP++ = *curP++;curP++;
-                       }
-                       *endP = *curP++;
-                   }
-               }
-               else 
-               {
-               *endP = *curP++;
-               }
-            }
-           if (isspace (*endP))
-           /* whitespace character:  leave lnwsP unchanged. */
-           {
-               endP++;
-           }
-           else
-           /* non-whitespace character:  point lnwsP to it. */
-           {
-               lnwsP = endP++;
-           }
-        }
-#endif /* MULTIBYTE */
 
        /*
         *  Found matching quote or NULL.  
@@ -670,7 +552,6 @@ _DtWmParseNextTokenC (
         */
         curP = endP = lineP;
 
-#ifdef MULTIBYTE
         while ((*endP = *curP) &&
                ((chlen = mblen ((char *)curP, MB_CUR_MAX)) > 0) &&
                ((chlen > 1) || (!isspace (*curP) && 
@@ -699,20 +580,6 @@ _DtWmParseNextTokenC (
                }
            }
         }
-#else /* MULTIBYTE */
-        while ((*endP = *curP) && !isspace (*endP) && 
-                                       (SmBehavior || (*endP != '#')))
-        {
-           /* point curP to next character */
-           curP++;
-           if ((*endP == '\\') && (*curP != '\0'))
-           /* shift quoted nonNULL character down and curP ahead */
-           {
-               *endP = *curP++;
-            }
-           endP++;
-        }
-#endif /* MULTIBYTE */
     }
 
     /*
@@ -1041,16 +908,13 @@ _DtWmParseNextLine (
  *
  ***********************************************************************/
 
-    register unsigned char     *string;
+    unsigned char      *string;
     int                                len;
-
-#ifdef MULTIBYTE
     int   chlen;
     wchar_t last;
     wchar_t wdelim;
     char delim;
     int lastlen;
-#endif
 
     if (cfileP != NULL)
     /* read fopened file */
@@ -1070,7 +934,6 @@ _DtWmParseNextLine (
                               (pWmPB->cLineSize));
            }
 #endif /* PARSE_LIB */
-#ifndef NO_MULTIBYTE
 
            lastlen = 0;
            while (*string &&
@@ -1102,21 +965,6 @@ _DtWmParseNextLine (
                while (lastlen == 1 && last == wdelim);
            }
            string = line;
-#else
-           len = strlen((char *)string) - 2;
-           if ((len > 0) && string[len] == '\\')
-           {
-               do {
-                   string = &string[len];
-                   if (fgets((char *)string, 
-                             MAXLINE - (string-line), cfileP) == NULL)
-                      break;
-                   len = strlen((char *)string) - 2;
-                   linec++;
-               } while ((len >= 0) && string[len] == '\\');
-               string = line;
-           }
-#endif
        }
     }
     else if ((parseP != NULL) && (*parseP != '\0'))
@@ -1135,7 +983,7 @@ _DtWmParseNextLine (
        }
 #endif /* PARSE_LIB */
        string = line;
-#ifdef MULTIBYTE
+
        while ((*parseP != '\0') &&
                ((chlen = mblen ((char *)parseP, MB_CUR_MAX)) != 0) &&
               (*parseP != '\n'))
@@ -1151,13 +999,6 @@ _DtWmParseNextLine (
                 }
             }
         }
-#else
-       while ((*parseP != '\0') && (*parseP != '\n'))
-       /* copy all but end-of-line and newlines to line buffer */
-       {
-           *(string++) = *(parseP++);
-        }
-#endif
        *string = '\0';
        if (*parseP == '\n')
        {
@@ -1258,19 +1099,12 @@ _DtWmParseNextChar (
     unsigned char *pch = NULL;
     int chlen;
 
-#ifdef MULTIBYTE
     if (pWmPB &&
        pWmPB->pchNext &&
        (chlen = mblen((char *)pWmPB->pchNext, MB_CUR_MAX) > 0))
     {
        pch = (pWmPB->pchNext += chlen);
     }
-#else /* MULTIBYTE */
-    if (pWmPB && pWmPB->pchNext && *pWmPB->pchNext)
-    {
-       pch = ++pWmPB->pchNext;
-    }
-#endif /* MULTIBYTE */
 
     return (pch);
 }
@@ -1344,7 +1178,6 @@ _DtWmParseLineNumber (
 void _DtWmParseToLower (char  *string)
 {
     char *pch = string;
-#ifdef MULTIBYTE
     int            chlen;
 
     while ((chlen = mblen (pch, MB_CUR_MAX)) > 0)
@@ -1355,16 +1188,6 @@ void _DtWmParseToLower (char  *string)
        }
        pch += chlen;
     }
-#else
-    while (*pch != NULL)
-    {
-        if (isupper (*pch))
-       {
-           *pch = tolower(*pch);
-       }
-       pch++;
-    }
-#endif
 
 } /* END OF FUNCTION _DtWmParseToLower */
 
@@ -1403,7 +1226,6 @@ unsigned int _DtWmParsePeekAhead(unsigned char *currentChar,
 {
     Boolean            done = False;
     unsigned int       tmpLev = 1;
-#ifdef MULTIBYTE
     unsigned int       chlen;
 
     while (((chlen = mblen ((char *)currentChar, MB_CUR_MAX)) > 0) &&
@@ -1427,26 +1249,6 @@ unsigned int _DtWmParsePeekAhead(unsigned char *currentChar,
            }
        }
     }
-#else
-    while((*currentChar != NULL) && (done == False) &&
-         ((*currentChar == '"') || (*currentChar == '\\')))
-    {
-       currentChar++;
-       if((*currentChar != NULL) &&
-          ((*currentChar == '"') || (*currentChar == '\\')))
-       {
-           tmpLev++;
-           if(*currentChar == '"')
-           {
-               done = True;
-           }
-           else
-           {
-               currentChar++;
-           }
-       }
-    }
-#endif /*MULTIBYTE*/
 
     /*
      * Figure out if this is truly a new level of nesting - else ignore it
@@ -1661,11 +1463,7 @@ _DtWmParseExpandEnvironmentVariables (
     )
 
 {
-#ifdef MULTIBYTE
     int chlen;
-#else /* MULTIBYTE */
-    int chlen = 1;     /* length of character is always '1' */
-#endif /* MULTIBYTE */
     unsigned char *pchStart;
     unsigned char chSave;
     unsigned char *pchEnvStart;
@@ -1702,9 +1500,7 @@ _DtWmParseExpandEnvironmentVariables (
 
     pchStart = pch;
     lenOriginal = strlen ((char *)pch);
-#ifdef MULTIBYTE
     chlen = mblen ((char *)pch, MB_CUR_MAX);
-#endif /* MULTIBYTE */
     chSave = '\0';
 
     while (*pch && (chlen > 0))
@@ -1735,18 +1531,14 @@ _DtWmParseExpandEnvironmentVariables (
                     * The next character is "escaped", skip over it.
                     */
                    pchStart = pch += chlen;
-#ifdef MULTIBYTE
                    chlen = mblen ((char *)pch, MB_CUR_MAX);
-#endif /* MULTIBYTE */
                    break;
 
                case DTWM_CHAR_ENVIRONMENT:
                    /* save start of environment variable */
                    pchEnvStart = pch;
                    pch += chlen;
-#ifdef MULTIBYTE
                    chlen = mblen ((char *)pch, MB_CUR_MAX);
-#endif /* MULTIBYTE */
 
                    /*
                     * Copy up to start of environment variable 
@@ -1776,9 +1568,7 @@ _DtWmParseExpandEnvironmentVariables (
                        (*pch == DTWM_CHAR_L_PAREN))
                    {
                        pch += chlen;
-#ifdef MULTIBYTE
                        chlen = mblen ((char *)pch, MB_CUR_MAX);
-#endif /* MULTIBYTE */
                        pchBreak = pchParenBrk;
                        bEatBreak = True;
                    }
@@ -1786,9 +1576,7 @@ _DtWmParseExpandEnvironmentVariables (
                        (*pch == DTWM_CHAR_L_BRACE))
                    {
                        pch += chlen;
-#ifdef MULTIBYTE
                        chlen = mblen ((char *)pch, MB_CUR_MAX);
-#endif /* MULTIBYTE */
                        pchBreak = pchBraceBrk;
                        bEatBreak = True;
                    }
@@ -1870,16 +1658,12 @@ _DtWmParseExpandEnvironmentVariables (
                         */
                        if (bEatBreak)
                        {
-#ifdef MULTIBYTE
                            chlen = mblen ((char *)pchNext, MB_CUR_MAX);
-#endif /* MULTIBYTE */
                            pchNext += chlen;
                        }
                    }
                    pchStart = pch = pchNext;
-#ifdef MULTIBYTE
                    chlen = mblen ((char *)pch, MB_CUR_MAX);
-#endif /* MULTIBYTE */
                    /*
                     * We're already pointing at the next character
                     * to process, don't advance again!
@@ -1900,18 +1684,14 @@ _DtWmParseExpandEnvironmentVariables (
            if (!bAlreadyAdvanced)
            {
                pch += chlen; 
-#ifdef MULTIBYTE
                chlen = mblen ((char *)pch, MB_CUR_MAX);
-#endif /* MULTIBYTE */
            }
        }
-#ifdef MULTIBYTE
        else
        {
            pch += chlen;
             chlen = mblen ((char *)pch, MB_CUR_MAX);
        }
-#endif /* MULTIBYTE */
     }
 
     if (pchReturn && *pchStart)
@@ -1959,9 +1739,7 @@ _DtWmParseMakeQuotedString (unsigned char *pchLine)
     int iLen0, iLen1;
     int cSpecial;
     int i,j;
-#ifdef MULTIBYTE
     int   chlen;
-#endif
 
     iLen0 = strlen ((char *)pchLine);
     iLen1 = iLen0 + 2; /* for starting, ending quotes */
@@ -1971,7 +1749,6 @@ _DtWmParseMakeQuotedString (unsigned char *pchLine)
         /*
         * Count special chars to get estimate of new length
         */
-#ifdef MULTIBYTE
         chlen = mblen ((char *) &pchLine[i], MB_CUR_MAX);
        if ((chlen == 1) &&
            ((pchLine[i] == '\\') ||
@@ -1987,13 +1764,6 @@ _DtWmParseMakeQuotedString (unsigned char *pchLine)
        {
            i += chlen-1;
        }
-#else /* MULTIBYTE */
-       if ((pchLine[i] == '\\') ||
-           (pchLine[i] == '"'))
-       {
-           iLen1++;
-       }
-#endif /* MULTIBYTE */
     }
 
     pchRet = (unsigned char *) XtMalloc (1+iLen1);
@@ -2006,7 +1776,6 @@ _DtWmParseMakeQuotedString (unsigned char *pchLine)
         */
        for (i=0, j=1; i < iLen0; i++, j++)
        {
-#ifdef MULTIBYTE
            chlen = mblen ((char *) &pchLine[i], MB_CUR_MAX);
            if ((chlen == 1) &&
                ((pchLine[i] == '\\') ||
@@ -2025,14 +1794,6 @@ _DtWmParseMakeQuotedString (unsigned char *pchLine)
                pchRet[j++] = pchLine[i++];
                chlen--;
            }
-#else /* MULTIBYTE */
-           if ((pchLine[i] == '\\') ||
-               (pchLine[i] == '"'))
-           {
-               /* quote next char */
-               pchRet[j++] = '\\';
-           }
-#endif /* MULTIBYTE */
            /* copy char */
             pchRet[j] = pchLine[i];
        }
index 6643a957d87dd2cdb44c0dc6c708b2592b37d89c..464ac63ea1718d0e76c89e8025067c9f83363c62 100644 (file)
@@ -20,9 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/*
- * $XConsortium: WmParse.h /main/4 1995/11/01 11:46:40 rswiston $
- */
 /******************************<+>*************************************
  **********************************************************************
  **
index eafd933e000a852fbff892e4aaa8194202e0cce4..e9b39f8a32bce31bf17e3de57f7f8c29951f55d8 100644 (file)
@@ -20,9 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-#ifdef VERBOSE_REV_INFO
-static char rcsid[] = "$XConsortium: WmParseP.c /main/3 1995/11/01 11:46:58 rswiston $";
-#endif /* VERBOSE_REV_INFO */
 /******************************<+>*************************************
  **********************************************************************
  **
index 0ce2a85a55bbb3acb4c909e44074f8310e783a8f..fe7275a136df75293a1bd89418b867044007f832 100644 (file)
@@ -20,9 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/*
- * $XConsortium: WmParseP.h /main/3 1995/11/01 11:47:17 rswiston $
- */
 /******************************<+>*************************************
  **********************************************************************
  **
index ff7b85001b80e9382012e6ab64bbff787079fe25..d4d3dad590aa9fbf08600c76ce9b964f4ebcb6d6 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-#ifdef WSM
 /* 
  * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY 
  * ALL RIGHTS RESERVED 
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmPresence.c /main/7 1996/10/23 17:24:56 rswiston $"
-#endif
-#endif
 
 /*
  * Included Files:
@@ -53,9 +47,6 @@ static char rcsid[] = "$XConsortium: WmPresence.c /main/7 1996/10/23 17:24:56 rs
 #include <Xm/List.h>
 #include <Xm/SeparatoG.h>
 #include <Xm/ToggleB.h>
-#ifndef  PANELIST
-#include <Dt/Help.h>
-#endif /* PANELIST */
 #include <errno.h>
 #include <signal.h>
 #include <stdio.h>
@@ -130,9 +121,7 @@ static Dimension wspCharWidth (
 #include "WmCDecor.h"
 #include "WmCDInfo.h"
 #include "WmIconBox.h"
-#ifdef PANELIST
 #include "WmPanelP.h"  /* for typedef in WmManage.h */
-#endif /* PANELIST */
 #include "WmManage.h"
 #include "WmResParse.h"
 #include "WmResource.h"
@@ -203,9 +192,7 @@ MakePresenceBox(
         * Set the ClientData fields.
         */   
        XtRealizeWidget (pPres->shellW);
-#ifdef PANELIST
        DtWsmRemoveWorkspaceFunctions (DISPLAY1, XtWindow(pPres->shellW));
-#endif /* PANELIST */
 
        ProcessPresenceResources (pSD);
 
@@ -547,14 +534,9 @@ wspCreateWidgets(
        XmStringFree(tmpXmString);
 #endif
 
-#ifdef  PANELIST
        XtAddCallback (pPres->HelpW, XmNactivateCallback, 
                       WmDtWmTopicHelpCB, 
                       WM_DT_WSPRESENCE_TOPIC);
-#else /* PANELIST */
-       XtAddCallback (pPres->HelpW, XmNactivateCallback, 
-               (XtCallbackProc) wspHelpCB, (XtPointer)pSD); 
-#endif /* PANELIST */
     }
 
     return(rval);
@@ -1490,46 +1472,6 @@ wspOkCB(
     wspCancelCB (buttonW, (XtPointer)pSD, call_data);
 } /* END OF FUNCTION   */
 
-\f
-/*************************************<->*************************************
- *
- *  static void
- *  wspHelpCB (w, client_data, call_data)
- *
- *
- *  Description:
- *  -----------
- *  Help callback.
- *
- *
- *  Inputs:
- *  ------
- *  None.
- *
- * 
- *  Outputs:
- *  -------
- *  None.
- *
- *
- *  Comments:
- *  --------
- *  None.
- * 
- *************************************<->***********************************/
-
-#ifndef        PANELIST
-static void 
-wspHelpCB(
-        Widget buttonW,
-        XtPointer client_data,
-        XtPointer call_data )
-{
-
-    DtHelpOnTopic (XtParent(buttonW), "vw_pres");
-} /* END OF FUNCTION   */
-#endif /* PANELIST */
-\f
 /*************************************<->*************************************
  *
  *  static void
@@ -1817,6 +1759,4 @@ UpdatePresenceWorkspaces(
 
 } /* END OF FUNCTION UpdatePresenceWorkspaces */
 
-/* DO NOT ADD ANYTHING AFTER THIS ENDIF */
-#endif /* WSM */
 /****************************   eof    ***************************/
index 23ba29f1a5905f8d564d511e7a0657fc6cfb5d6b..8b862d752c4482326f31ff930c016072c2c05c6d 100644 (file)
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: WmPresence.h /main/4 1995/11/01 11:48:09 rswiston $ */
-#ifdef WSM
 /* 
  * (c) Copyright 1987, 1988, 1989, 1990, 1992 HEWLETT-PACKARD COMPANY 
  * ALL RIGHTS RESERVED 
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = ""
-#endif
-#endif
 
 /********    Public Function Declarations    ********/
 
@@ -47,4 +40,3 @@ extern MenuItem * GetPresenceBoxMenuItems(
 extern void UpdatePresenceWorkspaces( WmScreenData *pSD );
 
 /********    End Public Function Declarations    ********/
-#endif /* WSM */
index 7631191ae5ec6eed59ec2a9b1ccf248e267ea762..5cde076f5fcd4da80128b5e8d611ec37395d64d6 100644 (file)
 /* 
  * Motif Release 1.2.3
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmProperty.c /main/7 1997/12/02 10:00:00 bill $"
-#endif
-#endif
 /*
  * (c) Copyright 1987, 1988, 1989, 1990, 1993 HEWLETT-PACKARD COMPANY */
 
@@ -42,11 +37,9 @@ static char rcsid[] = "$TOG: WmProperty.c /main/7 1997/12/02 10:00:00 bill $"
 #include "WmGlobal.h"
 #include "WmICCC.h"
 #include <stdio.h>
-#ifdef WSM
 #include <Dt/WsmP.h>
 #include <X11/Xatom.h>
 #include <Xm/AtomMgr.h>
-#endif /* WSM */
 
 /*
  * include extern functions
@@ -119,7 +112,6 @@ GetNormalHints(
      *     ICCC_CURRENT version: nitems = PROP_SIZE_HINTS_ELEMENTS
      */
 
-#ifdef WSM
     if ((!HasProperty (pCD, XA_WM_NORMAL_HINTS)) ||
        ((Success != XGetWindowProperty (DISPLAY, pCD->client,
                        XA_WM_NORMAL_HINTS, 0L, (long)PROP_SIZE_HINTS_ELEMENTS,
@@ -128,15 +120,6 @@ GetNormalHints(
          (actualType != XA_WM_SIZE_HINTS) ||
          (nitems < (PROP_SIZE_HINTS_ELEMENTS - 3)) ||
          (actualFormat != 32)))
-#else /* WSM */
-    if ((Success != XGetWindowProperty (DISPLAY, pCD->client,
-                       XA_WM_NORMAL_HINTS, 0L, (long)PROP_SIZE_HINTS_ELEMENTS,
-                       False, XA_WM_SIZE_HINTS, &actualType, &actualFormat,
-                       &nitems, &leftover, (unsigned char **)&property)) ||
-        (actualType != XA_WM_SIZE_HINTS) ||
-        (nitems < (PROP_SIZE_HINTS_ELEMENTS - 3)) ||
-        (actualFormat != 32))
-#endif /* WSM */
     {
        /*
         * Indicate no property values were retrieved:
@@ -264,11 +247,9 @@ void ProcessWmProtocols (ClientData *pCD)
      */
 
 #ifndef ICCC_COMPLIANT
-#ifdef WSM
     if (!HasProperty (pCD, wmGD.xa_WM_PROTOCOLS))
        rValue = -1;
     else
-#endif /* WSM */
     rValue = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_WM_PROTOCOLS, 0L,
                 (long)MAX_CLIENT_PROTOCOL_COUNT, False, AnyPropertyType,
                 &actualType, &actualFormat, &nitems, &leftover,
@@ -277,11 +258,9 @@ void ProcessWmProtocols (ClientData *pCD)
 
     if ((rValue != Success) || (actualType == None) || (actualFormat != 32))
 #else
-#ifdef WSM
     if (!HasProperty (pCD, wmGD.xa_WM_PROTOCOLS))
        rValue = -1;
     else
-#endif /* WSM */
     rValue = XGetWMProtocols (DISPLAY, pCD->client, 
                 (Atom **)&property, &nitems);
 
@@ -389,11 +368,9 @@ void ProcessMwmMessages (ClientData *pCD)
      * Read the _MWM_MESSAGES property.
      */
 
-#ifdef WSM
     if (!HasProperty (pCD, wmGD.xa_MWM_MESSAGES))
         rValue = ~Success;
     else
-#endif /* WSM */
     rValue = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_MWM_MESSAGES, 0L,
                 (long)MAX_MWM_MESSAGES_COUNT, False, AnyPropertyType,
                 &actualType, &actualFormat, &nitems, &leftover,
@@ -486,8 +463,7 @@ void SetMwmInfo (Window propWindow, long flags, Window wmWindow)
 
 } /* END OF FUNCTION SetMwmInfo */
 
-#ifdef WSM
-\f
+
 /*************************************<->*************************************
  *
  *  SetMwmSaveSessionInfo (wmWindow)
@@ -522,7 +498,7 @@ void SetMwmSaveSessionInfo (Window wmWindow)
     SetWMState(wmWindow, NORMAL_STATE, 0);
     
 } /* END OF FUNCTION SetMwmSaveSessionInfo */
-#endif /* WSM */
+
 
 \f
 /*************************************<->*************************************
@@ -672,11 +648,9 @@ GetMwmHints(
     unsigned long leftover;
 
 
-#ifdef WSM
     if (!HasProperty(pCD, wmGD.xa_MWM_HINTS))
        ret_val = ~Success;
     else
-#endif /* WSM */
     ret_val = XGetWindowProperty (DISPLAY, pCD->client, wmGD.xa_MWM_HINTS, 
                  0L, PROP_MWM_HINTS_ELEMENTS,
                  False, wmGD.xa_MWM_HINTS, 
@@ -1108,7 +1082,6 @@ GetMwmMenuItems(
 
 } /* END OF FUNCTION GetMwmMenuItems */
 
-#ifdef WSM
 
 \f
 /*************************************<->*************************************
@@ -1960,7 +1933,7 @@ HasProperty (
     return (bFound);
 
 } /* END OF FUNCTION HasProperty */
-#endif /* WSM */
+
 
 
 
index 6d87d279bffb1b635ed7160cd6a1801116f45189..a7c24c436e8a8fdac16a1a69422f26a83363db8d 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2.3
 */ 
-/*   $XConsortium: WmProperty.h /main/4 1995/11/01 11:48:54 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 #include "WmICCC.h"
@@ -36,9 +35,7 @@ extern SizeHints * GetNormalHints (ClientData *pCD);
 extern void ProcessWmProtocols (ClientData *pCD);
 extern void ProcessMwmMessages (ClientData *pCD);
 extern void SetMwmInfo (Window propWindow, long flags, Window wmWindow);
-#ifdef WSM
 void SetMwmSaveSessionInfo (Window wmWindow);
-#endif /* WSM */
 extern void GetDtWmRequest (WmScreenData *pSD, char **pszReq, Boolean *pmore);
 extern void GetDtSessionHints (WmScreenData *pSD, int sNum);
 
@@ -50,7 +47,6 @@ extern void ProcessWmColormapWindows (ClientData *pCD);
 extern Colormap FindColormap (ClientData *pCD, Window window);
 extern MenuItem * GetMwmMenuItems (ClientData *pCD);
 extern void SetEmbeddedClientsProperty (Window propWindow, Window *pEmbeddedClients, unsigned long cEmbeddedClients);
-#ifdef WSM
 extern void GetInitialPropertyList (ClientData *pCD);
 extern Status GetWorkspaceHints (Display *display, Window window, Atom **ppWsAtoms, unsigned int *pCount, Boolean *pbAll);
 #ifdef HP_VUE
@@ -65,4 +61,4 @@ extern void SetCurrentWorkspaceProperty (WmScreenData *pSD);
 extern void SetWorkspaceInfoProperty (WmWorkspaceData *pWS);
 extern void DeleteWorkspaceInfoProperty (WmWorkspaceData *pWS);
 extern char *WorkspacePropertyName (WmWorkspaceData *pWS);
-#endif /* WSM */
+
index 051e94e33cbf3760e5d01f5a59e18470db8db3aa..5fde201a816ffff0694e8b29eba0c42de44f3ac0 100644 (file)
 /* 
  * Motif Release 1.2.3
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmProtocol.c /main/8 1997/06/18 17:31:34 samborn $"
-#endif
-#endif
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -54,14 +49,7 @@ static char rcsid[] = "$TOG: WmProtocol.c /main/8 1997/06/18 17:31:34 samborn $"
 #ifndef NO_WMQUERY 
 #include "WmEvent.h"
 #endif /* NO_WMQUERY */
-#ifdef PANELIST
 #include "WmPanelP.h"
-#endif /* PANELIST */
-
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# include "WmCmd.h"
-# include "WmDebug.h"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 
 /*
  * Function Declarations:
@@ -82,13 +70,6 @@ static void wmq_lose (Widget w, Atom *pSelection);
 static void wmq_bump_xids(void);
 #endif /* NO_WMQUERY */
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-static void    OwnWMSelections      (Time timestamp);
-static Boolean WMiConvert           (Widget, Atom, Atom,
-                                    XtPointer, unsigned long, int, Atom *,
-                                    XtPointer *, unsigned long *, int *);
-static void    WMiConvertCB         (Widget, XtPointer, XtPointer);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 
 /*
  * Global Variables:
@@ -125,49 +106,29 @@ int curXids = 0;
 void SetupWmICCC (void)
 {
     enum { 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-          XA_TARGETS, XA_MULTIPLE, XA_TIMESTAMP, 
-#endif
           XA_WM_STATE, XA_WM_PROTOCOLS, XA_WM_CHANGE_STATE,
           XA_WM_SAVE_YOURSELF, XA_WM_DELETE_WINDOW,
           XA_WM_COLORMAP_WINDOWS, XA_WM_TAKE_FOCUS, XA_MWM_HINTS,
           XA_MWM_MENU, XA_MWM_MESSAGES, XA_MOTIF_WM_OFFSET,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY))
+#if !defined(NO_WMQUERY)
           XA_MOTIF_WM_CLIENT_WINDOW, XA_MOTIF_WM_POINTER_WINDOW,
           XA_MOTIF_WM_ALL_CLIENTS,
-#endif
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-          XA_MOTIF_WM_DEFINE_COMMAND, XA_MOTIF_WM_INCLUDE_COMMAND,
-          XA_MOTIF_WM_REMOVE_COMMAND, XA_MOTIF_WM_ENABLE_COMMAND,
-          XA_MOTIF_WM_DISABLE_COMMAND, XA_MOTIF_WM_RENAME_COMMAND,
-          XA_MOTIF_WM_INVOKE_COMMAND, XA_MOTIF_WM_REQUEST_COMMAND,
-          XA_MOTIF_WM_WINDOW_FLAGS, XA_MOTIF_WM_AUTOMATION, 
 #endif
           XA_COMPOUND_TEXT, NUM_ATOMS };
 
     static char *atom_names[] = {
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-          _XA_TARGETS, _XA_MULTIPLE, _XA_TIMESTAMP, 
-#endif
           _XA_WM_STATE, _XA_WM_PROTOCOLS, _XA_WM_CHANGE_STATE,
           _XA_WM_SAVE_YOURSELF, _XA_WM_DELETE_WINDOW,
           _XA_WM_COLORMAP_WINDOWS, _XA_WM_TAKE_FOCUS, _XA_MWM_HINTS,
           _XA_MWM_MENU, _XA_MWM_MESSAGES, _XA_MOTIF_WM_OFFSET,
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL) || !defined(NO_WMQUERY))
+#if !defined(NO_WMQUERY)
 # ifdef _XA_MOTIF_WM_CLIENT_WINDOW
           _XA_MOTIF_WM_CLIENT_WINDOW, _XA_MOTIF_WM_POINTER_WINDOW,
           _XA_MOTIF_WM_ALL_CLIENTS, 
 # else
           "_MOTIF_WM_CLIENT_WINDOW", "_MOTIF_WM_POINTER_WINDOW",
-          "_MOTIF_WM_ALL_CLIENTS"
+          "_MOTIF_WM_ALL_CLIENTS",
 # endif
-#endif
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-          _XA_MOTIF_WM_DEFINE_COMMAND, _XA_MOTIF_WM_INCLUDE_COMMAND,
-          _XA_MOTIF_WM_REMOVE_COMMAND, _XA_MOTIF_WM_ENABLE_COMMAND,
-          _XA_MOTIF_WM_DISABLE_COMMAND, _XA_MOTIF_WM_RENAME_COMMAND,
-          _XA_MOTIF_WM_INVOKE_COMMAND, _XA_MOTIF_WM_REQUEST_COMMAND,
-          _XA_MOTIF_WM_WINDOW_FLAGS, _XA_MOTIF_WM_AUTOMATION, 
 #endif
           "COMPOUND_TEXT"
     };
@@ -182,14 +143,6 @@ void SetupWmICCC (void)
      */
     XInternAtoms(DISPLAY, atom_names, XtNumber(atom_names), False, atoms);
 
-
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    wmGD.xa_TARGETS                    = atoms[XA_TARGETS];
-
-    wmGD.xa_MULTIPLE                   = atoms[XA_MULTIPLE];
-    wmGD.xa_TIMESTAMP                  = atoms[XA_TIMESTAMP];
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
     wmGD.xa_WM_STATE                   = atoms[XA_WM_STATE];
     wmGD.xa_WM_PROTOCOLS               = atoms[XA_WM_PROTOCOLS];
     wmGD.xa_WM_CHANGE_STATE            = atoms[XA_WM_CHANGE_STATE];
@@ -202,36 +155,6 @@ void SetupWmICCC (void)
     wmGD.xa_MWM_MESSAGES               = atoms[XA_MWM_MESSAGES];
     wmGD.xa_MWM_OFFSET                 = atoms[XA_MOTIF_WM_OFFSET];
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    /* wm query targets */
-    wmGD._MOTIF_WM_CLIENT_WINDOW  = atoms[XA_MOTIF_WM_CLIENT_WINDOW];
-    wmGD._MOTIF_WM_POINTER_WINDOW = atoms[XA_MOTIF_WM_POINTER_WINDOW];
-    wmGD._MOTIF_WM_ALL_CLIENTS   = atoms[XA_MOTIF_WM_ALL_CLIENTS];
-
-    /* intern atoms for Client-Commmand Interface protocol. */
-    wmGD._MOTIF_WM_DEFINE_COMMAND = atoms[XA_MOTIF_WM_DEFINE_COMMAND];
-    wmGD._MOTIF_WM_INCLUDE_COMMAND= atoms[XA_MOTIF_WM_INCLUDE_COMMAND];
-    wmGD._MOTIF_WM_REMOVE_COMMAND = atoms[XA_MOTIF_WM_REMOVE_COMMAND];
-    wmGD._MOTIF_WM_ENABLE_COMMAND = atoms[XA_MOTIF_WM_ENABLE_COMMAND];
-    wmGD._MOTIF_WM_DISABLE_COMMAND= atoms[XA_MOTIF_WM_DISABLE_COMMAND];
-    wmGD._MOTIF_WM_RENAME_COMMAND = atoms[XA_MOTIF_WM_RENAME_COMMAND];
-    wmGD._MOTIF_WM_INVOKE_COMMAND = atoms[XA_MOTIF_WM_INVOKE_COMMAND];
-    wmGD._MOTIF_WM_REQUEST_COMMAND= atoms[XA_MOTIF_WM_REQUEST_COMMAND];
-    wmGD._MOTIF_WM_WINDOW_FLAGS          = atoms[XA_MOTIF_WM_WINDOW_FLAGS];
-
-    wmGD._MOTIF_WM_AUTOMATION    = atoms[XA_MOTIF_WM_AUTOMATION];
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    /*
-     * Assert ownership of the WINDOW_MANAGER selection
-     * on each screen that the window manager controls.
-     * these use the format WM_Si.
-     */
-    OwnWMSelections(GetTimestamp());
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
     wmGD.xa_COMPOUND_TEXT = atoms[XA_COMPOUND_TEXT];
 
 #ifndef NO_WMQUERY
@@ -339,7 +262,6 @@ void SendConfigureNotify (ClientData *pCD)
     notifyEvent.display = DISPLAY;
     notifyEvent.event = pCD->client;
     notifyEvent.window = pCD->client;
-#ifdef PANELIST
     if (pCD->pECD)
     {
        int rootX, rootY;
@@ -362,8 +284,6 @@ void SendConfigureNotify (ClientData *pCD)
        notifyEvent.height = pCD->clientHeight;
     }
     else
-#else /* PANELIST */
-#endif /* PANELIST */
     if (pCD->maxConfig)
     {
        notifyEvent.x = pCD->maxX;
@@ -1151,367 +1071,3 @@ wmq_bump_xids ( void )
 }
 
 #endif /* NO_WMQUERY */
-
-
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  static void OwnWMSelections ()
- *
- *
- *  Description:
- *  -----------
- *  Get the selection ownership for each managed screen.  The selection mwm
- *  will own is WM_Si.
- *
- *  Inputs:
- *  ------
- *  
- *  
- *  
- *
- *  Outputs:
- *  ------
- *
- *  Comments:
- *  --------
- *  
- *
- *************************************<->***********************************/
-static void
-OwnWMSelections ( Time timestamp )
-{
-  int scr;
-  
-  
-  wmGD.xa_WM = (Atom *) XtMalloc (wmGD.numScreens * (sizeof (Atom)));
-  
-  for (scr = 0; scr < wmGD.numScreens; scr++)
-    {
-      if (wmGD.Screens[scr].managed)
-       {
-         char wm_scr[8];
-         
-         sprintf(wm_scr, "WM_S%d", DefaultScreen(DISPLAY));
-         wmGD.xa_WM[scr] = XInternAtom (DISPLAY, wm_scr, False);
-         
-#ifdef MWM_WSM
-         /*
-          * This registers the callback to be invoked when a request
-          * is made against a WSM Protocol target.  The request
-          * callback is stored by the WSM Protocol code and is
-          * invoked in the convert routine (WMiConvert) below.
-          * See WSMProcessProtoTargets().
-          */
-
-         WSMRegisterRequestCallback(DISPLAY, scr, HandleWsmConvertRequest,
-                                    NULL);
-#endif
-
-         /*
-          * Own the selection through UTM.  This sets-up a convert function
-          * that is invoked when a convert request is made on this selection.
-          * The convert function is specified in the drawing area's
-          * XmNconvertCallback resource.
-          */
-
-         XtAddCallback(wmGD.Screens[scr].utmShell, XmNconvertCallback,
-                       WMiConvertCB, NULL);
-
-         if (! XmeNamedSource(wmGD.Screens[scr].utmShell,
-                              wmGD.xa_WM[scr], timestamp))
-           {
-             Warning (((char *)GETMESSAGE(56, 6,
-                                          "Failed to own WM_nn selection")));
-           }
-         else
-           {
-             PRINT("Owning selection %s\n", wm_scr);
-           }
-       }
-    }
-}
-
-
-
-\f
-/*************************************<->*************************************
- *
- *  Boolean WMiConvert ( )
- *
- *
- *  Description:
- *  -----------
- *  This function converts WM_Si selections using the new param selections
- *
- *************************************<->***********************************/
-
-/*ARGSUSED*/
-static Boolean
-WMiConvert (
-     Widget         w,
-     Atom           selection,
-     Atom           target,
-     XtPointer      input,
-     unsigned long  inputLen,
-     int            inputFmt,
-     Atom          *outputType,
-     XtPointer     *output,
-     unsigned long *outputLen,
-     int           *outputFmt)
-{
-  int      scr;
-  Boolean  found = False;
-
-  
-  /* set up some defaults. selection code doesn't like garbage! */
-  *outputLen = 0;
-  *output    = NULL;
-  *outputFmt = 8;
-
-  scr = XScreenNumberOfScreen(XtScreen(w));
-  if (!wmGD.Screens[scr].managed)
-    {
-      Warning (((char *)GETMESSAGE(56, 7,
-               "Got convert request from unmanaged screen")));
-      found = False;
-    }
-  
-  else {
-    if (target == wmGD.xa_TARGETS) {
-      Atom *targs       = (Atom *)XtMalloc((unsigned) (28 * sizeof(Atom)));
-      int   targetCount = 0;
-      
-      *output = (XtPointer) targs;
-      
-      /* required targets */
-      *targs++ = wmGD.xa_TARGETS;                              targetCount++;
-      *targs++ = wmGD.xa_MULTIPLE;                             targetCount++;
-      *targs++ = wmGD.xa_TIMESTAMP;                            targetCount++;
-
-#ifdef MWM_WSM
-      /* other targets */
-      *targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_CONNECT);    targetCount++;
-      *targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_EXTENSIONS); targetCount++;
-      *targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_CONFIG_FMT); targetCount++;
-      *targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_GET_STATE);  targetCount++;
-      *targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_SET_STATE);  targetCount++;
-      *targs++ = _WSMReqTypeToTarget(DISPLAY, WSM_REG_WINDOW); targetCount++;
-#endif
-      
-      /* menu command interface support */
-      *targs++ = wmGD._MOTIF_WM_DEFINE_COMMAND;                        targetCount++;
-      *targs++ = wmGD._MOTIF_WM_INCLUDE_COMMAND;               targetCount++;
-      *targs++ = wmGD._MOTIF_WM_REMOVE_COMMAND;                        targetCount++;
-      *targs++ = wmGD._MOTIF_WM_ENABLE_COMMAND;                        targetCount++;
-      *targs++ = wmGD._MOTIF_WM_DISABLE_COMMAND;               targetCount++;
-      *targs++ = wmGD._MOTIF_WM_RENAME_COMMAND;                        targetCount++;
-      *targs++ = wmGD._MOTIF_WM_INVOKE_COMMAND;                        targetCount++;
-      *targs++ = wmGD._MOTIF_WM_REQUEST_COMMAND;               targetCount++;
-      *targs++ = wmGD._MOTIF_WM_WINDOW_FLAGS;                  targetCount++;
-
-#ifdef MWM_WSM
-      /* virtual screen support */
-      *targs++ = wmGD._MOTIF_WM_PAN;                           targetCount++;
-      *targs++ = wmGD._MOTIF_WM_GOTO;                          targetCount++;
-#endif
-
-      /* automation support */
-
-      *targs++ = wmGD._MOTIF_WM_AUTOMATION;                     targetCount++;
-      
-      *outputType   = XA_ATOM;
-      *outputLen = (targetCount * sizeof(Atom)) >> 2;
-      *outputFmt = 32;
-      
-      found = True;
-    }
-
-#ifdef MWM_WSM    
-    /* virtual screen support */
-    else if (target == wmGD._MOTIF_WM_PAN)
-      {
-       int     dx, dy;
-       Boolean config;
-
-       dx     = (int) UnpackCARD32(&input);
-       dy     = (int) UnpackCARD32(&input);
-       config = (Boolean) UnpackCARD8(&input);
-
-       PanRoot(dx, dy, config);
-
-       /*
-        * Update the root property
-        */
-
-       SetPanPosition (ACTIVE_PSD->panDx, ACTIVE_PSD->panDy);
-       
-       found = True;
-      }
-    else if (target == wmGD._MOTIF_WM_GOTO)
-      {
-       int  x, y;
-
-       x = (int) UnpackCARD32(&input);
-       y = (int) UnpackCARD32(&input);
-
-       PanRoot(x - ACTIVE_PSD->panDx, y - ACTIVE_PSD->panDy, 1);
-
-       found = True;
-      }
-    
-    /*
-     * Handle the workspace manager protocol targets...
-     */
-    
-    else if (WSMIsKnownTarget(w, target))
-      {
-       /*
-        * Unpack data send in request and invoke CB specified
-        * in WSMRegisterRequestCallback.
-        */
-       found = WSMProcessProtoTarget
-                       (w, target,
-                        input, inputLen, inputFmt,
-                        outputType, output, outputLen, outputFmt);
-      }
-#endif /* MWM_WSM */
-    
-    /*
-     *  Handle client-command interface targets.
-     */
-    
-    else if (target == wmGD._MOTIF_WM_DEFINE_COMMAND)
-      {
-       PRINT("Convert request made for _MOTIF_WM_DEFINE_COMMAND.\n");
-       DefineCommand(w, target, (MessageData)input, inputLen, inputFmt);
-       PRINT("Returning from _MOTIF_WM_DEFINE_COMMAND.\n");
-       
-       found = True;
-      }
-    else if (target == wmGD._MOTIF_WM_INCLUDE_COMMAND)
-      {
-       PRINT("Convert request made for _MOTIF_WM_INCLUDE_COMMAND.\n");
-       IncludeCommand(w, target, (MessageData)input, inputLen, inputFmt);
-       PRINT("Returning from _MOTIF_WM_INCLUDE_COMMAND.\n");
-       
-       found = True;
-      }
-    else if (target == wmGD._MOTIF_WM_REMOVE_COMMAND)
-      {
-       PRINT("Convert request made for _MOTIF_WM_REMOVE_COMMAND.\n");
-       RemoveCommand(w, target, (MessageData)input, inputLen, inputFmt);
-       
-       found = True;
-      }
-    else if (target == wmGD._MOTIF_WM_ENABLE_COMMAND)
-      {
-       PRINT("Convert request made for _MOTIF_WM_ENABLE_COMMAND.\n");
-       EnableCommand(w, target, (MessageData)input, inputLen, inputFmt);
-       
-       found = True;
-      }
-    else if (target == wmGD._MOTIF_WM_DISABLE_COMMAND)
-      {
-       PRINT("Convert request made for _MOTIF_WM_DISABLE_COMMAND.\n");
-       DisableCommand(w, target, (MessageData)input, inputLen, inputFmt);
-       
-       found = True;
-      }
-    else if (target == wmGD._MOTIF_WM_RENAME_COMMAND)
-      {
-       PRINT("Convert request made for _MOTIF_WM_RENAME_COMMAND.\n");
-       RenameCommand(w, target, (MessageData)input, inputLen, inputFmt);
-       
-       found = True;
-      }
-    else if (target == wmGD._MOTIF_WM_INVOKE_COMMAND)
-      {
-       /* Shouldn't get here! */
-      }
-    else if (target == wmGD._MOTIF_WM_REQUEST_COMMAND)
-      {
-      }
-    else if (target == wmGD._MOTIF_WM_WINDOW_FLAGS)
-      {
-      }
-    
-    else if (target == wmGD._MOTIF_WM_AUTOMATION)
-      {
-       /*
-        * This function needs to pack the necessary info into the
-        * output data variable to send back to the requesting
-        */
-
-       GetAutomationData(input,outputType,output,outputLen,outputFmt);
-       found = True;
-      }
-
-    else
-      Warning (((char *)GETMESSAGE(56, 8,
-               "Conversion request made for unknown target type")));
-  }
-  
-  
-  return (found);
-}
-
-
-
-\f
-/*************************************<->*************************************
- *
- *  void WMiConvertCB ( )
- *
- *
- *  Description:
- *  -----------
- *  This function is invoked by UTM to handle the convert request
- *  made by a requesting application.
- *
- *
- *  Comments:
- *  --------
- *  This function is set-up as a callback on a drawing area kept on each
- *  screen.  This is done in WmInitWs.c
- *
- *************************************<->***********************************/
-
-/*ARGSUSED*/
-static void
-WMiConvertCB (
-     Widget    w,
-     XtPointer clientData,
-     XtPointer callData)
-{
-  XmConvertCallbackStruct *cnv = (XmConvertCallbackStruct *)callData;
-  Atom _MOTIF_LOSE_SELECTION =
-    XInternAtom(DISPLAY, "_MOTIF_LOSE_SELECTION", False);
-  int scr = XScreenNumberOfScreen(XtScreen(w));
-  
-
-  /* Check to make sure we're dealing with the right selection.
-   */
-  if (cnv->selection != wmGD.xa_WM[scr])
-    {
-      Warning (((char *)GETMESSAGE(56, 9,
-               "Conversion request received for unknown selection")));
-      return;
-    }
-
-  if (cnv->target == _MOTIF_LOSE_SELECTION)
-    {
-      /* Done with the conversion - free any data used. */
-    }
-
-  /* Handle a conversion request with parameter data.
-   */
-  else
-    {
-      WMiConvert (w, cnv->selection, cnv->target,
-                 cnv->parm, cnv->parm_length, cnv->parm_format,
-                 &(cnv->type), &(cnv->value), &(cnv->length), &(cnv->format));
-    }
-}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
index 678c3b99660ddf6c63c9a2477a596bb39894b098..6c27a96dfadb275edcf0b1173e6145b9ec0b940a 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmProtocol.h /main/4 1995/11/01 11:49:37 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index d101e71ab6e2cfddd008d5947abae63186374621..c24852b85a6d97429095988f0b6d5b133335a0ab 100644 (file)
 /* 
  * Motif Release 1.2.4
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmResCvt.c /main/4 1995/11/01 11:49:54 rswiston $"
-#endif
-#endif
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -44,13 +39,9 @@ static char rcsid[] = "$XConsortium: WmResCvt.c /main/4 1995/11/01 11:49:54 rswi
 #include <ctype.h>
 #include <stdio.h>
 
-#ifndef NO_MULTIBYTE
 #include <stdlib.h>
-#endif
 
-#ifndef MOTIF_ONE_DOT_ONE
 #include <Xm/XmosP.h>
-#endif
 
 /*
  * include extern functions
@@ -101,10 +92,8 @@ long           DecStrToL ();
 
 void AddWmResourceConverters (void)
 {
-#ifdef WSM
     XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRAbsentMapBehavior, 
        (XtConverter)WmCvtStringToAMBehavior, NULL, 0);
-#endif /* WSM */
     XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRCFocusPolicy, 
        (XtConverter)WmCvtStringToCFocus, NULL, 0);
     XtAppAddConverter (wmGD.mwmAppContext, XtRString, WmRClientDecor, 
@@ -128,8 +117,6 @@ void AddWmResourceConverters (void)
 
 } /* END OF FUNCTION AddWmResourceConverters */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  WmCvtStringToAMBehavior (args, numArgs, fromVal, toVal)
@@ -215,7 +202,6 @@ void WmCvtStringToAMBehavior (XrmValue *args, Cardinal numArgs, XrmValue *fromVa
 
 
 } /* END OF FUNCTION WmCvtStringToAMBehavior */
-#endif /* WSM */
 
 \f
 /*************************************<->*************************************
@@ -1511,10 +1497,9 @@ unsigned char *NextToken (unsigned char *pchIn, int *pLen,
        unsigned char **ppchNext)
 {
     unsigned char *pchR = pchIn;
-    register int   i;
+    int   i;
 
-#ifndef NO_MULTIBYTE
-    register int   chlen;
+    int   chlen;
 
     for (i = 0;
         ((chlen = mblen((char *)pchIn, MB_CUR_MAX)) > 0) && (pchIn[0] != '\0');
@@ -1528,13 +1513,6 @@ unsigned char *NextToken (unsigned char *pchIn, int *pLen,
        pchIn += chlen;
     }
 
-#else
-    for (i = 0; *pchIn && !isspace (*pchIn); i++, pchIn++)
-    /* find end of word */
-    {
-    }
-#endif
-
     /* skip to next word */
     ScanWhitespace (&pchIn);
 
@@ -1583,7 +1561,6 @@ unsigned char *NextToken (unsigned char *pchIn, int *pLen,
 
 Boolean StringsAreEqual (unsigned char *pch1, unsigned char *pch2, int len)
 {
-#ifndef NO_MULTIBYTE
     int       chlen1;
     int       chlen2;
     wchar_t   wch1;
@@ -1615,15 +1592,6 @@ Boolean StringsAreEqual (unsigned char *pch1, unsigned char *pch2, int len)
         len--;
     }
 
-#else
-    while (len  && *pch1 && *pch2 &&
-          ((isupper (*pch1) ? tolower(*pch1++) : *pch1++) ==
-           (isupper (*pch2) ? tolower(*pch2++) : *pch2++)))
-    {
-        len--;
-    }
-#endif
-
     return (len == 0);
 
 } /* END OF StringsAreEqual */   
@@ -1665,26 +1633,16 @@ long DecStrToL (unsigned char *str, unsigned char **ptr)
     long  val = 0;
 
     *ptr = str;
-#ifndef NO_MULTIBYTE
     while ((mblen ((char *)str, MB_CUR_MAX) == 1) && isspace (*str))
-#else
-    while (isspace (*str))
-#endif
     /* Ignore leading whitespace */
     {
         str++;
     }
 
     /* If we can start, we will reset *ptr */
-#ifndef NO_MULTIBYTE
     if ((mblen ((char *)str, MB_CUR_MAX) == 1) && isdigit (*str))
     {
         while ((mblen ((char *)str, MB_CUR_MAX) == 1) && isdigit (*str))
-#else
-    if (isdigit (*str))
-    {
-        while (isdigit (*str))
-#endif
         {
            val = val * 10 + (*str - '0');
            str++;
index 883ffbd4133378811aa6db56c51730b7a7b58608..563db382610d77f8b64e38c1ae150f41f868f1a9 100644 (file)
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmResCvt.h /main/4 1995/11/01 11:50:23 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
 extern void AddWmResourceConverters (void);
-#ifdef WSM
 extern void WmCvtStringToAMBehavior (XrmValue *args, Cardinal numArgs, 
                                 XrmValue *fromVal, XrmValue *toVal);
-#endif /* WSM */
 extern void WmCvtStringToCFocus (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal);
 extern void WmCvtStringToCDecor (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal);
 extern void WmCvtStringToCFunc (XrmValue *args, Cardinal numArgs, XrmValue *fromVal, XrmValue *toVal);
index 6fc7110e51b220b29be5aded11a5b73c19b2b8a7..bba1a8bded2f5e5deb2296b657bbbb8b6f8ac6a1 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmResNames.h /main/6 1996/06/11 16:00:36 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990, 1993 HEWLETT-PACKARD COMPANY */
 
 
 /* mwm specific appearance and behavior resources: */
 
-#ifdef WSM
 #define WmNall                         "all"
-#endif /* WSM */
 #define WmNautoKeyFocus                        "autoKeyFocus"
 #define WmNautoRaiseDelay              "autoRaiseDelay"
-#ifdef WSM
 #define WmNbackdropDirectories         "backdropDirectories"
-#endif /* WSM */
 #define WmNbitmapDirectory             "bitmapDirectory"
-#ifdef MINIMAL_DT
 #define WmNblinkOnExec                 "blinkOnExec"
-#endif /* MINIMAL_DT */
 #define WmNbuttonBindings              "buttonBindings"
 #define WmNcleanText                   "cleanText"
 #define WmNclientAutoPlace             "clientAutoPlace"
 #define WmNcolormapFocusPolicy         "colormapFocusPolicy"
 #define WmNconfigFile                  "configFile"
-#ifdef WSM
 #define WmNcppCommand                  "cppCommand"
-#endif /* WSM */
 #define WmNdeiconifyKeyFocus           "deiconifyKeyFocus"
 #define WmNdoubleClickTime             "doubleClickTime"
 #define WmNenableWarp                  "enableWarp"
 #define WmNfadeNormalIcon              "fadeNormalIcon"
 #define WmNfeedbackGeometry            "feedbackGeometry"
 #define WmNframeBorderWidth            "frameBorderWidth"
-#ifdef WSM
 #define WmNframeExternalShadowWidth    "frameExternalShadowWidth"
-#endif /* WSM */
 #define WmNfreezeOnConfig              "freezeOnConfig"
-#ifdef WSM
 #define WmNgeometry                    "geometry"
-#endif /* WSM */
 #define WmNiconAutoPlace               "iconAutoPlace"
 #define WmNiconBoxGeometry             "iconBoxGeometry"
 #define WmNiconBoxLayout               "iconBoxLayout"
 #define WmNiconBoxTitle                        "iconBoxTitle"
 #define WmNiconClick                   "iconClick"
 #define WmNiconDecoration              "iconDecoration"
-#ifdef WSM
 #define WmNiconExternalShadowWidth     "iconExternalShadowWidth"
-#endif /* WSM */
 #define WmNiconImageMaximum            "iconImageMaximum"
 #define WmNiconImageMinimum            "iconImageMinimum"
 #define WmNiconPlacement               "iconPlacement"
 #define WmNiconPlacementMargin         "iconPlacementMargin"
-#ifdef WSM
 #define WmNimage                       "image"
 #define WmNimageBackground             "imageBackground"
 #define WmNimageForeground             "imageForeground"
-#endif /* WSM */
 #define WmNinteractivePlacement                "interactivePlacement"
 #define WmNkeyBindings                 "keyBindings"
 #define WmNkeyboardFocusPolicy         "keyboardFocusPolicy"
 #define WmNlimitResize                 "limitResize"
 #define WmNlowerOnIconify              "lowerOnIconify"
-#ifdef WSM
 #define WmNmarqueeSelectGranularity    "marqueeSelectGranularity"
-#endif /* WSM */
 #define WmNmaximumMaximumSize          "maximumMaximumSize"
 #define WmNmoveThreshold               "moveThreshold"
 #define WmNmultiScreen                 "multiScreen"
 #define WmNpositionOnScreen            "positionOnScreen"
 #define WmNquitTimeout                 "quitTimeout"
 #define WmNraiseKeyFocus               "raiseKeyFocus"
-#ifdef WSM
 #define WmNrefreshByClearing           "refreshByClearing"
-#endif
 #define WmNresizeBorderWidth           "resizeBorderWidth"
 #define WmNresizeCursors               "resizeCursors"
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# define WmNrootMenu                   "rootMenu"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-#ifdef WSM
 #define WmNrootButtonClick             "rootButtonClick"
 #define WmNsecondariesOnTop            "secondariesOnTop"
 #define WmNsessionVersion               "sessionVersion"
-#endif /* WSM */
-#ifndef WSM
-#define WmNsessionClientDB             "sessionClientDB"
-#endif /* ! WSM */
 #define WmNshowFeedback                        "showFeedback"
-#ifdef WSM
 #define WmNshowNames                   "showNames"
-#endif /* WSM */
 #define WmNstartupKeyFocus             "startupKeyFocus"
-#ifdef PANELIST
 #define WmNsubpanelDecoration          "subpanelDecoration"
 #define WmNsubpanelResources            "subpanelResources"
-#endif /* PANELIST */
 #define WmNsystemButtonClick           "wMenuButtonClick"
 #define WmNsystemButtonClick2          "wMenuButtonClick2"
 #define WmNtransientDecoration         "transientDecoration"
 #define WmNtransientFunctions          "transientFunctions"
-#ifdef PANELIST
 #define WmNuseFrontPanel               "useFrontPanel"
-#endif /* PANELIST */
 #define WmNuseIconBox                  "useIconBox"
-#ifdef WSM
 #define WmNuseWindowOutline            "useWindowOutline"
-#endif /* WSM */
-#ifdef MINIMAL_DT
 #define WmNdtLite                      "useDtLite"
-#endif /* MINIMAL_DT */
 #define WmNmoveOpaque                   "moveOpaque"
 #define WmNframeStyle                  "frameStyle"
 
 
 /* mwm - client specific resources: */
 
-#ifdef WSM
 #define WmNabsentMapBehavior           "absentMapBehavior"
-#endif /* WSM */
 #define WmNclientDecoration            "clientDecoration"
 #define WmNclientFunctions             "clientFunctions"
 #define WmNfocusAutoRaise              "focusAutoRaise"
-#ifdef WSM
 #define WmNhelpResources                "helpResources"
-#endif /* WSM */
 #define WmNiconImage                   "iconImage"
 #define WmNiconImageBackground         "iconImageBackground"
 #define WmNiconImageBottomShadowColor  "iconImageBottomShadowColor"
 #define WmNiconImageTopShadowColor     "iconImageTopShadowColor"
 #define WmNiconImageTopShadowPixmap    "iconImageTopShadowPixmap"
 #define WmNignoreWMSaveHints            "ignoreWMSaveHints"
-#ifdef WSM
 #define WmNinitialWorkspace             "initialWorkspace"
-#endif /* WSM */
 #define WmNmatteBackground             "matteBackground"
 #define WmNmatteBottomShadowColor      "matteBottomShadowColor"
 #define WmNmatteBottomShadowPixmap     "matteBottomShadowPixmap"
 #define WmNsystemMenu                  "windowMenu"
 #define WmNuseClientIcon               "useClientIcon"
 #define WmNusePPosition                        "usePPosition"
-#ifdef WSM
 #define WmNworkspaceList               "workspaceList"
 #define WmNworkspaceCount              "workspaceCount"
-#endif /* WSM */
 
 /* window manager part resource names: */
 
 #define WmNmenu                                "menu"
 #define WmNtitle                       "title"
 #define WmNdefaults                    "defaults"
-#ifdef WSM
 #define WmNbackdrop                    "backdrop"
 #define WmNcolorSetId                  "colorSetId"
 #define WmNfrontPanel                  "frontPanel"
 #define WmNworkspaceController         "workspaceController"
 #define WmNworkspacePresence           "workspacePresence"
 #define WmNworkspaceSwitch             "workspaceSwitch"
-#endif /* WSM */
 
 /* window manager client resource names: */
 
 #define WmNiconBox                     "iconbox"
 #define WmNconfirmbox                  "confirmbox"
-#ifdef WSM
 #define WmNswitcher                    "switcher"
-#endif /* WSM */
 
 
 \f
 
 #define WmCAutoKeyFocus                        "AutoKeyFocus"
 #define WmCAutoRaiseDelay              "AutoRaiseDelay"
-#ifdef WSM
 #define WmCBackdropDirectories         "BackdropDirectories"
-#endif /* WSM */
 #define WmCBitmapDirectory             "BitmapDirectory"
-#ifdef MINIMAL_DT
 #define WmCBlinkOnExec                 "BlinkOnExec"
-#endif /* MINIMAL_DT */
 #define WmCButtonBindings              "ButtonBindings"
 #define WmCCleanText                   "CleanText"
 #define WmCClientAutoPlace             "ClientAutoPlace"
 #define WmCColormapFocusPolicy         "ColormapFocusPolicy"
 #define WmCConfigFile                  "ConfigFile"
-#ifdef WSM
 #define WmCCppCommand                  "CppCommand"
-#endif /* WSM */
 #define WmCDeiconifyKeyFocus           "DeiconifyKeyFocus"
 #define WmCDoubleClickTime             "DoubleClickTime"
 #define WmCEnableWarp                  "EnableWarp"
 #define WmCFadeNormalIcon              "FadeNormalIcon"
 #define WmCFeedbackGeometry            "FeedbackGeometry"
 #define WmCFrameBorderWidth            "FrameBorderWidth"
-#ifdef WSM
 #define WmCFrameExternalShadowWidth    "FrameExternalShadowWidth"
-#endif /* WSM */
 #define WmCFreezeOnConfig              "FreezeOnConfig"
-#ifdef WSM
 #define WmCGeometry                    "Geometry"
-#endif /* WSM */
 #define WmCIconAutoPlace               "IconAutoPlace"
 #define WmCIconBoxGeometry             "IconBoxGeometry"
 #define WmCIconBoxLayout               "IconBoxLayout"
 #define WmCIconBoxTitle                        "IconBoxTitle"
 #define WmCIconClick                   "IconClick"
 #define WmCIconDecoration              "IconDecoration"
-#ifdef WSM
 #define WmCIconExternalShadowWidth     "IconExternalShadowWidth"
-#endif /* WSM */
 #define WmCIconImageMaximum            "IconImageMaximum"
 #define WmCIconImageMinimum            "IconImageMinimum"
 #define WmCIconPlacement               "IconPlacement"
 #define WmCIconPlacementMargin         "IconPlacementMargin"
-#ifdef WSM
 #define WmCImage                       "Image"
 #define WmCImageBackground             "ImageBackground"
 #define WmCImageForeground             "ImageForeground"
-#endif /* WSM */
 #define WmCInteractivePlacement                "InteractivePlacement"
 #define WmCKeyBindings                 "KeyBindings"
 #define WmCKeyboardFocusPolicy         "KeyboardFocusPolicy"
 #define WmCLimitResize                 "LimitResize"
 #define WmCLowerOnIconify              "LowerOnIconify"
-#ifdef WSM
 #define WmCMarqueeSelectGranularity    "MarqueeSelectGranularity"
-#endif /* WSM */
 #define WmCMaximumMaximumSize          "MaximumMaximumSize"
 #define WmCMoveThreshold               "MoveThreshold"
 #define WmCMultiScreen                 "MultiScreen"
 #define WmCPositionOnScreen            "PositionOnScreen"
 #define WmCQuitTimeout                 "QuitTimeout"
 #define WmCRaiseKeyFocus               "RaiseKeyFocus"
-#ifdef WSM
 #define WmCRefreshByClearing           "RefreshByClearing"
-#endif
 #define WmCResizeBorderWidth           "ResizeBorderWidth"
 #define WmCResizeCursors               "ResizeCursors"
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# define WmCRootMenu                   "RootMenu"
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-#ifdef WSM
 #define WmCRootButtonClick             "RootButtonClick"
 #define WmCSecondariesOnTop            "SecondariesOnTop"
 #define WmCSessionVersion               "SessionVersion"
-#endif /* WSM */
-#ifndef WSM
-#define WmCSessionClientDB             "SessionClientDB"
-#endif /* ! WSM */
 #define WmCScreenList                  "ScreenList"
 #define WmCScreens                     "Screens"
 #define WmCShowFeedback                        "ShowFeedback"
-#ifdef WSM
 #define WmCShowNames                   "ShowNames"
-#endif /* WSM */
 #define WmCStartupKeyFocus             "StartupKeyFocus"
-#ifdef PANELIST
 #define WmCSubpanelDecoration          "SubpanelDecoration"
 #define WmCSubpanelResources            "SubpanelResources"
-#endif /* PANELIST */
 #define WmCSystemButtonClick           "WMenuButtonClick"
 #define WmCSystemButtonClick2          "WMenuButtonClick2"
 #define WmCTransientDecoration         "TransientDecoration"
 #define WmCTransientFunctions          "TransientFunctions"
-#ifdef PANELIST
 #define WmCUseFrontPanel               "UseFrontPanel"
-#endif /* PANELIST */
 #define WmCUseIconBox                  "UseIconBox"
-#ifdef WSM
 #define WmCUseWindowOutline            "UseWindowOutline"
-#endif /* WSM */
-#ifdef MINIMAL_DT
 #define WmCDtLite                      "UseDtLite"
-#endif /* MINIMAL_DT */
 #define WmCMoveOpaque                   "MoveOpaque"
 #define WmCFrameStyle                  "FrameStyle"
-#ifdef WSM
 #define WmCWorkspaceList               "WorkspaceList"
 #define WmCWorkspaceCount              "WorkspaceCount"
-#endif /* WSM */
 
 /* component appearance resources: */
 
 
 /* mwm - client specific resources: */
 
-#ifdef WSM
 #define WmCAbsentMapBehavior           "AbsentMapBehavior"
-#endif /* WSM */
 #define WmCClientDecoration            "ClientDecoration"
 #define WmCClientFunctions             "ClientFunctions"
 #define WmCFocusAutoRaise              "FocusAutoRaise"
-#ifdef WSM
 #define WmCHelpResources                "HelpResources"
-#endif /* WSM */
 #define WmCIconImage                   "IconImage"
 #define WmCIconImageBackground         "IconImageBackground"
 #define WmCIconImageBottomShadowColor  "IconImageBottomShadowColor"
 #define WmCIconImageTopShadowColor     "IconImageTopShadowColor"
 #define WmCIconImageTopShadowPixmap    "IconImageTopShadowPixmap"
 #define WmCIgnoreWMSaveHints            "IgnoreWMSaveHints"
-#ifdef WSM
 #define WmCInitialWorkspace             "InitialWorkspace"
-#endif /* WSM */
 #define WmCMatteBackground             "MatteBackground"
 #define WmCMatteBottomShadowColor      "MatteBottomShadowColor"
 #define WmCMatteBottomShadowPixmap     "MatteBottomShadowPixmap"
 #define WmCMenu                                "Menu"
 #define WmCTitle                       "Title"
 #define WmCDefaults                    "Defaults"
-#ifdef WSM
 #define WmCBackdrop                    "Backdrop"
 #define WmCColorSetId                  "ColorSetId"
 #define WmCFrontPanel                  "FrontPanel"
 #define WmCWorkspaceController         "WorkspaceController"
 #define WmCWorkspacePresence           "WorkspacePresence"
 #define WmCWorkspaceSwitch             "WorkspaceSwitch"
-#endif /* WSM */
 
 /* window manager client resource names: */
 
 #define WmCIconBox                     "Iconbox"
 #define WmCConfirmbox                  "Confirmbox"
-#ifdef WSM
 #define WmCSwitcher                    "Switcher"
-#endif /* WSM */
 
 
 \f
  * 
  *************************************<->***********************************/
 
-#ifdef WSM
 #define WmRAbsentMapBehavior            "WmAMBehavior"
-#endif /* WSM */
 #define WmRCFocusPolicy                        "WmCFocus"
 #define WmRClientDecor                 "WmCDecor"
 #define WmRClientFunction              "WmCFunc"
 #define CRS_ACCEL              (1L << 3)
 #define CRS_ANY                        (CRS_BUTTON | CRS_KEY | CRS_MENU | CRS_ACCEL)
 
-#ifdef PANELIST
 #define WmNhelpDirectory                    "helpDirectory"
 
 #define WmCHelpDirectory                    "HelpDirectory"
-#endif /* PANELIST */
-#ifdef WSM
+
 /**************************    eof  ************************/
-#endif /* WSM */
+
index f9498ecc4b8bb52fe9dba8ba92d39dd6ed19fb7b..164c059b629f8aa585e8b1c6806945ceda773bc3 100644 (file)
 /* 
  * Motif Release 1.2.4
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmResParse.c /main/9 1996/11/01 10:17:34 drk $"
-#endif
-#endif
 /*
  * (c) Copyright 1987, 1988, 1989, 1990, 1993, 1994 Hewlett-Packard Company
  * (c) Copyright 1993, 1994 International Business Machines Corp.
@@ -49,16 +44,12 @@ static char rcsid[] = "$XConsortium: WmResParse.c /main/9 1996/11/01 10:17:34 dr
 
 #include "WmGlobal.h"
 #include "WmResNames.h"
-#ifdef WSM
 #include <Dt/UserMsg.h>
 #include <Dt/Connect.h>
 #include <Tt/tt_c.h>
-#endif /* WSM */
-#ifdef PANELIST
 #include "WmParse.h"
 #include "WmParseP.h"
 #include "WmPanelP.h"
-#endif /* PANELIST */
 #include "WmResource.h"
 
 #include <codelibs/shellutils.h>    /* shellscan */
@@ -75,19 +66,10 @@ static char rcsid[] = "$XConsortium: WmResParse.c /main/9 1996/11/01 10:17:34 dr
 
 #include <locale.h>
 
-#ifndef NO_MULTIBYTE
 #include <stdlib.h>
-#endif
 
-#ifdef MOTIF_ONE_DOT_ONE
-#include <stdio.h>
-#include <pwd.h>
-#else
 #include <Xm/XmP.h>             /* for XmeGetHomeDirName */
-#endif
-#ifdef WSM
 #include <signal.h>
-#endif /* WSM */
 
 /* maximum string lengths */
 
@@ -103,28 +85,18 @@ static char rcsid[] = "$XConsortium: WmResParse.c /main/9 1996/11/01 10:17:34 dr
 
 #define MBBSIZ     4096
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-# define PARSE_MENU_ITEMS(pSD, mSpec) ParseMenuItems(pSD, mSpec)
-#else
-# define PARSE_MENU_ITEMS(pSD, mSpec) ParseMenuItems(pSD)
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+#define PARSE_MENU_ITEMS(pSD, mSpec) ParseMenuItems(pSD)
 
 /*
  * include extern functions
  */
 #include "WmResParse.h"
-#ifdef WSM
 #include "WmWrkspace.h"
-#endif /* WSM */
 #include "WmError.h"
 #include "WmFunction.h"
 #include "WmImage.h"
 #include "WmXSMP.h"
 
-#ifdef MOTIF_ONE_DOT_ONE
-extern char   *getenv ();
-#endif
-#ifdef PANELIST
 # include <errno.h>
 # ifdef X_NOT_STDC_ENV
 extern int errno;
@@ -132,13 +104,11 @@ extern int errno;
 # define HOME_DT_WMRC    "/.dt/dtwmrc"
 # define LANG_DT_WMRC    "/dtwmrc"
 # define SYS_DT_WMRC     CDE_CONFIGURATION_TOP "/sys.dtwmrc"
-#endif /* PANELIST */
 
 /*
  * Global Variables And Tables:
  */
 static char cfileName[MAXWMPATH+1];
-#ifdef WSM
 #ifndef NO_MESSAGE_CATALOG
 char * pWarningStringFile;
 char * pWarningStringLine;
@@ -150,12 +120,6 @@ char pWarningStringLine[] = "%s: %s on line %d of specification string\n";
 #define parseP (wmGD.pWmPB->pchNext)
 #define line   (wmGD.pWmPB->pchLine)
 #define linec  (wmGD.pWmPB->lineNumber)
-#else  /* WSM */
-static FILE *cfileP = NULL;   /* fopen'ed configuration file or NULL */
-static unsigned char  line[MAXLINE+1]; /* line buffer */
-static int   linec = 0;       /* line counter for parser */
-static unsigned char *parseP = NULL;   /* pointer to parse string */
-#endif /* WSM */
 
 
 typedef struct {
@@ -190,78 +154,20 @@ typedef struct {
    Boolean       fClick;
 } EventTableEntry;
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-
-# define CCI_USE_DEFAULT_NAME_TAG "DEFAULT_NAME"
-
-String CCIEntryModifierNames[] = {
-  "none",
-  "inline",
-  "cascade",
-  "delimit",
-  "delimit_inline",
-  "delimit_cascade",
-  "exclude"
-};
-
-typedef enum {
-  NONE,             /* internal only. */
-  INLINE,           /* not supported. */
-  CASCADE,
-  DELIMIT,
-  DELIMIT_INLINE,   /* not supported. */
-  DELIMIT_CASCADE,
-  EXCLUDE
-} CCIEntryModifier;
-
-typedef struct _CCIFuncArg {
-  CCIEntryModifier mod;
-  String           cciEntry;
-} CCIFuncArg;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-#ifdef MOTIF_ONE_DOT_ONE
-void GetHomeDirName(String  fileName);
-#endif
-#ifdef WSM
 static String GetNetworkFileName (char *pchFile);
-#endif /* WSM */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-static MenuItem               *MakeSeparatorTemplate  (int);
-static void ParseMenuItemName (unsigned char **linePP, MenuItem *menuItem);
-static Boolean ParseClientCommand (unsigned char **linePP, MenuSpec *menuSpec,
-                                  MenuItem *menuItem, unsigned char *string,
-                                  Boolean *use_separators);
-static void FixMenuItem (MenuSpec *menuSpec, MenuItem *menuItem);
-static Boolean GetCCIModifier (String modString, CCIEntryModifier *mod);
-static Boolean ParseWmFuncCCIArgs (unsigned char **linePP, 
-                                  WmFunction wmFunction, String *pArgs);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 FILE *FopenConfigFile (void);
 void SaveMenuAccelerators (WmScreenData *pSD, MenuSpec *newMenuSpec);
 static void ParseMenuSet (WmScreenData *pSD, unsigned char *lineP);
 MenuItem *ParseMwmMenuStr (WmScreenData *pSD, unsigned char *menuStr);
-static MenuItem *ParseMenuItems (WmScreenData *pSD
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-                                , MenuSpec *menuSpec
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-                               );
+static MenuItem *ParseMenuItems (WmScreenData *pSD);
 static Boolean ParseWmLabel (WmScreenData *pSD, MenuItem *menuItem, 
                             unsigned char *string);
 static void ParseWmMnemonic (unsigned char **linePP, MenuItem *menuItem);
 static Boolean ParseWmAccelerator (unsigned char **linePP, MenuItem *menuItem);
 int ParseWmFunction (unsigned char **linePP, unsigned int res_spec, 
                            WmFunction *pWmFunction);
-#ifndef PANELIST
-static Boolean ParseWmFuncMaybeStrArg (unsigned char **linePP, 
-                                      WmFunction wmFunction, String *pArgs);
-#endif /* PANELIST */
 static Boolean ParseWmFuncNoArg (unsigned char **linePP, WmFunction wmFunction,
                                 String *pArgs);
-#ifndef PANELIST
-static Boolean ParseWmFuncStrArg (unsigned char **linePP, 
-                                 WmFunction wmFunction, String *pArgs);
-#endif /* PANELIST */
 void FreeMenuItem (MenuItem *menuItem);
 static Boolean ParseWmFuncGrpArg (unsigned char **linePP, 
                                  WmFunction wmFunction, GroupArg *pGroup);
@@ -307,7 +213,6 @@ void ProcessCommandLine (int argc,  char *argv[]);
 static void ParseScreensArgument (int argc, char *argv[], int *pArgnum,
                                  unsigned char *lineP);
 void ProcessMotifBindings (void);
-#ifdef PANELIST
 static void ParseIncludeSet (WmScreenData *pSD, unsigned char *lineP);
 static void ConfigStackInit (char *pchFileName);
 static FILE *ConfigStackPush (unsigned char *pchFileName);
@@ -315,7 +220,6 @@ static void ConfigStackPop (void);
 Boolean ParseWmFuncActionArg (unsigned char **linePP, 
                                  WmFunction wmFunction, String *pArgs);
 static void PreprocessConfigFile (void);
-#endif /* PANELIST */
 
 static EventTableEntry buttonEvents[] = {
 
@@ -349,7 +253,6 @@ static EventTableEntry keyEvents[] = {
     { NULL,         0,    (Boolean(*)())NULL,    0,  FALSE}
 };
 
-#ifdef PANELIST
 typedef struct _ConfigFileStackEntry {
     char               *fileName;
     char               *tempName;
@@ -364,7 +267,6 @@ typedef struct _ConfigFileStackEntry {
 static ConfigFileStackEntry *pConfigStack = NULL;
 static ConfigFileStackEntry *pConfigStackTop = NULL;
 
-#endif /* PANELIST */
 
 unsigned int buttonModifierMasks[] = {
     0,
@@ -395,33 +297,16 @@ typedef struct {
  */
 
 FunctionTableEntry functionTable[] = {
-#ifdef WSM
-#ifdef PANELIST
     {"f.action",       0,
                        CRS_ANY,
                        0,
                        F_Action,
                        ParseWmFuncActionArg},
-#else /* PANELIST */
-    {"f.action",       0,
-                       CRS_ANY,
-                       0,
-                       F_Action,
-                       ParseWmFuncStrArg},
-#endif  /* PANELIST */
-#endif /* WSM */
     {"f.beep",         0,
                        CRS_ANY,
                        0,
                        F_Beep,
                        ParseWmFuncNoArg},
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    {"f.cci",          0,
-                       CRS_ANY,
-                       0,
-                       F_Nop,
-                       ParseWmFuncCCIArgs},
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     {"f.circle_down",  F_SUBCONTEXT_IB_IICON|F_SUBCONTEXT_IB_WICON,
                        CRS_ANY,
                        0,
@@ -432,7 +317,6 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_Circle_Up,
                        ParseWmFuncGrpArg},
-#ifdef WSM
     {"f.create_workspace", 0,
                        CRS_ANY,
                        0,
@@ -443,7 +327,6 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_DeleteWorkspace,
                        ParseWmFuncNoArg},
-#endif /* WSM */
     {"f.exec",         0,
                        CRS_ANY,
                        0,
@@ -459,14 +342,11 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_Focus_Key,
                        ParseWmFuncNoArg},
-#ifdef WSM
     {"f.goto_workspace", 0,
                        CRS_ANY,
                        0,
                        F_Goto_Workspace,
                        ParseWmFuncStrArg},
-#endif /* WSM */
-#ifdef WSM
     {"f.help",          0,
                        CRS_ANY,
                        0,
@@ -477,14 +357,6 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_Help_Mode,
                        ParseWmFuncNoArg},  /* for now */
-#endif /* WSM */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    {"f.invoke_command",
-                       0, CRS_ANY,
-                       0,
-                       F_InvokeCommand,
-                       ParseWmFuncStrArg},
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     {"f.kill",         F_CONTEXT_ROOT,
                        CRS_ANY,
                        MWM_FUNC_CLOSE,
@@ -495,14 +367,12 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_Lower,
                         ParseWmFuncMaybeStrArg},
-#ifdef WSM
     {"f.marquee_selection",    
                        F_CONTEXT_WINDOW|F_CONTEXT_ICON|F_SUBCONTEXT_IB_IICON,
                        CRS_ANY,
                        0,
                        F_Marquee_Selection,
                        ParseWmFuncNoArg},
-#endif /* WSM */
     {"f.maximize",     F_CONTEXT_ROOT|F_CONTEXT_MAXIMIZE|
                                       F_SUBCONTEXT_IB_WICON,
                        CRS_ANY,
@@ -534,13 +404,11 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_Next_Key,
                        ParseWmFuncGrpArg},
-#ifdef WSM
     {"f.next_workspace",       0,
                        CRS_ANY,
                        0,
                        F_Next_Workspace,
                        ParseWmFuncNoArg},
-#endif /* WSM */
     {"f.nop",          F_CONTEXT_ROOT|F_CONTEXT_ICON|F_CONTEXT_WINDOW|
                            F_SUBCONTEXT_IB_WICON | F_SUBCONTEXT_IB_IICON,
                        CRS_ANY,
@@ -552,28 +420,17 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_Normalize,
                        ParseWmFuncNoArg},
-#ifdef PANELIST
     {"f.normalize_and_raise",
                        F_CONTEXT_ROOT|F_CONTEXT_NORMAL,
                        CRS_ANY,
                        0,
                        F_Normalize_And_Raise,
                        ParseWmFuncMaybeStrArg},
-#else /* PANELIST */
-    {"f.normalize_and_raise",
-                       F_CONTEXT_ROOT|F_CONTEXT_NORMAL,
-                       CRS_ANY,
-                       0,
-                       F_Normalize_And_Raise,
-                       ParseWmFuncNoArg},
-#endif /* PANELIST */
-#ifdef WSM
     {"f.occupy_all", F_CONTEXT_ICONBOX|F_CONTEXT_ROOT,
                        CRS_ANY,
                         DtWM_FUNC_OCCUPY_WS,
                        F_AddToAllWorkspaces,
                         ParseWmFuncNoArg},
-#endif /* WSM */
     {"f.pack_icons",   0,
                        CRS_ANY,
                        0,
@@ -584,13 +441,6 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_Pass_Key,
                        ParseWmFuncNoArg},
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    {"f.post_rmenu",   0,
-                       CRS_KEY,
-                       0,
-                       F_Post_RMenu,
-                       ParseWmFuncNoArg},
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     {"f.post_wmenu",   0,
                        CRS_BUTTON|CRS_KEY,
                        0,
@@ -606,13 +456,11 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_Prev_Key,
                        ParseWmFuncGrpArg},
-#ifdef WSM
     {"f.prev_workspace",       0,
                        CRS_ANY,
                        0,
                        F_Prev_Workspace,
                        ParseWmFuncNoArg},
-#endif /* WSM */
     {"f.quit_mwm",     F_CONTEXT_ICON|F_CONTEXT_WINDOW,
                        CRS_ANY,
                        0,
@@ -639,32 +487,22 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_Refresh_Win,
                        ParseWmFuncNoArg},
-#ifdef WSM
     {"f.remove",       F_CONTEXT_ROOT,
                        CRS_ANY,
                        DtWM_FUNC_OCCUPY_WS,
                        F_Remove,
                        ParseWmFuncNoArg},
-#endif /* WSM */
     {"f.resize",       F_CONTEXT_ICON|F_CONTEXT_ROOT|
                                  F_SUBCONTEXT_IB_IICON|F_SUBCONTEXT_IB_WICON,
                        CRS_ANY,
                        MWM_FUNC_RESIZE,
                        F_Resize,
                        ParseWmFuncNoArg},
-#ifdef WSM
     {"f.restart",      F_CONTEXT_ICON|F_CONTEXT_WINDOW,
                        CRS_ANY,
                        0,
                        F_Restart,
                        ParseWmFuncStrArg},
-#else /* WSM */
-    {"f.restart",      F_CONTEXT_ICON|F_CONTEXT_WINDOW,
-                       CRS_ANY,
-                       0,
-                       F_Restart,
-                       ParseWmFuncNoArg},
-#endif /* WSM */
     {"f.restore",      F_CONTEXT_ROOT|F_CONTEXT_NORMAL|F_SUBCONTEXT_IB_WICON,
                        CRS_ANY,
                        0,
@@ -696,19 +534,16 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_Set_Behavior,
                        ParseWmFuncNoArg},
-#ifdef WSM
     {"f.set_context",  0,
                        CRS_ANY,
                        0,
                        F_Set_Context,
                        ParseWmFuncNbrArg},
-#endif /* WSM */
     {"f.title",                0,
                        CRS_MENU,
                        0,
                        F_Title,
                        ParseWmFuncNoArg},
-#if defined(PANELIST)
     {"f.toggle_frontpanel", 0,
                        CRS_ANY,
                        0,
@@ -720,8 +555,6 @@ FunctionTableEntry functionTable[] = {
                        0,
                        F_Version,
                        ParseWmFuncNoArg},
-#endif /* PANELIST */
-#ifdef WSM
 
 #ifdef OLD
     {"f.workspace_presence",F_CONTEXT_ICON|F_CONTEXT_ROOT|F_CONTEXT_ICONBOX|
@@ -733,8 +566,7 @@ FunctionTableEntry functionTable[] = {
                        DtWM_FUNC_OCCUPY_WS,
                        F_Workspace_Presence,
                        ParseWmFuncNoArg},
-#endif /* WSM */
-#if defined(DEBUG) && defined(WSM)
+#if defined(DEBUG)
     {"f.zz_debug",     0,
                        CRS_ANY,
                        0,
@@ -753,25 +585,10 @@ FunctionTableEntry functionTable[] = {
 /*
  * Be sure to update these define, whenever adding/deleting a function.
  */
-#ifdef WSM
-# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-#  define F_CCI_INDEX  2
-# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 int F_ACTION_INDEX;
 int F_EXEC_INDEX;
 int F_NOP_INDEX;
-#else  /* WSM */
-# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-#  define F_CCI_INDEX  1
-#  define F_EXEC_INDEX 4
-#  define F_NOP_INDEX 16
-# else
-#  define F_EXEC_INDEX 3
-#  define F_NOP_INDEX 14
-# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-#endif /* WSM */
-#ifdef WSM
-\f
+
 /******************************<->*************************************
  *
  *  void GetFunctionTableValues (int *execIndex, int *nopIndex, 
@@ -1664,7 +1481,6 @@ unsigned int PeekAhead(unsigned char *currentChar,
 {
     Boolean            done = False;
     unsigned int       tmpLev = 1;
-#ifndef NO_MULTIBYTE
     unsigned int       chlen;
 
     while (((chlen = mblen ((char *)currentChar, MB_CUR_MAX)) > 0) &&
@@ -1687,26 +1503,6 @@ unsigned int PeekAhead(unsigned char *currentChar,
            }
        }
     }
-#else
-    while((*currentChar != NULL) && (done == False) &&
-         ((*currentChar == '"') || (*currentChar == '\\')))
-    {
-       currentChar++;
-       if((*currentChar != NULL) &&
-          ((*currentChar == '"') || (*currentChar == '\\')))
-       {
-           tmpLev++;
-           if(*currentChar == '"')
-           {
-               done = True;
-           }
-           else
-           {
-               currentChar++;
-           }
-       }
-    }
-#endif /*NO_MULTIBYTE*/
 
     /*
      * Figure out if this is truly a new level of nesting - else ignore it
@@ -1722,66 +1518,8 @@ unsigned int PeekAhead(unsigned char *currentChar,
        return(0);
     }
 } /* END OF FUNCTION PeekAhead */
-    
-    
-#endif /* WSM */
-
-
-\f
-#ifdef MOTIF_ONE_DOT_ONE
-/*************************************<->*************************************
- *
- *  GetHomeDirName (fileName)
- *
- *  Description:
- *  -----------
- *  This function finds the "HOME" directory
- *
- *
- *  Inputs:
- *  ------
- *  fileName 
- *
- *  Outputs:
- *  -------
- *  fileName
- *
- *  Comments:
- *  --------
- * 
- *************************************<->***********************************/
-void GetHomeDirName(String  fileName)
-{
-        int uid;
-        struct passwd *pw;
-        char *ptr = NULL;
-
-        if((ptr = getenv("HOME")) == NULL)
-        {
-            if((ptr = getenv("USER")) != NULL)
-           {
-               pw = getpwnam(ptr);
-           }
-            else
-            {
-                uid = getuid();
-                pw = getpwuid(uid);
-            }
 
-            if (pw)
-           {
-                ptr = pw->pw_dir;
-           }
-            else
-           {
-                ptr = "";
-           }
-        }
-        strcpy(fileName, ptr);
-}
-#endif
 
-\f
 /*************************************<->*************************************
  *
  *  SyncModifierStrings (fileName)
@@ -1878,7 +1616,6 @@ void SyncModifierStrings(void)
 #define MENU_SPEC      "menu"
 #define BUTTON_SPEC    "buttons"
 #define KEY_SPEC       "keys"
-#ifdef PANELIST
 #define FRONT_PANEL_SPEC DTWM_FP_PANEL_OLD
 #define DROP_EFFECTS_SPEC   DTWM_FP_DROP_EFFECTS
 #define PANEL_SPEC     DTWM_FP_PANEL
@@ -1890,19 +1627,14 @@ void SyncModifierStrings(void)
 
 void ProcessWmFile (WmScreenData *pSD, Boolean bNested)
 
-#else /* PANELIST */
-void ProcessWmFile (WmScreenData *pSD)
-#endif /* PANELIST */
 {
     unsigned char *lineP;
     unsigned char *string;
     unsigned int   n;
     MenuSpec      *menuSpec;
-#ifdef PANELIST
 
     if (!bNested)
     {
-#endif /* PANELIST */
 
     /*
      * Initialize global data values that are set based on data in
@@ -1913,10 +1645,8 @@ void ProcessWmFile (WmScreenData *pSD)
     pSD->keySpecs = NULL;
     pSD->menuSpecs = NULL;
 
-#ifdef WSM
     /**** hhhhhhhhhhhh   ******/
     GetFunctionTableValues (&F_EXEC_INDEX, &F_NOP_INDEX, &F_ACTION_INDEX);
-#endif /* WSM */
     /*
      * Find and parse the default system menu string, if it exists.
      */
@@ -1937,13 +1667,11 @@ void ProcessWmFile (WmScreenData *pSD)
        lineP = line;
         ParseMenuSet (pSD, lineP);
     }
-#ifdef PANELIST
     if (wmGD.useFrontPanel &&  !wmGD.dtSD &&
        (XDefaultScreen (wmGD.display) == pSD->screen))
     {
         wmGD.dtSD = pSD;  /* only one per display */
     }
-#endif /* PANELIST */
 
     /*
      * Find and associate a stream with the window manager resource 
@@ -1957,9 +1685,7 @@ void ProcessWmFile (WmScreenData *pSD)
        return;
     }
 
-#ifdef PANELIST 
     }  /* end if (!bNested) */
-#endif /* PANELIST */
     /*
      * Parse the information in the configuration file.
      * If there are more than MAXLINE characters on a line the excess are
@@ -1989,12 +1715,10 @@ void ProcessWmFile (WmScreenData *pSD)
        {
            ParseKeySet (pSD, lineP);
        }
-#ifdef PANELIST
         else if (!strcmp ((char *)string, INCLUDE_SPEC))
         {
             ParseIncludeSet (pSD, lineP);
         }
-#endif /* PANELIST */
     }
 
     fclose (cfileP);
@@ -2031,8 +1755,7 @@ void ProcessWmFile (WmScreenData *pSD)
 /**** This function stolen from Xt/Intrinsic.c ****/
 /* The implementation of this routine is operating system dependent */
 
-static char *ExtractLocaleName(lang)
-    String     lang;
+static char *ExtractLocaleName(String lang)
 {
 
 #ifdef hpux     /* hpux-specific parsing of the locale string */
@@ -2062,11 +1785,9 @@ static char *ExtractLocaleName(lang)
     return lang;
 }
 
-#ifdef WSM
 #define RC_CONFIG_SUBDIR               "/config/"
 #define RC_DEFAULT_CONFIG_SUBDIR       "/config/C"
-#endif /* WSM */
-\f
+
 /*************************************<->*************************************
  *
  *  FopenConfigFile ()
@@ -2101,12 +1822,8 @@ FILE *FopenConfigFile (void)
     char    *LANG, *LANGp;
     FILE    *fileP;
 
-#ifndef MOTIF_ONE_DOT_ONE
     char *homeDir = XmeGetHomeDirName();
-#endif
-#ifdef PANELIST
     Boolean stackPushed;
-#endif /* PANELIST */
 
     /*
      * Get the LANG environment variable
@@ -2142,7 +1859,6 @@ FILE *FopenConfigFile (void)
      * Use the LANG variable if set and .mwmrc is in $HOME/$LANG/.mwmrc  
      */
 
-#ifdef PANELIST
     if (pConfigStackTop && pConfigStackTop->tempName)
     {
        fileP = fopen (pConfigStackTop->tempName, "r");
@@ -2151,18 +1867,14 @@ FILE *FopenConfigFile (void)
     stackPushed = (pConfigStackTop && (pConfigStackTop != pConfigStack));
     fileP = NULL;
     cfileName[0] = '\0';
-#endif /* PANELIST */
+
     if ((wmGD.configFile != NULL) && (wmGD.configFile[0] != '\0'))
     /* pointer to nonNULL string */
     {
         if ((wmGD.configFile[0] == '~') && (wmGD.configFile[1] == '/'))
        /* handle "~/..." */
        {
-#ifdef MOTIF_ONE_DOT_ONE
-           GetHomeDirName(cfileName);
-#else
            strcpy (cfileName, homeDir);
-#endif
            if (LANG != NULL)
            {
                strncat(cfileName, "/", MAXWMPATH-strlen(cfileName));
@@ -2175,20 +1887,13 @@ FILE *FopenConfigFile (void)
                    XtFree(LANG); 
                    LANG = NULL; 
                }
-#ifndef PANELIST
-               return (fileP);
-#endif /* PANELIST */
            }
            else
            {
                /* 
                 * Just try $HOME/.mwmrc
                 */
-#ifdef MOTIF_ONE_DOT_ONE
-               GetHomeDirName(cfileName);
-#else
                strcpy (cfileName, homeDir);
-#endif
                strncat(cfileName, &(wmGD.configFile[1]), 
                        MAXWMPATH-strlen(cfileName));
                if ((fileP = fopen (cfileName, "r")) != NULL)
@@ -2197,9 +1902,6 @@ FILE *FopenConfigFile (void)
                      XtFree(LANG);
                      LANG = NULL;
                  }
-#ifndef PANELIST
-                 return (fileP);
-#endif /* PANELIST */
                }
            }
 
@@ -2208,7 +1910,6 @@ FILE *FopenConfigFile (void)
        else
        /* relative to current directory or absolute */
        {
-#ifdef PANELIST
            char *pch;
 
             pch = (char *) GetNetworkFileName (wmGD.configFile);
@@ -2221,7 +1922,6 @@ FILE *FopenConfigFile (void)
   
          if ((fileP == NULL) && !stackPushed)
          {
-#endif  /* PANELIST  */
             if ((fileP = fopen (wmGD.configFile, "r")) != NULL)
              {
                if (LANG != NULL) {
@@ -2230,19 +1930,16 @@ FILE *FopenConfigFile (void)
                }
                return(fileP);
              }
-#ifdef PANELIST 
          }
          else if ((fileP == NULL) && stackPushed)
          {
                strcpy (cfileName, wmGD.configFile);
          }
-#endif /* PANELIST */
        }
     }
-#ifdef PANELIST 
+
   if ((fileP == NULL) && !stackPushed)
   {
-#endif /* PANELIST */
 
     /*
      * The configFile resource didn't do it for us.
@@ -2252,13 +1949,8 @@ FILE *FopenConfigFile (void)
 #define HOME_MWMRC "/.mwmrc"
 #define SLASH_MWMRC "/system.mwmrc"
 
-#ifdef MOTIF_ONE_DOT_ONE
-    GetHomeDirName(cfileName);
-#else
     strcpy (cfileName, homeDir);
-#endif
 
-#ifdef WSM
     if (MwmBehavior)
     {
        /*
@@ -2294,35 +1986,19 @@ FILE *FopenConfigFile (void)
        }
        strncat(cfileName, LANG_DT_WMRC, MAXWMPATH - strlen(cfileName));
     }
-#else /* WSM */
-    if (LANG != NULL)
-    {
-       strncat(cfileName, "/", MAXWMPATH-strlen(cfileName));
-       strncat(cfileName, LANG, MAXWMPATH-strlen(cfileName));
-    }
-    strncat(cfileName, HOME_MWMRC, MAXWMPATH - strlen(cfileName));
-#endif /* WSM */
     if ((fileP = fopen (cfileName, "r")) != NULL)
     {
         if (LANG != NULL) {
            XtFree(LANG);
            LANG = NULL;
        }
-#ifndef PANELIST
-        return (fileP);
-#endif /* PANELIST */
     }
     else
     {
        /* 
         * Just try $HOME/.mwmrc
         */
-#ifdef MOTIF_ONE_DOT_ONE
-       GetHomeDirName(cfileName);
-#else
-    strcpy (cfileName, homeDir);
-#endif
-#ifdef WSM
+       strcpy (cfileName, homeDir);
        if (MwmBehavior)
        {
            /* 
@@ -2337,21 +2013,14 @@ FILE *FopenConfigFile (void)
             */
            strncat(cfileName, HOME_DT_WMRC, MAXWMPATH - strlen(cfileName));
        }
-#else /* WSM */
-        strncat(cfileName, HOME_MWMRC, MAXWMPATH - strlen(cfileName));
-#endif /* WSM */
        if ((fileP = fopen (cfileName, "r")) != NULL)
        {
          if (LANG != NULL) {
              XtFree(LANG);
              LANG = NULL;
          }
-#ifndef PANELIST
-         return (fileP);
-#endif /* PANELIST */
        }
     }
-#ifdef PANELIST
   }
 
 #define DTLIBDIR  CDE_INSTALLATION_TOP
@@ -2385,14 +2054,12 @@ FILE *FopenConfigFile (void)
 
   if ((fileP == NULL) && !stackPushed)
   {
-#endif /* PANELIST */
 
 #ifndef LIBDIR
 #define LIBDIR "/usr/lib/X11"
 #endif
     if (LANG != NULL)
     {
-#ifdef WSM
        if (MwmBehavior)
        {
            strcpy(cfileName, LIBDIR);
@@ -2407,39 +2074,20 @@ FILE *FopenConfigFile (void)
            strncat(cfileName, LANG, MAXWMPATH-strlen(cfileName));
            strncat(cfileName, SLASH_DT_WMRC, MAXWMPATH - strlen(cfileName));
        }
-#else /* WSM */
-       /*
-       * Try /$LANG/system.mwmrc within the install tree
-       */
-       strcpy(cfileName, LIBDIR);
-       strncat(cfileName, "/", MAXWMPATH-strlen(cfileName));
-       strncat(cfileName, LANG, MAXWMPATH-strlen(cfileName));
-       strncat(cfileName, SLASH_MWMRC, MAXWMPATH - strlen(cfileName));
-#endif /* WSM */
        if ((fileP = fopen (cfileName, "r")) != NULL)
        {
          XtFree(LANG);
          LANG = NULL;
-#ifndef PANELIST
-         return (fileP);
-#endif /* PANELIST */
        }
     }
 
-#ifdef PANELIST
     if ((fileP == NULL) && !stackPushed)
     {
-#endif /* PANELIST */
-#ifdef WSM
     if (MwmBehavior)
     {
        strcpy(cfileName, LIBDIR);
        strncat(cfileName, SLASH_MWMRC, MAXWMPATH - strlen(cfileName));
-#ifdef PANELIST
        fileP = fopen (cfileName, "r");
-#else /* PANELIST */
-       return (fopen (cfileName, "r"));
-#endif /* PANELIST */
     }
     else
     {
@@ -2447,32 +2095,8 @@ FILE *FopenConfigFile (void)
        strncat(cfileName, RC_DEFAULT_CONFIG_SUBDIR, 
                                        MAXWMPATH - strlen(cfileName));
        strncat(cfileName, SLASH_DT_WMRC, MAXWMPATH - strlen(cfileName));
-#ifdef PANELIST
        fileP = fopen (cfileName, "r");
-#else /* PANELIST */
-       return (fopen (cfileName, "r"));
-#endif /* PANELIST */
-    }
-#else /* WSM */
-    /*
-     * Try /system.mwmrc within the install tree
-     */
-    strcpy(cfileName, LIBDIR);
-    strncat(cfileName, SLASH_MWMRC, MAXWMPATH - strlen(cfileName));
-
-    if (LANG != NULL) 
-    {
-       XtFree(LANG);
-       LANG = NULL;
     }
-#ifdef PANELIST
-    strcpy(cfileName, cfileName);
-    fileP = fopen (cfileName, "r");
-#else /* PANELIST */
-    return (fopen (cfileName, "r"));
-#endif /* PANELIST */
-#endif /* WSM */
-#ifdef PANELIST
     }
   }
 
@@ -2528,7 +2152,6 @@ FILE *FopenConfigFile (void)
        LANG = NULL;
     }
     return (fileP);
-#endif /* PANELIST */
 
 } /* END OF FUNCTION FopenConfigFile */
 
@@ -2660,10 +2283,6 @@ static void ParseMenuSet (WmScreenData *pSD, unsigned char *lineP)
     menuSpec->menuItems = NULL;
     menuSpec->accelContext = 0;
     menuSpec->accelKeySpecs = NULL;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    menuSpec->exclusions = NULL;
-    menuSpec->clientLocal = FALSE;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     menuSpec->nextMenuSpec = NULL;
 
     /*
@@ -2814,21 +2433,14 @@ MenuItem *ParseMwmMenuStr (WmScreenData *pSD, unsigned char *menuStr)
  * 
  *************************************<->***********************************/
 
-static MenuItem *ParseMenuItems (WmScreenData *pSD
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-                                , MenuSpec *menuSpec
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-                               )
+static MenuItem *ParseMenuItems (WmScreenData *pSD)
 {
     unsigned char *string;
     unsigned char *lineP;
     MenuItem      *firstMenuItem;
     MenuItem      *lastMenuItem;
     MenuItem      *menuItem;
-    register int   ix;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    Boolean        use_separators = False;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+    int   ix;
     
     /*
      * Parse "label [mnemonic] [accelerator] function" or
@@ -2862,39 +2474,7 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD
        menuItem->nextMenuItem = NULL;
        menuItem->wmFunction = (WmFunction)NULL;
        menuItem->wmFuncArgs = NULL;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-       menuItem->clientCommandName = NULL;
-       menuItem->clientCommandID = 0;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-       /*
-        * Is this a simple menu item label or is it a
-        * client command specification.
-        */
-
-       if (IsClientCommand((String) string))
-       {
-           if (!ParseClientCommand(&lineP, menuSpec, menuItem, string,
-                                   &use_separators))
-           {
-               XtFree ((char *)menuItem);
-               continue;
-           }
 
-           for (ix = 0; ix < WMFUNCTIONTABLESIZE - 1; ++ix)
-             if (functionTable[ix].wmFunction == F_InvokeCommand)
-               break;
-
-           if (ix == WMFUNCTIONTABLESIZE - 1)
-           {
-               ix = F_NOP_INDEX;
-               menuItem->wmFunction = F_Nop;
-           }
-           else menuItem->wmFunction = F_InvokeCommand;
-       }
-       else /* It must be a menu item label */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
        {
            /*
             * Parse the menu item label.
@@ -2928,12 +2508,7 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD
         * but we do want to search for a menu item name that occupies
         * the same place as the function does for normal menu items.
         */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-       if (menuItem->wmFunction != NULL)
-         ParseMenuItemName(&lineP, menuItem);
-       else
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-         ix = ParseWmFunction (&lineP, CRS_MENU, &menuItem->wmFunction);
+       ix = ParseWmFunction (&lineP, CRS_MENU, &menuItem->wmFunction);
 
        /*
         * Determine context sensitivity and applicability mask.
@@ -2941,7 +2516,6 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD
 
        menuItem->greyedContext = functionTable[ix].greyedContext;
        menuItem->mgtMask = functionTable[ix].mgtMask;
-#ifdef PANELIST
         if ((menuItem->wmFunction == F_Toggle_Front_Panel) &&
            ((wmGD.useFrontPanel == False) ||
             (wmGD.dtSD != pSD)))
@@ -2954,7 +2528,6 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD
                                       F_SUBCONTEXT_IB_WICON    | 
                                       F_SUBCONTEXT_IB_IICON);
        }
-#endif /* PANELIST */
 
         /* 
         * Apply the function argument parser.
@@ -2966,47 +2539,6 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD
            continue;  /* skip this menu item */
         }
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-       /*
-        * If we're working on the f.cci function, this will fix-up
-        * the menuItem entries so that it appears that we read-in
-        * an old-style client-command entry.  Eventually, the cci
-        * handling should be changed to make use of the wmFuncArgs.
-        * Note that if DEFAULT_NAME was specified as the label, it
-        * is first set to NULL.
-        * FixMenuItem needs menuSpec since this is when the EXCLUDE
-        * items are stored.
-        */
-       if (ix == F_CCI_INDEX)
-         {
-           CCIEntryModifier mod = ((CCIFuncArg *)menuItem->wmFuncArgs)->mod;
-
-           /* first fix the label if needed. */
-           if (!strcmp(menuItem->label, CCI_USE_DEFAULT_NAME_TAG))
-             {
-               XtFree(menuItem->label);
-               menuItem->label = NULL;
-             }
-
-           FixMenuItem(menuSpec, menuItem);
-
-           if (mod == DELIMIT || mod == DELIMIT_CASCADE || mod == DELIMIT_INLINE)
-             use_separators = True;
-         }
-
-       /*
-        * If this menu item is supposed to be wrapped in separators,
-        * then create a separator template before the menu item
-        */
-       if (use_separators)
-       {
-           MenuItem *separator = MakeSeparatorTemplate(TOP_SEPARATOR);
-           if (lastMenuItem != NULL) lastMenuItem->nextMenuItem = separator;
-           else                      firstMenuItem = separator;
-           lastMenuItem = separator;
-       }
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
        /*
         * Add this item to the menu specification.
         */
@@ -3020,21 +2552,6 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD
            firstMenuItem = menuItem;
        }
        lastMenuItem = menuItem;
-
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-       /* If this menu item is supposed to be wrapped in separators
-        * then create a separator template after the menu item
-        */
-       if (use_separators)
-       {
-           MenuItem *separator = MakeSeparatorTemplate(BOTTOM_SEPARATOR);
-           if (lastMenuItem != NULL) lastMenuItem->nextMenuItem = separator;
-           else                      firstMenuItem = separator;
-           lastMenuItem = separator;
-       }
-
-       use_separators = FALSE;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     }
 
     return (firstMenuItem);
@@ -3042,562 +2559,152 @@ static MenuItem *ParseMenuItems (WmScreenData *pSD
 } /* END OF FUNCTION ParseMenuItems */
 
 
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
 /*************************************<->*************************************
  *
- *  StoreExclusion (menuSpec, string)
+ *  ParseWmLabel (pSD, menuItem, string)
  *
  *
  *  Description:
  *  -----------
- *  Store the exclusion string in the menuspec. The list of exclusion
- *  strings are used to determine whether an insertion should be disallowed.
+ *  Parse a menu label string.
  *
  *
  *  Inputs:
  *  ------
- *  menuSpec = the menu specification structure
- *  string   = exclusion client command string
+ *  pSD      = pointer to screen data
+ *  menuItem = pointer to MenuItem structure
+ *  string   = label string
  *
  * 
  *  Outputs:
  *  -------
- *  Return   = nothing
+ *  menuItem->label
+ *  menuItem->labelType
+ *  menuItem->labelBitmapCache
+ *  Return   = boolean, FALSE iff insufficient memory
+ *
  *
  *  Comments:
  *  --------
- *
+ * We have two label types:  XmSTRING and XmPIXMAP
+ * We allocate and fill the label field with string and set the type to 
+ * XmSTRING.  If string = "@<bitmap_file>", and <bitmap_file> contains a
+ * with which to build a label image we save the bitmap in the MenuItem 
+ * structure and set the type to XmPIXMAP.
+ * 
  *************************************<->***********************************/
 
-static void StoreExclusion (MenuSpec *menuSpec, String string)
+static Boolean ParseWmLabel (WmScreenData *pSD, MenuItem *menuItem, 
+                            unsigned char *string)
 {
-    MenuExclusion *exclusion;
 
-    exclusion = (MenuExclusion *)XtMalloc(sizeof(MenuExclusion));
-    exclusion->command_string = XtNewString(string);
+    /*
+     * Allocate the label field and copy string.
+     */
+
+    if ((menuItem->label = (String)
+        XtMalloc ((unsigned int)(strlen ((char *)string) + 1))) == NULL)
+    {
+        PWarning (((char *)GETMESSAGE(60, 13, "Insufficient memory for menu item")));
+        return (FALSE);
+    }
+
+    strcpy (menuItem->label, (char *)string);
+    menuItem->labelType = XmSTRING;
+
+    if (*string == '@')
+    /*
+     * Here:  string  = "@<bitmap file>"
+     * Try to find the label bitmap in the bitmap cache or read the label 
+     * bitmap file.
+     */
+    {
+        string++;  /* skip "@" */
+        if ((menuItem->labelBitmapIndex = GetBitmapIndex (pSD, 
+                                          (char *)string, True)) >= 0)
+       {
+           menuItem->labelType = XmPIXMAP;
+       }
+    }
+    return (TRUE);
+
+} /* END OF FUNCTION ParseWmLabel */
 
-    /* We don't care what order the exclusions are in so stick it
-       at the head of the list because it is easier. */
-    exclusion->nextExclusion = menuSpec->exclusions;
-    menuSpec->exclusions = exclusion;
-}
 
 \f
 /*************************************<->*************************************
  *
- *  IsClientCommand (string)
+ *  ParseWmMnemonic (linePP, menuItem)
  *
  *
  *  Description:
  *  -----------
- *  Determine whether the string is a client command by the prefix
- *  characters.
+ *  Parse an optional menu function mnemonic.
  *
  *
  *  Inputs:
  *  ------
- *  string   = possible client command string
+ *  linePP   = pointer to current line buffer pointer.
+ *  menuItem = pointer to MenuItem structure
  *
  * 
  *  Outputs:
  *  -------
- *  Return   = (Boolean) TRUE iff the string is a client command.
- *            Otherwise, FALSE is returned.
+ *  linePP   = pointer to revised line buffer pointer.
+ *  menuItem->mnemonic = valid mnemonic character or NULL.
  *
  *
  *  Comments:
  *  --------
- *  This function simply checks what the first two or three characters of
- *  the string are. If they match the beginning of a client command
- *  specification, then TRUE is returned. This function does no go on to
- *  parse the rest of the specification. The legal client command beginning
- *  characters are:
- *
- *             characters:     meaning:
- *             -----------------------------------------------
- *                 <           simple client command beginning
- *               -><           forced cascade menu
- *                =<           client command with separators
- *                ~<           exclusion operator
+ *  None.
  * 
- *  Assumes:
- *  --------
- *  There is no leading whitespace on the string
- *
  *************************************<->***********************************/
 
-Boolean IsClientCommand (String string)
+static void ParseWmMnemonic (unsigned char **linePP, MenuItem *menuItem)
 {
-    if ((mblen ((char *)string, MB_CUR_MAX) == 1 && *string == '<') ||
-       (strncmp(string, "-><", 3) == 0) ||
-       (strncmp(string, "=<", 2) == 0)  ||
-       (strncmp(string, "=><", 3) == 0) ||
-       (strncmp(string, "~<", 2) == 0))
-      return(TRUE);
-
-    return(FALSE);
-}
+    unsigned char *lineP = *linePP;
+    unsigned char *mnemonic;
+
+    /*
+     * Skip leading white space.
+     */
+    ScanWhitespace (&lineP);
+    menuItem->mnemonic = (KeySym)NULL;
+
+    if (*lineP == '_')
+    /* 
+     * We have a mnemonic specification. 
+     * Get the next string (we only use the first character).
+     * If no string exists, the labelType is not XmSTRING, or does not contain 
+     * the first character, then skip the string and return.
+     * Otherwise, accept the first character as a mnemonic.
+     */
+    {
+       KeySym ks;
+        lineP++;
+        mnemonic = GetString(&lineP);
+
+       if (menuItem->labelType == XmSTRING &&
+           mnemonic != NULL &&
+           (ks = XStringToKeysym((char *)mnemonic)) != NoSymbol &&
+           strchr(menuItem->label, (char)(ks & 0xff)) != NULL)
+       {
+           menuItem->mnemonic = ks;
+       }
+       else
+       {
+            PWarning (((char *)GETMESSAGE(60, 14, "Invalid mnemonic specification")));
+       }
+    }
+
+    *linePP = lineP;  /* consume any string */
+
+} /* END OF FUNCTION ParseWmMnemonic */
 
 \f
 /*************************************<->*************************************
  *
- *  ParseClientCommand (linePP, menuSpec, menuitem, string, use_separators)
- *
- *
- *  Description:
- *  -----------
- *  Parse the string and whatever is left of the line to verify whether
- *  correct syntax was used for a client command. Store the client command
- *  string in the menuitem, unless it is an exclusion. If it is an
- *  exclusion, then store the exclusion string in the menuSpec and return
- *  FALSE to indicate that the menuitem is no longer needed.
- *
- *
- *  Inputs:
- *  ------
- *  linePP   = pointer to current line buffer pointer.
- *  menuItem = pointer to MenuItem structure
- *  string   = first token of client command
- *
- * 
- *  Outputs:
- *  -------
- *  Return   = (Boolean) TRUE iff the line is a valid client command 
- *            that can used to match insertions.
- *            Otherwise, FALSE is returned meaning that the client
- *            command had incorrect syntax or it was an exclusion, in
- *            which case any useful information was stored in the
- *            menuSpec.
- *
- *
- *  Comments:
- *  --------
- *  This function parses the entire line to determine if correct
- *  syntax was used for the client command. We assume at this point
- *  that the line is a client command. We are just syntax checking.
- *  If the syntax is correct, the client command is stored in the
- *  menuitem structure, in the "label" field.
- *
- *  Valid syntax for a client command (single quoted characters are
- *  literals):
- *
- *  modifier  = { '->' | '=' | '~' }
- *  reference = '<' { name | '*' } '>'
- *  command   = [ modifier ] reference [ { modifier | '.' } reference ]*
- *  name      = alpha-numeric string, white space allowed
- *
- *  Assumes:
- *  --------
- *  There is no leading whitespace on the string argument
- *
- *************************************<->***********************************/
-
-enum { PRS_NO_STATE, PRS_BEGIN, PRS_MODIFIER, PRS_REFERENCE,
-       PRS_SEPARATOR, PRS_END, PRS_ERROR, PRS_MAX_STATES };
-
-/* This table lists for each parse state, the legal states that can
-   be moved to. Each list must end with a PRS_NO_STATE value to 
-   terminate the list. */
-static int cmd_parse_table[PRS_END][PRS_END] =
-{
-  /* PRS_NO_STATE */  { PRS_NO_STATE },
-  /* PRS_BEGIN */     { PRS_MODIFIER, PRS_REFERENCE, PRS_NO_STATE },
-  /* PRS_MODIFIER */  { PRS_REFERENCE, PRS_NO_STATE },
-  /* PRS_REFERENCE */ { PRS_SEPARATOR, PRS_END, PRS_NO_STATE },
-  /* PRS_SEPARATOR */ { PRS_REFERENCE, PRS_NO_STATE },
-};
-
-static Boolean ParseClientCommand (unsigned char **linePP, MenuSpec *menuSpec,
-                                  MenuItem *menuItem, unsigned char *string,
-                                  Boolean *use_separators)
-{
-    int token, linelen, i;
-    int state = PRS_BEGIN;
-    String stream, unchanged_stream, exclusion_text;
-    Boolean return_val = FALSE;
-    Boolean exclusion = FALSE; /* this will be set to TRUE if the client
-                                 command was parsed to be an exclusion
-                                 command. */
-
-    /* Construct one input stream out of the string and the linePP that
-       we were given. */
-    linelen = strlen((char *)string) + strlen((char *)*linePP) + 1;
-    if ((unchanged_stream = stream = (String)
-        XtMalloc((unsigned int)(sizeof(unsigned char) * linelen))) == NULL)
-    {
-       PWarning (((char *)GETMESSAGE(60, 42,
-                   "Insufficient memory for menu item label")));
-        return (FALSE);
-    }
-    strcpy(stream, (char *) string);
-    strcat(stream, " ");
-    strcat(stream, (char *) *linePP);
-
-    for (;;)
-    {
-       token = PRS_NO_STATE;
-       while (token == PRS_NO_STATE)
-       {
-           if (mblen ((char *)stream, MB_CUR_MAX) > 1) {
-             token = PRS_ERROR;
-             continue;
-           }
-
-           switch (*stream)
-           {
-             case '\0':
-             case '\n':
-               /* We've reached the end of the stream. Return the
-                  PRS_END token. */
-               token = PRS_END;
-               break;
-             case '-':
-               /* This should be a cascade-force modifier */
-               ++stream;
-               if (mblen ((char *)stream, MB_CUR_MAX) > 1) {
-                 token = PRS_ERROR;
-                 continue;
-               }
-               if (*stream == '>')
-               {
-                   ++stream; token = PRS_MODIFIER;
-               }
-               else token = PRS_ERROR;
-               break;
-             case '=':
-               /* This is either a separators modifier or
-                  a combination separators and cascade-force
-                  modifier */
-               ++stream;
-               if (mblen ((char *)stream, MB_CUR_MAX) > 1) {
-                 token = PRS_ERROR;
-                 continue;
-               }
-               if (*stream == '>') ++stream;
-               token = PRS_MODIFIER;
-               *use_separators = TRUE;
-               break;
-             case '~':
-               /* This is a exclude-command modifier */
-               ++stream; token = PRS_MODIFIER;
-               exclusion = TRUE;
-               /* Setup a pointer to the text following the ~ so
-                  we can do matching later for exclusions. */
-               exclusion_text = stream;
-               break;
-             case '<':
-               /* Skip the open bracket */
-               ++stream;
-
-               /* This should be the beginning of a reference. First
-                  skip any leading whitespace. */
-               if (mblen ((char *)stream, MB_CUR_MAX) > 1) {
-                 token = PRS_ERROR;
-                 continue;
-               }
-               while (mblen ((char *)stream, MB_CUR_MAX) == 1 && 
-                      (*stream == ' ' || *stream == '\t')) 
-                 ++stream;
-
-               if (mblen ((char *)stream, MB_CUR_MAX) > 1) {
-                 token = PRS_ERROR;
-                 continue;
-               }
-               /* Now check for a reference name wild card or a
-                  full reference name */
-               if (*stream == '*')
-                 ++stream;
-               else
-               {
-                   while (mblen ((char *)stream, MB_CUR_MAX) == 1 && 
-                          (isalnum(*stream) || *stream == ' ' ||
-                           *stream == '\t'  || *stream == '_' ))
-                     ++stream;
-               }
-               
-               if (mblen ((char *)stream, MB_CUR_MAX) > 1) {
-                 token = PRS_ERROR;
-                 continue;
-               }
-
-               /* Now skip past any trailing white space */
-               while (mblen ((char *)stream, MB_CUR_MAX) == 1 && 
-                      (*stream == ' ' || *stream == '\t'))
-                 ++stream;
-
-               if (mblen ((char *)stream, MB_CUR_MAX) > 1) {
-                 token = PRS_ERROR;
-                 continue;
-               }
-               /* At this point, we should be looking at the close
-                  of the reference */
-               if (*stream == '>')
-               {
-                   token = PRS_REFERENCE;
-                   ++stream;
-               }
-               else token = PRS_ERROR;
-               break;
-             case '.':
-               /* This is a reference separator */
-               ++stream; token = PRS_SEPARATOR;
-               break;
-             case ' ':
-             case '\t':
-               /* The only place white space is allowed as at the
-                  beginning of the line, after all the client command
-                  text and within the delimiters of a REFERENCE. We
-                  are guaranteed not to have whitespace at the 
-                  beginning of the line by the time this function is
-                  called. Also, the REFERENCE parsing above handles
-                  all white space internal to the client command. Therefore,
-                  since we are seeing white space, we must be at the
-                  end of the client command. */
-               token = PRS_END;
-               break;
-             default:
-               token = PRS_ERROR;
-
-           } /* end switch (*stream) */
-       } /* end while (token == PRS_NO_STATE) */
-
-       /* If we got an error then just return an error */
-       if (token == PRS_ERROR)
-       {
-           return_val = FALSE; break;
-       }
-       
-       /* Check whether the token we got is a valid transition */
-       for (i = 0; cmd_parse_table[state][i] != PRS_NO_STATE; ++i)
-       {
-           if (token == cmd_parse_table[state][i]) 
-           {
-               /* It is a valid transition, so break out of the loop */
-               break;
-           }
-        }
-       
-       /* If i is not indexing the NO_STATE value in the parse_table,
-          then the parse succeeded. Check if the new state is PRS_END.
-          If so then we are done. If the state isn't the same as the
-          current token, then we hit a parse error. */
-       if (cmd_parse_table[state][i] != PRS_NO_STATE)
-       {
-           if (token == PRS_END)
-           {
-               return_val = TRUE;
-               break;
-           }
-       }
-       else 
-       {
-           /* parse error */
-           return_val = FALSE;
-           break;
-       }
-       
-       /* The transition was valid so make the transition by
-          setting the state to be the current token. */
-       state = token; 
-
-    } /* end for (;;) */
-
-    /* If the return_val is TRUE, then the parse succeeded and we
-       want to save the string we parsed into the label field of
-       the menu item. */
-    if (return_val == TRUE)
-    {
-       /* NULL terminate the string */
-       *stream = '\0';
-
-       /* Check whether this client command was an exclusion. If not,
-          then store the client command string in the menu item. */
-       if (exclusion == TRUE)
-       {
-           /* Since the command was an exclusion, store the command
-              string in the menuSpec and change the return value to
-              FALSE. */
-           StoreExclusion(menuSpec, exclusion_text);
-           return_val = FALSE;
-       }
-       else
-       {
-           menuItem->label = XtNewString(unchanged_stream);
-           menuItem->labelType = XmSTRING;
-       }
-    }
-
-    /* Free the string we allocated and return. */
-    XtFree((char *)unchanged_stream);
-
-    return(return_val);
-}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-\f
-/*************************************<->*************************************
- *
- *  ParseWmLabel (pSD, menuItem, string)
- *
- *
- *  Description:
- *  -----------
- *  Parse a menu label string.
- *
- *
- *  Inputs:
- *  ------
- *  pSD      = pointer to screen data
- *  menuItem = pointer to MenuItem structure
- *  string   = label string
- *
- * 
- *  Outputs:
- *  -------
- *  menuItem->label
- *  menuItem->labelType
- *  menuItem->labelBitmapCache
- *  Return   = boolean, FALSE iff insufficient memory
- *
- *
- *  Comments:
- *  --------
- * We have two label types:  XmSTRING and XmPIXMAP
- * We allocate and fill the label field with string and set the type to 
- * XmSTRING.  If string = "@<bitmap_file>", and <bitmap_file> contains a
- * with which to build a label image we save the bitmap in the MenuItem 
- * structure and set the type to XmPIXMAP.
- * 
- *************************************<->***********************************/
-
-static Boolean ParseWmLabel (WmScreenData *pSD, MenuItem *menuItem, 
-                            unsigned char *string)
-{
-
-    /*
-     * Allocate the label field and copy string.
-     */
-
-    if ((menuItem->label = (String)
-        XtMalloc ((unsigned int)(strlen ((char *)string) + 1))) == NULL)
-    {
-        PWarning (((char *)GETMESSAGE(60, 13, "Insufficient memory for menu item")));
-        return (FALSE);
-    }
-
-    strcpy (menuItem->label, (char *)string);
-    menuItem->labelType = XmSTRING;
-
-    if (*string == '@')
-    /*
-     * Here:  string  = "@<bitmap file>"
-     * Try to find the label bitmap in the bitmap cache or read the label 
-     * bitmap file.
-     */
-    {
-        string++;  /* skip "@" */
-#ifdef WSM
-        if ((menuItem->labelBitmapIndex = GetBitmapIndex (pSD, 
-                                          (char *)string, True)) >= 0)
-#else /* WSM */
-        if ((menuItem->labelBitmapIndex = GetBitmapIndex (pSD, 
-                                              (char *)string)) >= 0)
-#endif /* WSM */
-       {
-           menuItem->labelType = XmPIXMAP;
-       }
-    }
-    return (TRUE);
-
-} /* END OF FUNCTION ParseWmLabel */
-
-
-\f
-/*************************************<->*************************************
- *
- *  ParseWmMnemonic (linePP, menuItem)
- *
- *
- *  Description:
- *  -----------
- *  Parse an optional menu function mnemonic.
- *
- *
- *  Inputs:
- *  ------
- *  linePP   = pointer to current line buffer pointer.
- *  menuItem = pointer to MenuItem structure
- *
- * 
- *  Outputs:
- *  -------
- *  linePP   = pointer to revised line buffer pointer.
- *  menuItem->mnemonic = valid mnemonic character or NULL.
- *
- *
- *  Comments:
- *  --------
- *  None.
- * 
- *************************************<->***********************************/
-
-static void ParseWmMnemonic (unsigned char **linePP, MenuItem *menuItem)
-{
-    unsigned char *lineP = *linePP;
-    unsigned char *mnemonic;
-
-    /*
-     * Skip leading white space.
-     */
-    ScanWhitespace (&lineP);
-    menuItem->mnemonic = (KeySym)NULL;
-
-    if (*lineP == '_')
-    /* 
-     * We have a mnemonic specification. 
-     * Get the next string (we only use the first character).
-     * If no string exists, the labelType is not XmSTRING, or does not contain 
-     * the first character, then skip the string and return.
-     * Otherwise, accept the first character as a mnemonic.
-     */
-    {
-       KeySym ks;
-        lineP++;
-        mnemonic = GetString(&lineP);
-
-#ifndef NO_MULTIBYTE
-       if (menuItem->labelType == XmSTRING &&
-           mnemonic != NULL &&
-           (ks = XStringToKeysym((char *)mnemonic)) != NoSymbol &&
-           strchr(menuItem->label, (char)(ks & 0xff)) != NULL)
-       {
-           menuItem->mnemonic = ks;
-       }
-#else
-        if ((mnemonic != NULL) &&
-            (*mnemonic != '\0') &&
-            (menuItem->labelType == XmSTRING) &&
-           (strchr (menuItem->label, *mnemonic) != NULL))
-        /* valid mnemonic */
-        {
-            menuItem->mnemonic = *mnemonic;
-        }
-#endif
-       else
-       {
-            PWarning (((char *)GETMESSAGE(60, 14, "Invalid mnemonic specification")));
-       }
-    }
-
-    *linePP = lineP;  /* consume any string */
-
-} /* END OF FUNCTION ParseWmMnemonic */
-
-\f
-/*************************************<->*************************************
- *
- *  ParseWmAccelerator (linePP, menuItem)
+ *  ParseWmAccelerator (linePP, menuItem)
  *
  *
  *  Description:
@@ -3655,10 +2762,6 @@ static Boolean ParseWmAccelerator (unsigned char **linePP, MenuItem *menuItem)
 
     if ((*lineP != '\0') &&     /* something follows */
        (*lineP != '!')  &&     /* skip if we have the ! WmFunction */
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-        /* skip label name for client command */
-       ((*lineP != '"') || (menuItem->wmFunction != F_InvokeCommand)) &&
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
        (*lineP != 'f')  &&
        (*(lineP+1) != '.'))    /* skip if we have f.xxx WmFunction */
     {
@@ -3695,89 +2798,6 @@ static Boolean ParseWmAccelerator (unsigned char **linePP, MenuItem *menuItem)
 
 } /* END OF FUNCTION ParseWmAccelerator */
 
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  ParseMenuItemName (linePP, menuItem)
- *
- *
- *  Description:
- *  -----------
- *  Parse a user defined client command menu item
- *
- *
- *  Inputs:
- *  ------
- *  linePP   = pointer to current line buffer pointer.
- *  menuItem = pointer to MenuItem structure
- *
- * 
- *  Outputs:
- *  -------
- *  menuItem->label will have menu item name appended to it
- *
- *  Comments:
- *  --------
- *  This function attempts to find a menu item label string at the end
- *  of the client command specification line. A menu item label string
- *  must be delimited by double quotes. If found, the label string is
- *  appended to the menuItem->label field, after being reallocated to
- *  accommodate the new space requirement.
- * 
- *************************************<->***********************************/
-
-static void ParseMenuItemName (unsigned char **linePP, MenuItem *menuItem)
-{
-    unsigned char *lineP, *endquote;
-    int chlen;
-
-    /* Skip past any whitespace */
-    ScanWhitespace (linePP);
-    lineP = *linePP;
-
-    /* Look for a double quote */
-    if (mblen ((char *)lineP, MB_CUR_MAX) == 1 && *lineP == '"')
-    {
-       /* Move past the first quote. */
-       ++lineP;
-
-       endquote = lineP;
-
-       /* Search for closing quote */
-       while (*endquote != '\0' &&
-              (chlen = mblen ((char *)endquote, MB_CUR_MAX)) > 0 && 
-              (chlen > 1 || *endquote != '"'))
-       {
-           /* If we ran off the end of the line, then just abort. Bad
-              syntax. */
-           if ((chlen == 1 && *endquote == '\n') || *endquote == '\0') return;
-           endquote += chlen;
-       }
-       if (chlen < 0) return; /* invalid character */
-
-       /* Well, we have a valid menu item name. Store it in the 
-          client command name field. Don't include the double quotes. */
-       menuItem->clientCommandName =
-         XtMalloc(sizeof(char) * (endquote - lineP) + 1);
-       strncpy(menuItem->clientCommandName, (char *) lineP,
-               endquote - lineP);
-       menuItem->clientCommandName[strlen(menuItem->clientCommandName)+1] = '\0';
-    }
-    else
-    {
-       /* If there was no double quote, then just advance to the end
-          of the line. */
-       while (*lineP != '\0' && 
-              ((chlen = mblen ((char *)lineP, MB_CUR_MAX)) > 1 ||
-               *lineP != '\n'))
-         lineP += chlen > 0 ? chlen : 1;
-       *linePP = lineP;
-    }
-}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-\f
 /*************************************<->*************************************
  *
  *  int
@@ -3816,7 +2836,7 @@ int ParseWmFunction (unsigned char **linePP, unsigned int res_spec,
 {
     unsigned char *lineP = *linePP;
     unsigned char *string;
-    register int  low, mid, high, cmp;
+    int  low, mid, high, cmp;
 
     /*
      * Skip leading white space.
@@ -3927,9 +2947,6 @@ int ParseWmFunction (unsigned char **linePP, unsigned int res_spec,
  * 
  *************************************<->***********************************/
 
-#ifndef PANELIST
-static
-#endif 
 Boolean ParseWmFuncMaybeStrArg (unsigned char **linePP, 
                                       WmFunction wmFunction, String *pArgs)
 {
@@ -3944,7 +2961,6 @@ Boolean ParseWmFuncMaybeStrArg (unsigned char **linePP,
        return (ParseWmFuncStrArg (linePP, wmFunction, pArgs));
     }
 */
-#ifdef PANELIST
 #if 0
     else if (*lineP == '"' && *(lineP+1) == '-')
     {
@@ -3953,7 +2969,6 @@ Boolean ParseWmFuncMaybeStrArg (unsigned char **linePP,
        return (ParseWmFuncStrArg (linePP, wmFunction, pArgs));
     }
 #endif
-#endif /* PANELIST */
     if ((len = strlen ((char *)string)) != 0)
     {
        if ((*pArgs = (String)XtMalloc (len + 1)) == NULL)
@@ -4047,21 +3062,16 @@ static Boolean ParseWmFuncNoArg (unsigned char **linePP, WmFunction wmFunction,
  * 
  *************************************<->***********************************/
 
-#ifndef PANELIST
-static
-#endif
 Boolean ParseWmFuncStrArg (unsigned char **linePP, 
                                  WmFunction wmFunction, String *pArgs)
 {
     unsigned char *string;
     unsigned int  len;
-#ifndef NO_MULTIBYTE
     char *p;
     wchar_t last;
     char delim;
     wchar_t wdelim;
     int lastlen;
-#endif
 
     if ((string = GetString (linePP)) != NULL)
     /* nonNULL string argument */
@@ -4078,7 +3088,6 @@ Boolean ParseWmFuncStrArg (unsigned char **linePP,
          *  Insure that an argument for F_Exec ends in '&' .
          */
 
-#ifndef NO_MULTIBYTE
        if (wmFunction == F_Exec)
        {
            lastlen = 0;
@@ -4098,13 +3107,6 @@ Boolean ParseWmFuncStrArg (unsigned char **linePP,
                *p   = '\0';
            }
        }
-#else
-        if ((wmFunction == F_Exec) && ((*pArgs)[len - 1] != '&'))
-        {
-           (*pArgs)[len] = '&';
-           (*pArgs)[len + 1] = '\0';
-        }
-#endif
     }
     else
     /* NULL string argument */
@@ -4311,66 +3313,15 @@ static Boolean ParseWmFuncGrpArg (unsigned char **linePP,
  *  Inputs:
  *  ------
  *  linePP   = pointer to current line buffer pointer.
- *  wmFunction = function 
- *  pNumber = pointer to number argument destination.
- *
- * 
- *  Outputs:
- *  -------
- *  linePP   = pointer to revised line buffer pointer.
- *  pNumber  = pointer to parsed number argument.
- *  Return   = FALSE iff invalid number argument.
- *
- *
- *  Comments:
- *  --------
- *  None.
- * 
- *************************************<->***********************************/
-
-static Boolean ParseWmFuncNbrArg (unsigned char **linePP, 
-                                 WmFunction wmFunction, 
-                                 unsigned long *pNumber)
-{
-    int  val;
-
-    val = StrToNum (GetString (linePP));
-    if (val == -1)
-    {
-        PWarning (((char *)GETMESSAGE(60, 20, "Invalid number specification")));
-        *pNumber = 0;
-        return (FALSE);
-    }
-
-    *pNumber = val;
-    return (TRUE);
-
-} /* END OF FUNCTION ParseWmFuncNbrArg */
-
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  ParseWmFuncCCIArgs (linePP, wmFunction, pArgs)
- *
- *
- *  Description:
- *  -----------
- *  Parses a Client-Command entry's arguments.
- *
- *
- *  Inputs:
- *  ------
- *  linePP   = pointer to current line buffer pointer.
- *  wmFunction = function for which the argument string is intended.
- *  pArgs = pointer to argument string destination.
+ *  wmFunction = function 
+ *  pNumber = pointer to number argument destination.
  *
  * 
  *  Outputs:
  *  -------
  *  linePP   = pointer to revised line buffer pointer.
- *  pArgs    = pointer to parsed argument string.
- *  Return   = FALSE iff insufficient memory
+ *  pNumber  = pointer to parsed number argument.
+ *  Return   = FALSE iff invalid number argument.
  *
  *
  *  Comments:
@@ -4379,79 +3330,25 @@ static Boolean ParseWmFuncNbrArg (unsigned char **linePP,
  * 
  *************************************<->***********************************/
 
-static Boolean ParseWmFuncCCIArgs (unsigned char **linePP, 
-                                  WmFunction wmFunction, String *pArgs)
+static Boolean ParseWmFuncNbrArg (unsigned char **linePP, 
+                                 WmFunction wmFunction, 
+                                 unsigned long *pNumber)
 {
-  /*
-   * Format:
-   *    cci_func_args:
-   *         cci_entry
-   *         modifier cci_entry_list
-   *
-   *    cci_entry_list:
-   *         cci_entry
-   *         cci_entry . cci_entry
-   *
-   *    cci_entry:
-   *         '<' cci_label '>'
-   *
-   *    cci_label:
-   *         any combination of alpha and '_'
-   */
-
-  CCIEntryModifier  mod;
-  CCIFuncArg      *cciArg;
-  unsigned char   *string;
-
-
-  cciArg = XtNew(CCIFuncArg);
-
-  if ((string = GetString(linePP)) == NULL)
+    int  val;
+
+    val = StrToNum (GetString (linePP));
+    if (val == -1)
     {
-      /* Error - no data for f.cci command. cci_entry_list is required. */
-      fprintf(stderr, "Incorrect format for f.cci command.\n");
-      return (FALSE);
+        PWarning (((char *)GETMESSAGE(60, 20, "Invalid number specification")));
+        *pNumber = 0;
+        return (FALSE);
     }
-  else
-    {
-      /* check if no modifier was specified. */
-      if (string[0] == '<')
-       {
-         cciArg->mod      = NONE;
-         cciArg->cciEntry = XtNewString((char*)string);
-       }
-      else
-       {
-         if (! GetCCIModifier((String)string, &mod))
-           {
-             cciArg->mod      = NONE;
-             cciArg->cciEntry = XtNewString("");
-           }
-         else
-           {
-             cciArg->mod = mod;
-
-             if ((string = GetString(linePP)) == NULL)
-               {
-                 /* Found a modifier, but there's no cci_entry_list. */
-                 fprintf(stderr, "Incorrect format for f.cci command.\n");
-                 return(FALSE);
-               }
-             else
-               {
-                 cciArg->cciEntry = XtNewString((char*)string);
-               }
-           }
-       }
 
-      *pArgs = (String)cciArg;
-    }
+    *pNumber = val;
+    return (TRUE);
 
-  return(TRUE);
-} /* END OF FUNCTION ParseWmFuncCCIArgs */
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
+} /* END OF FUNCTION ParseWmFuncNbrArg */
 
-\f
 /*************************************<->*************************************
  *
  *  ParseButtonStr ()
@@ -4829,12 +3726,10 @@ static Boolean ParseContext (unsigned char **linePP, Context *context,
             *context |= F_CONTEXT_WINDOW;
            *subContext |= F_SUBCONTEXT_W_APP;
         }
-#ifdef WSM
         else if (!strcmp ("ifkey", (char *)ctxStr))
         {
             *context |= F_CONTEXT_IFKEY;
         }
-#endif /* WSM */
         else 
         /* Unknown context name */
         {
@@ -4956,9 +3851,7 @@ static void ParseKeySet (WmScreenData *pSD, unsigned char *lineP)
     KeySpec      *lastKeySpec;
     unsigned int  eventType;
     int           ix;
-#ifdef WSM
     Boolean    bBadKey;
-#endif /* WSM */
     
     /*
      * Parse the key set bindings from the configuration file.
@@ -5049,21 +3942,13 @@ static void ParseKeySet (WmScreenData *pSD, unsigned char *lineP)
        /*
         * Parse the key specification.
         */
-#ifdef WSM
        bBadKey = False;
-#endif /* WSM */
        if (!ParseKeyEvent(&lineP,
                           &eventType,
                           &keySpec->keycode,
                           &keySpec->state))
        {
-#ifdef WSM
            bBadKey = True;
-#else /* WSM */
-            PWarning (((char *)GETMESSAGE(60, 27, "Invalid key specification")));
-           XtFree ((char *)keySpec);
-           continue;  /* skip this key specification */
-#endif /* WSM */
        }
 
        /*
@@ -5074,15 +3959,12 @@ static void ParseKeySet (WmScreenData *pSD, unsigned char *lineP)
        if (!ParseContext(&lineP, &keySpec->context, 
                          &keySpec->subContext))
        {
-#ifdef WSM
            if (bBadKey)
                PWarning (((char *)GETMESSAGE(60, 27, "Invalid key specification")));
-#endif /* WSM */
             PWarning (((char *)GETMESSAGE(60, 28, "Invalid key context")));
            XtFree ((char *)keySpec);
            continue;  /* skip this key specification */
        }
-#ifdef WSM
        if (bBadKey)
        {
            /*
@@ -5100,7 +3982,6 @@ static void ParseKeySet (WmScreenData *pSD, unsigned char *lineP)
         * rest of the program doesn't see it.
         */
        keySpec->context &= ~F_CONTEXT_IFKEY;
-#endif /* WSM */
 
 
         /*
@@ -5144,577 +4025,14 @@ static void ParseKeySet (WmScreenData *pSD, unsigned char *lineP)
         }
        else
         {
-            pSD->keySpecs = keySpec;
-        }
-        lastKeySpec = keySpec;
-    }
-
-} /* END OF FUNCTION ParseKeySet */
-
-#ifndef WSM
-\f
-/*************************************<->*************************************
- *
- *  GetNextLine ()
- *
- *
- *  Description:
- *  -----------
- *  Returns the next line from an fopened configuration file or a newline-
- *  embedded configuration string.
- *
- *
- *  Inputs:
- *  ------
- *  cfileP = (global) file pointer to fopened configuration file or NULL
- *  line   = (global) line buffer
- *  linec  = (global) line count
- *  parseP = (global) parse string pointer if cfileP == NULL
- *
- * 
- *  Outputs:
- *  -------
- *  line =    (global) next line 
- *  linec =   (global) line count incremented
- *  parseP =  (global) parse string pointer incremented
- *  Return =  line or NULL if file or string is exhausted.
- *
- *
- *  Comments:
- *  --------
- *  If there are more than MAXLINE characters on a line in the file cfileP the
- *  excess are truncated.  
- *  Assumes the line buffer is long enough for any parse string line.
- * 
- *************************************<->***********************************/
-
-unsigned char *
-GetNextLine (void)
-{
-    register unsigned char     *string;
-    int                                len;
-
-#ifndef NO_MULTIBYTE
-    int   chlen;
-    wchar_t last;
-    wchar_t wdelim;
-    char delim;
-    int lastlen;
-#endif
-
-    if (cfileP != NULL)
-    /* read fopened file */
-    {
-       if ((string = (unsigned char *) 
-                     fgets ((char *)line, MAXLINE, cfileP)) != NULL)
-       {
-#ifndef NO_MULTIBYTE
-
-           lastlen = 0;
-           while (*string &&
-                  ((len = mblen((char *)string, MB_CUR_MAX)) > 0))
-           {
-               mbtowc(&last, (char *)string, MB_CUR_MAX);
-               lastlen = len;
-               string += len;
-           }
-           delim = '\\';
-           mbtowc(&wdelim, &delim, MB_CUR_MAX);
-           if (lastlen == 1 && last == wdelim)
-           {
-               do
-               {
-                   if (!fgets((char *)string, MAXLINE - (string - line), cfileP))
-                       break;
-
-                   lastlen = 0;
-                   while (*string &&
-                          ((len = mblen((char *)string, MB_CUR_MAX)) > 0))
-                   {
-                       mbtowc(&last, (char *)string, MB_CUR_MAX);
-                       lastlen = len;
-                       string += len;
-                   }
-                   linec++;
-               }
-               while (lastlen == 1 && last == wdelim);
-           }
-           string = line;
-#else
-           len = strlen((char *)string) - 2;
-           if ((len > 0) && string[len] == '\\')
-           {
-               do {
-                   string = &string[len];
-                   if (fgets((char *)string, 
-                             MAXLINE - (string-line), cfileP) == NULL)
-                      break;
-                   len = strlen((char *)string) - 2;
-                   linec++;
-               } while ((len >= 0) && string[len] == '\\');
-               string = line;
-           }
-#endif
-       }
-    }
-    else if ((parseP != NULL) && (*parseP != '\0'))
-    /* read parse string */
-    {
-       string = line;
-#ifndef NO_MULTIBYTE
-       while ((*parseP != '\0') &&
-               ((chlen = mblen ((char *)parseP, MB_CUR_MAX)) > 0) &&
-              (*parseP != '\n'))
-       /* copy all but NULL and newlines to line buffer */
-       {
-           while (chlen--)
-           {
-               *(string++) = *(parseP++);
-           }
-        }
-#else
-       while ((*parseP != '\0') && (*parseP != '\n'))
-       /* copy all but end-of-line and newlines to line buffer */
-       {
-           *(string++) = *(parseP++);
-        }
-#endif
-       *string = '\0';
-       if (*parseP == '\n')
-       {
-           parseP++;
-       }
-    }
-    else
-    {
-       string = NULL;
-    }
-
-    linec++;
-    return (string);
-
-} /* END OF FUNCTION GetNextLine */
-#endif /* WSM */
-
-#ifndef PANELIST
-\f
-#ifdef WSM
-/*************************************<->*************************************
- *
- *  GetStringC (linePP, SmBehavior)
- *
- *
- *  Description:
- *  -----------
- *  Returns the next quoted or whitespace-terminated nonquoted string in the
- *  line buffer.
- *  Additional functionality added to GetString in that anything in a
- *  quoted string is considered sacred and nothing will be stripped from
- *  the middle of a quoted string.
- *
- *
- *  Inputs:
- *  ------
- *  linePP =  pointer to current line buffer pointer.
- *  SmBehavior = flag that enables parsing session manager hints
- *               if True.
- *
- * 
- *  Outputs:
- *  -------
- *  linePP =  pointer to revised line buffer pointer.
- *  Return =  string 
- *
- *
- *  Comments:
- *  --------
- *  May alter the line buffer contents.
- *  Handles quoted strings and characters, removing trailing whitespace from
- *  quoted strings.
- *  Returns NULL string if the line is empty or is a comment.
- *  Code stolen from dtmwm.
- * 
- *************************************<->***********************************/
-#else /* WSM */
-/*************************************<->*************************************
- *
- *  GetString (linePP)
- *
- *
- *  Description:
- *  -----------
- *  Returns the next quoted or whitespace-terminated nonquoted string in the
- *  line buffer.
- *
- *
- *  Inputs:
- *  ------
- *  linePP =  pointer to current line buffer pointer.
- *
- * 
- *  Outputs:
- *  -------
- *  linePP =  pointer to revised line buffer pointer.
- *  Return =  string 
- *
- *
- *  Comments:
- *  --------
- *  May alter the line buffer contents.
- *  Handles quoted strings and characters, removing trailing whitespace from
- *  quoted strings.
- *  Returns NULL string if the line is empty or is a comment.
- * 
- *************************************<->***********************************/
-#endif /* WSM */
-
-#ifdef WSM
-unsigned char *GetStringC (unsigned char **linePP, Boolean SmBehavior)
-#else /* WSM */
-unsigned char *GetString (unsigned char **linePP)
-#endif /* WSM */
-{
-    unsigned char *lineP = *linePP;
-    unsigned char *endP;
-    unsigned char *curP;
-    unsigned char *lnwsP;
-#ifdef WSM
-    unsigned int  level = 0, checkLev, i, quoteLevel[10];
-#endif /* WSM */
-#ifndef NO_MULTIBYTE
-    int            chlen;
-
-    /* get rid of leading white space */
-    ScanWhitespace (&lineP);
-
-    /*
-     * Return NULL if line is empty, a comment, or invalid.
-     */
-#ifdef WSM
-    if (
-       *lineP == '\0' ||
-       ((chlen = mblen ((char *)lineP, MB_CUR_MAX)) < 1) ||
-        ((chlen == 1) && ((*lineP == '!') || 
-                         ((!SmBehavior) && (*lineP == '#'))))
-       )
-#else /* WSM */
-    if (
-       *lineP == '\0' ||
-       ((chlen = mblen ((char *)lineP, MB_CUR_MAX)) < 1) ||
-        ((chlen > 0) && ((*lineP == '!') || (*lineP == '#')))
-       )
-#endif /* WSM */
-    {
-        *linePP = lineP;
-        return (NULL);
-    }
-
-    if ((chlen == 1) && (*lineP == '"'))
-    /* Quoted string */
-    {
-#ifdef WSM
-       quoteLevel[level] = 1;  
-#endif /* WSM */
-       /*
-        * Start beyond double quote and find the end of the quoted string.
-        * '\' quotes the next character.
-        * Otherwise,  matching double quote or NULL terminates the string.
-        *
-        * We use lnwsP to point to the last non-whitespace character in the
-        * quoted string.  When we have found the end of the quoted string,
-        * increment lnwsP and if lnwsP < endP, write NULL into *lnwsP.
-        * This removes any trailing whitespace without overwriting the 
-        * matching quote, needed later.  If the quoted string was all 
-        * whitespace, then this will write a NULL at the beginning of the 
-        * string that will be returned -- OK.
-        */
-       lnwsP = lineP++;                /* lnwsP points to first '"' */
-       curP = endP = lineP;            /* other pointers point beyond */
-
-        while ((*endP = *curP) &&
-               ((chlen = mblen ((char *)curP, MB_CUR_MAX)) > 0) &&
-              ((chlen > 1) || (*curP != '"')))
-       /* Haven't found matching quote yet.
-        * First byte of next character has been copied to endP.
-        */
-        {
-           curP++;
-           if ((chlen == 1) && (*endP == '\\') && 
-               ((chlen = mblen ((char *)curP, MB_CUR_MAX)) > 0))
-           /* character quote:
-            * copy first byte of quoted nonNULL character down.
-            * point curP to next byte
-            */
-           {
-#ifdef WSM
-               if (SmBehavior)
-               {
-                   /*
-                    * Check to see if this is a quoted quote - if it is
-                    * strip off a level - if not - it's sacred leave it alone
-                    */
-                   checkLev = PeekAhead((curP - 1), quoteLevel[level]);
-                   if(checkLev > 0)
-                   {
-                       if(quoteLevel[level] <= checkLev)
-                       {
-                           level--;
-                       }
-                       else
-                       {
-                           level++;
-                           quoteLevel[level] = checkLev;
-                       }
-                       
-                       for(i = 0;i < (checkLev - 2);i++)
-                       {
-                           *endP++ = *curP++;curP++;
-                       }
-                       *endP = *curP++;
-                   }
-               }
-               else 
-               {
-#endif /* WSM */
-               *endP = *curP++;
-#ifdef WSM
-               }
-#endif /* WSM */
-            }
-
-           if (chlen == 1)
-           /* Singlebyte character:  character copy finished. */
-           {
-               if (isspace (*endP))
-               /* whitespace character:  leave lnwsP unchanged. */
-               {
-                   endP++;
-               }
-               else
-               /* non-whitespace character:  point lnwsP to it. */
-               {
-                   lnwsP = endP++;
-               }
-           }
-           else if (chlen > 1)
-           /* Multibyte (nonwhitespace) character:  point lnwsP to it.
-            * Finish character byte copy.
-            */
-           {
-               lnwsP = endP++;
-               while (--chlen)
-               {
-                   *endP++ = *curP++;
-                   lnwsP++;
-               }
-           }
-        }
-#else
-
-    /* get rid of leading white space */
-    ScanWhitespace (&lineP);
-
-#ifdef WSM
-    /* Return NULL if line is empty, whitespace, or begins with a comment. */
-    if ((lineP == NULL || *lineP == '\0') ||
-       (!SmBehavior && (*lineP == '#')))
-#else /* WSM */
-    /* Return NULL if line is empty, whitespace, or begins with a comment. */
-    if ((lineP == NULL) || (*lineP == '\0') || (*lineP == '#'))
-#endif /* WSM */
-    {
-        *linePP = lineP;
-        return (NULL);
-    }
-
-    if (*lineP == '"')
-    /* Quoted string */
-    {
-#ifdef WSM
-       quoteLevel[level] = 1;  
-#endif /* WSM */
-       /*
-        * Start beyond double quote and find the end of the quoted string.
-        * '\' quotes the next character.
-        * Otherwise,  matching double quote or NULL terminates the string.
-        *
-        * We use lnwsP to point to the last non-whitespace character in the
-        * quoted string.  When we have found the end of the quoted string,
-        * increment lnwsP and if lnwsP < endP, write NULL into *lnwsP.
-        * This removes any trailing whitespace without overwriting the 
-        * matching quote, needed later.  If the quoted string was all 
-        * whitespace, then this will write a NULL at the beginning of the 
-        * string that will be returned -- OK.
-        */
-       lnwsP = lineP++;                /* lnwsP points to first '"' */
-       curP = endP = lineP;            /* other pointers point beyond */
-
-        while ((*endP = *curP) && (*endP != '"'))
-       /* haven't found matching quote yet */
-        {
-           /* point curP to next character */
-           curP++;
-           if ((*endP == '\\') && (*curP != '\0'))
-           /* shift quoted nonNULL character down and curP ahead */
-           {
-#ifdef WSM
-               if (SmBehavior)
-               {
-                   /*
-                    * Check to see if this is a quoted quote - if it is
-                    * strip off a level - if not - it's sacred leave it alone
-                    */
-                   checkLev = PeekAhead((curP - 1), quoteLevel[level]);
-                   if(checkLev > 0)
-                   {
-                       if(quoteLevel[level] <= checkLev)
-                       {
-                           level--;
-                       }
-                       else
-                       {
-                           level++;
-                           quoteLevel[level] = checkLev;
-                       }
-                       
-                       for(i = 0;i < (checkLev - 2);i++)
-                       {
-                           *endP++ = *curP++;curP++;
-                       }
-                       *endP = *curP++;
-                   }
-               }
-               else 
-               {
-#endif /* WSM */
-               *endP = *curP++;
-#ifdef WSM
-               }
-#endif /* WSM */
-            }
-           if (isspace (*endP))
-           /* whitespace character:  leave lnwsP unchanged. */
-           {
-               endP++;
-           }
-           else
-           /* non-whitespace character:  point lnwsP to it. */
-           {
-               lnwsP = endP++;
-           }
-        }
-#endif
-
-       /*
-        *  Found matching quote or NULL.  
-        *  NULL out any trailing whitespace.
-        */
-
-       lnwsP++;
-       if (lnwsP < endP)
-        {
-           *lnwsP = '\0';
-        }
-    }
-
-    else
-    /* Unquoted string */
-    {
-        /* 
-        * Find the end of the nonquoted string.
-        * '\' quotes the next character.
-        * Otherwise,  whitespace, end-of-line, or '#' terminates the string.
-        */
-        curP = endP = lineP;
-
-#ifndef NO_MULTIBYTE
-#ifdef WSM
-        while ((*endP = *curP) &&
-               ((chlen = mblen ((char *)curP, MB_CUR_MAX)) > 0) &&
-               ((chlen > 1) || (!isspace (*curP) && 
-                               (SmBehavior || (*curP != '#')))))
-#else /* WSM */
-        while ((*endP = *curP) &&
-               ((chlen = mblen ((char *)curP, MB_CUR_MAX)) > 0) &&
-               ((chlen > 1) || (!isspace (*curP) && (*curP != '#'))))
-#endif /* WSM */
-       /* Haven't found whitespace or '#' yet.
-        * First byte of next character has been copied to endP.
-        */
-        {
-           curP++;
-           if ((chlen == 1) && (*endP == '\\') && 
-               ((chlen = mblen ((char *)curP, MB_CUR_MAX)) > 0))
-           /* character quote:
-            * copy first byte of quoted nonNULL character down.
-            * point curP to next byte
-            */
-           {
-               *endP = *curP++;
-            }
-           endP++;
-           if (chlen > 1)
-           /* Multibyte character:  finish character copy. */
-           {
-               while (--chlen)
-               {
-                   *endP++ = *curP++;
-               }
-           }
-        }
-#else
-#ifdef WSM
-        while ((*endP = *curP) && !isspace (*endP) && 
-                                       (SmBehavior || (*endP != '#')))
-#else /* WSM */
-        while ((*endP = *curP) && !isspace (*endP) && (*endP != '#'))
-#endif /* WSM */
-        {
-           /* point curP to next character */
-           curP++;
-           if ((*endP == '\\') && (*curP != '\0'))
-           /* shift quoted nonNULL character down and curP ahead */
-           {
-               *endP = *curP++;
-            }
-           endP++;
+            pSD->keySpecs = keySpec;
         }
-#endif
-    }
-
-    /*
-     * Three cases for *endP:
-     *   '#' --> write NULL over # and point to NULL
-     *   whitespace or
-     *     matching quote -> write end-of-line over char and point beyond
-     *   NULL -> point to NULL 
-     */
-
-#ifdef WSM
-    if (!SmBehavior && (*endP == '#'))
-#else /* WSM */
-    if (*endP == '#')
-#endif /* WSM */
-    {
-       *endP = '\0';       /* write '\0' over '#' */
-       *linePP = endP;     /* point to '\0' */
-    }
-    else if (*endP != '\0')
-    {
-       *endP = '\0';       /* write NULL over terminator */
-       *linePP = ++curP;   /* point beyond terminator */
-    }
-    else
-    {
-       *linePP = endP;
+        lastKeySpec = keySpec;
     }
-    return ((unsigned char *)lineP);
 
-} /* END OF FUNCTION GetString */
-#endif /* PANELIST */
+} /* END OF FUNCTION ParseKeySet */
 
 
-\f
 /*************************************<->*************************************
  *
  *  ParseBtnEvent (linePP, eventType, button, state, fClick)
@@ -6049,7 +4367,7 @@ static Boolean ParseModifiers(unsigned char **linePP, unsigned int *state)
 
 static Boolean LookupModifier (unsigned char *name, unsigned int *valueP)
 {
-    register int i;
+    int i;
 
     if (name != NULL)
     {
@@ -6068,153 +4386,6 @@ static Boolean LookupModifier (unsigned char *name, unsigned int *valueP)
 
 } /* END OF FUNCTION LookupModifier */
 
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  GetCCIModifier (modString, mod)
- *
- *
- *  Description:
- *  -----------
- *  Return the cci modifier corresponding to the specified string
- *
- *
- *  Inputs:
- *  ------
- *  modString = cci modifier string; may be null
- *
- * 
- *  Outputs:
- *  -------
- *  mod    = cci modifier.
- *  Return = (Boolean) true iff valid modifier string
- *
- *
- *  Comments:
- *  --------
- *  None.
- * 
- *************************************<->***********************************/
-
-static Boolean GetCCIModifier (String modString, CCIEntryModifier *mod)
-{
-  CCIEntryModifier i;
-
-
-  if (modString != NULL)
-    {
-      ToLower (modString);
-      for (i=NONE; i<=EXCLUDE; i++)
-       {
-         if (!strcmp (CCIEntryModifierNames[i], modString))
-            {
-             *mod = i;
-             return (TRUE);
-            }
-        }
-    }
-
-    return (FALSE);
-
-} /* END OF FUNCTION GetCCIModifier */
-
-\f
-/*************************************<->*************************************
- *
- *  FixMenuItem (menuSpec, menuItem)
- *
- *
- *  Description:
- *  -----------
- *  Fix-up the menuItem so that it appears an old-style cci command was
- *  read from the .mwmrc file
- *
- *
- *  Inputs:
- *  ------
- *  menuItem = the menu item structure
- *  menuSpec = the menu specification structure
- *
- * 
- *  Outputs:
- *  -------
- *  menuItem = the fixed-up menuitem
- *  menuSpec = the fixed-up menu specification structure if EXCLUDE found
- *  Return   = nothing
- *
- *  Comments:
- *  --------
- *
- *************************************<->***********************************/
-
-static void FixMenuItem (MenuSpec *menuSpec, MenuItem *menuItem)
-{
-  String      tmp;
-  CCIFuncArg *cciArg;
-  
-
-  if (menuItem == NULL)
-    return;
-
-  cciArg = (CCIFuncArg *)menuItem->wmFuncArgs;
-
-  menuItem->clientCommandName = menuItem->label;
-  menuItem->label = cciArg->cciEntry;
-
-  /*
-   * Fix-up the label to handle the modifier.
-   */
-
-  switch (cciArg->mod)
-    {
-    case NONE:
-      break;
-
-    case INLINE:
-      break;
-
-    case CASCADE:
-      /* -> */
-      tmp = (String) XtMalloc(strlen(menuItem->label) + 3);
-      sprintf(tmp, "->%s", menuItem->label);
-      XtFree(menuItem->label);
-      menuItem->label = tmp;
-      break;
-
-    case DELIMIT:
-      /* = */
-      tmp = (String) XtMalloc(strlen(menuItem->label) + 2);
-      sprintf(tmp, "=%s", menuItem->label);
-      XtFree(menuItem->label);
-      menuItem->label = tmp;
-      break;
-
-    case DELIMIT_INLINE:
-      break;
-
-    case DELIMIT_CASCADE:
-      /* => */
-      tmp = (String) XtMalloc(strlen(menuItem->label) + 3);
-      sprintf(tmp, "=>%s", menuItem->label);
-      XtFree(menuItem->label);
-      menuItem->label = tmp;
-      break;
-
-    case EXCLUDE:
-      /* ~ */
-      StoreExclusion(menuSpec, menuItem->label);
-
-      tmp = (String) XtMalloc(strlen(menuItem->label) + 2);
-      sprintf(tmp, "~%s", menuItem->label);
-      XtFree(menuItem->label);
-      menuItem->label = tmp;
-      break;
-    }
-}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-\f
 /*************************************<->*************************************
  *
  *  ParseEventType(linePP, table, eventType, ix)
@@ -6252,7 +4423,7 @@ static Boolean ParseEventType (unsigned char **linePP, EventTableEntry *table,
     unsigned char *lineP = *linePP;
     unsigned char *startP = *linePP;
     unsigned char eventTypeStr[MAX_EVENTTYPE_STRLEN+1];
-    register int  len;
+    int  len;
 
     /* Parse out the event string */
     ScanAlphanumeric (&lineP);
@@ -6360,14 +4531,11 @@ static Boolean ParseKeySym (unsigned char **linePP, unsigned int closure,
     unsigned char *startP;
     char           keySymName[MAX_KEYSYM_STRLEN+1];
     int            len;
-#ifndef NO_MULTIBYTE
     int            chlen;
-#endif
 
     ScanWhitespace (&lineP);
     startP = lineP;
 
-#ifndef NO_MULTIBYTE
     while (*lineP &&
           ((chlen = mblen ((char *)lineP, MB_CUR_MAX)) > 0) &&
            ((chlen > 1) ||
@@ -6376,24 +4544,13 @@ static Boolean ParseKeySym (unsigned char **linePP, unsigned int closure,
        /* Skip next character */
         lineP += chlen;
     }
-#else
-    while (*lineP && !isspace (*lineP) && *lineP != ',' && *lineP != ':' )
-    {
-       /* Skip next character */
-        lineP++;
-    }
-#endif
 
     len = min (lineP - startP, MAX_KEYSYM_STRLEN);
     (void) strncpy (keySymName, (char *)startP, len);
     keySymName[len] = '\0';
 
-#ifndef NO_MULTIBYTE
     if ((*detail = XStringToKeysym(keySymName)) == NoSymbol &&
         (mblen (keySymName, MB_CUR_MAX) == 1))
-#else
-    if ((*detail = XStringToKeysym(keySymName)) == NoSymbol)
-#endif
     {
         if (!isdigit (keySymName[0]) ||
             ((*detail = StrToNum ((unsigned char *)&keySymName[0])) == -1))
@@ -6595,7 +4752,6 @@ static unsigned int StrToOct(unsigned char *str)
 
 void ScanAlphanumeric (unsigned char **linePP)
 {
-#ifndef NO_MULTIBYTE
     int            chlen;
 
     while (*linePP &&
@@ -6604,113 +4760,10 @@ void ScanAlphanumeric (unsigned char **linePP)
     {
         (*linePP) += chlen;
     }
-#else
-    while (*linePP && isalnum (**linePP))
-    {
-        (*linePP)++;
-    }
-#endif
-
 } /* END OF FUNCTION ScanAlphanumeric */
 
 
-#ifndef WSM
-\f
-/*************************************<->*************************************
- *
- *  ScanWhitespace(linePP)
- *
- *
- *  Description:
- *  -----------
- *  Scan the string, skipping over all white space characters.
- *
- *
- *  Inputs:
- *  ------
- *  linePP = nonNULL pointer to current line buffer pointer
- *
- * 
- *  Outputs:
- *  -------
- *  linePP = nonNULL pointer to revised line buffer pointer
- *
- *
- *  Comments:
- *  --------
- *  Assumes linePP is nonNULL
- * 
- *************************************<->***********************************/
-
-void ScanWhitespace(unsigned char  **linePP)
-{
-#ifndef NO_MULTIBYTE
-    while (*linePP && (mblen ((char *)*linePP, MB_CUR_MAX) == 1) && isspace (**linePP))
-#else
-    while (*linePP && isspace (**linePP))
-#endif
-    {
-        (*linePP)++;
-    }
-
-} /* END OF FUNCTION ScanWhitespace */
-#endif /* not WSM */
-
-#ifndef WSM
-\f
-/*************************************<->*************************************
- *
- *  ToLower (string)
- *
- *
- *  Description:
- *  -----------
- *  Lower all characters in a string.
- *
- *
- *  Inputs:
- *  ------
- *  string = NULL-terminated character string or NULL
- *
- * 
- *  Outputs:
- *  -------
- *  string = NULL-terminated lower case character string or NULL
- *
- *
- *  Comments:
- *  --------
- *  None.
- * 
- *************************************<->***********************************/
-
-void ToLower (char  *string)
-{
-    char *pch = string;
-#ifndef NO_MULTIBYTE
-    int            chlen;
-
-    while (*pch && ((chlen = mblen (pch, MB_CUR_MAX)) > 0))
-    {
-        if ((chlen == 1) && (isupper (*pch)))
-       {
-           *pch = tolower(*pch);
-       }
-       pch += chlen;
-    }
-#else
-    while (*pch != '\0')
-    {
-        if (isupper (*pch))
-       {
-           *pch = tolower(*pch);
-       }
-       pch++;
-    }
-#endif
 
-} /* END OF FUNCTION ToLower */
-#endif  /* WSM */
 
 \f
 /*************************************<->*************************************
@@ -6735,7 +4788,6 @@ void
 PWarning (char *message)
 {
 
-#ifdef WSM
     char pch[MAXWMPATH+1];
     String sMessage;
     char *pchFile;
@@ -6764,25 +4816,10 @@ PWarning (char *message)
     }
     _DtSimpleError (wmGD.mwmName, DtIgnore, NULL, pch, NULL);
     XtFree (sMessage);
-#else /* WSM */
-    if (cfileP != NULL)
-    {
-        fprintf (stderr, ((char *)GETMESSAGE(60, 33, "%s: %s on line %d of configuration file %s\n")),
-                wmGD.mwmName, message, linec,
-                wmGD.configFile ? wmGD.configFile : cfileName);
-    }
-    else
-    {
-        fprintf (stderr, ((char *)GETMESSAGE(60, 34, "%s: %s on line %d of specification string\n")),
-                     wmGD.mwmName, message, linec);
-    }
-    fflush (stderr);
-#endif /* WSM */
 
 
 } /* END OF FUNCTION PWarning */
 
-#ifdef WSM
 /*
  * Key substitution table entry
  */
@@ -6834,9 +4871,7 @@ static void InitKeySubs (
     unsigned char *pch0;
     unsigned char *pch1;
     int len;
-#ifndef NO_MULTIBYTE
     int                chlen;
-#endif 
 
     pch0 = (unsigned char *)GETMESSAGE(60, 40, "");
 
@@ -6871,7 +4906,6 @@ static void InitKeySubs (
 
        /* get "from" string */
        pch1 = pch0;
-#ifndef NO_MULTIBYTE
         while (*pch1 && ((chlen = mblen ((char *)pch1, MB_CUR_MAX)) > 0))
        {
            if ((chlen == 1) && (*pch1 == ' '))
@@ -6880,9 +4914,6 @@ static void InitKeySubs (
            }
            pch1 += chlen;
        }
-#else /* NO_MULTIBYTE */
-       while (*pch1 && (*pch1 != ' ')) pch1++;
-#endif /* NO_MULTIBYTE */
        pKS->lenFrom = pch1 - pch0;
        if (pKS->lenFrom < 1) 
        {
@@ -6899,7 +4930,6 @@ static void InitKeySubs (
        ScanWhitespace (&pch1);
        pch0 = pch1;
 
-#ifndef NO_MULTIBYTE
         while (*pch1 && ((chlen = mblen ((char *)pch1, MB_CUR_MAX)) > 0))
        {
            if ((chlen == 1) && (*pch1 == ' '))
@@ -6908,9 +4938,6 @@ static void InitKeySubs (
            }
            pch1 += chlen;
        }
-#else /* NO_MULTIBYTE */
-       while (*pch1 && (*pch1 != ' ')) pch1++;
-#endif /* NO_MULTIBYTE */
 
        len = pch1 - pch0;
        if (len < 1)
@@ -6935,8 +4962,7 @@ static void InitKeySubs (
     *pNumKeySubs = numKS;
 }
 
-#endif /* WSM */
-\f
+
 /*************************************<->*************************************
  *
  *  ProcessAccelText (startP, endP, destP)
@@ -6967,10 +4993,7 @@ static void InitKeySubs (
 static void ProcessAccelText (unsigned char *startP, unsigned char *endP,
                              unsigned char *destP)
 {
-#ifndef NO_MULTIBYTE
     int   chlen;
-#endif
-#ifdef WSM
     static Boolean     bAccelInit = False;
     static KeySub      *pKeySub;
     static int         numKeySubs;
@@ -6984,7 +5007,6 @@ static void ProcessAccelText (unsigned char *startP, unsigned char *endP,
        InitKeySubs (&pKeySub, &numKeySubs);
        bAccelInit = True;
     }
-#endif /* WSM */
 
     /*
      * Copy modifiers
@@ -6998,36 +5020,18 @@ static void ProcessAccelText (unsigned char *startP, unsigned char *endP,
        {
             *destP++ = *startP++;
         }
-#ifdef WSM
        pchFirst = startP;
-#endif /* WSM */
 
-#ifndef NO_MULTIBYTE
         while (*startP &&
               (((chlen = mblen ((char *)startP, MB_CUR_MAX)) > 1)
                || isalnum (*startP)))
         {
            while (chlen--)
            {
-#ifdef WSM
                startP++;
-
-#else /* WSM */
-               *destP++ = *startP++;
-#endif /* WSM */
            }
        }
-#else
-        while (isalnum (*startP))
-        {
-#ifdef WSM
-               startP++;
-#else /* WSM */
-           *destP++ = *startP++;
-#endif /* WSM */
-       }
-#endif
-#ifdef WSM
+
        /* find substitution */
        pchSub = NULL;
        lenSub = 0;
@@ -7055,7 +5059,6 @@ static void ProcessAccelText (unsigned char *startP, unsigned char *endP,
            memcpy (destP, pchFirst, startP-pchFirst);
            destP += startP-pchFirst;
        }
-#endif /* WSM */
        *destP++ = '+';
 
         ScanWhitespace (&startP);
@@ -7067,11 +5070,7 @@ static void ProcessAccelText (unsigned char *startP, unsigned char *endP,
     startP++;  /* skip '<' */
     while (*startP != '>')
     {
-#ifndef NO_MULTIBYTE
         startP += mblen ((char *)startP, MB_CUR_MAX);
-#else
-        startP++;
-#endif
     }
     startP++;  /* skip '>' */
 
@@ -7259,62 +5258,16 @@ void ProcessMotifBindings (void)
 {
     char           fileName[MAXWMPATH+1];
     char         *bindings = NULL;
-#ifndef MOTIF_ONE_DOT_ONE
     char         *homeDir = XmeGetHomeDirName();
-#else
-    FILE          *fileP;
-#endif
 
     /*
      *  Look in the user's home directory for .motifbind
      */
 
-#ifdef MOTIF_ONE_DOT_ONE
-    GetHomeDirName(fileName);
-#else
     strcpy (fileName, homeDir);
-#endif
     strncat(fileName, "/", MAXWMPATH-strlen(fileName));
     strncat(fileName, MOTIF_BINDINGS_FILE, MAXWMPATH-strlen(fileName));
 
-#ifdef MOTIF_ONE_DOT_ONE
-    if ((fileP = fopen (fileName, "r")) != NULL)
-    {
-        unsigned char   buffer[MBBSIZ];
-        int             count;
-        Boolean         first = True;
-        int             mode = PropModeReplace;
-        Window          propWindow;
-
-        /*
-         * Get the atom for the property.
-         */
-        wmGD.xa_MOTIF_BINDINGS =
-                XInternAtom (DISPLAY, _XA_MOTIF_BINDINGS, False);
-
-        /*
-         * The property goes on the root window of screen zero
-         */
-        propWindow = RootWindow(DISPLAY, 0);
-
-        /*
-         * Copy file contents to property on root window of screen 0.
-         */
-        while ( (count=fread((char *) &buffer[0], 1, MBBSIZ, fileP)) > 0)
-        {
-            XChangeProperty (DISPLAY, propWindow, wmGD.xa_MOTIF_BINDINGS,
-                                XA_STRING, 8, mode,
-                                &buffer[0], count);
-
-            if (first)
-            {
-                first = False;
-                mode = PropModeAppend;
-            }
-        }
-    }
-
-#else
     XDeleteProperty (DISPLAY, RootWindow (DISPLAY, 0),
                XInternAtom (DISPLAY, "_MOTIF_BINDINGS", False));
     XDeleteProperty (DISPLAY, RootWindow (DISPLAY, 0),
@@ -7330,11 +5283,9 @@ void ProcessMotifBindings (void)
        _XmVirtKeysLoadFallbackBindings (DISPLAY, &bindings);
     }
     XtFree (bindings);
-#endif
 } /* END OF FUNCTION ProcessMotifBindings */
 
-#ifdef PANELIST
-\f
+
 /*************************************<->*************************************
  *
  *  void
@@ -7989,9 +5940,6 @@ Boolean ParseWmFuncActionArg (unsigned char **linePP,
 } /* END OF FUNCTION ParseWmFuncActionArg */
 
 
-#endif /* PANELIST */
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  PreprocessConfigFile (pSD)
@@ -8229,102 +6177,4 @@ GetNetworkFileName (char *pchFile)
     return (sReturn);
 }
 /****************************   eof    ***************************/
-#endif /* WSM */
-
-\f
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  SetGreyedContextAndMgtMask (menuItem, wmFunction)
- *
- *
- *  Description:
- *  -----------
- *  This function sets up the greyed context and management mask
- *  for a menu item based on the menu function passed in.
- *
- *  Inputs:
- *  ------
- *  menuItem   = the menu item to be set up 
- *  wmFunction = the menu function to find in the function table
- *              to determine how to set up the relevant fields
- * 
- *  Outputs:
- *  -------
- *  The menuItem will have its greyed context and management mask fields
- *  set appropriately. If the given function cannot be found, the fields
- *  will be set to the appropriate values as if the function were F_Nop.
- *  Return = True if the function could be found. False otherwise.
- *
- *************************************<->***********************************/
-
-Boolean SetGreyedContextAndMgtMask (MenuItem *menuItem,
-                                   WmFunction wmFunction)
-{
-    int ix;
-
-    for (ix = 0; ix < WMFUNCTIONTABLESIZE - 1; ++ix)
-    {
-       if (functionTable[ix].wmFunction == wmFunction)
-       {
-           /* Success! The function was found. Set up the
-              values and get the heck out of here. */
-           menuItem->greyedContext = functionTable[ix].greyedContext;
-           menuItem->mgtMask = functionTable[ix].mgtMask;
-           return(True);
-       }
-    }
 
-    /* We couldn't find the given command in the function table.
-       Set up the values as if the F_Nop function were found
-       and return False. */
-    menuItem->greyedContext = functionTable[F_NOP_INDEX].greyedContext;
-    menuItem->mgtMask = functionTable[F_NOP_INDEX].mgtMask;
-    return(False);
-}
-
-
-\f
-/*************************************<->*************************************
- *
- *  MakeSeparatorTemplate ()
- *
- *
- *  Description:
- *  -----------
- *
- *  Inputs:
- *  ------
- * 
- *  Outputs:
- *  -------
- *
- *************************************<->***********************************/
-static
-MenuItem *MakeSeparatorTemplate (int position)
-{
-    MenuItem *item;
-
-    item = (MenuItem *)XtMalloc(sizeof(MenuItem));
-
-    /* We use the labelType to determine where this separator is positioned
-       relative to the client command(s) it is surrounding, i.e. TOP or
-       BOTTOM */
-    item->labelType = position;
-    /* Make it look like a client command: */
-    item->label = XtNewString("<label-template>");
-    item->labelBitmapIndex = -1;
-    item->mnemonic = (KeySym) 0;
-    item->accelState = 0;
-    item->accelKeyCode = (KeyCode) NULL;
-    item->accelText = (String) NULL;
-    item->wmFunction = (WmFunction) F_Separator;
-    item->wmFuncArgs = (String) NULL;
-    item->greyedContext = 0;
-    item->mgtMask = 0;
-    item->clientCommandName = (String) NULL;
-    item->nextMenuItem = (MenuItem *) NULL;
-
-    return(item);
-}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
index 769f0e7a1792cbb9427357614c45a7e6817b5b0b..7e3e90b6956599d32e34c005c89a5d22c4e40bda 100644 (file)
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmResParse.h /main/5 1996/06/11 16:00:58 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
 #include <stdio.h>
 
 
-#ifdef PANELIST
 extern void            ProcessWmFile (WmScreenData *pSD, Boolean bNested);
-#else /* PANELIST */
-extern void ProcessWmFile (WmScreenData *pSD);
-#endif /* PANELIST */
 extern void ProcessCommandLine (int argc,  char *argv[]);
 extern void ProcessMotifBindings (void);
-#ifdef WSM
 extern Boolean         FindDtSessionMatch(int commandArgc, 
                                           char **commandArgv, 
                                           ClientData *pCD, 
@@ -58,18 +52,10 @@ extern void            GetFunctionTableValues (int *execIndex, int *nopIndex,
 extern void GetNopIndex (int tableSize, int *nopIndex);
 extern void GetExecIndex (int tableSize, int *execIndex);
 extern Boolean GetSessionHintsInfo (WmScreenData *pSD, long numItems);
-#endif /* WSM */
 extern FILE          * FopenConfigFile (void);
 extern void            FreeMenuItem (MenuItem *menuItem);
-#ifndef WSM
-extern unsigned char * GetNextLine (void);
-#endif /* not WSM */
-#ifdef WSM
 extern unsigned char * GetStringC (unsigned char **linePP, Boolean SmBehavior);
 extern void SystemCmd (char *pchCmd);
-#else /* WSM */
-extern unsigned char * GetString (unsigned char **linePP);
-#endif /* WSM */
 extern Boolean ParseBtnEvent (unsigned char  **linePP,
                               unsigned int *eventType,
                               unsigned int *button,
@@ -81,7 +67,6 @@ extern void            ParseKeyStr (WmScreenData *pSD, unsigned char *keyStr);
 extern Boolean ParseKeyEvent (unsigned char **linePP, unsigned int *eventType,
                       KeyCode *keyCode,  unsigned int *state);
 extern MenuItem      * ParseMwmMenuStr (WmScreenData *pSD, unsigned char *menuStr);
-#ifdef WSM
 extern void ParseSessionClientState (WmScreenData *pSD, int count,
                              unsigned char *string);
 extern void ParseSessionCommand (WmScreenData *pSD,  int count,
@@ -94,17 +79,12 @@ extern void ParseSessionWorkspaces (WmScreenData *pSD,  int count,
 extern void ParseSessionHost (WmScreenData *pSD,  int count,
                             unsigned char *string);
 extern void ParseDtSessionHints (WmScreenData *pSD, unsigned char *property);
-#endif /* WSM */
 extern int             ParseWmFunction (unsigned char **linePP, unsigned int res_spec, WmFunction *pWmFunction);
 extern void            PWarning (char *message);
 extern void            SaveMenuAccelerators (WmScreenData *pSD, MenuSpec *newMenuSpec);
 extern void      ScanAlphanumeric (unsigned char **linePP);
-#ifndef WSM
-extern void            ScanWhitespace(unsigned char  **linePP);
-#endif /* not WSM */
 extern void            ToLower (unsigned char  *string);
 extern void            SyncModifierStrings(void);
-#ifdef PANELIST
 extern void DeleteTempConfigFileIfAny (void);
 extern Boolean ParseWmFunctionArg (
                unsigned char **linePP,
@@ -119,18 +99,10 @@ extern Boolean ParseWmFuncStrArg (unsigned char **linePP,
                                       WmFunction wmFunction, String *pArgs);
 extern Boolean ParseWmFuncActionArg (unsigned char **linePP, 
                                  WmFunction wmFunction, String *pArgs);
-#endif /* PANELIST */
-#ifdef WSM
 #define ToLower(s)             (_DtWmParseToLower (s))
 #define GetNextLine()          (_DtWmParseNextLine (wmGD.pWmPB))
 #define GetSmartSMString(s)    (_DtWmParseNextTokenC (s, True))
 #define GetSmartString(s)      (_DtWmParseNextTokenC (s, False))
 #define GetString(s)           (_DtWmParseNextTokenC (s, False))
 #define ScanWhitespace(s)      (_DtWmParseSkipWhitespaceC (s))
-#endif /* WSM */
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-extern Boolean IsClientCommand (String);
-extern Boolean SetGreyedContextAndMgtMask (MenuItem *menuItem,
-                                          WmFunction wmFunction);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
index e9dbd74ef68376fb03afe88b31159aa2e85bdafb..197ec91111f8740f65ed79e083fc1e8f907b5290 100644 (file)
 /* 
  * Motif Release 1.2.3
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmResource.c /main/14 1997/04/15 10:30:02 dbl $"
-#endif
-#endif
 /*
  * (c) Copyright 1987, 1988, 1989, 1990, 1993, 1994 HEWLETT-PACKARD COMPANY 
  * (c) Copyright 1993, 1994 International Business Machines Corp.
@@ -53,9 +48,7 @@ static char rcsid[] = "$TOG: WmResource.c /main/14 1997/04/15 10:30:02 dbl $"
 
 #include <Xm/XmP.h>
 #include <Xm/RowColumn.h>
-#ifndef MOTIF_ONE_DOT_ONE
 #include <Xm/ScreenP.h>                /* for XmGetXmScreen and screen.moveOpaque */
-#endif
 
 /*
  * include extern functions
@@ -65,13 +58,11 @@ static char rcsid[] = "$TOG: WmResource.c /main/14 1997/04/15 10:30:02 dbl $"
 #include "WmGraphics.h"
 #include "WmMenu.h"
 #include "WmResParse.h"
-#ifdef WSM
 #include "WmBackdrop.h"
 #include "WmIconBox.h"
 #include "WmWrkspace.h"
 #include <Dt/GetDispRes.h>
 #define cfileP         (wmGD.pWmPB->pFile) /* fopen'ed configuration file or NULL */
-#endif /* WSM */
 #include "WmXSMP.h"
 
 /*
@@ -118,10 +109,7 @@ void ProcessClientResources (ClientData *pCD);
 void SetStdClientResourceValues (ClientData *pCD);
 void SetStdScreenResourceValues (WmScreenData *pSD);
 GC GetHighlightGC (WmScreenData *pSD, Pixel fg, Pixel bg, Pixmap pixmap);
-#ifdef WSM
 static void WriteOutXrmColors (WmScreenData *pSD);
-#endif /* WSM */
-#ifdef WSM
 void ProcessPresenceResources (WmScreenData *pSD);
 void ProcessDefaultBackdropImages (WmScreenData *pSD);
 void _WmBackdropBgDefault (Widget widget, int offset, XrmValue *value);
@@ -130,7 +118,6 @@ void _WmBackdropColorSetDefault (Widget widget, int offset, XrmValue *value);
 void _WmIconImageMaximumDefault (Widget widget, int offset, XrmValue *value);
 void _WmSecondariesOnTopDefault (Widget widget, int offset, XrmValue *value);
 int DefaultWsColorSetId (WmWorkspaceData *pWS);
-#endif /* WSM */
 void _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pixel newBackground, XrmValue *value);
 Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2);
 
@@ -168,7 +155,7 @@ char builtinSystemMenuName[] = "_MwmWindowMenu_";
 char builtinSystemMenu[] = BUILTINSYSTEMMENU;
 #else /* !defined(NO_MESSAGE_CATALOG)*/
 char *builtinSystemMenu = BUILTINSYSTEMMENU;
-#ifdef WSM
+
 #define DEFAULT_DTWM_SYSTEMMENU "_MwmWindowMenu_\n\
 {\n\
        Restore         _R      f.restore\n\
@@ -184,7 +171,6 @@ char *builtinSystemMenu = BUILTINSYSTEMMENU;
        no-label                        f.separator\n\
        Close   _C      Alt<Key>F4      f.kill\n\
 }"
-#endif /* WSM */
 
 void InitBuiltinSystemMenu(void)
 {
@@ -195,11 +181,9 @@ void InitBuiltinSystemMenu(void)
     char *MinString = NULL;
     char *MaxString = NULL;
     char *LowString = NULL;
-#ifdef WSM
     char *OcpString = NULL;
     char *OcaString = NULL;
     char *RemString = NULL;
-#endif /* WSM */
     char *CloString = NULL;
     char dsm[2048];
     char dsmtemp[sizeof(dsm)];
@@ -313,7 +297,7 @@ void InitBuiltinSystemMenu(void)
             strcpy(LowString, tmpString);
         }
     }
-#ifdef WSM
+
     if (DtwmBehavior)
     {
        if(gotItAll)
@@ -362,7 +346,7 @@ void InitBuiltinSystemMenu(void)
            }
        }
     } /* if DTWM */
-#endif /* WSM */
+
     if(gotItAll)
     {
         tmpString = ((char *)GETMESSAGE(62, 48, "Close _C Alt<Key>F4 f.kill"));
@@ -380,7 +364,6 @@ void InitBuiltinSystemMenu(void)
 
     if (!gotItAll)
     {
-#ifdef WSM
        if (DtwmBehavior)
        {
            builtinSystemMenu = (char *) 
@@ -391,10 +374,6 @@ void InitBuiltinSystemMenu(void)
            builtinSystemMenu = (char *) 
                        XtNewString((String)BUILTINSYSTEMMENU);
        }
-#else /* WSM */
-       builtinSystemMenu = (char *)
-                       XtNewString((String)BUILTINSYSTEMMENU);
-#endif /* WSM */
     }
     else
     {
@@ -402,14 +381,12 @@ void InitBuiltinSystemMenu(void)
         snprintf(dsm, sizeof(dsm), "%s\n{\n%s\n%s\n%s\n%s\n%s\n%s\n no-label  f.separator\n",
                  defaultSystemMenuName, ResString, MovString,
                  SizString, MinString, MaxString, LowString);
-#ifdef WSM
        if (DtwmBehavior)
        {
            snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n%s\n%s\n no-label  f.separator\n",
                     dsm, OcpString, OcaString, RemString);
            strcpy(dsm, dsmtemp);
        }
-#endif /* WSM */
         snprintf(dsmtemp, sizeof(dsmtemp), "%s%s\n}", dsm, CloString);
         strcpy(dsm, dsmtemp);
        
@@ -417,7 +394,6 @@ void InitBuiltinSystemMenu(void)
             (char *)XtMalloc ((unsigned int) (strlen(dsm) + 1))) == NULL)
        {
           Warning (((char *)GETMESSAGE(62, 21, "Insufficient memory for localized default system menu")));
-#ifdef WSM
            if (DtwmBehavior)
            {
                builtinSystemMenu = (char *) 
@@ -428,10 +404,6 @@ void InitBuiltinSystemMenu(void)
                builtinSystemMenu = (char *) 
                        XtNewString((String)BUILTINSYSTEMMENU);
            }
-#else /* WSM */
-           builtinSystemMenu = (char *) 
-                       XtNewString((String)BUILTINSYSTEMMENU);
-#endif /* WSM */
        }
        else
        {
@@ -451,14 +423,12 @@ void InitBuiltinSystemMenu(void)
        XtFree(MaxString);
     if (LowString != NULL)
        XtFree(LowString);
-#ifdef WSM
     if (OcpString != NULL)
        XtFree(OcpString);
     if (OcaString != NULL)
        XtFree(OcaString);
     if (RemString != NULL)
        XtFree(RemString);
-#endif /* WSM */
     if (CloString != NULL)
        XtFree(CloString);
     
@@ -468,9 +438,7 @@ void InitBuiltinSystemMenu(void)
 char builtinSystemMenu[];
 #endif /* MCCABE */
 
-#ifdef WSM
 #define HARD_CODED_PRIMARY   3
-#endif /* WSM */
 char defaultRootMenuName[] = "DefaultRootMenu";
 char builtinRootMenuName[] = "_MwmRootMenu_";
 #ifndef MCCABE
@@ -542,21 +510,12 @@ char behaviorKeyBindings[];
 char defaultButtonBindingsName[] = "DefaultButtonBindings";
 char builtinButtonBindingsName[] = "_MwmButtonBindings_";
 #ifndef MCCABE
-# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-#  define BUILTINBUTTONBINDINGS "_MwmButtonBindings_\n\
-{\n\
-       <Btn1Down>      icon|frame      f.raise\n\
-       <Btn3Down>      icon|frame      f.post_wmenu\n\
-       <Btn3Down>      root            f.menu %s\n\
-}";
-# else
-#  define BUILTINBUTTONBINDINGS "_MwmButtonBindings_\n\
+# define BUILTINBUTTONBINDINGS "_MwmButtonBindings_\n\
 {\n\
        <Btn1Down>      icon|frame      f.raise\n\
        <Btn3Down>      icon|frame      f.post_wmenu\n\
        <Btn3Down>      root            f.menu DefaultRootMenu\n\
 }";
-# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 char builtinButtonBindings[] = BUILTINBUTTONBINDINGS
 
 #else
@@ -568,10 +527,8 @@ static ClientData *_pCD;
 static String _defaultBackground;
 static String _defaultActiveBackground;
 static AppearanceData *_pAppearanceData;
-#ifdef WSM
 static WmWorkspaceData *pResWS;
 static WmScreenData *pResSD;
-#endif /* WSM */
 
 static char _defaultColor1HEX[] = "#A8A8A8A8A8A8";
 static char _defaultColor2HEX[] = "#5F5F92929E9E";
@@ -584,14 +541,12 @@ Const char _foreground[]    = "foreground";
 Const char _75_foreground[] = "75_foreground";
 Const char _50_foreground[] = "50_foreground";
 Const char _25_foreground[] = "25_foreground";
-#ifdef WSM
 Const char *_Dither = XmCO_DITHER;
 Const char *_NoDither = XmCO_NO_DITHER;
 Const char CLIENT_FRAME_PART[] = "client";
 Const char ICON_FRAME_PART[] = "icon";
 Const char FEEDBACK_FRAME_PART[] = "feedback";
 Const char MENU_ITEM_PART[] = "menu";
-#endif /* WSM */
 
 #define WmBGC          XmBACKGROUND
 #define WmFGC          XmFOREGROUND
@@ -653,7 +608,6 @@ XtResource wmGlobalResources[] =
        XtRString,
        (XtPointer)BITMAPDIR
     },
-#ifdef MINIMAL_DT
     {
        WmNblinkOnExec,
        WmCBlinkOnExec,
@@ -663,7 +617,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)False
     },
-#endif /* MINIMAL_DT */
     {
        WmNframeStyle,
        WmCFrameStyle,
@@ -703,7 +656,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)NULL
     },
-#ifdef WSM
 
     {
        WmNcppCommand,
@@ -714,7 +666,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)NULL
     },
-#endif /* WSM */
 
     {
        WmNdeiconifyKeyFocus,
@@ -755,7 +706,7 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)True
     },
-#ifdef WSM
+
     {
        WmNframeExternalShadowWidth,
        WmCFrameExternalShadowWidth,
@@ -765,7 +716,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)2
     },
-#endif /* WSM */
 
     {
        WmNfreezeOnConfig,
@@ -776,7 +726,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)True
     },
-#ifdef WSM
 
     {
        WmNuseWindowOutline,
@@ -787,7 +736,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)False
     },
-#endif /* WSM */
 
     {
        WmNiconAutoPlace,
@@ -798,7 +746,7 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)True
     },
-#ifdef WSM
+
     {
        WmNiconExternalShadowWidth,
        WmCIconExternalShadowWidth,
@@ -808,7 +756,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)2
     },
-#endif /* WSM */
 
     {
        WmNiconClick,
@@ -853,7 +800,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)True
     },
-#ifdef WSM
 
     {
        WmNmarqueeSelectGranularity,
@@ -864,7 +810,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)0
     },
-#endif /* WSM */
 
     {
        WmNmoveThreshold,
@@ -935,7 +880,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)False
     },
-#ifdef WSM
 
     {
        WmNrefreshByClearing,
@@ -956,19 +900,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)True
     },
-#endif /* WSM */
-
-#ifndef WSM
-    {
-        WmNsessionClientDB,
-       WmCSessionClientDB,
-       XtRString,
-       sizeof(String),
-       XtOffsetOf(WmGlobalData, sessionClientDB),
-       XtRImmediate,
-       (XtPointer)NULL
-    },
-#endif /* ! WSM */
 
     {
        WmNshowFeedback,
@@ -1009,7 +940,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)True
     },
-#if defined(PANELIST)
     {
        WmNuseFrontPanel,
        WmCUseFrontPanel,
@@ -1019,8 +949,7 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)True
     },
-#endif /* PANELIST */
-#ifdef WSM
+
     {
        WmNhelpDirectory,
        WmCHelpDirectory,
@@ -1031,8 +960,6 @@ XtResource wmGlobalResources[] =
        (XtPointer)"DT/Dtwm/"
     },
 
-#endif /* WSM */
-#ifdef MINIMAL_DT
     {
        WmNdtLite,
        WmCDtLite,
@@ -1042,7 +969,6 @@ XtResource wmGlobalResources[] =
        XtRImmediate,
        (XtPointer)False
     }
-#endif /* MINIMAL_DT */
 }; /* END OF wmGlobalResources[] */
 
 
@@ -1059,11 +985,7 @@ XtResource wmGlobalScreenResources[] =
        sizeof (Boolean),
         XtOffsetOf(WmGlobalData, multiScreen),
        XtRImmediate,
-#ifdef WSM
        (XtPointer)True
-#else /* WSM */
-       (XtPointer)False
-#endif /* WSM */
     },
 
     {
@@ -1075,7 +997,7 @@ XtResource wmGlobalScreenResources[] =
        XtRImmediate,
        (XtPointer)NULL
     },
-#ifdef WSM
+
     {   WmNbackdropDirectories, 
        WmCBackdropDirectories, 
        XmRString, 
@@ -1084,7 +1006,6 @@ XtResource wmGlobalScreenResources[] =
        XmRString,
        DEFAULT_BACKDROP_DIR
     },
-#endif /* WSM */
 };
 
 
@@ -1268,7 +1189,6 @@ XtResource wmScreenResources[] =
        (XtPointer)USE_ICON_DEFAULT_APPEARANCE
     },
 
-#ifdef WSM
     {
        WmNiconImageMaximum,
        WmCIconImageMaximum,
@@ -1278,17 +1198,6 @@ XtResource wmScreenResources[] =
        XtRCallProc,
        (XtPointer) _WmIconImageMaximumDefault
     },
-#else /* WSM */
-    {
-       WmNiconImageMaximum,
-       WmCIconImageMaximum,
-       WmRSize,
-       sizeof (WHSize),
-       XtOffsetOf (WmScreenData, iconImageMaximum),
-       XtRString,
-       "50x50"
-    },
-#endif /* WSM */
 
     {
        WmNiconImageMinimum,
@@ -1339,18 +1248,6 @@ XtResource wmScreenResources[] =
        XtRImmediate,
        (XtPointer) BIGSIZE
     },
-#ifndef WSM
-
-    {
-       WmNiconBoxGeometry,
-       WmCIconBoxGeometry,
-       XtRString,
-       sizeof (String),
-       XtOffsetOf (WmScreenData, iconBoxGeometry),
-       XtRString,
-       (XtPointer)NULL
-    },
-#endif /* WSM */
 
     {
        WmNiconBoxName,
@@ -1432,18 +1329,6 @@ XtResource wmScreenResources[] =
        (XtPointer)True
     },
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    {
-       WmNrootMenu,
-       WmCRootMenu,
-       XtRString,
-       sizeof (String),
-       XtOffsetOf (WmScreenData, rootMenu),
-       XtRString,
-       (XtPointer)builtinRootMenuName
-    },
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
     {
        WmNtransientDecoration,
        WmCTransientDecoration,
@@ -1464,7 +1349,6 @@ XtResource wmScreenResources[] =
        (XtPointer)(WM_FUNC_ALL & ~(MWM_FUNC_MAXIMIZE | MWM_FUNC_MINIMIZE))
     },
 
-#ifdef PANELIST
     {
        WmNsubpanelDecoration,
        WmCSubpanelDecoration,
@@ -1484,7 +1368,6 @@ XtResource wmScreenResources[] =
        XtRString,
        (XtPointer)NULL
     },
-#endif /* PANELIST */
 
     {
        WmNuseIconBox,
@@ -1505,7 +1388,6 @@ XtResource wmScreenResources[] =
        XtRImmediate,
        (XtPointer)False
 
-#ifdef WSM
     },
 
     {
@@ -1546,7 +1428,6 @@ XtResource wmScreenResources[] =
         XtOffsetOf (WmScreenData, numWorkspaces),
        XtRImmediate,
        (XtPointer)0
-#endif /* WSM */
     }
 
 };
@@ -1580,7 +1461,6 @@ XtResource wmStdScreenResources[] =
        (XtPointer) BIGSIZE
     },
 
-#ifdef WSM
     {
        WmNiconImageMaximum,
        WmCIconImageMaximum,
@@ -1590,17 +1470,6 @@ XtResource wmStdScreenResources[] =
        XtRCallProc,
        (XtPointer) _WmIconImageMaximumDefault
     },
-#else /* WSM */
-    {
-       WmNiconImageMaximum,
-       WmCIconImageMaximum,
-       WmRSize,
-       sizeof (WHSize),
-       XtOffsetOf (WmScreenData, iconImageMaximum),
-       XtRString,
-       "50x50"
-    },
-#endif /* WSM */
 
     {
        WmNiconImageMinimum,
@@ -1659,7 +1528,6 @@ XtResource wmStdScreenResources[] =
  *      "Mwm*[screen<#>*]<workspace>*<resource_identifier>".
  *
  ******************************<->***********************************/
-#ifdef WSM
 XtResource wmWorkspaceResources[] =
 {
     {
@@ -1683,9 +1551,6 @@ XtResource wmWorkspaceResources[] =
     }
 
 };
-#else /* WSM */
-XtResource *wmWorkspaceResources = NULL;
-#endif /* WSM */
 
 
 \f
@@ -1705,7 +1570,6 @@ XtResource *wmWorkspaceResources = NULL;
  *
  *************************************<->***********************************/
 
-#ifdef WSM
 XtResource wmStdWorkspaceResources[] =
 {
     {
@@ -1718,12 +1582,8 @@ XtResource wmStdWorkspaceResources[] =
        (XtPointer)NULL
     }
 };
-#else /* WSM */
-XtResource *wmStdWorkspaceResources = NULL;
-#endif /* WSM */
 
-#ifdef WSM
-\f
+
 /*************************************<->*************************************
  *
  *  wmBackdropResources
@@ -1816,9 +1676,7 @@ XtResource wmWsPresenceResources[] =
        (XtPointer)NULL
     }
 };
-#endif /* WSM */
 
-\f
 /*************************************<->*************************************
  *
  *  wmClientResources
@@ -1837,7 +1695,6 @@ XtResource wmWsPresenceResources[] =
 XtResource wmClientResources[] =
 {
 
-#ifdef WSM
     {
        WmNabsentMapBehavior,
        WmCAbsentMapBehavior,
@@ -1847,7 +1704,7 @@ XtResource wmClientResources[] =
        XtRImmediate,
        (XtPointer)(AMAP_BEHAVIOR_ADD)
     },
-#endif /* WSM */
+
     {
        WmNclientDecoration,
        WmCClientDecoration,
@@ -1977,7 +1834,6 @@ XtResource wmClientResources[] =
        XtRString,
        "0x0"
     },
-#ifdef WSM
 
     {
        WmNsecondariesOnTop,
@@ -1988,7 +1844,6 @@ XtResource wmClientResources[] =
        XtRCallProc,
        (XtPointer)_WmSecondariesOnTopDefault
     },
-#endif /* WSM */
 
     {
        WmNsystemMenu,
@@ -2007,11 +1862,7 @@ XtResource wmClientResources[] =
        sizeof (Boolean),
         XtOffsetOf (ClientData, useClientIcon),
        XtRImmediate,
-#ifdef WSM
        (XtPointer)True
-#else
-       (XtPointer)False
-#endif /* WSM */
     },
 
     {
@@ -2136,7 +1987,7 @@ XtResource wmStdClientResources[] =
        XtRString,
        "0x0"
     },
-#ifdef WSM
+
     {
        WmNsecondariesOnTop,
        WmCSecondariesOnTop,
@@ -2146,7 +1997,6 @@ XtResource wmStdClientResources[] =
        XtRCallProc,
        (XtPointer)_WmSecondariesOnTopDefault
     },
-#endif /* WSM */
 
     {
        WmNuseClientIcon,
@@ -2794,7 +2644,6 @@ _WmATopShadowPixmapDefault (Widget widget, int offset, XrmValue *value)
 } /* END OF FUNCTION _WmATopShadowPixmapDefault */
 
 
-#ifdef WSM
 void 
 _WmBackdropBgDefault (Widget widget, int offset, XrmValue *value)
 {
@@ -2988,7 +2837,6 @@ DefaultWsColorSetId (WmWorkspaceData *pWS)
 
 } /* END OF FUNCTION DefaultWsColorSetId */
 
-#endif /* WSM */
 
 
 \f
@@ -3073,8 +2921,7 @@ _WmMultiClickTimeDefault (Widget widget, int offset, XrmValue *value)
 
 } /* END OF FUNCTION _WmMultiClickTimeDefault */
 
-#ifdef WSM
-\f
+
 /*************************************<->*************************************
  *
  *  _WmSecondariesOnTopDefault (widget, offset, value)
@@ -3118,7 +2965,6 @@ _WmSecondariesOnTopDefault (Widget widget, int offset, XrmValue *value)
     value->size = sizeof (Boolean);
 
 } /* END OF FUNCTION _WmSecondariesOnTopDefault */
-#endif /* WSM */
 
 
 \f
@@ -3263,9 +3109,7 @@ SetStdGlobalResourceValues (void)
     wmGD.startupKeyFocus = True;
     wmGD.systemButtonClick = True;
     wmGD.systemButtonClick2 = True;
-#if defined(PANELIST)
     wmGD.useFrontPanel=False;
-#endif /* PANELIST */
 
 } /* END OF FUNCTION SetStdGlobalResourceValues */
 
@@ -3348,8 +3192,7 @@ ProcessScreenListResource (void)
        
 } /* END OF FUNCTION ProcessScreenListResource */
 
-#ifdef WSM
-\f
+
 /******************************<->*************************************
  *
  *  ProcessWmColors ()
@@ -4215,7 +4058,6 @@ CheckForNoDither (AppearanceData *pAD)
 
 } /* END OF FUNCTION CheckForNoDither */
 
-#endif /* WSM */
 
 
 \f
@@ -4267,9 +4109,7 @@ ProcessAppearanceResources (WmScreenData *pSD)
              (XtPointer) &(pSD->clientAppearance),
              WmNclient, WmCClient, wmAppearanceResources, 
              XtNumber (wmAppearanceResources), NULL, 0);
-#ifdef WSM
     CheckForNoDither (&(pSD->clientAppearance));
-#endif /* WSM */
 
 
     /*
@@ -4299,9 +4139,7 @@ ProcessAppearanceResources (WmScreenData *pSD)
     (void)XtGetSubresources (clientW, (XtPointer) &(pSD->clientTitleAppearance),
              WmNtitle, WmCTitle, wmAppearanceResources, 
              XtNumber (wmAppearanceResources), NULL, 0);
-#ifdef WSM
     CheckForNoDither (&(pSD->clientTitleAppearance));
-#endif /* WSM */
 
 
     /*
@@ -4338,9 +4176,7 @@ ProcessAppearanceResources (WmScreenData *pSD)
              (XtPointer) &(pSD->iconAppearance),
              WmNicon, WmCIcon, wmAppearanceResources, 
              XtNumber (wmAppearanceResources), NULL, 0);
-#ifdef WSM
     CheckForNoDither (&(pSD->iconAppearance));
-#endif /* WSM */
 
 
     /*
@@ -4365,9 +4201,7 @@ ProcessAppearanceResources (WmScreenData *pSD)
              (XtPointer) &(pSD->feedbackAppearance),
              WmNfeedback, WmCFeedback, wmAppearanceResources, 
              XtNumber (wmAppearanceResources), NULL, 0);
-#ifdef WSM
     CheckForNoDither (&(pSD->feedbackAppearance));
-#endif /* WSM */
 
     /*
      * Process the feedback resource values:
@@ -4513,13 +4347,11 @@ MakeAppearanceResources (WmScreenData *pSD, AppearanceData *pAData, Boolean make
 #endif
     } else {
        /* got default font successfully, hack was not needed */
-#ifndef NO_MULTIBYTE
        /*
         *  Calculate title bar's height (using selected font) and store it in pAData.
         */
        pAData->titleHeight = (pAData->font)->ascent + (pAData->font)->descent
        + WM_TITLE_BAR_PADDING;
-#endif
     }
 
 
@@ -4828,7 +4660,6 @@ GetAppearanceGCs (WmScreenData *pSD, Pixel fg, Pixel bg, XFontStruct *font, Pixm
 void 
 ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
 {
-#ifdef WSM
     pResSD = pSD;      /* save current screen data for default processing */
     /*
      * Use the screen name (e.g., "0") as the default resource name.
@@ -4855,41 +4686,10 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
            wmScreenResources, 
            XtNumber (wmScreenResources), NULL, 0);
 
-#ifndef MOTIF_ONE_DOT_ONE
        pSD->moveOpaque = (((XmScreen) XmGetXmScreen(XtScreen(pSD->screenTopLevelW)))
                           -> screen.moveOpaque);
-#endif
-    }
-
-#else /* WSM */
-    /*
-     * Retrieve screen specific resources.
-     */
-
-    if (wmGD.useStandardBehavior)
-    {
-       XtGetSubresources (wmGD.topLevelW, (XtPointer) pSD, 
-           (String) screenName, (String)screenName, wmStdScreenResources, 
-           XtNumber (wmStdScreenResources), NULL, 0);
-
-       /*
-        * Fill in the standard resource values.
-        */
-
-       SetStdScreenResourceValues (pSD);
     }
-    else
-    {
-       XtGetSubresources (wmGD.topLevelW, (XtPointer) pSD, 
-           (String)screenName, (String)screenName, wmScreenResources, 
-           XtNumber (wmScreenResources), NULL, 0);
 
-#ifndef MOTIF_ONE_DOT_ONE
-       pSD->moveOpaque =(((XmScreen) XmGetXmScreen(XtScreen(pSD->screenTopLevelW)))
-                         -> screen.moveOpaque);
-#endif
-    }
-#endif /* WSM */
 
     /*
      * Do some additional processing on the window manager resource values.
@@ -4989,18 +4789,7 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
            pSD->resizeBorderWidth = (int) (avg_res * 2.2);
 
            /* limit size because big borders look ugly */
-#ifndef WSM
-           if (wmGD.frameStyle == WmSLAB)
-           {
-#endif /* WSM */
                if (pSD->resizeBorderWidth > 6) pSD->resizeBorderWidth = 6;
-#ifndef WSM
-           }
-           else
-           {
-               if (pSD->resizeBorderWidth > 7) pSD->resizeBorderWidth = 7;
-           }
-#endif /* WSM */
        }
 
        /* Multiply times width in mm (avg. 5-6 pixels) */
@@ -5044,15 +4833,12 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
     {
        pSD->resizeBorderWidth = MAXIMUM_FRAME_BORDER_WIDTH;
     }
-#ifdef WSM
 
     /*
      * Update the resource database.
      */
     WriteOutXrmColors (pSD);
 
-#endif /* WSM */
-
     /*
      * Process the component appearance resources for client, 
      * icon and feedback parts of mwm.
@@ -5060,7 +4846,6 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
 
      ProcessAppearanceResources (pSD);
 
-#ifdef WSM
     /* 
      * Process the workspace list and name the initial
      * workspaces
@@ -5074,7 +4859,6 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
       */
      ProcessDefaultBackdropImages (pSD);
     
-#endif /* WSM */
     /*
      * Save the default icon pixmap in global data. We'll use it only
      * as a last resort.
@@ -5086,8 +4870,6 @@ ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName)
 
 } /* END OF FUNCTION ProcessScreenResources */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  ProcessDefaultBackdropImages (pSD)
@@ -5264,7 +5046,6 @@ ProcessWorkspaceList (WmScreenData *pSD)
 
 } /* END OF FUNCTION ProcessWorkspaceList */
 
-#endif /* WSM */
 
 \f
 /******************************<->*************************************
@@ -5303,9 +5084,7 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS)
     /*
      * Retrieve workspace specific resources.
      */
-#ifdef WSM
     pResWS = pWS;      /* save current ws for default processing */
-#endif /* WSM */
 
     if (wmGD.useStandardBehavior)
     {
@@ -5318,9 +5097,7 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS)
         *
         * (no code for this right now)
         */
-#ifdef WSM
         pWS->iconBoxGeometry = NULL;
-#endif /* WSM */
     }
     else
     {
@@ -5328,17 +5105,14 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS)
            pWS->name, pWS->name, wmWorkspaceResources, 
            XtNumber (wmWorkspaceResources), NULL, 0);
 
-#ifdef WSM
         /*  Dup iconbox geometry, it may be free'd later on.  */
 
         if (pWS->iconBoxGeometry)
         {
             pWS->iconBoxGeometry = XtNewString (pWS->iconBoxGeometry);
         }
-#endif /* WSM */
     }
 
-#ifdef WSM
     if (pWS->title == NULL)
     {
        /*
@@ -5374,12 +5148,9 @@ ProcessWorkspaceResources (WmWorkspaceData *pWS)
        XtNumber (wmBackdropResources), NULL, 0);
 
     ProcessBackdropResources (pWS, 0);
-#endif /* WSM */
 
 } /* END OF FUNCTION ProcessWorkspaceResources */
 
-#ifdef WSM
-\f
 /******************************<->*************************************
  *
  *  ProcessPresenceResources (pSD)
@@ -5476,7 +5247,6 @@ ProcessPresenceResources (WmScreenData *pSD)
     }
 
 } /* END OF FUNCTION ProcessPresenceResources */
-#endif /* WSM */
 
 \f
 /*************************************<->*************************************
@@ -5646,13 +5416,12 @@ ProcessClientResources (ClientData *pCD)
 
         /* make top and bottom shadow pixmaps */
 
-#ifdef WSM
        if (pCD->matteBottomShadowPStr &&
            (!strcmp(pCD->matteBottomShadowPStr, _NoDither)))
        {
            pCD->matteBottomShadowPStr = NULL;
        }
-#endif /* WSM */
+
         if (pCD->matteBottomShadowPStr)
         {
            if ((pCD->matteBottomShadowPStr ==
@@ -5684,13 +5453,12 @@ ProcessClientResources (ClientData *pCD)
            pCD->matteBottomShadowPixmap = (Pixmap)NULL;
         }
 
-#ifdef WSM
        if (pCD->matteTopShadowPStr &&
            (!strcmp(pCD->matteTopShadowPStr, _NoDither)))
        {
            pCD->matteTopShadowPStr = NULL;
        }
-#endif /* WSM */
+
         if (pCD->matteTopShadowPStr)
         {
            if ((pCD->matteTopShadowPStr ==
@@ -5801,9 +5569,6 @@ SetStdClientResourceValues (ClientData *pCD)
 void 
 SetStdScreenResourceValues (WmScreenData *pSD)
 {
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    pSD->rootMenu = builtinRootMenuName;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     pSD->buttonBindings = builtinButtonBindingsName;
     pSD->cleanText = True;
     pSD->iconDecoration =
@@ -5941,7 +5706,6 @@ _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pi
 
     if (Monochrome (newScreen))
     {
-#ifdef WSM
     Boolean ok = False;
     /*
      * Check color server sets for this screen.
@@ -5984,7 +5748,6 @@ _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pi
     }
     if (!ok)
     {
-#endif /* WSM */
         switch (type)
          {
          case WmFGC: newValue = BlackPixelOfScreen (newScreen); break;
@@ -5992,9 +5755,7 @@ _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pi
          case WmTSC: newValue = WhitePixelOfScreen (newScreen); break;
          case WmBSC: newValue = BlackPixelOfScreen (newScreen); break;
          }
-#ifdef WSM
     }
-#endif /* WSM */
        return;
     }
 
@@ -6096,20 +5857,17 @@ _WmGetDynamicDefault (Widget widget, unsigned char type, String defaultColor, Pi
  * 
  *************************************<->***********************************/
 
-XmColorData * _WmGetDefaultColors (screen, colormap, defaultColor)
-       Screen *screen;
-       Colormap colormap;
-       String defaultColor;
-
+XmColorData * _WmGetDefaultColors (Screen *screen, Colormap colormap,
+                                   String defaultColor)
 {
     static XmColorData *defaultSet[2] = {NULL, NULL};
     static int defaultCount[2] = {0, 0};
     static int defaultSize[2] = {0, 0};
     int setId;
-    register XmColorData *set;
-    register int count;
-    register int size;
-    register int i;
+    XmColorData *set;
+    int count;
+    int size;
+    int i;
     Display *display = DisplayOfScreen (screen);
     XColor colorDef;
 
@@ -6232,10 +5990,7 @@ XmColorData * _WmGetDefaultColors (screen, colormap, defaultColor)
  * 
  *************************************<->***********************************/
 
-char * WmRealloc (ptr, size)
-       char *ptr;
-       unsigned size;
-
+char * WmRealloc (char *ptr, unsigned size)
 {
     if (ptr)
     {
@@ -6280,10 +6035,7 @@ char * WmRealloc (ptr, size)
  * 
  *************************************<->***********************************/
 
-char * WmMalloc (ptr, size)
-       char *ptr;
-       unsigned size;
-
+char * WmMalloc (char *ptr, unsigned size)
 {
     if (ptr)
     {
@@ -6329,10 +6081,7 @@ char * WmMalloc (ptr, size)
  *************************************<->***********************************/
 
 void
-SetupDefaultResources (pSD)
-
-WmScreenData *pSD;
-
+SetupDefaultResources (WmScreenData *pSD)
 {
     KeySpec *nextKeySpec;
     String keyBindings;
@@ -6377,23 +6126,7 @@ WmScreenData *pSD;
         * set.
         */
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-        /*
-        * Before parsing the string, substitute the real name for
-        * the default rootmenu using the resource rootMenu
-        * for the %s in the string.
-        */
-
-        char *buffer;
-
-       buffer = (char *) XtMalloc(strlen(builtinKeyBindings) +
-                                  strlen(pSD->rootMenu) + 1);
-       sprintf(buffer, builtinKeyBindings, pSD->rootMenu);
-
-       ParseKeyStr (pSD, (unsigned char *)buffer);
-#else
        ParseKeyStr (pSD, (unsigned char *)builtinKeyBindings);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     }
     else
     {
@@ -6429,23 +6162,7 @@ WmScreenData *pSD;
         * set.
         */
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-        /*
-        * Before parsing the string, substitute the real name for
-        * the default rootmenu using the resource rootMenu
-        * for the %s in the string.
-        */
-
-        char *buffer;
-
-       buffer = (char *) XtMalloc(strlen(builtinButtonBindings) +
-                                  strlen(pSD->rootMenu) + 1);
-       sprintf(buffer, builtinButtonBindings, pSD->rootMenu);
-
-       ParseButtonStr (pSD, (unsigned char *)buffer);
-#else
        ParseButtonStr (pSD, (unsigned char *)builtinButtonBindings);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     }
 
 #ifdef NO_MESSAGE_CATALOG
@@ -6557,8 +6274,6 @@ Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2)
 
 } /* END OF FUNCTION SimilarAppearanceData */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  Monochrome (screen)
@@ -6618,7 +6333,5 @@ Monochrome (Screen *screen)
 
     return ((DefaultDepthOfScreen(screen) == 1));
 } /* END OF FUNCTION Monochrome */
-#endif /* WSM */
-#ifdef WSM
+
 /****************************   eof    ***************************/
-#endif /* WSM */
index 65be40f579886b4f12f253f2a3f2561b6370fdde..8c20712af2cd7d303e422508563beed89403f5c6 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2.3
 */ 
-/*   $TOG: WmResource.h /main/6 1997/04/14 12:52:19 dbl $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -37,10 +36,8 @@ extern void InitBuiltinSystemMenu(void);
 extern void GetAppearanceGCs (WmScreenData *pSD, Pixel fg, Pixel bg, XFontStruct *font, Pixmap bg_pixmap, Pixel ts_color, Pixmap ts_pixmap, Pixel bs_color, Pixmap bs_pixmap, GC *pGC, GC *ptsGC, GC *pbsGC);
 extern GC   GetHighlightGC (WmScreenData *pSD, Pixel fg, Pixel bg, Pixmap pixmap);
 extern void MakeAppearanceResources (WmScreenData *pSD, AppearanceData *pAData, Boolean makeActiveResources);
-#ifdef WSM
 extern Boolean Monochrome (Screen *screen);
 extern void ProcessWmColors (WmScreenData *pSD);
-#endif /* WSM */
 extern void ProcessWmResources (void);
 extern void SetStdGlobalResourceValues (void);
 extern void ProcessScreenListResource (void);
@@ -48,9 +45,7 @@ extern void ProcessAppearanceResources (WmScreenData *pSD);
 extern void ProcessGlobalScreenResources (void);
 extern void ProcessPresenceResources (WmScreenData *pSD);
 extern void ProcessScreenResources (WmScreenData *pSD, unsigned char *screenName);
-#ifdef WSM
 extern void ProcessWorkspaceList (WmScreenData *pSD);
-#endif /* WSM */
 extern void ProcessWorkspaceResources (WmWorkspaceData *pWS);
 extern void ProcessClientResources (ClientData *pCD);
 extern void SetStdClientResourceValues (ClientData *pCD);
@@ -59,10 +54,8 @@ extern char *WmRealloc (char *ptr, unsigned size);
 extern char *WmMalloc (char *ptr, unsigned size);
 extern void SetupDefaultResources (WmScreenData *pSD);
 extern Boolean SimilarAppearanceData (AppearanceData *pAD1, AppearanceData *pAD2);
-#ifdef WSM
 extern String ResCat (String s1, String s2, String s3, String s4);
 void CheckForNoDither (AppearanceData *pAD);
-#endif /* WSM */
 
 #ifndef NO_MESSAGE_CATALOG
 extern char *builtinSystemMenu;
@@ -73,6 +66,3 @@ extern char builtinKeyBindings[];
 extern char builtinRootMenu[];
 extern char builtinSystemMenuName[];
 
-#ifndef WSM
-#define Monochrome(screen) ( DefaultDepthOfScreen(screen) == 1 )
-#endif /* not WSM */
index 04ddca2bc85abd4edabe2267e2b28b1f4ae0998e..bb2998aff8ff83a97f2ef29fd653d61327e49bb8 100644 (file)
 /* 
  * Motif Release 1.2
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmSignal.c /main/6 1996/10/17 16:20:07 drk $"
-#endif
-#endif
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -64,7 +59,6 @@ static char rcsid[] = "$XConsortium: WmSignal.c /main/6 1996/10/17 16:20:07 drk
  */
 
 
-#ifdef WSM
 \f
 /*************************************<->*************************************
  *
@@ -151,7 +145,6 @@ RestoreDefaultSignalHandlers (void)
     (void) sigaction (SIGSYS, &sa, (struct sigaction *) 0);
 #endif
 }
-#endif /* WSM */
 
 \f
 /*************************************<->*************************************
@@ -167,11 +160,6 @@ RestoreDefaultSignalHandlers (void)
 
 void SetupWmSignalHandlers (int dummy)
 {
-#ifndef WSM
-    void (*signalHandler) ();
-#endif
-
-#ifdef WSM
     struct sigaction   sa;
     struct sigaction   osa;
 
@@ -225,26 +213,6 @@ void SetupWmSignalHandlers (int dummy)
     (void) sigaction (SIGSYS, &sa, (struct sigaction *) 0);
 #endif
 
-#else /* not WSM - original mwm code*/
-
-    signalHandler = (void (*)())signal (SIGINT, SIG_IGN);
-    if (signalHandler != (void (*)())SIG_IGN)
-    {
-       signal (SIGINT, QuitWmSignalHandler);
-    }
-
-    signalHandler = (void (*)())signal (SIGHUP, SIG_IGN);
-    if (signalHandler != (void (*)())SIG_IGN)
-    {
-       signal (SIGHUP, QuitWmSignalHandler);
-    }
-
-    signal (SIGQUIT, QuitWmSignalHandler);
-
-    signal (SIGTERM, QuitWmSignalHandler);
-#endif /* WSM */
-
-
 } /* END OF FUNCTION SetupWmSignalHandlers */
 
 \f
index 870f23dfc83f39a14a5f4add2a16a45ebc7633ae..aedb0a95043a8fed2fd458542bdad33765815c49 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmSignal.h /main/4 1995/11/01 11:52:55 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index 47874a4fff2ea3db1a928bf914b89689b65bce9e..5cb576dd9e924b3142a92e8e99b3e7b95080ae02 100644 (file)
 /* 
  * Motif Release 1.2.2
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmWinConf.c /main/8 1996/10/30 11:15:17 drk $"
-#endif
-#endif
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -57,7 +52,6 @@ static char rcsid[] = "$XConsortium: WmWinConf.c /main/8 1996/10/30 11:15:17 drk
 #define NotGrabbed     0
 #define ResizeGrab     1
 #define MoveGrab       2
-#ifdef WSM
 
 /* Anchors */
 #define ANCHOR_NONE    0
@@ -69,7 +63,6 @@ static char rcsid[] = "$XConsortium: WmWinConf.c /main/8 1996/10/30 11:15:17 drk
 #ifndef ABS
 #define ABS(x) ((x)>0?(x):(-(x)))
 #endif /* ABS */
-#endif /* WSM */
 
 /* number of times to poll before blocking on a config event */
 
@@ -118,12 +111,10 @@ static unsigned int resizeBigWidthInc, resizeBigHeightInc;
 static int startX, startY; 
 static unsigned int startWidth, startHeight;
 static unsigned int minWidth, minHeight, maxHeight, maxWidth;
-#ifdef WSM
 static int marqueeX, marqueeY; /* root coords of UL corner of are */
 static long marqueeWidth, marqueeHeight;       /* size of area */
 static unsigned int marqueeAnchor;     /* id of anchor corner */
 static long marqueeWidth0, marqueeHeight0;     /* old size of area */
-#endif /* WSM */
 
 static int opaqueMoveX = 0;    /* for cancel request on opaque moves */
 static int opaqueMoveY = 0;
@@ -138,9 +129,6 @@ static int moveLastPointerY= 0;
 
 static Boolean anyMotion = FALSE;
 static Boolean configGrab = FALSE;
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-static Boolean grabServer = TRUE;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 
 Dimension clipWidth = 0;
 Dimension clipHeight = 0;
@@ -1312,7 +1300,6 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev)
                                     FALSE);
        }
     }
-#ifdef WSM
     else if (wmGD.configAction == MARQUEE_SELECT)
     {
        WmScreenData *pSD;
@@ -1324,7 +1311,6 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev)
        dtSendMarqueeSelectionNotification(pSD, DT_MARQUEE_SELECT_END, 
                        marqueeX, marqueeY, marqueeWidth, marqueeHeight);
     }
-#endif /* WSM */
 
     /*
      * Clear configuration flags and data.
@@ -1337,10 +1323,8 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev)
     anyMotion = FALSE;
     wmGD.movingIcon = FALSE;
 
-#ifdef WSM
     if (pcd)
     {
-#endif /* WSM */
     /* hide the move/resize config data */
     HideFeedbackWindow(pcd->pSD);
 
@@ -1348,9 +1332,7 @@ void CompleteFrameConfig (ClientData *pcd, XEvent *pev)
      * Set the focus back to something reasonable
      */
     RepairFocus ();    
-#ifdef WSM
     }
-#endif /* WSM */
 
 } /* END OF FUNCTION CompleteFrameConfig */
 
@@ -1505,11 +1487,9 @@ void MoveOutline (int x, int y, unsigned int width, unsigned int height)
     }
     else
     {
-#ifdef WSM
       if (wmGD.useWindowOutline)
        WindowOutline(x,y,width,height);
       else
-#endif
        FlashOutline(x, y, width, height);
     }
 } /* END OF FUNCTION  MoveOutline */
@@ -1576,7 +1556,6 @@ void FlashOutline (int x, int y, unsigned int width, unsigned int height)
     }
 } /* END OF FUNCTION  FlashOutline */
 
-#ifdef WSM
 \f
 /*************************************<->*************************************
  *
@@ -1778,7 +1757,6 @@ void WindowOutline (int x, int y, unsigned int width, unsigned int height)
 
 } /* END OF FUNCTION  WindowOutline */
 
-#endif /* WSM */
 
 \f
 /*************************************<->*************************************
@@ -2172,13 +2150,11 @@ void ProcessNewConfiguration (ClientData *pCD, int x, int y, unsigned int width,
             }
        }
        SetFrameInfo (pCD);
-#ifdef PANELIST
        if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL)
        {
            /* turn off subpanel behavior if moved */
            pCD->dtwmBehaviors &= ~DtWM_BEHAVIOR_SUBPANEL;
        }
-#endif /* PANELIST */
     }
 
     /*
@@ -2593,38 +2569,6 @@ Boolean StartClientMove (ClientData *pcd, XEvent *pev)
 } /* END OF FUNCTION StartClientMove */
 
 
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-/*************************************<->*************************************
- *
- *  SetGrabServer ()
- *
- *
- *  Description:
- *  -----------
- *  Sets Boolean grabServer to False
- *
- *  Inputs:
- *  ------
- *  None
- *  
- *  Outputs:
- *  -------
- *  None
- *  
- *  Comments
- *  -------
- *  This will only get called when an automated test is running. The
- *  purpose of this is to prevent mwm from grbbing the server, since
- *  this confuses the automation input synthesis code
- *  
- *************************************<->***********************************/
-void SetGrabServer (void)
-{
-    grabServer = FALSE;
-}
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
-\f
 /*************************************<->*************************************
  *
  *  DoGrabs (grab_win, cursor, pmask, grabTime, alwaysGrab)
@@ -2654,7 +2598,6 @@ void SetGrabServer (void)
 Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTime, ClientData *pCD, Boolean alwaysGrab)
 {
 
-#ifdef WSM
     Window root;
 
     if (pCD)
@@ -2663,9 +2606,6 @@ Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTi
        root = RootWindow (DISPLAY, ACTIVE_PSD->screen);
 
     if (pCD && pCD->pSD->useIconBox && wmGD.movingIcon && P_ICON_BOX(pCD))
-#else
-    if (pCD->pSD->useIconBox && wmGD.movingIcon && P_ICON_BOX(pCD))
-#endif
     {
        /*
         * Confine the pointer to the icon box clip window
@@ -2695,11 +2635,7 @@ Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTi
                         pmask,
                         GrabModeAsync,         /* pointer_mode */
                         GrabModeAsync,         /* keyboard_mode */
-#ifdef WSM
                         root,
-#else
-                        ROOT_FOR_CLIENT(pCD),          /* confine_to window */
-#endif
                         cursor,
                         grabTime) != GrabSuccess)
        {
@@ -2726,24 +2662,11 @@ Boolean DoGrabs (Window grab_win, Cursor cursor, unsigned int pmask, Time grabTi
     }
     
     
-       /* 
-        * If running automation version of mwm, do not grab the server, since
-        * this will confuse the automation input synthesis code.
-        */
-# if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-if (grabServer == TRUE)
-# endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
     if (wmGD.freezeOnConfig) 
        
     {
-#ifdef WSM
        if (!pCD || ((pCD->pSD->moveOpaque && alwaysGrab) ||
                   (!(pCD->pSD->moveOpaque))))
-#else /* WSM */
-       if ((pCD->pSD->moveOpaque && alwaysGrab) ||
-           (!(pCD->pSD->moveOpaque)))
-#endif /* WSM */
        {
            XGrabServer(DISPLAY);
         }
@@ -2829,10 +2752,8 @@ void CancelFrameConfig (ClientData *pcd)
     UndoGrabs();
 
     /* turn off feedback window */
-#ifdef WSM
     if (pcd)
     {
-#endif /* WSM */
     HideFeedbackWindow(pcd->pSD);
 
     /* make sure title bar is popped out */
@@ -2866,19 +2787,15 @@ void CancelFrameConfig (ClientData *pcd)
                         opaqueMoveX, opaqueMoveY);
        }
     }
-#ifdef WSM
     }
     if (wmGD.configAction == MARQUEE_SELECT)
     {
        dtSendMarqueeSelectionNotification(ACTIVE_PSD, DT_MARQUEE_SELECT_CANCEL, 
                            marqueeX, marqueeY, 0, 0);
     }
-#endif /* WSM */
 
     /* replace pointer if no motion events received */
-#ifdef WSM
     if (pcd)
-#endif /* WSM */
     if (!anyMotion && wmGD.enableWarp) {
        XWarpPointer(DISPLAY, None, ROOT_FOR_CLIENT(pcd), 
                         0, 0, 0, 0, wmGD.preMoveX, wmGD.preMoveY);
@@ -2926,21 +2843,17 @@ void
 CheckEatButtonRelease (ClientData *pcd, XEvent *pev)
 {
     Window grab_win;
-#ifdef WSM
     Window root;
 
     if (pcd != (ClientData *)NULL)
        root = ROOT_FOR_CLIENT(pcd);
     else
        root = RootWindow (DISPLAY, ACTIVE_PSD->screen);
-#endif /* WSM */
 
-#ifdef WSM
     if (pcd == (ClientData *) NULL)
        grab_win = root;
     else
-#endif /* WSM */
-    grab_win = GrabWin(pcd, pev);
+       grab_win = GrabWin(pcd, pev);
 
     if ((pev->type == KeyPress || pev->type == KeyRelease) &&
        (pev->xbutton.state & ButtonMask))
@@ -2955,11 +2868,7 @@ CheckEatButtonRelease (ClientData *pcd, XEvent *pev)
                         ButtonReleaseMask,
                         GrabModeAsync,         /* pointer_mode */
                         GrabModeAsync,         /* keyboard_mode */
-#ifdef WSM
                         root,                  /* confine_to window */
-#else /* WSM */
-                        ROOT_FOR_CLIENT(pcd),  /* confine_to window */
-#endif /* WSM */
                         wmGD.configCursor,
                         pev->xbutton.time) == GrabSuccess)
        {
@@ -3000,9 +2909,7 @@ EatButtonRelease (unsigned int releaseButtons)
 
     while (releaseButtons)
     {
-#ifdef WSM
        PullExposureEvents ();
-#endif /* WSM */
        XMaskEvent (DISPLAY, ButtonReleaseMask, &event);
 
        if (event.type == ButtonRelease)
@@ -4041,8 +3948,7 @@ Window GrabWin (ClientData *pcd, XEvent *pev)
     return (grab_win);
 
 } /* END OF FUNCTION GrabWin */
-#ifdef WSM
-\f
+
 /*************************************<->*************************************
  *
  *  HandleMarqueeSelect (pSD, event)
@@ -4202,7 +4108,7 @@ StartMarqueeSelect(WmScreenData *pSD, XEvent *pev)
     /* 
      * Set up static variables for succeeding events 
      */
-    if (pev && (pev->type == ButtonPress) || (pev->type == ButtonRelease))
+    if (pev && ((pev->type == ButtonPress) || (pev->type == ButtonRelease)))
     {
        pointerX = pev->xbutton.x_root;
        pointerY = pev->xbutton.y_root;
@@ -4454,4 +4360,3 @@ Boolean HandleMarqueeKeyPress (WmScreenData *pSD, XEvent *pev)
     } /* end switch(keysym) */
 
 } /* END OF FUNCTION HandleResizeKeyPress */
-#endif /* WSM */
index 40e5635ef8fed430e9b81dc45a3c72274bcabed2..1d1d4dfd24298a6417caa4df51a7aff4117717c9 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmWinConf.h /main/5 1996/06/11 16:01:31 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -72,9 +71,6 @@ extern void ProcessNewConfiguration (ClientData *pCD, int x, int y,
                                     unsigned int width, unsigned int height, 
                                     Boolean clientRequest);
 extern void ReGrabPointer (Window grab_win, Time grabTime);
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-extern void SetGrabServer (void);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
 extern void SetOutline (XSegment *pOutline, int x, int y, unsigned int width, 
                        unsigned int height, int fatness);
 extern void SetPointerPosition (int newX, int newY, int *actualX, 
@@ -85,12 +81,10 @@ extern void StartClientResize (ClientData *pcd, XEvent *pev);
 extern Boolean StartResizeConfig (ClientData *pcd, XEvent *pev);
 extern int ResizeType (ClientData *pcd, XEvent *pev);
 extern void UndoGrabs (void);
-#ifdef WSM
 extern void HandleMarqueeSelect (WmScreenData *pSD, XEvent *pev);
 extern void StartMarqueeSelect(WmScreenData *pSD, XEvent *pev);
 extern void UpdateMarqueeSelectData (WmScreenData *pSD);
 extern Boolean HandleMarqueeKeyPress (WmScreenData *pSD, XEvent *pev);
 extern void WindowOutline (int x, int y, unsigned int width, 
                         unsigned int height);
-#endif /* WSM */
 
index 9fa21da03a200fd334841766ecef54fa8a0e226d..18b5b6ff70620a74292046ddcf68f1ffe0c767f5 100644 (file)
 /* 
  * Motif Release 1.2.3
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmWinInfo.c /main/18 1999/02/04 15:17:25 mgreess $"
-#endif
-#endif
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -49,9 +44,7 @@ static char rcsid[] = "$TOG: WmWinInfo.c /main/18 1999/02/04 15:17:25 mgreess $"
 
 #include <Xm/Xm.h>
 #include <locale.h>
-#ifdef PANELIST
 #include "WmPanelP.h"
-#endif /* PANELIST */
 
 #define makemult(a, b) ((b==1) ? (a) : (((int)((a) / (b))) * (b)) )
 
@@ -72,20 +65,14 @@ static char rcsid[] = "$TOG: WmWinInfo.c /main/18 1999/02/04 15:17:25 mgreess $"
 #include "WmOL.h"
 #include "WmProperty.h" 
 #include "WmResource.h"
-#ifdef WSM
 #include "WmWrkspace.h"
-#endif /* WSM */
 #include "WmWinList.h"
-#ifdef WSM
 #include "WmPresence.h"
-#endif /* WSM */
 #include "WmXSMP.h"
 #include "WmMultiHead.h"
 
-#ifdef PANELIST
 static void AdjustSlideOutGeometry (ClientData *pCD);
 static void FixSubpanelEmbeddedClientGeometry (ClientData *pCD);
-#endif /* PANELIST */
 
 #ifndef NO_MESSAGE_CATALOG
 # define LOCALE_MSG GETMESSAGE(70, 7, "[XmbTextPropertyToTextList]:\n     Locale (%.100s) not supported. (Check $LANG).")
@@ -96,9 +83,7 @@ static void FixSubpanelEmbeddedClientGeometry (ClientData *pCD);
 /*
  * Global Variables:
  */
-#ifdef WSM
 WmWorkspaceData *pIconBoxInitialWS;
-#endif /* WSM */
 
 
 \f
@@ -157,23 +142,16 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
     pCD->clientID = ++(pSD->clientCounter);
     pCD->clientFlags = WM_INITIALIZATION;
     pCD->iconFlags = 0;
-#ifndef WSM
-    pCD->pIconBox = NULL;
-#endif /* WSM */
     pCD->thisIconBox = NULL;
-#ifdef PANELIST
     pCD->pECD = NULL;
     pCD->pPRCD = NULL;
     pCD->pSOR = NULL;
-#endif /* PANELIST */
     pCD->wmUnmapCount = 0;
     pCD->transientFor = (Window)0L;
     pCD->transientLeader = NULL;
     pCD->transientChildren = NULL;
     pCD->transientSiblings = NULL;
-#ifdef WSM
     pCD->primaryStackPosition = 0;
-#endif /* WSM */
     pCD->fullModalCount = 0;
     pCD->primaryModalCount = 0;
     pCD->focusPriority = 0;
@@ -183,14 +161,8 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
     pCD->clientClass = NULL;
     pCD->clientName = NULL;
     pCD->clientFrameWin = (Window)0L;
-#ifndef WSM
-    pCD->iconFrameWin = (Window)0L;
-#endif /* WSM */
     pCD->iconWindow = (Window)0L;
     pCD->iconPixmap = (Pixmap)0L;
-#ifndef WSM
-    pCD->iconPlace = NO_ICON_PLACE;
-#endif /* WSM */
     pCD->clientProtocols = NULL;
     pCD->clientProtocolCount = 0;
     pCD->mwmMessages = NULL;
@@ -199,7 +171,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
     pCD->clientCmapIndex = 0;
     pCD->clientCmapFlagsInitialized = FALSE;
     pCD->systemMenuSpec = NULL;
-#ifdef WSM
     pCD->putInAll = False;
     pCD->pWorkspaceHints = NULL;
     pCD->numInhabited = 0;
@@ -208,7 +179,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
     pCD->dtwmBehaviors = 0L;
     pCD->paInitialProperties = NULL;
     pCD->numInitialProperties = 0;
-#endif /* WSM */
 
     pCD->decorFlags = 0L;
     pCD->pTitleGadgets = NULL;
@@ -249,7 +219,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
 
     if (manageFlags & MANAGEW_WM_CLIENTS)
     {
-#ifdef WSM
         WmWorkspaceData *pWS;
 
        if (manageFlags & MANAGEW_ICON_BOX)
@@ -261,9 +230,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
            pWS = pSD->pActiveWS;
        }
        return (GetWmClientInfo (pWS, pCD, manageFlags));
-#else /* WSM */
-       return (GetWmClientInfo (pSD->pActiveWS, pCD, manageFlags));
-#endif /* WSM */
     }
 
 
@@ -300,13 +266,11 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
     }
     pCD->xBorderWidth = wmGD.windowAttributes.border_width;
 
-#ifdef WSM
     /*
      * Get the initial list of properties on this window. 
      * Save it to optimize subsequent property fetching.
      */
     GetInitialPropertyList (pCD);
-#endif /* WSM */
 
     /*
      * Retrieve and process WM_CLASS hints client window property info:
@@ -337,7 +301,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
     ProcessSmClientID (pCD);
     ProcessWmSaveHint (pCD);
 
-#ifdef WSM
     /*
      *  Set client's workspace information.  NOTE: this also may
      *  set the geometry, initial state, etc.  For Sm-aware clients,
@@ -360,15 +323,6 @@ GetClientInfo (WmScreenData *pSD, Window clientWindow, long manageFlags)
      * (results are used in ProcessMwmHints)
      */
     ProcessDtWmHints (pCD);
-#else
-
-    /*
-     * For Sm-aware clients, retrieve geometry and initial state
-     * from private DB.
-     */
-    FindClientDBMatch(pCD, (char **)NULL);
-
-#endif /* WSM */
 
     /*
      * Retrieve and process M_CLIENT_DECOR client window property info:
@@ -497,9 +451,7 @@ GetWmClientInfo (WmWorkspaceData *pWS,
 
 {
     Pixmap     iconBitmap;
-#ifdef WSM
-int i;
-#endif /* WSM */
+    int i;
 
     /*
      * Set up the client class and name for resource retrieval.
@@ -585,7 +537,6 @@ int i;
         }
     }
 
-#ifdef WSM
     /* 
      * Allocate initial workspace ID list 
      * fill with NULL IDs
@@ -612,11 +563,6 @@ int i;
      * PutClientIntoWorkspace.
      */
     pCD->numInhabited = 0;
-#else /* WSM */
-    pCD->iconPlace = NO_ICON_PLACE;
-    pCD->iconX = 0;
-    pCD->iconY = 0;
-#endif /* WSM */
     pCD->windowGroup = 0L;
 #ifndef NO_OL_COMPAT
     pCD->bPseudoTransient = False;
@@ -652,10 +598,7 @@ int i;
         if (manageFlags & MANAGEW_ICON_BOX)
         {
             pCD->clientFunctions &= ICON_BOX_FUNCTIONS;
-#ifdef WSM
            pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
-#endif /* WSM */
-#ifdef PANELIST
            if (wmGD.useFrontPanel && pCD->pSD->iconBoxControl) 
            { 
                /*
@@ -665,8 +608,6 @@ int i;
                pCD->clientFunctions &= ~MWM_FUNC_MINIMIZE;
                pCD->clientFunctions |= MWM_FUNC_CLOSE;
            }
-#else /* PANELIST */
-#endif /* PANELIST */
         }
 
 
@@ -746,9 +687,7 @@ int i;
             Warning (((char *)GETMESSAGE(70, 3, "Couldn't make icon box")));
            return (NULL);
         }
-#ifdef WSM
        PutClientIntoWorkspace (pWS, pCD);
-#endif /* WSM */
     }
     else if (manageFlags & MANAGEW_CONFIRM_BOX)
     {
@@ -770,9 +709,7 @@ int i;
         pCD->widthInc = 1;
         pCD->heightInc = 1;
         pCD->clientFlags |= CONFIRM_BOX;
-#ifdef WSM
        PutClientIntoWorkspace (ACTIVE_WS, pCD);
-#endif /* WSM */
     }
 
     /*
@@ -803,45 +740,11 @@ int i;
 
     if (manageFlags & MANAGEW_ICON_BOX)
     {
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-       /** BEGIN FIX CR 6941 **/
-       MenuItem *iconBoxMenuItems, *lastItem;
-
-       /* This MenuSpec is not added to pSD->acceleratorMenuSpecs */
-       pCD->systemMenuSpec = 
-           MAKE_MENU (PSD_FOR_CLIENT(pCD), pCD, pCD->systemMenu,
-                     F_CONTEXT_WINDOW, F_CONTEXT_WINDOW|F_CONTEXT_ICON,
-                     NULL, TRUE);
-       if (pCD->systemMenuSpec != (MenuSpec *) NULL)
-       {
-           pCD->systemMenuSpec = DuplicateMenuSpec(pCD->systemMenuSpec);
-           XtFree(pCD->systemMenuSpec->name);
-           pCD->systemMenuSpec->name = XtNewString("IconBoxMenu");
-           iconBoxMenuItems = GetIconBoxMenuItems (PSD_FOR_CLIENT(pCD));
-           
-           /* Find the last menu item in the menu spec's list. */
-           for (lastItem = pCD->systemMenuSpec->menuItems;
-                lastItem->nextMenuItem != (MenuItem *) NULL;
-                lastItem = lastItem->nextMenuItem)
-             /*EMPTY*/;
-           lastItem->nextMenuItem = iconBoxMenuItems;
-           
-           /* Now recreate the menu widgets since we've appended the
-              icon box menu items */
-           DestroyMenuSpecWidgets(pCD->systemMenuSpec);
-           pCD->systemMenuSpec->menuWidget =
-             CreateMenuWidget (PSD_FOR_CLIENT(pCD), pCD, "IconBoxMenu",
-                               PSD_FOR_CLIENT(pCD)->screenTopLevelW, TRUE,
-                               pCD->systemMenuSpec, NULL);
-       }
-       /** END FIX CR 6941 **/
-#else
        pCD->systemMenuSpec = 
            MAKE_MENU (PSD_FOR_CLIENT(pCD), pCD, pCD->systemMenu,
                       F_CONTEXT_WINDOW, F_CONTEXT_WINDOW|F_CONTEXT_ICON,
                       GetIconBoxMenuItems(PSD_FOR_CLIENT(pCD)),
                       TRUE);
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
     }
 
 
@@ -901,12 +804,8 @@ ProcessWmClass (ClientData *pCD)
     classHint.res_name = "";
     XGetClassHint (DISPLAY, pCD->client, &classHint);
 #else
-#ifdef WSM
     if ((HasProperty (pCD, XA_WM_CLASS)) &&
        (XGetClassHint (DISPLAY, pCD->client, &classHint)))
-#else /* WSM */
-    if (XGetClassHint (DISPLAY, pCD->client, &classHint))
-#endif /* WSM */
 #endif
     {
        /* the WM_CLASS property exists for the client window */
@@ -1054,15 +953,13 @@ ProcessWmSaveHint (ClientData *pCD)
 void 
 ProcessWmHints (ClientData *pCD, Boolean firstTime)
 {
-    register XWMHints *pXWMHints;
-    register long flags;
+    XWMHints *pXWMHints;
+    long flags;
     Pixmap iconPixmap;
     Pixmap iconMask;
-#ifdef WSM
     WmWorkspaceData *pWsTmp;
     WsClientData *pWsc;
     int iws;
-#endif /* WSM */
     int tmpIconX, tmpIconY;
 
 
@@ -1072,12 +969,10 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime)
      * since they may be none.
      */
 
-#ifdef WSM
     if (firstTime && !HasProperty (pCD, XA_WM_HINTS))
        pXWMHints = NULL;
     else
-#endif /* WSM */
-    pXWMHints = XGetWMHints (DISPLAY, pCD->client);
+       pXWMHints = XGetWMHints (DISPLAY, pCD->client);
 
     if (pXWMHints)
     {
@@ -1191,12 +1086,10 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime)
         }
 
 
-#ifdef WSM
        if (!ClientInWorkspace (PSD_FOR_CLIENT(pCD)->pActiveWS, pCD))
        {
            pCD->clientState |= UNSEEN_STATE;
        }
-#endif /* WSM */
 
 
         /*
@@ -1300,7 +1193,6 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime)
             {
                pCD->iconFlags |= ICON_HINTS_POSITION;
                if (wmGD.iconAutoPlace)
-#ifdef WSM
                {
                    /* 
                     * Initialize icon placement data in all inhabited
@@ -1342,35 +1234,11 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime)
                        }
                    }
                 }
-#else /* WSM */
-               {
-                   tmpIconX = (pCD->clientFlags & SM_ICON_X) ?
-                     pCD->iconX : pXWMHints->icon_x;
-                   tmpIconY = (pCD->clientFlags & SM_ICON_Y) ?
-                     pCD->iconY : pXWMHints->icon_y;
-                   pCD->iconPlace = 
-                       FindIconPlace (pCD, &(pCD->pSD->pActiveWS->IPData),
-                                      tmpIconX, tmpIconY);
-                   if (pCD->iconPlace != NO_ICON_PLACE)
-                   {
-                       CvtIconPlaceToPosition (&(pCD->pSD->pActiveWS->IPData),
-                           pCD->iconPlace, &pCD->iconX, &pCD->iconY);
-                   }
-               }
-               else
-               {
-                   if (!(pCD->clientFlags & SM_ICON_X))
-                       pCD->iconX = pXWMHints->icon_x;
-                   if (!(pCD->clientFlags & SM_ICON_Y))
-                       pCD->iconY = pXWMHints->icon_y;
-                }
-#endif /* WSM */
            }
            else
            {
                if (wmGD.iconAutoPlace)
                {
-#ifdef WSM
                    /* 
                     * Initialize icon placement data in all inhabited
                     * workspaces
@@ -1382,11 +1250,6 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime)
                        pWsc->iconX = 0;
                        pWsc->iconY = 0;
                    }
-#else /* WSM */
-                   pCD->iconPlace = NO_ICON_PLACE;
-                   pCD->iconX = 0;
-                   pCD->iconY = 0;
-#endif /* WSM */
                }
            }
        }
@@ -1509,8 +1372,8 @@ ProcessWmHints (ClientData *pCD, Boolean firstTime)
 void 
 ProcessWmNormalHints (ClientData *pCD, Boolean firstTime, long manageFlags)
 {
-    register SizeHints *pNormalHints;
-    register long       flags;
+    SizeHints *pNormalHints;
+    long       flags;
     int                 diff;
     unsigned long       decoration;
     unsigned int        boxdim, tmpMin;
@@ -2232,12 +2095,10 @@ WmICCCMToXmString (XTextProperty *wmNameProp)
       switch (status)
       {
       case XConverterNotFound:
-#ifndef MOTIF_ONE_DOT_ONE
          sprintf(msg, GETMESSAGE (70,5,
                    "Window manager cannot convert property %.100s as clientTitle/iconTitle: XmbTextPropertyToTextList"), 
                  XGetAtomName (DISPLAY,wmNameProp->encoding));
          Warning(msg);
-#endif /* MOTIF_ONE_DOT_ONE */
          break;
 
       case XNoMemory:
@@ -2314,9 +2175,7 @@ ProcessWmWindowTitle (ClientData *pCD, Boolean firstTime)
     XmString title_xms = NULL;
 
     if ((pCD->clientDecoration & MWM_DECOR_TITLE) &&
-#ifdef WSM
        (!firstTime || HasProperty (pCD, XA_WM_NAME)) &&
-#endif /* WSM */
        XGetWMName(DISPLAY, pCD->client, &wmNameProp))
     {
       title_xms = WmICCCMToXmString(&wmNameProp);
@@ -2371,12 +2230,8 @@ ProcessWmWindowTitle (ClientData *pCD, Boolean firstTime)
      * If this is a tear-off menu, then make sure title text is not clipped
      */
 
-#ifdef PANELIST
     if ((pCD->window_status & MWM_TEAROFF_WINDOW) ||
         (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL))
-#else /* PANELIST */
-    if (pCD->window_status & MWM_TEAROFF_WINDOW)
-#endif /* PANELIST */
     {
        unsigned int boxdim = TitleBarHeight (pCD);
        unsigned long decor = pCD->decor;
@@ -2392,9 +2247,7 @@ ProcessWmWindowTitle (ClientData *pCD, Boolean firstTime)
         * Calculations derived from GetTextBox() and GetFramePartInfo()
         */
        minWidth = XmStringWidth(fontList, pCD->clientTitle) +
-#ifdef PANELIST
            ((pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL) ? 4 : 0) +
-#endif /* PANELIST */
                            ((decor & MWM_DECOR_MENU) ? boxdim : 0) +
                            ((decor & MWM_DECOR_MINIMIZE) ? boxdim : 0) +
                            ((decor & MWM_DECOR_MAXIMIZE) ? boxdim : 0) +
@@ -2405,19 +2258,15 @@ ProcessWmWindowTitle (ClientData *pCD, Boolean firstTime)
        {
            pCD->minWidth = minWidth;
        }
-#ifdef PANELIST
        if ((pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL) &&
             (pCD->clientWidth < pCD->minWidth))
        {
            FixSubpanelEmbeddedClientGeometry (pCD);
        }
-#endif /* PANELIST */
     }
 
 } /* END OF FUNCTION ProcessWmWindowTitle */
 
-#ifdef PANELIST
-\f
 /*************************************<->*************************************
  *
  *  FixSubpanelEmbeddedClientGeometry ( pCD )
@@ -2506,9 +2355,7 @@ FixSubpanelEmbeddedClientGeometry (ClientData *pCD)
     }
 } /* END OF FUNCTION FixEmbeddedClientGeometry */
 
-#endif /* PANELIST */
 
-\f
 /*************************************<->*************************************
  *
  *  ProcessWmIconTitle (pCD, firstTime)
@@ -2543,9 +2390,7 @@ ProcessWmIconTitle (ClientData *pCD, Boolean firstTime)
 
   if ((pCD->clientFunctions & MWM_FUNC_MINIMIZE) &&
       (pCD->transientLeader == NULL) &&
-#ifdef WSM
       (!firstTime || HasProperty(pCD, XA_WM_ICON_NAME)) &&
-#endif /* WSM */
       XGetWMIconName (DISPLAY, pCD->client, &wmIconNameProp))
   {
     icon_xms = WmICCCMToXmString(&wmIconNameProp);
@@ -2620,12 +2465,8 @@ ProcessWmTransientFor (ClientData *pCD)
     ClientData *leader;
 
 
-#ifdef WSM
     if ((HasProperty (pCD, XA_WM_TRANSIENT_FOR)) &&
        (XGetTransientForHint (DISPLAY, pCD->client, &window)))
-#else /* WSM */
-    if (XGetTransientForHint (DISPLAY, pCD->client, &window))
-#endif /* WSM */
     {
        pCD->clientFlags |= CLIENT_TRANSIENT;
 
@@ -2681,10 +2522,6 @@ ProcessWmTransientFor (ClientData *pCD)
 void 
 MakeSystemMenu (ClientData *pCD)
 {
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    MenuItem *lastItem;
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-
     pCD->mwmMenuItems = GetMwmMenuItems(pCD);
     pCD->systemMenuSpec = 
        MAKE_MENU (PSD_FOR_CLIENT(pCD), pCD, pCD->systemMenu, F_CONTEXT_WINDOW,
@@ -2705,48 +2542,6 @@ MakeSystemMenu (ClientData *pCD)
     }
 #endif
 
-#if defined(MWM_QATS_PROTOCOL)
-    /* Added to fix CDExc23338
-     * Not sure what the MWM_QATS_PROTOCOL is trying to accomplish here,
-     * but this code is causing the system menu to loose it's default
-     * actions whenever client defined actions are added.  I thought
-     * it prudent to minimize the changes.  It could be that the
-     * #if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-     * should be
-     * #if ((!defined(WSM)) && defined(MWM_QATS_PROTOCOL))
-     * throughout the wm code, but I am loath to make such a change
-     * without any documentation.
-     */
-
-#if ((!defined(WSM)) || defined(MWM_QATS_PROTOCOL))
-    /** BEGIN FIX CR 6941 **/
-
-    /* if we still don't have a menu spec, then just abort. */
-    if (pCD->systemMenuSpec == NULL)
-      return;
-
-    pCD->systemMenuSpec = DuplicateMenuSpec(pCD->systemMenuSpec);
-    XtFree(pCD->systemMenuSpec->name);
-    pCD->systemMenuSpec->name = XtNewString("ProtocolsMenu");
-
-    /* Find the last menu item in the menu spec's list. */
-    for (lastItem = pCD->systemMenuSpec->menuItems;
-        lastItem->nextMenuItem != (MenuItem *) NULL;
-        lastItem = lastItem->nextMenuItem)
-      /*EMPTY*/;
-    lastItem->nextMenuItem = pCD->mwmMenuItems;
-
-    /* Now recreate the menu widgets since we've appended the 
-       protocol menu items */
-    DestroyMenuSpecWidgets(pCD->systemMenuSpec);
-    pCD->systemMenuSpec->menuWidget =
-      CreateMenuWidget (PSD_FOR_CLIENT(pCD), pCD, "ProtocolsMenu",
-                       PSD_FOR_CLIENT(pCD)->screenTopLevelW, TRUE,
-                       pCD->systemMenuSpec, NULL);
-    /** END FIX CR 6941 **/
-#endif /* !defined(WSM) || defined(MWM_QATS_PROTOCOL) */
-#endif /* defined(MWM_QATS_PROTOCOL) */
-
 } /* END OF FUNCTION MakeSystemMenu */
 
 
@@ -2947,9 +2742,7 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
     Boolean rval = False;
     int xoff, yoff;
     int origX, origY, origWidth, origHeight;
-#ifdef WSM
     int iwsc;
-#endif /* WSM */
 
 
     /*
@@ -2980,11 +2773,7 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
         (manageFlags == MANAGEW_NORMAL) &&
        !(pCD->clientFlags & CLIENT_TRANSIENT) &&
        (pCD->inputMode != MWM_INPUT_SYSTEM_MODAL) &&
-#ifdef WSM
        (ClientInWorkspace(PSD_FOR_CLIENT(pCD)->pActiveWS, pCD)))
-#else /* WSM */
-       (PSD_FOR_CLIENT(pCD) == ACTIVE_PSD))
-#endif /* WSM */
     {
        /*
         * Interactively place the window on the screen.
@@ -3057,8 +2846,6 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
      */
 
 
-#ifdef WSM
-#ifdef PANELIST
     if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL)
     {
        if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUB_RESTORED)
@@ -3070,10 +2857,7 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
            AdjustSlideOutGeometry (pCD);
        }
     }
-    else
-#endif /* PANELIST */
-#endif /* WSM */
-    if (((wmGD.positionOnScreen) && !interactivelyPlaced) &&
+    else if (((wmGD.positionOnScreen) && !interactivelyPlaced) &&
        (!(pCD->clientFlags & (SM_X | SM_Y))))
     {
        PlaceFrameOnScreen (pCD, &pCD->clientX, &pCD->clientY,
@@ -3093,7 +2877,6 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
 
     if (!wmGD.iconAutoPlace)
     {
-#ifdef WSM
        if (!(pCD->iconFlags & ICON_HINTS_POSITION))
        {
            for (iwsc=0; iwsc<pCD->numInhabited; iwsc++)
@@ -3104,14 +2887,6 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
                                        &pCD->pWsList[iwsc].iconY);
            }
        }
-#else /* WSM */
-       if (!(pCD->iconFlags & ICON_HINTS_POSITION))
-       {
-           pCD->iconX = pCD->clientX;
-           pCD->iconY = pCD->clientY;
-       }
-       PlaceIconOnScreen (pCD, &pCD->iconX, &pCD->iconY);
-#endif /* WSM */
     }
 
     /* 
@@ -3128,8 +2903,6 @@ InitClientPlacement (ClientData *pCD, long manageFlags)
 
 } /* END OF FUNCTION InitClientPlacement */
 
-#ifdef PANELIST
-\f
 /******************************<->*************************************
  *
  * void AdjustSlideOutGeometry (pCD)
@@ -3217,9 +2990,7 @@ AdjustSlideOutGeometry ( ClientData *pCD)
        SetFrameInfo (pCD);
     }
 }
-#endif  /* PANELIST */
 
-\f
 /*************************************<->*************************************
  *
  *  PlaceFrameOnScreen (pCD, pX, pY, w, h)
@@ -3391,7 +3162,7 @@ PlaceIconOnScreen (ClientData *pCD, int *pX, int *pY)
 void 
 FixWindowConfiguration (ClientData *pCD, unsigned int *pWidth, unsigned int *pHeight, unsigned int widthInc, unsigned int heightInc)
 {
-    register int  delta;
+    int  delta;
 
     /*
      * Make sure we're on width/height increment boundaries.
@@ -3454,8 +3225,8 @@ FixWindowConfiguration (ClientData *pCD, unsigned int *pWidth, unsigned int *pHe
 void 
 FixWindowSize (ClientData *pCD, unsigned int *pWidth, unsigned int *pHeight, unsigned int widthInc, unsigned int heightInc)
 {
-    register int  deltaW;
-    register int  deltaH;
+    int  deltaW;
+    int  deltaH;
     WmScreenData *pSD = pCD->pSD;
 
     /*
@@ -4011,7 +3782,6 @@ ProcessMwmHints (ClientData *pCD)
        {
            pCD->clientFunctions = WM_FUNC_ALL;
        }
-#ifdef PANELIST
         if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL)
        {
            pCD->clientFunctions &= WM_FUNC_SUBPANEL_DEFAULT;   
@@ -4022,7 +3792,6 @@ ProcessMwmHints (ClientData *pCD)
            pCD->clientFunctions &= WM_FUNC_PANEL_DEFAULT;   
            pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
        }
-#endif /* PANELIST */
     }
 
     if (pCD->clientDecoration & WM_DECOR_DEFAULT)
@@ -4035,7 +3804,6 @@ ProcessMwmHints (ClientData *pCD)
        {
            pCD->clientDecoration = WM_DECOR_ALL;
        }
-#ifdef PANELIST
         if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL)
        {
            pCD->clientDecoration = pCD->pSD->subpanelDecoration;
@@ -4044,7 +3812,6 @@ ProcessMwmHints (ClientData *pCD)
        {
            pCD->clientDecoration &= WM_DECOR_PANEL_DEFAULT;   
        }
-#endif /* PANELIST */
     }
 
 
@@ -4156,7 +3923,6 @@ ProcessMwmHints (ClientData *pCD)
     }
 #endif /* NO_OL_COMPAT */
 
-#ifdef WSM
     /* 
      * If primary window can't move between workspaces, then
      * secondary window shouldn't either.
@@ -4166,7 +3932,6 @@ ProcessMwmHints (ClientData *pCD)
     {
        pCD->dtwmFunctions &= ~DtWM_FUNCTION_OCCUPY_WS;
     }
-#endif /* WSM */
 
     /*
      * Fix up functions based on system modal settings.  System modal
index 228dedc225120bb4a640e0c7288b28a379c97e72..9ccdcd42c8b91bf48aaca4a0a602d227aa45ae63 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2
 */ 
-/*   $XConsortium: WmWinInfo.h /main/5 1995/12/27 17:24:50 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
index c970664de981485dba1a7a6b8c0adac16eb7af4f..e6909c66bbeba3c5efb54042ecdbec8873637373 100644 (file)
 /* 
  * Motif Release 1.2.3
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$TOG: WmWinList.c /main/8 1997/06/10 15:50:50 samborn $"
-#endif
-#endif
 /*
  * (c) Copyright 1987, 1988, 1989, 1990, 1993, 1994 Hewlett-Packard Company
  * (c) Copyright 1993, 1994 International Business Machines Corp.
@@ -60,9 +55,7 @@ static char rcsid[] = "$TOG: WmWinList.c /main/8 1997/06/10 15:50:50 samborn $"
 #include "WmMenu.h"
 #include "WmResource.h"
 #include "WmWinInfo.h"
-#ifdef WSM
 #include "WmWrkspace.h"
-#endif /* WSM */
 
 
 
@@ -109,9 +102,7 @@ void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD, Boolean onTop)
     Boolean belowSystemModal = False;
     XWindowChanges windowChanges;
     WmScreenData *pSD = pWS->pSD;
-#ifdef WSM
     WsClientData *pWsc = GetWsClientData (pWS, pCD);
-#endif /* WSM */
 
 
     if (pCD->inputMode == MWM_INPUT_SYSTEM_MODAL)
@@ -175,11 +166,7 @@ void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD, Boolean onTop)
        }
 
 
-#ifdef WSM
        if (!pWsc->pIconBox && pWsc->iconFrameWin)
-#else /* WSM */
-       if (!pCD->pIconBox && pCD->iconFrameWin)
-#endif /* WSM */
        {
            /*
             * Put the icon on the bottom of the stack.
@@ -187,27 +174,18 @@ void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD, Boolean onTop)
 
            if (pSD->lastClient->type == MINIMIZED_STATE)
            {
-#ifdef WSM
                WsClientData *pWsib;
 
                pWsib = &pSD->lastClient->pCD->pWsList[0];
                windowChanges.sibling = pWsib->iconFrameWin;
-#else /* WSM */
-               windowChanges.sibling = pSD->lastClient->pCD->iconFrameWin;
-#endif /* WSM */
            }
            else
            {
                windowChanges.sibling = pSD->lastClient->pCD->clientFrameWin;
            }
            windowChanges.stack_mode = Below;
-#ifdef WSM
            XConfigureWindow (DISPLAY, pWsc->iconFrameWin,
                CWSibling | CWStackMode, &windowChanges);
-#else /* WSM */
-           XConfigureWindow (DISPLAY, pCD->iconFrameWin,
-               CWSibling | CWStackMode, &windowChanges);
-#endif /* WSM */
 
            pCD->iconEntry.type = MINIMIZED_STATE;
            pCD->iconEntry.pCD = pCD;
@@ -449,9 +427,7 @@ void DeleteEntryFromList (WmWorkspaceData *pWS, ClientListEntry *pListEntry)
 
 void DeleteClientFromList (WmWorkspaceData *pWS, ClientData *pCD)
 {
-#ifdef WSM
     WsClientData *pWsc = GetWsClientData (pWS, pCD);
-#endif /* WSM */
     WmScreenData *pSD = pWS->pSD;
 
     if (pCD->transientLeader)
@@ -474,11 +450,7 @@ void DeleteClientFromList (WmWorkspaceData *pWS, ClientData *pCD)
         * Remove the client and icon entries from the window list.
         */
 
-#ifdef WSM
        if (!pWsc->pIconBox && pWsc->iconFrameWin)
-#else /* WSM */
-       if (!pCD->pIconBox && pCD->iconFrameWin)
-#endif /* WSM */
        {
            if (pCD->iconEntry.prevSibling)
            {
@@ -1017,12 +989,10 @@ Boolean PutTransientOnTop (ClientData *pcd)
        {
            restack = True;
        }
-#ifdef WSM
        if (BumpPrimaryToBottom (pcdLeader))
        {
            restack = True;
        }
-#endif /* WSM */
     }
 
     return (restack);
@@ -1121,9 +1091,6 @@ void RestackTransients (ClientData *pcd)
     int count;
     static int size = 0;
     static Window *windows = NULL;
-#ifndef WSM
-    Window *nextWindow;
-#endif /* WSM */
     XWindowChanges windowChanges;
     int i;
     int leaderIndex;
@@ -1155,12 +1122,7 @@ void RestackTransients (ClientData *pcd)
        size = count + 5;
     }
 
-#ifdef WSM
     MakeTransientFamilyStackingList (windows, pcdLeader);
-#else /* WSM */
-    nextWindow = MakeTransientWindowList (windows, pcdLeader);
-    *nextWindow = pcdLeader->clientFrameWin;
-#endif /* WSM */
 
     /*
      *  Changes for CDExc19397.
@@ -1476,7 +1438,6 @@ ClientData * FindTransientOnTop (ClientData *pcd)
      */
 
     pcd = FindTransientTreeLeader (pcd);
-#ifdef WSM
     if (!(pcd->secondariesOnTop) &&
        (LeaderOnTop (pcd)))
     {
@@ -1494,7 +1455,6 @@ ClientData * FindTransientOnTop (ClientData *pcd)
                return (pcdSub);
        }
     }
-#endif /* WSM */
 
 
     /*
@@ -1660,7 +1620,6 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop,
     }
     else
     {
-#ifdef WSM
        /*
         * Adjust stack entry window if we're stacking below a
         * transient tree.
@@ -1670,7 +1629,6 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop,
            stackWindow = LowestWindowInTransientFamily (pStackEntry->pCD);
        }
 
-#endif /* WSM */
        if (stackWindow == 0)
        {
            if (pSD->lastClient->type == MINIMIZED_STATE)
@@ -1679,14 +1637,12 @@ void StackWindow (WmWorkspaceData *pWS, ClientListEntry *pEntry, Boolean onTop,
            }
            else
            {
-#ifdef WSM
                if (pSD->lastClient->pCD->transientChildren)
                {
                    stackWindow = 
                        LowestWindowInTransientFamily (pSD->lastClient->pCD);
                }
                else
-#endif /* WSM */
                stackWindow = pSD->lastClient->pCD->clientFrameWin;
            }
        }
@@ -1887,7 +1843,6 @@ Boolean CheckIfObscuring (ClientData *pcdA, ClientData *pcdB)
     int bY1;
     int bY2;
 
-#ifdef WSM
     /*
      * For workspace stuff: if either is unseen, then neither
      * is obscured.
@@ -1897,7 +1852,6 @@ Boolean CheckIfObscuring (ClientData *pcdA, ClientData *pcdB)
     {
        return (False);
     }
-#endif /* WSM */
 
     if (pcdA->clientState == NORMAL_STATE)
     {
@@ -2428,8 +2382,7 @@ ClientListEntry * FindClientNameMatch (ClientListEntry *pEntry,
     return (pEntry);
 
 } /* END OF FUNCTION FindClientNameMatch */
-#ifdef WSM
-\f
+
 /*************************************<->*************************************
  *
  *  BumpPrimaryToTop (pcdLeader)
@@ -2671,7 +2624,7 @@ MakeTransientFamilyStackingList (
     ClientData *pcdSub;
     Window *nextWindow, wSave, wTemp, wTop;
     int count = CountTransientChildren (pcdLeader);
-    register int i, j;
+    int i, j;
 
     /*
      * Construct the transient stacking list according to
@@ -2826,4 +2779,3 @@ LeaderOnTop (
     return (bOnTop);
 }
 
-#endif /* WSM */
index 15d7f2adf7df3aab84442d26774fe3b33d77f1f2..7f59af61e49ded26f24d7078cac8137dbb28391f 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2.3
 */ 
-/*   $XConsortium: WmWinList.h /main/5 1996/05/17 12:54:05 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -37,10 +36,8 @@ extern void AddClientToList (WmWorkspaceData *pWS, ClientData *pCD,
 extern void AddEntryToList (WmWorkspaceData *pWS, ClientListEntry *pEntry, 
                            Boolean onTop, ClientListEntry *pStackEntry);
 extern void AddTransient (WmWorkspaceData *pWS, ClientData *pCD);
-#ifdef WSM
 extern Boolean BumpPrimaryToBottom (ClientData *pcdLeader);
 extern Boolean BumpPrimaryToTop (ClientData *pcdLeader);
-#endif /* WSM */
 extern Boolean CheckIfClientObscuredByAny (ClientData *pcd);
 extern Boolean CheckIfClientObscuring (ClientData *pcdTop, ClientData *pcd);
 extern Boolean CheckIfClientObscuringAny (ClientData *pcd);
@@ -56,28 +53,22 @@ extern ClientListEntry *FindClientNameMatch (ClientListEntry *pEntry,
                                             Boolean toNext, 
                                             String clientName,
                                             unsigned long types);
-#ifdef WSM
 extern ClientData *FindSubLeaderToTop (ClientData *pcd);
-#endif /* WSM */
 extern ClientData *FindTransientFocus (ClientData *pcd);
 extern ClientData *FindTransientOnTop (ClientData *pcd);
 extern ClientData *FindTransientTreeLeader (ClientData *pcd);
 extern void FixupFullAppModalCounts (ClientData *pcdLeader, 
                                     ClientData *pcdDelete);
-#ifdef WSM
 extern Boolean LeaderOnTop (ClientData *pcdLeader);
 extern Window LowestWindowInTransientFamily (ClientData *pcdLeader);
 extern void MakeTransientFamilyStackingList (Window *windows, 
                                            ClientData *pcdLeader);
-#endif /* WSM */
 extern Window *MakeTransientWindowList (Window *windows, ClientData *pcd);
 extern void MarkModalSubtree (ClientData *pcdTree, ClientData *pcdAvoid);
 extern void MarkModalTransient (ClientData *pcdLeader, ClientData *pCD);
 extern void MoveEntryInList (WmWorkspaceData *pWS, ClientListEntry *pEntry, 
                             Boolean onTop, ClientListEntry *pStackEntry);
-#ifdef WSM
 extern Boolean NormalizeTransientTreeStacking (ClientData *pcdLeader);
-#endif /* WSM */
 extern Boolean PutTransientBelowSiblings (ClientData *pcd);
 extern Boolean PutTransientOnTop (ClientData *pcd);
 extern void RestackTransients (ClientData *pcd);
index 3e55a06cb6b3f9232a806b452f337b515f3bb651..5c02c0d367941463436dd57087cbab817aeb2301 100644 (file)
 */ 
 /* 
  * Motif Release 1.2.1
-*/ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmWinState.c /main/6 1996/06/20 09:39:39 rswiston $"
-#endif
-#endif
+*/
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -56,16 +51,12 @@ static char rcsid[] = "$XConsortium: WmWinState.c /main/6 1996/06/20 09:39:39 rs
 #include "WmIPlace.h"
 #include "WmIconBox.h"
 #include "WmKeyFocus.h"
-#ifdef PANELIST
 #include "WmPanelP.h"  /* for typedef in WmManage.h */
-#endif /* PANELIST */
 #include "WmManage.h"
 #include "WmProperty.h"
 #include "WmWinInfo.h"
 #include "WmWinList.h"
-#ifdef WSM
 #include "WmWrkspace.h"
-#endif /* WSM */
 
 
 /*
@@ -74,9 +65,7 @@ static char rcsid[] = "$XConsortium: WmWinState.c /main/6 1996/06/20 09:39:39 rs
 
 #include "WmMultiHead.h"
 #include "WmWinState.h"
-#ifdef PANELIST
 static void SlideWindowOut (ClientData *pCD);
-#endif /* PANELIST */
 static void UnmapClients (ClientData *pCD, unsigned int event_mask);
 static void SetupWindowStateWithEventMask (ClientData *pCD, int newState, Time setTime, unsigned int event_mask);
 
@@ -126,9 +115,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
     ClientData *pcdLeader;
     int currentState;
     WmScreenData *pSD = PSD_FOR_CLIENT(pCD);
-#ifdef WSM
     Boolean notShowing = (newState & UNSEEN_STATE);
-#endif /* WSM */
 
     currentState = pCD->clientState;
     if (currentState == newState)
@@ -145,9 +132,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
      */
 
     pcdLeader = (pCD->transientLeader) ? FindTransientTreeLeader (pCD) : pCD;
-#ifdef WSM
     SetClientWsIndex (pCD);
-#endif /* WSM */
 
     if (pCD->transientLeader)
     {
@@ -155,12 +140,10 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
            (newState != WITHDRAWN_STATE))
        {
            newState = MINIMIZED_STATE;
-#ifdef WSM
            if (notShowing)
            {
                newState |= UNSEEN_STATE;
            }
-#endif /* WSM */
        }
        else if ((newState == MINIMIZED_STATE) &&
                 (pcdLeader->clientState != MINIMIZED_STATE))
@@ -168,22 +151,18 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
            if (currentState == WITHDRAWN_STATE)
            {
                newState = NORMAL_STATE;
-#ifdef WSM
            if (notShowing)
            {
                newState |= UNSEEN_STATE;
            }
-#endif /* WSM */
            }
            else
            {
                newState = currentState;
-#ifdef WSM
            if (notShowing)
            {
                newState |= UNSEEN_STATE;
            }
-#endif /* WSM */
            }
        }
        if (newState == currentState)
@@ -195,11 +174,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
     switch (newState)
     {
 
-#ifdef WSM
         case UNSEEN_STATE | WITHDRAWN_STATE:
-#else
-       case WITHDRAWN_STATE:
-#endif /* WSM */
        {
            /*
             * Free window manager resources (frame and icon).  The
@@ -214,13 +189,9 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
        case MAXIMIZED_STATE:
        {
            SetupWindowStateWithEventMask (pCD, newState, setTime, event_mask);
-#ifdef WSM
            XMapWindow (DISPLAY, pCD->client);
            XMapWindow (DISPLAY, pCD->clientFrameWin);
-#if defined(PANELIST)
             WmStopWaiting();   /* in WmIPC.c */
-#endif /* PANELIST */
-#endif /* WSM */
            break;
        }
 
@@ -286,7 +257,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
 
            if (ICON_FRAME_WIN(pCD)) 
            {
-#ifdef WSM
                if (pCD->clientState & UNSEEN_STATE)
                {
                    if (pCD->iconWindow)
@@ -297,9 +267,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
                }
 
                ShowAllIconsForMinimizedClient (pCD);
-#else /* WSM */
-               ShowIconForMinimizedClient (pSD->pActiveWS, pCD);
-#endif /* WSM */
            }
 
            SetClientWMState (pCD, IconicState, MINIMIZED_STATE);
@@ -328,7 +295,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
            break;
        }
 
-#ifdef WSM 
 
         case UNSEEN_STATE | NORMAL_STATE:
         case UNSEEN_STATE | MAXIMIZED_STATE:
@@ -380,7 +346,6 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
            }
         }
        break;
-#endif /* WSM */
     }
 
 } /* END OF FUNCTION SetClientStateWithEventMask */
@@ -419,12 +384,8 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
        Time setTime, unsigned int event_mask)
 {
     int currentState;
-#ifdef WSM
     int wsI, iplace;
     WmWorkspaceData *pWS_i;
-#else /* WSM */
-    WmWorkspaceData *pWS = PSD_FOR_CLIENT(pCD)->pActiveWS;
-#endif /* WSM */
     WmScreenData *pSD = PSD_FOR_CLIENT(pCD);
 
     currentState = pCD->clientState;
@@ -511,7 +472,6 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
                        XMaskEvent(DISPLAY, event_mask, &event);
                        XUngrabPointer(DISPLAY,CurrentTime);
                }
-#ifdef WSM
                if (wmGD.iconAutoPlace) 
                {
                     for (wsI = 0; wsI < pCD->numInhabited; wsI++)
@@ -526,13 +486,6 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
                        }
                    }
                }
-#else /* WSM */
-               if ((wmGD.iconAutoPlace) && (ICON_PLACE(pCD) != NO_ICON_PLACE))
-               {
-                   pWS->IPData.placeList[ICON_PLACE(pCD)].pCD = 
-                       NULL;
-               }
-#endif /* WSM */
            }
 
            if (clearIconFocus)
@@ -557,19 +510,14 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
             */
 
            pCD->clientState = newState;
-#ifdef WSM
                    wmGD.bSuspendSecondaryRestack = True;
-#endif /* WSM */
            F_Raise (NULL, pCD, NULL);
-#ifdef WSM
                    wmGD.bSuspendSecondaryRestack = False;
-#endif /* WSM */
        }
 
        if ( (!(pCD->clientFlags & ICON_BOX)) || 
             ((pCD->clientFlags & ICON_BOX) && (!(firstTime))) )
        {
-#ifdef PANELIST
          if ((currentState == WITHDRAWN_STATE) && 
              (pCD->dtwmBehaviors & DtWM_BEHAVIOR_SUBPANEL) &&
              !(pCD->transientChildren))
@@ -587,7 +535,6 @@ static void SetupWindowStateWithEventMask (ClientData *pCD, int newState,
              }
          }
          else
-#endif /* PANELIST */
            MapClientWindows (pCD);
        }
 
@@ -787,16 +734,12 @@ static void UnmapClients (ClientData *pCD, unsigned int event_mask)
 void SetClientWMState (ClientData *pCD, int wmState, int mwmState)
 {
     ClientData *pNext;
-#ifdef WSM
     Boolean bToUnseen;
 
     bToUnseen = (mwmState & UNSEEN_STATE) != 0;
     mwmState &= ~UNSEEN_STATE;
-#endif /* WSM */
 
-#ifdef WSM
     SetClientWsIndex (pCD);
-#endif /* WSM */
     pNext = pCD->transientChildren;
     while (pNext)
     {
@@ -805,42 +748,32 @@ void SetClientWMState (ClientData *pCD, int wmState, int mwmState)
            SetClientWMState (pNext, wmState, mwmState);
        }
 
-#ifdef WSM
         SetClientWsIndex (pNext);
-#endif /* WSM */
        SetWMState (pNext->client, wmState, ICON_FRAME_WIN(pNext));
        if (pNext->maxConfig && mwmState == NORMAL_STATE)
        {
            pNext->clientState = MAXIMIZED_STATE;
        }
-#ifdef WSM
        else if (!pNext->maxConfig && mwmState == MAXIMIZED_STATE)
        {
            pNext->clientState = NORMAL_STATE;
        }
-#endif /* WSM */
        else
        {
            pNext->clientState = mwmState;
        }
-#ifdef WSM
        if (bToUnseen)
            pNext->clientState |= UNSEEN_STATE;
-#endif /* WSM */
        pNext = pNext->transientSiblings;
     }
 
     SetWMState (pCD->client, wmState, ICON_FRAME_WIN(pCD));
     pCD->clientState = mwmState;
-#ifdef WSM
     if (bToUnseen)
        pCD->clientState |= UNSEEN_STATE;
-#endif /* WSM */
 
 } /* END OF FUNCTION SetClientWMState */
 
-#ifdef PANELIST
-\f
 #define SLIDE_UP_PERCENTAGE    5
 #define SLIDE_UP_DIVISOR       (100/SLIDE_UP_PERCENTAGE)
 #define SLIDE_UP_INTERVAL      15
@@ -1307,7 +1240,6 @@ SlideSubpanelBackIn (ClientData *pCD, Widget wSubpanel)
     }
 
 } /* END OF FUNCTION SlideOutWindow */
-#endif /* PANELIST */
 
 \f
 /*************************************<->*************************************
@@ -1405,17 +1337,11 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD)
            CvtIconPlaceToPosition (&pWS->IPData, ICON_PLACE(pCD), 
                                    &ICON_X(pCD), &ICON_Y(pCD));
 
-#ifndef WSM
-           XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), 
-               ICON_X(pCD), ICON_Y(pCD));
-#endif /* WSM */
-
         }
 
         pWS->IPData.placeList[ICON_PLACE(pCD)].pCD = pCD;
     }
 
-#ifdef WSM
     /*
      * If icon on root window and this workspace is active, the
      * make sure it's in the right place.
@@ -1425,7 +1351,7 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD)
        XMoveWindow (DISPLAY, ICON_FRAME_WIN(pCD), 
            ICON_X(pCD), ICON_Y(pCD));
     }
-#endif /* WSM */
+
     if (pCD->iconWindow)
     {
         XMapWindow (DISPLAY, pCD->iconWindow);
@@ -1476,20 +1402,14 @@ void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD)
                             &pCD->clientEntry);
        }
 
-#ifdef WSM
         if (pWS == pSD->pActiveWS)
        {
            XMapWindow (DISPLAY, ICON_FRAME_WIN(pCD));
        }
-#else /* WSM */
-       XMapWindow (DISPLAY, ICON_FRAME_WIN(pCD));
-#endif /* WSM */
     }
 
 } /* END OF FUNCTION ShowIconForMinimizedClient */
 
-#ifdef WSM
-\f
 /*************************************<->*************************************
  *
  *  ShowAllIconsForMinimizedClient (pCD)
@@ -1532,5 +1452,3 @@ void ShowAllIconsForMinimizedClient (ClientData *pCD)
     pCD->currentWsc = saveWsc;
 
 } /* END OF FUNCTION ShowAllIconsForMinimizedClient */
-#endif /* WSM */
-\f
index 724706191bb82d00fbca4c61cc7b412bc2ef892f..9f2c590f067994102bbcf1bc8c7f563768bdb86f 100644 (file)
@@ -27,7 +27,6 @@
 /* 
  * Motif Release 1.2.1
 */ 
-/*   $XConsortium: WmWinState.h /main/4 1995/11/01 11:55:38 rswiston $ */
 /*
  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
 
@@ -37,9 +36,5 @@ extern void ConfigureNewState (ClientData *pcd);
 extern void SetClientWMState (ClientData *pCD, int wmState, int mwmState);
 extern void MapClientWindows (ClientData *pCD);
 extern void ShowIconForMinimizedClient (WmWorkspaceData *pWS, ClientData *pCD);
-#ifdef WSM
 extern void ShowAllIconsForMinimizedClient (ClientData *pCD);
-#endif /* WSM */
-#ifdef PANELIST
 extern void SlideSubpanelBackIn (ClientData *pCD, Widget wSubpanel);
-#endif /* PANELIST */
index e9147e38422fd4eb3e9f4fad4b71b95679c7864d..29693dbbbb49b13586dc143427dfefeed3dd284a 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-#ifdef WSM
 /* 
  * (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY 
  * (c) Copyright 1993, 1994 International Business Machines Corp.
  * (c) Copyright 1993, 1994 Novell, Inc.
  * ALL RIGHTS RESERVED 
 */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: WmWrkspace.c /main/7 1996/10/23 17:26:33 rswiston $"
-#endif
-#endif
 
 /*
  * Included Files:
@@ -50,13 +44,9 @@ static char rcsid[] = "$XConsortium: WmWrkspace.c /main/7 1996/10/23 17:26:33 rs
 #include <Dt/DtP.h>
 #include <Dt/WsmM.h>
 #include <stdio.h>
-#ifdef PANELIST
 #include "WmPanelP.h"
-#endif /* PANELIST */
 #include "WmIPC.h"             /* must be after DtP.h */
-#ifdef WSM
 #include "WmPresence.h"
-#endif /* WSM */
 
 /* local macros */
 #ifndef MIN
@@ -262,8 +252,6 @@ ChangeToWorkspace(
 
 } /* END OF FUNCTION ChangeToWorkspace */
 
-#ifdef PANELIST
-\f
 /******************************<->*************************************
  *
  *  ChangeWorkspaceTitle (pWS, pchTitle)
@@ -328,7 +316,6 @@ ChangeWorkspaceTitle(
     dtSendWorkspaceModifyNotification(pWS->pSD, pWS->id, DtWSM_REASON_TITLE);
 
 } /* END OF FUNCTION ChangeWorkspaceTitle */
-#endif /* PANELIST */
 
 \f
 /*************************************<->*************************************
@@ -864,9 +851,7 @@ ProcessDtWmHints (ClientData *pCD)
 #ifdef HP_VUE
     Atom       propertyVUE;
 #endif /* HP_VUE */
-#ifdef PANELIST
     long       saveFunctions;
-#endif /* PANELIST */
 
     /*
      * Retrieve the _DT_WM_HINTS property if it exists.
@@ -919,7 +904,6 @@ ProcessDtWmHints (ClientData *pCD)
 
        XFree ((char*)pHints);
     }
-#ifdef PANELIST
 
     if (pCD->dtwmBehaviors & DtWM_BEHAVIOR_PANEL)
     {
@@ -932,7 +916,6 @@ ProcessDtWmHints (ClientData *pCD)
        pCD->dtwmFunctions = saveFunctions;
        pCD->clientFlags |= FRONT_PANEL_BOX ;
     }
-#endif /* PANELIST */
 } /* END OF ProcessDtWmHints */
 
 \f
@@ -2355,7 +2338,6 @@ RemoveSubtreeFromWorkspaces(
 }   /* END OF FUNCTION RemoveSubtreeFromWorkspaces */
 
 
-#ifdef PANELIST
 \f
 /******************************<->*************************************
  *
@@ -2414,7 +2396,6 @@ GetListOfOccupiedWorkspaces(
     return(pLocalIDs);
 
 }   /* END OF FUNCTION GetListOfOccupiedWorkspaces */
-#endif /* PANELIST */
 
 \f
 /******************************<->*************************************
@@ -3429,9 +3410,7 @@ void
 SaveResources( WmScreenData *pSD)
 {
     int wsCnt;
-#ifdef PANELIST
     WmPanelistObject  pPanelist;
-#endif /* PANELIST */
 
     if(pSD)
     {
@@ -3442,7 +3421,6 @@ SaveResources( WmScreenData *pSD)
                                    WM_RES_WORKSPACE_COUNT));
        }
 
-#ifdef PANELIST
        pPanelist = (WmPanelistObject) pSD->wPanelist;
        if (pPanelist && O_Shell(pPanelist))
        {
@@ -3455,7 +3433,6 @@ SaveResources( WmScreenData *pSD)
            
            WmFrontPanelSessionSaveData();
        }
-#endif /*  PANELIST */
 
 
 
@@ -3515,11 +3492,9 @@ SaveWorkspaceResources(
     Dimension clientWidth;
     Dimension clientHeight;
     int xoff, yoff;
-#ifdef PANELIST
     WmPanelistObject  pPanelist = (WmPanelistObject) pWS->pSD->wPanelist;
     ClientData *pCD_Panel ;
     char tmpBuffer[MAXWMPATH+1];
-#endif /* PANELIST */
     int iLen;
 
     /* allocate initial data space */
@@ -3678,7 +3653,6 @@ SaveWorkspaceResources(
        AddStringToResourceData (buffer, &data, &cum_len);
     }
 
-#ifdef PANELIST
     if ((flags & WM_RES_FP_POSITION) &&
        (O_Shell(pPanelist)) && 
         (!wmGD.useStandardBehavior) &&
@@ -3791,7 +3765,6 @@ SaveWorkspaceResources(
 
        AddStringToResourceData (buffer, &data, &cum_len);
     }
-#endif /* PANELIST */
 
     if ((flags & WM_RES_ICONBOX_GEOMETRY) &&
         (!wmGD.useStandardBehavior))
@@ -4003,5 +3976,3 @@ int PrintWorkspaceList (pSD)
 } /* END OF FUNCTION PrintWorkspaceList */
 #endif /* DEBUG */
 
-/* DO NOT ADD ANYTHING AFTER THE FOLLOWING #ENDIF !!! */
-#endif /* WSM */
index fe901bbb012363a6febef7b3d5de00bb833c897d..183665799307660e89957fd6b2a1c3ebe979e878 100644 (file)
@@ -20,8 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: WmWrkspace.h /main/4 1995/11/01 11:56:28 rswiston $ */
-#ifdef WSM
 /* 
  * (c) Copyright 1987,1988,1989,1990,1992,1993,1994 HEWLETT-PACKARD COMPANY 
  * (c) Copyright 1993, 1994 International Business Machines Corp.
  * (c) Copyright 1993, 1994 Novell, Inc.
  * ALL RIGHTS RESERVED 
  */ 
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = ""
-#endif
-#endif
 
 /********    Public Function Declarations    ********/
 
@@ -115,11 +108,9 @@ extern void RemoveSubtreeFromWorkspaces(
                         ClientData *pCD,
                         WorkspaceID *pIDs,
                         unsigned int numIDs) ;
-#ifdef PANELIST
 extern WorkspaceID * GetListOfOccupiedWorkspaces( 
                        ClientData *pCD,
                         int *numIDs) ;
-#endif /* PANELIST */
 extern void HonorAbsentMapBehavior(
                        ClientData *pCD) ;
 extern void RemoveClientFromWorkspaces( 
@@ -188,14 +179,10 @@ extern void AddStringToResourceData(
                         char *string,
                         char **pdata,
                         int *plen) ;
-#ifdef PANELIST
 extern void SetCurrentWorkspaceButton(
                        WmScreenData *pSD);
 extern void SetFrontPanelTitle( 
                        WmScreenData *pSD);
-#endif /* PANELIST */
 
 /********    End Public Function Declarations    ********/
-#endif /* WSM */
-
 
index 5e6fc4d4a22c947be063acaaf27be33a003b40e1..f48813de8b3d365e8d20d8906efd2123bc45b49a 100644 (file)
@@ -20,7 +20,6 @@
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  * Floor, Boston, MA 02110-1301 USA
  */
-/* $XConsortium: WmXSMP.c /main/12 1996/05/17 12:54:14 rswiston $ */
 /*
  * (c) Copyright 1996 Digital Equipment Corporation.
  * (c) Copyright 1996 Hewlett-Packard Company.
 #include <Xm/XmP.h>
 #include "WmGlobal.h"
 #include "WmXSMP.h"
-#ifdef WSM
-# include "WmWrkspace.h"
-# include <Dt/Session.h>
-#endif
+#include "WmWrkspace.h"
+#include <Dt/Session.h>
 
 typedef struct _ProxyClientInfo
 {
@@ -61,12 +58,7 @@ typedef struct _ProxyClientInfo
 
 #define MAX_RESOURCE_LEN 1024
 
-#ifdef WSM
 static char *dtwmFileName = "dtwm.db";
-#else
-static char *dtwmFileName = ".mwmclientdb";
-# define EXTRA_FN_CHARS 20
-#endif
 
 /* Fully-qualified resource names/classes. */
 static char *xPositionStr = "%s.position.x";
@@ -77,14 +69,9 @@ static char *initialStateStr = "%s.initialState";
 static char *wmCommandStr = "%s.wmCommand";
 static char *wmClientMachineStr = "%s.wmClientMachine";
 static char *screenStr = "%s.screen";
-#ifdef WSM
 static char *workspacesStr = "%s.workspaces";
 static char *iconXPosStr = "%s.iconPos.x.%s";
 static char *iconYPosStr = "%s.iconPos.y.%s";
-#else
-static char *iconXPosStr = "%s.iconPos.x";
-static char *iconYPosStr = "%s.iconPos.y";
-#endif
 
 /* Header for private database. */
 static char *dbHeader = "\
@@ -106,10 +93,6 @@ static char *iconicStateStr = "IconicState";
 static char *XSMPClientStr = "Client";
 static char *proxyClientStr = "ProxyClient";
 
-#ifndef WSM
-static char *dbFileArgStr = "-session";
-#endif
-
 /* Flag to tell us how to treat ProxyClient info. */
 static Boolean smClientDBCheckpointed = False;
 
@@ -122,20 +105,9 @@ static void smDieCallback(Widget, XtPointer, XtPointer);
 
 /* Build client database file name. */
 static void buildDBFileName(char [MAXPATHLEN], Boolean);
-#ifndef WSM
-/*
- *Get clientDB name according to argv; set according to dbFileName.
- */
-static void getClientDBName(void);
-static void setClientDBName(void);
-static char **getNewRestartCmd(void);
-static void freeNewRestartCmd(char **);
-#endif /* ! WSM */
 
-#ifdef WSM
 /* Get string of client's workspaces. */
 static char *getClientWorkspaces(ClientData *);
-#endif
 
 /* List-of-clients utilities. */
 static Boolean addClientToList(ClientData ***, int *, ClientData *);
@@ -194,7 +166,6 @@ smSaveYourselfCallback(Widget w, XtPointer clientData, XtPointer callData)
        return;
     }
 
-#ifdef WSM
     /* Second phase: all other clients saved; now I can save myself. */
     /* Copied from WmEvent.c. */
     for (scr = 0; scr < wmGD.numScreens; scr++)
@@ -208,7 +179,6 @@ smSaveYourselfCallback(Widget w, XtPointer clientData, XtPointer callData)
            SaveResources(&wmGD.Screens[scr]);
        }
     }
-#endif
 
     /*
      *  NEW FOR SESSION MANAGEMENT: Write private client resource database.
@@ -222,30 +192,6 @@ smSaveYourselfCallback(Widget w, XtPointer clientData, XtPointer callData)
        wmGD.clientResourceDB = newClientDB;
        smClientDBCheckpointed = True;
 
-#ifndef WSM
-       /* Set new session properties if wmGD.dbFileName is valid. */
-       if (wmGD.dbFileName != (char *)NULL)
-       {
-           char **newRestartCmd, **ptr;
-           char *newDiscardCmd[4];
-           Arg args[10];
-           int nargs;
-
-           newDiscardCmd[0] = "rm";
-           newDiscardCmd[1] = "-f";
-           newDiscardCmd[2] = wmGD.dbFileName;
-           newDiscardCmd[3] = (char *)NULL;
-
-           newRestartCmd = getNewRestartCmd();
-
-           nargs = 0;
-           XtSetArg(args[nargs], XtNrestartCommand, newRestartCmd); nargs++;
-           XtSetArg(args[nargs], XtNdiscardCommand, newDiscardCmd); nargs++;
-           XtSetValues(wmGD.topLevelW, args, nargs);
-
-           freeNewRestartCmd(newRestartCmd);
-       }
-#endif /* ! WSM */
     }
 }
 
@@ -259,8 +205,6 @@ smDieCallback(Widget w, XtPointer clientData, XtPointer callData)
 static void
 buildDBFileName(char fileNameBuf[MAXPATHLEN], Boolean doingSave)
 {
-#ifdef WSM
-
     char *savePath = (char *)NULL;
 
     fileNameBuf[0] = '\0';
@@ -296,183 +240,8 @@ buildDBFileName(char fileNameBuf[MAXPATHLEN], Boolean doingSave)
     if (fileNameBuf[0] == '\0')
        strcpy(fileNameBuf, dtwmFileName);
 
-#else
-
-    strcpy(fileNameBuf, (wmGD.dbFileName == (char *)NULL) ?
-          dtwmFileName : wmGD.dbFileName);
-
-#endif
-}
-
-#ifndef WSM
-
-/*
- *  See if dbFileArgStr specified on command line.  Save subsequent arg;
- *  if not, see if resource set; if not, put files in user's home directory.
- *  NOTE: we allocate extra space for the filename so we can append numbers
- *  without reallocating in setClientDBName.
- */
-static void
-getClientDBName(void)
-{
-    char **argP;
-
-    /* See if DB filename specified on command line. */
-    wmGD.dbFileName = (char *)NULL;
-
-    if (wmGD.argv != (char **)NULL)
-    {
-       for (argP = wmGD.argv; *argP != (char *)NULL; argP++)
-       {
-           if (strcmp(*argP, dbFileArgStr) == 0)
-           {
-               if (*(++argP) != (char *)NULL)
-               {
-                   if ((wmGD.dbFileName =
-                        (char *)XtMalloc((strlen(*argP) + 1 +
-                                          EXTRA_FN_CHARS) *
-                                         sizeof(char)))
-                       != (char *)NULL)
-                       strcpy(wmGD.dbFileName, *argP);
-               }
-               break;
-           }
-       }
-    }
-
-    /* Check resource if necessary. */
-    if (wmGD.dbFileName == (char *)NULL)
-    {
-       if (wmGD.sessionClientDB != (String)NULL)
-       {
-           if ((wmGD.dbFileName =
-                (char *)XtMalloc((strlen(wmGD.sessionClientDB) + 1 +
-                                  EXTRA_FN_CHARS) *
-                                 sizeof(char)))
-               != (char *)NULL)
-               strcpy(wmGD.dbFileName, wmGD.sessionClientDB);
-       }
-    }
-
-    if (wmGD.dbFileName == (char *)NULL)
-    {
-       char *homeDir = XmeGetHomeDirName();
-
-       if ((wmGD.dbFileName =
-            (char *)XtMalloc((strlen(homeDir) + strlen(dtwmFileName) + 2 +
-                              EXTRA_FN_CHARS) * sizeof(char)))
-           != (char *)NULL)
-           sprintf(wmGD.dbFileName, "%s/%s", homeDir, dtwmFileName);
-    }
-}
-
-/*
- *  See comments above in getClientDBName.
- */
-static void
-setClientDBName(void)
-{
-    char *ptr;
-
-    if (wmGD.dbFileName == (char *)NULL)
-       return;
-
-    /* Change trailing ".<number>" to ".<number+1>" */
-    if ((ptr = strrchr(wmGD.dbFileName, '.')) != (char *)NULL)
-    {
-       char *p1;
-
-       for (p1 = ++ptr; *p1 != '\0'; p1++)
-       {
-           if (!isdigit(*p1))
-               break;
-       }
-
-       if (*p1 == '\0')
-       {
-           int numSuffix;
-
-           numSuffix = atoi(ptr) + 1;
-           sprintf(ptr, "%d", numSuffix);
-
-           /* Success!  We're all done here. */
-           return;
-       }
-    }
-
-    /* Otherwise, append ".0" to filename. */
-    strcat(wmGD.dbFileName, ".0");
 }
 
-static char **
-getNewRestartCmd(void)
-{
-    char **argP;
-    int argc, i;
-    int fileArgIndex = -1;
-    Arg args[10];
-    int nargs;
-    char **restartCmd;
-    char **newRestartCmd;
-
-    nargs = 0;
-    XtSetArg(args[nargs], XtNrestartCommand, &restartCmd); nargs++;
-    XtGetValues(wmGD.topLevelW, args, nargs);
-
-    if (restartCmd == (char **)NULL)
-       return (char **)NULL;
-
-    for (argc = 0, argP = restartCmd; *argP != (char *)NULL; argP++, argc++)
-    {
-       if (strcmp(*argP, dbFileArgStr) == 0)
-       {
-           if (*(++argP) == (char *)NULL)
-               break;
-
-           fileArgIndex = argc++; /* Point at dbFileArgStr, not filename */
-       }
-    }
-
-    if (fileArgIndex < 0)
-    {
-       fileArgIndex = argc;
-       argc += 2;
-    }
-
-    if ((newRestartCmd = (char **)XtMalloc((argc + 1) * sizeof(char *)))
-       == (char **)NULL)
-       return (char **)NULL;
-
-    for (i = 0; i < argc; i++)
-    {
-       if (i != fileArgIndex)
-       {
-           newRestartCmd[i] = XtNewString(restartCmd[i]);
-       }
-       else
-       {
-           newRestartCmd[i++] = XtNewString(dbFileArgStr);
-           newRestartCmd[i] = XtNewString(wmGD.dbFileName);
-       }
-    }
-    newRestartCmd[i] = (char *)NULL;
-
-    return newRestartCmd;
-}
-
-static void
-freeNewRestartCmd(char **restartCmd)
-{
-    while (*restartCmd != (char *)NULL)
-       XtFree(*(restartCmd++));
-
-    XtFree((char *)restartCmd);
-}
-
-#endif /* ! WSM */
-
-#ifdef WSM
-
 static char *
 getClientWorkspaces(ClientData *pCD)
 {
@@ -523,8 +292,6 @@ getClientWorkspaces(ClientData *pCD)
     return cwsP;
 }
 
-#endif /* WSM */
-
 static Boolean
 addClientToList(ClientData ***cdList, int *nClients, ClientData *pCD)
 {
@@ -556,21 +323,12 @@ clientWorkspaceCompare(const void *ppCD1, const void *ppCD2)
     if ((screenDiff = pCD1->pSD->screen - pCD2->pSD->screen) != 0)
        return screenDiff;
 
-#ifdef WSM
-
     /* If same screen, sort by workspace id. */
     /* How do we handle clients that live in more than one workspace? */
     /* For now, pick the "current" one - if not in active workspace, */
     /* this will simply be the first one in the client's list. */
     return (int)(pCD1->pWsList[pCD1->currentWsc].wsID -
                 pCD2->pWsList[pCD2->currentWsc].wsID);
-
-#else
-
-    /* If no WSM, must be in same workspace if screen is same! */
-    return 0;
-
-#endif
 }
 
 /*
@@ -630,24 +388,6 @@ findXSMPClientDBMatch(ClientData *pCD, char **workSpaceNamesP)
                pCD->clientFlags |= SM_Y;
            }
 
-#ifndef WSM
-           if ((resourcePtr =
-                getXSMPResource(pCD, WMSAVE_ICON_X, iconXPosStr))
-               != (char *)NULL)
-           {
-               ICON_X(pCD) = atoi(resourcePtr);
-               pCD->clientFlags |= SM_ICON_X;
-           }
-
-           if ((resourcePtr =
-                getXSMPResource(pCD, WMSAVE_ICON_Y, iconYPosStr))
-               != (char *)NULL)
-           {
-               ICON_Y(pCD) = atoi(resourcePtr);
-               pCD->clientFlags |= SM_ICON_Y;
-           }
-#endif
-
            if ((resourcePtr = getXSMPResource(pCD, WMSAVE_WIDTH,
                                               widthSizeStr))
                != (char *)NULL)
@@ -674,7 +414,6 @@ findXSMPClientDBMatch(ClientData *pCD, char **workSpaceNamesP)
                pCD->clientFlags |= SM_CLIENT_STATE;
            }
 
-#ifdef WSM
            if ((workSpaceNamesP != (char **)NULL) &&
                ((resourcePtr = getXSMPResource(pCD, WMSAVE_WORKSPACES,
                                                workspacesStr))
@@ -682,7 +421,6 @@ findXSMPClientDBMatch(ClientData *pCD, char **workSpaceNamesP)
            {
                *workSpaceNamesP = XtNewString(resourcePtr);
            }
-#endif
        }
 
        /* Always return True for XSMP clients. */
@@ -839,24 +577,6 @@ findProxyClientDBMatch(ClientData *pCD, char **workSpaceNamesP)
                pCD->clientFlags |= SM_Y;
            }
 
-#ifndef WSM
-           if ((resourcePtr =
-                getClientResource(proxyClientID, iconXPosStr))
-               != (char *)NULL)
-           {
-               ICON_X(pCD) = atoi(resourcePtr);
-               pCD->clientFlags |= SM_ICON_X;
-           }
-
-           if ((resourcePtr =
-                getClientResource(proxyClientID, iconYPosStr))
-               != (char *)NULL)
-           {
-               ICON_Y(pCD) = atoi(resourcePtr);
-               pCD->clientFlags |= SM_ICON_Y;
-           }
-#endif
-
            if ((resourcePtr =
                 getClientResource(proxyClientID, widthSizeStr))
                != (char *)NULL)
@@ -883,7 +603,6 @@ findProxyClientDBMatch(ClientData *pCD, char **workSpaceNamesP)
                pCD->clientFlags |= SM_CLIENT_STATE;
            }
 
-#ifdef WSM
            if ((workSpaceNamesP != (char **)NULL) &&
                ((resourcePtr =
                  getClientResource(proxyClientID, workspacesStr))
@@ -891,12 +610,6 @@ findProxyClientDBMatch(ClientData *pCD, char **workSpaceNamesP)
            {
                *workSpaceNamesP = XtNewString(resourcePtr);
            }
-#endif
-
-#ifndef WSM
-           /* This is done in LoadClientIconPositions() if WSM defined. */
-           dbRemoveProxyClientEntry(proxyClientID);
-#endif
 
            return True;
        }
@@ -950,7 +663,6 @@ saveXSMPClient(FILE *fp, ClientData *pCD)
 
     if (!pCD->pSD->useIconBox)
     {
-#ifdef WSM
        WmScreenData *pSD = pCD->pSD;
        WmWorkspaceData *pWS;
        int i;
@@ -973,19 +685,6 @@ saveXSMPClient(FILE *fp, ClientData *pCD)
                }
            }
        }
-#else
-       if (SAVE_RESOURCE(pCD, WMSAVE_ICON_X))
-       {
-           fprintf(fp, iconXPosStr, clientID);
-           fprintf(fp, intArg, ICON_X(pCD));
-       }
-
-       if (SAVE_RESOURCE(pCD, WMSAVE_ICON_Y))
-       {
-           fprintf(fp, iconYPosStr, clientID);
-           fprintf(fp, intArg, ICON_Y(pCD));
-       }
-#endif
     }
 
     if (SAVE_RESOURCE(pCD, WMSAVE_WIDTH))
@@ -1004,18 +703,13 @@ saveXSMPClient(FILE *fp, ClientData *pCD)
     {
        int clientState;
 
-#ifdef WSM
        clientState = pCD->clientState & ~UNSEEN_STATE;
-#else
-       clientState = pCD->clientState;
-#endif
 
        fprintf(fp, initialStateStr, clientID);
        fprintf(fp, strArg, (clientState == NORMAL_STATE) ?
                normalStateStr : iconicStateStr);
     }
 
-#ifdef WSM
     if (SAVE_RESOURCE(pCD, WMSAVE_WORKSPACES))
     {
        char *clientWorkspaces = getClientWorkspaces(pCD);
@@ -1027,7 +721,6 @@ saveXSMPClient(FILE *fp, ClientData *pCD)
            XtFree(clientWorkspaces);
        }
     }
-#endif
 
     return True;
 }
@@ -1043,9 +736,7 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum)
     ProxyClientInfo proxyClientInfo;
     int clientX, clientY;
     unsigned int clientWd, clientHt;
-#ifdef WSM
     char *clientWorkspaces;
-#endif
 
     if (!getProxyClientInfo(pCD, &proxyClientInfo))
        return False;
@@ -1077,7 +768,6 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum)
 
     if (!pCD->pSD->useIconBox)
     {
-#ifdef WSM
        WmScreenData *pSD = pCD->pSD;
        WmWorkspaceData *pWS;
        int i;
@@ -1094,13 +784,6 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum)
                fprintf(fp, intArg, pCD->pWsList[i].iconY);
            }
        }
-#else
-       fprintf(fp, iconXPosStr, clientID);
-       fprintf(fp, intArg, ICON_X(pCD));
-
-       fprintf(fp, iconYPosStr, clientID);
-       fprintf(fp, intArg, ICON_Y(pCD));
-#endif
     }
 
     fprintf(fp, widthSizeStr, clientID);
@@ -1109,17 +792,12 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum)
     fprintf(fp, heightSizeStr, clientID);
     fprintf(fp, intArg, clientHt);
 
-#ifdef WSM
     clientState = pCD->clientState & ~UNSEEN_STATE;
-#else
-    clientState = pCD->clientState;
-#endif
 
     fprintf(fp, initialStateStr, clientID);
     fprintf(fp, strArg, (clientState == NORMAL_STATE) ?
            normalStateStr : iconicStateStr);
 
-#ifdef WSM
     clientWorkspaces = getClientWorkspaces(pCD);
     if (clientWorkspaces != (char *)NULL)
     {
@@ -1127,7 +805,6 @@ saveProxyClient(FILE *fp, ClientData *pCD, int clientIDNum)
        fprintf(fp, strArg, clientWorkspaces);
        XtFree(clientWorkspaces);
     }
-#endif
 
     return True;
 }
@@ -1188,9 +865,6 @@ LoadClientResourceDB(void)
 {
     char dbFileName[MAXPATHLEN];
 
-#ifndef WSM
-    getClientDBName();
-#endif
     buildDBFileName(dbFileName, False);
 
     return XrmGetFileDatabase(dbFileName);
@@ -1213,9 +887,6 @@ SaveClientResourceDB(void)
 
     /* Iterate through client list, saving */
     /* appropriate resources for each. */
-#ifndef WSM
-    setClientDBName();
-#endif
     buildDBFileName(dbFileName, True);
     if ((fp = fopen(dbFileName, "w")) == (FILE *)NULL)
        return (XrmDatabase)NULL;
@@ -1316,9 +987,6 @@ SortClientListByWorkspace(ClientData **clients, int nClients)
     }
 }
 
-#ifdef WSM
-/* This needs to be called if WSM defined; if WSM not defined, icon */
-/* positions are read at the same time as other resources. */
 void
 LoadClientIconPositions(ClientData *pCD)
 {
@@ -1395,4 +1063,3 @@ LoadClientIconPositions(ClientData *pCD)
        }
     }
 }
-#endif /* WSM */
index fe639c0ae6a7b0fe5b46a87e1ba52c644e352f61..48ec2cafb0ec546ec03212fce64df3f9834db2c0 100644 (file)
@@ -23,7 +23,6 @@
 #ifndef _WmXSMP_h
 #define _WmXSMP_h
 
-/* $XConsortium: WmXSMP.h /main/4 1996/04/19 11:22:40 rswiston $ */
 /*
  * (c) Copyright 1996 Digital Equipment Corporation.
  * (c) Copyright 1996 Hewlett-Packard Company.
@@ -47,9 +46,7 @@
 #define WMSAVE_WIDTH           (1L << 2)
 #define WMSAVE_HEIGHT          (1L << 3)
 #define WMSAVE_STATE           (1L << 4)
-#ifdef WSM
-# define WMSAVE_WORKSPACES     (1L << 5)
-#endif
+#define WMSAVE_WORKSPACES      (1L << 5)
 #define WMSAVE_ICON_X          (1L << 6)
 #define WMSAVE_ICON_Y          (1L << 7)
 
@@ -61,8 +58,6 @@ extern XrmDatabase SaveClientResourceDB(void);
 extern Boolean FindClientDBMatch(ClientData *, char **);
 extern Boolean GetSmClientIdClientList(ClientData ***, int *);
 extern void SortClientListByWorkspace(ClientData **, int);
-#ifdef WSM
 extern void LoadClientIconPositions(ClientData *);
-#endif
 
 #endif /* _WmXSMP_h */
index 9e2c34964ece009dddf9cb17e4d6197a5bd92944..a19e2716eb704df4c2a9a02dac65a96d67b3703a 100644 (file)
@@ -105,8 +105,8 @@ char **argv;
     Widget  top;
     XtAppContext app_context;
     Arg        args[10];
-    register int n;
-    register int i;
+    int n;
+    int i;
 
     /*  
      * initialize toolkit  
@@ -273,8 +273,8 @@ Widget top;
 {
     Window root;
     Arg        args[10]; /*  arg list          */
-    register int n;    /*  arg count           */
-    register int i;
+    int n;     /*  arg count           */
+    int i;
     DtWsmWorkspaceInfo *pWsInfo;
     char *pchWs;
     Widget left = None;
@@ -346,7 +346,7 @@ Widget top;
 void ShowWorkspaceOccupancy ()
 {
     Arg        args[10]; /*  arg list          */
-    register int n;    /*  arg count           */
+    int n;     /*  arg count           */
     int i,j;
     Atom *paWsIn = NULL;
     unsigned long numWsIn;
index 2eb229972c81bef718ec3a1a1125eaa345a5e66a..06d76566dcf92e7120b2db712f0c598fc0be3052 100644 (file)
@@ -101,8 +101,8 @@ char **argv;
     Widget  top;
     XtAppContext app_context;
     Arg        args[10];
-    register int n;
-    register int i;
+    int n;
+    int i;
     XmString xms, xmsBlank;
 
     /*  
@@ -454,7 +454,7 @@ char **argv;
 void ShowCurrentWorkspaceInfo ()
 {
     Arg        args[10]; /*  arg list          */
-    register int n;    /*  arg count           */
+    int n;     /*  arg count           */
     Atom aWs;
     int rval;
     Display *dpy;
index 38e33dba2addc79a9afa29441950f6cf88191f6c..05283046a3ad499673b82c8ef6df65c8a361d420 100644 (file)
@@ -859,8 +859,6 @@ $set 25        Redefine set#
 
 127 "S [Maske]"
 
-128 "SIGAPOLLO"
-
 129 "Sicherheitsbezeichnung geändert"
 
 130 "Socket-Unterbrechung"
index e2227187f253add18c4fe12cd6e38dcfbc149f89..77a19847d4293fee0143588cab69be43d49dcc53 100644 (file)
@@ -859,8 +859,6 @@ $set 25        Redefine set#
 
 127 "S [máscara]"
 
-128 "SIGAPOLLO"
-
 129 "Cambiado nivel de seguridad"
 
 130 "Interrupción de zócalo"
index e416e012ae5abf257fa01026ac49d4ae56d0755e..a8125d3f405d53b4831282922636c54f27eb4ff6 100644 (file)
@@ -858,8 +858,6 @@ $set 25        Redefine set#
 
 127 "S [masque]"
 
-128 "SIGAPOLLO"
-
 129 "Libellé de sécurité modifié"
 
 130 "Interruption de prise"
index c505dbe1d683dcb7eb917aed5e1aac012b5b2317..522e07bf982f7a1631eaf48e760ed99a82005283 100644 (file)
@@ -431,7 +431,6 @@ $set 25
 125 Risorse perdute
 126 Ritorno al vecchio driver tty...
 127 S [maschera]
-128 SIGAPOLLO
 129 Etichetta di sicurezza modificata
 130 Interrupt del socket 
 131 Suono completato
index ecf610a9563d14a0e9b3dd01dd63c77258a95e9b..70dd35250d5aab0324e2be81a57320e54887fce9 100644 (file)
@@ -433,7 +433,6 @@ $set 25
 125 ¥ê¥½¡¼¥¹¤¬¼º¤ï¤ì¤Þ¤·¤¿¡£
 126 µì tty ¥É¥é¥¤¥Ð¤ËÌᤷ¤Þ¤¹...
 127 S [ ¥Þ¥¹¥¯ ]
-128 SIGAPOLLO
 129 ¥»¥­¥å¥ê¥Æ¥£¡¦¥é¥Ù¥ë¤òÊѹ¹¤·¤Þ¤·¤¿¡£
 130 ¥½¥±¥Ã¥È³ä¤ê¹þ¤ß
 131 ¥µ¥¦¥ó¥É¤¬´°Î»¤·¤Þ¤·¤¿¡£
index 5b956717946bf783fb93b897e978f17d716eec2e..9de548e32b3d1c6ce4bfa14bd79542c242f1901a 100644 (file)
@@ -422,7 +422,6 @@ $set 25
 125 ÀÚ¿øÀÌ ¾ø¾îÁü
 126 ÀÌÀü tty µå¶óÀ̹ö·Î µÇµ¹¸®´Â ÁßÀÔ´Ï´Ù...
 127 S [mask]
-128 SIGAPOLLO
 129 º¸¾È ·¹À̺íÀÌ ¹Ù²î¾ú½À´Ï´Ù.
 130 ¼ÒÄÏ °¡·Îä±â
 131 À½ÇâÀÌ ³¡³µ½À´Ï´Ù.
index 55eaee424a3bd20a66b3c1a250c7bb901c0caf59..01a94b2618f2a13d851484a05743c45b80d7a643 100644 (file)
@@ -430,7 +430,6 @@ $set 25
 125 Resurser saknas
 126 Återgår till gammal tty-drivrutin...
 127 S [mask]
-128 SIGAPOLLO
 129 Säkerhetsnamnet har ändrats
 130 Avbrottssekvens för sockel
 131 Ljudet är färdigt
index 6b03d380e6ce25911ca036c3e7d9b588eb08fad2..57e46d58cfea53456e41d8f55d634eae085db2f3 100644 (file)
@@ -28,7 +28,6 @@ OBJS =  \
        Dtmail \
        Dtbuilder \
        Dtinfo \
-       Dtudcfonted \
         Dt
 
 all:: $(OBJS)
@@ -51,7 +50,6 @@ LinkFile(Dtterm.nls,$(CDESRC)/dtterm/Dtterm.ad)
 LinkFile(Dtmail.nls,$(CDESRC)/dtmail/dtmail/Dtmail)
 LinkFile(Dtbuilder.nls,$(CDESRC)/dtappbuilder/src/ab/Dtbuilder.ad)
 LinkFile(Dtinfo.nls,$(CDESRC)/dtinfo/dtinfo/src/Dtinfo)
-LinkFile(Dtudcfonted.nls,$(CDESRC)/dtudcfonted/resource/Dtudcfonted)
 LinkFile(Dt.nls,$(DTSVCSRC)/DtUtil2/Dt.ad)
 
 DtstyleDescRule(Dthelpview,Dthelpview)
@@ -72,7 +70,6 @@ DtstyleDescRule(Dtterm,Dtterm)
 DtstyleDescRule(Dtmail,Dtmail)
 DtstyleDescRule(Dtbuilder,Dtbuilder)
 DtstyleDescRule(Dtinfo,Dtinfo)
-DtstyleDescRule(Dtudcfonted,Dtudcfonted)
 DtstyleDescRule(Dt,Dt)
 
 depend::
index 453cf19578a33fae660828c30a833c7d2c9ca987..1eda380929eeb533647aaa99473b274a759702e7 100644 (file)
@@ -52,8 +52,6 @@ OBJS= \
       dtterm.cat       \
       dttypes.cat      \
       dtwm.cat         \
-      dtudcexch.cat     \
-      dtudcfonted.cat   \
       libdtcm.cat   \
       libDtMail.cat
 
@@ -105,8 +103,6 @@ LinkFile(dtstyle.msg,$(CDESRC)/dtstyle/dtstyle.msg)
 LinkFile(dtterm.msg,$(CDESRC)/dtterm/dtterm.msg)
 LinkFile(dttypes.msg,$(CDESRC)/util/dttypes/dttypes.msg)
 LinkFile(dtwm.msg,$(CDESRC)/dtwm/dtwm.msg)
-LinkFile(dtudcexch.msg,$(CDESRC)/dtudcexch/dtudcexch.msg)
-LinkFile(dtudcfonted.msg,$(CDESRC)/dtudcfonted/dtudcfonted.msg)
 LinkFile(libABil.msg,$(CDESRC)/dtappbuilder/src/libABil/libABil.msg)
 LinkFile(libABobjXm.msg,$(CDESRC)/dtappbuilder/src/libABobjXm/libABobjXm.msg)
 LinkFile(libAButil.msg,$(CDESRC)/dtappbuilder/src/libAButil/libAButil.msg)
index 72c3700c3224e6e6dcd08b43e8e512688486d232..42260bcee875086e81ac9bedbe2b822ea740195b 100644 (file)
@@ -58,8 +58,6 @@ OBJS= \
       dtterm.cat       \
       dttypes.cat      \
       dtwm.cat         \
-      dtudcexch.cat     \
-      dtudcfonted.cat   \
       libdtcm.cat   \
       libDtMail.cat
 
@@ -114,8 +112,6 @@ LinkFile(dtstyle.msg,$(CDESRC)/dtstyle/dtstyle.msg)
 LinkFile(dtterm.msg,$(CDESRC)/dtterm/dtterm.msg)
 LinkFile(dttypes.msg,$(CDESRC)/util/dttypes/dttypes.msg)
 LinkFile(dtwm.msg,$(CDESRC)/dtwm/dtwm.msg)
-LinkFile(dtudcexch.msg,$(CDESRC)/dtudcexch/dtudcexch.msg)
-LinkFile(dtudcfonted.msg,$(CDESRC)/dtudcfonted/dtudcfonted.msg)
 LinkFile(libABil.msg,$(CDESRC)/dtappbuilder/src/libABil/libABil.msg)
 LinkFile(libABobjXm.msg,$(CDESRC)/dtappbuilder/src/libABobjXm/libABobjXm.msg)
 LinkFile(libAButil.msg,$(CDESRC)/dtappbuilder/src/libAButil/libAButil.msg)
index b8b05dcd207073a11c35d9e6cc8008e2a623680a..cca339377e57a66a87bd1c6c9d0bca8cf2b948ac 100644 (file)
@@ -118,9 +118,7 @@ void fatal ();
 void get_option ();
 
 
-void main (argc, argv)
-int argc;
-char *argv [];
+void main (int argc, char *argv [])
 {
     int c;
 
@@ -182,7 +180,7 @@ char *argv [];
  * If the pattern "%|nls-???-###|" is found in the template file, replace it
  * by big_buff.
  */
-void process_message ()
+void process_message (void)
 {
     int c;
     int m = 0;
@@ -220,7 +218,7 @@ void process_message ()
 /*
  * Get a character from template. Incriment line count if new line is found.
  */
-int get_char ()
+int get_char (void)
 {
     int c;
 
@@ -233,7 +231,7 @@ int get_char ()
 /*
  * Open message files
  */
-void cat_open ()
+void cat_open (void)
 {
     char line[255];
 
@@ -272,9 +270,9 @@ void cat_open ()
 /*
  * Search a message by specified number. If found, returns 1 and the message
  * will be set in big_buff. If not found, returns 0.
+ * msg, message number to be searched
  */
-int find_message (msg)
-int msg; /* message number to be searched */
+int find_message (int msg)
 {
     int ret = 0;
 
@@ -289,10 +287,11 @@ int msg; /* message number to be searched */
  * Search a line starts with the message number in specified file. If found,
  * the line will be passed to get_message() and returns 1.
  * If not found, returns 0.
+ *
+ * msg, message number to be searched
+ * file, 0: Primary message file, 1: Default message file
  */
-int find_msg_in_file (msg, file)
-int msg; /* message number to be searched */
-int file; /* 0: Primary message file, 1: Default message file */
+int find_msg_in_file (int msg, int file)
 {
         big_buff = catgets(catfile[file],1,msg,"MSG_NOT_FOUND");
         if ( strcmp(big_buff,"MSG_NOT_FOUND") )
@@ -334,9 +333,7 @@ void fatal (char *m, int line, int file)
 /*
  * Parse command line options.
  */
-void get_option (argc, argv)
-int *argc;
-char *argv[];
+void get_option (int *argc, char *argv[])
 {
     int i;
 
index 96668a1a6b6c926a9e676c33e54729de27a3aacb..c92dffb6b9913c5069ab28155785a02626972565 100644 (file)
@@ -129,8 +129,8 @@ int
 main (int argc, 
       char *argv[]) 
 {
-  register int i;
-  register char *cp;
+  int i;
+  char *cp;
   int count;
   char *t;
   
@@ -254,10 +254,10 @@ mkcatdefs(char *fname)
 {
   char msgname [PATH_MAX];
   char line [MAXLINELEN];
-  register char *cp;
-  register char *cpt;
-  register int m;
-  register int n;
+  char *cp;
+  char *cpt;
+  int m;
+  int n;
   int contin = 0;
   int len;             /* # bytes in a character */
   
@@ -542,7 +542,7 @@ insert(char *tname,
        */
      
 {
-  register struct name *ptr,*optr;
+  struct name *ptr,*optr;
   int rslt = -1,i,hashval;
   
   hashval = hash(tname);
@@ -601,7 +601,7 @@ nsearch (char *tname)
        */
      
 {
-  register struct name *ptr,*optr;
+  struct name *ptr,*optr;
   int rslt = -1,i,hashval;
   
   hashval = hash(tname);
@@ -640,7 +640,7 @@ nsearch (char *tname)
 static int 
 hash (char *name) /* pointer to symbol */
 {
-  register int hashval = 0;
+  int hashval = 0;
   
   while (*name)
     hashval += *name++;
index 5834e93fe5ebeee3f4bcfd7e2d30a9c689a120c8..621b64fc9f2d0ad332edafa5491aec78e117cdf1 100644 (file)
@@ -431,7 +431,6 @@ $set 25
 125 ×ÊÔ´¶ªÊ§
 126 »Ø¸´µ½¾ÉµÄ tty Çý¶¯³ÌÐò...
 127 S [ÆÁ±Î]
-128 SIGAPOLLO
 129 °²È«ÐÔ±êºÅ¸ü¸Ä
 130 Socket ÖжÏ
 131 ÉùÒôÍê³É
index d356dd2d6d3a34937b436f8ffa2156f75a890870..6cd1cb108c884630a2e6b83935d878bff0171db4 100644 (file)
@@ -142,7 +142,7 @@ $set 11
 3 æñäã '%s' Ñ»à± (Hashing) ÆÂÚõ¡¢Çã widget ùËɱ '%s' Äã
 4 ÆÜßÈËòÅü×äÇØê¢
 5 ÌÔÅïàÒÎÎÙÚÈ硧ÄÖ̦ÜÚÌþÆÜØÄÌîÝÃÌù
-6 widget '%s' ÐúÇ¡ÆÂÚõ\r
+6 widget '%s' ÐúÇ¡ÆÂÚõ
 7 üÏÆüÙ¶í°àÒÕ桨%s
 8 ÅèĶÖÖÍÌÄ÷×ÃàÒÕ桨%s
 9 widget '%s' ÆÜÌùåøÅèĶæñä㡨%s
@@ -431,7 +431,6 @@ $set 25
 125 æñäãòÜÆÂ
 126 Çßߦȩ÷®Îû tty ûÄÙ¯ðÂ...
 127 S [mask]
-128 SIGAPOLLO
 129 ÇøÇÀíºü¾ÄØÊÑüÈ
 130 ßÆսʥöË
 131 ôøÓöÉùÈ©
index 9a1f280000337a8be73c2b9cd6ab78e0e630031b..5688d8b9c535679cfbfd4c56ff6c99dd7f712bfd 100644 (file)
@@ -60,7 +60,7 @@ Token Recognizer::recognize(InputSource *in, Messenger &mgr) const
   }
   else
     in->startTokenNoMulticode();
-  register const Trie *pos = trie_.pointer();
+  const Trie *pos = trie_.pointer();
   do {
     pos = pos->next(map_[in->tokenChar(mgr)]);
   } while (pos->hasNext());
index 98e925b5ef0053dd5e13939c9aab27af01a644d0..efd8532e5c32ddc9812b9e68caef43511aa47a1e 100644 (file)
@@ -223,6 +223,7 @@ void Parser::doInit()
     if (!setStandardSyntax(*syntaxp, refSyntax, sd().docCharset(),
                           switcher)) {
       giveUp();
+      delete syntaxp;
       return;
     }
     syntaxp->implySgmlChar(sd().docCharset());
@@ -275,8 +276,10 @@ Boolean Parser::implySgmlDecl()
   else
     spec = &coreSyntax;
   CharSwitcher switcher;
-  if (!setStandardSyntax(*syntaxp, *spec, sd().docCharset(), switcher))
+  if (!setStandardSyntax(*syntaxp, *spec, sd().docCharset(), switcher)) {
+    delete syntaxp;
     return 0;
+  }
   syntaxp->implySgmlChar(sd().docCharset());
   for (int i = 0; i < Syntax::nQuantity; i++)
     syntaxp->setQuantity(i, options().quantity[i]);
index 51824f20044d8ca8cb49694d237cddfd9864c959..ffd208fa989215400fd894e9e8d781087fbfb24d 100644 (file)
 #include <fcntl.h>
 #include <unistd.h>
 
-#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
-#include <strstream>
-#else
-#include <strstream.h>
-#endif
+#include <sstream>
 
 #include <Xm/TextF.h>
 #include <Dt/SpinBox.h>
@@ -468,11 +464,9 @@ DtTtSetLabel(
 )
 {
     Tt_status status = tt_ptr_error( val );
-    std::ostrstream errStream;
+    std::ostringstream errStream;
     errStream << func << " = " << val << " (" << status << ")" << ends;
-    char *label = errStream.str();
-    DtTtSetLabel( labelWidget, label );
-    delete label;
+    DtTtSetLabel( labelWidget, errStream.str().c_str() );
     return status;
 }
 
@@ -483,11 +477,9 @@ DtTtSetLabel(
        Tt_status status
 )
 {
-    std::ostrstream errStream;
+    std::ostringstream errStream;
     errStream << func << " = " << status << ends;
-    char *label = errStream.str();
-    DtTtSetLabel( labelWidget, label );
-    delete label;
+    DtTtSetLabel( labelWidget, errStream.str().c_str() );
     return status;
 }
 
@@ -498,11 +490,10 @@ DtTtSetLabel(
        int returnVal
 )
 {
-    std::ostrstream errStream;
+    std::ostringstream errStream;
     errStream << func << " = " << returnVal << ends;
-    char *label = errStream.str();
-    DtTtSetLabel( labelWidget, label );
-    delete label;
+    DtTtSetLabel( labelWidget,
+                  const_cast<char *>(errStream.str().c_str()) );
     return returnVal;
 }
 
@@ -519,7 +510,7 @@ _DtTtChoices(
                return 0;
        }
        for (int i = 0; i < count; i++) {
-               std::ostrstream itemStream;
+               std::ostringstream itemStream;
                itemStream << (void *)pPats[ i ];
                char *name = (char *)
                        tt_pattern_user( *pPats[ i ], _DtTtPatsNameKey );
@@ -528,9 +519,8 @@ _DtTtChoices(
                        tt_free( name );
                }
                itemStream << ends;
-               char *string = itemStream.str();
-               items[ i ] = XmStringCreateLocalized( string );
-               delete string;
+               items[ i ] =
+                    XmStringCreateLocalized(const_cast<char *>(itemStream.str().c_str()));
        }
        return items;
 }
@@ -566,7 +556,7 @@ _DtTtChoices(
                }
                *itemCount = dtTtMessagesCount;
                for (i = 0; i < dtTtMessagesCount; i++) {
-                       std::ostrstream itemStream;
+                       std::ostringstream itemStream;
                        itemStream << (void *)dtTtMessages[ i ];
                        char *op = tt_message_op( dtTtMessages[ i ] );
                        if (! tt_is_err( tt_ptr_error( op ))) {
@@ -579,9 +569,8 @@ _DtTtChoices(
                                tt_free( id );
                        }
                        itemStream << ends;
-                       char *string = itemStream.str();
-                       items[ i ] = XmStringCreateLocalized( string );
-                       delete string;
+                       items[ i ] =
+                            XmStringCreateLocalized(const_cast<char *>(itemStream.str().c_str()));
                }
                return items;
            case DTTT_PATTERN:
@@ -592,11 +581,10 @@ _DtTtChoices(
                }
                *itemCount = dtTtPatternsCount;
                for (i = 0; i < dtTtPatternsCount; i++) {
-                       std::ostrstream itemStream;
+                       std::ostringstream itemStream;
                        itemStream << (void *)dtTtPatterns[ i ] << ends;
                        items[ i ] = XmStringCreateLocalized(
-                                       itemStream.str() );
-                       delete itemStream.str();
+                            const_cast<char *>(itemStream.str().c_str()) );
                }
                return items;
            case DTTT_DTSESSION:
@@ -636,23 +624,19 @@ _DtOpen(
 )
 {
     char *file = tempnam( 0, AIX_CONST_STRING tempnamTemplate );
-    std::ostrstream cmdStream;
+    std::ostringstream cmdStream;
     cmdStream << cmd << " > " << file << ends;
-    int sysStat = system( cmdStream.str() );
+    int sysStat = system( cmdStream.str().c_str() );
     if (! WIFEXITED( sysStat )) {
-           std::ostrstream func;
+           std::ostringstream func;
            func << "system( \"" << cmdStream.str() << "\" )" << ends;
-           DtTtSetLabel( label, func.str(), sysStat );
-           delete cmdStream.str();
-           delete func.str();
+           DtTtSetLabel( label, func.str().c_str(), sysStat );
            return;
     }
     if (WEXITSTATUS( sysStat ) != 0) {
-           DtTtSetLabel( label, cmdStream.str(), WEXITSTATUS( sysStat ));
-           delete cmdStream.str();
+        DtTtSetLabel( label, cmdStream.str().c_str(), WEXITSTATUS( sysStat ));
            return;
     }
-    delete cmdStream.str();
     _DtOpen( label, file );
 }
 
@@ -662,17 +646,15 @@ _DtOpen(
        const char *    file
 )
 {
-    std::ostrstream labelStream;
+    std::ostringstream labelStream;
     labelStream << "dtaction Open " << file << ends;
-    DtTtSetLabel( label, labelStream.str() );
-    delete labelStream.str();
+    DtTtSetLabel( label, labelStream.str().c_str() );
 
-    std::ostrstream cmd;
+    std::ostringstream cmd;
     cmd << "( unset TT_TRACE_SCRIPT; if dtaction Open " << file
        << "; then :; else textedit " << file << "; fi; sleep 600; rm -f "
        << file << " ) &" << ends;
-    system( cmd.str() );
-    delete cmd.str();
+    system( cmd.str().c_str() );
 }
 
 void
@@ -699,16 +681,14 @@ _DtMan(
        const char *    topic
 )
 {
-    std::ostrstream labelStream;
+    std::ostringstream labelStream;
     labelStream << "dtaction Dtmanpageview " << topic << ends;
-    DtTtSetLabel( label, labelStream.str() );
-    delete labelStream.str();
+    DtTtSetLabel( label, labelStream.str().c_str() );
 
-    std::ostrstream cmd;
+    std::ostringstream cmd;
     cmd << "unset TT_TRACE_SCRIPT; if dtaction Dtmanpageview " << topic
        << "; then :; else cmdtool -c man " << topic << "; fi &" << ends;
-    system( cmd.str() );
-    delete cmd.str();
+    system( cmd.str().c_str() );
 }
 
 Boolean
index 3e7ba76f188f892e397f1089110c0ffa25d1131c..0b7acffc7aa766ce3d6d9e74fe920dc1319061fd 100644 (file)
  *** Add include files, types, macros, externs, and user functions here.
  ***/
 
-#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <fstream>
-#include <strstream>
-#else
-#include <fstream.h>
-#include <strstream.h>
-#endif
+#include <sstream>
 
 #include "DtTt.h"
 
index 8e21b587ada38b2441a4f944308dfcdf01f5b44a..b0c9c0f72db82adc4e114bab0f99351f8d434290 100644 (file)
 #include <sys/wait.h>
 #include <Xm/TextF.h>
 
-#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <fstream>
-#include <strstream>
-#else
-#include <fstream.h>
-#include <strstream.h>
-#endif
+#include <sstream>
 
 #include "DtTt.h"
 #include "ttsnoop_ui.h"
@@ -217,7 +212,7 @@ fileOkayed(
     XtVaGetValues( instance->fchooser, XmNuserData, &xtPtr, NULL );
     FileChooserInfo *info = (FileChooserInfo *)xtPtr;
     Widget label = dtb_ttsnoop_ttsnoop_win.ttsnoopWin_label;
-    std::ostrstream script;
+    std::ostringstream script;
     switch (info->choice) {
            Tt_pattern *pats;
            Tt_message msg;
@@ -297,19 +292,17 @@ fileOkayed(
            script << "numChars=`tt_type_comp -p \"" << path;
            script << "\" | wc -c`; if [ $numChars = 0 ]; "
                      "then exit 1; else exit 0; fi" << endl;
-           ival = system( script.str() );
-           delete script.str();
+           ival = system( script.str().c_str() );
            if (! WIFEXITED( ival )) {
                    DtTtSetLabel( label,
                        "system( \"tt_type_comp -p\" )", ival );
                    break;
            }
            if (WEXITSTATUS( ival ) != 0) {
-                   std::ostrstream diagnosis;
+                   std::ostringstream diagnosis;
                    diagnosis << "tt_type_comp -p: syntax error in "
                            << path << ends;
-                   DtTtSetLabel( label, diagnosis.str() );
-                   delete diagnosis.str();
+                   DtTtSetLabel( label, diagnosis.str().c_str() );
                    break;
            }
            sess = tt_default_session();
index e759859cdb7c9384ce41de7d837e479853dd4bfd..fa2e1ee7614d040e73582c76a05fffd87a97d538 100644 (file)
  *** Add include files, types, macros, externs, and user functions here.
  ***/
 
-#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
-#include <strstream>
-#else
-#include <strstream.h>
-#endif
+#include <sstream>
 
 #include <Xm/TextF.h>
 #include <Dt/SpinBox.h>
@@ -621,12 +617,11 @@ DtTtMessageWidgetCreate(
                }
        }
 
-       std::ostrstream labelStream;
+       std::ostringstream labelStream;
        labelStream << "Tt_message " << (void *)msg;
        XtVaSetValues( instance->messageProps,
-                      XmNtitle, labelStream.str(),
+                      XmNtitle, labelStream.str().c_str(),
                       NULL );
-       delete labelStream.str();
 
        _DtTtMessageWidgetUpdate( instance, msg, _DtTtMessageFullUpdate );
 
@@ -1409,7 +1404,7 @@ msgGenAction(
     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
     
     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
-    std::ostrstream action; // XXX when to delete .str()?
+    std::ostringstream action;
     DtbMessagePropsMessagePropsInfo instance =
            (DtbMessagePropsMessagePropsInfo)clientData;
     Tt_message msg = messageProps2Msg( instance );
@@ -1457,10 +1452,9 @@ msgGenAction(
     }
     // XXX emit commented warnings for e.g. TT_OFFER, TT_HANDLER
     action << "}\n";
-    // XtVaSetValues( instance->messageText, XmNvalue, action.str(), 0 );
-    _DtOpen( instance->messageFooterLabel, (void *)action.str(),
-            action.pcount(), "actio" );
-    delete action.str();
+    // XtVaSetValues( instance->messageText, XmNvalue, action.str().c_str(), 0 );
+    _DtOpen( instance->messageFooterLabel, (void *)action.str().c_str(),
+            action.str().size(), "actio" );
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
 }
 
@@ -1476,7 +1470,7 @@ msgGenC(
     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
     
     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
-       std::ostrstream code; // XXX when to delete .str()?
+       std::ostringstream code;
        DtbMessagePropsMessagePropsInfo instance =
                (DtbMessagePropsMessagePropsInfo)clientData;
        Tt_message msg = messageProps2Msg( instance );
@@ -1602,10 +1596,9 @@ msgGenC(
                code << "}\n";
        }
        tt_free( op );
-       // XtVaSetValues( instance->messageText, XmNvalue, code.str(), 0 );
-       _DtOpen( instance->messageFooterLabel, (void *)code.str(),
-                code.pcount(), "msgC" );
-       delete code.str();
+       // XtVaSetValues( instance->messageText, XmNvalue, code.str().c_str(), 0 );
+       _DtOpen( instance->messageFooterLabel, (void *)code.str().c_str(),
+                code.str().size(), "msgC" );
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
 }
 
@@ -1879,7 +1872,7 @@ genObserver(
     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
     
     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
-    std::ostrstream ptype; // XXX when to delete .str()?
+    std::ostringstream ptype;
     DtbMessagePropsMessagePropsInfo instance =
            (DtbMessagePropsMessagePropsInfo)clientData;
     Tt_message msg = messageProps2Msg( instance );
@@ -1941,10 +1934,9 @@ genObserver(
     ptype << "\t\t\t) => start opnum=1;\n";
     ptype << "};\n";
     // XXX contexts
-    // XtVaSetValues( instance->messageText, XmNvalue, ptype.str(), 0 );
-    _DtOpen( instance->messageFooterLabel, (void *)ptype.str(),
-            ptype.pcount(), "ptype" );
-    delete ptype.str();
+    // XtVaSetValues( instance->messageText, XmNvalue, ptype.str().c_str(), 0 );
+    _DtOpen( instance->messageFooterLabel, (void *)ptype.str().c_str(),
+            ptype.str().size(), "ptype" );
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
 }
 
index 4ae300ccb708ed13e3c9eb00d1aec722cd7403d6..e49d8f2a825478a30378c7a19a91e7aaf45f41f7 100644 (file)
  *** Add include files, types, macros, externs, and user functions here.
  ***/
 
-#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
-#include <strstream>
-#else
-#include <strstream.h>
-#endif
+#include <sstream>
 
 #include <Tt/tttk.h>
 #include "DtTt.h"
@@ -372,12 +368,11 @@ DtTtPatternWidgetCreate(
                }
        }
 
-       std::ostrstream labelStream;
+       std::ostringstream labelStream;
        labelStream << "Tt_pattern " << (void *)pat << ends;
        XtVaSetValues( instance->patternProps,
-                      XmNtitle, labelStream.str(),
+                      XmNtitle, labelStream.str().c_str(),
                       NULL );
-       delete labelStream.str();
 
        _DtTtPatternWidgetUpdate( instance, pat );
 
index fa3d78bdafe240b79997519a3adf2b7e1a799a59..a94d3dd8d6fa180273a5fdb2bc0c55cae4f2ee8c 100644 (file)
 
 #include <Xm/TextF.h>
 
-#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <fstream>
-#include <strstream>
-#else
-#include <fstream.h>
-#include <strstream.h>
-#endif
+#include <sstream>
 
 #include "DtTt.h"
 
index 27f0fb22ec00f860fe9b1e22b9192e17ea02b9fa..906242cd733b0a75cd00f71ecfb259c0f41ca2c1 100644 (file)
 
 #include <Xm/TextF.h>
 
-#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <fstream>
-#else
-#include <fstream.h>
-#endif
 
 #include "DtTt.h"
 
index c6521bd242e2d00c11c3cc7d8b356fd9addf34a5..9ef1c53ffaca339dc2eeda137f174bf0cef1c3fa 100644 (file)
 
 #include <stdio.h>
 
-#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
-#include <strstream>
-#else
-#include <strstream.h>
-#endif
+#include <sstream>
 
 #include <Xm/TextF.h>
 #include <Xm/List.h>
@@ -214,12 +210,11 @@ _DtTtChooserSet(
     XmTextFieldSetString( instance->chooserText, 0 );
     XtVaSetValues( instance->chooser, XmNtitle, title, NULL );
 
-    std::ostrstream valuesStream;
+    std::ostringstream valuesStream;
     valuesStream << itemCount << " " << valuesLabel;
     if (itemCount != 1) valuesStream << "s";
     valuesStream << ends;
-    DtTtSetLabel( instance->chooserList_label, valuesStream.str() );
-    delete valuesStream.str();
+    DtTtSetLabel( instance->chooserList_label, valuesStream.str().c_str() );
 
     // Remember dialog mode, entity
     XtVaSetValues( instance->chooserOkButton, XmNuserData, choice, NULL );
@@ -315,14 +310,13 @@ choiceSelected(
            break;
     }
     void *entity = DtTtNth( type, info->item_position - 1 );
-    std::ostrstream entityName;
+    std::ostringstream entityName;
     if (isString) {
            entityName << (char *)entity << ends;
     } else {
            entityName << entity << ends;
     }
-    XmTextFieldSetString( instance->chooserText, entityName.str() );
-    delete entityName.str();
+    XmTextFieldSetString( instance->chooserText, const_cast<char *>(entityName.str().c_str()) );
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
 }
 
index fc1495b1b2a22479acab40607ebc5bc48a54abee..e80312aab4c00851d781b4dba286747d1937f4c7 100644 (file)
 #include <sys/stat.h>
 #include <time.h>
 
-#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <iostream>
-#include <strstream>
+#include <sstream>
 #include <fstream>
-#else
-#include <iostream.h>
-#include <strstream.h>
-#include <fstream.h>
-#endif
 
 #include <Dt/Term.h>
 #include <Tt/tt_c.h>
@@ -95,7 +89,7 @@ char *                snoopFile               = 0;
 Boolean                unlinkSnoopFile         = True;
 char *         traceFile               = 0;
 Boolean                unlinkTraceFile         = True;
-char *         traceScript             = 0;
+std::string    traceScript;
 int            globalTimeout           = 20000;
 unsigned int   globalSaveLines         = 5000;
 const char *   globalVersionString     = "1.0";
@@ -112,7 +106,7 @@ unsigned int        snoopedArgsCount        = 0;
 char *         optTraceScript          = 0;
 String         apiTracerArgv[ 10 ];
 String         snooperArgv[ 10 ];
-std::ostrstream        tttraceCmd;
+std::ostringstream     tttraceCmd;
 std::ofstream  snoopStream;
 
 // Xt squats on -tf ?! XXX
@@ -188,7 +182,7 @@ signalHandler(
                if ((child > 0) && WIFEXITED( status )) {
                        snoopStream << endl << endl << "SIGCHLD: WEXITSTATUS=="
                                << WEXITSTATUS(status) << ": "
-                               << tttraceCmd.str() << endl << endl;
+                               << tttraceCmd.str().c_str() << endl << endl;
                }
                break;
            case SIGCONT:
@@ -523,7 +517,7 @@ main(int argc, char **argv)
            }
     }
     apiTracerArgv[ 0 ] = "tail";
-    apiTracerArgv[ 1 ] = "+0f";
+    apiTracerArgv[ 1 ] = "-f";
     apiTracerArgv[ 2 ] = traceFile;
     if (snoopFile == 0) {
            //
@@ -536,7 +530,7 @@ main(int argc, char **argv)
            }
     }
     snooperArgv[ 0 ] = "tail";
-    snooperArgv[ 1 ] = "+0f";
+    snooperArgv[ 1 ] = "-f";
     snooperArgv[ 2 ] = snoopFile;
 
     if (optind < argc) {
@@ -666,11 +660,11 @@ main(int argc, char **argv)
     installSignalHandler();
     if (snoopedArgsCount > 0) {
            DtTtSetLabel( dtb_ttsnoop_ttsnoop_win.ttsnoopWin_label,
-                         tttraceCmd.str() );
+                         tttraceCmd.str().c_str() );
     }
     Tt_status status;
     snoopStream.open( snoopFile, ios::app );
-    std::ostrstream envStr;
+    std::ostringstream envStr;
     envStr << "TT_TRACE_SCRIPT=> ";
     envStr << traceFile << ends;
     traceScript = envStr.str();
index ce7305275722ef58ee0ee4db6f4bae61fe08d3d9..0ee8414ad5cc55ebd7c0e08890e016a4fd8c0e3f 100644 (file)
 
 #include <unistd.h>
 
-#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <fstream>
-#include <strstream>
-#else
-#include <fstream.h>
-#include <strstream.h>
-#endif
+#include <sstream>
 
 #include "apiTracer_ui.h"
 #include "DtTt.h"
@@ -52,7 +47,7 @@ extern "C" { const char *_tt_lib_version; };
 
 extern std::ofstream   snoopStream;
 extern unsigned int    globalSaveLines;
-extern char *          traceScript;
+extern std::string     traceScript;
 extern const char *    globalVersionString;
 extern Tt_pattern      snoopPat;
 extern Boolean         snoopPatIsRegistered;
@@ -93,13 +88,12 @@ fork_tttrace(
     
     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
     DtbTtsnoopTtsnoopWinInfo instance = (DtbTtsnoopTtsnoopWinInfo)clientData;
-    std::ostrstream tttraceCmd;
+    std::ostringstream tttraceCmd;
     tttraceCmd << "unset TT_TRACE_SCRIPT; dtterm -sb -sl ";
     tttraceCmd << globalSaveLines;
     tttraceCmd << " -title tttrace -geometry 120x24 -e tttrace &";
     DtTtSetLabel( instance->ttsnoopWin_label, "tttrace" );
-    system( tttraceCmd.str() );
-    delete tttraceCmd.str();
+    system( tttraceCmd.str().c_str() );
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
 }
 
@@ -124,7 +118,7 @@ turnOnTracing(
     DtTtSetLabel( instance->cancelButton, "Stop" );
     XtManageChild(instance->tracer_shellform);
     tt_trace_control( 0 );
-    putenv( traceScript );
+    putenv( const_cast<char *>(traceScript.c_str()) );
     tt_trace_control( 1 );
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
 }
@@ -659,15 +653,14 @@ libcPause(
     
     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
     DtbTtsnoopTtsnoopWinInfo instance = (DtbTtsnoopTtsnoopWinInfo)clientData;
-    std::ostrstream advice;
+    std::ostringstream advice;
     advice << "pause(); /* kill -CONT " << getpid() << " */";
-    DtTtSetLabel( instance->ttsnoopWin_label, advice.str() );
-    delete advice.str();
+    DtTtSetLabel( instance->ttsnoopWin_label, advice.str().c_str() );
 
     //
     // run "(if dterror.ds blah blah; then kill -CONT pid; fi)&"
     //
-    std::ostrstream script;
+    std::ostringstream script;
     script << "(if dterror.ds ";
     // arg 1: text
     script << "\"kill -CONT " << getpid() << "\" ";
@@ -677,8 +670,7 @@ libcPause(
     script << "CONT; then ";
     // After confirmation, invoke kill(1)
     script << "kill -CONT " << getpid() << "; fi)&";
-    system( script.str() );
-    delete script.str();
+    system( script.str().c_str() );
 
     // Run the event loop a few laps, to paint the footer
     tttk_block_while( XtWidgetToApplicationContext( widget ), 0, 50 );
@@ -1343,10 +1335,9 @@ toggleSnooping(
     if (! tt_is_err( status )) {
            snoopPatIsRegistered = ! snoopPatIsRegistered;
     }
-    std::ostrstream stream;
+    std::ostringstream stream;
     stream << func << (void *)snoopPat << ")" << ends;
-    DtTtSetLabel( instance->ttsnoopWin_label, stream.str(), status );
-    delete stream.str();
+    DtTtSetLabel( instance->ttsnoopWin_label, stream.str().c_str(), status );
     DtTtSetLabel( instance->menubar_Snoop_item_Snoop_menu_items.Off_item,
                  snoopPatIsRegistered ? "Off" : "On" );
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
index 2340cf1f1defbd904c22d37b59d9a17a7ce2374d..164da2f5fafa4e25506e079183f7289b1a24a5a8 100644 (file)
@@ -34,7 +34,7 @@
 #include       <stdio.h>
 #include       <Xm/Xm.h>
 #include       <X11/Shell.h>
-#define INIT          register char *sp = instring;
+#define INIT          char *sp = instring;
 #define GETC()        (*sp++)
 #define PEEKC()       (*sp)
 #define UNGETC(c)     (--sp)
@@ -586,12 +586,13 @@ parse_args(List *l, int argc, char **argv)
        return(1);
 }
 
-usage()
+int usage(void)
 {
        fprintf(stderr, "%s", catgets(dtcatd, 1, 25, "usage:  dttypes [-help]\n\tdttypes [-type filename]\n\tdttypes [-db database] [-w [rec_name regexp] [fld_name regexp]\n\t\t\t[fld_value regexp]]\n\t\t[-l [rec_name] [rec_info] [fld_name regexp] [fld_value]]\n"));
        exit(1);
 }
 
+int
 main(int argc, char **argv)
 {
        List    l;