|
@@ -1,8 +1,8 @@
|
|
|
-#include <unistd.h> // usleep
|
|
|
+#include <ctype.h>
|
|
|
#include <stdio.h>
|
|
|
-#include <time.h>
|
|
|
#include <string.h>
|
|
|
-#include <ctype.h>
|
|
|
+#include <time.h>
|
|
|
+#include <unistd.h> // usleep
|
|
|
|
|
|
#include "render.h"
|
|
|
#include "terminal.h"
|
|
@@ -41,7 +41,6 @@ void render_sleep(void) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/*
|
|
|
Well SNAP! Mystic numbers don't remotely match ANSI color codes.
|
|
|
|
|
@@ -448,7 +447,7 @@ void render(int fd, const char *string_out, int len) {
|
|
|
// Check our time from time to time.
|
|
|
// If we start running long, disable sleeps.
|
|
|
|
|
|
- while ((trigger = strnstr(cp, len - (cp - trigger), TRIGGER)) != NULL) {
|
|
|
+ while ((trigger = strnstr(cp, len - (cp - string_out), TRIGGER)) != NULL) {
|
|
|
// There is special things to handle in here.
|
|
|
while (cp != trigger) {
|
|
|
elapsed = time(NULL) - start;
|