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/makefont.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/makefont.c')
-rw-r--r-- | Build/source/texk/dvipsk/makefont.c | 164 |
1 files changed, 82 insertions, 82 deletions
diff --git a/Build/source/texk/dvipsk/makefont.c b/Build/source/texk/dvipsk/makefont.c index 1603562ea3d..80c9b816baa 100644 --- a/Build/source/texk/dvipsk/makefont.c +++ b/Build/source/texk/dvipsk/makefont.c @@ -46,7 +46,7 @@ mfjobout(char *font, double mag) strcpy(pkout+i,"%"); break; default: - sprintf(pkout+i, "%%%c", *p) ; + sprintf(pkout+i, "%%%c", *p); fprintf(stderr,"Unknown option %%%c in pk path\n",*p); } i += strlen(pkout+i); @@ -55,7 +55,7 @@ mfjobout(char *font, double mag) pkout[i++] = *p; } /* *p='\0'; Could some DOS person explain to me what this does? */ - pkout[i] = 0 ; + pkout[i] = 0; mfjobfile = fopen(mfjobname,"w"); if (mfjobfile == (FILE *)NULL) return; @@ -68,7 +68,7 @@ mfjobout(char *font, double mag) } fprintf(mfjobfile,"{font=%s; mag=%f;}\n",font,mag); (void)fprintf(stderr, - "Appending {font=%s; mag=%f;} to %s\n",font,mag,mfjobname) ; + "Appending {font=%s; mag=%f;} to %s\n",font,mag,mfjobname); } #endif /* @@ -77,93 +77,93 @@ mfjobout(char *font, double mag) static int magstep(register int n, register int bdpi) { - register float t ; - int neg = 0 ; + register float t; + int neg = 0; if (n < 0) { - neg = 1 ; - n = -n ; + neg = 1; + n = -n; } if (n & 1) { - n &= ~1 ; - t = 1.095445115 ; + n &= ~1; + t = 1.095445115; } else - t = 1.0 ; + t = 1.0; while (n > 8) { - n -= 8 ; - t = t * 2.0736 ; + n -= 8; + t = t * 2.0736; } while (n > 0) { - n -= 2 ; - t = t * 1.2 ; + n -= 2; + t = t * 1.2; } if (neg) - return((int)floor(0.5 + bdpi / t)) ; + return((int)floor(0.5 + bdpi / t)); else - return((int)floor(0.5 + bdpi * t)) ; + return((int)floor(0.5 + bdpi * t)); } #ifdef MAKEPKCMD -static char *defcommand = MAKEPKCMD " %n %d %b %m" ; +static char *defcommand = MAKEPKCMD " %n %d %b %m"; #else #ifdef OS2 -static char *doscommand = "command /c MakeTeXP %n %d %b %m" ; -static char *os2command = "MakeTeXP %n %d %b %m" ; +static char *doscommand = "command /c MakeTeXP %n %d %b %m"; +static char *os2command = "MakeTeXP %n %d %b %m"; #define defcommand ( _osmode==OS2_MODE ? os2command : doscommand ) #else #ifdef MSDOS -static char *defcommand = "command /c MakeTeXP %n %d %b %m" ; +static char *defcommand = "command /c MakeTeXP %n %d %b %m"; #else #ifdef VMCMS -static char *defcommand = "EXEC MakeTeXPK %n %d %b %m" ; +static char *defcommand = "EXEC MakeTeXPK %n %d %b %m"; #else #ifdef ATARIST -static char *defcommand = "maketexp %n %d %b %m" ; +static char *defcommand = "maketexp %n %d %b %m"; #else -static char *defcommand = "MakeTeXPK %n %d %b %m" ; +static char *defcommand = "MakeTeXPK %n %d %b %m"; #endif #endif #endif #endif #endif -char *command = 0 ; +char *command = 0; /* * This routine tries to create a font by executing a command, and * then opening the font again if possible. */ -static char buf[125] ; +static char buf[125]; void makefont(char *name, int dpi, int bdpi) { - register char *p, *q ; - register int m, n ; - int modegiven = 0 ; + register char *p, *q; + register int m, n; + int modegiven = 0; #if defined MSDOS || defined OS2 || defined(ATARIST) double t; #endif if (command == 0) if (secure == 0 && (command=getenv("MAKETEXPK"))) - command = newstring(command) ; + command = newstring(command); else - command = defcommand ; + command = defcommand; for (p=command, q=buf; *p; p++) if (*p != '%') - *q++ = *p ; + *q++ = *p; else { switch (*++p) { case 'n' : case 'N' : - (void)strcpy(q, name) ; - break ; + (void)strcpy(q, name); + break; case 'd' : case 'D' : - (void)sprintf(q, "%d", dpi) ; - break ; + (void)sprintf(q, "%d", dpi); + break; case 'b' : case 'B' : - (void)sprintf(q, "%d", bdpi) ; - break ; + (void)sprintf(q, "%d", bdpi); + break; case 'o' : case 'O' : - (void)sprintf(q, "%s", mfmode ? mfmode : "default") ; - modegiven = 1 ; - break ; + (void)sprintf(q, "%s", mfmode ? mfmode : "default"); + modegiven = 1; + break; case 'm' : case 'M' : /* * Here we want to return a string. If we can find some integer @@ -174,27 +174,27 @@ case 'm' : case 'M' : * We do this for the very slight improvement in accuracy that * magstep() gives us over the rounded dpi/bdpi. */ - m = 0 ; + m = 0; if (dpi < bdpi) { while (1) { - m-- ; - n = magstep(m, bdpi) ; + m--; + n = magstep(m, bdpi); if (n == dpi) - break ; + break; if (n < dpi || m < -40) { - m = 9999 ; - break ; + m = 9999; + break; } } } else if (dpi > bdpi) { while (1) { - m++ ; - n = magstep(m, bdpi) ; + m++; + n = magstep(m, bdpi); if (n == dpi) - break ; + break; if (n > dpi || m > 40) { - m = 9999 ; - break ; + m = 9999; + break; } } } @@ -208,55 +208,55 @@ case 'm' : case 'M' : else n = m; if (n & 1) { - n &= ~1 ; - t = 1.095445115 ; + n &= ~1; + t = 1.095445115; } else - t = 1.0 ; + t = 1.0; while (n > 0) { - n -= 2 ; - t = t * 1.2 ; + n -= 2; + t = t * 1.2; } if (m < 0) - t = 1 / t ; + t = 1 / t; } - (void)sprintf(q, "%12.9f", t) ; + (void)sprintf(q, "%12.9f", t); #else #ifndef ATARIST if (m == 9999) { #else { #endif - (void)sprintf(q, "%d+%d/%d", dpi/bdpi, dpi%bdpi, bdpi) ; + (void)sprintf(q, "%d+%d/%d", dpi/bdpi, dpi%bdpi, bdpi); } else if (m >= 0) { - (void)sprintf(q, "magstep\\(%d.%d\\)", m/2, (m&1)*5) ; + (void)sprintf(q, "magstep\\(%d.%d\\)", m/2, (m&1)*5); } else { - (void)sprintf(q, "magstep\\(-%d.%d\\)", (-m)/2, (m&1)*5) ; + (void)sprintf(q, "magstep\\(-%d.%d\\)", (-m)/2, (m&1)*5); } #endif - break ; -case 0 : *q = 0 ; - break ; -default: *q++ = *p ; - *q = 0 ; - break ; + break; +case 0 : *q = 0; + break; +default: *q++ = *p; + *q = 0; + break; } - q += strlen(q) ; + q += strlen(q); } - *q = 0 ; + *q = 0; if (mfmode && !modegiven) { - strcpy(q, " ") ; - strcat(q, mfmode) ; + strcpy(q, " "); + strcat(q, mfmode); } #ifdef OS2 if ((_osmode == OS2_MODE) && filter) - (void)strcat(buf, quiet ? " >nul" : " 1>&2") ; + (void)strcat(buf, quiet ? " >nul" : " 1>&2"); #else #ifndef VMCMS /* no filters and no need to print to stderr */ #ifndef MVSXA #ifndef MSDOS #ifndef ATARIST if (filter) - (void)strcat(buf, quiet ? " >/dev/null" : " 1>&2") ; + (void)strcat(buf, quiet ? " >/dev/null" : " 1>&2"); #endif #endif #endif @@ -265,36 +265,36 @@ default: *q++ = *p ; #if defined MSDOS || defined OS2 if (! quiet && mfjobname == (char *)NULL) - (void)fprintf(stderr, "- %s\n", buf) ; + (void)fprintf(stderr, "- %s\n", buf); if (dontmakefont == 0) { if (mfjobname != (char *)NULL) mfjobout(name,t); else - (void)system(buf) ; + (void)system(buf); } #else if (! quiet) - (void)fprintf(stderr, "- %s\n", buf) ; + (void)fprintf(stderr, "- %s\n", buf); if (dontmakefont == 0) - (void)system(buf) ; + (void)system(buf); #endif else { - static FILE *fontlog = 0 ; + static FILE *fontlog = 0; if (fontlog == 0) { - fontlog = fopen("missfont.log", "a") ; + fontlog = fopen("missfont.log", "a"); if (fontlog != 0) { (void)fprintf(stderr, #ifndef VMCMS - "Appending font creation commands to missfont.log\n") ; + "Appending font creation commands to missfont.log\n"); #else "\nMissing font data will be passed to DVIPS EXEC via MISSFONT LOG\n"); #endif } } if (fontlog != 0) { - (void)fprintf(fontlog, "%s\n", buf) ; - (void)fflush(fontlog) ; + (void)fprintf(fontlog, "%s\n", buf); + (void)fflush(fontlog); } } } |