else
{
/* not fully specified, check each component of path for ourself */
- strcpy(patbuf, getenv("PATH"));
+ snprintf(patbuf, sizeof(patbuf), "%s", getenv("PATH"));
path = patbuf;
cp = path;
{
unsigned char etype, wheredef;
char *mb_content, *ssi, id[32];
-static M_WCHAR empty = M_EOS;
+static M_WCHAR empty[1];
char *leftright;
+empty[0] = M_EOS;
+
/* handle graphic specific code */
/* initialize some stuff first:
gentity);
}
}
- if (!f_content) f_content = ∅
+ if (!f_content) f_content = empty;
mb_content = MakeMByteString(f_content);
sprintf(id, "%s%d", sdlReservedName, NextId());
char *item_id;
char label_id[SDLNAMESIZ+10];
int listtype;
-char *type;
+char *type = NULL;
char *loose;
char *first;
LOGICAL isBullet, isLoose, isFirst;
switch (lastlist->lastlist->order)
{
case UROMAN:
- strcpy(orderString, ROMAN100[count / 100]);
- strcat(orderString, ROMAN10[(count / 10) % 10]);
- strcat(orderString, ROMAN0[count % 10]);
+ snprintf(orderString, sizeof(orderString), "%s%s%s",
+ ROMAN100[count / 100],
+ ROMAN10[(count / 10) % 10],
+ ROMAN0[count % 10]);
type = romanString;
break;
case UALPHA:
type = arabicString;
break;
case LROMAN:
- strcpy(orderString, roman100[count / 100]);
- strcat(orderString, roman10[(count / 10) % 10]);
- strcat(orderString, roman0[count % 10]);
+ snprintf(orderString, sizeof(orderString), "%s%s%s",
+ roman100[count / 100],
+ roman10[(count / 10) % 10],
+ roman0[count % 10]);
type = romanString;
break;
case LALPHA:
"%s%s-%s\">\n<P>%s%c",
first,
loose,
- type,
+ type ? type : "",
orderString,
lastlist->lastlist->punct == DOTPUNCT ? '.' : ')' );
if (id)
char myPlatform[_DtPLATFORM_MAX_LEN+1];
char myLocale[256]; /* arbitrarily large */
char *locale;
-char *lang;
-char *charset;
+char *lang = NULL;
+char *charset = NULL;
int execVer;
int compVer;
int isStd;
-strcpy(myLocale, pLang);
if (*pCharset)
{
- strcat(myLocale, ".");
- strcat(myLocale, pCharset);
+ snprintf(myLocale, sizeof(myLocale), "%s.%s", pLang, pCharset);
+ }
+else
+ {
+ snprintf(myLocale, sizeof(myLocale), "%s", pLang);
}
if ((_DtLcxOpenAllDbs(&myDb) != 0) ||
if (*lang)
{
strcpy(pLang, lang);
- mb_free(&lang);
}
else
strcpy(pLang, cString);
if (*charset)
{
strcpy(pCharset, charset);
- mb_free(&charset);
- free(charset);
}
else
strcpy(pCharset, isoString);
}
+ mb_free(&lang);
+ mb_free(&charset);
+ free(charset);
+
+
_DtLcxCloseDb(&myDb);
}
if (dotPtr)
*dotPtr = 0;
-strcpy(stdLang, locale);
+snprintf(stdLang, sizeof(stdLang), "%s", locale);
if (charset)
- strcpy(stdCharset, charset);
+ snprintf(stdCharset, sizeof(stdCharset), "%s", charset);
SetStdLocale(stdLang, stdCharset);
if (*stdCharset)
sprintf(snb_id, "%s%d", sdlReservedName, NextId());
{
-static M_WCHAR empty = M_EOS;
+static M_WCHAR empty[1];
char *mb_content;
+empty[0] = M_EOS;
+
-if (!f_content) f_content = ∅
+if (!f_content) f_content = empty;
mb_content = MakeMByteString(f_content);
AddToSNB(snb_id, mb_content);
fputs("CLASS=\"ICON\" SSI=\"NCW-ICON\">", outfile);
fputs("</REFITEM>\n</SNREF></HEAD>\n", outfile);
AddToSNB(id, icon);
- m_free(icon, "icon name");
}
+m_free(icon, "icon name");
}
else
try = mb_realloc(try, tryleng);
}
- strcpy(try, thispath->directory);
- strcpy(try + pathleng, mb_inputname);
+ sprintf(try, "%s%s", thispath->directory, mb_inputname);
tossfile = open(try, O_RDONLY);
if (tossfile >= 0) break;
thispath = thispath->next;