* interfacing other languages
@ 2003-01-31 2:40 David Eduardo Gomez Noguera
2003-01-31 4:07 ` Hemant Mohan
2003-02-04 15:31 ` Reading from pipe Alexi Jordanov
0 siblings, 2 replies; 7+ messages in thread
From: David Eduardo Gomez Noguera @ 2003-01-31 2:40 UTC (permalink / raw)
To: linux c programming
Hello.
I have a pad im writing some libraries for, in C, that need to ba called
from java.
Can anyone direct me to a link or book to read on how to write such
interfaces?
It'd be usefull to know it for any other case, as in use those same
libraries from, say, perl, or some othere scripting or non scripting
language, if possible.
thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: interfacing other languages
2003-01-31 2:40 interfacing other languages David Eduardo Gomez Noguera
@ 2003-01-31 4:07 ` Hemant Mohan
2003-02-04 15:31 ` Reading from pipe Alexi Jordanov
1 sibling, 0 replies; 7+ messages in thread
From: Hemant Mohan @ 2003-01-31 4:07 UTC (permalink / raw)
To: linux c programming
C libraries can be called from Java using the java Native Interface (JNI)
interface. There is a nice JNI tutorial at
http://java.sun.com/docs/books/tutorial/native1.1/index.html
hemant
On Friday 31 January 2003 08:10 am, linux-c-programming-owner@vger.kernel.org
wrote:
> Hello.
>
> I have a pad im writing some libraries for, in C, that need to ba called
> from java.
>
> Can anyone direct me to a link or book to read on how to write such
> interfaces?
> It'd be usefull to know it for any other case, as in use those same
> libraries from, say, perl, or some othere scripting or non scripting
> language, if possible.
>
> thanks.
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Reading from pipe
2003-01-31 2:40 interfacing other languages David Eduardo Gomez Noguera
2003-01-31 4:07 ` Hemant Mohan
@ 2003-02-04 15:31 ` Alexi Jordanov
2003-02-04 21:06 ` Glynn Clements
1 sibling, 1 reply; 7+ messages in thread
From: Alexi Jordanov @ 2003-02-04 15:31 UTC (permalink / raw)
To: linux-c-programming
Hello,
I'm using pipes at this moment and I try decrease
threads in my application. Therefore I need to know
whether there is a way to check if there are any
available bytes in pipe. I don't want to use blocking
read operation. Just to check and if there are then to
read them.
Regards,
Alex
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Reading from pipe
2003-02-04 15:31 ` Reading from pipe Alexi Jordanov
@ 2003-02-04 21:06 ` Glynn Clements
2003-02-13 23:32 ` using perl regex engine from C ? J.
0 siblings, 1 reply; 7+ messages in thread
From: Glynn Clements @ 2003-02-04 21:06 UTC (permalink / raw)
To: Alexi Jordanov; +Cc: linux-c-programming
Alexi Jordanov wrote:
> I'm using pipes at this moment and I try decrease
> threads in my application. Therefore I need to know
> whether there is a way to check if there are any
> available bytes in pipe. I don't want to use blocking
> read operation. Just to check and if there are then to
> read them.
select() will indicate whether or not there is any data available; if
there is, then read() will read whatever data is available, up to a
maximum of the size of its buffer (it won't block trying to read the
specified number of bytes).
Alternatively, ioctl(FIONREAD) will return (in the int to which its
third argument points) the number of bytes currently available.
--
Glynn Clements <glynn.clements@virgin.net>
^ permalink raw reply [flat|nested] 7+ messages in thread
* using perl regex engine from C ?
2003-02-04 21:06 ` Glynn Clements
@ 2003-02-13 23:32 ` J.
2003-02-13 23:46 ` (F)using " Steven Smith
0 siblings, 1 reply; 7+ messages in thread
From: J. @ 2003-02-13 23:32 UTC (permalink / raw)
To: linux-c-programming
Hello...
I was wondering if it is possible to access the perl regex engine from a
C program. Is there a interface to it? Have people done it ? I
guess so, but where should I start searching ? G00gle fails to coff up
anything usefull and I am not really perlological enlightend.
Any pointers, thoughts or suggestions would be most welcomed.
Thnkx...
J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: (F)using perl regex engine from C ?
2003-02-13 23:32 ` using perl regex engine from C ? J.
@ 2003-02-13 23:46 ` Steven Smith
2003-02-14 2:03 ` using " J.
0 siblings, 1 reply; 7+ messages in thread
From: Steven Smith @ 2003-02-13 23:46 UTC (permalink / raw)
To: J.; +Cc: linux-c-programming
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
> I was wondering if it is possible to access the perl regex engine from a
> C program. Is there a interface to it? Have people done it ? I
> guess so, but where should I start searching ?
It isn't the Perl regex engine, but libpcre (Perl Compatible Regular
Expressions) is fairly close.
Failing that, you'd probably need to either copy and paste chunks of
the Perl source code, or use libperl and run the regexps from embedded
Perl.
Of course, if you just need regular expressions, and aren't bothered
about the Perl-specific things, you could use the regex functions in
libc (regcomp, regexec, regerror, and regfree).
Steven Smith,
sos22@cam.ac.uk.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-02-14 2:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-31 2:40 interfacing other languages David Eduardo Gomez Noguera
2003-01-31 4:07 ` Hemant Mohan
2003-02-04 15:31 ` Reading from pipe Alexi Jordanov
2003-02-04 21:06 ` Glynn Clements
2003-02-13 23:32 ` using perl regex engine from C ? J.
2003-02-13 23:46 ` (F)using " Steven Smith
2003-02-14 2:03 ` using " J.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).