source: abuse/tags/pd/imlib/port/mac/jdir.c @ 49

Last change on this file since 49 was 49, checked in by Sam Hocevar, 11 years ago
  • Imported original public domain release, for future reference.
  • Property svn:keywords set to Id
File size: 665 bytes
Line 
1
2#if defined( __WATCOMC__ )
3#include <direct.h>
4#elif defined( __POWERPC__ )
5#else
6#include <dirent.h>
7#endif
8
9#include <stdlib.h>
10#include <string.h>
11#include "jmalloc.hpp"
12#include <unistd.h>
13
14void get_directory(char *path, char **&files, int &tfiles, char **&dirs, int &tdirs)
15{
16        // get files in directory in path into files & tfiles
17        // get dirs in directory in path into dirs & tdirs
18}
19
20char MacName[512];
21
22extern char *macify_name(char *s);
23char *macify_name(char *s)
24{
25        char *p;
26/*
27       
28        p = &MacName[0];
29        while (*p = *s++) {
30                if (*p=='/')
31                        *p = '_';
32                p++;
33        }
34       
35        return MacName;
36*/
37        p = s;
38        while (*p) {
39                if (*p=='/')
40                        *p = '_';
41                p++;
42        }
43        return s;
44}
45
46
Note: See TracBrowser for help on using the repository browser.