removed usage info from ctl files, Uriel will read the code to check what commands each ctl file takes to write the man pages

This commit is contained in:
Anselm R. Garbe 2006-02-04 16:13:11 +02:00
parent 6fbcbb537c
commit 45a5bdf823
2 changed files with 5 additions and 39 deletions

View File

@ -60,7 +60,7 @@
*/
static char E9pversion[] = "9P version not supported";
/*static char Enoperm[] = "permission denied";*/
static char Enoperm[] = "permission denied";
static char Enofid[] = "fid not assigned";
static char Enofile[] = "file not found";
static char Enomode[] = "mode not supported";
@ -69,24 +69,6 @@ static char Enocommand[] = "command not supported";
const char *err;
static char Droot_ctlusage[] =
"quit - quits the wm\n"
"select [next | prev] [index] - selects the page\n"
"attach - attaches the client\n"
"detached - shows detached clients\n"
"pager - shows the pager\n";
static char Dpage_ctlusage[] =
"exec <command> - executes command in page\n"
"select [next | prev] [index] - selects the area\n";
static char Darea_ctlusage[] =
"select [next | prev] [index] - selects the client\n";
static char Dclient_ctlusage[] =
"detach - detaches the client\n"
"kill - kills the client\n";
/* IXP stuff */
unsigned long long
@ -455,7 +437,7 @@ type_to_stat(Stat *stat, char *name, Qid *dir)
return mkstat(stat, dir, name, 0, DMDIR | DMREAD | DMEXEC);
break;
case Fctl:
return mkstat(stat, dir, name, 0, DMREAD | DMWRITE);
return mkstat(stat, dir, name, 0, DMWRITE);
break;
case Fevent:
return mkstat(stat, dir, name, 0, DMREAD);
@ -716,20 +698,8 @@ xread(IXPConn *c, Fcall *fcall)
p = ixp_enc_stat(p, &stat);
break;
case Fctl:
{
char *us = nil;
switch(m->qid.dtype) {
case Droot: us = Droot_ctlusage; break;
case Dpage: us = Dpage_ctlusage; break;
case Darea: us = Darea_ctlusage; break;
case Dclient: us = Dclient_ctlusage; break;
}
if(!us)
return Enofile;
fcall->count = strlen(us);
memcpy(p, us, fcall->count);
return Enoperm;
break;
}
case Ffont:
if((fcall->count = strlen(def.font)))
memcpy(p, def.font, fcall->count);

View File

@ -88,9 +88,6 @@ static char *version[] = {
" (C)opyright MMIV-MMVI Anselm R. Garbe\n", 0
};
static char ctlusage[] =
"quit - quits the bar\n";
static void
usage()
{
@ -474,7 +471,7 @@ type_to_stat(Stat *stat, char *name, Qid *dir)
return mkstat(stat, dir, name, 0, DMDIR | DMREAD | DMEXEC);
break;
case Fctl:
return mkstat(stat, dir, name, 0, DMREAD | DMWRITE);
return mkstat(stat, dir, name, 0, DMWRITE);
break;
case Fevent:
return mkstat(stat, dir, name, 0, DMREAD);
@ -615,8 +612,7 @@ xread(IXPConn *c, Fcall *fcall)
p = ixp_enc_stat(p, &stat);
break;
case Fctl:
fcall->count = strlen(ctlusage);
memcpy(p, ctlusage, fcall->count);
return Enoperm;
break;
case Ffont:
if((fcall->count = strlen(font)))