use const wherever possible
This commit is contained in:
parent
6b409a55a6
commit
4172f4efd5
|
@ -2671,7 +2671,7 @@ Yap_ConsultingFile ( USES_REGS1 )
|
|||
|
||||
/* consult file *file*, *mode* may be one of either consult or reconsult */
|
||||
static void
|
||||
init_consult(int mode, char *file)
|
||||
init_consult(int mode, const char *file)
|
||||
{
|
||||
CACHE_REGS
|
||||
if (!LOCAL_ConsultSp) {
|
||||
|
@ -2693,7 +2693,7 @@ init_consult(int mode, char *file)
|
|||
}
|
||||
|
||||
void
|
||||
Yap_init_consult(int mode, char *file)
|
||||
Yap_init_consult(int mode, const char *file)
|
||||
{
|
||||
init_consult(mode,file);
|
||||
}
|
||||
|
|
14
C/init.c
14
C/init.c
|
@ -121,7 +121,7 @@ Yap_IsOpType(char *type)
|
|||
}
|
||||
|
||||
static int
|
||||
OpDec(int p, char *type, Atom a, Term m)
|
||||
OpDec(int p, const char *type, Atom a, Term m)
|
||||
{
|
||||
int i;
|
||||
AtomEntry *ae = RepAtom(a);
|
||||
|
@ -399,7 +399,7 @@ update_flags_from_prolog(UInt flags, PredEntry *pe)
|
|||
}
|
||||
|
||||
void
|
||||
Yap_InitCPred(char *Name, unsigned long int Arity, CPredicate code, UInt flags)
|
||||
Yap_InitCPred(const char *Name, UInt Arity, CPredicate code, UInt flags)
|
||||
{
|
||||
CACHE_REGS
|
||||
Atom atom = NIL;
|
||||
|
@ -503,7 +503,7 @@ Yap_InitCPred(char *Name, unsigned long int Arity, CPredicate code, UInt flags)
|
|||
}
|
||||
|
||||
void
|
||||
Yap_InitCmpPred(char *Name, unsigned long int Arity, CmpPredicate cmp_code, UInt flags)
|
||||
Yap_InitCmpPred(const char *Name, UInt Arity, CmpPredicate cmp_code, UInt flags)
|
||||
{
|
||||
CACHE_REGS
|
||||
Atom atom = NIL;
|
||||
|
@ -581,7 +581,7 @@ Yap_InitCmpPred(char *Name, unsigned long int Arity, CmpPredicate cmp_code, UInt
|
|||
}
|
||||
|
||||
void
|
||||
Yap_InitAsmPred(char *Name, unsigned long int Arity, int code, CPredicate def, UInt flags)
|
||||
Yap_InitAsmPred(const char *Name, UInt Arity, int code, CPredicate def, UInt flags)
|
||||
{
|
||||
CACHE_REGS
|
||||
Atom atom = NIL;
|
||||
|
@ -719,21 +719,21 @@ CleanBack(PredEntry *pe, CPredicate Start, CPredicate Cont, CPredicate Cut)
|
|||
}
|
||||
|
||||
void
|
||||
Yap_InitCPredBack(char *Name, unsigned long int Arity,
|
||||
Yap_InitCPredBack(const char *Name, UInt Arity,
|
||||
unsigned int Extra, CPredicate Start,
|
||||
CPredicate Cont, UInt flags){
|
||||
Yap_InitCPredBack_(Name,Arity,Extra,Start,Cont,NULL,flags);
|
||||
}
|
||||
|
||||
void
|
||||
Yap_InitCPredBackCut(char *Name, unsigned long int Arity,
|
||||
Yap_InitCPredBackCut(const char *Name, UInt Arity,
|
||||
unsigned int Extra, CPredicate Start,
|
||||
CPredicate Cont,CPredicate Cut, UInt flags){
|
||||
Yap_InitCPredBack_(Name,Arity,Extra,Start,Cont,Cut,flags);
|
||||
}
|
||||
|
||||
void
|
||||
Yap_InitCPredBack_(char *Name, unsigned long int Arity,
|
||||
Yap_InitCPredBack_(const char *Name, UInt Arity,
|
||||
unsigned int Extra, CPredicate Start,
|
||||
CPredicate Cont, CPredicate Cut, UInt flags)
|
||||
{
|
||||
|
|
1
C/qlyr.c
1
C/qlyr.c
|
@ -1054,7 +1054,6 @@ static Int
|
|||
p_read_program( USES_REGS1 )
|
||||
{
|
||||
IOSTREAM *stream;
|
||||
void YAP_Reset(void);
|
||||
Term t1 = Deref(ARG1);
|
||||
|
||||
if (IsVarTerm(t1)) {
|
||||
|
|
30
H/Yapproto.h
30
H/Yapproto.h
|
@ -25,13 +25,13 @@ int Yap_GetName(char *,UInt,Term);
|
|||
Term Yap_GetValue(Atom);
|
||||
int Yap_HasOp(Atom);
|
||||
struct operator_entry *Yap_GetOpPropForAModuleHavingALock(AtomEntry *, Term);
|
||||
Atom Yap_LookupAtom(char *);
|
||||
Atom Yap_LookupAtomWithLength(char *, size_t);
|
||||
Atom Yap_LookupUTF8Atom(char *);
|
||||
Atom Yap_LookupMaybeWideAtom(wchar_t *);
|
||||
Atom Yap_LookupMaybeWideAtomWithLength(wchar_t *, size_t);
|
||||
Atom Yap_FullLookupAtom(char *);
|
||||
void Yap_LookupAtomWithAddress(char *,AtomEntry *);
|
||||
Atom Yap_LookupAtom(const char *);
|
||||
Atom Yap_LookupAtomWithLength(const char *, size_t);
|
||||
Atom Yap_LookupUTF8Atom(const char *);
|
||||
Atom Yap_LookupMaybeWideAtom(const wchar_t *);
|
||||
Atom Yap_LookupMaybeWideAtomWithLength(const wchar_t *, size_t);
|
||||
Atom Yap_FullLookupAtom(const char *);
|
||||
void Yap_LookupAtomWithAddress(const char *,AtomEntry *);
|
||||
Prop Yap_NewPredPropByFunctor(struct FunctorEntryStruct *, Term);
|
||||
Prop Yap_NewPredPropByAtom(struct AtomEntryStruct *, Term);
|
||||
Prop Yap_PredPropByFunctorNonThreadLocal(struct FunctorEntryStruct *, Term);
|
||||
|
@ -126,7 +126,7 @@ void Yap_InitCdMgr(void);
|
|||
struct pred_entry * Yap_PredFromClause( Term t USES_REGS );
|
||||
int Yap_discontiguous(struct pred_entry *ap USES_REGS );
|
||||
int Yap_multiple(struct pred_entry *ap USES_REGS );
|
||||
void Yap_init_consult(int, char *);
|
||||
void Yap_init_consult(int, const char *);
|
||||
void Yap_end_consult(void);
|
||||
void Yap_Abolish(struct pred_entry *);
|
||||
void Yap_BuildMegaClause(struct pred_entry *);
|
||||
|
@ -182,6 +182,7 @@ Int Yap_exec_absmi(int);
|
|||
void Yap_trust_last(void);
|
||||
Term Yap_GetException(void);
|
||||
void Yap_PrepGoal(UInt, CELL *, choiceptr USES_REGS);
|
||||
int Yap_execute_pred(struct pred_entry *ppe, CELL *pt USES_REGS);
|
||||
int Yap_dogc( int extra_args, Term *tp USES_REGS );
|
||||
|
||||
/* exo.c */
|
||||
|
@ -244,12 +245,12 @@ void Yap_DebugEndline(void);
|
|||
int Yap_DebugGetc(void);
|
||||
#endif
|
||||
int Yap_IsOpType(char *);
|
||||
void Yap_InitCPred(char *, unsigned long int, CPredicate, UInt);
|
||||
void Yap_InitAsmPred(char *, unsigned long int, int, CPredicate, UInt);
|
||||
void Yap_InitCmpPred(char *, unsigned long int, CmpPredicate, UInt);
|
||||
void Yap_InitCPredBack(char *, unsigned long int, unsigned int, CPredicate,CPredicate,UInt);
|
||||
void Yap_InitCPredBackCut(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,UInt);
|
||||
void Yap_InitCPredBack_(char *, unsigned long int, unsigned int, CPredicate,CPredicate,CPredicate,UInt);
|
||||
void Yap_InitCPred(const char *, UInt, CPredicate, UInt);
|
||||
void Yap_InitAsmPred(const char *, UInt, int, CPredicate, UInt);
|
||||
void Yap_InitCmpPred(const char *, UInt, CmpPredicate, UInt);
|
||||
void Yap_InitCPredBack(const char *, UInt, unsigned int, CPredicate,CPredicate,UInt);
|
||||
void Yap_InitCPredBackCut(const char *, UInt, unsigned int, CPredicate,CPredicate,CPredicate,UInt);
|
||||
void Yap_InitCPredBack_(const char *, UInt, unsigned int, CPredicate,CPredicate,CPredicate,UInt);
|
||||
void Yap_InitWorkspace(UInt,UInt,UInt,UInt,UInt,int,int,int);
|
||||
|
||||
#ifdef YAPOR
|
||||
|
@ -385,6 +386,7 @@ void Yap_WinError(char *);
|
|||
/* threads.c */
|
||||
void Yap_InitThreadPreds(void);
|
||||
void Yap_InitFirstWorkerThreadHandle(void);
|
||||
int Yap_ThreadID( void );
|
||||
#if THREADS
|
||||
int Yap_InitThread(int);
|
||||
#endif
|
||||
|
|
Reference in New Issue