Is it legal to do something like this:
#include "x.c" in other source file?
Whether it will work or not is implementation defined. If my memory
serves me correctly this evening, the preprocessor is only -required-
to provide a token-to-filename mapping mechanism for the .h extension
and for one directory.
The C preprocessor is -allowed- to require the user to write the
filename token in a manner quite different than the host operating system
uses to name files.
For example, there are operating systems that do not support lowercase
letters, and do not support dots in filenames; the operating system
might also happen to require a "drive letter" for each filename access
(with no equivilent of a "current working directory".) The preprocessor
could define (documenting it of course) that <foo.h> (for any foo)
shall map to filename FOO (uppercaseing), file extension INC, drive Z,
and could define that "foo.h" shall first try filename FOO file extension
INC drive A, followed by FOO INC Z -- and the preprocessor could leave
the transformation of all other filename forms undefined -- perhaps
even looking in its public dataset catalog for a dataset named x.c rather
than trying to find filename X file extension C drive A.