oga's tools
Révision | d9d15c535644a2a653500b8f3577e900fa5ac38f (tree) |
---|---|
l'heure | 2014-05-01 08:25:58 |
Auteur | oga <oga@mxg....> |
Commiter | oga |
fix open() argument, and add stdlib.h
@@ -19,6 +19,7 @@ | ||
19 | 19 | #include <math.h> |
20 | 20 | #include <unistd.h> |
21 | 21 | #include <errno.h> |
22 | +#include <stdlib.h> | |
22 | 23 | |
23 | 24 | #define VER "Ver 0.34" |
24 | 25 | #define S_MEM "Memory" |
@@ -20,6 +20,7 @@ | ||
20 | 20 | #include <net/if.h> |
21 | 21 | #include <netinet/in.h> |
22 | 22 | #include <sys/ioctl.h> |
23 | +#include <stdlib.h> | |
23 | 24 | |
24 | 25 | #define VER "Ver 1.06" |
25 | 26 | #define S_IN "IN" |
@@ -8,6 +8,7 @@ | ||
8 | 8 | * V1.01 96/10/30 -fn support and wait time adjust |
9 | 9 | * V1.02 96/10/31 -fs, -n support |
10 | 10 | * V1.03 96/11/06 .xpstat comment, -x, -y, -l support |
11 | + * V1.04 14/05/01 fix open argument | |
11 | 12 | * |
12 | 13 | */ |
13 | 14 | #include <stdio.h> |
@@ -19,8 +20,10 @@ | ||
19 | 20 | #include <fcntl.h> |
20 | 21 | #include <X11/Xlib.h> |
21 | 22 | #include <X11/Xutil.h> |
23 | +#include <stdlib.h> | |
24 | +#include <string.h> | |
22 | 25 | |
23 | -#define VER "1.03" | |
26 | +#define VER "1.04" | |
24 | 27 | #define MAXPRC 64 |
25 | 28 | #define BARLEN 12 |
26 | 29 | #define MAXBARLEN 30 |
@@ -457,7 +460,7 @@ char *b[]; | ||
457 | 460 | |
458 | 461 | while(1) { |
459 | 462 | /* ブロセスデータ採取 */ |
460 | - if ((fd = open(tmpf,O_CREAT|O_RDWR|O_TRUNC)) < 0) { | |
463 | + if ((fd = open(tmpf,O_CREAT|O_RDWR|O_TRUNC, 0666)) < 0) { | |
461 | 464 | perror("open pstmp"); |
462 | 465 | exit(1); |
463 | 466 | } |
@@ -543,3 +546,7 @@ char *b[]; | ||
543 | 546 | } |
544 | 547 | } |
545 | 548 | } |
549 | + | |
550 | +/* vim:ts=8:sw=8: | |
551 | + */ | |
552 | + |