Implement user input handling and refine drawing logic
This commit is contained in:
20
main.c
20
main.c
@@ -1,3 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "draw.h"
|
||||
#include "main.h"
|
||||
|
||||
@@ -10,24 +12,20 @@
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
// char *buffer = NULL;
|
||||
// size_t buffsize = 0;
|
||||
// ssize_t characters;
|
||||
char output[1024];
|
||||
|
||||
// printf("Python alter leck meine eier? \n");
|
||||
// characters = getline(&buffer, &buffsize, stdin);
|
||||
|
||||
// if (characters != -1) {
|
||||
// printf("you typed %s\n", buffer);
|
||||
// }
|
||||
|
||||
sleep_ms(500);
|
||||
getInitialWorries(output);
|
||||
|
||||
drawEdges();
|
||||
drawEmptyLines(1);
|
||||
drawTitle(TITLE);
|
||||
drawEmptyLines(1);
|
||||
drawEdges();
|
||||
printf("%s", output);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void getInitialWorries(char* output) {
|
||||
scanf("What's on your mind? %s\n", output);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user