1 |
/* This file is part of GNU RADIUS. |
/* This file is part of GNU Radius. |
2 |
Copyright (C) 2000,2001 Sergey Poznyakoff |
Copyright (C) 2000,2001,2002,2003 Sergey Poznyakoff |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
GNU Radius is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
6 |
the Free Software Foundation; either version 2 of the License, or |
the Free Software Foundation; either version 2 of the License, or |
7 |
(at your option) any later version. |
(at your option) any later version. |
8 |
|
|
9 |
This program is distributed in the hope that it will be useful, |
GNU Radius is distributed in the hope that it will be useful, |
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
GNU General Public License for more details. |
GNU General Public License for more details. |
13 |
|
|
14 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License |
15 |
along with this program; if not, write to the Free Software Foundation, |
along with GNU Radius; if not, write to the Free Software Foundation, |
16 |
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
17 |
|
|
18 |
#ifndef lint |
#ifndef lint |
29 |
#include <radscm.h> |
#include <radscm.h> |
30 |
|
|
31 |
SCM |
SCM |
32 |
rad_scm_cell(car, cdr) |
rad_scm_cell(SCM car, SCM cdr) |
|
SCM car; |
|
|
SCM cdr; |
|
33 |
{ |
{ |
34 |
SCM c; |
SCM c; |
35 |
|
|
41 |
|
|
42 |
#ifndef HAVE_SCM_LONG2NUM |
#ifndef HAVE_SCM_LONG2NUM |
43 |
SCM |
SCM |
44 |
scm_long2num (val) |
scm_long2num(long val) |
|
long val; |
|
45 |
{ |
{ |
46 |
if (SCM_FIXABLE ((long) val)) |
if (SCM_FIXABLE ((long) val)) |
47 |
return SCM_MAKINUM (val); |
return SCM_MAKINUM (val); |
55 |
#endif |
#endif |
56 |
|
|
57 |
SCM |
SCM |
58 |
radscm_avl_to_list(pair) |
radscm_avl_to_list(VALUE_PAIR *pair) |
|
VALUE_PAIR *pair; |
|
59 |
{ |
{ |
60 |
SCM scm_first = SCM_EOL, scm_last; |
SCM scm_first = SCM_EOL, scm_last; |
61 |
|
|
74 |
} |
} |
75 |
|
|
76 |
VALUE_PAIR * |
VALUE_PAIR * |
77 |
radscm_list_to_avl(list) |
radscm_list_to_avl(SCM list) |
|
SCM list; |
|
78 |
{ |
{ |
79 |
VALUE_PAIR *first, *last, *p; |
VALUE_PAIR *first, *last, *p; |
80 |
|
|
98 |
|
|
99 |
|
|
100 |
SCM |
SCM |
101 |
radscm_avp_to_cons(pair) |
radscm_avp_to_cons(VALUE_PAIR *pair) |
|
VALUE_PAIR *pair; |
|
102 |
{ |
{ |
103 |
SCM scm_attr, scm_value; |
SCM scm_attr, scm_value; |
104 |
DICT_ATTR *dict; |
DICT_ATTR *dict; |
130 |
*/ |
*/ |
131 |
|
|
132 |
VALUE_PAIR * |
VALUE_PAIR * |
133 |
radscm_cons_to_avp(scm) |
radscm_cons_to_avp(SCM scm) |
|
SCM scm; |
|
134 |
{ |
{ |
135 |
SCM car, cdr; |
SCM car, cdr; |
136 |
DICT_ATTR *dict; |
DICT_ATTR *dict; |
211 |
} |
} |
212 |
|
|
213 |
void |
void |
214 |
rscm_add_load_path(path) |
rscm_add_load_path(char *path) |
|
char *path; |
|
215 |
{ |
{ |
216 |
SCM scm, path_scm; |
SCM scm, path_scm; |
217 |
path_scm = RAD_SCM_SYMBOL_VALUE("%load-path"); |
path_scm = RAD_SCM_SYMBOL_VALUE("%load-path"); |