PennMUSH Community

root/1.8.3/trunk/src/funlocal.dst

Revision 469, 1.0 kB (checked in by pennmush, 2 years ago)

PennMUSH 1.7.7p35 Archival

Line 
1 /*-----------------------------------------------------------------
2  * Local functions
3  *
4  * This file is reserved for local functions that you may wish
5  * to hack into PennMUSH. Read parse.h for information on adding
6  * functions. This file will not be overwritten when you update
7  * to a new distribution, so it's preferable to add new functions
8  * here and leave the other fun*.c files alone.
9  *
10  */
11
12 /* Here are some includes you're likely to need or want.
13  * If your functions are doing math, include <math.h>, too.
14  */
15 #include "copyrite.h"
16 #include "config.h"
17 #include <string.h>
18 #include "conf.h"
19 #include "externs.h"
20 #include "parse.h"
21 #include "confmagic.h"
22 #include "function.h"
23
24 void local_functions(void);
25
26 /* Here you can use the new add_function instead of hacking into function.c
27  * Example included :)
28  */
29
30 #ifdef EXAMPLE
31 FUNCTION(local_fun_silly)
32 {
33   safe_format(buff, bp, "Silly%sSilly", args[0]);
34 }
35
36 #endif
37
38 void
39 local_functions(void)
40 {
41 #ifdef EXAMPLE
42   function_add("SILLY", local_fun_silly, 1, 1, FN_REG);
43 #endif
44 }
Note: See TracBrowser for help on using the browser.