diff options
Diffstat (limited to 'digikam/imageplugins/coreplugin/sharpnesseditor/clapack/open.c')
-rw-r--r-- | digikam/imageplugins/coreplugin/sharpnesseditor/clapack/open.c | 49 |
1 files changed, 7 insertions, 42 deletions
diff --git a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/open.c b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/open.c index 9c379fe..e781075 100644 --- a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/open.c +++ b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/open.c @@ -9,20 +9,12 @@ #endif #endif -#ifdef KR_headers -extern char *malloc(); -#ifdef NON_ANSI_STDIO -extern char *mktemp(); -#endif -extern integer f_clos(); -#else #undef abs #undef min #undef max #include "stdlib.h" extern int f__canseek(FILE*); extern integer f_clos(cllist*); -#endif #ifdef NON_ANSI_RW_MODES char *f__r_mode[2] = {"r", "r"}; @@ -32,15 +24,10 @@ char *f__r_mode[2] = {"rb", "r"}; char *f__w_mode[4] = {"wb", "w", "r+b", "r+"}; #endif - static char f__buf0[400], *f__buf = f__buf0; - int f__buflen = (int)sizeof(f__buf0); +static char f__buf0[400], *f__buf = f__buf0; +int f__buflen = (int)sizeof(f__buf0); - static void -#ifdef KR_headers -f__bufadj(n, c) int n, c; -#else -f__bufadj(int n, int c) -#endif +static void f__bufadj(int n, int c) { unsigned int len; char *nbuf, *s, *t, *te; @@ -62,12 +49,7 @@ f__bufadj(int n, int c) f__buf = nbuf; } - int -#ifdef KR_headers -f__putbuf(c) int c; -#else -f__putbuf(int c) -#endif +int f__putbuf(int c) { char *s, *se; int n; @@ -92,12 +74,7 @@ f__putbuf(int c) return 0; } - void -#ifdef KR_headers -x_putc(c) -#else -x_putc(int c) -#endif +void x_putc(int c) { if (f__recpos >= f__buflen) f__bufadj(f__recpos, f__buflen); @@ -106,12 +83,7 @@ x_putc(int c) #define opnerr(f,m,s) {if(f) errno= m; else opn_err(m,s,a); return(m);} - static void -#ifdef KR_headers -opn_err(m, s, a) int m; char *s; olist *a; -#else -opn_err(int m, char *s, olist *a) -#endif +static void opn_err(int m, char *s, olist *a) { if (a->ofnm) { /* supply file name to error message */ @@ -122,11 +94,7 @@ opn_err(int m, char *s, olist *a) f__fatal(m, s); } -#ifdef KR_headers -integer f_open(a) olist *a; -#else integer f_open(olist *a) -#endif { unit *b; integer rv; char buf[256], *s; @@ -270,11 +238,8 @@ integer f_open(olist *a) opnerr(a->oerr,129,"open"); return(0); } -#ifdef KR_headers -int fk_open(seq,fmt,n) ftnint n; -#else + int fk_open(int seq, int fmt, ftnint n) -#endif { char nbuf[10]; olist a; (void) sprintf(nbuf,"fort.%ld",(long)n); |