Category : C Source Code
Archive   : CSRC2.ZIP
Filename : FXSET.C

 
Output of file : FXSET.C contained in archive : CSRC2.ZIP
/*
* f x s e t . c
*/

/*)LIBRARY
*/

#ifdef DOCUMENTATION

title fxset Set the Value of an Item In a Flex
index Set the value of an item in a flex

synopsis

#ifdef vms
#include "c:flex.h"
#else
#include
#endif

FLEX *
fxset(fx,itm,n)
FLEX *fx;
char *itm;
unsigned n;

description

fxset(fx,itm,n) changes the value of item n in fx to itm. It is
mainly useful for "information-hiding"; if you always use fxset() to
set elements, rather than using the address returned by fxitem()
directly, you'll find it much easier to use a different set of flex
handlers - e.g. flex handlers that page data to disk and need to know
when in-core data has been changed. Also, it could easily produce
some sort of immediate "index out of range" error, instead of just
returning NULL (for easier debugging).

fxset() returns fx itself if all went well, and NULL if fx was damaged
or had no item n.

bugs

author

Jerry Leichter

#endif

/*
* )EDITLEVEL=06
* Edit history
* 0.0 7-May-81 JSL Invention
* 0.1 23-Jun-81 JSL Conversion to the new documentation convention
*/

#ifdef vms
#include "c:flex.h"
#else
#include
#endif
#define NULL 0

FLEX *
fxset(fx,itm,n)
register FLEX *fx;
char *itm;
unsigned n;
{ register char *p;

if ((p = fxitem(fx,n)) == NULL)
return(NULL);
copy(p,itm,fx->fxisz);
return(fx);
}


  3 Responses to “Category : C Source Code
Archive   : CSRC2.ZIP
Filename : FXSET.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/