Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

Commit

Permalink
js-dos.com (api for em-dosbox), changes:
Browse files Browse the repository at this point in the history
* add --memory-init-file 0 to linker flags
* add js-dos cmake project
* digger.test
* dosbox api
* nice ui
* fullscreen support
* zlib extraction
* Document some code
* Migrate to literate coffeescript
* Fix gulpfile.js (add task sequence)
* Add coffeelint task
* Add docco, fix documentation
  • Loading branch information
caiiiycuk committed Sep 20, 2017
1 parent d2e4a49 commit ebd0ca5
Show file tree
Hide file tree
Showing 671 changed files with 140,458 additions and 2 deletions.
118 changes: 118 additions & 0 deletions js-dos/3rd-party/libzip-0.11.2/API-CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
* libzip API changes

This file describes changes in the libzip API and how to adapt your
code for them.

You can define ZIP_DISABLE_DEPRECATED before including <zip.h> to hide
prototypes for deprecated functions, to find out about functions that
might be removed at some point.

* 0.11

** new type zip_flags_t

The functions which have flags now use the zip_flags_t type for this.
All old flags fit; you need code only to adapt if you were saving flags in a
local variable. Use zip_flags_t for such a variable.
This affects:
zip_fopen()
zip_fopen_encrypted()
zip_fopen_index()
zip_fopen_index_encrypted()
zip_get_archive_comment()
zip_get_archive_flag()
zip_get_num_entries()
zip_get_name()
zip_name_locate()
zip_set_archive_flag()
zip_source_zip()
zip_stat()
zip_stat_index()

*** ZIP_FL_*, ZIP_AFL_*, ZIP_STAT_* are now unsigned constants

To match the new zip_flags_t type.

*** zip_add(), zip_add_dir()

These functions were replaced with zip_file_add() and zip_dir_add(), respectively,
to add a flags argument.

*** zip_rename(), zip_replace()

These functions were replaced with zip_file_rename() and zip_file_replace(),
respectively, to add a flags argument.

*** zip_get_file_comment()

This function was replaced with zip_file_get_comment(); one argument was promoted from
int to zip_uint32_t, the other is now a zip_flags_t.

*** zip_set_file_comment()

This function was replaced with zip_file_set_comment(); an argument was promoted from
int to zip_uint16_t, and a zip_flags_t argument was added.

** integer type size changes

Some argument and return values were not the right size or sign.

*** zip_name_locate()

The return value was int, which can be too small. The function now returns zip_int64_t.


*** zip_get_num_entries()

The return type is now signed, to allow signaling errors.

*** zip_set_archive_comment()

The last argument changed from int to zip_uint16_t.

** extra field handling rewritten

The zip_get_file_extra() and zip_set_file_extra() functions were removed.
They only worked on the whole extra field set.

Instead, you can now set, get, count, and delete each extra field separately,
using the functions:
zip_file_extra_field_delete()
zip_file_extra_field_delete_by_id()
zip_file_extra_field_get()
zip_file_extra_field_get_by_id()
zip_file_extra_fields_count()
zip_file_extra_fields_count_by_id()
zip_file_extra_field_set()
Please read the corresponding man pages for details.

** new functions

*** zip_discard()

The new zip_discard() function closes an archive without committing the
scheduled changes.

*** zip_set_file_compression()

The new zip_set_file_compression() function allows setting compression
levels for files.

** argument changes

*** file names

File names arguments are now allowed to be NULL to have an empty file name.
This mostly affects zip_file_add(), zip_dir_add(), and zip_file_rename().

For zip_get_name(), zip_file_get_comment(), and zip_get_archive_comment(), if
the file name or comment is empty, a string of length 0 is returned.
NULL is returned for errors only.

Previously, NULL was returned for empty/unset file names and comments and
errors, leaving no way to differentiate between the two.

/* Local Variables: */
/* mode: org */
/* End: */

2 changes: 2 additions & 0 deletions js-dos/3rd-party/libzip-0.11.2/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Dieter Baron <[email protected]>
Thomas Klausner <[email protected]>
151 changes: 151 additions & 0 deletions js-dos/3rd-party/libzip-0.11.2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# TODO:
# 1. pkgconfig file not yet built.
# 2. installation not tested.
# 3. Problems generating html pages.
# 4. distribution tarball not checked for unwanted/missing content.
# 5. create usable libtool .la file

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(libzip C)

INCLUDE(CheckFunctionExists)
INCLUDE(CheckIncludeFiles)
INCLUDE(CheckSymbolExists)
INCLUDE(CheckTypeSize)
INCLUDE(CheckCSourceRuns)
INCLUDE(CheckCSourceCompiles)
INCLUDE(CheckStructHasMember)

SET(PACKAGE "libzip")
SET(PACKAGE_NAME ${PACKAGE})
SET(PACKAGE_VERSION_MAJOR "0")
SET(PACKAGE_VERSION_MINOR "11")
SET(PACKAGE_VERSION_PATCH "2")
SET(VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
SET(PACKAGE_VERSION ${VERSION})
SET(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")

# Checks

CHECK_FUNCTION_EXISTS(_close HAVE__CLOSE)
CHECK_FUNCTION_EXISTS(_dup HAVE__DUP)
CHECK_FUNCTION_EXISTS(_fdopen HAVE__FDOPEN)
CHECK_FUNCTION_EXISTS(_fileno HAVE__FILENO)
CHECK_FUNCTION_EXISTS(_open HAVE__OPEN)
CHECK_FUNCTION_EXISTS(_snprintf HAVE__SNPRINTF)
CHECK_FUNCTION_EXISTS(_strdup HAVE__STRDUP)
CHECK_FUNCTION_EXISTS(_stricmp HAVE__STRICMP)
CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO)
CHECK_FUNCTION_EXISTS(ftello HAVE_FTELLO)
CHECK_FUNCTION_EXISTS(open HAVE_OPEN)
CHECK_FUNCTION_EXISTS(mkstemp HAVE_MKSTEMP)
CHECK_FUNCTION_EXISTS(snprintf HAVE_SNPRINTF)
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
CHECK_FUNCTION_EXISTS(strdup HAVE_STRDUP)

CHECK_STRUCT_HAS_MEMBER("struct tm" tm_zone time.h HAVE_STRUCT_TM_TM_ZONE)

CHECK_SYMBOL_EXISTS(MoveFileExA windows.h HAVE_MOVEFILEEXA)

CHECK_INCLUDE_FILES(strings.h HAVE_STRINGS_H)
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)

CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H_LIBZIP)
CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H_LIBZIP)
CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H_LIBZIP)

CHECK_TYPE_SIZE(__int8 __INT8_LIBZIP)
CHECK_TYPE_SIZE(int8_t INT8_T_LIBZIP)
CHECK_TYPE_SIZE(uint8_t UINT8_T_LIBZIP)
CHECK_TYPE_SIZE(__int16 __INT16_LIBZIP)
CHECK_TYPE_SIZE(int16_t INT16_T_LIBZIP)
CHECK_TYPE_SIZE(uint16_t UINT16_T_LIBZIP)
CHECK_TYPE_SIZE(__int32 __INT32_LIBZIP)
CHECK_TYPE_SIZE(int32_t INT32_T_LIBZIP)
CHECK_TYPE_SIZE(uint32_t UINT32_T_LIBZIP)
CHECK_TYPE_SIZE(__int64 __INT64_LIBZIP)
CHECK_TYPE_SIZE(int64_t INT64_T_LIBZIP)
CHECK_TYPE_SIZE(uint64_t UINT64_T_LIBZIP)
CHECK_TYPE_SIZE("short" SHORT_LIBZIP)
CHECK_TYPE_SIZE("int" INT_LIBZIP)
CHECK_TYPE_SIZE("long" LONG_LIBZIP)
CHECK_TYPE_SIZE("long long" LONG_LONG_LIBZIP)
CHECK_TYPE_SIZE("off_t" SIZEOF_OFF_T)
CHECK_TYPE_SIZE("size_t" SIZE_T_LIBZIP)
CHECK_TYPE_SIZE("ssize_t" SSIZE_T_LIBZIP)

FIND_PACKAGE(ZLIB REQUIRED)
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
set(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
IF(ZLIB_VERSION_STRING VERSION_LESS "1.1.2")
MESSAGE(FATAL_ERROR "-- ZLIB version too old, please install at least v1.1.2")
ENDIF(ZLIB_VERSION_STRING VERSION_LESS "1.1.2")

IF(MSVC)
ADD_DEFINITIONS("-D_CRT_SECURE_NO_WARNINGS")
ENDIF(MSVC)

# Targets
ADD_SUBDIRECTORY(lib)
ADD_SUBDIRECTORY(man)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(regress)


# TODO: pkgconfig file

# installation

# TODO: pkgconfig file

# packaging

SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "library for manipulating zip archives")
SET(CPACK_PACKAGE_VENDOR "Dieter Baron <[email protected]> and Thomas Klausner <[email protected]>")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
SET(CPACK_PACKAGE_VERSION_MAJOR ${PACKAGE_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${PACKAGE_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${PACKAGE_VERSION_PATCH})
SET(CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION})
SET(CPACK_GENERATOR "TGZ")
SET(CPACK_SOURCE_GENERATOR "TGZ")
SET(CPACK_SOURCE_IGNORE_FILES
".a$"
".cmake$"
".o$"
".so$"
"/.deps/"
"/.libs/"
"/CMakeFiles/"
"/CVS/"
"/autom4te.cache/"
"/build"
"/broken"
"/docs/"
"AdditionalInfo.txt$"
"CMakeCache.txt$"
"Makefile$"
"\\\\.sh$"
"_CPack_"
"config.h$"
"config.log$"
"config.status$"
"html$"
"install_manifest.txt$"
"stamp-h1$"
"tar.bz2"
"tar.gz"
"~$"
)
SET(CPACK_SOURCE_STRIP_FILES "")
INCLUDE(CPack)

# write out config file
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake-config.h.in
${CMAKE_CURRENT_BINARY_DIR}/config.h)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake-zipconf.h.in
${CMAKE_CURRENT_BINARY_DIR}/zipconf.h)

INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/zipconf.h DESTINATION lib/libzip/include)
Loading

0 comments on commit ebd0ca5

Please sign in to comment.