<commit_before>#
#
#            Nim's Runtime Library
#        (c) Copyright 2013 <NAME>
#
#    See the file "copying.txt", included in this
#    distribution, for details about the copyright.
#

# This include file contains headers of Ansi C procs
# and definitions of Ansi C types in Nim syntax
# All symbols are prefixed with 'c_' to avoid ambiguities

{.push hints:off}

proc c_memchr(s: pointer, c: cint, n: csize): pointer {.
  importc: "memchr", header: "<string.h>".}
proc c_memcmp(a, b: pointer, size: csize): cint {.
  importc: "memcmp", header: "<string.h>", noSideEffect.}
proc c_memcpy(a, b: pointer, size: csize): pointer {.
  importc: "memcpy", header: "<string.h>", discardable.}
proc c_memmove(a, b: pointer, size: csize): pointer {.
  importc: "memmove", header: "<string.h>",discardable.}
proc c_memset(p: pointer, value: cint, size: csize): pointer {.
  importc: "memset", header: "<string.h>", discardable.}
proc c_strcmp(a, b: cstring): cint {.
  importc: "strcmp", header: "<string.h>", noSideEffect.}

type
  C_JmpBuf {.importc: "jmp_buf", header: "<setjmp.h>".} = object

when defined(windows):
  const
    SIGABRT = cint(22)
    SIGFPE = cint(8)
    SIGILL = cint(4)
    SIGINT = cint(2)
    SIGSEGV = cint(11)
    SIGTERM = cint(15)
elif defined(macosx) or defined(linux):
  const
    SIGABRT = cint(6)
    SIGFPE = cint(8)
    SIGILL = cint(4)
    SIGINT = cint(2)
    SIGSEGV = cint(11)
    SIGTERM = cint(15)
    SIGPIPE = cint(13)
else:
  when NoFakeVars:
    {.error: "SIGABRT not ported to your platform".}
  else:
    var
      SIGINT {.importc: "SIGINT", nodecl.}: cint
      SIGSEGV {.importc: "SIGSEGV", nodecl.}: cint
      SIGABRT {.importc: "SIGABRT", nodecl.}: cint
      SIGFPE {.importc: "SIGFPE", nodecl.}: cint
      SIGILL {.importc: "SIGILL", nodecl.}: cint
    when defined(macosx) or defined(linux):
      var SIGPIPE {.importc: "SIGPIPE", nodecl.}: cint

when defined(macosx):
  const SIGBUS = cint(10)
else:
  template SIGBUS: expr = SIGSEGV

when defined(nimSigSetjmp) and not defined(nimStdSetjmp):
  proc c_longjmp(jmpb: C_JmpBuf, retval: cint) {.<commit_msg>Enhance values SIGNALS on more OS. Checked systems OpenBSD, NetBSD, FreeBSD, Solaris.<commit_after>#
#
#            Nim's Runtime Library
#        (c) Copyright 2013 <NAME>
#
#    See the file "copying.txt", included in this
#    distribution, for details about the copyright.
#

# This include file contains headers of Ansi C procs
# and definitions of Ansi C types in Nim syntax
# All symbols are prefixed with 'c_' to avoid ambiguities

{.push hints:off}

proc c_memchr(s: pointer, c: cint, n: csize): pointer {.
  importc: "memchr", header: "<string.h>".}
proc c_memcmp(a, b: pointer, size: csize): cint {.
  importc: "memcmp", header: "<string.h>", noSideEffect.}
proc c_memcpy(a, b: pointer, size: csize): pointer {.
  importc: "memcpy", header: "<string.h>", discardable.}
proc c_memmove(a, b: pointer, size: csize): pointer {.
  importc: "memmove", header: "<string.h>",discardable.}
proc c_memset(p: pointer, value: cint, size: csize): pointer {.
  importc: "memset", header: "<string.h>", discardable.}
proc c_strcmp(a, b: cstring): cint {.
  importc: "strcmp", header: "<string.h>", noSideEffect.}

type
  C_JmpBuf {.importc: "jmp_buf", header: "<setjmp.h>".} = object

when defined(windows):
  const
    SIGABRT = cint(22)
    SIGFPE = cint(8)
    SIGILL = cint(4)
    SIGINT = cint(2)
    SIGSEGV = cint(11)
    SIGTERM = cint(15)
elif defined(macosx) or defined(linux) or defined(freebsd) or
     defined(openbsd) or defined(netbsd) or defined(solaris):
  const
    SIGABRT = cint(6)
    SIGFPE = cint(8)
    SIGILL = cint(4)
    SIGINT = cint(2)
    SIGSEGV = cint(11)
    SIGTERM = cint(15)
    SIGPIPE = cint(13)
else:
  when NoFakeVars:
    {.error: "SIGABRT not ported to your platform".}
  else:
    var
      SIGINT {.importc: "SIGINT", nodecl.}: cint
      SIGSEGV {.importc: "SIGSEGV", nodecl.}: cint
      SIGABRT {.importc: "SIGABRT", nodecl.}: cint
      SIGFPE {.importc: "SIGFPE", nodecl.}: cint
      SIGILL {.importc: "SIGILL", nodecl.}: cint
    when defined(macosx) or defined(linux):
      var SIGPIPE {.importc: "SIGPIPE", nodecl.}: cint

when defined(macosx):
  const SIGBUS = cint(10)
else:
  template SIGBUS: expr = SIGSEGV

when defined(nimSigSetjmp) and not defined(nimStdSetjmp):
  proc c_longjmp(jmpb: C_JmpBuf, retval: cint) {.
{'fraction_non_alphanumeric': 0.14628023733455042, 'fraction_numerical': 0.011410314924691922, 'mean_word_length': 3.647932131495228, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '7620532', 'n_tokens_mistral': 1706, 'n_tokens_neox': 1670, 'n_words': 475}