The best quality editor you can fit a post, not using external libraries. Only include default headers/imports/libraries.
Programs will be judged by their array of features, stability of operation and memory use.
Name:
Anonymous2010-07-07 8:13
If standard libs means "only functions present in libc":
#include <stdio.h>
#include <stdlib.h>
FILE *file;
char letter;
int main (int argc, char **argv)
{
if (argc < 2)
{
fprintf (stderr, "D'oh! you didn't specify a file.\nUsage:%s <filename>", argv[0]);
exit (1);
}
fopen (file, argv[1], "w");
if (!file) {
fprintf (stderr, "Could not open file %s\n");
exit (1);
}
while (!feof(char = getchar()))
{
fprintf (file, "%c", letter);
}
return 0;
}
Or, the best editor for *n?x hackers:
/* cc besteditorever.c -obesteditorever */
#include <stdlib.h>
char *editor
int main (int argc, char *argv)
{
editor = getenv ("EDITOR");
return (system (editor));
}