/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 | huffman.h | 59 #define huffend(hp) free((void*)(hp)) 60 #define huffisize(hp) ((hp)->insize) 61 #define huffosize(hp) ((hp)->outsize) 62 #define huffhsize(hp) ((hp)->maxlev+(hp)->nchars+7)
|
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 | 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 | 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/cmd/ksh93/edit/ |
H A D | history.c | 71 #define hist_ind(hp,c) ((int)((c)&(hp)->histmask)) 133 static int acctinit(History_t *hp) argument 136 Namval_t *np = nv_search("ACCTFILE",((Shell_t*)hp->histshell)->var_tree,0); 178 static int sh_checkaudit(History_t *hp, const char *name, char *logbuf, size_t len) argument 231 register History_t *hp; local 251 if(hp=wasopen) 255 shgd->hist_ptr = hist_ptr = hp; 256 if(strcmp(histname,hp->histname)==0) 309 if(!(hp 411 hist_close(register History_t *hp) argument 459 hist_trim(History_t *hp, int n) argument 558 hist_nearend(History_t *hp, Sfio_t *iop, register off_t size) argument 625 hist_eof(register History_t *hp) argument 751 hist_cancel(register History_t *hp) argument 768 hist_flush(register History_t *hp) argument 802 register History_t *hp = (History_t*)handle; local 902 hist_tell(register History_t *hp, int n) argument 910 hist_seek(register History_t *hp, int n) argument 921 hist_list(register History_t *hp,Sfio_t *outfile, off_t offset,int last, char *nl) argument 1012 hist_match(register History_t *hp,off_t offset,char *string,int *coffset) argument 1060 register History_t *hp = shgd->hist_ptr; local 1105 History_t *hp = hist_ptr; local 1140 hist_locate(History_t *hp,register int command,register int line,int lines) argument 1192 History_t *hp = (History_t*)handle; local [all...] |
/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/cmd/ksh93/include/ |
H A D | history.h | 56 #define hist_min(hp) ((_Hist=((int)((hp)->histind-(hp)->histsize)))>=0?_Hist:0) 57 #define hist_max(hp) ((int)((hp)->histind))
|
/ast/src/cmd/mailx/ |
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 | 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 | 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 | 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/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...] |
/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/lib/libast/port/ |
H A D | mnt.c | 68 set(register Header_t* hp, const char* fs, const char* dir, const char* type, const char* options) 72 hp->mnt.flags = 0; 77 hp->mnt.flags |= MNT_REMOTE; 87 hp->mnt.flags |= MNT_REMOTE; 88 sfsprintf(hp->buf, sizeof(hp->buf) - 1, "%s:%*.*s", x + 1, x - fs, x - fs, fs); 89 fs = (const char*)hp->buf; 92 hp->mnt.flags |= MNT_REMOTE; 95 hp->mnt.fs = (char*)fs; 96 hp [all...] |
/ast/src/cmd/ksh93/sh/ |
H A D | nvtree.c | 38 Namval_t *hp; member in struct:nvdir 187 if(dp->hp = (Namval_t*)dtprev(dp->root,&fake)) 189 char *cp = nv_name(dp->hp); 192 dp->hp = (Namval_t*)dtnext(dp->root,dp->hp); 195 np = dp->hp; 200 dp->hp = (Namval_t*)dtfirst(dp->root); 203 dp->hp = (Namval_t*)dtfirst(dp->root); 230 if(np==dp->hp && !next) 231 dp->hp [all...] |
/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/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))
|
/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...] |
/ast/src/cmd/INIT/ |
H A D | Makefile | 54 cc.hp.ia64 cc.hp.pa cc.hp.pa64 ld.hp.pa ldd.hp.pa \
|
/ast/src/lib/libast/comp/ |
H A D | syslog.c | 141 struct hostent* hp; 147 hp = gethostbyname(s); 149 if (!hp || hp->h_addrtype != AF_INET || hp->h_length > sizeof(struct in_addr)) 151 a = (unsigned long)((struct in_addr*)hp->h_addr)->s_addr;
|