From 9d00b52b53fbd3bdccea081126e33b50f98da1fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Sun, 14 Jul 2013 22:45:23 +0200 Subject: [PATCH] Removed dummy GNU function declarations. --- src/int/util.c | 73 +++++++++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 31 deletions(-) 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++; + } +} /************************************************************** -- 2.30.2