summaryrefslogtreecommitdiff
path: root/main/openssl/crypto/comp/c_rle.c
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2015-04-15 00:17:26 +0200
committerArne Schwabe <arne@rfc2549.org>2015-04-15 00:20:23 +0200
commitc3ae4aaac9f0b168aed063d3e86c5196608eaba1 (patch)
tree1a18e7d8751d4dd3682d82d12c8441b335112984 /main/openssl/crypto/comp/c_rle.c
parent5e42114d22faefe7c272b1b498fdf5640da494c7 (diff)
Move more to git, add submodules, fix build script, change hgignore to gitignore
Diffstat (limited to 'main/openssl/crypto/comp/c_rle.c')
m---------main/openssl0
-rw-r--r--main/openssl/crypto/comp/c_rle.c61
2 files changed, 0 insertions, 61 deletions
diff --git a/main/openssl b/main/openssl
new file mode 160000
+Subproject 4d377a9ce111930d8a8f06dc0e94a892a7f6c51
diff --git a/main/openssl/crypto/comp/c_rle.c b/main/openssl/crypto/comp/c_rle.c
deleted file mode 100644
index 47dfb67f..00000000
--- a/main/openssl/crypto/comp/c_rle.c
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <openssl/objects.h>
-#include <openssl/comp.h>
-
-static int rle_compress_block(COMP_CTX *ctx, unsigned char *out,
- unsigned int olen, unsigned char *in, unsigned int ilen);
-static int rle_expand_block(COMP_CTX *ctx, unsigned char *out,
- unsigned int olen, unsigned char *in, unsigned int ilen);
-
-static COMP_METHOD rle_method={
- NID_rle_compression,
- LN_rle_compression,
- NULL,
- NULL,
- rle_compress_block,
- rle_expand_block,
- NULL,
- NULL,
- };
-
-COMP_METHOD *COMP_rle(void)
- {
- return(&rle_method);
- }
-
-static int rle_compress_block(COMP_CTX *ctx, unsigned char *out,
- unsigned int olen, unsigned char *in, unsigned int ilen)
- {
- /* int i; */
-
- if (ilen == 0 || olen < (ilen-1))
- {
- /* ZZZZZZZZZZZZZZZZZZZZZZ */
- return(-1);
- }
-
- *(out++)=0;
- memcpy(out,in,ilen);
- return(ilen+1);
- }
-
-static int rle_expand_block(COMP_CTX *ctx, unsigned char *out,
- unsigned int olen, unsigned char *in, unsigned int ilen)
- {
- int i;
-
- if (olen < (ilen-1))
- {
- /* ZZZZZZZZZZZZZZZZZZZZZZ */
- return(-1);
- }
-
- i= *(in++);
- if (i == 0)
- {
- memcpy(out,in,ilen-1);
- }
- return(ilen-1);
- }