The names of the files generally follow the section headings of the operator summary in section 6.2 of the PostScript Language Reference Manual. Each operator XXX is implemented by a procedure named z XXX, for example, zfill and zarray . See the makefile for a little more information on how the files are divided functionally. The main loop of the PostScript interpreter is the interp procedure in interp.c . The PDF interpreter is written entirely in PostScript.
Files beginning with gdev are device drivers or related code, also part of the library.
Other files beginning with g are library files that don't fall neatly into either the kernel or the driver category. See stream.h , scommon.h , and strimpl.h for all the details. In addition to many real device and file format drivers listed in devs. There are very few platform dependencies in Ghostscript. The file arch.h contains a set of mechanically-discovered platform properties like byte order, size of int , etc.