ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/video_x.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/video_x.cpp (file contents):
Revision 1.34 by gbeauche, 2001-01-11T16:38:48Z vs.
Revision 1.35 by gbeauche, 2001-01-11T18:00:40Z

# Line 264 | Line 264 | static inline int find_next_page_clear(i
264          char *match = strchr(mainBuffer.dirtyPages + page, PFLAG_CLEAR_VALUE);
265          return match ? match - mainBuffer.dirtyPages : mainBuffer.pageCount;
266   #else
267        // NOTE: the loop is bound to terminate because the last
268        // page in mainBuffer.dirtyPages[] shall be set to CLEAR
267          while (PFLAG_ISSET_4(page))
268                  page += 4;
269          while (PFLAG_ISSET(page))
# Line 945 | Line 943 | bool VideoInitBuffer()
943                  if (mainBuffer.dirtyPages != 0)
944                          free(mainBuffer.dirtyPages);
945  
946 <                mainBuffer.dirtyPages = (char *) malloc(mainBuffer.pageCount + 1);
946 >                mainBuffer.dirtyPages = (char *) malloc(mainBuffer.pageCount + 2);
947  
948                  if (mainBuffer.pageInfo != 0)
949                          free(mainBuffer.pageInfo);
# Line 956 | Line 954 | bool VideoInitBuffer()
954                          return false;
955  
956                  PFLAG_CLEAR_ALL;
957 <                
958 <                // Make sure there is at least one page marked, so the
961 <                // loops in the update routine will terminate
962 <                // gb-- Set the last page as cleared because the update
963 <                // routine finally searches for a page that was not touched
957 >                // Safety net to insure the loops in the update routines will terminate
958 >                // See a discussion in <video_vosf.h> for further details
959                  PFLAG_CLEAR(mainBuffer.pageCount);
960 +                PFLAG_SET(mainBuffer.pageCount+1);
961  
962                  uint32 a = 0;
963                  for (int i = 0; i < mainBuffer.pageCount; i++) {
# Line 1955 | Line 1951 | static void update_display_static(void)
1951  
1952   // We suggest the compiler to inline the next two functions so that it
1953   // may specialise the code according to the current screen depth and
1954 < // display type. A clever compiler would that job by itself though...
1954 > // display type. A clever compiler would do that job by itself though...
1955  
1956   // NOTE: update_display_vosf is inlined too
1957  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines