X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cde%2Fprograms%2Fdtpad%2FfileDlg.c;h=3ee3619aae0a6c7a36e2de2de075c16b6e356c26;hb=f0a6172d3fa3cf2c1b370e85fa135dbdfa0c7a56;hp=55a61c898cffad05043110f6ab172fbc26d75b6d;hpb=83b6996daa2c5ae22fc2b69093814cb08314954a;p=oweals%2Fcde.git diff --git a/cde/programs/dtpad/fileDlg.c b/cde/programs/dtpad/fileDlg.c index 55a61c89..3ee3619a 100644 --- a/cde/programs/dtpad/fileDlg.c +++ b/cde/programs/dtpad/fileDlg.c @@ -1,3 +1,25 @@ +/* + * 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 + */ /* $TOG: fileDlg.c /main/8 1999/09/15 15:15:56 mgreess $ */ /**********************************<+>************************************* *************************************************************************** @@ -160,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'; @@ -203,8 +225,8 @@ SetSaveAsDirAndFile(Editor *pPad) strcpy(dirbuf, pPad->fileStuff.pathDir); /* -----> make sure dir ends in '/' */ if (dirbuf[0] != (char )'\0') { - if (dirbuf[strlen(dirbuf) - 1] != (char)'/') - strcat(dirbuf, "/"); + if (strlen(dirbuf) && dirbuf[strlen(dirbuf) - 1] != (char)'/') + strcat(dirbuf, "/"); } else { getcwd(dirbuf, MAX_DIR_PATH_LEN - 16); strcat(dirbuf, "/"); @@ -241,7 +263,7 @@ CreateNewLineToggles( ToggleWidgets *pToggleWidgets) { Arg args[20]; - register int n; + int n; XmString label_string; /* -----> Create Radio Box */ @@ -299,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; @@ -541,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; @@ -596,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; @@ -879,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;