"Fossies" - the Fresh Open Source Software Archive

Member "erltools/pub/metachop/newline.h" (26 Mar 2005, 1083 Bytes) of package /linux/misc/old/erltools-4.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "newline.h" see the Fossies "Dox" file reference documentation.

    1 static  EString DoubleBackSlash ( char *fileName )
    2 {
    3     EString result ;
    4     
    5     if ( fileName ) 
    6         while ( *fileName ) {
    7             result += *fileName ;
    8             if ( *fileName == '\\' ) 
    9                 result += '\\';
   10             fileName++ ;
   11         }
   12     return result ;
   13 }
   14 
   15 static  inline void CNewLine ()
   16 {
   17     char    string [10];
   18     
   19     NewLine();
   20     if ( compiledLine ) {
   21         gotocol(1);
   22         WriteString("#line ");
   23         sprintf(string, "%d ", compiledLine);
   24         WriteString(string);
   25         WriteString("\"");
   26         WriteString(DoubleBackSlash(theFileName));
   27         WriteString("\"");
   28         NewLine();
   29     }
   30 }
   31 
   32 static  inline void CLNewLine ( int i )
   33 {
   34     char    string [10];
   35     
   36     NewLine();
   37     if ( compiledLine ) {
   38         gotocol(1);
   39         WriteString("#line ");
   40         sprintf(string, "%d ", compiledLine);
   41         WriteString(string);
   42         WriteString("\"");
   43         WriteString(DoubleBackSlash(theFileName));
   44         WriteString("\"");
   45         LNewLine(i);
   46     }
   47 }
   48 
   49 #define NewLine CNewLine
   50 #define LNewLine CLNewLine
   51