diff options
-rw-r--r-- | dir.c | 2 | ||||
-rw-r--r-- | lib/optparse.rb | 12 | ||||
-rw-r--r-- | pack.c | 5 | ||||
-rw-r--r-- | parse.y | 12 |
4 files changed, 14 insertions, 17 deletions
@@ -1061,7 +1061,7 @@ find_dirsep(const char *s, int flags) return (char *)p-1; } -/* Remove escaping baskclashes */ +/* Remove escaping baskslashes */ static void remove_backslashes(p) char *p; diff --git a/lib/optparse.rb b/lib/optparse.rb index 2c034043e0..2c91cd004f 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -398,8 +398,7 @@ class OptionParser self end - # :nodoc: - def add_banner(to) + def add_banner(to) # :nodoc: unless @short or @long s = desc.join to << " [" + s + "]..." unless s.empty? @@ -407,8 +406,7 @@ class OptionParser to end - # :nodoc: - def match_nonswitch?(str) + def match_nonswitch?(str) # :nodoc: @pattern =~ str unless @short or @long end @@ -643,8 +641,7 @@ class OptionParser end end - # :nodoc: - def add_banner(to) + def add_banner(to) # :nodoc: list.each do |opt| if opt.respond_to?(:add_banner) opt.add_banner(to) @@ -1244,8 +1241,7 @@ class OptionParser parse_in_order(argv, &nonopt) end - # :nodoc: - def parse_in_order(argv = default_argv, setter = nil, &nonopt) + def parse_in_order(argv = default_argv, setter = nil, &nonopt) # :nodoc: opt, arg, sw, val, rest = nil nonopt ||= proc {|arg| throw :terminate, arg} argv.unshift(arg) if arg = catch(:terminate) { @@ -1402,7 +1402,6 @@ pack_unpack(str, fmt) s += len; break; - case 'b': { VALUE bitstr; @@ -1562,6 +1561,7 @@ pack_unpack(str, fmt) } PACK_ITEM_ADJUST(); break; + case 'L': PACK_LENGTH_ADJUST(unsigned long,4); while (len-- > 0) { @@ -1582,7 +1582,8 @@ pack_unpack(str, fmt) } PACK_ITEM_ADJUST(); break; - case 'Q': + + case 'Q': PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE); while (len-- > 0) { char *tmp = (char*)s; @@ -83,11 +83,11 @@ static int yyerror(); static enum lex_state { EXPR_BEG, /* ignore newline, +/- is a sign. */ - EXPR_END, /* newline significant, +/- is a operator. */ - EXPR_ARG, /* newline significant, +/- is a operator. */ - EXPR_CMDARG, /* newline significant, +/- is a operator. */ - EXPR_ENDARG, /* newline significant, +/- is a operator. */ - EXPR_MID, /* newline significant, +/- is a operator. */ + EXPR_END, /* newline significant, +/- is an operator. */ + EXPR_ARG, /* newline significant, +/- is an operator. */ + EXPR_CMDARG, /* newline significant, +/- is an operator. */ + EXPR_ENDARG, /* newline significant, +/- is an operator. */ + EXPR_MID, /* newline significant, +/- is an operator. */ EXPR_FNAME, /* ignore newline, no reserved words. */ EXPR_DOT, /* right after `.' or `::', no reserved words. */ EXPR_CLASS, /* immediate after `class', no here document. */ @@ -6105,7 +6105,7 @@ rb_id2name(id) char *name; if (id < tLAST_TOKEN) { - int i = 0; + int i; for (i=0; op_tbl[i].token; i++) { if (op_tbl[i].token == id) |