mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
elimination of bare printf (with some exceptions) from libs: Sys_Printf is
used instead
This commit is contained in:
parent
9cef5a1edc
commit
b3914eeaaa
9 changed files with 43 additions and 43 deletions
|
@ -80,7 +80,7 @@ static qboolean
|
|||
SNDDMA_Init (void)
|
||||
{
|
||||
if (snd_inited) {
|
||||
printf ("Sound already init'd\n");
|
||||
Sys_Printf ("Sound already init'd\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ SNDDMA_Submit (void)
|
|||
wbufp = stop;
|
||||
|
||||
if (write (audio_fd, writebuf, bytes) < bytes)
|
||||
printf ("audio can't keep up!\n");
|
||||
Sys_Printf ("audio can't keep up!\n");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ ED_ClearEdict (progs_t * pr, edict_t *e, int val)
|
|||
int i;
|
||||
|
||||
if (NUM_FOR_EDICT(pr,e)<*pr->reserved_edicts)
|
||||
printf("clearing reserved edict %d\n", NUM_FOR_EDICT(pr,e));
|
||||
Sys_Printf("clearing reserved edict %d\n", NUM_FOR_EDICT(pr,e));
|
||||
for (i=0; i < pr->progs->entityfields; i++)
|
||||
e->v[i].integer_var = val;
|
||||
//memset (&e->v, 0, pr->progs->entityfields * 4);
|
||||
|
|
|
@ -178,7 +178,7 @@ PR_EnterFunction (progs_t * pr, dfunction_t *f)
|
|||
int i, j, c, o;
|
||||
int k;
|
||||
|
||||
//printf("%s:\n", PR_GetString(pr,f->s_name));
|
||||
//Sys_Printf("%s:\n", PR_GetString(pr,f->s_name));
|
||||
pr->pr_stack[pr->pr_depth].s = pr->pr_xstatement;
|
||||
pr->pr_stack[pr->pr_depth].f = pr->pr_xfunction;
|
||||
pr->pr_depth++;
|
||||
|
@ -265,7 +265,7 @@ PR_ExecuteProgram (progs_t * pr, func_t fnum)
|
|||
}
|
||||
|
||||
f = &pr->pr_functions[fnum];
|
||||
//printf("%s:\n", PR_GetString(pr,f->s_name));
|
||||
//Sys_Printf("%s:\n", PR_GetString(pr,f->s_name));
|
||||
|
||||
pr->pr_trace = false;
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ Mod_FloodFillSkin (byte * skin, int skinwidth, int skinheight)
|
|||
}
|
||||
// can't fill to filled color or transparent color (used as visited marker)
|
||||
if ((fillcolor == filledcolor) || (fillcolor == 255)) {
|
||||
//printf ("not filling skin from %d to %d\n", fillcolor, filledcolor);
|
||||
//Sys_Printf ("not filling skin from %d to %d\n", fillcolor, filledcolor);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -482,7 +482,7 @@ process_corners (struct box_def *box)
|
|||
vec3_t v[3];
|
||||
|
||||
center = faces_bit_magic[sel];
|
||||
// printf ("%02o %d %d %d %d %d %d\n", sel, center,
|
||||
// Sys_Printf ("%02o %d %d %d %d %d %d\n", sel, center,
|
||||
// visit[0].face,
|
||||
// visit[1].face, visit[2].face, visit[3].face,
|
||||
// visit[4].face);
|
||||
|
|
|
@ -137,7 +137,7 @@ qboolean
|
|||
X11_AddEvent (int event, void (*event_handler) (XEvent *))
|
||||
{
|
||||
if (event >= LASTEvent) {
|
||||
printf ("event: %d, LASTEvent: %d\n", event, LASTEvent);
|
||||
Sys_Printf ("event: %d, LASTEvent: %d\n", event, LASTEvent);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -384,7 +384,7 @@ IN_InitMouse (void)
|
|||
mouserate = atoi (com_argv[COM_CheckParm ("-mrate") + 1]);
|
||||
}
|
||||
#if 0
|
||||
printf ("Mouse: dev=%s,type=%s,speed=%d\n",
|
||||
Sys_Printf ("Mouse: dev=%s,type=%s,speed=%d\n",
|
||||
mousedev, mice[mtype].name, mouserate);
|
||||
#endif
|
||||
if (mouse_init (mousedev, mtype, mouserate)) {
|
||||
|
|
|
@ -545,28 +545,28 @@ VID_ExtraGetModeInfo (int modenum)
|
|||
modeinfo.pptr = *(long *) (infobuf + 40);
|
||||
|
||||
#if 0
|
||||
printf ("VID: (VESA) info for mode 0x%x\n", modeinfo.modenum);
|
||||
printf (" mode attrib = 0x%0x\n", modeinfo.mode_attributes);
|
||||
printf (" win a attrib = 0x%0x\n", *(unsigned char *) (infobuf + 2));
|
||||
printf (" win b attrib = 0x%0x\n", *(unsigned char *) (infobuf + 3));
|
||||
printf (" win a seg 0x%0x\n", (int) modeinfo.winasegment);
|
||||
printf (" win b seg 0x%0x\n", (int) modeinfo.winbsegment);
|
||||
printf (" bytes per scanline = %d\n", modeinfo.bytes_per_scanline);
|
||||
printf (" width = %d, height = %d\n", modeinfo.width, modeinfo.height);
|
||||
printf (" win = %c\n", 'A' + modeinfo.win);
|
||||
printf (" win granularity = %d\n", modeinfo.granularity);
|
||||
printf (" win size = %d\n", modeinfo.win_size);
|
||||
printf (" bits per pixel = %d\n", modeinfo.bits_per_pixel);
|
||||
printf (" bytes per pixel = %d\n", modeinfo.bytes_per_pixel);
|
||||
printf (" memory model = 0x%x\n", modeinfo.memory_model);
|
||||
printf (" num pages = %d\n", modeinfo.num_pages);
|
||||
printf (" red width = %d\n", modeinfo.red_width);
|
||||
printf (" red pos = %d\n", modeinfo.red_pos);
|
||||
printf (" green width = %d\n", modeinfo.green_width);
|
||||
printf (" green pos = %d\n", modeinfo.green_pos);
|
||||
printf (" blue width = %d\n", modeinfo.blue_width);
|
||||
printf (" blue pos = %d\n", modeinfo.blue_pos);
|
||||
printf (" phys mem = %x\n", modeinfo.pptr);
|
||||
Sys_Printf ("VID: (VESA) info for mode 0x%x\n", modeinfo.modenum);
|
||||
Sys_Printf (" mode attrib = 0x%0x\n", modeinfo.mode_attributes);
|
||||
Sys_Printf (" win a attrib = 0x%0x\n", *(unsigned char *) (infobuf + 2));
|
||||
Sys_Printf (" win b attrib = 0x%0x\n", *(unsigned char *) (infobuf + 3));
|
||||
Sys_Printf (" win a seg 0x%0x\n", (int) modeinfo.winasegment);
|
||||
Sys_Printf (" win b seg 0x%0x\n", (int) modeinfo.winbsegment);
|
||||
Sys_Printf (" bytes per scanline = %d\n", modeinfo.bytes_per_scanline);
|
||||
Sys_Printf (" width = %d, height = %d\n", modeinfo.width, modeinfo.height);
|
||||
Sys_Printf (" win = %c\n", 'A' + modeinfo.win);
|
||||
Sys_Printf (" win granularity = %d\n", modeinfo.granularity);
|
||||
Sys_Printf (" win size = %d\n", modeinfo.win_size);
|
||||
Sys_Printf (" bits per pixel = %d\n", modeinfo.bits_per_pixel);
|
||||
Sys_Printf (" bytes per pixel = %d\n", modeinfo.bytes_per_pixel);
|
||||
Sys_Printf (" memory model = 0x%x\n", modeinfo.memory_model);
|
||||
Sys_Printf (" num pages = %d\n", modeinfo.num_pages);
|
||||
Sys_Printf (" red width = %d\n", modeinfo.red_width);
|
||||
Sys_Printf (" red pos = %d\n", modeinfo.red_pos);
|
||||
Sys_Printf (" green width = %d\n", modeinfo.green_width);
|
||||
Sys_Printf (" green pos = %d\n", modeinfo.green_pos);
|
||||
Sys_Printf (" blue width = %d\n", modeinfo.blue_width);
|
||||
Sys_Printf (" blue pos = %d\n", modeinfo.blue_pos);
|
||||
Sys_Printf (" phys mem = %x\n", modeinfo.pptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -350,7 +350,7 @@ ResetSharedFrameBuffers (void)
|
|||
// attach to the shared memory segment
|
||||
x_shminfo[frm].shmaddr = (void *) shmat (x_shminfo[frm].shmid, 0, 0);
|
||||
|
||||
printf ("VID: shared memory id=%d, addr=0x%lx\n", x_shminfo[frm].shmid,
|
||||
Sys_Printf ("VID: shared memory id=%d, addr=0x%lx\n", x_shminfo[frm].shmid,
|
||||
(long) x_shminfo[frm].shmaddr);
|
||||
|
||||
x_framebuffer[frm]->data = x_shminfo[frm].shmaddr;
|
||||
|
@ -451,10 +451,10 @@ VID_Init (unsigned char *palette)
|
|||
x_vis = x_visinfo->visual;
|
||||
|
||||
if (num_visuals > 1) {
|
||||
printf ("Found more than one visual id at depth %d:\n",
|
||||
Sys_Printf ("Found more than one visual id at depth %d:\n",
|
||||
template.depth);
|
||||
for (i = 0; i < num_visuals; i++)
|
||||
printf (" -visualid %d\n", (int) x_visinfo[i].visualid);
|
||||
Sys_Printf (" -visualid %d\n", (int) x_visinfo[i].visualid);
|
||||
} else {
|
||||
if (num_visuals == 0) {
|
||||
if (template_mask == VisualIDMask) {
|
||||
|
@ -466,15 +466,15 @@ VID_Init (unsigned char *palette)
|
|||
}
|
||||
|
||||
if (verbose) {
|
||||
printf ("Using visualid %d:\n", (int) x_visinfo->visualid);
|
||||
printf (" class %d\n", x_visinfo->class);
|
||||
printf (" screen %d\n", x_visinfo->screen);
|
||||
printf (" depth %d\n", x_visinfo->depth);
|
||||
printf (" red_mask 0x%x\n", (int) x_visinfo->red_mask);
|
||||
printf (" green_mask 0x%x\n", (int) x_visinfo->green_mask);
|
||||
printf (" blue_mask 0x%x\n", (int) x_visinfo->blue_mask);
|
||||
printf (" colormap_size %d\n", x_visinfo->colormap_size);
|
||||
printf (" bits_per_rgb %d\n", x_visinfo->bits_per_rgb);
|
||||
Sys_Printf ("Using visualid %d:\n", (int) x_visinfo->visualid);
|
||||
Sys_Printf (" class %d\n", x_visinfo->class);
|
||||
Sys_Printf (" screen %d\n", x_visinfo->screen);
|
||||
Sys_Printf (" depth %d\n", x_visinfo->depth);
|
||||
Sys_Printf (" red_mask 0x%x\n", (int) x_visinfo->red_mask);
|
||||
Sys_Printf (" green_mask 0x%x\n", (int) x_visinfo->green_mask);
|
||||
Sys_Printf (" blue_mask 0x%x\n", (int) x_visinfo->blue_mask);
|
||||
Sys_Printf (" colormap_size %d\n", x_visinfo->colormap_size);
|
||||
Sys_Printf (" bits_per_rgb %d\n", x_visinfo->bits_per_rgb);
|
||||
}
|
||||
|
||||
/* Setup attributes for main window */
|
||||
|
|
Loading…
Reference in a new issue