diff options
author | Mystery Man <unknown@mandriva.org> | 2001-08-07 17:40:36 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2001-08-07 17:40:36 +0000 |
commit | 068d599562888a36a50e5bbdeb8b70f83fa7c287 (patch) | |
tree | 18f5eed8353b3af647412875d438b55ef8c07670 /tools/ddcprobe/ddcxinfos.c | |
parent | be838931607e1ab14c8c699e20dd807b55579f7b (diff) | |
download | drakx-topic/v_webmin_0_87.tar drakx-topic/v_webmin_0_87.tar.gz drakx-topic/v_webmin_0_87.tar.bz2 drakx-topic/v_webmin_0_87.tar.xz drakx-topic/v_webmin_0_87.zip |
This commit was manufactured by cvs2svn to create branchtopic/v_webmin_0_87
'v_webmin_0_87'.
Diffstat (limited to 'tools/ddcprobe/ddcxinfos.c')
-rw-r--r-- | tools/ddcprobe/ddcxinfos.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/tools/ddcprobe/ddcxinfos.c b/tools/ddcprobe/ddcxinfos.c deleted file mode 100644 index 439bdc75b..000000000 --- a/tools/ddcprobe/ddcxinfos.c +++ /dev/null @@ -1,66 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include "vbe.h" -#include "vesamode.h" -#ident "$Id$" - -#define SQR(x) ((x) * (x)) - -int main(int argc, char **argv) -{ - int i, j; - u_int16_t *mode_list; - unsigned char hmin, hmax, vmin, vmax; - struct vbe_info *vbe_info; - struct vbe_edid1_info *edid; - struct vbe_modeline *modelines; - - - if ((vbe_info = vbe_get_vbe_info()) == NULL) return 1; - - printf("%dKB of video ram\n", vbe_info->memory_size * 64); - - /* List supported standard modes. */ - for (mode_list = vbe_info->mode_list.list; *mode_list != 0xffff; mode_list++) - for (i = 0; known_vesa_modes[i].x; i++) - if (known_vesa_modes[i].number == *mode_list) - printf("%d %d %d\n", - known_vesa_modes[i].colors, - known_vesa_modes[i].x, - known_vesa_modes[i].y - ); - printf("\n"); - - if ((edid = vbe_get_edid_info()) == NULL) return 0; - if (edid->version == 255 && edid->revision == 255) return 0; - - vbe_get_edid_ranges(edid, &hmin, &hmax, &vmin, &vmax); - modelines = vbe_get_edid_modelines(edid); - - printf(hmin ? "%d-%d\n" : "\n", hmin, hmax); - printf(vmin ? "%d-%d\n" : "\n", vmin, vmax); - - { - double size = sqrt(SQR(edid->max_size_horizontal) + - SQR(edid->max_size_vertical)) / 2.54; - printf(size ? "%3.2f inches monitor (truly %3.2f')\n" : "\n", size * 1.08, size); - } - - for(j=0; modelines && (modelines[j].refresh != 0); j++){ - printf("# %dx%d, %1.1f%sHz", - modelines[j].width, - modelines[j].height, - modelines[j].refresh, - modelines[j].interlaced?"i":"" - ); - if(modelines[j].modeline) { - printf("; hfreq=%f, vfreq=%f\n%s\n", - modelines[j].hfreq, - modelines[j].vfreq, - modelines[j].modeline); - } else printf("\n"); - } - return 0; -} |