[nos-bbs] at kill all

Barry Siegfried k2mf at nnj.k2mf.ampr.org
Thu Sep 28 14:44:00 EDT 2006


[wa7nwp <wa7nwp at jnos.org> wrote]:

> Barry Siegfried wrote:
>
> > The code to kill "all" 'at' commands was actually done several
> > years ago because I needed it back then.  If Maiko wants it,
> > I'll be glad to supply it to him.  With a little syntactical
> > revision it should drop into the JNOS doat() subfunction just
> > fine.
>
> Is it in your code here at:
>
> <http://media.ijs.si/~igor/crii/files/dos_rout/ka9q/yanos/source/nos005/readme>

I am not familiar with that site.

> If so, (or elsewhere...)  I'll pick it up and drop it in tonight.

Actually it's so short, I'll include it here.

Between these two lines in doat():

	if(argv[1][0]=='k') {
		i = 2;

insert the following code so that it becomes:

	if(argv[1][0]=='k') {
		if(*argv[2] == '*') {
			/* Delete the entire 'at' command list of events */
			while((loe = Head_loe) != NULLATLIST) {
				Head_loe = loe->next;
				stop_timer(loe->at_timer);

				free(loe->at_timer->arg);
				free(loe->at_timer);

				tprintf(Atkilled,loe->id);
				free(loe);
			}
			return 0;
		}
		i = 2;

The above will cause the entire 'at' list to be deleted if you type
'at kill *'.  The "list of events" (loe) struct and head of list
(Head_loe) pointer might be slightly differently named in JNOS as
well as the "at_timer" substruct.  Rename them accordingly.  Once
you get the right names for JNOS the code will do what you want it
to do.

73, de Barry, K2MF >>
           o
          <|>      Barry Siegfried
+---------/-\---------------------------+
| Internet | bgs at mfnos.net              |
| HomePage | http://www.mfnos.net/~bgs  |
+----------+----------------------------+
| Amprnet  | k2mf at nnj.k2mf.ampr.org     |
| PBBS     | k2mf at k2ge.#cnj.nj.usa.noam |
+----------+----------------------------+




More information about the nos-bbs mailing list