~ubuntu-branches/debian/squeeze/bristol/squeeze

« back to all changes in this revision

Viewing changes to src/bristol/brightongui/brightonRoutines.c

  • Committer: Bazaar Package Importer
  • Author(s): Guenter Geiger (Debian/GNU)
  • Date: 2004-08-16 17:25:51 UTC
  • Revision ID: james.westby@ubuntu.com-20040816172551-b0wxc0izlhxa6ugn
Tags: 0.9.1-11
* Fixed gcc-3.4 compilation
* removed dynamic libraries, bristolenine and bristol are linked
  dynamically now (closes: #265621) (closes: #265052)

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
        if ((name != 0) && (name[0] == '/'))
92
92
                sprintf(path, "%s", name);
93
93
        else {
94
 
               sprintf(path,"%s/.bristol/memory/%s/%s%i.mem",getenv("HOME"),
95
 
                             algo, algo, location);
96
 
               if ((fd = open(path, O_RDONLY)) < 0) {
97
 
                        sprintf(path, "%s/memory/%s/%s%i.mem",
98
 
                                global.home, algo, algo, location);
99
 
                        if ((fd = open(path, O_RDONLY)) < 0)
100
 
                           return(-1);
101
 
               }
102
 
        }
 
94
//              printf("home is %s\n", global.home);
 
95
 
 
96
                sprintf(path, "%s/memory/%s/%s%i.mem",
 
97
                        global.home, algo, algo, location);
 
98
        }
 
99
 
 
100
        if ((fd = open(path, O_RDONLY)) < 0)
 
101
                return(-1);
103
102
 
104
103
        if (flags & BRISTOL_STAT)
105
104
        {
175
174
                sprintf(path, "%s", name);
176
175
        } else {
177
176
//              printf("home is %s\n", global.home);
178
 
                sprintf(path,"%s/.bristol",getenv("HOME"));
179
 
                mkdir(path,0755);
180
 
                sprintf(path,"%s/.bristol/memory",getenv("HOME"));
181
 
                mkdir(path,0755);
182
 
                sprintf(path,"%s/.bristol/memory/%s",getenv("HOME"),algo);
183
 
                mkdir(path,0755);
184
177
 
185
 
                sprintf(path, "%s/.bristol/memory/%s/%s%i.mem",
186
 
                        getenv("HOME"), algo, algo, location);
 
178
                sprintf(path, "%s/memory/%s/%s%i.mem",
 
179
                        global.home, algo, algo, location);
187
180
                sprintf(synth->mem.algo, "%s", algo);
188
181
                if (name == NULL)
189
182
                        sprintf(synth->mem.name, "no name");