[C/Linux]Help in replacing obsolete function


 
Thread Tools Search this Thread
Top Forums Programming [C/Linux]Help in replacing obsolete function
# 1  
Old 01-29-2012
[C/Linux]Help in replacing obsolete function

Hi guys,
I need help on some function replacement cause I get obsolete function warning(and I must remove it):
-gethostbyaddr(arg1,arg2,arg3)
-gethostbyname(arg1)
-getservbyname(arg1,arg2)
can be replaced with getaddrinfo(arg1,arg2,arg3,arg4) but I'm not able to undestand how(libraries #include <sys/socket.h> #include <netdb.h>)

-inet_ntoa(arg1) to inet_ntop(arg1,arg2,arg3) <arpa/inet.h>

-settimer(arg1,arg2,arg3) to timer_settime(arg1,arg2,arg3) <time.h>

-sigblock(arg1)
-sigsetmask(arg1)
can be replaced to sigprocmask(arg1,arg2,arg3)
-sigmask(arg1) to sigaddset(arg1,arg2) lib:<signal.h>

Please help me as soon as you can:I googled but I dind't find anything useful.Thanks a lot.
Fracche
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Linux Commands needed for replacing variable number of spaces with a single , in a txt file

Hi I want to read a text file and replace various number of spaces between each string in to a single "," or any other character .Please let me know the command to do so. My input file is a txt file which is the output of a SQL table extract so it contains so many spaces between each column of the... (2 Replies)
Discussion started by: Hari Prasanth
2 Replies

2. UNIX for Dummies Questions & Answers

Function Interposition in Linux

Hello, Please I try to apply the mechanism Interposition Function in Linux on the function write (write a socket) as follows: # include <sys/types.h> # include <sys/socket.h> # include <netinet/in.h> # include <arpa/inet.h> # include <netdb.h> # include <stdio.h> # include <string.h>... (2 Replies)
Discussion started by: chercheur857
2 Replies

3. UNIX for Dummies Questions & Answers

cut function in linux

hi; i have file with a lote of data i would like to cut only numbers that start with prefix 20408 my file contain thousands of rows like this ,204080700152648,20111215,,,20 31630536259,204080662332510,20 31622520779,204080660098298,20 31651343790,204080130071280,20... (2 Replies)
Discussion started by: kpinto
2 Replies

4. UNIX for Advanced & Expert Users

What is the function to get address of the virtual memory block in linux??

I want address of current virtual memory block? i am using fedora10:wall::wall: (1 Reply)
Discussion started by: powyama
1 Replies

5. Shell Programming and Scripting

system() function nd backtrick term in linux

I want to know about the difference between system() function nd backtrick term in linux???? (1 Reply)
Discussion started by: Mac91
1 Replies

6. Shell Programming and Scripting

Should I learn bash scripting or is it going obsolete?

Hi folks, I'm a CS students enrolled in a sysadmin class where we've been covering bash scripting for the past few weeks. I have prior knowledge in java, c++, c#, python,and some scripting languages like asp.net w/c# and php. This bash stuff seems pretty neat and a bit different than what I am... (9 Replies)
Discussion started by: KalEl
9 Replies

7. Linux

replacing enter character in LINUX

Hi 1) I need to replace an "enter" character with another character. I thought it should be like this (E.G) replace all stirngs "LIAV"+enter with kokokoko: :1,$s/LIAV^M/kokokoko/g but it dose not work. 2) Also dose nayone know how to replace wildcards? for... (3 Replies)
Discussion started by: liav
3 Replies

8. UNIX for Advanced & Expert Users

obsolete environment variables

how can we determine that which scripts ,binaries, utilities or something else uses a specific environment variable? i have an environment variable EXTRAPATH in a shell script, and i want to determine if it is used by something else or it is absolutely useless. (4 Replies)
Discussion started by: gfhgfnhhn
4 Replies
Login or Register to Ask a Question
AFQUERY(3)																AFQUERY(3)

NAME
afQuery, afQueryLong, afQueryDouble, afQueryPointer - query the capabilities of the Audio File Library SYNOPSIS
#include <audiofile.h> AUpvlist afQuery (int querytype, int arg1, int arg2, int arg3, int arg4); long afQueryLong (int querytype, int arg1, int arg2, int arg3, int arg4); double afQueryDouble (int querytype, int arg1, int arg2, int arg3, int arg4); void *afQueryPointer (int querytype, int arg1, int arg2, int arg3, int arg4); PARAMETERS
querytype can be one of the following: o AF_QUERYTYPE_FILEFMT o AF_QUERYTYPE_INST o AF_QUERYTYPE_INSTPARAM o AF_QUERYTYPE_COMPRESSION o AF_QUERYTYPE_COMPRESSIONPARAM o AF_QUERYTYPE_MISC o AF_QUERYTYPE_MARK o AF_QUERYTYPE_LOOP arg1, arg2, arg3, and arg4 are integer selectors whose meaning depends upon querytype. RETURN VALUE
Upon success, afQuery will return a non-null AUpvlist value. Upon failure, afQuery will return null while afQueryLong and afQueryDouble will return -1 and afQueryPointer will return null. Pointers representing character strings are owned by the Audio File Library and must not be freed; all other pointer values must be freed by the caller. DESCRIPTION
For AF_QUERYTYPE_FILEFMT, the following selectors are valid values for arg1: AF_QUERY_LABEL Request a short label string for the format (e.g., "aiff"). AF_QUERY_NAME Request a short name for the format (e.g., "MS RIFF WAVE"). AF_QUERY_DESC Request a descriptive name for the format (e.g., "Audio Interchange File Format"). AF_QUERY_IMPLEMENTED Request a boolean value indicating whether the format is implemented for reading and writing in the Audio File Library. AF_QUERY_ID_COUNT Request the total number of formats implemented. AF_QUERY_IDS Request an integer array of the id token values of all implemented file formats. AF_QUERY_COMPRESSION_TYPES Used with the selector AF_QUERY_VALUE_COUNT in arg2, this will return a long integer containing the number of compression schemes available for use within the format specified in arg3. Used with selector AF_QUERY_VALUES, it returns a pointer to an integer array containing the compression id values of the compression schemes supported by the format specified in arg3. AF_QUERY_SAMPLE_FORMATS Used with the selector AF_QUERY_DEFAULT in arg2, this will return the default sample format for the file format specified in arg3. AF_QUERY_SAMPLE_SIZES Used with selector AF_QUERY_DEFAULT in arg2, this will return the default sample width for the file format specified in arg3. For AF_QUERYTYPE_INST, the following selectors are valid for arg1: AF_QUERY_SUPPORTED Request a boolean value indicating whether the file format in arg2 supports instruments. AF_QUERY_MAX_NUMBER Request an integer value indicating the maximum number of instruments supported by the file format in arg2. For AF_QUERYTYPE_INSTPARAM, the following selectors are valid for arg1: AF_QUERY_SUPPORTED Request a boolean value indicating whether the file format in arg2 supports instrument parameters. AF_QUERY_ID_COUNT Request an integer value indicating the number of instrument parameters supported by the file format in arg2. AF_QUERY_IDS Request an integer array containing the instrument parameter values for the file format in arg2. AF_QUERY_TYPE For the file format in arg2, request the type of the instrument parameter in arg3. AF_QUERY_NAME For the file format in arg2, request the name of the instrument parameter in arg3. AF_QUERY_DEFAULT For the file format in arg2, request the default value of the instrument parameter in arg3. ERRORS
afQuery can produce the following errors: AF_BAD_QUERYTYPE The query type is unsupported. AF_BAD_QUERY The arguments to the query are bad. AUTHOR
Michael Pruett <michael@68k.org> Audio File Library 0.3.6 03/06/2013 AFQUERY(3)