* [RFA] ada-tasks.c: k&r defn cleanup
@ 2002-07-14 8:04 Aidan Skinner
2002-07-14 8:13 ` Andrew Cagney
2002-07-14 10:12 ` Joel Brobecker
0 siblings, 2 replies; 3+ messages in thread
From: Aidan Skinner @ 2002-07-14 8:04 UTC (permalink / raw)
To: gdb-patches
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] ada-tasks.c: k&r defn cleanup
2002-07-14 8:04 [RFA] ada-tasks.c: k&r defn cleanup Aidan Skinner
@ 2002-07-14 8:13 ` Andrew Cagney
2002-07-14 10:12 ` Joel Brobecker
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2002-07-14 8:13 UTC (permalink / raw)
To: Aidan Skinner; +Cc: gdb-patches
> 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.
Yes!
> 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.
Just a style tweak to get the hang of ...
> 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.
Edit-case ``change''. It should be a sentence, leading capital,
trailing period.
enjoy,
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] ada-tasks.c: k&r defn cleanup
2002-07-14 8:04 [RFA] ada-tasks.c: k&r defn cleanup Aidan Skinner
2002-07-14 8:13 ` Andrew Cagney
@ 2002-07-14 10:12 ` Joel Brobecker
1 sibling, 0 replies; 3+ messages in thread
From: Joel Brobecker @ 2002-07-14 10:12 UTC (permalink / raw)
To: Aidan Skinner; +Cc: gdb-patches
> +2002-07-14 Aidan Skinner <aidan@velvet.net>
> +
> + * ada-tasks.c: change k&r style function definitions to prototyped
> + form.
Thank you. Some very very minor comments, as I happened to make the same
changes in our tree:
> -info_task (arg, from_tty)
> - char *arg;
> - int from_tty;
> +info_task (char * arg, int from_tty)
^-- Remove the space here?
> -_initialize_tasks ()
> +_initialize_tasks (void )
^-- Remove this space.
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-07-14 17:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-14 8:04 [RFA] ada-tasks.c: k&r defn cleanup Aidan Skinner
2002-07-14 8:13 ` Andrew Cagney
2002-07-14 10:12 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox