diff options
author | Karl Berry <karl@freefriends.org> | 2010-03-28 18:14:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-03-28 18:14:06 +0000 |
commit | 20a73306c88f8fdb131482213e9b1b6a8c5e729b (patch) | |
tree | be5857d40602520beebe30c48e31306bbc0e9d17 /Build/source/texk/dvipsk/header.c | |
parent | 549a764cf19a1f244d773ab70965eadeef67d5a8 (diff) |
eliminate spaces before semicolons
git-svn-id: svn://tug.org/texlive/trunk@17592 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipsk/header.c')
-rw-r--r-- | Build/source/texk/dvipsk/header.c | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/Build/source/texk/dvipsk/header.c b/Build/source/texk/dvipsk/header.c index e915418ea7a..ee5214861b8 100644 --- a/Build/source/texk/dvipsk/header.c +++ b/Build/source/texk/dvipsk/header.c @@ -12,7 +12,7 @@ * headers down. */ #include "dvips.h" /* The copyright notice in that file is included too! */ -struct header_list *header_head ; +struct header_list *header_head; /* * The external declarations: */ @@ -31,25 +31,25 @@ add_name(const char *s, struct header_list **what) int add_name_general(const char *s, struct header_list **what, char *pre, char *post) { - struct header_list *p, *q ; + struct header_list *p, *q; - for (p = *what ; p != NULL; p = p->next) + for (p = *what; p != NULL; p = p->next) if (strcmp(p->name, s)==0) - return 0 ; + return 0; q = (struct header_list *)mymalloc((integer)(sizeof(struct header_list) - + strlen(s))) ; - q->Hname = infont ; - q->next = NULL ; - q->precode = pre ; - q->postcode = post ; - strcpy(q->name, s) ; + + strlen(s))); + q->Hname = infont; + q->next = NULL; + q->precode = pre; + q->postcode = post; + strcpy(q->name, s); if (*what == NULL) - *what = q ; + *what = q; else { - for (p = *what; p->next != NULL; p = p->next) ; - p->next = q ; + for (p = *what; p->next != NULL; p = p->next); + p->next = q; } - return 1 ; + return 1; } /* * This function checks the virtual memory usage of a header file. @@ -59,12 +59,12 @@ add_name_general(const char *s, struct header_list **what, char *pre, char *post void checkhmem(const char *s, char *pre, char *post) { - FILE *f ; + FILE *f; - f = search(headerpath, s, READBIN) ; + f = search(headerpath, s, READBIN); if (pre || post) { if (f==NULL) - f = search(figpath, s, READBIN) ; + f = search(figpath, s, READBIN); } if (f==0) { char *msg = concat ("! Couldn't find header file: ", s); @@ -73,37 +73,37 @@ checkhmem(const char *s, char *pre, char *post) msg = concat (msg, "\nAbsolute and ../relative paths are denied in -R2 mode."); } - error(msg) ; + error(msg); } else { - int len, i, j ; - long mem = -1 ; - char buf[1024] ; + int len, i, j; + long mem = -1; + char buf[1024]; - len = fread(buf, sizeof(char), 1024, f) ; + len = fread(buf, sizeof(char), 1024, f); for (i=0; i<len-20; i++) if (buf[i]=='%' && strncmp(buf+i, "%%VMusage:", 10)==0) { if (sscanf(buf+i+10, "%d %ld", &j, &mem) != 2) - mem = -1 ; - break ; + mem = -1; + break; } if (mem == -1) { - mem = 0 ; + mem = 0; while (len > 0) { - mem += len ; - len = fread(buf, sizeof(char), 1024, f) ; + mem += len; + len = fread(buf, sizeof(char), 1024, f); } } if (mem < 0) - mem = DNFONTCOST ; - (*close_file) (f) ; + mem = DNFONTCOST; + (*close_file) (f); #ifdef DEBUG if (dd(D_HEADER)) (void)fprintf(stderr, "Adding header file \"%s\" %ld\n", - s, mem) ; + s, mem); #endif - fontmem -= mem ; + fontmem -= mem; if (fontmem > 0) /* so we don't count it twice. */ - swmem -= mem ; + swmem -= mem; } } /* @@ -120,59 +120,59 @@ add_header(const char *s) int add_header_general(const char *s, char *pre, char *post) { - int r ; + int r; - r = add_name_general(s, &header_head, pre, post) ; + r = add_name_general(s, &header_head, pre, post); if (r) { if (headersready == 1) { - struct header_list *p = header_head ; + struct header_list *p = header_head; while (p) { - checkhmem(p->name, p->precode, p->postcode) ; - p = p->next ; + checkhmem(p->name, p->precode, p->postcode); + p = p->next; } - headersready = 2 ; + headersready = 2; } else if (headersready == 2) { - checkhmem(s, pre, post) ; + checkhmem(s, pre, post); } } - return r ; + return r; } /* * This routine runs down a list, returning each in order. */ -static struct header_list *CUR_head = NULL ; +static struct header_list *CUR_head = NULL; char * get_name(struct header_list **what) { if (what && *what) { - char *p = (*what)->name ; - infont = (*what)->Hname ; - CUR_head = *what ; - *what = (*what)->next ; - return p ; + char *p = (*what)->name; + infont = (*what)->Hname; + CUR_head = *what; + *what = (*what)->next; + return p; } else - return 0 ; + return 0; } /* * This routine actually sends the headers. */ void send_headers(void) { - struct header_list *p = header_head ; - char *q ; + struct header_list *p = header_head; + char *q; while (0 != (q=get_name(&p))) { #ifdef DEBUG if (dd(D_HEADER)) - (void)fprintf(stderr, "Sending header file \"%s\"\n", q) ; + (void)fprintf(stderr, "Sending header file \"%s\"\n", q); #endif #ifdef HPS if (HPS_FLAG) { - if (strcmp(q,"target.dct")==0) noprocset = 1 ; + if (strcmp(q,"target.dct")==0) noprocset = 1; } #endif - copyfile_general(q, CUR_head) ; + copyfile_general(q, CUR_head); } - infont = NULL ; + infont = NULL; } |