xref: /php-src/sapi/cli/ps_title.h (revision 9a7d37ac)
1 /*
2    +----------------------------------------------------------------------+
3    | Copyright (c) The PHP Group                                          |
4    +----------------------------------------------------------------------+
5    | This source file is subject to version 3.01 of the PHP license,      |
6    | that is bundled with this package in the file LICENSE, and is        |
7    | available through the world-wide-web at the following url:           |
8    | https://www.php.net/license/3_01.txt                                 |
9    | If you did not receive a copy of the PHP license and are unable to   |
10    | obtain it through the world-wide-web, please send a note to          |
11    | license@php.net so we can mail you a copy immediately.               |
12    +----------------------------------------------------------------------+
13    | Authors: Keyur Govande <kgovande@gmail.com>                          |
14    +----------------------------------------------------------------------+
15  */
16 
17 #ifndef	PS_TITLE_HEADER
18 #define	PS_TITLE_HEADER
19 
20 #define PS_TITLE_SUCCESS 0
21 #define PS_TITLE_NOT_AVAILABLE 1
22 #define PS_TITLE_NOT_INITIALIZED 2
23 #define PS_TITLE_BUFFER_NOT_AVAILABLE 3
24 #define PS_TITLE_WINDOWS_ERROR 4
25 
26 extern char** save_ps_args(int argc, char** argv);
27 
28 extern int set_ps_title(const char* new_str);
29 
30 extern int get_ps_title(size_t* displen, const char** string);
31 
32 extern const char* ps_title_errno(int rc);
33 
34 extern int is_ps_title_available(void);
35 
36 extern void cleanup_ps_args(char **argv);
37 
38 #endif // PS_TITLE_HEADER
39