Changeset 514 for trunk/doc/pslib/psLibSRS.tex
- Timestamp:
- Apr 23, 2004, 11:57:43 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSRS.tex (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSRS.tex
r391 r514 1 %%% $Id: psLibSRS.tex,v 1. 3 2004-04-07 03:26:07eugene Exp $1 %%% $Id: psLibSRS.tex,v 1.4 2004-04-23 21:57:43 eugene Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 77 77 \subsubsection{Software Coding Requirements} 78 78 79 \subsubsubsection{CSCI Deliverable} 80 81 All final source code generated for the IPP is to be delivered via 82 CVS, including the test code. CVS revision history shall be included 83 and made available via CVS. 84 85 \subsubsubsection{Languages} 79 \paragraph{Languages} 86 80 87 81 Source code shall be in C. All source code shall be compiled with … … 90 84 Scripting language shall be in \tbd{Python, version TBD}. 91 85 92 \ subsubsubsection{Interfaces}86 \paragraph{Interfaces} 93 87 94 88 Access to low-level Library functions shall be provided via C APIs … … 98 92 processing jobs shall be available via the UNIX shell. 99 93 100 \ subsubsubsection{Coding Standards}94 \paragraph{Coding Standards} 101 95 102 96 The C code shall comply with ANSI Standard C99. Because the delivered … … 110 104 defined in the document TBD}. 111 105 112 \subsubsubsection{Commenting and Documentation} 106 \paragraph{Naming Conventions} 107 108 Header files must have names starting \code{ps} or \code{p_ps} for 109 private interface definitions. The latter must appear in a 110 subdirectory \code{private} of whichever directory is being searched 111 for the public header files. 112 113 Functions visible at global scope which are part of the public API 114 must have names begining with \code{ps}, and follow the naming 115 conventions in the coding standard. Functions that are visible at 116 global scope but which are not part of the public interface must have 117 names begining with \code{p_ps}. Functions that are local to a file 118 must \textit{not} start \code{ps} (or \code{p_ps}). 119 120 Variables visible at global scope which are part of the public API 121 must have names begining with \code{ps}, and follow the naming 122 conventions in the coding standard. Variables that are visible at 123 global scope but which are not part of the public interface must have 124 names begining with \code{p_ps}. Variables that are local to a file 125 must \textit{not} start \code{ps} (or \code{p_ps}). 126 127 The names of all enumerated types and C-preprocessor symbols (but not 128 variables declared \code{const}) must start with \code{PS_}, in the 129 case of public symbols, or \code{P_PS_}, for private symbols. The 130 rest of the name must be uppercase with words separated by underscores 131 (\code{_}). An exception is the case of system utilities implemented 132 as macros, in which case the names must conform to the convention for 133 function names. 134 135 When defining a function to convert from one type to another, the name 136 should be of the form \code{psOldToAlloc}, e.g.\hfil\break 137 \code{psEquatorialToEcliptic} (\emph{not} 138 \code{psEquatorial2Ecliptic}). 139 140 \paragraph{C Programming Guidelines} 141 142 Functions that assign to a variable should list that argument 143 \textit{first}, following the pattern of \code{strcpy}; e.g. 144 \begin{verbatim} 145 void psAddToVector(restrict psVec *outVec, const restrict psVec *inVec, 146 int val); 147 \end{verbatim} 148 149 Type definitions should always be accompanied by prototypes for their 150 constructors and destructors, following these guidelines: 151 152 \begin{itemize} 153 \item The constructor name should consist of the type name followed by 154 \code{Alloc}; e.g. a type \code{psImage} would be created by a 155 function 156 \begin{verbatim} 157 psImage *psImageAlloc(int nrow, int ncol); 158 \end{verbatim} 159 160 \item The type should be freed with a destructor named \code{typeFree}, e.g. 161 \begin{verbatim} 162 void psImageFree(psImage *img); 163 \end{verbatim} 164 165 \item The constructor must never return \code{NULL}, and no code calling the 166 constructor should ever check the return value. 167 168 \item The destructor must not return a value. 169 170 \item The destructor must handle being passed \code{NULL} by simply 171 returning immediately. This should not be treated as an error 172 condition. 173 174 \item Constructors and Destructors should use the memory reference 175 counter facilities of the PSLib memory management system. 176 177 \end{itemize} 178 179 \paragraph{Commenting and Documentation} 113 180 114 181 Commenting of delivered C and Python code shall follow the C and … … 124 191 documentation shall be delivered as PDF documents. 125 192 126 \ subsubsubsection{Version Control}193 \paragraph{Version Control} 127 194 128 195 Source code version control shall be implemented with CVS. 129 196 130 \subsubsubsection{Platform architectures and operating systems} 197 \paragraph{CSCI Deliverable} 198 199 All final source code generated for the IPP is to be delivered via 200 CVS, including the test code. CVS revision history shall be included 201 and made available via CVS. 202 203 \paragraph{Platform architectures and operating systems} 131 204 132 205 Makefiles shall be provided with appropriate flags set so that all … … 143 216 such as those caused by lex-generated code. 144 217 145 Although the code must compile successfully under all threelisted218 Although the code must compile successfully under both listed 146 219 operating systems, unit testing should only be performed for the 147 220 x86/Linux combination. 148 221 149 \ subsubsubsection{Software Configuration}222 \paragraph{Software Configuration} 150 223 151 224 \tbd{deferred}
Note:
See TracChangeset
for help on using the changeset viewer.
