summaryrefslogtreecommitdiff
path: root/graphics/xbmbrowser/patches/patch-ab
blob: 28f2929d57e3dd5d9d840912225f98b1a8e3f8d4 (plain)
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
$NetBSD: patch-ab,v 1.1 2006/06/26 16:11:43 joerg Exp $

--- xbmbrowser.h.orig	2006-06-26 15:27:35.000000000 +0000
+++ xbmbrowser.h
@@ -27,6 +27,7 @@
 #include <stdio.h>             /* C library includes */
 #include <dirent.h>            /* Filename length (and dir functions) */
 #include <assert.h>            /* debugging assertions */
+#include <limits.h>
 
 #include <X11/Xaw/Form.h>      /* widget includes */
 #include <X11/Xaw/Box.h>
@@ -82,8 +83,13 @@ enum FileType {
 /* item structure */
 typedef struct _item {
   struct _item     *next;               /* next item */
+#ifdef NAME_MAX
+  char              fname[NAME_MAX];   /* This files name in current dir */
+  char              info[NAME_MAX+40]; /* information to display about icon */
+#else
   char              fname[MAXNAMLEN];   /* This files name in current dir */
   char              info[MAXNAMLEN+40]; /* information to display about icon */
+#endif
   time_t            mtime;              /* last modification time */
   enum FileType     type;               /* file type */
   Boolean           visible;            /* visible to user? */
@@ -167,6 +173,18 @@ ext Widget     menu_bitmap, menu_pixmap;
 ext Widget     menu_directory, menu_other;
 
 /* substitution strings for function argument macro substitions */
+#ifdef NAME_MAX
+ext char     dir_name[NAME_MAX];     /* %d the current directory */
+ext char     file_name[NAME_MAX];    /* %f current filename */
+ext char     base_name[NAME_MAX];    /* %b basename for current file */
+ext char     suffix[NAME_MAX];       /* %s suffix of current file */
+ext char     input[NAME_MAX];        /* %i input string from user */
+ext char     home_dir[NAME_MAX];     /* %h the users home directory */
+ext char     init_dir[NAME_MAX];     /* %D initial startup directory */
+
+/* Information strings for display in application label */
+ext char     label_info[NAME_MAX];   /* label to show when outside bitmap */
+#else
 ext char     dir_name[MAXNAMLEN];     /* %d the current directory */
 ext char     file_name[MAXNAMLEN];    /* %f current filename */
 ext char     base_name[MAXNAMLEN];    /* %b basename for current file */
@@ -177,6 +195,7 @@ ext char     init_dir[MAXNAMLEN];     /*
 
 /* Information strings for display in application label */
 ext char     label_info[MAXNAMLEN];   /* label to show when outside bitmap */
+#endif
 ext Item    *current_item;            /* which item the user is pointing to */
 
 /* some external variables */