All pastes #276030 Raw Edit

Someone

public text v1 · immutable
·published 2006-12-11 23:32 UTC
rendered paste body
/* Detab - Script 1.1 - Version 0.01 */
#include <stdio.h>

int getline(char line[], int maxline);

int main()
{
// Define Variables
	int c;
	char* tab;
	
	tab = "        ";
	c = 0;
	
	while ((c = getchar()) != EOF){	
	if (c == '\t') {
		printf("%s", tab);
	} else {
		putchar(c);
	}
	}
} // End main function

// Begin Getline function.
int getline(char s[], int lim);

int c, i // Defining variables

for (i=0; i<lim-1 && (c = getchar() != EOF && != \n))
	s[i] = c;
if (c == \n) {
	s[i] = c;
	++i;
}
s[i] = '\0';
return i;
}