From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16885 invoked by alias); 14 Jul 2002 12:13:45 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16878 invoked from network); 14 Jul 2002 12:13:44 -0000 Received: from unknown (HELO crushed.velvet.net) (62.49.231.23) by sources.redhat.com with SMTP; 14 Jul 2002 12:13:44 -0000 Received: from aidan by crushed.velvet.net with local (Exim 3.33 #1) id 17TiG4-0004UI-00 for gdb-patches@sources.redhat.com; Sun, 14 Jul 2002 13:13:48 +0100 Date: Sun, 14 Jul 2002 08:04:00 -0000 From: Aidan Skinner To: gdb-patches@sources.redhat.com Subject: [RFA] ada-tasks.c: k&r defn cleanup Message-ID: <20020714131348.L21268@velvet.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="iXVVnr8Hn1WiTnFI" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-SW-Source: 2002-07/txt/msg00297.txt.bz2 --iXVVnr8Hn1WiTnFI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 4970 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 + + * ada-tasks.c: change k&r style function definitions to prototyped + form. + 2002-07-13 Aidan Skinner =20 * ada-tasks.c (add_task_entry): replace calls to Index: ada-tasks.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =3D 0; /* 1 if the thread library in use is supported */ static int gdbtk_task_initialization =3D 0; =20 -static int add_task_entry (p_task_id, index) - void *p_task_id; - int index; +static int=20 +add_task_entry (void *p_task_id, int index) { struct task_entry *new_task_entry =3D NULL; struct task_entry *pt; @@ -182,8 +181,7 @@ } =20 int=20 -get_entry_number (p_task_id) - void *p_task_id; +get_entry_number (void *p_task_id) { struct task_entry *pt; =20 @@ -197,8 +195,8 @@ return 0; } =20 -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; =20 @@ -212,8 +210,8 @@ return 0; } =20 -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; =20 @@ -227,7 +225,8 @@ return NULL; } =20 -void init_task_list () +void +init_task_list (void) { struct task_entry *pt, *old_pt; =20 @@ -242,13 +241,14 @@ highest_task_num =3D 0; } =20 -int valid_task_id (task) - int task; +int +valid_task_id (int task) { return get_entry_vptr (task) !=3D NULL; } =20 -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 */ =20 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 */ =20 -print_align () +print_align (void) { struct task_fields tf; void *tf_base =3D &(tf); @@ -448,9 +446,7 @@ /* Print information about currently known tasks */ =20 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. */ =20 int -gdbtk_tcl_tasks_initialize () +gdbtk_tcl_tasks_initialize (void) { gdbtk_task_initialization =3D 1; info_tasks ("", gdb_stdout); @@ -688,9 +684,7 @@ } =20 static void -info_tasks_command (arg, from_tty) - char *arg; - int from_tty; +info_tasks_command (char *arg, int from_tty) { if (arg =3D=3D NULL || *arg =3D=3D '\000') info_tasks (arg, from_tty); @@ -702,7 +696,6 @@ =20 static void switch_to_thread (ptid_t ptid) - { if (ptid_equal (ptid, inferior_ptid)) return; @@ -716,8 +709,8 @@ =20 /* Switch to a specified task. */ =20 -static int task_switch (tid, lwpid) - void *tid, *lwpid; +static int +task_switch (void *tid, void *lwpid) { int res =3D 0, pid; =20 @@ -745,9 +738,8 @@ return -1; } =20 -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 @@ } =20 void -_initialize_tasks () +_initialize_tasks (void ) { static struct cmd_list_element *task_cmd_list =3D NULL; extern struct cmd_list_element *cmdlist; - Aidan --=20 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=20 C2D0 9A2C 4CC9 3EC4 75E1 | it clashes with the sunset --iXVVnr8Hn1WiTnFI Content-Type: application/pgp-signature Content-Disposition: inline Content-length: 230 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (OpenBSD) Comment: For info see http://www.gnupg.org iD8DBQE9MWr7mixMyT7EdeERAi1LAJ9EyGYPQsW6dhRhJL/B0sW4YMBrQwCfalRA Hnlk1qnupGqTk9GwxGiKdf8= =ztNu -----END PGP SIGNATURE----- --iXVVnr8Hn1WiTnFI--