Exemple #1
0
intstar4        fortran FGETENV( string PGM *env_var, string PGM *value ) {
//=========================================================================

    char        *buff;
    char        *ptr;
    int         len;

    len = 0;
    for(;;) {
        if( len == env_var->len ) break;
        if( env_var->strptr[ len ] == ' ' ) break;
        ++len;
    }
    if( len == 0 ) return( 0 );
    buff = alloca( len + sizeof( char ) );
    if( buff != NULL ) {
        pgm_memget( buff, env_var->strptr, len );
        buff[ len ] = NULLCHAR;
        ptr = getenv( buff );
        if( ptr != NULL ) {
            len = strlen( ptr );
            if( len > value->len ) {
                len = value->len;
            }
            pgm_memput( value->strptr, ptr, len );
            pgm_memset( value->strptr + len, ' ', value->len - len );
            return( len );
        }
    }
    return( 0 );
}
Exemple #2
0
intstar4        __fortran DWFSETABOUTDLG( string PGM *title, string PGM *text) {
//============================================================================

    char        *ttl;
    char        *txt;

    ttl = alloca( title->len + 1 );
    if( !ttl ) {
        return( 0 );
    }
    pgm_memget( ttl, title->strptr, title->len );
    ttl[ title->len ] = NULLCHAR;

    txt = alloca( text->len + 1 );
    if( !txt ) {
        return( 0 );
    }
    pgm_memget( txt, text->strptr, text->len );
    txt[ text->len ] = NULLCHAR;
    return( _dwSetAboutDlg( ttl, txt ) );
}
Exemple #3
0
intstar4        __fortran DWFSETAPPTITLE( string PGM *title ) {
//===========================================================

    char        *ttl;

    ttl = alloca( title->len + 1 );
    if( !ttl ) {
        return( 0 );
    }
    pgm_memget( ttl, title->strptr, title->len );
    ttl[ title->len ] = NULLCHAR;
    return( _dwSetAppTitle( ttl ) );
}
Exemple #4
0
intstar4        __fortran DWFSETCONTITLE( intstar4 *unit, string PGM *title ) {
//===========================================================================

    char        *ttl;
    int         fh;

    fh = SYSHANDLE( unit );
    if( fh == -1 ) return( 0 );
    ttl = alloca( title->len + 1 );
    if( !ttl ) {
        return( 0 );
    }
    pgm_memget( ttl, title->strptr, title->len );
    ttl[ title->len ] = NULLCHAR;
    return( _dwSetConTitle( SYSHANDLE( unit ), ttl ) );
}
Exemple #5
0
void    NextIFBuff( char *buffer, int len, unsigned_32 recnum,
                    string PGM *ifile ) {
//============================================================

    pgm_memget( buffer, _Normalize( ifile->strptr, (recnum-1)*len ), len );
}