init commit

This commit is contained in:
2025-04-13 21:48:15 +03:00
commit 23255e9121
192 changed files with 12200 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/file.h>
#include <sys/types.h>
#include <sys/stat.h>
int main(int argc, char* argv[]) {
int fdout = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (fdout == -1) {
return 1;
}
unsigned short x;
while (scanf("%hu", &x) == 1) {
unsigned char buf[2];
buf[0] = x >> 8;
buf[1] = x & 0xff;
write(fdout, &x, 2);
}
close(fdout);
return 0;
}