Subj : parsing example
To   : Tracker1
From : Digital Man
Date : Wed Sep 06 2000 05:39 am

RE: parsing example
BY: Tracker1 to All on Tue Sep 05 2000 08:11 pm

> I'd like to create a text string to parse through for displaying menus...
>
> I know, there are functions to use an external screen, but working on a comm
> shell, that I'd like to have everything internal.. already have some of the
> functions down, for like menu headers and prompts... but the parsing for the
> menu options is getting to me..
>
> also, is there a way to get an internal @ code to translate... I created a s
> that will center a block of text in a given size, the only problem is that w
> I seem to use an @ code, it doesn't translate before the strlen goes.. :(

@-codes are expanded during printing only. Consider using one of the global
variables (listed in SBBSDEFS.INC) or a command-line specifier (listed in
Appendix A of SYSOP.DOC) instead.

> anyways, back to the need at hand, an example on parsing a string would be
> really helpfull... :)  there doesn't seem to be a means of getting a substri
> or the position of a substring in a file.

I've done this kind of thing before with a combination of compare_str and
shift_str.

> example of what I want to parse...
>
> M,Message Menu;F,FileMenu;
>
> would parse out to...
> [M] Message Menu
> [F] File Menu

Very doable.

> Also, any examples on reading in from a file would be great... :)

Did you look at FILE_IO.SRC?

Rob

---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net