r = NULL;
for (p = s; *p; p++) { /* Get the two elements */
if (*p == '[') {
- bc++;
+ bc++; /* Bracket counter */
if (bc == 1 && !q) q = p+1;
} else if (*p == ']') {
bc--;
if (bc == 0 && q) *p = NUL;
- } else if (bc == 1) { /* Check for separator */
- s2 = ckstrchr(sep,*p);
+ } else if (bc == 1) { /* If within brackers */
+ s2 = ckstrchr(sep,*p); /* Check for separator */
if (s2) {
debug(F000,"boundspair *s2","",*s2);
if (c) {
makestr(&tmp,NULL);
return(-1);
}
- c = *s2;
+ c = *s2; /* Separator character */
*p = NUL;
r = p+1;
}
makestr(&tmp,NULL);
return(-1);
}
+ if (!q) q = "";
if (!*q) q = "-1";
- if (!r) r = "-1";
+ if (!r) r = "";
+ if (!*r) r = "-1";
e[0] = q;
e[1] = r;
#ifdef __FreeBSD__
makestr(&(optlist[noptlist++]),"__FreeBSD__");
#endif /* __FreeBSD__ */
+#ifdef FREEBSD4
+ makestr(&(optlist[noptlist++]),"FREEBSD4");
+#endif /* FREEBSD4 */
+#ifdef FREEBSD8
+ makestr(&(optlist[noptlist++]),"FREEBSD8");
+#endif /* FREEBSD8 */
+#ifdef FREEBSD9
+ makestr(&(optlist[noptlist++]),"FREEBSD9");
+#endif /* FREEBSD9 */
#ifdef __linux__
makestr(&(optlist[noptlist++]),"__linux__");
#endif /* __linux__ */
flag = 1;
#endif /* CK_XYZ */
+#ifdef NOFLOAT
+ printf(" No floating-point arithmetic\n");
+ if (++lines > cmd_rows - 3) { if (!askmore()) return(1); else lines = 0; }
+ flag = 1;
+ printf(" No S-Expressions (LISP interpreter)\n");
+ if (++lines > cmd_rows - 3) { if (!askmore()) return(1); else lines = 0; }
+ flag = 1;
+#else
+#ifdef NOSEXP
+ printf(" No S-Expressions (LISP interpreter)\n");
+ if (++lines > cmd_rows - 3) { if (!askmore()) return(1); else lines = 0; }
+ flag = 1;
+#endif /* NOSEXP */
+#endif /* NOFLOAT */
+
#ifdef NOTLOG
printf(" No transaction log\n");
if (++lines > cmd_rows - 3) { if (!askmore()) return(1); else lines = 0; }
" endian",
NULL
);
- if (!prtopt(&lines,line)) return(0);
- if (!prtopt(&lines,"")) return(0); /* Start a new section */
- sprintf(line,"sizeofs: int=%d",sizeof(int)); /* SAFE */
- if (!prtopt(&lines,line)) return(0);
- sprintf(line,"long=%d",sizeof(long)); /* SAFE */
- if (!prtopt(&lines,line)) return(0);
+ {
+/* Whether to use %d or %ld with sizeof is a portability issue, so... */
+ int size = 0;
-#ifdef COMMENT
-#ifdef CK_LONGLONG
- sprintf(line,"long long=%d",sizeof(long long)); /* SAFE */
- if (!prtopt(&lines,line)) return(0);
-#endif /* CK_LONGLONG */
-#endif /* COMMENT */
+ if (!prtopt(&lines,line)) return(0);
+ if (!prtopt(&lines,"")) return(0); /* Start a new section */
+
+ size = (int)sizeof(int);
+ sprintf(line,"sizeofs: int=%d",size); /* SAFE */
+ if (!prtopt(&lines,line)) return(0);
+
+ size = (int)sizeof(long);
+ sprintf(line,"long=%d",size); /* SAFE */
+ if (!prtopt(&lines,line)) return(0);
#ifndef OS2
- /* Windows doesn't have off_t */
- sprintf(line,"off_t=%d",sizeof(off_t)); /* SAFE */
- if (!prtopt(&lines,line)) return(0);
+ /* Windows doesn't have off_t */
+ size = (int)sizeof(off_t);
+ sprintf(line,"off_t=%d",size); /* SAFE */
+ if (!prtopt(&lines,line)) return(0);
#endif /* OS2 */
- sprintf(line,"CK_OFF_T=%d",sizeof(CK_OFF_T)); /* SAFE */
- if (!prtopt(&lines,line)) return(0);
+ size = (int)sizeof(CK_OFF_T);
+ sprintf(line,"CK_OFF_T=%d",size); /* SAFE */
+ if (!prtopt(&lines,line)) return(0);
#ifdef BIGBUFOK
- sprintf(line,"size_t=%d",sizeof(size_t)); /* SAFE */
- if (!prtopt(&lines,line)) return(0);
+ size = (int)sizeof(size_t);
+ sprintf(line,"size_t=%d",size); /* SAFE */
+ if (!prtopt(&lines,line)) return(0);
#endif /* BIGBUFOK */
- sprintf(line,"short=%d",sizeof(short)); /* SAFE */
- if (!prtopt(&lines,line)) return(0);
- sprintf(line,"char=%d",sizeof(char)); /* SAFE */
- if (!prtopt(&lines,line)) return(0);
- sprintf(line,"char*=%d",sizeof(char *)); /* SAFE */
- if (!prtopt(&lines,line)) return(0);
- sprintf(line,"float=%d",sizeof(float)); /* SAFE */
- if (!prtopt(&lines,line)) return(0);
- sprintf(line,"double=%d",sizeof(double)); /* SAFE */
- if (!prtopt(&lines,line)) return(0);
+ size = (int)sizeof(short);
+ sprintf(line,"short=%d",size); /* SAFE */
+ if (!prtopt(&lines,line)) return(0);
+
+ size = (int)sizeof(char);
+ sprintf(line,"char=%d",size); /* SAFE */
+ if (!prtopt(&lines,line)) return(0);
+
+ size = (int)sizeof(char *);
+ sprintf(line,"char*=%d",size); /* SAFE */
+ if (!prtopt(&lines,line)) return(0);
+
+ size = (int)sizeof(float);
+ sprintf(line,"float=%d",size); /* SAFE */
+ if (!prtopt(&lines,line)) return(0);
+
+ size = (int)sizeof(double);
+ sprintf(line,"double=%d",size); /* SAFE */
+ if (!prtopt(&lines,line)) return(0);
+ }
+
#ifdef FNFLOAT
if (!prtopt(&lines,"")) return(0); /* Start a new section */
if (!prtopt(&lines,"floating-point:")) return(0);