/[weechat]/weechat/src/common/weechat.c
ViewVC logotype

Diff of /weechat/src/common/weechat.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.50 by flashcode, Tue Jun 28 08:24:43 2005 UTC revision 1.51 by flashcode, Sat Jul 9 15:30:51 2005 UTC
# Line 314  void wee_display_commands (int weechat_c Line 314  void wee_display_commands (int weechat_c
314  }  }
315    
316  /*  /*
317     * wee_display_key_functions: display WeeChat key functions
318     */
319    
320    void wee_display_key_functions ()
321    {
322        int i;
323        
324        printf (_("Internal key functions:\n"));
325        printf ("\n");
326        i = 0;
327        while (gui_key_functions[i].function_name)
328        {
329            printf ("  %s\n",
330                    gui_key_functions[i].function_name);
331            i++;
332        }
333    }
334    
335    /*
336     * wee_display_keys: display WeeChat default keys
337     */
338    
339    void wee_display_keys ()
340    {
341        t_gui_key *ptr_key;
342        char *expanded_name;
343        
344        printf (_("%s default keys:\n"), PACKAGE_NAME);
345        printf ("\n");
346        for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)
347        {
348            expanded_name = gui_key_get_expanded_name (ptr_key->key);
349            printf ("  %20s => %s\n",
350                    (expanded_name) ? expanded_name : ptr_key->key,
351                    (ptr_key->function) ? gui_key_function_search_by_ptr (ptr_key->function) : ptr_key->command);
352            if (expanded_name)
353                free (expanded_name);
354        }
355    }
356    
357    /*
358   * wee_parse_args: parse command line args   * wee_parse_args: parse command line args
359   */   */
360    
# Line 333  wee_parse_args (int argc, char *argv[]) Line 374  wee_parse_args (int argc, char *argv[])
374              wee_display_config_options ();              wee_display_config_options ();
375              wee_shutdown (EXIT_SUCCESS);              wee_shutdown (EXIT_SUCCESS);
376          }          }
377            else if ((strcmp (argv[i], "-f") == 0)
378                || (strcmp (argv[i], "--key-functions") == 0))
379            {
380                wee_display_key_functions ();
381                wee_shutdown (EXIT_SUCCESS);
382            }
383          else if ((strcmp (argv[i], "-h") == 0)          else if ((strcmp (argv[i], "-h") == 0)
384                  || (strcmp (argv[i], "--help") == 0))                  || (strcmp (argv[i], "--help") == 0))
385          {          {
# Line 340  wee_parse_args (int argc, char *argv[]) Line 387  wee_parse_args (int argc, char *argv[])
387              printf ("%s", WEE_USAGE2);              printf ("%s", WEE_USAGE2);
388              wee_shutdown (EXIT_SUCCESS);              wee_shutdown (EXIT_SUCCESS);
389          }          }
390          if ((strcmp (argv[i], "-i") == 0)          else if ((strcmp (argv[i], "-i") == 0)
391              || (strcmp (argv[i], "--irc-commands") == 0))              || (strcmp (argv[i], "--irc-commands") == 0))
392          {          {
393              wee_display_commands (0, 1);              wee_display_commands (0, 1);
394              wee_shutdown (EXIT_SUCCESS);              wee_shutdown (EXIT_SUCCESS);
395          }          }
396            else if ((strcmp (argv[i], "-k") == 0)
397                || (strcmp (argv[i], "--keys") == 0))
398            {
399                wee_display_keys ();
400                wee_shutdown (EXIT_SUCCESS);
401            }
402          else if ((strcmp (argv[i], "-l") == 0)          else if ((strcmp (argv[i], "-l") == 0)
403                   || (strcmp (argv[i], "--license") == 0))                   || (strcmp (argv[i], "--license") == 0))
404          {          {
# Line 358  wee_parse_args (int argc, char *argv[]) Line 411  wee_parse_args (int argc, char *argv[])
411              printf (PACKAGE_VERSION "\n");              printf (PACKAGE_VERSION "\n");
412              wee_shutdown (EXIT_SUCCESS);              wee_shutdown (EXIT_SUCCESS);
413          }          }
414          if ((strcmp (argv[i], "-w") == 0)          else if ((strcmp (argv[i], "-w") == 0)
415              || (strcmp (argv[i], "--weechat-commands") == 0))              || (strcmp (argv[i], "--weechat-commands") == 0))
416          {          {
417              wee_display_commands (1, 0);              wee_display_commands (1, 0);
# Line 771  main (int argc, char *argv[]) Line 824  main (int argc, char *argv[])
824      signal (SIGSEGV, my_sigsegv);   /* crash dump when SIGSEGV is received  */      signal (SIGSEGV, my_sigsegv);   /* crash dump when SIGSEGV is received  */
825      gui_pre_init (&argc, &argv);    /* pre-initiliaze interface             */      gui_pre_init (&argc, &argv);    /* pre-initiliaze interface             */
826      wee_init_vars ();               /* initialize some variables            */      wee_init_vars ();               /* initialize some variables            */
827        gui_key_init ();                /* init keyboard (default key bindings) */
828      wee_parse_args (argc, argv);    /* parse command line args              */      wee_parse_args (argc, argv);    /* parse command line args              */
829      wee_create_home_dirs ();        /* create WeeChat directories           */      wee_create_home_dirs ();        /* create WeeChat directories           */
830      wee_init_log ();                /* init log file                        */      wee_init_log ();                /* init log file                        */

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26