From: Rafał Długołęcki Date: Sun, 14 Jul 2013 20:45:23 +0000 (+0200) Subject: Removed dummy GNU function declarations. X-Git-Tag: 3.1~44 X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=9d00b52b53fbd3bdccea081126e33b50f98da1fd;p=vlp.git Removed dummy GNU function declarations. --- diff --git a/src/int/util.c b/src/int/util.c index 39b4087..f272016 100644 --- a/src/int/util.c +++ b/src/int/util.c @@ -1,4 +1,4 @@ - /* Loglan82 Compiler&Interpreter +/* Loglan82 Compiler&Interpreter Copyright (C) 1981-1993 Institute of Informatics, University of Warsaw Copyright (C) 1993, 1994 LITA, Pau @@ -39,9 +39,10 @@ or Andrzej Salwicki /* Utility routines */ - -word entier(x) /* Compute entier (floor) */ -double x; +/** + * Compute entier (floor) + */ +word entier(double x) { word i; @@ -56,20 +57,23 @@ double x; i = -i; if ((double)i <= x) return(i); else return(i-1); } -} /* end entier */ - +} -word shift(x, n) /* shift x by n bits */ -word x, n; +/** + * shift x by n bits + */ +word shift(word x, word n) { if (n == 0) return (x); if (n > 0) return (x << n); else return ( (x >> -n) & ~(~(word)0 << (8*sizeof(word)+n)) ); -} /* end shift */ +} -char *asciiz(virt) /* Get ASCIIZ string from arrayof char */ -virtaddr *virt; +/** + * Get ASCIIZ string from arrayof char + */ +char *asciiz(virtaddr *virt) { word am; int len, i; @@ -85,27 +89,28 @@ virtaddr *virt; return (cp); } else errsignal(RTEREFTN); /* reference to none */ -} /* end asciiz */ - +} -void addext(fname, ext) /* Add extension to a file name */ -char *fname, *ext; +/** + * Add extension to a file name + */ +void addext(char *fname, char *ext) { char *cp; cp = fname; while (*cp != '\0' && *cp != '.') cp++; strcpy(cp, ext); -} /* end addext */ - +} void usage() { } - -void abend(msg) /* Print error message and abort */ -char *msg; +/** + * Print error message and abort + */ +void abend(char *msg) { fprintf(stderr, "Error: %s\n", msg); exit(8); @@ -116,7 +121,10 @@ char *msg; static int ranpat1 = 7, ranpat2 = 503, ranpat3 = 15661; -void ranset() /* Initialize generator */ +/** + * Initialize generator + */ +void ranset() { long tim; @@ -124,10 +132,12 @@ void ranset() /* Initialize generator */ ranpat1 = tim % 30269; ranpat2 = tim % 30307; ranpat3 = tim % 30323; -} /* end ranset */ - +} -double prandom() /* Produce next pseudo random number */ +/** + * Produce next pseudo random number + */ +double prandom() { int i; double r; @@ -143,14 +153,15 @@ double prandom() /* Produce next pseudo random number */ return (r-i); } - -void moveblock(from, to, len) /* Copy a block of memory */ -char *from, *to; -word len; +/** + * Copy a block of memory + */ +void moveblock(char *from, char *to, word len) { - while (len-- > 0) *to++ = *from++; -} /* end moveblock */ - + while (len-- > 0) { + *to++ = *from++; + } +} /**************************************************************