This is basically a continuation of the work from #1002 but her for the
camlibs directory. The purpose was to replace spaces as a means for
indentation with tab characters.
Note: there are some files which are still offending the general
rule but are (mostly) consistent within themselves. I let them be for
the moment. Fixing them would basically replace the whole file.
Also: there are still a ton of whitespace related inconsistencies like
"x=10" vs "x = 10" or "func(10)" vs "func (10)".
This is a whitespace only change (if you include newlines as whitespace).
Factor out the i18n definitions into i18n.h include files:
One include file each for libgphoto2 and for libgphoto2_port.
This removes the complete
#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (GETTEXT_PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define _(String) (String)
# define N_(String) (String)
#endif
block (which in some occasions defines even more macros)
and replaces it with a single line
#include "libgphoto2/i18n.h"
for camlibs and libgphoto2 itself and with
#include "libgphoto2_port/i18n.h"
for iolibs and libgphoto2_port itself.
This gives us two central locations to change the defintions.
The usleep() function is defined to be provided by unistd.h.
On Linux this is pulled in indirectly so the missing includes
don't cause build problems, but on Mingw32 the explicit include
of unistd.h is required. Since sleep() is not available on
Mingw32, #define it to usleep(). Remove some _POSIX_C_SOURCE
macros which restricted code to 1993 POSIX standard which
blocks use of usleep().
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14997 67ed7778-7388-44ab-90cf-0a291f65f57c
Many callers of strcpy/scanf/strcmp functions are passing a
'unsigned char *' rather than the 'char *' they expect.
Add explicit casts to silence the compiler.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14901 67ed7778-7388-44ab-90cf-0a291f65f57c
Many calls of gp_file_* functions are passing a 'unsigned char *'
rather than the 'char *' they expect. Add explicit casts to
silence the compiler.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14900 67ed7778-7388-44ab-90cf-0a291f65f57c
Many calls of gp_port_* functions are passing a 'unsigned char *'
rather than the 'char *' they expect. Add explicit casts to
silence the compiler.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14899 67ed7778-7388-44ab-90cf-0a291f65f57c
This moves the header files to a new subdirectory gphoto2 in both
libgphoto2 and libphoto2_port/libgphoto2. All references are
adapted appropriately.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9221 67ed7778-7388-44ab-90cf-0a291f65f57c
as arguments. Speeds up the download code for filelists, thumbnails and
deleting considerable (2 minutes instead of 2 hours in case of 32 MB
picture data). Also implemented the use of cfa thumbnails. Added a TODO list.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@5204 67ed7778-7388-44ab-90cf-0a291f65f57c
* camlibs/sierra/library.c: Remove some unnecessary casts, put in some
CHECKs
* camlibs/kodak/dc120/dc120.c:
* camlibs/kodak/dc210/library.c:
* camlibs/kodak/dc240/library.c: Use gp_file_* instead of directly
accessing the struct.
* libgphoto2/filesys.c: Remove lots of redundancy, always check if
folder has a trailing slash (and ignore it if this is the case).
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2065 67ed7778-7388-44ab-90cf-0a291f65f57c