A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LUA: Added new (converted) platform file and started teshsuite
[simgrid.git]
/
src
/
surf
/
surfxml_parse.c
diff --git
a/src/surf/surfxml_parse.c
b/src/surf/surfxml_parse.c
index
c82a307
..
4764cb9
100644
(file)
--- a/
src/surf/surfxml_parse.c
+++ b/
src/surf/surfxml_parse.c
@@
-7,13
+7,11
@@
#include <errno.h>
#include <math.h>
#include <stdarg.h> /* va_arg */
#include <errno.h>
#include <math.h>
#include <stdarg.h> /* va_arg */
-#ifndef _MSC_VER
-#include <libgen.h>
-#endif
#include "xbt/misc.h"
#include "xbt/log.h"
#include "xbt/str.h"
#include "xbt/misc.h"
#include "xbt/log.h"
#include "xbt/str.h"
+#include "xbt/file.h"
#include "xbt/dict.h"
#include "surf/surfxml_parse.h"
#include "surf/surf_private.h"
#include "xbt/dict.h"
#include "surf/surfxml_parse.h"
#include "surf/surf_private.h"
@@
-376,7
+374,7
@@
void surf_parse_free_callbacks(void)
/* Stag and Etag parse functions */
void STag_surfxml_platform(void) {
/* Stag and Etag parse functions */
void STag_surfxml_platform(void) {
-
_XBT_GNUC
_UNUSED double version = surf_parse_get_double(A_surfxml_platform_version);
+
XBT_ATTRIB
_UNUSED double version = surf_parse_get_double(A_surfxml_platform_version);
xbt_assert((version >= 1.0), "******* BIG FAT WARNING *********\n "
"You're using an ancient XML file.\n"
xbt_assert((version >= 1.0), "******* BIG FAT WARNING *********\n "
"You're using an ancient XML file.\n"
@@
-1031,17
+1029,8
@@
void surf_parse_open(const char *file)
if (!surf_parsed_filename_stack)
surf_parsed_filename_stack = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
if (!surf_parsed_filename_stack)
surf_parsed_filename_stack = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
-#ifdef _MSC_VER
- /* There is no dirname on windows... */
- char drive[_MAX_DRIVE];
- char dir[_MAX_DIR];
- errno_t err;
- err = _splitpath_s(file, drive, _MAX_DRIVE, dir, _MAX_DIR, NULL,0, NULL,0);
- char *dir = bprintf("%s%s",drive,dir);
-#else
surf_parsed_filename = xbt_strdup(file);
surf_parsed_filename = xbt_strdup(file);
- char *dir = dirname(surf_parsed_filename);
-#endif
+ char *dir = xbt_dirname(file);
xbt_dynar_push(surf_path, &dir);
surf_file_to_parse = surf_fopen(file, "r");
xbt_dynar_push(surf_path, &dir);
surf_file_to_parse = surf_fopen(file, "r");