blob: e30c81ba0d7e1c51299accd4226a989c35172bf6 (
plain) (
blame)
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
45
46
47
48
49
50
51
52
53
54
55
|
--- src/man2html/yelp-man2html.c.orig Tue Jun 24 05:03:50 2003
+++ src/man2html/yelp-man2html.c Thu Aug 14 15:47:14 2003
@@ -129,6 +129,7 @@
#include <string.h>
#include <sys/stat.h>
#include <dirent.h>
+#include <sys/param.h>
#include <sys/types.h>
#include <time.h>
#include <sys/time.h>
@@ -3727,6 +3728,9 @@
main(int argc, char **argv)
{
char *t=NULL;
+#ifdef __FreeBSD__
+ char *source=NULL;
+#endif
int i,len;
char *buf;
char *h = '\0';
@@ -3845,6 +3849,24 @@
* right.
*/
+#ifdef __FreeBSD__
+ if ((source = strstr(output, "source: ")) != NULL)
+ {
+ int j;
+ for(i = 8, j = 0; i < strlen(source); i++)
+ {
+ if (!g_ascii_isspace((unsigned char)source[i]) && source[i] != ')')
+ {
+ output[j++] = source[i];
+ }
+ }
+ output[j] = '\0';
+ } else {
+ i = strlen(output) - 1;
+ while (g_ascii_isspace((unsigned char)output[i]))
+ output[i--] = '\0';
+ }
+#else
len = strlen(output);
for(i = 0; i < len; i++)
{
@@ -3855,8 +3877,7 @@
i = strlen(output) - 1;
while (g_ascii_isspace((unsigned char)output[i]))
output[i--] = '\0';
-
-
+#endif
if (output[0]) {
#ifdef HAVE_LIBBZ2
if(strstr(output,".bz2"))
|