From: cuz Date: Mon, 20 Nov 2000 19:44:18 +0000 (+0000) Subject: Added InitFilePos method X-Git-Tag: V2.12.0~3076 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7646787a6eff1c26c8e963944745e1329b61212c;p=cc65 Added InitFilePos method git-svn-id: svn://svn.cc65.org/cc65/trunk@454 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/common/filepos.c b/src/common/filepos.c new file mode 100644 index 000000000..ba5309514 --- /dev/null +++ b/src/common/filepos.c @@ -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; +} + + + diff --git a/src/common/filepos.h b/src/common/filepos.h index fc938c674..1f46fd91c 100644 --- a/src/common/filepos.h +++ b/src/common/filepos.h @@ -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 diff --git a/src/common/libdefs.h b/src/common/libdefs.h index 1cda2415c..f717b4358 100644 --- a/src/common/libdefs.h +++ b/src/common/libdefs.h @@ -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 diff --git a/src/common/make/gcc.mak b/src/common/make/gcc.mak index d6dddbf6d..f2bd0336e 100644 --- a/src/common/make/gcc.mak +++ b/src/common/make/gcc.mak @@ -15,6 +15,7 @@ OBJS = abend.o \ cmdline.o \ coll.o \ exprdefs.o \ + filepos.o \ fname.o \ hashstr.o \ target.o \ diff --git a/src/common/make/watcom.mak b/src/common/make/watcom.mak index fa39062f5..11dddb0a9 100644 --- a/src/common/make/watcom.mak +++ b/src/common/make/watcom.mak @@ -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