<commit_before>module Proj
  module Api
    #########  Deprecated API from proj_api.h. Don't use these anymore! ##############
    typedef :pointer, :projPJ

    class ProjUVW < FFI::Struct
      layout :u, :double,
             :v, :double,
             :w, :double
    end

    ProjXYZ = ProjUVW
    ProjLPZ = ProjUVW

    attach_function :pj_init, [:int, :pointer], :projPJ
    attach_function :pj_free, [:projPJ], :void
    attach_function :pj_get_errno_ref, [], :pointer
    attach_function :pj_strerrno, [:int], :string

    attach_function :pj_get_def, [:projPJ, :int], :string
    attach_function :pj_is_latlong, [:projPJ], :bool
    attach_function :pj_is_geocent, [:projPJ], :bool

    attach_function :pj_fwd3d, [ProjLPZ.by_value, :projPJ], ProjXYZ.by_value
    attach_function :pj_inv3d, [ProjXYZ.by_value, :projPJ], ProjLPZ.by_value
    attach_function :pj_transform, [:projPJ, :projPJ, :long, :int, :pointer, :pointer, :pointer], :bool
  end
end<commit_msg>Backfill 2 missing functions in proj4.<commit_after>module Proj
  module Api
    #########  Deprecated API from proj_api.h. Don't use these anymore! ##############
    typedef :pointer, :projPJ

    class ProjUVW < FFI::Struct
      layout :u, :double,
             :v, :double,
             :w, :double
    end

    ProjXYZ = ProjUVW
    ProjLPZ = ProjUVW

    attach_function :pj_init, [:int, :pointer], :projPJ
    attach_function :pj_free, [:projPJ], :void
    attach_function :pj_get_errno_ref, [], :pointer
    attach_function :pj_strerrno, [:int], :string

    attach_function :pj_get_def, [:projPJ, :int], :string
    attach_function :pj_is_latlong, [:projPJ], :bool
    attach_function :pj_is_geocent, [:projPJ], :bool

    attach_function :pj_fwd3d, [ProjLPZ.by_value, :projPJ], ProjXYZ.by_value
    attach_function :pj_inv3d, [ProjXYZ.by_value, :projPJ], ProjLPZ.by_value
    attach_function :pj_transform, [:projPJ, :projPJ, :long, :int, :pointer, :pointer, :pointer], :bool

    if PROJ_VERSION < Gem::Version.new('5.0.0')
      def proj_torad(value)
        value * 0.017453292519943296
      end

      def proj_todeg(value)
        value * 57.295779513082321
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.13575701794753797, 'fraction_numerical': 0.020708697653014266, 'mean_word_length': 3.576842105263158, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5747200', 'n_tokens_mistral': 894, 'n_tokens_neox': 834, 'n_words': 180}