home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-21 | 31.9 KB | 1,480 lines |
- .de }n
- .bp
- .sp .5i
- ..
- .wh -.8i }n
- .sp .5i
- .po -.4i
- .ll 7.5i
- .ps 9
- .vs 9
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- Overview, Part 1
- .br
- .ps -3
- .vs -3
- .sp 2
- .sp
- .in 0.24i
- .ta 3.92i
- NANFOR\.LIB Working Group G\. Scott [71620,1521]
- .br
- .ta
- .ta 5.28i
- Request for Comments UCLA
- .br
- .ta
- .ta 4.72i
- Version 1\.0 March, 1991
- .br
- .ta
- .sp
- .in 1.76i
- \fBTHE NANFORUM TOOLKIT (NANFOR\.LIB)
- .in 0.96i
- \fBPUBLIC DOMAIN USER SUPPORTED CLIPPER FUNCTION LIBRARY
- .sp
- .in 0.24i
- .ta 0.4i
- \fB1 INTRODUCTION
- .br
- .ta
- .sp
- .in 0.64i
- This is a standard for establishing and maintaining NANFOR\.LIB, a
- public-domain, user-supported library of functions designed to
- interface with Nantucket Clipper, version 5\.0, and later\. You
- are encouraged to read it over and forward comments to Glenn
- Scott, CIS ID [71620,1521]\.
- .sp
- .ta 0.4i
- \fB1\.1 History
- .br
- .ta
- .sp
- .in 1.04i
- In October and November of 1990, a discussion on the
- evolution of third-party products, vendors, and marketing
- took place on the CompuServe Information Service\'s Nantucket
- Forum (NANFORUM)\. During this discussion, a NANFORUM
- subscriber named Alexander Santic suggested the idea of a
- user-supported Clipper function library, available to all on
- the CompuServe Information Service (CIS)\. A number of
- subscribers, including several Clipper third party
- developers, and some Nantucket employees, expressed their
- support\. This standard is a first step toward organizing
- such an endeavor\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB1\.2 Trademarks
- .br
- .ta
- .sp
- .in 1.04i
- Clipper is a registered trademark of Nantucket Corporation\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB1\.3 Relationship to Nantucket and third party
- .br
- .ta
- .sp
- .in 1.04i
- NANFOR\.LIB is a project independent of any third party
- developer or Nantucket Corporation\. There is no official
- "sanction" or "seal of approval" from Nantucket of any kind\.
- In addition, NANFOR\.LIB routines will be accepted and
- included without regard for whether or not routines
- performing a similar function are included in a commercial
- third party or Nantucket product\.
- .sp
- It is desired that NANFOR\.LIB not compete with third party
- products but rather fill in the holes in Clipper\'s standard
- library\. However, there will be some overlap into
- commercial third-party library functions, so it would be
- best if this is never taken into consideration when deciding
- on including a particular function\.
- .sp
- Developers submitting NANFOR\.LIB routines can and will be
- corporate developers, third party developers, independent
- consultant / programmers, hobbyists, and other Clipper
- people\. Perhaps even Nantucket employees will contribute\.
- No one is excluded or included due to any particular
- affiliation\.
- .sp
- Nantucket employees submitting functions are doing so as
- individuals, and are not making a policy of involving
- Nantucket in the project, nor are they committing Nantucket
- to supporting the public domain library\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB1\.4 Clipper version supported
- .br
- .ta
- .sp
- .in 1.04i
- NANFOR\.LIB functions, no matter what language they are
- written in, will be designed to work with Clipper version
- 5\.0 and later\. Many of the functions, particularly those
- that use the EXTEND system, will be compatible with the
- Summer 1987 version of Clipper\. However, ensuring Summer 87
- compatibility will be the responsibility of the user\. If a
- user wants a function to work with Summer 87, she will have
- to modify the code herself if necessary\. In many cases,
- this is a trivial task\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB1\.5 Queries from new users
- .br
- .ta
- .sp
- .in 1.04i
- Queries from new users interested in finding NANFOR\.LIB will
- be handled in a uniform and courteous way\. A short text
- file will be created that will briefly explain NANFOR\.LIB,
- who the current people maintaining it are, and how to get a
- hold of it\. This text message will be sent in response to
- any query\. TAPCIS users will find this method very easy to
- implement\.
- .sp
- .in 0.24i
- .ta 0.4i
- \fB2 DISTRIBUTION
- .br
- .ta
- .sp
- .in 0.64i
- .ta 0.4i
- \fB2\.1 Public Domain
- .br
- .ta
- .sp
- .in 1.04i
- NANFOR\.LIB, its source code, and documentation will be
- public-domain software\. It is not for "sale", and shall not
- be sold\. No fee or contribution of any kind will be
- required for anyone wanting a copy, other than what they
- would normally pay to download it from CompuServe\. Users
- will be encouraged to submit functions via CompuServe\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB2\.2 Official repository
- .br
- .ta
- .sp
- .in 1.04i
- It is possible that copies of NANFOR\.LIB will be downloaded
- and distributed elsewhere\. That is all right, but the only
- copy of NANFOR\.LIB and all associated documentation that
- will be maintained by volunteers is in an appropriate
- library on the CIS Nantucket Forum\.
- .sp
- .ta 0.8i
- \fB2\.2\.1 Contents
- .br
- .ta
- .sp
- .in 1.84i
- The nature of the official posting on CompuServe
- shall be:
- .sp
- .in 1.44i
- .ta 0.8i
- 2\.2\.1\.1 NFLIB\.ZIP
- .br
- .ta
- .sp
- .in 2.24i
- This will contain the files NANFOR\.LIB
- (library), and NANFOR\.NG (Norton Guide)\.
- .sp
- .in 1.44i
- .ta 0.8i
- 2\.2\.1\.2 NFSRC\.ZIP
- .br
- .ta
- .sp
- .in 2.24i
- This will contain all the library source
- code, makefile, and other source-code related
- materials\.
- .sp
- .in 1.44i
- .ta 0.8i
- 2\.2\.1\.3 FTINQ\.TXT
- .br
- .ta
- .sp
- .in 2.24i
- This is a short text file used as a response
- to new user queries (see paragraph 1\.5)
- .sp
- .in 1.44i
- .ta 0.8i
- 2\.2\.1\.4 NFRFC\.ZIP
- .br
- .ta
- .sp
- .in 2.24i
- This contains an ASCII copy of NANFOR\.RFC
- (this document) named NFRFC\.TXT\.
- .sp
- .in 1.44i
- .ta 0.8i
- 2\.2\.1\.5 NFHDRS\.ZIP
- .br
- .ta
- .sp
- .in 2.24i
- This contains templates of the file and
- documentation header blocks, including a
- sample, for prospective authors (FTHDR\.PRG,
- FTHDR\.ASM, FTHDR\.SAM)
- .sp
- .sp
- .in 0.24i
- .ta 0.4i
- \fB3 POLICY ON INCLUDING FUNCTIONS
- .br
- .ta
- .sp
- .in 0.64i
- .ta 0.4i
- \fB3\.1 "Best Function"
- .br
- .ta
- .sp
- .in 1.04i
- It is possible that more than one developer will submit a
- function or package of functions that perform substantially
- the same services\. In that event, the referees will choose
- one to be included based on power, functionality,
- flexibility, and ease of use\. Due to the cooperative,
- non-commercial nature of the library, no one\'s feelings
- should be hurt by excluding duplicate functions\.
- .sp
- In addition, it is possible that two substantially
- similar functions or packages will benefit from merging them
- together to provide new functionality\. This will be the
- prerogative of the referees (see paragraph 6\.3), in
- consultation with the author, if possible\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB3\.2 Public Domain
- .br
- .ta
- .sp
- .in 1.04i
- .ta 4.56i
- Each author submitting source code must include as part of
- .br
- .ta
- that code a statement that this is an original work and that
- he or she is placing the code into the public domain\. The
- librarian (see paragraph 6\.1) and referees should make a
- reasonable effort to be sure no copyrighted source code,
- such as that supplied with some third party libraries, makes
- it into NANFOR\.LIB\. However, under no circumstances will
- the librarian, referees, or any other party other than the
- submitter be responsible for copyrighted code making it into
- the library accidentally\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB3\.3 Source code
- .br
- .ta
- .sp
- .in 1.04i
- Full source code must be provided by the author for every
- routine to be included in NANFOR\.LIB\. No routine, no matter
- what language, will be put into the library on the basis of
- submitted object code\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB3\.4 Proper submission
- .br
- .ta
- .sp
- .in 1.04i
- Due to the volume of submissions expected, librarians and
- referees may not have the time to fix inconsistencies in
- documentation format, function naming, and other
- requirements\. Therefore, the librarian shall expect source
- code to arrive in proper format before proceeding further
- with it\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB3\.5 Quality and perceived usefulness
- .br
- .ta
- .sp
- .in 1.04i
- In a cooperative effort like this, it is very difficult to
- enforce some standard of quality and/or usefulness\. For
- example, a package of functions to handle the military\'s
- "Zulu time" may be very useful to some, and unnecessary to
- others\.
- .sp
- The Nanforum Toolkit will by its very nature be a hodgepodge
- of routines, some of very high quality, some not so high\.
- It is up to the users to improve it\. It will be complete in
- some areas and vastly inadequate in others\. It is up to the
- users to fill in the holes\.
- .sp
- We shall err on the side of including "questionable"
- functions, provided they seem to work\. Debates on the
- quality of the library\'s source code shall be encouraged and
- will take place in the proper message section of NANFORUM\.
- .sp
- .in 0.24i
- .ta 0.4i
- \fB4 LIBRARY MAINTENANCE PROCEDURE
- .br
- .ta
- .sp
- .in 0.64i
- .ta 0.4i
- \fB4\.1 Selection procedure
- .br
- .ta
- .sp
- .in 1.04i
- Source code will be submitted to the librarian, the
- documenter (see paragraph 6\.2), or one of the referees\.
- Code will be added if it has been reviewed, and approved by
- at least two referees\.
- .sp
- Code not meeting the documentation or source code formatting
- standards will generally be returned to the author with
- instructions\.
- .sp
- .ta 4.4i
- When the referees have finished selecting a function, they
- .br
- .ta
- will compile it and submit both source and \.OBJ to the
- librarian who shall add the \.OBJ(s) into the library\.
- .sp
- Every effort should be made to make sure that the C and ASM
- functions are reviewed by referees with suitable C and ASM
- experience\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB4\.2 Update interval
- .br
- .ta
- .sp
- .in 1.04i
- As new functions are submitted, they will added to the
- library, and the documentation updated\. However, the
- library will only be updated at a fixed interval\.
- .sp
- This interval is currently set at: QUARTERLY\. After the
- initial release, updates occur on or around April 1, July 1,
- October 1, January 1, etc\. Of course, these dates are never
- guaranteed, and there is always an honorary release date of
- September 15, which will always be missed\.
- .sp
- If there are some very important functions that have been
- added, and the next update interval is, say, two months
- away, the librarian, documenter, and referees will release a
- maintenance update anyway, regardless of update intervals\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB4\.3 Version control
- .br
- .ta
- .sp
- .in 1.04i
- NANFOR\.LIB will use a numeric version number as follows:
- .sp
- .ta 4.4i
- The major version will be numeric, starting from 1\. This
- .br
- .ta
- will change with each quarterly update\. The minor version
- .ta 3.92i
- will change with each bug fix\. This will start with zero
- .br
- .ta
- and continue until the next major update, at which point it
- will revert to zero again\.
- .sp
- Typical version numbers might be 1\.1, 2\.12, 15\.2, etc\.
- .sp
- The \.LIB file, and all associated files, will carry a
- day/time stamp of the first day of the particular release\'s
- quarter, 12:00am\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB4\.4 Announcing updates
- .br
- .ta
- .sp
- .in 1.04i
- As the library and its associated documentation are updated,
- simple announcements will be posted on NANFORUM\. This is
- the only place where an update shall be announced\. An
- update will be announced after it has been successfully
- uploaded to the appropriate library on CompuServe\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB4\.5 Bug reports and fixes
- .br
- .ta
- .sp
- .in 1.04i
- The librarian will correlate and verify all bug reports,
- with the help of the referees\. If the referees believe a
- bug to be serious, they will fix it and the librarian will
- release a maintenance upgrade immediately\. If they consider
- it a minor bug, they will fix it but wait for the next
- scheduled upgrade to release it\. In this case, a bug fix
- may be released as a "Patch\."
- .sp
- .ta 0.8i
- \fB4\.5\.1 Patches
- .br
- .ta
- .sp
- .in 1.84i
- A "patch" is simply an ASCII text file containing
- instructions for editing the source code to a
- misbehaving function or group of functions\.
- Patches may appear in the CIS library before a
- maintenance release or quarterly upgrade\. A patch
- file will have a name of the form
- .sp
- .in 2.24i
- PATn\.ZIP
- .sp
- .in 1.84i
- where <n> is a number starting from 1\. Patches
- will be numbered sequentially\. Patches will be
- deleted every time a new version of NANFOR\.LIB
- goes on-line\.
- .sp
- A patch zipfile may optionally contain \.OBJ files
- to be replaced in user libraries via a LIB
- utility\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB4\.6 Technical Support
- .br
- .ta
- .sp
- .in 1.04i
- Technical support will work just as any technical subject on
- NANFORUM works\. Users will post questions and suggestions
- .ta 3.28i
- to a particular message area or thread, and anyone who
- .br
- .ta
- knows the answer should respond\. No one is obliged to
- answer, but it is considered good form to respond with
- something, even if one doesn\'t know the answer\.
- .sp
- Support will include help on recompiling the routines or
- modifying the source\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB4\.7 Linker Compatibility
- .br
- .ta
- .sp
- .in 1.04i
- In order to assist users of Clipper third party linkers
- (such as WarpLink or Blinker), NANFOR\.LIB may need to broken
- up into root and overlay sections\. How this will be done
- will be determined when splitting becomes necessary\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB4\.8 Splitting NANFOR\.LIB by functional category
- .br
- .ta
- .sp
- .in 1.04i
- It is possible that at some future date, it will make sense
- to split NANFOR\.LIB into separate functional areas (e\.g\.,
- video routines vs\. date routines, etc)\. This RFC will be
- modified accordingly should that need arise\.
- .sp
- .in 2.24i
- \fB(continued in part 2\.\.\.)
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- Overview, Part 2
- .ta
- .in 0i
- .sp 2
- .ne 20
- .ps +3
- .vs +3
- Overview, Part 2
- .br
- .ps -3
- .vs -3
- .sp 2
- .sp
- .in 1.76i
- \fBTHE NANFORUM TOOLKIT (NANFOR\.LIB)
- .in 0.96i
- \fBPUBLIC DOMAIN USER SUPPORTED CLIPPER FUNCTION LIBRARY
- .sp
- .in 2.88i
- (part 2)
- .sp
- .sp
- .in 0.24i
- .ta 0.4i
- \fB5 FUNCTION CODING STANDARDS
- .br
- .ta
- .sp
- .in 0.64i
- The goal of this standard is not to force anyone to rewrite his
- code for this library, but to create some consistency among the
- functions so that they may more easily maintained and understood
- by all Clipper developers, both novice and advanced\.
- .sp
- However, it is extremely important that anyone submitting code
- attach the proper headers and documentation and fill them out
- correctly\. This will make it much easier for code to be added to
- the library\.
- .sp
- .ta 0.4i
- \fB5\.1 Required sections for each function
- .br
- .ta
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.1\.1 Header (author name/etc, version ctrl info)
- .br
- .ta
- .sp
- .in 1.84i
- Figure 1 shows a header that must be included at
- the top of every piece of source code submitted to
- the library\. This header will work with both
- Clipper and C code\. For ASM code, substitute each
- asterisk ("*") with a semicolon (";") and delete
- the slashes ("/")\.
- .sp
- .sp
- .in 2.8i
- .br
- /*
- .in 2.88i
- .br
- * File\.\.\.\.\.\.:
- .br
- * Author\.\.\.\.:
- .br
- * CIS ID\.\.\.\.:
- .br
- * Date\.\.\.\.\.\.: $Date$
- .br
- * Revision\.\.: $Revision$
- .br
- * Log file\.\.: $Logfile$
- .br
- *
- .br
- *
- .br
- * Modification history:
- .br
- * ---------------------
- .br
- *
- .br
- * $Log$
- .br
- *
- .br
- */
- .sp
- .in 2.64i
- Figure 1 - Standard function header
- .sp
- .in 1.84i
- Note that the date, revision, logfile, and
- modification history fields will be maintained by
- the librarian and should not be edited or adjusted
- by code authors\.
- .sp
- The "File" field shall contain the source file
- name\. This is often independent of the individual
- function name\. For example, a function named
- ft_screen() would be included in SCREEN\.PRG\. As a
- rule, source files (\.PRG, \.C, \.ASM) should not
- have the "FT" prefix\.
- .sp
- The "Author" field should have the author\'s full
- name, and CIS number\. A CIS number is important,
- as this will make bug fixing and other
- correspondence easier\.
- .sp
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.1\.2 Public domain disclaimer
- .br
- .ta
- .sp
- .in 1.84i
- Authors shall simply state "This is an original
- work by [Author\'s name] and is hereby placed in
- the public domain\."
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.1\.3 Documentation block ( for \.DOC, \.NG, \.TRH )
- .br
- .ta
- .sp
- .in 2.8i
- .ta 0.32i
- .br
- /* $DOC$
- .br
- .ta
- .in 2.88i
- .ta 0.24i
- .br
- * $FUNCNAME$
- .br
- .ta
- .br
- *
- .ta 0.24i
- .br
- * $ONELINER$
- .br
- .ta
- .br
- *
- .ta 0.24i
- .br
- * $SYNTAX$
- .br
- .ta
- .br
- *
- .ta 0.24i
- .br
- * $ARGUMENTS$
- .br
- .ta
- .br
- *
- .ta 0.24i
- .br
- * $RETURNS$
- .br
- .ta
- .br
- *
- .ta 0.24i
- .br
- * $DESCRIPTION$
- .br
- .ta
- .br
- *
- .ta 0.24i
- .br
- * $EXAMPLES$
- .br
- .ta
- .br
- *
- .ta 0.24i
- .br
- * $INCLUDE$
- .br
- .ta
- .br
- *
- .ta 0.24i
- .br
- * $SEEALSO$
- .br
- .ta
- .br
- *
- .ta 0.24i
- .br
- * $END$
- .br
- .ta
- .br
- */
- .sp
- .sp
- .sp
- .in 2.64i
- Figure 2 - Standard Documentation Header
- .sp
- .in 1.84i
- The keywords enclosed in dollar-signs delimit
- sections of the documentation header analagous to
- those in Nantucket\'s Clipper 5\.0 documentation\.
- Documentation should be written in the same style
- and flavor as the Nantucket material, if possible\.
- Refer to the Clipper documentation for more detail
- and numerous examples\.
- .sp
- The documentation will appear on comment lines
- between the keywords\. Examples are optional\. Do
- not put documentation on the same line as the
- comment keyword\.
- .sp
- Note that the $DOC$ and $END$ keywords serve as
- delimiters\. Do not place any text between $DOC$
- and $FUNCNAME$, or any documentation after the
- $END$ keyword, unless that documentation belongs
- in the source code file and not in the NG/TRH
- file\.
- .sp
- The $FUNCNAME$ keyword should be followed by the
- function name, with parentheses, and no arguments
- or syntax, such as:
- .sp
- .in 2.24i
- .br
- $FUNCNAME$
- .in 2.56i
- .br
- FT_SCREEN()
- .sp
- .in 1.84i
- or in the case of commands:
- .sp
- .in 2.24i
- .br
- $FUNCNAME$
- .in 2.56i
- .br
- @\.\.\.PROMPT
- .sp
- .in 1.84i
- Note the indent for readibility\. The function or
- command name shall be in all caps and parentheses
- shall be added after the function name as shown
- above\.
- .sp
- The $ONELINER$ keyword should be followed by a
- simple statement expressing what the function
- does, phrased in the form of a command, e\.g\.:
- .sp
- .in 2.24i
- $ONELINER$
- .in 2.56i
- Sum the values in an array
- .sp
- .in 1.84i
- The length of the entire $ONELINER$ shall not
- exceed 60 characters (this is a Norton Guide
- limitation)\.
- .sp
- The $SYNTAX$ keyword should be followed by a
- Nantucket-standard syntax specifier, such as:
- .sp
- .in 2.24i
- .br
- $SYNTAX$
- .in 2.56i
- .br
- FT_SCREEN( <nTop> [,<nBottom>] ) -> NIL
- .sp
- .in 1.84i
- All parameters have proper prefixes (see paragraph
- 5\.4), and are enclosed in <angle brackets>\.
- Optional parameters are enclosed in [square
- brackets] as well\. An arrow should follow,
- pointing to the return value\. If there is no
- return value, it should be NIL\. Any others should
- be preceded with the proper prefix (see the
- Clipper documentation)\.
- .sp
- The $INCLUDE$ field is for the name of a Clipper
- "\.CH" header file that contains preprocessor
- directives for use with this command or function\.
- If no header file is needed, leave this field
- blank\.
- .sp
- Please indicate in your description and examples
- if this file is mandantory (in the case of commands)
- or optional\.
- .sp
- Note that header files that are used only in the
- compilation of the library function itself should
- NOT be included in this field\.
- .sp
- The $SEEALSO$ field provides a way to generate
- cross-references in the Norton Guide help
- documentation\. Use it to point the user to other
- related functions in the forum toolkit\. For
- example, if FT_FUNC1() is also related to
- FT_FUNC2() and FT_FUNC3(), the field would look
- like this:
- .sp
- .in 2.24i
- $SEEALSO$
- .in 2.56i
- FT_FUNC2() FT_FUNC3()
- .sp
- .in 1.84i
- Note that function names are in all CAPS the
- parenthesis are included, and each funation name
- is seperated by a single space\.
- .sp
- Other documenation fields should be self-
- explanatory\. Review the appendix for a sample\.
- All fields are required and must be filled in\.
- Examples should not be considered optional\.
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.1\.4 Sample header and documentation block
- .br
- .ta
- .sp
- .in 1.84i
- Refer to the Appendix for a sample header and
- documentation block\.
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.1\.5 Test driver
- .br
- .ta
- .sp
- .in 1.84i
- A test driver is an optional section of C or
- Clipper code that will only be compiled under
- certain circumstances\. Developers are encouraged
- to include a short "test section" in front of
- their code\.
- .sp
- The test driver shall be surrounded by the
- following pre-processor directives, and placed at
- the top of the source file:
- .sp
- .in 2.24i
- .br
- #ifdef FT_TEST
- .in 2.64i
- .br
- [test code]
- .in 2.24i
- .br
- #endif
- .sp
- .in 1.84i
- The test driver is currently optional, but authors
- submitting Clipper code should seriously consider
- adding it\. It is a good way to include short
- demos within a piece of source code, yet pay no
- penalty because it is only compiled if needed\. It
- will be invoked when a #define is created that
- .ta 2i
- says "#define FT_TEST\." This is a way for
- .br
- .ta
- submitters to include short test routines with
- their functions and yet keep it all in one source
- file\. This will be useful to end users\.
- .sp
- This test driver may become required in a future
- version of the RFC\.
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.1\.6 Code
- .br
- .ta
- .sp
- .in 1.84i
- The source code shall be formatted as described in
- paragraph 5\.4\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB5\.2 Function names
- .br
- .ta
- .sp
- .in 1.04i
- All NANFOR\.LIB functions start with one of two prefixes\. If
- the function is to be called by user programs, than it will
- begin with the prefix
- .sp
- .in 1.44i
- .ta 0.72i
- FT_ ("F", "T", underscore)
- .br
- .ta
- .sp
- .in 1.04i
- .ta 4.08i
- Note that "FT" is a mnemonic for "Forum Toolkit\." If the
- .br
- .ta
- function is "internal" to a module, then it will be prefixed
- by an underscore:
- .sp
- .in 1.44i
- .ta 0.72i
- _FT ( Underscore, "F", "T" )
- .br
- .ta
- .sp
- .in 1.04i
- with no trailing underscore\. Examples:
- .sp
- .in 1.44i
- .ta 1.84i
- .br
- FT_CURDIR() "external"
- .br
- .ta
- .ta 1.84i
- .br
- _ftAlloc() "internal"
- .br
- .ta
- .sp
- .in 0.64i
- .ta 0.4i
- \fB5\.3 Librarian\'s authority to change function names
- .br
- .ta
- .sp
- .in 1.04i
- Some functions will be submitted that either (1) bear a
- similar name to another function in the library, or (2) bear
- an inappropriate name\. For example, a function called
- FT_PRINT that writes a character to the screen could be said
- to be named inappropriately, as a name like FT_PRINT implies
- some relationship to a printer\. The librarian shall have
- the responsibility to rename submitted functions for clarity
- and uniqueness\.
- .sp
- .ta 0.8i
- \fB5\.3\.1 Changing a function name after it has been
- .br
- .ta
- .in 1.84i
- released
- .sp
- Once the library is released with a particular
- function included, then a function name should
- generally be frozen and not renamed\. To do so
- would probably cause difficulties with users who
- had used the previous name and are not tracking
- the changes to the library\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB5\.4 Source code formatting
- .br
- .ta
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.4\.1 Clipper
- .br
- .ta
- .sp
- .in 1.84i
- Clipper code shall be formatted in accordance with
- Nantucket\'s currently defined publishing standard\.
- Although there will surely be some debate over
- whether this is a good idea, in general, the goal
- is to provide something consistent that all
- Clipper developers will recognize\.
- .sp
- Minor deviations will be permitted\.
- .sp
- The Nantucket standard usually means uppercase
- keywords, and manifest constants, and lower case
- everything else\.
- .sp
- In addition, identifiers shall be preceded with
- the proper metasymbol:
- .sp
- .in 2.24i
- .ta 0.4i
- n Numeric
- .br
- .ta
- .ta 0.4i
- c Character or string
- .br
- .ta
- .ta 0.4i
- a Array
- .br
- .ta
- .ta 0.4i
- l Logical, or boolean
- .br
- .ta
- .ta 0.4i
- d Date
- .br
- .ta
- .ta 0.4i
- m Memo
- .br
- .ta
- .ta 0.4i
- o Object
- .br
- .ta
- .ta 0.4i
- b Code block
- .br
- .ta
- .ta 0.4i
- h Handle
- .br
- .ta
- .ta 0.4i
- x Ambiguous type
- .br
- .ta
- .sp
- .in 1.84i
- Refer to the Clipper documentation for samples of
- Nantucket\'s code publishing format\.
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.4\.2 C
- .br
- .ta
- .sp
- .in 1.84i
- C source code shall be formatted in a generally
- accepted way, such as Kernighan and Ritchie\'s
- style used in the book _The C Programming
- .ta 1.04i
- Language_\." The use of Nantucket\'s EXTEND\.H is
- .br
- .ta
- encouraged\.
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.4\.3 ASM
- .br
- .ta
- .sp
- .in 1.84i
- No particular formatting conventions are required
- for assembly language source code, since assembly
- code formatting is fairly standard\. Lowercase
- code is preferred\. Be sure to include the proper
- documentation header information, as described
- above\.
- .sp
- Do not place ASM code in DGROUP\. See paragraph
- 5\.12\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB5\.5 Organization into \.PRGs
- .br
- .ta
- .sp
- .in 1.04i
- Since many different people will be submitting routines, it
- is probably best if all routines that belong together are
- housed in the same \.PRG\. If there is some reason to split
- the \.PRG, the referees and the librarian will handle that as
- part of library organization\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB5\.6 Header files
- .br
- .ta
- .sp
- .in 1.04i
- Including a "\.ch" or "\.h" or "\.inc" with each function would
- get unwieldy\. For the purpose of NANFOR\.LIB, all #defines,
- #ifdefs, #commands, #translates, etc that belong to a
- particular source file shall be included at the top of that
- source file\. Since few submissions will split over multiple
- source files, there will usually be no need to #include a
- header in more than one place\.
- .sp
- If a "ch" file will make the end user\'s job of supplying
- parameters and other information to NANFOR\.LIB functions
- easier, then it shall be submitted as a separate entity\.
- The referees will decide on whether to include these
- directives in a master NANFOR\.CH file\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB5\.7 Clipper 5\.0 Lexical Scoping
- .br
- .ta
- .sp
- .in 1.04i
- NANFOR\.LIB routines that are written in Clipper will make
- use of Clipper 5\.0\'s lexical scoping features to insulate
- themselves from the rest of the user\'s application\.
- .sp
- For example, all "privates" shall generally be declared
- "local\."
- .sp
- If a package of Clipper functions is added to the library,
- then the lower-level, support functions will be declared
- STATIC as necessary\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB5\.8 Use of Publics
- .br
- .ta
- .sp
- .in 1.04i
- Authors shall not use PUBLIC variables in NANFOR\.LIB
- functions, due to the potential interference with an
- end-user\'s application or vice versa\.
- .sp
- If a global is required for a particular function or package
- of functions, that global shall be accessed through a
- function call interface defined by the author (\.e\.g,
- "ft_setglobal()", "ft_getglobal()", and so on)\. Globals
- such as this shall be declared static in the \.PRG that needs
- them\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB5\.9 Use of Macros ("&" operator)
- .br
- .ta
- .sp
- .in 1.04i
- The use of macros in NANFOR\.LIB functions will be, for the
- most part, unnecessary\. Since this is a Clipper 5\.0
- library, the new 5\.0 codeblock construct should be used
- instead\. Anyone having trouble figuring out how to convert
- a macro to a codeblock should post suitable questions on
- NANFORUM\.
- .sp
- .in 0.64i
- \fB5\.10 Use of Static Functions
- .sp
- .in 1.04i
- Any Clipper 5\.0 function that is only needed within the
- scope of one source file shall be declared STATIC\. This
- applies mostly to NANFOR\.LIB "internals" (names with an
- "_ft" prefix) that user programs need not access\.
- .sp
- .in 0.64i
- \fB5\.11 Use of SPI_ interface
- .sp
- .in 1.04i
- A common library of low-level routines that are useful in C
- and assembler functions, called the "Shared Programming
- Interface", shall be used as a practical alternative to a
- compiler\'s standard library, where applicable\. These
- functions were developed by Dirk Lesko and a consortium of
- third party developers to help reduce the amount of
- duplicated code pulled in by multiple libraries\.
- .sp
- SPI\.LIB, including its source, is available as a separate
- library and will always be posted wherever NANFOR\.LIB is
- posted\.
- .sp
- Use of SPI\.LIB will be required if and only if SPI\.LIB is
- widely available in source code form so that authors may see
- what functions need not be duplicated\.
- .sp
- .in 0.64i
- \fB5\.12 Use of DGROUP in ASM Functions
- .sp
- .in 1.04i
- Use of DGROUP in assembly language functions shall be
- avoided, in accordance with Nantucket\'s recommendations\.
- Assembly functions written for NANFOR\.LIB shall use a
- segment named _NanFor, as in the following example:
- .sp
- .sp
- .in 1.44i
- .ta 0.8i
- .br
- Public FT_ChDir
- .br
- .ta
- .sp
- .ta 0.8i
- .br
- Extrn _ftDir:Far
- .br
- .ta
- .sp
- .ta 0.8i 1.6i 2.4i 3.2i
- .br
- Segment _NanFor Word Public "CODE"
- .br
- .ta
- .ta 0.8i
- .br
- Assume CS:_NanFor
- .br
- .ta
- .sp
- .ta 0.8i 1.6i
- .br
- Proc FT_ChDir Far
- .br
- .ta
- .in 2.24i
- .br
- \.
- .br
- \.
- .br
- \.
- .br
- Ret
- .in 1.44i
- .ta 0.8i
- .br
- Endp FT_ChDir
- .br
- .ta
- .sp
- .ta 0.8i
- .br
- Ends _NanFor
- .br
- .ta
- .br
- End
- .sp
- .in 0.64i
- \fB5\.13 Use of "Internals"
- .sp
- .in 1.44i
- Use of Nantucket "internals" by code authors is
- allowed\. However, should any code make use of an
- internal, i\.e\., a function or variable that is not part
- of the published Clipper API, then that internal shall
- be clearly marked in the documentation (under
- "DESCRIPTION") and in the actual code, everywhere the
- internal is used\.
- .sp
- .in 0.64i
- \fB5\.14 Procedures for compiling functions
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.14\.1 Clipper
- .br
- .ta
- .sp
- .in 1.84i
- Clipper functions will be compiled under the
- current release of Clipper 5\.0, with the following
- compiler options:
- .sp
- .in 2.24i
- /n /w /l
- .sp
- .in 1.84i
- Note that neither line numbers nor debugging
- information will find its way into NANFOR\.LIB, to
- keep the code size down\. End users may recompile
- NANFOR\.LIB with these options enabled if they want
- to view NANFOR\.LIB source in the debugger\.
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.14\.2 ASM
- .br
- .ta
- .sp
- .in 1.84i
- Assembly functions must compile successfully
- under any MSDOS assembler capable of producing the
- proper \.OBJ file\. However, care should be taken
- not to use any macros or special syntax particular
- to one vendor\'s assembler, because that would make
- it difficult for end users to recompile the
- source\.
- .sp
- .in 1.04i
- .ta 0.8i
- \fB5\.14\.3 C
- .br
- .ta
- .sp
- .in 1.84i
- C functions must compile successfully under any C
- compiler capable of interfacing to Clipper\.
- Obviously, Microsoft C, version 5\.1, is the
- preferred development environment\. Care should be
- taken, when writing C code, not to use any special
- compiler features particular to one vendor\'s C
- compiler, because that would make it difficult for
- end users to recompile the source\.
- .sp
- .in 0.64i
- \fB5\.15 Functions requiring other libraries
- .sp
- .in 1.04i
- It is very easy to write functions in C that call the
- compiler\'s standard C library functions\. However,
- NANFOR\.LIB can make no assumptions about the end user\'s
- ability to link in the standard library or any other
- library\. Therefore, no function will be added to
- NANFOR\.LIB that requires any other third party or compiler
- manufacturer\'s library, except for SPI\.LIB, described above\.
- .sp
- .in 0.24i
- .ta 0.4i
- \fB6 ADMINISTRATIVE DETAILS
- .br
- .ta
- .sp
- .in 0.64i
- .ta 0.4i
- \fB6\.1 Librarian
- .br
- .ta
- .sp
- .in 1.04i
- The librarian will the person who physically creates the
- library via a library utility and uploads it to the proper
- NANFORUM library on CompuServe\. The librarian generally
- does *not* test code or edit source code to repair
- formatting errors\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB6\.2 Documenter
- .br
- .ta
- .sp
- .in 1.04i
- .ta 4.08i
- The documenter is responsible for maintaining the Norton
- .br
- .ta
- and/or Tom Rettig guides and keeping it in sync with each
- new release\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB6\.3 Referees
- .br
- .ta
- .sp
- .in 1.04i
- Referees are volunteers who read source code, clean it up,
- compile it, look for problems like potentially problematic C
- code, decide on which function is best, consolidate common
- functions, etc\. They make sure the header and documentation
- blocks are present\. There is no election or term for
- refereedom\. One simply performs the task as long as one can
- and bows out when necessary\.
- .sp
- .in 0.64i
- .ta 0.4i
- \fB6\.4 Transitions
- .br
- .ta
- .sp
- .in 1.04i
- Not everyone will be able to stay around forever to keep
- working on this project\. Therefore, it is the
- responsibility of each referee, documenter, or librarian to
- announce as far in advance as possible his or her intention
- to leave, in order to give everyone a chance to come up with
- a suitable replacement\. Don\'t let it die!
- .sp
- .in 0.24i
- .ta 0.4i
- \fB7 CONTRIBUTORS
- .br
- .ta
- .sp
- .in 0.64i
- Current contributors, directly and indirectly, to this
- document include:
- .sp
- .in 1.04i
- .br
- Don Caton [71067,1350]
- .ta 1.36i
- .br
- Bill Christison [72247,3642]
- .br
- .ta
- .br
- Robert DiFalco [71610,1705]
- .ta 1.12i
- .br
- Paul Ferrara [76702,556]
- .br
- .ta
- .br
- David Husnian [76064,1535]
- .br
- Ted Means [73067,3332]
- .br
- Steve Kolterman [76320,37]
- .br
- Alexander Santic [71327,2436]
- .br
- Glenn Scott [71620,1521]
- .br
- Keith Wire [73760,2427]
- .br
- Craig Yellick [76247,541]
- .br
- James Zack [75410,1567]
- .in 0i
- .sp
- .in 1.5i
- .ti -1.5i
- .ta 1.5i
- .ft B
- See Also:
- .ft R
- Overview, Part 1
-