volray

diff src/volray.c @ 2:0b73aa7317e1

lalal
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 02 Apr 2012 14:00:28 +0300
parents 57072295eb83
children 6f275934717b
line diff
     1.1 --- a/src/volray.c	Mon Apr 02 02:11:35 2012 +0300
     1.2 +++ b/src/volray.c	Mon Apr 02 14:00:28 2012 +0300
     1.3 @@ -236,22 +236,29 @@
     1.4  	struct slice_file *tail;
     1.5  
     1.6  	for(i=1; i<argc; i++) {
     1.7 -		struct slice_file *sfile;
     1.8 +		if(argv[i][0] == '-' && argv[i][2] == 0) {
     1.9 +			switch(argv[i][1]) {
    1.10 +			case 'r':
    1.11 +				break;
    1.12 +			}
    1.13 +		} else {
    1.14 +			struct slice_file *sfile;
    1.15  
    1.16 -		if(!(sfile = malloc(sizeof *sfile))) {
    1.17 -			perror("failed to allocate memory");
    1.18 -			return -1;
    1.19 +			if(!(sfile = malloc(sizeof *sfile))) {
    1.20 +				perror("failed to allocate memory");
    1.21 +				return -1;
    1.22 +			}
    1.23 +			sfile->name = argv[i];
    1.24 +			sfile->next = 0;
    1.25 +
    1.26 +			if(!flist) {
    1.27 +				flist = tail = sfile;
    1.28 +			} else {
    1.29 +				tail->next = sfile;
    1.30 +				tail = sfile;
    1.31 +			}
    1.32 +			nslices++;
    1.33  		}
    1.34 -		sfile->name = argv[i];
    1.35 -		sfile->next = 0;
    1.36 -
    1.37 -		if(!flist) {
    1.38 -			flist = tail = sfile;
    1.39 -		} else {
    1.40 -			tail->next = sfile;
    1.41 -			tail = sfile;
    1.42 -		}
    1.43 -		nslices++;
    1.44  	}
    1.45  
    1.46  	if(!nslices) {