aboutsummaryrefslogtreecommitdiffstats
path: root/exif.c
diff options
context:
space:
mode:
Diffstat (limited to 'exif.c')
-rw-r--r--exif.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/exif.c b/exif.c
index 5244028..ae2c2d1 100644
--- a/exif.c
+++ b/exif.c
@@ -1,19 +1,19 @@
-/* sxiv: exif.c
- * Copyright (c) 2012 Bert Muennich <be.muennich at googlemail.com>
+/* Copyright 2012 Bert Muennich
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
+ * This file is part of sxiv.
*
- * This program 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
- * General Public License for more details.
+ * sxiv is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
*
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * sxiv 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with sxiv. If not, see <http://www.gnu.org/licenses/>.
*/
#define _POSIX_C_SOURCE 200112L
@@ -26,7 +26,8 @@
#include "exif.h"
#include "util.h"
-ssize_t s_read(int fd, const char *fn, void *buf, size_t n) {
+ssize_t s_read(int fd, const char *fn, void *buf, size_t n)
+{
ssize_t ret;
ret = read(fd, buf, n);
@@ -38,7 +39,8 @@ ssize_t s_read(int fd, const char *fn, void *buf, size_t n) {
}
}
-unsigned short btous(unsigned char *buf, byteorder_t order) {
+unsigned short btous(unsigned char *buf, byteorder_t order)
+{
if (buf == NULL)
return 0;
if (order == BO_BIG_ENDIAN)
@@ -47,7 +49,8 @@ unsigned short btous(unsigned char *buf, byteorder_t order) {
return buf[1] << 8 | buf[0];
}
-unsigned int btoui(unsigned char *buf, byteorder_t order) {
+unsigned int btoui(unsigned char *buf, byteorder_t order)
+{
if (buf == NULL)
return 0;
if (order == BO_BIG_ENDIAN)
@@ -56,7 +59,8 @@ unsigned int btoui(unsigned char *buf, byteorder_t order) {
return buf[3] << 24 | buf[2] << 16 | buf[1] << 8 | buf[0];
}
-int exif_orientation(const fileinfo_t *file) {
+int exif_orientation(const fileinfo_t *file)
+{
int fd;
unsigned char data[EXIF_MAX_LEN];
byteorder_t order = BO_BIG_ENDIAN;