* debugger/mcs51/break.c, debugger/mcs51/cmd.c,
[fw/sdcc] / as / link / lklex.c
index 73093ce9ca72dcd96ab6f89d8d3877e7033d8cb6..67c297a1dcda2df8661306ae00ae0007d2a312ef 100644 (file)
@@ -162,7 +162,7 @@ getSid (char *id)
  *     The function getfid() scans the current input text line from
  *     the current position copying the next string into the external
  *     string buffer (str).  The string ends when end of line is found.
- *     Trailing spacers are removed. The maximum number of characters
+ *     Trailing spaces are removed. The maximum number of characters
  *     copied is PATH_MAX. If the input string is larger than PATH_MAX
  *     characters then the string is truncated. The string is NULL
  *     terminated.
@@ -186,9 +186,7 @@ getSid (char *id)
  */
 
 VOID
-getfid(str, c)
-register int c;
-char *str;
+getfid(char *str, register int c)
 {
        register char *p;
 
@@ -261,8 +259,7 @@ getnb()
  */
 
 VOID
-skip(c)
-register int c;
+skip(register int c)
 {
        if (c < 0)
                c = getnb();
@@ -332,7 +329,7 @@ get()
  */
 
 VOID
-unget(c)
+unget(int c)
 {
        if (c != 0)
                --ip;
@@ -370,7 +367,7 @@ unget(c)
  */
 
 int
-getmap(d)
+getmap(int d)
 {
        register int c, n, v;
 
@@ -507,23 +504,23 @@ loop:     if (pflag && cfp && cfp->f_type == F_STD)
                                sfp = afile(fid, "lnk", 0);
                        } else
                        if (ftype == F_REL) {
-                               sfp = afile(fid, "rel", 0);
-                               /* if a .cdb file exists then copy it over */
+                               sfp = afile(fid, LKOBJEXT, 0);
+                               /* if a .adb file exists then copy it over */
                                if (dflag && sfp && dfp && pass == 0) {
-                                   FILE *xfp = afile(fid,"adb",0); //JCF: Nov 30, 2002
-                                   if (xfp) {
-                                       copyfile(dfp,xfp);
-                                       fclose(xfp);
-                                   }
+                                       FILE *xfp = afile(fid,"adb",0); //JCF: Nov 30, 2002
+                                       if (xfp) {
+                                               copyfile(dfp,xfp);
+                                               fclose(xfp);
+                                       }
                                }
                                if (uflag && pass != 0) {
-                                SaveLinkedFilePath(fid); //Save the linked path for aomf51
-                                if ((tfp = afile(fid, "lst", 0)) != NULL) {
-                                 if ((rfp = afile(fid, "rst", 1)) == NULL) {
-                                       fclose(tfp);
-                                       tfp = NULL;
-                                 }
-                                }
+                                       SaveLinkedFilePath(fid); //Save the linked path for aomf51
+                                       if ((tfp = afile(fid, "lst", 0)) != NULL) {
+                                               if ((rfp = afile(fid, "rst", 1)) == NULL) {
+                                                       fclose(tfp);
+                                                       tfp = NULL;
+                                               }
+                                       }
                                }
                                gline = 1;
                        } else {
@@ -628,8 +625,7 @@ endline()
  */
 
 VOID
-chop_crlf(str)
-char *str;
+chop_crlf(char *str)
 {
        register int i;