tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / bin / draggers.cpp
blob895e0a89434571d12aecb8efea8c85b756200f08
1 /*
2 * draggers - show/hide draggers from CLI
3 * (c) 2004, François Revol - revol@free.fr
4 */
6 #include <stdio.h>
7 #include <string.h>
8 #include <Application.h>
9 #include <Dragger.h>
12 int main(int argc, char **argv)
14 int i;
15 BApplication app("application/x-vnd.Haiku-draggers");
16 if (argc < 2) {
17 printf("%s\n", BDragger::AreDraggersDrawn()?"shown":"hidden");
18 return 0;
20 for (i = 1; i < argc; i++) {
21 if (!strncmp(argv[i], "-h", 2)) {
22 printf("draggers [show|hide]\n");
23 printf("Shows/sets draggers state\n");
24 return 0;
26 if (!strcmp(argv[i], "1")
27 || !strncmp(argv[i], "en", 2)
28 || !strncmp(argv[i], "sh", 2))
29 BDragger::ShowAllDraggers();
30 else if (!strcmp(argv[i], "0")
31 || !strncmp(argv[i], "di", 2)
32 || !strncmp(argv[i], "hi", 2))
33 BDragger::HideAllDraggers();
35 return 0;