From 5a5368a567fe4fb6deccc37f71d8c796b8eb6697 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 28 Feb 2013 17:30:08 +0000 Subject: [PATCH] scriplib: attach const qualifiers to appropriate function input arguments. git-svn-id: https://svn.eduke32.com/eduke32@3531 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/jmact/_scrplib.h | 12 ++++++------ polymer/eduke32/source/jmact/scriplib.c | 14 +++++++------- polymer/eduke32/source/jmact/scriplib.h | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/polymer/eduke32/source/jmact/_scrplib.h b/polymer/eduke32/source/jmact/_scrplib.h index 60dedb0b3..98bdde95c 100644 --- a/polymer/eduke32/source/jmact/_scrplib.h +++ b/polymer/eduke32/source/jmact/_scrplib.h @@ -152,7 +152,7 @@ ScriptLineType * SCRIPT_AddLine ScriptSectionType * SCRIPT_SectionExists ( int32_t scripthandle, - char * sectionname + const char * sectionname ); /* @@ -162,7 +162,7 @@ ScriptSectionType * SCRIPT_SectionExists = ============== */ -ScriptSectionType * SCRIPT_AddSection( int32_t scripthandle, char * sectionname ); +ScriptSectionType * SCRIPT_AddSection( int32_t scripthandle, const char * sectionname ); /* ============== @@ -174,7 +174,7 @@ ScriptSectionType * SCRIPT_AddSection( int32_t scripthandle, char * sectionname ScriptEntryType * SCRIPT_EntryExists ( ScriptSectionType * section, - char * entryname + const char * entryname ); /* @@ -187,9 +187,9 @@ ScriptEntryType * SCRIPT_EntryExists void SCRIPT_AddEntry ( int32_t scripthandle, - char * sectionname, - char * entryname, - char * entryvalue + const char * sectionname, + const char * entryname, + const char * entryvalue ); /* diff --git a/polymer/eduke32/source/jmact/scriplib.c b/polymer/eduke32/source/jmact/scriplib.c index e7f09b84e..32afbb294 100644 --- a/polymer/eduke32/source/jmact/scriplib.c +++ b/polymer/eduke32/source/jmact/scriplib.c @@ -138,7 +138,7 @@ void SCRIPT_FreeSection(ScriptSectionType * section) (e)->preventry = (e); \ } -ScriptSectionType * SCRIPT_SectionExists(int32_t scripthandle, char * sectionname) +ScriptSectionType * SCRIPT_SectionExists(int32_t scripthandle, const char * sectionname) { ScriptSectionType *s, *ls=NULL; @@ -153,7 +153,7 @@ ScriptSectionType * SCRIPT_SectionExists(int32_t scripthandle, char * sectionnam return NULL; } -ScriptSectionType * SCRIPT_AddSection(int32_t scripthandle, char * sectionname) +ScriptSectionType * SCRIPT_AddSection(int32_t scripthandle, const char * sectionname) { ScriptSectionType *s,*s2; @@ -181,7 +181,7 @@ ScriptSectionType * SCRIPT_AddSection(int32_t scripthandle, char * sectionname) return s; } -ScriptEntryType * SCRIPT_EntryExists(ScriptSectionType * section, char * entryname) +ScriptEntryType * SCRIPT_EntryExists(ScriptSectionType * section, const char * entryname) { ScriptEntryType *e,*le=NULL; @@ -195,7 +195,7 @@ ScriptEntryType * SCRIPT_EntryExists(ScriptSectionType * section, char * entryna return NULL; } -void SCRIPT_AddEntry(int32_t scripthandle, char * sectionname, char * entryname, char * entryvalue) +void SCRIPT_AddEntry(int32_t scripthandle, const char * sectionname, const char * entryname, const char * entryvalue) { ScriptSectionType *s; ScriptEntryType *e,*e2; @@ -738,7 +738,7 @@ breakme: return 0; } -int32_t SCRIPT_GetNumber(int32_t scripthandle, char * sectionname, char * entryname, int32_t * number) +int32_t SCRIPT_GetNumber(int32_t scripthandle, const char * sectionname, const char * entryname, int32_t * number) { ScriptSectionType *s; ScriptEntryType *e; @@ -899,8 +899,8 @@ void SCRIPT_PutDoubleString void SCRIPT_PutNumber ( int32_t scripthandle, - char * sectionname, - char * entryname, + const char * sectionname, + const char * entryname, int32_t number, int32_t hexadecimal, int32_t defaultvalue diff --git a/polymer/eduke32/source/jmact/scriplib.h b/polymer/eduke32/source/jmact/scriplib.h index 87509d0b6..35c966a37 100644 --- a/polymer/eduke32/source/jmact/scriplib.h +++ b/polymer/eduke32/source/jmact/scriplib.h @@ -162,8 +162,8 @@ int32_t SCRIPT_GetDoubleString int32_t SCRIPT_GetNumber ( int32_t scripthandle, - char * sectionname, - char * entryname, + const char * sectionname, + const char * entryname, int32_t * number ); @@ -247,8 +247,8 @@ void SCRIPT_PutDoubleString void SCRIPT_PutNumber ( int32_t scripthandle, - char * sectionname, - char * entryname, + const char * sectionname, + const char * entryname, int32_t number, int32_t hexadecimal, int32_t defaultvalue