aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/here.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/rc/here.c')
-rw-r--r--sys/cmd/rc/here.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/sys/cmd/rc/here.c b/sys/cmd/rc/here.c
index 17c6245..8175b04 100644
--- a/sys/cmd/rc/here.c
+++ b/sys/cmd/rc/here.c
@@ -2,12 +2,14 @@
#include "exec.h"
#include "io.h"
#include "fns.h"
-struct here *here, **ehere;
+
+struct Here *here, **ehere;
+
int ser = 0;
char tmp[]="/tmp/here0000.0000";
char hex[]="0123456789abcdef";
-void psubst(io*, char*);
-void pstrs(io*, word*);
+void psubst(Io*, char*);
+void pstrs(Io*, Word*);
void
hexnum(char *p, int n)
@@ -18,10 +20,11 @@ hexnum(char *p, int n)
*p = hex[n&0xF];
}
-tree*
-heredoc(tree *tag)
+Tree*
+heredoc(Tree *tag)
{
- struct here *h = new(struct here);
+ struct Here *h = new(struct Here);
+
if(tag->type!=WORD)
yyerror("Bad here tag");
h->next = 0;
@@ -45,8 +48,8 @@ heredoc(tree *tag)
void
readhere(void)
{
- struct here *h, *nexth;
- io *f;
+ struct Here *h, *nexth;
+ Io *f;
char *s, *tag;
int c, subst;
char line[NLINE+1];
@@ -86,11 +89,11 @@ readhere(void)
}
void
-psubst(io *f, char *s)
+psubst(Io *f, char *s)
{
char *t, *u;
int savec, n;
- word *star;
+ Word *star;
while(*s){
if(*s!='$'){
if(0xa0<=(*s&0xff) && (*s&0xff)<=0xf5){
@@ -137,7 +140,7 @@ psubst(io *f, char *s)
}
void
-pstrs(io *f, word *a)
+pstrs(Io *f, Word *a)
{
if(a){
while(a->next && a->next->word){