1 /* Panorama_Tools	-	Generate, Edit and Convert Panoramic Images
2    Copyright (C) 1998,1999 - Helmut Dersch  der@fh-furtwangen.de
3 
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 2, or (at your option)
7    any later version.
8 
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13 
14    You should have received a copy of the GNU General Public License
15    along with this software; see the file COPYING.  If not, a copy
16    can be downloaded from http://www.gnu.org/licenses/gpl.html, or
17    obtained by writing to the Free Software Foundation, Inc.,
18    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
19 
20 /*------------------------------------------------------------*/
21 
22 #include "sys_compat.h"
23 #include <assert.h>
24 
25 #ifdef __APPLE__
26 #include <stdlib.h>
27 #endif
28 
panoTimeToStrWithTimeZone(char * sTime,int len,struct tm * time)29 int panoTimeToStrWithTimeZone(char *sTime, int len, struct tm  *time)
30 {
31     assert(len >= 11);
32     return strftime(sTime, len, "%H%M%S%z", time);
33 
34 }
35 
panoBasenameOfExecutable(void)36 char *panoBasenameOfExecutable(void)
37 {
38 #ifdef __APPLE__
39     return getprogname();
40 #else
41     extern char *__progname;
42     return __progname;
43 #endif
44 }
45