libraries / functions

Hi Folks,

how can I find a special function within the c-libraries without knowing the functions name. For example: I’d like to write an interface-program for a RS232-Port in order to communicate with an AVR-microprocessor. I know, there must be code for initializing, opening, reading, writing and closing the RS232 port. But I don’t know the exact names of the functions. Exists anywhere an overview over all existing functions, filtered by topic or something like this ?

Thanks in advance, Rafa

open, close, read, write, ioctl

See the man pages.

Those are the ones you need, as a device is also a file. For ioctl, the arguments needed are specific to tty lines, so you need to do man tty_ioctl.

Hi Ken,

thanks for the names of the functions I need. But my question was intented to be a bit more commun. Now I know how to communicate with the RS232-Port. Maybe tomorrow I have to find a function for anything else. I only know the intention of the function I’m looking for, but for using the man-pages I have to know the correct name of the function.

Up to now I didn’t find an answer to this question neither in the man-pages, nor in the openSUSE-Dokument-pages. All this help-pages help a lot, but only if one already knows about what he is looking for. One can find a lot of information about the c/c+±standard-libraries. But all the other libraries that are already installed an the system, should also be usable for me in order to avoid the invention of the wheel over and over.
Maybe the answer to this question is not a “Super-listing of all known functions” but more an idea or strategie how to find the desired function.
I hope now I could explain the problem better than in the first posting.

Thanks, Rafa

Hi folks,

Waiting for more answers, I found this:

Index of /pub/linux/docs

Here one can find for nearly every problem a detailed How-To, very well explaind and usually with detailed examples. The latter leads to the functions and libraries.

You can do

man -k keyword

E.g. if you want man pages that deal with dialogs, you would do:

man -k dialog

However there are limitations. This brings up man pages on programs and file formats also. It doesn’t show you functions that don’t have man pages, but are described in separate documentation. E.g. MySQL C bindings.

In general the question is a bit like what word do I want to use in my essay. There are a whole lot of words out there that are not common and it’s no use looking at a dictionary if you don’t know the word already. (A thesaurus might help a bit if you know the concept.)

So for programming it comes down to reading library documentation and also experience with what libraries are available.

Thanks for your reply…

experience is a very important point. As I don’t have experience in programming within Linux, this forum is a very good way for me to benefit from others experience.

Another way maybe is to investigate the source code of programs which deal more or less with the required features. And to learn so from the skills of experienced programmers.

Greetings from Germany, Rafa

Yes, that’s an excellent way. Remember the saying: good programmers borrow, great programmers steal.

Have a lot of fun with programming.