Skip to content
Snippets Groups Projects
Commit 1776f115 authored by Stefen Guzik's avatar Stefen Guzik
Browse files

Integration of Chacho into Gmsh

parent 649d9bb1
No related branches found
No related tags found
No related merge requests found
// Gmsh - Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#include <stdexcept>
extern "C" void Gmsh_exit()
{
throw std::runtime_error("Library Chaco wants to exit");
}
// Gmsh - Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
// Overload the printf statements in Chaco to write using Msg::Direct gmsh
#ifndef _GMSH_EXIT_H_
#define _GMSH_EXIT_H_
int Gmsh_exit();
#endif
// Gmsh - Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#include "../../../Common/Message.h"
// Overload the printf statements in Chaco to write using Msg::Direct in gmsh
extern "C" int Gmsh_printf(const char *fmt, ...)
{
char str[1024];
va_list args;
va_start(args, fmt);
vsnprintf(str, sizeof(str), fmt, args);
va_end(args);
Msg::Direct(3, str);
}
// Gmsh - Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
// Overload the printf statements in Chaco to write using Msg::Direct gmsh
#ifndef _GMSH_PRINTF_H_
#define _GMSH_PRINTF_H_
#define printf Gmsh_printf
int Gmsh_printf(const char *fmt, ...);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment