summaryrefslogtreecommitdiffstats
path: root/plzip.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:29:08 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:29:08 +0000
commitebfebbfb4b77fa42f84e07b6fe671c56cdd12a35 (patch)
treea55e5d8f3b0da9372f59932cbd3079309a55fecc /plzip.h
parentAdding upstream version 0.8. (diff)
downloadplzip-ebfebbfb4b77fa42f84e07b6fe671c56cdd12a35.tar.xz
plzip-ebfebbfb4b77fa42f84e07b6fe671c56cdd12a35.zip
Adding upstream version 0.9.upstream/0.9
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r--plzip.h66
1 files changed, 38 insertions, 28 deletions
diff --git a/plzip.h b/plzip.h
index b12bbbd..f9aed10 100644
--- a/plzip.h
+++ b/plzip.h
@@ -16,6 +16,17 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef LLONG_MAX
+#define LLONG_MAX 0x7FFFFFFFFFFFFFFFLL
+#endif
+#ifndef LLONG_MIN
+#define LLONG_MIN (-LLONG_MAX - 1LL)
+#endif
+#ifndef ULLONG_MAX
+#define ULLONG_MAX 0xFFFFFFFFFFFFFFFFULL
+#endif
+
+
class Pretty_print
{
const char * const stdin_name;
@@ -44,14 +55,16 @@ public:
first_post = true;
}
- void reset() const throw() { if( name_.size() ) first_post = true; }
- const char * name() const throw() { return name_.c_str(); }
- void operator()( const char * const msg = 0 ) const throw();
+ void reset() const { if( name_.size() ) first_post = true; }
+ const char * name() const { return name_.c_str(); }
+ void operator()( const char * const msg = 0 ) const;
};
/*--------------------- Defined in compress.cc ---------------------*/
+int readblock( const int fd, uint8_t * const buf, const int size );
+int writeblock( const int fd, const uint8_t * const buf, const int size );
void xinit( pthread_mutex_t * const mutex );
void xinit( pthread_cond_t * const cond );
void xdestroy( pthread_mutex_t * const mutex );
@@ -62,6 +75,28 @@ void xwait( pthread_cond_t * const cond, pthread_mutex_t * const mutex );
void xsignal( pthread_cond_t * const cond );
void xbroadcast( pthread_cond_t * const cond );
+int compress( const int data_size, const int dictionary_size,
+ const int match_len_limit, const int num_workers,
+ const int infd, const int outfd,
+ const Pretty_print & pp, const int debug_level );
+
+
+/*-------------------- Defined in decompress.cc --------------------*/
+
+int decompress( const int num_workers, const int infd, const int outfd,
+ const Pretty_print & pp, const int debug_level,
+ const bool testing );
+
+
+/*----------------------- Defined in main.cc -----------------------*/
+
+extern int verbosity;
+
+void fatal(); // terminate the program
+
+void show_error( const char * const msg, const int errcode = 0, const bool help = false );
+void internal_error( const char * const msg );
+
class Slot_tally
{
@@ -104,28 +139,3 @@ public:
xunlock( &mutex );
}
};
-
-
-int compress( const int data_size, const int dictionary_size,
- const int match_len_limit, const int num_workers,
- const int infd, const int outfd,
- const Pretty_print & pp, const int debug_level );
-
-
-/*-------------------- Defined in decompress.cc --------------------*/
-
-int decompress( const int num_workers, const int infd, const int outfd,
- const Pretty_print & pp, const int debug_level,
- const bool testing );
-
-
-/*----------------------- Defined in main.cc -----------------------*/
-
-extern int verbosity;
-
-void fatal(); // terminate the program
-
-void show_error( const char * const msg, const int errcode = 0, const bool help = false ) throw();
-void internal_error( const char * const msg ) throw();
-int readblock( const int fd, uint8_t * const buf, const int size ) throw();
-int writeblock( const int fd, const uint8_t * const buf, const int size ) throw();