]> hackdaworld.org Git - physik/posic.git/commitdiff
corrected save file open call
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Mon, 10 Sep 2007 13:41:32 +0000 (15:41 +0200)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Mon, 10 Sep 2007 13:41:32 +0000 (15:41 +0200)
moldyn.c

index a310e912a0567941248bcabeb690c5643bfd4081..e961ca23b45316fbf15b664b889e70dd1f9976bc 100644 (file)
--- 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;
+}
+