Annotation of researchv10dc/630/man/src/p_man/man3/fontused.3r, revision 1.1

1.1     ! root        1: .ds ZZ DEVELOPMENT PACKAGE
        !             2: .TH FONTUSED 3R "630 MTG"
        !             3: .XE "fontused()"
        !             4: .XE "fontiname()"
        !             5: .SH NAME
        !             6: fontused, fontiname \- font menu generator routines
        !             7: .SH SYNOPSIS
        !             8: .B int fontused (fname)
        !             9: .PP
        !            10: .B char \(**fontiname (i)
        !            11: .sp
        !            12: .B char \(**fname;
        !            13: .br
        !            14: .B int i;
        !            15: .SH DESCRIPTION
        !            16: The
        !            17: .I fontused
        !            18: function
        !            19: tests if a given font has been requested by some process.
        !            20: This is a way to test if a call to
        !            21: .I fontremove
        !            22: will succeed.
        !            23: A font requested by a process cannot be removed.
        !            24: \f2Fontused\f1 returns 1 if the font has been requested and 0 otherwise.
        !            25: .P
        !            26: The
        !            27: .I fontiname
        !            28: function
        !            29: returns the name of the
        !            30: .I ith+1
        !            31: font in the font queue.
        !            32: This is useful for generating a menu of fonts in the cache.
        !            33: If there are less than
        !            34: .I i+1
        !            35: fonts, (char *)0 is returned.
        !            36: .SH EXAMPLE
        !            37: The following example is a menu generator function that holds
        !            38: all the fonts in the cache. The fonts in use are greyed.
        !            39: 
        !            40: .nf
        !            41: .ft CM
        !            42: 
        !            43: Titem *
        !            44: fontmenu(i, m)
        !            45: int i;
        !            46: Tmenu *m;
        !            47: {
        !            48:    static Titem ti;
        !            49:    int fontused();
        !            50:    char *fontiname();
        !            51: 
        !            52:    if(ti.text = fontiname(i))
        !            53:       ti.ufield.grey = fontused(ti.text);
        !            54:    return(&ti);
        !            55: }
        !            56: .ft R
        !            57: 
        !            58: .SH SEE ALSO
        !            59: fontname(3R), fontrequest(3R), fontsave(3L), tmenuhit(3R).

unix.superglobalmegacorp.com

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