Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157529493
D55794.id174250.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D55794.id174250.diff
View Options
diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c
--- a/usr.bin/m4/eval.c
+++ b/usr.bin/m4/eval.c
@@ -303,7 +303,7 @@
case PASTTYPE:
if (argc > 2)
if (!dopaste(argv[2]))
- err(1, "%s at line %lu: paste(%s)",
+ err(1, "%s at line %lu: paste(%s)",
CURRENT_NAME, CURRENT_LINE, argv[2]);
break;
@@ -359,7 +359,7 @@
errstr, argv[2]);
if (n != 0) {
dodiv(n);
- break;
+ break;
}
}
active = stdout;
@@ -912,11 +912,11 @@
* map every character of s1 that is specified in from
* into s3 and replace in s. (source s1 remains untouched)
*
- * This is derived from the a standard implementation of map(s,from,to)
- * function of ICON language. Within mapvec, we replace every character
- * of "from" with the corresponding character in "to".
- * If "to" is shorter than "from", than the corresponding entries are null,
- * which means that those characters disappear altogether.
+ * This is derived from the a standard implementation of map(s,from,to)
+ * function of ICON language. Within mapvec, we replace every character
+ * of "from" with the corresponding character in "to".
+ * If "to" is shorter than "from", than the corresponding entries are null,
+ * which means that those characters disappear altogether.
*/
static void
map(char *dest, const char *src, const char *from, const char *to)
@@ -1006,7 +1006,7 @@
if (src[1] == '-' && src[2]) {
unsigned char i;
if ((unsigned char)src[0] <= (unsigned char)src[2]) {
- for (i = (unsigned char)src[0];
+ for (i = (unsigned char)src[0];
i <= (unsigned char)src[2]; i++) {
*p++ = i;
if (p == end) {
@@ -1015,7 +1015,7 @@
}
}
} else {
- for (i = (unsigned char)src[0];
+ for (i = (unsigned char)src[0];
i >= (unsigned char)src[2]; i--) {
*p++ = i;
if (p == end) {
diff --git a/usr.bin/m4/expr.c b/usr.bin/m4/expr.c
--- a/usr.bin/m4/expr.c
+++ b/usr.bin/m4/expr.c
@@ -32,7 +32,7 @@
yyerror(const char *msg)
{
fprintf(stderr, "m4: %s in expr %s\n", msg, copy_toeval);
- return(0);
+ return 0;
}
int
diff --git a/usr.bin/m4/look.c b/usr.bin/m4/look.c
--- a/usr.bin/m4/look.c
+++ b/usr.bin/m4/look.c
@@ -137,8 +137,8 @@
create_entry(const char *name)
{
const char *end = NULL;
- unsigned int i;
ndptr n;
+ unsigned int i;
i = ohash_qlookupi(¯os, name, &end);
n = ohash_find(¯os, i);
@@ -156,6 +156,7 @@
macro_define(const char *name, const char *defn)
{
ndptr n = create_entry(name);
+
if (n->d != NULL) {
if (n->d->defn != null)
free_definition(n->d->defn);
@@ -183,6 +184,7 @@
macro_undefine(const char *name)
{
ndptr n = lookup(name);
+
if (n != NULL) {
struct macro_definition *r, *r2;
@@ -295,21 +297,21 @@
kept_capacity *= 2;
else
kept_capacity = 50;
- kept = xreallocarray(kept, kept_capacity,
- sizeof(char *), "Out of memory while saving %d strings\n",
+ kept = xreallocarray(kept, kept_capacity,
+ sizeof(char *), "Out of memory while saving %d strings\n",
kept_capacity);
}
kept[kept_size++] = ptr;
}
static int
-string_in_use(const char *ptr)
+string_in_use(const char *ptr)
{
int i;
- for (i = 0; i <= sp; i++) {
+
+ for (i = 0; i <= sp; i++)
if (sstack[i] == STORAGE_MACRO && mstack[i].sstr == ptr)
return 1;
- }
return 0;
}
@@ -324,7 +326,7 @@
if (!string_in_use(kept[i])) {
kept_size--;
free(kept[i]);
- if (i != kept_size)
+ if (i != kept_size)
kept[i] = kept[kept_size];
i--;
}
@@ -336,4 +338,3 @@
else
free(ptr);
}
-
diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c
--- a/usr.bin/m4/main.c
+++ b/usr.bin/m4/main.c
@@ -86,7 +86,7 @@
FILE *active; /* active output file pointer */
int ilevel = 0; /* input file stack pointer */
int oindex = 0; /* diversion index.. */
-const char *null = ""; /* as it says.. just a null.. */
+const char *null = ""; /* as it says.. just a null.. */
char **m4wraps = NULL; /* m4wraps array. */
int maxwraps = 0; /* size of m4wraps array */
int wrapindex = 0; /* current offset in m4wraps */
@@ -387,8 +387,7 @@
CHRSAVE(l);
}
}
- }
- while (nlpar != 0);
+ } while (nlpar != 0);
} else if (sp < 0 && LOOK_AHEAD(t, scommt)) {
reallyoutputstr(scommt);
diff --git a/usr.bin/m4/mdef.h b/usr.bin/m4/mdef.h
--- a/usr.bin/m4/mdef.h
+++ b/usr.bin/m4/mdef.h
@@ -204,7 +204,7 @@
mstack[sp].sstr = macro_getdef(p)->defn;\
sstack[sp] = STORAGE_MACRO; \
} while (0)
-
+
/*
* . .
diff --git a/usr.bin/m4/misc.c b/usr.bin/m4/misc.c
--- a/usr.bin/m4/misc.c
+++ b/usr.bin/m4/misc.c
@@ -135,8 +135,7 @@
do {
pushback(digits[num % base]);
printed++;
- }
- while ((num /= base) > 0);
+ } while ((num /= base) > 0);
while (printed++ < d)
pushback('0');
@@ -153,8 +152,7 @@
{
do {
pushback(n % 10 + '0');
- }
- while ((n /= 10) > 0);
+ } while ((n /= 10) > 0);
}
void
@@ -186,9 +184,9 @@
memcpy(newstrspace, strspace, strsize/2);
for (i = 0; i <= sp; i++)
if (sstack[i] == STORAGE_STRSPACE)
- mstack[i].sstr = (mstack[i].sstr - strspace)
- + newstrspace;
- ep = (ep-strspace) + newstrspace;
+ mstack[i].sstr = (mstack[i].sstr - strspace) +
+ newstrspace;
+ ep = (ep - strspace) + newstrspace;
free(strspace);
strspace = newstrspace;
endest = strspace + strsize;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 23, 11:36 AM (5 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33445707
Default Alt Text
D55794.id174250.diff (5 KB)
Attached To
Mode
D55794: m4: Misc style fixes
Attached
Detach File
Event Timeline
Log In to Comment