* as/asranlib/Makefile.in, as/asranlib/asranlib.dsp,
[fw/sdcc] / as / link / lklibr.h
index 47dafe2f9d27617667397cbf3d534a7dc533effd..040fc17bb28eeaca3570f9ccdab3c3dc747b7f5b 100644 (file)
@@ -1,13 +1,24 @@
-/* lklibr.h */
+/* lklibr.h
+
+   Copyright (C) 1989-1995 Alan R. Baldwin
+   721 Berkeley St., Kent, Ohio 44240
+   Copyright (C) 2008 Borut Razem, borut dot razem at siol dot net
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
 
 /*
- * (C) Copyright 1989-1995
- * All Rights Reserved
- *
- * Alan R. Baldwin
- * 721 Berkeley St.
- * Kent, Ohio  44240
- *
  * With contributions for the
  * object libraries from
  * Ken Hornstein
 
 #include <stdio.h>
 
+#ifdef INDEXLIB
 typedef struct slibrarysymbol mlibrarysymbol;
 typedef struct slibrarysymbol *pmlibrarysymbol;
 
 struct slibrarysymbol
 {
-  char *name;                   /*Warning: allocate memory before using */
+  char *name;                   /* Warning: allocate memory before using */
   pmlibrarysymbol next;
 };
 
@@ -41,7 +53,7 @@ struct slibraryfile
   int loaded;
   char *libspc;
   char *relfil;                 /* Warning: allocate memory before using */
-  char *filename;               /* Warning: allocate memory before using */
+  char *filspc;                 /* Warning: allocate memory before using */
   long offset;                  /* The embedded file offset in the library file libspc */
   unsigned int type;
   pmlibrarysymbol symbols;
@@ -50,9 +62,9 @@ struct slibraryfile
 
 extern pmlibraryfile libr;
 
-#ifdef INDEXLIB
 pmlibrarysymbol add_rel_index (FILE * fp, long size, pmlibraryfile This);
 #else
+int is_module_loaded (const char *filspc);
 int add_rel_file (const char *name, struct lbname *lbnh, const char *relfil,
                   const char *filspc, int offset, FILE * fp, long size, int type);
 #endif
@@ -69,6 +81,16 @@ struct aslib_target
 };
 
 extern struct aslib_target aslib_target_sdcclib;
+extern struct aslib_target aslib_target_ar;
 extern struct aslib_target aslib_target_lib;
 
+////
+//#define DEBUG_PRINT
+
+#ifdef DEBUG_PRINT
+# define D  printf
+#else
+# define D  1 ? (void)0 : (*(void (*)(const char *, ...))0)
+#endif
+
 #endif /* __LKLIBR_H */