08-14-2008
It compile with no errors and no warnings.This is the part of code
#include<stdio.h>
#include<string.h>
#include "header.h"
#include "struct.h"
extern struct stack_rec stack[100];
extern char word[MAXWORD], mal_mean[MAXWORD], E_attr[MAXLEN], H_attr[CATLEN], semantic_tag[MAXWORD];
extern int word_cat, top, VOICE, prep_par, pos, phrase;
void getreltvform (char[], int);
void check_suffix (char[], int , int);
int p = 0;
/***This function is used to resolve the meaning of relative pronouns and takes the formation with the word***/
void resolve_reltvpronoun ()
{
char mmean[MAXWORD], means[5][MAXWORD];
int len = 0, i, clen = 0, ci = 0, spos = 0;
p = pos;
printf ("\ninside resolve rel pronouunnn\n");
if (stack[top - 1].word_cat == KARAK && prep_par == 7)
spos = top - 2;
else
spos = top - 1;
strcpy (mmean, stack[spos].mal);
len = strlen (mmean);
printf ("\n\nstack mal : %s\n", mmean);
stack[spos].mal[0] = '\0';
for (; i < 5; i++)
means[i][0] = '\0';
for (i = 0; mmean[i] != '\0'; i++)
{
if (mmean[i] == '/')
{
means[clen++][ci] = '\0';
ci = 0;
}
else
means[clen][ci++] = mmean[i];
}
means[clen][ci] = '\0';
for (i = 0; i <= clen; i++)
getreltvform (means[i], spos);
stack[spos].mal[strlen (stack[spos].mal) - 1] = '\0';
printf ("\n final stack mallllllllll : %s", stack[spos].mal);
}
segmention fault occur at the line -stack[spos].mal[0] = '\0';If we comment the line it will go to another line after that.
All the extern variables are declared in other files.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
I was able to solve my previous problem (link directory)... but now i have this following problem.
I have mounted a disk from other machine using "mount -F nfs" command. When i run a batch which generates some files in that drive.... after a certain number of files i get... (1 Reply)
Discussion started by: nileshkarania
1 Replies
2. Programming
Hi,
We are trying to run dbx on a core file for which we have the original executable and libs, but not the source / object tree. We have recompiled the objects from the original source, but dbx complains that they were compiled at a different time, and refuses to read them:
Object file:... (0 Replies)
Discussion started by: Sabari Nath S
0 Replies
3. Programming
Didn't have this problem in AIX, but ported to Linux with GCC compiler and am now getting a runtime error:
tssutil: symbol lookup error: /work/agility/devel/bin/libagam.so: undefined symbol: fstat
I'm sure most of you know that fstat is an intrinsic function just like printf, memcpy, etc. When I... (5 Replies)
Discussion started by: marcus121
5 Replies
4. Shell Programming and Scripting
Hi,
I have a perl script which is interacting with Database.
I have following line of code :
=================================================
sub BEGIN
{
#use Getopt::Std;
#getopt ('S');
#($STEAP)=($opt_S);
use lib ("/home/perl_lib");
use... (1 Reply)
Discussion started by: rawat_me01
1 Replies
5. Shell Programming and Scripting
p="-e"
echo $p
It is not returning the value "-e" stored. Instead returns null.
I am wondering how could this happen. Please help me out.I tried all possibilities like p='-e' | p="\-e". Nothing seems to work.
:confused::confused: (10 Replies)
Discussion started by: shanneykar
10 Replies
6. Solaris
I'm posting here as it didn't seem quite right in the hardware section (as it's LOM commands). My apologies if I have that wrong though :)
I've finally gotten round to configuring the LOM on my Netra X1, but I can't get it to change the hostname via the "set" command:
lom>show hostname... (2 Replies)
Discussion started by: Smiling Dragon
2 Replies
7. Shell Programming and Scripting
Hi All,
I need to get the version of python installed and store it in a variable for later use. Whereas it is printing on the console instead of storing to variable. I am able to store output of ls command in a variable. Please check the below code :
root@myhost:/volumes/srini# cat... (4 Replies)
Discussion started by: srinivasan.neel
4 Replies
8. Solaris
Hi,
I am trying to get an HPz420 workstation instaled (zfs root pool) via a jump-start server.
I have a zfs image (from this workstation) the Solaris release is 10 1/13 update 11.
I use a sparc U25 install server, upgraded to the same solaris build 10 1/13.
This server is configured to install... (8 Replies)
Discussion started by: sc0rpie
8 Replies
9. Solaris
Hello,
Each time a user log on to host, they receive below error:
-sh: /tmp/outfile: cannot create
Example:
$ ssh host
user@host's password:
Last login: Fri Dec 4 08:17:28 2015 from client.ref
|-----------------------------------------------------------------|
-sh:... (2 Replies)
Discussion started by: feroccimx
2 Replies
LEARN ABOUT MOJAVE
cc_md5
CC_MD5(3cc) LOCAL CC_MD5(3cc)
NAME
CC_MD2_Init CC_MD2_Update CC_MD2_Final CC_MD2
CC_MD4_Init CC_MD4_Update CC_MD4_Final CC_MD4
CC_MD5_Init CC_MD5_Update CC_MD5_Final CC_MD5
-- MD2, MD4, and MD5 hash functions
SYNOPSIS
#include <CommonCrypto/CommonDigest.h>
extern int
CC_MD2_Init(CC_MD2_CTX *c);
extern int
CC_MD2_Update(CC_MD2_CTX *c, const void *data, CC_LONG len);
extern int
CC_MD2_Final(unsigned char *md, CC_MD2_CTX *c);
extern unsigned char *
CC_MD2(const void *data, CC_LONG len, unsigned char *md);
extern int
CC_MD4_Init(CC_MD4_CTX *c);
extern int
CC_MD4_Update(CC_MD4_CTX *c, const void *data, CC_LONG len);
extern int
CC_MD4_Final(unsigned char *md, CC_MD4_CTX *c);
extern unsigned char *
CC_MD4(const void *data, CC_LONG len, unsigned char *md);
extern int
CC_MD5_Init(CC_MD5_CTX *c);
extern int
CC_MD5_Update(CC_MD5_CTX *c, const void *data, CC_LONG len);
extern int
CC_MD5_Final(unsigned char *md, CC_MD5_CTX *c);
extern unsigned char *
CC_MD5(const void *data, CC_LONG len, unsigned char *md);
DESCRIPTION
The following functions are used to produce an hash from data:
CC_MD2_Init() initializes a CC_MD2_CTX structure.
CC_MD2_Update() can be called repeatedly with chunks of the message to be hashed (len bytes at data).
CC_MD2_Final() places the MD2 message digest in md, which must have space for CC_MD2_DIGEST_LENGTH == 16 bytes of output, and erases the
CC_MD2_CTX.
CC_MD2() computes the MD2 message digest of the len bytes at data and places it in md (which must have space for CC_MD2_DIGEST_LENGTH == 16
bytes of output). It returns the md pointer.
CC_MD4_Init(), CC_MD4_Update(), CC_MD4_Final(), CC_MD4(), CC_MD5_Init(), CC_MD5_Update(), CC_MD5_Final(), and CC_MD5() are analogous using an
CC_MD4_CTX and CC_MD5_CTX structure.
NOTE
MD2, MD4, and MD5 are recommended only for compatibility with existing applications. In new applications, SHA-256(or greater) should be pre-
ferred.
RETURN VALUES
All routines return 1 except for the one-shot routines ( CC_MD2() , etc.), which return the pointer passed in via the md parameter.
CONFORMING TO
RFC 1319, RFC 1320, RFC 1321
SEE ALSO
CC_crypto(3cc), CC_SHA(3cc), CCHmac(3cc), CCCryptor(3cc)
HISTORY
These functions are available in OS X 10.4 and later.
These functions provide similar functionality to the routines found in OpenSSL 0.9.6 and may use the same implementation.
BSD
April 5, 2007 BSD