MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
[MUD-Dev] Re: Bruce Sterling on Virtual Community goals
[Jon Leonard:]
(Oops - I just realized I left off an attribution a few minutes ago.
Sorry about that - I was following up a message by Jon Leonard.)
>Left to my own devices, I'd implement these calls as C functions.
>Each module would have a structure listing the names of the functions
>it exported and function pointers. The structure might include stuff
>about calling conventions, a documentation string, etc. In my current
>server, all functions take and return linked lists of arguments/results,
>but that's not necessarily the best choice.
Yup, that works just fine. Here's a small snippet of mine:
r_bi3("SubString", (Comp_t) SubString, T_S,
"str", T_S, "start", T_I, "length", T_I);
r_bi1("Length", (Comp_t) Length, T_I, "str", T_S);
r_bi1("Capitalize", (Comp_t) Capitalize, T_S, "str", T_S);
r_bi1("Pluralize", (Comp_t) Pluralize, T_S, "str", T_S);
(<func-name> <ptr-to-C-code> <result-type> {<arg-name> <arg-type>}*)
etc. An advantage of having the parameter names and types in the
internal system is that the on-line programmer can then ask the system
what the parameters of a given builtin are. And, if you make the
internal function-header representation the same as for user functions,
you just use the same code to display them, and for checking calls.
--
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA
- Thread context:
- [MUD-Dev] Re: Bruce Sterling on Virtual Community goals, (continued)
- [MUD-Dev] Re: Bruce Sterling on Virtual Community goals,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Tue 20 Oct 1998, 04:50 GMT
- [MUD-Dev] Re: Bruce Sterling on Virtual Community goals,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Tue 20 Oct 1998, 05:08 GMT
- [MUD-Dev] Re: Bruce Sterling on Virtual Community goals,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Tue 20 Oct 1998, 05:17 GMT
- [MUD-Dev] Re: Bruce Sterling on Virtual Community goals,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Wed 21 Oct 1998, 05:14 GMT
- [MUD-Dev] Re: Bruce Sterling on Virtual Community goals,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Wed 21 Oct 1998, 05:29 GMT
- [MUD-Dev] Re: Bruce Sterling on Virtual Community goals,
Bruce Mitchener, Jr. bruce#puremagic,com, Wed 21 Oct 1998, 06:04 GMT
[ Other Periods
| Other mailing lists
| Search
]