mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Fixed compilation errors on Unix
This commit is contained in:
parent
b8c56cc23c
commit
d4faf0c0e0
99 changed files with 1385 additions and 1659 deletions
|
@ -31,7 +31,7 @@ MEM_TempAlloc parsetree_allocator;
|
|||
yyparsedata parsedata;
|
||||
sval_u node_none = { 0 };
|
||||
|
||||
char *str_replace( char *orig, char *rep, char *with ) {
|
||||
char *str_replace( char *orig, const char *rep, const char *with ) {
|
||||
char *result; // the return string
|
||||
char *ins; // the next insert point
|
||||
char *tmp; // varies
|
||||
|
@ -50,7 +50,7 @@ char *str_replace( char *orig, char *rep, char *with ) {
|
|||
len_with = strlen( with );
|
||||
|
||||
ins = orig;
|
||||
for( count = 0; tmp = strstr( ins, rep ); ++count ) {
|
||||
for( count = 0; (tmp = strstr( ins, rep )) != nullptr; ++count ) {
|
||||
ins = tmp + len_rep;
|
||||
}
|
||||
|
||||
|
|
|
@ -993,7 +993,7 @@ static bool UseField( void )
|
|||
* down here because we want the user's section 1 to have been scanned first.
|
||||
* The user has a chance to override it with an option.
|
||||
*/
|
||||
#include <unistd.h>
|
||||
//#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef YY_EXTRA_TYPE
|
||||
|
|
|
@ -300,7 +300,7 @@ extern char *yytext;
|
|||
* down here because we want the user's section 1 to have been scanned first.
|
||||
* The user has a chance to override it with an option.
|
||||
*/
|
||||
#include <unistd.h>
|
||||
//#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef YY_EXTRA_TYPE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue