Skip to content

Commit

Permalink
Merge pull request #1632 from davidweichiang/glog_fixes
Browse files Browse the repository at this point in the history
Fix some errors related to .glog file
  • Loading branch information
rpspringuel authored Feb 26, 2025
2 parents ba359fe + 7861131 commit 7b3b1c1
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 199 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/).
- When fancyhdr and GregorioTeX are used together, GregorioTeX's disabling of hyphenation and its `post_linebreak` modification of the `post_linebreak_filter` interfere with multiline headers. Using the `fancyhdr/before` and `fancyhdr/after` hooks we temporarily reenable hyphenation and disable our `post_linebreak` modification while headers and footers are being processed in the middle of a score. See [#1603](https://github.com/gregorio-project/gregorio/issues/1603).
- Fixed a bug that could cause a hyphen to appear on the wrong line. See [#1319](https://github.com/gregorio-project/gregorio/issues/1319).
- Fixed the placement of above-lines text (`<alt>`) relative to a note above the staff or when the number of staff lines is not 4. See [#1613](https://github.com/gregorio-project/gregorio/issues/1613) and [#1614](https://github.com/gregorio-project/gregorio/issues/1614).
- Fixed a bug where the above-lines text (`<alt>`) could collid with a note above the staff. See [#1613](https://github.com/gregorio-project/gregorio/issues/1613).
- Fixed a bug where the above-lines text (`<alt>`) could collide with a note above the staff. See [#1613](https://github.com/gregorio-project/gregorio/issues/1613).
- Fixed a bug that could cause the clef and staff to be printed too high. See [#1503](https://github.com/gregorio-project/gregorio/issues/1503).

### Changed
- Modified gregorio to append to the log file specified as an argument and to send early messages to it. See [#1541](https://github.com/gregorio-project/gregorio/issues/1541).
- Modified gregorio to write to the log file specified as an argument and to send all messages to it (except errors about opening the log file itself). See [#1541](https://github.com/gregorio-project/gregorio/issues/1541) and [#1628](https://github.com/gregorio-project/gregorio/issues/1628).
- Defined an output directory for gtex and glog files. Default is `tmp-gre`. This can be changed using `\gresetoutputdir{...}`. Fixes [#1393](https://github.com/gregorio-project/gregorio/issues/1393), [#1542](https://github.com/gregorio-project/gregorio/issues/1542), and [#1571](https://github.com/gregorio-project/gregorio/issues/1571).
- GregorioTeX no longer searches for and reuses existing gtex files using kpathsea; it only looks in the output directory.
- If gtex or glog files from other versions of gregorio are found either in the same directory as the gabc file or in the output directory, they are deleted.
- gabc.vim has been expanded into a proper vim plugin.

### Added
Expand Down
10 changes: 9 additions & 1 deletion src/gregorio-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,20 @@ int main(int argc, char **argv)
if (error_file_name) {
gregorio_check_file_access(write, error_file_name, ERROR,
gregorio_exit(1));
error_file = freopen(error_file_name, "a", stderr);
/* First test if we can open error_file_name for writing, so
that if there is an error, we can still write the message
to stderr. */
error_file = fopen(error_file_name, "w");
if (!error_file) {
fprintf(stderr, "error: can't open file %s for writing\n",
error_file_name);
gregorio_exit(1);
}
fclose(error_file);
error_file = freopen(error_file_name, "w", stderr);
if (!error_file) {
gregorio_exit(1);
}
}

optind = 1;
Expand Down
Loading

0 comments on commit 7b3b1c1

Please sign in to comment.