Archive for September 7th, 2005

MinGW The Merciful

A special thanks goes out to my fellow GNU users who need want to program under MS Windows. Eventhough they don’t provide a random function MinGW is definately a must for those wishing to create good native software under MS Windows. For those who want to preserve there voice anyway. I will try to share some lessons learned as I fully figure out how to get things working right. Here is a little nugget in the mean time since MS does not provide strtok_r


char *c_strtok_r( char *str, char *delim, char **save_ptr ) {
  char *ptr;

  if( !str ) {
    if( !*save_ptr || !**save_ptr )
      return( NULL );
    str = *save_ptr;
  }

  while( *str && strchr( delim, *str ) )
    ++str;

  if( !*str )
    return( NULL );

  ptr = str;

  while( *ptr && !strchr( delim, *ptr ) )
    ++ptr;

  *save_ptr = *ptr ? ptr + 1 : ptr;
  *ptr = '\0';

  return( str );
}

No Comments

Picture Pages

Please go visit our picture galleries. We have a lot more to follow. I will try to post as fast as I can get them out of iPhoto and into gthumb. The galleries will soon have some captions. Follow the Galleries link.

No Comments

Bad Behavior has blocked 156 access attempts in the last 7 days.