From 1c30ee60cdddba348f6a83e3062b0ee320a540e4 Mon Sep 17 00:00:00 2001 From: Oleg Puchinin Date: Thu, 18 Sep 2008 17:37:53 +0700 Subject: [PATCH] Fixes --- silentbob/CMakeLists_linux.txt | 1 + silentbob/include/proto.h | 1 + silentbob/plugins/plugin_perl.cxx | 4 ++-- silentbob/plugins/plugin_python.cxx | 4 ++-- silentbob/plugins/plugin_ruby.cxx | 29 +---------------------------- silentbob/rmake | 4 +++- silentbob/sblib/Sblib.cxx | 27 +++++++++++++++++++++++++++ silentbob/src/opts_funcs.cxx | 2 +- 8 files changed, 38 insertions(+), 34 deletions(-) diff --git a/silentbob/CMakeLists_linux.txt b/silentbob/CMakeLists_linux.txt index 6274011..20b984e 100644 --- a/silentbob/CMakeLists_linux.txt +++ b/silentbob/CMakeLists_linux.txt @@ -55,6 +55,7 @@ add_library (plugin_perlpackages SHARED plugins/plugin_perlpackages.cxx) add_library (plugin_python SHARED plugins/plugin_python.cxx) add_library (plugin_ruby SHARED plugins/plugin_ruby.cxx) add_library (plugin_ruby_newclass SHARED plugins/plugin_ruby_newclass.cxx) +add_library (plugin_ruby_kinds SHARED plugins/plugin_ruby_kinds.cxx) install (TARGETS sblib silent_bob RUNTIME DESTINATION bin LIBRARY DESTINATION lib ) diff --git a/silentbob/include/proto.h b/silentbob/include/proto.h index 4b830fe..ecdda61 100644 --- a/silentbob/include/proto.h +++ b/silentbob/include/proto.h @@ -20,6 +20,7 @@ inline struct c_word * new_cword (char *word, char sym) ; DArray * split_to_words (char * d_op) ; char * cts (struct c_word * d_word) ; char * ww_last_word (char *d_op) ; +char * ruby_last_word (char * op) ; int words_count (char *S) ; struct tt_state_t * get_onett_tag (char * f_name, char ** d_tt_buf) ; int sblib_find (const char * path, const char * name, const char * f_outname) ; diff --git a/silentbob/plugins/plugin_perl.cxx b/silentbob/plugins/plugin_perl.cxx index ac096ec..bdf8f14 100644 --- a/silentbob/plugins/plugin_perl.cxx +++ b/silentbob/plugins/plugin_perl.cxx @@ -200,13 +200,13 @@ char perl_files_opt (DArray * d_opts, int * i) void perl_plugin_short_info () { - printf ("Perl support."); + printf ("Perl language support."); } void perl_plugin_long_info () { - printf ("Perl support.\n"); + printf ("Perl language support.\n"); printf ("Version: 1.0-rc1\n"); printf ("options: --perl --make-ctags\n"); } diff --git a/silentbob/plugins/plugin_python.cxx b/silentbob/plugins/plugin_python.cxx index d11dfdc..d24544c 100644 --- a/silentbob/plugins/plugin_python.cxx +++ b/silentbob/plugins/plugin_python.cxx @@ -192,12 +192,12 @@ char py_opt2 (DArray * d_opts, int * i) void py_short_info () { - printf ("Python plugin."); + printf ("Python language plugin."); } void py_long_info () { - printf ("Python plugin.\n"); + printf ("Python language plugin.\n"); printf ("Version: 1.0\n"); printf ("options: --python [--files | --make-ctags | --class ]\n"); } diff --git a/silentbob/plugins/plugin_ruby.cxx b/silentbob/plugins/plugin_ruby.cxx index 8ed3ff8..829184a 100644 --- a/silentbob/plugins/plugin_ruby.cxx +++ b/silentbob/plugins/plugin_ruby.cxx @@ -65,33 +65,6 @@ bool ruby_scan_line (const char *S) return false; } -char * ruby_last_word (char * op) -{ - char * d_word; - char * S; - - S = op; - while (*S) { - if (*S == '(' || *S == '=' || *S == '[' || *S == '<') - break; - S++; - } - - while (S[-1] == ' ') - S--; - - *S = 0; - d_word = op; - while (true) { - S = strchr (d_word, ' '); - if (S == NULL) - break; - d_word = S+1; - } - - return d_word; -} - void ruby_tag (char * filename, char * str, int line, FILE * of) { char * S; @@ -191,7 +164,7 @@ int ruby_ctags (char * f_name, FILE * of) void ruby_short_info () { - printf ("Ruby plugin."); + printf ("Ruby language plugin."); } void ruby_long_info () diff --git a/silentbob/rmake b/silentbob/rmake index 4b81f82..33d3420 100755 --- a/silentbob/rmake +++ b/silentbob/rmake @@ -41,7 +41,9 @@ class Main < RubyBuild def build_plugins l = %w(plugin_cache plugin_editor plugin_grep plugin_perl - plugin_perlpackages plugin_python plugin_ruby plugin_ruby_newclass) + plugin_perlpackages plugin_python plugin_ruby plugin_ruby_newclass + plugin_ruby_kinds) + l.each { |one| files = ["plugins/#{one}.cxx"] build_shared("lib#{one}.so", files) diff --git a/silentbob/sblib/Sblib.cxx b/silentbob/sblib/Sblib.cxx index f3494ee..af18a96 100644 --- a/silentbob/sblib/Sblib.cxx +++ b/silentbob/sblib/Sblib.cxx @@ -1281,6 +1281,33 @@ char * ww_last_word (char *d_op) return d_word; } +char * ruby_last_word (char * op) +{ + char * d_word; + char * S; + + S = op; + while (*S) { + if (*S == '(' || *S == '=' || *S == '[' || *S == '<') + break; + S++; + } + + while (S[-1] == ' ') + S--; + + *S = 0; + d_word = op; + while (true) { + S = strchr (d_word, ' '); + if (S == NULL) + break; + d_word = S+1; + } + + return d_word; +} + bool validOption (char *Name) { char *S; diff --git a/silentbob/src/opts_funcs.cxx b/silentbob/src/opts_funcs.cxx index ab16d24..9348c48 100644 --- a/silentbob/src/opts_funcs.cxx +++ b/silentbob/src/opts_funcs.cxx @@ -34,7 +34,7 @@ int opts_funcs (DArray * d_opts, int & i) } if (EQ (opt, "-V") || EQ (opt, "--version")) { - printf ("Silent Bob 1.7.2\n"); + printf ("Silent Bob 1.7.3\n"); exit (0); } -- 2.11.4.GIT