You know the common stdio idiom that stdin is specified by a filename of \"-\", e.g.
stdin
if ((strcmp(fname, \"-\")) fp = fopen(fname); else