Reimport zip into third party

This commit is contained in:
Justine Tunney 2022-10-16 13:39:41 -07:00
parent 60cb435cb4
commit 648bf6555c
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
22 changed files with 1555 additions and 569 deletions

View file

@ -1,9 +1,4 @@
/* clang-format off */
#define ZCRYPT_INTERNAL
#include "third_party/zip/zip.h"
#include "third_party/zip/crypt.h"
#include "third_party/zip/ttyio.h"
#include "libc/stdio/rand.h"
// clang-format off
/*
Copyright (c) 1990-2008 Info-ZIP. All rights reserved.
@ -35,6 +30,11 @@
version without encryption capabilities).
*/
#define ZCRYPT_INTERNAL
#include "third_party/zip/zip.h"
#include "third_party/zip/crypt.h"
#include "third_party/zip/ttyio.h"
#if CRYPT
#ifndef FALSE
@ -75,7 +75,14 @@
as a fallback to allow successful compilation in "beta state"
environments.
*/
#include "libc/time/time.h" /* time() function supplies first part of crypt seed */
#include "libc/calls/struct/timespec.h"
#include "libc/calls/struct/timeval.h"
#include "libc/calls/weirdtypes.h"
#include "libc/sysv/consts/clock.h"
#include "libc/sysv/consts/sched.h"
#include "libc/sysv/consts/timer.h"
#include "libc/time/struct/tm.h"
#include "libc/time/time.h" /* time() function supplies first part of crypt seed */
/* "last resort" source for second part of crypt seed pattern */
# ifndef ZCR_SEED2
# define ZCR_SEED2 (unsigned)3141592654L /* use PI as default pattern */