Internationalization and localization tools


File and Path Operation

FILE *popen(const char *command, const char *mode);

FILE *_popen(const char *command, const char *mode);

FILE *_wpopen(const wchar_t *command, const wchar_t *mode);

FILE *_tpopen(const TCHAR *command, const TCHAR *mode);

Internationalization (I18n) Function Overview

The popen function executes a command and creates a pipe between the calling process and the executed command specified by command with the mode settings indicated by mode. It returns a stream associated with one end of the created pipe. The other end of the pipe is associated with the spawned command's standard input or standard output. In the event of an error, NULL is returned.

_popen is the same as popen, supported on Windows platforms.

Also, on Windows platforms, _wpopen is the wide-character version of _popen; its arguments are wide-character strings. There is no ANSI wide-character equivalent.

_tpopen is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _popen or _wpopen.

See the MSDN Library for more information on Windows systems; or the GNU C Library for flags supported by the GCC compiler.

I18n Issues

Use the appropriate version of the function as required for internationalization support.

On ANSI UTF-16 platforms, use a conversion function to convert the wide-character strings to multibyte-character strings and then call popen.

Recommended Replacements*

*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.

File and Path Functions

 

Lingoport internationalization and localization services and software