DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦fe73d6893⟧ TextFile

    Length: 288 (0x120)
    Types: TextFile
    Names: »iwrch.c«

Derivation

└─⟦87ddcff64⟧ Bits:30001253 CPHDIST85 Tape, 1985 Autumn Conference Copenhagen
    └─ ⟦this⟧ »cph85dist/stage2/iwrch.c« 

TextFile

/* This is the IWRCH function from the Stage2 book */

int iwrch(chr,buf,idx,len)

int chr,
    buf[],
    *idx,
    *len
;

#define LMAX  120

{
 if (( chr < 0 ) || ( (*idx) > LMAX ))
 {
  buf[*idx]= -1;
  *len= *idx;
  *idx= LMAX+1;
  return (1);
 }

 buf[(*idx)++]=chr;
 return (0);
}