module_00.c 1.1 KB

1234567891011121314151617181920212223242526
  1. #include <stdio.h>
  2. #include <string.h>
  3. int module_00_run(const char *arg) {
  4. if (arg == NULL || strcmp(arg, "mh") != 0) {
  5. return 0;
  6. }
  7. const char *white = "\033[1;37m";
  8. const char *gray = "\033[90m";
  9. const char *reset = "\033[0m";
  10. printf("Available arguments:\n");
  11. printf(" %smh%s: %sDisplay this help message.%s\n", white, reset, gray, reset);
  12. printf(" %sms%s: %sPrint the current date and time in a static format.%s\n", white, reset, gray, reset);
  13. printf(" %smu%s: %sRun a dynamic clock that updates every second.%s\n", white, reset, gray, reset);
  14. printf(" %sm3%s: %sRun a pseudographic clock (3x3 font) that updates every second.%s\n", white, reset, gray, reset);
  15. printf(" %sm5%s: %sRun a pseudographic clock (5x5 font) that updates every second.%s\n", white, reset, gray, reset);
  16. printf(" %sm7%s: %sRun a pseudographic clock (8x8 font) that updates every second.%s\n", white, reset, gray, reset);
  17. // Финальный сброс форматирования
  18. printf("\033[0m\n");
  19. return 0;
  20. }