diff options
Diffstat (limited to 'packaging/generic/print-camera-list.c')
-rw-r--r-- | packaging/generic/print-camera-list.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/packaging/generic/print-camera-list.c b/packaging/generic/print-camera-list.c index 96cde9c29..48fd9572e 100644 --- a/packaging/generic/print-camera-list.c +++ b/packaging/generic/print-camera-list.c @@ -1157,20 +1157,20 @@ static int html_begin_func (const func_params_t *params, void **data) { FILE *f; char buf[512]; - int n; struct html_data *hd; printf("<!-- This part was generated by %s - - html -->\n", "libgphoto2 " ARGV0); print_version_comment(stdout, " | ", "\n", "<!--+\n", " +-->\n"); + printf("Number of supported cameras and media players: %d\n",params->number_of_cameras); printf("<table border=1>\n"); printf("<tr>\n"); printf(" <th>Camera Model</th>\n"); - printf(" <th>Abilities</th>\n"); + printf(" <th>Additional Abilities</th>\n"); printf(" <th>Comments</th>\n"); printf("</tr>\n"); - hd = malloc(sizeof(*hd)); + *data = hd = malloc(sizeof(*hd)); hd->nrofcomments = 0; hd->comments = NULL; @@ -1237,7 +1237,9 @@ html_camera_func ( void *data ) { char *m; - CameraOperation op = a->operations; + int j; + CameraOperation op = a->operations; + struct html_data *hd = data; if (a->device_type != GP_DEVICE_STILL_CAMERA) return 0; @@ -1274,7 +1276,13 @@ html_camera_func ( case GP_DRIVER_STATUS_DEPRECATED: printf("Deprecated"); break; } /* read comments */ - printf(" "); + for (j=0;j<hd->nrofcomments;j++) { + if (!strcmp(a->model,hd->comments[j].name)) { + printf("%s",hd->comments[j].comment); + break; + } + } + if (j == hd->nrofcomments) printf(" "); printf(" </td>"); printf("</tr>\n"); return 0; |