aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/glob.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-10-13 10:51:54 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-10-13 10:51:54 -0700
commitf2efbb46ef89c7c1693400f7209113c50c959f02 (patch)
tree1c44494a9260dc270aac0a5291a7952ab0e74514 /sys/cmd/rc/glob.c
parent0385c87c8434873bdb8b86d35700cdd61286b749 (diff)
Feat(rc): working(ish) version of rc shell
Removed compile commands
Diffstat (limited to 'sys/cmd/rc/glob.c')
-rw-r--r--sys/cmd/rc/glob.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/cmd/rc/glob.c b/sys/cmd/rc/glob.c
index baea44d..f59be4d 100644
--- a/sys/cmd/rc/glob.c
+++ b/sys/cmd/rc/glob.c
@@ -1,8 +1,9 @@
#include "rc.h"
#include "exec.h"
#include "fns.h"
-char *globname;
-struct word *globv;
+
+struct Word *globv;
+char *globname;
/*
* delete all the GLOB marks from s, in place
*/
@@ -25,10 +26,10 @@ globcmp(const void *s, const void *t)
}
void
-globsort(word *left, word *right)
+globsort(Word *left, Word *right)
{
char **list;
- word *a;
+ Word *a;
int n = 0;
for(a = left;a!=right;a = a->next) n++;
list = (char **)emalloc(n*sizeof(char *));
@@ -90,7 +91,7 @@ globdir(char *p, char *namep)
void
glob(char *p)
{
- word *svglobv = globv;
+ Word *svglobv = globv;
int globlen = Globsize(p);
if(!globlen){
deglob(p);
@@ -243,7 +244,7 @@ match(char *s, char *p, int stop)
}
void
-globlist1(word *gl)
+globlist1(Word *gl)
{
if(gl){
globlist1(gl->next);
@@ -254,7 +255,7 @@ globlist1(word *gl)
void
globlist(void)
{
- word *a;
+ Word *a;
globv = 0;
globlist1(runq->argv->words);
poplist();