TinyMUSH 3.3
TinyMUSH Server
|
Attribute interface, some flatfile and object routines. More...
#include "config.h"
#include "constants.h"
#include "typedefs.h"
#include "macros.h"
#include "externs.h"
#include "prototypes.h"
#include <stdbool.h>
#include <ctype.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
#include <unistd.h>
Functions | |
void | tf_xclose (FILE *fd) |
Close file/stream. More... | |
int | tf_fiddle (int tfd) |
Fiddle file/stream. More... | |
int | tf_xopen (char *fname, int mode) |
Open a file. More... | |
const char * | mode_txt (int mode) |
Convert mode to char mode. More... | |
void | tf_init (void) |
Initialize tf file handler. More... | |
int | tf_open (char *fname, int mode) |
Open file. More... | |
void | tf_close (int fdes __attribute__((unused))) |
Close file. More... | |
FILE * | tf_fopen (char *fname, int mode) |
Open file. More... | |
void | tf_fclose (FILE *fd __attribute__((unused))) |
Close file. More... | |
FILE * | tf_popen (char *fname, int mode) |
Open file. More... | |
int | fwdlist_ck (int, dbref, dbref, int, char *) |
int | propdir_ck (int, dbref, dbref, int, char *) |
void | fwdlist_set (dbref thing, FWDLIST *ifp) |
Set cached forwarding lists. More... | |
void | fwdlist_clr (dbref thing) |
Clear cached forwarding lists. More... | |
int | fwdlist_load (FWDLIST *fp, dbref player, char *atext) |
Load text into a forwardlist. More... | |
int | fwdlist_rewrite (FWDLIST *fp, char *atext) |
Generate a text string from a FWDLIST buffer. More... | |
int | fwdlist_ck (int key __attribute__((unused)), dbref player, dbref thing, int anum __attribute__((unused)), char *atext) |
Check a list of dbref numbers to forward to for AUDIBLE. More... | |
FWDLIST * | fwdlist_get (dbref thing) |
Fetch a forward list. More... | |
void | propdir_set (dbref thing, PROPDIR *ifp) |
Set propdir. More... | |
void | propdir_clr (dbref thing) |
Clear a propdir. More... | |
int | propdir_load (PROPDIR *fp, dbref player, char *atext) |
Load a propdir. More... | |
int | propdir_rewrite (PROPDIR *fp, char *atext) |
Rewrite a propdir. More... | |
int | propdir_ck (int key __attribute__((unused)), dbref player, dbref thing, int anum __attribute__((unused)), char *atext) |
Check a popdir. More... | |
PROPDIR * | propdir_get (dbref thing) |
Fetch a Propdir. More... | |
void | safe_name (dbref thing, char *outbuf, char **bufc) |
Sanitize a name. More... | |
char * | Name (dbref thing) |
Get the name of a thing. More... | |
char * | PureName (dbref thing) |
Get the pure name (no ansi) of the thing. More... | |
void | s_Name (dbref thing, char *s) |
Set the name of the thing. More... | |
void | safe_exit_name (dbref it, char *buff, char **bufc) |
Sanitize an exit name. More... | |
void | s_Pass (dbref thing, const char *s) |
Add a raw attribute to a thing. More... | |
void | do_attribute (dbref player, dbref cause __attribute__((unused)), int key, char *aname, char *value) |
Manage user-named attributes. More... | |
void | do_fixdb (dbref player, dbref cause __attribute__((unused)), int key, char *arg1, char *arg2) |
Directly edit database fields. More... | |
void | init_attrtab (void) |
Initialize the attribute hash tables. More... | |
ATTR * | atr_str (char *s) |
Look up an attribute by name. More... | |
void | anum_extend (int newtop) |
Grow the attr num lookup table. More... | |
ATTR * | atr_num (int anum) |
Look up an attribute by number. More... | |
int | mkattr (char *buff) |
Lookup attribute by name, creating if needed. More... | |
int | al_decode (char **app) |
Fetch an attribute number from an alist. More... | |
void | al_code (char **app, int atrnum) |
Store an attribute number in an alist. More... | |
bool | Commer (dbref thing) |
check if an object has any $-commands in its attributes. More... | |
void | al_extend (char **buffer, int *bufsiz, int len, bool copy) |
Get more space for attributes, if needed. More... | |
int | al_size (char *astr) |
Return length of attribute list in chars. More... | |
void | al_store (void) |
Write modified attribute list. More... | |
char * | al_fetch (dbref thing) |
Load attribute list. More... | |
void | al_add (dbref thing, int attrnum) |
Add an attribute to an attribute list. More... | |
void | al_delete (dbref thing, int attrnum) |
Remove an attribute from an attribute list. More... | |
void | makekey (dbref thing, int atr, UDB_ANAME *abuff) |
Make a key. More... | |
void | al_destroy (dbref thing) |
wipe out an object's attribute list. More... | |
char * | atr_encode (char *iattr, dbref thing, dbref owner, int flags, int atr __attribute__((unused))) |
Encode an attribute string. More... | |
void | atr_decode (char *iattr, char *oattr, dbref thing, dbref *owner, int *flags, int atr __attribute__((unused)), int *alen) |
Decode an attribute string. More... | |
void | atr_clr (dbref thing, int atr) |
clear an attribute in the list. More... | |
void | atr_add_raw (dbref thing, int atr, char *buff) |
add attribute of type atr to list More... | |
void | atr_add (dbref thing, int atr, char *buff, dbref owner, int flags) |
add attribute of type atr to list More... | |
void | atr_set_owner (dbref thing, int atr, dbref owner) |
Set owner of attribute. More... | |
void | atr_set_flags (dbref thing, int atr, dbref flags) |
Set flag of attribute. More... | |
char * | atr_get_raw (dbref thing, int atr) |
Get an attribute from the database. More... | |
char * | atr_get_str (char *s, dbref thing, int atr, dbref *owner, int *flags, int *alen) |
Get an attribute from the database. More... | |
char * | atr_get (dbref thing, int atr, dbref *owner, int *flags, int *alen) |
Get an attribute from the database. More... | |
bool | atr_get_info (dbref thing, int atr, dbref *owner, int *flags) |
Get information about an attribute. More... | |
char * | atr_pget_str (char *s, dbref thing, int atr, dbref *owner, int *flags, int *alen) |
Get a propdir attribute. More... | |
char * | atr_pget (dbref thing, int atr, dbref *owner, int *flags, int *alen) |
int | atr_pget_info (dbref thing, int atr, dbref *owner, int *flags) |
Get information about a propdir attribute. More... | |
void | atr_free (dbref thing) |
Remove all attributes of an object. More... | |
void | atr_cpy (dbref player __attribute__((unused)), dbref dest, dbref source) |
Copy all attributes from one object to another. Takes the player argument to ensure that only attributes that COULD be set by the player are copied. More... | |
void | atr_chown (dbref obj) |
Change the ownership of the attributes of an object to the current owner if they are not locked. More... | |
int | atr_next (char **attrp) |
Return next attribute in attribute list. More... | |
void | atr_push (void) |
Push attr lists. More... | |
void | atr_pop (void) |
Pop attr lists. More... | |
int | atr_head (dbref thing, char **attrp) |
Returns the head of the attr list for object 'thing'. More... | |
void | initialize_objects (dbref first, dbref last) |
Initialize an object. More... | |
void | db_grow (dbref newtop) |
Extend the struct database. More... | |
void | db_free (void) |
Free a DB. More... | |
void | db_make_minimal (void) |
Create a minimal DB. More... | |
dbref | parse_dbref_only (const char *s) |
Enforce completely numeric dbrefs. More... | |
dbref | parse_objid (const char *s, const char *p) |
Parse an object id. More... | |
dbref | parse_dbref (const char *s) |
Parse string for dbref. More... | |
void | putstring (FILE *f, const char *s) |
Write string to file, escaping char as needed. More... | |
void | putref (FILE *f, int d) |
void | putlong (FILE *f, long l) |
char * | getstring (FILE *f, bool new_strings) |
Read a trring from file, unescaping char as needed. More... | |
dbref | getref (FILE *f) |
Get dbref from file. More... | |
long | getlong (FILE *f) |
Get long int from file. More... | |
int | init_gdbm_db (char *gdbmfile) |
Initializing a GDBM file. More... | |
bool | check_zone (dbref player, dbref thing) |
checks back through a zone tree for control More... | |
bool | check_zone_for_player (dbref player, dbref thing) |
void | dump_restart_db (void) |
Write a restart db. More... | |
void | load_restart_db (void) |
Load a restart DB. More... | |
Variables | |
OBJ * | db = NULL |
NAME * | names = NULL |
NAME * | purenames = NULL |
int | sock |
int | ndescriptors |
int | maxd |
FILE * | t_fd |
bool | t_is_pipe = false |
ATTR ** | anum_table = NULL |
int | anum_alc_top = 0 |
Attribute interface, some flatfile and object routines.
void al_add | ( | dbref | thing, |
int | attrnum | ||
) |
Add an attribute to an attribute list.
thing | DBref of thing |
attrnum | Attribute number |
If trying to modify List attrib, return. Otherwise, get the attribute list.
See if attr is in the list. If so, exit (need not do anything)
Nope, extend it
extend returned different buffer, re-find the end
Add the new attribute on to the end
void al_code | ( | char ** | app, |
int | atrnum | ||
) |
Store an attribute number in an alist.
app | Attribute list |
atrnum | Attribute number |
int al_decode | ( | char ** | app | ) |
Fetch an attribute number from an alist.
app | Attribute list |
void al_delete | ( | dbref | thing, |
int | attrnum | ||
) |
Remove an attribute from an attribute list.
thing | DBref of thing |
attrnum | Attribute number |
If trying to modify List attrib, return. Otherwise, get the attribute list.
void al_destroy | ( | dbref | thing | ) |
wipe out an object's attribute list.
thing | DBref of thing |
remove from cache
void al_extend | ( | char ** | buffer, |
int * | bufsiz, | ||
int | len, | ||
bool | copy | ||
) |
Get more space for attributes, if needed.
buffer | Attribute buffer |
bufsiz | Buffer size |
len | Length |
copy | Copy buffer content to the extended buffer? |
char * al_fetch | ( | dbref | thing | ) |
Load attribute list.
thing | DBref of thing |
We only need fetch if we change things
Fetch and set up the attribute list
int al_size | ( | char * | astr | ) |
Return length of attribute list in chars.
astr | Attribute list |
void al_store | ( | void | ) |
Write modified attribute list.
void anum_extend | ( | int | newtop | ) |
Grow the attr num lookup table.
newtop | New size |
void atr_add | ( | dbref | thing, |
int | atr, | ||
char * | buff, | ||
dbref | owner, | ||
int | flags | ||
) |
add attribute of type atr to list
thing | DBref of thing |
atr | Attribute type |
buff | Attribute buffer |
owner | DBref of owner |
flags | Attribute flags |
void atr_add_raw | ( | dbref | thing, |
int | atr, | ||
char * | buff | ||
) |
add attribute of type atr to list
thing | DBref of thing |
atr | Attribute type |
buff | Attribute buffer |
Delete the entry from cache
Store the value in cache
void atr_chown | ( | dbref | obj | ) |
Change the ownership of the attributes of an object to the current owner if they are not locked.
obj | DBref of object |
void atr_clr | ( | dbref | thing, |
int | atr | ||
) |
clear an attribute in the list.
thing | DBref of thing |
atr | Attribute number |
Delete the entry from cache
void atr_cpy | ( | dbref player | __attribute__(unused), |
dbref | dest, | ||
dbref | source | ||
) |
Copy all attributes from one object to another. Takes the player argument to ensure that only attributes that COULD be set by the player are copied.
player | DBref of player |
dest | DBref of source |
source | DBref of destination |
change owner
Only set attrs that owner has perm to set
void atr_decode | ( | char * | iattr, |
char * | oattr, | ||
dbref | thing, | ||
dbref * | owner, | ||
int * | flags, | ||
int atr | __attribute__(unused), | ||
int * | alen | ||
) |
Decode an attribute string.
iattr | Input attribute string |
oattr | Output attribute string |
thing | DBref of thing |
owner | DBref of owner |
flags | Flags |
atr | Attribute number |
alen | Attribute len |
See if the first char of the attribute is the special character
It is, crack the attr apart
Get the attribute owner
If delimiter is not ':', just return attribute
Get the attribute flags
If delimiter is not ':', just return attribute
Get the attribute text
Not the special character, return normal info
char * atr_encode | ( | char * | iattr, |
dbref | thing, | ||
dbref | owner, | ||
int | flags, | ||
int atr | __attribute__(unused) | ||
) |
Encode an attribute string.
iattr | Attribute string |
thing | DBref of thing |
owner | DBref of owner |
flags | Flags |
atr | Attribute numbrer |
If using the default owner and flags (almost all attributes will), just store the string.
Encode owner and flags into the attribute text
void atr_free | ( | dbref | thing | ) |
Remove all attributes of an object.
thing | DBref of thing |
Just to be on the safe side
char * atr_get | ( | dbref | thing, |
int | atr, | ||
dbref * | owner, | ||
int * | flags, | ||
int * | alen | ||
) |
Get an attribute from the database.
thing | DBref of thing |
atr | Attribute type |
owner | DBref of owner |
flags | Flags |
alen | Attribute length |
bool atr_get_info | ( | dbref | thing, |
int | atr, | ||
dbref * | owner, | ||
int * | flags | ||
) |
Get information about an attribute.
thing | DBref of thing |
atr | Attribute type |
owner | DBref of owner |
flags | Flags |
char * atr_get_raw | ( | dbref | thing, |
int | atr | ||
) |
Get an attribute from the database.
thing | DBref of thing |
atr | Attribute type |
Fetch the entry from cache and return it
char * atr_get_str | ( | char * | s, |
dbref | thing, | ||
int | atr, | ||
dbref * | owner, | ||
int * | flags, | ||
int * | alen | ||
) |
Get an attribute from the database.
s | String buffer |
thing | DBref of thing |
atr | Attribute type |
owner | DBref of owner |
flags | Attribute flag |
alen | Attribute length |
int atr_head | ( | dbref | thing, |
char ** | attrp | ||
) |
Returns the head of the attr list for object 'thing'.
thing | DBref of thing |
attrp | Attribute |
Get attribute list. Save a read if it is in the modify atr list
If no list, return nothing
Set up the list and return the first entry
int atr_next | ( | char ** | attrp | ) |
Return next attribute in attribute list.
attrp |
ATTR * atr_num | ( | int | anum | ) |
Look up an attribute by number.
anum | Attribute number |
Look for a predefined attribute
It's a user-defined attribute, we need to copy data
All failed, return NULL
char * atr_pget | ( | dbref | thing, |
int | atr, | ||
dbref * | owner, | ||
int * | flags, | ||
int * | alen | ||
) |
Get a propdir attribute
thing | DBref of thing |
atr | Attribute type |
owner | Owner of thing |
flags | Flags |
alen | Attribute length |
int atr_pget_info | ( | dbref | thing, |
int | atr, | ||
dbref * | owner, | ||
int * | flags | ||
) |
Get information about a propdir attribute.
thing | DBref of thing |
atr | Attribute type |
owner | DBref of owner |
flags | Flags |
char * atr_pget_str | ( | char * | s, |
dbref | thing, | ||
int | atr, | ||
dbref * | owner, | ||
int * | flags, | ||
int * | alen | ||
) |
Get a propdir attribute.
s | String buffer |
thing | DBref of thing |
atr | Attribute type |
owner | Owner of thing |
flags | Flags |
alen | Attribute length |
void atr_pop | ( | void | ) |
Pop attr lists.
void atr_push | ( | void | ) |
Push attr lists.
void atr_set_flags | ( | dbref | thing, |
int | atr, | ||
dbref | flags | ||
) |
Set flag of attribute.
thing | DBref of thing |
atr | Attribute type |
flags | Flags |
void atr_set_owner | ( | dbref | thing, |
int | atr, | ||
dbref | owner | ||
) |
Set owner of attribute.
thing | DBref of thing |
atr | Attribute type |
owner | DBref of owner |
ATTR * atr_str | ( | char * | s | ) |
Look up an attribute by name.
s | Attribute name |
Convert the buffer name to uppercase. Limit length of name.
Look for a predefined attribute
Nope, look for a user attribute
If we got one, load tattr and return a pointer to it.
No exact match, try for a prefix match on predefined attribs. Check for both longer versions and shorter versions.
All failed, return NULL
bool check_zone | ( | dbref | player, |
dbref | thing | ||
) |
checks back through a zone tree for control
player | |
thing |
We check Control_OK on the thing itself, not on its ZMO that allows us to have things default into a zone without needing to be controlled by that ZMO.
If the zone doesn't have a ControlLock, DON'T allow control.
bool Commer | ( | dbref | thing | ) |
check if an object has any $-commands in its attributes.
thing | DBref of thing |
void db_free | ( | void | ) |
Free a DB.
void db_grow | ( | dbref | newtop | ) |
Extend the struct database.
newtop | New top of database |
Determine what to do based on requested size, current top and size. Make sure we grow in reasonable-size chunks to prevent frequent reallocations of the db array.
If requested size is smaller than the current db size, ignore it
If requested size is greater than the current db size but smaller than the amount of space we have allocated, raise the db size and initialize the new area.
Grow by a minimum of delta objects
Enforce minimum database size
Grow the name tables
An old name cache exists. Copy it.
Creating a brand new struct database. Fill in the 'reserved' area in case it gets referenced.
An old name cache exists. Copy it.
Creating a brand new struct database. Fill in the 'reserved' area in case it gets referenced.
Grow the db array
An old struct database exists. Copy it to the new buffer
Creating a brand new struct database. Fill in the 'reserved' area in case it gets referenced.
Go do the rest of the things
Call all modules
Grow the db mark buffer
void db_make_minimal | ( | void | ) |
Create a minimal DB.
should be #1
Manually link to Limbo, just in case
void do_attribute | ( | dbref | player, |
dbref cause | __attribute__(unused), | ||
int | key, | ||
char * | aname, | ||
char * | value | ||
) |
Manage user-named attributes.
player | DBref of player |
cause | DBref of cause |
key | Key |
aname | Attribute name |
value | Value |
Look up the user-named attribute we want to play with. Note vattr names have a limited size.
Modify access to user-named attribute
Check for negation
Set or clear the appropriate bit
Set the dirty bit
Get the next token
Make sure the new name doesn't already exist
Remove the attribute
Print info, like @list user_attr does
void do_fixdb | ( | dbref | player, |
dbref cause | __attribute__(unused), | ||
int | key, | ||
char * | arg1, | ||
char * | arg2 | ||
) |
Directly edit database fields.
player | DBref of plauyer |
cause | DBref of cause |
key | Key |
arg1 | Argument 1 |
arg2 | Argument 2 |
void dump_restart_db | ( | void | ) |
Write a restart db.
We maintain a version number for the restart database, so we can restart even if the format of the restart db has been changed in the new executable.
int fwdlist_ck | ( | int key | __attribute__(unused), |
dbref | player, | ||
dbref | thing, | ||
int anum | __attribute__(unused), | ||
char * | atext | ||
) |
Check a list of dbref numbers to forward to for AUDIBLE.
key | Key |
player | DBref of player |
thing | DBref of thing |
anum | Attribute |
atext | Attribute text |
Set the cached forwardlist
int fwdlist_ck | ( | int | , |
dbref | , | ||
dbref | , | ||
int | , | ||
char * | |||
) |
Check routine forward declaration.
void fwdlist_clr | ( | dbref | thing | ) |
Clear cached forwarding lists.
thing | DBref of thing |
If a forwardlist exists, delete it
FWDLIST * fwdlist_get | ( | dbref | thing | ) |
Fetch a forward list.
thing | DBref of thing |
int fwdlist_load | ( | FWDLIST * | fp, |
dbref | player, | ||
char * | atext | ||
) |
Load text into a forwardlist.
fp | Forward list |
player | DBref of player |
atext | Text |
skip spaces
remember string
terminate string
int fwdlist_rewrite | ( | FWDLIST * | fp, |
char * | atext | ||
) |
Generate a text string from a FWDLIST buffer.
fp | Forward list |
atext | Text buffer |
void fwdlist_set | ( | dbref | thing, |
FWDLIST * | ifp | ||
) |
Set cached forwarding lists.
thing | DBref of thing |
ifp | Forward list |
If fwdlist is null, clear
Copy input forwardlist to a correctly-sized buffer
Replace an existing forwardlist, or add a new one
the add or replace failed
long getlong | ( | FILE * | f | ) |
Get long int from file.
f | File |
dbref getref | ( | FILE * | f | ) |
Get dbref from file.
f | File |
char * getstring | ( | FILE * | f, |
bool | new_strings | ||
) |
Read a trring from file, unescaping char as needed.
f | File |
new_strings |
If EOF or null, return
If a newline, return if prior char is not a cr. Otherwise keep on truckin'
void init_attrtab | ( | void | ) |
Initialize the attribute hash tables.
int init_gdbm_db | ( | char * | gdbmfile | ) |
Initializing a GDBM file.
gdbmfile | Filename |
Calculate proper database block size
void initialize_objects | ( | dbref | first, |
dbref | last | ||
) |
Initialize an object.
first | DBref of first object to initialize |
last | DBref of last object to initialize |
void load_restart_db | ( | void | ) |
Load a restart DB.
Note that d->address is NOT INITIALIZED, and it DOES get used later, particularly when checking logout.
In case we've had anything bizarre happen...
void makekey | ( | dbref | thing, |
int | atr, | ||
UDB_ANAME * | abuff | ||
) |
Make a key.
thing | DBref of thing |
atr | Attribute number |
abuff | Attribute buffer |
int mkattr | ( | char * | buff | ) |
Lookup attribute by name, creating if needed.
buff | Attribute name |
Unknown attr, create a new one. Check if it matches any attribute type pattern that we have defined; if it does, give it those flags. Otherwise, use the default vattr flags.
const char * mode_txt | ( | int | mode | ) |
Convert mode to char mode.
mode |
char * Name | ( | dbref | thing | ) |
Get the name of a thing.
thing | DBref of the thing |
dbref parse_dbref | ( | const char * | s | ) |
Parse string for dbref.
s | String |
Either pure dbrefs or objids are okay
dbref parse_dbref_only | ( | const char * | s | ) |
Enforce completely numeric dbrefs.
s | String to check |
dbref parse_objid | ( | const char * | s, |
const char * | p | ||
) |
Parse an object id.
s | String |
p | Pointer to ':' in string |
We're passed two parameters: the start of the string, and the pointer to where the ':' in the string is. If the latter is NULL, go find it.
ObjID takes the format <dbref>:<timestamp as long int> If we match the dbref but its creation time doesn't match the timestamp, we don't have a match.
int propdir_ck | ( | int key | __attribute__(unused), |
dbref | player, | ||
dbref | thing, | ||
int anum | __attribute__(unused), | ||
char * | atext | ||
) |
Check a popdir.
key | Key |
player | DBref of player |
thing | DBref of thing |
anum | Attribute |
atext | Attribute text |
Set the cached propdir
void propdir_clr | ( | dbref | thing | ) |
Clear a propdir.
thing | DBref of thing |
If a propdir exists, delete it
PROPDIR * propdir_get | ( | dbref | thing | ) |
Fetch a Propdir.
thing | DBref of thing |
int propdir_load | ( | PROPDIR * | fp, |
dbref | player, | ||
char * | atext | ||
) |
Load a propdir.
fp | Propdir |
player | DBref of player |
atext | Text |
skip spaces
remember string
terminate string
int propdir_rewrite | ( | PROPDIR * | fp, |
char * | atext | ||
) |
Rewrite a propdir.
fp | Propdir |
atext | Text |
void propdir_set | ( | dbref | thing, |
PROPDIR * | ifp | ||
) |
Set propdir.
thing | DBref of thing |
ifp | Propdir. |
If propdir list is null, clear
Copy input propdir to a correctly-sized buffer
Replace an existing propdir, or add a new one
the add or replace failed
char * PureName | ( | dbref | thing | ) |
Get the pure name (no ansi) of the thing.
thing | DBref of the thing |
void putstring | ( | FILE * | f, |
const char * | s | ||
) |
Write string to file, escaping char as needed.
f | File |
s | String |
void s_Name | ( | dbref | thing, |
char * | s | ||
) |
Set the name of the thing.
thing | DBref of thing |
s | Name |
Truncate the name if we have to
void s_Pass | ( | dbref | thing, |
const char * | s | ||
) |
Add a raw attribute to a thing.
thing | DBref of the thing |
s | Attribute |
void safe_exit_name | ( | dbref | it, |
char * | buff, | ||
char ** | bufc | ||
) |
Sanitize an exit name.
it | DBref of exit |
buff | Buffer |
bufc | Tracking buffer |
void safe_name | ( | dbref | thing, |
char * | outbuf, | ||
char ** | bufc | ||
) |
Sanitize a name.
thing | Thing to check name |
outbuf | Output buffer |
bufc | Tracking buffer |
Retrieving a name never counts against an object's access time.
void tf_close | ( | int fdes | __attribute__(unused) | ) |
Close file.
fdes | File descriptor |
void tf_fclose | ( | FILE *fd | __attribute__(unused) | ) |
Close file.
fd | File descriptor |
int tf_fiddle | ( | int | tfd | ) |
Fiddle file/stream.
tfd | Descriptor |
FILE * tf_fopen | ( | char * | fname, |
int | mode | ||
) |
Open file.
fname | File |
mode | Mode |
void tf_init | ( | void | ) |
Initialize tf file handler.
int tf_open | ( | char * | fname, |
int | mode | ||
) |
Open file.
fname | Filename |
mode | Mode |
FILE * tf_popen | ( | char * | fname, |
int | mode | ||
) |
Open file.
fname | File |
mode | File mode |
void tf_xclose | ( | FILE * | fd | ) |
Close file/stream.
fd |
int tf_xopen | ( | char * | fname, |
int | mode | ||
) |
Open a file.
fname | Filename |
mode | Mode |
int anum_alc_top = 0 |
Top of attr num lookup table
OBJ* db = NULL |
Restart definitions struct database
|
extern |
Max Descriptors
NAME* names = NULL |
Name buffer
|
extern |
New Descriptor
NAME* purenames = NULL |
Pure Name Buffer
|
extern |
FILE* t_fd |
Main BD file descriptor
bool t_is_pipe = false |
Are we piping from stdin?