ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
amapRead.c File Reference
#include "amapInt.h"
#include "base/io/ioAbc.h"
Include dependency graph for amapRead.c:

Go to the source code of this file.

Macros

#define AMAP_STRING_GATE   "GATE"
 DECLARATIONS ///.
 
#define AMAP_STRING_PIN   "PIN"
 
#define AMAP_STRING_NONINV   "NONINV"
 
#define AMAP_STRING_INV   "INV"
 
#define AMAP_STRING_UNKNOWN   "UNKNOWN"
 
#define AMAP_SYMB_AND   '*'
 
#define AMAP_SYMB_AND2   '&'
 
#define AMAP_SYMB_OR1   '+'
 
#define AMAP_SYMB_OR2   '|'
 
#define AMAP_SYMB_XOR   '^'
 
#define AMAP_SYMB_NOT   '!'
 
#define AMAP_SYMB_AFTNOT   '\''
 
#define AMAP_SYMB_OPEN   '('
 
#define AMAP_SYMB_CLOSE   ')'
 

Enumerations

enum  Amap_PinPhase_t { AMAP_PHASE_UNKNOWN , AMAP_PHASE_INV , AMAP_PHASE_NONINV }
 

Functions

char * Amap_LoadFile (char *pFileName)
 FUNCTION DEFINITIONS ///.
 
void Amap_RemoveComments (char *pBuffer, int *pnDots, int *pnLines)
 
Vec_Ptr_tAmap_DeriveTokens (char *pBuffer)
 
int Amap_ParseCountPins (Vec_Ptr_t *vTokens, int iPos)
 
int Amap_GateCollectNames (Aig_MmFlex_t *pMem, char *pForm, char *pPinNames[])
 
Amap_Gat_tAmap_ParseGateWithSamePins (Amap_Gat_t *p)
 
int Amap_CollectFormulaTokens (Vec_Ptr_t *vTokens, char *pToken, int iPos)
 
Amap_Lib_tAmap_ParseTokens (Vec_Ptr_t *vTokens, int fVerbose)
 
Amap_Lib_tAmap_LibReadBuffer (char *pBuffer, int fVerbose)
 
Amap_Lib_tAmap_LibReadFile (char *pFileName, int fVerbose)
 

Macro Definition Documentation

◆ AMAP_STRING_GATE

#define AMAP_STRING_GATE   "GATE"

DECLARATIONS ///.

CFile****************************************************************

FileName [amapRead.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Technology mapper for standard cells.]

Synopsis []

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
amapRead.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]

Definition at line 31 of file amapRead.c.

◆ AMAP_STRING_INV

#define AMAP_STRING_INV   "INV"

Definition at line 34 of file amapRead.c.

◆ AMAP_STRING_NONINV

#define AMAP_STRING_NONINV   "NONINV"

Definition at line 33 of file amapRead.c.

◆ AMAP_STRING_PIN

#define AMAP_STRING_PIN   "PIN"

Definition at line 32 of file amapRead.c.

◆ AMAP_STRING_UNKNOWN

#define AMAP_STRING_UNKNOWN   "UNKNOWN"

Definition at line 35 of file amapRead.c.

◆ AMAP_SYMB_AFTNOT

#define AMAP_SYMB_AFTNOT   '\''

Definition at line 44 of file amapRead.c.

◆ AMAP_SYMB_AND

#define AMAP_SYMB_AND   '*'

Definition at line 38 of file amapRead.c.

◆ AMAP_SYMB_AND2

#define AMAP_SYMB_AND2   '&'

Definition at line 39 of file amapRead.c.

◆ AMAP_SYMB_CLOSE

#define AMAP_SYMB_CLOSE   ')'

Definition at line 46 of file amapRead.c.

◆ AMAP_SYMB_NOT

#define AMAP_SYMB_NOT   '!'

Definition at line 43 of file amapRead.c.

◆ AMAP_SYMB_OPEN

#define AMAP_SYMB_OPEN   '('

Definition at line 45 of file amapRead.c.

◆ AMAP_SYMB_OR1

#define AMAP_SYMB_OR1   '+'

Definition at line 40 of file amapRead.c.

◆ AMAP_SYMB_OR2

#define AMAP_SYMB_OR2   '|'

Definition at line 41 of file amapRead.c.

◆ AMAP_SYMB_XOR

#define AMAP_SYMB_XOR   '^'

Definition at line 42 of file amapRead.c.

Enumeration Type Documentation

◆ Amap_PinPhase_t

Enumerator
AMAP_PHASE_UNKNOWN 
AMAP_PHASE_INV 
AMAP_PHASE_NONINV 

Definition at line 48 of file amapRead.c.

48 {
Amap_PinPhase_t
Definition amapRead.c:48
@ AMAP_PHASE_UNKNOWN
Definition amapRead.c:49
@ AMAP_PHASE_NONINV
Definition amapRead.c:51
@ AMAP_PHASE_INV
Definition amapRead.c:50

Function Documentation

◆ Amap_CollectFormulaTokens()

int Amap_CollectFormulaTokens ( Vec_Ptr_t * vTokens,
char * pToken,
int iPos )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 312 of file amapRead.c.

313{
314 char * pNext, * pPrev;
315 pPrev = pToken + strlen(pToken);
316 while ( *(pPrev-1) != ';' )
317 {
318 *pPrev++ = ' ';
319 pNext = (char *)Vec_PtrEntry(vTokens, iPos++);
320 while ( *pNext )
321 *pPrev++ = *pNext++;
322 }
323 *(pPrev-1) = 0;
324 return iPos;
325}
int strlen()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Amap_DeriveTokens()

Vec_Ptr_t * Amap_DeriveTokens ( char * pBuffer)

Function*************************************************************

Synopsis [Splits the stream into tokens.]

Description []

SideEffects []

SeeAlso []

Definition at line 188 of file amapRead.c.

189{
190 Vec_Ptr_t * vTokens;
191 char * pToken;
192 vTokens = Vec_PtrAlloc( 1000 );
193 pToken = strtok( pBuffer, " =\t\r\n" );
194 while ( pToken )
195 {
196 Vec_PtrPush( vTokens, pToken );
197 pToken = strtok( NULL, " =\t\r\n" );
198 // skip latches
199 if ( pToken && strcmp( pToken, "LATCH" ) == 0 )
200 while ( pToken && strcmp( pToken, "GATE" ) != 0 )
201 pToken = strtok( NULL, " =\t\r\n" );
202 }
203 return vTokens;
204}
int strcmp()
char * strtok()
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Amap_GateCollectNames()

int Amap_GateCollectNames ( Aig_MmFlex_t * pMem,
char * pForm,
char * pPinNames[] )

Function*************************************************************

Synopsis [Collect the pin names used in the formula.]

Description []

SideEffects []

SeeAlso []

Definition at line 240 of file amapRead.c.

241{
242 char Buffer[1000];
243 char * pTemp;
244 int nPins, i;
245 // save the formula as it was
246 strcpy( Buffer, pForm );
247 // remove the non-name symbols
248 for ( pTemp = Buffer; *pTemp; pTemp++ )
249 if ( *pTemp == AMAP_SYMB_AND || *pTemp == AMAP_SYMB_OR1 || *pTemp == AMAP_SYMB_OR2
250 || *pTemp == AMAP_SYMB_XOR || *pTemp == AMAP_SYMB_NOT || *pTemp == AMAP_SYMB_OPEN
251 || *pTemp == AMAP_SYMB_CLOSE || *pTemp == AMAP_SYMB_AFTNOT || *pTemp == AMAP_SYMB_AND2 )
252 *pTemp = ' ';
253 // save the names
254 nPins = 0;
255 pTemp = strtok( Buffer, " " );
256 while ( pTemp )
257 {
258 for ( i = 0; i < nPins; i++ )
259 if ( strcmp( pTemp, pPinNames[i] ) == 0 )
260 break;
261 if ( i == nPins )
262 { // cannot find this name; save it
263 pPinNames[nPins++] = Amap_ParseStrsav( pMem, pTemp );
264 }
265 // get the next name
266 pTemp = strtok( NULL, " " );
267 }
268 return nPins;
269}
#define AMAP_SYMB_AND
Definition amapRead.c:38
#define AMAP_SYMB_AND2
Definition amapRead.c:39
#define AMAP_SYMB_OR1
Definition amapRead.c:40
#define AMAP_SYMB_NOT
Definition amapRead.c:43
#define AMAP_SYMB_AFTNOT
Definition amapRead.c:44
#define AMAP_SYMB_OPEN
Definition amapRead.c:45
#define AMAP_SYMB_OR2
Definition amapRead.c:41
#define AMAP_SYMB_CLOSE
Definition amapRead.c:46
#define AMAP_SYMB_XOR
Definition amapRead.c:42
char * strcpy()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Amap_LibReadBuffer()

Amap_Lib_t * Amap_LibReadBuffer ( char * pBuffer,
int fVerbose )

Function*************************************************************

Synopsis [Reads the library from the input file.]

Description []

SideEffects []

SeeAlso []

Definition at line 458 of file amapRead.c.

459{
460 Amap_Lib_t * pLib;
461 Vec_Ptr_t * vTokens;
462 Amap_RemoveComments( pBuffer, NULL, NULL );
463 vTokens = Amap_DeriveTokens( pBuffer );
464 pLib = Amap_ParseTokens( vTokens, fVerbose );
465 if ( pLib == NULL )
466 {
467 Vec_PtrFree( vTokens );
468 return NULL;
469 }
470 Vec_PtrFree( vTokens );
471 return pLib;
472}
void Amap_RemoveComments(char *pBuffer, int *pnDots, int *pnLines)
Definition amapRead.c:121
Vec_Ptr_t * Amap_DeriveTokens(char *pBuffer)
Definition amapRead.c:188
Amap_Lib_t * Amap_ParseTokens(Vec_Ptr_t *vTokens, int fVerbose)
Definition amapRead.c:338
typedefABC_NAMESPACE_HEADER_START struct Amap_Lib_t_ Amap_Lib_t
INCLUDES ///.
Definition amap.h:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Amap_LibReadFile()

Amap_Lib_t * Amap_LibReadFile ( char * pFileName,
int fVerbose )

Function*************************************************************

Synopsis [Reads the library from the input file.]

Description []

SideEffects []

SeeAlso []

Definition at line 485 of file amapRead.c.

486{
487 Amap_Lib_t * pLib;
488 char * pBuffer;
489 pBuffer = Amap_LoadFile( pFileName );
490 if ( pBuffer == NULL )
491 return NULL;
492 pLib = Amap_LibReadBuffer( pBuffer, fVerbose );
493 if ( pLib )
494 pLib->pName = Abc_UtilStrsav( pFileName );
495 ABC_FREE( pBuffer );
496 return pLib;
497}
#define ABC_FREE(obj)
Definition abc_global.h:267
Amap_Lib_t * Amap_LibReadBuffer(char *pBuffer, int fVerbose)
Definition amapRead.c:458
char * Amap_LoadFile(char *pFileName)
FUNCTION DEFINITIONS ///.
Definition amapRead.c:74
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Amap_LoadFile()

char * Amap_LoadFile ( char * pFileName)

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Loads the file into temporary buffer.]

Description []

SideEffects []

SeeAlso []

Definition at line 74 of file amapRead.c.

75{
76// extern FILE * Io_FileOpen( const char * FileName, const char * PathVar, const char * Mode, int fVerbose );
77 FILE * pFile;
78 char * pBuffer;
79 int nFileSize;
80 int RetValue;
81 // open the BLIF file for binary reading
82 pFile = Io_FileOpen( pFileName, "open_path", "rb", 1 );
83// pFile = fopen( FileName, "rb" );
84 // if we got this far, file should be okay otherwise would
85 // have been detected by caller
86 if ( pFile == NULL )
87 {
88 printf( "Cannot open file \"%s\".\n", pFileName );
89 return NULL;
90 }
91 assert ( pFile != NULL );
92 // get the file size, in bytes
93 fseek( pFile, 0, SEEK_END );
94 nFileSize = ftell( pFile );
95 // move the file current reading position to the beginning
96 rewind( pFile );
97 // load the contents of the file into memory
98 pBuffer = ABC_ALLOC( char, nFileSize + 10 );
99 RetValue = fread( pBuffer, nFileSize, 1, pFile );
100 // terminate the string with '\0'
101 pBuffer[ nFileSize ] = '\0';
102 strcat( pBuffer, "\n.end\n" );
103 // close file
104 fclose( pFile );
105 return pBuffer;
106}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
FILE * Io_FileOpen(const char *FileName, const char *PathVar, const char *Mode, int fVerbose)
Definition ioUtil.c:828
#define assert(ex)
Definition util_old.h:213
VOID_HACK rewind()
char * strcat()
#define SEEK_END
Definition zconf.h:392
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Amap_ParseCountPins()

int Amap_ParseCountPins ( Vec_Ptr_t * vTokens,
int iPos )

Function*************************************************************

Synopsis [Finds the number of pins.]

Description []

SideEffects []

SeeAlso []

Definition at line 217 of file amapRead.c.

218{
219 char * pToken;
220 int i, Counter = 0;
221 Vec_PtrForEachEntryStart( char *, vTokens, pToken, i, iPos )
222 if ( !strcmp( pToken, AMAP_STRING_PIN ) )
223 Counter++;
224 else if ( !strcmp( pToken, AMAP_STRING_GATE ) )
225 return Counter;
226 return Counter;
227}
#define AMAP_STRING_GATE
DECLARATIONS ///.
Definition amapRead.c:31
#define AMAP_STRING_PIN
Definition amapRead.c:32
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)
Definition vecPtr.h:57
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Amap_ParseGateWithSamePins()

Amap_Gat_t * Amap_ParseGateWithSamePins ( Amap_Gat_t * p)

Function*************************************************************

Synopsis [Creates a duplicate gate with pins specified.]

Description []

SideEffects []

SeeAlso []

Definition at line 282 of file amapRead.c.

283{
284 Amap_Gat_t * pGate;
285 Amap_Pin_t * pPin;
286 char * pPinNames[128];
287 int nPinNames;
288 assert( p->nPins == 1 && !strcmp( p->Pins->pName, "*" ) );
289 nPinNames = Amap_GateCollectNames( p->pLib->pMemGates, p->pForm, pPinNames );
290 pGate = Amap_ParseGateAlloc( p->pLib->pMemGates, nPinNames );
291 *pGate = *p;
292 pGate->nPins = nPinNames;
293 Amap_GateForEachPin( pGate, pPin )
294 {
295 *pPin = *p->Pins;
296 pPin->pName = pPinNames[pPin - pGate->Pins];
297 }
298 return pGate;
299}
#define Amap_GateForEachPin(pGate, pPin)
Definition amapInt.h:297
struct Amap_Gat_t_ Amap_Gat_t
Definition amapInt.h:66
struct Amap_Pin_t_ Amap_Pin_t
BASIC TYPES ///.
Definition amapInt.h:65
int Amap_GateCollectNames(Aig_MmFlex_t *pMem, char *pForm, char *pPinNames[])
Definition amapRead.c:240
Cube * p
Definition exorList.c:222
unsigned nPins
Definition amapInt.h:162
Amap_Pin_t Pins[0]
Definition amapInt.h:163
char * pName
Definition amapInt.h:141
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Amap_ParseTokens()

Amap_Lib_t * Amap_ParseTokens ( Vec_Ptr_t * vTokens,
int fVerbose )

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 338 of file amapRead.c.

339{
340 Amap_Lib_t * p;
341 Amap_Gat_t * pGate, * pPrev;
342 Amap_Pin_t * pPin;
343 char * pToken, * pMoGate = NULL;
344 int i, nPins, iPos = 0, Count = 0;
345 p = Amap_LibAlloc();
346 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
347 do
348 {
349 if ( strcmp( pToken, AMAP_STRING_GATE ) )
350 {
351 Amap_LibFree( p );
352 printf( "The first line should begin with %s.\n", AMAP_STRING_GATE );
353 return NULL;
354 }
355 // start gate
356 nPins = Amap_ParseCountPins( vTokens, iPos );
357 pGate = Amap_ParseGateAlloc( p->pMemGates, nPins );
358 memset( pGate, 0, sizeof(Amap_Gat_t) );
359 pGate->Id = Vec_PtrSize( p->vGates );
360 Vec_PtrPush( p->vGates, pGate );
361 pGate->pLib = p;
362 pGate->nPins = nPins;
363 // read gate
364 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
365 pGate->pName = Amap_ParseStrsav( p->pMemGates, pToken );
366 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
367 pGate->dArea = atof( pToken );
368 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
369 pGate->pOutName = Amap_ParseStrsav( p->pMemGates, pToken );
370 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
371 iPos = Amap_CollectFormulaTokens( vTokens, pToken, iPos );
372 pGate->pForm = Amap_ParseStrsav( p->pMemGates, pToken );
373 // read pins
374 Amap_GateForEachPin( pGate, pPin )
375 {
376 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
377 if ( strcmp( pToken, AMAP_STRING_PIN ) )
378 {
379 Amap_LibFree( p );
380 printf( "Cannot parse cell %s.\n", pGate->pName );
381 return NULL;
382 }
383 // read pin
384 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
385 pPin->pName = Amap_ParseStrsav( p->pMemGates, pToken );
386 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
387 if ( strcmp( pToken, AMAP_STRING_UNKNOWN ) == 0 )
389 else if ( strcmp( pToken, AMAP_STRING_INV ) == 0 )
390 pPin->Phase = AMAP_PHASE_INV;
391 else if ( strcmp( pToken, AMAP_STRING_NONINV ) == 0 )
392 pPin->Phase = AMAP_PHASE_NONINV;
393 else
394 {
395 Amap_LibFree( p );
396 printf( "Cannot read phase of pin %s of cell %s\n", pPin->pName, pGate->pName );
397 return NULL;
398 }
399 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
400 pPin->dLoadInput = atof( pToken );
401 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
402 pPin->dLoadMax = atof( pToken );
403 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
404 pPin->dDelayBlockRise = atof( pToken );
405 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
406 pPin->dDelayFanoutRise = atof( pToken );
407 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
408 pPin->dDelayBlockFall = atof( pToken );
409 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
410 pPin->dDelayFanoutFall = atof( pToken );
411 if ( pPin->dDelayBlockRise > pPin->dDelayBlockFall )
412 pPin->dDelayBlockMax = pPin->dDelayBlockRise;
413 else
414 pPin->dDelayBlockMax = pPin->dDelayBlockFall;
415 }
416 // fix the situation when all pins are represented as one
417 if ( pGate->nPins == 1 && !strcmp( pGate->Pins->pName, "*" ) )
418 {
419 pGate = Amap_ParseGateWithSamePins( pGate );
420 Vec_PtrPop( p->vGates );
421 Vec_PtrPush( p->vGates, pGate );
422 }
423 pToken = (char *)Vec_PtrEntry(vTokens, iPos++);
424//printf( "Finished reading cell %s (%s)\n", pGate->pName, pGate->pOutName );
425 }
426 while ( strcmp( pToken, ".end" ) );
427
428 // check if there are gates with identical names
429 pPrev = NULL;
430 Amap_LibForEachGate( p, pGate, i )
431 {
432 if ( pPrev && !strcmp(pPrev->pName, pGate->pName) )
433 {
434 pPrev->pTwin = pGate, pGate->pTwin = pPrev;
435// printf( "Warning: Detected multi-output cell \"%s\".\n", pGate->pName );
436 if ( pMoGate == NULL )
437 pMoGate = pGate->pName;
438 Count++;
439 }
440 pPrev = pGate;
441 }
442 if ( Count )
443 printf( "Warning: Detected %d multi-output cells (for example, \"%s\").\n", Count, pMoGate );
444 return p;
445}
Amap_Lib_t * Amap_LibAlloc()
DECLARATIONS ///.
Definition amapLib.c:45
#define Amap_LibForEachGate(pLib, pGate, i)
Definition amapInt.h:294
#define AMAP_STRING_UNKNOWN
Definition amapRead.c:35
int Amap_CollectFormulaTokens(Vec_Ptr_t *vTokens, char *pToken, int iPos)
Definition amapRead.c:312
#define AMAP_STRING_NONINV
Definition amapRead.c:33
int Amap_ParseCountPins(Vec_Ptr_t *vTokens, int iPos)
Definition amapRead.c:217
#define AMAP_STRING_INV
Definition amapRead.c:34
Amap_Gat_t * Amap_ParseGateWithSamePins(Amap_Gat_t *p)
Definition amapRead.c:282
void Amap_LibFree(Amap_Lib_t *p)
Definition amapLib.c:67
char * pForm
Definition amapInt.h:158
Amap_Lib_t * pLib
Definition amapInt.h:153
double dArea
Definition amapInt.h:157
Amap_Gat_t * pTwin
Definition amapInt.h:154
char * pOutName
Definition amapInt.h:156
char * pName
Definition amapInt.h:155
unsigned Id
Definition amapInt.h:160
double dDelayBlockMax
Definition amapInt.h:149
double dLoadMax
Definition amapInt.h:144
double dDelayBlockRise
Definition amapInt.h:145
double dDelayFanoutFall
Definition amapInt.h:148
double dLoadInput
Definition amapInt.h:143
double dDelayBlockFall
Definition amapInt.h:147
double dDelayFanoutRise
Definition amapInt.h:146
char * memset()
double atof()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Amap_RemoveComments()

void Amap_RemoveComments ( char * pBuffer,
int * pnDots,
int * pnLines )

Function*************************************************************

Synopsis [Eliminates comments from the input file.]

Description [As a byproduct, this procedure also counts the number lines and dot-statements in the input file. This also joins non-comment lines that are joined with a backspace '\']

SideEffects []

SeeAlso []

Definition at line 121 of file amapRead.c.

122{
123 char * pCur;
124 int nDots, nLines;
125 // scan through the buffer and eliminate comments
126 // (in the BLIF file, comments are lines starting with "#")
127 nDots = nLines = 0;
128 for ( pCur = pBuffer; *pCur; pCur++ )
129 {
130 // if this is the beginning of comment
131 // clean it with spaces until the new line statement
132 if ( *pCur == '#' ) {
133 while ( *pCur != '\n' ) {
134 *pCur++ = ' ';
135 }
136 }
137 // count the number of new lines and dots
138 if ( *pCur == '\n' ) {
139 if (pCur > pBuffer) {
140 if (*(pCur - 1) == '\r') {
141 // DOS(R) file support
142 if (pCur > (pBuffer + 1)) {
143 if (*(pCur - 2)!='\\') {
144 nLines++;
145 }
146 else {
147 // rewind to backslash and overwrite with a space
148 *(pCur - 2) = ' ';
149 *(pCur - 1) = ' ';
150 *pCur = ' ';
151 }
152 }
153 } else {
154 // UNIX(TM) file support
155 if (*(pCur - 1) != '\\') {
156 nLines++;
157 }
158 else {
159 // rewind to backslash and overwrite with a space
160 *(pCur-1) = ' ';
161 *pCur = ' ';
162 }
163 }
164 }
165 }
166 else if ( *pCur == '.' ) {
167 nDots++;
168 }
169 }
170
171 if ( pnDots )
172 *pnDots = nDots;
173 if ( pnLines )
174 *pnLines = nLines;
175}
Here is the caller graph for this function: