From ac36f4ee4802b941092ae6c605dc19eb0e58fe5e Mon Sep 17 00:00:00 2001 From: Nickolay Olshevsky Date: Mon, 4 Dec 2023 17:53:24 +0200 Subject: [PATCH] Remove no longer used code from src-common. --- src/librepgp/stream-common.cpp | 66 ---------------------------------- src/librepgp/stream-common.h | 33 ----------------- 2 files changed, 99 deletions(-) diff --git a/src/librepgp/stream-common.cpp b/src/librepgp/stream-common.cpp index a4ad182868..db820378b0 100644 --- a/src/librepgp/stream-common.cpp +++ b/src/librepgp/stream-common.cpp @@ -136,12 +136,6 @@ pgp_source_t::read(void *buf, size_t len, size_t *readres) return true; } -bool -src_read(pgp_source_t *src, void *buf, size_t len, size_t *readres) -{ - return src->read(buf, len, readres); -} - bool pgp_source_t::read_eq(void *buf, size_t len) { @@ -149,12 +143,6 @@ pgp_source_t::read_eq(void *buf, size_t len) return read(buf, len, &res) && (res == len); } -bool -src_read_eq(pgp_source_t *src, void *buf, size_t len) -{ - return src->read_eq(buf, len); -} - bool pgp_source_t::peek(void *buf, size_t len, size_t *peeked) { @@ -219,12 +207,6 @@ pgp_source_t::peek(void *buf, size_t len, size_t *peeked) return false; } -bool -src_peek(pgp_source_t *src, void *buf, size_t len, size_t *peeked) -{ - return src->peek(buf, len, peeked); -} - bool pgp_source_t::peek_eq(void *buf, size_t len) { @@ -232,12 +214,6 @@ pgp_source_t::peek_eq(void *buf, size_t len) return peek(buf, len, &res) && (res == len); } -bool -src_peek_eq(pgp_source_t *src, void *buf, size_t len) -{ - return src->peek_eq(buf, len); -} - void pgp_source_t::skip(size_t len) { @@ -272,36 +248,18 @@ pgp_source_t::skip(size_t len) free(buf); } -void -src_skip(pgp_source_t *src, size_t len) -{ - src->skip(len); -} - rnp_result_t pgp_source_t::finish() { return raw_finish ? raw_finish(this) : RNP_SUCCESS; } -rnp_result_t -src_finish(pgp_source_t *src) -{ - return src->finish(); -} - bool pgp_source_t::error() const { return error_; } -bool -src_error(const pgp_source_t *src) -{ - return src->error(); -} - bool pgp_source_t::eof() { @@ -314,12 +272,6 @@ pgp_source_t::eof() return peek(&check, 1, &read) && (read == 0); } -bool -src_eof(pgp_source_t *src) -{ - return src->eof(); -} - void pgp_source_t::close() { @@ -333,12 +285,6 @@ pgp_source_t::close() } } -void -src_close(pgp_source_t *src) -{ - src->close(); -} - bool pgp_source_t::skip_eol() { @@ -359,12 +305,6 @@ pgp_source_t::skip_eol() return false; } -bool -src_skip_eol(pgp_source_t *src) -{ - return src->skip_eol(); -} - bool pgp_source_t::peek_line(char *buf, size_t len, size_t *readres) { @@ -400,12 +340,6 @@ pgp_source_t::peek_line(char *buf, size_t len, size_t *readres) return false; } -bool -src_peek_line(pgp_source_t *src, char *buf, size_t len, size_t *readres) -{ - return src->peek_line(buf, len, readres); -} - bool init_src_common(pgp_source_t *src, size_t paramsize) { diff --git a/src/librepgp/stream-common.h b/src/librepgp/stream-common.h index e6cd4baa13..835822417e 100644 --- a/src/librepgp/stream-common.h +++ b/src/librepgp/stream-common.h @@ -193,39 +193,6 @@ typedef struct pgp_source_t { **/ bool init_src_common(pgp_source_t *src, size_t paramsize); -/** @brief To be removed once codebase is refactored to use pgp_source_t methods. */ -bool src_read(pgp_source_t *src, void *buf, size_t len, size_t *read); - -/** @brief To be removed once codebase is refactored to use pgp_source_t methods. */ -bool src_read_eq(pgp_source_t *src, void *buf, size_t len); - -/** @brief To be removed once codebase is refactored to use pgp_source_t methods. */ -bool src_peek(pgp_source_t *src, void *buf, size_t len, size_t *read); - -/** @brief To be removed once codebase is refactored to use pgp_source_t methods. */ -bool src_peek_eq(pgp_source_t *src, void *buf, size_t len); - -/** @brief To be removed once codebase is refactored to use pgp_source_t methods. */ -void src_skip(pgp_source_t *src, size_t len); - -/** @brief To be removed once codebase is refactored to use pgp_source_t methods. */ -rnp_result_t src_finish(pgp_source_t *src); - -/** @brief To be removed once codebase is refactored to use pgp_source_t methods. */ -bool src_error(const pgp_source_t *src); - -/** @brief To be removed once codebase is refactored to use pgp_source_t methods. */ -bool src_eof(pgp_source_t *src); - -/** @brief To be removed once codebase is refactored to use pgp_source_t methods. */ -void src_close(pgp_source_t *src); - -/** @brief To be removed once codebase is refactored to use pgp_source_t methods. */ -bool src_skip_eol(pgp_source_t *src); - -/** @brief To be removed once codebase is refactored to use pgp_source_t methods. */ -bool src_peek_line(pgp_source_t *src, char *buf, size_t len, size_t *read); - /** @brief init file source * @param src pre-allocated source structure * @param path path to the file