Annotation of researchv10dc/libj/strwidth.c, revision 1.1.1.1

1.1       root        1: #include <jerq.h>
                      2: #include <font.h>
                      3: 
                      4: jstrwidth(s)
                      5:        char *s;
                      6: {
                      7:        return(strwidth(&defont,s));
                      8: }
                      9: 
                     10: strwidth(f,s)
                     11:        Font *f;
                     12:        register unsigned char *s;
                     13: {
                     14:        register wid=0;
                     15:        register n = f->n;
                     16:        register Fontchar *info;
                     17:        info = f->info;
                     18:        for(; *s; s++)
                     19:                if(*s < n) wid+=info[*s].width;
                     20:        return(wid);
                     21: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.