Search Results

Showing results 1 to 35 of 35
Search took 0.01 seconds.
Search: Posts Made By: CoolAtt
Forum: Perl Jul 10th, 2009
Replies: 0
Views: 439
Posted By CoolAtt
Hi all.

Am using amavis for email scanning but got stuck somewhere in the
configuration file.

I want to add some custom code to populate an array from a postgresql database.

(Amavis and...
Forum: C May 5th, 2009
Replies: 20
Views: 2,043
Posted By CoolAtt
hi all.

i have read a text line from a file using fgets() into a char array char astr[30]
then i did strcat(astr,"secondstring")

The output of printf (astr) is appearing on 2 lines instead...
Forum: C Mar 24th, 2009
Replies: 7
Views: 536
Posted By CoolAtt
Forum: C Mar 23rd, 2009
Replies: 7
Views: 536
Posted By CoolAtt
thanks nucleon & Ancient Dragon.

I modified the way the program will be running.It will run in the background so no output will be visible to the console.

I want to use the kill command &...
Forum: C Mar 19th, 2009
Replies: 7
Views: 536
Posted By CoolAtt
hi everyone.

my program uses an infinite loop & runs forever.
i want to run some codes when i decide to stop the program using CTRL-C.

Is this possible ? Please advise me.

thanks
Forum: C Feb 6th, 2009
Replies: 14
Views: 1,217
Posted By CoolAtt
hi .

i managed to find the bug. now it's not crashing.
thanks.
Btw i will use use code tags next time :)
Forum: C Feb 5th, 2009
Replies: 14
Views: 1,217
Posted By CoolAtt
yes i have assigned it.
Forum: C Feb 4th, 2009
Replies: 14
Views: 1,217
Posted By CoolAtt
hi everyone.

i modified me_ansh code and its working.
The problem is that when it reaches the last line the program crashes
(segmentation fault)

Plz help.
thx

My implementation:
Forum: C Jan 23rd, 2009
Replies: 14
Views: 1,217
Posted By CoolAtt
thx for the code.
but because there is an infinite loop cpu usage is 100%.
do you know how to prevent this ?
Forum: C Jan 21st, 2009
Replies: 14
Views: 1,217
Posted By CoolAtt
does fgets() gets aware when a file is updated ?

will clearerr( fp ) tell fgets() that EOF has not been reached?
Forum: C Jan 21st, 2009
Replies: 14
Views: 1,217
Posted By CoolAtt
i tried it. its not working.
Forum: C Jan 20th, 2009
Replies: 14
Views: 1,217
Posted By CoolAtt
Hi.
am using fgets() to read lines from a text file.
the file is being updated after a few seconds.

i want to read and process the last appended line at the end of the file.

i tried the...
Forum: C Jan 6th, 2009
Replies: 2
Views: 929
Posted By CoolAtt
Forum: C Jan 6th, 2009
Replies: 2
Views: 929
Posted By CoolAtt
hi .

i have read a line from a text file & stored it in a string using fgets().

the file contains the following line:
C:\Windows\

char myline[20];
fgets(myline,20,fp);
Forum: C Dec 16th, 2008
Replies: 5
Views: 1,349
Posted By CoolAtt
its not that i think. i had put a semi-colon there.
Forum: C Dec 16th, 2008
Replies: 5
Views: 1,349
Posted By CoolAtt
about the warning am saying. any idea ?
Forum: C Dec 16th, 2008
Replies: 5
Views: 1,349
Posted By CoolAtt
plz explain how to do this the proper way.

main.c
=====
struct names{ // definitions
-----
----
----
}
Forum: C Dec 16th, 2008
Replies: 11
Views: 957
Posted By CoolAtt
ok. plz give an overview.
the sequence of steps i mean.
is my understanding correct ?

while(1){

if fgets == NULL{
sleep
clearerr
}
Forum: C Dec 15th, 2008
Replies: 11
Views: 957
Posted By CoolAtt
ok will do that.
instead of making the program sleep, will it be ok to check everytime in an infinite loop for the following:

if fgets is not null -> read & process
Forum: C Dec 15th, 2008
Replies: 11
Views: 957
Posted By CoolAtt
i tried this piece of code:
while (1)
{
fgets(buffer,1024,myfile);
printf("%s\n",buffer);
}

the prob is that wen it reaches the end of file , it keeps on printing the...
Forum: C Dec 15th, 2008
Replies: 11
Views: 957
Posted By CoolAtt
will implement in C.
cant we make the fgets() wait until the updater writes some new line ?
Forum: C Dec 15th, 2008
Replies: 11
Views: 957
Posted By CoolAtt
yes , it keep trying to read in case the updater puts more data into the file.
reader should stop reading the file once a date & time criteria is met.
Forum: C Dec 15th, 2008
Replies: 11
Views: 957
Posted By CoolAtt
hi.
actually i hv to read lines from a file which is getting updated at the same time( new lines are appended at the end of the file).
plz suggest a way to implement it in c.
thx.
Forum: Perl Dec 12th, 2008
Replies: 2
Views: 1,534
Posted By CoolAtt
Forum: Perl Dec 12th, 2008
Replies: 2
Views: 1,534
Posted By CoolAtt
Hi.
i have to extract the following line:
C:\WINDOWS\lsass.exe

i tried



it worked on some strings only.
any suggestions ? plz help.
Forum: C Dec 9th, 2008
Replies: 7
Views: 1,854
Posted By CoolAtt
thx for the code , but i wanted to read & store each of the hex values (e.g 54 - hex of T) in 1 char so that when i print the char it gives me back T as output.
Forum: C Dec 9th, 2008
Replies: 7
Views: 1,854
Posted By CoolAtt
the 0x part must be removed or not ?

u said for scanf() reads the prefix.
Forum: C Dec 9th, 2008
Replies: 7
Views: 1,854
Posted By CoolAtt
ok let me simplify the problem.
0x54 is hex of T.
If u run the following it prints "x= T" on the screen.
char x;
x=0x54;
printf("x = %c\n",x);

now the prob is if u already have...
Forum: C Dec 5th, 2008
Replies: 7
Views: 1,854
Posted By CoolAtt
hi all.

the following is working fine for me
char * hex = (..dynamically allocated memory with malloc..);

*(hex+0) = 0x43;
*(hex+1) = 0x2b;

i now have to assign a string in the format 43...
Forum: C Nov 24th, 2008
Replies: 4
Views: 581
Posted By CoolAtt
thx Narue.
Bt any algo to decrypt file if dnt know how it was encrypted ?
Is it possible to convert it completely to ascii ?
Aim is to extract info from encrypted files.
plz guide Narue.
Forum: C Nov 21st, 2008
Replies: 4
Views: 581
Posted By CoolAtt
hi. plz help with reading encrypted binary files in C.
thx.
Forum: C Nov 20th, 2008
Replies: 0
Views: 592
Posted By CoolAtt
hi !

does anyone know how to install & use the perl compatible regex (PCRE) api in Bloodshed Dev++ ?
Forum: C Nov 20th, 2008
Replies: 4
Views: 2,325
Posted By CoolAtt
Forum: C Nov 19th, 2008
Replies: 4
Views: 2,325
Posted By CoolAtt
hi ArkM. am using PCRE C API.
but am getting error when i pass a pattern as a parameter. can u help?
pattern is "/\d\d/"
error : unknown escape sequence '\d'

thx
Forum: C Nov 14th, 2008
Replies: 4
Views: 2,325
Posted By CoolAtt
hi . can someone plz explain how to do regex in C.
input: a text file.
aim: read each line from the text & check if a RegEx pattern exists. finally return that pattern if it exists.

plz share...
Showing results 1 to 35 of 35

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC