Mercurial > hg > octave-nkf
annotate liboctave/lo-cutils.c @ 13523:103b7bebb38f
Moved load/save/clear workspace into main menu.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Wed, 20 Jul 2011 10:44:42 +0200 |
parents | fd0a3ac60b0e |
children | 72c96de7a403 |
rev | line source |
---|---|
3613 | 1 /* |
2 | |
11523 | 3 Copyright (C) 2000-2011 John W. Eaton |
3613 | 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. | |
3613 | 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/>. | |
3613 | 20 |
21 */ | |
22 | |
23 #ifdef HAVE_CONFIG_H | |
24 #include <config.h> | |
25 #endif | |
26 | |
4290 | 27 /* This gives us a better chance of finding a prototype for strptime |
28 on some systems. */ | |
29 | |
30 #if ! defined (_XOPEN_SOURCE) | |
31 #define _XOPEN_SOURCE | |
32 #endif | |
33 | |
3803 | 34 #include <sys/types.h> |
35 #include <unistd.h> | |
36 | |
3613 | 37 #include <stdlib.h> |
3803 | 38 #include <string.h> |
3706 | 39 #include <time.h> |
3613 | 40 |
11512
e4e82740e9cd
prototype fixes for C language files
John W. Eaton <jwe@octave.org>
parents:
11006
diff
changeset
|
41 #include "lo-cutils.h" |
5453 | 42 #include "syswait.h" |
43 | |
6108 | 44 OCTAVE_API void |
3613 | 45 octave_qsort (void *base, size_t n, size_t size, |
10180 | 46 int (*cmp) (const void *, const void *)) |
3613 | 47 { |
48 qsort (base, n, size, cmp); | |
49 } | |
50 | |
6108 | 51 OCTAVE_API int |
6111 | 52 octave_strcasecmp (const char *s1, const char *s2) |
53 { | |
54 return strcasecmp (s1, s2); | |
55 } | |
56 | |
57 OCTAVE_API int | |
58 octave_strncasecmp (const char *s1, const char *s2, size_t n) | |
59 { | |
60 return strncasecmp (s1, s2, n); | |
61 } | |
62 | |
5451 | 63 #ifdef HAVE_LOADLIBRARY_API |
64 #include <windows.h> | |
65 | |
66 /* Need this since in C++ can't cast from int(*)() to void* */ | |
6108 | 67 OCTAVE_API void * |
5453 | 68 octave_w32_library_search (HINSTANCE handle, const char * name) |
5451 | 69 { |
70 return (GetProcAddress (handle, name)); | |
71 } | |
72 #endif | |
73 | |
6108 | 74 OCTAVE_API pid_t |
5453 | 75 octave_waitpid (pid_t pid, int *status, int options) |
76 { | |
77 return WAITPID (pid, status, options); | |
78 } |