annotate libinterp/corefcn/sysdep.h @ 26376:00f796120a6d stable

maint: Update copyright dates in all source files.
author John W. Eaton <jwe@octave.org>
date Wed, 02 Jan 2019 16:32:43 -0500
parents 85c3e315bd43
children f07542e3a9b9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
1 /*
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
2
26376
00f796120a6d maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents: 25649
diff changeset
3 Copyright (C) 1993-2019 John W. Eaton
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
4
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
6
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23446
diff changeset
7 Octave is free software: you can redistribute it and/or modify it
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
8 under the terms of the GNU General Public License as published by
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23446
diff changeset
9 the Free Software Foundation, either version 3 of the License, or
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
10 (at your option) any later version.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
11
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
12 Octave is distributed in the hope that it will be useful, but
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
13 WITHOUT ANY WARRANTY; without even the implied warranty of
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22407
diff changeset
15 GNU General Public License for more details.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
16
78fd87e624cb [project @ 1993-08-08 01:13:40 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: 6972
diff changeset
18 along with Octave; see the file COPYING. If not, see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23446
diff changeset
19 <https://www.gnu.org/licenses/>.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
20
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
21 */
78fd87e624cb [project @ 1993-08-08 01:13:40 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_sysdep_h)
383
0b52c68ec81f [project @ 1994-03-09 21:19:44 by jwe]
jwe
parents: 1
diff changeset
24 #define octave_sysdep_h 1
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
25
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21200
diff changeset
26 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 21200
diff changeset
27
6726
6b7ba4a31876 [project @ 2007-06-14 20:16:44 by jwe]
jwe
parents: 6693
diff changeset
28 #include <cstdio>
6b7ba4a31876 [project @ 2007-06-14 20:16:44 by jwe]
jwe
parents: 6693
diff changeset
29
1750
fd0d12493223 [project @ 1996-01-13 09:31:07 by jwe]
jwe
parents: 1690
diff changeset
30 #include <string>
1690
a38bd8df9d33 [project @ 1996-01-05 21:36:24 by jwe]
jwe
parents: 1600
diff changeset
31
1966
4b8e9571bbdf [project @ 1996-02-17 02:52:04 by jwe]
jwe
parents: 1961
diff changeset
32 #include "lo-ieee.h"
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
33 #include "lo-sysdep.h"
1966
4b8e9571bbdf [project @ 1996-02-17 02:52:04 by jwe]
jwe
parents: 1961
diff changeset
34
25649
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
35 namespace octave
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
36 {
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
37 extern OCTINTERP_API void sysdep_init (void);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
38
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
39 extern OCTINTERP_API void set_application_id (void);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
40
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
41 extern OCTINTERP_API void sysdep_cleanup (void);
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
42
25649
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
43 extern OCTINTERP_API void raw_mode (bool, bool wait = true);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
44
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
45 extern OCTINTERP_API FILE * popen (const char *command, const char *mode);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
46
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
47 extern OCTINTERP_API int pclose (FILE *f);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
48
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
49 extern OCTINTERP_API int kbhit (bool wait = true);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
50
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
51 extern OCTINTERP_API std::string get_P_tmpdir (void);
22165
20e684ec108e move system dependent code to sysdep.cc
John W. Eaton <jwe@octave.org>
parents: 21989
diff changeset
52
25649
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
53 extern OCTINTERP_API bool same_file_internal (const std::string&,
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
54 const std::string&);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
55 }
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
56
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
57 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
5451
ed08548b9054 [project @ 2005-09-15 19:52:50 by jwe]
jwe
parents: 5307
diff changeset
58
25649
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
59 OCTAVE_DEPRECATED (5, "use 'octave::sysdep_init' instead")
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
60 inline void
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
61 sysdep_init (void)
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
62 {
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
63 octave::sysdep_init ();
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
64 }
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
65
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
66 OCTAVE_DEPRECATED (5, "use 'octave::set_application_id' instead")
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
67 inline void
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
68 set_application_id (void)
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
69 {
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
70 octave::set_application_id ();
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
71 }
3657
a908150a3a32 [project @ 2000-04-11 19:02:03 by jwe]
jwe
parents: 2926
diff changeset
72
25649
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
73 OCTAVE_DEPRECATED (5, "use 'octave::sysdep_cleanup' instead")
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
74 inline void
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
75 sysdep_cleanup (void)
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
76 {
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
77 octave::sysdep_cleanup ();
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
78 }
23446
cd4e1ee28716 maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents: 23220
diff changeset
79
25649
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
80 OCTAVE_DEPRECATED (5, "use 'octave::raw_mode' instead")
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
81 inline void
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
82 raw_mode (bool on, bool wait = true)
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
83 {
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
84 octave::raw_mode (on, wait);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
85 }
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
86
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
87 OCTAVE_DEPRECATED (5, "use 'octave::popen' instead")
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
88 inline FILE *
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
89 octave_popen (const char *command, const char *mode)
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
90 {
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
91 return octave::popen (command, mode);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
92 }
6726
6b7ba4a31876 [project @ 2007-06-14 20:16:44 by jwe]
jwe
parents: 6693
diff changeset
93
25649
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
94 OCTAVE_DEPRECATED (5, "use 'octave::pclose' instead")
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
95 inline int
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
96 octave_pclose (FILE *f)
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
97 {
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
98 return octave::pclose (f);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
99 }
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
100
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
101 OCTAVE_DEPRECATED (5, "use 'octave::kbhit' instead")
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
102 inline int
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
103 octave_kbhit (bool wait = true)
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
104 {
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
105 return octave::kbhit (wait);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
106 }
529
7ea224e713cd [project @ 1994-07-20 18:54:27 by jwe]
jwe
parents: 444
diff changeset
107
25649
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
108 OCTAVE_DEPRECATED (5, "use 'octave::get_P_tmpdir' instead")
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
109 inline std::string
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
110 get_P_tmpdir (void)
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
111 {
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
112 return octave::get_P_tmpdir ();
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
113 }
12228
0f70c5db58c3 try to get better value than \ for P_tmpdir on Windows systems
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
114
25649
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
115 OCTAVE_DEPRECATED (5, "use 'octave::same_file_internal' instead")
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
116 inline bool
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
117 same_file_internal (const std::string& a, const std::string& b)
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
118 {
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
119 return octave::same_file_internal (a, b);
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
120 }
6598
ce819776ee76 [project @ 2007-04-27 17:34:27 by jwe]
jwe
parents: 5453
diff changeset
121
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
122 #endif
25649
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
123
85c3e315bd43 move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 25054
diff changeset
124 #endif