]> git.sur5r.net Git - cc65/commitdiff
Added InitFilePos method
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 20 Nov 2000 19:44:18 +0000 (19:44 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 20 Nov 2000 19:44:18 +0000 (19:44 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@454 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/common/filepos.c [new file with mode: 0644]
src/common/filepos.h
src/common/libdefs.h
src/common/make/gcc.mak
src/common/make/watcom.mak

diff --git a/src/common/filepos.c b/src/common/filepos.c
new file mode 100644 (file)
index 0000000..ba53095
--- /dev/null
@@ -0,0 +1,56 @@
+/*****************************************************************************/
+/*                                                                           */
+/*                                filepos.c                                 */
+/*                                                                           */
+/*                      File position data structure                        */
+/*                                                                           */
+/*                                                                           */
+/*                                                                           */
+/* (C) 1998-2000 Ullrich von Bassewitz                                       */
+/*               Wacholderweg 14                                             */
+/*               D-70597 Stuttgart                                           */
+/* EMail:        uz@musoftware.de                                            */
+/*                                                                           */
+/*                                                                           */
+/* This software is provided 'as-is', without any expressed or implied       */
+/* warranty.  In no event will the authors be held liable for any damages    */
+/* arising from the use of this software.                                    */
+/*                                                                           */
+/* Permission is granted to anyone to use this software for any purpose,     */
+/* including commercial applications, and to alter it and redistribute it    */
+/* freely, subject to the following restrictions:                            */
+/*                                                                           */
+/* 1. The origin of this software must not be misrepresented; you must not   */
+/*    claim that you wrote the original software. If you use this software   */
+/*    in a product, an acknowledgment in the product documentation would be  */
+/*    appreciated but is not required.                                       */
+/* 2. Altered source versions must be plainly marked as such, and must not   */
+/*    be misrepresented as being the original software.                      */
+/* 3. This notice may not be removed or altered from any source              */
+/*    distribution.                                                          */
+/*                                                                           */
+/*****************************************************************************/
+
+
+
+/* common */
+#include "filepos.h"
+
+
+
+/*****************************************************************************/
+/*                                          Code                                    */
+/*****************************************************************************/
+
+
+
+void InitFilePos (FilePos* P)
+/* Initialize the file position (set all fields to zero) */
+{
+    P->Line = 0;
+    P->Col  = 0;
+    P->Name = 0;
+}
+
+
+
index fc938c6747af1dfc5d7c869036b7e311a57c737c..1f46fd91c7b5d562e7eab364e230584b0772506d 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998     Ullrich von Bassewitz                                        */
-/*              Wacholderweg 14                                              */
-/*              D-70597 Stuttgart                                            */
-/* EMail:       uz@musoftware.de                                             */
+/* (C) 1998-2000 Ullrich von Bassewitz                                       */
+/*               Wacholderweg 14                                             */
+/*               D-70597 Stuttgart                                           */
+/* EMail:        uz@musoftware.de                                            */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -54,6 +54,17 @@ struct FilePos_ {
 
 
 
+/*****************************************************************************/
+/*                                          Code                                    */
+/*****************************************************************************/
+
+
+
+void InitFilePos (FilePos* P);
+/* Initialize the file position (set all fields to zero) */
+
+
+
 /* End of filepos.h */
 
 #endif
index 1cda2415c21ce55aeeea52d8550b75ffe01ddd3a..f717b4358362ff555954e46ee924d9b93f19692b 100644 (file)
@@ -46,7 +46,7 @@
 
 /* Defines for magic and version */
 #define LIB_MAGIC      0x7A55616E
-#define LIB_VERSION    0x0004
+#define LIB_VERSION    0x0008
 
 /* Size of an library file header */
 #define        LIB_HDR_SIZE    12
index d6dddbf6d01fa68f0f04ddb630af73e5f716a968..f2bd0336e44692888895cab8ada8071f02c9c3d8 100644 (file)
@@ -15,6 +15,7 @@ OBJS =        abend.o         \
        cmdline.o       \
        coll.o          \
        exprdefs.o      \
+       filepos.o       \
        fname.o         \
        hashstr.o       \
        target.o        \
index fa39062f5f67364db2faea05a7a505b838620241..11dddb0a989a2cfeeacf69a17bdbcb8795bccd1f 100644 (file)
@@ -64,13 +64,14 @@ CCCFG  = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
 
 # ------------------------------------------------------------------------------
 # All library OBJ files
-
+                        
 OBJS = abend.obj       \
        bitops.obj      \
        check.obj       \
        cmdline.obj     \
        coll.obj        \
        exprdefs.obj    \
+       filepos.obj     \
        fname.obj       \
        hashstr.obj     \
        wildargv.obj    \
@@ -81,7 +82,7 @@ OBJS =        abend.obj       \
 
 
 .PRECIOUS $(OBJS:.obj=.cc) $(LIB)
-                        
+
 # ------------------------------------------------------------------------------
 # Main targets