1
2
3
void splitpath(const char *path, char *directory, char *filename, char *extension)
{
...

C Extracting directory, filen...

by Navaneeth, July 03, 2010 17:13, 9 refactorings, tagged with c string replace

I am new to C. Following co...

Avatar Talk
1
2
3
4
#include <stdio.h>

main()
...

C Bizzbuzz

by thaostra.myopenid.com, June 24, 2010 22:58, 4 refactorings, tagged with bizzbuzz, c, concise

My knowledge of C is limite...

Avatar Talk
1
2
3
4
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
...

C Traverse Directory

by emeka.micro.myopenid.com, April 12, 2010 12:54, 2 refactorings

I would like to improve my ...

Avatar Talk
1
2
3
4
int contains(const char* word, const char* pattern) {
    int pCount = 0, pLength = strlen(pattern);
    char i;
...

C String Searching Algorithm

by Andreas Grech, March 28, 2010 01:43, 6 refactorings, tagged with c, string search

I wrote the following funct...

C398dd0c2ca7d5281d0a83242a924e76 Talk
1
2
3
4
/*
 * =====================================================================================
 *
...

C Using semaphores in C and f...

by jarodluebbert.myopenid.com, March 24, 2010 07:28, No refactoring, tagged with c, concurrency, ipc, semaphores

Just posting this to check ...

3a5f66f6c3feb6092d375c3e145de0d4 Talk
1
2
3
4
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
...

C Simple SHA Hashing

by mdw7.blogspot.com, December 11, 2009 15:38, 1 refactoring, tagged with hash, c, SHA1, 5 bit

Dear All, I'm a new C progr...

Avatar Talk
1
2
3
4
// 
// cssmin.c
// 
...

C Css minification

by Tj Holowaychuk, November 25, 2009 22:05, 5 refactorings, tagged with css, minification

Repo is here http://github....

F1e3ab214a976a39cfd713bc93deb10f Talk
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 Andreas Grech, November 28, 2009 17:18, 2 refactorings, tagged with c, malloc, free, array

Is this the correct way to ...

C398dd0c2ca7d5281d0a83242a924e76 Talk
1
2
3
4
/*
 * 0x378 - 0x37F are data pins
 * 0x383 - 0x387 are status pins
...

C LPT garland

by taro, November 18, 2009 14:53, 6 refactorings, tagged with freebsd, lpt, garland

This is my first C program....

E9d3f1a9ded6d6b118dd84467f2278df Talk
1
2
3
4
public void foo(string bar)
{

...

C test

by Cb, November 11, 2009 19:07, 3 refactorings

test

4224dd00640071e10be53b1933566132 Talk
1
2
3
4
/* a[1..k] - previous values
** c[1..k+1] - coefficients
**
...

C linear recurrence computation

by getopenid.com/eliben, November 02, 2009 04:41, 3 refactorings, tagged with c array

For Jon Bentley's "Programm...

Fc761ccaf6c0d7d977e2959f9bfebd06 Talk
1
2
3
4
#include <stdio.h>
#include <stdlib.h>
...

C Enumerator

by Tj Holowaychuk, October 29, 2009 16:53, 3 refactorings

yup

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
// 
// array.h - CKit
...

C C Array Implementation

by Tj Holowaychuk, October 19, 2009 00:24, 5 refactorings, tagged with c array

im no c pro. may be some me...

F1e3ab214a976a39cfd713bc93deb10f Talk
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 ...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
char *
Method_to_s(Method *self) {
  static char buf[1024];
...

C string buffer

by Tj Holowaychuk, September 17, 2009 20:55, 6 refactorings, tagged with string buffer

What is the least inexpensi...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
#include <stdio.h>
#include <stdlib.h>
...

C program i wrote to learn

by powdermilkman.myopenid.com, September 19, 2009 08:11, No refactoring, tagged with c, pthread

it works but i think i coul...

Avatar Talk
1
2
3
4
#include <stdio.h>
#include <ctype.h>
#include <string.h>
...

C FLAMES!!!!!!!!!!!!!!!!!

by vhar.myopenid.com, August 11, 2009 14:00, 7 refactorings, tagged with fun

a little game which give yo...

Avatar Talk
1
2
3
4
// The struct:

typedef struct { 
...

C C Array Slice

by Tj Holowaychuk, August 03, 2009 21:28, 4 refactorings

Slice implementation

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
int
File_size(char *path) {
  FILE *fp;
...

C File bytesize

by Tj Holowaychuk, August 05, 2009 18:24, 3 refactorings

faster / better / sexier?

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
void foo(char** array)
{
	*array = (char *)calloc(2, sizeof(char*));
...

C Initialize char array in fu...

by rem7.myopenid.com, July 08, 2009 22:33, 2 refactorings, tagged with c

How do you initialize an ar...

8339a3712739c903f06b8b9066500a63 Talk
1
2
3
4
char *
str_replace(char *str, char *old, char *new) {
  int i, count = 0;
...

C str_replace

by Tj Holowaychuk, June 23, 2009 21:23, 3 refactorings, tagged with c string replace

Pretty weak first pass at a...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
    char str[] = "foo bar";
    char delims[] = " ";
    char *word = strtok(str, delims);
...

C strtok WTF

by Tj Holowaychuk, June 11, 2009 21:02, 2 refactorings, tagged with strtok

I thought str[] and *str we...

F1e3ab214a976a39cfd713bc93deb10f Talk
1
2
3
4
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
...

C Variable arg strcat

by Tj Holowaychuk, May 20, 2009 16:23, 5 refactorings

whoop

F1e3ab214a976a39cfd713bc93deb10f Talk
1
str + strlen(str)

C Get last char

by Tj Holowaychuk, May 12, 2009 20:00, 4 refactorings

super simple but seems like...

F1e3ab214a976a39cfd713bc93deb10f Talk
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...

F1e3ab214a976a39cfd713bc93deb10f Talk