* Implement the exchange of non-contiguous data.
[Khalid Hasanov & Jean-Noel Quintin] Thanks for the patch, guys.
+ SimGrid:
+ * Export a sg_cmdline dynar containing all the arguments we got from
+ the command line.
+
XBT:
* Functions xbt_dict_hash() and xbt_dict_hash_ext() are made public,
and renamed to xbt_str_hash() and xbt_str_hash_ext().
/* simgrid_config.h - Results of the configure made visible to user code */
-/* Copyright (c) 2009, 2010, 2011. Da SimGrid team. All rights reserved. */
+/* Copyright (c) 2009-2012. Da SimGrid team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "xbt/misc.h" /* XBT_PUBLIC */
+#include "xbt/dynar.h" /* sg_commandline */
#ifndef SIMGRID_PUBLIC_CONFIG_H
#define SIMGRID_PUBLIC_CONFIG_H
SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files */
XBT_PUBLIC(void) sg_version(int *major,int *minor,int *patch);
+/** Contains all the parameters we got from the command line */
+XBT_PUBLIC_DATA(xbt_dynar_t) sg_cmdline;
+
/* take care of DLL usage madness */
#ifdef _XBT_DLL_EXPORT
*ver_patch = SIMGRID_VERSION_PATCH;
}
+xbt_dynar_t sg_cmdline = NULL;
+
void surf_init(int *argc, char **argv)
{
XBT_DEBUG("Create all Libs");
SURF_WKS_LEVEL = xbt_lib_add_level(host_lib,surf_resource_free);
SURF_LINK_LEVEL = xbt_lib_add_level(link_lib,surf_resource_free);
+ sg_cmdline = xbt_dynar_new(sizeof(char*),NULL);
+ int i;
+ for (i=0;i<*argc;i++) {
+ xbt_dynar_push(sg_cmdline,&(argv[i]));
+ }
xbt_init(argc, argv);
if (!model_list)
model_list = xbt_dynar_new(sizeof(surf_model_private_t), NULL);
#endif
xbt_dynar_free(&surf_path);
+ xbt_dynar_free(&sg_cmdline);
xbt_lib_free(&host_lib);
xbt_lib_free(&link_lib);