LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-01-2006, 07:00 PM   #1
2.718281828
Member
 
Registered: Jan 2004
Distribution: Arch, formerly Slackware
Posts: 43

Rep: Reputation: 15
Can't find a function in a program's source code


I downloaded aterm 1.0.0 and compiled it, but the background image (used to do fake transparency) doesn't always update when it should. I was looking through the source and I think the problem happens at line 993 in pixmap.c:
Code:
BG.trgPixmap = ScalePixmap( BG.srcPixmap,
BG.Width, BG.Height,
width, height, gc, SHADING );
The thing is, I can't find the function ScalePixmap anywhere. I did
Code:
grep ScalePixmap -rl *
from the top directory of the source, but only pixmap.c matches, and it doesn't have the function. It calls the function three times, but doesn't define it anywhere that I can find.

I then found every #include statement in every file, used locate to find all of those files, and searched them for ScalePixmap but still didn't find anything. Where could this function be? In aterm 0.4.2 (which doesn't have the problem with drawing the background image, by the way), pixmap.c has a ScalePixmap function, but in version 1.0.0, I can't find it. Any ideas?
 
Old 12-01-2006, 07:32 PM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
ScalePixmap appears to be provided by the AfterImage library. Look up in the pixmap.c file a little and you'll see that the call to ScalePixmap is in a block of code which is only compiled if AfterImage is available:
Code:
#ifdef HAVE_AFTERIMAGE
    ...
    BG.trgPixmap = ScalePixmap(...
 
Old 12-01-2006, 07:37 PM   #3
2.718281828
Member
 
Registered: Jan 2004
Distribution: Arch, formerly Slackware
Posts: 43

Original Poster
Rep: Reputation: 15
Aha, I hadn't noticed that before. It turns out that the block of code that I want comes a bit later. Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i linux a Windows program's source code? Mad_Tiger Programming 10 04-05-2007 06:12 PM
source code for libc function dvm Programming 1 12-27-2004 06:04 PM
source code for read() function ? Mike Davies Linux - Software 1 11-03-2004 02:10 PM
Where can i find source code rajaryan Linux - Newbie 2 03-27-2003 06:50 PM
Cannot find kedit source code aizkorri Linux - Software 2 09-05-2002 04:22 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration