I'am writing a program in C language and my code is working perfectly i just need to add a search to it ...
My code lets users add companies, and then display them on screen...
i would like to add a search that allows user to type company name and then displayall its info on the screen !!
THANK YOU IN ADVANCE
I am facing a strange error while creating posix threads:
Given below are two snippets of code, the first one works whereas the second one gives a garbage value in the output.
Snippet 1
This works:
--------------
int *threadids;
threadids = (int *) malloc (num_threads * sizeof(int));
... (4 Replies)
Suppose there are two arrays of arrays:
@A = ( , , , );
@B = ( , , , , );
For each of $A, $A, $A..., I want to find the corresponding one in @B (match the letter, like $A eq $B), and print out both the second item, for example, $A and $B.
How can I do this in perl? grep + map? Hope I... (1 Reply)
I tried to make the title/subject detailed, but well.. have to keep it short as well.
I am wanting to take a large list of strings, and search through a large list of files to hopefully find numerous matches. I am not sure the quickest way to do this though.
// List of files
file1.txt... (2 Replies)
Hi All,
I'm writing a nagios check that will see if our ldap servers are in sync...
I got the status data into a nested array, I would like to search key of each array and if "OK" is NOT present, echo other key=>values in the current array to a variable
so...eg...let take the single array... (1 Reply)
without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
I'm attempting to grep for lines formatted like this:
grep -e '^\\",'
Any suggestions as to why this isn't working?
---------- Post updated at 05:03 PM ---------- Previous update was at 04:17 PM ----------
This was my solution:
grep -e '^\'\",'
It's hard to read, but basically I... (4 Replies)
I am writing the code in perl.
I have an array in perl and each variable in the array contains the data in the below format
Now I need to check the below variable w.r.t system month I need to store the date and time(Tue Aug 7 03:54:12 2012) from the below data into file if contains only 'Aug'... (5 Replies)
Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help.
pesudo code
if == ENDSINFIVEINTS ]]; then
do... (4 Replies)
hello,
i need a bit of help on how to do this effectively in bash without a lot of extra looping or massive switch/case
i have a long array of M elements and a short array of N elements, so M > N always. M is not a multiple of N.
for case 1, I want to stretch N to fit M
arrayHuge
H = (... (2 Replies)
Discussion started by: f77hack
2 Replies
LEARN ABOUT OSF1
dlsym
dlsym(3) Library Functions Manual dlsym(3)NAME
dlsym - Obtain the address of a symbol from a dlopen() object
SYNOPSIS
#include <dlfcn.h>
void *dlsym(void *handle, const char *name)
PARAMETERS
The value returned from a call to dlopen() (and which has not since been released by a call to dlclose()). The name (character string) of
the symbol being sought.
DESCRIPTION
The dlsym function allows a process to obtain the address of a symbol defined within an object made accessible by a dlopen() call.
The dlsym function will search for the named symbol in all objects loaded automatically as a result of loading the object referenced by
handle (see dlopen(3)). Load ordering is used in dlsym() operations upon the global symbol object. The symbol resolution algorithm used
will be in dependency order as described in dlopen().
RETURN VALUE
The dlsym() function will return NULL, if handle does not refer to a valid object opened by dlopen() or if the named symbol cannot be found
within any of the objects associated with handle. More detailed diagnostic information is available through dlerror().
ERRORS
No errors are defined.
EXAMPLES
The following example shows how one can use dlopen() and dlsym() to access either function or data objects. For simplicity, error checking
has been omitted.
void *handle;
int *iptr, (*fptr)(int);
/* open the needed object */
handle = dlopen("/usr/home/me/libfoo.so.1", RTLD_LAZY);
/* find the address of function and data objects */
fptr = (int (*)(int))dlsym(handle, "my_function");
iptr = (int *)dlsym(handle, "my_object");
/* invoke function, passing value of integer as a parameter */
(*fptr)(*iptr);
APPLICATION USAGE
Special-purpose values for handle are reserved for future use. These values and their meanings are: Specifies the next object after this
one that defines name. This one refers to the object containing the invocation of dlsym(). The next object is the one found upon the
application of a load order symbol resolution algorithm (see dlopen(3)). The next object is either one of global scope - because it was
introduced as part of the original process image or because it was added with a dlopen() operation including the RTLD_GLOBAL flag) - or an
object that was included in the same dlopen() operation that loaded this one. The RTLD_NEXT flag is useful to navigate an intentionally
created hierarchy of multiply defined symbols created through interposition. For example, if a program wished to create an implementation
of malloc() that embedded some statistics gathering about memory allocations, such an implementation could use the real malloc() definition
to perform the memory allocation - and itself only embed the necessary logic to implement the statistics gathering function.
NOTES
Use of the dlsym routine is the preferred mechanism for retrieving symbol addresses. This routine reliably returns the current address of
a symbol at any point in the program, while the dynamic symbol resolution described previously might not function as expected due to com-
piler optimizations. For example, the address of a symbol might be saved in a register prior to a dlopen call, and the saved address might
then be used after the dlopen call - even if the dlopen call changed the resolution of the symbol.
RELATED INFORMATION dlclose(3), dlerror(3), dlopen(3). delim off
dlsym(3)