mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-07 18:36:09 +08:00
fix freetype vcxproj
This commit is contained in:
parent
d2d12d0309
commit
f459a42639
File diff suppressed because it is too large
Load Diff
@ -1,133 +1,133 @@
|
||||
|
||||
#include <cairo.h>
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
int main() {
|
||||
double ang = 0,angv = (M_PI * 2) / 360,angstep = (M_PI * 2) / 3;
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||
return 1;
|
||||
|
||||
SDL_Window *window = SDL_CreateWindow("Cairo",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,320,240,SDL_WINDOW_SHOWN);
|
||||
if (window == NULL)
|
||||
return 1;
|
||||
|
||||
SDL_Surface *surface = SDL_GetWindowSurface(window);
|
||||
if (surface == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_format_t csurffmt = CAIRO_FORMAT_INVALID;
|
||||
if (surface->format->BytesPerPixel == 4) {
|
||||
csurffmt = CAIRO_FORMAT_ARGB32;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 3) {
|
||||
csurffmt = CAIRO_FORMAT_RGB24;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 2) {
|
||||
csurffmt = CAIRO_FORMAT_RGB16_565;
|
||||
}
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
cairo_surface_t* csurf = cairo_image_surface_create(csurffmt, 320, 240);
|
||||
if (csurf == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_t* cactx = cairo_create(csurf);
|
||||
if (cactx == NULL)
|
||||
return 1;
|
||||
|
||||
bool run = true;
|
||||
while (run) {
|
||||
SDL_Event ev;
|
||||
|
||||
while (SDL_PollEvent(&ev)) {
|
||||
switch (ev.type) {
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (ev.window.event) {
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
switch (ev.key.keysym.sym) {
|
||||
case SDLK_ESCAPE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// clear
|
||||
cairo_reset_clip(cactx);
|
||||
cairo_set_source_rgb(cactx,0.25,0.25,0.25);
|
||||
cairo_paint(cactx);
|
||||
|
||||
// draw
|
||||
cairo_set_line_width(cactx,8.0);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 160.0 + cos(a+ang)*100.0;
|
||||
double y = 120.0 + sin(a+ang)*100.0;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgb(cactx,1.0,1.0,1.0);
|
||||
cairo_fill_preserve(cactx);
|
||||
|
||||
cairo_set_source_rgb(cactx,0.0,0.0,1.0);
|
||||
cairo_stroke(cactx);
|
||||
|
||||
// copy Cairo output to display
|
||||
cairo_surface_flush(csurf);
|
||||
{
|
||||
unsigned char *cbuf = cairo_image_surface_get_data(csurf);
|
||||
int width = cairo_image_surface_get_width(csurf);
|
||||
int height = cairo_image_surface_get_height(csurf);
|
||||
int stride = cairo_image_surface_get_stride(csurf);
|
||||
|
||||
SDL_LockSurface(surface);
|
||||
|
||||
if (cbuf != NULL && surface->pixels != NULL) {
|
||||
if (width > surface->w) width = surface->w;
|
||||
if (height > surface->h) height = surface->h;
|
||||
|
||||
for (int y=0;y < height;y++) {
|
||||
unsigned char *d = (unsigned char*)(surface->pixels) + (surface->pitch * y);
|
||||
unsigned char *s = (unsigned char*)(cbuf) + (stride * y);
|
||||
memcpy(d,s,width*surface->format->BytesPerPixel);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_UnlockSurface(surface);
|
||||
SDL_UpdateWindowSurface(window);
|
||||
}
|
||||
|
||||
SDL_Delay(1000 / 30);
|
||||
}
|
||||
|
||||
cairo_surface_flush(csurf);
|
||||
cairo_destroy(cactx);
|
||||
cairo_surface_destroy(csurf);
|
||||
|
||||
// do not free surface, owned by dinwo
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#include <cairo.h>
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
int main() {
|
||||
double ang = 0,angv = (M_PI * 2) / 360,angstep = (M_PI * 2) / 3;
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||
return 1;
|
||||
|
||||
SDL_Window *window = SDL_CreateWindow("Cairo",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,320,240,SDL_WINDOW_SHOWN);
|
||||
if (window == NULL)
|
||||
return 1;
|
||||
|
||||
SDL_Surface *surface = SDL_GetWindowSurface(window);
|
||||
if (surface == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_format_t csurffmt = CAIRO_FORMAT_INVALID;
|
||||
if (surface->format->BytesPerPixel == 4) {
|
||||
csurffmt = CAIRO_FORMAT_ARGB32;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 3) {
|
||||
csurffmt = CAIRO_FORMAT_RGB24;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 2) {
|
||||
csurffmt = CAIRO_FORMAT_RGB16_565;
|
||||
}
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
cairo_surface_t* csurf = cairo_image_surface_create(csurffmt, 320, 240);
|
||||
if (csurf == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_t* cactx = cairo_create(csurf);
|
||||
if (cactx == NULL)
|
||||
return 1;
|
||||
|
||||
bool run = true;
|
||||
while (run) {
|
||||
SDL_Event ev;
|
||||
|
||||
while (SDL_PollEvent(&ev)) {
|
||||
switch (ev.type) {
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (ev.window.event) {
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
switch (ev.key.keysym.sym) {
|
||||
case SDLK_ESCAPE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// clear
|
||||
cairo_reset_clip(cactx);
|
||||
cairo_set_source_rgb(cactx,0.25,0.25,0.25);
|
||||
cairo_paint(cactx);
|
||||
|
||||
// draw
|
||||
cairo_set_line_width(cactx,8.0);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 160.0 + cos(a+ang)*100.0;
|
||||
double y = 120.0 + sin(a+ang)*100.0;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgb(cactx,1.0,1.0,1.0);
|
||||
cairo_fill_preserve(cactx);
|
||||
|
||||
cairo_set_source_rgb(cactx,0.0,0.0,1.0);
|
||||
cairo_stroke(cactx);
|
||||
|
||||
// copy Cairo output to display
|
||||
cairo_surface_flush(csurf);
|
||||
{
|
||||
unsigned char *cbuf = cairo_image_surface_get_data(csurf);
|
||||
int width = cairo_image_surface_get_width(csurf);
|
||||
int height = cairo_image_surface_get_height(csurf);
|
||||
int stride = cairo_image_surface_get_stride(csurf);
|
||||
|
||||
SDL_LockSurface(surface);
|
||||
|
||||
if (cbuf != NULL && surface->pixels != NULL) {
|
||||
if (width > surface->w) width = surface->w;
|
||||
if (height > surface->h) height = surface->h;
|
||||
|
||||
for (int y=0;y < height;y++) {
|
||||
unsigned char *d = (unsigned char*)(surface->pixels) + (surface->pitch * y);
|
||||
unsigned char *s = (unsigned char*)(cbuf) + (stride * y);
|
||||
memcpy(d,s,width*surface->format->BytesPerPixel);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_UnlockSurface(surface);
|
||||
SDL_UpdateWindowSurface(window);
|
||||
}
|
||||
|
||||
SDL_Delay(1000 / 30);
|
||||
}
|
||||
|
||||
cairo_surface_flush(csurf);
|
||||
cairo_destroy(cactx);
|
||||
cairo_surface_destroy(csurf);
|
||||
|
||||
// do not free surface, owned by dinwo
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,153 +1,153 @@
|
||||
|
||||
#include <cairo.h>
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
int main() {
|
||||
double ang = 0,angv = (M_PI * 2) / 360,angstep = (M_PI * 2) / 4;
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||
return 1;
|
||||
|
||||
SDL_Window *window = SDL_CreateWindow("Cairo",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,320,240,SDL_WINDOW_SHOWN);
|
||||
if (window == NULL)
|
||||
return 1;
|
||||
|
||||
SDL_Surface *surface = SDL_GetWindowSurface(window);
|
||||
if (surface == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_format_t csurffmt = CAIRO_FORMAT_INVALID;
|
||||
if (surface->format->BytesPerPixel == 4) {
|
||||
csurffmt = CAIRO_FORMAT_ARGB32;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 3) {
|
||||
csurffmt = CAIRO_FORMAT_RGB24;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 2) {
|
||||
csurffmt = CAIRO_FORMAT_RGB16_565;
|
||||
}
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
cairo_surface_t* csurf = cairo_image_surface_create(csurffmt, 320, 240);
|
||||
if (csurf == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_t* cactx = cairo_create(csurf);
|
||||
if (cactx == NULL)
|
||||
return 1;
|
||||
|
||||
bool run = true;
|
||||
while (run) {
|
||||
SDL_Event ev;
|
||||
|
||||
while (SDL_PollEvent(&ev)) {
|
||||
switch (ev.type) {
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (ev.window.event) {
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
switch (ev.key.keysym.sym) {
|
||||
case SDLK_ESCAPE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// clear
|
||||
cairo_reset_clip(cactx);
|
||||
cairo_set_source_rgb(cactx,0.25,0.25,0.25);
|
||||
cairo_paint(cactx);
|
||||
|
||||
// draw
|
||||
cairo_set_line_width(cactx,8.0);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 160.0 + cos(a+ang)*100.0 + 20;
|
||||
double y = 120.0 + sin(a+ang)*100.0 + 20;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgba(cactx,0,0,0,0.5);
|
||||
cairo_fill(cactx);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 160.0 + cos(a+ang)*100.0;
|
||||
double y = 120.0 + sin(a+ang)*100.0;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgb(cactx,1.0,1.0,1.0);
|
||||
cairo_fill_preserve(cactx);
|
||||
|
||||
cairo_set_source_rgb(cactx,0.0,0.0,1.0);
|
||||
cairo_stroke(cactx);
|
||||
|
||||
// copy Cairo output to display
|
||||
cairo_surface_flush(csurf);
|
||||
{
|
||||
unsigned char *cbuf = cairo_image_surface_get_data(csurf);
|
||||
int width = cairo_image_surface_get_width(csurf);
|
||||
int height = cairo_image_surface_get_height(csurf);
|
||||
int stride = cairo_image_surface_get_stride(csurf);
|
||||
|
||||
SDL_LockSurface(surface);
|
||||
|
||||
if (cbuf != NULL && surface->pixels != NULL) {
|
||||
if (width > surface->w) width = surface->w;
|
||||
if (height > surface->h) height = surface->h;
|
||||
|
||||
for (int y=0;y < height;y++) {
|
||||
unsigned char *d = (unsigned char*)(surface->pixels) + (surface->pitch * y);
|
||||
unsigned char *s = (unsigned char*)(cbuf) + (stride * y);
|
||||
memcpy(d,s,width*surface->format->BytesPerPixel);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_UnlockSurface(surface);
|
||||
SDL_UpdateWindowSurface(window);
|
||||
}
|
||||
|
||||
SDL_Delay(1000 / 30);
|
||||
}
|
||||
|
||||
cairo_surface_flush(csurf);
|
||||
cairo_destroy(cactx);
|
||||
cairo_surface_destroy(csurf);
|
||||
|
||||
// do not free surface, owned by dinwo
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#include <cairo.h>
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
int main() {
|
||||
double ang = 0,angv = (M_PI * 2) / 360,angstep = (M_PI * 2) / 4;
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||
return 1;
|
||||
|
||||
SDL_Window *window = SDL_CreateWindow("Cairo",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,320,240,SDL_WINDOW_SHOWN);
|
||||
if (window == NULL)
|
||||
return 1;
|
||||
|
||||
SDL_Surface *surface = SDL_GetWindowSurface(window);
|
||||
if (surface == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_format_t csurffmt = CAIRO_FORMAT_INVALID;
|
||||
if (surface->format->BytesPerPixel == 4) {
|
||||
csurffmt = CAIRO_FORMAT_ARGB32;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 3) {
|
||||
csurffmt = CAIRO_FORMAT_RGB24;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 2) {
|
||||
csurffmt = CAIRO_FORMAT_RGB16_565;
|
||||
}
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
cairo_surface_t* csurf = cairo_image_surface_create(csurffmt, 320, 240);
|
||||
if (csurf == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_t* cactx = cairo_create(csurf);
|
||||
if (cactx == NULL)
|
||||
return 1;
|
||||
|
||||
bool run = true;
|
||||
while (run) {
|
||||
SDL_Event ev;
|
||||
|
||||
while (SDL_PollEvent(&ev)) {
|
||||
switch (ev.type) {
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (ev.window.event) {
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
switch (ev.key.keysym.sym) {
|
||||
case SDLK_ESCAPE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// clear
|
||||
cairo_reset_clip(cactx);
|
||||
cairo_set_source_rgb(cactx,0.25,0.25,0.25);
|
||||
cairo_paint(cactx);
|
||||
|
||||
// draw
|
||||
cairo_set_line_width(cactx,8.0);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 160.0 + cos(a+ang)*100.0 + 20;
|
||||
double y = 120.0 + sin(a+ang)*100.0 + 20;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgba(cactx,0,0,0,0.5);
|
||||
cairo_fill(cactx);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 160.0 + cos(a+ang)*100.0;
|
||||
double y = 120.0 + sin(a+ang)*100.0;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgb(cactx,1.0,1.0,1.0);
|
||||
cairo_fill_preserve(cactx);
|
||||
|
||||
cairo_set_source_rgb(cactx,0.0,0.0,1.0);
|
||||
cairo_stroke(cactx);
|
||||
|
||||
// copy Cairo output to display
|
||||
cairo_surface_flush(csurf);
|
||||
{
|
||||
unsigned char *cbuf = cairo_image_surface_get_data(csurf);
|
||||
int width = cairo_image_surface_get_width(csurf);
|
||||
int height = cairo_image_surface_get_height(csurf);
|
||||
int stride = cairo_image_surface_get_stride(csurf);
|
||||
|
||||
SDL_LockSurface(surface);
|
||||
|
||||
if (cbuf != NULL && surface->pixels != NULL) {
|
||||
if (width > surface->w) width = surface->w;
|
||||
if (height > surface->h) height = surface->h;
|
||||
|
||||
for (int y=0;y < height;y++) {
|
||||
unsigned char *d = (unsigned char*)(surface->pixels) + (surface->pitch * y);
|
||||
unsigned char *s = (unsigned char*)(cbuf) + (stride * y);
|
||||
memcpy(d,s,width*surface->format->BytesPerPixel);
|
||||
}
|
||||
}
|
||||
|
||||
SDL_UnlockSurface(surface);
|
||||
SDL_UpdateWindowSurface(window);
|
||||
}
|
||||
|
||||
SDL_Delay(1000 / 30);
|
||||
}
|
||||
|
||||
cairo_surface_flush(csurf);
|
||||
cairo_destroy(cactx);
|
||||
cairo_surface_destroy(csurf);
|
||||
|
||||
// do not free surface, owned by dinwo
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,147 +1,147 @@
|
||||
|
||||
#include <cairo.h>
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
int main() {
|
||||
double ang = 0,angv = (M_PI * 2) / 360,angstep = (M_PI * 2) / 4;
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||
return 1;
|
||||
|
||||
SDL_Window *window = SDL_CreateWindow("Cairo",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,320,240,SDL_WINDOW_SHOWN);
|
||||
if (window == NULL)
|
||||
return 1;
|
||||
|
||||
SDL_Surface *surface = SDL_GetWindowSurface(window);
|
||||
if (surface == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_format_t csurffmt = CAIRO_FORMAT_INVALID;
|
||||
if (surface->format->BytesPerPixel == 4) {
|
||||
csurffmt = CAIRO_FORMAT_ARGB32;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 3) {
|
||||
csurffmt = CAIRO_FORMAT_RGB24;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 2) {
|
||||
csurffmt = CAIRO_FORMAT_RGB16_565;
|
||||
}
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (surface->pixels == NULL || SDL_MUSTLOCK(surface)) {
|
||||
fprintf(stderr,"Surface not appropriate for Cairo\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int csurfpitch = cairo_format_stride_for_width(csurffmt, 320);
|
||||
fprintf(stderr,"Cairo stride %d\n",csurfpitch);
|
||||
fprintf(stderr,"SDL stride %d\n",surface->pitch);
|
||||
|
||||
if (csurfpitch != surface->pitch) {
|
||||
fprintf(stderr,"Sorry, Cairo and SDL do not agree\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
cairo_surface_t* csurf = cairo_image_surface_create_for_data((unsigned char*)surface->pixels, csurffmt, 320, 240, csurfpitch);
|
||||
if (csurf == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_t* cactx = cairo_create(csurf);
|
||||
if (cactx == NULL)
|
||||
return 1;
|
||||
|
||||
bool run = true;
|
||||
while (run) {
|
||||
SDL_Event ev;
|
||||
|
||||
while (SDL_PollEvent(&ev)) {
|
||||
switch (ev.type) {
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (ev.window.event) {
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
switch (ev.key.keysym.sym) {
|
||||
case SDLK_ESCAPE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// clear
|
||||
cairo_reset_clip(cactx);
|
||||
cairo_set_source_rgb(cactx,0.25,0.25,0.25);
|
||||
cairo_paint(cactx);
|
||||
|
||||
// draw
|
||||
cairo_set_line_width(cactx,8.0);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 160.0 + cos(a+ang)*100.0 + 20;
|
||||
double y = 120.0 + sin(a+ang)*100.0 + 20;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgba(cactx,0,0,0,0.5);
|
||||
cairo_fill(cactx);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 160.0 + cos(a+ang)*100.0;
|
||||
double y = 120.0 + sin(a+ang)*100.0;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgb(cactx,1.0,1.0,1.0);
|
||||
cairo_fill_preserve(cactx);
|
||||
|
||||
cairo_set_source_rgb(cactx,0.0,0.0,1.0);
|
||||
cairo_stroke(cactx);
|
||||
|
||||
// copy Cairo output to display
|
||||
cairo_surface_flush(csurf);
|
||||
|
||||
SDL_UpdateWindowSurface(window);
|
||||
|
||||
SDL_Delay(1000 / 30);
|
||||
}
|
||||
|
||||
cairo_surface_flush(csurf);
|
||||
cairo_destroy(cactx);
|
||||
cairo_surface_destroy(csurf);
|
||||
|
||||
// do not free surface, owned by dinwo
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#include <cairo.h>
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
int main() {
|
||||
double ang = 0,angv = (M_PI * 2) / 360,angstep = (M_PI * 2) / 4;
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||
return 1;
|
||||
|
||||
SDL_Window *window = SDL_CreateWindow("Cairo",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,320,240,SDL_WINDOW_SHOWN);
|
||||
if (window == NULL)
|
||||
return 1;
|
||||
|
||||
SDL_Surface *surface = SDL_GetWindowSurface(window);
|
||||
if (surface == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_format_t csurffmt = CAIRO_FORMAT_INVALID;
|
||||
if (surface->format->BytesPerPixel == 4) {
|
||||
csurffmt = CAIRO_FORMAT_ARGB32;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 3) {
|
||||
csurffmt = CAIRO_FORMAT_RGB24;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 2) {
|
||||
csurffmt = CAIRO_FORMAT_RGB16_565;
|
||||
}
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (surface->pixels == NULL || SDL_MUSTLOCK(surface)) {
|
||||
fprintf(stderr,"Surface not appropriate for Cairo\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int csurfpitch = cairo_format_stride_for_width(csurffmt, 320);
|
||||
fprintf(stderr,"Cairo stride %d\n",csurfpitch);
|
||||
fprintf(stderr,"SDL stride %d\n",surface->pitch);
|
||||
|
||||
if (csurfpitch != surface->pitch) {
|
||||
fprintf(stderr,"Sorry, Cairo and SDL do not agree\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
cairo_surface_t* csurf = cairo_image_surface_create_for_data((unsigned char*)surface->pixels, csurffmt, 320, 240, csurfpitch);
|
||||
if (csurf == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_t* cactx = cairo_create(csurf);
|
||||
if (cactx == NULL)
|
||||
return 1;
|
||||
|
||||
bool run = true;
|
||||
while (run) {
|
||||
SDL_Event ev;
|
||||
|
||||
while (SDL_PollEvent(&ev)) {
|
||||
switch (ev.type) {
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (ev.window.event) {
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
switch (ev.key.keysym.sym) {
|
||||
case SDLK_ESCAPE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// clear
|
||||
cairo_reset_clip(cactx);
|
||||
cairo_set_source_rgb(cactx,0.25,0.25,0.25);
|
||||
cairo_paint(cactx);
|
||||
|
||||
// draw
|
||||
cairo_set_line_width(cactx,8.0);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 160.0 + cos(a+ang)*100.0 + 20;
|
||||
double y = 120.0 + sin(a+ang)*100.0 + 20;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgba(cactx,0,0,0,0.5);
|
||||
cairo_fill(cactx);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 160.0 + cos(a+ang)*100.0;
|
||||
double y = 120.0 + sin(a+ang)*100.0;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgb(cactx,1.0,1.0,1.0);
|
||||
cairo_fill_preserve(cactx);
|
||||
|
||||
cairo_set_source_rgb(cactx,0.0,0.0,1.0);
|
||||
cairo_stroke(cactx);
|
||||
|
||||
// copy Cairo output to display
|
||||
cairo_surface_flush(csurf);
|
||||
|
||||
SDL_UpdateWindowSurface(window);
|
||||
|
||||
SDL_Delay(1000 / 30);
|
||||
}
|
||||
|
||||
cairo_surface_flush(csurf);
|
||||
cairo_destroy(cactx);
|
||||
cairo_surface_destroy(csurf);
|
||||
|
||||
// do not free surface, owned by dinwo
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,147 +1,147 @@
|
||||
|
||||
#include <cairo.h>
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
int main() {
|
||||
double ang = 0,angv = (M_PI * 2) / 360,angstep = (M_PI * 2) / 4;
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||
return 1;
|
||||
|
||||
SDL_Window *window = SDL_CreateWindow("Cairo",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,640,480,SDL_WINDOW_SHOWN);
|
||||
if (window == NULL)
|
||||
return 1;
|
||||
|
||||
SDL_Surface *surface = SDL_GetWindowSurface(window);
|
||||
if (surface == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_format_t csurffmt = CAIRO_FORMAT_INVALID;
|
||||
if (surface->format->BytesPerPixel == 4) {
|
||||
csurffmt = CAIRO_FORMAT_ARGB32;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 3) {
|
||||
csurffmt = CAIRO_FORMAT_RGB24;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 2) {
|
||||
csurffmt = CAIRO_FORMAT_RGB16_565;
|
||||
}
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (surface->pixels == NULL || SDL_MUSTLOCK(surface)) {
|
||||
fprintf(stderr,"Surface not appropriate for Cairo\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int csurfpitch = cairo_format_stride_for_width(csurffmt, 640);
|
||||
fprintf(stderr,"Cairo stride %d\n",csurfpitch);
|
||||
fprintf(stderr,"SDL stride %d\n",surface->pitch);
|
||||
|
||||
if (csurfpitch != surface->pitch) {
|
||||
fprintf(stderr,"Sorry, Cairo and SDL do not agree\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
cairo_surface_t* csurf = cairo_image_surface_create_for_data((unsigned char*)surface->pixels, csurffmt, 640, 480, csurfpitch);
|
||||
if (csurf == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_t* cactx = cairo_create(csurf);
|
||||
if (cactx == NULL)
|
||||
return 1;
|
||||
|
||||
bool run = true;
|
||||
while (run) {
|
||||
SDL_Event ev;
|
||||
|
||||
while (SDL_PollEvent(&ev)) {
|
||||
switch (ev.type) {
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (ev.window.event) {
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
switch (ev.key.keysym.sym) {
|
||||
case SDLK_ESCAPE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// clear
|
||||
cairo_reset_clip(cactx);
|
||||
cairo_set_source_rgb(cactx,0.25,0.25,0.25);
|
||||
cairo_paint(cactx);
|
||||
|
||||
// draw
|
||||
cairo_set_line_width(cactx,8.0);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 320.0 + cos(a+ang)*200.0 + 40;
|
||||
double y = 240.0 + sin(a+ang)*200.0 + 40;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgba(cactx,0,0,0,0.5);
|
||||
cairo_fill(cactx);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 320.0 + cos(a+ang)*200.0;
|
||||
double y = 240.0 + sin(a+ang)*200.0;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgb(cactx,1.0,1.0,1.0);
|
||||
cairo_fill_preserve(cactx);
|
||||
|
||||
cairo_set_source_rgb(cactx,0.0,0.0,1.0);
|
||||
cairo_stroke(cactx);
|
||||
|
||||
// copy Cairo output to display
|
||||
cairo_surface_flush(csurf);
|
||||
|
||||
SDL_UpdateWindowSurface(window);
|
||||
|
||||
SDL_Delay(1000 / 30);
|
||||
}
|
||||
|
||||
cairo_surface_flush(csurf);
|
||||
cairo_destroy(cactx);
|
||||
cairo_surface_destroy(csurf);
|
||||
|
||||
// do not free surface, owned by dinwo
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#include <cairo.h>
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
int main() {
|
||||
double ang = 0,angv = (M_PI * 2) / 360,angstep = (M_PI * 2) / 4;
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) != 0)
|
||||
return 1;
|
||||
|
||||
SDL_Window *window = SDL_CreateWindow("Cairo",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,640,480,SDL_WINDOW_SHOWN);
|
||||
if (window == NULL)
|
||||
return 1;
|
||||
|
||||
SDL_Surface *surface = SDL_GetWindowSurface(window);
|
||||
if (surface == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_format_t csurffmt = CAIRO_FORMAT_INVALID;
|
||||
if (surface->format->BytesPerPixel == 4) {
|
||||
csurffmt = CAIRO_FORMAT_ARGB32;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 3) {
|
||||
csurffmt = CAIRO_FORMAT_RGB24;
|
||||
}
|
||||
else if (surface->format->BytesPerPixel == 2) {
|
||||
csurffmt = CAIRO_FORMAT_RGB16_565;
|
||||
}
|
||||
else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (surface->pixels == NULL || SDL_MUSTLOCK(surface)) {
|
||||
fprintf(stderr,"Surface not appropriate for Cairo\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int csurfpitch = cairo_format_stride_for_width(csurffmt, 640);
|
||||
fprintf(stderr,"Cairo stride %d\n",csurfpitch);
|
||||
fprintf(stderr,"SDL stride %d\n",surface->pitch);
|
||||
|
||||
if (csurfpitch != surface->pitch) {
|
||||
fprintf(stderr,"Sorry, Cairo and SDL do not agree\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
cairo_surface_t* csurf = cairo_image_surface_create_for_data((unsigned char*)surface->pixels, csurffmt, 640, 480, csurfpitch);
|
||||
if (csurf == NULL)
|
||||
return 1;
|
||||
|
||||
cairo_t* cactx = cairo_create(csurf);
|
||||
if (cactx == NULL)
|
||||
return 1;
|
||||
|
||||
bool run = true;
|
||||
while (run) {
|
||||
SDL_Event ev;
|
||||
|
||||
while (SDL_PollEvent(&ev)) {
|
||||
switch (ev.type) {
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (ev.window.event) {
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
switch (ev.key.keysym.sym) {
|
||||
case SDLK_ESCAPE:
|
||||
run = false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// clear
|
||||
cairo_reset_clip(cactx);
|
||||
cairo_set_source_rgb(cactx,0.25,0.25,0.25);
|
||||
cairo_paint(cactx);
|
||||
|
||||
// draw
|
||||
cairo_set_line_width(cactx,8.0);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 320.0 + cos(a+ang)*200.0 + 40;
|
||||
double y = 240.0 + sin(a+ang)*200.0 + 40;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgba(cactx,0,0,0,0.5);
|
||||
cairo_fill(cactx);
|
||||
|
||||
{
|
||||
unsigned int step=0;
|
||||
|
||||
for (double a=0;a < (M_PI * 2);a += angstep,step++) {
|
||||
double x = 320.0 + cos(a+ang)*200.0;
|
||||
double y = 240.0 + sin(a+ang)*200.0;
|
||||
|
||||
if (step == 0)
|
||||
cairo_move_to(cactx,x,y);
|
||||
else
|
||||
cairo_line_to(cactx,x,y);
|
||||
}
|
||||
|
||||
cairo_close_path(cactx);
|
||||
ang += angv;
|
||||
}
|
||||
|
||||
cairo_set_source_rgb(cactx,1.0,1.0,1.0);
|
||||
cairo_fill_preserve(cactx);
|
||||
|
||||
cairo_set_source_rgb(cactx,0.0,0.0,1.0);
|
||||
cairo_stroke(cactx);
|
||||
|
||||
// copy Cairo output to display
|
||||
cairo_surface_flush(csurf);
|
||||
|
||||
SDL_UpdateWindowSurface(window);
|
||||
|
||||
SDL_Delay(1000 / 30);
|
||||
}
|
||||
|
||||
cairo_surface_flush(csurf);
|
||||
cairo_destroy(cactx);
|
||||
cairo_surface_destroy(csurf);
|
||||
|
||||
// do not free surface, owned by dinwo
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,26 +1,26 @@
|
||||
all: ic1 ic2 ic3 ic4 ic5 icw1
|
||||
|
||||
ic1: ic1.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
ic2: ic2.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
ic3: ic3.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
ic4: ic4.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
ic5: ic5.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
icw1: icw1.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
iconvpp.o: iconvpp.cpp
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f ic1 ic2 ic3 ic4 ic5 icw1 *.o
|
||||
|
||||
all: ic1 ic2 ic3 ic4 ic5 icw1
|
||||
|
||||
ic1: ic1.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
ic2: ic2.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
ic3: ic3.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
ic4: ic4.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
ic5: ic5.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
icw1: icw1.cpp iconvpp.o
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -o $@ $< iconvpp.o -liconv
|
||||
|
||||
iconvpp.o: iconvpp.cpp
|
||||
g++ -Wall -Wextra -pedantic -std=c++11 -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f ic1 ic2 ic3 ic4 ic5 icw1 *.o
|
||||
|
||||
|
@ -1,135 +1,135 @@
|
||||
|
||||
#include "iconvpp.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
// borrowed from DOSLIB
|
||||
#define THIS_IS_JAPANESE "\x82\xb1\x82\xea\x82\xcd\x93\xfa\x96\x7b\x8c\xea\x82\xc5\x82\xb7"/* UTF-8 to Shift-JIS of "これは日本語です" */
|
||||
|
||||
typedef uint16_t test_char_t;
|
||||
typedef std::basic_string<test_char_t> test_string;
|
||||
|
||||
int main() {
|
||||
_Iconv<char,test_char_t> *x = _Iconv<char,test_char_t>::create(/*FROM*/"SHIFT-JIS");
|
||||
if (x == NULL) {
|
||||
cerr << "Failed to create context" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
_Iconv<test_char_t,char> *fx = _Iconv<test_char_t,char>::create("UTF-8");
|
||||
if (fx == NULL) {
|
||||
cerr << "Failed to create context" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
{
|
||||
test_char_t tmp[512];
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_src(src);
|
||||
x->set_dest(tmp,sizeof(tmp)/sizeof(tmp[0]));
|
||||
|
||||
int err = x->string_convert();
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
|
||||
x->finish();
|
||||
}
|
||||
|
||||
{
|
||||
test_string dst;
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_src(src);
|
||||
|
||||
int err = x->string_convert_dest(dst);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
test_char_t tmp[512];
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_dest(tmp,sizeof(tmp)/sizeof(tmp[0]));
|
||||
|
||||
int err = x->string_convert_src(src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
test_char_t tmp[512];
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_dest(tmp,sizeof(tmp)/sizeof(tmp[0]));
|
||||
|
||||
int err = x->string_convert_src(src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
test_string dst;
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
|
||||
int err = x->string_convert(dst,src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
test_string dst = x->string_convert(src);
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
delete fx;
|
||||
delete x;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#include "iconvpp.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
// borrowed from DOSLIB
|
||||
#define THIS_IS_JAPANESE "\x82\xb1\x82\xea\x82\xcd\x93\xfa\x96\x7b\x8c\xea\x82\xc5\x82\xb7"/* UTF-8 to Shift-JIS of "これは日本語です" */
|
||||
|
||||
typedef uint16_t test_char_t;
|
||||
typedef std::basic_string<test_char_t> test_string;
|
||||
|
||||
int main() {
|
||||
_Iconv<char,test_char_t> *x = _Iconv<char,test_char_t>::create(/*FROM*/"SHIFT-JIS");
|
||||
if (x == NULL) {
|
||||
cerr << "Failed to create context" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
_Iconv<test_char_t,char> *fx = _Iconv<test_char_t,char>::create("UTF-8");
|
||||
if (fx == NULL) {
|
||||
cerr << "Failed to create context" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
{
|
||||
test_char_t tmp[512];
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_src(src);
|
||||
x->set_dest(tmp,sizeof(tmp)/sizeof(tmp[0]));
|
||||
|
||||
int err = x->string_convert();
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
|
||||
x->finish();
|
||||
}
|
||||
|
||||
{
|
||||
test_string dst;
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_src(src);
|
||||
|
||||
int err = x->string_convert_dest(dst);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
test_char_t tmp[512];
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_dest(tmp,sizeof(tmp)/sizeof(tmp[0]));
|
||||
|
||||
int err = x->string_convert_src(src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
test_char_t tmp[512];
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_dest(tmp,sizeof(tmp)/sizeof(tmp[0]));
|
||||
|
||||
int err = x->string_convert_src(src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
test_string dst;
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
|
||||
int err = x->string_convert(dst,src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
test_string dst = x->string_convert(src);
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
delete fx;
|
||||
delete x;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
|
||||
#include "iconvpp.hpp"
|
||||
|
||||
const char *_Iconv_CommonBase::errstring(int x) {
|
||||
if (x >= 0)
|
||||
return "no error";
|
||||
else if (x == err_noinit)
|
||||
return "not initialized";
|
||||
else if (x == err_noroom)
|
||||
return "out of room";
|
||||
else if (x == err_notvalid)
|
||||
return "illegal multibyte sequence or invalid state";
|
||||
else if (x == err_incomplete)
|
||||
return "incomplete multibyte sequence";
|
||||
|
||||
return "?";
|
||||
}
|
||||
|
||||
|
||||
#include "iconvpp.hpp"
|
||||
|
||||
const char *_Iconv_CommonBase::errstring(int x) {
|
||||
if (x >= 0)
|
||||
return "no error";
|
||||
else if (x == err_noinit)
|
||||
return "not initialized";
|
||||
else if (x == err_noroom)
|
||||
return "out of room";
|
||||
else if (x == err_notvalid)
|
||||
return "illegal multibyte sequence or invalid state";
|
||||
else if (x == err_incomplete)
|
||||
return "incomplete multibyte sequence";
|
||||
|
||||
return "?";
|
||||
}
|
||||
|
||||
|
@ -1,420 +1,420 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(__MINGW32__)
|
||||
# define ICONV_LITTLE_ENDIAN 1234
|
||||
# define ICONV_BIG_ENDIAN 4321
|
||||
# define ICONV_BYTE_ORDER ICONV_LITTLE_ENDIAN
|
||||
#elif defined(__APPLE__)
|
||||
# include <libkern/OSByteOrder.h>
|
||||
# define ICONV_LITTLE_ENDIAN 1234
|
||||
# define ICONV_BIG_ENDIAN 4321
|
||||
# if defined(__LITTLE_ENDIAN__)
|
||||
# define ICONV_BYTE_ORDER ICONV_LITTLE_ENDIAN
|
||||
# elif defined(__BIG_ENDIAN__)
|
||||
# define ICONV_BYTE_ORDER ICONV_BIG_ENDIAN
|
||||
# else
|
||||
# error Unable to determine byte order
|
||||
# endif
|
||||
#else
|
||||
# include <endian.h>
|
||||
# define ICONV_BYTE_ORDER BYTE_ORDER
|
||||
# define ICONV_LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
# define ICONV_BIG_ENDIAN BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
/* no */
|
||||
#else
|
||||
# define ENABLE_ICONV 1
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
# define ENABLE_ICONV_WIN32 1
|
||||
#endif
|
||||
|
||||
/* common code to any templated version of _IconvBase */
|
||||
class _Iconv_CommonBase {
|
||||
public:
|
||||
static const char *errstring(int x);
|
||||
inline size_t get_src_last_read(void) const { /* in units of sizeof(srcT) */
|
||||
return src_adv;
|
||||
}
|
||||
inline size_t get_dest_last_written(void) const { /* in units of sizeof(dstT) */
|
||||
return dst_adv;
|
||||
}
|
||||
public:
|
||||
size_t dst_adv = 0;
|
||||
size_t src_adv = 0;
|
||||
public:
|
||||
static constexpr int err_noinit = -EBADF;
|
||||
static constexpr int err_noroom = -E2BIG;
|
||||
static constexpr int err_notvalid = -EILSEQ;
|
||||
static constexpr int err_incomplete = -EINVAL;
|
||||
protected:
|
||||
static constexpr bool big_endian(void) {
|
||||
return (ICONV_BYTE_ORDER == ICONV_BIG_ENDIAN);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename srcT,typename dstT> class _Iconv;
|
||||
|
||||
/* base _Iconv implementation, common to all implementations */
|
||||
template <typename srcT,typename dstT> class _IconvBase : public _Iconv_CommonBase {
|
||||
public:
|
||||
/* NTS: The C++ standard defines std::string as std::basic_string<char>.
|
||||
* These typedefs will match if srcT = char and dstT = char */
|
||||
typedef std::basic_string<srcT> src_string;
|
||||
typedef std::basic_string<dstT> dst_string;
|
||||
public:
|
||||
_IconvBase() { }
|
||||
virtual ~_IconvBase() { }
|
||||
public:
|
||||
void finish(void) {
|
||||
dst_ptr = NULL;
|
||||
dst_ptr_fence = NULL;
|
||||
src_ptr = NULL;
|
||||
src_ptr_fence = NULL;
|
||||
}
|
||||
|
||||
void set_dest(dstT * const dst,dstT * const dst_fence) {
|
||||
if (dst == NULL || dst_fence == NULL || dst > dst_fence)
|
||||
throw std::invalid_argument("Iconv set_dest pointer out of range");
|
||||
|
||||
dst_adv = 0;
|
||||
dst_ptr = dst;
|
||||
dst_ptr_fence = dst_fence;
|
||||
}
|
||||
void set_dest(dstT * const dst,const size_t len/*in units of sizeof(dstT)*/) {
|
||||
set_dest(dst,dst+len);
|
||||
}
|
||||
void set_dest(dstT * const dst) = delete; /* <- NO! Prevent C-string calls to std::string &dst function! */
|
||||
|
||||
void set_src(const srcT * const src,const srcT * const src_fence) {
|
||||
if (src == NULL || src_fence == NULL || src > src_fence)
|
||||
throw std::invalid_argument("Iconv set_src pointer out of range");
|
||||
|
||||
src_adv = 0;
|
||||
src_ptr = src;
|
||||
src_ptr_fence = src_fence;
|
||||
}
|
||||
void set_src(const srcT * const src,const size_t len) {
|
||||
set_src(src,src+len);
|
||||
}
|
||||
void set_src(const srcT * const src) { // C-string
|
||||
set_src(src,my_strlen(src));
|
||||
}
|
||||
public:
|
||||
virtual int _do_convert(void) {
|
||||
return err_noinit;
|
||||
}
|
||||
int string_convert(dst_string &dst,const src_string &src) {
|
||||
dst.resize(std::max(dst.size(),((src.length()+4u)*4u)+2u)); // maximum 4 bytes/char expansion UTF-8 or bigger if caller resized already
|
||||
set_dest(dst); /* will apply new size to dst/fence pointers */
|
||||
|
||||
int err = string_convert_src(src);
|
||||
|
||||
dst.resize(get_dest_last_written());
|
||||
|
||||
finish();
|
||||
return err;
|
||||
}
|
||||
int string_convert(void) {
|
||||
if (dst_ptr == NULL || src_ptr == NULL)
|
||||
return err_notvalid;
|
||||
if (dst_ptr > dst_ptr_fence)
|
||||
return err_notvalid;
|
||||
if (src_ptr > src_ptr_fence)
|
||||
return err_notvalid;
|
||||
|
||||
int ret = _do_convert();
|
||||
|
||||
if (ret >= 0) {
|
||||
/* add NUL */
|
||||
if (dst_ptr >= dst_ptr_fence)
|
||||
return err_noroom;
|
||||
|
||||
*dst_ptr++ = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
int string_convert_dest(dst_string &dst) {
|
||||
size_t srcl = (size_t)((uintptr_t)src_ptr_fence - (uintptr_t)src_ptr);
|
||||
|
||||
dst.resize(std::max(dst.size(),((srcl+4u)*4u)+2u));
|
||||
set_dest(dst);
|
||||
|
||||
int err = string_convert();
|
||||
|
||||
finish();
|
||||
return err;
|
||||
}
|
||||
int string_convert_src(const src_string &src) {
|
||||
set_src(src);
|
||||
|
||||
int err = string_convert();
|
||||
|
||||
finish();
|
||||
return err;
|
||||
}
|
||||
dst_string string_convert(const src_string &src) {
|
||||
dst_string res;
|
||||
|
||||
string_convert(res,src);
|
||||
|
||||
return res;
|
||||
}
|
||||
public:
|
||||
inline bool eof(void) const {
|
||||
return src_ptr >= src_ptr_fence;
|
||||
}
|
||||
inline bool eof_dest(void) const {
|
||||
return dst_ptr >= dst_ptr_fence;
|
||||
}
|
||||
inline const srcT *get_srcp(void) const {
|
||||
return src_ptr;
|
||||
}
|
||||
inline const dstT *get_destp(void) const {
|
||||
return dst_ptr;
|
||||
}
|
||||
protected:
|
||||
static inline size_t my_strlen(const char *s) {
|
||||
return strlen(s);
|
||||
}
|
||||
static inline size_t my_strlen(const wchar_t *s) {
|
||||
return wcslen(s);
|
||||
}
|
||||
template <typename X> static inline size_t my_strlen(const X *s) {
|
||||
size_t c = 0;
|
||||
|
||||
while ((*s++) != 0) c++;
|
||||
|
||||
return c;
|
||||
}
|
||||
protected:
|
||||
void set_dest(dst_string &dst) { /* PRIVATE: External use can easily cause use-after-free bugs */
|
||||
set_dest(&dst[0],dst.size());
|
||||
}
|
||||
void set_src(const src_string &src) { /* PRIVATE: External use can easily cause use-after-free bugs */
|
||||
set_src(src.c_str(),src.length());
|
||||
}
|
||||
protected:
|
||||
dstT* dst_ptr = NULL;
|
||||
dstT* dst_ptr_fence = NULL;
|
||||
const srcT* src_ptr = NULL;
|
||||
const srcT* src_ptr_fence = NULL;
|
||||
|
||||
friend _Iconv<srcT,dstT>;
|
||||
};
|
||||
|
||||
#if defined(ENABLE_ICONV)
|
||||
# include <iconv.h>
|
||||
|
||||
/* _Iconv implementation of _IconvBase using GNU libiconv or GLIBC iconv, for Linux and Mac OS X systems. */
|
||||
/* See also: "man iconv"
|
||||
* See also: [http://man7.org/linux/man-pages/man3/iconv.3.html] */
|
||||
template <typename srcT,typename dstT> class _Iconv : public _IconvBase<srcT,dstT> {
|
||||
protected:
|
||||
using pclass = _IconvBase<srcT,dstT>;
|
||||
public:
|
||||
explicit _Iconv(const iconv_t &ctx) : context(ctx) {/* takes ownership of ctx */
|
||||
}
|
||||
_Iconv(const _Iconv *p) = delete;
|
||||
_Iconv(const _Iconv &other) = delete; /* no copying */
|
||||
_Iconv(const _Iconv &&other) = delete; /* no moving */
|
||||
_Iconv() = delete;
|
||||
virtual ~_Iconv() {
|
||||
close();
|
||||
}
|
||||
public:
|
||||
virtual int _do_convert(void) {
|
||||
if (context != NULL) {
|
||||
dstT *i_dst = pclass::dst_ptr;
|
||||
const srcT *i_src = pclass::src_ptr;
|
||||
size_t src_left = (size_t)((uintptr_t)((char*)pclass::src_ptr_fence) - (uintptr_t)((char*)pclass::src_ptr));
|
||||
size_t dst_left = (size_t)((uintptr_t)((char*)pclass::dst_ptr_fence) - (uintptr_t)((char*)pclass::dst_ptr));
|
||||
|
||||
iconv(context,NULL,NULL,NULL,NULL);
|
||||
|
||||
/* Ref: [http://man7.org/linux/man-pages/man3/iconv.3.html] */
|
||||
int ret = iconv(context,(char**)(&(pclass::src_ptr)),&src_left,(char**)(&(pclass::dst_ptr)),&dst_left);
|
||||
|
||||
pclass::src_adv = (size_t)(pclass::src_ptr - i_src);
|
||||
pclass::dst_adv = (size_t)(pclass::dst_ptr - i_dst);
|
||||
|
||||
if (ret < 0) {
|
||||
if (errno == E2BIG)
|
||||
return pclass::err_noroom;
|
||||
else if (errno == EILSEQ)
|
||||
return pclass::err_notvalid;
|
||||
else if (errno == EINVAL)
|
||||
return pclass::err_incomplete;
|
||||
|
||||
return pclass::err_notvalid;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
return pclass::err_noinit;
|
||||
}
|
||||
public:
|
||||
static _Iconv<srcT,dstT> *create(const char *nw) { /* factory function, wide to char, or char to wide */
|
||||
if (sizeof(dstT) == sizeof(char) && sizeof(srcT) > sizeof(char)) {
|
||||
const char *wchar_encoding = _get_wchar_encoding<srcT>();
|
||||
if (wchar_encoding == NULL) return NULL;
|
||||
|
||||
iconv_t ctx = iconv_open(/*TO*/nw,/*FROM*/wchar_encoding); /* from wchar to codepage nw */
|
||||
if (ctx != iconv_t(-1)) return new(std::nothrow) _Iconv<srcT,dstT>(ctx);
|
||||
}
|
||||
else if (sizeof(dstT) > sizeof(char) && sizeof(srcT) == sizeof(char)) {
|
||||
const char *wchar_encoding = _get_wchar_encoding<dstT>();
|
||||
if (wchar_encoding == NULL) return NULL;
|
||||
|
||||
iconv_t ctx = iconv_open(/*TO*/wchar_encoding,/*FROM*/nw); /* from codepage new to wchar */
|
||||
if (ctx != iconv_t(-1)) return new(std::nothrow) _Iconv<srcT,dstT>(ctx);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
static _Iconv<srcT,dstT> *create(const char *to,const char *from) { /* factory function */
|
||||
if (sizeof(dstT) == sizeof(char) && sizeof(srcT) == sizeof(char)) {
|
||||
iconv_t ctx = iconv_open(to,from);
|
||||
if (ctx != iconv_t(-1)) return new(std::nothrow) _Iconv<srcT,dstT>(ctx);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
protected:
|
||||
void close(void) {
|
||||
if (context != NULL) {
|
||||
iconv_close(context);
|
||||
context = NULL;
|
||||
}
|
||||
}
|
||||
template <typename W> static const char *_get_wchar_encoding(void) {
|
||||
if (sizeof(W) == 4)
|
||||
return pclass::big_endian() ? "UTF-32BE" : "UTF-32LE";
|
||||
else if (sizeof(W) == 2)
|
||||
return pclass::big_endian() ? "UTF-16BE" : "UTF-16LE";
|
||||
|
||||
return NULL;
|
||||
}
|
||||
protected:
|
||||
iconv_t context = NULL;
|
||||
};
|
||||
|
||||
/* Most of the time the Iconv form will be used, for Mac OS X and Linux platforms where UTF-8 is common.
|
||||
*
|
||||
* Conversion to/from wchar is intended for platforms like Microsoft Windows 98/ME/2000/XP/Vista/7/8/10/etc
|
||||
* where the Win32 API functions take WCHAR (UTF-16 or UCS-16), in which case, the code will continue to
|
||||
* use UTF-8 internally but convert to WCHAR when needed. For example, Win32 function CreateFileW().
|
||||
*
|
||||
* Note that because of the UTF-16 world of Windows, Microsoft C++ defines wchar_t as an unsigned 16-bit
|
||||
* integer.
|
||||
*
|
||||
* Linux and other OSes however define wchar_t as a 32-bit integer, but do not use wchar_t APIs, and often
|
||||
* instead use UTF-8 for unicode, so the wchar_t versions will not see much use there. */
|
||||
typedef _Iconv<char,char> Iconv;
|
||||
typedef _Iconv<char,wchar_t> IconvToW;
|
||||
typedef _Iconv<wchar_t,char> IconvFromW;
|
||||
|
||||
#endif // ENABLE_ICONV
|
||||
|
||||
#if defined(ENABLE_ICONV_WIN32)
|
||||
# include <windows.h>
|
||||
|
||||
/* Alternative implementation (char to WCHAR, or WCHAR to char only) using Microsoft Win32 APIs instead of libiconv.
|
||||
* For use with embedded or low memory Windows installations or environments where the added load of libiconv would
|
||||
* be undesirable. */
|
||||
|
||||
/* _IconvWin32 implementation of _IconvBase using Microsoft Win32 code page and WCHAR support functions for Windows 2000/XP/Vista/7/8/10/etc */
|
||||
template <typename srcT,typename dstT> class _IconvWin32 : public _IconvBase<srcT,dstT> {
|
||||
protected:
|
||||
using pclass = _IconvBase<srcT,dstT>;
|
||||
public:
|
||||
explicit _IconvWin32(const UINT _codepage) : codepage(_codepage) {
|
||||
}
|
||||
_IconvWin32(const _IconvWin32 *p) = delete;
|
||||
_IconvWin32(const _IconvWin32 &other) = delete; /* no copying */
|
||||
_IconvWin32(const _IconvWin32 &&other) = delete; /* no moving */
|
||||
_IconvWin32() = delete;
|
||||
virtual ~_IconvWin32() {
|
||||
}
|
||||
public:
|
||||
virtual int _do_convert(void) {
|
||||
if (codepage != 0u) {
|
||||
size_t src_left = (size_t)((uintptr_t)((char*)pclass::src_ptr_fence) - (uintptr_t)((char*)pclass::src_ptr));
|
||||
size_t dst_left = (size_t)((uintptr_t)((char*)pclass::dst_ptr_fence) - (uintptr_t)((char*)pclass::dst_ptr));
|
||||
int ret;
|
||||
|
||||
if (sizeof(dstT) == sizeof(char) && sizeof(srcT) == sizeof(WCHAR)) {
|
||||
/* Convert wide char to multibyte using the Win32 API.
|
||||
* See also: [https://docs.microsoft.com/en-us/windows/desktop/api/stringapiset/nf-stringapiset-widechartomultibyte] */
|
||||
ret = WideCharToMultiByte(codepage,0,(WCHAR*)pclass::src_ptr,src_left/sizeof(srcT),(char*)pclass::dst_ptr,dst_left,NULL,NULL);
|
||||
pclass::src_adv = src_left;
|
||||
pclass::src_ptr += pclass::src_adv;
|
||||
pclass::dst_adv = ret;
|
||||
pclass::dst_ptr += pclass::dst_adv;
|
||||
}
|
||||
else if (sizeof(dstT) == sizeof(WCHAR) && sizeof(srcT) == sizeof(char)) {
|
||||
/* Convert multibyte to wide char using the Win32 API.
|
||||
* See also: [https://docs.microsoft.com/en-us/windows/desktop/api/stringapiset/nf-stringapiset-multibytetowidechar] */
|
||||
ret = MultiByteToWideChar(codepage,0,(char*)pclass::src_ptr,src_left,(WCHAR*)pclass::dst_ptr,dst_left/sizeof(dstT));
|
||||
pclass::src_adv = src_left;
|
||||
pclass::src_ptr += pclass::src_adv;
|
||||
pclass::dst_adv = ret;
|
||||
pclass::dst_ptr += pclass::dst_adv;
|
||||
}
|
||||
else {
|
||||
pclass::src_adv = 0;
|
||||
pclass::dst_adv = 0;
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
DWORD err = GetLastError();
|
||||
|
||||
if (err == ERROR_INSUFFICIENT_BUFFER)
|
||||
return pclass::err_noroom;
|
||||
else if (err == ERROR_NO_UNICODE_TRANSLATION)
|
||||
return pclass::err_notvalid;
|
||||
|
||||
return pclass::err_noinit;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return pclass::err_noinit;
|
||||
}
|
||||
public:
|
||||
static _IconvWin32<srcT,dstT> *create(const UINT codepage) { /* factory function, WCHAR to char or char to WCHAR */
|
||||
CPINFO cpi;
|
||||
|
||||
/* Test whether the code page exists */
|
||||
if (!GetCPInfo(codepage,&cpi))
|
||||
return NULL;
|
||||
|
||||
if ((sizeof(dstT) == sizeof(char) && sizeof(srcT) == sizeof(WCHAR)) ||
|
||||
(sizeof(dstT) == sizeof(WCHAR) && sizeof(srcT) == sizeof(char)))
|
||||
return new(std::nothrow) _IconvWin32<srcT,dstT>(codepage);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
protected:
|
||||
UINT codepage = 0;
|
||||
};
|
||||
|
||||
typedef _IconvWin32<char,WCHAR> IconvWin32ToW;
|
||||
typedef _IconvWin32<WCHAR,char> IconvWin32FromW;
|
||||
|
||||
#endif // ENABLE_ICONV_WIN32
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(__MINGW32__)
|
||||
# define ICONV_LITTLE_ENDIAN 1234
|
||||
# define ICONV_BIG_ENDIAN 4321
|
||||
# define ICONV_BYTE_ORDER ICONV_LITTLE_ENDIAN
|
||||
#elif defined(__APPLE__)
|
||||
# include <libkern/OSByteOrder.h>
|
||||
# define ICONV_LITTLE_ENDIAN 1234
|
||||
# define ICONV_BIG_ENDIAN 4321
|
||||
# if defined(__LITTLE_ENDIAN__)
|
||||
# define ICONV_BYTE_ORDER ICONV_LITTLE_ENDIAN
|
||||
# elif defined(__BIG_ENDIAN__)
|
||||
# define ICONV_BYTE_ORDER ICONV_BIG_ENDIAN
|
||||
# else
|
||||
# error Unable to determine byte order
|
||||
# endif
|
||||
#else
|
||||
# include <endian.h>
|
||||
# define ICONV_BYTE_ORDER BYTE_ORDER
|
||||
# define ICONV_LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
# define ICONV_BIG_ENDIAN BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
/* no */
|
||||
#else
|
||||
# define ENABLE_ICONV 1
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
# define ENABLE_ICONV_WIN32 1
|
||||
#endif
|
||||
|
||||
/* common code to any templated version of _IconvBase */
|
||||
class _Iconv_CommonBase {
|
||||
public:
|
||||
static const char *errstring(int x);
|
||||
inline size_t get_src_last_read(void) const { /* in units of sizeof(srcT) */
|
||||
return src_adv;
|
||||
}
|
||||
inline size_t get_dest_last_written(void) const { /* in units of sizeof(dstT) */
|
||||
return dst_adv;
|
||||
}
|
||||
public:
|
||||
size_t dst_adv = 0;
|
||||
size_t src_adv = 0;
|
||||
public:
|
||||
static constexpr int err_noinit = -EBADF;
|
||||
static constexpr int err_noroom = -E2BIG;
|
||||
static constexpr int err_notvalid = -EILSEQ;
|
||||
static constexpr int err_incomplete = -EINVAL;
|
||||
protected:
|
||||
static constexpr bool big_endian(void) {
|
||||
return (ICONV_BYTE_ORDER == ICONV_BIG_ENDIAN);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename srcT,typename dstT> class _Iconv;
|
||||
|
||||
/* base _Iconv implementation, common to all implementations */
|
||||
template <typename srcT,typename dstT> class _IconvBase : public _Iconv_CommonBase {
|
||||
public:
|
||||
/* NTS: The C++ standard defines std::string as std::basic_string<char>.
|
||||
* These typedefs will match if srcT = char and dstT = char */
|
||||
typedef std::basic_string<srcT> src_string;
|
||||
typedef std::basic_string<dstT> dst_string;
|
||||
public:
|
||||
_IconvBase() { }
|
||||
virtual ~_IconvBase() { }
|
||||
public:
|
||||
void finish(void) {
|
||||
dst_ptr = NULL;
|
||||
dst_ptr_fence = NULL;
|
||||
src_ptr = NULL;
|
||||
src_ptr_fence = NULL;
|
||||
}
|
||||
|
||||
void set_dest(dstT * const dst,dstT * const dst_fence) {
|
||||
if (dst == NULL || dst_fence == NULL || dst > dst_fence)
|
||||
throw std::invalid_argument("Iconv set_dest pointer out of range");
|
||||
|
||||
dst_adv = 0;
|
||||
dst_ptr = dst;
|
||||
dst_ptr_fence = dst_fence;
|
||||
}
|
||||
void set_dest(dstT * const dst,const size_t len/*in units of sizeof(dstT)*/) {
|
||||
set_dest(dst,dst+len);
|
||||
}
|
||||
void set_dest(dstT * const dst) = delete; /* <- NO! Prevent C-string calls to std::string &dst function! */
|
||||
|
||||
void set_src(const srcT * const src,const srcT * const src_fence) {
|
||||
if (src == NULL || src_fence == NULL || src > src_fence)
|
||||
throw std::invalid_argument("Iconv set_src pointer out of range");
|
||||
|
||||
src_adv = 0;
|
||||
src_ptr = src;
|
||||
src_ptr_fence = src_fence;
|
||||
}
|
||||
void set_src(const srcT * const src,const size_t len) {
|
||||
set_src(src,src+len);
|
||||
}
|
||||
void set_src(const srcT * const src) { // C-string
|
||||
set_src(src,my_strlen(src));
|
||||
}
|
||||
public:
|
||||
virtual int _do_convert(void) {
|
||||
return err_noinit;
|
||||
}
|
||||
int string_convert(dst_string &dst,const src_string &src) {
|
||||
dst.resize(std::max(dst.size(),((src.length()+4u)*4u)+2u)); // maximum 4 bytes/char expansion UTF-8 or bigger if caller resized already
|
||||
set_dest(dst); /* will apply new size to dst/fence pointers */
|
||||
|
||||
int err = string_convert_src(src);
|
||||
|
||||
dst.resize(get_dest_last_written());
|
||||
|
||||
finish();
|
||||
return err;
|
||||
}
|
||||
int string_convert(void) {
|
||||
if (dst_ptr == NULL || src_ptr == NULL)
|
||||
return err_notvalid;
|
||||
if (dst_ptr > dst_ptr_fence)
|
||||
return err_notvalid;
|
||||
if (src_ptr > src_ptr_fence)
|
||||
return err_notvalid;
|
||||
|
||||
int ret = _do_convert();
|
||||
|
||||
if (ret >= 0) {
|
||||
/* add NUL */
|
||||
if (dst_ptr >= dst_ptr_fence)
|
||||
return err_noroom;
|
||||
|
||||
*dst_ptr++ = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
int string_convert_dest(dst_string &dst) {
|
||||
size_t srcl = (size_t)((uintptr_t)src_ptr_fence - (uintptr_t)src_ptr);
|
||||
|
||||
dst.resize(std::max(dst.size(),((srcl+4u)*4u)+2u));
|
||||
set_dest(dst);
|
||||
|
||||
int err = string_convert();
|
||||
|
||||
finish();
|
||||
return err;
|
||||
}
|
||||
int string_convert_src(const src_string &src) {
|
||||
set_src(src);
|
||||
|
||||
int err = string_convert();
|
||||
|
||||
finish();
|
||||
return err;
|
||||
}
|
||||
dst_string string_convert(const src_string &src) {
|
||||
dst_string res;
|
||||
|
||||
string_convert(res,src);
|
||||
|
||||
return res;
|
||||
}
|
||||
public:
|
||||
inline bool eof(void) const {
|
||||
return src_ptr >= src_ptr_fence;
|
||||
}
|
||||
inline bool eof_dest(void) const {
|
||||
return dst_ptr >= dst_ptr_fence;
|
||||
}
|
||||
inline const srcT *get_srcp(void) const {
|
||||
return src_ptr;
|
||||
}
|
||||
inline const dstT *get_destp(void) const {
|
||||
return dst_ptr;
|
||||
}
|
||||
protected:
|
||||
static inline size_t my_strlen(const char *s) {
|
||||
return strlen(s);
|
||||
}
|
||||
static inline size_t my_strlen(const wchar_t *s) {
|
||||
return wcslen(s);
|
||||
}
|
||||
template <typename X> static inline size_t my_strlen(const X *s) {
|
||||
size_t c = 0;
|
||||
|
||||
while ((*s++) != 0) c++;
|
||||
|
||||
return c;
|
||||
}
|
||||
protected:
|
||||
void set_dest(dst_string &dst) { /* PRIVATE: External use can easily cause use-after-free bugs */
|
||||
set_dest(&dst[0],dst.size());
|
||||
}
|
||||
void set_src(const src_string &src) { /* PRIVATE: External use can easily cause use-after-free bugs */
|
||||
set_src(src.c_str(),src.length());
|
||||
}
|
||||
protected:
|
||||
dstT* dst_ptr = NULL;
|
||||
dstT* dst_ptr_fence = NULL;
|
||||
const srcT* src_ptr = NULL;
|
||||
const srcT* src_ptr_fence = NULL;
|
||||
|
||||
friend _Iconv<srcT,dstT>;
|
||||
};
|
||||
|
||||
#if defined(ENABLE_ICONV)
|
||||
# include <iconv.h>
|
||||
|
||||
/* _Iconv implementation of _IconvBase using GNU libiconv or GLIBC iconv, for Linux and Mac OS X systems. */
|
||||
/* See also: "man iconv"
|
||||
* See also: [http://man7.org/linux/man-pages/man3/iconv.3.html] */
|
||||
template <typename srcT,typename dstT> class _Iconv : public _IconvBase<srcT,dstT> {
|
||||
protected:
|
||||
using pclass = _IconvBase<srcT,dstT>;
|
||||
public:
|
||||
explicit _Iconv(const iconv_t &ctx) : context(ctx) {/* takes ownership of ctx */
|
||||
}
|
||||
_Iconv(const _Iconv *p) = delete;
|
||||
_Iconv(const _Iconv &other) = delete; /* no copying */
|
||||
_Iconv(const _Iconv &&other) = delete; /* no moving */
|
||||
_Iconv() = delete;
|
||||
virtual ~_Iconv() {
|
||||
close();
|
||||
}
|
||||
public:
|
||||
virtual int _do_convert(void) {
|
||||
if (context != NULL) {
|
||||
dstT *i_dst = pclass::dst_ptr;
|
||||
const srcT *i_src = pclass::src_ptr;
|
||||
size_t src_left = (size_t)((uintptr_t)((char*)pclass::src_ptr_fence) - (uintptr_t)((char*)pclass::src_ptr));
|
||||
size_t dst_left = (size_t)((uintptr_t)((char*)pclass::dst_ptr_fence) - (uintptr_t)((char*)pclass::dst_ptr));
|
||||
|
||||
iconv(context,NULL,NULL,NULL,NULL);
|
||||
|
||||
/* Ref: [http://man7.org/linux/man-pages/man3/iconv.3.html] */
|
||||
int ret = iconv(context,(char**)(&(pclass::src_ptr)),&src_left,(char**)(&(pclass::dst_ptr)),&dst_left);
|
||||
|
||||
pclass::src_adv = (size_t)(pclass::src_ptr - i_src);
|
||||
pclass::dst_adv = (size_t)(pclass::dst_ptr - i_dst);
|
||||
|
||||
if (ret < 0) {
|
||||
if (errno == E2BIG)
|
||||
return pclass::err_noroom;
|
||||
else if (errno == EILSEQ)
|
||||
return pclass::err_notvalid;
|
||||
else if (errno == EINVAL)
|
||||
return pclass::err_incomplete;
|
||||
|
||||
return pclass::err_notvalid;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
return pclass::err_noinit;
|
||||
}
|
||||
public:
|
||||
static _Iconv<srcT,dstT> *create(const char *nw) { /* factory function, wide to char, or char to wide */
|
||||
if (sizeof(dstT) == sizeof(char) && sizeof(srcT) > sizeof(char)) {
|
||||
const char *wchar_encoding = _get_wchar_encoding<srcT>();
|
||||
if (wchar_encoding == NULL) return NULL;
|
||||
|
||||
iconv_t ctx = iconv_open(/*TO*/nw,/*FROM*/wchar_encoding); /* from wchar to codepage nw */
|
||||
if (ctx != iconv_t(-1)) return new(std::nothrow) _Iconv<srcT,dstT>(ctx);
|
||||
}
|
||||
else if (sizeof(dstT) > sizeof(char) && sizeof(srcT) == sizeof(char)) {
|
||||
const char *wchar_encoding = _get_wchar_encoding<dstT>();
|
||||
if (wchar_encoding == NULL) return NULL;
|
||||
|
||||
iconv_t ctx = iconv_open(/*TO*/wchar_encoding,/*FROM*/nw); /* from codepage new to wchar */
|
||||
if (ctx != iconv_t(-1)) return new(std::nothrow) _Iconv<srcT,dstT>(ctx);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
static _Iconv<srcT,dstT> *create(const char *to,const char *from) { /* factory function */
|
||||
if (sizeof(dstT) == sizeof(char) && sizeof(srcT) == sizeof(char)) {
|
||||
iconv_t ctx = iconv_open(to,from);
|
||||
if (ctx != iconv_t(-1)) return new(std::nothrow) _Iconv<srcT,dstT>(ctx);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
protected:
|
||||
void close(void) {
|
||||
if (context != NULL) {
|
||||
iconv_close(context);
|
||||
context = NULL;
|
||||
}
|
||||
}
|
||||
template <typename W> static const char *_get_wchar_encoding(void) {
|
||||
if (sizeof(W) == 4)
|
||||
return pclass::big_endian() ? "UTF-32BE" : "UTF-32LE";
|
||||
else if (sizeof(W) == 2)
|
||||
return pclass::big_endian() ? "UTF-16BE" : "UTF-16LE";
|
||||
|
||||
return NULL;
|
||||
}
|
||||
protected:
|
||||
iconv_t context = NULL;
|
||||
};
|
||||
|
||||
/* Most of the time the Iconv form will be used, for Mac OS X and Linux platforms where UTF-8 is common.
|
||||
*
|
||||
* Conversion to/from wchar is intended for platforms like Microsoft Windows 98/ME/2000/XP/Vista/7/8/10/etc
|
||||
* where the Win32 API functions take WCHAR (UTF-16 or UCS-16), in which case, the code will continue to
|
||||
* use UTF-8 internally but convert to WCHAR when needed. For example, Win32 function CreateFileW().
|
||||
*
|
||||
* Note that because of the UTF-16 world of Windows, Microsoft C++ defines wchar_t as an unsigned 16-bit
|
||||
* integer.
|
||||
*
|
||||
* Linux and other OSes however define wchar_t as a 32-bit integer, but do not use wchar_t APIs, and often
|
||||
* instead use UTF-8 for unicode, so the wchar_t versions will not see much use there. */
|
||||
typedef _Iconv<char,char> Iconv;
|
||||
typedef _Iconv<char,wchar_t> IconvToW;
|
||||
typedef _Iconv<wchar_t,char> IconvFromW;
|
||||
|
||||
#endif // ENABLE_ICONV
|
||||
|
||||
#if defined(ENABLE_ICONV_WIN32)
|
||||
# include <windows.h>
|
||||
|
||||
/* Alternative implementation (char to WCHAR, or WCHAR to char only) using Microsoft Win32 APIs instead of libiconv.
|
||||
* For use with embedded or low memory Windows installations or environments where the added load of libiconv would
|
||||
* be undesirable. */
|
||||
|
||||
/* _IconvWin32 implementation of _IconvBase using Microsoft Win32 code page and WCHAR support functions for Windows 2000/XP/Vista/7/8/10/etc */
|
||||
template <typename srcT,typename dstT> class _IconvWin32 : public _IconvBase<srcT,dstT> {
|
||||
protected:
|
||||
using pclass = _IconvBase<srcT,dstT>;
|
||||
public:
|
||||
explicit _IconvWin32(const UINT _codepage) : codepage(_codepage) {
|
||||
}
|
||||
_IconvWin32(const _IconvWin32 *p) = delete;
|
||||
_IconvWin32(const _IconvWin32 &other) = delete; /* no copying */
|
||||
_IconvWin32(const _IconvWin32 &&other) = delete; /* no moving */
|
||||
_IconvWin32() = delete;
|
||||
virtual ~_IconvWin32() {
|
||||
}
|
||||
public:
|
||||
virtual int _do_convert(void) {
|
||||
if (codepage != 0u) {
|
||||
size_t src_left = (size_t)((uintptr_t)((char*)pclass::src_ptr_fence) - (uintptr_t)((char*)pclass::src_ptr));
|
||||
size_t dst_left = (size_t)((uintptr_t)((char*)pclass::dst_ptr_fence) - (uintptr_t)((char*)pclass::dst_ptr));
|
||||
int ret;
|
||||
|
||||
if (sizeof(dstT) == sizeof(char) && sizeof(srcT) == sizeof(WCHAR)) {
|
||||
/* Convert wide char to multibyte using the Win32 API.
|
||||
* See also: [https://docs.microsoft.com/en-us/windows/desktop/api/stringapiset/nf-stringapiset-widechartomultibyte] */
|
||||
ret = WideCharToMultiByte(codepage,0,(WCHAR*)pclass::src_ptr,src_left/sizeof(srcT),(char*)pclass::dst_ptr,dst_left,NULL,NULL);
|
||||
pclass::src_adv = src_left;
|
||||
pclass::src_ptr += pclass::src_adv;
|
||||
pclass::dst_adv = ret;
|
||||
pclass::dst_ptr += pclass::dst_adv;
|
||||
}
|
||||
else if (sizeof(dstT) == sizeof(WCHAR) && sizeof(srcT) == sizeof(char)) {
|
||||
/* Convert multibyte to wide char using the Win32 API.
|
||||
* See also: [https://docs.microsoft.com/en-us/windows/desktop/api/stringapiset/nf-stringapiset-multibytetowidechar] */
|
||||
ret = MultiByteToWideChar(codepage,0,(char*)pclass::src_ptr,src_left,(WCHAR*)pclass::dst_ptr,dst_left/sizeof(dstT));
|
||||
pclass::src_adv = src_left;
|
||||
pclass::src_ptr += pclass::src_adv;
|
||||
pclass::dst_adv = ret;
|
||||
pclass::dst_ptr += pclass::dst_adv;
|
||||
}
|
||||
else {
|
||||
pclass::src_adv = 0;
|
||||
pclass::dst_adv = 0;
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
DWORD err = GetLastError();
|
||||
|
||||
if (err == ERROR_INSUFFICIENT_BUFFER)
|
||||
return pclass::err_noroom;
|
||||
else if (err == ERROR_NO_UNICODE_TRANSLATION)
|
||||
return pclass::err_notvalid;
|
||||
|
||||
return pclass::err_noinit;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return pclass::err_noinit;
|
||||
}
|
||||
public:
|
||||
static _IconvWin32<srcT,dstT> *create(const UINT codepage) { /* factory function, WCHAR to char or char to WCHAR */
|
||||
CPINFO cpi;
|
||||
|
||||
/* Test whether the code page exists */
|
||||
if (!GetCPInfo(codepage,&cpi))
|
||||
return NULL;
|
||||
|
||||
if ((sizeof(dstT) == sizeof(char) && sizeof(srcT) == sizeof(WCHAR)) ||
|
||||
(sizeof(dstT) == sizeof(WCHAR) && sizeof(srcT) == sizeof(char)))
|
||||
return new(std::nothrow) _IconvWin32<srcT,dstT>(codepage);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
protected:
|
||||
UINT codepage = 0;
|
||||
};
|
||||
|
||||
typedef _IconvWin32<char,WCHAR> IconvWin32ToW;
|
||||
typedef _IconvWin32<WCHAR,char> IconvWin32FromW;
|
||||
|
||||
#endif // ENABLE_ICONV_WIN32
|
||||
|
||||
|
@ -1,134 +1,134 @@
|
||||
|
||||
#include "iconvpp.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
// borrowed from DOSLIB
|
||||
#define THIS_IS_JAPANESE "\x82\xb1\x82\xea\x82\xcd\x93\xfa\x96\x7b\x8c\xea\x82\xc5\x82\xb7"/* UTF-8 to Shift-JIS of "これは日本語です" */
|
||||
|
||||
int main() {
|
||||
#if defined(ENABLE_ICONV_WIN32)
|
||||
IconvWin32ToW *x = IconvWin32ToW::create(/*FROM*/932);
|
||||
if (x == NULL) {
|
||||
cerr << "Failed to create context" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
IconvWin32FromW *fx = IconvWin32FromW::create(CP_UTF8);
|
||||
if (fx == NULL) {
|
||||
cerr << "Failed to create context" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
{
|
||||
WCHAR tmp[512];
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_src(src);
|
||||
x->set_dest(tmp,sizeof(tmp));
|
||||
|
||||
int err = x->string_convert();
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
|
||||
x->finish();
|
||||
}
|
||||
|
||||
{
|
||||
std::wstring dst;
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_src(src);
|
||||
|
||||
int err = x->string_convert_dest(dst);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
WCHAR tmp[512];
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_dest(tmp,sizeof(tmp));
|
||||
|
||||
int err = x->string_convert_src(src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
WCHAR tmp[512];
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_dest(tmp,sizeof(tmp));
|
||||
|
||||
int err = x->string_convert_src(src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
std::wstring dst;
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
|
||||
int err = x->string_convert(dst,src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
std::wstring dst = x->string_convert(src);
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
delete fx;
|
||||
delete x;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#include "iconvpp.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
// borrowed from DOSLIB
|
||||
#define THIS_IS_JAPANESE "\x82\xb1\x82\xea\x82\xcd\x93\xfa\x96\x7b\x8c\xea\x82\xc5\x82\xb7"/* UTF-8 to Shift-JIS of "これは日本語です" */
|
||||
|
||||
int main() {
|
||||
#if defined(ENABLE_ICONV_WIN32)
|
||||
IconvWin32ToW *x = IconvWin32ToW::create(/*FROM*/932);
|
||||
if (x == NULL) {
|
||||
cerr << "Failed to create context" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
IconvWin32FromW *fx = IconvWin32FromW::create(CP_UTF8);
|
||||
if (fx == NULL) {
|
||||
cerr << "Failed to create context" << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
{
|
||||
WCHAR tmp[512];
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_src(src);
|
||||
x->set_dest(tmp,sizeof(tmp));
|
||||
|
||||
int err = x->string_convert();
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
|
||||
x->finish();
|
||||
}
|
||||
|
||||
{
|
||||
std::wstring dst;
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_src(src);
|
||||
|
||||
int err = x->string_convert_dest(dst);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
WCHAR tmp[512];
|
||||
const char *src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_dest(tmp,sizeof(tmp));
|
||||
|
||||
int err = x->string_convert_src(src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
WCHAR tmp[512];
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
|
||||
x->set_dest(tmp,sizeof(tmp));
|
||||
|
||||
int err = x->string_convert_src(src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(tmp) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
std::wstring dst;
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
|
||||
int err = x->string_convert(dst,src);
|
||||
|
||||
if (err < 0) {
|
||||
cerr << "Conversion failed, " << Iconv::errstring(err) << endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
{
|
||||
const std::string src = THIS_IS_JAPANESE;
|
||||
std::wstring dst = x->string_convert(src);
|
||||
|
||||
cout << "Test 1: " << src << endl;
|
||||
cout << " Res: " << fx->string_convert(dst) << endl;
|
||||
cout << " Read: " << x->get_src_last_read() << endl;
|
||||
cout << " Wrote: " << x->get_dest_last_written() << endl;
|
||||
}
|
||||
|
||||
delete fx;
|
||||
delete x;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,149 +1,149 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern "C" {
|
||||
#include <squirrel.h>
|
||||
#include <sqstdio.h>
|
||||
#include <sqstdblob.h>
|
||||
#include <sqstdsystem.h>
|
||||
#include <sqstdio.h>
|
||||
#include <sqstdmath.h>
|
||||
#include <sqstdstring.h>
|
||||
#include <sqstdaux.h>
|
||||
}
|
||||
|
||||
#ifdef SQUNICODE
|
||||
#define scfprintf fwprintf
|
||||
#define scvprintf vfwprintf
|
||||
#else
|
||||
#define scfprintf fprintf
|
||||
#define scvprintf vfprintf
|
||||
#endif
|
||||
|
||||
SQInteger hello1(HSQUIRRELVM v) {
|
||||
printf("hello1 ");
|
||||
SQInteger mx = sq_gettop(v);
|
||||
for (SQInteger n=1;n <= mx;n++) {
|
||||
switch (sq_gettype(v,n)) {
|
||||
case OT_NULL:
|
||||
printf("(null) ");
|
||||
break;
|
||||
case OT_INTEGER: {
|
||||
SQInteger i = 0;
|
||||
sq_getinteger(v,n,&i);
|
||||
printf("%lld ",(long long)i);
|
||||
} break;
|
||||
case OT_FLOAT: {
|
||||
SQFloat i = 0;
|
||||
sq_getfloat(v,n,&i);
|
||||
printf("%.3f ",(double)i);
|
||||
} break;
|
||||
case OT_STRING: {
|
||||
const SQChar *i = NULL;
|
||||
sq_getstring(v,n,&i);
|
||||
printf("\"%s\" ",(const char*)i);
|
||||
} break;
|
||||
case OT_CLOSURE: {
|
||||
printf("(closure) ");
|
||||
} break;
|
||||
case OT_NATIVECLOSURE: {
|
||||
printf("(native closure) ");
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void printfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...)
|
||||
{
|
||||
va_list vl;
|
||||
va_start(vl, s);
|
||||
scvprintf(stdout, s, vl);
|
||||
va_end(vl);
|
||||
(void)v; /* UNUSED */
|
||||
}
|
||||
|
||||
void errorfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...)
|
||||
{
|
||||
va_list vl;
|
||||
va_start(vl, s);
|
||||
scvprintf(stderr, s, vl);
|
||||
va_end(vl);
|
||||
}
|
||||
|
||||
int main(int argc,char **argv) {
|
||||
HSQUIRRELVM sq;
|
||||
ifstream i;
|
||||
|
||||
if (argc > 1)
|
||||
i.open(argv[1],ios_base::in);
|
||||
else
|
||||
i.open("sq1.sq",ios_base::in);
|
||||
|
||||
if (!i.is_open()) return 1;
|
||||
|
||||
sq = sq_open(1024);
|
||||
if (sq == NULL) return 1;
|
||||
|
||||
// sqstd_register_bloblib(sq); <- Valgrind complains about out of range memory access
|
||||
// sqstd_register_iolib(sq); <- Valgrind complains about out of range memory access
|
||||
sqstd_register_systemlib(sq);
|
||||
sqstd_register_mathlib(sq);
|
||||
sqstd_register_stringlib(sq);
|
||||
|
||||
sq_setprintfunc(sq,printfunc,errorfunc);
|
||||
|
||||
sqstd_seterrorhandlers(sq);
|
||||
|
||||
char *blob;
|
||||
off_t sz;
|
||||
|
||||
sz = 65536;
|
||||
blob = new char[sz]; /* or throw a C++ exception on fail */
|
||||
|
||||
i.read(blob,sz-1);
|
||||
{
|
||||
streamsize rd = i.gcount();
|
||||
assert(rd < sz);
|
||||
blob[rd] = 0;
|
||||
}
|
||||
|
||||
{
|
||||
sq_pushroottable(sq);
|
||||
sq_pushstring(sq,"hello1",-1);
|
||||
sq_newclosure(sq,hello1,0);
|
||||
sq_newslot(sq,-3,SQFalse);
|
||||
sq_pop(sq,1);
|
||||
}
|
||||
|
||||
if (SQ_SUCCEEDED(sq_compilebuffer(sq,blob,strlen(blob),"file",SQTrue))) {
|
||||
sq_pushroottable(sq);
|
||||
if (SQ_SUCCEEDED(sq_call(sq,1,0,SQTrue))) {
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"Failed to call function\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"Failed to compile buffer\n");
|
||||
}
|
||||
|
||||
delete[] blob;
|
||||
|
||||
sq_close(sq);
|
||||
i.close();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern "C" {
|
||||
#include <squirrel.h>
|
||||
#include <sqstdio.h>
|
||||
#include <sqstdblob.h>
|
||||
#include <sqstdsystem.h>
|
||||
#include <sqstdio.h>
|
||||
#include <sqstdmath.h>
|
||||
#include <sqstdstring.h>
|
||||
#include <sqstdaux.h>
|
||||
}
|
||||
|
||||
#ifdef SQUNICODE
|
||||
#define scfprintf fwprintf
|
||||
#define scvprintf vfwprintf
|
||||
#else
|
||||
#define scfprintf fprintf
|
||||
#define scvprintf vfprintf
|
||||
#endif
|
||||
|
||||
SQInteger hello1(HSQUIRRELVM v) {
|
||||
printf("hello1 ");
|
||||
SQInteger mx = sq_gettop(v);
|
||||
for (SQInteger n=1;n <= mx;n++) {
|
||||
switch (sq_gettype(v,n)) {
|
||||
case OT_NULL:
|
||||
printf("(null) ");
|
||||
break;
|
||||
case OT_INTEGER: {
|
||||
SQInteger i = 0;
|
||||
sq_getinteger(v,n,&i);
|
||||
printf("%lld ",(long long)i);
|
||||
} break;
|
||||
case OT_FLOAT: {
|
||||
SQFloat i = 0;
|
||||
sq_getfloat(v,n,&i);
|
||||
printf("%.3f ",(double)i);
|
||||
} break;
|
||||
case OT_STRING: {
|
||||
const SQChar *i = NULL;
|
||||
sq_getstring(v,n,&i);
|
||||
printf("\"%s\" ",(const char*)i);
|
||||
} break;
|
||||
case OT_CLOSURE: {
|
||||
printf("(closure) ");
|
||||
} break;
|
||||
case OT_NATIVECLOSURE: {
|
||||
printf("(native closure) ");
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void printfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...)
|
||||
{
|
||||
va_list vl;
|
||||
va_start(vl, s);
|
||||
scvprintf(stdout, s, vl);
|
||||
va_end(vl);
|
||||
(void)v; /* UNUSED */
|
||||
}
|
||||
|
||||
void errorfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...)
|
||||
{
|
||||
va_list vl;
|
||||
va_start(vl, s);
|
||||
scvprintf(stderr, s, vl);
|
||||
va_end(vl);
|
||||
}
|
||||
|
||||
int main(int argc,char **argv) {
|
||||
HSQUIRRELVM sq;
|
||||
ifstream i;
|
||||
|
||||
if (argc > 1)
|
||||
i.open(argv[1],ios_base::in);
|
||||
else
|
||||
i.open("sq1.sq",ios_base::in);
|
||||
|
||||
if (!i.is_open()) return 1;
|
||||
|
||||
sq = sq_open(1024);
|
||||
if (sq == NULL) return 1;
|
||||
|
||||
// sqstd_register_bloblib(sq); <- Valgrind complains about out of range memory access
|
||||
// sqstd_register_iolib(sq); <- Valgrind complains about out of range memory access
|
||||
sqstd_register_systemlib(sq);
|
||||
sqstd_register_mathlib(sq);
|
||||
sqstd_register_stringlib(sq);
|
||||
|
||||
sq_setprintfunc(sq,printfunc,errorfunc);
|
||||
|
||||
sqstd_seterrorhandlers(sq);
|
||||
|
||||
char *blob;
|
||||
off_t sz;
|
||||
|
||||
sz = 65536;
|
||||
blob = new char[sz]; /* or throw a C++ exception on fail */
|
||||
|
||||
i.read(blob,sz-1);
|
||||
{
|
||||
streamsize rd = i.gcount();
|
||||
assert(rd < sz);
|
||||
blob[rd] = 0;
|
||||
}
|
||||
|
||||
{
|
||||
sq_pushroottable(sq);
|
||||
sq_pushstring(sq,"hello1",-1);
|
||||
sq_newclosure(sq,hello1,0);
|
||||
sq_newslot(sq,-3,SQFalse);
|
||||
sq_pop(sq,1);
|
||||
}
|
||||
|
||||
if (SQ_SUCCEEDED(sq_compilebuffer(sq,blob,strlen(blob),"file",SQTrue))) {
|
||||
sq_pushroottable(sq);
|
||||
if (SQ_SUCCEEDED(sq_call(sq,1,0,SQTrue))) {
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"Failed to call function\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"Failed to compile buffer\n");
|
||||
}
|
||||
|
||||
delete[] blob;
|
||||
|
||||
sq_close(sq);
|
||||
i.close();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,39 +1,39 @@
|
||||
|
||||
local a = 123;
|
||||
local b = 123.456;
|
||||
local c = "Hello world";
|
||||
|
||||
/* Comment */
|
||||
|
||||
print(a+"\n");
|
||||
print(b+"\n");
|
||||
print(c+"\n");
|
||||
|
||||
local d = [1,2,3,4]
|
||||
|
||||
print(d[0]+"\n");
|
||||
|
||||
local e = {
|
||||
a = 10,
|
||||
b = 20,
|
||||
c = "Hello",
|
||||
[20] = "World"
|
||||
}
|
||||
|
||||
print(e.a+"\n");
|
||||
print(e["c"]+"\n");
|
||||
print(e[20]+"\n");
|
||||
|
||||
function aaa(x,y) {
|
||||
return x*y;
|
||||
}
|
||||
|
||||
print(aaa(4,3)+"\n");
|
||||
hello1();
|
||||
hello1(1);
|
||||
hello1(23.44);
|
||||
hello1("Hello world");
|
||||
hello1(1,2,3,4);
|
||||
hello1(1,2.3,"4");
|
||||
hello1(hello1);
|
||||
|
||||
|
||||
local a = 123;
|
||||
local b = 123.456;
|
||||
local c = "Hello world";
|
||||
|
||||
/* Comment */
|
||||
|
||||
print(a+"\n");
|
||||
print(b+"\n");
|
||||
print(c+"\n");
|
||||
|
||||
local d = [1,2,3,4]
|
||||
|
||||
print(d[0]+"\n");
|
||||
|
||||
local e = {
|
||||
a = 10,
|
||||
b = 20,
|
||||
c = "Hello",
|
||||
[20] = "World"
|
||||
}
|
||||
|
||||
print(e.a+"\n");
|
||||
print(e["c"]+"\n");
|
||||
print(e[20]+"\n");
|
||||
|
||||
function aaa(x,y) {
|
||||
return x*y;
|
||||
}
|
||||
|
||||
print(aaa(4,3)+"\n");
|
||||
hello1();
|
||||
hello1(1);
|
||||
hello1(23.44);
|
||||
hello1("Hello world");
|
||||
hello1(1,2,3,4);
|
||||
hello1(1,2.3,"4");
|
||||
hello1(hello1);
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
/*auto-generated*/
|
||||
#define UPDATED_STR "Apr 2, 2019 4:40:18pm"
|
||||
#define COPYRIGHT_END_YEAR "2019"
|
||||
/*auto-generated*/
|
||||
#define UPDATED_STR "Apr 2, 2019 4:40:18pm"
|
||||
#define COPYRIGHT_END_YEAR "2019"
|
||||
|
1462
include/dos_inc.h
1462
include/dos_inc.h
File diff suppressed because it is too large
Load Diff
1924
src/dos/dev_con.h
1924
src/dos/dev_con.h
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
8008
src/hardware/ide.cpp
8008
src/hardware/ide.cpp
File diff suppressed because it is too large
Load Diff
15872
src/ints/bios.cpp
15872
src/ints/bios.cpp
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -358,7 +358,7 @@
|
||||
</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Debug\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -416,7 +416,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Debug\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -478,7 +478,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Debug\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -540,7 +540,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
<AdditionalOptions>/QIfist /utf-8</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Debug\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -601,7 +601,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
<AdditionalOptions>/QIfist /utf-8</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Debug\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -661,7 +661,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Debug\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -723,7 +723,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Debug\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -784,7 +784,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Debug\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -839,7 +839,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Release\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -901,7 +901,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Release\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -965,7 +965,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Release\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -1029,7 +1029,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
<AdditionalOptions>/QIfist /utf-8</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Release\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -1092,7 +1092,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
<AdditionalOptions>/QIfist /utf-8</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Release\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;Ws2_32.lib;$(SolutionDir)..\obj\SDL\$(Platform)\$(Configuration)\SDL.lib;$(SolutionDir)..\obj\SDLmain\$(Platform)\$(Configuration)\SDLmain.lib;$(SolutionDir)..\obj\SDL_net\$(Platform)\$(Configuration)\SDL_net.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -1155,7 +1155,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Release\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;imm32.lib;opengl32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -1220,7 +1220,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Release\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -1284,7 +1284,7 @@ copy "$(SolutionDir)\..\CHANGELOG" "$(OutputPath)\changelog.txt"</Command>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\Release\freetype.lib</AdditionalDependencies>
|
||||
<AdditionalDependencies>winmm.lib;comdlg32.lib;shell32.lib;gdi32.lib;ole32.lib;oleaut32.lib;Advapi32.lib;imm32.lib;dxguid.lib;SetupAPI.lib;version.lib;Iphlpapi.lib;$(SolutionDir)..\obj\libpdcurses\$(Platform)\$(Configuration)\libpdcurses.lib;$(SolutionDir)..\obj\SDL2\$(Platform)\$(Configuration)\sdl2.lib;$(SolutionDir)..\obj\SDL2main\$(Platform)\$(Configuration)\sdl2main.lib;Ws2_32.lib;%(AdditionalDependencies);$(SolutionDir)..\obj\zlib\$(Platform)\$(Configuration)\zlib.lib;$(SolutionDir)..\obj\libpng\$(Platform)\$(Configuration)\libpng.lib;$(SolutionDir)..\obj\freetype\$(Platform)\$(Configuration)\freetype.lib</AdditionalDependencies>
|
||||
<ShowProgress>LinkVerboseLib</ShowProgress>
|
||||
<OutputFile>$(OutDir)/$(ProjectName).exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,365 +1,365 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug SDL2|ARM">
|
||||
<Configuration>Debug SDL2</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug SDL2|ARM64">
|
||||
<Configuration>Debug SDL2</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug SDL2|Win32">
|
||||
<Configuration>Debug SDL2</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug SDL2|x64">
|
||||
<Configuration>Debug SDL2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release SDL2|ARM">
|
||||
<Configuration>Release SDL2</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release SDL2|ARM64">
|
||||
<Configuration>Release SDL2</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release SDL2|Win32">
|
||||
<Configuration>Release SDL2</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release SDL2|x64">
|
||||
<Configuration>Release SDL2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>SDL2main</ProjectName>
|
||||
<ProjectGuid>{47281679-339B-4D01-8556-A49384BFE812}</ProjectGuid>
|
||||
<RootNamespace>SDLmain</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>
|
||||
</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>
|
||||
</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>
|
||||
</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\main\windows\SDL_windows_main.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug SDL2|ARM">
|
||||
<Configuration>Debug SDL2</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug SDL2|ARM64">
|
||||
<Configuration>Debug SDL2</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug SDL2|Win32">
|
||||
<Configuration>Debug SDL2</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug SDL2|x64">
|
||||
<Configuration>Debug SDL2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release SDL2|ARM">
|
||||
<Configuration>Release SDL2</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release SDL2|ARM64">
|
||||
<Configuration>Release SDL2</Configuration>
|
||||
<Platform>ARM64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release SDL2|Win32">
|
||||
<Configuration>Release SDL2</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release SDL2|x64">
|
||||
<Configuration>Release SDL2</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>SDL2main</ProjectName>
|
||||
<ProjectGuid>{47281679-339B-4D01-8556-A49384BFE812}</ProjectGuid>
|
||||
<RootNamespace>SDLmain</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'">$(SolutionDir)..\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>
|
||||
</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM64'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>
|
||||
</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release SDL2|ARM'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>
|
||||
</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<ControlFlowGuard>false</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|x64'">
|
||||
<Midl>
|
||||
<TargetEnvironment>X64</TargetEnvironment>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM64'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug SDL2|ARM'">
|
||||
<Midl />
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)/../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<OmitDefaultLibName>true</OmitDefaultLibName>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(IntDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\main\windows\SDL_windows_main.c" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user