Skip to content

Commit

Permalink
kernel: convert tabs to spaces
Browse files Browse the repository at this point in the history
Also remove some trailing spaces
  • Loading branch information
fingolfin authored and alex-konovalov committed Dec 12, 2018
1 parent 2acdb15 commit d621ba7
Show file tree
Hide file tree
Showing 28 changed files with 683 additions and 696 deletions.
6 changes: 3 additions & 3 deletions src/blister.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ Obj ElmsBlist (
bit = 1;
}
}
}
}
}
/* return the result */
return elms;
Expand Down Expand Up @@ -1579,7 +1579,7 @@ Obj FuncMEET_BLIST (
ptr2 = CONST_BLOCKS_BLIST(list2);
for ( i = NUMBER_BLOCKS_BLIST(list1); 0 < i; i-- )
{
if (*ptr1++ & *ptr2++) return True;
if (*ptr1++ & *ptr2++) return True;
}

return False;
Expand Down Expand Up @@ -1801,7 +1801,7 @@ static Int InitKernel (
InitMarkFuncBags( t1 +IMMUTABLE , MarkNoSubBags );
}

/* Make immutable blists public */
/* Make immutable blists public */
#ifdef HPCGAP
for ( t1 = T_BLIST; t1 <= T_BLIST_SSORT; t1 += 2 ) {
MakeBagTypePublic( t1 + IMMUTABLE );
Expand Down
4 changes: 1 addition & 3 deletions src/calls.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,7 @@ extern void PrintKernelFunction(Obj func);
** i.e., it is equivalent to '<func>( <list>[1], <list>[2]... )'.
*/

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

extern Obj CallFuncListOper;

Expand Down
4 changes: 2 additions & 2 deletions src/code.c
Original file line number Diff line number Diff line change
Expand Up @@ -2401,8 +2401,8 @@ void CodeUnbList ( Int narg )
*F CodeElmsListLevel( <level> ) . code multiple selection of several lists
*/
static void CodeElmListUniv (
Expr ref,
Int narg)
Expr ref,
Int narg)
{
Expr list; /* list expression */
Expr pos; /* position expression */
Expand Down
6 changes: 3 additions & 3 deletions src/code.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ enum STAT_TNUM {
END_ENUM_RANGE(LAST_STAT_TNUM),
};

#define T_NO_STAT (Stat)(-1)
#define T_NO_STAT (Stat)(-1)



Expand Down Expand Up @@ -1202,8 +1202,8 @@ extern void CodeElmList ( Int narg );
extern void CodeElmsList ( void );

extern void CodeElmListLevel (
Int narg,
UInt level);
Int narg,
UInt level);

extern void CodeElmsListLevel (
UInt level );
Expand Down
4 changes: 2 additions & 2 deletions src/gasman.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ static inline UInt TNUM_BAG(Bag bag) {
** To test that all of them are set, compare the result to the original
** flags, e.g.
**
** if (TEST_BAG_FLAG(obj, FLAG1 | FLAG2 ) == (FLAG1 | FLAG2)) ...
** if (TEST_BAG_FLAG(obj, FLAG1 | FLAG2 ) == (FLAG1 | FLAG2)) ...
**
** Similary, if you wish to test that FLAG1 is set and FLAG2 is not set,
** use:
**
** if (TEST_BAG_FLAG(obj, FLAG1 | FLAG2 ) == FLAG1) ...
** if (TEST_BAG_FLAG(obj, FLAG1 | FLAG2 ) == FLAG1) ...
**
** Each flag must be a an integer with exactly one bit set, e.g. a value
** of the form (1 << i). Currently, 'i' must be in the range from 0 to
Expand Down
6 changes: 3 additions & 3 deletions src/gvars.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ static void UnlockGVars(void) {
// it by ValGVar everywhere? The difference is of course the memory barrier,
// which might cause a performance penalty (OTOH, not using it right now might
// or might not be a bug?!?)
#define VAL_GVAR_INTERN(gvar) (PtrGVars[GVAR_BUCKET(gvar)] \
[GVAR_INDEX(gvar)-1])
#define VAL_GVAR_INTERN(gvar) (PtrGVars[GVAR_BUCKET(gvar)] \
[GVAR_INDEX(gvar)-1])

#else

#define VAL_GVAR_INTERN(gvar) PtrGVars[ (gvar) ]
#define VAL_GVAR_INTERN(gvar) PtrGVars[ (gvar) ]

#endif

Expand Down
2 changes: 1 addition & 1 deletion src/gvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ extern void MakeConstantGVar (
#ifdef HPCGAP
extern void MakeThreadLocalVar (
UInt gvar,
UInt rnam );
UInt rnam );
#endif

extern Int IsReadOnlyGVar (
Expand Down
4 changes: 2 additions & 2 deletions src/hpc/aobjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ static inline void ATOMIC_SET_ELM_PLIST(Obj list, UInt index, Obj value) {
Obj *contents = ADDR_OBJ(list);
MEMBAR_WRITE(); /* ensure that contents[index] becomes visible to
* other threads only after value has become visible,
* too.
*/
* too.
*/
contents[index] = value;
#endif
}
Expand Down
8 changes: 4 additions & 4 deletions src/hpc/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ void AddGCRoots(void);
void RemoveGCroots(void);

void RunThreadedMain(
int (*mainFunction)(int, char **, char **),
int argc,
char **argv,
char **environ );
int (*mainFunction)(int, char **, char **),
int argc,
char **argv,
char **environ );

void CreateMainRegion(void);
Obj RunThread(void (*start)(void *), void *arg);
Expand Down
4 changes: 2 additions & 2 deletions src/hpc/tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ typedef struct ThreadLocalStorage
syJmp_buf threadExit;

/* From scanner.c */
Obj DefaultOutput;
Obj DefaultInput;
Obj DefaultOutput;
Obj DefaultInput;

/* Profiling */
UInt CountActive;
Expand Down
2 changes: 1 addition & 1 deletion src/integer.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static Obj ObjInt_UIntInv( UInt i );
#endif

#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
# define CURRENT_FUNCTION __func__
# define CURRENT_FUNCTION __func__
#elif defined(_MSC_VER)
# define CURRENT_FUNCTION __FUNCTION__
#else
Expand Down
2 changes: 1 addition & 1 deletion src/intfuncs.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void initGRMT(UInt4 *mt, UInt4 s)
mt[0]= s & 0xffffffffUL;
for (mti=1; mti<624; mti++) {
mt[mti] =
(1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti);
(1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti);
mt[mti] &= 0xffffffffUL;
}
/* store mti as last entry of mt[] */
Expand Down
4 changes: 2 additions & 2 deletions src/intrprtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ extern void IntrFuncCallBegin ( void );

extern void IntrFuncCallEnd (
UInt funccall,
UInt options,
UInt options,
UInt nr );

/****************************************************************************
Expand Down Expand Up @@ -159,7 +159,7 @@ extern void IntrFuncExprBegin (
Int narg,
Int nloc,
Obj nams,
Int startLine);
Int startLine);

extern void IntrFuncExprEnd(UInt nr);

Expand Down
15 changes: 3 additions & 12 deletions src/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,19 +407,10 @@ extern void LockCurrentOutput(Int lock);
** must pass 0L if you don't make use of an argument to please lint.
*/

extern void Pr (
const Char * format,
Int arg1,
Int arg2 );


extern void SPrTo (
Char * buffer,
UInt maxlen,
const Char * format,
Int arg1,
Int arg2 );
extern void Pr(const Char *format, Int arg1, Int arg2);

extern void SPrTo(Char *buffer, UInt maxlen, const Char *format, Int arg1,
Int arg2);


/****************************************************************************
Expand Down
16 changes: 8 additions & 8 deletions src/macfloat.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,16 +336,16 @@ Obj SumIntMacfloat( Obj i, Obj f )
**
*/

#define MAKEMATHPRIMITIVE(NAME,name) \
Obj Func##NAME##_MACFLOAT( Obj self, Obj f ) \
{ \
return NEW_MACFLOAT(MATH(name)(VAL_MACFLOAT(f))); \
#define MAKEMATHPRIMITIVE(NAME,name) \
Obj Func##NAME##_MACFLOAT( Obj self, Obj f ) \
{ \
return NEW_MACFLOAT(MATH(name)(VAL_MACFLOAT(f))); \
}

#define MAKEMATHPRIMITIVE2(NAME,name) \
Obj Func##NAME##_MACFLOAT( Obj self, Obj f, Obj g) \
{ \
return NEW_MACFLOAT(MATH(name)(VAL_MACFLOAT(f),VAL_MACFLOAT(g))); \
#define MAKEMATHPRIMITIVE2(NAME,name) \
Obj Func##NAME##_MACFLOAT( Obj self, Obj f, Obj g) \
{ \
return NEW_MACFLOAT(MATH(name)(VAL_MACFLOAT(f),VAL_MACFLOAT(g))); \
}

MAKEMATHPRIMITIVE(COS,cos)
Expand Down
14 changes: 7 additions & 7 deletions src/objpcgel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ Obj LeadingExponentOfPcElement(Obj self, Obj pcgs, Obj w)
template <typename UIntN>
Obj ExponentsOfPcElement(Obj self, Obj pcgs, Obj w)
{
UInt len; /* length of pcgs */
Obj el; /* exponents list */
UInt len; /* length of pcgs */
Obj el; /* exponents list */
UInt le;
UInt indx;
UInt indx;
UInt expm; /* signed exponent mask */
UInt exps; /* sign exponent mask */
UInt ebits; /* number of exponent bits */
Expand Down Expand Up @@ -232,14 +232,14 @@ Obj ExponentsOfPcElement(Obj self, Obj pcgs, Obj w)
gen = ((*ptr) >> ebits) + 1;
for (j=le; j< gen;j++) {
/* zero out intermediate entries */
SET_ELM_PLIST(el,indx,INTOBJ_INT(0));
indx++;
SET_ELM_PLIST(el,indx,INTOBJ_INT(0));
indx++;
}

if ( (*ptr) & exps )
SET_ELM_PLIST(el,indx,INTOBJ_INT(((*ptr)&expm)-exps));
SET_ELM_PLIST(el,indx,INTOBJ_INT(((*ptr)&expm)-exps));
else
SET_ELM_PLIST(el,indx,INTOBJ_INT((*ptr)&expm));
SET_ELM_PLIST(el,indx,INTOBJ_INT((*ptr)&expm));
indx++;
le=gen+1;
}
Expand Down
Loading

0 comments on commit d621ba7

Please sign in to comment.