summaryrefslogtreecommitdiff
path: root/zwgc/node.c
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@mit.edu>2008-01-21 03:11:44 +0000
committerGravatar Karl Ramm <kcr@mit.edu>2008-01-21 03:11:44 +0000
commitb6ea75cfc9712b77a0886c4348d6fb519641e40e (patch)
tree65f68bb2db7c6118e80670cd5edc297159f43409 /zwgc/node.c
parent71f70d3066d1c038e1794c4ffe804591eda3d1af (diff)
de K&Rify, fix prototypes
Diffstat (limited to 'zwgc/node.c')
-rw-r--r--zwgc/node.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/zwgc/node.c b/zwgc/node.c
index f3603d3..f04225e 100644
--- a/zwgc/node.c
+++ b/zwgc/node.c
@@ -60,8 +60,8 @@ static int last_node_in_current_bunch_used = -1;
* string on the heap when node_DestroyAllNodes is called.
*/
-static Node *node_create(opcode)
- int opcode;
+static Node *
+node_create(int opcode)
{
Node *result;
@@ -102,7 +102,8 @@ static Node *node_create(opcode)
*
*/
-void node_DestroyAllNodes()
+void
+node_DestroyAllNodes(void)
{
struct _bunch_of_nodes *next_bunch;
int i, last_node_used_in_this_bunch;
@@ -132,9 +133,9 @@ void node_DestroyAllNodes()
/* */
/****************************************************************************/
-Node *node_create_string_constant(opcode, text)
- int opcode;
- string text;
+Node *
+node_create_string_constant(int opcode,
+ string text)
{
Node *n;
@@ -143,8 +144,8 @@ Node *node_create_string_constant(opcode, text)
return(n);
}
-Node *node_create_noary(opcode)
- int opcode;
+Node *
+node_create_noary(int opcode)
{
Node *n;
@@ -152,9 +153,9 @@ Node *node_create_noary(opcode)
return(n);
}
-Node *node_create_unary(opcode, arg)
- int opcode;
- Node *arg;
+Node *
+node_create_unary(int opcode,
+ Node *arg)
{
Node *n;
@@ -163,10 +164,10 @@ Node *node_create_unary(opcode, arg)
return(n);
}
-Node *node_create_binary(opcode, first_arg, second_arg)
- int opcode;
- Node *first_arg;
- Node *second_arg;
+Node *
+node_create_binary(int opcode,
+ Node *first_arg,
+ Node *second_arg)
{
Node *n;
@@ -191,8 +192,8 @@ Node *node_create_binary(opcode, first_arg, second_arg)
* the address of the (previously) last node.
*/
-Node *reverse_list_of_nodes(list)
- Node *list;
+Node *
+reverse_list_of_nodes(Node *list)
{
Node *next_node;
Node *head = NULL;
@@ -220,9 +221,9 @@ Node *reverse_list_of_nodes(list)
#ifdef DEBUG
-static void print_stuff(node, format_string)
- Node *node;
- string format_string;
+static void
+print_stuff(Node *node,
+ string format_string)
{
char c;
@@ -311,8 +312,7 @@ static string how_to_print[] = {
"match %1\n%2",
"default\n%2" };
-void node_display(node)
- Node *node;
+void node_display(Node *node)
{
int opcode = LAST_EXPR_OPCODE + 1;