Clean up the semget example. Clean up the return values of semop function.

This commit is contained in:
Enrico Fraccaroli (Galfurian)
2023-05-19 14:24:04 -04:00
parent 9f63a93d63
commit 3e03f1e6fd
5 changed files with 245 additions and 152 deletions
+2 -2
View File
@@ -24,7 +24,7 @@
#include <ctype.h>
/// Maximum length of commands.
#define CMD_LEN 32
#define CMD_LEN 64
/// Maximum lenght of the history.
#define HISTORY_MAX 10
@@ -155,7 +155,7 @@ static inline void __prompt_print()
} else {
HOSTNAME = buffer.nodename;
}
printf(FG_GREEN "%s" FG_WHITE "@" FG_CYAN "%s " FG_BLUE_BRIGHT "[%02d:%02d:%02d]" FG_WHITE " [%s] " FG_WHITE_BRIGHT "%% ",
printf(FG_GREEN "%s" FG_WHITE "@" FG_CYAN "%s " FG_BLUE_BRIGHT "[%02d:%02d:%02d]" FG_WHITE " [%s] " FG_WHITE_BRIGHT "\n-> %% ",
USER, HOSTNAME, timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, CWD);
}