Compare commits
No commits in common. "91b9809c277befd32c680e46a25c6404ffba6893" and "3aee99f7f6537390ed7212fed466881a8502b15a" have entirely different histories.
91b9809c27
...
3aee99f7f6
|
@ -1,4 +1,3 @@
|
||||||
#include <locale.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -11,8 +10,6 @@ char *cmnd;
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
setlocale(LC_ALL, "");
|
|
||||||
|
|
||||||
cmnd = argv[0];
|
cmnd = argv[0];
|
||||||
|
|
||||||
if (argc <= 1) {
|
if (argc <= 1) {
|
||||||
|
|
|
@ -1,17 +1,10 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
size_t size = strtoul(argv[1], NULL, 0);
|
size_t size = strtoul(argv[1], NULL, 0);
|
||||||
char *p = malloc(size);
|
char *p = malloc(size);
|
||||||
printf("%zu bytes at %p\n", size, p);
|
printf("%zu bytes at %p\n", size, p);
|
||||||
if (argv[2]) {
|
|
||||||
unsigned char c = strtoul(argv[2], NULL, 0);
|
|
||||||
memset(p, c, size);
|
|
||||||
printf("filled with %zu %02x bytes\n", size, c);
|
|
||||||
}
|
|
||||||
sleep(10);
|
sleep(10);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue