From: robertlipe Date: Sun, 18 Jan 2015 21:43:14 +0000 (+0000) Subject: Move pdbfile to deprecated. Drop uuid.h. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~10^2~62 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0efa42991b708e8d6955992dab0a5fd2bae3070d;p=gpsbabel.git Move pdbfile to deprecated. Drop uuid.h. --- diff --git a/gpsbabel/GPSBabel.pro b/gpsbabel/GPSBabel.pro index b2ef817eb..6596b81bf 100644 --- a/gpsbabel/GPSBabel.pro +++ b/gpsbabel/GPSBabel.pro @@ -226,7 +226,6 @@ HEADERS = \ session.h \ shapelib/shapefil.h \ strptime.h \ - uuid.h \ xmlgeneric.h \ zlib/crc32.h \ zlib/deflate.h \ diff --git a/gpsbabel/deprecated/pdbfile.h b/gpsbabel/deprecated/pdbfile.h new file mode 100644 index 000000000..e382b825f --- /dev/null +++ b/gpsbabel/deprecated/pdbfile.h @@ -0,0 +1,83 @@ +/* + + Minimum support for Palm/OS database files + Copyright (C) 2007 Olaf Klein, o.b.klein@gpsbabel.org + + Written after study the Coldsync project + + 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 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. + + 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., 59 Temple Place - Suite 330, Boston, MA 02111 USA + + */ + +#ifndef PDBFILE_H +#define PDBFILE_H + +#include "defs.h" + +#if PDBFMTS_ENABLED + +#include "gbfile.h" + +#include + +#define PDB_DBNAMELEN 32 +#define PDB_FLAG_RESOURCE 0x0001 +#define PDB_FLAG_BACKUP 0x0008 +#define EPOCH_1904 2082844800L + +typedef struct pdbrec_s { + uint32_t offs; + int32_t size; + uint32_t id; + uint8_t category; + uint8_t flags; + char* data; + struct pdbrec_s* next; +} pdbrec_t; + +typedef struct { + gbfile* file; + char mode; /* file-mode: 1 = read / 2 = write */ + char name[PDB_DBNAMELEN + 1]; /* database name */ + uint16_t attr; /* attributes */ + uint16_t version; /* version */ + time_t ctime; /* creation time */ + time_t mtime; /* modification time */ + time_t btime; /* backup time */ + uint32_t revision; + int32_t appinfo_offs; /* offset to application info */ + int32_t index_offs; /* offset to sort-index info */ + uint32_t creator; + uint32_t type; + uint32_t uid; + uint16_t rec_ct; + struct pdbrec_s* rec_list; + struct pdbrec_s* rec_curr; + void* appinfo; + int appinfo_len; +} pdbfile; + + +pdbfile* pdb_open(const char* filename, const char* module); +pdbfile* pdb_create(const char* filename, const char* module); +void pdb_close(pdbfile* file); +int pdb_eof(pdbfile* fin); +void pdb_rewind(pdbfile* fin); +int pdb_read_rec(pdbfile* fin, uint8_t* flags, uint8_t* category, uint32_t* rec_id, void** data); +int pdb_read_rec_by_id(pdbfile* fin, const uint32_t rec_id, uint8_t* flags, uint8_t* category, void** data); +void pdb_write_rec(pdbfile* fout, const uint8_t flags, const uint8_t category, const uint32_t rec_id, const void* data, const uint32_t size); + +#endif +#endif diff --git a/gpsbabel/msvc/GPSBabel.vcxproj b/gpsbabel/msvc/GPSBabel.vcxproj index 0832596d3..f5013d704 100644 --- a/gpsbabel/msvc/GPSBabel.vcxproj +++ b/gpsbabel/msvc/GPSBabel.vcxproj @@ -255,7 +255,6 @@ - @@ -333,7 +332,6 @@ - diff --git a/gpsbabel/pdbfile.h b/gpsbabel/pdbfile.h deleted file mode 100644 index e382b825f..000000000 --- a/gpsbabel/pdbfile.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - - Minimum support for Palm/OS database files - Copyright (C) 2007 Olaf Klein, o.b.klein@gpsbabel.org - - Written after study the Coldsync project - - 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 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. - - 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., 59 Temple Place - Suite 330, Boston, MA 02111 USA - - */ - -#ifndef PDBFILE_H -#define PDBFILE_H - -#include "defs.h" - -#if PDBFMTS_ENABLED - -#include "gbfile.h" - -#include - -#define PDB_DBNAMELEN 32 -#define PDB_FLAG_RESOURCE 0x0001 -#define PDB_FLAG_BACKUP 0x0008 -#define EPOCH_1904 2082844800L - -typedef struct pdbrec_s { - uint32_t offs; - int32_t size; - uint32_t id; - uint8_t category; - uint8_t flags; - char* data; - struct pdbrec_s* next; -} pdbrec_t; - -typedef struct { - gbfile* file; - char mode; /* file-mode: 1 = read / 2 = write */ - char name[PDB_DBNAMELEN + 1]; /* database name */ - uint16_t attr; /* attributes */ - uint16_t version; /* version */ - time_t ctime; /* creation time */ - time_t mtime; /* modification time */ - time_t btime; /* backup time */ - uint32_t revision; - int32_t appinfo_offs; /* offset to application info */ - int32_t index_offs; /* offset to sort-index info */ - uint32_t creator; - uint32_t type; - uint32_t uid; - uint16_t rec_ct; - struct pdbrec_s* rec_list; - struct pdbrec_s* rec_curr; - void* appinfo; - int appinfo_len; -} pdbfile; - - -pdbfile* pdb_open(const char* filename, const char* module); -pdbfile* pdb_create(const char* filename, const char* module); -void pdb_close(pdbfile* file); -int pdb_eof(pdbfile* fin); -void pdb_rewind(pdbfile* fin); -int pdb_read_rec(pdbfile* fin, uint8_t* flags, uint8_t* category, uint32_t* rec_id, void** data); -int pdb_read_rec_by_id(pdbfile* fin, const uint32_t rec_id, uint8_t* flags, uint8_t* category, void** data); -void pdb_write_rec(pdbfile* fout, const uint8_t flags, const uint8_t category, const uint32_t rec_id, const void* data, const uint32_t size); - -#endif -#endif diff --git a/gpsbabel/uuid.h b/gpsbabel/uuid.h deleted file mode 100644 index 161b89e91..000000000 --- a/gpsbabel/uuid.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - Copyright (C) 2004 Justin Broughton, justinbr@earthlink.net - - 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 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. - - 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., 59 Temple Place - Suite 330, Boston, MA 02111 USA - - */ - -typedef unsigned char uuid_t[16]; - -void gb_uuid_generate(uuid_t uu);