]> git.ipfire.org Git - thirdparty/sarg.git/blame - documentation/util.txt
The date range passed as argument is not restricted to the actual range covered by...
[thirdparty/sarg.git] / documentation / util.txt
CommitLineData
48864d28
FM
1/*! \file util.c
2\brief Various useful functions.
3*/
4
5
6
7
8
9/*! \var static char mtab1[12][4];
10The list of the months.
11*/
12
13
14
15
e5b2c6f0 16/*! \fn void getword_start(struct getwordstruct *gwarea, char *line)
9c7c6346 17Initialize the getword buffer with the given text line.
48864d28 18
9c7c6346
FM
19\param gwarea The getword buffer to initialize.
20\param line The text line to use in the getword buffer.
21*/
22
23
24
25
26
27/*! \fn void getword_restart(struct getwordstruct *gwarea)
28Restart the getword buffer from the beginning.
29
30\param gwarea The getword buffer to reset.
31*/
32
33
34
35
36
06b39c87 37/*! \fn int getword(char *word, int limit, struct getwordstruct *gwarea, char stop)
48864d28
FM
38
39Extract one "word" from the text line and remove it from the text line. The word's boundary is defined
40by the \a stop character. If multiple stop characters are found after the word, only the first one is
41removed. Therfore, passing the line buffer again to the function will remove the next word in a column
42like manner.
43
44\param word The buffer to store the extracted word.
45\param limit The size of the buffer. If the stop character isn't found before that limit is reached,
46the function displays an error message and returns an error code.
9c7c6346 47\param gwarea The getword buffer initialized by getword_start().
48864d28
FM
48\param stop The character indicating the end of the word.
49
50\retval 0 The word is extracted.
076cbab8 51\retval -1 The stop character was not found before the limit is reached.
48864d28
FM
52
53*/
54
55
56
57
58
06b39c87 59/*! \fn int getword_limit(char *word, int limit, struct getwordstruct *gwarea, char stop)
e5b2c6f0
FM
60Extract one word with a maximum size and skip any supernumerary bytes until the stop bytes is
61found.
62
63\param word The buffer to store the extracted word.
64\param limit The size of the buffer.
65\param gwarea The getword buffer initialized by getword_start().
66\param stop The character indicating the end of the word.
67
68\retval 0 The word is extracted.
69*/
70
71
72
73
74
06b39c87 75/*! \fn int getword_multisep(char *word, int limit, struct getwordstruct *gwarea, char stop)
48864d28
FM
76
77Extract one "word" from the text line and remove it from the text line. The word's boundary is defined
78by the \a stop character. All the stop characters following the word are removed too. Therefore, passing
79the line buffer again to the function will remove words even if they are separated by multiple stop
80characters.
81
82\param word The buffer to store the extracted word.
83\param limit The size of the buffer. If the stop character isn't found before that limit is reached,
84the function displays an error message and returns an error code.
9c7c6346 85\param gwarea The getword buffer initialized by getword_start().
48864d28
FM
86\param stop The character indicating the end of the word.
87
88\retval 0 The word is extracted.
076cbab8 89\retval -1 The stop character was not found before the limit is reached.
48864d28
FM
90
91*/
92
93
94
95
06b39c87 96/*! \fn int getword_skip(int limit, struct getwordstruct *gwarea, char stop)
076cbab8
FM
97Skip one "word" from the text line and remove it from the text line. The word's boundary is defined
98by the \a stop character.
48864d28 99
076cbab8 100\param limit The maximum number of characters to skip. If the stop character isn't found before that limit is reached,
48864d28 101the function displays an error message and returns an error code.
9c7c6346 102\param gwarea The getword buffer initialized by getword_start().
48864d28
FM
103\param stop The character indicating the end of the word.
104
076cbab8
FM
105\retval 0 The word is skipped.
106\retval -1 The stop character was not found before the limit is reached.
48864d28
FM
107*/
108
109
110
111
0a4e18e1 112
06b39c87 113/*! \fn int getword_atoll(long long int *number, struct getwordstruct *gwarea, char stop)
0a4e18e1
FM
114Extract one number from the text line.
115
116\param number Where the store the extracted number.
117\param gwarea The getword buffer initialized by getword_start().
118\param stop The character indicating the end of the word.
119
e5b2c6f0 120\retval 0 The number is extracted.
0a4e18e1
FM
121\retval -1 The stop character was not found after the number.
122*/
123
124
125
126
06b39c87 127/*! \fn int getword_ptr(char *orig_line,char **word, struct getwordstruct *gwarea, char stop)
e5b2c6f0
FM
128Return a pointer to a null terminated string starting at the current position and ending
129and the stop character.
130
131\param orig_line The line that is being parsed.
132\param word A pointer to set to the beginning of the string.
133\param gwarea The getword buffer initialized by getword_start().
134\param stop The character indicating the end of the word.
135
136\retval 0 The word is skipped.
137\retval -1 Invalid \a orig_line passed to the function.
138*/
139
140
141
142
48864d28
FM
143/*! \fn long long int my_atoll (const char *nptr)
144
145Convert a string into a long long.
146
147\param nptr The string containing the number to convert.
148
149\return The number found in the string or zero if no number was found.
150
151*/
152
153
154
155
156
6798f0a7
FM
157/*! \fn static int is_absolute(const char *path)
158
159Tell if the path is absolute. On Unix, a path is absolute if it starts with a /.
160
161On Windows, we also check if the path starts with "x:" where x can be any letter.
162
163\param path The path to check.
164
165\retval 1 The path is absolute.
166\retval 0 The path is relative.
167*/
168
169
170
171
172
48864d28
FM
173/*! \fn void my_mkdir(const char *name)
174
175Create the directory and all the non existing parent directories.
176
177\param name The absolute directory to create.
178
179*/
180
181
182
183
184
e5b2c6f0 185/*! \fn void my_lltoa(unsigned long long int n, char *s, int ssize, int len)
48864d28
FM
186
187Format a long long into a string.
188
189\param n The number to format.
190\param s The buffer to write the number.
e5b2c6f0 191\param ssize The size of the output buffer.
48864d28
FM
192\param len The minimum number of digits to format in the output. If the formatted
193number is less than this length, it is padded with zeros.
194
195*/
196
197
198
199
200
fa6552b0 201/*! \fn int builddia(int day, int month, int year)
48864d28 202
fa6552b0 203Return a numerical value made of the date.
48864d28 204
fa6552b0
FM
205\param day The day of the date.
206\param month The number of the month starting from 1.
207\param year The year.
48864d28 208
fa6552b0 209\return The date in an integer format computed as year*10000+month*100+day.
48864d28
FM
210*/
211
212
213
214
215
216/*! \fn void buildymd(const char *dia, const char *mes, const char *ano, char *wdata)
217Convert the date into a machine format YYYYMMDD.
218
219\param dia The day.
220\param mes The name of the month as spelled in ::mtab1. If the month is invalid, the output date
221is set to month 13.
222\param ano The year.
223\param wdata The buffer to format the date.
224*/
225
226
227
228
229
fa6552b0 230/*! \fn int conv_month(int char *month)
48864d28
FM
231Convert the month's name into its two digits numerical equivalent.
232
fa6552b0
FM
233\param month The name of the month as spelled in ::mtab1.
234
235\return The month number on starting from one. If the month name is not in ::mtab1,
23613 is returned.
48864d28
FM
237*/
238
239
240
241
242
fa6552b0 243/*! \fn const char *conv_month_name(int month)
48864d28
FM
244Convert a month number into a name.
245
fa6552b0
FM
246\param month The number of the month in the range 1 to 12.
247
248\return The name of the month from ::mtab1 unless the month number is not between 1 and 12
249in which case, the number is returned encoded on 3 characters. If the number is
250invalid, the returned string is static and will be reused by any subsequent call to this
251function with an invalid month number.
48864d28
FM
252*/
253
254
255
256
257
258/*! \fn void name_month(char *month,int month_len)
259Get the name of the month according to the language file selected by the user.
260
261\param month The number of the month. It is replaced by the month's name if the number is between
2621 and 12 or by the name of December if the number is invalid.
263\param month_len The size of the \a month buffer.
264
265*/
266
267
268
269
270
48864d28
FM
271/*! \fn void debuga(const char *msg,...)
272Write a debug message to stderr. The message is prefixed by "SARG:" to identify its origin.
273
274\param msg The printf like message to format.
275\param ... The arguments to format in the message.
276
277*/
278
279
280
281
282
283/*! \fn void debugaz(const char *head, const char *msg)
284Write a debug message to stderr with the value of a parameter. The message is prefixed by "SARG: (util)".
285
286\param head The name of the parameter.
287\param msg The value of the parameter.
288*/
289
290
291
292
293
48864d28
FM
294/*! \fn char *fixnum(long long int value, int n)
295Rewrite a number to make it more readable. The number may be written
296with the suffix K, M, G or T depending on its magnitude or the digits
297are grouped by three and separated by a dot or a comma.
298
299\param value The number to format.
300\param n If the number is abreviated and this parameter is true then append
301the suffix K, M, G or T if necessary. If it is zero, the number is shortened
302but no suffix is written.
303
304\return A static buffer containing the formatted number. It is overwritten on the next
305call of this function.
306
307*/
308
309
310
311
312
313/*! \def MAXLEN_FIXNUM
314The size of the buffer to format a number in fixnum().
315*/
316
317
318
319
320
321/*! \fn char *fixnum2(long long int value, int n)
322Format a number by grouping the digits by three and separating the groups by
323a dot or a comma.
324*/
325
326
327
328
329/*! \def MAXLEN_FIXNUM2
330The size of the buffer to format a number in fixnum2().
331*/
332
333
334
335
336
337/*! \fn void buildhref(char * href)
338Replace the path given as argument by the first part of a HTML tag to link to the given
339directory (the A tag). More precisely, the argument is replaced by <a href=" followed by the given \a href.
340
341\param href The directory to replace by a HTML A tag with the open HREF to it.
342
343*/
344
345
346
347
348
349/*! \fn char *buildtime(long long int elap)
350Write the elapsed time given in milliseconds as a string in the format HH:MM:SS.
351
352\param elap The elapsed time in milliseconds.
353
354\return A static buffer with the formatted time. It is valid until the function is called again.
355*/
356
357
358
359
360
361/*! \fn void obtdate(const char *dirname, const char *name, char *data)
362Get the date stored in the <tt>sarg-date</tt> file of a directory with the connection data.
363
364\param dirname The directory to look for the connection directory.
365\param name The name of the directory whose <tt>sarg-date</tt> file must be read.
366\param data The buffer to store the content of the file. It must be more than 80
367bytes long.
368*/
369
370
371
372
373
a1de61fe 374/*! \fn void formatdate(char *date,int date_size,int year,int month,int day,int hour,int minute,int second,int dst)
9e41ca7e
FM
375Format a date to display it in the report.
376
377\param date The buffer to write the formatted date into.
378\param date_size The size of the buffer.
379\param year The absolute year to format. It must be greater than 1900.
380\param month The month to format. It must be between 1 and 12.
381\param day The day to format starting from 1.
382\param hour The hour to format.
383\param minute The minute to format.
384\param second The second to format.
a1de61fe 385\param dst A positive number if the daylight saving is active, zero if it is not active and a negative number if it is unknown.
9e41ca7e
FM
386*/
387
388
389
390
391
fa6552b0
FM
392/*! \fn void computedate(int year,int month,int day,struct tm *t);
393Fill a tm structure with the data of the date.
9426efec
FM
394
395\param year The full year with century.
fa6552b0 396\param month The number of the month starting from one.
9426efec 397\param day The day of the date.
fa6552b0 398\param t The buffer to fill with the date.
9426efec
FM
399*/
400
401
402
403
404
d25d4e6a
FM
405/*! \fn int obtuser(const char *dirname, const char *name)
406Get the number of entries stored in a report data directory. The number is read from
407the <tt>sarg-users</tt> file of the report data's directory.
48864d28 408
d25d4e6a
FM
409\param dirname The directory containing the reports.
410\param name The name of the report directory whose <tt>sarg-users</tt> file must be read.
411
412\return The number of entries in the report or zero if the file doesn't exists.
48864d28
FM
413*/
414
415
416
417
418
d25d4e6a
FM
419/*! \fn void obttotal(const char *dirname, const char *name, char *tbytes, int nuser, char *media)
420Count the total size transfered in a report directory and compute the average number of bytes
48864d28
FM
421per entry.
422
d25d4e6a
FM
423\param dirname The directory containing the reports.
424\param name The name of the report directory whose <tt>sarg-general</tt> file must be read.
425\param tbytes A buffer to store the total number of bytes from this report.
426\param nuser The number of entries in the report directory.
48864d28
FM
427\param media A buffer to store the average number of bytes per entry.
428*/
429
430
431
432
42b117e3
FM
433
434/*! \fn int getperiod_fromsarglog(const char *arqtt,struct periodstruct *period)
435Initialize the period with the content of the first line of a sarg log.
436
437\param arqtt The text at the first line of a sarg log file.
438\param period The period to initialize.
439*/
440
441
442
443
444
445/*! \fn void getperiod_fromrange(struct periodstruct *period,int dfrom,int duntil)
446Fill the period with the specified range.
447
448\param period The period to change.
449\param dfrom The start date in the form year*10000+month*100+day.
450\param duntil The end date in the form year*10000+month*100+day.
451*/
452
453
454
455
456
fa6552b0
FM
457/*! \fn int getperiod_buildtext(struct periodstruct *period)
458Build the text to display as the date range of the report.
48864d28 459
fa6552b0 460\param period The object whose text must be contructed.
48864d28 461
fa6552b0
FM
462\retval 0 No error.
463\retval -1 Resulting text too long for buffer.
48864d28
FM
464*/
465
466
467
468
fa6552b0 469
06ced858
FM
470/*! \fn static void copy_images(void)
471Copy the images (in fact all the files) from the directory ::IMAGEDIR into the output directory
472whose name is in ::outdir.
473*/
474
475
476
477
478
e6414a9d 479/*! \fn void vrfydir(const char *per1, const char *addr, const char *site, const char *us, const char *form)
48864d28
FM
480Create a directory to generate a report for the specified connection data and populate it with the a <tt>sarg-date</tt> file
481containing the current date.
482
483The function also create an <tt>images</tt> directory in \a dir and copy all the files from the <tt>SYSCONFDIR/images</tt> into
484that directory.
485
48864d28 486\param per1 The date range in the form: YYYYMMMDD-YYYYMMMDD or DDMMMYYYY-DDMMMYYYY depending on the value of
e6414a9d 487::DateFormat.
48864d28
FM
488\param addr The ip address or host name to which the report is limited. If the string is empty, all the addresses are accepted.
489\param site The destination site to which the report is limited. If the string is empty, all the sites are accepted.
490\param us The user to whom the report is limited. It is an empty string if all the users are accepted.
491\param form The email address to which the report is sent. It is currently unused.
492
493*/
494
495
496
497
498
499/*! \fn void strip_latin(char *line)
500Remove any HTML entity from the line. A HTML entity starts with an ampersand and end at the next
501semicolon.
502
503\param line The text whose html entities are to be removed.
504*/
505
506
507
508
509
120d768c 510/*! \fn void zdate(char *ftime,int ftimesize, const char *DateFormat)
48864d28
FM
511Format the current date and time according to the date format.
512
120d768c
FM
513\param ftime The buffer to format the date.
514\param ftimesize The size of the buffer to store the date
48864d28
FM
515\param DateFormat The format of the date. It can be:
516 \arg u to format as mmm/dd/YYYY HH:MM
517 \arg e to format as dd/mmm/YYYY HH:MM
518 \arg w to format as WW-HH-MM where WW is the week number in the range 00 to 53.
519*/
520
521
522
523
524
525/*! \fn char *fixtime(long int elap)
526Format a "time" into a size or a time formatted as HH:MM:SS.
527
528\param elap The "time" to format in milliseconds if it is a time and into bytes if it is a size.
529
530\return The formatted time.
531
532\bug If the elapsed time is less than 1000ms, the time is formated with the milliseconds as the seconds.
533
534\todo Review this function and documentation based on the calls made to it and the arguments passed by the callers.
535*/
536
537
538
539
540
42b117e3 541/*! \fn void date_from(char *date, int *dfrom, int *duntil)
48864d28
FM
542Split a date range into a date from and a date until. If the date range
543is not a range but just a single date, it is duplicated to make a range out
544of it.
545
546\param date The date range to split in the form <tt>from-until</tt>. If it is a single date,
547it is transformed into a range like <tt>date-date</tt>. Each date is in the form DD/MM/YYYY.
42b117e3
FM
548\param dfrom A variable to write the start date in the form YYYY*10000+MM*100+DD.
549\param duntil A variable to write the end date in the form YYYY*10000+MM*100+DD.
48864d28
FM
550*/
551
552
553
554
555
556/*! \fn char *strlow(char *string)
557Convert a string to all lowercases.
558
559\param string The string to convert.
560
561\return A pointer to the string passed as argument.
562*/
563
564
565
566
567
568/*! \fn char *strup(char *string)
569Convert a string to all uppercases.
570
571\param string The string to convert.
572
573\return A pointer to the string passed as argument.
574*/
575
576
577
578
579
48864d28 580/*! \fn void removetmp(const char *outdir)
fa6552b0 581Purge the file <tt>sarg-general</tt> from all the lines but the total.
48864d28
FM
582
583\param outdir The output directory to purge.
584*/
585
586
587
588
589
590/*! \fn void load_excludecodes(const char *ExcludeCodes)
591Load the list of the HTTP codes to exclude from the report. There must be one code per line.
592Any trailing space is removed and there is no provision for comments.
593
594\param ExcludeCodes The name of the file to load.
595
120d768c 596This function allocate the memory to store the codes and it must be freed by a call to
48864d28
FM
597free_excludecodes().
598*/
599
600
601
602
603
604/*! \fn void free_excludecodes(void)
605Free the memory allocated by load_excludecodes().
606*/
607
608
609
610
611/*! \fn int vercode(const char *code)
612Check if the code is contained in the exclusion list loaded by load_excludecodes().
613
614\param code The HTTP code to test.
615
616\retval 1 The code is excluded.
617\retval 0 The code is not excluded.
618*/
619
620
621
622
623
624/*! \fn void fixnone(char *str)
625Find if the string is the word none and clear the string if it matches. The function
626tolerates the trailing spaces and tabulations.
627
628\param str The text to test for the word "none".
629*/
630
631
632
633
634
2357ef77
FM
635/*! \fn void fixendofline(char *str)
636Remove the control codes and spaces at the end of the line. That is, it remove any ASCII
637code less than or equal to 0x20.
638
639\param str The string to truncate.
640*/
641
642
643
644
48864d28
FM
645/*! \fn int testvaliduserchar(const char *user)
646Tell if the user string contains any invalid character in a user name. The list
647of the invalid characters is defined by ::UserInvalidChar.
648
649\param user The user name to test.
650
651\retval 1 The string contains at least one invalid character.
652\retval 0 The string is valid.
653*/
654
655
656
657
658
659/*! \fn int compar( const void *a, const void *b )
660Compare two integers for bsearch.
661
662\param a A pointer to the first integer.
663\param b A pointer to the second integer.
664
665\retval 1 If a > b.
666\retval 0 If a == b.
667\retval -1 If a < b.
668*/
669
670
671
672
673
674/*! \fn int getnumlist( char *buf, numlist *list, const int len, const int maxvalue )
675Get a comma separated list of numbers and split them into separate values taking into account
676that no value may be greater than a maximum. If a value is in fact a range, it is expended.
677
678Any duplicate value is removed.
679
680\param buf The string with the list of numbers.
681\param list Where to store the numbers.
682\param len The size of the list.
683\param maxvalue The maximum value allowed in the list.
684
685\retval 0 No error.
686\retval -1 Error detected.
687*/
688
689
690
691
692
693/*! \fn void show_info(FILE *fp_ou)
694Write the HTML formatted message to indicate the version of sarg that produced
695the report and when the report was generated.
696
697\param fp_ou The HTML file to which the identification block must be appended.
698*/
699
700
701
702
703
c0ec9cc7 704/*! \fn void show_sarg(FILE *fp_ou, int depth)
48864d28
FM
705Write the header of the report to tell that it was generated by sarg.
706
707\param fp_ou The handle of the HTML file.
c0ec9cc7
FM
708\param depth How deep is the page in the directory tree. It is used to prepend the images directory name
709with as many .. as necessary. If the page is at the same level as the image directory, the depth is zero.
48864d28
FM
710*/
711
712
713
714
715
716/*! \fn char *get_size(const char *path, const char *file)
717Get the size, in human readable form and kibibytes, of the content of a directory.
718
719\param path The path containing the directory to scan.
720\param file The last part of the path to the directory to scan.
721
722\return The size of the path.
723*/
724
725
726
727
728
c0ec9cc7 729/*! \fn void write_html_header(FILE *fp_ou, int depth, const char *title)
48864d28
FM
730Write the HTML header of a HTML report file. The DTD correspond to a
731transitional HTML version 4.01. The title of the document is taken from
732the global variable ::Title.
733
734\param fp_ou The file to which the HTML header is written.
c0ec9cc7
FM
735\param depth How deep is the page in the directory tree. The depth is passed to show_sarg().
736\param title The title of the page.
737*/
738
739
740
741
742
743/*! \fn void close_html_header(FILE *fp_ou)
744Close the header opened by write_html_header().
745
746\param fp_ou The file to which the HTML header is written.
48864d28
FM
747*/
748
749
750
751
752
753/*! \fn void baddata(void)
754Display an error message telling that sarg suspects an attempt to execute arbitrary code and terminate sarg.
755
756Any temporary file created by sarg is deleted.
757*/
758
759
760
761
762
f84a35a3
FM
763/*! \fn void url_hostname(const char *url,char *hostname,int hostsize)
764Extract the host name from the URL.
765
766\param url The url whose host name must be extracted.
767\param hostname The buffer to store the host name.
768\param hostsize The size of the host name buffer.
769
770\note The function is stupid at this time. It just searches for the first slash
771in the URL and truncates the URL there. It doesn't take the protocol into account
772nor the port number nor any user or password information.
773*/
774
775
776
777
778
48864d28
FM
779/*! \fn void url_module(const char *url, char *w2)
780Copy at most 254 bytes from the end of the URL or stops at the first /.
781
782\param url The URL to parse.
783\param w2 A buffer to store the copied portion of the URL. The buffer must
784be at least 255 characters long.
785*/
786
787
788
789
790
e5b2c6f0
FM
791/*! \fn void url_to_file(const char *url,char *file,int filesize)
792Mangle an URL to produce a part that can be included in a file.
793
794\param url The URL to mangle.
795\param file The buffer to write the mangled URL.
796\param filesize The size of the buffer.
797*/
798
799
800
801
802
fa6552b0 803/*! \fn int write_html_trailer(FILE *fp_ou)
120d768c 804End the HTML file by closing the centered table that was opened by write_html_header(), writting
48864d28
FM
805the informations of show_info() and closing the body and html tag. After this function returns, the
806HTML file is complete and nothing should be written to it.
807
808\param fp_ou The HTML file to close. The file handle is not closed but you should not write anything
809to the file after this function returns.
810
fa6552b0
FM
811\retval 0 No error.
812\retval -1 Write error.
48864d28
FM
813*/
814
815
816
817
818
819/*! \fn void version(void)
820Display the current version of sarg and terminate the program.
821*/
822
823
824
825
826
827/*! \fn char *get_param_value(const char *param,char *line)
828Get the value of a parameter formatted in the string as "param value"
829without the quotes.
830
831If the parameter name matches \a param, then the value following the parameter
832is returned. If it doesn't match, the function return NULL.
833
834The function is suitable to parse configuration files because it will ignore
835comments (anything but spaces and tabulations put before the parameter will make
836it unrecognized by this function)
837
838\param param The parameter name that must be found at the beginning of the line
839with possible spaces or tabulations before.
840\param line The text line to search for the parameter and it's value.
841
842\return The beginning of the value after the equal sign and with the possible
843spaces or tabulations removed. If the line doesn't start with the parameter name,
844the function returns NULL.
845
846*/
847
848
849
850
851
dfb337be
FM
852/*! \fn void write_logo_image(FILE *fp_ou)
853Write a link of the logo of the organisation that generate the report in the HTML file. The logo
854is written in a centered table.
855
856\param fp_ou The handle of the HTML file being written.
857*/
858
859
860
861
ac422f9b
FM
862
863/*! \fn void output_html_string(FILE *fp_ou,const char *str,int maxlen)
dfb337be
FM
864Write a string in a file and replace the problematic ASCII characters by their equivalent HTML entities.
865
866\param fp_ou The handle of the output file.
867\param str The string to output.
ac422f9b
FM
868\param maxlen The maximum number of bytes to write from the string. Set to zero to have no limit.
869
870If the string is longer than the requested length, only the requested number of bytes are output and
871the string is truncated and ended by &hellip;.
872*/
873
874
875
876
877
878/*! \fn void output_html_url(FILE *fp_ou,const char *url)
879Write an URL into the file and replace any & by &amp;.
880
881\param fp_ou The handle of the output file.
882\param url The URL to output.
dfb337be 883*/
51465d08
FM
884
885
886
887
888
889/*! \fn void unlinkdir(const char *dir,int contentonly)
890Delete a directory and its content.
891
892\param dir The name of the directory to delete.
893\param contentonly \c True to delete only the content of the directory and leave the directory
894itself in place. If set to \c zero, the directory is removed too.
895*/
ac422f9b 896