From 8f7b567a3bc54f81755fa5d35484022cb9219300 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 4 Sep 2003 00:18:27 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2242 --- apps/upper_case.C | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/apps/upper_case.C b/apps/upper_case.C index 4ed596abaf..7fb4496335 100755 --- a/apps/upper_case.C +++ b/apps/upper_case.C @@ -67,7 +67,7 @@ void renderBitmapString(float x, float y, void *font, char *string); #define CHECKPOINT_FILE "upper_case_state" -char the_char[10]; +char display_buf[10]; double xPos=0, yPos=0; double xDelta=0.03, yDelta=0.07; @@ -143,7 +143,7 @@ int main(int argc, char **argv) { my_start_time = time(0); - strcpy(the_char, "(none)\0"); + strcpy(display_buf, "(none)\0"); retval = boinc_init(); if (retval) exit(retval); @@ -157,7 +157,6 @@ int main(int argc, char **argv) { // "\n%s\n\n", uc_aid.app_preferences // ); - boinc_resolve_filename("in", resolved_name, sizeof(resolved_name)); fprintf(stderr, "APP: upper_case: starting, argc %d\n", argc); for (i=0; i %c", c, toupper(c)); + sprintf(display_buf, "%c -> %c", c, toupper(c)); c = toupper(c); out._putchar(c); nchars++; @@ -260,14 +267,13 @@ extern GLuint main_font; void app_init_gl() { } -bool app_render(int xs, int ys, double time_of_day) -{ +bool app_render(int xs, int ys, double time_of_day) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer glLoadIdentity(); // Reset The Current Modelview Matrix glColor3f(1,1,1); glRasterPos2f(xPos, yPos); - glPrint(main_font, the_char); + glPrint(main_font, display_buf); xPos += xDelta; yPos += yDelta;