1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-04 13:29:35 +00:00

Use more gcc attributes

git-svn-id: svn://svn.cc65.org/cc65/trunk@289 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2000-08-19 18:16:54 +00:00
parent 58e6c61a68
commit 66b40d1a84
6 changed files with 26 additions and 12 deletions

View File

@ -38,13 +38,17 @@
#include "attrib.h"
/*****************************************************************************/
/* Code */
/*****************************************************************************/
unsigned BitFind (unsigned long Val);
unsigned BitFind (unsigned long Val) attribute ((const));
/* Find the first bit that is set in Val. Val must *not* be zero */
void BitSet (void* Data, unsigned Bit);
@ -53,10 +57,10 @@ void BitSet (void* Data, unsigned Bit);
void BitReset (void* Data, unsigned Bit);
/* Reset a bit in a char array */
int BitIsSet (void* Data, unsigned Bit);
int BitIsSet (void* Data, unsigned Bit) attribute ((const));
/* Check if a bit is set in a char array */
int BitIsReset (void* Data, unsigned Bit);
int BitIsReset (void* Data, unsigned Bit) attribute ((const));
/* Check if a bit is reset in a char array */
void BitMerge (void* Target, const void* Source, unsigned Size);

View File

@ -95,7 +95,7 @@ void InitCmdLine (unsigned aArgCount, char* aArgVec[], const char* aProgName)
void UnknownOption (const char* Opt)
/* Print an error about an unknown option. */
/* Print an error about an unknown option and die. */
{
AbEnd ("Unknown option: %s\n", Opt);
}

View File

@ -38,6 +38,10 @@
#include "attrib.h"
/*****************************************************************************/
/* Data */
/*****************************************************************************/
@ -69,13 +73,13 @@ void InitCmdLine (unsigned aArgCount, char* aArgVec[], const char* aProgName);
* array. Both arguments are remembered in static storage.
*/
void UnknownOption (const char* Opt);
/* Print an error about an unknown option. */
void UnknownOption (const char* Opt) attribute ((noreturn));
/* Print an error about an unknown option and die. */
void NeedArg (const char* Opt);
void NeedArg (const char* Opt) attribute ((noreturn));
/* Print an error about a missing option argument and exit. */
void InvDef (const char* Def);
void InvDef (const char* Def) attribute ((noreturn));
/* Print an error about an invalid definition and die */
const char* GetArg (int* ArgNum, unsigned Len);
@ -91,6 +95,6 @@ void LongOption (int* ArgNum, const LongOpt* OptTab, unsigned OptCount);
/* End of cmdline.h */
#endif

View File

@ -38,13 +38,17 @@
#include "attrib.h"
/*****************************************************************************/
/* Code */
/* Code */
/*****************************************************************************/
unsigned HashStr (const char* S);
unsigned HashStr (const char* S) attribute ((const));
/* Return a hash value for the given string */

View File

@ -13,6 +13,7 @@ OBJS = abend.o \
bitops.o \
check.o \
cmdline.o \
coll.o \
exprdefs.o \
fname.o \
hashstr.o \
@ -53,4 +54,4 @@ depend dep: $(OBJS:.o=.c)
$(CC) -MM $^ > .depend

View File

@ -69,6 +69,7 @@ OBJS = abend.obj \
bitops.obj \
check.obj \
cmdline.obj \
coll.obj \
exprdefs.obj \
fname.obj \
hashstr.obj \