diff options
author | Nathan Stenzel <nathanstenzel@users.sourceforge.net> | 2001-09-13 13:42:15 +0000 |
---|---|---|
committer | Nathan Stenzel <nathanstenzel@users.sourceforge.net> | 2001-09-13 13:42:15 +0000 |
commit | 1bad288574bffc933fba06ac4333e2e4d2a4d52a (patch) | |
tree | 6d3f24bc305dfd7d5cce7a699b534bd890c59845 /libgphoto2 | |
parent | 2dc34461a6154924b87a101280d311c498497aab (diff) | |
download | libgphoto2-1bad288574bffc933fba06ac4333e2e4d2a4d52a.tar.gz |
Added GPL lines.
Some format fixes.
Still need to use "typdef struct" instead of "struct".
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2244 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2')
-rw-r--r-- | libgphoto2/jpeg.c | 26 | ||||
-rw-r--r-- | libgphoto2/jpeg.h | 43 |
2 files changed, 55 insertions, 14 deletions
diff --git a/libgphoto2/jpeg.c b/libgphoto2/jpeg.c index 667384b8d..b824ff4aa 100644 --- a/libgphoto2/jpeg.c +++ b/libgphoto2/jpeg.c @@ -1,5 +1,21 @@ -/* This code was written by Nathan Stenzel for gphoto */ -/* GPL */ +/* jpeg.c + * This code was written by Nathan Stenzel for gphoto + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ #include <stdio.h> #include "jpeg.h" @@ -82,12 +98,12 @@ char *jpeg_markername(int c) int x; // printf("searching for marker %X in list\n",c); // printf("%i\n", sizeof(markers)); - for (x=0; x<sizeof(markers); x++) + for (x=0; x<sizeof(JPEG_MARKERS); x++) { // printf("checking to see if it is marker %X\n", markers[x]); - if (c==markers[x]) - return (char *)markernames[x]; + if (c==JPEG_MARKERS[x]) + return (char *)JPEG_MARKERNAMES[x]; } return "Undefined marker"; } diff --git a/libgphoto2/jpeg.h b/libgphoto2/jpeg.h index 609260842..e70611123 100644 --- a/libgphoto2/jpeg.h +++ b/libgphoto2/jpeg.h @@ -1,14 +1,37 @@ -/* This code was written by Nathan Stenzel for gphoto */ -/* GPL */ - -enum jpegmarker {start=0xD8, APPO=0xE0, quantization=0xDB, huffman=0xC4, SsSeAhAl=0xDA, SOFC0=0xC0}; +/* jpeg.h + * This code was written by Nathan Stenzel for gphoto + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GPHOTO2_JPEG_H__ +enum jpegmarker { + JPEG_START=0xD8, JPEG_APPO=0xE0, JPEG_QUANTIZATION=0xDB, + JPEG_HUFFMAN=0xC4, JPEG_SSSEAHAL=0xDA, JPEG_SOFC0=0xC0 +}; -const markers[] = { - start, APPO, quantization, huffman, SsSeAhAl, SOFC0 +const JPEG_MARKERS[] = { + JPEG_START, JPEG_APPO, JPEG_QUANTIZATION, + JPEG_HUFFMAN, JPEG_SSSEAHAL, JPEG_SOFC0 }; -const char *markernames[] = { - "Start", "APPO", "Quantization table", "Huffman table", "SsSeAhAl", "SOFC0" }; +const char *JPEG_MARKERNAMES[] = { + "Start", "APPO", "Quantization table", + "Huffman table", "SsSeAhAl", "SOFC0" +}; struct chunk{ int size; @@ -40,4 +63,6 @@ void jpeg_parse(struct jpeg *myjpeg, struct chunk *picture); void jpeg_print(struct jpeg *myjpeg); -char *jpeg_markername(int c);
\ No newline at end of file +char *jpeg_markername(int c); + +#endif |