From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31881 invoked by alias); 10 Aug 2007 20:45:27 -0000 Received: (qmail 31645 invoked by uid 22791); 10 Aug 2007 20:45:25 -0000 X-Spam-Check-By: sourceware.org Received: from b.mail.sonic.net (HELO b.mail.sonic.net) (64.142.19.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 10 Aug 2007 20:45:20 +0000 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l7AKjI93007089 for ; Fri, 10 Aug 2007 13:45:18 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Fri, 10 Aug 2007 13:45:18 -0700 (PDT) Message-ID: <24702.12.7.175.2.1186778718.squirrel@webmail.sonic.net> Date: Fri, 10 Aug 2007 20:45:00 -0000 Subject: [OB] whitespace cleanup, completer.c From: msnyder@sonic.net To: gdb-patches@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20070810134518_95514" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00217.txt.bz2 ------=_20070810134518_95514 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-length: 37 Spaces, caps, that sort of thing... ------=_20070810134518_95514 Content-Type: text/plain; name="ws.txt" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="ws.txt" Content-length: 8424 2007-08-10 Michael Snyder * completer.c: Comment/whitespace cleanup. Index: completer.c =================================================================== RCS file: /cvs/src/src/gdb/completer.c,v retrieving revision 1.18 diff -p -r1.18 completer.c *** completer.c 9 Jan 2007 17:58:50 -0000 1.18 --- completer.c 10 Aug 2007 20:34:37 -0000 *************** *** 22,28 **** #include "symtab.h" #include "gdbtypes.h" #include "expression.h" ! #include "filenames.h" /* for DOSish file names */ #include "language.h" #include "cli/cli-decode.h" --- 22,28 ---- #include "symtab.h" #include "gdbtypes.h" #include "expression.h" ! #include "filenames.h" /* For DOSish file names. */ #include "language.h" #include "cli/cli-decode.h" *************** *** 40,46 **** #include "completer.h" ! /* Prototypes for local functions */ static char *line_completion_function (const char *text, int matches, char *line_buffer, --- 40,46 ---- #include "completer.h" ! /* Prototypes for local functions. */ static char *line_completion_function (const char *text, int matches, char *line_buffer, *************** char *line_completion_function (const ch *** 63,69 **** word break characters, since we use it in command names. If the readline library sees one in any of the current completion strings, it thinks that the string needs to be quoted and automatically supplies ! a leading quote. */ static char *gdb_completer_command_word_break_characters = " \t\n!@#$%^&*()+=|~`}{[]\"';:?/>.<,"; --- 63,69 ---- word break characters, since we use it in command names. If the readline library sees one in any of the current completion strings, it thinks that the string needs to be quoted and automatically supplies ! a leading quote. */ static char *gdb_completer_command_word_break_characters = " \t\n!@#$%^&*()+=|~`}{[]\"';:?/>.<,"; *************** static char *gdb_completer_loc_break_cha *** 85,94 **** /* Characters that can be used to quote completion strings. Note that we can't include '"' because the gdb C parser treats such quoted sequences ! as strings. */ static char *gdb_completer_quote_characters = "'"; ! /* Accessor for some completer data that may interest other files. */ char * get_gdb_completer_quote_characters (void) --- 85,94 ---- /* Characters that can be used to quote completion strings. Note that we can't include '"' because the gdb C parser treats such quoted sequences ! as strings. */ static char *gdb_completer_quote_characters = "'"; ! /* Accessor for some completer data that may interest other files. */ char * get_gdb_completer_quote_characters (void) *************** location_completer (char *text, char *wo *** 231,237 **** if (*p == quote_found) quote_found = 0; else ! break; /* hit the end of text */ } #if HAVE_DOS_BASED_FILE_SYSTEM /* If we have a DOS-style absolute file name at the beginning of --- 231,237 ---- if (*p == quote_found) quote_found = 0; else ! break; /* Hit the end of text. */ } #if HAVE_DOS_BASED_FILE_SYSTEM /* If we have a DOS-style absolute file name at the beginning of *************** complete_line (const char *text, char *l *** 395,401 **** rl_completer_word_break_characters = current_language->la_word_break_characters(); ! /* Decide whether to complete on a list of gdb commands or on symbols. */ tmp_command = (char *) alloca (point + 1); p = tmp_command; --- 395,401 ---- rl_completer_word_break_characters = current_language->la_word_break_characters(); ! /* Decide whether to complete on a list of gdb commands or on symbols. */ tmp_command = (char *) alloca (point + 1); p = tmp_command; *************** complete_line (const char *text, char *l *** 486,492 **** list = complete_on_cmdlist (*c->prefixlist, p, word); /* Insure that readline does the right thing ! with respect to inserting quotes. */ rl_completer_word_break_characters = gdb_completer_command_word_break_characters; } --- 486,492 ---- list = complete_on_cmdlist (*c->prefixlist, p, word); /* Insure that readline does the right thing ! with respect to inserting quotes. */ rl_completer_word_break_characters = gdb_completer_command_word_break_characters; } *************** complete_line (const char *text, char *l *** 551,558 **** list = complete_on_cmdlist (result_list, q, word); ! /* Insure that readline does the right thing ! with respect to inserting quotes. */ rl_completer_word_break_characters = gdb_completer_command_word_break_characters; } --- 551,558 ---- list = complete_on_cmdlist (result_list, q, word); ! /* Insure that readline does the right thing ! with respect to inserting quotes. */ rl_completer_word_break_characters = gdb_completer_command_word_break_characters; } *************** complete_line (const char *text, char *l *** 624,645 **** free the string. */ static char * ! line_completion_function (const char *text, int matches, char *line_buffer, int point) { ! static char **list = (char **) NULL; /* Cache of completions */ ! static int index; /* Next cached completion */ char *output = NULL; if (matches == 0) { /* The caller is beginning to accumulate a new set of completions, so we need to find all of them now, and cache them for returning one at ! a time on future calls. */ if (list) { /* Free the storage used by LIST, but not by the strings inside. ! This is because rl_complete_internal () frees the strings. */ xfree (list); } index = 0; --- 624,646 ---- free the string. */ static char * ! line_completion_function (const char *text, int matches, ! char *line_buffer, int point) { ! static char **list = (char **) NULL; /* Cache of completions. */ ! static int index; /* Next cached completion. */ char *output = NULL; if (matches == 0) { /* The caller is beginning to accumulate a new set of completions, so we need to find all of them now, and cache them for returning one at ! a time on future calls. */ if (list) { /* Free the storage used by LIST, but not by the strings inside. ! This is because rl_complete_internal () frees the strings. */ xfree (list); } index = 0; *************** line_completion_function (const char *te *** 650,656 **** dole them out one at a time. The vector of completions is NULL terminated, so after returning the last one, return NULL (and continue to do so) each time we are called after that, until a new list is ! available. */ if (list) { --- 651,657 ---- dole them out one at a time. The vector of completions is NULL terminated, so after returning the last one, return NULL (and continue to do so) each time we are called after that, until a new list is ! available. */ if (list) { *************** skip_quoted_chars (char *str, char *quot *** 696,705 **** { if (quote_char != '\0') { ! /* Ignore everything until the matching close quote char */ if (*scan == quote_char) { ! /* Found matching close quote. */ scan++; break; } --- 697,706 ---- { if (quote_char != '\0') { ! /* Ignore everything until the matching close quote char. */ if (*scan == quote_char) { ! /* Found matching close quote. */ scan++; break; } *************** skip_quoted_chars (char *str, char *quot *** 720,726 **** /* Skip over the possibly quoted word STR (as defined by the quote characters and word break characters used by the completer). ! Returns pointer to the location after the "word". */ char * skip_quoted (char *str) --- 721,727 ---- /* Skip over the possibly quoted word STR (as defined by the quote characters and word break characters used by the completer). ! Returns pointer to the location after the "word". */ char * skip_quoted (char *str) ------=_20070810134518_95514--