replace VG_STATIC -> static
[vg.git] / vg_console.h
index 25bad63d3c37186534f201ae40dceaed5876ad76..1024b82ac468b0b6e6c08d557e7561e965ffc387 100644 (file)
@@ -73,29 +73,29 @@ struct vg_console{
 }
 static vg_console;
 
-VG_STATIC void _vg_console_draw( void );
+static void _vg_console_draw( void );
 void           _vg_console_println( const char *str );
-VG_STATIC int  _vg_console_list( int argc, char const *argv[] );
-VG_STATIC void _vg_console_init(void);
-VG_STATIC void _vg_console_write_persistent(void);
-VG_STATIC void _vg_console_free(void);
-VG_STATIC void  vg_execute_console_input( const char *cmd );
+static int  _vg_console_list( int argc, char const *argv[] );
+static void _vg_console_init(void);
+static void _vg_console_write_persistent(void);
+static void _vg_console_free(void);
+static void  vg_execute_console_input( const char *cmd );
 
 /*
  * Console interface
  */
-VG_STATIC void console_history_get( char* buf, int entry_num );
-VG_STATIC int _vg_console_enabled(void);
-VG_STATIC void console_proc_key( SDL_Keysym ev );
+static void console_history_get( char* buf, int entry_num );
+static int _vg_console_enabled(void);
+static void console_proc_key( SDL_Keysym ev );
 
 /*
  * Implementation
  */
-VG_STATIC int _vg_console_enabled(void){ 
+static int _vg_console_enabled(void){ 
        return vg_console.enabled; 
 }
 
-VG_STATIC 
+static 
 void vg_console_reg_var( const char *alias, void *ptr, enum vg_var_dtype type, 
                          u32 flags )
 {
@@ -115,7 +115,7 @@ void vg_console_reg_var( const char *alias, void *ptr, enum vg_var_dtype type,
    vg_info( "Console variable '%s' registered\n", alias );
 }
 
-VG_STATIC 
+static 
 void vg_console_reg_cmd( const char *alias,
                          int (*function)(int argc, const char *argv[]),
                          void (*poll_suggest)(int argc, const char *argv[]) )
@@ -132,7 +132,7 @@ void vg_console_reg_cmd( const char *alias,
    vg_info( "Console function '%s' registered\n", alias );
 }
 
-VG_STATIC int _vg_console_list( int argc, char const *argv[] ){
+static int _vg_console_list( int argc, char const *argv[] ){
        for( int i=0; i<vg_console.function_count; i ++ ){
                struct vg_cmd *cmd = &vg_console.functions[ i ];
                vg_info( "* %s\n", cmd->name );
@@ -194,7 +194,7 @@ int _ccmd_vg_console_defaults( int argc, const char *argv[] ){
    return 0;
 }
 
-VG_STATIC void _vg_console_init(void){
+static void _vg_console_init(void){
    vg_console_reg_cmd( "list", _vg_console_list, NULL );
    vg_console_reg_cmd( "crash", _test_break, NULL );
    vg_console_reg_cmd( "exec", _vg_console_exec, NULL );
@@ -208,11 +208,11 @@ VG_STATIC void _vg_console_init(void){
                        );
 }
 
-VG_STATIC void vg_console_load_autos(void){
+static void vg_console_load_autos(void){
    _vg_console_exec( 1, (const char *[]){ "auto.conf" } );
 }
 
-VG_STATIC void _vg_console_write_persistent(void){
+static void _vg_console_write_persistent(void){
        FILE *fp = fopen( "cfg/auto.conf", "w" );
        
        for( int i=0; i<vg_console.var_count; i ++ ){
@@ -236,7 +236,7 @@ VG_STATIC void _vg_console_write_persistent(void){
        fclose( fp );
 }
 
-VG_STATIC void _vg_console_free(void)
+static void _vg_console_free(void)
 {
        _vg_console_write_persistent();
 }
@@ -246,7 +246,7 @@ VG_STATIC void _vg_console_free(void)
  * returns number of tokens
  * dst must be as long as src
  */
-VG_STATIC int vg_console_tokenize( const char *src, char *dst, 
+static int vg_console_tokenize( const char *src, char *dst, 
                                    const char *args[8] )
 {
        int arg_count = 0,
@@ -281,7 +281,7 @@ VG_STATIC int vg_console_tokenize( const char *src, char *dst,
    return arg_count;
 }
 
-VG_STATIC vg_var *vg_console_match_var( const char *kw )
+static vg_var *vg_console_match_var( const char *kw )
 {
        for( int i=0; i<vg_console.var_count; i ++ ){
                struct vg_var *cv = &vg_console.vars[ i ];
@@ -293,7 +293,7 @@ VG_STATIC vg_var *vg_console_match_var( const char *kw )
    return NULL;
 }
 
-VG_STATIC vg_cmd *vg_console_match_cmd( const char *kw )
+static vg_cmd *vg_console_match_cmd( const char *kw )
 {
        for( int i=0; i<vg_console.function_count; i ++ ){
                struct vg_cmd *cmd = &vg_console.functions[ i ];
@@ -305,7 +305,7 @@ VG_STATIC vg_cmd *vg_console_match_cmd( const char *kw )
    return NULL;
 }
 
-VG_STATIC void vg_execute_console_input( const char *cmd )
+static void vg_execute_console_input( const char *cmd )
 {
        char temp[512];
        char const *args[8];
@@ -426,7 +426,7 @@ u32 str_lcs( const char *s1, const char *s2 ){
 }
 
 /* str must not fuckoff ever! */
-VG_STATIC void console_suggest_score_text( const char *str, const char *input,
+static void console_suggest_score_text( const char *str, const char *input,
                                            int minscore )
 {
    /* filter duplicates */
@@ -462,7 +462,7 @@ VG_STATIC void console_suggest_score_text( const char *str, const char *input,
    }
 }
 
-VG_STATIC void console_update_suggestions(void)
+static void console_update_suggestions(void)
 {
    if( vg_ui.focused_control_type != k_ui_control_textbox ||
        vg_ui.textbuf != vg_console.input )
@@ -534,7 +534,7 @@ VG_STATIC void console_update_suggestions(void)
 /*
  * Suggestion controls
  */
-VG_STATIC void _console_fetch_suggestion(void)
+static void _console_fetch_suggestion(void)
 {
    char *target = &vg_console.input[ vg_console.suggestion_pastepos ];
 
@@ -554,7 +554,7 @@ VG_STATIC void _console_fetch_suggestion(void)
    }
 }
 
-VG_STATIC void _console_suggest_store_normal(void)
+static void _console_suggest_store_normal(void)
 {
    if( vg_console.suggestion_select == -1 ){
       char *target = &vg_console.input[ vg_console.suggestion_pastepos ];
@@ -562,7 +562,7 @@ VG_STATIC void _console_suggest_store_normal(void)
    }
 }
 
-VG_STATIC void _console_suggest_next(void)
+static void _console_suggest_next(void)
 {
    if( vg_console.suggestion_count ){
       _console_suggest_store_normal();
@@ -576,7 +576,7 @@ VG_STATIC void _console_suggest_next(void)
    }
 }
 
-VG_STATIC void _console_suggest_prev(void)
+static void _console_suggest_prev(void)
 {
    if( vg_console.suggestion_count ){
       _console_suggest_store_normal();
@@ -590,14 +590,14 @@ VG_STATIC void _console_suggest_prev(void)
    }
 }
 
-VG_STATIC void _vg_console_on_update( char *buf, u32 len )
+static void _vg_console_on_update( char *buf, u32 len )
 {
    if( buf == vg_console.input ){
       console_update_suggestions();
    }
 }
 
-VG_STATIC void console_history_get( char* buf, int entry_num )
+static void console_history_get( char* buf, int entry_num )
 {
        if( !vg_console.history_count )
                return;
@@ -608,7 +608,7 @@ VG_STATIC void console_history_get( char* buf, int entry_num )
        strcpy( buf, vg_console.history[ pick ] );
 }
 
-VG_STATIC void _vg_console_on_up( char *buf, u32 len )
+static void _vg_console_on_up( char *buf, u32 len )
 {
    if( buf == vg_console.input ){
       vg_console.history_pos = 
@@ -633,7 +633,7 @@ VG_STATIC void _vg_console_on_up( char *buf, u32 len )
    }
 }
 
-VG_STATIC void _vg_console_on_down( char *buf, u32 len )
+static void _vg_console_on_down( char *buf, u32 len )
 {
    if( buf == vg_console.input ){
       vg_console.history_pos = VG_MAX( 0, vg_console.history_pos-1 );
@@ -645,7 +645,7 @@ VG_STATIC void _vg_console_on_down( char *buf, u32 len )
    }
 }
 
-VG_STATIC void _vg_console_on_enter( char *buf, u32 len )
+static void _vg_console_on_enter( char *buf, u32 len )
 {
    if( buf == vg_console.input ){
       if( !strlen( vg_console.input ) ) 
@@ -675,7 +675,7 @@ VG_STATIC void _vg_console_on_enter( char *buf, u32 len )
    }
 }
 
-VG_STATIC void _vg_console_draw(void)
+static void _vg_console_draw(void)
 {
        if( !vg_console.enabled ) return;