@@ -406,41 +406,41 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fGiaSi
406406 if ( * pType == 'i' )
407407 {
408408 if ( vNamesIn == NULL )
409- vNamesIn = Vec_PtrAlloc ( nInputs + nLatches );
410- if ( Vec_PtrSize (vNamesIn ) ! = iTerm )
409+ vNamesIn = Vec_PtrStart ( nInputs );
410+ if ( Vec_PtrSize (vNamesIn ) < = iTerm )
411411 {
412412 fError = 1 ;
413413 break ;
414414 }
415- Vec_PtrPush ( vNamesIn , Abc_UtilStrsav (pName ) );
415+ Vec_PtrWriteEntry ( vNamesIn , iTerm , Abc_UtilStrsav (pName ) );
416416 }
417417 else if ( * pType == 'o' )
418418 {
419419 if ( vNamesOut == NULL )
420- vNamesOut = Vec_PtrAlloc ( nOutputs + nLatches );
421- if ( Vec_PtrSize (vNamesOut ) ! = iTerm )
420+ vNamesOut = Vec_PtrStart ( nOutputs );
421+ if ( Vec_PtrSize (vNamesOut ) < = iTerm )
422422 {
423423 fError = 1 ;
424424 break ;
425425 }
426- Vec_PtrPush ( vNamesOut , Abc_UtilStrsav (pName ) );
426+ Vec_PtrWriteEntry ( vNamesOut , iTerm , Abc_UtilStrsav (pName ) );
427427 }
428428 else if ( * pType == 'l' )
429429 {
430430 char Buffer [1000 ];
431431 assert ( strlen (pName ) < 995 );
432432 sprintf ( Buffer , "%s_in" , pName );
433433 if ( vNamesRegIn == NULL )
434- vNamesRegIn = Vec_PtrAlloc ( nLatches );
434+ vNamesRegIn = Vec_PtrStart ( nLatches );
435435 if ( vNamesRegOut == NULL )
436- vNamesRegOut = Vec_PtrAlloc ( nLatches );
437- if ( Vec_PtrSize (vNamesRegIn ) ! = iTerm )
436+ vNamesRegOut = Vec_PtrStart ( nLatches );
437+ if ( Vec_PtrSize (vNamesRegIn ) < = iTerm )
438438 {
439439 fError = 1 ;
440440 break ;
441441 }
442- Vec_PtrPush ( vNamesRegIn , Abc_UtilStrsav (Buffer ) );
443- Vec_PtrPush ( vNamesRegOut , Abc_UtilStrsav (pName ) );
442+ Vec_PtrWriteEntry ( vNamesRegIn , iTerm , Abc_UtilStrsav (Buffer ) );
443+ Vec_PtrWriteEntry ( vNamesRegOut , iTerm , Abc_UtilStrsav (pName ) );
444444 }
445445 else if ( * pType == 'n' )
446446 {
0 commit comments