Skip to content
Snippets Groups Projects
Commit ed88a940 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 00c3549d
No related branches found
No related tags found
No related merge requests found
/* $Id: Context.cpp,v 1.17 2000-12-08 10:56:36 geuzaine Exp $ */ /* $Id: Context.cpp,v 1.18 2000-12-08 11:16:34 geuzaine Exp $ */
#include "Gmsh.h" #include "Gmsh.h"
#include "Const.h" #include "Const.h"
...@@ -342,8 +342,19 @@ void Init_Context(void){ ...@@ -342,8 +342,19 @@ void Init_Context(void){
extern List_T *Post_ViewList; extern List_T *Post_ViewList;
void Print_Context(FILE *file){ void Print_Context(char *filename){
FILE *file;
int i ; int i ;
if(filename){
file = fopen(filename,"w");
if(!file){
Msg(WARNING, "Unable to Open File '%s'", filename);
return;
}
}
else
file = stdout;
Print_StringOptions(GeneralOptions_String, "General.", file); Print_StringOptions(GeneralOptions_String, "General.", file);
Print_NumberOptions(GeneralOptions_Number, "General.", file); Print_NumberOptions(GeneralOptions_Number, "General.", file);
...@@ -374,6 +385,12 @@ void Print_Context(FILE *file){ ...@@ -374,6 +385,12 @@ void Print_Context(FILE *file){
Print_NumberOptions(PrintOptions_Number, "Print.", file); Print_NumberOptions(PrintOptions_Number, "Print.", file);
Print_ArrayOptions(PrintOptions_Array, "Print.", file); Print_ArrayOptions(PrintOptions_Array, "Print.", file);
Print_ColorOptions(PrintOptions_Color, "Print.", file); Print_ColorOptions(PrintOptions_Color, "Print.", file);
if(filename){
Msg (INFOS, "Options Output Complete '%s'", filename);
Msg (INFO, "Wrote File '%s'", filename);
fclose(file);
}
} }
void Context_T::buildRotmatrix(float m[4][4]) void Context_T::buildRotmatrix(float m[4][4])
......
/* $Id: Context.h,v 1.16 2000-12-06 22:09:53 geuzaine Exp $ */ /* $Id: Context.h,v 1.17 2000-12-08 11:16:34 geuzaine Exp $ */
#ifndef _CONTEXT_H_ #ifndef _CONTEXT_H_
#define _CONTEXT_H_ #define _CONTEXT_H_
...@@ -202,6 +202,6 @@ void Print_ColorOptions(StringXArray s[], char *prefix, FILE *file); ...@@ -202,6 +202,6 @@ void Print_ColorOptions(StringXArray s[], char *prefix, FILE *file);
void Init_Colors (int num); void Init_Colors (int num);
void Init_Context (void); void Init_Context (void);
void Print_Context(FILE *file); void Print_Context(char *filename);
#endif #endif
/* $Id: Print_Geo.cpp,v 1.7 2000-12-05 15:47:04 geuzaine Exp $ */ /* $Id: Print_Geo.cpp,v 1.8 2000-12-08 11:16:36 geuzaine Exp $ */
#include "Gmsh.h" #include "Gmsh.h"
#include "Geo.h" #include "Geo.h"
...@@ -173,7 +173,6 @@ void Print_Geo(Mesh *M, char *filename){ ...@@ -173,7 +173,6 @@ void Print_Geo(Mesh *M, char *filename){
else else
FOUT = stdout; FOUT = stdout;
Print_Context(FOUT);
Tree_Action(M->Points,Print_Point); Tree_Action(M->Points,Print_Point);
Tree_Action(M->Curves,Print_Curve); Tree_Action(M->Curves,Print_Curve);
Tree_Action(M->Surfaces,Print_Surface); Tree_Action(M->Surfaces,Print_Surface);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment