[GRASS-git] [OSGeo/grass] d2f347: lib: Accept more newline styles in G_getl (#3853)

Vaclav Petras noreply at github.com
Fri Sep 13 10:47:53 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: d2f347782adee4f9a8f7e3a3c1dd48fd65884145
      https://github.com/OSGeo/grass/commit/d2f347782adee4f9a8f7e3a3c1dd48fd65884145
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2024-09-13 (Fri, 13 Sep 2024)

  Changed paths:
    M lib/gis/getl.c
    A lib/gis/testsuite/test_gis_lib_getl.py

  Log Message:
  -----------
  lib: Accept more newline styles in G_getl (#3853)

Use G_getl2 in G_getl to have everywhere the same behavior of supporting all newlines. Originally, G_getl2 was created to keep the behavior of G_getl. However, now, we want G_getl2 behavior everywhere.

Keeping G_getl2 for compatibility. Code can later be clean up to use only G_getl, probably at the time when G_getl2 is removed (v9).

The new test fails without the change in the library for CRLF for G_getl, but passes with the change. CR fails because it is not supported by fgets used since 88090da (#3850), so expecting failure for CR.

Return and argument types for ctypes fopen need to be set for the code to work everywhere reliably.

---------

Co-authored-by: Nicklas Larsson <n_larsson at yahoo.com>



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list