Rev 7673 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
10 | reyssat | 1 | /* Copyright (C) 1998-2003 XIAO, Gang of Universite de Nice - Sophia Antipolis |
2 | * |
||
3 | * This program is free software; you can redistribute it and/or modify |
||
4 | * it under the terms of the GNU General Public License as published by |
||
5 | * the Free Software Foundation; either version 2 of the License, or |
||
6 | * (at your option) any later version. |
||
7 | * |
||
8 | * This program is distributed in the hope that it will be useful, |
||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
11 | * GNU General Public License for more details. |
||
12 | * |
||
13 | * You should have received a copy of the GNU General Public License |
||
14 | * along with this program; if not, write to the Free Software |
||
15 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
||
16 | */ |
||
17 | |||
7673 | bpr | 18 | /* This should be a rather independent routine, which are |
19 | * used to interface an outside mathematical encyclopedia. */ |
||
8185 | bpr | 20 | #include "wims.h" |
10 | reyssat | 21 | |
22 | void exec_href(char *p); |
||
23 | |||
7673 | bpr | 24 | /* internal encyclopedia version */ |
10 | reyssat | 25 | /* void pedia_wims(char *p) |
26 | { |
||
27 | char *s, *c, *t, buf[MAX_LINELEN+1]; |
||
28 | char r[MAX_LINELEN+1]; |
||
29 | |||
30 | t="target=wims_ref"; c="module=adm/enc.$module_language"; |
||
31 | s=getvar(ro_name[ro_module]); |
||
32 | if(s!=NULL && strncmp(s,"adm/enc.",strlen("adm/enc."))==0) { |
||
7673 | bpr | 33 | c="cmd=reply"; t=""; |
10 | reyssat | 34 | } |
35 | else { |
||
7673 | bpr | 36 | s=getvar(ro_name[ro_session]); |
37 | if(s!=NULL && strstr(s,"_dico")!=NULL) t=""; |
||
10 | reyssat | 38 | } |
39 | setvar("wims_dico_lookup",p); |
||
40 | snprintf(buf,MAX_LINELEN,"%s %s&job=search&dom=math&search=$wims_dico_lookup %s", |
||
7673 | bpr | 41 | t, c, p); |
10 | reyssat | 42 | mystrncpy(r,ref_name,MAX_LINELEN); |
43 | if(pedia_address!=NULL && *pedia_address!=0) { |
||
7673 | bpr | 44 | mystrncpy(ref_name,pedia_address,MAX_LINELEN); |
10 | reyssat | 45 | } |
46 | exec_href(buf); |
||
47 | mystrncpy(ref_name,r,MAX_LINELEN); |
||
48 | } |
||
49 | */ |
||
50 | |||
7673 | bpr | 51 | /* this is the (only) public routine in this file. */ |
10 | reyssat | 52 | void pedia(char *p) |
53 | { |
||
54 | |||
55 | if(*find_word_start(p)==0) return; |
||
56 | force_setvar("wims_pedia_parm",p); |
||
57 | phtml_put_base("pedia.phtml",1); |
||
58 | *p=0; |
||
59 | } |