diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-02-25 09:30:33 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-02-25 09:30:33 +0000 |
commit | 59b3868214a40e1cacf62c5f097d228310cd9eeb (patch) | |
tree | 06167d5246f5a1f93806a7e730f313af1e2b69fd /monitor-get-edid.c | |
parent | 8c463e6886ec1c4d9b337a1922cd52df5d7f9120 (diff) | |
download | monitor-edid-59b3868214a40e1cacf62c5f097d228310cd9eeb.tar monitor-edid-59b3868214a40e1cacf62c5f097d228310cd9eeb.tar.gz monitor-edid-59b3868214a40e1cacf62c5f097d228310cd9eeb.tar.bz2 monitor-edid-59b3868214a40e1cacf62c5f097d228310cd9eeb.tar.xz monitor-edid-59b3868214a40e1cacf62c5f097d228310cd9eeb.zip |
- get rid of compile time DEBUG using runtime variable "verbose" instead
=> allow accessing memory size as ddcxinfos used to do
- struct vbe_info really is unused, dropping it
- simplify canon_str (it doesn't malloc anymore)
- new function get_str() to factorize code
Diffstat (limited to 'monitor-get-edid.c')
-rw-r--r-- | monitor-get-edid.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/monitor-get-edid.c b/monitor-get-edid.c index ed5b480..781684c 100644 --- a/monitor-get-edid.c +++ b/monitor-get-edid.c @@ -9,9 +9,14 @@ #include <stdarg.h> #include "get-edid.h" -int main(void) +int verbose = 0; + +int main(int argc, char **argv) { char edid[256]; + + if (argc > 1 && strcmp(argv[1], "-v") == 0) verbose = 1; + int size = get_edid(edid); if (size) write(1, edid, size); |