aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/file-gif.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2014-10-05 15:54:49 -0400
committerBill Meier <wmeier@newsguy.com>2014-10-05 20:18:30 +0000
commite2bdfa101b4a60318c9d7ba3dc3487418b5951b6 (patch)
treec7931e36ad0a85db5a68bf28ee732fe285f9e6a8 /epan/dissectors/file-gif.c
parent1e1d1deca5660572af0368137cf0f6d8588510cd (diff)
Reformat hfi entries; Add editor modelines; Adjust whitespace.
Change-Id: Iead53f92cc847d04c32f4a307d45f9748c49a69c Reviewed-on: https://code.wireshark.org/review/4483 Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'epan/dissectors/file-gif.c')
-rw-r--r--epan/dissectors/file-gif.c359
1 files changed, 186 insertions, 173 deletions
diff --git a/epan/dissectors/file-gif.c b/epan/dissectors/file-gif.c
index 6087e4940e..613405c4b8 100644
--- a/epan/dissectors/file-gif.c
+++ b/epan/dissectors/file-gif.c
@@ -92,211 +92,211 @@ static header_field_info *hfi_gif = NULL;
/* header fields */
/* GIF signature */
-static header_field_info hfi_version GIF_HFI_INIT =
- { "Version",
- IMG_GIF ".version",
- FT_STRING, BASE_NONE, NULL, 0x00,
- "GIF Version",
- HFILL
- };
+static header_field_info hfi_version GIF_HFI_INIT = {
+ "Version",
+ IMG_GIF ".version",
+ FT_STRING, BASE_NONE, NULL, 0x00,
+ "GIF Version",
+ HFILL
+};
/* Screen descriptor */
-static header_field_info hfi_screen_width GIF_HFI_INIT =
- { "Screen width",
- IMG_GIF ".screen.width",
- FT_UINT16, BASE_DEC, NULL, 0x00,
- NULL,
- HFILL
- };
+static header_field_info hfi_screen_width GIF_HFI_INIT = {
+ "Screen width",
+ IMG_GIF ".screen.width",
+ FT_UINT16, BASE_DEC, NULL, 0x00,
+ NULL,
+ HFILL
+};
-static header_field_info hfi_screen_height GIF_HFI_INIT =
- { "Screen height",
- IMG_GIF ".screen.height",
- FT_UINT16, BASE_DEC, NULL, 0x00,
- NULL,
- HFILL
- };
+static header_field_info hfi_screen_height GIF_HFI_INIT = {
+ "Screen height",
+ IMG_GIF ".screen.height",
+ FT_UINT16, BASE_DEC, NULL, 0x00,
+ NULL,
+ HFILL
+};
-static header_field_info hfi_global_color_map_present GIF_HFI_INIT =
- { "Global color map is present",
- IMG_GIF ".global.color_map.present",
- FT_UINT8, BASE_DEC, VALS(vals_true_false), 0x80,
- "Indicates if the global color map is present",
- HFILL
- };
+static header_field_info hfi_global_color_map_present GIF_HFI_INIT = {
+ "Global color map is present",
+ IMG_GIF ".global.color_map.present",
+ FT_UINT8, BASE_DEC, VALS(vals_true_false), 0x80,
+ "Indicates if the global color map is present",
+ HFILL
+};
-static header_field_info hfi_global_color_resolution GIF_HFI_INIT =
- { "Bits per color minus 1",
- IMG_GIF ".global.color_bpp",
- FT_UINT8, BASE_DEC, NULL, 0x70,
- "The number of bits per color is one plus the field value.",
- HFILL
- };
+static header_field_info hfi_global_color_resolution GIF_HFI_INIT = {
+ "Bits per color minus 1",
+ IMG_GIF ".global.color_bpp",
+ FT_UINT8, BASE_DEC, NULL, 0x70,
+ "The number of bits per color is one plus the field value.",
+ HFILL
+};
-static header_field_info hfi_global_color_map_ordered/* GIF89a */ GIF_HFI_INIT =
- { "Global color map is ordered",
- IMG_GIF ".global.color_map.ordered",
- FT_UINT8, BASE_DEC, VALS(vals_true_false), 0x08,
- "Indicates whether the global color map is ordered.",
- HFILL
- };
+static header_field_info hfi_global_color_map_ordered/* GIF89a */ GIF_HFI_INIT = {
+ "Global color map is ordered",
+ IMG_GIF ".global.color_map.ordered",
+ FT_UINT8, BASE_DEC, VALS(vals_true_false), 0x08,
+ "Indicates whether the global color map is ordered.",
+ HFILL
+};
-static header_field_info hfi_global_image_bpp GIF_HFI_INIT =
- { "Image bits per pixel minus 1",
- IMG_GIF ".global.bpp",
- FT_UINT8, BASE_DEC, NULL, 0x07,
- "The number of bits per pixel is one plus the field value.",
- HFILL
- };
+static header_field_info hfi_global_image_bpp GIF_HFI_INIT = {
+ "Image bits per pixel minus 1",
+ IMG_GIF ".global.bpp",
+ FT_UINT8, BASE_DEC, NULL, 0x07,
+ "The number of bits per pixel is one plus the field value.",
+ HFILL
+};
/* Only makes sense if the global color map is present: */
-static header_field_info hfi_background_color GIF_HFI_INIT =
- { "Background color index",
- IMG_GIF ".image_background_index",
- FT_UINT8, BASE_DEC, NULL, 0x00,
- "Index of the background color in the color map.",
- HFILL
- };
+static header_field_info hfi_background_color GIF_HFI_INIT = {
+ "Background color index",
+ IMG_GIF ".image_background_index",
+ FT_UINT8, BASE_DEC, NULL, 0x00,
+ "Index of the background color in the color map.",
+ HFILL
+};
-static header_field_info hfi_pixel_aspect_ratio/* GIF89a */ GIF_HFI_INIT =
- { "Global pixel aspect ratio",
- IMG_GIF ".global.pixel_aspect_ratio",
- FT_UINT8, BASE_DEC, NULL, 0x00,
- "Gives an approximate value of the aspect ratio of the pixels.",
- HFILL
- };
+static header_field_info hfi_pixel_aspect_ratio/* GIF89a */ GIF_HFI_INIT = {
+ "Global pixel aspect ratio",
+ IMG_GIF ".global.pixel_aspect_ratio",
+ FT_UINT8, BASE_DEC, NULL, 0x00,
+ "Gives an approximate value of the aspect ratio of the pixels.",
+ HFILL
+};
-static header_field_info hfi_global_color_map GIF_HFI_INIT =
- { "Global color map",
- IMG_GIF ".global.color_map",
- FT_BYTES, BASE_NONE, NULL, 0x00,
- "Global color map.",
- HFILL
- };
+static header_field_info hfi_global_color_map GIF_HFI_INIT = {
+ "Global color map",
+ IMG_GIF ".global.color_map",
+ FT_BYTES, BASE_NONE, NULL, 0x00,
+ "Global color map.",
+ HFILL
+};
/* Image descriptor */
-static header_field_info hfi_image_left GIF_HFI_INIT =
- { "Image left position",
- IMG_GIF ".image.left",
- FT_UINT16, BASE_DEC, NULL, 0x00,
- "Offset between left of Screen and left of Image.",
- HFILL
- };
+static header_field_info hfi_image_left GIF_HFI_INIT = {
+ "Image left position",
+ IMG_GIF ".image.left",
+ FT_UINT16, BASE_DEC, NULL, 0x00,
+ "Offset between left of Screen and left of Image.",
+ HFILL
+};
-static header_field_info hfi_image_top GIF_HFI_INIT =
- { "Image top position",
- IMG_GIF ".image.top",
- FT_UINT16, BASE_DEC, NULL, 0x00,
- "Offset between top of Screen and top of Image.",
- HFILL
- };
+static header_field_info hfi_image_top GIF_HFI_INIT = {
+ "Image top position",
+ IMG_GIF ".image.top",
+ FT_UINT16, BASE_DEC, NULL, 0x00,
+ "Offset between top of Screen and top of Image.",
+ HFILL
+};
-static header_field_info hfi_image_width GIF_HFI_INIT =
- { "Image width",
- IMG_GIF ".image.width",
- FT_UINT16, BASE_DEC, NULL, 0x00,
- "Image width.",
- HFILL
- };
+static header_field_info hfi_image_width GIF_HFI_INIT = {
+ "Image width",
+ IMG_GIF ".image.width",
+ FT_UINT16, BASE_DEC, NULL, 0x00,
+ "Image width.",
+ HFILL
+};
-static header_field_info hfi_image_height GIF_HFI_INIT =
- { "Image height",
- IMG_GIF ".image.height",
- FT_UINT16, BASE_DEC, NULL, 0x00,
- "Image height.",
- HFILL
- };
+static header_field_info hfi_image_height GIF_HFI_INIT = {
+ "Image height",
+ IMG_GIF ".image.height",
+ FT_UINT16, BASE_DEC, NULL, 0x00,
+ "Image height.",
+ HFILL
+};
-static header_field_info hfi_local_color_map_present GIF_HFI_INIT =
- { "Local color map is present",
- IMG_GIF ".local.color_map.present",
- FT_UINT8, BASE_DEC, VALS(vals_true_false), 0x80,
- "Indicates if the local color map is present",
- HFILL
- };
+static header_field_info hfi_local_color_map_present GIF_HFI_INIT = {
+ "Local color map is present",
+ IMG_GIF ".local.color_map.present",
+ FT_UINT8, BASE_DEC, VALS(vals_true_false), 0x80,
+ "Indicates if the local color map is present",
+ HFILL
+};
-static header_field_info hfi_local_color_resolution GIF_HFI_INIT =
- { "Bits per color minus 1",
- IMG_GIF ".local.color_bpp",
- FT_UINT8, BASE_DEC, NULL, 0x70,
- "The number of bits per color is one plus the field value.",
- HFILL
- };
+static header_field_info hfi_local_color_resolution GIF_HFI_INIT = {
+ "Bits per color minus 1",
+ IMG_GIF ".local.color_bpp",
+ FT_UINT8, BASE_DEC, NULL, 0x70,
+ "The number of bits per color is one plus the field value.",
+ HFILL
+};
-static header_field_info hfi_local_color_map_ordered/* GIF89a */ GIF_HFI_INIT =
- { "Local color map is ordered",
- IMG_GIF ".local.color_map.ordered",
- FT_UINT8, BASE_DEC, VALS(vals_true_false), 0x08,
- "Indicates whether the local color map is ordered.",
- HFILL
- };
+static header_field_info hfi_local_color_map_ordered/* GIF89a */ GIF_HFI_INIT = {
+ "Local color map is ordered",
+ IMG_GIF ".local.color_map.ordered",
+ FT_UINT8, BASE_DEC, VALS(vals_true_false), 0x08,
+ "Indicates whether the local color map is ordered.",
+ HFILL
+};
#if 0
-static header_field_info hfi_local_image_bpp GIF_HFI_INIT =
- { "Image bits per pixel minus 1",
- IMG_GIF ".local.bpp",
- FT_UINT8, BASE_DEC, NULL, 0x07,
- "The number of bits per pixel is one plus the field value.",
- HFILL
- };
+static header_field_info hfi_local_image_bpp GIF_HFI_INIT = {
+ "Image bits per pixel minus 1",
+ IMG_GIF ".local.bpp",
+ FT_UINT8, BASE_DEC, NULL, 0x07,
+ "The number of bits per pixel is one plus the field value.",
+ HFILL
+};
#endif
-static header_field_info hfi_local_color_map GIF_HFI_INIT =
- { "Local color map",
- IMG_GIF ".local.color_map",
- FT_BYTES, BASE_NONE, NULL, 0x00,
- "Local color map.",
- HFILL
- };
+static header_field_info hfi_local_color_map GIF_HFI_INIT = {
+ "Local color map",
+ IMG_GIF ".local.color_map",
+ FT_BYTES, BASE_NONE, NULL, 0x00,
+ "Local color map.",
+ HFILL
+};
/* Extension */
-static header_field_info hfi_extension GIF_HFI_INIT =
- { "Extension",
- IMG_GIF ".extension",
- FT_NONE, BASE_NONE, NULL, 0x00,
- "Extension.",
- HFILL
- };
+static header_field_info hfi_extension GIF_HFI_INIT = {
+ "Extension",
+ IMG_GIF ".extension",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ "Extension.",
+ HFILL
+};
-static header_field_info hfi_extension_label GIF_HFI_INIT =
- { "Extension label",
- IMG_GIF ".extension.label",
- FT_UINT8, BASE_HEX, VALS(vals_extensions), 0x00,
- "Extension label.",
- HFILL
- };
+static header_field_info hfi_extension_label GIF_HFI_INIT = {
+ "Extension label",
+ IMG_GIF ".extension.label",
+ FT_UINT8, BASE_HEX, VALS(vals_extensions), 0x00,
+ "Extension label.",
+ HFILL
+};
-static header_field_info hfi_image GIF_HFI_INIT =
- { "Image",
- IMG_GIF ".image",
- FT_NONE, BASE_NONE, NULL, 0x00,
- "Image.",
- HFILL
- };
+static header_field_info hfi_image GIF_HFI_INIT = {
+ "Image",
+ IMG_GIF ".image",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ "Image.",
+ HFILL
+};
-static header_field_info hfi_image_code_size GIF_HFI_INIT =
- { "LZW minimum code size",
- IMG_GIF ".image.code_size",
- FT_UINT8, BASE_DEC, NULL, 0x00,
- "Minimum code size for the LZW compression.",
- HFILL
- };
+static header_field_info hfi_image_code_size GIF_HFI_INIT = {
+ "LZW minimum code size",
+ IMG_GIF ".image.code_size",
+ FT_UINT8, BASE_DEC, NULL, 0x00,
+ "Minimum code size for the LZW compression.",
+ HFILL
+};
/* Trailer (end of GIF data stream) */
-static header_field_info hfi_trailer GIF_HFI_INIT =
- { "Trailer (End of the GIF stream)",
- IMG_GIF ".end",
- FT_NONE, BASE_NONE, NULL, 0x00,
- "This byte tells the decoder that the data stream is finished.",
- HFILL
- };
+static header_field_info hfi_trailer GIF_HFI_INIT = {
+ "Trailer (End of the GIF stream)",
+ IMG_GIF ".end",
+ FT_NONE, BASE_NONE, NULL, 0x00,
+ "This byte tells the decoder that the data stream is finished.",
+ HFILL
+};
-static header_field_info hfi_data_block GIF_HFI_INIT =
- { "Data block",
- IMG_GIF ".data_block",
- FT_BYTES, BASE_NONE, NULL, 0x00,
- NULL, HFILL };
+static header_field_info hfi_data_block GIF_HFI_INIT = {
+ "Data block",
+ IMG_GIF ".data_block",
+ FT_BYTES, BASE_NONE, NULL, 0x00,
+ NULL, HFILL };
/* Initialize the subtree pointers */
@@ -708,3 +708,16 @@ proto_reg_handoff_gif(void)
heur_dissector_add("http", dissect_gif_heur, hfi_gif->id);
heur_dissector_add("wtap_file", dissect_gif_heur, hfi_gif->id);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */