Move the char16 functions into their own file.
This completes the removal of the monolithic fake-lib.[ch].
This commit is contained in:
parent
3b3a5fd6bf
commit
39faf94ea2
8 changed files with 13 additions and 21 deletions
|
@ -4,11 +4,11 @@ ACLOCAL_AMFLAGS = -I m4
|
|||
|
||||
lib_LTLIBRARIES = libwinterop.so.la libmsi.so.la libpreload.la
|
||||
|
||||
libwinterop_so_la_SOURCES = fake-winterop.c fake-lib.c fake-lib.h \
|
||||
memory.c memory.h dupstr.c dupstr.h subproc.c subproc.h
|
||||
libwinterop_so_la_SOURCES = fake-winterop.c memory.c memory.h \
|
||||
dupstr.c dupstr.h subproc.c subproc.h uchars.c uchars.h
|
||||
|
||||
libmsi_so_la_SOURCES = fake-msi.c fake-lib.c fake-lib.h md5.c \
|
||||
memory.c memory.h version.c dupstr.c dupstr.h subproc.c subproc.h
|
||||
libmsi_so_la_SOURCES = fake-msi.c md5.c memory.c memory.h version.c \
|
||||
dupstr.c dupstr.h subproc.c subproc.h uchars.c uchars.h
|
||||
|
||||
libpreload_la_SOURCES = preload.c
|
||||
libpreload_la_LDFLAGS = -ldl
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# autoconf input for Wix Linux shim.
|
||||
|
||||
AC_INIT([wix-linux-shim], [NOVERSION], [anakin@pobox.com])
|
||||
AC_CONFIG_SRCDIR([fake-lib.h])
|
||||
AC_CONFIG_SRCDIR([makecab.py])
|
||||
AC_CONFIG_MACRO_DIRS([m4])
|
||||
|
||||
AM_INIT_AUTOMAKE(foreign)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "memory.h"
|
||||
#include "dupstr.h"
|
||||
#include "subproc.h"
|
||||
#include "fake-lib.h"
|
||||
#include "uchars.h"
|
||||
|
||||
typedef struct MsiTypePrefix {
|
||||
enum { MAIN, VIEW, RECORD } type;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "memory.h"
|
||||
#include "dupstr.h"
|
||||
#include "subproc.h"
|
||||
#include "fake-lib.h"
|
||||
#include "uchars.h"
|
||||
|
||||
uint32_t HashPublicKeyInfo(void *pCertContext,
|
||||
void *rgbSubjectKeyIdentifier,
|
||||
|
|
2
md5.c
2
md5.c
|
@ -20,7 +20,7 @@
|
|||
#include <err.h>
|
||||
|
||||
#include "memory.h"
|
||||
#include "fake-lib.h"
|
||||
#include "uchars.h"
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Core MD5 algorithm: processes 16-word blocks into a message digest.
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <uchar.h>
|
||||
#include <err.h>
|
||||
|
||||
#include "memory.h"
|
||||
#include "fake-lib.h"
|
||||
#include "uchars.h"
|
||||
|
||||
char *ascii(const char16_t *wstr, bool translate_slashes)
|
||||
{
|
||||
size_t len = 0;
|
||||
for (const char16_t *wp = wstr; *wp; wp++)
|
||||
len++;
|
||||
char *ret = malloc(len + 1);
|
||||
char *ret = snewn(len + 1, char);
|
||||
char *p = ret;
|
||||
for (const char16_t *wp = wstr; *wp; wp++)
|
||||
*p++ = (*wp == '\\' && translate_slashes ? '/' :
|
|
@ -1,5 +1,6 @@
|
|||
#include <uchar.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
char *ascii(const char16_t *wstr, bool translate_slashes);
|
||||
void c16cpy(char16_t *out, uint32_t *outsize, char *s);
|
|
@ -10,7 +10,7 @@
|
|||
#include <err.h>
|
||||
|
||||
#include "memory.h"
|
||||
#include "fake-lib.h"
|
||||
#include "uchars.h"
|
||||
|
||||
uint32_t MsiGetFileVersionW(const char16_t *filename,
|
||||
char16_t *version, uint32_t *version_size,
|
||||
|
|
Loading…
Add table
Reference in a new issue