@@ -27,12 +27,12 @@ #ifdef _WIN32 # include #endif -/** - * \brief A class for stream-like communication with a newly created process. +/*! + * @brief A class for stream-like communication with a newly created process. */ @interface OFProcess: OFStream { #ifndef _WIN32 pid_t pid; @@ -42,88 +42,88 @@ #endif int status; BOOL atEndOfStream; } -/** - * \brief Creates a new OFProcess with the specified program and invokes the - * program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \return A new, autoreleased OFProcess. - */ -+ (instancetype)processWithProgram: (OFString*)program; - -/** - * \brief Creates a new OFProcess with the specified program and arguments and - * invokes the program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \param arguments The arguments to pass to the program, or nil - * \return A new, autoreleased OFProcess. - */ -+ (instancetype)processWithProgram: (OFString*)program - arguments: (OFArray*)arguments; - -/** - * \brief Creates a new OFProcess with the specified program, program name and - * arguments and invokes the program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \param programName The program name for the program to invoke (argv[0]). - * Usually, this is equal to program. - * \param arguments The arguments to pass to the program, or nil - * \return A new, autoreleased OFProcess. - */ -+ (instancetype)processWithProgram: (OFString*)program - programName: (OFString*)programName - arguments: (OFArray*)arguments; - -/** - * \brief Initializes an already allocated OFProcess with the specified program - * and invokes the program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \return An initialized OFProcess. - */ -- initWithProgram: (OFString*)program; - -/** - * \brief Initializes an already allocated OFProcess with the specified program - * and arguments and invokes the program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \param arguments The arguments to pass to the program, or nil - * \return An initialized OFProcess. - */ -- initWithProgram: (OFString*)program - arguments: (OFArray*)arguments; - -/** - * \brief Initializes an already allocated OFProcess with the specified program, - * program name and arguments and invokes the program. - * - * \param program The program to execute. If it does not start with a slash, the - * search path specified in PATH is used. - * \param programName The program name for the program to invoke (argv[0]). - * Usually, this is equal to program. - * \param arguments The arguments to pass to the program, or nil - * \return An initialized OFProcess. - */ -- initWithProgram: (OFString*)program - programName: (OFString*)programName - arguments: (OFArray*)arguments; - -/** - * \brief Closes the write direction of the process. +/*! + * @brief Creates a new OFProcess with the specified program and invokes the + * program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @return A new, autoreleased OFProcess. + */ ++ (instancetype)processWithProgram: (OFString*)program; + +/*! + * @brief Creates a new OFProcess with the specified program and arguments and + * invokes the program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @param arguments The arguments to pass to the program, or nil + * @return A new, autoreleased OFProcess. + */ ++ (instancetype)processWithProgram: (OFString*)program + arguments: (OFArray*)arguments; + +/*! + * @brief Creates a new OFProcess with the specified program, program name and + * arguments and invokes the program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @param programName The program name for the program to invoke (argv[0]). + * Usually, this is equal to program. + * @param arguments The arguments to pass to the program, or nil + * @return A new, autoreleased OFProcess. + */ ++ (instancetype)processWithProgram: (OFString*)program + programName: (OFString*)programName + arguments: (OFArray*)arguments; + +/*! + * @brief Initializes an already allocated OFProcess with the specified program + * and invokes the program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @return An initialized OFProcess. + */ +- initWithProgram: (OFString*)program; + +/*! + * @brief Initializes an already allocated OFProcess with the specified program + * and arguments and invokes the program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @param arguments The arguments to pass to the program, or nil + * @return An initialized OFProcess. + */ +- initWithProgram: (OFString*)program + arguments: (OFArray*)arguments; + +/*! + * @brief Initializes an already allocated OFProcess with the specified program, + * program name and arguments and invokes the program. + * + * @param program The program to execute. If it does not start with a slash, the + * search path specified in PATH is used. + * @param programName The program name for the program to invoke (argv[0]). + * Usually, this is equal to program. + * @param arguments The arguments to pass to the program, or nil + * @return An initialized OFProcess. + */ +- initWithProgram: (OFString*)program + programName: (OFString*)programName + arguments: (OFArray*)arguments; + +/*! + * @brief Closes the write direction of the process. * * This method needs to be called for some programs before data can be read, * since some programs don't start processing before the write direction is * closed. */ - (void)closeForWriting; @end