File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -696,6 +696,35 @@ static char * Io_MvLoadFile( char * pFileName )
696696 return pContents ;
697697}
698698
699+ /**Function*************************************************************
700+
701+ Synopsis []
702+
703+ Description []
704+
705+ SideEffects []
706+
707+ SeeAlso []
708+
709+ ***********************************************************************/
710+ void Io_MvReplaceBuffersByShorts ( char * p )
711+ {
712+ if ( !strstr (p , ".gate" ) )
713+ return ;
714+ char * q , * pNext , * pShort = (char * )".short" ; int i ;
715+ for ( q = p ; * q && (pNext = strstr (q , ".names" )); q = pNext ) {
716+ for ( i = 0 ; i < 6 ; i ++ )
717+ pNext [i ] = pShort [i ];
718+ while ( * pNext && * pNext ++ != '\n' );
719+ if ( * pNext == 0 )
720+ return ;
721+ while ( * pNext && * pNext != '\n' )
722+ * pNext ++ = ' ' ;
723+ if ( * pNext == 0 )
724+ return ;
725+ }
726+ }
727+
699728/**Function*************************************************************
700729
701730 Synopsis [Prepares the parsing.]
@@ -717,6 +746,8 @@ static void Io_MvReadPreparse( Io_MvMan_t * p )
717746{
718747 char * pCur , * pPrev ;
719748 int i , fComment = 0 ;
749+ Io_MvReplaceBuffersByShorts ( p -> pBuffer );
750+
720751 // parse the buffer into lines and remove comments
721752 Vec_PtrPush ( p -> vLines , p -> pBuffer );
722753 for ( pCur = p -> pBuffer ; * pCur ; pCur ++ )
You can’t perform that action at this time.
0 commit comments