comp.lang.c
  Home FAQ Contact Sign in
comp.lang.c only
 
Advanced search
February 2008
motuwethfrsasuw
    123 5
45678910 6
11121314151617 7
18192021222324 8
2526272829   9
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.c Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Is there stack associated when a executing an inline function?         


Author: Mahesh
Date: Feb 28, 2008 23:37

Hi,
I need to know if stack frames are generated in case of a
inline function execution or
do they execute just like macros?
if they execute like macros, then what is the need for having
inline function?
where would you use macros and where inlines?

Thanks
Mahesh
31 Comments
  Registry and Spyware Cleaner (Free Download)         


Author: stelevision
Date: Feb 28, 2008 22:49

Netcom3(tm) is a recognized global leader in internet security software.
With Netcom3 Internet Security Suite, it's key focus is on securing
sensitive consumer online interactions, as well as prevent and remove
Spyware, Adware, optimize, fix PC errors, and make your system run
faster and error free. Netcom3 Internet Security Software will speed
up your computer, detects and removes spyware and adware, Viruses,
Trojans, Dialers, Worms and a host of other dangerous parasites. It
automatically detects and corrects the most common problems including:
run time errors, corrupt files, invalid paths, fonts, file types,
CLSID, DLLs, sound, help files, shell extensions, AppEvents, class
keys and many more. Just like with a car your PC needs software
maintenance to keep it running smoothly like the first time you booted
your pc. A common cause of Windows crashes, error messages and
performance problems are the result of registry inconsistencies.
Netcom3(tm) Windows registry cleaner can fix these problems for you and
make your PC run smoothly again. Firewall and a good anti-virus
product are important. But these alone won't protect you from
intrusive spyware or keep your PC optimized for peak performance. This
is why Netcom3 Internet Security Suite has been developed to be the
perfect support for Windows PCs. ...
Show full article (1.41Kb)
no comments
  Free online Games play and free download - Intelligent games         


Author: senthilind
Date: Feb 28, 2008 17:28

Free online Games play and free download - Intelligent games

Champions aren't made in the gyms. Champions are made from something
they have deep inside them
-- a desire, a dream, a vision..

Excellent games Link....

http://shenrilaa.googlepages.com/
no comments
  printf("%%ls")         


Author: Ioannis Vranos
Date: Feb 28, 2008 15:09

Is printf("%%ls") for printing wchar_t strings defined in C90, or it was
added in C95?
3 Comments
  Variable-sized lines of text in linked list         


Author: Scottman
Date: Feb 28, 2008 11:45

I am trying to read a text file into memory without any knowledge of
how long each line will be. I am looking to store each line in a
linked list structure, however, I am unsure of how to dynamically
allocate space for each line.

This is how I set up the linked list...

typedef struct node {
char *line;
struct node *next;
} linkedlist;

linkedlist* createlinkedlist(void) {
linkedlist* head;
head = (linkedlist *)malloc(sizeof(linkedlist));
head->line = NULL;
head->next = NULL;
return head;
}
Show full article (0.99Kb)
47 Comments
  Cannot optimize 64bit Linux code         


Author: legrape
Date: Feb 28, 2008 11:24

I am porting a piece of C code to 64bit on Linux. I am using 64bit
integers. It is a floating point intensive code and when I compile
(gcc) on 64 bit machine, I don't see any runtime improvement when
optimizing -O3. If I construct a small program I can get significant
(>4x) speed improvement using -O3 versus -g. If I compile on a 32 bit
machine, it runs 5x faster on the 64 bit machine than does the 64bit
compiled code.

It seems like something is inhibiting the optimization. Someone on
comp.lang.fortran suggested it might be an alignment problem. I am
trying to go through and eliminate all 32 bit integers righ now (this
is a pretty large hunk of code). But thought I would survey this
group, in case it is something naive I am missing.

Any opinion is welcomed. I really need this to run up to speed, and I
need the big address space. Thanks in advance.

Dick
10 Comments
  why this program is wrong ?         


Author: johnnash
Date: Feb 28, 2008 10:50

#include

extern int a;

call()
{

a = 3;

}

main()
{

call();

printf("%%d",a);

}

I thought once you declare a variable as extern it can be seen
anywhere in the program.
20 Comments
  Re: Is this code correct ?         


Author: johnnash
Date: Feb 28, 2008 10:32

On Feb 28, 11:31 pm, johnnash gmail.com> wrote:
> In my project I need to shoot rays from the source.I know you cannot
> follow all the rays from the source as you can actually shoot rays at
> infinite angles,therefore my plan is to launch rays from the
> trasmitter in all directions spaced eg. x degrees or something. This
> is the logic I have used for a C program -
>
> consider the source to be centre of the unit sphere.
>
> 0<=theta<=180(zenith)
> 0<=phi<=360 (azimuth)
>
> Then run a for loop like this -
>
> for( theta = 0 ; theta <=180; theta = theta + 5 ) /* taking some 5
> degree difference or there will be infinite rays */
> for( phi = 0; phi <=360; phi = phi + 5 )
> {
> /*Calculate the cartesian coordinates of a point p(a struct) on
> sphere*/ ...
Show full article (1.14Kb)
no comments
  Is this code correct ?         


Author: johnnash
Date: Feb 28, 2008 10:31

In my project I need to shoot rays from the source.I know you cannot
follow all the rays from the source as you can actually shoot rays at
infinite angles,therefore my plan is to launch rays from the
trasmitter in all directions spaced eg. x degrees or something. This
is the logic I have used for a C program -

consider the source to be centre of the unit sphere.

0<=theta<=180(zenith)
0<=phi<=360 (azimuth)

Then run a for loop like this -

for( theta = 0 ; theta <=180; theta = theta + 5 ) /* taking some 5
degree difference or there will be infinite rays */
for( phi = 0; phi <=360; phi = phi + 5 )
{
/*Calculate the cartesian coordinates of a point p(a struct) on
sphere*/
P.x = r*sin(theta)*cos(phi);

P.y = r * sin(theta) *sin(phi);

P.z = r * cos(theta);

direction[index] = VectorSubtract(P, Center_of_Sphere);
Show full article (0.95Kb)
11 Comments
  Compile time details of an 'extern variable'         


Author: bg
Date: Feb 28, 2008 09:48

Hi All,

I'm bit confused of variables with global scope which is declared with
extern storage class.

Consider the following piece of code code in file A.c.

File: A.c
==================
#include "A.h"

int GData:

main()
{
GData = 5;
}

=====================
where file A.h is

File: A.h
==================
extern int GData;
==================
Show full article (0.68Kb)
2 Comments
1 2