Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ibtab(3N) — GL2 W2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ib(4)

iib(1)

ibtab(5L)

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(5L) 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(4), iib(1), ibtab(5L)

BUGS

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

Version 2.3  —  July 04, 1985

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