version 1.48, 2001/05/05 12:26:58
|
version 1.49, 2001/05/06 00:34:26
|
Line 19
|
Line 19
|
#include <netdb.h> |
#include <netdb.h> |
#include <sys/mman.h> |
#include <sys/mman.h> |
#include <ctype.h> |
#include <ctype.h> |
|
#include <mntent.h> |
|
|
#if 0 |
#if 0 |
int compint(const void *a,const void *b) { |
int compint(const void *a,const void *b) { |
Line 44 static int rand() {
|
Line 45 static int rand() {
|
extern double atof(const char *c); |
extern double atof(const char *c); |
|
|
int main(int argc,char *argv[]) { |
int main(int argc,char *argv[]) { |
|
struct mntent* m; |
|
FILE *f=setmntent("/etc/mtab","r"); |
|
m=getmntent(f); |
|
#if 0 |
|
char *mnt_fsname; /* name of mounted file system */ |
|
char *mnt_dir; /* file system path prefix */ |
|
char *mnt_type; /* mount type (see mntent.h) */ |
|
char *mnt_opts; /* mount options (see mntent.h) */ |
|
int mnt_freq; /* dump frequency in days */ |
|
int mnt_passno; /* pass number on parallel fsck */ |
|
#endif |
|
printf("%s %s %s %s %d %d\n",m->mnt_fsname,m->mnt_dir,m->mnt_type,m->mnt_opts,m->mnt_freq,m->mnt_passno); |
|
|
|
#if 0 |
char*tmp; |
char*tmp; |
int n=asprintf(&tmp,"foo %s %d\n","bar",23); |
int n=asprintf(&tmp,"foo %s %d\n","bar",23); |
write(1,tmp,n); |
write(1,tmp,n); |
free(tmp); |
free(tmp); |
|
#endif |
#if 0 |
#if 0 |
struct passwd *p=getpwnam("leitner"); |
struct passwd *p=getpwnam("leitner"); |
struct spwd *s=getspnam("leitner"); |
struct spwd *s=getspnam("leitner"); |