#include "str.h"
#include "exec.h"
#include "internal.h"
+#include <string.h>
static lvar_t *lvarp;
static int lvarn, llvari, flvari;
}
c = '\000';
for (s1 = s; *s1; s1++)
- if (*s1 == '>' && *(s1 + 1) && *(s1 + 1) == '>')
+ if (strncmp(s1, ">>", 2) == 0)
break;
if (!*s1)
return;
#include "dot2l.h"
#include "leftyio.h"
#include "triefa.c"
+#include <string.h>
static int syntax_errors;
static int lexer_fd;
/* get a nonempty lex buffer */
do {
- if ((lexptr == NULL) || (lexptr[0] == '\0'))
+ if ((lexptr == NULL) || strcmp(lexptr, "") == 0)
if ((lexptr = lex_gets (0)) == NULL) {
if (in_comment)
fprintf (
return EOF;
}
lexptr = skip_wscomments (lexptr);
- } while (lexptr[0] == '\0');
+ } while (strcmp(lexptr, "") == 0);
/* scan quoted strings */
if (lexptr[0] == '\"') {
char *q;
q = lexbuf;
- if (!p || *p == '\0')
+ if (!p || strcmp(p, "") == 0)
return NULL;
while (isalnum (*p) || (*p == '_') || (!isascii (*p)))
*q++ = *p++;
}
*q++ = *p++;
}
- if (*p == '\0')
+ if (strcmp(p, "") == 0)
yyerror ("string ran past end of line", "");
else
p++;
#include "str.h"
#include "exec.h"
#include "internal.h"
+#include <string.h>
static lvar_t *lvarp;
static int lvarn, llvari, flvari;
}
c = '\000';
for (s1 = s; *s1; s1++)
- if (*s1 == '>' && *(s1 + 1) && *(s1 + 1) == '>')
+ if (strncmp(s1, ">>", 2) == 0)
break;
if (!*s1)
return;
#include "g.h"
#include "gcommon.h"
#include "mem.h"
+#include <string.h>
Gwidget_t *Gwidgets;
int Gwidgetn;
return -1;
}
widget = &Gwidgets[wi];
- if (string[0] == '\000')
+ if (strcmp(string, "") == 0)
return 0;
n = unpackstring (string);
if (!justs[0] || !justs[1])
Gerr (POS, G_ERRNOTACANVAS, wi);
return -1;
}
- if (string[0] == '\000') {
+ if (strcmp(string, "") == 0) {
gsp->x = gsp->y = 0.0;
return 0;
}
#include "gmap2l.h"
#endif
#include "internal.h"
+#include <string.h>
#ifndef FEATURE_MS
#include <sys/time.h>
#endif
qflag = (argc == 3) ? FALSE : TRUE;
sp = Tgetstring (so);
s = Tgetstring (fo);
- if (s[0] == '\\' && s[1] == 'n')
+ if (strncmp(s, "\\n", 2) == 0)
fc = '\n';
else
fc = s[0];
Tobj co;
if ((fn = Tgetstring (argv[0].o))) {
- if (fn[0] == '-' && fn[1] == '\000')
+ if (strcmp(fn, "-") == 0)
fp = stdin;
else {
fp = NULL;
#include "common.h"
#include "lex.h"
+#include <string.h>
int Ltok;
char Lstrtok[MAXTOKEN];
static int sgetc (void) {
if (seeneof)
return EOF;
- if (*ucp == '\000') {
+ if (strcmp(ucp, "") == 0) {
if (lsrc == CHARSRC) {
seeneof = TRUE;
linenum++;
#include "mem.h"
#include <fcntl.h>
#include <signal.h>
+#include <string.h>
#include <sys/wait.h>
#ifndef HAVE_TERMIOS_H
#include <termio.h>
case 0:
close (p1[0]), close (p2[1]);
for (s = cmd; *s; s++)
- if (*s == '%' && *(s + 1) && *(s + 1) == 'd') {
+ if (strncmp(s, "%d", 2) == 0) {
sprintf (cmd2, cmd, p2[0], p1[1]);
execl (shell, shbname, "-c", cmd2, NULL);
panic2 (POS, "pipeopen", "child cannot exec: %s\n", cmd2);
#include "common.h"
#include "g.h"
#include "gcommon.h"
+#include <string.h>
#define WCU widget->u.c
#define WINDOW widget->u.c->window
GdkFont *font;
int fi, n, i;
- if (name[0] == '\000')
+ if (strcmp(name, "") == 0)
return Gfontp[0].font;
sprintf(&Gbufp[0], name, size);
#include "g.h"
#include "gcommon.h"
#include "mem.h"
+#include <string.h>
#define WCU widget->u.c
#define WINDOW widget->u.c->window
HFONT font;
int fi;
- if (name[0] == '\000')
+ if (strcmp(name, "") == 0)
return Gfontp[0].font;
sprintf (&Gbufp[0], name, size);
#include "g.h"
#include "gcommon.h"
#include "mem.h"
+#include <string.h>
#define WPU widget->u.p
#define WINDOW widget->u.p->window
HFONT font;
int fi;
- if (name[0] == '\000')
+ if (strcmp(name, "") == 0)
return Gfontp[0].font;
sprintf (&Gbufp[0], name, size);
#include "common.h"
#include "g.h"
#include "gcommon.h"
+#include <string.h>
#define WBU widget->u.b
return -1;
}
}
- if (!s || s[0] == '\000') {
+ if (!s || strcmp(s, "") == 0) {
ADD2ARGS (XtNwidth, ps.x);
ADD2ARGS (XtNheight, ps.y);
} else {
#ifdef FEATURE_GMAP
#include <gmap.h>
#endif
+#include <string.h>
#define WCU widget->u.c
#define WINDOW widget->u.c->window
XFontStruct *font;
int fi, n, i;
- if (name[0] == '\000')
+ if (strcmp(name, "") == 0)
return Gfontp[0].font;
sprintf (&Gbufp[0], name, size);
#include "g.h"
#include "gcommon.h"
#include "mem.h"
+#include <string.h>
#define PSDPI 300.0
#define PSMAXPIXW (8.0 * PSDPI)
static char *findfont (char *name) {
char *font;
- if (name[0] == '\000' || strcmp (name, "default") == 0)
+ if (strcmp(name, "") == 0 || strcmp (name, "default") == 0)
font = "Times-Roman";
else
font = name;