[EMAIL PROTECTED] wrote:
> Ujwal, this one is impressive using GTK library. That's really great
> one.
Hello dibyendra ju! :P
>
> On May 19, 9:12 am, "Ujwal (RUBBOT)" <[EMAIL PROTECTED]> wrote:
>> #include <gtk/gtk.h>
>> #include <stdio.h>
>> #include <malloc.h>
>> #include <math.h>
>> #define part 10
>> #define chno 26
>> static int len,count,tm[2][16];
>> static GdkPixmap *pixmap = NULL;
>> float statistic_data(char *src, char *des) // Real Core
>> Code
>> {
>> int i=0,j=0,ax,ay,bx,by,sigx=0,sigy=0;
>> float
>> xbar,ybar,sigu,sigv=0,sigu2=0,sigv2=0,siguv=0,karl_pearson,karl_pearsony;
>> float *u,*v,*u2,*v2,*uv;
>> FILE *X,*Y;
[snip]
Ujwal, I had a quick compile and ran it but I don't know whether it's
only me or for someone else as well, it's segfaulting on me. I ran a
backtrace and the culprit seems to be fscanf() in your statistic_data(..).
20: sigx=sigx+ax; // calculate sum of
all x
21: fscanf(Y,"%d %d ",&bx,&by); // "
== bt below ====
[Thread debugging using libthread_db enabled]
[New Thread -1218214224 (LWP 1326)]
73 is the length
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218214224 (LWP 1326)]
0xb776557a in _IO_vfscanf () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0 0xb776557a in _IO_vfscanf () from /lib/tls/i686/cmov/libc.so.6
#1 0xb776ace3 in vfscanf () from /lib/tls/i686/cmov/libc.so.6
#2 0xb776fb72 in fscanf () from /lib/tls/i686/cmov/libc.so.6
#3 0x0804910f in statistic_data (src=0x804a3a8 "ujwal.txt",
des=0x804a29d "A.txt") at handwriting.c:21
#4 0x08049a1a in getxy (area=0x806f328, data=0x808d0f0) at
handwriting.c:154
#5 0xb792287b in IA__g_cclosure_marshal_VOID__VOID (closure=0x804c0d8,
return_value=0x0, n_param_values=1, param_values=0xbfbf913c,
invocation_hint=0xbfbf904c, marshal_data=0x80498a5) at gmarshal.c:77
#6 0xb791603b in IA__g_closure_invoke (closure=0x804c0d8,
return_value=0x0, n_param_values=1, param_values=0xbfbf913c,
invocation_hint=0xbfbf904c) at gclosure.c:490
=======
Btw, great work bro! ;)
Cheers
--~--~---------~--~----~------------~-------~--~----~
FOSS Nepal mailing list
[email protected]
http://groups.google.com/group/foss-nepal
Community website: http://www.fossnepal.org/
-~----------~----~----~----~------~----~------~--~---