Hi,
Running V52FT01 sourceforge binary installed in /opt/gtm/V52FT01.
mumps -direct works as expected.
I have compiled the call-in example on fedora core 6 as follows:
gcc -Os -Wall -c main.c -I. -I/opt/gtm/V52FT01
linked:
gcc main.o -o test1 -L/opt/gtm/V52FT01 -lgtmshr -lc
set the env var:
export GTMCI=`pwd`/calltab.ci
run:
../test1
output:
srcstr = /opt/library/V43001E
$piece(/opt/library/V43001E,"/",4) is V43001E
After set $piece(srcstr,"/",4) = V44002
srcstr = /opt/library/V44002
then I get back to a command prompt in the gnome terminal session, but
the terminal session is corrupt. If I hit enter everything shows up on
a single line and I can't type anything else in that terminal. I can
reset it, but the only thing that works is to close that session and
start a new one.
[stuffduff@[EMAIL PROTECTED]
~]$ cd Desktop/GT.M-python/
[stuffduff@[EMAIL PROTECTED]
GT.M-python]$ export GTMCI=`pwd`/calltab.ci
[stuffduff@[EMAIL PROTECTED]
GT.M-python]$ ./test1
srcstr = /opt/library/V43001E
$piece(/opt/library/V43001E,"/",4) is V43001E
After set $piece(srcstr,"/",4) = V44002
srcstr = /opt/library/V44002
[stuffduff@[EMAIL PROTECTED]
GT.M-python]$ [stuffduff@[EMAIL PROTECTED]
GT.M-python]$
[stuffduff@[EMAIL PROTECTED]
GT.M-python]$ [stuffduff@[EMAIL PROTECTED]
GT.M-python]$
[stuffduff@[EMAIL PROTECTED]
GT.M-python]$ [stuffduff@[EMAIL PROTECTED]
GT.M-python]$
[stuffduff@[EMAIL PROTECTED]
GT.M-python]$ [stuffduff@[EMAIL PROTECTED]
GT.M-python]$
[stuffduff@[EMAIL PROTECTED]
GT.M-python]$
So I made a simplified version:
#include <stdio.h>
#include "gtmxc_types.h"
#define BUF_LEN 1024
int main()
{
gtm_char_t msgbuf[BUF_LEN], dststr[100];
gtm_char_t srcstr[] = "/opt/library/V43001E";
gtm_status_t status;
printf("srcstr = %s\n", srcstr);
return 0;
}
Which I compiled and ran. The output was as expected and the terminal
window continued to function normally. So I added back the init & exit
w/o any other calls:
#include <stdio.h>
#include "gtmxc_types.h"
#define BUF_LEN 1024
int main()
{
gtm_char_t msgbuf[BUF_LEN], dststr[100];
gtm_char_t srcstr[] = "/opt/library/V43001E";
gtm_status_t status;
status = gtm_init();
if (status != 0)
{
gtm_zstatus(msgbuf, BUF_LEN);
return status;
}
printf("srcstr = %s\n", srcstr);
status = gtm_exit();
if (status != 0)
{
gtm_zstatus(msgbuf, BUF_LEN);
fprintf(stderr, "%s\n", msgbuf);
return status;
}
return 0;
}
This time I reproduced the error as before.
So I believe that somewhere in the interaction with the call-in
interface some extra control characters are getting generated and
causing the problem. Since there is no indication of an OPEN or USE
command in the m example, thinking that the call-in functionality
works by calling the 'm' functionality by it's underlying 'C' code
interface. So at this point I'm not really sure how to go about
debugging this.
Would building GT.M on my platform be the way to address this
problem?
Any suggestions sincerely appreciated,
Sean


|