From: msnyder@sonic.net
To: gdb-patches@sourceware.org
Subject: [OB] whitespace cleanup, completer.c
Date: Fri, 10 Aug 2007 20:45:00 -0000 [thread overview]
Message-ID: <24702.12.7.175.2.1186778718.squirrel@webmail.sonic.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 37 bytes --]
Spaces, caps, that sort of thing...
[-- Attachment #2: ws.txt --]
[-- Type: text/plain, Size: 8424 bytes --]
2007-08-10 Michael Snyder <msnyder@access-company.com>
* 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 = "'";
\f
! /* 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 = "'";
\f
! /* 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)
next reply other threads:[~2007-08-10 20:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-10 20:45 msnyder [this message]
2007-08-11 9:42 ` Eli Zaretskii
2007-08-11 20:09 ` msnyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24702.12.7.175.2.1186778718.squirrel@webmail.sonic.net \
--to=msnyder@sonic.net \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox