openTRI 0.1
opendir.h
1/*
2PMP Mod
3Copyright (C) 2006 jonny
4
5Homepage: http://jonny.leffe.dnsalias.com
6E-mail: jonny@leffe.dnsalias.com
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program; if not, write to the Free Software
20Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21*/
22
23/*
24"opendir" c code (~3 lines of perl -> ~100 lines of c :s)
25*/
26
27
28#ifndef opendir_h
29#define opendir_h
30
31
32#include <pspiofilemgr.h>
33#include <sys/unistd.h>
34#include <string.h>
35#include <ctype.h>
36#include "mem64.h"
37
38
39#define SORT_DEFAULT 0
40#define SORT_NAME 1
41#define SORT_SIZE 2
42#define SORT_MDATE 3
43#define SORT_CDATE SORT_DEFAULT
44#define SORT_MASK 0xff
45#define SORT_REVERSE 0x100
46
47
49 {
50 SceUID directory;
51
52 SceIoDirent *directory_entry;
53
54 unsigned int number_of_directory_entries;
55 };
56
57
58void opendir_safe_constructor(struct opendir_struct *p);
59void opendir_close(struct opendir_struct *p);
60char *opendir_open(struct opendir_struct *p, char *directory, char **filter, int sort);
61
62
63#endif
Definition opendir.h:49