mirror of
https://github.com/0intro/wmii
synced 2025-03-05 22:51:28 +03:00
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:
parent
6fbcbb537c
commit
45a5bdf823
36
cmd/wm/fs.c
36
cmd/wm/fs.c
@ -60,7 +60,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static char E9pversion[] = "9P version not supported";
|
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 Enofid[] = "fid not assigned";
|
||||||
static char Enofile[] = "file not found";
|
static char Enofile[] = "file not found";
|
||||||
static char Enomode[] = "mode not supported";
|
static char Enomode[] = "mode not supported";
|
||||||
@ -69,24 +69,6 @@ static char Enocommand[] = "command not supported";
|
|||||||
|
|
||||||
const char *err;
|
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 */
|
/* IXP stuff */
|
||||||
|
|
||||||
unsigned long long
|
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);
|
return mkstat(stat, dir, name, 0, DMDIR | DMREAD | DMEXEC);
|
||||||
break;
|
break;
|
||||||
case Fctl:
|
case Fctl:
|
||||||
return mkstat(stat, dir, name, 0, DMREAD | DMWRITE);
|
return mkstat(stat, dir, name, 0, DMWRITE);
|
||||||
break;
|
break;
|
||||||
case Fevent:
|
case Fevent:
|
||||||
return mkstat(stat, dir, name, 0, DMREAD);
|
return mkstat(stat, dir, name, 0, DMREAD);
|
||||||
@ -716,20 +698,8 @@ xread(IXPConn *c, Fcall *fcall)
|
|||||||
p = ixp_enc_stat(p, &stat);
|
p = ixp_enc_stat(p, &stat);
|
||||||
break;
|
break;
|
||||||
case Fctl:
|
case Fctl:
|
||||||
{
|
return Enoperm;
|
||||||
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);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case Ffont:
|
case Ffont:
|
||||||
if((fcall->count = strlen(def.font)))
|
if((fcall->count = strlen(def.font)))
|
||||||
memcpy(p, def.font, fcall->count);
|
memcpy(p, def.font, fcall->count);
|
||||||
|
@ -88,9 +88,6 @@ static char *version[] = {
|
|||||||
" (C)opyright MMIV-MMVI Anselm R. Garbe\n", 0
|
" (C)opyright MMIV-MMVI Anselm R. Garbe\n", 0
|
||||||
};
|
};
|
||||||
|
|
||||||
static char ctlusage[] =
|
|
||||||
"quit - quits the bar\n";
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
@ -474,7 +471,7 @@ type_to_stat(Stat *stat, char *name, Qid *dir)
|
|||||||
return mkstat(stat, dir, name, 0, DMDIR | DMREAD | DMEXEC);
|
return mkstat(stat, dir, name, 0, DMDIR | DMREAD | DMEXEC);
|
||||||
break;
|
break;
|
||||||
case Fctl:
|
case Fctl:
|
||||||
return mkstat(stat, dir, name, 0, DMREAD | DMWRITE);
|
return mkstat(stat, dir, name, 0, DMWRITE);
|
||||||
break;
|
break;
|
||||||
case Fevent:
|
case Fevent:
|
||||||
return mkstat(stat, dir, name, 0, DMREAD);
|
return mkstat(stat, dir, name, 0, DMREAD);
|
||||||
@ -615,8 +612,7 @@ xread(IXPConn *c, Fcall *fcall)
|
|||||||
p = ixp_enc_stat(p, &stat);
|
p = ixp_enc_stat(p, &stat);
|
||||||
break;
|
break;
|
||||||
case Fctl:
|
case Fctl:
|
||||||
fcall->count = strlen(ctlusage);
|
return Enoperm;
|
||||||
memcpy(p, ctlusage, fcall->count);
|
|
||||||
break;
|
break;
|
||||||
case Ffont:
|
case Ffont:
|
||||||
if((fcall->count = strlen(font)))
|
if((fcall->count = strlen(font)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user