text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_prefix|>/* * $Id: linkhash.h,v 1.6 2006/01/30 23:07:57 mclark Exp $ * * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. * Michael Clark <michael@metaparadigm.com> * Copyright (c) 2009 Hewlett-Packard Development Company, L.P. * * This library is free software; you can redistribute it and/or modify * it un...
fim
winsiderss/systeminformer
c
<|fim_suffix|>to provide our own isinf */ #define isinf(x) ((x) < -DBL_MAX || (x) > DBL_MAX) #endif #endif #ifndef HAVE_DECL_INFINITY #include <float.h> #define INFINITY (DBL_MAX + DBL_MAX) #define HAVE_DECL_INFINITY #endif #ifndef HAVE_DECL_NAN #define NAN (INFINITY - INFINITY) #define HAVE_DECL_NAN #endif #endif <...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/* * $Id: printbuf.c,v 1.5 2006/01/26 02:16:28 mclark Exp $ * * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. * Michael Clark <michael@metaparadigm.com> * * This library is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See COPYING for details. * *...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/* * $Id: printbuf.h,v 1.4 2006/01/26 02:16:28 mclark Exp $ * * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. * Michael Clark <michael@metaparadigm.com> * * This library is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See COPYING for details. * *...
fim
winsiderss/systeminformer
c
<|fim_suffix|>{ // BOOL ret = CryptGenRandom(hProvider, sizeof(*seed), (BYTE *)seed); // CryptReleaseContext(hProvider, 0); // if (!ret) // { // fprintf(stderr, "error CryptGenRandom 0x%08lx", GetLastError()); // return -1; // } // } // // return 0; //} // ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>son_c_get_random_seed(void); #ifdef __cplusplus } #endif #endif <|fim_prefix|>/* * random_seed.h * * Copyright (c) 2013 Metaparadigm Pte. Ltd. * Michael Clark <michael@metaparadigm.com> * * This library is free software; you can redistribute it and/or modify * it under the terms o<|fim_middle|>f ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>= json_c_vsnprintf(str, size, format, ap); va_end(ap); return ret; } #define snprintf json_c_snprintf #elif !defined(HAVE_SNPRINTF) /* !HAVE_SNPRINTF */ #error snprintf is required but was not found #endif /* !HAVE_SNPRINTF */ #endif /* __snprintf_compat_h */ <|fim_prefix|>#ifndef __snprintf_com...
fim
winsiderss/systeminformer
c
<|fim_suffix|>f <|fim_prefix|>#ifndef __strdup_compat_h #define __strdup_compat_h /** * @file * @brief Do not use, json-c internal, may be changed or removed at any time. */ #if <|fim_middle|>!defined(HAVE_STRDUP) && defined(_MSC_VER) /* MSC has the version as _strdup */ #define strdup _strdup #elif !defined(HAVE_...
fim
winsiderss/systeminformer
c
<|fim_prefix|>#define STRERROR_OVERRIDE_IMPL 1 #include "strerror_override.h" /* * Override strerror() to get consistent output across platforms. */ static struct { int errno_value; const char *errno_str; } errno_list[] = { /* clang-format off */ #define STRINGIFY(x) #x #define ENTRY(x) {x, &STRINGIFY(undef...
fim
winsiderss/systeminformer
c
<|fim_suffix|>on_c_strerror(int errno_in); #ifndef STRERROR_OVERRIDE_IMPL #define strerror _json_c_strerror #endif #ifdef __cplusplus } #endif #endif /* _json_strerror_override_h_ */ <|fim_prefix|>#ifndef _json_strerror_override_h_ #define _json_strerror_override_h_ /** * @file * @brief Do not use, json-c interna...
fim
winsiderss/systeminformer
c
#ifndef __vasprintf_compat_h #define __vasprintf_compat_h /** * @file * @brief Do not use, json-c internal, may be changed or removed at any time. */ #include "snprintf_compat.h" #ifndef _WIN32 #include <stdarg.h> #endif /* !defined(_WIN32) */ #include <stdint.h> #include <stdlib.h> #if !defined(HAVE_VASPRINTF) ...
fim
winsiderss/systeminformer
c
#ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200809L #endif #include "data-pool.h" #include "maxminddb.h" #include <stdbool.h> #include <stddef.h> #include <stdlib.h> // Allocate an MMDB_data_pool_s. It initially has space for size // MMDB_entry_data_list_s structs. MMDB_data_pool_s *data_pool_new(size_t cons...
fim
winsiderss/systeminformer
c
<|fim_prefix|>#ifndef DATA_POOL_H #define DATA_POOL_H #include "maxminddb.h" #include <stdbool.h> #include <stddef.h> // This should be large enough that we never need to grow the array of pointers // to blocks. 32 is enough. Even starting out of with size 1 (1 struct), the // 32nd element alone will provide 2**32 s...
fim
winsiderss/systeminformer
c
#include <stdlib.h> #include <string.h> /* *INDENT-OFF* */ /* The memmem, strdup, and strndup functions were all copied from the * FreeBSD source, along with the relevant copyright notice. * * It'd be nicer to simply use the functions available on the system if they * exist, but there doesn't seem to be a good wa...
fim
winsiderss/systeminformer
c
#ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200809L #endif //#if HAVE_CONFIG_H //#include <config.h> //#endif #include "data-pool.h" #include "maxminddb-compat-util.h" #include "maxminddb.h" #include <errno.h> #include <fcntl.h> #include <inttypes.h> #include <limits.h> #include <stdint.h> #include <stdlib.h> ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>se(MMDB_s *const mmdb); //extern const char *MMDB_lib_version(void); extern int MMDB_dump_entry_data_list(FILE *const stream, MMDB_entry_data_list_s *const entry_data_list, int indent); extern const char *MMDB_strerror(int error_code); #endif /* MAXMIND...
fim
winsiderss/systeminformer
c
#ifndef MAXMINDDB_CONFIG_H #define MAXMINDDB_CONFIG_H #ifndef MMDB_UINT128_USING_MODE /* Define as 1 if we use unsigned int __atribute__ ((__mode__(TI))) for uint128 values */ #define MMDB_UINT128_USING_MODE 0 #endif #ifndef MMDB_UINT128_IS_BYTE_ARRAY /* Define as 1 if we don't have an unsigned __int128 type */ #defi...
fim
winsiderss/systeminformer
c
<|fim_suffix|> Length -= 64; } /* Handle any remaining bytes of data. */ memcpy(Context->in, Input, Length); } /* * Final wrapup - pad to 64-byte boundary with the bit pattern * 1 0* (64-bit count of bits processed, MSB-first) */ VOID MD5Final( _Inout_ MD5_CTX *Context ) { unsigned int c...
fim
winsiderss/systeminformer
c
<|fim_prefix|>#ifndef _<|fim_suffix|> buf[4]; UCHAR in[64]; UCHAR digest[16]; } MD5_CTX; VOID MD5Init( _Out_ MD5_CTX *Context ); VOID MD5Update( _Inout_ MD5_CTX *Context, _In_reads_bytes_(Length) UCHAR *Input, _In_ ULONG Length ); VOID MD5Final( _Inout_ MD5_CTX *Context ); #e...
fim
winsiderss/systeminformer
c
<|fim_suffix|>r output buffers are empty. (Fill up the input buffer or free up some output space and try again.) */ MINIZ_EXPORT int mz_deflate(mz_streamp pStream, int flush); /* mz_deflateEnd() deinitializes a compressor: */ /* Return values: */ /* MZ_OK on success. */ /* MZ_STREAM_ERROR if the ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>soft names. // # define close _close # define open _open # define read _read # define snprintf _snprintf # define strdup _strdup # define vsnprintf _vsnprintf # define write _write // // Version number // # define MXML_VERSION "Mini-XML v4.0.4" // // Inline function support // ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>// // Attribute support code for Mini-XML, a small XML file parsing library. // // https://www.msweet.org/mxml // // Copyright © 2003-2024 by Michael R Sweet. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // #include "mxml-private.h" // // Local functions......
fim
winsiderss/systeminformer
c
// // File loading code for Mini-XML, a small XML file parsing library. // // https://www.msweet.org/mxml // // Copyright © 2003-2024 by Michael R Sweet. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // #ifndef _WIN32 # include <unistd.h> #endif // !_WIN32 #include "mxml-p...
fim
winsiderss/systeminformer
c
<|fim_prefix|>// // Node get functions for Mini-XML, a small XML file parsing library. // // https://www.msweet.org/mxml // // Copyright © 2014-2024 by Michael R Sweet. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // #include "mxml-private.h" // // 'mxmlGetCDATA()' - Get...
fim
winsiderss/systeminformer
c
<|fim_prefix|>// // Index support code for Mini-XML, a small XML file parsing library. // // https://www.msweet.org/mxml // // Copyright © 2003-2024 by Michael R Sweet. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // #include "mxml-private.h" // // Local functions... // ...
fim
winsiderss/systeminformer
c
<|fim_suffix|> return ((int)node->ref_count); else return (INT_MAX); } else { return (-1); } } // // 'mxml_free()' - Free the memory used by a node. // // Note: Does not free child nodes, does not remove from parent. // static void mxml_free(mxml_node_t *node) // I - Node { size_t i; ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>// // Options functions for Mini-XML, a small XML file parsing library. // // https://www.msweet.org/mxml // // Copyright © 2003-2025 by Michael R Sweet. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // #include "mxml-private.h" // // 'mxmlOptionsDelete()' -...
fim
winsiderss/systeminformer
c
<|fim_suffix|>bal->strcopy_cb) return ((global->strcopy_cb)(global->str_cbdata, s)); else return (strdup(s)); } // // '_mxml_strfree()' - Free a string. // void _mxml_strfree(char *s) // I - String { _mxml_global_t *global = _mxml_global(); // Global data if (!s) return; if (global->str...
fim
winsiderss/systeminformer
c
<|fim_suffix|>rn int _mxml_entity_value(mxml_options_t *options, const char *name); extern void _mxml_error(mxml_options_t *options, const char *format, ...) MXML_FORMAT(2,3); extern char *_mxml_strcopy(const char *s); extern void _mxml_strfree(char *s); #endif // !MXML_PRIVATE_H <|fim_prefix|>// // Private defini...
fim
winsiderss/systeminformer
c
<|fim_prefix|>// // Search/navigation functions for Mini-XML, a small XML file parsing library. // // https://www.msweet.org/mxml // // Copyright © 2003-2024 by Michael R Sweet. // // Licensed under Apache License v2.0. See the file "LICENSE" for more // information. // #include "mxml-private.h" // // 'mxmlFindElem...
fim
winsiderss/systeminformer
c
<|fim_suffix|>); if ((s = _mxml_strcopy(buffer)) == NULL) return (false); _mxml_strfree(node->value.text.string); node->value.text.whitespace = whitespace; node->value.text.string = s; return (true); } // // 'mxmlSetUserData()' - Set the user data pointer for a node. // bool // O - `true` o...
fim
winsiderss/systeminformer
c
<|fim_suffix|>L_FORMAT(2,3); extern bool mxmlSetReal(mxml_node_t *node, double real); extern void mxmlSetStringCallbacks(mxml_strcopy_cb_t strcopy_cb, mxml_strfree_cb_t strfree_cb, void *str_cbdata); extern bool mxmlSetText(mxml_node_t *node, bool whitespace, const char *string); extern bool mxmlSetTextf(mxml_node_...
fim
winsiderss/systeminformer
c
<|fim_suffix|>ER_BACKSLASH_C locks out the use of \C in all patterns. */ /* #undef NEVER_BACKSLASH_C */ /* The value of NEWLINE_DEFAULT determines the default newline character sequence. PCRE2 client programs can override this by selecting other values at run time. The valid values are 1 (CR), 2 (LF), 3 (CRLF), ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* This is the public header file for the PCRE library, second API, to be #included by applications that call PCRE2 functions. Copyright (c)...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>e2_chartables.c */ <|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* This file was automatically written by the pcre2_dftables auxiliary program. It contains character tables that are u...
fim
winsiderss/systeminformer
c
<|fim_suffix|>n source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reprod...
fim
winsiderss/systeminformer
c
<|fim_suffix|>o for the highest character value. */ #if PCRE2_CODE_UNIT_WIDTH == 8 #define MAX_UCHAR_VALUE 0xffu #elif PCRE2_CODE_UNIT_WIDTH == 16 #define MAX_UCHAR_VALUE 0xffffu #else #define MAX_UCHAR_VALUE 0xffffffffu #endif #define GET_MAX_CHAR_VALUE(utf) \ ((utf) ? MAX_UTF_CODE_POINT : MAX_UCHAR_VALUE) /* Mac...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_suffix|> int (*substitute_callout)(pcre2_substitute_callout_block *, void *), void *substitute_callout_data) { mcontext->substitute_callout = substitute_callout; mcontext->substitute_callout_data = substitute_callout_data; return 0; } PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION pcre2_set_substitute_case_callout(p...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>i = 1; i < argc; i++) { char *arg = argv[i]; if (*arg != '-') break; if (strcmp(arg, "-help") == 0 || strcmp(arg, "--help") == 0) { usage(); return 0; } else if (strcmp(arg, "-L") == 0) { if (setlocale(LC_ALL, "") == NULL) { (void)fprintf(stderr, "pcre2_dfta...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>T: case OP_NOTI: case OP_EXACT: case OP_EXACTI: case OP_NOTEXACT: case OP_NOTEXACTI: case OP_UPTO: case OP_UPTOI: case OP_NOTUPTO: case OP_NOTUPTOI: case OP_MINUPTO: case OP_MINUPTOI: case OP_NOTMINUPTO: case OP_NOTMINUPTOI: ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>asting too much searching large pattern trees. Almost all matches are going to fail. */ if (match_data == NULL) { match_data = pcre2_match_data_create(32, NULL); #ifdef SUPPORT_JIT match_data_jit = pcre2_match_data_create(32, NULL); if (match_data == NULL || match_data_jit...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>ruction[2] = (sljit_u16)((VECTOR_ELEMENT_SIZE << 12) | (0x8 << 8) | 0x45); sljit_emit_op_custom(compiler, instruction, 6); if (char1 != char2) { /* VREPI */ instruction[0] = (sljit_u16)(0xe700 | (cmp2_ind << 4)); instruction[1] = (sljit_u16)(bit != 0 ? bit : char2); /* instruction[2] = (sljit_u...
fim
winsiderss/systeminformer
c
/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>E) + 1; rc = callback(&cb, callout_data); if (rc != 0) return rc; cc += GET(cc, 1 + 2*LINK_SIZE); break; default: cc += PRIV(OP_lengths)[*cc]; break; } } } /* End of pcre2_pattern_info.c */ <|fim_prefix|>/************************************************* * Perl-Com...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>quire_digitset == 0) require_digitset = digitset; else if (digitset != require_digitset) return FALSE; } /* End digit handling */ /* If we haven't yet got to the end, pick up the next character. */ if (ptr >= endptr) return TRUE; GETCHARINCTEST(c, ptr); } /* End checking loop */ #e...
fim
winsiderss/systeminformer
c
<|fim_suffix|>r_of_codes <= 0) return PCRE2_ERROR_BADSERIALIZEDDATA; if (data->magic != SERIALIZED_DATA_MAGIC) return PCRE2_ERROR_BADMAGIC; if (data->version != SERIALIZED_DATA_VERSION) return PCRE2_ERROR_BADMODE; if (data->config != SERIALIZED_DATA_CONFIG) return PCRE2_ERROR_BADMODE; if (number_of_codes > data->numbe...
fim
winsiderss/systeminformer
c
<|fim_suffix|>******************* * Find the length of a PCRE2 string * *************************************************/ /* Argument: the string Returns: the length */ PCRE2_SIZE PRIV(strlen)(PCRE2_SPTR str) { PCRE2_SIZE c = 0; while (*str++ != 0) c++; return c; } /****************************...
fim
winsiderss/systeminformer
c
/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>nd we have advanced into the middle of it, advance one more code point. In other words, do not start in the middle of CRLF, even if CR and LF on their own are valid newlines. */ save_start = start_offset++; if (subject[start_offset-1] == CHAR_CR && (code->newline_convention ==...
fim
winsiderss/systeminformer
c
/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_suffix|> This table encodes "join RI characters"; the code has to deal with checking for previous adjoining RIs. 9. Otherwise, break everywhere. */ #define ESZ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbZWJ) const uint32_t PRIV(ucp_gbtable)[] = { (1u<<ucp_gbLF), ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE2 is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support re<|fim_suffix|> && d > 0x8f)) { *erroroffset = (PCRE2_SIZE)(p - string) - 3; return PCRE...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. ...
fim
winsiderss/systeminformer
c
<|fim_suffix|>PCRE2_SIZE erroffset; PCRE2_SIZE patlen; int errorcode; int options = 0; int re_nsub = 0; patlen = ((cflags & REG_PEND) != 0)? (PCRE2_SIZE)(preg->re_endp - pattern) : PCRE2_ZERO_TERMINATED; if ((cflags & REG_ICASE) != 0) options |= PCRE2_CASELESS; if ((cflags & REG_NEWLINE) != 0) options |= PCRE2_...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/************************************************* * Perl-Compatible Regular Expressions * *************************************************/ /* PCRE2 is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language. T...
fim
winsiderss/systeminformer
c
/* * Copyright 2004 Filip Navara * Based on public domain SHA code by Steve Reid <steve@edmweb.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the Li...
fim
winsiderss/systeminformer
c
<|fim_prefix|>#ifndef _SHA_H #define _SHA_H typedef struct { ULONG flag; UCHAR hash[20]; ULONG state[5]; ULONG count[2]; UCHAR buffer[64]; } A_SHA_CTX; VOID A_SHAInit( _<|fim_suffix|>if <|fim_middle|>Out_ A_SHA_CTX *Context ); VOID A_SHAUpdate( _Inout_ A_SHA_CTX *Context, _In_read...
fim
winsiderss/systeminformer
c
<|fim_suffix|> 0xD807AA98 ); P( H, A, B, C, D, E, F, G, W[ 9], 0x12835B01 ); P( G, H, A, B, C, D, E, F, W[10], 0x243185BE ); P( F, G, H, A, B, C, D, E, W[11], 0x550C7DC3 ); P( E, F, G, H, A, B, C, D, W[12], 0x72BE5D74 ); P( D, E, F, G, H, A, B, C, W[13], 0x80DEB1FE ); P( C, D, E, F, G, H, A, B, ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>#ifndef _SHA256_H #define _SHA256_H #ifndef uint8 #define uint8 unsigned char #endif #ifndef uint32 #define uint32 unsigned l<|fim_suffix|> void sha256_update( sha256_context *ctx, const uint8 *input, uint32 length ); void sha256_finish( sha256_context *ctx, uint8 digest[32] ); #endif /* sha256.h */ <...
fim
winsiderss/systeminformer
c
<|fim_suffix|> *result != result[-1] || *result != result[-2] || *result != result[-3]) { ++result; --remain; } } assert(remain > 0); *result++ = ':'; --remain; if (bi < self->bhend - 1) { ++bi; i = (int)self->bh[bi]...
fim
winsiderss/systeminformer
c
<|fim_suffix|> Returns zero on success, non-zero on error */ extern NTSTATUS fuzzy_hash_file(_In_ HANDLE FileHandle, _Out_ char** HashResult); /** * @brief Compute the fuzzy hash of a stream using an open handle * * Computes the fuzzy hash of the contents of the open stream, starting at the * current file positio...
fim
winsiderss/systeminformer
c
<|fim_suffix|> the Apache License, Version 2.0, ==\n"); // printf(" == in this case for the Trend Locality Sensitive Hash distribution. ==\n"); // printf(" =========================================================================\n"); // printf("\n"); // printf(" Trend Locality Sensitive Hash (TLSH)\n...
fim
winsiderss/systeminformer
cpp
<|fim_suffix|>vers=0) const; /* to bring to object back to the initial state */ void reset(); // access functions int Lvalue(); int Q1ratio(); int Q2ratio(); int Checksum(int k); int BucketValue(int bucket); int HistogramCount(int bucket); /* calculate difference */ ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/* * TLSH is provided for use under two licenses: Apache OR BSD. * Users may opt to use either license depending on the license * restictions of the systems with which they plan to integrate * the TLSH code. */ /* ============== * Apache License * ============== * Copyright 2013 Trend Micro Inco...
fim
winsiderss/systeminformer
cpp
<|fim_prefix|>/* * TLSH is provided for use under two licenses: Apache OR BSD. * Users may opt to use either license depending on the license * restictions of the systems with which they plan to integrate * the TLSH code. */ /* ============== * Apache License * ============== * Copyright 2013 Trend Micro Inco...
fim
winsiderss/systeminformer
c
<|fim_suffix|>R CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETH...
fim
winsiderss/systeminformer
c
<|fim_suffix|>HECKSUM_LEN 1 #define EFF_BUCKETS 128 #define CODE_SIZE 32 #define MIN_DATA_LENGTH 50 #define MIN_CONSERVATIVE_DATA_LENGTH 256 #define TLSH_STRING_LEN_REQ 72 #define INTERNAL_TLSH_STRING_LEN 70 <|fim_prefix|>/**************************************************** * The fil<|fim_middle|>e "version.h" is ...
fim
winsiderss/systeminformer
c
<|fim_suffix|> nullptr, nullptr, nullptr, &isb, buffer, sizeof(buffer), nullptr, nullptr ); if (!NT_SUCCESS(status)) break; tlshHash->update(buffer, static_cast<UINT32>(isb.Information)); ...
fim
winsiderss/systeminformer
cpp
<|fim_suffix|>FileHash( _In_ HANDLE FileHandle, _Out_ char** HashResult ); EXTERN_C_END <|fim_prefix|>/* * Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved. * * This file is part of System Informer. * * Authors: * * dmex 2021 * */ #pragma once EXTERN_C_START EX...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/* * Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved. * * This file is part of System Informer. * * Authors: * * dmex 2023 * */ #ifndef __dia3_h__ #define __dia3_h__ // 5e1d8e93-ef43-415b-93a7-fec353c296bd static IID IID_IDiaSession2 = { 0x5e1d8e93, 0xef43, 0x...
fim
winsiderss/systeminformer
c
<|fim_suffix|>NER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, ...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/* * Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved. * * This file is part of System Informer. * * Authors: * * dmex 2024 * */ #include <ph.h> #include "xxhashwrapper.h" #define XXH_STATIC_LINKING_ONLY #define XXH_IMPLEMENTATION #if defined(__AVX512F__) #def...
fim
winsiderss/systeminformer
c
<|fim_prefix|>/* * Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved. * * This file is part of System Informer. * * Authors: * * dmex 2024 * */ #pragma once EXTERN_C_START EXTERN_C ULONG PhHashXXH32ToInteger( _In_ ULONG Hash ); EXTERN_C ULONGLONG PhHashXXH64ToIntege...
fim
winsiderss/systeminformer
c
<|fim_prefix|>const core = require('@actions/core'); const github = require('@actions/github'); async function run() { try { const owner = 'winsw'; const re<|fim_suffix|>issue of issuesToUpdate.data) { await octokit.issues.update({ owner: owner, repo: rep...
fim
winsw/winsw
javascript
<|fim_prefix|>using System.Reflection; using System.Runtime.CompilerServices; [assembly: AssemblyMetadata("IsT<|fim_suffix|>immable", "True")] [assembly: InternalsVisibleTo("WinSW.Tests")] <|fim_middle|>r<|endoftext|>
fim
winsw/winsw
csharp
<|fim_prefix|>using System; using System.CommandLine; using System.CommandLine.Invocation; namespace WinSW { internal static class CommandExtensions { internal static void SetHandler<T>(this Command command, Action<T, InvocationContext> handle, Argument<T> symbol) { command.SetHand...
fim
winsw/winsw
csharp
<|fim_suffix|>g("Application", ".", "Windows Service Wrapper"); backupLog.WriteEntry(loggingEvent.RenderedMessage, ToEventLogEntryType(loggingEvent.Level)); } catch { } } private static EventLogEntryType ToEventLogEntryType(Level level) ...
fim
winsw/winsw
csharp
<|fim_prefix|>using System; using log4net.Appender; using log4net.Core; namespace WinSW.Logging { internal sealed class WinSWConsoleAppender : AppenderSkeleton { protected override void Append(LoggingEvent loggingEvent) { Console.ResetColor(); var level = loggingEvent....
fim
winsw/winsw
csharp
using System; using System.Collections.Generic; using System.CommandLine; using System.CommandLine.Builder; using System.CommandLine.Invocation; using System.CommandLine.Parsing; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.IO.Pipes; using System.Linq; using System.Reflection; u...
fim
winsw/winsw
csharp
<|fim_prefix|>using Syst<|fim_suffix|>{ internal static class ServiceControllerExtension { /// <exception cref="OperationCanceledException" /> /// <exception cref="TimeoutException" /> internal static void WaitForStatus(this ServiceController serviceController, ServiceControllerStatus d...
fim
winsw/winsw
csharp
<|fim_suffix|>isibleTo("WinSW.Tests")] <|fim_prefix|>using System.Reflection; using System.Runtime.C<|fim_middle|>ompilerServices; [assembly: AssemblyMetadata("IsTrimmable", "True")] [assembly: InternalsVisibleTo("WinSW")] [assembly: InternalsV<|endoftext|>
fim
winsw/winsw
csharp
<|fim_prefix|>using System; namespace WinSW { internal sealed class CommandException : Exception { internal CommandExceptio<|fim_suffix|>ion(string message) : base(message) { } internal CommandException(string message, Exception inner) : base(message, i...
fim
winsw/winsw
csharp