Author Topic: Undocumented E/S/Lfun identification  (Read 2927 times)

Offline Archaegeo

  • Acquaintance
  • *
  • Posts: 33
    • View Profile
Undocumented E/S/Lfun identification
« on: January 11, 2008, 11:29:08 pm »
The following snippet of code will show you which of the funs in /secure/sefun/sefun.h are not documented via man (ie in /doc/sefuns/ or /doc/efun/all/ or /doc/lfun/all).

So out of the 270 functions in sefun.h in 2.6.2, about 150 are missing documentation (but are still useful).

Code: [Select]
int d;
string b;
string fun;
string *funs;
string *sdi=get_dir("/doc/sefun/");
string *edi=get_dir("/doc/efun/all/");
string *ldi=get_dir("/doc/lfun/all/");
string fi=read_file("/secure/sefun/sefun.h");
funs=explode(fi, "\n");
foreach(fun in funs){
   if(strsrch(fun, ";") != -1 && strsrch(fun, "//")==-1){
      b=fun[0..strsrch(fun,"(")-1];
      b=b[strsrch(b, "",-1)+1..];
      sscanf(b, "*%s",b);
   }
   if(member_array(b, sdi) == -1 && member_array(b, edi) == -1 && member_array(b, ldi) == -1){
      write(b);d++;
   }
}
write("Total: "+d);

Offline Ashon

  • Acquaintance
  • *
  • Posts: 24
    • View Profile
    • http://talosmud.wordpress.com/
Re: Undocumented E/S/Lfun identification
« Reply #1 on: January 21, 2008, 01:43:57 pm »
We should start a documentation project where we actually finish documenting the last 150 functions

Offline wodan

  • BFF
  • ***
  • Posts: 434
  • Drink and code, you know you want to!
    • View Profile
Re: Undocumented E/S/Lfun identification
« Reply #2 on: January 21, 2008, 02:03:31 pm »
where does the list in that .h come from though? is that complete?

Offline Raudhrskal

  • BFF
  • ***
  • Posts: 214
  • The MUD community needs YOUR help!
    • View Profile
Re: Undocumented E/S/Lfun identification
« Reply #3 on: January 22, 2008, 12:35:14 am »
Let the mighty Documentation answer your question:
Make sure the sefun is prototyped in /secure/sefun/sefun.h

If the sefun is in a new file you created, make sure
that /secure/sefun/sefun.c inherits that file.
I think, therefore i may be wrong.
Please note that if you met a Raudhrskal in a place that's not related to muds, it wasn't me. *sigh*... back when I started there was zero hits on google for that name...