diff --git a/src/apps/bin/Jamfile b/src/apps/bin/Jamfile index ced6019928..abd9aa04bf 100644 --- a/src/apps/bin/Jamfile +++ b/src/apps/bin/Jamfile @@ -43,6 +43,7 @@ StdBinCommands beep.cpp clipboard.cpp df.cpp + draggers.cpp # factor.cpp ffm.cpp iroster.cpp diff --git a/src/apps/bin/draggers.cpp b/src/apps/bin/draggers.cpp new file mode 100644 index 0000000000..cb4ae485a1 --- /dev/null +++ b/src/apps/bin/draggers.cpp @@ -0,0 +1,36 @@ +/* + * draggers - show/hide draggers from CLI + * (c) 2004, François Revol - revol@free.fr + */ + +#include +#include +#include +#include + + +int main(int argc, char **argv) +{ + int i; + BApplication app("application/x-vnd.OBOS-draggers"); + if (argc < 2) { + printf("%s\n", BDragger::AreDraggersDrawn()?"shown":"hidden"); + return 0; + } + for (i = 1; i < argc; i++) { + if (!strncmp(argv[i], "-h", 2)) { + printf("draggers [show|hide]\n"); + printf("Shows/sets draggers state\n"); + return 0; + } + if (!strcmp(argv[i], "1") + || !strncmp(argv[i], "en", 2) + || !strncmp(argv[i], "sh", 2)) + BDragger::ShowAllDraggers(); + else if (!strcmp(argv[i], "0") + || !strncmp(argv[i], "di", 2) + || !strncmp(argv[i], "hi", 2)) + BDragger::HideAllDraggers(); + } + return 0; +} diff --git a/src/apps/bin/sysinfo.c b/src/apps/bin/sysinfo.c index e0bd6db4a4..2a91e0f968 100644 --- a/src/apps/bin/sysinfo.c +++ b/src/apps/bin/sysinfo.c @@ -231,7 +231,7 @@ static void dump_cpu(system_info *info) info->id[0], info->id[1]); for (i = 0; i < info->cpu_count; i++) { - /* note: the R5 cpuid_info() doesn't failed when asked for a cpu > cpu_count */ + /* note: the R5 cpuid_info() doesn't fail when asked for a cpu > cpu_count */ /* indeed it should return EINVAL */ /* references: * http://grafi.ii.pw.edu.pl/gbm/x86/cpuid.html