home *** CD-ROM | disk | FTP | other *** search
- FIDOADR.C - 3/7/92 - David H. Bennett - V1.0
-
- - Intro
-
- These are some useful routines for parseing Fidonet addresses. They
- are rather generic and should compile on =any= ANSI C compiler that
- is worth it's salt.
-
- There's nothing more depressing than seeing a new 'C' library come
- across the PDN or your BBS only on un-archive it and find out it's
- some small model library asking for a shareware contribution. It's
- nice to open an archive every now and then that's free with no dollar
- signs in the documentation :)
-
- - License, Ethical and Legal ramifications for the use of this highly
- important and leading edge high technology software.
-
- (null)
-
- - Files
-
- FATEST C 1637 03-07-92 2:30p Test Program
- FATEST EXE 12840 03-07-92 2:30p Test Program
- FIDOADR C 3612 03-07-92 2:52p C Source.
- FIDOADR H 748 03-03-92 11:04p Header file
- FIDOADR TST 174 02-20-91 1:18a Test Data
- README TXT 2287 03-07-92 2:52p Your Reading It....
- RESULTS TXT 1982 03-07-92 2:30p Results of the tests
- TESTIT BAT 36 03-07-92 2:28p Batch file to run tests on funcs
-
- - Structures:
-
- FIDOADR - Used to hold a 'C' structured fido address for program
- processing.
-
- /*
- * Net node spec
- */
- typedef struct {
- word zone; /* Fidonet zone */
- word net; /* net */
- word node; /* node */
- word point; /* point */
- char domain[64]; /* domain */
- } FIDOADR;
-
- You can declare in your ANSI 'C' programs using the declaration:
-
- FIDOADR fa=DEF_FIDOADR;
-
- which will start you with a clean slate.
-
- - Routines
-
-
- void fidoadr_split(char *addr, FIDOADR *fadr)
- -------------------------------------------------
- This routine splits the null terminated ASCII representation of
- a fidonet address into a FIDOADR structure.
-
-
- char *fidoadr_merge(char *addr, FIDOADR *fadr)
- -------------------------------------------------
- This routine merges a FIDOADR structure into a ASCII representation
- of the fidonet address.
-
-
- char *fidostr(char *dest, word zone, word net, word node)
- -------------------------------------------------
- Return a simple 3D fido address given zone:net/node.
-
-
- void fidosplit(char *src, word *zone, word *net, word *node)
- -------------------------------------------------
- Split a simple 3D address into three zone, net, & node.
-
-
- void hexadr_split(char *hexadr, word *net, word *node)
- -------------------------------------------------
- Split a 2D fido hex address (Used by BinkleyTerm and other programs)
- into a net and node.
-
-
- char *hexadr_merge(char *hexadr, word net, word node)
- -------------------------------------------------
- Convert a 2D net and node number into a 8-character hex representation
- of the address.
-
-
- - Conclusion
-
- If you have any comments, suggestions, additions, please send them to:
-
- Fido: David Bennett @ 1:280/307
- Internet: root@kcufgat.fidonet.org
- CIS: 74635,1671
- Fax: 816/796-8288
- BBS: 816/228-3204
-
- Have Func,
- --Dave
-
-