mirror of
https://github.com/digarok/gsplus.git
synced 2024-11-24 06:34:02 +00:00
attempt more warning cleanup
This commit is contained in:
parent
9337414c17
commit
d5ef2a2a11
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,5 +13,6 @@ src/size_c.h
|
||||
gsplus
|
||||
gsportx
|
||||
gsport
|
||||
*.exe
|
||||
|
||||
*.gsp
|
||||
|
@ -368,7 +368,7 @@ void Imagewriter::updateFont()
|
||||
if (FT_New_Face(FTlib, fontName, 0, &curFont))
|
||||
{
|
||||
|
||||
printf("Unable to load font %s\n");
|
||||
printf("Unable to load font %s\n", fontName);
|
||||
//LOG_MSG("Unable to load font %s", fontName);
|
||||
curFont = NULL;
|
||||
}
|
||||
@ -1593,7 +1593,7 @@ static void findNextName(char* front, char* ext, char* fname)
|
||||
do
|
||||
{
|
||||
strcpy(fname, document_path);
|
||||
printf(fname);
|
||||
printf("%s",fname);
|
||||
#ifdef WIN32
|
||||
const char* const pathstring = ".\\%s%d%s";
|
||||
#else
|
||||
@ -1666,7 +1666,7 @@ SDL_FreeSurface(image);*/
|
||||
{
|
||||
//If user clicks cancel, show warning dialog and force all output to bitmaps as failsafe.
|
||||
MessageBox(NULL,"You did not select a printer.\nAll output from this print job will be saved as bitmap files.",NULL,MB_ICONEXCLAMATION);
|
||||
findNextName("page", ".bmp", &fname[0]);
|
||||
findNextName((char *)"page", (char *)".bmp", &fname[0]);
|
||||
SDL_SaveBMP(page, fname); //Save first page as bitmap.
|
||||
outputHandle = printerDC;
|
||||
printerDC = NULL;
|
||||
@ -1682,7 +1682,7 @@ SDL_FreeSurface(image);*/
|
||||
}
|
||||
if (!printerDC) //Fall thru for subsequent pages if printer dialog was cancelled.
|
||||
{
|
||||
findNextName("page", ".bmp", &fname[0]);
|
||||
findNextName((char *)"page", (char *)".bmp", &fname[0]);
|
||||
SDL_SaveBMP(page, fname); //Save remaining pages.
|
||||
return;
|
||||
}
|
||||
@ -1781,7 +1781,7 @@ SDL_FreeSurface(image);*/
|
||||
else if (strcasecmp(output, "png") == 0)
|
||||
{
|
||||
// Find a page that does not exists
|
||||
findNextName("page", ".png", &fname[0]);
|
||||
findNextName((char *)"page", (char *)".png", &fname[0]);
|
||||
|
||||
png_structp png_ptr;
|
||||
png_infop info_ptr;
|
||||
@ -1869,9 +1869,9 @@ SDL_FreeSurface(image);*/
|
||||
if (psfile == NULL)
|
||||
{
|
||||
if (!multipageOutput)
|
||||
findNextName("page", ".ps", &fname[0]);
|
||||
findNextName((char *)"page", (char *)".ps", &fname[0]);
|
||||
else
|
||||
findNextName("doc", ".ps", &fname[0]);
|
||||
findNextName((char *)"doc", (char *)".ps", &fname[0]);
|
||||
|
||||
psfile = fopen(fname, "wb");
|
||||
if (!psfile)
|
||||
@ -1994,9 +1994,9 @@ SDL_FreeSurface(image);*/
|
||||
if (psfile == NULL)
|
||||
{
|
||||
if (!multipageOutput)
|
||||
findNextName("page", ".ps", &fname[0]);
|
||||
findNextName((char *)"page", (char *)".ps", &fname[0]);
|
||||
else
|
||||
findNextName("doc", ".ps", &fname[0]);
|
||||
findNextName((char *)"doc", (char *)".ps", &fname[0]);
|
||||
|
||||
psfile = fopen(fname, "wb");
|
||||
if (!psfile)
|
||||
@ -2090,7 +2090,7 @@ SDL_FreeSurface(image);*/
|
||||
else
|
||||
{
|
||||
// Find a page that does not exists
|
||||
findNextName("page", ".bmp", &fname[0]);
|
||||
findNextName((char *)"page", (char *)".bmp", &fname[0]);
|
||||
SDL_SaveBMP(page, fname);
|
||||
}
|
||||
}
|
||||
@ -2231,9 +2231,8 @@ Bit8u Imagewriter::getPixel(Bit32u num) {
|
||||
}
|
||||
#endif // HAVE_SDL
|
||||
|
||||
|
||||
//Interfaces to C code
|
||||
|
||||
|
||||
extern "C" void imagewriter_init(int pdpi, int ppaper, int banner, char* poutput, bool mpage)
|
||||
{
|
||||
if (defaultImagewriter != NULL) return; //if Imagewriter on this port is initialized, reuse it
|
||||
|
@ -1651,7 +1651,7 @@ static void findNextName(char* front, char* ext, char* fname)
|
||||
do
|
||||
{
|
||||
strcpy(fname, document_path);
|
||||
printf(fname);
|
||||
printf("%s",fname);
|
||||
#ifdef WIN32
|
||||
const char* const pathstring = ".\\%s%d%s";
|
||||
#else
|
||||
@ -1887,9 +1887,9 @@ SDL_FreeSurface(image);*/
|
||||
if (psfile == NULL)
|
||||
{
|
||||
if (!multipageOutput)
|
||||
findNextName("page", ".ps", &fname[0]);
|
||||
findNextName((char *)"page", (char *)".ps", &fname[0]);
|
||||
else
|
||||
findNextName("doc", ".ps", &fname[0]);
|
||||
findNextName((char *)"doc", (char *)".ps", &fname[0]);
|
||||
|
||||
psfile = fopen(fname, "wb");
|
||||
if (!psfile)
|
||||
@ -1983,7 +1983,7 @@ SDL_FreeSurface(image);*/
|
||||
else
|
||||
{
|
||||
// Find a page that does not exists
|
||||
findNextName("page", ".bmp", &fname[0]);
|
||||
findNextName((char *)"page", (char *)".bmp", &fname[0]);
|
||||
SDL_SaveBMP(page, fname);
|
||||
}
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ scc_socket_open_outgoing(int port, double dcycs)
|
||||
/* ARO: inspect the ATDT command to see if there is a decimal port number declared & if so, use it */
|
||||
/* Format: ATDT<host>,<port> */
|
||||
/* Example ATDT192.168.1.21,4001 */
|
||||
char *comma_ptr = strchr(&scc_ptr->modem_cmd_str[0], ',');
|
||||
char *comma_ptr = strchr((const char *)&scc_ptr->modem_cmd_str[0], ',');
|
||||
if (comma_ptr != NULL) {
|
||||
long custom_port = strtol(comma_ptr + 1, NULL, 10);
|
||||
*comma_ptr = '\0'; /* null terminate the hostname string at the position of the comma */
|
||||
|
17
src/sound.c
17
src/sound.c
@ -46,6 +46,7 @@ int g_doc_saved_ctl = 0;
|
||||
int g_queued_samps = 0;
|
||||
int g_queued_nonsamps = 0;
|
||||
int g_num_osc_interrupting = 0;
|
||||
int g_sound_play_depth = 0;
|
||||
|
||||
/* Workaround - gcc in cygwin wasn't defining _WIN32, substituted WIN_SOUND instead */
|
||||
#if defined(HPUX) || defined(__linux__) || defined(WIN_SOUND) || defined(MAC) || defined(HAVE_SDL)
|
||||
@ -639,7 +640,6 @@ send_sound(int real_samps, int size)
|
||||
{
|
||||
// real_samps = 1, size = 1602
|
||||
word32 tmp;
|
||||
int ret;
|
||||
|
||||
if(g_audio_enable == 0) {
|
||||
printf("Entered send_sound but audio off!\n");
|
||||
@ -657,16 +657,15 @@ send_sound(int real_samps, int size)
|
||||
(real_samps << 30) + size);
|
||||
// Workaround - gcc in cygwin wasn't defining _WIN32
|
||||
#if defined(WIN_SOUND) || defined(MAC) && !defined(HAVE_SDL)
|
||||
ret = 0;
|
||||
child_sound_playit(tmp);
|
||||
#elif defined(HAVE_SDL)
|
||||
sound_write_sdl( real_samps, size);
|
||||
//sdl_send_audio(&g_sound_shm_addr[g_sound_shm_pos], size, real_samps);
|
||||
#elif defined(__OS2__)
|
||||
|
||||
#else
|
||||
/* Although this looks like a big/little-endian issue, since the */
|
||||
/* child is also reading an int, it just works with no byte swap */
|
||||
int ret = 0;
|
||||
ret = write(g_pipe_fd[1], &tmp, 4);
|
||||
if(ret != 4) {
|
||||
halt_printf("send_sound, wr ret: %d, errno: %d\n", ret, errno);
|
||||
@ -674,14 +673,12 @@ send_sound(int real_samps, int size)
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
show_c030_state()
|
||||
void show_c030_state()
|
||||
{
|
||||
show_c030_samps(&(g_samp_buf[0]), 100);
|
||||
}
|
||||
|
||||
void
|
||||
show_c030_samps(int *outptr, int num)
|
||||
void show_c030_samps(int *outptr, int num)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -699,10 +696,7 @@ show_c030_samps(int *outptr, int num)
|
||||
}
|
||||
}
|
||||
|
||||
int g_sound_play_depth = 0;
|
||||
|
||||
void
|
||||
sound_play(double dsamps)
|
||||
void sound_play(double dsamps)
|
||||
{
|
||||
register word32 start_time1, start_time2, start_time3, start_time4;
|
||||
register word32 end_time1, end_time2, end_time3;
|
||||
@ -1191,7 +1185,6 @@ doc_sound_end(int osc, int can_repeat, double eff_dsamps, double dsamps)
|
||||
Doc_reg *rptr, *orptr;
|
||||
int mode, omode;
|
||||
int other_osc;
|
||||
int one_shot_stop;
|
||||
int ctl;
|
||||
|
||||
/* handle osc stopping and maybe interrupting */
|
||||
|
@ -61,7 +61,9 @@ void win32snd_shutdown();
|
||||
void child_sound_init_win32();
|
||||
int win32_send_audio(byte *ptr, int size);
|
||||
|
||||
/* prototypes for sdl(2)snd_driver.c functions */
|
||||
void sound_shutdown_sdl();
|
||||
void sdlsnd_init(word32 *shmaddr);
|
||||
|
||||
|
||||
/* Prototypes for macsnd_driver.c functions */
|
||||
|
@ -78,7 +78,7 @@ void
|
||||
reliable_buf_write(word32 *shm_addr, int pos, int size)
|
||||
{
|
||||
byte *ptr;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
if(size < 1 || pos < 0 || pos > SOUND_SHM_SAMP_SIZE ||
|
||||
size > SOUND_SHM_SAMP_SIZE ||
|
||||
@ -144,7 +144,7 @@ child_sound_loop(int read_fd, int write_fd, word32 *shm_addr)
|
||||
|
||||
#if defined(HAVE_SDL)
|
||||
//child_sound_init_sdl();
|
||||
long rate = sound_init_device_sdl();
|
||||
sound_init_device_sdl(); // ignores long return value of sample rate
|
||||
return;
|
||||
#elif defined(__linux__) || defined(OSS)
|
||||
child_sound_init_linux();
|
||||
|
Loading…
Reference in New Issue
Block a user