projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop register storage class
[mmh]
/
sbr
/
fmt_compile.c
diff --git
a/sbr/fmt_compile.c
b/sbr/fmt_compile.c
index
d299efc
..
9e08ab4
100644
(file)
--- a/
sbr/fmt_compile.c
+++ b/
sbr/fmt_compile.c
@@
-44,6
+44,7
@@
#include <h/fmt_scan.h>
#include <h/fmt_compile.h>
#include <ctype.h>
#include <h/fmt_scan.h>
#include <h/fmt_compile.h>
#include <ctype.h>
+#include <sysexits.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
@@
-261,9
+262,9
@@
static char *do_if(char *);
static struct ftable *
lookup(char *name)
{
static struct ftable *
lookup(char *name)
{
- register struct ftable *t = functable;
- register char *nm;
- register char c = *name;
+ struct ftable *t = functable;
+ char *nm;
+ char c = *name;
while ((nm = t->name)) {
if (*nm == c && strcmp(nm, name) == 0)
while ((nm = t->name)) {
if (*nm == c && strcmp(nm, name) == 0)
@@
-291,7
+292,7
@@
compile_error(char *str, char *cp)
advise(NULL, "\"%s\": format compile error - %s",
&usr_fstring[errpos-errctx], str);
advise(NULL, "\"%s\": format compile error - %s",
&usr_fstring[errpos-errctx], str);
- adios(NULL, "%*s", errctx+1, "^");
+ adios(EX_SOFTWARE, NULL, "%*s", errctx+1, "^");
}
/*
}
/*
@@
-302,7
+303,7
@@
compile_error(char *str, char *cp)
int
fmt_compile(char *fstring, struct format **fmt)
{
int
fmt_compile(char *fstring, struct format **fmt)
{
- register char *cp;
+ char *cp;
size_t i;
if (format_string)
size_t i;
if (format_string)
@@
-329,7
+330,7
@@
fmt_compile(char *fstring, struct format **fmt)
next_fp = formatvec = (struct format *)calloc((size_t) i,
sizeof(struct format));
if (next_fp == NULL)
next_fp = formatvec = (struct format *)calloc((size_t) i,
sizeof(struct format));
if (next_fp == NULL)
- adios(NULL, "unable to allocate format storage");
+ adios(EX_OSERR, NULL, "unable to allocate format storage");
ncomp = 0;
infunction = 0;
ncomp = 0;
infunction = 0;
@@
-347,8
+348,8
@@
fmt_compile(char *fstring, struct format **fmt)
static char *
compile(char *sp)
{
static char *
compile(char *sp)
{
- register char *cp = sp;
- register int c;
+ char *cp = sp;
+ int c;
for (;;) {
sp = cp;
for (;;) {
sp = cp;
@@
-408,11
+409,11
@@
compile(char *sp)
static char *
do_spec(char *sp)
{
static char *
do_spec(char *sp)
{
- register char *cp = sp;
- register int c;
- register int ljust = 0;
- register int wid = 0;
- register char fill = ' ';
+ char *cp = sp;
+ int c;
+ int ljust = 0;
+ int wid = 0;
+ char fill = ' ';
c = *cp++;
if (c == '-') {
c = *cp++;
if (c == '-') {
@@
-460,9
+461,9
@@
do_spec(char *sp)
static char *
do_name(char *sp, int preprocess)
{
static char *
do_name(char *sp, int preprocess)
{
- register char *cp = sp;
- register int c;
- register int i;
+ char *cp = sp;
+ int c;
+ int i;
static int primed = 0;
while (isalnum(c = *cp++) || c == '-' || c == '_')
static int primed = 0;
while (isalnum(c = *cp++) || c == '-' || c == '_')
@@
-519,10
+520,10
@@
do_name(char *sp, int preprocess)
static char *
do_func(char *sp)
{
static char *
do_func(char *sp)
{
- register char *cp = sp;
- register int c;
- register struct ftable *t;
- register int n;
+ char *cp = sp;
+ int c;
+ struct ftable *t;
+ int n;
int mflag; /* minus sign in NUM */
infunction++;
int mflag; /* minus sign in NUM */
infunction++;
@@
-616,8
+617,8
@@
do_func(char *sp)
static char *
do_expr(char *sp, int preprocess)
{
static char *
do_expr(char *sp, int preprocess)
{
- register char *cp = sp;
- register int c;
+ char *cp = sp;
+ int c;
if ((c = *cp++) == '{') {
cp = do_name(cp, preprocess);
if ((c = *cp++) == '{') {
cp = do_name(cp, preprocess);
@@
-647,7
+648,7
@@
do_expr(char *sp, int preprocess)
static char *
do_loop(char *sp)
{
static char *
do_loop(char *sp)
{
- register char *cp = sp;
+ char *cp = sp;
struct format *floop;
floop = next_fp;
struct format *floop;
floop = next_fp;
@@
-672,9
+673,9
@@
do_loop(char *sp)
static char *
do_if(char *sp)
{
static char *
do_if(char *sp)
{
- register char *cp = sp;
- register struct format *fexpr, *fif = (struct format *)NULL;
- register int c = '<';
+ char *cp = sp;
+ struct format *fexpr, *fif = (struct format *)NULL;
+ int c = '<';
for (;;) {
if (c == '<') { /* doing an IF */
for (;;) {
if (c == '<') { /* doing an IF */