File: man2html.h

package info (click to toggle)
kio-extras 4%3A22.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,768 kB
  • sloc: cpp: 26,898; ansic: 4,443; perl: 1,058; xml: 97; sh: 69; python: 28; makefile: 9
file content (44 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
 * \file man2html.h
 *
 * Converts man pages to HTML.  This KIO worker is not part of KDE Frameworks and is
 * not public API.
 * \internal
 */

#ifndef MAN2HTML_H
#define MAN2HTML_H

class QByteArray;

/**
  Try to detect the encoding of given man page content
  and convert it to UTF-8
*/
char *manPageToUtf8(const QByteArray &input, const QByteArray &dirName);

/** call this with the buffer you have */
void scan_man_page(const char *man_page);

/*
 * Sets the path to a CSS file that should be included with the generated
 * HTML output.
 *
 * \param HTML-encoded path to the file to reference for stylesheets.
 * \since 4.1
 */
extern void setCssFile(const QByteArray& _cssFile);

/** implement this somewhere. It will be called
   with HTML contents
*/
extern void output_real(const char *insert);

/**
 * called for requested man pages. filename can be a
 * relative path! Return NULL on errors. The returned
 * char array is freed by man2html
 */
extern char *read_man_page(const char *filename);

#endif // MAN2HTML_H