static int lclerrors = 0;
# endif
-static int lastfileloclen = 10;
+static size_t lastfileloclen = 10;
static /*@only@*/ cstring lastmsg = cstring_undefined;
static int mcount = 0;
static /*@only@*/ cstring saveOneMessage = cstring_undefined;
void printError (FILE *stream, /*@only@*/ cstring sc)
{
int maxlen = context_getLineLen ();
- int nspaces = lastfileloclen + 5;
+ size_t nspaces = lastfileloclen + 5;
int nextlen = maxlen - nspaces;
- int len = cstring_length (sc);
+ size_t len = cstring_length (sc);
int indent = 0;
char *s = cstring_toCharsSafe (sc);
char *os = s;
DPRINTF (("Print error: [%s]", sc));
- if (len < (maxlen + nextlen) && (strchr (s, '\n') == NULL))
+ if (size_toInt (len) < (maxlen + nextlen) && (strchr (s, '\n') == NULL))
{
mstring_split (&s, &t, maxlen, &indent);
{
len = mstring_length (t);
- if (len < (maxlen - 3) && (strchr (t, '\n') == NULL)
- && len > (nextlen - 1))
+ if (size_toInt (len) < (maxlen - 3) && (strchr (t, '\n') == NULL)
+ && size_toInt (len) > (nextlen - 1))
{
fprintf (stream, " %s\n", t);
}
char *spaces = (char *) dmalloc ((nspaces + 1) * sizeof (*spaces));
int i;
- for (i = 0; i < nspaces; i++)
+ for (i = 0; i < size_toInt (nspaces); i++)
{
spaces[i] = ' ';
}
{
DPRINTF (("Here 1: [%s]", sc));
- if (len < (maxlen + maxlen - 1) && (strchr (s, '\n') != NULL))
+ if (size_toInt (len) < (maxlen + maxlen - 1) && (strchr (s, '\n') != NULL))
{
nspaces = ((maxlen + maxlen - 1) - len) / 2;
char *spaces = (char *) dmalloc ((nspaces + 1) * sizeof (*spaces));
int i;
- for (i = 0; i < nspaces; i++)
+ for (i = 0; i < size_toInt (nspaces); i++)
{
spaces[i] = ' ';
}
if (t != NULL)
{
char *spaces = (char *) dmalloc ((nspaces + 1) * sizeof (*spaces));
- int i;
+ size_t i;
for (i = 0; i < nspaces; i++)
{
fileloc_unparse (g_currentloc),
fileloc_unparseRaw (file, line),
s, errno));
- printCodePoint ();
+
+ /* printCodePoint (); no longer useful */
(void) fflush (stderr);
+
if (errno != 0)
{
perror ("Possible system error diagnostic: ");
}
+
(void) fflush (stderr);
printBugReport ();