Tweaks for gcc 10 compiling, thanks OC

This commit is contained in:
Pentium44 2021-04-07 15:15:53 -07:00
parent a3eb63cf23
commit 2ce421ce10
3 changed files with 10 additions and 4 deletions

View File

@ -43,13 +43,13 @@ at this moment!
* `encrypt "Regular string"` -> Converts to encrypted string 'Uhjvqds#xuulqj' * `encrypt "Regular string"` -> Converts to encrypted string 'Uhjvqds#xuulqj'
* `decrypt "Uhjvqds#xuulqj"` -> Converts back to 'Regular string' * `decrypt "Uhjvqds#xuulqj"` -> Converts back to 'Regular string'
* MD5 file checking * MD5 file checking
* `md5 "file.txt"` -> outputs filename and md5 hash * `md5 "file.txt"` -> outputs filename and md5 hash
* 2 Layer piping * 2 Layer piping
* `md5 "file.txt" | write "file.txt.md5" "%PIPE%"` -> writes output of md5 to file.txt.md5 * `md5 "file.txt" | write "file.txt.md5" "%PIPE%"` -> writes output of md5 to file.txt.md5
* Networking functions * Networking functions
* `netlisten "<port>" "<search>" "<respond>"` -> listens on <port> and replies <respond> on <search> found from outside * `netlisten "<port>" "<search>" "<respond>"` -> listens on <port> and replies <respond> on <search> found from outside
* `nettoss "<address>" "<port>" "<data>"` -> binds to outside server at <address>:<port> and pushes <data> thus, disconnecting * `nettoss "<address>" "<port>" "<data>"` -> binds to outside server at <address>:<port> and pushes <data> thus, disconnecting
* `nethttp "<port>" "<forkval>"` -> throws up a web server on <port> in the current working directory, forkval (0 or 1, 0 don't fork into background / 1 do). * `nethttp "<port>" "<forkval>"` -> throws up a web server on <port> in the current working directory, forkval (0 or 1, 0 don't fork into background / 1 do).

View File

@ -5,6 +5,8 @@
View README file supplied with this software for more details View README file supplied with this software for more details
*/ */
#define MY_GLOBAL
#include "deps.h" #include "deps.h"
#include "util.h" #include "util.h"
#include "functions.h" #include "functions.h"

View File

@ -5,6 +5,10 @@
View README file supplied with this software for more details View README file supplied with this software for more details
*/ */
#ifndef MY_GLOBAL
#define MY_GLOBAL extern
#endif /* MY_GLOBAL */
struct s_variables struct s_variables
{ {
char var_name [MAX_VAR_NAME_LEN]; char var_name [MAX_VAR_NAME_LEN];
@ -12,7 +16,7 @@ struct s_variables
}; };
typedef struct s_variables VARS; typedef struct s_variables VARS;
VARS svars[MAXVARS]; MY_GLOBAL VARS svars [MAXVARS];
void set_var(int index, char *varname, char *vardata); void set_var(int index, char *varname, char *vardata);
int get_var_count(); int get_var_count();