annotate liboctave/system/oct-syscalls.h @ 21734:11af9c03400c

write namespace keyword and name on same line in C++ files
author John W. Eaton <jwe@octave.org>
date Thu, 19 May 2016 01:00:37 -0400
parents e0da98857c19
children ecfcc8527661
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
1 /*
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
2
19697
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 17822
diff changeset
3 Copyright (C) 1996-2015 John W. Eaton
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
4
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
6
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6321
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6321
diff changeset
10 option) any later version.
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
11
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
15 for more details.
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
16
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6321
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6321
diff changeset
19 <http://www.gnu.org/licenses/>.
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
20
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
21 */
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
22
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 19697
diff changeset
23 #if ! defined (octave_oct_syscalls_h)
17822
ebb3ef964372 maint: Use common #define syntax "octave_filename_h" in h_files.
Rik <rik@octave.org>
parents: 17769
diff changeset
24 #define octave_oct_syscalls_h 1
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
25
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
26 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20791
diff changeset
27
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
28 #include <string>
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
29
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
30 class string_vector;
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
31
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
32 #include <sys/types.h>
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
33
21734
11af9c03400c write namespace keyword and name on same line in C++ files
John W. Eaton <jwe@octave.org>
parents: 21727
diff changeset
34 namespace octave
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
35 {
21734
11af9c03400c write namespace keyword and name on same line in C++ files
John W. Eaton <jwe@octave.org>
parents: 21727
diff changeset
36 namespace sys
21609
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
37 {
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
38 extern OCTAVE_API int dup2 (int, int);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
39 extern OCTAVE_API int dup2 (int, int, std::string&);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
40
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
41 extern OCTAVE_API int execvp (const std::string&, const string_vector&);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
42 extern OCTAVE_API int execvp (const std::string&, const string_vector&,
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
43 std::string&);
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
44
21609
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
45 extern OCTAVE_API pid_t fork (std::string&);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
46
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
47 extern OCTAVE_API pid_t vfork (std::string&);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
48
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
49 extern OCTAVE_API pid_t getpgrp (std::string&);
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
50
21609
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
51 extern OCTAVE_API pid_t getpid (void);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
52
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
53 extern OCTAVE_API pid_t getppid (void);
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
54
21609
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
55 extern OCTAVE_API gid_t getgid (void);
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
56
21609
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
57 extern OCTAVE_API gid_t getegid (void);
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
58
21609
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
59 extern OCTAVE_API uid_t getuid (void);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
60
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
61 extern OCTAVE_API uid_t geteuid (void);
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
62
21609
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
63 extern OCTAVE_API int pipe (int *);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
64 extern OCTAVE_API int pipe (int *, std::string&);
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
65
21609
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
66 extern OCTAVE_API pid_t waitpid (pid_t, int *status, int);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
67 extern OCTAVE_API pid_t waitpid (pid_t, int *status, int, std::string&);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
68
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
69 extern OCTAVE_API int kill (pid_t, int);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
70 extern OCTAVE_API int kill (pid_t, int, std::string&);
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
71
21609
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
72 extern OCTAVE_API pid_t
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
73 popen2 (const std::string&, const string_vector&, bool, int *);
4294
755f6509bb01 [project @ 2003-01-11 04:01:53 by jwe]
jwe
parents: 3504
diff changeset
74
21609
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
75 extern OCTAVE_API pid_t
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
76 popen2 (const std::string&, const string_vector&, bool, int *,
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
77 std::string&);
6321
363a2f8c9e97 [project @ 2007-02-16 20:26:23 by dbateman]
dbateman
parents: 6108
diff changeset
78
21609
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
79 extern OCTAVE_API pid_t
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
80 popen2 (const std::string&, const string_vector&, bool, int *,
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
81 std::string&, bool &interactive);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
82
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
83 extern OCTAVE_API int fcntl (int, int, long);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
84 extern OCTAVE_API int fcntl (int, int, long, std::string&);
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
85 }
46f059de4dce use namespace instead of struct with static members for system call wrappers
John W. Eaton <jwe@octave.org>
parents: 21244
diff changeset
86 }
2941
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
87
b779a5b8aed4 [project @ 1997-05-08 02:14:34 by jwe]
jwe
parents:
diff changeset
88 #endif
10259
65b41bc71f09 use gnulib fcntl module
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
89