Skip to content

Commit 7d65912

Browse files
committed
Merge branch 'master' into autobuild/alpha
2 parents 8ab0d99 + 38a45ef commit 7d65912

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2142
-1646
lines changed

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ branches:
77
except:
88
- /^v[0-9]/
99

10-
os:
11-
- linux
12-
- osx
1310

1411
language: cpp
1512

16-
compiler:
17-
- gcc
18-
- clang
13+
matrix:
14+
include:
15+
- os: linux
16+
compiler: gcc
17+
- os: osx
18+
compiler: clang
1919

2020
sudo: false
2121

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ before_build:
4343
(Get-Content source\base\build.h).replace('//{POV_AUTOBUILD_2}', $env:pov_autobuild_2) | Set-Content source\base\build.h
4444
(Get-Content source\base\build.h).replace('//{POV_AUTOBUILD_3}', $env:pov_autobuild_3) | Set-Content source\base\build.h
4545
(Get-Content source\base\build.h).replace('YOUR NAME (YOUR EMAIL)', $env:pov_authorized_by) | Set-Content source\base\build.h
46-
(Get-Content source\base\build.h).replace('#error Please fill in BUILT_BY, then remove this line', '') | Set-Content source\base\build.h
46+
(Get-Content source\base\build.h).replace('#error "Please fill in BUILT_BY, then remove this line"', '') | Set-Content source\base\build.h
4747
4848
build:
4949
project: windows/vs10/povray.sln

changes.txt

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,22 @@ Prior to the release of 3.7.1, the following items still need urgent attention:
4949
New Features
5050
------------
5151

52+
- A new finish parameter, `use_alpha`, has been added to suppress highlights
53+
and reflections depending on pigment transparency.
54+
55+
- Array elements no longer have to be of the same type.
56+
57+
- Support for variable-size arrays has been added.
58+
59+
- A new data container, `dictionary`, has been added to support structured
60+
storage of data.
61+
62+
- Pseudo-dictionaries `local` and `global` have been added, allowing to
63+
specifically access local or global identifiers, respectively.
64+
65+
- A new special pigment pattern, `user_defined`, has been added to define the
66+
pigment colour directly in terms of a set of functions.
67+
5268
- A new pattern, `potential`, has been added to define a pattern based on the
5369
potential field of a blob or isosurface object.
5470

@@ -86,9 +102,6 @@ New Features
86102
assignments. The main purpose is to allow macros to return a set of values
87103
rather than just a single one.
88104

89-
- `local()` and `global()` pseudo-functions have been added to specifically
90-
refer to a local or global identifier, respectively.
91-
92105
- The macro syntax has been extended to allow for optional parameters.
93106

94107
- Light sources' distance-based fading can now be set to obey an inverse-power
@@ -196,16 +209,35 @@ Fixed or Mitigated Issues Reported by Static Code Analysis
196209

197210
Coverity Scan defects targeted deliberately:
198211

212+
- CID 967251: 'Constant' variable guards dead code
213+
- CID 967254: 'Constant' variable guards dead code
214+
- CID 967261: Logically dead code
215+
- CID 967262: Logically dead code
216+
- CID 967273: Explicit null dereferenced
217+
- CID 967296: Parse Warning
218+
- CID 967297: Parse Warning
199219
- CID 967377: Uninitialized pointer field
200220
- CID 967400: Uninitialized pointer field
221+
- CID 967410: Structurally dead code
222+
- CID 967412: Structurally dead code
223+
- CID 1129008: Division or modulo by zero
201224
- CID 1129016: Uninitialized pointer read
202225
- CID 1129017: Uninitialized scalar variable
203226
- CID 1372548: Non-virtual destructor
204227
- CID 1372552: Unchecked return value
205228
- CID 1372555: Operands don't affect result
206229
- CID 1372556: Wrong operator used
207230
- CID 1372557: Wrong operator used
231+
- CID 1372558: Resource leak in object
232+
- CID 1372560: Logically dead code
208233
- CID 1372562: Non-array delete for scalars
234+
- CID 1372566: Unchecked dynamic_cast
235+
- CID 1372567: Unchecked dynamic_cast
236+
- CID 1372603: Resource leak
237+
- CID 1372604: Dereference before null check
238+
- CID 1372605: Dereference before null check
239+
- CID 1372606: Dereference before null check
240+
- CID 1372607: Dereference before null check
209241
- CID 1372608: Sizeof not portable
210242
- CID 1372626: Uninitialized scalar variable
211243
- CID 1372636: Uninitialized pointer field
@@ -224,6 +256,12 @@ Coverity Scan defects targeted deliberately:
224256
- CID 1372655: Structurally dead code
225257
- CID 1372656: Structurally dead code
226258
- CID 1372657: Unused value
259+
- CID 1373648: Out-of-bounds access
260+
- CID 1373649: Free of address-of expression
261+
- CID 1373651: Logically dead code
262+
- CID 1373652: Dereference before null check
263+
- CID 1373653: Write to pointer after free
264+
- CID 1373654: Use after free
227265

228266
Coverity Scan defects eliminated in passing:
229267

@@ -342,6 +380,8 @@ Reported via GitHub:
342380
- #49 ("Latest version from Git won't build with MS Visual Studio 2015")
343381
- #50 ("Make error in Ubuntu 14.04")
344382
- #53 ("Standard include files may mess up the language version")
383+
- #129 ("Port of FS331 - Intersection causes quadric to disappear")
384+
- #153 ("vector list trailing comma error sor lathe sphere_sweep")
345385

346386
Reported via FlySpray:
347387

@@ -354,9 +394,15 @@ Reported via FlySpray:
354394
- FS#316 ("inverse keyword does not work properly with fractals")
355395
- FS#317 ("problem with +D option at specific output file dimensions")
356396
- FS#318 ("method 3 (default) scattering media is too bright & causes artifacts when nested")
397+
- FS#331 ("Intersection causes quadric to disappear")
398+
- FS#336 ("#fopen w/o OPEN_TYPE crash povray (segfault)")
357399

358400
Reported via the Newsgroups:
359401

402+
403+
(2002-01-21, povray.beta-test, "<1, 0, 0> + 1*t")
404+
Inconsistency in automatic scalar-to-vector promotion.
405+
360406
361407
(2014-08-12, povray.binaries.images, "unexplained")
362408
Precision issue led to `<1,1,1>.grey` not evaluating to 1 on sone systems.
@@ -414,6 +460,10 @@ Reported via the Newsgroups:
414460
(2016-08-17, povray.binaries.scene-files, "Wrong normal direction on triangle{ }s")
415461
Bug in flat trianges that could cause interior_texture to show on the wrong side.
416462

463+
464+
(2016-10-20, povray.programming, "Re: solving polynomials")
465+
Misplaced `break` in polynomial solving code.
466+
417467
Reported via Windows Crash Reports:
418468

419469
- crash report #???, dump file #988

platform/unix/syspovtimer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void Delay(unsigned int msec)
8080
POV_ASSERT(msec < 1000); // On some systems, usleep() does not support sleeping for 1 second or more.
8181
usleep (msec * (useconds_t)1000);
8282
#else
83-
#error Bad compile-time configuration.
83+
#error "Bad compile-time configuration."
8484
#endif
8585
}
8686

source-doc/compiler.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ General Presumptions
66

77
While POV-Ray is being developed with portability high in mind, the C++ standard allows for some degrees of freedom that
88
we consider too exotic to cater to. We therefore presume all compilers and runtime environments to adhere to the
9-
following additional restrictions:
9+
following restrictions:
1010

1111
- **Char Size**: The `char` data type is currently presumed to be exactly 8 bits wide.
1212

@@ -19,7 +19,11 @@ following additional restrictions:
1919
separator, in include directives.
2020

2121
- **Integer Division**: Integer division is presumed to round towards zero. This also implies that the remainder (as
22-
computed by the modulus operator `%`) is negative (or zero) if the dividend and divisor have different sign.
22+
computed by the modulus operator `%`) is negative (or zero) if the dividend and divisor have different signs.
23+
24+
Failure to meet the above restrictions will cause in undefined behaviour.
25+
26+
Further restrictions may apply, but shall prompt a compile-time error if not satisfied.
2327

2428

2529
POVMS Additional Restrictions

source-doc/styleguide.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ Miscellaneous Coding Rules
223223
- **Locale**: Do not tamper with the C locale (i.e. do not call `setlocale` or any other function doing the same job),
224224
as plenty of code in POV-Ray relies on it remaining set to the default.
225225

226+
- **Optimization**: Do not over-optimize your code. While we do want POV-Ray to be fast, we also want it to be
227+
reasonably maintainable, and modern compilers generally do a good enough job at automatic optimization that you can
228+
focus on keeping your code robust and easy to understand.
229+
226230

227231
Code Documentation
228232
==================

source/base/build.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
/// Specifies the person or organization responsible for this build.
5656
/// @attention Please set this to your real name, and/or include a working email or website address to contact you.
5757
#define BUILT_BY "YOUR NAME (YOUR EMAIL)"
58-
#error Please fill in BUILT_BY, then remove this line
58+
#error "Please fill in BUILT_BY, then remove this line"
5959
#endif
6060

6161
#endif // POVRAY_BASE_BUILD_H

source/base/colour.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ namespace pov_base
5454

5555
#else
5656

57-
#error TODO!
57+
#error "TODO!"
5858

5959
#endif
6060

source/base/colour.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ class GenericRGBColour
578578
mColour[BLUE] = col.mColour[2];
579579
}
580580
#else
581-
#error TODO!
581+
#error "TODO!"
582582
#endif
583583
};
584584

@@ -1736,7 +1736,7 @@ class GenericColour
17361736
mColour[2] = col.blue();
17371737
}
17381738
#else
1739-
#error TODO!
1739+
#error "TODO!"
17401740
#endif
17411741
};
17421742

source/base/image/gif.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ Image *Read (IStream *file, const Image::ReadOptions& options, bool IsPOTFile)
125125
{
126126
case EOF:
127127
throw POV_EXCEPTION(kFileDataErr, "Unexpected EOF reading GIF file");
128-
finished = true;
129-
break ;
128+
break;
130129

131130
case ';': /* End of the GIF dataset. */
132131
finished = true;

0 commit comments

Comments
 (0)