summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2024-04-14 21:22:41 +0200
committerSlávek Banko <slavek.banko@axis.cz>2024-04-16 20:00:02 +0200
commit7e9908eadffac7b954f52ce7698656d9c8ab2693 (patch)
treebf6391090743c2e88c708fb8662226aaf7ac98e9
parent8f0b4a3ab6ae484258568913482a49d48d01ae98 (diff)
downloaddigikam-7e9908eadffac7b954f52ce7698656d9c8ab2693.tar.gz
digikam-7e9908eadffac7b954f52ce7698656d9c8ab2693.zip
Add missing return type in function implementations.
This resolves issue #23. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 9f8bda51db405fbbae71f4ae64562a4ec1000bf0)
-rw-r--r--digikam/imageplugins/coreplugin/sharpnesseditor/clapack/err.c14
-rw-r--r--digikam/imageplugins/coreplugin/sharpnesseditor/clapack/fmt.c29
-rw-r--r--digikam/imageplugins/coreplugin/sharpnesseditor/clapack/open.c4
-rw-r--r--digikam/imageplugins/coreplugin/sharpnesseditor/clapack/sfe.c6
-rw-r--r--digikam/imageplugins/coreplugin/sharpnesseditor/clapack/wref.c8
-rw-r--r--digikam/imageplugins/coreplugin/sharpnesseditor/clapack/wrtfmt.c12
6 files changed, 42 insertions, 31 deletions
diff --git a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/err.c b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/err.c
index de6f2cc8..573372c7 100644
--- a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/err.c
+++ b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/err.c
@@ -82,9 +82,9 @@ char *F_err[] =
#define MAXERR (sizeof(F_err)/sizeof(char *)+100)
#ifdef KR_headers
-f__canseek(f) FILE *f; /*SYSDEP*/
+int f__canseek(f) FILE *f; /*SYSDEP*/
#else
-f__canseek(FILE *f) /*SYSDEP*/
+int f__canseek(FILE *f) /*SYSDEP*/
#endif
{
#ifdef NON_UNIX_STDIO
@@ -186,10 +186,11 @@ f_init(Void)
p->ufmt=1;
p->uwrt=1;
}
+
#ifdef KR_headers
-f__nowreading(x) unit *x;
+int f__nowreading(x) unit *x;
#else
-f__nowreading(unit *x)
+int f__nowreading(unit *x)
#endif
{
long loc;
@@ -217,10 +218,11 @@ f__nowreading(unit *x)
x->uwrt = 0;
return 0;
}
+
#ifdef KR_headers
-f__nowwriting(x) unit *x;
+int f__nowwriting(x) unit *x;
#else
-f__nowwriting(unit *x)
+int f__nowwriting(unit *x)
#endif
{
long loc;
diff --git a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/fmt.c b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/fmt.c
index 364210c2..d0d29978 100644
--- a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/fmt.c
+++ b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/fmt.c
@@ -40,11 +40,12 @@ char *ap_end(char *s)
f__fatal(100, "bad string");
/*NOTREACHED*/ return 0;
}
+
static
#ifdef KR_headers
-op_gen(a,b,c,d)
+int op_gen(a,b,c,d)
#else
-op_gen(int a, int b, int c, int d)
+int op_gen(int a, int b, int c, int d)
#endif
{ struct syl *p= &f__syl[f__pc];
if(f__pc>=SYLMX)
@@ -57,6 +58,7 @@ op_gen(int a, int b, int c, int d)
p->p2.i[1]=d;
return(f__pc++);
}
+
#ifdef KR_headers
static char *f_list();
static char *gt_num(s,n,n1) char *s; int *n, n1;
@@ -109,9 +111,9 @@ char *f_s(char *s, int curloc)
static
#ifdef KR_headers
-ne_d(s,p) char *s,**p;
+int ne_d(s,p) char *s,**p;
#else
-ne_d(char *s, char **p)
+int ne_d(char *s, char **p)
#endif
{ int n,x,sign=0;
struct syl *sp;
@@ -201,9 +203,9 @@ ne_d(char *s, char **p)
static
#ifdef KR_headers
-e_d(s,p) char *s,**p;
+int e_d(s,p) char *s,**p;
#else
-e_d(char *s, char **p)
+int e_d(char *s, char **p)
#endif
{ int i,im,n,w,d,e,found=0,x=0;
char *sv=s;
@@ -318,6 +320,7 @@ e_d(char *s, char **p)
*p=s;
return(1);
}
+
static
#ifdef KR_headers
char *i_tem(s) char *s;
@@ -360,9 +363,9 @@ char *f_list(char *s)
}
#ifdef KR_headers
-pars_f(s) char *s;
+int pars_f(s) char *s;
#else
-pars_f(char *s)
+int pars_f(char *s)
#endif
{
f__parenlvl=f__revloc=f__pc=0;
@@ -372,15 +375,16 @@ pars_f(char *s)
}
return(0);
}
+
#define STKSZ 10
int f__cnt[STKSZ],f__ret[STKSZ],f__cp,f__rp;
flag f__workdone, f__nonl;
static
#ifdef KR_headers
-type_f(n)
+int type_f(n)
#else
-type_f(int n)
+int type_f(int n)
#endif
{
switch(n)
@@ -409,6 +413,7 @@ type_f(int n)
return(ED);
}
}
+
#ifdef KR_headers
integer do_fio(number,ptr,len) ftnint *number; ftnlen len; char *ptr;
#else
@@ -504,10 +509,12 @@ loop: switch(type_f((p= &f__syl[f__pc])->op))
}
return(0);
}
-en_fio(Void)
+
+int en_fio(Void)
{ ftnint one=1;
return(do_fio(&one,(char *)NULL,(ftnint)0));
}
+
VOID
fmt_bg(Void)
{
diff --git a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/open.c b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/open.c
index 493aaea4..9c379fe6 100644
--- a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/open.c
+++ b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/open.c
@@ -271,9 +271,9 @@ integer f_open(olist *a)
return(0);
}
#ifdef KR_headers
-fk_open(seq,fmt,n) ftnint n;
+int fk_open(seq,fmt,n) ftnint n;
#else
-fk_open(int seq, int fmt, ftnint n)
+int fk_open(int seq, int fmt, ftnint n)
#endif
{ char nbuf[10];
olist a;
diff --git a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/sfe.c b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/sfe.c
index cade56a4..5ae01aee 100644
--- a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/sfe.c
+++ b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/sfe.c
@@ -10,10 +10,11 @@ integer e_rsfe(Void)
f__fmtbuf=NULL;
return(n);
}
+
#ifdef KR_headers
-c_sfe(a) cilist *a; /* check */
+int c_sfe(a) cilist *a; /* check */
#else
-c_sfe(cilist *a) /* check */
+int c_sfe(cilist *a) /* check */
#endif
{ unit *p;
f__curunit = p = &f__units[a->ciunit];
@@ -23,6 +24,7 @@ c_sfe(cilist *a) /* check */
if(!p->ufmt) err(a->cierr,102,"sfe")
return(0);
}
+
integer e_wsfe(Void)
{
int n = en_fio();
diff --git a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/wref.c b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/wref.c
index 2f3fce89..0f31e3f4 100644
--- a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/wref.c
+++ b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/wref.c
@@ -16,9 +16,9 @@
#endif
#ifdef KR_headers
-wrt_E(p,w,d,e,len) ufloat *p; ftnlen len;
+int wrt_E(p,w,d,e,len) ufloat *p; ftnlen len;
#else
-wrt_E(ufloat *p, int w, int d, int e, ftnlen len)
+int wrt_E(ufloat *p, int w, int d, int e, ftnlen len)
#endif
{
char buf[FMAX+EXPMAXDIGS+4], *s, *se;
@@ -192,9 +192,9 @@ nogood:
}
#ifdef KR_headers
-wrt_F(p,w,d,len) ufloat *p; ftnlen len;
+int wrt_F(p,w,d,len) ufloat *p; ftnlen len;
#else
-wrt_F(ufloat *p, int w, int d, ftnlen len)
+int wrt_F(ufloat *p, int w, int d, ftnlen len)
#endif
{
int d1, sign, n;
diff --git a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/wrtfmt.c b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/wrtfmt.c
index 92ce295e..c65a6bc4 100644
--- a/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/wrtfmt.c
+++ b/digikam/imageplugins/coreplugin/sharpnesseditor/clapack/wrtfmt.c
@@ -218,9 +218,9 @@ wrt_H(int a, char *s)
return(1);
}
#ifdef KR_headers
-wrt_L(n,len, sz) Uint *n; ftnlen sz;
+int wrt_L(n,len, sz) Uint *n; ftnlen sz;
#else
-wrt_L(Uint *n, int len, ftnlen sz)
+int wrt_L(Uint *n, int len, ftnlen sz)
#endif
{ int i;
long x;
@@ -290,9 +290,9 @@ wrt_G(ufloat *p, int w, int d, int e, ftnlen len)
return(wrt_E(p,w,d,e,len));
}
#ifdef KR_headers
-w_ed(p,ptr,len) struct syl *p; char *ptr; ftnlen len;
+int w_ed(p,ptr,len) struct syl *p; char *ptr; ftnlen len;
#else
-w_ed(struct syl *p, char *ptr, ftnlen len)
+int w_ed(struct syl *p, char *ptr, ftnlen len)
#endif
{
int i;
@@ -336,9 +336,9 @@ w_ed(struct syl *p, char *ptr, ftnlen len)
}
}
#ifdef KR_headers
-w_ned(p) struct syl *p;
+int w_ned(p) struct syl *p;
#else
-w_ned(struct syl *p)
+int w_ned(struct syl *p)
#endif
{
switch(p->op)