Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

geta(3alleg4) [opendarwin man page]

getr(3alleg4)							  Allegro manual						     getr(3alleg4)

NAME
getr, getg, getb, geta - Extract a color component from the current pixel format. Allegro game programming library. SYNOPSIS
#include <allegro.h> int getr(int c); int getg(int c); int getb(int c); int geta(int c); DESCRIPTION
Given a color in the format being used by the current video mode, these functions extract one of the red, green, blue, or alpha components (ranging 0-255), calling the preceding 8, 15, 16, 24, or 32-bit get functions as appropriate. The alpha part is only meaningful for 32-bit pixels. Example: int r, g, b, color_value; color_value = getpixel(screen, 100, 100); r = getr(color_value); g = getg(color_value); b = getb(color_value); SEE ALSO
getr8(3alleg4), getr_depth(3alleg4), makecol(3alleg4), set_color_depth(3alleg4), exalpha(3alleg4) Allegro version 4.4.2 getr(3alleg4)

Check Out this Related Man Page

getr(3alleg4)                                                     Allegro manual                                                     getr(3alleg4)

NAME
getr, getg, getb, geta - Extract a color component from the current pixel format. Allegro game programming library. SYNOPSIS
#include <allegro.h> int getr(int c); int getg(int c); int getb(int c); int geta(int c); DESCRIPTION
Given a color in the format being used by the current video mode, these functions extract one of the red, green, blue, or alpha components (ranging 0-255), calling the preceding 8, 15, 16, 24, or 32-bit get functions as appropriate. The alpha part is only meaningful for 32-bit pixels. Example: int r, g, b, color_value; color_value = getpixel(screen, 100, 100); r = getr(color_value); g = getg(color_value); b = getb(color_value); SEE ALSO
getr8(3alleg4), getr_depth(3alleg4), makecol(3alleg4), set_color_depth(3alleg4), exalpha(3alleg4) Allegro version 4.4.2 getr(3alleg4)
Man Page

12 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

stty tcgetattr errors

Hi, I have an app that runs Oracle 8.1.7 residing on a AIX 4.3 ML 10 . preiodically app sends out a status log like the one displayed below. Lately I have noticed this stty:tcgetattr message in the log. Script that writes this output calls sqlplus, gets the required count and writes output to... (8 Replies)
Discussion started by: Student37
8 Replies

2. UNIX for Advanced & Expert Users

stty: tcgetattr: A specified file does not support the ioctl system call.

Hi, I am trying to implement SSH between two systems say ukblx151 & ukapx047 with ID say khzs228, i follow the following process: Step-1) $ ssh-keygen -t rsa -f rsa Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your... (9 Replies)
Discussion started by: vishal_ranjan
9 Replies

3. What is on Your Mind?

Vegetable Oil - PC

Cool Down His Computer with Some Oil Video Pretty amazing. (3 Replies)
Discussion started by: sparcguy
3 Replies

4. IP Networking

TTL for IP addr from DNS through C code

Hi All, I know that getaddrinfo() return the multiple IP addresses (if present) for a hostname. But, I want to know how to get the TTL value for this list from DNS. I want to get this TTL value and cache this IP address list for that much time and then again go for DNS resolution if TTL expires. ... (2 Replies)
Discussion started by: softindia
2 Replies

5. Programming

How to set DNS lookup type for getaddrinfo()?

Hi there, I'm trying to do an MX type lookup using getaddrinfo(), but I can't work out how to change the lookup type to MX from the standard A - can anybody tell me how to do this? Thanks very much John G (3 Replies)
Discussion started by: JohnGraham
3 Replies

6. Shell Programming and Scripting

stty error when script is called out of a cronjob

Hello, I'm trying to implement a script to call a third-party tool every so often and write the results to a file. If I run it interactively it works fine, but when it comes to run it out of a cronjob, I keep getting this error: stty: tcgetattr: a specified file does not support the... (3 Replies)
Discussion started by: fabiogilr
3 Replies

7. Programming

getaddrinfo error:service name not available for the specified socket type

I use Solaris 10,and I use getaddrinfo in my code,like follows: struct addrinfo *ailist,hint; if(argc!=2) err_quit("usage: ruptime hostname"); hint.ai_flags=0; hint.ai_family=0; hint.ai_socktype=SOCK_STREAM; hint.ai_protocol=0; hint.ai_addrlen=0; hint.ai_canonname=NULL;... (1 Reply)
Discussion started by: konvalo
1 Replies

8. Shell Programming and Scripting

stty: tcgetattr: A specified file does not support the ioctl system call

Hi Gurus, I have scheduled a script using cron scheduler. Script works fine when i run it manually. But it gives the following error in cron log. stty: tcgetattr: A specified file does not support the ioctl system call. I have given the following statement in cron. 0-59 * * * *... (5 Replies)
Discussion started by: svajhala
5 Replies

9. Shell Programming and Scripting

tcgetattr: Inappropriate ioctl for device after ssh command

Hello everyone I am finishing a script allowing me to purge logs on multiple servers, i have one last pb with the ssh command.........it is throwing me the following error : tcgetattr: Inappropriate ioctl for device (full screen in attached file 1, full script in attached file 2) It... (15 Replies)
Discussion started by: jimmy75_13
15 Replies

10. UNIX for Dummies Questions & Answers

Tcgetattr: Inappropriate ioctl for device

Hi, ssh -q -t -l $usr $host bin/test.sh I am using above command to run script remotely. script is working without any issues. but I am getting "tcgetattr: Inappropriate ioctl for device" message on console. plz help how can I avoid this message. Thanks Moved thread from Emergency... (1 Reply)
Discussion started by: Kri
1 Replies

11. Programming

Getattr use wildcard as name parameter python

I am trying to extract value from snmp trap oid got from mib, using getattr function in python. getattr(evt,1.3.6.1.4.1.755.1.2.3.3.1.1.2)when i started testing the using real trap OID is having two additional values at the end. 1.3.6.1.4.1.755.1.2.3.3.1.1.2.**1.2** so is there a way i can use ... (1 Reply)
Discussion started by: kar_333
1 Replies

12. IP Networking

Can't get local IP address in getaddrinfo

Hi all, I am working with SIP protocol and am using SIPp to generate SIP traffic. But the call is not going through since I get the error; 2015-02-24 14:09:39:330 1424804979.330517: Can't get local IP address in getaddrinfo, local_host='NODE-01', local_ip=''. My ifconfig output is; ... (2 Replies)
Discussion started by: Junaid Subhani
2 Replies