From 267db570e1ff394eca2f26ace11188e3b113577e Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@fe.uni-lj.si>
Date: Thu, 11 Sep 2014 11:32:49 +0000
Subject: [PATCH] Command line parameters parsing works. Also, filenames and directories are customizable now.

---
 src/sh.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/sh.c b/src/sh.c
index f5c310a..9cb623e 100644
--- a/src/sh.c
+++ b/src/sh.c
@@ -2,7 +2,8 @@
 #include<stdlib.h>
 #include "general.h"
 #include "sh.h"
-
+#include "io.h"
+#include <string.h>
 
 
 ts_spharm *sph_init(ts_vertex_list *vlist, ts_uint l){
@@ -402,8 +403,10 @@
 ts_bool saveAvgUlm2(ts_vesicle *vesicle){
 
 	FILE *fh;
-	
-	fh=fopen("sph2out.dat", "w");
+    char filename[10000];
+    strcpy(filename, command_line_args.path);
+    strcat(filename, "sph2out.dat");
+	fh=fopen(filename, "w");
 	if(fh==NULL){
 		err("Cannot open file %s for writing");
 		return TS_FAIL;

--
Gitblit v1.9.3