FreeBSD Bugzilla – Attachment 51459 Details for
Bug 78152
Archmage is not compatible with textproc/pychm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.20 KB, created by
Vsevolod Stakhov
on 2005-02-27 16:30:24 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Vsevolod Stakhov
Created:
2005-02-27 16:30:24 UTC
Size:
1.20 KB
patch
obsolete
>--- /dev/null Fri Feb 25 18:33:00 2005 >+++ src/az_chmlib_add.c Fri Feb 25 18:29:45 2005 >@@ -0,0 +1,54 @@ >+#include <string.h> >+#include "chm_lib.h" >+ >+/* >+ * callback function for enumerate API >+ */ >+int _get_name(struct chmFile *h, >+ chmUnitInfo *ui, >+ void *context) >+{ >+ int i; >+ >+ >+ chm_dir *dirp = (chm_dir *)context; >+ >+ dirp->info=realloc(dirp->info,(dirp->nentries+1)*sizeof (char*)); >+ >+ dirp->info[dirp->nentries] = malloc(sizeof(ui->path)); >+ strcpy(dirp->info[dirp->nentries], ui->path); >+ >+ dirp->nentries++; >+ return CHM_ENUMERATOR_CONTINUE; >+} >+ >+chm_dir get_names(struct chmFile *h) >+//note: you should free() dir.info and all dir.info[i] in caller >+{ >+ chm_dir dir; >+ >+ dir.nentries=0; >+ dir.info = NULL; >+ >+ if (! chm_enumerate(h, >+ CHM_ENUMERATE_ALL, >+ _get_name, >+ (void *)&dir)) >+ printf(" *** ERROR ***\n"); >+ >+ return dir; >+} >+ >+ >+int main() >+{ >+ int i; >+ >+ struct chmFile *h = chm_open("/home/az/new/txt/chm/reg.chm"); >+ chm_dir dir=get_names(h); >+ for(i=0;i<dir.nentries;i++) >+ printf("%d: %s\n",i,dir.info[i]); >+ >+ return 0; >+} >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 78152
:
51457
|
51458
| 51459 |
51460
|
51461