/ast/src/cmd/pack/ |
H A D | huffgethdr.c | 35 register Huff_t* hp; local 38 if(!(hp=newof(0, Huff_t, 1, 0))) 48 hp->insize = (hp->insize<<CHAR_BIT)+ sfgetc(infile); 50 hp->maxlev = sfgetc(infile); 51 if(hp->maxlev==0) 55 hp->insize = (hp->insize<<CHAR_BIT)+ sfgetc(infile); 56 hp->maxlev = sfgetc(infile); 58 if(hp [all...] |
H A D | huffputhdr.c | 35 int huffputhdr(register Huff_t *hp,Sfio_t *outfile) argument 42 if(sizeof(Sfoff_t)>4 && hp->insize >= ((Sfoff_t)1)<<(4*CHAR_BIT)) 44 sfputc(fp,hp->insize>>(7*CHAR_BIT)); 45 sfputc(fp,hp->insize>>(6*CHAR_BIT)); 46 sfputc(fp,hp->insize>>(5*CHAR_BIT)); 47 sfputc(fp,hp->insize>>(4*CHAR_BIT)); 51 sfputc(fp,hp->insize>>(3*CHAR_BIT)); 52 sfputc(fp,hp->insize>>(2*CHAR_BIT)); 53 sfputc(fp,hp->insize>>(CHAR_BIT)); 54 sfputc(fp,hp [all...] |
H A D | huffinit.c | 49 register Huff_t *hp; local 53 if(!(hp=newof(0, Huff_t, 1, 0))) 69 hp->insize +=n; 75 huffend(hp); 91 hp->nchars = n-1; 110 size = hp->maxlev = 0; 112 hp->levcount[i] = 0; 118 hp->levcount[c]++; 119 hp->length[i] = c; 120 if (c > hp [all...] |
H A D | huffencode.c | 48 hp->outsize += n; \ 54 * encode <size> bytes of <infile> using <hp> encoding and write 59 Sfoff_t huffencode(register Huff_t *hp,Sfio_t *infile,Sfio_t *outfile,int size) argument 67 if(hp->id != lastid) 70 for (n=0, i=hp->maxlev; i>0; i--) 73 if (hp->length[c] == i) 77 if(!hp->id) 78 hp->id = id++; 79 lastid = hp->id; 81 buffer = hp [all...] |
H A D | pack.c | 93 register Huff_t *hp; local 138 hp = (Huff_t*)0; 162 if(!(hp = huffinit(fpin,(Sfoff_t)-1))) 166 else if((dsize = huffputhdr(hp,fpout)) < 0) 168 else if(!force && block(huffisize(hp)) <= block(huffosize(hp)+dsize)) 170 else if(huffencode(hp,fpin,fpout,SF_UNBOUND)<0) 177 diff = huffisize(hp) - (dsize+huffosize(hp)); 179 infile,(100*diff)/((double)huffisize(hp))); 222 vprint(Huff_t *hp,int dsize) argument [all...] |
H A D | huffdecode.c | 58 * decode <input> using huffman tree defined in <hp> onto <output> 64 Sfoff_t huffdecode(register Huff_t *hp,Sfio_t *input,Sfio_t *output,int size) argument 73 Sfoff_t insize = hp->outsize; 74 /* decode the header if called with different hp */ 75 if(lastid!=hp->id) 77 decode_header(hp); 78 if(!hp->id) 79 hp->id = id++; 80 lastid = hp->id; 98 buffer = hp 167 decode_header(register Huff_t *hp) argument [all...] |
H A D | unpack.c | 88 register Huff_t *hp; local 144 hp = (Huff_t*)0; 178 if(!(hp = huffgethdr(fpin))) 180 else if(huffdecode(hp,fpin,fpout,SF_UNBOUND)<0) 195 if(hp) 196 huffend(hp);
|
/ast/src/lib/libcs/ |
H A D | csname.c | 97 struct hostent* hp; local 105 if ((hp = gethostbyaddr((char*)&ha, sizeof(ha), AF_INET)) && (s = hp->h_name))
|
H A D | csaddr.c | 53 register struct hostent* hp; local 116 addr.l = ((hp = gethostbyname(name)) && hp->h_addrtype == AF_INET && hp->h_length <= sizeof(struct in_addr)) ? (unsigned long)((struct in_addr*)hp->h_addr)->s_addr : 0;
|
/ast/src/lib/libtksh/src/ |
H A D | shcompat.c | 23 Hashtab_t *hp=hashscope(sh.var_tree), *hp2; local 24 return hp ? ((hp2=hashscope(hp))?hp2:hp) : sh.var_tree;
|
/ast/src/lib/libcmd/ |
H A D | tee.c | 75 register int* hp = ((Tee_t*)handle)->fd; local 89 } while ((fd = *hp++) >= 0); 96 register int* hp; local 104 for (hp = tp->fd; (n = *hp) >= 0; hp++) 114 register int* hp; local 177 hp = tp->fd; 180 while ((*hp = open(cp, oflag, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0 && errno == EINTR) 182 if (*hp < [all...] |
H A D | tail.c | 423 register Tail_t* hp; local 634 hp = 0; 665 if ((flags & (HEADERS|VERBOSE)) && hp != fp) 667 hp = fp;
|
/ast/src/cmd/mailx/ |
H A D | edit.c | 151 run_editor(register FILE* fp, off_t size, struct header* hp, int type, int readonly) argument 169 if (hp && state.var.editheaders) { 171 headout(ep, hp, editheaders|GNL); 200 if (editheaders && headset(&pp, NiL, ep, hp, NiL, editheaders|GTO|GMETOO)) {
|
H A D | collect.c | 177 editmessage(struct header* hp, int c) argument 183 if (fp = run_editor(state.collect.fp, (off_t)-1, hp, c, 0)) { 339 collect(struct header* hp, unsigned long flags) argument 396 editmessage(hp, 'v'); 406 else if (state.var.interactive && !hp->h_subject && (state.askheaders & GSUB)) { 413 headout(stdout, hp, g); 417 headset(&pp, NiL, pp.fp, hp, NiL, g|GDISPLAY); 436 grabedit(hp, ask); 509 extract(hp, GBCC|GMETOO, &pp.buf[2]); 515 extract(hp, GC [all...] |
H A D | names.c | 137 headclear(struct header* hp, unsigned long flags) argument 139 hp->h_clear &= ~flags; 141 hp->h_flags &= ~GSUB; 142 hp->h_subject = 0; 145 hp->h_clear &= ~GMISC; 146 hp->h_misc.head = hp->h_misc.tail = 0; 149 hp->h_clear &= ~(flags|GFIRST); 150 hp->h_first = 0; 151 dictwalk(&hp 160 extract(struct header* hp, unsigned long flags, register char* s) argument 262 detract(struct header* hp, unsigned long flags) argument 360 usermap(struct header* hp, int show) argument [all...] |
H A D | send.c | 79 struct header* hp; member in struct:letter 312 headout(nfo, lp->hp, GSEND|GEXTERN|GNL|GCOMMA); 451 sendmail(struct header* hp, unsigned long flags) argument 464 if (!(letter.fp = collect(hp, flags))) 466 letter.hp = hp; 469 grabedit(letter.hp, type); 474 if (letter.hp->h_subject) 482 if (!usermap(letter.hp, 0)) { 488 dictwalk(&letter.hp 596 fmt(FILE* fp, struct header* hp, const char* label, unsigned long flags, int comma) argument 614 headout(FILE* fp, struct header* hp, register unsigned long flags) argument [all...] |
H A D | tty.c | 355 grabedit(struct header* hp, unsigned long type) argument 372 if (!(s = detract(hp, lp->type))) 381 headclear(hp, lp->type); 382 extract(hp, lp->type, buf);
|
H A D | head.c | 239 headset(register struct parse* pp, struct msg* mp, FILE* fp, struct header* hp, Dt_t** ignore, unsigned long flags) argument 252 if (pp->hp = hp) { 254 headclear(hp, flags); 256 hp->h_clear = flags; 261 if (hp || (flags & GFROM)) 382 if (pp->hp) 383 pp->hp->h_clear = 0; 651 if (pp->type && pp->hp) 652 extract(pp->hp, p [all...] |
/ast/src/cmd/ksh93/bltins/ |
H A D | hist.c | 44 register History_t *hp; local 61 hp = shp->gd->hist_ptr; 87 if((flag = hist_max(hp) - opt_info.num-1) < 0) 105 hist_cancel(hp); 141 range[flag] += (hist_max(hp)-1); 147 location = hist_find(hp,argv[1],hist_max(hp)-1,0,-1); 157 flag = hist_max(hp)-16; 162 flag = hist_max(hp)-2; 166 index2 = hist_min(hp); [all...] |
/ast/src/cmd/ksh93/sh/ |
H A D | timers.c | 206 Handler_t *hp = (Handler_t*)malloc(sizeof(Handler_t)); local 207 if(hp) 209 *hp = fn; 210 sh_timeradd((long)(1000*t), 0, oldalrm, (void*)hp);
|
/ast/src/lib/libast/uwin/ |
H A D | rcmd.c | 110 struct hostent *hp; local 119 hp = gethostbyname(*ahost); 120 if (hp == 0) { 130 *ahost = hp->h_name; 173 sin.sin_family = hp->h_addrtype; 174 bcopy(hp->h_addr_list[0], (caddr_t)&sin.sin_addr, hp->h_length); 188 if (hp->h_addr_list[1] != NULL) { 204 hp->h_addr_list++; 205 bcopy(hp [all...] |
/ast/src/lib/libpp/ |
H A D | ppop.c | 374 struct ppdirs* hp; local 1451 for (hp = pp.firstdir; hp != dp; hp = hp->next) 1452 if (hp->name && SAMEID(&hp->id, &dp->id)) 1454 hp->c = dp->c; 1456 hp->type |= TYPE_HOSTED; 1458 hp [all...] |
/ast/src/lib/libbz/ |
H A D | blocksort.c | 179 Int32 i, j, h, bigN, hp; local 193 hp = 0; 194 while (incs[hp] < bigN) hp++; 195 hp--; 197 for (; hp >= 0; hp--) { 198 h = incs[hp];
|
/ast/src/lib/libdss/ |
H A D | tag.c | 811 register Hit_t* hp; local 834 for (hp = tag->hits; hp; hp = hp->next) 835 if (hp->begf == tags->begf) 842 if (!(hp = newof(0, Hit_t, 1, 0))) 848 hp->begf = tags->begf; 849 hp->next = tag->hits; 850 tag->hits = hp; 878 Hit_t* hp; local [all...] |
/ast/src/cmd/dsslib/num_t/ |
H A D | num_t.c | 372 register Hash_t* hp; local 374 if (!(hp = newof(0, Hash_t, 1, 0))) 382 hp->hash = h; 383 hp->rand = type->name[0] == 'r'; 384 hp->seed = 0; 385 return hp; 391 Hash_t* hp = (Hash_t*)type->data; local 398 if (!hp->seed) 400 hp->seed = 1; 402 hp 430 Hash_t* hp = (Hash_t*)type->data; local [all...] |