annotate 3rdparty/packages/ed/unmkpat.c @ 994:bef1844de0dc

The ED editor ported from Minix
author roug
date Sun, 23 Feb 2003 21:11:37 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
994
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
1 /* unmkpat.c */
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
2 #include <stdio.h>
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
3 #include "tools.h"
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
4
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
5 /* Free up the memory usde for token string */
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
6 unmakepat(head)
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
7 TOKEN *head;
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
8 {
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
9
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
10 register TOKEN *old_head;
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
11
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
12 while (head) {
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
13 switch (head->tok) {
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
14 case CCL:
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
15 case NCCL:
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
16 free(head->bitmap);
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
17 /* Fall through to default */
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
18
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
19 default:
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
20 old_head = head;
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
21 head = head->next;
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
22 free((char *) old_head);
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
23 break;
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
24 }
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
25 }
bef1844de0dc The ED editor ported from Minix
roug
parents:
diff changeset
26 }