Hacker News new | ask | show | jobs
by shoo 3688 days ago
the user can optionally specify which version of behaviour they want. This is named the `opt_compat` value in the code. All through the code there are checks against the `opt_compat` value to decide which version of which old/current behaviour to use.
1 comments

And the opt_compat has C integer/boolean semantics in this case, so the test

  if (opt_compat) ...
tests whether the option has a nonzero value (has been specified).

And so

  if (opt_compat && opt_compat <= 130)
means "user has requested compatibility, with a value of 130 or less".

By the way -C 0, which would look as a Booealn false, as if -C were not specified, is not allowed. If the user specifies -C N such that N is lower than the oldest version that we emulate, the implementation terminates with an error message like "sorry, compatibility with versions less than 70 is not supported by version 140".