Freeciv-3.1
Loading...
Searching...
No Matches
utility
fc_dirent.c
Go to the documentation of this file.
1
/***********************************************************************
2
Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; either version 2, or (at your option)
6
any later version.
7
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
12
***********************************************************************/
13
14
#ifdef HAVE_CONFIG_H
15
#include <fc_config.h>
16
#endif
17
18
#include <stdlib.h>
19
20
/* utility */
21
#include "
fciconv.h
"
22
23
#include "
fc_dirent.h
"
24
25
/**************************************************************/
29
DIR *
fc_opendir
(
const
char
*dir_to_open)
30
{
31
#ifdef FREECIV_MSWINDOWS
32
DIR *result;
33
char
*dirname_in_local_encoding =
34
internal_to_local_string_malloc
(dir_to_open);
35
36
result = opendir(dirname_in_local_encoding);
37
free(dirname_in_local_encoding);
38
return
result;
39
#else
/* FREECIV_MSWINDOWS */
40
return
opendir(dir_to_open);
41
#endif
/* FREECIV_MSWINDOWS */
42
}
fc_opendir
DIR * fc_opendir(const char *dir_to_open)
Definition
fc_dirent.c:29
fc_dirent.h
fciconv.h
internal_to_local_string_malloc
char * internal_to_local_string_malloc(const char *text)
Generated on Sun Jan 5 2025 22:00:36 for Freeciv-3.1 by
1.9.8