From: hackbard Date: Mon, 10 Sep 2007 13:41:32 +0000 (+0200) Subject: corrected save file open call X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f9a3d935831d0eefa1b67f94510c2956a78aed4;p=physik%2Fposic.git corrected save file open call --- diff --git a/moldyn.c b/moldyn.c index a310e91..e961ca2 100644 --- a/moldyn.c +++ b/moldyn.c @@ -1464,7 +1464,8 @@ return 0; if(!(i%s)) { snprintf(dir,128,"%s/s-%07.f.save", moldyn->vlsdir,moldyn->time); - fd=open(dir,O_WRONLY|O_TRUNC|O_CREAT); + fd=open(dir,O_WRONLY|O_TRUNC|O_CREAT, + S_IRUSR|S_IWUSR); if(fd<0) perror("[moldyn] save fd open"); else { write(fd,moldyn,sizeof(t_moldyn)); @@ -1923,6 +1924,17 @@ int moldyn_bc_check(t_moldyn *moldyn) { return 0; } +/* + * restore function + */ + +int moldyn_load(t_moldyn *moldyn) { + + // later ... + + return 0; +} + /* * post processing functions */ @@ -1945,3 +1957,11 @@ int get_line(int fd,char *line,int max) { } } +int analyze_bonds(t_moldyn *moldyn) { + + + + + return 0; +} +