[BACK]Return to wmain.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / hgm / mh / src

Diff for /OpenXM/src/hgm/mh/src/wmain.c between version 1.4 and 1.5

version 1.4, 2013/02/20 05:20:49 version 1.5, 2013/02/20 05:56:16
Line 1 
Line 1 
 /*  /*
 $OpenXM: OpenXM/src/hgm/mh/src/wmain.c,v 1.3 2013/02/20 01:06:38 takayama Exp $  $OpenXM: OpenXM/src/hgm/mh/src/wmain.c,v 1.4 2013/02/20 05:20:49 takayama Exp $
 License: LGPL  License: LGPL
  */   */
 #include <stdio.h>  #include <stdio.h>
Line 55  void mh_freeWorkArea(void) {
Line 55  void mh_freeWorkArea(void) {
   mh_rf(0.0, NULL, 0, NULL, 0);    mh_rf(0.0, NULL, 0, NULL, 0);
   MH_deallocate=0; /* switch to the normal mode. */    MH_deallocate=0; /* switch to the normal mode. */
 }  }
 void *mh_malloc(int s) {  
   void *p;  
   p = (void*)malloc(s);  
   if (p == NULL) {  
         fprintf(stderr,"No memory.\n"); mh_exit(-1);  
   }  
   return(p);  
 }  
 mh_free(void *p) {  
   free(p);  
   return(0);  
 }  
 static mypower(int x,int n) {  static mypower(int x,int n) {
   int a,i;    int a,i;
   a = 1;    a = 1;
Line 75  static mypower(int x,int n) {
Line 63  static mypower(int x,int n) {
 }  }
 #ifdef STANDALONE  #ifdef STANDALONE
 main(int argc,char *argv[]) {  main(int argc,char *argv[]) {
     mh_exit(0x7fffffff); /* standalone mode */
 /*  mh_main(argc,argv);  /*  mh_main(argc,argv);
   mh_freeWorkArea(); */    mh_freeWorkArea(); */
   mh_main(argc,argv);    mh_main(argc,argv);
Line 296  showParam() {
Line 285  showParam() {
   printf("%%Xng=\n%lf\n",Xng);    printf("%%Xng=\n%lf\n",Xng);
 }  }
   
 mh_exit(int n) {  
 #ifdef STANDALONE  
   exit(n);  
 #else  
   /* todo, use setjmp, longjmp */  
   fprintf(stderr,"Fatal error mh_exit(%d) in mh-w-n.\n",n);  
 #endif  
 }  

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>