Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 12-01-2006, 08:00 PM   #1
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:
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
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, 08:32 PM   #2
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
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:
    BG.trgPixmap = ScalePixmap(...
Old 12-01-2006, 08:37 PM   #3
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:12 PM
source code for libc function dvm Programming 1 12-27-2004 07:04 PM
source code for read() function ? Mike Davies Linux - Software 1 11-03-2004 03:10 PM
Where can i find source code rajaryan Linux - Newbie 2 03-27-2003 07:50 PM
Cannot find kedit source code aizkorri Linux - Software 2 09-05-2002 05:22 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:11 PM.

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