Skip to content

Commit

Permalink
kernel: remove 'extern' from function prototypes
Browse files Browse the repository at this point in the history
... and also drop some inappropriate uses of 'extern'
  • Loading branch information
fingolfin committed Jan 23, 2019
1 parent 579456e commit ee827cf
Show file tree
Hide file tree
Showing 61 changed files with 894 additions and 1,378 deletions.
7 changes: 2 additions & 5 deletions src/ariths.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,7 @@ EXPORT_INLINE Int EQ(Obj opL, Obj opR)

extern Obj EqOper;

extern Int EqObject (
Obj opL,
Obj opR );

Int EqObject(Obj opL, Obj opR);


/****************************************************************************
Expand Down Expand Up @@ -609,7 +606,7 @@ EXPORT_INLINE Obj MOD(Obj opL, Obj opR)
**
*F ChangeArithDoOperations( <oper>, <verb> )
*/
extern void ChangeArithDoOperations(Obj oper, Int verb);
void ChangeArithDoOperations(Obj oper, Int verb);


/****************************************************************************
Expand Down
8 changes: 2 additions & 6 deletions src/blister.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,7 @@ EXPORT_INLINE UInt COUNT_TRUES_BLOCKS(const UInt * ptr, UInt nblocks)
** length by one. Otherwise the boolean list is converted to an ordinary
** list and the assignment is performed the ordinary way.
*/
extern void AssBlist (
Obj list,
Int pos,
Obj val );
void AssBlist(Obj list, Int pos, Obj val);


/****************************************************************************
Expand All @@ -323,8 +320,7 @@ extern void AssBlist (
** 'ConvBlist' changes the representation of boolean lists into the compact
** representation of type 'T_BLIST' described above.
*/
extern void ConvBlist (
Obj list );
void ConvBlist(Obj list);


/****************************************************************************
Expand Down
61 changes: 23 additions & 38 deletions src/calls.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ EXPORT_INLINE Obj NAMS_FUNC(Obj func)
return CONST_FUNC(func)->namesOfLocals;
}

extern Obj NAMI_FUNC(Obj func, Int i);
Obj NAMI_FUNC(Obj func, Int i);

EXPORT_INLINE Obj PROF_FUNC(Obj func)
{
Expand Down Expand Up @@ -196,7 +196,7 @@ EXPORT_INLINE void SET_HDLR_FUNC(Obj func, Int i, ObjFunc hdlr)
FUNC(func)->handlers[i] = hdlr;
}

extern void SET_NAME_FUNC(Obj func, Obj name);
void SET_NAME_FUNC(Obj func, Obj name);

EXPORT_INLINE void SET_NARG_FUNC(Obj func, Int nargs)
{
Expand Down Expand Up @@ -248,7 +248,7 @@ EXPORT_INLINE void SET_LCKS_FUNC(Obj func, Obj locks)
** 'IsKernelFunction' returns 1 if <func> is a kernel function (i.e.
** compiled from C code), and 0 otherwise.
*/
extern Int IsKernelFunction(Obj func);
Int IsKernelFunction(Obj func);


EXPORT_INLINE ObjFunc_0ARGS HDLR_0ARGS(Obj func)
Expand Down Expand Up @@ -291,7 +291,7 @@ EXPORT_INLINE ObjFunc_1ARGS HDLR_XARGS(Obj func)
return (ObjFunc_1ARGS)HDLR_FUNC(func, 7);
}

extern Obj NargError(Obj func, Int actual);
Obj NargError(Obj func, Int actual);

/****************************************************************************
**
Expand Down Expand Up @@ -487,21 +487,17 @@ EXPORT_INLINE Obj CALL_XARGS_PROF(Obj f, Obj as)
** handler
*/

extern void InitHandlerFunc (
ObjFunc hdlr,
const Char * cookie );
void InitHandlerFunc(ObjFunc hdlr, const Char * cookie);

#ifdef USE_GASMAN

extern const Char * CookieOfHandler(
ObjFunc hdlr );
const Char * CookieOfHandler(ObjFunc hdlr);

extern ObjFunc HandlerOfCookie (
const Char * cookie );
ObjFunc HandlerOfCookie(const Char * cookie);

extern void SortHandlers( UInt byWhat );
void SortHandlers(UInt byWhat);

extern void CheckAllHandlers(void);
void CheckAllHandlers(void);

#endif

Expand All @@ -524,26 +520,16 @@ extern void CheckAllHandlers(void);
** 'NewFunctionT' does the same as 'NewFunction', but allows to specify the
** <type> and <size> of the newly created bag.
*/
extern Obj NewFunction (
Obj name,
Int narg,
Obj nams,
ObjFunc hdlr );

extern Obj NewFunctionC (
const Char * name,
Int narg,
const Char * nams,
ObjFunc hdlr );

extern Obj NewFunctionT (
UInt type,
UInt size,
Obj name,
Int narg,
Obj nams,
ObjFunc hdlr );

Obj NewFunction(Obj name, Int narg, Obj nams, ObjFunc hdlr);

Obj NewFunctionC(const Char * name,
Int narg,
const Char * nams,
ObjFunc hdlr);

Obj NewFunctionT(
UInt type, UInt size, Obj name, Int narg, Obj nams, ObjFunc hdlr);


/****************************************************************************
**
Expand All @@ -553,7 +539,7 @@ extern Obj NewFunctionT (
** separated argument names, and turns it into a plist of strings, ready
** to be passed to 'NewFunction' as <nams>.
*/
extern Obj ArgStringToList(const Char *nams_c);
Obj ArgStringToList(const Char * nams_c);


/****************************************************************************
Expand All @@ -567,10 +553,9 @@ extern Obj ArgStringToList(const Char *nams_c);
**
** 'PrintFunction' prints the function <func> .
*/
extern void PrintFunction (
Obj func );
void PrintFunction(Obj func);

extern void PrintKernelFunction(Obj func);
void PrintKernelFunction(Obj func);


/****************************************************************************
Expand All @@ -581,7 +566,7 @@ extern void PrintKernelFunction(Obj func);
** i.e., it is equivalent to '<func>( <list>[1], <list>[2]... )'.
*/

extern Obj CallFuncList(Obj func, Obj list);
Obj CallFuncList(Obj func, Obj list);

extern Obj CallFuncListOper;

Expand Down
2 changes: 1 addition & 1 deletion src/code.c
Original file line number Diff line number Diff line change
Expand Up @@ -3040,7 +3040,7 @@ void CodeIsbComObjExpr ( void )
**
*/

extern void CodeEmpty( void )
void CodeEmpty(void)
{
Stat stat;
stat = NewStat(T_EMPTY, 0);
Expand Down
Loading

0 comments on commit ee827cf

Please sign in to comment.