diff options
Diffstat (limited to 'src/gsql_lib.c')
-rw-r--r-- | src/gsql_lib.c | 29 |
1 files changed, 7 insertions, 22 deletions
diff --git a/src/gsql_lib.c b/src/gsql_lib.c index c988b2e..a6103b2 100644 --- a/src/gsql_lib.c +++ b/src/gsql_lib.c | |||
@@ -1,19 +1,18 @@ | |||
1 | /* This file is part of guile-sql. | 1 | /* This file is part of guile-sql. |
2 | Copyright (C) 2002 Sergey Poznyakoff | 2 | Copyright (C) 2002 Sergey Poznyakoff |
3 | 3 | ||
4 | This program is free software; you can redistribute it and/or modify | 4 | This program is free software; you can redistribute it and/or modify it |
5 | it under the terms of the GNU General Public License as published by | 5 | under the terms of the GNU General Public License as published by the |
6 | the Free Software Foundation; either version 2 of the License, or | 6 | Free Software Foundation; either version 3 of the License, or (at your |
7 | (at your option) any later version. | 7 | option) any later version. |
8 | 8 | ||
9 | This program is distributed in the hope that it will be useful, | 9 | This program is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. | 12 | GNU General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU General Public License | 14 | You should have received a copy of the GNU General Public License along |
15 | along with this program; if not, write to the Free Software Foundation, Inc., | 15 | with this program. If not, see <http://www.gnu.org/licenses/>. */ |
16 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ | ||
17 | 16 | ||
18 | #ifdef HAVE_CONFIG_H | 17 | #ifdef HAVE_CONFIG_H |
19 | # include <config.h> | 18 | # include <config.h> |
@@ -26,7 +25,7 @@ scm_makenum (unsigned long val) | |||
26 | #ifndef HAVE_SCM_LONG2NUM | 25 | #ifndef HAVE_SCM_LONG2NUM |
27 | { | 26 | { |
28 | if (SCM_FIXABLE ((long) val)) | 27 | if (SCM_FIXABLE ((long) val)) |
29 | return SCM_MAKINUM (val); | 28 | return scm_from_int (val); |
30 | 29 | ||
31 | #ifdef SCM_BIGDIG | 30 | #ifdef SCM_BIGDIG |
32 | return scm_i_long2big (val); | 31 | return scm_i_long2big (val); |
@@ -40,20 +39,6 @@ scm_makenum (unsigned long val) | |||
40 | } | 39 | } |
41 | #endif | 40 | #endif |
42 | 41 | ||
43 | /* | ||
44 | * Chop off trailing whitespace. Return length of the resulting string | ||
45 | */ | ||
46 | int | ||
47 | chop(char *str) | ||
48 | { | ||
49 | int len; | ||
50 | |||
51 | for (len = strlen(str); len > 0 && isspace(str[len-1]); len--) | ||
52 | ; | ||
53 | str[len] = 0; | ||
54 | return len; | ||
55 | } | ||
56 | |||
57 | extern void | 42 | extern void |
58 | sql_init() | 43 | sql_init() |
59 | { | 44 | { |