~ubuntu-branches/ubuntu/vivid/yagiuda/vivid

« back to all changes in this revision

Viewing changes to .pc/debian-changes-1.19-6.2/src/getfiles.c

  • Committer: Bazaar Package Importer
  • Author(s): Ralf Treinen
  • Date: 2010-08-25 22:19:13 UTC
  • Revision ID: james.westby@ubuntu.com-20100825221913-lgc7yuj3f7nqugpm
Tags: 1.19-7
* QA upload
* Source format 3.0 (quilt)
* patch optopt-declaration: fix declaration of optopt (closes: 593486).
  Thanks a lot to Jakub Wilk <jwilk@debian.org> for the patch!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifdef HAVE_STDLIB_H
 
2
#include <stdlib.h>
 
3
#endif
 
4
#include <stdio.h>
 
5
#include <string.h>
 
6
#include <errno.h>
 
7
#include "yagi.h"
 
8
 
 
9
extern int errno;
 
10
 
 
11
/* This routine checks the number of arguments. If thats OK, the 
 
12
only arguemnt is the input data file. The output data file name is
 
13
got by adding '.out' to the input data file name. */
 
14
char *get_data_filenames(int optind, char **argv, char *input)
 
15
{
 
16
        char *output;
 
17
        output=string(0L,100L);
 
18
        strcpy(input, argv[optind]);
 
19
        strcpy(output, argv[optind]);
 
20
        strcat(output,".out");
 
21
 
 
22
#ifdef DEBUG
 
23
        if(errno)
 
24
        {
 
25
                fprintf(stderr,"Errno =%d in get_data_filenames() of getfiles.c\n", errno);
 
26
                exit(1);
 
27
        }
 
28
#endif
 
29
        return(output);
 
30
}