28 lines
264 B
C
28 lines
264 B
C
|
|
|
||
|
|
#include <sys/ioctl.h>
|
||
|
|
|
||
|
|
#include <stdio.h>
|
||
|
|
|
||
|
|
#include <unistd.h>
|
||
|
|
|
||
|
|
|
||
|
|
class toolset{
|
||
|
|
|
||
|
|
void createHorisontalLine() {
|
||
|
|
|
||
|
|
struct winsize w;
|
||
|
|
|
||
|
|
ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
|
||
|
|
|
||
|
|
for (int i = 0; i < w.ws_col; ++i)
|
||
|
|
{
|
||
|
|
|
||
|
|
printf("-");
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
printf("\n");
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|