Mercurial > hg > octave-nkf
annotate liboctave/system/syswait.h @ 17530:0f45d9dd8107
test: Fix 4 failing plot demos.
* scripts/plot/legend.m: Demo #11, use 'h' for returned handle.
* scripts/plot/plot.m: Fix typo "lenths" -> "lengths".
* scripts/plot/ribbon.m: Remove unnecessary call to meshgrid now
that sombrero returns meshgridded data.
* scripts/plot/trimesh.m: Set colormap so plot is always reproducible.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 01 Oct 2013 15:39:20 -0700 |
parents | 648dabbb4c6b |
children | d63878346099 |
rev | line source |
---|---|
2935 | 1 /* |
2 | |
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
3 Copyright (C) 1996-2012 John W. Eaton |
2935 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
2935 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
2935 | 20 |
21 */ | |
22 | |
23 #if !defined (octave_syswait_h) | |
24 #define octave_syswait_h 1 | |
25 | |
5453 | 26 #ifdef __cplusplus |
27 extern "C" { | |
28 #endif | |
29 | |
30 /* This mess suggested by the autoconf manual. */ | |
2935 | 31 |
32 #include <sys/types.h> | |
33 | |
34 #if defined HAVE_SYS_WAIT_H | |
35 #include <sys/wait.h> | |
36 #endif | |
37 | |
38 #ifndef WIFEXITED | |
39 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | |
40 #endif | |
41 | |
42 #ifndef WEXITSTATUS | |
43 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | |
44 #endif | |
45 | |
46 #ifndef WIFSIGNALLED | |
47 #define WIFSIGNALLED(stat_val) \ | |
48 (((stat_val) & 0177) != 0177 && ((stat_val) & 0177) != 0) | |
49 #endif | |
50 | |
6096 | 51 #if defined (__MINGW32__) || defined (_MSC_VER) |
5453 | 52 #define HAVE_WAITPID 1 |
53 #include <process.h> | |
54 #define WAITPID(a, b, c) _cwait (b, a, c) | |
55 /* Action argument is ignored for _cwait, so arbitrary definition. */ | |
56 #define WNOHANG 0 | |
57 #else | |
58 #define WAITPID(a, b, c) waitpid (a, b, c) | |
59 #endif | |
60 | |
61 #ifdef __cplusplus | |
62 } | |
63 #endif | |
64 | |
2935 | 65 #endif |