From: Aidan Skinner <aidan@velvet.net>
To: gdb-patches@sources.redhat.com
Subject: [RFA] ada-tasks.c: k&r defn cleanup
Date: Sun, 14 Jul 2002 08:04:00 -0000 [thread overview]
Message-ID: <20020714131348.L21268@velvet.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 4819 bytes --]
Ok, I'm asking for approval for this patch because I'm a wuss and I'd
like to make sure that what I'm doing for this is correct. This patch
changes all the k&r function definitions in ada-tasks.c to use the
prototyped form, and makes grep ^func work.
If this is ok, I'll commit this and then make similar changes to
ada-lang.c, ada-typeprint.c and ada-valprint.c and commit them as
obvious over the next few days.
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.2905
diff -u -r1.2905 ChangeLog
--- ChangeLog 13 Jul 2002 12:25:16 -0000 1.2905
+++ ChangeLog 14 Jul 2002 12:12:33 -0000
@@ -1,3 +1,8 @@
+2002-07-14 Aidan Skinner <aidan@velvet.net>
+
+ * ada-tasks.c: change k&r style function definitions to prototyped
+ form.
+
2002-07-13 Aidan Skinner <aidan@velvet.net>
* ada-tasks.c (add_task_entry): replace calls to
Index: ada-tasks.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-tasks.c,v
retrieving revision 1.2
diff -u -r1.2 ada-tasks.c
--- ada-tasks.c 13 Jul 2002 12:24:05 -0000 1.2
+++ ada-tasks.c 14 Jul 2002 12:04:35 -0000
@@ -156,9 +156,8 @@
int thread_support = 0; /* 1 if the thread library in use is supported */
static int gdbtk_task_initialization = 0;
-static int add_task_entry (p_task_id, index)
- void *p_task_id;
- int index;
+static int
+add_task_entry (void *p_task_id, int index)
{
struct task_entry *new_task_entry = NULL;
struct task_entry *pt;
@@ -182,8 +181,7 @@
}
int
-get_entry_number (p_task_id)
- void *p_task_id;
+get_entry_number (void *p_task_id)
{
struct task_entry *pt;
@@ -197,8 +195,8 @@
return 0;
}
-static struct task_entry *get_thread_entry_vptr (thread)
- void *thread;
+static struct task_entry *
+get_thread_entry_vptr (void *thread)
{
struct task_entry *pt;
@@ -212,8 +210,8 @@
return 0;
}
-static struct task_entry *get_entry_vptr (p_task_num)
- int p_task_num;
+static struct task_entry *
+get_entry_vptr (int p_task_num)
{
struct task_entry *pt;
@@ -227,7 +225,8 @@
return NULL;
}
-void init_task_list ()
+void
+init_task_list (void)
{
struct task_entry *pt, *old_pt;
@@ -242,13 +241,14 @@
highest_task_num = 0;
}
-int valid_task_id (task)
- int task;
+int
+valid_task_id (int task)
{
return get_entry_vptr (task) != NULL;
}
-void *get_self_id ()
+void *
+get_self_id (void)
{
struct value* val;
void *self_id;
@@ -286,9 +286,7 @@
/* Print detailed information about specified task */
static void
-info_task (arg, from_tty)
- char *arg;
- int from_tty;
+info_task (char * arg, int from_tty)
{
void *temp_task;
struct task_entry *pt, *pt2;
@@ -417,7 +415,7 @@
tasks_fields structure
*/
-print_align ()
+print_align (void)
{
struct task_fields tf;
void *tf_base = &(tf);
@@ -448,9 +446,7 @@
/* Print information about currently known tasks */
static void
-info_tasks (arg, from_tty)
- char *arg;
- int from_tty;
+info_tasks (char *arg, int from_tty)
{
struct value* val;
int i, task_number, state;
@@ -679,7 +675,7 @@
actually print anything. */
int
-gdbtk_tcl_tasks_initialize ()
+gdbtk_tcl_tasks_initialize (void)
{
gdbtk_task_initialization = 1;
info_tasks ("", gdb_stdout);
@@ -688,9 +684,7 @@
}
static void
-info_tasks_command (arg, from_tty)
- char *arg;
- int from_tty;
+info_tasks_command (char *arg, int from_tty)
{
if (arg == NULL || *arg == '\000')
info_tasks (arg, from_tty);
@@ -702,7 +696,6 @@
static void
switch_to_thread (ptid_t ptid)
-
{
if (ptid_equal (ptid, inferior_ptid))
return;
@@ -716,8 +709,8 @@
/* Switch to a specified task. */
-static int task_switch (tid, lwpid)
- void *tid, *lwpid;
+static int
+task_switch (void *tid, void *lwpid)
{
int res = 0, pid;
@@ -745,9 +738,8 @@
return -1;
}
-static void task_command (tidstr, from_tty)
- char *tidstr;
- int from_tty;
+static void
+task_command (char *tidstr, int from_tty)
{
int num;
struct task_entry *e;
@@ -789,7 +781,7 @@
}
void
-_initialize_tasks ()
+_initialize_tasks (void )
{
static struct cmd_list_element *task_cmd_list = NULL;
extern struct cmd_list_element *cmdlist;
- Aidan
--
aidan@velvet.net http://www.velvet.net/~aidan/ aim:aidans42
finger for pgp key fingerprint |- - - - - - - - - - - - - - -
01AA 1594 2DB0 09E3 B850 | Take down the Union Jack
C2D0 9A2C 4CC9 3EC4 75E1 | it clashes with the sunset
[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]
next reply other threads:[~2002-07-14 12:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-14 8:04 Aidan Skinner [this message]
2002-07-14 8:13 ` Andrew Cagney
2002-07-14 10:12 ` Joel Brobecker
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=20020714131348.L21268@velvet.net \
--to=aidan@velvet.net \
--cc=gdb-patches@sources.redhat.com \
/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