diff options
author | N.N. <krzyszcz@users.sourceforge.net> | 2005-01-27 14:42:55 +0000 |
---|---|---|
committer | N.N. <krzyszcz@users.sourceforge.net> | 2005-01-27 14:42:55 +0000 |
commit | bfb359fd22e61faaca3a6e49ad3b7a81f2d71551 (patch) | |
tree | d070071515c7e7f53073da32046b24855e8307c8 /shared/common/fi.c | |
parent | 6435314717c5fb8fa062eb682c72c8df095b1be3 (diff) |
cyclone alpha52 and toxy alpha15 (see notes.txt for cyclone, toxy and shared)
svn path=/trunk/externals/miXed/; revision=2550
Diffstat (limited to 'shared/common/fi.c')
-rw-r--r-- | shared/common/fi.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/shared/common/fi.c b/shared/common/fi.c deleted file mode 100644 index e46d001..0000000 --- a/shared/common/fi.c +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2004 krzYszcz and others. - * For information on usage and redistribution, and for a DISCLAIMER OF ALL - * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ - -#ifdef NT -#include <io.h> -#else -#include <unistd.h> -#endif -#include <stdio.h> -#include <string.h> -#include "m_pd.h" -#include "fi.h" - -FILE *firead_open(char *filename, t_canvas *cv, int textmode) -{ - int fd; - char path[MAXPDSTRING+2], *nameptr; - t_symbol *dirsym = (cv ? canvas_getdir(cv) : 0); - /* path arg is returned unbashed (system-independent) */ - if ((fd = open_via_path((dirsym ? dirsym->s_name : ""), filename, - "", path, &nameptr, MAXPDSTRING, 1)) < 0) - return (0); - /* Closing/reopening dance. This is unnecessary under linux, and we - could have tried to convert fd to fp, but under windows open_via_path() - returns what seems to be an invalid fd. - LATER try to understand what is going on here... */ - close(fd); - if (path != nameptr) - { - char *slashpos = path + strlen(path); - *slashpos++ = '/'; - /* try not to be dependent on current open_via_path() implementation */ - if (nameptr != slashpos) - strcpy(slashpos, nameptr); - } - sys_bashfilename(path, path); - return (fopen(path, (textmode ? "r" : "rb"))); -} - -FILE *fiwrite_open(char *filename, t_canvas *cv, int textmode) -{ - char path[MAXPDSTRING+2]; - if (cv) - /* path arg is returned unbashed (system-independent) */ - canvas_makefilename(cv, filename, path, MAXPDSTRING); - else - { - strncpy(path, filename, MAXPDSTRING); - path[MAXPDSTRING-1] = 0; - } - sys_bashfilename(path, path); - return (fopen(path, (textmode ? "w" : "wb"))); -} |