VirtualBox

Changeset 55584 in vbox for trunk/include/iprt


Ignore:
Timestamp:
May 1, 2015 7:11:32 PM (10 years ago)
Author:
vboxsync
Message:

iprt/env.h: Added RTEnvQueryUtf8Block, RTEnvFreeUtf8Block and RTEnvReset.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/env.h

    r55562 r55584  
    8181
    8282/**
     83 * Resets the environment block to contain zero variables.
     84 *
     85 * @returns IPRT status code.
     86 *
     87 * @param   hEnv    Environment block handle.  RTENV_DEFAULT is not supported.
     88 */
     89RTDECL(int) RTEnvReset(RTENV hEnv);
     90
     91/**
    8392 * Get the execve/spawnve/main envp.
    8493 *
     
    112121 */
    113122RTDECL(void) RTEnvFreeUtf16Block(PRTUTF16 pwszzBlock);
     123
     124/**
     125 * Get a sorted, UTF-8 environment block.
     126 *
     127 * The environment block is a sequence of putenv formatted ("NAME=VALUE" or
     128 * "NAME") zero terminated strings ending with an empty string (i.e. last string
     129 * has two zeros).
     130 *
     131 * @returns IPRT status code.
     132 *
     133 * @param   hEnv            Environment block handle.
     134 * @param   fSorted         Whether to sort it, this will affect @a hEnv.
     135 * @param   ppszzBlock      Where to return the environment block.  This must be
     136 *                          freed by calling RTEnvFreeUtf8Block.
     137 * @param   pcbBlock        Where to return the size of the block. Optional.
     138 */
     139RTDECL(int) RTEnvQueryUtf8Block(RTENV hEnv, bool fSorted, char **ppszzBlock, size_t *pcbBlock);
     140
     141/**
     142 * Frees an environment block returned by RTEnvGetUtf8Block().
     143 *
     144 * @param   pszzBlock       What RTEnvGetUtf8Block returned.  NULL is ignored.
     145 */
     146RTDECL(void) RTEnvFreeUtf8Block(char *pszzBlock);
    114147
    115148/**
  • trunk/include/iprt/mangling.h

    r55562 r55584  
    519519# define RTEnvExistsUtf8                                RT_MANGLER(RTEnvExistsUtf8)
    520520# define RTEnvExistEx                                   RT_MANGLER(RTEnvExistEx)
     521# define RTEnvFreeUtf8Block                             RT_MANGLER(RTEnvFreeUtf8Block)
    521522# define RTEnvFreeUtf16Block                            RT_MANGLER(RTEnvFreeUtf16Block)
    522523# define RTEnvGet                                       RT_MANGLER(RTEnvGet)
     
    533534# define RTEnvPutEx                                     RT_MANGLER(RTEnvPutEx)
    534535# define RTEnvQueryUtf16Block                           RT_MANGLER(RTEnvQueryUtf16Block)
     536# define RTEnvQueryUtf8Block                            RT_MANGLER(RTEnvQueryUtf8Block)
     537# define RTEnvReset                                     RT_MANGLER(RTEnvReset)
    535538# define RTEnvSet                                       RT_MANGLER(RTEnvSet)
    536539# define RTEnvSetBad                                    RT_MANGLER(RTEnvSetBad)
Note: See TracChangeset for help on using the changeset viewer.

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