Mercurial > octave
annotate libinterp/corefcn/sysdep.h @ 27919:1891570abac8
update Octave Project Developers copyright for the new year
In files that have the "Octave Project Developers" copyright notice,
update for 2020.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 06 Jan 2020 22:29:51 -0500 |
parents | b442ec6dda5c |
children | bd51beb6205e |
rev | line source |
---|---|
1 | 1 /* |
2 | |
27919
1891570abac8
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
27918
diff
changeset
|
3 Copyright (C) 1993-2020 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26843
diff
changeset
|
4 |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26843
diff
changeset
|
5 See the file COPYRIGHT.md in the top-level directory of this distribution |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26843
diff
changeset
|
6 or <https://octave.org/COPYRIGHT.html/>. |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26843
diff
changeset
|
7 |
1 | 8 |
9 This file is part of Octave. | |
10 | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23446
diff
changeset
|
11 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
|
12 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
|
13 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
|
14 (at your option) any later version. |
1 | 15 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
16 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
|
17 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
19 GNU General Public License for more details. |
1 | 20 |
21 You should have received a copy of the GNU General Public License | |
7016 | 22 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
|
23 <https://www.gnu.org/licenses/>. |
1 | 24 |
25 */ | |
26 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
27 #if ! defined (octave_sysdep_h) |
383 | 28 #define octave_sysdep_h 1 |
1 | 29 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21200
diff
changeset
|
30 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21200
diff
changeset
|
31 |
6726 | 32 #include <cstdio> |
33 | |
1750 | 34 #include <string> |
1690 | 35 |
1966 | 36 #include "lo-ieee.h" |
2926 | 37 #include "lo-sysdep.h" |
1966 | 38 |
25649
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
39 namespace octave |
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_init (void); |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
42 |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
43 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
|
44 |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
45 extern OCTINTERP_API void sysdep_cleanup (void); |
1 | 46 |
25649
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
47 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
|
48 |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
49 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
|
50 |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
51 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
|
52 |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
53 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
|
54 |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
55 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
|
56 |
25649
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
57 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
|
58 const std::string&); |
26843
f07542e3a9b9
Fix "exist" for drive letters and UNC shares on Windows (bug #55824).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26376
diff
changeset
|
59 |
f07542e3a9b9
Fix "exist" for drive letters and UNC shares on Windows (bug #55824).
Markus Mützel <markus.muetzel@gmx.de>
parents:
26376
diff
changeset
|
60 extern OCTINTERP_API bool drive_or_unc_share (const std::string&); |
25649
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
61 } |
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 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS) |
5451 | 64 |
25649
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
65 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
|
66 inline void |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
67 sysdep_init (void) |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
68 { |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
69 octave::sysdep_init (); |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
70 } |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
71 |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
72 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
|
73 inline void |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
74 set_application_id (void) |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
75 { |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
76 octave::set_application_id (); |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
77 } |
3657 | 78 |
25649
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
79 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
|
80 inline void |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
81 sysdep_cleanup (void) |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
82 { |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
83 octave::sysdep_cleanup (); |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
84 } |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
85 |
25649
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
86 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
|
87 inline void |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
88 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
|
89 { |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
90 octave::raw_mode (on, wait); |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
91 } |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
92 |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
93 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
|
94 inline FILE * |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
95 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
|
96 { |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
97 return octave::popen (command, mode); |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
98 } |
6726 | 99 |
25649
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
100 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
|
101 inline int |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
102 octave_pclose (FILE *f) |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
103 { |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
104 return octave::pclose (f); |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
105 } |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
106 |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
107 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
|
108 inline int |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
109 octave_kbhit (bool wait = true) |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
110 { |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
111 return octave::kbhit (wait); |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
112 } |
529 | 113 |
25649
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
114 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
|
115 inline std::string |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
116 get_P_tmpdir (void) |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
117 { |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
118 return octave::get_P_tmpdir (); |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
119 } |
12228
0f70c5db58c3
try to get better value than \ for P_tmpdir on Windows systems
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
120 |
25649
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
121 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
|
122 inline bool |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
123 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
|
124 { |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
125 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
|
126 } |
6598 | 127 |
1 | 128 #endif |
25649
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
129 |
85c3e315bd43
move libinterp/corefcn/sysdep functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
25054
diff
changeset
|
130 #endif |