Revision 1523 trunk/src/nh99/tpl2cpp.lex

tpl2cpp.lex (revision 1523)
19 19
  #include <stdio.h>
20 20
  #if defined(_WIN32)
21 21
  #include <io.h>  //fopen
22
  #endif
22 23
  #include <ctype.h> /* isalnum */
23
  #endif
24 24
  char tmp_string[MAX_TMP_STRING];
25 25
  char tmp_string1[MAX_TMP_STRING];
26 26
  char tmp_string2[MAX_TMP_STRING];
......
3921 3921
      {
3922 3922
        if (!makegaussdll)
3923 3923
        {
3924
          fprintf(ftopmain, "#ifdef _MSC_VER\n");
3924
          fprintf(ftopmain, "#ifdef _WIN32\n");
3925 3925
          fprintf(ftopmain, "void __stdcall __declspec(dllexport) \n");
3926 3926
          fprintf(ftopmain, "#else\n");
3927 3927
          fprintf(ftopmain, "void \n");
3928 3928
          fprintf(ftopmain, "#endif\n");
3929 3929
        }
3930 3930
        else
3931
          fprintf(ftopmain,"\nint __stdcall __declspec(dllexport) ");
3931
        {
3932
          fprintf(ftopmain, "#ifdef _WIN32\n");
3933
          fprintf(ftopmain, "int __stdcall __declspec(dllexport) \n");
3934
          fprintf(ftopmain, "#else\n");
3935
          fprintf(ftopmain, "int \n");
3936
          fprintf(ftopmain, "#endif\n");
3937
        }
3932 3938
      }
3933 3939
      else
3934 3940
      {
......
4080 4086
        {
4081 4087
          if (!makegaussdll)
4082 4088
          {
4083
            fprintf(ftopmain, "#ifdef _MSC_VER\n");
4089
            fprintf(ftopmain, "#ifdef _WIN32\n");
4084 4090
            fprintf(ftopmain, "void __stdcall __declspec(dllexport) \n");
4085 4091
            fprintf(ftopmain, "#else\n");
4086 4092
            fprintf(ftopmain, "void \n");
4087 4093
            fprintf(ftopmain, "#endif\n");
4088 4094
          }
4089 4095
          else
4090
            fprintf(ftopmain,"\nint __stdcall __declspec(dllexport) ");
4096
          {
4097
            fprintf(ftopmain, "#ifdef _WIN32\n");
4098
            fprintf(ftopmain, "int __stdcall __declspec(dllexport) \n");
4099
            fprintf(ftopmain, "#else\n");
4100
            fprintf(ftopmain, "int \n");
4101
            fprintf(ftopmain, "#endif\n");
4102
          }
4091 4103
        }
4092 4104
        else
4093 4105
        {
......
4315 4327
    strcat(infile_name,".tpl");
4316 4328
    strcat(outfile_name,".cpp");
4317 4329
    strcat(headerfile_name,".htp");
4318
    if (debug_flag) fprintf(stderr,"Trying to open file %s for input\n");
4330
    if (debug_flag) fprintf(stderr,"Trying to open file %s for input\n", infile_name);
4319 4331
    yyin=fopen(infile_name,"r");
4320 4332
    if (!yyin)
4321 4333
    {
......
4323 4335
        infile_name);
4324 4336
      exit(1);
4325 4337
    }
4326
    if (debug_flag) fprintf(stderr,"Opened file %s for input\n");
4338
    if (debug_flag) fprintf(stderr,"Opened file %s for input\n", infile_name);
4327 4339
    if (makedll)
4328 4340
    {
4329 4341
      strcpy(tmp_string1,argv[ioff]);
......
4340 4352
  {
4341 4353
    strcpy(infile_name,"admodel.tpl");
4342 4354
    strcpy(outfile_name,"admodel.cpp");
4343
    if (debug_flag) fprintf(stderr,"Trying to open file %s for input\n");
4355
    if (debug_flag) fprintf(stderr,"Trying to open file %s for input\n", infile_name);
4344 4356
    yyin=fopen(infile_name,"r");
4345 4357
    if (!yyin)
4346 4358
    {
......
4348 4360
        infile_name);
4349 4361
      exit(1);
4350 4362
    }
4351
    if (debug_flag) fprintf(stderr,"Opened file %s for input\n");
4363
    if (debug_flag) fprintf(stderr,"Opened file %s for input\n", infile_name);
4352 4364
  }
4353 4365
  conlist_ptr=&(conlist[0]);
4354 4366
  classlist_ptr=&(classlist[0]);
......
4472 4484
      d[i-ipos]=s[i];
4473 4485
    }
4474 4486
    d[strlen(s)-ipos]='\0';
4475
    if (strlen(s)-ipos-1 >= 0)
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff