mdXhl.c (7e546392b5fe3a496acff53ac7aadd1c57b2a4cf) mdXhl.c (f778764443157b925d5c04050d2627cf0279606a)
1/* mdXhl.c
2 * ----------------------------------------------------------------------------
3 * "THE BEER-WARE LICENSE" (Revision 42):
4 * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
5 * can do whatever you want with this stuff. If we meet some day, and you think
6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 * ----------------------------------------------------------------------------
8 *
1/* mdXhl.c
2 * ----------------------------------------------------------------------------
3 * "THE BEER-WARE LICENSE" (Revision 42):
4 * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
5 * can do whatever you want with this stuff. If we meet some day, and you think
6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 * ----------------------------------------------------------------------------
8 *
9 * $Id$
9 * $Id: mdXhl.c,v 1.10 1997/02/22 15:07:23 peter Exp $
10 *
11 */
12
13#include <sys/types.h>
14#include <fcntl.h>
15#include <unistd.h>
16
17#include <errno.h>

--- 18 unchanged lines hidden (view full) ---

36 buf[i+i] = hex[digest[i] >> 4];
37 buf[i+i+1] = hex[digest[i] & 0x0f];
38 }
39 buf[i+i] = '\0';
40 return buf;
41}
42
43char *
10 *
11 */
12
13#include <sys/types.h>
14#include <fcntl.h>
15#include <unistd.h>
16
17#include <errno.h>

--- 18 unchanged lines hidden (view full) ---

36 buf[i+i] = hex[digest[i] >> 4];
37 buf[i+i+1] = hex[digest[i] & 0x0f];
38 }
39 buf[i+i] = '\0';
40 return buf;
41}
42
43char *
44MDXFile (char *filename, char *buf)
44MDXFile (const char *filename, char *buf)
45{
46 unsigned char buffer[BUFSIZ];
47 MDX_CTX ctx;
48 int f,i,j;
49
50 MDXInit(&ctx);
51 f = open(filename,O_RDONLY);
52 if (f < 0) return 0;

--- 19 unchanged lines hidden ---
45{
46 unsigned char buffer[BUFSIZ];
47 MDX_CTX ctx;
48 int f,i,j;
49
50 MDXInit(&ctx);
51 f = open(filename,O_RDONLY);
52 if (f < 0) return 0;

--- 19 unchanged lines hidden ---