summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2013-05-18 14:49:19 +0000
committerMarcus Meissner <marcus@jet.franken.de>2013-05-18 14:49:19 +0000
commitf9caff7c2af6e3e93a0dd63e0a9d802c69b7f64d (patch)
tree8f0763271e1abc9921c27e0d50f4bfd9fc2bb83e /packaging
parentd4c89d8688a30275e6273c30b5368a2f9248a2b9 (diff)
downloadlibgphoto2-f9caff7c2af6e3e93a0dd63e0a9d802c69b7f64d.tar.gz
updated to write differently and also read comments
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14421 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'packaging')
-rw-r--r--packaging/generic/print-camera-list.c18
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(" &nbsp;");
+ 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(" &nbsp;");
printf(" </td>");
printf("</tr>\n");
return 0;