VirtualBox

Changeset 20364 in vbox for trunk/src/VBox/Runtime/generic


Ignore:
Timestamp:
Jun 8, 2009 12:17:43 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
48287
Message:

IPRT: BEGIN_DECLS -> RT_BEGIN_DECLS; END_DECLS -> RT_END_DECLS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/env-generic.cpp

    r8245 r20364  
    4949#endif
    5050#if defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD) || defined(RT_OS_OPENBSD)
    51 __BEGIN_DECLS
     51RT_BEGIN_DECLS
    5252extern char **environ;
    53 __END_DECLS
     53RT_END_DECLS
    5454#endif
    5555
     
    7373    /** Magic value . */
    7474    uint32_t    u32Magic;
    75     /** Number of variables in the array. 
     75    /** Number of variables in the array.
    7676     * This does not include the terminating NULL entry. */
    7777    size_t      cVars;
    78     /** Capacity (allocated size) of the array. 
    79      * This includes space for the terminating NULL element (for compatibility 
     78    /** Capacity (allocated size) of the array.
     79     * This includes space for the terminating NULL element (for compatibility
    8080     * with the C library), so that c <= cCapacity - 1. */
    8181    size_t      cAllocated;
    8282    /** Array of environment variables. */
    8383    char      **papszEnv;
    84     /** Array of environment variables in the process CP. 
     84    /** Array of environment variables in the process CP.
    8585     * This get (re-)constructed when RTEnvGetExecEnvP method is called. */
    8686    char      **papszEnvOtherCP;
     
    9292
    9393/**
    94  * Internal worker that resolves the pointer to the default 
     94 * Internal worker that resolves the pointer to the default
    9595 * process environment. (environ)
    96  * 
     96 *
    9797 * @returns Pointer to the default environment.
    9898 *          This may be NULL.
     
    102102#ifdef RT_OS_DARWIN
    103103    return *(_NSGetEnviron());
    104 #elif defined(RT_OS_L4) 
     104#elif defined(RT_OS_L4)
    105105    /* So far, our L4 libraries do not include environment support. */
    106106    return NULL;
    107107#else
    108108    return environ;
    109 #endif 
     109#endif
    110110}
    111111
     
    113113/**
    114114 * Internal worker that creates an environment handle with a specified capacity.
    115  * 
     115 *
    116116 * @returns IPRT status code.
    117117 * @param   ppIntEnv    Where to store the result.
     
    141141
    142142        RTMemFree(pIntEnv);
    143     }   
     143    }
    144144
    145145    return VERR_NO_MEMORY;
     
    156156RTDECL(int) RTEnvDestroy(RTENV Env)
    157157{
    158     /* 
     158    /*
    159159     * Ignore NIL_RTENV and validate input.
    160160     */
     
    167167    AssertReturn(pIntEnv->u32Magic == RTENV_MAGIC, VERR_INVALID_HANDLE);
    168168
    169     /* 
     169    /*
    170170     * Do the cleanup.
    171171     */
     
    192192    /*RTCritSectDelete(&pIntEnv->CritSect) */
    193193    RTMemFree(pIntEnv);
    194    
     194
    195195    return VINF_SUCCESS;
    196196}
     
    285285    else
    286286    {
    287         /* 
     287        /*
    288288         * Make a copy of the variable name so we can terminate it
    289289         * properly and then pass the request on to RTEnvSetEx.
     
    312312    if (Env == RTENV_DEFAULT)
    313313    {
    314         /* 
     314        /*
    315315         * Since RTEnvPut isn't UTF-8 clean and actually expects the strings
    316          * to be in the current code page (codeset), we'll do the necessary 
     316         * to be in the current code page (codeset), we'll do the necessary
    317317         * conversions here.
    318318         */
     
    362362            if (iVar < pIntEnv->cVars)
    363363            {
    364                 /* 
     364                /*
    365365                 * Replace the current entry. Simple.
    366366                 */
     
    371371            {
    372372                /*
    373                  * Adding a new variable. Resize the array if required 
     373                 * Adding a new variable. Resize the array if required
    374374                 * and then insert the new value at the end.
    375375                 */
     
    395395                }
    396396            }
    397    
     397
    398398            RTENV_UNLOCK(pIntEnv);
    399399
     
    416416    if (Env == RTENV_DEFAULT)
    417417    {
    418         /* 
     418        /*
    419419         * Since RTEnvUnset isn't UTF-8 clean and actually expects the strings
    420          * to be in the current code page (codeset), we'll do the necessary 
     420         * to be in the current code page (codeset), we'll do the necessary
    421421         * conversions here.
    422422         */
     
    459459    }
    460460    return rc;
    461    
     461
    462462}
    463463
     
    475475    if (Env == RTENV_DEFAULT)
    476476    {
    477         /* 
     477        /*
    478478         * Since RTEnvGet isn't UTF-8 clean and actually expects the strings
    479          * to be in the current code page (codeset), we'll do the necessary 
     479         * to be in the current code page (codeset), we'll do the necessary
    480480         * conversions here.
    481481         */
     
    545545    }
    546546    return rc;
    547    
     547
    548548}
    549549
     
    556556    if (Env == RTENV_DEFAULT)
    557557    {
    558         /* 
     558        /*
    559559         * Since RTEnvExist isn't UTF-8 clean and actually expects the strings
    560          * to be in the current code page (codeset), we'll do the necessary 
     560         * to be in the current code page (codeset), we'll do the necessary
    561561         * conversions here.
    562562         */
     
    615615        RTENV_LOCK(pIntEnv);
    616616
    617         /* 
    618          * Free any old envp. 
     617        /*
     618         * Free any old envp.
    619619         */
    620620        if (pIntEnv->papszEnvOtherCP)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette