]> git.ipfire.org Git - thirdparty/sarg.git/blob - getconf.c
Changed Pedro's address in headers.
[thirdparty/sarg.git] / getconf.c
1 /*
2 * AUTHOR: Pedro Lineu Orso pedro.orso@gmail.com
3 * 1998, 2008
4 * SARG Squid Analysis Report Generator http://sarg.sourceforge.net
5 *
6 * SARG donations:
7 * please look at http://sarg.sourceforge.net/donations.php
8 * ---------------------------------------------------------------------
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
23 *
24 */
25
26 #include "include/conf.h"
27
28 extern numlist hours, weekdays;
29
30 char wbuf[MAXLEN];
31 char Msg[255];
32
33 void getconf()
34 {
35
36 FILE *fp_in;
37 char buf[MAXLEN];
38
39 if(debug) {
40 sprintf(Msg,"Loading configuration from: %s",ConfigFile);
41 debuga(Msg);
42 }
43
44 if ((fp_in = fopen(ConfigFile, "r")) == NULL) {
45 fprintf(stderr, "SARG: (getconf) Cannot open file: %s\n",ConfigFile);
46 exit(1);
47 }
48
49 while (fgets(buf, MAXLEN, fp_in) != NULL) {
50 if(strstr(buf,"\n") != 0)
51 buf[strlen(buf)-1]='\n';
52
53 if(debugm)
54 printf("SYSCONFDIR %s",buf);
55
56 if(strncmp(buf,"#",1) == 0)
57 continue;
58
59 parmtest(buf);
60
61 }
62
63 fclose(fp_in);
64 language_load(language);
65 return;
66 }
67
68
69 int parmtest(char *buf)
70 {
71
72 if(strstr(buf,"background_color") != 0) {
73 getword(wbuf,buf,' ');
74 strcpy(BgColor,buf);
75 fixnone(BgColor);
76 return;
77 }
78
79 if(strstr(buf,"text_color") != 0) {
80 if(strstr(buf,"logo_text_color") == 0) {
81 getword(wbuf,buf,' ');
82 strcpy(TxColor,buf);
83 fixnone(TxColor);
84 return;
85 }
86 }
87
88 if(strstr(buf,"text_bgcolor") != 0) {
89 getword(wbuf,buf,' ');
90 strcpy(TxBgColor,buf);
91 fixnone(TxBgColor);
92 return;
93 }
94
95 if(strstr(buf,"title_color") != 0) {
96 getword(wbuf,buf,' ');
97 strcpy(TiColor,buf);
98 fixnone(TiColor);
99 return;
100 }
101
102 if(strstr(buf,"logo_image") != 0) {
103 getword(wbuf,buf,' ');
104 strcpy(LogoImage,buf);
105 fixnone(LogoImage);
106 return;
107 }
108
109 if(strstr(buf,"logo_text") != 0) {
110 if(strstr(buf,"logo_text_color") == 0) {
111 getword(wbuf,buf,'"');
112 getword(LogoText,buf,'"');
113 fixnone(LogoText);
114 return;
115 }
116 }
117
118 if(strstr(buf,"logo_text_color") != 0) {
119 getword(wbuf,buf,' ');
120 strcpy(LogoTextColor,buf);
121 fixnone(LogoTextColor);
122 return;
123 }
124
125 if(strstr(buf,"background_image") != 0) {
126 getword(wbuf,buf,' ');
127 strcpy(BgImage,buf);
128 fixnone(BgImage);
129 return;
130 }
131
132 if(strstr(buf,"show_sarg_info") != 0) {
133 getword(wbuf,buf,' ');
134 strcpy(ShowSargInfo,buf);
135 fixnone(ShowSargInfo);
136 return;
137 }
138
139 if(strstr(buf,"show_sarg_logo") != 0) {
140 getword(wbuf,buf,' ');
141 strcpy(ShowSargLogo,buf);
142 fixnone(ShowSargLogo);
143 return;
144 }
145
146 if(strstr(buf,"font_face") != 0) {
147 getword(wbuf,buf,' ');
148 strcpy(FontFace,buf);
149 fixnone(FontFace);
150 return;
151 }
152
153 if(strstr(buf,"header_color") != 0) {
154 getword(wbuf,buf,' ');
155 strcpy(HeaderColor,buf);
156 fixnone(HeaderColor);
157 return;
158 }
159
160 if(strstr(buf,"header_bgcolor") != 0) {
161 getword(wbuf,buf,' ');
162 strcpy(HeaderBgColor,buf);
163 fixnone(HeaderBgColor);
164 return;
165 }
166
167 if(strstr(buf,"font_size") != 0) {
168 if(strstr(buf,"header_font_size") == 0 && strstr(buf,"title_font_size") == 0) {
169 getword(wbuf,buf,' ');
170 strcpy(FontSize,buf);
171 fixnone(FontSize);
172 return;
173 }
174 }
175
176 if(strstr(buf,"header_font_size") != 0) {
177 getword(wbuf,buf,' ');
178 strcpy(HeaderFontSize,buf);
179 fixnone(HeaderFontSize);
180 return;
181 }
182
183 if(strstr(buf,"title_font_size") != 0) {
184 getword(wbuf,buf,' ');
185 strcpy(TitleFontSize,buf);
186 fixnone(TitleFontSize);
187 return;
188 }
189
190 if(strstr(buf,"image_size") != 0) {
191 getword(wbuf,buf,' ');
192 getword(Width,buf,' ');
193 strcpy(Height,buf);
194 fixnone(Width);
195 fixnone(Height);
196 return;
197 }
198
199 if(strstr(buf,"title") != 0) {
200 getword(wbuf,buf,'"');
201 getword(Title,buf,'"');
202 fixnone(Title);
203 return;
204 }
205
206 if(strstr(buf,"resolve_ip") != 0) {
207 getword(wbuf,buf,' ');
208 strcpy(Ip2Name,buf);
209 fixnone(Ip2Name);
210 return;
211 }
212
213 if(strstr(buf,"user_ip") != 0) {
214 getword(wbuf,buf,' ');
215 strcpy(UserIp,buf);
216 fixnone(UserIp);
217 return;
218 }
219
220 if(strstr(buf,"max_elapsed") != 0) {
221 getword(wbuf,buf,' ');
222 strcpy(MaxElapsed,buf);
223 fixnone(MaxElapsed);
224 return;
225 }
226
227 if(strstr(buf,"date_format") != 0) {
228 getword(wbuf,buf,' ');
229 strcpy(DateFormat,buf);
230 fixnone(DateFormat);
231 return;
232 }
233
234 if( strstr( buf, "hours" ) != 0 ) {
235 if( getnumlist( buf, &hours, 24, 24 ) ) {
236 fprintf( stderr, "Error: Invalid syntax in hours tag!\n" );
237 exit( 1 );
238 }
239 }
240
241 if( strstr( buf, "weekdays" ) != 0 ) {
242 if( getnumlist( buf, &weekdays, 7, 7 ) ) {
243 fprintf( stderr, "Error: Invalid syntax in weekdays tag!\n" );
244 exit( 1 );
245 }
246 }
247
248 if(strstr(buf,"topuser_sort_field") != 0) {
249 getword(wbuf,buf,' ');
250 getword(TopuserSortField,buf,' ');
251 strcpy(TopuserSortOrder,buf);
252 fixnone(TopuserSortOrder);
253 return;
254 }
255
256 if(strstr(buf,"user_sort_field") != 0) {
257 getword(wbuf,buf,' ');
258 getword(UserSortField,buf,' ');
259 strcpy(UserSortOrder,buf);
260 fixnone(UserSortOrder);
261 return;
262 }
263
264 if(strstr(buf,"access_log") != 0) {
265 getword(wbuf,buf,' ');
266 strcpy(AccessLog,buf);
267 fixnone(AccessLog);
268 return;
269 }
270
271 if(strstr(buf,"useragent_log") != 0) {
272 getword(wbuf,buf,' ');
273 strcpy(UserAgentLog,buf);
274 fixnone(UserAgentLog);
275 return;
276 }
277
278 if(strstr(buf,"exclude_hosts") != 0) {
279 getword(wbuf,buf,' ');
280 strcpy(ExcludeHosts,buf);
281 fixnone(ExcludeHosts);
282 return;
283 }
284
285 if(strstr(buf,"exclude_codes") != 0) {
286 getword(wbuf,buf,' ');
287 strcpy(ExcludeCodes,buf);
288 fixnone(ExcludeCodes);
289 return;
290 }
291
292 if(strstr(buf,"exclude_users") != 0) {
293 getword(wbuf,buf,' ');
294 strcpy(ExcludeUsers,buf);
295 fixnone(ExcludeUsers);
296 return;
297 }
298
299 if(strstr(buf,"password") != 0) {
300 getword(wbuf,buf,' ');
301 strcpy(PasswdFile,buf);
302 fixnone(PasswdFile);
303 return;
304 }
305
306 if(strstr(buf,"temporary_dir") != 0) {
307 getword(wbuf,buf,' ');
308 strcpy(TempDir,buf);
309 fixnone(TempDir);
310 return;
311 }
312
313 if(strstr(buf,"report_type") != 0) {
314 getword(wbuf,buf,' ');
315 strcpy(ReportType,buf);
316 fixnone(ReportType);
317 return;
318 }
319
320 if(strstr(buf,"output_dir") != 0) {
321 if(strstr(buf,"output_dir_form") == 0) {
322 getword(wbuf,buf,' ');
323 strcpy(OutputDir,buf);
324 fixnone(OutputDir);
325 return;
326 }
327 }
328
329 if(strstr(buf,"output_email") != 0) {
330 getword(wbuf,buf,' ');
331 strcpy(OutputEmail,buf);
332 fixnone(OutputEmail);
333 return;
334 }
335
336 if(strstr(buf,"per_user_limit") != 0) {
337 getword(wbuf,buf,' ');
338 getword(PerUserLimitFile,buf,' ');
339 strcpy(PerUserLimit,buf);
340 fixnone(PerUserLimitFile);
341 fixnone(PerUserLimit);
342 return;
343 }
344
345
346 if(strstr(buf,"lastlog") != 0) {
347 getword(wbuf,buf,' ');
348 strcpy(LastLog,buf);
349 fixnone(LastLog);
350 return;
351 }
352
353 if(strstr(buf,"remove_temp_files") != 0) {
354 getword(wbuf,buf,' ');
355 strcpy(RemoveTempFiles,buf);
356 fixnone(RemoveTempFiles);
357 return;
358 }
359
360 if(strstr(buf,"replace_index") != 0) {
361 getword(wbuf,buf,' ');
362 strcpy(ReplaceIndex,buf);
363 fixnone(ReplaceIndex);
364 return;
365 }
366
367 if(strstr(buf,"index_tree") != 0) {
368 getword(wbuf,buf,' ');
369 strcpy(IndexTree,buf);
370 fixnone(IndexTree);
371 return;
372 }
373
374 if(strstr(buf,"index") != 0) {
375 if(strstr(buf,"index_sort_order") == 0) {
376 getword(wbuf,buf,' ');
377 strcpy(Index,buf);
378 fixnone(Index);
379 return;
380 }
381 }
382
383 if(strstr(buf,"overwrite_report") != 0) {
384 getword(wbuf,buf,' ');
385 strcpy(OverwriteReport,buf);
386 fixnone(OverwriteReport);
387 return;
388 }
389
390 if(strstr(buf,"records_without_userid") != 0) {
391 getword(wbuf,buf,' ');
392 strcpy(RecordsWithoutUser,buf);
393 fixnone(RecordsWithoutUser);
394 return;
395 }
396
397 if(strstr(buf,"use_comma") != 0) {
398 getword(wbuf,buf,' ');
399 strcpy(UseComma,buf);
400 fixnone(UseComma);
401 return;
402 }
403
404 if(strstr(buf,"mail_utility") != 0) {
405 getword(wbuf,buf,' ');
406 strcpy(MailUtility,buf);
407 fixnone(MailUtility);
408 return;
409 }
410
411 if(strstr(buf,"topsites_num") != 0) {
412 getword(wbuf,buf,' ');
413 strcpy(TopSitesNum,buf);
414 fixnone(TopSitesNum);
415 return;
416 }
417
418 if(strstr(buf,"topuser_num") != 0) {
419 getword(wbuf,buf,' ');
420 strcpy(TopUsersNum,buf);
421 fixnone(TopUsersNum);
422 return;
423 }
424
425 if(strstr(buf,"usertab") != 0) {
426 getword(wbuf,buf,' ');
427 strcpy(UserTabFile,buf);
428 fixnone(UserTabFile);
429 return;
430 }
431
432 if(strstr(buf,"index_sort_order") != 0) {
433 getword(wbuf,buf,' ');
434 strcpy(IndexSortOrder,buf);
435 fixnone(IndexSortOrder);
436 return;
437 }
438
439 if(strstr(buf,"topsites_sort_order") != 0) {
440 getword(wbuf,buf,' ');
441 getword(TopsitesSortField,buf,' ');
442 strcpy(TopsitesSortType,buf);
443 fixnone(TopsitesSortField);
444 fixnone(TopsitesSortType);
445 return;
446 }
447
448 if(strstr(buf,"long_url") != 0) {
449 getword(wbuf,buf,' ');
450 strcpy(LongUrl,buf);
451 fixnone(LongUrl);
452 return;
453 }
454
455 if(strstr(buf,"language") != 0) {
456 getword(wbuf,buf,' ');
457 strcpy(language,buf);
458 fixnone(language);
459 return;
460 }
461
462 if(strstr(buf,"dansguardian_conf") != 0) {
463 getword(wbuf,buf,' ');
464 strcpy(DansGuardianConf,buf);
465 fixnone(DansGuardianConf);
466 return;
467 }
468
469 if(strstr(buf,"squidguard_conf") != 0) {
470 getword(wbuf,buf,' ');
471 strcpy(SquidGuardConf,buf);
472 fixnone(SquidGuardConf);
473 return;
474 }
475
476 if(strstr(buf,"date_time_by") != 0) {
477 getword(wbuf,buf,' ');
478 strcpy(datetimeby,buf);
479 fixnone(datetimeby);
480 return;
481 }
482
483 if(strstr(buf,"charset") != 0) {
484 getword(wbuf,buf,' ');
485 strcpy(CharSet,buf);
486 fixnone(CharSet);
487 ccharset(CharSet);
488 return;
489 }
490
491 if(strstr(buf,"user_invalid_char") != 0) {
492 getword(wbuf,buf,'"');
493 getword(UserInvalidChar,buf,'"');
494 fixnone(UserInvalidChar);
495 return;
496 }
497
498 if(strstr(buf,"include_users") != 0) {
499 getword(wbuf,buf,'"');
500 getword(wbuf,buf,'"');
501 sprintf(IncludeUsers,":%s:",wbuf);
502 fixnone(IncludeUsers);
503 return;
504 }
505
506 if(strstr(buf,"exclude_string") != 0) {
507 getword(wbuf,buf,'"');
508 getword(ExcludeString,buf,'"');
509 fixnone(ExcludeString);
510 return;
511 }
512
513 if(strstr(buf,"privacy") != 0) {
514 if(strstr(buf,"privacy_string") == 0 && \
515 strstr(buf,"privacy_string_color") == 0) {
516 getword(wbuf,buf,' ');
517 strcpy(Privacy,buf);
518 fixnone(Privacy);
519 return;
520 }
521 }
522
523 if(strstr(buf,"privacy_string") != 0) {
524 if(strstr(buf,"privacy_string_color") == 0) {
525 getword(wbuf,buf,'"');
526 getword(PrivacyString,buf,'"');
527 fixnone(PrivacyString);
528 return;
529 }
530 }
531
532 if(strstr(buf,"privacy_string_color") != 0) {
533 getword(wbuf,buf,' ');
534 strcpy(PrivacyStringColor,buf);
535 fixnone(PrivacyStringColor);
536 return;
537 }
538
539 if(strstr(buf,"show_successful_message") != 0) {
540 getword(wbuf,buf,' ');
541 strcpy(SuccessfulMsg,buf);
542 fixnone(SuccessfulMsg);
543 return;
544 }
545
546 if(strstr(buf,"show_read_statistics") != 0) {
547 getword(wbuf,buf,' ');
548 strcpy(ShowReadStatistics,buf);
549 fixnone(ShowReadStatistics);
550 return;
551 }
552
553 if(strstr(buf,"topuser_fields") != 0) {
554 getword(wbuf,buf,' ');
555 strcpy(TopUserFields,buf);
556 fixnone(TopUserFields);
557 return;
558 }
559
560 if(strstr(buf,"user_report_fields") != 0) {
561 getword(wbuf,buf,' ');
562 strcpy(UserReportFields,buf);
563 fixnone(UserReportFields);
564 return;
565 }
566
567 if(strstr(buf,"site_user_time_date_type") != 0) {
568 getword(wbuf,buf,' ');
569 strcpy(SiteUserTimeDateType,buf);
570 fixnone(SiteUserTimeDateType);
571 return;
572 }
573
574 if(strstr(buf,"datafile ") != 0) {
575 getword(wbuf,buf,' ');
576 strcpy(DataFile,buf);
577 fixnone(DataFile);
578 return;
579 }
580
581 if(strstr(buf,"datafile_delimiter") != 0) {
582 getword(wbuf,buf,' ');
583 getword(wbuf,buf,'"');
584 getword(DataFileDelimiter,buf,'"');
585 fixnone(DataFileDelimiter);
586 return;
587 }
588
589 if(strstr(buf,"datafile_fields") != 0) {
590 getword(wbuf,buf,' ');
591 strcpy(DataFileFields,buf);
592 fixnone(DataFileFields);
593 return;
594 }
595
596 if(strstr(buf,"datafile_url") != 0) {
597 getword(wbuf,buf,' ');
598 strcpy(DataFileUrl,buf);
599 fixnone(DataFileUrl);
600 return;
601 }
602
603 if(strstr(buf,"parsed_output_log") != 0) {
604 if(strstr(buf,"parsed_output_log_compress") == 0) {
605 getword(wbuf,buf,' ');
606 strcpy(ParsedOutputLog,buf);
607 fixnone(ParsedOutputLog);
608 return;
609 }
610 }
611
612 if(strstr(buf,"parsed_output_log_compress") != 0) {
613 getword(wbuf,buf,' ');
614 strcpy(ParsedOutputLogCompress,buf);
615 fixnone(ParsedOutputLogCompress);
616 return;
617 }
618
619 if(strstr(buf,"displayed_values") != 0) {
620 getword(wbuf,buf,' ');
621 strcpy(DisplayedValues,buf);
622 fixnone(DisplayedValues);
623 return;
624 }
625
626 if(strstr(buf,"authfail_report_limit") != 0) {
627 getword(wbuf,buf,' ');
628 AuthfailReportLimit=atoi(buf);
629 return;
630 }
631
632 if(strstr(buf,"denied_report_limit") != 0) {
633 getword(wbuf,buf,' ');
634 DeniedReportLimit=atoi(buf);
635 return;
636 }
637
638 if(strstr(buf,"siteusers_report_limit") != 0) {
639 getword(wbuf,buf,' ');
640 SiteUsersReportLimit=atoi(buf);
641 return;
642 }
643
644 if(strstr(buf,"dansguardian_report_limit") != 0) {
645 getword(wbuf,buf,' ');
646 DansGuardianReportLimit=atoi(buf);
647 return;
648 }
649
650 if(strstr(buf,"squidguard_report_limit") != 0) {
651 getword(wbuf,buf,' ');
652 SquidGuardReportLimit=atoi(buf);
653 return;
654 }
655
656 if(strstr(buf,"user_report_limit") != 0) {
657 getword(wbuf,buf,' ');
658 UserReportLimit=atoi(buf);
659 return;
660 }
661
662 if(strstr(buf,"download_report_limit") != 0) {
663 getword(wbuf,buf,' ');
664 DownloadReportLimit=atoi(buf);
665 return;
666 }
667
668 if(strstr(buf,"www_document_root") != 0) {
669 getword(wbuf,buf,' ');
670 strcpy(wwwDocumentRoot,buf);
671 fixnone(wwwDocumentRoot);
672 return;
673 }
674
675 if(strstr(buf,"block_it") != 0) {
676 getword(wbuf,buf,' ');
677 strcpy(BlockIt,buf);
678 fixnone(BlockIt);
679 return;
680 }
681
682 if(strstr(buf,"external_css_file") != 0) {
683 getword(wbuf,buf,' ');
684 strcpy(ExternalCSSFile,buf);
685 fixnone(ExternalCSSFile);
686 return;
687 }
688
689 if(strstr(buf,"user_authentication") != 0) {
690 getword(wbuf,buf,' ');
691 strcpy(UserAuthentication,buf);
692 fixnone(UserAuthentication);
693 return;
694 }
695
696 if(strstr(buf,"AuthUserFile") != 0) {
697 getword(wbuf,buf,' ');
698 strcpy(AuthUserFile,buf);
699 fixnone(AuthUserFile);
700 return;
701 }
702
703 if(strstr(buf,"AuthName") != 0) {
704 getword(wbuf,buf,' ');
705 strcpy(AuthName,buf);
706 fixnone(AuthName);
707 return;
708 }
709
710 if(strstr(buf,"AuthType") != 0) {
711 getword(wbuf,buf,' ');
712 strcpy(AuthType,buf);
713 fixnone(AuthType);
714 return;
715 }
716
717 if(strstr(buf,"Require") != 0) {
718 getword(wbuf,buf,' ');
719 strcpy(Require,buf);
720 fixnone(Require);
721 return;
722 }
723
724 if(strstr(buf,"download_suffix") != 0) {
725 getword(wbuf,buf,'"');
726 getword(DownloadSuffix,buf,'"');
727 fixnone(DownloadSuffix);
728 return;
729 }
730
731 if(strstr(buf,"graphs") != 0) {
732 getword(wbuf,buf,' ');
733 strcpy(Graphs,buf);
734 fixnone(Graphs);
735 return;
736 }
737
738 if(strstr(buf,"graph_days_bytes_bar_color") != 0) {
739 getword(wbuf,buf,' ');
740 strcpy(GraphDaysBytesBarColor,buf);
741 fixnone(GraphDaysBytesBarColor);
742 return;
743 }
744
745 if(strstr(buf,"squidguard_log_format") != 0) {
746 getword(wbuf,buf,' ');
747 strcpy(SquidGuardLogFormat,buf);
748 fixnone(SquidGuardLogFormat);
749 return;
750 }
751
752 if(strstr(buf,"squidguard_ignore_date") != 0) {
753 getword(wbuf,buf,' ');
754 strcpy(SquidguardIgnoreDate,buf);
755 fixnone(SquidguardIgnoreDate);
756 return;
757 }
758
759 if(strstr(buf,"dansguardian_ignore_date") != 0) {
760 getword(wbuf,buf,' ');
761 strcpy(DansguardianIgnoreDate,buf);
762 fixnone(DansguardianIgnoreDate);
763 return;
764 }
765
766 if(strstr(buf,"ulimit") != 0) {
767 getword(wbuf,buf,' ');
768 strcpy(Ulimit,buf);
769 fixnone(Ulimit);
770 return;
771 }
772
773 if(strstr(buf,"ntlm_user_format") != 0) {
774 getword(wbuf,buf,' ');
775 strcpy(NtlmUserFormat,buf);
776 fixnone(NtlmUserFormat);
777 return;
778 }
779
780 if(strstr(buf,"realtime_types") != 0) {
781 getword(wbuf,buf,' ');
782 strcpy(RealtimeTypes,buf);
783 fixnone(RealtimeTypes);
784 return;
785 }
786
787 if(strstr(buf,"realtime_unauthenticated_records") != 0) {
788 getword(wbuf,buf,' ');
789 strcpy(RealtimeUnauthRec,buf);
790 fixnone(RealtimeUnauthRec);
791 return;
792 }
793
794 if(strstr(buf,"realtime_refresh_time") != 0) {
795 getword(wbuf,buf,' ');
796 realtime_refresh=atoi(buf);
797 return;
798 }
799
800 if(strstr(buf,"realtime_access_log_lines") != 0) {
801 getword(wbuf,buf,' ');
802 realtime_access_log_lines=atoi(buf);
803 return;
804 }
805
806 if(strstr(buf,"byte_cost") != 0) {
807 getword(wbuf,buf,' ');
808 cost=atol(buf);
809 getword(wbuf,buf,' ');
810 nocost=my_atoll(buf);
811 return;
812 }
813
814 return;
815 }