1967
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
1967
|
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 |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
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 |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
1967
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_liboctave_utils_h) |
|
25 #define octave_liboctave_utils_h 1 |
|
26 |
2926
|
27 #include <cstdio> |
|
28 |
4130
|
29 #include <iostream> |
2926
|
30 #include <string> |
|
31 |
4130
|
32 #include "oct-cmplx.h" |
5275
|
33 #include "oct-types.h" |
5453
|
34 #include "syswait.h" |
4130
|
35 |
6108
|
36 extern OCTAVE_API octave_idx_type NINTbig (double x); |
|
37 extern OCTAVE_API int NINT (double x); |
|
38 extern OCTAVE_API double D_NINT (double x); |
1967
|
39 |
6108
|
40 extern OCTAVE_API char *strsave (const char *); |
2926
|
41 |
6108
|
42 extern OCTAVE_API void octave_putenv (const std::string&, const std::string&); |
2926
|
43 |
6108
|
44 extern OCTAVE_API std::string octave_fgets (std::FILE *); |
|
45 extern OCTAVE_API std::string octave_fgetl (std::FILE *); |
2926
|
46 |
6108
|
47 extern OCTAVE_API std::string octave_fgets (std::FILE *, bool& eof); |
|
48 extern OCTAVE_API std::string octave_fgetl (std::FILE *, bool& eof); |
3970
|
49 |
6108
|
50 extern "C" OCTAVE_API int octave_gethostname (char *, int); |
3803
|
51 |
6108
|
52 extern "C" OCTAVE_API void octave_qsort (void *base, size_t n, size_t size, |
3613
|
53 int (*cmp) (const void *, const void *)); |
|
54 |
6108
|
55 extern "C" OCTAVE_API char *oct_strptime (const char *buf, const char *format, |
3706
|
56 struct tm *tm); |
|
57 |
6111
|
58 extern "C" OCTINTERP_API int octave_strcasecmp (const char *s1, const char *s2); |
|
59 |
|
60 extern "C" OCTINTERP_API int octave_strncasecmp (const char *s1, const char *s2, size_t n); |
|
61 |
6108
|
62 extern OCTAVE_API double octave_read_double (std::istream& is); |
|
63 extern OCTAVE_API Complex octave_read_complex (std::istream& is); |
4130
|
64 |
6108
|
65 extern OCTAVE_API void octave_write_double (std::ostream& os, double dval); |
|
66 extern OCTAVE_API void octave_write_complex (std::ostream& os, const Complex& cval); |
4130
|
67 |
5451
|
68 #ifdef HAVE_LOADLIBRARY_API |
|
69 #include <windows.h> |
6108
|
70 extern "C" OCTAVE_API void * octave_w32_library_search (HINSTANCE handle, const char *name); |
|
71 #undef min |
|
72 #undef max |
5451
|
73 #endif |
1967
|
74 #endif |
|
75 |
6108
|
76 extern "C" OCTAVE_API pid_t octave_waitpid (pid_t pid, int *status, int options); |
5453
|
77 |
1967
|
78 /* |
|
79 ;;; Local Variables: *** |
|
80 ;;; mode: C++ *** |
|
81 ;;; End: *** |
|
82 */ |