Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ibtab(3N) — GL2 W2.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ib(7)

iib(1M)

ibtab(4)

IBTAB(3N)  —  Silicon Graphics

NAME

ibtab − package for dealing with ibtab files

SYNOPSIS

setibfile (file)
char *file;

int setibent ( )

endibent ( )

struct ibtab *getibent ( )

int ibnflags ( flagstr, val )
char *flagstr; int *val;

DESCRIPTION

This is a basic set of routines for dealing with ibtab(4) format files such as /etc/ibtab. By default /etc/ibtab is used.  setibfile changes the default within the calling program. 

setibent opens and positions the file at the origin.  getibent returns a pointer to a (static) structure containing the "next" entry.  0 is returned at the end-of-file.  The structure is declared in the include file <ibtab.h>. endibent closes the file. 

ibnflags interprets the flags (ibt_flags) field, saving its numeric equivalent in the caller-supplied val.  The return value is 0 if the string is a legitimate expression, −1 otherwise. 

EXAMPLE

# include "ibtab.h"
extern struct ibtab *getibent();
struct ibtab *ip;
int val;
...
setibent();
while( (ip = getibent()) != 0 )
{
    if( ibnflags(ip->ibt_flags,&val) < 0 )
printf("illegal flags string %s\n",ip->ibt_flags);
    else
printf("%s --> 0x%x\n",ip->ibt_flags,val);
}
endibent();

FILES

/etc/ibtab

SEE ALSO

ib(7), iib(1M), ibtab(4)

BUGS

getibent stores data in static areas.  Return values are over-written by subsequent calls. 

Version 2.4  —  September 29, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026