Changeset 3460fe in git for modules/modgen/creat_top.cc


Ignore:
Timestamp:
Apr 11, 2006, 9:47:32 PM (18 years ago)
Author:
Anne Frühbis-Krüger <anne@…>
Branches:
(u'spielwiese', 'a719bcf0b8dbc648b128303a49777a094b57592c')
Children:
0fc5364aa53658193bfb5a149fe38f92ff61bec5
Parents:
0df49c2e400b9863057d102ed862846695394c7a
Message:
*anne: fixed filename generation bug for preparsed Singular library file
       (<modulename>.bin)


git-svn-id: file:///usr/local/Singular/svn/trunk@9065 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/modgen/creat_top.cc

    r0df49c r3460fe  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: creat_top.cc,v 1.22 2005-05-20 14:49:59 Singular Exp $ */
     4/* $Id: creat_top.cc,v 1.23 2006-04-11 19:47:32 anne Exp $ */
    55/*
    66* ABSTRACT: lib parsing
     
    130130  fprintf(fp, "  idhdl h;\n");
    131131  fprintf(fp, "  char * tempstr;\n");
     132  fprintf(fp, "  char * tailstr;\n");
    132133  fprintf(fp, "  FILE * binfp; \n");
    133134  fprintf(fp, "  int ret;\n");
    134135  fprintf(fp, "  struct stat sb; \n\n");
    135136  fprintf(fp, "  tempstr = (char *)omAlloc(strlen(currPack->libname)+5);\n");
    136   fprintf(fp, "  memset(tempstr,0,strlen(currPack->libname)+1);\n");
    137   fprintf(fp, "  memcpy(tempstr,currPack->libname,strlen(currPack->libname));\n");
    138   fprintf(fp, "  memcpy(tempstr+strlen(currPack->libname)-3,\".bin\",4);\n");
     137  fprintf(fp, "  memset(tempstr,0,strlen(currPack->libname)+5);\n");
     138  fprintf(fp, "  tailstr = strchr(currPack->libname,'.');\n");
     139  fprintf(fp, "  memcpy(tempstr,currPack->libname,strlen(currPack->libname)-strlen(tailstr));\n");
     140  fprintf(fp, "  memcpy(tempstr+strlen(tempstr),\".bin\",4);\n");
    139141  fprintf(fp, "  ret=stat(tempstr,&sb);\n");
    140142  fprintf(fp, "  if(ret==0) { \n");
Note: See TracChangeset for help on using the changeset viewer.