third_party/inchi/INCHI_BASE/src/ichiprt1.c
int OutputAUXINFO_HeaderAndNormalization_type( CANON_GLOBALS    *pCG,
                                               INCHI_IOSTREAM   *out_file,
                                               INCHI_IOS_STRING *strbuf,
                                               int              bINChIOutputOptions,
                                               int              *INCHI_basic_or_INCHI_reconnected,
                                               int              num_components2[],
                                               INCHI_OUT_CTL    *io,
                                               char             *pLF,
                                               char             *pTAB )
{
    /* AuxInfo header  */
    if (*INCHI_basic_or_INCHI_reconnected == INCHI_BAS)
    {
        inchi_strbuf_printf( strbuf, "AuxInfo=" ); /* in wINChI window, separate INChI: from AuxInfo: with blank line */
        inchi_ios_print( out_file, "%s%s%s",
                                  /* blank line before AuxInfo in winchi window unless it is an annotation */
            ( bINChIOutputOptions & INCHI_OUT_WINCHI_WINDOW ) ? "\n" : "",
                                  strbuf->pStr, pLF );
        szGetTag( AuxLbl, io->nTag, io->bTag1 = AL_VERS, io->szTag1, &io->bAlways );
        inchi_strbuf_reset( strbuf ); io->tot_len = 0;
        inchi_strbuf_printf( strbuf, "%s", x_curr_ver );
        /* avoid leading slash in plain output */
        if (str_LineEnd( io->szTag1, &io->bOverflow, strbuf, -1, io->bPlainTextTags ))
        {
            return 1;
        }
        inchi_ios_print( out_file, "%s%s", strbuf->pStr, pLF );
    }
    else
    {
        if (*INCHI_basic_or_INCHI_reconnected == INCHI_REC)
        {
            szGetTag( AuxLbl, io->nTag, io->bTag1 = AL_REC_, io->szTag1, &io->bAlways );
            inchi_ios_print( out_file, "%s%s", io->szTag1, pLF );
        }
    }

    /* AuxInfo normalization type */
    if (num_components2[0] || num_components2[1])
    {
        szGetTag( AuxLbl, io->nTag, io->bTag1 = AL_NORM, io->szTag1, &io->bAlways );
        inchi_strbuf_reset( strbuf ); io->tot_len = 0;
        inchi_strbuf_printf( strbuf, "%d", ( io->bTautomeric && io->bTautomericOutputAllowed ) ? io->bTautomeric : 0 );
        if (str_LineEnd( io->szTag1, &io->bOverflow, strbuf, -1, io->bPlainTextTags ))
        {
            return 1;
        }
        inchi_ios_print( out_file, "%s%s", strbuf->pStr, pLF );
    }

    return 0;
}
/****************************************************************************
Output AuxInfo: header and normalization type
****************************************************************************/
Output AuxInfo: header and normalization type
Output AuxInfo : header and normalization type
int OutputAUXINFO_HeaderAndNormalization_type( CANON_GLOBALS    *pCG,
                                               INCHI_IOSTREAM   *out_file,
                                               INCHI_IOS_STRING *strbuf,
                                               int              bINChIOutputOptions,
                                               int              *INCHI_basic_or_INCHI_reconnected,
                                               int              num_components2[],
                                               INCHI_OUT_CTL    *io,
                                               char             *pLF,
                                               char             *pTAB )
{
    if (*INCHI_basic_or_INCHI_reconnected == INCHI_BAS)
    {
        inchi_strbuf_printf( strbuf, "AuxInfo=" ); 
        inchi_ios_print( out_file, "%s%s%s",
            ( bINChIOutputOptions & INCHI_OUT_WINCHI_WINDOW ) ? "\n" : "",
                                  strbuf->pStr, pLF );
        szGetTag( AuxLbl, io->nTag, io->bTag1 = AL_VERS, io->szTag1, &io->bAlways );
        inchi_strbuf_reset( strbuf ); io->tot_len = 0;
        inchi_strbuf_printf( strbuf, "%s", x_curr_ver );
        if (str_LineEnd( io->szTag1, &io->bOverflow, strbuf, -1, io->bPlainTextTags ))
        {
            return 1;
        }
        inchi_ios_print( out_file, "%s%s", strbuf->pStr, pLF );
    }
    else
    {
        if (*INCHI_basic_or_INCHI_reconnected == INCHI_REC)
        {
            szGetTag( AuxLbl, io->nTag, io->bTag1 = AL_REC_, io->szTag1, &io->bAlways );
            inchi_ios_print( out_file, "%s%s", io->szTag1, pLF );
        }
    }
    if (num_components2[0] || num_components2[1])
    {
        szGetTag( AuxLbl, io->nTag, io->bTag1 = AL_NORM, io->szTag1, &io->bAlways );
        inchi_strbuf_reset( strbuf ); io->tot_len = 0;
        inchi_strbuf_printf( strbuf, "%d", ( io->bTautomeric && io->bTautomericOutputAllowed ) ? io->bTautomeric : 0 );
        if (str_LineEnd( io->szTag1, &io->bOverflow, strbuf, -1, io->bPlainTextTags ))
        {
            return 1;
        }
        inchi_ios_print( out_file, "%s%s", strbuf->pStr, pLF );
    }
    return 0;
}
int OutputAUXINFO_HeaderAndNormalization_type ( CANON_GLOBALS * pCG , INCHI_IOSTREAM * out_file , INCHI_IOS_STRING * strbuf , int bINChIOutputOptions , int * INCHI_basic_or_INCHI_reconnected , int num_components2 [ ] , INCHI_OUT_CTL * io , char * pLF , char * pTAB ) { if ( * INCHI_basic_or_INCHI_reconnected == INCHI_BAS ) { inchi_strbuf_printf ( strbuf , " " ) ; inchi_ios_print ( out_file , " " , ( bINChIOutputOptions & INCHI_OUT_WINCHI_WINDOW ) ? " \n " : " " , strbuf -> pStr , pLF ) ; szGetTag ( AuxLbl , io -> nTag , io -> bTag1 = AL_VERS , io -> szTag1 , & io -> bAlways ) ; inchi_strbuf_reset ( strbuf ) ; io -> tot_len = 0 ; inchi_strbuf_printf ( strbuf , " " , x_curr_ver ) ; if ( str_LineEnd ( io -> szTag1 , & io -> bOverflow , strbuf , -1 , io -> bPlainTextTags ) ) { return 1 ; } inchi_ios_print ( out_file , " " , strbuf -> pStr , pLF ) ; } else { if ( * INCHI_basic_or_INCHI_reconnected == INCHI_REC ) { szGetTag ( AuxLbl , io -> nTag , io -> bTag1 = AL_REC_ , io -> szTag1 , & io -> bAlways ) ; inchi_ios_print ( out_file , " " , io -> szTag1 , pLF ) ; } } if ( num_components2 [ 0 ] || num_components2 [ 1 ] ) { szGetTag ( AuxLbl , io -> nTag , io -> bTag1 = AL_NORM , io -> szTag1 , & io -> bAlways ) ; inchi_strbuf_reset ( strbuf ) ; io -> tot_len = 0 ; inchi_strbuf_printf ( strbuf , " " , ( io -> bTautomeric && io -> bTautomericOutputAllowed ) ? io -> bTautomeric : 0 ) ; if ( str_LineEnd ( io -> szTag1 , & io -> bOverflow , strbuf , -1 , io -> bPlainTextTags ) ) { return 1 ; } inchi_ios_print ( out_file , " " , strbuf -> pStr , pLF ) ; } return 0 ; }
Output AuxInfo: header and normalization type
Output AuxInfo : header and normalization type
/* AuxInfo header  */ /* in wINChI window, separate INChI: from AuxInfo: with blank line */ /* blank line before AuxInfo in winchi window unless it is an annotation */ /* avoid leading slash in plain output */ /* AuxInfo normalization type */