Commit one

This commit is contained in:
2022-10-25 22:10:24 -04:00
parent 68718da5e1
commit a62192e5f4
6 changed files with 54 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
struct winsize w;
int draw_ui() {
system("clear");
printf ("lines %d\n", w.ws_row);
printf ("columns %d\n", w.ws_col);
}
int print_center_text(char str[], int width) {
int i, x = strlen(str);
width - x;
width /= 2; /* Padding Area */
for (i = 0; i < width; i++) {
}
}
int main (int argc, char **argv) {
ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
draw_ui();
return 0;
}