1 2 3 4
void freeArray(int **a, int m) { int i; for (i = 0; i < m; ++i) { ...
C Freeing memory of a Multidi...
by agnt666.myopenid.com,
November 28, 2009 17:18,
2 refactorings, tagged with c, malloc, free, array
Is this the correct way to ...
1 2 3 4
/* * 0x378 - 0x37F are data pins * 0x383 - 0x387 are status pins ...
C LPT garland
This is my first C program....
1 2 3 4
/* a[1..k] - previous values ** c[1..k+1] - coefficients ** ...
C linear recurrence computation
For Jon Bentley's "Programm...
1 2 3 4
int Version_compare(Version *a, Version *b) { return a->major > b->major ? 1 : ...
C Version comparison
by Tj Holowaychuk,
October 14, 2009 22:01,
5 refactorings
More to the implementation ...
1 2 3 4
#include <stdio.h> #include <stdlib.h> ...
C program i wrote to learn
it works but i think i coul...
1 2 3 4
char * Method_to_s(Method *self) { static char buf[1024]; ...
C string buffer
What is the least inexpensi...
1 2 3 4
#include <stdio.h> #include <ctype.h> #include <string.h> ...
C FLAMES!!!!!!!!!!!!!!!!!
a little game which give yo...
1 2 3 4
void foo(char** array) { *array = (char *)calloc(2, sizeof(char*)); ...
C Initialize char array in fu...
How do you initialize an ar...
1 2 3 4
char * str_replace(char *str, char *old, char *new) { int i, count = 0; ...
C str_replace
Pretty weak first pass at a...
1 2 3 4
char str[] = "foo bar"; char delims[] = " "; char *word = strtok(str, delims); ...
C strtok WTF
I thought str[] and *str we...
1 2
#define YA_SELECT(N) int yaElement_selector_##F (yaElement *self) #define YA_SELECT2(N, ARGS...) int yaElement_selector_##F (yaElement *self, ARGS)
C Macro variable arg substitu...
by Tj Holowaychuk,
May 13, 2009 17:00,
No refactoring
I would prefer YA_SELECT al...
1
str + strlen(str)
C Get last char
by Tj Holowaychuk,
May 12, 2009 20:00,
4 refactorings
super simple but seems like...
1 2 3 4
void fJPG(struct graphf *s, char *path) { FILE *f; ...
C JPEG resolution
by deathknight.myopenid.com,
May 10, 2009 14:45,
1 refactoring
trying to get resolution fr...
1 2 3 4
int main(int argc, char **argv) { while (*++argv) printf("%s\n", *argv); ...
C argv iteration
by Tj Holowaychuk,
April 30, 2009 19:07,
4 refactorings
This is the cleanest way I ...
1 2 3 4
/* LANGUAGE_CHANGE This plugin change the default language in Linux. ...
C language_change plugin for ...
by gmh2000.myopenid.com,
April 28, 2009 16:08,
No refactoring, tagged with c, linux, pidgin, plugin, language, change
This plugin works in my Kub...
1 2 3 4
#include <stdio.h> #include <unistd.h> ...
C A client for net!
When I must use a client wh...
Dear All, I'm a new C progr...