08-09-2007
offcourse this is not a home work ... I am maintaning a code and i got a fix there i am surprised to see that it works that so i posted .. Please find the part of the code below
...
...
*module; // What this will do
char *t_array[100];
char *f_array[100];
memset(buf,0,50);
for(cnt1=0; cnt1<100; cnt1++)
{
t_array[cnt1] = buf+(cnt1*6);
f_array[cnt1] = "121212121";
}
cnt1 = 0;
module = text_list_rewind(gbs->modules);
while (module)
{
f_array[cnt1] = module;
cnt1++;
module = text_list_nxt(gbs->modules);
} /* f_array is ready now */
rc = dbsql_exec(gbs->db, sql, t_array[0], sizeof(t_array), 1, NULL, NULL);
if (rc == DBSQL_FAIL)
{
fran_close(gbs);
fatal_exit(-1, "sql command failed: %s\n", sql);
}
else
{
i=i+1;
while (rc == DBSQL_MORE)
{
rc = dbsql_more(gbs->db, t_array[i], 1);
// CORE DUMP IS HAPPENING HERE
i++;
}
i=0;
} /* t_array is ready now */
also i am not seeeing any values in t_array and f_array .. Please advice ..
Thanks,
Arun..
9 More Discussions You Might Find Interesting
1. Programming
Dear all,
In my code,i am planning to use memset function to re-initialise an array before populating it everytime. Will using memset function be an overload to the program? (3 Replies)
Discussion started by: ranj@chn
3 Replies
2. UNIX for Advanced & Expert Users
Dear Friends,
Can any one tell me the difference between memset and calloc function in C.
Regards,
Selvi (7 Replies)
Discussion started by: salvi
7 Replies
3. Solaris
Hi All,
we have an application that is written in 'C' programming to connects to various servers in the organization.
The bellow code establish a TCP connection to connect to the remote servers. the application works perfectly ok, but, after some time the entire process get's crashed and... (2 Replies)
Discussion started by: sudharma
2 Replies
4. Programming
Hi guys,
my tool works fine in gentoo, ubuntu now im trying to port it to windows but bzero/bcopy I read aren't working on windows and for better portability I should of use memset() so im trying to translate
bzero(buffer,256);in
printf("MAIL TO");
strcpy(buffer, rcp);
... (4 Replies)
Discussion started by: Jess83
4 Replies
5. Shell Programming and Scripting
Hey all,
Thanks for all the help you have given me. Two more things I am trying to figure out.
I need to issue a command..example
ps -ef | grep <process>
This would return about 10-15 running processes. I need to verify that there are x amount of processes running. What is... (7 Replies)
Discussion started by: jeffs42885
7 Replies
6. Homework & Coursework Questions
1.) I am to write scripts that will be phasetest folder in the home directory.
2.) The folder should have a set-up,phase and display files
I have written a small script which i used to check for the existing users and their password.
What I need help with:
I have a set of questions in a... (19 Replies)
Discussion started by: moraks007
19 Replies
7. UNIX for Dummies Questions & Answers
1) The lpr and sort utilities accept input either from a file named on the command line or from standard input.
a)Name two other utilities that function in a similar manner.
b)Name a utility that accepts its input only from standard input.
2) Explain the following error message. What... (10 Replies)
Discussion started by: youngyou
10 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I would like to know how we can highlight/select a section of a file in vi and delete that section if we don't want to use the dd command to delete one line at at time. There is one where we don't want to delete the whole line , but up to a certain word. (2 Replies)
Discussion started by: Pouchie1
2 Replies
9. Emergency UNIX and Linux Support
Hi,
memset call is failing on solaris for me. I wrote below code and that also fails. Any hints?
void *memset(void *dst, int c, size_t n)
{
if (n) {
char *d = dst;
do {
*d++ = c;
} while (--n);
}
return dst;
} (2 Replies)
Discussion started by: skyineyes
2 Replies
LEARN ABOUT DEBIAN
z88dk-z80asm
z80asm(1) z88 Development Kit z80asm(1)
NAME
z88dk-z80asm - Z80 assembler compiler.
SYSNOPIS
z88dk-z80asm [options] [ @<modulefile> | {<filename>} ]
DESCRIPTION
This manual page documents briefly the z88dk tools. This manual page was written for the Debian GNU/Linux distribution (but may be used by
others), because the original program does not have a manual page.
z88dk-z80asm is a Z80 assembler cross compiler.
Please refer to the z88dk documentation in /usr/share/doc/z88dk-doc/ for the complete description of the system. If /usr/share/doc/z88dk-
doc not exists, please install the package z88dk-doc.
OPTIONS
-h display help
-n defines option to be turned OFF (except -r -R -i -x -D -t -o)
-v verbose
-l listing file
-s symbol table,
-m map listing file
-r<ORG>
Explicit relocation <ORG> defined in hex (ignore ORG in first module)
-plus Interpret 'Invoke' as RST 28h
-R Generate relocatable code (Automatical relocation before execution)
-D<symbol>
define symbol as logically TRUE (used for conditional assembly)
-b assemble files & link to ORG address. -c split code in 16K banks
-d date stamp control, assemble only if source file > object file -a: -b & -d (assemble only updated source files, then link & relo-
cate)
-o<bin filename>
expl. output filename, -g XDEF reloc. addr. from all modules
-i<library>
include <library> LIB modules with .obj modules during linking
-x<library>
create library from specified modules ( e.g. with @<modules> )
-t<n> tabulator width for .map, .def, .sym files. Column width is 4 times -t
Default options: -nv -nd -nb -nl -s -m -ng -nc -nR -t8
SEE ALSO
z88dk(1), z88dk-zcc(1), z88dk-z80asm(1), z88dk-appmake(1), z88dk-copt(1).
AUTHOR
z88dk was written by Dominic Morris <dom@z88dk.org>, and others. z80asm was written by Gunther Strube <gbs@image.dk>. This manual page
was written by Krystian Wlosek <tygrys@waw.pdi.net> using exists documentation, for the Debian GNU/Linux system.
01 December 2009 z80asm(1)