exit() #25338 (2/14/2013 6:23:29 PM) comp.lang.c Can I use the return value provided to exit() for my own purposes?
(This is so that I can pick up the exit-value when I invoke the program from
another. BTW what's the best way of invoking a program under L... BartC
Command line arguments13631 (1/10/2013 8:58:16 PM) comp.lang.c I've just discovered that a single command line argument containing
wildcards, such as *.c, is expanded to a full list of matching files before
it gets to main().
That isn't really what I want (and there c... BartC
'Dynamic' function calls2744 (12/21/2012 10:13:25 PM) comp.lang.c I have a requirement to call a function where:
o The function address is not known until runtime
o Neither are the number and type of the parameters
o Neither is the type of the function result
o (And nei... BartC
Macros #82937 (12/2/2012 5:53:27 PM) comp.lang.c I'm trying out these macros to save on typing and errors** :
#define else } el##se {
That seems to work: 'else' is converted to '} else {'. Somehow the ## stops
the new 'else' from being recursively proc... BartC
Casts on lvalues7633 (12/2/2012 1:23:39 PM) comp.lang.c Suppose I have these types:
#define byte unsigned char
typedef struct {
int a,b,c,d;
} R; /* assume this is 16 bytes */
And these variables:
int n; /* represents a *byte... BartC
inline functions #45736 (11/24/2012 12:20:34 PM) comp.lang.c Is there a way of controlling which functions are inlined, or likely to be
inlined, and which ones you never want inlined? Especially with gcc...
(I have a file with over 300 functions, each of which is ca... BartC
'Unsigned decimal'2539 (11/2/2012 5:34:22 PM) comp.lang.c I have this code:
int a = -2147483648;
long long int b = 2147483648;
And gcc gives me this warning for each:
"warning: this decimal constant is unsigned only in ISO C90"
These types are signed 32 a... BartC
function casts2824 (10/12/2012 9:42:27 PM) comp.lang.c Suppose I have a pointer to pointer to function like this:
void (*(*fnptr)) (void);
How do I apply this function signature as a cast to another type, say the
variable p here:
int *p;
and call th... BartC
Function declarations #21431 (9/28/2012 10:35:51 AM) comp.lang.c I have a C code generator that likes to insert lots of parentheses in type
declarations (rather than truly understand how they work).
But when declaring a function returning a pointer:
int (*fn) (void);... BartC
gcc alignment options1938 (9/15/2012 11:57:44 PM) comp.lang.c I know this is considered off-topic but perhaps someone's got some ideas.
I have a struct like this with elements all packed:
#pragma pack(1)
typedef struct s {
short int a;
char b;
char c;
int... BartC
fully fast resizable arrays in c (c2)2212 (3/18/2013 9:28:39 AM) comp.lang.c sorry for my weak english
It is somewhat suprising maybe, but my
recent thinking in this theme, brings to
me some notice, that on some platforms (like windows)
there is (would be) no problem with
full... profesor.fir(125)
start whit micro2113 (3/18/2013 12:15:11 PM) comp.arch.embedded hi
I want to start with the micro, can you suggest some things
I think to arduino uno starter kit It's a good idea or not
thanks and bye
... giragira(1)
The Highest-Level Feature of C2626 (3/19/2013 9:00:00 PM) comp.lang.c The Highest-Level Feature of C is?
Think about your answer before visiting:
http://prog21.dadgum.com/166.html
Shocked me.
Lynn
... lmc(186)
reference type for C1062 (5/16/2013 2:08:43 PM) comp.lang.c I like the reference type that has been introduced with C++
I wondered why isn't that feature retrofitted in C.
Is there something hindering it?
thx - roar -
... roland.arthaud(7)
difference between pointers4641 (3/30/2013 3:36:42 PM) comp.lang.c hello all,
I get this doubt about this behavior of C.
consider the following code.
int a,b,d1,d2,diff;
d1= &a;
d2 = &b;
diff = &a-&b;
printf("\nDifference between address: %d", diff);
diff = d1-... tewari.varun(18)
Optimizing pow() function506 (4/22/2013 3:23:51 PM) comp.lang.c I have a simple (16-bit) embedded platform and I have to make the following calculations.
unsigned int
func(unsigned int adc, unsigned int pwr, unsigned int pt, double exp) {
return (unsigned int)(pow((d... pozzugno(150)
Lists and arrays44 (4/22/2013 6:13:38 PM) comp.lang.python Hello!
I need your help!
I have an array and I need pick some data from that array and put it in a list, for example:
array= [a,b,c,1,2,3]
list=array[0]+ array[3]+ array[4]
list: [a,1,2]
When ... anadionisio257(29)
Alternative and probable better way to printf83 (5/3/2013 12:54:30 PM) comp.lang.c Hello friends,
I am writing some string to a gstring using printf as:
g_string_append_printf (ustring, "@%s{%s,\n",string1, string0);
if( strlen(string2)!=0 ||string2!=NULL)
g_string_append_... bnrj.rudra(343)
Odd printf() Behavior127 (5/7/2013 11:02:34 PM) comp.lang.c Hello, I'm working on some graphics routines and just started trying to
read in some bitmap files. For troubleshooting, I'm printing out various
values to make sure they're all okay.
I have two globals a... aaa97(8)