1vga_getmodenumber(3) Svgalib User Manual vga_getmodenumber(3)
2
3
4
6 vga_getmodenumber - return a number for the given video mode
7
9 #include <vga.h>
10
11 int vga_getmodenumber(char *name);
12
13
15 The function parses *name and tries to find a videomode corresponding
16 on it. *name is parsed case insensitive and should be either an inte‐
17 ger string just giving a mode number or consist of a capital G followed
18 by the amount of x pixels, followed by a lower case x, followed by the
19 amount of y pixels, followed by a lower case x. Finally the number of
20 different colors is appended. Here the shortcuts 32K,64K,16M, and 16M4
21 are used for 32768, 65536, and 16777216 are used. The last refers also
22 to 16777216 which are store in 4 bytes (highest address byte unused)
23 for easier screen access.
24
25 For unsupported values or the string "PROMPT" the value -1 is returned.
26 Also a irritating error message is printed to stdout. This is used dur‐
27 ing parsing the SVGALIB_DEFAULT_MODE environment variable. Probably it
28 should not be used for anything else.
29
30
32 vga_getmodenumber("G640x480x256") returns 10.
33
35 svgalib(7), vgagl(7), libvga.config(5), vgatest(6), vga_hasmode(3),
36 vga_modeinfo(3), vga_setmode(3), vga_lastmodenumber(3), vga_getcurrent‐
37 mode(3), vga_getdefaultmode(3), vga_getmodename(3)
38
40 This manual page was edited by Michael Weller <eowmob@exp-math.uni-
41 essen.de>. The exact source of the referenced function as well as of
42 the original documentation is unknown.
43
44 It is very likely that both are at least to some extent are due to Harm
45 Hanemaayer <H.Hanemaayer@inter.nl.net>.
46
47 Occasionally this might be wrong. I hereby asked to be excused by the
48 original author and will happily accept any additions or corrections to
49 this first version of the svgalib manual.
50
51
52
53Svgalib 1.3.0 8 April 1998 vga_getmodenumber(3)