migrated some files from cmn to si

This commit is contained in:
2016-04-28 15:29:28 +00:00
parent 49d3dcfeda
commit 9cb6c963fa
48 changed files with 792 additions and 775 deletions

View File

@ -98,8 +98,8 @@ libqseawk_str_la_LIBADD = $(LIBADD_MOD_COMMON)
modexec_LTLIBRARIES += libqseawk-sys.la
libqseawk_sys_la_SOURCES = mod-sys.c mod-sys.h
libqseawk_sys_la_CPPFLAGS = $(CPPFLAGS_MOD_COMMON)
libqseawk_sys_la_LDFLAGS = $(LDFLAGS_MOD_COMMON)
libqseawk_sys_la_LIBADD = $(LIBADD_MOD_COMMON)
libqseawk_sys_la_LDFLAGS = $(LDFLAGS_MOD_COMMON) -L../si
libqseawk_sys_la_LIBADD = $(LIBADD_MOD_COMMON) -lqsesi
if HAVE_C_MPI
modexec_LTLIBRARIES += libqseawk-mpi.la

View File

@ -29,9 +29,9 @@
#include <qse/cmn/mbwc.h>
#include <qse/cmn/time.h>
#include <qse/cmn/path.h>
#include <qse/io/pio.h>
#include <qse/io/sio.h>
#include <qse/io/nwio.h>
#include <qse/si/pio.h>
#include <qse/si/sio.h>
#include <qse/si/nwio.h>
#include "awk.h"
#include "std.h"

View File

@ -28,9 +28,9 @@
#include <qse/cmn/str.h>
#include <qse/cmn/chr.h>
#include <qse/cmn/time.h>
#include <qse/cmn/nwif.h>
#include <qse/cmn/nwad.h>
#include <qse/cmn/mbwc.h>
#include <qse/si/nwif.h>
#include "../cmn/mem.h"
#if defined(_WIN32)

View File

@ -32,9 +32,9 @@
#include <qse/cmn/path.h>
#include <qse/cmn/htb.h>
#include <qse/cmn/env.h>
#include <qse/io/sio.h>
#include <qse/io/pio.h>
#include <qse/io/nwio.h>
#include <qse/si/sio.h>
#include <qse/si/pio.h>
#include <qse/si/nwio.h>
#include "../cmn/mem.h"
#include <stdarg.h>

View File

@ -24,15 +24,12 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <qse/types.h>
#include <qse/macros.h>
#include <qse/io/sio.h>
#include <qse/cmn/str.h>
#include "mem.h"
#if defined(HAVE_EXECINFO_H)
# include <execinfo.h>
# include <stdlib.h>
# include <qse/cmn/str.h>
#endif
#if defined(_WIN32)
@ -90,8 +87,10 @@ void qse_assert_failed (
{
qse_char_t tmp[1024];
DWORD written;
static qse_char_t* static_header = QSE_T("=[ASSERTION FAILURE]===========================================================\r\n");
static qse_char_t* static_footer = QSE_T("===============================================================================\r\n");
WriteConsole (stderr, QSE_T("[ASSERTION FAILURE]\r\n"), 21, &written, QSE_NULL);
WriteConsole (stderr, static_header, qse_strlen(static_header), &written, QSE_NULL);
qse_strxfmt (tmp, QSE_COUNTOF(tmp), QSE_T("[FILE %s LINE %lu]\r\n"), file, (unsigned long)line);
WriteConsole (stderr, tmp, qse_strlen(tmp), &written, QSE_NULL);
@ -106,13 +105,17 @@ void qse_assert_failed (
WriteConsole (stderr, desc, qse_strlen(desc), &written, QSE_NULL);
WriteConsole (stderr, QSE_T("\r\n"), 2, &written, QSE_NULL);
}
WriteConsole (stderr, static_header, qse_strlen(static_footer), &written, QSE_NULL);
}
#elif defined(__OS2__)
HFILE stderr = (HFILE)2;
ULONG written;
qse_mchar_t tmp[1024];
static qse_mchar_t* static_header = QSE_MT("=[ASSERTION FAILURE]===========================================================\r\n");
static qse_mchar_t* static_footer = QSE_MT("===============================================================================\r\n");
DosWrite (stderr, QSE_T("[ASSERTION FAILURE]\r\n"), 21, &written);
DosWrite (stderr, static_header, qse_mbslen(static_header), &written);
#if defined(QSE_CHAR_IS_MCHAR)
qse_mbsxfmt (tmp, QSE_COUNTOF(tmp), QSE_MT("FILE %hs LINE %lu\r\n"), file, (unsigned long)line);
@ -137,12 +140,15 @@ void qse_assert_failed (
#endif
DosWrite (stderr, tmp, qse_mbslen(tmp), &written);
}
DosWrite (stderr, static_footer, qse_mbslen(static_footer), &written);
#elif defined(__DOS__)
int stderr = 2;
qse_mchar_t tmp[1024];
static qse_mchar_t* static_header = QSE_MT("=[ASSERTION FAILURE]===========================================================\r\n");
static qse_mchar_t* static_footer = QSE_MT("===============================================================================\r\n");
write (stderr, QSE_T("[ASSERTION FAILURE]\r\n"), 21);
write (stderr, static_header, qse_mbslen(static_header));
#if defined(QSE_CHAR_IS_MCHAR)
qse_mbsxfmt (tmp, QSE_COUNTOF(tmp), QSE_MT("FILE %hs LINE %lu\r\n"), file, (unsigned long)line);
@ -168,6 +174,7 @@ void qse_assert_failed (
write (stderr, tmp, qse_mbslen(tmp));
}
write (stderr, static_footer, qse_mbslen(static_footer));
#elif defined(macintosh)
/* note 'desc' is not used for macintosh at this moment.
@ -202,9 +209,8 @@ void qse_assert_failed (
#else
static qse_mchar_t* static_msg[] =
static qse_mchar_t* oops_msg[] =
{
QSE_MT("=[ASSERTION FAILURE]============================================================\n"),
QSE_MT(" __ \n"),
QSE_MT(" _____ _____ _____ _____| |\n"),
QSE_MT("| | | _ | __| |\n"),
@ -212,8 +218,9 @@ void qse_assert_failed (
QSE_MT("|_____|_____|__| |_____|__|\n"),
QSE_MT(" \n")
};
static qse_mchar_t* static_bthdr = QSE_MT("=[BACKTRACES]===================================================================\n");
static qse_mchar_t* static_footer= QSE_MT("================================================================================\n");
static qse_mchar_t* static_header = QSE_MT("=[ASSERTION FAILURE]============================================================\n"),
static qse_mchar_t* static_bthdr = QSE_MT("=[BACKTRACES]===================================================================\n");
static qse_mchar_t* static_footer = QSE_MT("================================================================================\n");
qse_mchar_t tmp[1024];
qse_size_t i;
@ -224,9 +231,11 @@ void qse_assert_failed (
char** btsyms;
#endif
for (i = 0; i < QSE_COUNTOF(static_msg); i++)
write (2, static_header, qse_mbslen(static_header));
for (i = 0; i < QSE_COUNTOF(oops_msg); i++)
{
write (2, static_msg[i], qse_mbslen(static_msg[i]));
write (2, oops_msg[i], qse_mbslen(oops_msg[i]));
}
#if defined(QSE_CHAR_IS_MCHAR)

View File

@ -538,7 +538,7 @@ static int reset_to_path (qse_dir_t* dir, const qse_char_t* path)
{
qse_wchar_t* wptr;
QSE_ASSERT (dir->flags & QSE_DIR_WCSPTH);
QSE_ASSERT (dir->flags & QSE_DIR_WCSPATH);
wptr = make_wcsdos_path (dir, (const qse_wchar_t*)path);
if (wptr == QSE_NULL) return -1;

View File

@ -26,10 +26,10 @@
#include <qse/cmn/nwad.h>
#include <qse/cmn/hton.h>
#include <qse/cmn/nwif.h>
#include <qse/cmn/str.h>
#include <qse/cmn/fmt.h>
#include <qse/cmn/mbwc.h>
#include <qse/si/nwif.h>
#include "mem.h"
int qse_nwadequal (const qse_nwad_t* x, const qse_nwad_t* y)

View File

@ -27,7 +27,7 @@
#include "httpd.h"
#include "../cmn/mem.h"
#include <qse/cmn/str.h>
#include <qse/io/pio.h>
#include <qse/si/pio.h>
#include <qse/cmn/fmt.h>
#include <qse/cmn/path.h>

View File

@ -28,7 +28,6 @@
#include "httpd.h"
#include "../cmn/mem.h"
#include <qse/cmn/hton.h>
#include <qse/cmn/nwif.h>
#include <qse/cmn/mbwc.h>
#include <qse/cmn/str.h>
#include <qse/cmn/uri.h>
@ -36,10 +35,11 @@
#include <qse/cmn/fmt.h>
#include <qse/cmn/path.h>
#include <qse/cmn/dir.h>
#include <qse/io/fio.h>
#include <qse/io/sio.h>
#include <qse/si/fio.h>
#include <qse/si/sio.h>
#include <qse/si/mux.h>
#include <qse/si/nwif.h>
#include <qse/cmn/sck.h>
#include <qse/sys/mux.h>
#define STAT_REG 1
#define STAT_DIR 2

View File

@ -29,7 +29,7 @@
#include <qse/cmn/chr.h>
#include <qse/cmn/str.h>
#include <qse/cmn/mbwc.h>
#include <qse/io/sio.h>
#include <qse/si/sio.h>
#if !defined(QSE_HTTPD_DEFAULT_MODPREFIX)

View File

@ -41,7 +41,7 @@
#endif
#if defined(QSE_HTTPD_DEBUG)
# include <qse/io/sio.h>
# include <qse/si/sio.h>
# include <qse/cmn/path.h>
# define HTTPD_DBGOUT0(fmt) qse_putmbsf("%06d %-20hs " fmt, (int)__LINE__, qse_mbsbasename(__FILE__))
# define HTTPD_DBGOUT1(fmt,a1) qse_putmbsf("%06d %-20hs " fmt, (int)__LINE__, qse_mbsbasename(__FILE__), (a1))

View File

@ -25,7 +25,7 @@
*/
#include <qse/sed/Sed.hpp>
#include <qse/io/sio.h>
#include <qse/si/sio.h>
#include "../cmn/mem.h"
#include "sed.h"

View File

@ -25,8 +25,8 @@
*/
#include <qse/sed/StdSed.hpp>
#include <qse/io/fio.h>
#include <qse/io/sio.h>
#include <qse/si/fio.h>
#include <qse/si/sio.h>
#include "sed.h"
#include "../cmn/mem.h"

View File

@ -27,7 +27,7 @@
#include "sed.h"
#include <qse/sed/stdsed.h>
#include <qse/cmn/str.h>
#include <qse/io/sio.h>
#include <qse/si/sio.h>
#include "../cmn/mem.h"
typedef struct xtn_in_t xtn_in_t;

View File

@ -16,6 +16,7 @@ libqsesi_la_SOURCES = \
intr.c \
mtx.c \
mux.c \
nwif.c \
nwio.c \
pio.c \
rwl.c \

View File

@ -24,10 +24,10 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _QSE_LIB_IO_AIO_PRV_H_
#define _QSE_LIB_IO_AIO_PRV_H_
#ifndef _QSE_LIB_SI_AIO_PRV_H_
#define _QSE_LIB_SI_AIO_PRV_H_
#include <qse/io/aio.h>
#include <qse/si/aio.h>
#include "../cmn/mem.h"

View File

@ -24,10 +24,10 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <qse/cmn/nwif.h>
#include <qse/si/nwif.h>
#include <qse/cmn/str.h>
#include <qse/cmn/mbwc.h>
#include <qse/io/sio.h>
#include <qse/si/sio.h>
#include "mem.h"
#if defined(_WIN32)

View File

@ -24,7 +24,7 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <qse/cmn/nwif.h>
#include <qse/si/nwif.h>
#include <qse/cmn/str.h>
#include <qse/cmn/mbwc.h>
#include "mem.h"