mirror of
https://github.com/cc65/cc65.git
synced 2025-08-09 13:25:06 +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:
@@ -38,13 +38,17 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include "attrib.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* 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 */
|
/* Find the first bit that is set in Val. Val must *not* be zero */
|
||||||
|
|
||||||
void BitSet (void* Data, unsigned Bit);
|
void BitSet (void* Data, unsigned Bit);
|
||||||
@@ -53,10 +57,10 @@ void BitSet (void* Data, unsigned Bit);
|
|||||||
void BitReset (void* Data, unsigned Bit);
|
void BitReset (void* Data, unsigned Bit);
|
||||||
/* Reset a bit in a char array */
|
/* 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 */
|
/* 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 */
|
/* Check if a bit is reset in a char array */
|
||||||
|
|
||||||
void BitMerge (void* Target, const void* Source, unsigned Size);
|
void BitMerge (void* Target, const void* Source, unsigned Size);
|
||||||
|
@@ -95,7 +95,7 @@ void InitCmdLine (unsigned aArgCount, char* aArgVec[], const char* aProgName)
|
|||||||
|
|
||||||
|
|
||||||
void UnknownOption (const char* Opt)
|
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);
|
AbEnd ("Unknown option: %s\n", Opt);
|
||||||
}
|
}
|
||||||
|
@@ -38,6 +38,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include "attrib.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Data */
|
/* Data */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
@@ -69,13 +73,13 @@ void InitCmdLine (unsigned aArgCount, char* aArgVec[], const char* aProgName);
|
|||||||
* array. Both arguments are remembered in static storage.
|
* array. Both arguments are remembered in static storage.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void UnknownOption (const char* Opt);
|
void UnknownOption (const char* Opt) attribute ((noreturn));
|
||||||
/* Print an error about an unknown option. */
|
/* 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. */
|
/* 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 */
|
/* Print an error about an invalid definition and die */
|
||||||
|
|
||||||
const char* GetArg (int* ArgNum, unsigned Len);
|
const char* GetArg (int* ArgNum, unsigned Len);
|
||||||
@@ -91,6 +95,6 @@ void LongOption (int* ArgNum, const LongOpt* OptTab, unsigned OptCount);
|
|||||||
/* End of cmdline.h */
|
/* End of cmdline.h */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -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 */
|
/* Return a hash value for the given string */
|
||||||
|
|
||||||
|
|
||||||
|
@@ -13,6 +13,7 @@ OBJS = abend.o \
|
|||||||
bitops.o \
|
bitops.o \
|
||||||
check.o \
|
check.o \
|
||||||
cmdline.o \
|
cmdline.o \
|
||||||
|
coll.o \
|
||||||
exprdefs.o \
|
exprdefs.o \
|
||||||
fname.o \
|
fname.o \
|
||||||
hashstr.o \
|
hashstr.o \
|
||||||
@@ -53,4 +54,4 @@ depend dep: $(OBJS:.o=.c)
|
|||||||
$(CC) -MM $^ > .depend
|
$(CC) -MM $^ > .depend
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -69,6 +69,7 @@ OBJS = abend.obj \
|
|||||||
bitops.obj \
|
bitops.obj \
|
||||||
check.obj \
|
check.obj \
|
||||||
cmdline.obj \
|
cmdline.obj \
|
||||||
|
coll.obj \
|
||||||
exprdefs.obj \
|
exprdefs.obj \
|
||||||
fname.obj \
|
fname.obj \
|
||||||
hashstr.obj \
|
hashstr.obj \
|
||||||
|
Reference in New Issue
Block a user