Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4265b1e8
Commit
4265b1e8
authored
Feb 16, 1993
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added readdisplay() routine
parent
dd35cc3c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
Modules/cstubs
Modules/cstubs
+29
-0
No files found.
Modules/cstubs
View file @
4265b1e8
...
...
@@ -657,6 +657,35 @@ gl_lrectread(self, args)
return parray;
}
% readdisplay
static object *
gl_readdisplay(self, args)
object *self;
object *args;
{
short x1, y1, x2, y2;
unsigned long *parray, hints;
long size, size_ret;
object *rv;
if ( !getargs(args, "hhhhl", &x1, &y1, &x2, &y2, &hints) )
return 0;
size = (long)(x2+1-x1) * (long)(y2+1-y1);
rv = newsizedstringobject((char *)NULL, size*sizeof(long));
if ( rv == NULL )
return NULL;
parray = (unsigned long *)getstringvalue(rv);
size_ret = readdisplay(x1, y1, x2, y2, parray, hints);
if ( size_ret != size ) {
printf("gl_readdisplay: got %d pixels, expected %d\n",
size_ret, size);
err_setstr(RuntimeError, "readdisplay returned unexpected length");
return NULL;
}
return rv;
}
/* Desperately needed, here are tools to compress and decompress
the data manipulated by lrectread/lrectwrite.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment