This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
# backup directories listed in the .backup file of the user's home directory | |
# if the directory contains a makefile, run make clean to scrub any object | |
# and/or executable files that don't need backup | |
# | |
# backup is placed in a a dated zip archive - copying to removable media | |
# is not performed | |
# Copyright (C) 2008 Neil Butterworth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
char * read_line( FILE * f ) { | |
int cap = 32, next = 0, c; | |
char * p = malloc( cap ); | |
while( 1 ) { | |
if ( next == cap ) { | |
p = realloc( p, cap *= 2 ); | |
} |