Subversion Repositories wimsdev

Rev

Rev 10051 | Rev 12047 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  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.  
  18. /* WWW multipurpose server, header definitions */
  19.  
  20. #include "Lib/libwims.h"
  21. #include "config.h"
  22. #include "includes.h"
  23. #include "wimsdef.h"
  24.  
  25. #define evalue strevalue
  26.  
  27. /* limit of query_string. */
  28. #define QUERY_STRING_LIMIT 204799
  29. /* maximal length of deposited file */
  30. #define MAX_DEPOSITLEN (8*1024*1024)
  31. /* maximal number of registered variables */
  32. #define MAX_VAR_NUM 512
  33. /* length limit for public_html/bin executable names */
  34. #define MAX_EXEC_NAME 31
  35. /* max level of nested fors */
  36. #define MAX_FOR_LEVEL 12
  37. /* max nested read; to avoid infinite loop */
  38. #define MAX_READNEST 20
  39. /* number of cached working files */
  40. #define MAX_MCACHE 32
  41. /* max sort items. */
  42. #define MAX_SORT_ITEM 5000
  43. /* max randperm() items. Should be compatible to MAX_LINELEN. */
  44. #define MAX_RANDPERM 2000
  45. /* Number of session random numbers */
  46. #define MAX_SESRANDOM 64
  47. /* Limit of output length. This can be configured. */
  48. #define OUTPUT_LENGTH_LIMIT (1024*1024)
  49. /* limit of items in value lists */
  50. #define MAX_VALUE_LIST 2048
  51. /* We fix a limit for the number of goto's (or for jumps) executed,
  52.  * in order to avoid infinite loop or DOS attack.
  53.  */
  54. #define GOTO_LIMIT 500000
  55. /* maximal nesting level of substitutions. */
  56. #define SUBST_LIMIT 16
  57. /* Limit for instex, insplot, insPLOT. */
  58. #define INS_LIMIT 500
  59. /* file to hold last output */
  60. #define lastout "last.html"
  61. /* Access policy configuration file */
  62. #define ACCESS_CONF "../log/wims.conf.access"
  63. /* Should not be changed */
  64. #define SESSION_BASE "sessions"
  65. #define S2_BASE "s2"
  66.  
  67. /* Prefix char for exec functions */
  68. #define exec_prefix_char '!'
  69. /* Prefix char for calc functions */
  70. #define calc_prefix_char '!'
  71. /* Prefix char for goto labels */
  72. #define label_prefix_char ':'
  73. /* Prefix for tags in data files */
  74. #define tag_prefix_char ':'
  75. /* Prefix char for comment lines */
  76. #define comment_prefix_char '#'
  77. /* prefix to user variable names */
  78. #define var_prefix "w_"
  79. /* (user) prefix for mathematical fonts */
  80. #define mathfont_prefix "m_"
  81. /* prefix for internal variables */
  82. #define wims_prefix "wims_"
  83. #define wpflen strlen(wims_prefix)
  84. /* name of variable definition file */
  85. #define default_var_def "var.def"
  86. /* Not configured */
  87. #define error_data_string "wims_error_data"
  88. /* Name of files containing error messages. */
  89. #define user_error_msg_file "msg/user_error.phtml"
  90. #define module_error_msg_file "msg/module_error.msg"
  91. /* directory containing log files */
  92. #define log_dir "../log"
  93. #define class_base "../log/classes"
  94. /* What should indicate that a file name given by the user
  95.  * would allow him to go upstairs in the directory tree?
  96.  * We shouldn't use "../", otherwise the user may just specify
  97.  * ".." as name and go upstairs one step.
  98.  */
  99. #define parent_dir_string ".."
  100. /* This one is stronger. */
  101. #define PARENT_DIR_STRING "/../"
  102. /* kernel daemon socket file. Should match that of wimslogd. */
  103. #define ksockfile "../tmp/log/.wimslogd"
  104. /* this directory should not exist. Do not change the definition! */
  105. #define sysmask_trigger_dir "sysmask/stat/trigger"
  106.  
  107. typedef struct {
  108.     int lineno; /* line number */
  109. /*    long fpt; */ /* position in the file */
  110.     char varname[MAX_NAMELEN+1];
  111.     double varval, varend, step;
  112.     char *list_pt, *bufpt;
  113.     int from; /* from ... to ... if 0, list if 1 */
  114. } FOR_STACK;
  115.  
  116. typedef struct {
  117.     char *address;
  118.     short int execcode, varcode;
  119.     int isstart; /* bit 0: start line; bit 1: exec; bit 2: label. bit 3: hard comment. bit 4: soft comment */
  120.     unsigned int llen;
  121. } LINE_STRUCT;
  122.  
  123. typedef struct {
  124.     char name[MAX_FNAME+1];
  125.     int  l;
  126.     int linepointer;
  127.     char filepath[MAX_FNAME+1];
  128. /* nocache bits: 0. !nocache; 1. hard nocache; 2. isfromcache; 3. isbase; */
  129.     short int for_idx, nocache;
  130.     int linecnt;
  131.     char *textbuf;
  132.     LINE_STRUCT *lines;
  133.     FOR_STACK *for_stack;
  134. } WORKING_FILE;
  135.  
  136. /* from auth.c */
  137. extern char loadavg[64];
  138. void check_load(int th);
  139. void auth(void);
  140. void checkrafale(void);
  141. void access_check(int isclass);
  142.  
  143. /* from calc.c */
  144. void calc_tolower(char *p);
  145. void calc_toupper(char *p);
  146. void calc_lookup(char *p);
  147. void calc_randitem(char *p);
  148. void calc_mexec(char *p);
  149. void _calc_exec(char *p, char *arg0, char *arg1, int n);
  150. void calc_detag(char *p);
  151. typedef struct  MYFUNCTION {
  152.     char *name;
  153.     int tag;
  154.     void (*routine) (char *p);
  155. } MYFUNCTION;
  156.  
  157. extern MYFUNCTION calc_routine[];
  158. extern int CALC_FN_NO;
  159.  
  160. void calc_append(char *p);
  161. void calc_charof(char *p);
  162. void calc_checkhost(char *p);
  163. void calc_columnof(char *p);
  164. void calc_daemon(char *p);
  165. void calc_date(char *p);
  166. void calc_debug(char *p);
  167. void calc_declosing(char *p);
  168. void calc_defof(char *p);
  169. void calc_embraced(char *p);
  170. void calc_evalsubst(char *p);
  171. void calc_exec(char *p);
  172. void calc_hex(char *p);
  173. void calc_imgrename(char *p);
  174. void calc_itemof(char *p);
  175. void calc_leveldata(char *p);
  176. void calc_lineof(char *p);
  177. void calc_listfile(char *p);
  178. void calc_listintersect(char *p);
  179. void calc_listunion(char *p);
  180. void calc_listuniq(char *p);
  181. void calc_mailurl(char *p);
  182. void calc_makelist(char *p);
  183. void calc_mathsubst(char *p);
  184. void calc_module(char *p);
  185. void calc_nonempty(char *p);
  186. void calc_pos(char *p);
  187. void calc_product(char *p);
  188. void calc_recordof(char *p);
  189. void calc_recursion(char *p);
  190. void calc_reinput(char *p);
  191. void calc_replace(char *p);
  192. void calc_rowof(char *p);
  193. void calc_rows2lines(char *p);
  194. void calc_select(char *p);
  195. void calc_solve(char *p);
  196. void calc_sort(char *p);
  197. void calc_sum(char *p);
  198. void calc_translate(char *p);
  199. void calc_trim(char *p);
  200. void calc_wordof(char *p);
  201. void calc_values(char *p);
  202.  
  203. /* from config.c */
  204. void setsesdir(char *p);
  205. extern int threshold2, threshold1, rafalvl, modlog;
  206. extern char session_dir[MAX_FNAME+1], s2_dir[MAX_FNAME+1];
  207. extern char temp_log[MAX_FNAME+1]; /* temp log file name */
  208. extern char *cgi_name;
  209. extern int idle_time, idle_time2, idle_time3, OLD_LOG_FILES, GEN_LOG_LIMIT, MODULE_LOG_LIMIT;
  210. extern int backup_hour, site_accounting, examlog_limit;
  211. extern int ANIM_LIMIT;
  212. extern char *header_menu, *insplot_processor;
  213. extern char *home_referer, *home_referer_user, *header_menu_supervisor,
  214.    *header_menu_user, *home_referer_supervisor, *title_page, *html_file;
  215. extern char *aliased_cgi, *insdraw_processor, *mail_opt;
  216. extern int mathalign_base;
  217. unsigned long create_job_ident(void);
  218. void module_index(void);
  219. extern char *module_about_file, *main_var_proc_file, *var_init_file, *special_font;
  220. extern char var_def_file[256], *var_def_buf;
  221. void define_html_header(void);
  222. extern char *usecookie, *bgcolor;
  223. extern int spec_font;
  224. extern char *config_file; /* Main configure file, this name cannot be configured! */
  225. extern char *intro_file; /* Introduction page name */
  226. extern char *ref_file; /* Reference page */
  227. typedef struct CONFIG_DATA { char *name; int is_integer; void  *address; } CONFIG_DATA;
  228. extern CONFIG_DATA main_config[];
  229. extern int MAIN_CONFIG_NO;
  230. extern char *modindex[];
  231. extern int MODINDEX_NO;
  232. void main_configure(void);
  233. void set_rlimits(void);
  234. void module_configure(void);
  235. void set_job_ident(void);
  236.  
  237. /* from compare.c */
  238. int compare(char *p, int numeric, int lvl);
  239. char *bufprep(char *p);
  240.  
  241. /* from evalue.c */
  242. double evalue(char *p);
  243. char *substit(char *p);
  244. enum {for_in, for_from};
  245. struct forstruct {
  246.     char var[MAX_NAMELEN+1];
  247.     int type;
  248.     double list[MAX_VALUE_LIST];
  249.     char *pos[MAX_VALUE_LIST];
  250.     double from, to, step;
  251. } forstruct;
  252. int cutfor(char *p, char *bufp);
  253. void float2str(double d, char *p);
  254.  
  255. /* from exam.c */
  256. void calc_examdep(char *p);
  257. double currexamscore(int sh);
  258. void check_exam(void);
  259.  
  260. /* from exec.c */
  261. void exec_main(char *p);
  262. void exec_set(char *name);
  263. extern MYFUNCTION exec_routine[];
  264. extern int EXEC_FN_NO;
  265. extern struct distr_cmd { char *name; int (*routine) (char *p, char *list[], int max);
  266.   } distr_cmd[];
  267. extern int distr_cmd_no;
  268. void exec_tail(char *p);
  269. void exec_read(char *p);
  270.  
  271. /* from files.c */
  272. void secure_exec(void);
  273. void fileappend(char *p);
  274. void filewrite(char *p);
  275.  
  276. /* from html.c */
  277. void exec_formbar(char *p);
  278. void exec_formbar(char *p);
  279. void exec_formcheckbox(char *p);
  280. void exec_formradio(char *p);
  281. void exec_formselect(char *p);
  282.  
  283. /* from insmmath.c */
  284. void insmath(char *p);
  285. int instex_ready(char *p, char *n);
  286. char *instex_check_static(char *p);
  287. void calc_instexst(char *p);
  288.  
  289. /* from lines.c */
  290. void accessfile(char *content, char *type, char *s,...);
  291. int checkhostt(char bf2[]);
  292. extern int untrust;
  293. void module_error(char msg[]);
  294. int trusted_module(void);
  295. int checkhost(char *hlist);
  296. void _getdef(char buf[], char *name, char value[]);
  297. void getdef(char *fname, char *name, char value[]);
  298. void _daemoncmd(char *p);
  299. int datafile_check(char *name);
  300. extern int is_class_module;
  301. int find_module_file(char *fname, char buf[], int mode);
  302. int call_ssh(char *s,...);
  303. int _http2env(char outs[], char ins[]);
  304. void slashsubst(char *p);
  305. void internal_error(char msg[]);
  306. char *readfile(char *fname, char buf[], long int buflen); /* mathfonts.c */
  307. int call_sh(char *s,...);
  308. unsigned int datafile_recordnum(char *p);
  309. char *datafile_fnd_record(char *p, int n, char bf[]);
  310. int execredirected(char *cmdf, char *inf, char *outf, char *errf, char *arg[]);
  311. char *mkfname(char buf[], char *s,...);
  312. extern char *trusted_modules;
  313. enum{is_file, is_dir, is_exec, is_fifo, is_socket, is_unknown};
  314. extern struct mxtab {
  315.     char cmd[MAX_EXEC_NAME+1];
  316.     unsigned int fd1, fd2;
  317.     int pipe_stdin[2], pipe_stdout[2], pipe_stderr[2];
  318. } mxtab[MAX_MULTIEXEC];
  319. int ftest(char *fname);
  320. int multiexec(char *cmd, char **abuf);
  321. int wgetline(char buf[], size_t buflen, WORKING_FILE *f);
  322. int open_working_file(WORKING_FILE *f, char *fname);
  323. void close_working_file(WORKING_FILE *f, int cache);
  324. void read_tmp_file(char *p, const char *fname);
  325. void initalarm(void);
  326. extern int var_noexport; /* do not export variable */
  327. enum {mode_default, mode_popup, mode_raw} NAME_MODES;
  328. extern char *manager_site;
  329. void flushoutput(void);
  330. extern char pidbuf[32];
  331. extern char lastdatafile[MAX_FNAME+1];
  332. extern char lastftest[MAX_FNAME+1];
  333. int kerneld(char *p, int bufsize);
  334. void _setdef(char buf[], char *name, char *value);
  335. void output0(char buf[]);
  336. void nph_header(int code);
  337. void delete_pid(void);
  338. void setdef(char *fname, char *name);
  339. void instex_flush(void);
  340. char *DEFAULT_INS_FORMAT;
  341. void tex_nospace(char *p);
  342. int get_cached_file(char *name);
  343. extern off_t ftest_size;
  344. void putlastout(void);
  345. void bad_ident(void);
  346. void create_pid(void);
  347. extern struct sockaddr_un sun;
  348. extern char *lastdata;
  349. extern char *outptr;
  350. extern char outbuf[8192];
  351. extern int http2env(char outs[], char ins[]);
  352.  
  353. /* from log.c */
  354. void user_log(char *p);
  355. void write_logs(void);
  356. void mail_log(char *p);
  357. void flushlog(void);
  358. void post_log(void);
  359. void checklogd(void);
  360.  
  361. /* from mathfonts.c */
  362. void fix_tex_size(void);
  363. extern int current_tex_size, texbasesize;
  364. void _output_(char *s);
  365. void output(char *s,...);
  366. char *mathfont(char *fontname);
  367. extern int usertexsize;
  368.  
  369. /* from mathml.c */
  370. int mathml(char *p, int option);
  371.  
  372. /* from matrix.c */
  373. void rawmatrix(char *p);
  374.  
  375. /* from pedia.c */
  376. void pedia(char *p);
  377.  
  378. /* from rawmath.c */
  379. void htmlmath(char *p);
  380. void mathmlmath(char *p);
  381. void tohttpquery(char *p);
  382. void rawmath(char *p);
  383. void texmath(char *p);
  384. extern int rawmath_easy;
  385. extern struct mathname { char *name; int style; char *replace; } mathname[];
  386. extern int mathname_no;
  387.  
  388. /* from hmname.c */
  389. extern struct hmname { char *name; char *replace; char *replacem;} hmname[];
  390. extern int hmname_no;
  391.  
  392. /* from score.c */
  393. void calc_getscorelast(char *p);
  394. void calc_getscore(char *p);
  395. void calc_getscoremean(char *p);
  396. void calc_getscoreremain(char *p);
  397. void calc_getscorerequire(char *p);
  398. void calc_getscoreweight(char *p);
  399. void calc_getscorelast(char *p);
  400. void calc_getscoretry(char *p);
  401. void calc_getscorebest(char *p);
  402. void calc_getscorelevel(char *p);
  403. void calc_getscorepercent(char *p);
  404. void calc_getscorestatus(char *p);
  405. void calc_examscore(char *p);
  406. void exam_currscore(int esh);
  407. extern double exam_scoredata[MAX_EXOS];
  408. int exam_depcheck(char *deps, int exam);
  409. int getscorestatus(char *classe, int sheet);
  410. int depcheck(char *sh, int exo, char *deps);
  411. extern char rscore_class[MAX_CLASSLEN+1];
  412. extern char rscore_user[MAX_NAMELEN+1];
  413.  
  414. /* from test.c */
  415. void exec_test(char *p);
  416.  
  417. /* from texmath.c */
  418. void _replace_matrix ( char *p , char *s_mat1, char *s_mat2);
  419. extern struct tmathfn {
  420.   char *name; int expind; char *left, *right; void (*routine) (char *p);
  421. } tmathfn[];
  422. extern int tmathfn_no;
  423. extern struct tmathvar { char *name, *tex; } tmathvar[];
  424. extern int tmathvar_no;
  425.  
  426. /* from var.c */
  427. int force_setvar(char *vname,char *vvalue);
  428. char *getvar(char *name);
  429. int setvar(char *vname, char *vval);
  430. void debug_output(void);
  431. void exportall(void);
  432. void unsetvar(char *vname);
  433. void get_var_privileges(void);
  434. char *_getvar(char *vname);
  435. int varsuite(char *stem, int beg, int end, char *pbuf[], int pbuflen);
  436. void lessrafale(void);
  437. extern char *exportvars[]; /* wims_ variables that should be exported */
  438. extern int exportvarcnt;
  439.  
  440. /* from variables.c */
  441. int var_def_check(char *name);
  442. void var_proc(char *fname,int cache);
  443. void phtml_put(char *fname,int cache);
  444. void phtml_put_base(char *fname,int cache);
  445. void set_module_prefix(void);
  446. extern int ispriority;
  447. extern char *sed_prog, *tr_prog, *tex2gif;
  448. void get_static_session_var(void);
  449. void parse_ro_names(void);
  450. int var_def_name(char *n, int v);
  451. void set_init_parm(void);
  452. int session_exists(char *s);
  453. int set_session_prefix(void);
  454. int check_session(void);
  455. void trap_check(char *s);
  456. void set_protocol(void);
  457. void main_phtml_put(char *mname);
  458. void var_init(void); /* initialisation */
  459. void set_variables(void);
  460. void save_session_vars(void);
  461.  
  462. /* from wims.c */
  463. void user_error(char msg[]);
  464. extern int robot_access, wrapexec, good_httpd, multiexec_index, outputing;
  465. extern int rlimit_cpu, new_session, hostcquota, manageable, cmd_type, exec_is_module;
  466. extern int available_lang_no, WORKFILE_LIMIT, isclassmodule, mode, module_defined;
  467. extern char session_prefix[], s2_prefix[];
  468. extern char lang[16];
  469. extern char *remote_addr;
  470. extern time_t nowtime, limtime, limtimex;
  471. extern char *ro_name[];
  472. extern char *mathalign_sup1, *mathalign_sup2; /* see mathalign_base */
  473. extern char *module_dir;
  474. extern char tmplbuf[MAX_LINELEN+1]; /* for temporary uses not thru subroutines. */
  475. extern char cwdbuf[MAX_FNAME+1]; /* store current working directory */
  476. extern char ins_alt[MAX_LINELEN+1]; /* dynamic insertion alternative text */
  477. extern char *bin_dir; /* directory containing executable scripts and programs. */
  478. extern char *tmp_debug, *tmp_debug_var;
  479. extern char *instex_style;
  480. extern char session_prefix[MAX_FNAME+1], s2_prefix[MAX_FNAME+1], module_prefix[MAX_FNAME+1];
  481. extern char multiexec_random[64];
  482. extern char class_dir[MAX_FNAME+1]; /* directory name of this class */
  483. extern char *devel_modules, *robot_session;
  484. extern int manager_https, confset, rlimit_fsize, rlimit_as, rlimit_data, rlimit_stack, rlimit_core;
  485. extern int rlimit_rss, rlimit_nproc, rlimit_nofile, rlimit_memlock;
  486. extern int sesrandomtab[MAX_SESRANDOM]; /* session random values */
  487. extern char job_identifier[32];
  488. extern int print_precision, substnest, getvar_len;
  489. extern char pre_language[4];
  490. extern FILE * trace_file;
  491. extern int trace_indent;
  492. enum {
  493.     ro_cmd, ro_empty, ro_lang, ro_module, ro_session, ro_special_parm,
  494.       ro_special_parm2, ro_special_parm3, ro_special_parm4, ro_useropts, ro_wsession, ro_subsession, ro_win, ro_worksheet
  495. } RO_NAMES;
  496. extern char *home_module;
  497. extern char class_dir[MAX_FNAME+1]; /* directory name of this class */
  498. char available_lang[MAX_LANGUAGES][4];
  499.  
  500. enum {
  501.     cmd_intro, cmd_new, cmd_renew, cmd_reply, cmd_config, cmd_hint, cmd_help,
  502.       cmd_resume, cmd_next, cmd_getins, cmd_getframe, cmd_getfile, cmd_close,
  503.       cmd_ref
  504. } COMMANDS;
  505. extern char tmp_dir[MAX_FNAME+1]; /* temporary directory */
  506.  
  507. extern char ref_name[2048], ref_base[2048];
  508.  
  509. struct user_variable {
  510.     char *name;
  511.     char *value;
  512. } user_variable[MAX_VAR_NUM];
  513.  
  514. extern int user_var_no;
  515. /* Destinated to module error messages */
  516. WORKING_FILE m_file,svar_file,mcache[MAX_MCACHE];
  517.  
  518. extern int isexam, direct_datafile;
  519. extern char *unsetvars[], *commands[];
  520. extern char exam_sheetexo[32]; /* sheet data of an exam */
  521. extern char nowstr[32];
  522. extern int CMD_NO;
  523. extern int simuxam, parm_restore, exodepOK, user_error_nolog;
  524. extern char examlogd[MAX_FNAME+1]; /* examlog file name */
  525. char examlogf[MAX_FNAME+1]; /* examlog file name */
  526. char mpboundary[1024];
  527. char *stdinbuf;
  528. extern char **environ;      /* table of environment variables */
  529. extern char cookiegot[256], cookieheader[64];
  530. extern int executed_gotos; /* number of goto's executed. to check with GOTO_LIMIT. */
  531. extern int noout, execnt, direct_exec, ismhelp;
  532. extern int readnest; /* nested read count */;
  533. extern char *default_form_method;
  534. extern int insert_no, lastout_file, instex_cnt;
  535. extern char instex_src[MAX_LINELEN+1], instex_fname[MAX_LINELEN+1];
  536. extern char *instex_processor;
  537. extern int instex_usedynamic, httpd_type, mcachecnt, mfilecnt;
  538. extern char *mathalign_sup1, *mathalign_sup2; /* see mathalign_base */
  539. enum {httpd_apache, httpd_wims};
  540. extern int output_length; /* length of the output. */
  541. extern int backslash_insmath, killpid, is_multiexec, exec_wait, getwimstexsize;
  542. extern char *remote_host;
  543. extern char *var_readable, *var_writable, *var_nr, *var_nw, *var_pfx;
  544. extern int RO_NAME_NO, INTERNAL_NAME_NO;
  545. extern struct internal_name {
  546.     char *name; int stat;
  547. } internal_name[];
  548. extern char var_hacking;
  549. extern long int startmtime2;
  550. extern int setcookie, forceresume, user_lang, form_access, session_serial;
  551. extern char *protocol;
  552. void useropts(void);
  553. extern char cookiegot[256], cookieset[256];
  554. extern struct tm *now; /* time of request */
  555. extern int isdevelmodule, defined_var_total, deplen, wims_sheet, wims_exo;
  556. struct VAR_DEF {
  557.     char *name; short int beg,end;
  558.     char allow, log_num, defined_in_parm, unused_padding;
  559. } var_def[MAX_VAR_NUM];
  560.  
  561.  
  562. #if !HAVE_SETENV
  563. int setenv(const char *name, const char *value, int overwrite);
  564. void unsetenv(const char *name);
  565. #endif
  566.