Bug #1356
CoCoA-5 header files: should use a common prefix for CPP variables which enforce read-once
Description
The usual trick to ensure that header files are read only once is to define a CPP variable the first time the header is read; later attempts to read the header check whether that variable is set.
We use this trick, but we should use a common prefix for the variables used. In CoCoALib this prefix is CoCoA_
.
I suggest using the prefix CoCoA5_
for header files for CoCoA-5.
Related issues
History
#1 Updated by John Abbott over 4 years ago
- Target version changed from CoCoA-5.3.0 to CoCoA-5.4.0
Postpone because it is not urgent/important. It should be a simple change, but I prefer to do it when there is less time pressure.
#2 Updated by John Abbott over 2 years ago
This is a reasonable proposal. Let's do it!
Soon?
#3 Updated by John Abbott over 2 years ago
- Status changed from New to Resolved
- Assignee set to John Abbott
- % Done changed from 0 to 80
I have changed all the files.
The only slightly strange one is C5.H
where the whole file is inside a #ifdef
block -- not sure if I have done the right thing.
All compiles, and all tests pass.
Will check in soon.
#4 Updated by John Abbott over 2 years ago
I have reviewed the header files and checked them in.
We need to review also the copyright notices: I have added Abbott & Bigatti (where missing).
The copyright blurb refers to CoCoALib, but that is not strictly correct -- what to do?
#5 Updated by John Abbott over 2 years ago
- Related to Support #1555: Software licence added
#6 Updated by John Abbott over 2 years ago
- Status changed from Resolved to Closed
- % Done changed from 80 to 100
- Estimated time set to 1.11 h