From: utzoo!watmath!watarts!eric Newsgroups: net.unix-wizards Title: Re: Naming Conventions for System Libraries Article-I.D.: watarts.1499 Posted: Mon Sep 13 19:27:05 1982 Received: Tue Sep 14 00:05:04 1982 Lint will detect the redefinition of library functions. The problem is many people, including myself, don't use lint regularly. I'd like to see this feature of lint (and some others) moved into the C compiler. (your example of redefining _doprnt isn't valid, the prefix _ has been conventionally used for `secret' global names.) I don't think your `special character' scheme will work well. You can't assume there is going to be only one system library. A user might need to use several independently-developed librarys, for example, graphics, fast file system, stdio, etc. There's some use of prefixes in the C library: str in strcmp, strcpy; f in fopen, fread; but it's not consistent: getc, not fgetc. System calls don't use prefixes and also tend to be very common identifiers (open, read, time). These should certainly have been prefixed; application programmers shouldn't have to know about the existence of most of them when using stdio. Ada has done a good job of supporting independent librarys, which they've termed packages. Normally one refers to a package element by prefixing the package name with a dot operator. You could have packages `io' and `gr'. A function `open' in both packages is referred to by io.open and gr.open. There's a statement to make all package elements local symbols, so that you can leave off the prefix. This could cause conflicts, but the compiler should detect them (or you could avoid this language feature). If you have a C-ld with long symbols names, there's no reason you can't use prefixes (io_open is better that fopen though). If you have the resources, you could even change the C library source and documentation to use this convention. Eric Gisin, decvax!watmath!watarts!eric.