��c��RDUCK3 �WL���Aqr�t�)�Y����;hz-�P����Y�� � p���\\\^]"""v%o&o&�*E. 06�9�>@hC�E�F�GII�N�N�Q�SlV�YN[�\K^�_ c�g�g6k�m�m+odp?t�v�x�y�y�{h~h~N����B�ƈ��K��� �J���]�.�7�j���������s� ���گŴ4�4�_������������5���t��� �������J���O����� � �����'�/���q����xx� � ��e���H�j � E&2'�*�*�-�-p2777�9�>C�E`HlJlJ�K�P�S�X\Z_rbrb�be�i�j�k�n�q6u*v�y}}(�o�È<�t�6�6������������"�"���*���7�7�/��������Z��ͷ���ѽ�����A�������[�[�����/�����G�����������T�T�������,�\�x�x�b�����q���Liix�G � � � GGvc  ll8X!X!4#�$Q)�*�,�/�3�7M>M>+C�FmH�I�J�JcL>M>MOOXRSSS�U�U�WBX9\�]�]�^SaSa�b�e�e.iRj�j.m.m.m�p v�y�}�~"���*�z�`�ِ5���\� �#�i�:�����`�� ���L���¾��Y�)�������>�T�������s� �D��������,����'������C�G y y ���J/�k#'�(�+�,;1�2 4 4 4G7G7g:�=�A�DJGJGJG�J�J�J�J�MMP(R�UW�XG\G\G\�\�]�`�a�aSfSfSfk6mpp�s�stv�w�z�}a�������a�=�����}������������������9��C���G���S�n�n������ ����^�^��r�9������@�'���������������+�&�����/* Copyright 2019 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /*! *\brief Process group placeholder. * * Does nothing except sitting around until killed. Spawned as extra process in * our process groups so that we can control on our own when the process group * ID is reclaimed to the kernel, namely by killing the entire process group. * This prevents a race condition of our process group getting reclaimed before * we try to kill possibly remaining processes in it, after which we would * possibly kill something else. * * Must be a separate executable so F_CLOEXEC applies as intended. */ #include int main() { for (;;) { pause(); } return 0; } #ifndef LACO_UTIL_H #define LACO_UTIL_H struct LacoState; struct lua_State; /** * Load a line into the lua stack to be evaluated later * * param pointer to LacoState * * return -1 if there is no line input to load */ int laco_load_line(struct LacoState* laco); /** * Called after laco_load_line, this evaluated the line as a function and * hands of the result for printing * * param pointer to LacoState */ void laco_handle_line(struct LacoState* laco); /** * Kills the loop with exiting message if specified * * param pointer to LacoState * param exit with status * param error message */ void laco_kill(struct LacoState* laco, int status, const char* message); /** * When there is a value on the lua stack, it will print out depending on * the type it is * * param pointer to lua_State * * return LUA_ERRSYNTAX if the value has some error */ int laco_print_type(struct lua_State* L); /** * Prints out and pops off errors pushed into the lua stack * * param pointer to lua_State * param incoming lua stack status */ void laco_report_error(struct lua_State* L, int status); int laco_is_match(const char** matches, const char* test_string); #endif /* LACO_UTIL_H */ #import @interface WildcardPattern : NSObject { NSString* pattern_; } - (id) initWithString: (NSString*) s; - (BOOL) isMatch: (NSString*) s; @end #ifndef LIBTRADING_BYTE_ORDER_H #define LIBTRADING_BYTE_ORDER_H #include "libtrading/types.h" #include static inline be16 cpu_to_be16(u16 value) { return htons(value); } static inline be32 cpu_to_be32(u32 value) { return htonl(value); } static inline u16 be16_to_cpu(be16 value) { return ntohs(value); } static inline u32 be32_to_cpu(be32 value) { return ntohl(value); } #endif #include #include #include #include "greatest.h" TEST standalone_pass(void) { PASS(); } /* Add all the definitions that need to be in the test runner's main file. */ GREATEST_MAIN_DEFS(); int main(int argc, char **argv) { (void)argc; (void)argv; /* Initialize greatest, but don't build the CLI test runner code. */ GREATEST_INIT(); RUN_TEST(standalone_pass); /* Print report, but do not exit. */ printf("\nStandard report, as printed by greatest:\n"); GREATEST_PRINT_REPORT(); struct greatest_report_t report; greatest_get_report(&report); printf("\nCustom report:\n"); printf("pass %u, fail %u, skip %u, assertions %u\n", report.passed, report.failed, report.skipped, report.assertions); if (report.failed > 0) { return 1; } return 0; } #include extern int debug; #ifndef NDEBUG #define DBG(...) dbg(__VA_ARGS__) #define DBGON() (debug = 1) #else #define DBG(...) #define DBGON() #endif #define TINT long long #define TUINT unsigned long long #define TFLOAT double struct items { char **s; unsigned n; }; typedef struct alloc Alloc; extern void die(const char *fmt, ...); extern void dbg(const char *fmt, ...); extern void newitem(struct items *items, char *item); extern void *xmalloc(size_t size); extern void *xcalloc(size_t nmemb, size_t size); extern char *xstrdup(const char *s); extern void *xrealloc(void *buff, register size_t size); extern Alloc *alloc(size_t size, size_t nmemb); extern void dealloc(Alloc *allocp); extern void *new(Alloc *allocp); extern void delete(Alloc *allocp, void *p); extern int casecmp(const char *s1, const char *s2); extern int lpack(unsigned char *dst, char *fmt, ...); extern int lunpack(unsigned char *src, char *fmt, ...); /* * dremf() wrapper for remainderf(). * * Written by J.T. Conklin, * Placed into the Public Domain, 1994. */ #include "math.h" #include "math_private.h" float dremf(x, y) float x, y; { return remainderf(x, y); } #ifndef ELASTIC_H #define ELASTIC_H #include "MaterialModel.h" // Forward declarations class ElasticityTensor; class Elastic; template<> InputParameters validParams(); class Elastic : public MaterialModel { public: Elastic( const std::string & name, InputParameters parameters ); virtual ~Elastic(); protected: /// Compute the stress (sigma += deltaSigma) virtual void computeStress(); }; #endif #pragma once // This guarantees that the code is included only once in the game. #include "SFML/Window.hpp" #include "SFML/Graphics.hpp" class Game { public: // Objects declared static are allocated storage in static storage area, and have scope till the end of the program. static void Start(); private: static bool IsExiting(); static void GameLoop(); enum GameState { Uninitialized, ShowingSplash, Paused, ShowingMenu, Playing, Exiting }; // Represents the various states the game can be in. An enum is a user-defined type consisting of a set of named constants called enumerators. static GameState _gameState; static sf::RenderWindow _mainWindow; }; /* * Copyright (C) 2014-2015 Pavel Dolgov * * See the LICENSE file for terms of use. */ #include #define TOWER1 1 #define TOWER2 3 void hanoi(int a, int n1, int n2) { if (a == 1) { // end of recursion printf("%d %d %d\n", a, n1, n2); } else { int x, na; for (x = TOWER1; x <= TOWER2; x++) { if ((x != n1) && (x != n2)) { na = x; break; } } hanoi(a - 1, n1, na); // recursion printf("%d %d %d\n", a, n1, n2); hanoi(a - 1, na, n2); // recursion } } int main() { int n; scanf("%d", &n); hanoi(n, TOWER1, TOWER2); } /* Entry point for the Windows NT DLL. About the only reason for having this, is so initall() can automatically be called, removing that burden (and possible source of frustration if forgotten) from the programmer. */ #include "windows.h" /* NT and Python share these */ #undef INCREF #undef DECREF #include "config.h" #include "allobjects.h" HMODULE PyWin_DLLhModule = NULL; BOOL WINAPI DllMain (HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: PyWin_DLLhModule = hInst; initall(); break; case DLL_PROCESS_DETACH: break; } return TRUE; } #ifndef REFLECTIONCOEFFICIENT_H #define REFLECTIONCOEFFICIENT_H #include "SidePostprocessor.h" #include "MooseVariableInterface.h" class ReflectionCoefficient; template <> InputParameters validParams(); class ReflectionCoefficient : public SidePostprocessor, public MooseVariableInterface { public: ReflectionCoefficient(const InputParameters & parameters); virtual void initialize() override; virtual void execute() override; virtual PostprocessorValue getValue() override; virtual void threadJoin(const UserObject & y) override; protected: virtual Real computeReflection(); const VariableValue & _u; unsigned int _qp; private: const VariableValue & _coupled_imag; Real _theta; Real _length; Real _k; Real _coeff; Real _reflection_coefficient; }; #endif // REFLECTIONCOEFFICIENT_H // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_DESKTOP_NOTIFICATION_HANDLER_H_ #define CHROME_BROWSER_DESKTOP_NOTIFICATION_HANDLER_H_ #pragma once #include "content/browser/renderer_host/render_view_host_observer.h" class GURL; struct DesktopNotificationHostMsg_Show_Params; // Per-tab Desktop notification handler. Handles desktop notification IPCs // coming in from the renderer. class DesktopNotificationHandler : public RenderViewHostObserver { public: explicit DesktopNotificationHandler(RenderViewHost* render_view_host); virtual ~DesktopNotificationHandler(); private: // RenderViewHostObserver implementation. virtual bool OnMessageReceived(const IPC::Message& message); // IPC handlers. void OnShow(const DesktopNotificationHostMsg_Show_Params& params); void OnCancel(int notification_id); void OnRequestPermission(const GURL& origin, int callback_id); private: DISALLOW_COPY_AND_ASSIGN(DesktopNotificationHandler); }; #endif // CHROME_BROWSER_DESKTOP_NOTIFICATION_HANDLER_H_ #include "bmmap.h" #include "vty.h" void bmmap_init() { } void bmmap_print() { vty_puts("BIOS memory map:\n"); vty_printf("%d entries at %p\n", *bios_memmap_entries_ptr, bios_memmap_ptr); vty_printf("ADDR LOW ADDR HI LEN LOW LEN HI TYPE RESERVED\n"); for(int i = 0; i < *bios_memmap_entries_ptr; i++) { BmmapEntry * entry = &(*bios_memmap_ptr)[i]; vty_printf("%08x %08x %08x %08x %08x %08x\n", entry->base_addr_low, entry->base_addr_high, entry->length_low, entry->length_high, entry->type, entry->reserved); } } // The Mordax Microkernel // (c) Kristian Klomsten Skordal 2013 // Report bugs and issues on #ifndef MORDAX_TYPES_H #define MORDAX_TYPES_H #include /** Object size type. */ typedef uint32_t size_t; /** Physical pointer type. */ typedef void * physical_ptr; /** 64-bit generic big endian type. */ typedef uint64_t be64; /** 32-bit generic big endian type. */ typedef uint32_t be32; /** 64-bit generic little endian type. */ typedef uint64_t le64; /** 32-bit generic little endian type. */ typedef uint32_t le32; #endif // RUN: %clang_cc1 %s -verify -fasm-blocks #define M __asm int 0x2c #define M2 int void t1(void) { M } void t2(void) { __asm int 0x2c } void t3(void) { __asm M2 0x2c } void t4(void) { __asm mov eax, fs:[0x10] } void t5() { __asm { int 0x2c ; } asm comments are fun! }{ } __asm {} } int t6() { __asm int 3 ; } comments for single-line asm __asm {} __asm int 4 return 10; } void t7() { __asm { push ebx mov ebx, 0x07 pop ebx } } void t8() { __asm nop __asm nop __asm nop } void t9() { __asm nop __asm nop ; __asm nop } int t_fail() { // expected-note {{to match this}} __asm __asm { // expected-error 3 {{expected}} expected-note {{to match this}} #ifndef _PURCHASEEVENT_H_ #define _PURCHASEEVENT_H_ #include class PurchaseEvent : public Event { public: enum Type { PURCHASE_STATUS }; PurchaseEvent(double _timestamp, int _productId, Type _type, bool _newPurchase) : Event(_timestamp), type(_type), newPurchase(_newPurchase), productId(_productId) { } Event * dup() const override { return new PurchaseEvent(*this); } void dispatch(EventHandler & element) override; bool isBroadcast() const override { return true; } Type getType() { return type; } bool isNew() { return newPurchase; } int getProductId() { return productId; } private: Type type; bool newPurchase; int productId; }; #endif /* * LSAPIC Interrupt Controller * * This takes care of interrupts that are generated by the CPU's * internal Streamlined Advanced Programmable Interrupt Controller * (LSAPIC), such as the ITC and IPI interrupts. * * Copyright (C) 1999 VA Linux Systems * Copyright (C) 1999 Walt Drummond * Copyright (C) 2000 Hewlett-Packard Co * Copyright (C) 2000 David Mosberger-Tang */ #include #include static unsigned int lsapic_noop_startup (unsigned int irq) { return 0; } static void lsapic_noop (unsigned int irq) { /* nothing to do... */ } static int lsapic_retrigger(unsigned int irq) { ia64_resend_irq(irq); return 1; } struct irq_chip irq_type_ia64_lsapic = { .name = "LSAPIC", .startup = lsapic_noop_startup, .shutdown = lsapic_noop, .enable = lsapic_noop, .disable = lsapic_noop, .ack = lsapic_noop, .retrigger = lsapic_retrigger, }; #include unsigned int x; char in; void input(void); void main(void){ x = 0; input(); } void input(void){ printf(">> "); /* Bash-like input */ scanf("%c", &in); /* Get char input */ /* Boundary checks */ if(x == 256 || x == -1) x = 0; /* Operators */ switch(in){ case 'i': case 'x': x++; case 'd': x--; case 'o': case 'c': printf("%d\n", x); case 's': case 'k': x = x*x; default: printf("\n"); } input(); /* Loop */ } #ifdef __CINT__ #pragma link off all glols; #pragma link off all classes; #pragma link off all functions; #endif /* Lunatic Python -------------- Copyright (c) 2002-2005 Gustavo Niemeyer 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 License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef PYTHONINLUA_H #define PYTHONINLUA_H #define POBJECT "POBJECT" int py_convert(lua_State *L, PyObject *o, int withnone); typedef struct { PyObject *o; int asindx; } py_object; void stackDump(lua_State *L); void tableDump(lua_State *L, int t); py_object *check_py_object(lua_State *L, int ud); LUA_API int luaopen_python(lua_State *L); #endif #include /** * * Converts integer values in 'a' to floating point values. * * @param a Pointer to input vector * * @param c Pointer to output vector * * @param n Size of 'a' and 'c' vector. * * @param p Number of processor to use (task parallelism) * * @param team Team to work with * * @return None * */ #include void p_itof(int *a, float *c, int n, int p, p_team_t team) { int i; for(i = 0; i < n; i++) { *(c + i) = (float)(*(a + i)); } } //===-- lldb-python.h --------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLDB_lldb_python_h_ #define LLDB_lldb_python_h_ // Python.h needs to be included before any system headers in order to avoid redefinition of macros #ifdef LLDB_DISABLE_PYTHON // Python is disabled in this build #else #include #endif // LLDB_DISABLE_PYTHON #endif // LLDB_lldb_python_h_ /* $OpenBSD: setjmp.h,v 1.6 2001/08/12 12:03:02 heko Exp $ */ /* * machine/setjmp.h: machine dependent setjmp-related information. */ #ifndef __MACHINE_SETJMP_H__ #define __MACHINE_SETJMP_H__ #define _JBLEN 22 /* size, in longs, of a jmp_buf */ #endif /* __MACHINE_SETJMP_H__ */ // // EditPatientForm.h // OpenMRS-iOS // // Created by Yousef Hamza on 7/5/15. // Copyright (c) 2015 Erway Software. All rights reserved. // #import "XLForm.h" #import "XLFormViewController.h" #import "MRSPatient.h" @interface EditPatientForm : XLFormViewController - (instancetype)initWithPatient:(MRSPatient *)patient; @property (nonatomic, strong) MRSPatient *patient; @end/* * Copyright (C) 2011 by Nelson Elhage * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #define REPTYR_VERSION "0.4" int attach_child(pid_t pid, const char *pty, int force_stdio); #define __printf __attribute__((format(printf, 1, 2))) void __printf die(const char *msg, ...); void __printf debug(const char *msg, ...); void __printf error(const char *msg, ...); #ifndef __CLAR_TEST_ATTR_EXPECT__ #define __CLAR_TEST_ATTR_EXPECT__ enum attr_expect_t { EXPECT_FALSE, EXPECT_TRUE, EXPECT_UNDEFINED, EXPECT_STRING }; struct attr_expected { const char *path; const char *attr; enum attr_expect_t expected; const char *expected_str; }; static inline void attr_check_expected( enum attr_expect_t expected, const char *expected_str, const char *value) { switch (expected) { case EXPECT_TRUE: cl_assert(GIT_ATTR_TRUE(value)); break; case EXPECT_FALSE: cl_assert(GIT_ATTR_FALSE(value)); break; case EXPECT_UNDEFINED: cl_assert(GIT_ATTR_UNSPECIFIED(value)); break; case EXPECT_STRING: cl_assert_strequal(expected_str, value); break; } } #endif #include "src/math/reinterpret.h" #include long double __addtf3(long double, long double); static _Bool equivalent(long double x, long double y) { if (x != x) return y != y; return reinterpret(unsigned __int128, x) == reinterpret(unsigned __int128, y); } static _Bool run(long double x, long double y) { return equivalent(x + y, __addtf3(x, y)); } #define TEST(x, y) do { \ _Static_assert(__builtin_constant_p((long double)(x) + (long double)(y)), "This test requires compile-time constants"); \ assert(run(x, y)); \ } while (0) // // SwiftDevHints.h // SwiftDevHints // // Created by ZHOU DENGFENG on 15/7/17. // Copyright © 2017 ZHOU DENGFENG DEREK. All rights reserved. // #import #import //! Project version number for SwiftDevHints. FOUNDATION_EXPORT double SwiftDevHintsVersionNumber; //! Project version string for SwiftDevHints. FOUNDATION_EXPORT const unsigned char SwiftDevHintsVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import // // SAMCategories.h // SAMCategories // // Created by Sam Soffes on 7/17/13. // Copyright 2013 Sam Soffes. All rights reserved. // // Foundation #import "NSArray+SAMAdditions.h" #import "NSData+SAMAdditions.h" #import "NSDate+SAMAdditions.h" #import "NSDictionary+SAMAdditions.h" #import "NSNumber+SAMAdditions.h" #import "NSObject+SAMAdditions.h" #import "NSString+SAMAdditions.h" #import "NSURL+SAMAdditions.h" // UIKit #if TARGET_OS_IPHONE #import "UIApplication+SAMAdditions.h" #import "UIColor+SAMAdditions.h" #import "UIDevice+SAMAdditions.h" #import "UIScreen+SAMAdditions.h" #import "UIScrollView+SAMAdditions.h" #import "UIView+SAMAdditions.h" #import "UIViewController+SAMAdditions.h" #endif // RUN: %clang_profgen -o %t -O3 -flto %s // RUN: env LLVM_PROFILE_FILE=%t.profraw %t // RUN: llvm-profdata merge -o %t.profdata %t.profraw // RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s int main(int argc, const char *argv[]) { // CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof !1 if (argc) return 0; return 1; } // CHECK: !1 = metadata !{metadata !"branch_weights", i32 2, i32 1} #import #import "Nocilla.h" #import "LSHTTPRequest.h" @class LSStubRequest; @class LSStubResponse; extern NSString * const LSUnexpectedRequest; @interface LSNocilla : NSObject + (LSNocilla *)sharedInstance; @property (nonatomic, strong, readonly) NSArray *stubbedRequests; - (void)start; - (void)stop; - (void)addStubbedRequest:(LSStubRequest *)request; - (void)clearStubs; - (LSStubResponse *)responseForRequest:(id)request; @end /* Copyright 2021 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #if !defined(__CROS_EC_HOST_COMMAND_H) || \ defined(__CROS_EC_ZEPHYR_HOST_COMMAND_H) #error "This file must only be included from host_command.h. " \ "Include host_command.h directly" #endif #define __CROS_EC_ZEPHYR_HOST_COMMAND_H #include #ifdef CONFIG_PLATFORM_EC_HOSTCMD /** * See include/host_command.h for documentation. */ #define DECLARE_HOST_COMMAND(_command, _routine, _version_mask) \ STRUCT_SECTION_ITERABLE(host_command, _cros_hcmd_##_command) = { \ .command = _command, \ .handler = _routine, \ .version_mask = _version_mask, \ } #else /* !CONFIG_PLATFORM_EC_HOSTCMD */ #ifdef __clang__ #define DECLARE_HOST_COMMAND(command, routine, version_mask) #else #define DECLARE_HOST_COMMAND(command, routine, version_mask) \ enum ec_status (routine)(struct host_cmd_handler_args *args) \ __attribute__((unused)) #endif /* __clang__ */ #endif /* CONFIG_PLATFORM_EC_HOSTCMD */ #ifndef _FAKE_LOCK_SCREEN_PATTERN_H_ #define _FAKE_LOCK_SCREEN_PATTERN_H_ #include #if !GTK_CHECK_VERSION(3, 0, 0) typedef struct { gdouble red; gdouble green; gdouble blue; gdouble alpha; } GdkRGBA; #endif typedef struct _FakeLockOption { void *module; gchar *real; gchar *dummy; } FakeLockOption; typedef struct { gboolean marked; gint value; GdkPoint top_left; GdkPoint bottom_right; } FakeLockPatternPoint; typedef enum { FLSP_ONE_STROKE, FLSP_ON_BOARD, FLSP_N_PATTERN, } FakeLockScreenPattern; void flsp_draw_circle(cairo_t *context, gint x, gint y, gint radius, GdkRGBA circle, GdkRGBA border); gboolean is_marked(gint x, gint y, gint *marked, void *user_data); #endif #ifndef QUAZIP_TEST_QUAZIP_H #define QUAZIP_TEST_QUAZIP_H #include class TestQuaZip: public QObject { Q_OBJECT private slots: void getFileList_data(); void getFileList(); void getZip(); }; #endif // QUAZIP_TEST_QUAZIP_H #ifndef CELL_H #define CELL_H #include #include #include "number.h" class Cell { public: Cell(); explicit Cell(const Cell &rhs); explicit Cell(Cell *value); explicit Cell(bool value); explicit Cell(Number value); explicit Cell(const std::string &value); explicit Cell(const char *value); explicit Cell(const std::vector &value); explicit Cell(const std::map &value); Cell &operator=(const Cell &rhs); bool operator==(const Cell &rhs) const; Cell *address_value; bool boolean_value; Number number_value; std::string string_value; std::vector array_value; std::map dictionary_value; }; #endif /** * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #if defined(DEVICE_TRNG) #define MBEDTLS_ENTROPY_HARDWARE_ALT #endif #if defined(MBEDTLS_CONFIG_HW_SUPPORT) #include "mbedtls_device.h" #endif // RUN: %clang -target aarch64-linux-gnuabi %s -O3 -S -emit-llvm -o - | FileCheck %s #include complex long double a, b, c, d; void test_fp128_compound_assign(void) { // CHECK: tail call { fp128, fp128 } @__multc3 a *= b; // CHECK: tail call { fp128, fp128 } @__divtc3 c /= d; } /*------------------------------------------------------------------------- * * pgtz.c * Timezone Library Integration Functions * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * * IDENTIFICATION * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.5 2004/05/01 01:38:53 momjian Exp $ * *------------------------------------------------------------------------- */ #include "pgtz.h" #include "tzfile.h" static char tzdir[MAXPGPATH]; static int done_tzdir = 0; char * pg_TZDIR(void) { char *p; if (done_tzdir) return tzdir; #ifndef WIN32 StrNCpy(tzdir, PGDATADIR, MAXPGPATH); #else if (GetModuleFileName(NULL, tzdir, MAXPGPATH) == 0) return NULL; #endif canonicalize_path(tzdir); #if 0 if ((p = last_path_separator(tzdir)) == NULL) return NULL; else *p = '\0'; #endif strcat(tzdir, "/timezone"); done_tzdir = 1; return tzdir; } /* * A solution to Exercise 1-12 in The C Programming Language (Second Edition). * * This file was written by Damien Dart . This is free * and unencumbered software released into the public domain. For more * information, please refer to the accompanying "UNLICENCE" file. */ #include #include #include #include int main(void) { int16_t character = 0; bool in_whitespace = false; while ((character = getchar()) != EOF) { if ((character == ' ') || (character == '\t')) { if (in_whitespace == false) { putchar('\n'); in_whitespace = true; } } else { putchar(character); in_whitespace = false; } } return EXIT_SUCCESS; } #include "kremlib.h" #include "kremstr.h" /******************************************************************************/ /* Implementation of FStar.String and FStar.HyperIO */ /******************************************************************************/ /* FStar.h is generally kept for the program we wish to compile, meaning that * FStar.h contains extern declarations for the functions below. This provides * their implementation, and since the function prototypes are already in * FStar.h, we don't need to put these in the header, they will be resolved at * link-time. */ Prims_nat FStar_String_strlen(Prims_string s) { return strlen(s); } Prims_string FStar_String_strcat(Prims_string s0, Prims_string s1) { char *dest = calloc(strlen(s0) + strlen(s1) + 1, 1); strcat(dest, s0); strcat(dest, s1); return (Prims_string)dest; } Prims_string Prims_strcat(Prims_string s0, Prims_string s1) { return FStar_String_strcat(s0, s1); } void FStar_IO_debug_print_string(Prims_string s) { printf("%s", s); } bool __eq__Prims_string(Prims_string s1, Prims_string s2) { return (strcmp(s1, s2) == 0); } #import "RCTBridgeModule.h" @interface KCKeepAwake : NSObject @end // RUN: %check %s #pragma STDC FENV_ACCESS on _Pragma("STDC FENV_ACCESS on"); // CHECK: warning: unhandled STDC pragma // CHECK: ^warning: extra ';' at global scope #define LISTING(x) PRAGMA(listing on #x) #define PRAGMA(x) _Pragma(#x) LISTING(../listing) // CHECK: warning: unknown pragma 'listing on "../listing"' _Pragma(L"STDC CX_LIMITED_RANGE off") // CHECK: warning: unhandled STDC pragma // CHECK: ^!/warning: extra ';'/ #pragma STDC FP_CONTRACT off main() { } // Copyright (c) 2014 Rob Rix. All rights reserved. #import @protocol REDIterable @property (readonly) id(^red_iterator)(void); @end // // RNSketchManager.m // RNSketch // // Created by Jeremy Grancher on 28/04/2016. // Copyright © 2016 Jeremy Grancher. All rights reserved. // #import "RCTViewManager.h" #import "RNSketch.h" @interface RNSketchManager : RCTViewManager @property (strong) RNSketch *sketchView; @end; // // Created by Scott Stark on 6/12/15. // #ifndef NATIVESCANNER_BEACONMAPPER_H #define NATIVESCANNER_BEACONMAPPER_H #include #include using namespace std; /** * Map a beacon id to the registered user by querying the application registration rest api */ class BeaconMapper { private: map beaconToUser; public: /** * Query the current user registrations to update the beacon minorID to name mappings */ void refresh(); string lookupUser(int minorID); }; #endif //NATIVESCANNER_BEACONMAPPER_H /* * Copyright 2014 MongoDB, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef MONGOC_IOVEC_H #define MONGOC_IOVEC_H #include #ifndef _WIN32 # include #endif BSON_BEGIN_DECLS #ifdef _WIN32 typedef struct { u_long iov_len; char *iov_base; } mongoc_iovec_t; #else typedef struct iovec mongoc_iovec_t; #endif BSON_END_DECLS #endif /* MONGOC_IOVEC_H */ #ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning and copyright year // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 9 #define CLIENT_VERSION_REVISION 0 #define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true // Copyright year (2009-this) // Todo: update this when changing our copyright comments in the source #define COPYRIGHT_YEAR 2014 // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #endif // CLIENTVERSION_H //===-- STLPostfixHeaderMap.h - hardcoded header map for STL ----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_TOOL_STL_POSTFIX_HEADER_MAP_H #define LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_TOOL_STL_POSTFIX_HEADER_MAP_H #include namespace clang { namespace find_all_symbols { const HeaderMapCollector::HeaderMap* getSTLPostfixHeaderMap(); } // namespace find_all_symbols } // namespace clang #endif // LLVM_CLANG_TOOLS_EXTRA_FIND_ALL_SYMBOLS_TOOL_STL_POSTFIX_HEADER_MAP_H // PARAM: --enable exp.partition-arrays.enabled #include pthread_t t_ids[10000]; void *t_fun(void *arg) { return NULL; } int main(void) { for (int i = 0; i < 10000; i++) pthread_create(&t_ids[i], NULL, t_fun, NULL); for (int i = 0; i < 10000; i++) pthread_join (t_ids[i], NULL); return 0; }#ifndef DRAUPNIR_H__ #define DRAUPNIR_H__ #include #include "Sponge.h" #include "CrcSponge.h" #include "CrcSpongeBuilder.h" #include "Constants.h" namespace Draupnir { // utility typedefs typedef CrcSponge CrcSponge64; typedef CrcSponge CrcSponge32; typedef CrcSponge CrcSponge16; typedef CrcSponge CrcSponge8; typedef CrcSpongeBuilder CrcSponge64Builder; typedef CrcSpongeBuilder CrcSponge32Builder; typedef CrcSpongeBuilder CrcSponge16Builder; typedef CrcSpongeBuilder CrcSponge8Builder; } #endif /* DRAUPNIR_H__ */ const char *s0 = m0; int s1 = m1; const char *s2 = m0; // FIXME: This test fails inexplicably on Windows in a manner that makes it // look like standard error isn't getting flushed properly. // RUN: true // RUNx: echo '#define m0 ""' > %t.h // RUNx: %clang_cc1 -emit-pch -o %t.h.pch %t.h // RUNx: echo '' > %t.h // RUNx: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr // RUNx: grep "modified" %t.stderr // RUNx: echo '#define m0 000' > %t.h // RUNx: %clang_cc1 -emit-pch -o %t.h.pch %t.h // RUNx: echo '' > %t.h // RUNx: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr // RUNx: grep "modified" %t.stderr // RUNx: echo '#define m0 000' > %t.h // RUNx: echo "#define m1 'abcd'" >> %t.h // RUNx: %clang_cc1 -emit-pch -o %t.h.pch %t.h // RUNx: echo '' > %t.h // RUNx: not %clang_cc1 -include-pch %t.h.pch %s 2> %t.stderr // RUNx: grep "modified" %t.stderr /* * Copyright 2016, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #pragma once /* macros for forcing the compiler to leave in statments it would * normally optimize away */ #include #include /* Macro for doing dummy reads * * Expands to a volatile, unused variable which is set to the value at * a given address. It's volatile to prevent the compiler optimizing * away a variable that is written but never read, and it's unused to * prevent warnings about a variable that's never read. */ #define FORCE_READ(address) \ volatile UNUSED typeof(*address) JOIN(__force__read, __COUNTER__) = *(address) // Title: sleep // Name: sleep.c // Author: Matayoshi // Date: 2010/06/20 // Ver: 1.0.0 #include #include #include int main(int argc, char* argv[]) { // `FbN if(argc < 2) { fprintf(stdout, "Usage: %s msec\n", argv[0]); exit(1); } else { char buf[16]; int wait = 0; // 񂩂琔lɕϊ sscanf(argv[1], "%15c", buf); if(sscanf(buf, "%d", &wait) != 1) { fprintf(stdout, "Usage: %s msec\n", argv[0]); exit(1); } // Ŏw肳ꂽ msec sleep(wait) Sleep(wait); } return 0; } #pragma once #include "llvm/ADT/StringRef.h" #include #include #include "Types.h" // TODO: This shouldn't really be here. More restructuring needed... struct hipCounter { llvm::StringRef hipName; ConvTypes countType; ApiTypes countApiType; int unsupported; }; #define HIP_UNSUPPORTED -1 /// Macros to ignore. extern const std::set CUDA_EXCLUDES; /// Maps cuda header names to hip header names. extern const std::map CUDA_INCLUDE_MAP; /// Maps the names of CUDA types to the corresponding hip types. extern const std::map CUDA_TYPE_NAME_MAP; /// Map all other CUDA identifiers (function/macro names, enum values) to hip versions. extern const std::map CUDA_IDENTIFIER_MAP; /** * The union of all the above maps. * * This should be used rarely, but is still needed to convert macro definitions (which can * contain any combination of the above things). AST walkers can usually get away with just * looking in the lookup table for the type of element they are processing, however, saving * a great deal of time. */ const std::map& CUDA_RENAMES_MAP(); /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- * * Copyright (C) 2010 Red Hat, Inc. * Copyright (C) 2010 Collabora Ltd. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include "cc-empathy-accounts-panel.h" void g_io_module_load (GIOModule *module) { textdomain (GETTEXT_PACKAGE); cc_empathy_accounts_panel_register (module); } void g_io_module_unload (GIOModule *module) { } /* * tuple.h - define data structure for tuples */ #ifndef _TUPLE_H_ #define _TUPLE_H_ #define MAX_TUPLE_SIZE 4096 union Tuple { unsigned char bytes[MAX_TUPLE_SIZE]; char *ptrs[MAX_TUPLE_SIZE/sizeof(char *)]; }; #endif /* _TUPLE_H_ */ #define STAT_SIZE sizeof(struct stat) #define STATFS_SIZE sizeof(struct statfs) #define GID_T_SIZE sizeof(gid_t) #define INT_SIZE sizeof(int) #define LONG_SIZE sizeof(long) #define FD_SET_SIZE sizeof(fd_set) #define TIMEVAL_SIZE sizeof(struct timeval) #define TIMEVAL_ARRAY_SIZE (sizeof(struct timeval) * 2) #define TIMEZONE_SIZE sizeof(struct timezone) #define FILEDES_SIZE sizeof(struct filedes) #define RLIMIT_SIZE sizeof(struct rlimit) #define UTSNAME_SIZE sizeof(struct utsname) #define POLLFD_SIZE sizeof(struct pollfd) #define RUSAGE_SIZE sizeof(struct rusage) #define MAX_STRING 1024 #define EIGHT 8 #define STATFS_ARRAY_SIZE (rval * sizeof(struct statfs)) #define PROC_SIZE sizeof(PROC) /** * @file * * @date 21.04.2016 * @author Anton Bondarev */ #ifndef TTYS_H_ #define TTYS_H_ #include #include struct uart; struct tty_uart { struct idesc idesc; struct tty tty; struct uart *uart; }; #endif /* TTYS_H_ */ /* ISC license. */ #include #include extern void cdb_free (struct cdb *c) { if (c->map) munmap(c->map, c->size) ; *c = cdb_zero ; } #ifndef SKBUFF_H_ #define SKBUFF_H_ #include "netdev.h" #include "dst.h" #include "list.h" #include struct sk_buff { struct list_head list; struct dst_entry *dst; struct netdev *netdev; uint16_t protocol; uint32_t len; uint8_t *tail; uint8_t *end; uint8_t *head; uint8_t *data; }; struct sk_buff_head { struct list_head head; uint32_t qlen; pthread_mutex_t lock; }; struct sk_buff *alloc_skb(unsigned int size); void free_skb(struct sk_buff *skb); uint8_t *skb_push(struct sk_buff *skb, unsigned int len); uint8_t *skb_head(struct sk_buff *skb); void *skb_reserve(struct sk_buff *skb, unsigned int len); void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst); static inline void skb_queue_init(struct sk_buff_head *list) { list_init(&list->head); list->qlen = 0; pthread_mutex_init(&list->lock, NULL); } #endif #include #include "pebcessing/pebcessing.h" static Window *window = NULL; static void init(void) { window = window_create(); window_set_fullscreen(window, true); window_stack_push(window, true); } static void deinit(void) { window_destroy(window); } int main(void) { init(); init_pebcessing(window, window_get_root_layer(window)); app_event_loop(); deinit_pebcessing(); deinit(); return 0; } #pragma once namespace mmh { template constexpr Size sizeof_t() { return gsl::narrow(sizeof Object); } template constexpr Size sizeof_t(const Value& value) { return gsl::narrow(sizeof value); } } // namespace mmh #include #include #include const char helloworld[] = \ "from mpi4py import MPI \n" "hwmess = 'Hello, World! I am process %d of %d on %s.' \n" "myrank = MPI.COMM_WORLD.Get_rank() \n" "nprocs = MPI.COMM_WORLD.Get_size() \n" "procnm = MPI.Get_processor_name() \n" "print (hwmess % (myrank, nprocs, procnm)) \n" ""; int main(int argc, char *argv[]) { int ierr, rank, size; ierr = MPI_Init(&argc, &argv); ierr = MPI_Comm_rank(MPI_COMM_WORLD, &rank); ierr = MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Barrier(MPI_COMM_WORLD); Py_Initialize(); PyRun_SimpleString(helloworld); Py_Finalize(); MPI_Barrier(MPI_COMM_WORLD); if (rank == 0) { printf("\n"); fflush(stdout); fflush(stderr); } MPI_Barrier(MPI_COMM_WORLD); Py_Initialize(); PyRun_SimpleString(helloworld); Py_Finalize(); MPI_Barrier(MPI_COMM_WORLD); ierr = MPI_Finalize(); return 0; } #include "log.h" #include "timeutil.h" #include #include #include #include #include static bool flushAfterLog = false; void proxyLogSetFlush(bool enabled) { flushAfterLog = enabled; } void proxyLog(const char* format, ...) { va_list args; va_start(args, format); printTimeString(); printf(" "); vprintf(format, args); printf("\n"); if (flushAfterLog) { fflush(stdout); } va_end(args); } // // BotKit.h // BotKit // // Created by Mark Adams on 9/28/12. // Copyright (c) 2012 thoughtbot. All rights reserved. // #import "BKCoreDataManager.h" #import "BKManagedViewController.h" #import "BKManagedTableViewController.h" #import "NSObject+BKCoding.h" #import "NSArray+ObjectAccess.h" #import "NSDate+RelativeDates.h" #import "UIColor+AdjustColor.h" #import "UIColor+Serialization.h" /* TODOS: BKImageLoader -imageWithContentsOfURL:completionHandler: -imageWithContentsOFURLPath:completionHandler: UIImage: +imageWithContentsOfURLPath: NSURLRequest: +requestWithString: +requestWithURL: NSDate: -dateStringWithFormat: -dateStringWithStyle: */ #ifndef __TRAIN_MASTER_H__ #define __TRAIN_MASTER_H__ void __attribute__ ((noreturn)) train_master(); typedef enum { MASTER_CHANGE_SPEED, MASTER_REVERSE, // step 1 MASTER_REVERSE2, // step 2 (used by delay courier) MASTER_REVERSE3, // step 3 (used by delay courier) MASTER_WHERE_ARE_YOU, MASTER_STOP_AT_SENSOR, MASTER_GOTO_LOCATION, MASTER_DUMP_VELOCITY_TABLE, MASTER_UPDATE_FEEDBACK_THRESHOLD, MASTER_UPDATE_FEEDBACK_ALPHA, MASTER_UPDATE_STOP_OFFSET, MASTER_UPDATE_CLEARANCE_OFFSET, MASTER_ACCELERATION_COMPLETE, MASTER_NEXT_NODE_ESTIMATE, MASTER_SENSOR_FEEDBACK, MASTER_UNEXPECTED_SENSOR_FEEDBACK } master_req_type; typedef struct { master_req_type type; int arg1; int arg2; int arg3; } master_req; #endif // // TrackingControllerDefs.h // // Created by Matt Martel on 02/20/09 // Copyright Mundue LLC 2008-2011. All rights reserved. // // Create an account at http://www.flurry.com // Code and integration instructions at // http://dev.flurry.com/createProjectSelectPlatform.do #define USES_FLURRY #define kFlurryAPIKey @"YOUR_FLURRY_API_KEY" // Create an account at http://www.localytics.com // Code and integration instructions at // http://wiki.localytics.com/doku.php #define USES_LOCALYTICS #define kLocalyticsAppKey @"YOUR_LOCALITICS_APP_KEY" // Create an account at http://www.google.com/analytics // Code and integration instructions at // http://code.google.com/mobile/analytics/docs/iphone/ #define USES_GANTRACKER #define kGANAccountIDKey @"YOUR_GOOGLE_ANALYTICS_ACCOUNT_ID" #define kGANCategoryKey @"YOUR_APP_NAME"//===-- memory.c - String functions for the LLVM libc Library ----*- C -*-===// // // A lot of this code is ripped gratuitously from glibc and libiberty. // //===----------------------------------------------------------------------===// #include void *malloc(size_t) __attribute__((weak)); void free(void *) __attribute__((weak)); void *memset(void *, int, size_t) __attribute__((weak)); void *calloc(size_t nelem, size_t elsize) __attribute__((weak)); void *calloc(size_t nelem, size_t elsize) { void *Result = malloc(nelem*elsize); return memset(Result, 0, nelem*elsize); } #include #include #ifndef __hpux using namespace std; #endif #pragma create TClass vector; #pragma create TClass vector; #pragma create TClass vector; #pragma create TClass vector; #pragma create TClass vector; #pragma create TClass vector; #pragma create TClass vector; #pragma create TClass vector; #pragma create TClass vector; #pragma create TClass vector; #pragma create TClass vector; #pragma create TClass vector; #pragma create TClass vector; #if (!(G__GNUC==3 && G__GNUC_MINOR==1)) && !defined(G__KCC) && (!defined(G__VISUAL) || G__MSC_VER<1300) // gcc3.1,3.2 has a problem with iterator #pragma create TClass vector; #endif /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #ifndef NRFX_CONFIG_H__ #define NRFX_CONFIG_H__ #if NRF52 #include "../../nrf52xxx-compat/include/nrfx52_config.h" #elif NRF52840_XXAA #include "../../nrf52xxx-compat/include/nrfx52840_config.h" #else #error Unsupported chip selected #endif #endif // NRFX_CONFIG_H__ /* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkSpinlock_DEFINED #define SkSpinlock_DEFINED #include class SkSpinlock { public: void acquire() { // To act as a mutex, we need an acquire barrier when we acquire the lock. if (fLocked.exchange(true, std::memory_order_acquire)) { // Lock was contended. Fall back to an out-of-line spin loop. this->contendedAcquire(); } } void release() { // To act as a mutex, we need a release barrier when we release the lock. fLocked.store(false, std::memory_order_release); } private: void contendedAcquire(); std::atomic fLocked{false}; }; #endif//SkSpinlock_DEFINED #ifndef LOCK_H #define LOCK_H enum lockstat { GET_LOCK_NOT_GOT=0, GET_LOCK_ERROR, GET_LOCK_GOT }; typedef struct lock lock_t; struct lock { int fd; enum lockstat status; char *path; lock_t *next; }; extern struct lock *lock_alloc(void); extern int lock_init(struct lock *lock, const char *path); extern struct lock *lock_alloc_and_init(const char *path); extern void lock_free(struct lock **lock); // Need to test lock->status to find out what happened when calling these. extern void lock_get_quick(struct lock *lock); extern void lock_get(struct lock *lock); extern int lock_test(const char *path); extern int lock_release(struct lock *lock); extern void lock_add_to_list(struct lock **locklist, struct lock *lock); extern void locks_release_and_free(struct lock **locklist); #endif // Copyright 2016 Mitchell Kember. Subject to the MIT License. #include "translate.h" #include "transmit.h" #include "util.h" #include #include int main(int argc, char **argv) { setup_util(argv[0]); // Initialize the default mode. int mode = 'e'; // Get command line options. int c; extern char *optarg; extern int optind, optopt; while ((c = getopt(argc, argv, "hedt")) != -1) { switch (c) { case 'h': print_usage(stdout); return 0; case 'e': case 'd': case 't': mode = c; break; case '?': return 1; } } // Make sure all arguments were processed. if (optind != argc) { print_usage(stderr); return 1; } // Dispatch to the chosen subprogram. switch (mode) { case 'e': return encode(); case 'd': return decode(); case 't': return transmit(); } } #define _FILE_OFFSET_BITS 64 #include int native_fallocate(int fd, uint64_t len) { fstore_t fstore; fstore.fst_flags = F_ALLOCATECONTIG; fstore.fst_posmode = F_PEOFPOSMODE; fstore.fst_offset = 0; fstore.fst_length = len; fstore.fst_bytesalloc = 0; return fcntl(fd, F_PREALLOCATE, &fstore); } #include #include #include #include int main (int argc, char * argv []) { __u64 rdtsc = 0; __u64 i = 0; int fileStat = open (argv [1], O_RDONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); while (read (fileStat, &rdtsc, sizeof (rdtsc) ) > 0) { printf ("%llu:\t%llu\n", ++i, rdtsc); } close (fileStat); } #pragma once #include "SDL.h" #include "Component.h" #include "Point.h" #define NUM_MOUSE_BUTTONS 5 #define CONTROLLER_JOYSTICK_DEATHZONE 8000 class Input { public: Input(); ~Input(); void Poll(const SDL_Event& e); bool IsKeyPressed(SDL_Scancode key); bool IsKeyHeld(SDL_Scancode key) const; bool IsKeyReleased(SDL_Scancode key); SDL_GameController *controller1 = nullptr; SDL_GameController *controller2 = nullptr; bool IsControllerButtonPressed(SDL_GameController* controller, SDL_GameControllerButton button); bool IsControllerButtonHeld(SDL_GameController* controller, SDL_GameControllerButton button) const; bool IsControllerButtonReleased(SDL_GameController* controller, SDL_GameControllerButton button); bool IsMouseButtonPressed(int button) const; bool IsMouseButtonHeld(int button) const; bool IsMouseButtonReleased(int button) const; float MouseX() const; float MouseY() const; Point GetMousePosition(Point& position) const; private: bool keys[SDL_NUM_SCANCODES]; bool lastKeys[SDL_NUM_SCANCODES]; bool lastControllerButtons[SDL_CONTROLLER_BUTTON_MAX]; void OpenControllers(); bool mouseButtons[NUM_MOUSE_BUTTONS]; bool lastMouseButtons[NUM_MOUSE_BUTTONS]; }; // // FTFountainiOS.h // FTFountain // // Created by Tobias Kräntzer on 18.07.15. // Copyright (c) 2015 Tobias Kräntzer. All rights reserved. // // Adapter #import "FTTableViewAdapter.h" #import "FTCollectionViewAdapter.h" // // RMGallery.h // RMGallery // // Created by Hermés Piqué on 16/05/14. // Copyright (c) 2014 Robot Media. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #import "RMGalleryViewController.h" #import "RMGalleryTransition.h"// // MenuItemKit.h // MenuItemKit // // Created by CHEN Xian’an on 1/16/16. // Copyright © 2016 lazyapps. All rights reserved. // #import #import "Headers.h" //! Project version number for MenuItemKit. FOUNDATION_EXPORT double MenuItemKitVersionNumber; //! Project version string for MenuItemKit. FOUNDATION_EXPORT const unsigned char MenuItemKitVersionString[]; // // STTweetLabel.h // STTweetLabel // // Created by Sebastien Thiebaud on 09/29/13. // Copyright (c) 2013 Sebastien Thiebaud. All rights reserved. // typedef enum { STTweetHandle = 0, STTweetHashtag, STTweetLink } STTweetHotWord; @interface STTweetLabel : UILabel @property (nonatomic, strong) NSArray *validProtocols; @property (nonatomic, assign) BOOL leftToRight; @property (nonatomic, assign) BOOL textSelectable; @property (nonatomic, strong) UIColor *selectionColor; @property (nonatomic, copy) void (^detectionBlock)(STTweetHotWord hotWord, NSString *string, NSString *protocol, NSRange range); - (void)setAttributes:(NSDictionary *)attributes; - (void)setAttributes:(NSDictionary *)attributes hotWord:(STTweetHotWord)hotWord; - (NSDictionary *)attributes; - (NSDictionary *)attributesForHotWord:(STTweetHotWord)hotWord; - (CGSize)suggestedFrameSizeToFitEntireStringConstraintedToWidth:(CGFloat)width; @end /// @file /// @brief Defines SpeciesDialog class. #ifndef SPECIES_DIALOG_H #define SPECIES_DIALOG_H #include #include #include #include "fish_detector/common/species.h" namespace Ui { class SpeciesDialog; } namespace fish_detector { class SpeciesDialog : public QDialog { Q_OBJECT #ifndef NO_TESTING friend class TestSpeciesDialog; #endif public: /// @brief Constructor. /// /// @param parent Parent widget. explicit SpeciesDialog(QWidget *parent = 0); /// @brief Returns a Species object corresponding to the dialog values. /// /// @return Species object corresponding to the dialog values. Species getSpecies(); private slots: /// @brief Emits the accepted signal. void on_ok_clicked(); /// @brief Emits the rejected signal. void on_cancel_clicked(); /// @brief Removes currently selected subspecies. void on_removeSubspecies_clicked(); /// @brief Adds a new subspecies. void on_addSubspecies_clicked(); private: /// @brief Widget loaded from ui file. std::unique_ptr ui_; }; } // namespace fish_detector #endif // SPECIES_DIALOG_H /* * controldata_utils.h * Common code for pg_controldata output * * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/common/controldata_utils.h */ #ifndef COMMON_CONTROLDATA_UTILS_H #define COMMON_CONTROLDATA_UTILS_H extern ControlFileData *get_controlfile(char *DataDir, const char *progname); #endif /* COMMON_CONTROLDATA_UTILS_H */ /* * Machine specific IO port address definition for generic. * Written by Osamu Tomita */ #ifndef _MACH_IO_PORTS_H #define _MACH_IO_PORTS_H /* i8253A PIT registers */ #define PIT_MODE 0x43 #define PIT_CH0 0x40 #define PIT_CH2 0x42 /* i8259A PIC registers */ #define PIC_MASTER_CMD 0x20 #define PIC_MASTER_IMR 0x21 #define PIC_MASTER_ISR PIC_MASTER_CMD #define PIC_MASTER_POLL PIC_MASTER_ISR #define PIC_MASTER_OCW3 PIC_MASTER_ISR #define PIC_SLAVE_CMD 0xa0 #define PIC_SLAVE_IMR 0xa1 /* i8259A PIC related value */ #define PIC_CASCADE_IR 2 #define MASTER_ICW4_DEFAULT 0x01 #define SLAVE_ICW4_DEFAULT 0x01 #define PIC_ICW4_AEOI 2 extern void setup_pit_timer(void); #endif /* !_MACH_IO_PORTS_H */ // // CWStatusBarNotification // CWNotificationDemo // // Created by Cezary Wojcik on 11/15/13. // Copyright (c) 2013 Cezary Wojcik. All rights reserved. // #import @interface CWStatusBarNotification : NSObject enum { CWNotificationStyleStatusBarNotification, CWNotificationStyleNavigationBarNotification }; enum { CWNotificationAnimationStyleTop, CWNotificationAnimationStyleBottom, CWNotificationAnimationStyleLeft, CWNotificationAnimationStyleRight }; @property (strong, nonatomic) UIColor *notificationLabelBackgroundColor; @property (strong, nonatomic) UIColor *notificationLabelTextColor; @property (nonatomic) NSInteger notificationStyle; @property (nonatomic) NSInteger notificationAnimationInStyle; @property (nonatomic) NSInteger notificationAnimationOutStyle; @property (nonatomic) BOOL notificationIsShowing; - (void)displayNotificationWithMessage:(NSString *)message forDuration:(CGFloat)duration; - (void)displayNotificationWithMessage:(NSString *)message completion:(void (^)(void))completion; - (void)dismissNotification; @end /* * Copyright 2014, General Dynamics C4 Systems * * This software may be distributed and modified according to the terms of * the GNU General Public License version 2. Note that NO WARRANTY is provided. * See "LICENSE_GPLv2.txt" for details. * * @TAG(GD_GPL) */ #ifndef __ARCH_MACHINE_CPU_REGISTERS_H #define __ARCH_MACHINE_CPU_REGISTERS_H #define CR0_MONITOR_COPROC BIT(1) /* Trap on FPU "WAIT" commands. */ #define CR0_EMULATION BIT(2) /* Enable OS emulation of FPU. */ #define CR0_TASK_SWITCH BIT(3) /* Trap on any FPU usage, for lazy FPU. */ #define CR0_NUMERIC_ERROR BIT(5) /* Internally handle FPU problems. */ #define CR4_OSFXSR BIT(9) /* Enable SSE et. al. features. */ #define CR4_OSXMMEXCPT BIT(10) /* Enable SSE exceptions. */ /* We use a dummy variable to synchronize reads and writes to the control registers. * this allows us to write inline asm blocks that do not have enforced memory * clobbers for ordering. */ static unsigned long control_reg_order; #include #endif // // ASN1Decoder.h // ASN1Decoder // // Created by Filippo Maguolo on 8/29/17. // Copyright © 2017 Filippo Maguolo. All rights reserved. // #import //! Project version number for ASN1Decoder. FOUNDATION_EXPORT double ASN1DecoderVersionNumber; //! Project version string for ASN1Decoder. FOUNDATION_EXPORT const unsigned char ASN1DecoderVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import #ifndef _POLYGON_H_ #define _POLYGON_H_ /* * geometric properties of the polygon meant for solving * * The default C pre-processor configuration here is to solve triangles. */ #define POLYGON_DEPTH 3 #if (POLYGON_DEPTH < 3) #error You cannot have a polygon with fewer than 3 sides! #endif #if (POLYGON_DEPTH > 'Z' - 'A') #error Angle labels are currently lettered. Sorry for this limitation. #endif /* * All polygons have a fixed limit to the total measure of their angles. * For example, the angles of a triangle always sum up to 180 degrees. */ #define INTERIOR_DEGREES (180 * ((POLYGON_DEPTH) - 2)) /* * Geometric lengths cannot be negative or zero. * We will reserve non-positive measures to indicate un-solved "unknowns". */ #define KNOWN(measure) ((measure) > 0) extern int solve_polygon(double * angles, double * sides); extern int already_solved(double * angels, double * sides); extern int find_angle(double * angles); extern int find_side(double * sides, const double * angles); extern int arc_find_angles(double * angles, const double * sides); #endif #ifndef AREA_H #define AREA_H #include "base.h" typedef struct area area; struct area{ char name[10]; int capacity; int areasAround; char ** adjec; // STRINGS SIZE ARE ALWAYS 10 }; void listAreas(area * a, int size); void addArea(area * a, int size); void deleteArea(area * a, int size); #endif /** * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #if defined(DEVICE_TRNG) #define MBEDTLS_ENTROPY_HARDWARE_ALT #endif #if defined(DEVICE_CRYPTO) #include "mbedtls_device.h" #endif //===--- CommentBriefParser.h - Dumb comment parser -------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This file defines a very simple Doxygen comment parser. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_AST_BRIEF_COMMENT_PARSER_H #define LLVM_CLANG_AST_BRIEF_COMMENT_PARSER_H #include "clang/AST/CommentLexer.h" namespace clang { namespace comments { /// A very simple comment parser that extracts "a brief description". /// /// Due to a variety of comment styles, it considers the following as "a brief /// description", in order of priority: /// \li a \\brief or \\short command, /// \li the first paragraph, /// \li a \\result or \\return or \\returns paragraph. class BriefParser { Lexer &L; const CommandTraits &Traits; /// Current lookahead token. Token Tok; SourceLocation ConsumeToken() { SourceLocation Loc = Tok.getLocation(); L.lex(Tok); return Loc; } public: BriefParser(Lexer &L, const CommandTraits &Traits); /// Return \\brief paragraph, if it exists; otherwise return the first /// paragraph. std::string Parse(); }; } // end namespace comments } // end namespace clang #endif /* * Constants.h * phonegap-mac * * Created by shazron on 10-04-08. * Copyright 2010 Nitobi Software Inc. All rights reserved. * */ #define kStartPage @"index.html" //Sencha Demos #define kStartFolder @"www/sencha" // PhoneGap Docs Only //#define kStartFolder @"www/phonegap-docs/template/phonegap/" // // IFTTTAnimator.h // JazzHands // // Created by Devin Foley on 9/28/13. // Copyright (c) 2013 IFTTT Inc. All rights reserved. // @protocol IFTTTAnimatable; @interface IFTTTAnimator : NSObject - (void)addAnimation:(id)animation; - (void)animate:(CGFloat)time; @end /* COR:a.bc PE:a.bc BAC:a.bc */ void lcd_voltage() { string top, bottom; sprintf(top, "COR:%1.2f PE:%1.2f", nImmediateBatteryLevel * 0.001, SensorValue(PowerExpanderBattery) / 280); sprintf(bottom, "BAC:%1.2f", BackupBatteryLevel * 0.001); displayLCDString(LCD_LINE_TOP, 0, top); displayLCDString(LCD_LINE_BOTTOM, 0, bottom); } void lcd_clear() { clearLCDLine(LCD_LINE_TOP); clearLCDLine(LCD_LINE_BOTTOM); } // A currentTime function for use in the tests. #ifdef _WIN32 extern "C" bool QueryPerformanceCounter(uint64_t *); extern "C" bool QueryPerformanceFrequency(uint64_t *); double currentTime() { uint64_t t, freq; QueryPerformanceCounter(&t); QueryPerformanceFrequency(&freq); return (t * 1000.0) / freq; } #else #include double currentTime() { static bool first_call = true; static timeval reference_time; if (first_call) { first_call = false; gettimeofday(&reference_time, NULL); return 0.0; } else { timeval t; gettimeofday(&t, NULL); return ((t.tv_sec - reference_time.tv_sec)*1000.0 + (t.tv_usec - reference_time.tv_usec)/1000.0); } } #endif #include "mode.h" #include #include #include #include "buf.h" #include "editor.h" // TODO(isbadawi): Command mode needs a cursor, but modes don't affect drawing. static void command_mode_key_pressed(editor_t *editor, struct tb_event *ev) { char ch; switch (ev->key) { case TB_KEY_ESC: buf_printf(editor->status, ""); editor->mode = normal_mode(); return; case TB_KEY_BACKSPACE2: buf_delete(editor->status, editor->status->len - 1, 1); if (editor->status->len == 0) { editor->mode = normal_mode(); return; } return; case TB_KEY_ENTER: { char *command = strdup(editor->status->buf + 1); editor_execute_command(editor, command); free(command); editor->mode = normal_mode(); return; } case TB_KEY_SPACE: ch = ' '; break; default: ch = ev->ch; } char s[2] = {ch, '\0'}; buf_append(editor->status, s); } static editing_mode_t impl = {command_mode_key_pressed}; editing_mode_t *command_mode(void) { return &impl; } // RUN: %check -e %s main() { struct A { int i; } a, b, c; a = b ? : c; // CHECK: error: struct involved in if-expr } #ifndef TAGREADER_H #define TAGREADER_H #include #include #include #include #include #include #include class TagReader { public: TagReader(const QString &file); ~TagReader(); bool isValid() const; bool hasAudioProperties() const; QString title() const; QString album() const; QString artist() const; int track() const; int year() const; QString genre() const; QString comment() const; int length() const; int bitrate() const; int sampleRate() const; int channels() const; QImage thumbnailImage() const; QByteArray thumbnail() const; private: TagLib::FileRef m_fileRef; TagLib::Tag *m_tag; TagLib::AudioProperties *m_audioProperties; }; #endif // TAGREADER_H // // ViewController.h // AAChartKit // // Created by An An on 17/3/13. // Copyright © 2017年 An An. All rights reserved. // source code ----*** https://github.com/AAChartModel/AAChartKit ***--- source code // #import typedef NS_ENUM(NSInteger,ENUM_secondeViewController_chartType){ ENUM_secondeViewController_chartTypeColumn =0, ENUM_secondeViewController_chartTypeBar, ENUM_secondeViewController_chartTypeArea, ENUM_secondeViewController_chartTypeAreaspline, ENUM_secondeViewController_chartTypeLine, ENUM_secondeViewController_chartTypeSpline, ENUM_secondeViewController_chartTypeScatter, }; @interface SecondViewController : UIViewController @property(nonatomic,assign)NSInteger ENUM_secondeViewController_chartType; @property(nonatomic,copy)NSString *receivedChartType; @end // // ENAPI_utils.h // libechonest // // Created by Art Gillespie on 3/15/11. art@tapsquare.com // #import "NSMutableDictionary+QueryString.h" #import "NSData+MD5.h" #import "ENAPI.h" #define CHECK_API_KEY if (nil == [ENAPI apiKey]) { @throw [NSException exceptionWithName:@"APIKeyNotSetException" reason:@"Set the API key before calling this method" userInfo:nil]; } static NSString __attribute__((unused)) * const ECHONEST_API_URL = @"http://developer.echonest.com/api/v4/"; #include "visibility.h" #include "objc/runtime.h" #include "gc_ops.h" #include "class.h" #include #include static id allocate_class(Class cls, size_t extraBytes) { intptr_t *addr = calloc(cls->instance_size + extraBytes + sizeof(intptr_t), 1); return (id)(addr + 1); } static void free_object(id obj) { free((void*)(((intptr_t)obj) - 1)); } static void *alloc(size_t size) { return calloc(size, 1); } PRIVATE struct gc_ops gc_ops_none = { .allocate_class = allocate_class, .free_object = free_object, .malloc = alloc, .free = free }; PRIVATE struct gc_ops *gc = &gc_ops_none; PRIVATE BOOL isGCEnabled = NO; #ifndef ENABLE_GC PRIVATE void enableGC(BOOL exclusive) { fprintf(stderr, "Attempting to enable garbage collection, but your" "Objective-C runtime was built without garbage collection" "support\n"); abort(); } #endif /* ISC license. */ #include #include #include #include #include #include #include "hpr.h" #ifndef UT_LINESIZE #define UT_LINESIZE 32 #endif void hpr_wall (char const *s) { size_t n = strlen(s) ; char tty[10 + UT_LINESIZE] = "/dev/" ; char msg[n+1] ; memcpy(msg, s, n) ; msg[n++] = '\n' ; setutxent() ; for (;;) { size_t linelen ; int fd ; struct utmpx *utx = getutxent() ; if (!utx) break ; if (utx->ut_type != USER_PROCESS) continue ; linelen = strnlen(utx->ut_line, UT_LINESIZE) ; memcpy(tty + 5, utx->ut_line, linelen) ; tty[5 + linelen] = 0 ; fd = open_append(tty) ; if (fd == -1) continue ; allwrite(fd, msg, n) ; fd_close(fd) ; } endutxent() ; } //===- llvm/Transforms/CleanupGCCOutput.h - Cleanup GCC Output ---*- C++ -*--=// // // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H #define LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H class Pass; Pass *createCleanupGCCOutputPass(); #endif uniform sampler2D m_SamplerY; uniform sampler2D m_SamplerU; uniform sampler2D m_SamplerV; uniform mat3 yuvCoeff; // Y - 16, Cb - 128, Cr - 128 const mediump vec3 offsets = vec3(-0.0625, -0.5, -0.5); lowp vec3 sampleRgb(vec2 loc) { float y = texture2D(m_SamplerY, loc).r; float u = texture2D(m_SamplerU, loc).r; float v = texture2D(m_SamplerV, loc).r; return yuvCoeff * (vec3(y, u, v) + offsets); }#ifndef ALI_TRD_PREPROCESSOR_H #define ALI_TRD_PREPROCESSOR_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ //////////////////////////////////////////////////////////////////////////// // // // TRD preprocessor for the database SHUTTLE // // // //////////////////////////////////////////////////////////////////////////// #include "AliPreprocessor.h" class AliTRDPreprocessor : public AliPreprocessor { public: AliTRDPreprocessor(AliShuttleInterface *shuttle); virtual ~AliTRDPreprocessor(); protected: virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime); virtual UInt_t Process(TMap* /*dcsAliasMap*/); private: ClassDef(AliTRDPreprocessor,0); }; #endif /** * cpuid.c * * Checks if CPU has support of AES instructions * * @author kryukov@frtk.ru * @version 4.0 * * For Putty AES NI project * http://putty-aes-ni.googlecode.com/ */ #ifndef SILENT #include #endif #if defined(__clang__) || defined(__GNUC__) #include static int CheckCPUsupportAES() { unsigned int CPUInfo[4]; __cpuid(1, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]); return (CPUInfo[2] & (1 << 25)) && (CPUInfo[2] & (1 << 19)); /* Check AES and SSE4.1 */ } #else /* defined(__clang__) || defined(__GNUC__) */ static int CheckCPUsupportAES() { unsigned int CPUInfo[4]; __cpuid(CPUInfo, 1); return (CPUInfo[2] & (1 << 25)) && (CPUInfo[2] & (1 << 19)); /* Check AES and SSE4.1 */ } #endif /* defined(__clang__) || defined(__GNUC__) */ int main(int argc, char ** argv) { const int res = !CheckCPUsupportAES(); #ifndef SILENT printf("This CPU %s AES-NI\n", res ? "does not support" : "supports"); #endif return res; } // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef PRINTING_METAFILE_IMPL_H_ #define PRINTING_METAFILE_IMPL_H_ #if defined(OS_WIN) #include "printing/emf_win.h" #elif defined(OS_MACOSX) #include "printing/pdf_metafile_cg_mac.h" #elif defined(OS_POSIX) #include "printing/pdf_metafile_cairo_linux.h" #endif #if !defined(OS_MACOSX) || defined(USE_SKIA) #include "printing/pdf_metafile_skia.h" #endif namespace printing { #if defined(OS_WIN) typedef Emf NativeMetafile; typedef PdfMetafileSkia PreviewMetafile; #elif defined(OS_MACOSX) #if defined(USE_SKIA) typedef PdfMetafileSkia NativeMetafile; typedef PdfMetafileSkia PreviewMetafile; #else typedef PdfMetafileCg NativeMetafile; typedef PdfMetafileCg PreviewMetafile; #endif #elif defined(OS_POSIX) typedef PdfMetafileCairo NativeMetafile; typedef PdfMetafileSkia PreviewMetafile; #endif } // namespace printing #endif // PRINTING_METAFILE_IMPL_H_ /* * Copyright (C) 2015 CossackLabs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #import #import @interface SKeygen : NSObject { NSData* _priv_key; NSData* _pub_key; } - (id)init; - (NSData*)priv_key: error:(NSError**)errorPtr; - (NSData*)pub_key: error:(NSError**)errorPtr; @end #include "../parse.h" unsigned parse_stmt_equivalence( const sparse_t* src, const char* ptr, parse_stmt_t* stmt) { unsigned i = parse_keyword( src, ptr, PARSE_KEYWORD_EQUIVALENCE); if (i == 0) return 0; stmt->type = PARSE_STMT_EQUIVALENCE; stmt->equivalence.count = 0; stmt->equivalence.group = NULL; unsigned len = parse_list(src, ptr, &stmt->equivalence.count, (void***)&stmt->equivalence.group, (void*)parse_lhs_list_bracketed, (void*)parse_lhs_list_delete); if (len == 0) return 0; i += len; return i; } #include int main() { // imprime o cabecalho do nosso jogo printf("******************************************\n"); printf("* Bem vindo ao nosso jogo de adivinhação *\n"); printf("******************************************\n"); int numerosecreto = 42; int chute; printf("Qual é o seu chute? "); scanf("%d", &chute); printf("Seu chute foi %d\n", chute); int acertou = chute == numerosecreto; if(acertou) { printf("Parabéns! Você acertou!\n"); printf("Jogue de novo, você é um bom jogador!\n"); } else { int maior = chute > numerosecreto; if(maior) { printf("Seu chute foi maior que o número secreto\n"); } else { printf("Seu chute foi menor que o número secreto\n"); } printf("Você errou!\n"); printf("Mas não desanime, tente de novo!\n"); } } /** @file Copyright John Reid 2013 */ #ifndef MYRRH_PYTHON_REGISTRY_H_ #define MYRRH_PYTHON_REGISTRY_H_ #ifdef _MSC_VER # pragma once #endif //_MSC_VER namespace myrrh { namespace python { /** * Queries if the the type specified is in the registry. */ template< typename QueryT > bool in_registry() { namespace bp = boost::python; bp::type_info info = boost::python::type_id< QueryT >(); bp::converter::registration * registration = boost::python::converter::registry::query( info ); return registration != 0; } } //namespace myrrh } //namespace python #endif //MYRRH_PYTHON_REGISTRY_H_ /// \file update_task.h /// Defines action for updating tasks. /// \author A0112054Y #pragma once #ifndef YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_ #define YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_ #include #include "../../filter.h" #include "../../api.h" namespace You { namespace QueryEngine { namespace Internal { namespace Action { /// Define action for updating task class FilterTask : public Query { public: /// Constructor explicit FilterTask(const Filter& filter) : filter(filter) {} /// Destructor virtual ~FilterTask() = default; private: /// Execute add task. Response execute(State& tasks) override; FilterTask& operator=(const FilterTask&) = delete; const Filter& filter; }; } // namespace Action } // namespace Internal } // namespace QueryEngine } // namespace You #endif // YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_ // Check that calling dispatch_once from a report callback works. // RUN: %clang_tsan %s -o %t // RUN: not %run %t 2>&1 | FileCheck %s #include #include #include long g = 0; long h = 0; void f() { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ g++; }); h++; } void __tsan_on_report() { fprintf(stderr, "Report.\n"); f(); } int main() { fprintf(stderr, "Hello world.\n"); f(); pthread_mutex_t mutex = {0}; pthread_mutex_lock(&mutex); fprintf(stderr, "g = %ld.\n", g); fprintf(stderr, "h = %ld.\n", h); fprintf(stderr, "Done.\n"); } // CHECK: Hello world. // CHECK: Report. // CHECK: g = 1 // CHECK: h = 2 // CHECK: Done. /* * Copyright (c) 2012-2015 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "udc.h" #include struct gt_udc_backend gt_udc_backend_libusbg = { .udc = NULL, }; /* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* Copyright (C) 2015 Red Hat, Inc. 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 License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see . */ /* check statistics */ #include #include typedef void test_func_t(void); test_func_t stat_test1; test_func_t stat_test2; test_func_t stat_test3; test_func_t stat_test4; static test_func_t *test_funcs[] = { stat_test1, stat_test2, stat_test3, stat_test4, NULL }; int main(void) { test_func_t **func_p; for (func_p = test_funcs; *func_p; ++func_p) { (*func_p)(); } return 0; } /* * Copyright (c) 2009 Baptiste Coudurier * * This file is part of FFmpeg. * * FFmpeg 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 License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef AVUTIL_RANDOM_SEED_H #define AVUTIL_RANDOM_SEED_H #include /** * Gets a seed to use in conjuction with random functions. */ uint32_t ff_random_get_seed(void); #endif /* AVUTIL_RANDOM_SEED_H */ #ifndef PACKET_QUEUE_H_INCLUDED__ #define PACKET_QUEUE_H_INCLUDED__ #include "radio.h" #include #define PACKET_QUEUE_SIZE 10 typedef struct { radio_packet_t * head; radio_packet_t * tail; radio_packet_t packets[PACKET_QUEUE_SIZE]; } packet_queue_t; uint32_t packet_queue_init(packet_queue_t * queue); bool packet_queue_is_empty(packet_queue_t * queue); bool packet_queue_is_full(packet_queue_t * queue); uint32_t packet_queue_add(packet_queue_t * queue, radio_packet_t * packet); uint32_t packet_queue_get(packet_queue_t * queue, radio_packet_t ** packet); #endif #include "config.h" #include #include #include "lexicon.h" #include "hash.h" #include "array.h" #include "util.h" #include "mem.h" int main(int argc, char **argv) { lexicon_pt l=read_lexicon_file(argv[1]); char s[4000]; printf("Read %ld lexical entries.\n", (long int)hash_size(l->words)); while (fgets(s, 1000, stdin)) { word_pt w; int i, sl=strlen(s); for (sl--; sl>=0 && s[sl]=='\n'; sl--) { s[sl]='\0'; } w=hash_get(l->words, s); if (!w) { printf("No such word \"%s\".\n", s); continue; } printf("%s[%d,%s]:", s, w->defaulttag, tagname(l, w->defaulttag)); for (i=0; w->sorter[i]>0; i++) { printf("\t%s %d", (char *)array_get(l->tags, w->sorter[i]), w->tagcount[w->sorter[i]]); } printf("\n"); } /* Free the memory held by util.c. */ util_teardown(); } #ifndef UTILS_H #define UTILS_H #include /** \brief Convert given container to it's hex representation */ template< typename T > std::string toHex( const T& data ) { static const char charTable[] = "0123456789abcdef"; std::string ret; if ( data.size() > 1024 ) { ret = "*** LARGE *** "; for ( size_t i=0; i<40; i++ ) { ret.push_back( charTable[ ( data[i] >> 4 ) & 0xF ] ); ret.push_back( charTable[ ( data[i] >> 0 ) & 0xF ] ); } ret.append("..."); for ( size_t i=data.size()-40; i> 4 ) & 0xF ] ); ret.push_back( charTable[ ( data[i] >> 0 ) & 0xF ] ); } } else { for ( const auto& val: data ) { ret.push_back( charTable[ ( val >> 4 ) & 0xF ] ); ret.push_back( charTable[ ( val >> 0 ) & 0xF ] ); } } return ret; } #endif // UTILS_H /* * libpatts - Backend library for PATTS Ain't Time Tracking Software * Copyright (C) 2014 Delwink, LLC * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ #ifndef DELWINK_PATTS_ADMIN_H #define DELWINK_PATTS_ADMIN_H #include #ifdef __cplusplus extern "C" { #endif int patts_create_user(const struct dlist *info, const char *host, const char *passwd); int patts_create_task(const struct dlist *info); int patts_enable_user(const char *id); int patts_enable_task(const char *id); int patts_disable_user(const char *id); int patts_disable_task(const char *id); int patts_grant_admin(const char *id); int patts_revoke_admin(const char *id); #ifdef __cplusplus } #endif #endif #include #include #include #include #include #include jmp_buf try; void handler(int sig) { static int i = 0; write(2, "stack overflow\n", 15); longjmp(try, ++i); _exit(1); } unsigned recurse(unsigned x) { return recurse(x)+1; } int main() { static char stack[SIGSTKSZ]; stack_t ss = { .ss_size = SIGSTKSZ, .ss_sp = stack, }; struct sigaction sa = { .sa_handler = handler, .sa_flags = SA_ONSTACK }; sigaltstack(&ss, 0); sigfillset(&sa.sa_mask); sigaction(SIGSEGV, &sa, 0); if (setjmp(try) < 3) { recurse(0); } else { printf("caught exception!\n"); } return 0; } /* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 85 #endif #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_state.h" #include "nv30_context.h" void nv30_clear(struct pipe_context *pipe, struct pipe_surface *ps, unsigned clearValue) { pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue); } #ifndef CPR_BODY_H #define CPR_BODY_H #include #include #include #include "defines.h" namespace cpr { class Body : public std::string { public: Body() = default; Body(const Body& rhs) = default; Body(Body&& rhs) = default; Body& operator=(const Body& rhs) = default; Body& operator=(Body&& rhs) = default; explicit Body(const char* raw_string) : std::string(raw_string) {} explicit Body(const char* raw_string, size_t length) : std::string(raw_string, length) {} explicit Body(size_t to_fill, char character) : std::string(to_fill, character) {} explicit Body(const std::string& std_string) : std::string(std_string) {} explicit Body(const std::string& std_string, size_t position, size_t length = std::string::npos) : std::string(std_string, position, length) {} explicit Body(std::initializer_list il) : std::string(il) {} template explicit Body(InputIterator first, InputIterator last) : std::string(first, last) {} }; } // namespace cpr #endif #ifndef MEM_H__ #define MEM_H__ #include void *xmalloc (size_t size); void *xcalloc (size_t count, size_t size); void *xrealloc (void *ptr, size_t size); char *xstralloc (size_t len); void *xmemdupz (const void *data, size_t len); char *xstrndup (const char *str, size_t len); void xfree (void *ptr); void xmemreport (void); #endif /* MEM_H__ */ /* Local Variables: mode: C tab-width: 2 indent-tabs-mode: nil End: vim: sw=2:sts=2:expandtab */ #ifndef THM_CONFIG_HG #define THM_CONFIG_HG // Vertex ID type // # of vertices < MAX(thm_Vid) typedef unsigned long thm_Vid; // Arc reference type // # of arcs in any digraph <= MAX(thm_Arcref) typedef unsigned long thm_Arcref; // Block label type // # of blocks < MAX(thm_Blklab) typedef unsigned long thm_Blklab; #endif #pragma once #include "../Controls/Controls.h" #include "../Controls/TabPage.h" /// /// Abstract class that encapsulates functionality for dealing with /// property sheet pages (tabs). /// class SettingsTab : public TabPage { public: SettingsTab(HINSTANCE hInstance, LPCWSTR tabTemplate, LPCWSTR title = L""); ~SettingsTab(); /// Processes messages sent to the tab page. virtual INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); /// Persists changes made on the tab page virtual void SaveSettings() = 0; protected: /// /// Performs intitialization for the tab page, similar to a constructor. /// Since tab page windows are created on demand, this method could be /// called much later than the constructor for the tab. /// virtual void Initialize() = 0; /// Applies the current settings state to the tab page. virtual void LoadSettings() = 0; };#ifndef __HIREDIS_FMACRO_H #define __HIREDIS_FMACRO_H #if defined(__linux__) #define _BSD_SOURCE #define _DEFAULT_SOURCE #endif #if defined(__CYGWIN__) #include #endif #if defined(__sun__) #define _POSIX_C_SOURCE 200112L #else #if !(defined(__APPLE__) && defined(__MACH__)) && !(defined(__FreeBSD__)) #define _XOPEN_SOURCE 600 #endif #endif #if defined(__APPLE__) && defined(__MACH__) #define _OSX #endif #endif #ifndef FUSTATE_H #define FUSTATE_H #include #include #include #include class FUStateManager; class FUState { public: struct FUContext { FUContext(std::shared_ptr window) : renderWindow(window) {} std::shared_ptr renderWindow; }; public: FUState(FUContext context); virtual ~FUState(); virtual void handleEvent(sf::Event &event); virtual void update(sf::Time dt); virtual void draw(); virtual void pause(); virtual void resume(); protected: bool mIsPaused; }; #endif // FUSTATE_H // // OEXRegistrationFieldValidation.h // edXVideoLocker // // Created by Jotiram Bhagat on 03/03/15. // Copyright (c) 2015 edX. All rights reserved. // #import #import "OEXRegistrationFormField.h" @interface OEXRegistrationFieldValidator : NSObject +(NSString *)validateField:(OEXRegistrationFormField *)field withText:(NSString *)currentValue; @end /*========================================================================= Program: Visualization Toolkit Module: Tokenizer.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /* * Copyright 2003 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the * U.S. Government. Redistribution and use in source and binary forms, with * or without modification, are permitted provided that this Notice and any * statement of authorship are reproduced on all copies. */ #include class Tokenizer { public: Tokenizer(const char *s, const char *delim = " \t\n"); Tokenizer(const vtkstd::string &s, const char *delim = " \t\n"); vtkstd::string GetNextToken(); vtkstd::string GetRemainingString() const; bool HasMoreTokens() const; void Reset(); private: vtkstd::string FullString; vtkstd::string Delim; vtkstd::string::size_type Position; }; // Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include #include #include namespace vespalib::tensor::test { template std::unique_ptr makeTensor(const vespalib::eval::TensorSpec &spec) { auto value = DefaultTensorEngine::ref().from_spec(spec); const T *tensor = dynamic_cast(value->as_tensor()); ASSERT_TRUE(tensor); value.release(); return std::unique_ptr(const_cast(tensor)); } } #ifndef BITCOINADDRESSVALIDATOR_H #define BITCOINADDRESSVALIDATOR_H #include /** Base48 entry widget validator. Corrects near-miss characters and refuses characters that are no part of base48. */ class BitcoinAddressValidator : public QValidator { Q_OBJECT public: explicit BitcoinAddressValidator(QObject *parent = 0); State validate(QString &input, int &pos) const; static const int MaxAddressLength = 35; }; #endif // BITCOINADDRESSVALIDATOR_H // // OCErrorMsg.h // Owncloud iOs Client // // Copyright (c) 2014 ownCloud (http://www.owncloud.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // #define kOCErrorServerUnauthorized 401 #define kOCErrorServerForbidden 403 #define kOCErrorServerPathNotFound 404 #define kOCErrorProxyAuth 407 #define kOCErrorServerTimeout 408 // // ASFRequestBuilder.h // ASFFeedly // // Created by Anton Simakov on 12/12/13. // Copyright (c) 2013 Anton Simakov. All rights reserved. // #import extern NSURL *ASFURLByAppendingParameters(NSURL *URL, NSDictionary *parameters); extern NSString *ASFQueryFromURL(NSURL *URL); extern NSString *ASFQueryFromParameters(NSDictionary *parameters); extern NSString *ASFURLEncodedString(NSString *string); extern NSString *ASFURLDecodedString(NSString *string); extern NSDictionary *ASFParametersFromQuery(NSString *query); @interface ASFRequestBuilder : NSObject + (NSMutableURLRequest *)requestWithMethod:(NSString *)method URLString:(NSString *)URLString parameters:(NSDictionary *)parameters token:(NSString *)token error:(NSError *__autoreleasing *)error; + (NSMutableURLRequest *)requestWithURL:(NSURL *)URL method:(NSString *)method parameters:(NSDictionary *)parameters error:(NSError *__autoreleasing *)error; @end #include #include typedef struct Poly Poly; struct Poly { int32_t coef; int32_t abc; Poly *link; }; int add(Poly *q, Poly *p); Poly *avail; int main(int argc, char **argv) { Poly *pool, *p; pool = calloc(500, sizeof(*pool)); for(p = pool; p < pool+499; p++) p->link = p+1; p->link = NULL; avail = pool; exit(0); } // // BBASearchSuggestionsResult.h // BBBAPI // // Created by Owen Worley on 12/01/2015. // Copyright (c) 2015 Blinkbox Entertainment Ltd. All rights reserved. // #import @class FEMObjectMapping; /** * Represents data returned from the book search suggestions service (search/suggestions) */ @interface BBASearchSuggestionsResult : NSObject @property (nonatomic, copy) NSString *type; @property (nonatomic, copy) NSArray *items; /** * Describes the mapping of server search result data to `BBASearchSuggestionsResult` */ + (FEMObjectMapping *) searchSuggestionsResultMapping; @end /* Main program for TGL (Text Generation Language). */ #include #include #include #include #include int main(int argc, char** argv) { printf("hello world\n"); return 0; } #include #include #include #include "game.h" #include "ui.h" static void shutdown(void); int main(int argc, char ** argv) { srand(time(NULL)); initscr(); cbreak(); noecho(); curs_set(0); keypad(stdscr, TRUE); start_color(); init_pair(color_black, COLOR_BLACK, COLOR_BLACK); init_pair(color_yellow, COLOR_YELLOW, COLOR_BLACK); init_pair(color_blue, COLOR_BLUE, COLOR_BLACK); init_pair(color_red, COLOR_RED, COLOR_BLACK); init_pair(color_green, COLOR_GREEN, COLOR_BLACK); init_pair(color_cyan, COLOR_CYAN, COLOR_BLACK); init_pair(color_magenta, COLOR_MAGENTA, COLOR_BLACK); if (LINES < 24 || COLS < 80) { shutdown(); printf("Terminal too small."); exit(1); } do { erase(); new_game(); } while (play()); shutdown(); return 0; } static void shutdown(void) { endwin(); return; } // // NSDate+GTTimeAdditions.h // ObjectiveGitFramework // // Created by Danny Greg on 27/03/2013. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import #import "git2.h" @interface NSDate (GTTimeAdditions) // Creates a new `NSDate` from the provided `git_time`. // // time - The `git_time` to base the returned date on. // timeZone - The timezone used by the time passed in. // // Returns an `NSDate` object representing the passed in `time`. + (NSDate *)gt_dateFromGitTime:(git_time)time timeZone:(NSTimeZone **)timeZone; // Converts the date to a `git_time`. // // timeZone - An `NSTimeZone` to describe the time offset. This is optional, if // `nil` the default time zone will be used. - (git_time)gt_gitTimeUsingTimeZone:(NSTimeZone *)timeZone; @end @interface NSTimeZone (GTTimeAdditions) // The difference, in minutes, between the current default timezone and GMT. @property (nonatomic, readonly) int gt_gitTimeOffset; @end //===-- GenericValue.h - Represent any type of LLVM value -------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // The GenericValue class is used to represent an LLVM value of arbitrary type. // //===----------------------------------------------------------------------===// #ifndef GENERIC_VALUE_H #define GENERIC_VALUE_H #include "Support/DataTypes.h" namespace llvm { typedef uint64_t PointerTy; union GenericValue { bool BoolVal; unsigned char UByteVal; signed char SByteVal; unsigned short UShortVal; signed short ShortVal; unsigned int UIntVal; signed int IntVal; uint64_t ULongVal; int64_t LongVal; double DoubleVal; float FloatVal; PointerTy PointerVal; unsigned char Untyped[8]; GenericValue() {} GenericValue(void *V) { PointerVal = (PointerTy)(intptr_t)V; } }; inline GenericValue PTOGV(void *P) { return GenericValue(P); } inline void* GVTOP(const GenericValue &GV) { return (void*)(intptr_t)GV.PointerVal; } } // End llvm namespace #endif #ifndef _PKG_UTIL_H #define _PKG_UTIL_H #include #include #include #define ARRAY_INIT {0, 0, NULL} struct array { size_t cap; size_t len; void **data; }; #define STARTS_WITH(string, needle) (strncasecmp(string, needle, strlen(needle)) == 0) #define ERROR_SQLITE(db) \ EMIT_PKG_ERROR("sqlite: %s", sqlite3_errmsg(db)) int sbuf_set(struct sbuf **, const char *); const char * sbuf_get(struct sbuf *); void sbuf_reset(struct sbuf *); void sbuf_free(struct sbuf *); int mkdirs(const char *path); int file_to_buffer(const char *, char **, off_t *); int format_exec_cmd(char **, const char *, const char *, const char *); int split_chr(char *, char); int file_fetch(const char *, const char *); int is_dir(const char *); int is_conf_file(const char *path, char newpath[MAXPATHLEN]); int sha256_file(const char *, char[65]); void sha256_str(const char *, char[65]); #endif /** * @file * @brief Paranoia checks of doubly-linked lists * * @date 05.12.2013 * @author Eldar Abusalimov */ #include #include #include #if DLIST_DEBUG_VERSION void __dlist_debug_check(const struct dlist_head *head) { const struct dlist_head *p = head->prev; const struct dlist_head *n = head->next; uintptr_t poison = head->poison; assertf(((!poison || (void *) ~poison == head) && n->prev == head && p->next == head), "\n" "head: %p, poison: %p, ~poison: %p,\n" "n: %p, n->prev: %p,\n" "p: %p, p->next: %p\n", head, (void *)poison, (void *) ~poison, n, n->prev, p, p->next); } #endif #include int main() { printf("hello, world\n"); }#include int int_func(void) { return 42; } float float_func(void) { return 13.5f; } int main(int argc, char *argv[]) { printf("calltest.c\n"); printf(" Calling int function: %d\n", int_func()); printf(" Calling float function: %f\n", float_func()); return 0; } /* * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in * the LICENSE file in the root directory of this source tree. An * additional grant of patent rights can be found in the PATENTS file * in the same directory. * */ #include #include #include #include #include #include #include "util.h" #include "autocmd.h" #include "fs.h" #include "child.h" #include "net.h" #include "strutil.h" #include "constants.h" FORWARD(start_daemon); #if !FBADB_MAIN #include "stubdaemon.h" int start_daemon_main(const struct cmd_start_daemon_info* info) { struct cmd_stub_info sinfo = { .stub.listen = true, .stub.daemonize = true, .stub.replace = info->start_daemon.replace, }; return stub_main(&sinfo); } #endif /* Copyright (c) 2016, Nokia * Copyright (c) 2016, ENEA Software AB * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef __OFP_EPOLL_H__ #define __OFP_EPOLL_H__ #include typedef union ofp_epoll_data { void *ptr; int fd; uint32_t u32; uint64_t u64; } ofp_epoll_data_t; struct ofp_epoll_event { uint32_t events; ofp_epoll_data_t data; }; enum OFP_EPOLL_EVENTS { OFP_EPOLLIN = 0x001, #define OFP_EPOLLIN OFP_EPOLLIN }; #define OFP_EPOLL_CTL_ADD 1 #define OFP_EPOLL_CTL_DEL 2 #define OFP_EPOLL_CTL_MOD 3 int ofp_epoll_create(int size); int ofp_epoll_ctl(int epfd, int op, int fd, struct ofp_epoll_event *event); int ofp_epoll_wait(int epfd, struct ofp_epoll_event *events, int maxevents, int timeout); #endif #ifndef _IRC_H #define _IRC_H #define NICK "slackboat" #define SERVER "irc.what.cd" #define PASSWORD "thisistheonlygoodbot" void irc_notice_event(char *, char *, char *); void irc_welcome_event(void); void irc_privmsg_event(char *, char *, char *); void irc_privmsg(const char *, const char *); void irc_join_channel(const char *); #endif #include "ring.h" /* OpenGL 1.1 Extension Copyright (c) 2017 Mahmoud Fayed */ #include #include RING_FUNC(ring_get_gl_zero) { RING_API_RETNUMBER(GL_ZERO); } RING_FUNC(ring_get_gl_false) { RING_API_RETNUMBER(GL_FALSE); } RING_FUNC(ring_get_gl_logic_op) { RING_API_RETNUMBER(GL_LOGIC_OP); } RING_FUNC(ring_get_gl_none) { RING_API_RETNUMBER(GL_NONE); } RING_API void ringlib_init(RingState *pRingState) { ring_vm_funcregister("get_gl_zero",ring_get_gl_zero); ring_vm_funcregister("get_gl_false",ring_get_gl_false); ring_vm_funcregister("get_gl_logic_op",ring_get_gl_logic_op); ring_vm_funcregister("get_gl_none",ring_get_gl_none); } #pragma once void draw_seconds(GContext *ctx, uint8_t seconds, Layer *layer); void draw_minutes(GContext *ctx, uint8_t minutes, Layer *layer); void draw_hours(GContext *ctx, uint8_t hours, Layer *layer); #ifndef _ASM_POWERPC_BYTEORDER_H #define _ASM_POWERPC_BYTEORDER_H /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include #endif /* _ASM_POWERPC_BYTEORDER_H */ // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_ #define CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_ #include #include #include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "content/common/content_export.h" namespace content { struct ResourceDevToolsInfo : base::RefCounted { typedef std::vector > HeadersVector; CONTENT_EXPORT ResourceDevToolsInfo(); int32 http_status_code; std::string http_status_text; HeadersVector request_headers; HeadersVector response_headers; std::string request_headers_text; std::string response_headers_text; private: friend class base::RefCounted; CONTENT_EXPORT ~ResourceDevToolsInfo(); }; } // namespace content #endif // CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_ #include "lua.h" #include "lua_debug.h" int main() { return 0; } // // NSDictionary+BONEquality.h // BonMot // // Created by Zev Eisenberg on 7/11/15. // Copyright © 2015 Zev Eisenberg. All rights reserved. // @import Foundation; @import CoreGraphics.CGBase; OBJC_EXTERN const CGFloat kBONCGFloatEpsilon; OBJC_EXTERN BOOL BONCGFloatsCloseEnough(CGFloat float1, CGFloat float2); // clang-format off @interface NSDictionary (BONEquality) - (BOOL)bon_isCloseEnoughEqualToDictionary : (NSDictionary *_Nullable)dictionary; @end // clang-format off // // AXTabBar.h // Pods // #import typedef enum : NSUInteger { AXTabBarStyleDefault = 0, AXTabBarStyleVariableWidthButton, } AXTabBarStyle; @class AXTabBar; @protocol AXTabBarDelegate @optional - (BOOL)tabBar:(AXTabBar *)tabBar shouldSelectItem:(UITabBarItem *)item; - (void)tabBar:(AXTabBar *)tabBar didSelectItem:(UITabBarItem *)item; @end @interface AXTabBar : UIView @property (copy, nonatomic) NSArray *items; @property (assign, nonatomic) UITabBarItem *selectedItem; @property (assign, nonatomic) id delegate; @property (strong, nonatomic) UIFont *tabBarButtonFont; // TODO: implement this style option. //@property (nonatomic) AXTabBarStyle tabBarStyle; @end #include #ifndef ENV_NAME # define ENV_NAME "host" #endif int main(int argc, char* argv) { printf("Hello World from Rebuild environment " ENV_NAME "\n"); return 0; } #pragma once #include #include #include #include "binaryninjaapi.h" #include "dockhandler.h" #include "uitypes.h" class ContextMenuManager; class DisassemblyContainer; class Menu; class ViewFrame; class BINARYNINJAUIAPI ReflectionView: public QWidget, public DockContextHandler { Q_OBJECT Q_INTERFACES(DockContextHandler) ViewFrame* m_frame; BinaryViewRef m_data; DisassemblyContainer* m_disassemblyContainer; public: ReflectionView(ViewFrame* frame, BinaryViewRef data); ~ReflectionView(); virtual void notifyOffsetChanged(uint64_t offset) override; virtual void notifyViewChanged(ViewFrame* frame) override; virtual bool shouldBeVisible(ViewFrame* frame) override; protected: virtual void contextMenuEvent(QContextMenuEvent* event) override; }; // // OCTFileContent.h // OctoKit // // Created by Aron Cedercrantz on 14-07-2013. // Copyright (c) 2013 GitHub. All rights reserved. // #import "OCTContent.h" // A file in a git repository. @interface OCTFileContent : OCTContent // The encoding of the file content. @property (nonatomic, copy, readonly) NSString *encoding; // The raw, encoded, content of the file. // // See encoding for the encoding used. @property (nonatomic, copy, readonly) NSString *content; @end // RUN: %llvmgcc %s -S -fnested-functions -o - | grep {sret *%agg.result} struct X { int m, n; }; struct X p(int n) { struct X c(int m) { struct X x; x.m = m; x.n = n; return x; } return c(n); } // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_AURA_AURA_SWITCHES_H_ #define UI_AURA_AURA_SWITCHES_H_ #pragma once namespace switches { extern const char kAuraHostWindowSize[]; extern const char kAuraWindows[]; } // namespace switches #endif // UI_AURA_AURA_SWITCHES_H_ C $Header$ C $Name$ c Land Grid Horizontal Dimension (Number of Tiles) c ------------------------------------------------ integer nchp, maxtyp parameter (maxtyp = 10) c parameter (nchp = sNx*sNy*maxtyp) parameter (nchp = 2048) // // PBMacros.h // pblib // // Created by haxpor on 3/5/15. // Copyright (c) 2015 Maethee Chongchitnant. All rights reserved. // #ifndef pblib_PBMacros_h #define pblib_PBMacros_h #define PB_IS_NSNull(obj) ((obj == (id)[NSNull null]) ? YES : NO) #define PB_IS_NIL_OR_NSNull(obj) ((obj == nil) || (obj == (id)[NSNull null]) ? YES : NO) #endif #ifndef _SERVER_H #define _SERVER_H #include #include #include "list.h" #include "threadpool.h" int open_listenfd(int port); void* check_connections(void* data); struct http_socket { int fd; /*struct pollfd* poll_fd;*/ struct epoll_event event; char* read_buffer; int read_buffer_size; time_t last_access; struct list_elem elem; }; struct future_elem { struct future* future; struct list_elem elem; }; #endif // REQUIRES: clang-driver // REQUIRES: powerpc-registered-target // REQUIRES: nvptx-registered-target // // Verify that CUDA device commands do not get OpenMP flags. // // RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp %s 2>&1 \ // RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE // // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu" // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" "-z" "relro" "--hash-style=gnu" "--eh-frame-hdr" "-m" "elf64lppc" #ifndef CALLER_CONFIGURABLE_CLASS_WRAPPER_H #define CALLER_CONFIGURABLE_CLASS_WRAPPER_H #include #include #include #include "cleanup_handle.h" namespace nodegit { class Context; template class ConfigurableClassWrapper : public CleanupHandle { public: typedef typename Traits::cType cType; typedef typename Traits::configurableCppClass configurableCppClass; struct v8ConversionResult { v8ConversionResult(std::string _error) : error(std::move(_error)), result(nullptr) {} v8ConversionResult(std::shared_ptr _result) : result(std::move(_result)) {} std::string error; std::shared_ptr result; }; // We copy the entity ConfigurableClassWrapper(nodegit::Context *_nodeGitContext) : nodegitContext(_nodeGitContext), raw(nullptr) {} virtual ~ConfigurableClassWrapper() { if (raw != nullptr) { delete raw; raw = nullptr; } } const Context *nodegitContext = nullptr; cType *GetValue() { return raw; } protected: cType *raw; std::vector> childCleanupVector; }; } #endif // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_ #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_ #pragma once namespace extension_management_api_constants { // Keys used for incoming arguments and outgoing JSON data. extern const char kAppLaunchUrlKey[]; extern const char kDescriptionKey[]; extern const char kEnabledKey[]; extern const char kDisabledReasonKey[]; extern const char kHomepageUrlKey[]; extern const char kHostPermissionsKey[]; extern const char kIconsKey[]; extern const char kIdKey[]; extern const char kIsAppKey[]; extern const char kNameKey[]; extern const char kOfflineEnabledKey[]; extern const char kOptionsUrlKey[]; extern const char kPermissionsKey[]; extern const char kMayDisableKey[]; extern const char kSizeKey[]; extern const char kUpdateUrlKey[]; extern const char kUrlKey[]; extern const char kVersionKey[]; // Values for outgoing JSON data. extern const char kDisabledReasonPermissionsIncrease[]; extern const char kDisabledReasonUnknown[]; // Error messages. extern const char kExtensionCreateError[]; extern const char kGestureNeededForEscalationError[]; extern const char kManifestParseError[]; extern const char kNoExtensionError[]; extern const char kNotAnAppError[]; extern const char kUserCantDisableError[]; extern const char kUserDidNotReEnableError[]; } // namespace extension_management_api_constants #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_ #ifndef TIMER_H_ #define TIMER_H_ 1 /* * By default, the timer calls the function a few extra times that aren't * measured to get it into cache and ensure more consistent running times. * Specifying this option in flags will stop this. */ #define TIMER_NO_EXTRA 1 struct timer { unsigned long long ns; unsigned int reps; }; /* * Measures function 'func'. Sets timer->ns to the number of nanoseconds it took, * and timer->reps to the number of repetitions. Uses the existing values of * timer->ns and timer->reps as maximums - it won't do any more repetitions or take * significantly more time than those specify. However, you can set one of them * to 0 to make it unlimited. 0 is returned on success, -1 on failure. */ int timer_measure(void (*func)(void), struct timer *timer, int flags); // These next functions are shortcuts that use timer_measure and use the // default flags. int timer_measure_ms(void (*func)(void), unsigned long long ms, struct timer *timer); int timer_measure_reps(void (*func)(void), unsigned int reps, struct timer *timer); #endif /* * Author: NagaChaitanya Vellanki * * TRY/THROW/CATCH/FINALLY - example * Reference: http://www.di.unipi.it/~nids/docs/longjump_try_trow_catch.html * */ #include #include #include #define FOO_EXCEPTION (1) #define BAR_EXCEPTION (2) #define GOO_EXCEPTION (3) #define TRY do{ jmp_buf env; switch(setjmp(env)) { case 0: while(1) { #define CATCH(exception) break; case exception: #define FINALLY break; } default: #define END_TRY } }while(0) #define THROW(exception) longjmp(env, exception) int main(int argc, char *argv[]) { TRY { printf("In TRY statement\n"); THROW(GOO_EXCEPTION); printf("not reachable\n"); } CATCH(FOO_EXCEPTION) { printf("FOO exception caught\n"); } CATCH(BAR_EXCEPTION) { printf("BAR exception caught\n"); } CATCH(GOO_EXCEPTION) { printf("GOO exception caught\n"); } FINALLY { printf("Finally \n"); } END_TRY; exit(EXIT_SUCCESS); } /* * Copyright (C) 2016 Kaspar Schleiser * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @ingroup tests * @{ * * @file * @brief ssp test application * * This test should crash badly when *not* using the ssp module, and panic if * using it. * * @author Kaspar Schleiser * * @} */ #include #include void test_func(void) { char buf[16]; /* cppcheck-suppress bufferAccessOutOfBounds * (reason: deliberately overflowing stack) */ memset(buf, 0, 32); } int main(void) { puts("calling stack corruption function"); test_func(); puts("back to main"); return 0; } /* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #ifndef __LIBSEL4_ARCH_MAPPING #define __LIBSEL4_ARCH_MAPPING #define SEL4_MAPPING_LOOKUP_LEVEL 2 #define SEL4_MAPPING_LOOKUP_NO_PT 22 static inline seL4_Word seL4_MappingFailedLookupLevel() { return seL4_GetMR(SEL4_MAPPING_LOOKUP_LEVEL); } #endif #pragma once #include #include #define PHS_NCOLS 64 int lyra2(char *key, uint32_t keylen, const char *pwd, uint32_t pwdlen, const char *salt, uint32_t saltlen, uint32_t R, uint32_t C, uint32_t T); int PHS(void *out, size_t outlen, const void *in, size_t inlen, const void *salt, size_t saltlen, unsigned int t_cost, unsigned int m_cost); // // DataUtils.h // CFC_Tracker // // Created by Kalyanaraman Shankari on 3/9/15. // Copyright (c) 2015 Kalyanaraman Shankari. All rights reserved. // #import #import @interface BEMServerSyncCommunicationHelper: NSObject // Top level method + (void) backgroundSync:(void (^)(UIBackgroundFetchResult))completionHandler; // Wrappers around the communication methods + (void) pushAndClearUserCache:(void (^)(BOOL))completionHandler; + (void) pullIntoUserCache:(void (^)(BOOL))completionHandler; + (void) pushAndClearStats:(void (^)(BOOL))completionHandler; // Communication methods (copied from communication handler to make it generic) +(void)phone_to_server:(NSArray*) entriesToPush completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; +(void)server_to_phone:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; +(void)setClientStats:(NSDictionary*)statsToSend completionHandler:(void (^)(NSData *data, NSURLResponse *response, NSError *error))completionHandler; + (NSInteger)fetchedData:(NSData *)responseData; @end #define CHAR_BIT 8 #define INT_MAX 2147483647 #define INT_MIN -2147483648 #define LONG_MAX 0x7fffffffffffffffL #define LONG_MIN -0x8000000000000000L #define SCHAR_MAX 127 #define SCHAR_MIN -128 #define CHAR_MAX 127 #define CHAR_MIN -128 #define SHRT_MAX 32767 #define SHRT_MIN -32768 #define UCHAR_MAX 255 #define USHRT_MAX 65535 #define UINT_MAX 0xffffffff #define ULONG_MAX 0xffffffffffffffffUL // // SDLMacros.h // SmartDeviceLink-iOS // // Created by Muller, Alexander (A.) on 10/17/16. // Copyright © 2016 smartdevicelink. All rights reserved. // #ifndef SDLMacros_h #define SDLMacros_h // Resolves issue of pre-xcode 8 versions due to NS_STRING_ENUM unavailability. #ifndef SDL_SWIFT_ENUM #if __has_attribute(NS_STRING_ENUM) #define SDL_SWIFT_ENUM NS_STRING_ENUM #else #define SDL_SWIFT_ENUM #endif #endif #endif /* SDLMacros_h */ // // Paystack.h // Paystack // // Created by Ibrahim Lawal on 02/02/16. // Copyright (c) 2016 Paystack. All rights reserved. // // The code in this workspace was adapted from https://github.com/stripe/stripe-ios. // Stripe was replaced with Paystack - and STP with PSTCK - to avoid collisions within // apps that are using both Paystack and Stripe. #import #import #import #import #import #import #import #import #import #import #if TARGET_OS_IPHONE #import #endif /* kngrouppropdlg.h KNode, the KDE newsreader Copyright (c) 1999-2001 the KNode authors. See file AUTHORS for details This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US */ #ifndef KNGROUPPROPDLG_H #define KNGROUPPROPDLG_H #include class QCheckBox; class KLineEdit; class KNGroup; namespace KNConfig { class IdentityWidget; }; class KNGroupPropDlg : public KDialogBase { public: KNGroupPropDlg(KNGroup *group, QWidget *parent=0, const char *name=0); ~KNGroupPropDlg(); bool nickHasChanged() { return n_ickChanged; } protected: KNGroup *g_rp; bool n_ickChanged; KNConfig::IdentityWidget* i_dWidget; KLineEdit *n_ick; QCheckBox *u_seCharset; QComboBox *c_harset; protected slots: void slotOk(); }; #endif #ifndef __MACROS_H__ #define __MACROS_H__ /** * @file macros.h * * This file contains simple helper macros */ /** * @addtogroup internal_util_helper_macros "(internal) helper macros" * * This group contains helper macros for internal use only. * * @{ */ /** * Computes the maximum value of the two passed values * * @note Provides compile-time type checking by using temp variables before * doing the comparison. * * @note Opens own scope, so the temp variables do not show up outside of the * macro. */ #define MAX(x,y) \ ((__typeof__(x)) x > (__typeof__(x)) y ? \ (__typeof__(x)) x : (__typeof__(x)) y) /** * Computes the minimum value of the two passed values * * @note Provides compile-time type checking by using temp variables before * doing the comparison. * * @note Opens own scope, so the temp variables do not show up outside of the * macro. */ #define MIN(x,y) \ ({ __typeof__ (x) _x = (x); \ __typeof__ (y) _y = (y); \ _x < _y ? _x : _y; }) /** @} */ #endif //__MACROS_H__ #ifndef DIRECTORY_H #define DIRECTORY_H #if defined (ULTRIX42) || defined(ULTRIX43) /* _POSIX_SOURCE should have taken care of this, */ #define __POSIX /* but for some reason the ULTRIX version of dirent.h */ #endif /* is not POSIX conforming without it... */ #include class Directory { public: Directory( const char *name ); ~Directory(); void Rewind(); char *Next(); private: DIR *dirp; }; #endif #pragma once #include /** * Support for using JNI in a multi-threaded environment. */ class JniSupport { public: JniSupport(JavaVM* jvm); JniSupport(JNIEnv* env); protected: jclass findClass(const char* className); JNIEnv* getThreadEnv(); protected: JavaVM* jvm; }; /** * Attach a native thread to JNI. */ class JniThreadAttacher : public JniSupport { public: JniThreadAttacher(JavaVM* jvm, const char* name, bool daemon); ~JniThreadAttacher(); }; /* * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include #include #include "rpi3_private.h" /* Get 128 bits of entropy and fuse the values together to form the canary. */ #define TRNG_NBYTES 16U u_register_t plat_get_stack_protector_canary(void) { size_t i; u_register_t buf[TRNG_NBYTES / sizeof(u_register_t)]; u_register_t ret = 0U; rpi3_rng_read(buf, sizeof(buf)); for (i = 0U; i < ARRAY_SIZE(buf); i++) ret ^= buf[i]; return ret; } #include "../rts/PosixSource.h" #include "Rts.h" #include "HsFFI.h" int main (int argc, char *argv[]) { RtsConfig conf = defaultRtsConfig; // We never know what symbols GHC will look up in the future, so // we must retain CAFs for running interpreted code. conf.keep_cafs = 1; extern StgClosure ZCMain_main_closure; hs_main(argc, argv, &ZCMain_main_closure, conf); } // // PKTClient.h // PodioKit // // Created by Sebastian Rehnby on 16/01/14. // Copyright (c) 2014 Citrix Systems, Inc. All rights reserved. // #import "PKTRequest.h" #import "PKTResponse.h" #import "PKTRequestSerializer.h" #import "PKTResponseSerializer.h" typedef void(^PKTRequestCompletionBlock)(PKTResponse *response, NSError *error); @interface PKTHTTPClient : NSObject @property (nonatomic, copy, readonly) NSURL *baseURL; @property (nonatomic, strong, readonly) PKTRequestSerializer *requestSerializer; @property (nonatomic, strong, readonly) PKTResponseSerializer *responseSerializer; /** * Controls whether or not to pin the server public key to that of any .cer certificate included in the app bundle. */ @property (nonatomic) BOOL useSSLPinning; - (NSURLSessionTask *)taskForRequest:(PKTRequest *)request completion:(PKTRequestCompletionBlock)completion; @end #include #include "lib/proc.h" int main(int argc, char **argv) { char* gitbuff; int out = run_proc(&gitbuff, "git", "branch", "--list", 0); //int out = run_proc(&gitbuff, "ls", "-l", "-h", 0); if (out != 0) { fprintf(stderr, "Error running subprocess:%d\n", out); exit(1); } //printf("run_proc exit code = %d\nresponse= '''%s'''\n", out, gitbuff); char *br; br = gitbuff; putchar('('); while(*br++ != '*') {} // skip the '*' and the space after it br++; while(*br != '\n') { putchar(*br++); } putchar(')'); putchar('\n'); } // // Prefix header for all source files of the 'Pester' target in the 'Pester' project // #import "NJROperatingSystemVersion.h"// // SecretConstant.example.h // PHPHub // // Created by Aufree on 9/30/15. // Copyright (c) 2015 ESTGroup. All rights reserved. // #define Client_id @"kHOugsx4dmcXwvVbmLkd" #define Client_secret @"PuuFCrF94MloSbSkxpwS" #define UMENG_APPKEY @"Set up UMEng App Key" #define UMENG_QQ_ID @"Set up qq id" #define UMENG_QQ_APPKEY @"Set up qq appkey" #define WX_APP_ID @"Set up weixin app id" #define WX_APP_SECRET @"Set up weixin app secret" #define TRACKING_ID @"Set up google anlytics tracking id"#pragma once #if defined(_MSC_VER) #define DLL_API __declspec(dllexport) #define STDCALL __stdcall #define CDECL __cdecl #else #define DLL_API __attribute__ ((visibility ("default"))) #define STDCALL __attribute__((stdcall)) #define CDECL __attribute__((cdecl)) #endif #define CS_OUT// // APIRouter.h // APIClient // // Created by Klaas Pieter Annema on 14-09-13. // Copyright (c) 2013 Klaas Pieter Annema. All rights reserved. // #import #import "APIInflector.h" @protocol APIRouter @property (nonatomic, readonly, strong) id inflector; - (NSString *)pathForAction:(NSString *)action onResource:(Class)resource; @end @interface APIRouter : NSObject - (id)initWithInflector:(id)inflector; - (NSString *)pathForAction:(NSString *)action onResource:(Class)resource; @end /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SRC_TRACE_PROCESSOR_TYPES_VERSION_NUMBER_H_ #define SRC_TRACE_PROCESSOR_TYPES_VERSION_NUMBER_H_ #include namespace perfetto { namespace trace_processor { struct VersionNumber { uint32_t major; uint32_t minor; bool operator==(const VersionNumber& other) { return std::tie(major, minor) == std::tie(other.major, other.minor); } bool operator<(const VersionNumber& other) { return std::tie(major, minor) < std::tie(other.major, other.minor); } bool operator>=(const VersionNumber& other) { return std::tie(major, minor) >= std::tie(other.major, other.minor); } }; } // namespace trace_processor } // namespace perfetto #endif // SRC_TRACE_PROCESSOR_TYPES_VERSION_NUMBER_H_ #ifdef E_TYPEDEFS #else # ifndef E_SMART_MONITOR_H # define E_SMART_MONITOR_H # endif #endif //===-- ipcreg_internal.h -------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // Internal types and data for IPC registration logic // //===----------------------------------------------------------------------===// #ifndef _IPCREG_INTERNAL_H_ #define _IPCREG_INTERNAL_H_ #include "ipcd.h" #include typedef enum { STATE_UNOPT = 0, STATE_ID_EXCHANGE, STATE_OPTIMIZED, STATE_LOCALFD } EndpointState; typedef struct { size_t bytes_trans; int localfd; endpoint ep; EndpointState state; bool valid; } ipc_info; // For now, just index directly into pre-allocate table with fd. // We will also need a way to go from nonce to fd! const unsigned TABLE_SIZE = 1 << 10; extern ipc_info IpcDescTable[TABLE_SIZE]; static inline char inbounds_fd(int fd) { return (unsigned)fd <= TABLE_SIZE; } static inline ipc_info *getFDDesc(int fd) { assert(inbounds_fd(fd)); return &IpcDescTable[fd]; } #endif // _IPCREG_INTERNAL_H_ /* * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ #include "e.h" #include /* a tricky little devil, requires e and it's libs to be built * with the -rdynamic flag to GCC for any sort of decent output. */ void e_sigseg_act(int x, siginfo_t *info, void *data){ void *array[255]; size_t size; write(2, "**** SEGMENTATION FAULT ****\n", 29); write(2, "**** Printing Backtrace... *****\n\n", 34); size = backtrace(array, 255); backtrace_symbols_fd(array, size, 2); exit(-11); } #ifndef APIMOCK_H #define APIMOCK_H #include "core/server.h" #endif// // OctoKit.h // OctoKit // // Created by Piet Brauer on 25/08/15. // Copyright (c) 2015 nerdish by nature. All rights reserved. // #import //! Project version number for OctoKit. FOUNDATION_EXPORT double OctoKitVersionNumber; //! Project version string for OctoKit. FOUNDATION_EXPORT const unsigned char OctoKitVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import #ifndef LZ4MT_COMPAT_H #define LZ4MT_COMPAT_H namespace Lz4Mt { unsigned getHardwareConcurrency(); struct launch { #if defined(_MSC_VER) typedef std::launch::launch Type; #else typedef std::launch Type; #endif static const Type deferred; static const Type async; }; } #endif /* * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include /* mbed TLS headers */ #include #include /* * mbed TLS heap */ #if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA) #define MBEDTLS_HEAP_SIZE (14*1024) #elif (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA) #define MBEDTLS_HEAP_SIZE (8*1024) #endif static unsigned char heap[MBEDTLS_HEAP_SIZE]; /* * mbed TLS initialization function */ void mbedtls_init(void) { static int ready; if (!ready) { /* Initialize the mbed TLS heap */ mbedtls_memory_buffer_alloc_init(heap, MBEDTLS_HEAP_SIZE); /* Use reduced version of snprintf to save space. */ mbedtls_platform_set_snprintf(tf_snprintf); ready = 1; } } #ifndef _TOKU_DIRENT_H #define _TOKU_DIRENT_H #if defined(__cplusplus) extern "C" { #endif //The DIR functions do not exist in windows, but the Linux API ends up //just using a wrapper. We might convert these into an toku_os_* type api. enum { DT_UNKNOWN = 0, DT_DIR = 4, DT_REG = 8 }; struct dirent { char d_name[_MAX_PATH]; unsigned char d_type; }; struct __toku_windir; typedef struct __toku_windir DIR; DIR *opendir(const char *name); struct dirent *readdir(DIR *dir); int closedir(DIR *dir); #ifndef NAME_MAX #define NAME_MAX 255 #endif #if defined(__cplusplus) }; #endif #endif /* * Copyright (c) 2012-2016 Israel Jacquez * See LICENSE for details. * * Israel Jacquez */ #include #include #include #include #include #include void __noreturn internal_exception_show(const char *buffer) { /* Reset the VDP1 */ vdp1_init(); /* Reset the VDP2 */ vdp2_init(); vdp2_tvmd_display_res_set(TVMD_INTERLACE_NONE, TVMD_HORZ_NORMAL_A, TVMD_VERT_224); vdp2_scrn_back_screen_color_set(VRAM_ADDR_4MBIT(0, 0x01FFFE), COLOR_RGB555(0, 7, 0)); vdp2_tvmd_display_set(); cons_init(CONS_DRIVER_VDP2, 40, 28); cons_buffer(buffer); vdp2_tvmd_vblank_out_wait(); vdp2_tvmd_vblank_in_wait(); vdp2_commit(); cons_flush(); abort(); } /* * Copyright © 2017 AperLambda * * This file is part of λcommon. * * Licensed under the MIT license. For more information, * see the LICENSE file. */ #ifndef LAMBDACOMMON_DOCUMENT_H #define LAMBDACOMMON_DOCUMENT_H #include "../lambdacommon.h" #include namespace lambdacommon { class LAMBDACOMMON_API Content {}; class LAMBDACOMMON_API Document {}; } #endif //LAMBDACOMMON_DOCUMENT_H/*********************************** LICENSE **********************************\ * Copyright 2017 Morphux * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * \******************************************************************************/ #ifndef M_TYPES_H # define M_TYPES_H /* Generic types */ typedef signed char s8_t; typedef signed short s16_t; typedef signed int s32_t; typedef signed long long s64_t; typedef unsigned char u8_t; typedef unsigned short u16_t; typedef unsigned int u32_t; typedef unsigned long long u64_t; #endif /* M_TYPES_H */ /* * This file is part of meego-im-framework * * * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * Contact: Nokia Corporation (directui@nokia.com) * * If you have questions regarding the use of this file, please contact * Nokia at directui@nokia.com. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1 as published by the Free Software Foundation * and appearing in the file LICENSE.LGPL included in the packaging * of this file. */ #ifndef CORE_UTILS_H__ #define CORE_UTILS_H__ #include #include namespace MaliitTestUtils { bool isTestingInSandbox(); QString getTestPluginPath(); QString getTestDataPath(); void waitForSignal(const QObject* object, const char* signal, int timeout); void waitAndProcessEvents(int waitTime); } #endif // CORE_UTILS_H__ #import #import typedef enum { UILabelCountingMethodEaseInOut, UILabelCountingMethodEaseIn, UILabelCountingMethodEaseOut, UILabelCountingMethodLinear } UILabelCountingMethod; typedef NSString* (^UICountingLabelFormatBlock)(float value); typedef NSAttributedString* (^UICountingLabelAttributedFormatBlock)(float value); @interface UICountingLabel : UILabel @property (nonatomic, strong) NSString *format; @property (nonatomic, assign) UILabelCountingMethod method; @property (nonatomic, assign) NSTimeInterval animationDuration; @property (nonatomic, copy) UICountingLabelFormatBlock formatBlock; @property (nonatomic, copy) UICountingLabelAttributedFormatBlock attributedFormatBlock; @property (nonatomic, copy) void (^completionBlock)(); -(void)countFrom:(float)startValue to:(float)endValue; -(void)countFrom:(float)startValue to:(float)endValue withDuration:(NSTimeInterval)duration; -(void)countFromCurrentValueTo:(float)endValue; -(void)countFromCurrentValueTo:(float)endValue withDuration:(NSTimeInterval)duration; -(void)countFromZeroTo:(float)endValue; -(void)countFromZeroTo:(float)endValue withDuration:(NSTimeInterval)duration; - (CGFloat)currentValue; @end #ifndef StringUtils_h #define StringUtils_h #include #include namespace CCMessageWindow { class Utils { public: static std::string substringUTF8(const char* str, int from, int length); static std::vector split(const std::string& input, char delimiter); static std::string replace(std::string base, std::string src, std::string dst); }; } #endif /* StringUtils_hpp */ #include #include "chip8.h" chip8_t * chip8_new(void) { chip8_t * self = (chip8_t *) malloc(sizeof(chip8_t)); /* The first 512 bytes are used by the interpreter. */ self->program_counter = 0x200; self->index_register = 0; self->stack_pointer = 0; self->opcode = 0; return self; } void chip8_free(chip8_t * self) { free(self); } //===--- RuntimeStubs.h -----------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// // // Misc stubs for functions which should be defined in the core standard // library, but are difficult or impossible to write in Swift at the // moment. // //===----------------------------------------------------------------------===// #ifndef SWIFT_STDLIB_SHIMS_RUNTIMESTUBS_H_ #define SWIFT_STDLIB_SHIMS_RUNTIMESTUBS_H_ #include "LibcShims.h" #ifdef __cplusplus namespace swift { extern "C" { #endif SWIFT_BEGIN_NULLABILITY_ANNOTATIONS __swift_ssize_t swift_stdlib_readLine_stdin(char * _Nullable * _Nonnull LinePtr); SWIFT_END_NULLABILITY_ANNOTATIONS #ifdef __cplusplus }} // extern "C", namespace swift #endif #endif // SWIFT_STDLIB_SHIMS_RUNTIMESTUBS_H_ // // Toolkit header to include the main headers of the 'AFToolkit' library. // #import "AFDefines.h" #import "AFLogHelper.h" #import "AFFileHelper.h" #import "AFPlatformHelper.h" #import "AFKVO.h" #import "AFArray.h" #import "AFMutableArray.h" #import "NSBundle+Universal.h" #import "UITableViewCell+Universal.h" #import "AFDBClient.h" #import "AFView.h" #import "AFViewController.h"// Copyright (c) 2016-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_POLICY_RBF_H #define BITCOIN_POLICY_RBF_H #include enum class RBFTransactionState { UNKNOWN, REPLACEABLE_BIP125, FINAL }; // Determine whether an in-mempool transaction is signaling opt-in to RBF // according to BIP 125 // This involves checking sequence numbers of the transaction, as well // as the sequence numbers of all in-mempool ancestors. RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(pool.cs); RBFTransactionState IsRBFOptInEmptyMempool(const CTransaction& tx); #endif // BITCOIN_POLICY_RBF_H #include #include #include #include #include "../utf8/utf8.h" /* * Convert UTF-8 string to std::vector */ void utf8to32(const std::string &s, std::vector &vec) { vec.assign(utf8::distance(s.cbegin(), s.cend()), 0); utf8::utf8to32(s.cbegin(), s.cend(), vec.data()); } /* * Convert UTF-8 C-string to std::vector */ void utf8to32(char* const s, std::vector &vec) { const size_t len(strlen(s)); vec.assign(utf8::distance(s, s+len), 0); utf8::utf8to32(s, s+len, vec.data()); } _CLC_DEF _CLC_OVERLOAD float __clc_ldexp(float, int); #ifdef cl_khr_fp64 #pragma OPENCL EXTENSION cl_khr_fp64 : enable _CLC_DEF _CLC_OVERLOAD float __clc_ldexp(double, int); #endif // Created by Arkadiusz on 01-04-14. #import /// A UINavigationController subclass allowing the interactive pop gesture when the navigation bar is hidden or a custom back button is used. @interface AHKNavigationController : UINavigationController @end #ifndef EXTRACTOR_VERSION_H_ #define EXTRACTOR_VERSION_H_ #define FREESOUND_EXTRACTOR_VERSION "freesound 2.0" #endif /* EXTRACTOR_VERSION_H_ */ #include "scheme.h" #include #include #include #ifndef DEFAULT_BOOTFILE_PATH # define DEFAULT_BOOTFILE_PATH "./shen.boot" #endif static void custom_init(void) {} int main(int argc, char *argv[]) { int status; char *bfpath = getenv("SHEN_BOOTFILE_PATH"); if (bfpath == NULL) { bfpath = DEFAULT_BOOTFILE_PATH; } if (access(bfpath, F_OK) == -1) { fprintf(stderr, "ERROR: boot file '%s' doesn't exist or is not readable.\n", bfpath); exit(1); } Sscheme_init(NULL); Sregister_boot_file(bfpath); Sbuild_heap(NULL, custom_init); status = Sscheme_start(argc + 1, (const char**)argv - 1); Sscheme_deinit(); exit(status); } // // Created by wan on 1/2/16. // #include int main(void) { printf("Input:"); int a; scanf("%d", &a); if (2016 % a != 0) { printf("No way. Exit.\n"); return 0; } int s = 2016; printf("2016 = "); int flag = 0, b; for (b = 1111; b >= 1; b /= 10) { int t = a * b; for (;;) { if (s >= t) { if (flag == 0) flag = 1; else printf(" + "); printf("%d", t); s -= t; } else break; } } printf("\n"); return 0; } #pragma once #include BEGIN_DECLS void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); int munmap(void *addr, size_t length); int mprotect(void *addr, size_t length, int prot); int madvise(void *addr, size_t length, int advice); END_DECLS /* $Id: ruby_xml_ns.h 612 2008-11-21 08:01:29Z cfis $ */ /* Please see the LICENSE file for copyright and distribution information */ #ifndef __RXML_NAMESPACES__ #define __RXML_NAMESPACES__ extern VALUE cXMLNamespaces; void ruby_init_xml_namespaces(void); #endif /* * Copyright (c) 2017 Lech Kulina * * This file is part of the Realms Of Steel. * For conditions of distribution and use, see copyright details in the LICENSE file. */ #ifndef ROS_VERTEX_H #define ROS_VERTEX_H #include #include #include #include #include namespace ros { struct ROS_API Vertex { glm::vec3 position; glm::vec3 normal; glm::vec3 tangent; glm::vec3 bitangent; glm::vec2 textureCoordinates; glm::vec4 color; }; typedef std::vector VertexVector; typedef std::vector IndexVector; } #endif // ROS_VERTEX_H #ifndef CUTELYST_GLOBAL_H #define CUTELYST_GLOBAL_H #include #if defined(CUTELYST_LIBRARY) # define CUTELYST_LIBRARY Q_DECL_EXPORT #else # define CUTELYST_LIBRARY Q_DECL_IMPORT #endif #endif // CUTELYST_GLOBAL_H #ifndef BITCOINADDRESSVALIDATOR_H #define BITCOINADDRESSVALIDATOR_H #include /** Base48 entry widget validator. Corrects near-miss characters and refuses characters that are no part of base48. */ class BitcoinAddressValidator : public QValidator { Q_OBJECT public: explicit BitcoinAddressValidator(QObject *parent = 0); State validate(QString &input, int &pos) const; static const int MaxAddressLength = 35; }; #endif // BITCOINADDRESSVALIDATOR_H #ifndef RUTIL2_RALLOC_H #define RUTIL2_RALLOC_H #include "OO.h" void* RAlloc(int Size); void* RAlign(int Align, int Size); #if defined(__MINGW32__) #define _aligned_malloc __mingw_aligned_malloc #define _aligned_free __mingw_aligned_free #define memalign(align, size) _aligned_malloc(size, align) #endif //For MinGW #define RFree(...) __RFree(__VA_ARGS__, (void*)(- 1)) void __RFree(void* a, ...); #define RAlloc_Class(Name, Size) \ (Name*)__RAlloc_Class(Size, sizeof(Name), _C(__ClassID_, Name, __)); void* __RAlloc_Class(int Size, int UnitSize, int ClassID); #if 0 #include "_RAlloc.h" #endif #ifdef __RUtil2_Install #define _RTAddress "RUtil2/Core/_RAlloc.h" #else #define _RTAddress "Core/_RAlloc.h" #endif #define _ClassName #define _Attr 1 #include "Include_T1AllTypes.h" #endif //RUTIL2_RALLOC_H /* $FreeBSD$ */ #include #include #include ASSYM(LINUX_SIGF_HANDLER, offsetof(struct l_sigframe, sf_handler)); ASSYM(LINUX_SIGF_SC, offsetof(struct l_sigframe, sf_sc)); ASSYM(LINUX_SC_GS, offsetof(struct l_sigcontext, sc_gs)); ASSYM(LINUX_SC_EFLAGS, offsetof(struct l_sigcontext, sc_eflags)); ASSYM(LINUX_RT_SIGF_HANDLER, offsetof(struct l_rt_sigframe, sf_handler)); ASSYM(LINUX_RT_SIGF_UC, offsetof(struct l_rt_sigframe, sf_sc)); #ifndef ALIVERTEXERHYPERTRITON3BODY_H #define ALIVERTEXERHYPERTRITON3BODY_H #include class AliESDVertex; class AliESDtrack; class AliExternalTrackParam; class AliVertexerHyperTriton3Body { public: AliVertexerHyperTriton3Body(); AliESDVertex* GetCurrentVertex() { return mCurrentVertex; } bool FindDecayVertex(AliESDtrack *track1, AliESDtrack *track2, AliESDtrack* track3, float b); static void Find2ProngClosestPoint(AliExternalTrackParam *track1, AliExternalTrackParam *track2, float b, float* pos); void SetMaxDinstanceInit(float maxD) { mMaxDistanceInitialGuesses = maxD; } void SetToleranceGuessCompatibility(int tol) { mToleranceGuessCompatibility = tol; } AliVertexerTracks mVertexerTracks; private: AliESDVertex* mCurrentVertex; float mPosition[3]; float mCovariance[6]; float mMaxDistanceInitialGuesses; int mToleranceGuessCompatibility; }; #endif#pragma once #define NOMINMAX #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "Utils.h" namespace SaneAudioRenderer { _COM_SMARTPTR_TYPEDEF(IMMDeviceEnumerator, __uuidof(IMMDeviceEnumerator)); _COM_SMARTPTR_TYPEDEF(IMMDevice, __uuidof(IMMDevice)); _COM_SMARTPTR_TYPEDEF(IAudioClient, __uuidof(IAudioClient)); _COM_SMARTPTR_TYPEDEF(IAudioRenderClient, __uuidof(IAudioRenderClient)); _COM_SMARTPTR_TYPEDEF(IAudioClock, __uuidof(IAudioClock)); _COM_SMARTPTR_TYPEDEF(IMediaSample, __uuidof(IMediaSample)); } /* Copyright (C) 2004 Manuel Novoa III * * GNU Library General Public License (LGPL) version 2 or later. * * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ #include "_stdio.h" link_warning(gets, "the 'gets' function is dangerous and should not be used.") /* UNSAFE FUNCTION -- do not bother optimizing */ libc_hidden_proto(getchar_unlocked) libc_hidden_proto(__fgetc_unlocked) libc_hidden_proto(__stdin) char *gets(char *s) { register char *p = s; int c; __STDIO_AUTO_THREADLOCK_VAR; __STDIO_AUTO_THREADLOCK(stdin); /* Note: don't worry about performance here... this shouldn't be used! * Therefore, force actual function call. */ while (((c = getchar_unlocked()) != EOF) && ((*p = c) != '\n')) { ++p; } if ((c == EOF) || (s == p)) { s = NULL; } else { *p = 0; } __STDIO_AUTO_THREADUNLOCK(stdin); return s; } #include #include "luv.h" #include "luv_functions.c" int luv_newindex(lua_State* L) { lua_getfenv(L, 1); lua_pushvalue(L, 2); lua_pushvalue(L, 3); lua_rawset(L, -3); lua_pop(L, 1); return 0; } LUALIB_API int luaopen_luv (lua_State *L) { luv_main_thread = L; luaL_newmetatable(L, "luv_handle"); lua_pushcfunction(L, luv_newindex); lua_setfield(L, -2, "__newindex"); lua_pop(L, 1); // Module exports lua_newtable (L); luv_setfuncs(L, luv_functions); return 1; } // Copyright (c) 2015, Galaxy Authors. All Rights Reserved // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Author: yuanyi03@baidu.com #ifndef _DOWNLOAD_H #define _DOWNLOAD_H #include namespace galaxy { class Downloader { public: virtual int Fetch(const std::string& uri, const std::string& dir) = 0; virtual void Stop() = 0; }; } // ending namespace galaxy #endif //_DOWNLOAD_H /* vim: set ts=4 sw=4 sts=4 tw=100 */ // KMail Version Information // #ifndef kmversion_h #define kmversion_h #define KMAIL_VERSION "1.9.8" #endif /*kmversion_h*/ #include "user.h" #include #include #include user_t* NewUser(int fd,char *addr,unsigned short port,char *name){ user_t *user = malloc(sizeof(user_t)); if(user == NULL){ goto ret; } if(fd < 0 || addr == NULL || name == NULL){ free(user); user = NULL; goto ret; } user->fd = fd; strcpy(user->addr,addr); user->port = port; strcpy(user->name,name); user->next = NULL; ret: return user; } void AddUserToList(user_t *root,user_t *newUser){ user_t *cur = root; while(cur->next != NULL){ cur = cur->next; } cur->next = newUser; } int CheckUserValid(user_t *root,char *name){ user_t *cur=root; int len = strlen(name); if(len < 2 || len > 12){ return 0; } if(strcmp(name,"anonymous") == 0){ return 0; } while(cur != NULL){ if(strcmp(cur->name,name) == 0){ return 0; } cur = cur->next; } return 1; } #include #include #include #include #define CAPSLOCK 2 void setcaps(int on) { Display* display = XOpenDisplay(NULL); XkbLockModifiers(display, XkbUseCoreKbd, CAPSLOCK, on ? CAPSLOCK : 0); XCloseDisplay(display); } void usage(const char* program_name) { printf("Usage: %s [on|off]\n\n", program_name); printf("Use '%s' to disable your caps key"); } int main(int argc, char** argv) { if (argc > 2) { usage(argv[0]); return 1; } int on = 1; if (argc == 2) { if (strcmp(argv[1], "on") == 0) { on = 1; } else if (strcmp(argv[1], "off") == 0) { on = 0; } else { usage(argv[0]); return 1; } } setcaps(on); return 0; } #ifndef HTTPD_PLATFORM_H #define HTTPD_PLATFORM_H void httpdPlatSendData(ConnTypePtr conn, char *buff, int len); void httpdPlatDisconnect(ConnTypePtr conn); void httpdPlatInit(int port, int maxConnCt); #endif#pragma once #include #include #include #include struct kndLearnerService; struct kndLearnerOptions { char *config_file; struct addrinfo *address; }; struct kndLearnerService { struct kmqKnode *knode; struct kmqEndPoint *entry_point; struct kndShard *shard; char name[KND_NAME_SIZE]; size_t name_size; char path[KND_NAME_SIZE]; size_t path_size; char schema_path[KND_NAME_SIZE]; size_t schema_path_size; char delivery_addr[KND_NAME_SIZE]; size_t delivery_addr_size; size_t max_users; const struct kndLearnerOptions *opts; /********************* public interface *********************************/ int (*start)(struct kndLearnerService *self); void (*del)(struct kndLearnerService *self); }; int kndLearnerService_new(struct kndLearnerService **service, const struct kndLearnerOptions *opts); #ifndef SPIRALLINESGLWIDGET_H #define SPIRALLINESGLWIDGET_H #include "GLWidget.h" #include class SpiralLinesGLWidget : public GLWidget { public: SpiralLinesGLWidget(QWidget* parent = 0); protected: void initializeGL(); void render(); }; SpiralLinesGLWidget::SpiralLinesGLWidget(QWidget* parent) : GLWidget(parent) {} void SpiralLinesGLWidget::initializeGL() { GLWidget::initializeGL(); setXRotation(-45); setYRotation(15); setZRotation(45); } void SpiralLinesGLWidget::render() { // How many revolutions of the spiral are rendered. static const float REVOLUTIONS = 10; static const float PI = 3.14159; glBegin(GL_LINE_STRIP); for (float angle = 0; angle < 2*PI*REVOLUTIONS; angle += PI / (2 * REVOLUTIONS * 10)) { glVertex2f( angle * (float) sin(angle), angle * (float) cos(angle)); } glEnd(); } #endif // SPIRALLINESGLWIDGET_H // SyncTools.h // This file is part of the EScript programming language (https://github.com/EScript) // // Copyright (C) 2015 Claudius Jhn // // Licensed under the MIT License. See LICENSE file for details. // --------------------------------------------------------------------------------- #ifndef SYNCTOOLS_H_INCLUDED #define SYNCTOOLS_H_INCLUDED #include #include #include namespace EScript{ namespace SyncTools{ namespace _Internals{ //! \see http://en.cppreference.com/w/cpp/atomic/atomic_flag class SpinLock{ private: std::atomic_flag f; public: SpinLock():f(ATOMIC_FLAG_INIT){} void lock() { while(!f.test_and_set(std::memory_order_acquire)); } bool try_lock() { return !f.test_and_set(std::memory_order_acquire); } void unlock() { f.clear(std::memory_order_release); } }; } typedef std::atomic atomicInt; typedef std::atomic atomicBool; //typedef std::mutex FastLock; typedef _Internals::SpinLock FastLock; typedef std::unique_lock FastLockHolder; } } #endif // SYNCTOOLS_H_INCLUDED // // YSProcessTimer.h // YSProcessTimeExample // // Created by Yu Sugawara on 2014/02/21. // Copyright (c) 2014年 Yu Sugawara. All rights reserved. // #import #ifndef DEBUG #define kYSProcessTimerInvalid 1 #endif @interface YSProcessTimer : NSObject + (instancetype)sharedInstance; - (instancetype)initWithProcessName:(NSString*)processName; @property (nonatomic) NSString *processName; - (void)startWithComment:(NSString*)comment; - (NSTimeInterval)currentRapTime; - (void)addRapWithComment:(NSString *)comment; - (void)stopWithComment:(NSString*)stopComment; @end #import // Motivation: // JSON responses frequently contain 'null'. For our purposes, a JSON object with // a null property is equivalent to the same object with that property missing. // However, JSON parsers treat the former as `NSNull` and the latter as nil; // This leads to problems for the subsequent code because NSNull is a bona-fide // object while messages to nil are discarded. Furthermore, Objective C truthy // checks work for NSNull and fail for nil. @interface NSDictionary (TDTNullNormalization) /** @return NSDictionary created by removing all enteries whose @p value is an instance of @p NSNull. @see NSArray+TDTNullNormalization */ - (NSDictionary *)tdt_dictionaryByRemovingNulls; @end #include typedef struct { int *x; int **y; } inner ; typedef struct { int *g; inner in[3]; } outer; int *ep; int main(int argc, char *argv[]) { outer o; int z = 5; printf("%d\n" , z); ep = &z; o.in[2].x = ep; *o.in[2].x = 3; printf("%d\n" , z); outer oo[4]; oo[2].in[2].y = &ep; return 0; } #ifndef FTS_COMMON_H #define FTS_COMMON_H #define IS_NONASCII_APOSTROPHE(c) \ ((c) == 0x2019 || (c) == 0xFF07) #define IS_APOSTROPHE(c) \ ((c) == 0x0027 || IS_NONASCII_APOSTROPHE(c)) #endif //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H #define _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H #if defined(_NEWLIB_VERSION) #include #include #include #include #if !defined(__NEWLIB__) || __NEWLIB__ < 2 || \ __NEWLIB__ == 2 && __NEWLIB_MINOR__ < 5 #include #endif #include #include #endif // _NEWLIB_VERSION #endif #include int main (void) { //Set pin 3 as output to source current? PORTB = 1< * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_UTIL_H #define PQXX_UTIL_H #if defined(PQXX_HAVE_CPP_WARNING) #warning "Deprecated libpqxx header included. Use headers without '.h'" #elif defined(PQXX_HAVE_CPP_PRAGMA_MESSAGE) #pragma message("Deprecated libpqxx header included. Use headers without '.h'") #endif #define PQXX_DEPRECATED_HEADERS #include "pqxx/util" #endif /* -------------------------------------------------------------------------- * Name: create.c * Purpose: Associative array implemented as a hash * ----------------------------------------------------------------------- */ #include #include #include "base/memento/memento.h" #include "base/errors.h" #include "utils/utils.h" #include "utils/primes.h" #include "datastruct/hash.h" #include "impl.h" /* ----------------------------------------------------------------------- */ error hash_create(const void *default_value, int nbins, hash_fn *fn, hash_compare *compare, hash_destroy_key *destroy_key, hash_destroy_value *destroy_value, hash_t **ph) { hash_t *h; hash__node_t **bins; h = malloc(sizeof(*h)); if (h == NULL) return error_OOM; nbins = prime_nearest(nbins); bins = calloc(nbins, sizeof(*h->bins)); if (bins == NULL) return error_OOM; h->bins = bins; h->nbins = nbins; h->count = 0; h->default_value = default_value; h->hash_fn = fn; h->compare = compare; h->destroy_key = destroy_key; h->destroy_value = destroy_value; *ph = h; return error_OK; } /* Copyright (c) 2013 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Author: Leonardo de Moura */ #pragma once #include #include namespace lean { /** \brief Low tech timer for used for testing. */ class timeit { std::ostream & m_out; std::string m_msg; clock_t m_start; public: timeit(std::ostream & out, char const * msg):m_out(out), m_msg(msg) { m_start = clock(); } ~timeit() { clock_t end = clock(); std::cout << m_msg << " " << ((static_cast(end) - static_cast(m_start)) / CLOCKS_PER_SEC) << " secs\n"; } }; } // Copyright (c) 2016-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef SYSCOIN_POLICY_RBF_H #define SYSCOIN_POLICY_RBF_H #include enum class RBFTransactionState { UNKNOWN, REPLACEABLE_BIP125, FINAL }; // Determine whether an in-mempool transaction is signaling opt-in to RBF // according to BIP 125 // This involves checking sequence numbers of the transaction, as well // as the sequence numbers of all in-mempool ancestors. RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool) EXCLUSIVE_LOCKS_REQUIRED(pool.cs); // SYSCOIN RBFTransactionState IsRBFOptIn(const CTransaction& tx, const CTxMemPool& pool, CTxMemPool::setEntries &setAncestors) EXCLUSIVE_LOCKS_REQUIRED(pool.cs); RBFTransactionState IsRBFOptInEmptyMempool(const CTransaction& tx); #endif // SYSCOIN_POLICY_RBF_H // // MagicalRecord for Core Data. // // Created by Saul Mora. // Copyright 2011 Magical Panda Software. All rights reserved. // // enable to use caches for the fetchedResultsControllers (iOS only) #if TARGET_OS_IPHONE #define STORE_USE_CACHE #endif #define kCreateNewCoordinatorOnBackgroundOperations 0 #define ENABLE_ACTIVE_RECORD_LOGGING #ifdef ENABLE_ACTIVE_RECORD_LOGGING #define ARLog(...) NSLog(@"%s(%p) %@", __PRETTY_FUNCTION__, self, [NSString stringWithFormat:__VA_ARGS__]) #else #define ARLog(...) #endif #import #import "MagicalRecordHelpers.h" #import "MRCoreDataAction.h" #import "NSManagedObject+MagicalRecord.h" #import "NSManagedObjectContext+MagicalRecord.h" #import "NSPersistentStoreCoordinator+MagicalRecord.h" #import "NSManagedObjectModel+MagicalRecord.h" #import "NSPersistentStore+MagicalRecord.h" #import "NSManagedObject+MagicalDataImport.h"#ifndef _CHAMPLAIN_PERL_H_ #include #include #include "ppport.h" #include "champlain-autogen.h" #ifdef CHAMPLAINPERL_GTK #include #endif #endif /* _CHAMPLAIN_PERL_H_ */ #ifndef BOREUTILS_H #define BOREUTILS_H #include static const char *BOREUTILS_VERSION = "0.0.0b1"; int has_arg(int argc, char **argv, char *search); void bu_missing_argument(char *name); int bu_handle_version(int argc, char **argv); // FIXME: Having this in a header is definitely a hack. int has_arg(int argc, char **argv, char *search) { for (int idx = 1; idx < argc; idx++) { if (strcmp(argv[idx], search) == 0) { return 1; } } return 0; } void bu_missing_argument(char *name) { fprintf(stderr, "%s: Missing argument\nSee '%s --help' for more information.\n", name, name); } int bu_handle_version(int argc, char **argv) { if (has_arg(argc, argv, "--version")) { printf("Boreutils %s v%s\n", argv[0], BOREUTILS_VERSION); return 1; } return 0; } #endif // A current_time function for use in the tests. Returns time in // milliseconds. #ifdef _WIN32 extern "C" bool QueryPerformanceCounter(uint64_t *); extern "C" bool QueryPerformanceFrequency(uint64_t *); double current_time() { uint64_t t, freq; QueryPerformanceCounter(&t); QueryPerformanceFrequency(&freq); return (t * 1000.0) / freq; } #else #include double current_time() { static bool first_call = true; static timeval reference_time; if (first_call) { first_call = false; gettimeofday(&reference_time, NULL); return 0.0; } else { timeval t; gettimeofday(&t, NULL); return ((t.tv_sec - reference_time.tv_sec)*1000.0 + (t.tv_usec - reference_time.tv_usec)/1000.0); } } #endif /* * Copyright 2013 Mo McRoberts. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef P_LIBERRNO_H_ # define P_LIBERRNO_H_ 1 # include # include "errno.h" # undef errno int *get_errno_ux2003(void) UX_SYM03_(errno); #endif /*!P_LIBERRNO_H_*/#define _GNU_SOURCE #define _FILE_OFFSET_BITS 64 #include #include #include int native_fallocate(int fd, uint64_t len) { return fallocate(fd, 0, 0, (off_t)len); } /* RUN: %clang_cc1 %s -emit-llvm -o - | not grep __builtin_ * * __builtin_longjmp/setjmp should get transformed into llvm.setjmp/longjmp * just like explicit setjmp/longjmp calls are. */ void jumpaway(int *ptr) { __builtin_longjmp(ptr,1); } int main(void) { __builtin_setjmp(0); jumpaway(0); } #ifndef SwitecX25_h #define SwitecX25_h class SwitecX25 { public: static const unsigned char pinCount = 4; static const unsigned char stateCount = 6; unsigned char pins[pinCount]; unsigned char currentState; // 6 steps unsigned int currentStep; // step we are currently at unsigned int targetStep; // target we are moving to unsigned int steps; // total steps available unsigned long time0; // time when we entered this state unsigned int microDelay; // microsecs until next state unsigned short (*accelTable)[2]; // accel table can be modified. unsigned int maxVel; // fastest vel allowed unsigned int vel; // steps travelled under acceleration char dir; // direction -1,0,1 boolean stopped; // true if stopped SwitecX25(unsigned int steps, unsigned char pin1, unsigned char pin2, unsigned char pin3, unsigned char pin4); void stepUp(); void stepDown(); void zero(); void update(); void setPosition(unsigned int pos); private: void advance(); void writeIO(); }; #endif #ifndef _H_SAMSON_QUEUE_TASK_MANAGER #define _H_SAMSON_QUEUE_TASK_MANAGER #include "au/list.h" // au::list namespace samson { namespace stream { class QueueTask; class QueueTaskManager { au::list< QueueTask > queueTasks; size_t id; // Id of the current task public: void add( QueueTask* task ); std::string getStatus(); }; } } #endif /* * Time stamp of last source code repository commit. */ #define ___STAMP_YMD 20131223 #define ___STAMP_HMS 145645 // RUN: clang -checker-simple -verify %s int* f1() { int x = 0; return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}} } int* f2(int y) { return &y; // expected-warning{{Address of stack memory associated with local variable 'y' returned.}} expected-warning{{address of stack memory associated with local variable 'y' returned}} } int* f3(int x, int *y) { int w = 0; if (x) y = &w; return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}} } unsigned short* compound_literal() { return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} } /* * $Id$ * * Copyright (c) 2013, Juniper Networks, Inc. * All rights reserved. * This SOFTWARE is licensed under the LICENSE provided in the * ../Copyright file. By downloading, installing, copying, or otherwise * using the SOFTWARE, you agree to be bound by the terms of that * LICENSE. * * jsonwriter.h -- turn json-oriented XML into json text */ int slaxJsonWriteNode (slaxWriterFunc_t func, void *data, xmlNodePtr nodep, unsigned flags); int slaxJsonWriteDoc (slaxWriterFunc_t func, void *data, xmlDocPtr docp, unsigned flags); #define JWF_ROOT (1<<0) /* Root node */ #define JWF_ARRAY (1<<1) /* Inside array */ #define JWF_NODESET (1<<2) /* Top of a nodeset */ #define JWF_PRETTY (1<<3) /* Pretty print (newlines) */ #define JWF_OPTIONAL_QUOTES (1<<4) /* Don't use quotes unless needed */ #ifndef FIFO_H #define FIFO_H #include "align.h" #define FIFO_NODE_SIZE 510 struct _fifo_node_t; typedef struct DOUBLE_CACHE_ALIGNED { volatile size_t enq DOUBLE_CACHE_ALIGNED; volatile size_t deq DOUBLE_CACHE_ALIGNED; volatile struct { int index; struct _fifo_node_t * node; } head DOUBLE_CACHE_ALIGNED; size_t nprocs; } fifo_t; typedef struct DOUBLE_CACHE_ALIGNED _fifo_handle_t { struct _fifo_handle_t * next; struct _fifo_node_t * enq; struct _fifo_node_t * deq; struct _fifo_node_t * hazard; struct _fifo_node_t * retired; int winner; } fifo_handle_t; void fifo_init(fifo_t * fifo, size_t width); void fifo_register(fifo_t * fifo, fifo_handle_t * handle); void * fifo_get(fifo_t * fifo, fifo_handle_t * handle); void fifo_put(fifo_t * fifo, fifo_handle_t * handle, void * data); #endif /* end of include guard: FIFO_H */ /*****************************************************************************\ * * * Filename SysLib.h * * * * Description SysLib Library core definitions * * * * Notes Included indirectly by the include files that need it. * * Do not include directly. * * * * History * * 2016-04-12 JFL Created this file. * * 2016-04-22 JFL Renamed the MULTIOS library as SYSLIB. * * * * © Copyright 2016 Hewlett Packard Enterprise Development LP * * Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 * \*****************************************************************************/ #ifndef __SYSLIB_H__ /* Prevent multiple inclusions */ #define __SYSLIB_H__ /* Force linking with the SysLib.lib library */ #if defined(_MSC_VER) #define _SYSLIB_LIB "SysLib.lib" #pragma message("Adding pragma comment(lib, \"" _SYSLIB_LIB "\")") #pragma comment(lib, _SYSLIB_LIB) #endif /* defined(_MSC_VER) */ #if defined(__unix__) #define _SYSLIB_LIB "libSysLib.a" #endif #endif /* defined(__SYSLIB_H__) */ #include #include #include #include "test.h" #define DATA_SIZE 4 int main() { unsigned char data[4]; bert_buffer_t buffer; bert_buffer_init(&buffer); memset(data,'A',DATA_SIZE); bert_buffer_write(&buffer,data,DATA_SIZE); bert_buffer_write(&buffer,data,DATA_SIZE); bert_buffer_write(&buffer,data,DATA_SIZE); unsigned char output[DATA_SIZE]; size_t result; if ((result = bert_buffer_read(output,&buffer,DATA_SIZE)) != DATA_SIZE) { test_fail("bert_buffer_read only read %u bytes, expected %u",result,DATA_SIZE); } if (memcmp(output,data,DATA_SIZE)) { test_fail("bert_buffer_read return %c%c%c%c, expected AAAA",output[0],output[1],output[2],output[3]); } return 0; } /* * Copyright (c) 2012 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include #include "native_client/src/untrusted/nacl/nacl_irt.h" #include "native_client/src/untrusted/nacl/nacl_thread.h" #include "native_client/src/untrusted/nacl/tls.h" /* * This initialization happens early in startup with or without libpthread. * It must make it safe for vanilla newlib code to run. */ void __pthread_initialize_minimal(size_t tdb_size) { /* Adapt size for sbrk. */ /* TODO(robertm): this is somewhat arbitrary - re-examine). */ size_t combined_size = (__nacl_tls_combined_size(tdb_size) + 15) & ~15; /* * Use sbrk not malloc here since the library is not initialized yet. */ void *combined_area = sbrk(combined_size); /* * Fill in that memory with its initializer data. */ void *tp = __nacl_tls_initialize_memory(combined_area, tdb_size); /* * Set %gs, r9, or equivalent platform-specific mechanism. Requires * a syscall since certain bitfields of these registers are trusted. */ nacl_tls_init(tp); /* * Initialize newlib's thread-specific pointer. */ __newlib_thread_init(); } /* * types.h * * Created on: Mar 11, 2014 * Author: Chase */ #ifndef TYPES_H_ #define TYPES_H_ #include //Don't use stdbool.h, we have to make sure bool is only a byte in size! typedef uint8_t bool; #define true 1 #define false 0 #define TRUE 1 #define FALSE 0 typedef uint8_t char8_t; typedef uint16_t char16_t; #endif /* TYPES_H_ */ #ifndef IDT_H #define IDT_H #include struct IDTEntry { uint16_t base_address_low; uint16_t selector; uint8_t reserved; uint8_t type : 4; uint8_t storage_segment : 1; uint8_t privilege : 2; uint8_t present : 1; uint16_t base_address_high; } __attribute__((packed)); struct IDTDescriptor { uint16_t limiter; uint32_t base_address; } __attribute__((packed)); struct IDT { struct IDTDescriptor descriptor; struct IDTEntry entries[256]; } __attribute__((packed)); void idt_init(struct IDT *); #endif // // GLGInputParserDelegate.h // TwIRCk // // Created by Tim Jarratt on 11/29/13. // Copyright (c) 2013 General Linear Group. All rights reserved. // #import @protocol GLGInputParserDelegate - (void) didJoinChannel:(NSString *)channel rawCommand:(NSString *)rawCommand; - (void) didPartChannel:(NSString *)channel rawCommand:(NSString *)rawCommand; - (void) didChangeNick:(NSString *)newNick rawCommand:(NSString *)rawCommand; - (void) didChangePassword:(NSString *)newPassword rawCommand:(NSString *)rawCommand; @end /* * Copyright (c) 2012, Nadir Sampaoli * See the LICENSE for more information */ #include "memory.h" #include #include static uint8_t *memory_area; void allocmemory(void) { while(!memory_area) { memory_area = malloc(MEM_SIZE * sizeof(uint8_t)); } } uint8_t getmembyte(uint16_t addr) { return *(memory_area + addr); } uint16_t getmemword(uint16_t addr) { return (getmembyte(addr+1) << 8 | getmembyte(addr)); } void putmembyte(uint16_t addr, uint8_t byte) { // FIXME: must control if addr is readonly (TODO: implement MBC controllers) *(memory_area + addr) = byte; } void putmemword(uint16_t addr, uint16_t word) { putmembyte(addr, (word >> 8)); putmembyte(addr+1, (word & 0xFF)); } /* * Copyright (c) 2014-2015 Erik Doernenburg and contributors * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use these files except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ #import @interface OCMLocation : NSObject { id testCase; NSString *file; NSUInteger line; } + (instancetype)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine; - (instancetype)initWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine; - (id)testCase; - (NSString *)file; - (NSUInteger)line; @end extern OCMLocation *OCMMakeLocation(id testCase, const char *file, int line); /***************************************************************************//** * \file domain.h * \author Krishnan, A. (anush@bu.edu) * \brief Definition of the class \c domain */ #pragma once #include "types.h" /** * \class domain * \brief Store the mesh grid information */ class domain { public: int nx, ///< number of cells in the x-direction ny; ///< number of cells in the y-direction vecH x, ///< x-coordinates of the nodes y, ///< y-coordinates of the nodes dx, ///< cell widths in the x-direction dy; ///< cell widths in the y-direction vecD xD, ///< x-coordinates of the nodes stored on the device yD, ///< y-coordinates of the nodes stored on the device dxD, ///< x- cell widths stored on the device dyD; ///< y- cell widths stored on the device vecH xu, ///< x-coordinates of the locations at which the x-component of velocity is evaluated yu, ///< y-coordinates of the locations at which the x-component of velocity is evaluated xv, ///< x-coordinates of the locations at which the y-component of velocity is evaluated yv; ///< y-coordinates of the locations at which the y-component of velocity is evaluated }; /** * Generic reservoir sampling. */ #ifndef _RS_H #define _RS_H /* print actions to the reservoir */ #ifndef PRINT_RS_TRACE #define PRINT_RS_TRACE 1 #endif struct reservoir; struct drand48_data; struct reservoir *init_reservoir(size_t sz, #if PRINT_RS_TRACE void (*print_fun)(void *it), #endif void *(*clone_fun)(const void *it, size_t sz), void (*free_fun)(void *it)); void free_reservoir(struct reservoir *r); /* Notice one extra parameter when tracing the reservoir */ void add_to_reservoir(struct reservoir *r, const void *it, size_t sz, double w, struct drand48_data *randbuffer); void add_to_reservoir_log(struct reservoir *r, const void *it, size_t sz, double logw, struct drand48_data *randbuffer); #endif //===- MCSymbolXCOFF.h - ----------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLVM_MC_MCSYMBOLXCOFF_H #define LLVM_MC_MCSYMBOLXCOFF_H #include "llvm/BinaryFormat/XCOFF.h" #include "llvm/MC/MCSymbol.h" #include "llvm/IR/GlobalValue.h" namespace llvm { class MCSymbolXCOFF : public MCSymbol { // The IR symbol this MCSymbolXCOFF is based on. It is set on function // entry point symbols when they are the callee operand of a direct call // SDNode. const GlobalValue *GV = nullptr; public: MCSymbolXCOFF(const StringMapEntry *Name, bool isTemporary) : MCSymbol(SymbolKindXCOFF, Name, isTemporary) {} void setGlobalValue(const GlobalValue *G) { GV = G; } const GlobalValue *getGlobalValue() const { return GV; } static bool classof(const MCSymbol *S) { return S->isXCOFF(); } }; } // end namespace llvm #endif // LLVM_MC_MCSYMBOLXCOFF_H /* OSEKOS Implementation of an OSEK Scheduler * Copyright (C) 2015 Joakim Plate * * 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 License, or (at your option) any later version. * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef OS_CFG_H_ #define OS_CFG_H_ #ifdef OS_CFG_ARCH_POSIX #include "Os_Arch_Posix.h" #endif #ifdef OS_CFG_ARCH_FIBERS #include "Os_Arch_Fibers.h" #endif #define OS_TASK_COUNT 3 #define OS_PRIO_COUNT 3 #define OS_TICK_US 100000U extern void errorhook(StatusType ret); #define OS_ERRORHOOK(_ret) errorhook(_ret) #endif /* OS_CFG_H_ */ #include "calc.h" #include #include #include int calc(const char* p) { int i; int ans; ans = atoi(p); i = 0; while (p[i] != '\0'){ while (isdigit(p[i])){ i++; } switch (p[i]){ case '+': return (ans + calc(p + i + 1)); case '-': return (ans - calc(p + i + 1)); case '*': ans *= atoi(p + i + 1); i++; break; case '/': ans /= atoi(p + i + 1); i++; break; case '\0': return (ans); default: puts("Error"); return (0); } } } #ifndef VECTOR_3D_H #define VECTOR_3D_H #include namespace classes { struct Point3D { double x, y, z; }; class Vector3D { struct Cheshire; Cheshire* smile; static const Point3D nullPoint = { 0.0, 0.0, 0.0 }; public: Vector3D(); Vector3D(Point3D point = nullPoint); Vector3D(double x = 0.0, double y = 0.0, double z = 0.0); ~Vector3D(); double getModule() const; Vector3D copy() const; Vector3D getReversed() const; void multiplyByScalar(const double); void normalize(); void print() const; static Vector3D add(Vector3D&, Vector3D&); static Vector3D substract(Vector3D&, Vector3D&); static Vector3D vectorMultiply(Vector3D&, Vector3D&) ; static double scalarMultiply(Vector3D&, Vector3D&); static double sin(Vector3D&, Vector3D&); static double cos(Vector3D&, Vector3D&); static double angle(Vector3D&, Vector3D&); }; } #endif // VECTOR_3D_H #pragma once #define DHT22_PIN 6 #define DHT22_SAMPLE_RATE 3000 #define TEMPORATURE_TARGET (204) #define HEATER_PIN 10 #define HEATER_ACTION_DELAY (15*60) // minimal seconds to open/close heater, prevent switch heater too frequently. // Copyright 2021 The IREE Authors // // Licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include "iree-dialects/Transforms/Listener.h" #include "mlir/IR/PatternMatch.h" #include "mlir/Rewrite/FrozenRewritePatternSet.h" namespace mlir { struct GreedyRewriteConfig; /// Applies the specified patterns on `op` alone while also trying to fold it, /// by selecting the highest benefits patterns in a greedy manner. Returns /// success if no more patterns can be matched. `erased` is set to true if `op` /// was folded away or erased as a result of becoming dead. Note: This does not /// apply any patterns recursively to the regions of `op`. Accepts a listener /// so the caller can be notified of rewrite events. LogicalResult applyPatternsAndFoldGreedily( MutableArrayRef regions, const FrozenRewritePatternSet &patterns, const GreedyRewriteConfig &config, RewriteListener *listener); inline LogicalResult applyPatternsAndFoldGreedily( Operation *op, const FrozenRewritePatternSet &patterns, const GreedyRewriteConfig &config, RewriteListener *listener) { return applyPatternsAndFoldGreedily(op->getRegions(), patterns, config, listener); } } // namespace mlir file4.c - r1 Test checkin in master1-updated - updated_by_master Test checkin in master2 Test checkin in master3 Test checkin in master4 #import "NSManagedObject+ActiveRecord.h" #import "NSString+StringBetweenStrings.h" #import #import "UIColor+FolioColours.h" #import #import "NSObject+Notifications.h" #import #import "UIButton+FolioButtons.h" #import "UIColor+DebugColours.h" #import "NSString+StringSize.h" #import "UIBarButtonItem+toolbarHelpers.h" #import "UIImageView+ArtsySetURL.h" #ifndef LIBPORT_UNISTD_H # define LIBPORT_UNISTD_H # include "detect_win32.h" # include "libport/config.h" // This is traditional Unix file. # ifdef LIBPORT_HAVE_UNISTD_H # include "unistd.h" # endif // This seems to be its WIN32 equivalent. // http://msdn2.microsoft.com/en-us/library/ms811896(d=printer).aspx#ucmgch09_topic7. # if defined WIN32 || defined LIBPORT_WIN32 # include "io.h" # endif #if defined LIBPORT_HAVE__GETCWD # define getcwd _getcwd #elif !defined LIBPORT_HAVE_GETCWD # error I need either getcwd() or _getcwd() #endif #endif // !LIBPORT_UNISTD_H /* Auxiliary program: write the include file for determining PLplot's floating-point type */ #include #include #include "plConfig.h" main(int argc, char *argv[] ) { FILE *outfile ; char *kind ; outfile = fopen( "plflt.inc", "w" ) ; #ifdef PL_DOUBLE kind = "1.0d0" #else kind = "1.0" #endif fprintf{ outfile, "\ ! NOTE: Generated code\n\ !\n\ ! Type of floating-point numbers in PLplot\n\ !\n\ integer, parameter :: plf = kind(%s)\n\ integer, parameter :: plflt = plf\n", kind ) ; fclose( outfile ) ; } // // CDZIssueSyncEngine.h // thingshub // // Created by Chris Dzombak on 1/13/14. // Copyright (c) 2014 Chris Dzombak. All rights reserved. // #import @class OCTClient; @class CDZThingsHubConfiguration; @protocol CDZIssueSyncDelegate; @interface CDZIssueSyncEngine : NSObject /// Designated initializer - (instancetype)initWithDelegate:(id)delegate configuration:(CDZThingsHubConfiguration *)config authenticatedClient:(OCTClient *)client; /// Returns a signal which will either complete or error after the sync operation. - (RACSignal *)sync; @end #ifndef ALEXCPT_H #define ALEXCPT_H #include #include #include "AL/alc.h" namespace al { class backend_exception final : public std::exception { std::string mMessage; ALCenum mErrorCode; public: backend_exception(ALCenum code, const char *msg, ...); const char *what() const noexcept override { return mMessage.c_str(); } ALCenum errorCode() const noexcept { return mErrorCode; } }; } // namespace al #define START_API_FUNC try #define END_API_FUNC catch(...) { std::terminate(); } #endif /* ALEXCPT_H */ // // IMeetingDelegate.h // MeetingApp // // Created by Estefania Chavez Guardado on 2/27/16. // Copyright © 2016 Estefania Chavez Guardado. All rights reserved. // #import #import "Meeting.h" @protocol IMeetingDelegate @optional - (void) update: (MutableMeeting *) newMeeting; - (void) moveToInactiveMeetings:(int) indexMeeting andInactiveTheMeeting: (NSString *) idMeeting; - (void) updateDetail: (MutableMeeting *) meeting; @end// // Marshal.h // Marshal // // Created by Jason Larsen on 2/24/16. // Copyright © 2016 Utah iOS & Mac. All rights reserved. // #import //! Project version number for Marshal. FOUNDATION_EXPORT double MarshalVersionNumber; //! Project version string for Marshal. FOUNDATION_EXPORT const unsigned char MarshalVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import /* vi: set sw=4 ts=4: */ /* * getgid() for uClibc * * Copyright (C) 2000-2006 Erik Andersen * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include "syscalls.h" #include #if defined __NR_getxgid # define __NR_getgid __NR_getxgid #endif _syscall0(gid_t, getgid); libc_hidden_proto(getgid) libc_hidden_def(getgid) // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_API_H_ #define CHROME_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_API_H_ #include #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/extensions/chrome_extension_function_details.h" #include "chrome/common/extensions/api/cryptotoken_private.h" #include "extensions/browser/extension_function.h" // Implementations for chrome.cryptotokenPrivate API functions. namespace infobars { class InfoBar; } namespace extensions { namespace api { class CryptotokenPrivateCanOriginAssertAppIdFunction : public UIThreadExtensionFunction { public: CryptotokenPrivateCanOriginAssertAppIdFunction(); DECLARE_EXTENSION_FUNCTION("cryptotokenPrivate.canOriginAssertAppId", CRYPTOTOKENPRIVATE_CANORIGINASSERTAPPID) protected: ~CryptotokenPrivateCanOriginAssertAppIdFunction() override {} ResponseAction Run() override; private: ChromeExtensionFunctionDetails chrome_details_; }; } // namespace api } // namespace extensions #endif // CHROME_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_API_H_ /* -*- c-basic-offset: 2 -*- */ /* Copyright(C) 2015 Brazil This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef GRN_REPORT_H #define GRN_REPORT_H #include "grn_ctx.h" #ifdef __cplusplus extern "C" { #endif const grn_log_level GRN_REPORT_INDEX_LOG_LEVEL; void grn_report_index(grn_ctx *ctx, const char *action, const char *tag, grn_obj *index); #ifdef __cplusplus } #endif #endif /* GRN_REPORT_H */ // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_DESKTOP_NOTIFICATION_HANDLER_H_ #define CHROME_BROWSER_DESKTOP_NOTIFICATION_HANDLER_H_ #pragma once #include "content/browser/renderer_host/render_view_host_observer.h" class GURL; struct DesktopNotificationHostMsg_Show_Params; // Per-tab Desktop notification handler. Handles desktop notification IPCs // coming in from the renderer. class DesktopNotificationHandler : public RenderViewHostObserver { public: explicit DesktopNotificationHandler(RenderViewHost* render_view_host); virtual ~DesktopNotificationHandler(); private: // RenderViewHostObserver implementation. virtual bool OnMessageReceived(const IPC::Message& message); // IPC handlers. void OnShow(const DesktopNotificationHostMsg_Show_Params& params); void OnCancel(int notification_id); void OnRequestPermission(const GURL& origin, int callback_id); private: DISALLOW_COPY_AND_ASSIGN(DesktopNotificationHandler); }; #endif // CHROME_BROWSER_DESKTOP_NOTIFICATION_HANDLER_H_ /* * mswin32_config.h Hand made MSWin32 configuration file. * Copyright (c) 1996 Applied Logic Systems, Inc. * * Author: Chuck Houpt * Creation: 1/30/96 */ #include "dfltsys.h" #define MSWin32 1 #define OSStr "mswin32" #ifdef __GNUC__ #define EXTERNAL_STATE 1 #endif /* Temp. disable threading until threading GUI stub is fixed */ #ifdef __GNUC__ #define Bytecode 1 #endif #define HAVE_STDARG_H 1 #define HAVE_STDLIB_H 1 #define HAVE_FCNTL_H 1 #define HAVE_STRING_H 1 #define HAVE_SRAND 1 #define HAVE_TIME 1 #define HAVE_SOCKET 1 #define BERKELEY_SOCKETS 1 #define HAVE_SELECT 1 #define MISSING_UNIX_DOMAIN_SOCKETS 1 #define APP_PRINTF_CALLBACK 1 #define HAVE_STRCSPN 1 #define HAVE_STRSPN 1 #define HAVE_STRTOK 1 #define REVERSE_ENDIAN 1 /* The windows headers in Cygwin 1.3.4 are missing some prototypes, so define them here to silence the waring messages. */ #ifdef __GNUC__ extern __inline__ void* GetCurrentFiber(void); extern __inline__ void* GetFiberData(void); #endif #include #include // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ #define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ namespace webkit_glue { // Chromium sets the minimum interval timeout to 4ms, overriding the // default of 10ms. We'd like to go lower, however there are poorly // coded websites out there which do create CPU-spinning loops. Using // 4ms prevents the CPU from spinning too busily and provides a balance // between CPU spinning and the smallest possible interval timer. const double kForegroundTabTimerInterval = 0.004; // Provides control over the minimum timer interval for background tabs. const double kBackgroundTabTimerInterval = 0.004; } // namespace webkit_glue #endif // WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ /* * * Copyright 2018 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef TEST_CORE_TSI_ALTS_FAKE_HANDSHAKER_FAKE_HANDSHAKER_SERVER_H #define TEST_CORE_TSI_ALTS_FAKE_HANDSHAKER_FAKE_HANDSHAKER_SERVER_H #include #include #include namespace grpc { namespace gcp { // If max_expected_concurrent_rpcs is non-zero, the fake handshake service // will track the number of concurrent RPCs that it handles and abort // if if ever exceeds that number. std::unique_ptr CreateFakeHandshakerService( int max_expected_concurrent_rpcs); } // namespace gcp } // namespace grpc #endif // TEST_CORE_TSI_ALTS_FAKE_HANDSHAKER_FAKE_HANDSHAKER_SERVER_H // RUN: %ucc -o %t %s // RUN: %ocheck 0 %t // RUN: %t | %output_check 'Hello 5 2.3' 'Hello 5 2.3' // should run without segfaulting main() { printf("Hello %d %.1f\n", 5, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3); // this causes an infinite loop in glibc's printf() printf("Hello %d %.1f\n", 5, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, // this causes an infinite loop in glibc's printf() 2.3); // and this causes a crash // suspect the bug is to do with double alignment when passed as stack arguments return 0; } #include #include #include #include #include #define GITBUF 2048 int main(int argc, char **argv) { int pid, ret; int pipes[2]; char gitbuff[GITBUF]; size_t gitlen; char b; char *br; int childst; if(pipe(pipes) != 0) { perror("Error creating pipes"); exit(1); } if((pid = fork()) == -1) { perror("Error forking git"); exit(1); } if(pid == 0) //child { if(dup2(pipes[1], STDOUT_FILENO) == -1) { perror("Error duplicating stdout"); exit(1); } close(STDERR_FILENO); ret = execlp("git", "git", "status", "-z", "-b", (char*)0); } waitpid(pid, &childst, 0); if(childst != 0) { exit(2); } gitlen = read(pipes[0], gitbuff, GITBUF); br = &gitbuff[3]; putchar('('); while(*br != '\0') { // Three dots separate the branch from the tracking branch if(*br == '.' && *(br+1) == '.' && *(br+2) == '.') break; putchar(*br++); } putchar(')'); putchar('\n'); } #include #include "ports.h" #include "pic.h" #include "gdt.h" #include "idt.h" #include "irq.h" #include "screen.h" void entry(void) { pic_remap(IRQ0, IRQ8); pic_set_masks(0, 0); gdt_init((struct GDT *)(0x500)); idt_init((struct IDT *)(0x500 + sizeof(struct GDT))); __asm__ __volatile__ ("sti"); screen_init(); __asm__ __volatile__ ("int $0x50"); for(;;) { __asm__ __volatile__ ("hlt"); } } // @(#)root/mc:$Name: $:$Id: LinkDef.h,v 1.2 2002/04/26 08:46:10 brun Exp $ #ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ global gMC; #pragma link C++ enum PDG_t; #pragma link C++ enum TMCProcess; #pragma link C++ class TVirtualMC+; #pragma link C++ class TVirtualMCApplication+; #pragma link C++ class TVirtualMCStack+; #pragma link C++ class TVirtualMCDecayer+; #endif #ifndef SKILLCOMPONENT_H_ #define SKILLCOMPONENT_H_ /** * Enumeration for identifying different skills. */ enum skill_t { Melee, Swords, BastardSword, Maces, SpikedMace, FirstAid }; /** * Data structure to represent an Entity's skill. */ typedef struct { skill_t skill; ///< The type of skill int ranks; ///< Current ranks in the skill int xp; ///< Amount of XP earned towards next rank } SkillComponent; #endif #include "output_http.h" #include "output_ts_base.h" namespace Mist{ class OutHLS : public TSOutput{ public: OutHLS(Socket::Connection &conn); ~OutHLS(); static void init(Util::Config *cfg); void sendTS(const char *tsData, size_t len = 188); void sendNext(); void onHTTP(); bool isReadyForPlay(); virtual void onFail(const std::string &msg, bool critical = false); protected: std::string h264init(const std::string &initData); std::string h265init(const std::string &initData); bool hasSessionIDs(){return !config->getBool("mergesessions");} std::string liveIndex(); std::string liveIndex(size_t tid, const std::string &sessId); size_t vidTrack; size_t audTrack; uint64_t until; }; }// namespace Mist typedef Mist::OutHLS mistOut; // RUN: %clang_profgen -o %t -O3 %s // RUN: env LLVM_PROFILE_FILE="%t/" LLVM_PROFILE_VERBOSE_ERRORS=1 %run %t 1 2>&1 | FileCheck %s int main(int argc, const char *argv[]) { if (argc < 2) return 1; return 0; } // CHECK: LLVM Profile: Failed to write file #ifndef __CMPTEST_H__ #define __CMPTEST_H__ #include #include "sodium.h" #define TEST_NAME_RES TEST_NAME ".res" #define TEST_NAME_OUT TEST_SRCDIR "/" TEST_NAME ".exp" #ifdef HAVE_ARC4RANDOM # undef rand # define rand(X) arc4random(X) #endif FILE *fp_res; int xmain(void); int main(void) { FILE *fp_out; int c; if ((fp_res = fopen(TEST_NAME_RES, "w+")) == NULL) { perror("fopen(" TEST_NAME_RES ")"); return 99; } if (sodium_init() != 0) { return 99; } xmain(); rewind(fp_res); if ((fp_out = fopen(TEST_NAME_OUT, "r")) == NULL) { perror("fopen(" TEST_NAME_OUT ")"); return 99; } do { if ((c = fgetc(fp_res)) != fgetc(fp_out)) { return 99; } } while (c != EOF); return 0; } #undef printf #define printf(...) fprintf(fp_res, __VA_ARGS__) #define main xmain #endif /** * common.h * * Copyright (C) 2017 Nickolas Burr */ #ifndef GIT_STASHD_COMMON_H #define GIT_STASHD_COMMON_H #include #include #include #include #include #include #define _GNU_SOURCE #define NOOPT_FOUND_V -1 #define CLEAN_CATCH_V -2 #endif // Copyright 2010-2014 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #pragma once #include "Stdafx.h" #include "Internals\MCefRefPtr.h" #include "RequestContextSettings.h" #include "include\cef_request_context.h" using namespace CefSharp; namespace CefSharp { public ref class RequestContext { private: MCefRefPtr _requestContext; RequestContextSettings^ _settings; public: RequestContext() { CefRequestContextSettings settings; _requestContext = CefRequestContext::CreateContext(settings, NULL); } RequestContext(RequestContextSettings^ settings) : _settings(settings) { _requestContext = CefRequestContext::CreateContext(settings, NULL); } !RequestContext() { _requestContext = NULL; } ~RequestContext() { this->!RequestContext(); delete _settings; } operator CefRefPtr() { return _requestContext.get(); } }; }#ifndef ERROR_H #define ERROR_H /* * Note that we include "fmt" in the variadic argument list, because C99 * apparently doesn't allow variadic macros to be invoked without any vargs * parameters. */ #define ERROR(...) var_error(__FILE__, __LINE__, __VA_ARGS__) #define FAIL() simple_error(__FILE__, __LINE__) #define FAIL_APR(s) apr_error((s), __FILE__, __LINE__) #define FAIL_SQLITE(c) sqlite_error((c), __FILE__, __LINE__) #ifdef ASSERT_ENABLED #define ASSERT(cond) \ do { \ if (!(cond)) \ assert_fail(APR_STRINGIFY(cond), __FILE__, __LINE__); \ } while (0) #else #define ASSERT(cond) #endif void apr_error(apr_status_t s, const char *file, int line_num) __attribute__((noreturn)); void sqlite_error(C4Runtime *c4, const char *file, int line_num) __attribute__((noreturn)); void simple_error(const char *file, int line_num) __attribute__((noreturn)); void var_error(const char *file, int line_num, const char *fmt, ...) __attribute__((format(printf, 3, 4), noreturn)); void assert_fail(const char *cond, const char *file, int line_num) __attribute__((noreturn)); #endif /* ERROR_H */ // @(#)root/base:$Name: $:$Id: TVersionCheck.h,v 1.2 2007/05/10 16:04:32 rdm Exp $ // Author: Fons Rademakers 9/5/2007 /************************************************************************* * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TVersionCheck #define ROOT_TVersionCheck ////////////////////////////////////////////////////////////////////////// // // // TVersionCheck // // // // Used to check if the shared library or plugin is compatible with // // the current version of ROOT. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_RVersion #include "RVersion.h" #endif class TVersionCheck { public: TVersionCheck(int versionCode); // implemented in TSystem.cxx }; static TVersionCheck gVersionCheck(ROOT_VERSION_CODE); #endif // Offset of each register in the register map, // as it's saved by asm_entry_amd64.s #pragma once #define RAX 0x00 #define RBX 0x08 #define RCX 0x10 #define RDX 0x18 #define RSI 0x20 #define RDI 0x28 #define R8 0x30 #define R9 0x38 #define R10 0x40 #define R11 0x48 #define R12 0x50 #define R13 0x58 #define R14 0x60 #define R15 0x68 #define XMM0 0x70 #define XMM1 0x80 #define XMM2 0x90 #define XMM3 0xA0 #define XMM4 0xB0 #define XMM5 0xC0 #define XMM6 0xE0 #define XMM7 0xF0 /* metatag.c: Program for adding metadata to a file * By: Forrest Kerslager, Nick Noto, David Taylor, Kevin Yeap, * Connie Yu * * 2014/06/06 * */ #include #include #include int main(int argc, char** argv){ char* buffer; int fd, i, len; if(argc < 3){ fprintf(stderr, "Usage: metatag FILE TAG\n"); exit(1); } fd=open(argv[1], O_RDWR); if(fd == -1){ fprintf(stderr, "Error, file not found\n"); exit(1); } buffer = ""; for(i=2; i #ifndef NOMINMAX #define NOMINMAX #endif #endif #ifndef _MSC_VER #include #endif // Preconfiguration: #include "AutowiringConfig.h" // C++11 glue logic, for platforms that have incomplete C++11 support #include "C++11/cpp11.h" #ifdef __aarch64__ # define STATIC_CHAIN_REG "x18" #elif defined(__alpha__) # define STATIC_CHAIN_REG "r1" #elif defined(__arm__) # define STATIC_CHAIN_REG "ip" #elif defined(__sparc__) # if defined(__arch64__) || defined(__sparcv9) # define STATIC_CHAIN_REG "g5" # else # define STATIC_CHAIN_REG "g2" # endif #elif defined(__x86_64__) # define STATIC_CHAIN_REG "r10" #elif defined(__i386__) # ifndef ABI_NUM # define STATIC_CHAIN_REG "ecx" /* FFI_DEFAULT_ABI only */ # endif #endif // RUN: %clang -fno-ms-extensions %s -E | grep 'stddef.h.*3.*4' #include #ifndef SPECIFIC_INLINE_ASM_GCTXT #define SPECIFIC_INLINE_ASM_GCTXT #endif #ifndef ICMPV4_H #define ICMPV4_H #include "syshead.h" #include "netdev.h" #define ICMP_V4_REPLY 0x00 #define ICMP_V4_DST_UNREACHABLE 0x03 #define ICMP_V4_SRC_QUENCH 0x04 #define ICMP_V4_REDIRECT 0x05 #define ICMP_V4_ECHO 0x08 #define ICMP_V4_ROUTER_ADV 0x09 #define ICMP_V4_ROUTER_SOL 0x0a #define ICMP_V4_TIMEOUT 0x0b #define ICMP_V4_MALFORMED 0x0c struct icmp_v4 { uint8_t type; uint8_t code; uint16_t csum; uint8_t data[]; } __attribute__((packed)); struct icmp_v4_echo { uint16_t id; uint16_t seq; uint8_t data[]; } __attribute__((packed)); void icmpv4_incoming(struct netdev *netdev, struct eth_hdr *hdr); void icmpv4_reply(struct netdev *netdev, struct eth_hdr *hdr); #endif #ifndef ICAL_STREAMPOS_H #define ICAL_STREAMPOS_H namespace ical { /** * Represents a postion in the (source) stream. It is used for constructing * nice error messages. * * Note: only CRLF ("\r\n") is considered as a line ending in order to match * the definition of 'content line' from RFC 5545. */ class StreamPos { private: unsigned long column = 0; unsigned long line = 0; public: unsigned long getLine() const { return line; } unsigned long getColumn() const { return column; } StreamPos() { } void advanceColumn() { ++column; } void advanceLine() { column = 0; ++line; } }; } // namespace ical #endif // ICAL_STREAMPOS_H #ifndef QT4COMPAT_H #define QT4COMPAT_H #include #ifndef Q_LIKELY # define Q_LIKELY(s) s #endif #ifndef Q_UNLIKELY # define Q_UNLIKELY(s) s #endif #ifndef Q_UNREACHABLE # define Q_UNREACHABLE() Q_ASSERT(false) #endif #ifndef Q_ASSUME # define Q_ASSUME(s) if (s) {} else { Q_UNREACHABLE(); } #endif #endif // QT4COMPAT_H // // Licensed under the terms in License.txt // // Copyright 2010 Allen Ding. All rights reserved. // #import #define KW_VERSION 0.5 // Blocks being unavailable cripples the usability of Kiwi, but is supported // because they are not available on anything less than a device running 3.2. #if defined(__BLOCKS__) #define KW_BLOCKS_ENABLED 1 #endif // #if defined(__BLOCKS__) // As of iPhone SDK 4 GM, exceptions thrown across an NSInvocation -invoke or // forwardInvocation: boundary in the simulator will terminate the app instead // of being caught in @catch blocks from the caller side of the -invoke. Kiwi // tries to handle this by storing the first exception that it would have // otherwise thrown in a nasty global that callers can look for and handle. // (Buggy termination is less desirable than global variables). // // Obviously, this can only handles cases where Kiwi itself would have raised // an exception. #if TARGET_IPHONE_SIMULATOR #define KW_TARGET_HAS_INVOCATION_EXCEPTION_BUG 1 #endif // #if TARGET_IPHONE_SIMULATOR #ifndef __LIB_DBG__ #define __LIB_DBG__ #define DEBUG #ifdef DEBUG # define printk(fmt, ...) \ ({ \ char ____fmt[] = fmt; \ trace_printk(____fmt, sizeof(____fmt), \ ##__VA_ARGS__); \ }) #else # define printk(fmt, ...) \ do { } while (0) #endif #endif /* __LIB_DBG__ */ #ifndef __BYTESTREAM__ #define __BYTESTREAM__ #include #include #define BS_RO 0 #define BS_RW 1 typedef struct _ByteStream { char* filename; size_t size; uint8_t* data; uint32_t offset; int exhausted; } ByteStream; ByteStream* bsalloc(unsigned int size); ByteStream* bsmap(char* filename); int bsfree(ByteStream* bstream); void bsseek(ByteStream* bs, uint32_t offset); void bsreset(ByteStream* bs); unsigned int bsread(ByteStream* bs, uint8_t* buf, size_t size); unsigned int bsread_offset(ByteStream* bs, uint8_t* buf, size_t size, uint32_t offset); int bswrite(ByteStream* bs, uint8_t* data, unsigned int size); unsigned int bswrite_offset(ByteStream* bs, uint8_t* buf, size_t size, uint32_t offset); int bssave(ByteStream* bs, char* filename); #endif #ifndef PHEVALUATOR_CARD_H #define PHEVALUATOR_CARD_H #ifdef __cplusplus #include #include namespace phevaluator { class Card { public: Card() {} Card(int id) : id_(id) {} Card(std::string name) { const std::unordered_map rankMap = { {'2', 0}, {'3', 1}, {'4', 2}, {'5', 3}, {'6', 4}, {'7', 5}, {'8', 6}, {'9', 7}, {'T', 8}, {'J', 9}, {'Q', 10}, {'K', 11}, {'A', 12}, }; const std::unordered_map suitMap = { {'C', 0}, {'D', 1}, {'H', 2}, {'S', 3}, {'c', 0}, {'d', 1}, {'h', 2}, {'s', 3}, }; if (name.length() < 2) { // TODO: throw an exception here } id_ = rankMap.at(name[0]) * 4 + suitMap.at(name[1]); } operator int() const { return id_; } private: int id_; }; } // namespace phevaluator #endif // __cplusplus #endif // PHEVALUATOR_CARD_H /* ===-- assembly.h - compiler-rt assembler support macros -----------------=== * * The LLVM Compiler Infrastructure * * This file is distributed under the University of Illinois Open Source * License. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== * * This file defines macros for use in compiler-rt assembler source. * This file is not part of the interface of this library. * * ===----------------------------------------------------------------------=== */ #ifndef COMPILERRT_ASSEMBLY_H #define COMPILERRT_ASSEMBLY_H // Define SYMBOL_NAME to add the appropriate symbol prefix; we can't use // USER_LABEL_PREFIX directly because of cpp brokenness. #if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) #define SYMBOL_NAME(name) name #define SEPARATOR @ #else #define SYMBOL_NAME(name) _##name #define SEPARATOR ; #endif #define DEFINE_COMPILERRT_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ .private_extern SYMBOL_NAME(name) SEPARATOR \ SYMBOL_NAME(name): #endif /* COMPILERRT_ASSEMBLY_H */ // Copyright (c) 2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_PROXY_PROXY_RESOLVER_MAC_H_ #define NET_PROXY_PROXY_RESOLVER_MAC_H_ #pragma once #include #include "googleurl/src/gurl.h" #include "net/base/net_errors.h" #include "net/proxy/proxy_resolver.h" namespace net { // Implementation of ProxyResolver that uses the Mac CFProxySupport to implement // proxies. class ProxyResolverMac : public ProxyResolver { public: ProxyResolverMac() : ProxyResolver(false /*expects_pac_bytes*/) {} // ProxyResolver methods: virtual int GetProxyForURL(const GURL& url, ProxyInfo* results, CompletionCallback* callback, RequestHandle* request, const BoundNetLog& net_log); virtual void CancelRequest(RequestHandle request) { NOTREACHED(); } virtual int SetPacScript( const scoped_refptr& script_data, CompletionCallback* /*callback*/) { script_data_ = script_data_; return OK; } private: scoped_refptr script_data_; }; } // namespace net #endif // NET_PROXY_PROXY_RESOLVER_MAC_H_ #include #include "bincookie.h" int main(int argc, char *argv[]) { if (argc != 2) { printf("Usage: %s [Full path to Cookies.binarycookies file]\n", argv[0]); printf("Example: %s Cookies.binarycookies\n", argv[0]); return 1; } binarycookies_t *bc = binarycookies_init(argv[1]); unsigned int i, j; binarycookies_flag flags; // Output in Netscape cookies.txt format for (i = 0; i < bc->num_pages; i++) { for (j = 0; j < bc->pages[i]->number_of_cookies; j++) { flags = bc->pages[i]->cookies[j]->flags; // domain, flag, path, secure, expiration, name, value printf("%s\t%s\t%s\t%s\t%.f\t%s\t%s\n", bc->pages[i]->cookies[j]->url, bc->pages[i]->cookies[j]->url[0] == '.' ? "TRUE" : "FALSE", bc->pages[i]->cookies[j]->path, flags == secure || flags == secure_http_only ? "TRUE" : "FALSE", bc->pages[i]->cookies[j]->expiration_date, bc->pages[i]->cookies[j]->name, bc->pages[i]->cookies[j]->value); } } binarycookies_free(bc); return 0; } /* ISC license. */ #undef _POSIX_C_SOURCE #undef _XOPEN_SOURCE #include int main (void) { arc4random_addrandom("", 1) ; return 0 ; } #ifndef _STACK_H_ #define _STACK_H_ /* * data stack for use with automaton infrastructure */ #include "dataStackEntry.h" typedef struct stack Stack; Stack *stack_create(int size); void stack_destroy(Stack *st); void reset(Stack *st); void push(Stack *st, DataStackEntry d); DataStackEntry pop(Stack *st); #endif /* _STACK_H_ */ #include #ifndef TAILQ_END #define TAILQ_END(head) NULL #endif // // BIObjCHelpers.h // BIObjCHelpersExample // // Created by Bogdan Iusco on 1/19/15. // Copyright (c) 2015 Bogdan Iusco. All rights reserved. // // Starters #import "BIStarterProtocol.h" #import "BILifecycle.h" #import "BIStartersFactory.h" #import "BIOperationQueue.h" // Views #import "BITableView.h" // Datasources #import "BIDatasourceTableView.h" #import "BIDatasourceCollectionView.h" #import "BIDatasourceFetchedTableView.h" #import "BIDatasourceFetchedCollectionView.h" #import "BIDatasourceFeedTableView.h" #import "BIBatch.h" // Handlers #import "BIHandlerBase.h" #import "BIHandlerTableView.h" // Categories #import "NSBundle+BIExtra.h" #import "NSString+BIExtra.h" #import "NSDate+BIAttributedString.h" // Batch #import "BIBatch.h" #import "BIBatchRequest.h" #import "BIBatchResponse.h" // A test for the propagation of the -mmcu option to -cc1 and -cc1as // RUN: %clang -### -target avr -mmcu=atmega328p -save-temps %s 2>&1 | FileCheck %s // CHECK: clang{{.*}} "-cc1" {{.*}} "-target-cpu" "atmega328p" // CHECK: clang{{.*}} "-cc1as" {{.*}} "-target-cpu" "atmega328p" // // Licensed under the terms in License.txt // // Copyright 2010 Allen Ding. All rights reserved. // #import #define KW_VERSION 0.5 // Blocks being unavailable cripples the usability of Kiwi, but is supported // because they are not available on anything less than a device running 3.2. #if defined(__BLOCKS__) #define KW_BLOCKS_ENABLED 1 #endif // #if defined(__BLOCKS__) // As of iPhone SDK 4 GM, exceptions thrown across an NSInvocation -invoke or // forwardInvocation: boundary in the simulator will terminate the app instead // of being caught in @catch blocks from the caller side of the -invoke. Kiwi // tries to handle this by storing the first exception that it would have // otherwise thrown in a nasty global that callers can look for and handle. // (Buggy termination is less desirable than global variables). // // Obviously, this can only handles cases where Kiwi itself would have raised // an exception. #if TARGET_IPHONE_SIMULATOR #define KW_TARGET_HAS_INVOCATION_EXCEPTION_BUG 1 #endif // #if TARGET_IPHONE_SIMULATOR /// \file /// \brief This header contains functionality needed for serializing and deserealizing to/from a stream #pragma once #include "ISerializable.h" #include "IStorage.h" #include /// Contains all the functionality provided by the library. namespace simpson { /// Serialize object to ostream std::ostream& operator<<(std::ostream& outStream, simpson::ISerializable& obj); /// Deserialize object from istream std::istream& operator>>(std::istream& inStream, simpson::ISerializable* obj); } // simpson #include #include #include int main(int argc, char** argv) { int listen_fd; struct sockaddr_in serv_addr; listen_fd = socket(AF_INET, SOCK_STREAM, 0); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); serv_addr.sin_port = htons(8080); bind(listen_fd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)); if (listen(listen_fd, 64)) { perror("listen"); } else { } return 0; } // RUN: clang-cc -E -C %s | FileCheck -strict-whitespace %s // CHECK: boo bork bar // zot // RUN: clang-cc -E -CC %s | FileCheck -strict-whitespace %s // CHECK: boo bork /* blah*/ bar // zot // RUN: clang-cc -E %s | FileCheck -strict-whitespace %s // CHECK: boo bork bar #define FOO bork // blah boo FOO bar // zot /* * Copyright 2016, Data61 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) * ABN 41 687 119 230. * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(D61_BSD) */ #pragma once /* Prevent the compiler from re-ordering any read or write across the fence. */ #define COMPILER_MEMORY_FENCE() __atomic_signal_fence(__ATOMIC_ACQ_REL) /* Prevent the compiler from re-ordering any write which follows the fence * in program order with any read or write which preceeds the fence in * program order. */ #define COMPILER_MEMORY_RELEASE() __atomic_signal_fence(__ATOMIC_RELEASE) /* Prevent the compiler from re-ordering any read which preceeds the fence * in program order with any read or write which follows the fence in * program order */. #define COMPILER_MEMORY_ACQUIRE() __atomic_signal_fence(__ATOMIC_ACQUIRE) #include #include #include #define STTY "/bin/stty " const char RAW[] = STTY "raw"; const char COOKED[] = STTY "cooked"; const char default_str[] = "I AM AN IDIOT "; int main(int argc, char **argv) { system(RAW); const char *str; if ( argc == 2 ) str = argv[1]; else str = default_str; size_t len = strlen(str); while ( 1 ) { for ( size_t i = 0 ; i < len ; i++ ) { getchar(); printf("\b%c", str[i]); } system(COOKED); printf("\n"); system(RAW); } return 0; } /* * startup.h * * Created on: Nov 15, 2016 * Author: RoyerAriel */ #ifndef STARTUP_C_ #define STARTUP_C_ #include "Timer.h" void startup() { //Start Systick Timer at 1ms Systick_Startup(); AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; //0x‭2000000‬ } #endif /* STARTUP_C_ */ #include #include int main(int argc, char *argv[]) { const char *args[2] = {"T7037", NULL}; execv("./T7037", args); } /* stddef.h */ /* * Copyright (c) 2014 Wind River Systems, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __INC_stddef_h__ #define __INC_stddef_h__ #include #include #if !defined(__ptrdiff_t_defined) #define __ptrdiff_t_defined typedef int ptrdiff_t; #endif #define offsetof(type, member) ((size_t) (&((type *) NULL)->member)) #endif /* __INC_stddef_h__ */ // Copyright (c) 2016 Sift Science. All rights reserved. @import Foundation; /** Debug output that can be turned on/off by SF_DEBUG_ENABLE macro. */ #ifdef SF_DEBUG_ENABLE #define SF_DEBUG(FORMAT, ...) NSLog(@"%s:%d " FORMAT, __FUNCTION__, __LINE__, ## __VA_ARGS__) #else #define SF_DEBUG(...) #endif /** Log messages to console that are important to the SDK users. */ #ifdef DEBUG #define SF_IMPORTANT(FORMAT, ...) NSLog(@"%s:%d " FORMAT, __FUNCTION__, __LINE__, ## __VA_ARGS__) #endif /* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #include #include #include #include long sys_sched_yield(va_list ap) { seL4_Yield(); return 0; } /* Copyright (C) 2003 Timo Sirainen */ #include "lib.h" #include "ioloop-internal.h" #ifdef IOLOOP_NOTIFY_NONE struct io *io_loop_notify_add(struct ioloop *ioloop __attr_unused__, const char *path __attr_unused__, io_callback_t *callback __attr_unused__, void *context __attr_unused__) { return NULL; } void io_loop_notify_remove(struct ioloop *ioloop __attr_unused__, struct io *io __attr_unused__) { } void io_loop_notify_handler_init(struct ioloop *ioloop __attr_unused__) { } void io_loop_notify_handler_deinit(struct ioloop *ioloop __attr_unused__) { } #endif #ifndef __THREAD_INFO_H #define __THREAD_INFO_H #include "globals.h" #include "sift_writer.h" #include "bbv_count.h" #include "pin.H" #include typedef struct { Sift::Writer *output; ADDRINT dyn_addresses[Sift::MAX_DYNAMIC_ADDRESSES]; UINT32 num_dyn_addresses; Bbv *bbv; UINT64 thread_num; ADDRINT bbv_base; UINT64 bbv_count; ADDRINT bbv_last; BOOL bbv_end; UINT64 blocknum; UINT64 icount; UINT64 icount_cacheonly; UINT64 icount_cacheonly_pending; UINT64 icount_detailed; UINT64 icount_reported; ADDRINT last_syscall_number; ADDRINT last_syscall_returnval; UINT64 flowcontrol_target; ADDRINT tid_ptr; ADDRINT last_routine; ADDRINT last_call_site; BOOL last_syscall_emulated; BOOL running; } __attribute__((packed,aligned(LINE_SIZE_BYTES))) thread_data_t; extern thread_data_t *thread_data; void initThreads(); #endif // __THREAD_INFO_H #ifndef _LINUX_ERR_H #define _LINUX_ERR_H #include #include /* * Kernel pointers have redundant information, so we can use a * scheme where we can return either an error code or a dentry * pointer with the same return value. * * This should be a per-architecture thing, to allow different * error and pointer decisions. */ #define MAX_ERRNO 4095 #ifndef __ASSEMBLY__ #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) static inline void *ERR_PTR(long error) { return (void *) error; } static inline long PTR_ERR(const void *ptr) { return (long) ptr; } static inline long IS_ERR(const void *ptr) { return IS_ERR_VALUE((unsigned long)ptr); } #endif #endif /* _LINUX_ERR_H */ //----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- template matrix::matrix():data_(),rows_(0),cols_(0){} template matrix::matrix( std::size_t rows, std::size_t cols ): data_(rows*cols),rows_(rows),cols_(cols){} template matrix::matrix( std::initializer_list> init_list): data_( init_list.size() * init_list.begin()->size() ), rows_(init_list.size()),cols_( init_list.begin()->size() ){ // TODO: copy values } /* template matrix::matrix( const matrix& ); template matrix::matrix( matrix&& ); */ #ifdef HAVE_FORK #define HAVE_FORK 1 #endif #if HAVE_FORK # if TARGET_OS_IPHONE || APPLE_SDK_IPHONEOS # define HAVE_SYSTEM 0 # else # define HAVE_SYSTEM 1 # endif #else # define HAVE_SYSTEM 0 #endif #if HAVE_SYSTEM #include "p/sh.h" #endif #include "p/spp.h" #include "p/acr.h" #include "p/pod.h" #include "p/cpp.h" struct Proc *procs[] = { &spp_proc, &cpp_proc, &pod_proc, &acr_proc, #if HAVE_SYSTEM &sh_proc, #endif NULL }; DEFAULT_PROC(spp) #define DEBUG 0 // RUN: clang -emit-llvm < %s 2>&1 | grep 'addrspace(1)' | count 5 int foo __attribute__((address_space(1))); int ban[10] __attribute__((address_space(1))); int bar() { return foo; } int baz(int i) { return ban[i]; }#include /* Portability: A single method works on all the platforms we have tried so far, but this may not be true for all platforms. */ #if defined(ULTRIX42) || defined(ULTRIX43) || defined(SUNOS41) # define SETJMP _setjmp # define LONGJMP _longjmp extern "C" { int SETJMP( jmp_buf env ); void LONGJMP( jmp_buf env, int retval ); } #else // Unknown platforms fall through to here, generating compile time error # error #endif int data_start_addr(); int data_end_addr(); int stack_start_addr(); int stack_end_addr(); void ExecuteOnTmpStk( void (*func)() ); #import @protocol UITableViewDataSourceDynamicSizing; @interface UITableView (DynamicSizing) - (void)registerClass:(Class)cellClass forDynamicCellReuseIdentifier:(NSString *)identifier; - (void)registerNib:(UINib *)nib forDynamicCellReuseIdentifier:(NSString *)identifier; - (CGFloat)minimumHeightForCellWithReuseIdentifier:(NSString*)reuseIdentifier atIndexPath:(NSIndexPath*)indexPath; @end @protocol UITableViewDataSourceDynamicSizing - (void)tableView:(UITableView*)tableView configureCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath; @end/// @file sapi-dylink.h /// @brief Define the record used for runtime linking. /// This structure allows forth to easily look up things on the C /// side of the world. /// /// Special Rules: /// - The very first item is the size of the record. /// // This could be packed more tightly, but its now exactly // 16 bytes per record, which is nice. Make sure that doesn't // change. typedef struct { // This union is a bit crazy, but its the simplest way of // getting the compiler to shut up. union { void (*fp) (void); int* ip; unsigned int ui; unsigned int* uip; unsigned long* ulp; } p; ///< Pointer to the object of interest int16_t size; ///< Size in bytes int16_t count; ///< How many int8_t kind; ///< Is this a variable or a constant? int8_t strlen; ///< Length of the string char *name; ///< Null-Terminated C string. } runtimelink_t; /// Helper Macro. #define FORTHNAME(x) (sizeof(x)-1),x extern const runtimelink_t dynamiclinks[]; /* ISC license. */ #ifndef S6RC_CONSTANTS_H #define S6RC_CONSTANTS_H #define S6RC_COMPILED_BASE "/etc/s6-rc/compiled" #define S6RC_LIVE_BASE "/s6/s6-rc" #define S6RC_COMPILED_DIR_LEN 32 #define S6RC_ONESHOT_RUNNER "s6rc-oneshot-runner" #define S6RC_ONESHOT_RUNNER_LEN (sizeof S6RC_ONESHOT_RUNNER - 1) #endif #ifndef LOADER_H #define LOADER_H #include "../../../libwiiu/src/coreinit.h" #include "../../../libwiiu/src/socket.h" #include "../../../libwiiu/src/types.h" void _start(); void _entryPoint(); /* Arbitrary kernel write syscall */ void kern_write(void *addr, uint32_t value); #endif /* LOADER_H */#include #if defined Q_WS_X11 #include #endif // return idle time in seconds int getIdleSecs() { #if defined Q_WS_X11 int code, idle_sec; XScreenSaverInfo *ssinfo = XScreenSaverAllocInfo(); if (!ssinfo) goto fail; Display *display = XOpenDisplay(0); if (!display) goto fail; code = XScreenSaverQueryInfo(display, DefaultRootWindow(display), ssinfo); if (!code) goto fail; idle_sec = ssinfo->idle / 1000; XFree(ssinfo); XCloseDisplay(display); return idle_sec; fail: if (ssinfo) XFree(ssinfo); if (display) XCloseDisplay(display); return -1; #else return -1; #endif } /* Chapter 27, drill 1. Write a Hello World program 2. Define two variables holding "Hello" and "World!", concatenate them with a space in between and output them as "Hello World!" 3. Define a function taking a char* p and an int x, print their values in the format "p is 'foo' and x is 7". Call it with a few argument pairs. */ #include #include #include void my_func(char* p, int x) { printf("p is \"%s\" and x is %i\n",p,x); } int main() { printf("Hello World!\n"); char* hello = "Hello"; char* world = "World!"; char* hello_world = (char*) malloc(strlen(hello)+strlen(world)+2); strcpy(hello_world,hello); hello_world[strlen(hello)] = ' '; strcpy(hello_world+strlen(hello)+1,world); printf("%s\n",hello_world); my_func("foo",7); my_func("Scott Meyers",42); my_func("Bjarne Stroustrup",99); }// JPet User - JPetUser.h #ifndef JPET_USER_H #define JPET_USER_H #include "TNamed.h" class JPetUser: public TNamed { protected: int m_id; std::string m_name; std::string m_lastName; std::string m_login; std::string m_password; bool m_isRoot; std::string m_creationDate; std::string m_lastLoginDate; static bool m_isUserLogged; inline void toggleUserLoggedStatus() { m_isUserLogged = (m_isUserLogged == true) ? false : true; } virtual std::string password(void) const; public: JPetUser(int p_id, std::string p_name, std::string p_lastName, std::string p_login, std::string p_password, bool p_isRoot); virtual ~JPetUser(void); static bool isUserLogged(void); virtual bool logIn(void); virtual bool logOut(void); virtual bool changeLogin(void); virtual bool changePassword(void); virtual int id(void) const; virtual std::string name(void) const; virtual std::string lastName(void) const; virtual std::string login(void) const; virtual bool isRoot(void) const; virtual std::string creationDate(void) const; virtual std::string lastLoginDate(void) const; private: ClassDef(JPetUser, 1); }; #endif // JPET_USER_H /* for MAX_TXT_SEG_BYTES & MAX_TXT_SEG_LEN */ #include "txt-seg/config.h" #define MAX_TERM_BYTES MAX_TXT_SEG_BYTES /* consider both math & term */ #define MAX_QUERY_BYTES (MAX_TXT_SEG_BYTES * 32) #define MAX_QUERY_WSTR_LEN (MAX_TXT_SEG_LEN * 32) #define MAX_MERGE_POSTINGS 4096 #define SNIPPET_PADDING 80 #define MAX_SNIPPET_SZ 4096 //#define DEBUG_SNIPPET //#define DEBUG_POST_MERGE /* max mark score, type of mnc_score_t */ #define MNC_MARK_SCORE 99 /* #define MNC_DEBUG #define MNC_SMALL_BITMAP */ //#define DEBUG_MATH_EXPR_SEARCH #define RANK_SET_DEFAULT_VOL 45 #define DEFAULT_RES_PER_PAGE 10 //#define DEBUG_PROXIMITY #define ENABLE_PROXIMITY_SCORE #define MAX_HIGHLIGHT_OCCURS 8 //#define DEBUG_HILIGHT_SEG_OFFSET //#define DEBUG_HILIGHT_SEG //#define DEBUG_MATH_SCORE_POSTING //#define VERBOSE_SEARCH //#define DEBUG_MATH_SEARCH //#define DEBUG_PRINT_TARGET_DOC_MATH_SCORE // // SEEngineProtocol.h // Pods // // Created by Danil Tulin on 3/14/16. // // #import @protocol EngineProtocol - (void)feedBGRAImageData:(u_int8_t *)data width:(NSUInteger)width heieght:(NSUInteger)height; @property (nonatomic) CGFloat progress; @end #define T_INT 0 #define T_CHR 1 #define T_RTN 2 struct stack_node { struct stack_node *cdr; union node_data data; char type; } union node_data { struct routine routine; int numval; } struct routine { struct routine *parent; struct iq_node *nodes; int num_nodes; } struct iq_node { struct iq_node *next; union node_data instr; char type; } /* $FreeBSD$ */ /* XXX: Depend on our system headers protecting against multiple includes. */ #include #undef _PATH_FTPUSERS #include #define _DIAGASSERT(x) #include #ifndef _SIZE_T_DECLARED typedef __size_t size_t; #define _SIZE_T_DECLARED #endif long long strsuftollx(const char *, const char *, long long, long long, char *, size_t); #ifndef __BITOPS_H__ #define __BITOPS_H__ #include #include static inline int fls(int x) { return WORD_BITS - __clz(x); } static inline int ffs(int x) { /* mask the least significant bit only */ return fls(x & -x); } static inline int log2(int x) { if (!x) return INF; int sign = 1; if (x < 0) { sign = -sign; x = -x; } return (fls(x) - 1) * sign; } #endif /* __BITOPS_H__ */ #ifndef SUBDOC_PATH_H #define SUBDOC_PATH_H #include "subdoc-api.h" #include "jsonsl_header.h" #ifdef __cplusplus extern "C" { #endif #define COMPONENTS_ALLOC 32 typedef struct subdoc_PATH_st { struct jsonsl_jpr_st jpr_base; struct jsonsl_jpr_component_st components_s[COMPONENTS_ALLOC]; int has_negix; /* True if there is a negative array index in the path */ } subdoc_PATH; struct subdoc_PATH_st *subdoc_path_alloc(void); void subdoc_path_free(struct subdoc_PATH_st*); void subdoc_path_clear(struct subdoc_PATH_st*); int subdoc_path_parse(struct subdoc_PATH_st *nj, const char *path, size_t len); jsonsl_error_t subdoc_path_add_arrindex(subdoc_PATH *pth, size_t ixnum); #define subdoc_path_pop_component(pth) do { \ (pth)->jpr_base.ncomponents--; \ } while (0); #ifdef __cplusplus } #endif #endif #define OBSCURE(X) X #define DECORATION typedef int T; void OBSCURE(func)(int x) { OBSCURE(T) DECORATION value; } // RUN: c-index-test -cursor-at=%s:1:11 %s | FileCheck -check-prefix=CHECK-1 %s // CHECK-1: macro definition=OBSCURE // RUN: c-index-test -cursor-at=%s:2:14 %s | FileCheck -check-prefix=CHECK-2 %s // CHECK-2: macro definition=DECORATION // RUN: c-index-test -cursor-at=%s:5:7 %s | FileCheck -check-prefix=CHECK-3 %s // CHECK-3: macro instantiation=OBSCURE:1:9 // RUN: c-index-test -cursor-at=%s:6:6 %s | FileCheck -check-prefix=CHECK-4 %s // CHECK-4: macro instantiation=OBSCURE:1:9 // RUN: c-index-test -cursor-at=%s:6:19 %s | FileCheck -check-prefix=CHECK-5 %s // CHECK-5: macro instantiation=DECORATION:2:9 // RUN: llvm-gcc %s -S -o - // PR854 struct kernel_symbol { unsigned long value; }; unsigned long loops_per_jiffy = (1<<12); static const char __kstrtab_loops_per_jiffy[] __attribute__((section("__ksymtab_strings"))) = "loops_per_jiffy"; static const struct kernel_symbol __ksymtab_loops_per_jiffy __attribute__((__used__)) __attribute__((section("__ksymtab"))) = { (unsigned long)&loops_per_jiffy, __kstrtab_loops_per_jiffy }; // // MFSideMenuShadow.h // MFSideMenuDemoSearchBar // // Created by Michael Frederick on 5/13/13. // Copyright (c) 2013 Frederick Development. All rights reserved. // #import @interface MFSideMenuShadow : NSObject @property (nonatomic, assign) BOOL enabled; @property (nonatomic, assign) CGFloat radius; @property (nonatomic, assign) CGFloat opacity; @property (nonatomic, strong) UIColor *color; @property (nonatomic, weak) UIView *shadowedView; + (MFSideMenuShadow *)shadowWithView:(UIView *)shadowedView; + (MFSideMenuShadow *)shadowWithColor:(UIColor *)color radius:(CGFloat)radius opacity:(CGFloat)opacity; - (void)draw; - (void)shadowedViewWillRotate; - (void)shadowedViewDidRotate; @end // RUN: %clang_cc1 -fsyntax-only -verify // PR9137 void f0(int x) : {}; void f1(int x) try {}; /** @file Provides a secure platform-specific method to detect physically present user. Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ /** This function provides a platform-specific method to detect whether the platform is operating by a physically present user. Programmatic changing of platform security policy (such as disable Secure Boot, or switch between Standard/Custom Secure Boot mode) MUST NOT be possible during Boot Services or after exiting EFI Boot Services. Only a physically present user is allowed to perform these operations. NOTE THAT: This function cannot depend on any EFI Variable Service since they are not available when this function is called in AuthenticateVariable driver. @retval TRUE The platform is operated by a physically present user. @retval FALSE The platform is NOT operated by a physically present user. **/ BOOLEAN EFIAPI UserPhysicalPresent ( VOID ) { return FALSE; } // // ProfileViewController.h // PlayPlan // // Created by Zeacone on 15/11/8. // Copyright © 2015年 Zeacone. All rights reserved. // #import #import "PlayPlan.h" @interface ProfileViewController : UIViewController @end #pragma once #include "jwtxx/jwt.h" #include namespace JWTXX { struct Key::Impl { virtual ~Impl() {} virtual std::string sign(const void* data, size_t size) const = 0; virtual bool verify(const void* data, size_t size, const std::string& signature) const = 0; }; } // RUN: %ocheck 1 '-DNULL=(void *)0' // RUN: %ocheck 0 '-DNULL=0' int null_is_ptr_type() { char s[1][1+(int)NULL]; int i = 0; sizeof s[i++]; return i; } main() { return null_is_ptr_type(); } // Copyright 2016, Jeffrey E. Bedard #include "temperature.h" #include "config.h" #include "font.h" #include "util.h" #include uint8_t get_temp(void) { return xstatus_system_value(XSTATUS_SYSFILE_TEMPERATURE) / 1000; } // Returns x offset for next item uint16_t draw_temp(xcb_connection_t * xc, const uint16_t offset) { uint8_t sz = 4; const struct JBDim f = xstatus_get_font_size(); const int16_t x = offset + XSTATUS_CONST_PAD; { // buf scope char buf[sz]; sz = snprintf(buf, sz, "%dC", get_temp()); xcb_image_text_8(xc, sz, xstatus_get_window(xc), xstatus_get_gc(xc), x, f.h, buf); } return x + f.w * sz + XSTATUS_CONST_PAD; } #ifndef SHELL_H #define SHELL_H #include #define report_error() fprintf(stderr, "[%s: %s():%d] %s\n", __FILE__, \ __FUNCTION__, \ __LINE__, \ strerror(errno)); #define sizeof_array(x) (sizeof(x) / sizeof(*x)) #define DEFAULT_PROMPT "$ " #define DEFAULT_PATH "/bin:/usr/bin/:/sbin/:/usr/local/bin" #define DEFAULT_HOME "/" typedef struct command_t{ char **array; unsigned int elements; }command_t; typedef struct shell_t{ bool running; struct environ_t *env; pid_t shell_pid; char *pwd; }shell_t; char *copy_string(const char *str); unsigned int count_token(char *string, const char *token_string); void free_command(command_t *command); command_t *parse(char *line); int change_shell_dir(char *path); int execute_builtins(char **input); int execute_command(command_t *c); #endif // // ServiceMBTA_sensitive.h // MBTA-APIs // // Created by Steve Caine on 01/05/115. // Copyright (c) 2015 Steve Caine. All rights reserved. // // your private key to the MBTA-v2 API goes here #define key_MBTA_v2_API @"" // you should not commit any version of this file that contains the key // to any source-control repository that will be made public or otherwise shared// @(#)root/hist:$Name: $:$Id: TH1I.h,v 1.1 2002/05/18 11:02:49 brun Exp $ // Author: Rene Brun 08/09/2003 /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TH1I #define ROOT_TH1I ////////////////////////////////////////////////////////////////////////// // // // TH1I // // // // 1-Dim histogram with a 4 bits integer per channel // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TH1 #include "TH1.h" #endif #endif #include #include #include #include #include #include off_t get_file_size(const char *filename) { struct stat buffer; return (stat(filename, &buffer)==0 ? buffer.st_size : -1); } int file_is_readable(char *filename) { if ( access(filename, R_OK) != -1 ) { return 1; } else { return 0; } } int main(int argc, char *argv[]) { clock_t t0, t1; if (argc <= 1) { printf("Usage: %s [arguments]\n", argv[0]); return EXIT_FAILURE; } t0 = clock(); printf("Hello World!\n"); if (file_is_readable(argv[1])) { printf("Input File = '%s'\n", argv[1]); } else { printf("Input File = '%s' (file does not exist or read permissions absent)\n", argv[1]); } t1 = clock(); printf("Time elapsed = %f (ms)\n", (t1-t0)*1000/(double)CLOCKS_PER_SEC ); return EXIT_SUCCESS; } /* Copyright (c) 2015, Intel Corporation All rights reserved. Redistribution and use in 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 reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // count trailing zeros with llvm semantics int cgen_cttz_int(int n) { if(n==0) return sizeof(int); return __builtin_ctz(n); } int cgen_flipsign_int(int64_t x, int64_t y) { return (y >= 0 ? x : -x); } /** * Win32 EntropySource Header File * (C) 1999-2008 Jack Lloyd */ #ifndef BOTAN_ENTROPY_SRC_WIN32_H__ #define BOTAN_ENTROPY_SRC_WIN32_H__ #include namespace Botan { /** * Win32 Entropy Source */ class BOTAN_DLL Win32_EntropySource : public EntropySource { public: std::string name() const { return "Win32 Statistics"; } void fast_poll(byte buf[], u32bit length); void slow_poll(byte buf[], u32bit length); }; } #endif // Spellable.h #ifndef SPELLABLE_H #define SPELLABLE_H #include template class Spellable { T* value; public: Spellable() {}; Spellable(T* value): value(value) {} Spellable(T v) { value = new T(v); } void SetValue(T* v) { value = v; } void SetValue(T v) { value = new T(v); } T GetValue() const { return *value; } std::string spell(); // Let's do arithmetic! Spellable & operator=(const T &rhs) { SetValue(rhs); } Spellable & operator+=(const T &rhs) { *value += rhs; return *this; } bool operator==(const T &other) const { return *value == other; } bool operator==(const std::string &other) const { return spell() == other; } }; // http://www.codeproject.com/Articles/48575/How-to-define-a-template-class-in-a-h-file-and-imp // The linker gets confused if we don't include the implementation here. #include "Spellable.cpp" #endif // Spellable.h // Copyright 2015 Smartling, Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this work except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // SmartlingLib.h // SmartlingLib // // Created by Pavel Ivashkov on 2015-05-15. // #import //! Project version number for SmartlingLib. FOUNDATION_EXPORT double SmartlingLibVersionNumber; //! Project version string for SmartlingLib. FOUNDATION_EXPORT const unsigned char SmartlingLibVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import #import #ifndef COMPAT_H #define COMPAT_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef __dead #define __dead #endif #ifndef HAVE_REALLOCARRAY void *reallocarray(void *, size_t, size_t); #endif /* !HAVE_REALLOCARRAY */ #endif /* COMPAT_H */ #include #include void abertura() { printf("*******************\n"); printf("* Jogo de Forca *\n"); printf("*******************\n\n"); } int main() { char palavrasecreta[20]; sprintf(palavrasecreta, "MELANCIA"); int acertou = 0; int enforcou = 0; char chutes[26]; int tentativas = 0; abertura(); do { for(int i = 0; i < strlen(palavrasecreta); i++) { int achou = 0; for(int j = 0; j < tentativas; j++) { if(chutes[j] == palavrasecreta[i]) { achou = 1; break; } } if(achou) { printf("%c ", palavrasecreta[i]); } else { printf("_ "); } } printf("\n"); char chute; printf("Qual letra? "); scanf(" %c", &chute); chutes[tentativas] = chute; tentativas++; } while(!acertou && !enforcou); } #ifndef __JniHelpersCommon_h__ #define __JniHelpersCommon_h__ // Disable some annoying compiler warnings #if WIN32 #pragma warning(disable: 4996) // "Security" warnings for vsnprintf #endif #if WIN32 #define EXPORT __declspec(dllexport) #else #define EXPORT #endif #include #define kTypeInt "I" #define kTypeLong "J" #define kTypeFloat "F" #define kTypeDouble "D" #define kTypeBool "Z" #define kTypeByte "B" #define kTypeVoid "V" // Common Java classes #define kTypeJavaClass(x) "Ljava/lang/" #x ";" #define kTypeJavaException "L/java/lang/Exception" #define kTypeJavaString "Ljava/lang/String" // Array builder macro #define kTypeArray(x) "[" x #endif // __JniHelpersCommon_h__ /* * example2.c * * Created on: 3 May 2016 * Author: nick */ #include "ndm.h" #include #include void recvFunction(void*, NDM_Metadata); int main(int argc, char* argv[]) { int provided; MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided); ndmInit(); char uuid[10]; int data = 10; ndmReduce(&data, 1, NDM_INT, NDM_SUM, recvFunction, 0, NDM_GLOBAL_GROUP, "a"); ndmGroupRank(NDM_GLOBAL_GROUP, &data); ndmAllReduce(&data, 1, NDM_INT, NDM_MAX, recvFunction, NDM_GLOBAL_GROUP, "maxrank"); ndmFinalise(); MPI_Finalize(); return 0; } void recvFunction(void* buffer, NDM_Metadata metaData) { printf("Got reduction data '%d' with uuid %s on pid %d\n", *((int*)buffer), metaData.unique_id, metaData.my_rank); } #include #include char* find(char *haystack, char needle); int main(){ char input[401]={'\0'}, symbol, *result; fgets(input, 401, stdin); symbol=getchar(); result=find(input, symbol); if(result!=NULL){ printf("%ld", result - input); } else{ printf("-1"); } return 0; } char* find(char *haystack, char needle){ int i; char *result=NULL; for(i=0; i<400 && haystack[i]!='\0'; i++){ if(haystack[i]==needle){ result=&haystack[i]; break; } } return result; #import #import //#import #define COCOAGIT_REPO @"." #define TEST_RESOURCES_PATH @"../../UnitTests/Resources/" #define DOT_GIT TEST_RESOURCES_PATH @"dot_git/" #define DELTA_REF_PACK TEST_RESOURCES_PATH @"packs/cg-0.2.5-deltaref-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack" #define DELTA_OFS_PACK TEST_RESOURCES_PATH @"packs/cg-0.2.5-deltaofs-be5a15ac583f7ed1e431f03bd444bbde6511e57c.pack" @interface GITTestHelper : NSObject {} + (NSString *) createTempRepoWithDotGitDir:(NSString *)clonePath; + (BOOL) removeTempRepoAtPath:(NSString *)aPath; + (NSDictionary *)packedObjectInfo; @end// RUN: clang-cc -emit-llvm %s -o - typedef short __v4hi __attribute__ ((__vector_size__ (8))); void f() { __v4hi A = (__v4hi)0LL; } __v4hi x = {1,2,3}; __v4hi y = {1,2,3,4}; typedef int x __attribute((vector_size(16))); int a() { x b; return b[2LL]; } #ifndef TEST_LINEAR_HASH_H_ #define TEST_LINEAR_HASH_H_ #include #include #include #include "../../../planckunit/src/planck_unit.h" #include "../../../../dictionary/linear_hash/linear_hash.h" #ifdef __cplusplus extern "C" { #endif void runalltests_linear_hash(); #ifdef __cplusplus } #endif #endif//Copyright (c) 2020 Ultimaker B.V. //CuraEngine is released under the terms of the AGPLv3 or higher. #ifndef FMATRIX3X3_H #define FMATRIX3X3_H namespace cura { class Point3; class FPoint3; class FMatrix3x3 { public: double m[3][3]; FMatrix3x3(); Point3 apply(const FPoint3& p) const; }; } //namespace cura #endif //FMATRIX3X3_H#pragma once #ifdef bool #undef bool #endif typedef char bool; #define true 1 #define false 0 typedef struct carp_thread* carp_thread_t; typedef void(*carp_thread_routine)(void* arg); typedef struct carp_library* carp_library_t; /* Init/shutdown */ void carp_platform_init(); void carp_platform_shutdown(); /* --- Threads --- */ carp_thread_t carp_thread_create(carp_thread_routine thread_routine, void* arg); void carp_thread_destroy(carp_thread_t thread); /* --- Timing --- */ int carp_millitime(); /* --- Libraries --- */ carp_library_t carp_load_library(const char* name); int carp_unload_library(carp_library_t lib); void* carp_find_symbol(carp_library_t lib, const char * name); char* carp_get_load_library_error(); /* -- misc -- */ void carp_sleep(int millis); typedef enum CARP_PLATFORM { CARP_PLATFORM_OSX = 0, CARP_PLATFORM_WINDOWS = 1, CARP_PLATFORM_LINUX = 2, CARP_PLATFORM_UNKNOWN = 100 } CARP_PLATFORM; CARP_PLATFORM carp_get_platform(); typedef struct { int count; void *data; } Array; #include #include "jpeglib.h" #include struct error_mgr2 { struct jpeg_error_mgr pub; /* "public" fields */ jmp_buf setjmp_buffer; /* for return to caller */ }; typedef struct error_mgr2 * error_ptr2; /* * Here's the routine that will replace the standard error_exit method: */ void error_exit (j_common_ptr cinfo) { /* cinfo->err really points to a error_mgr2 struct, so coerce pointer */ error_ptr2 myerr = (error_ptr2) cinfo->err; /* Return control to the setjmp point */ longjmp(myerr->setjmp_buffer, 1); } #include "test_parser.h" void one_or_more_one(void **state) { grammar_t *grammar = grammar_init( non_terminal("One"), rule_init( "One", one_or_more( terminal("11") ) ), 1 ); parse_t *result = parse("11", grammar); assert_non_null(result); assert_int_equal(result->length, 2); assert_int_equal(result->n_children, 1); } void one_or_more_many(void **state) { grammar_t *grammar = grammar_init( non_terminal("One"), rule_init( "One", one_or_more( terminal("11") ) ), 1 ); parse_t *result = parse("1111111", grammar); assert_non_null(result); assert_int_equal(result->length, 6); assert_int_equal(result->n_children, 3); } void one_or_more_failure(void **state) { grammar_t *grammar = grammar_init( non_terminal("One"), rule_init( "One", one_or_more( terminal("11") ) ), 1 ); parse_t *result = parse("1", grammar); assert_null(result); } // Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include namespace proton { class ExecutorThreadingServiceStats { public: using Stats = vespalib::ThreadStackExecutorBase::Stats; private: Stats _masterExecutorStats; Stats _indexExecutorStats; Stats _summaryExecutorStats; Stats _indexFieldInverterExecutorStats; Stats _indexFieldWriterExecutorStats; Stats _attributeFieldWriterExecutorStats; public: ExecutorThreadingServiceStats(Stats masterExecutorStats, Stats indexExecutorStats, Stats summaryExecutorStats, Stats indexFieldInverterExecutorStats, Stats indexFieldWriterExecutorStats, Stats attributeFieldWriterExecutorStats); ~ExecutorThreadingServiceStats(); const Stats &getMasterExecutorStats() const { return _masterExecutorStats; } const Stats &getIndexExecutorStats() const { return _indexExecutorStats; } const Stats &getSummaryExecutorStats() const { return _summaryExecutorStats; } const Stats &getIndexFieldInverterExecutorStats() const { return _indexFieldInverterExecutorStats; } const Stats &getIndexFieldWriterExecutorStats() const { return _indexFieldWriterExecutorStats; } const Stats &getAttributeFieldWriterExecutorStats() const { return _attributeFieldWriterExecutorStats; } }; } #import @class WKInterfaceController; @class FakeInterfaceController; @protocol TestableWKInterfaceController - (void)awakeWithContext:(id)context; - (void)willActivate; - (void)didDeactivate; @optional - (void)pushControllerWithName:(NSString *)name context:(id)context; - (void)presentControllerWithName:(NSString *)name context:(id)context; @end #include "filters_api.h" static PF_FILTER_RESULT demo_filter_keyboard_event(connectionInfo* info, void* param) { proxyKeyboardEventInfo* event_data = (proxyKeyboardEventInfo*) param; return FILTER_PASS; } static PF_FILTER_RESULT demo_filter_mouse_event(connectionInfo* info, void* param) { proxyMouseEventInfo* event_data = (proxyMouseEventInfo*) param; if (event_data->x % 100 == 0) { return FILTER_DROP; } return FILTER_PASS; } bool filter_init(proxyEvents* events) { events->KeyboardEvent = demo_filter_keyboard_event; events->MouseEvent = demo_filter_mouse_event; } �@ul+�����p�� K K 911���!�!X$X$!'�*�+),�-�-�-�-y1�6�6:�;|?|?�@�D�DJE�JtO�P.V�Z�\�a�ac�eSjllRo�ptt�uvv�yX|L��������*������ۗۗۗ���<�����z���ܮ�����ӴV������;�;� �j���g�g�����&�g��;��k�k��������<�Ow���� �}}A�l�"�#& *n*-.�1!6�9�9�:<�=�A6FvG�HuI�J�K�M3R;U�UWWX&]�_@a@a�cd�e�i�i�j�jp�qvv�x�zg �"�h�[�!�!�`� �n���~�#��V�V�V�p�6�˭����B���������C��(����������������:�_��������.��=�=���������X�X�}�� �(������Z"&�)�*�*),�-s/�1�1�35�9 =�>�C�F�GBI-M�N�N�P%R�VZX�Z�^�^8b�e�e�e�f�f-l�l�n�r�r�v�y�zl|E�`�j��R�����������Ԡ ������Ѫ��3����*����������@���`�`���1�s�E��������������^��������:~-� � N �l�|N�$�%�'�(�(�,�.�.4K8�=SASASASA�BCOEOEpI�KoO�Q�Q�QU�Y\�\�\�_Acff�h���_�D���ӿ:��`�Q�����v��������,�,�,�h�����v�/������>�o�y���#ifndef OOC_ARRAY_H_ #define OOC_ARRAY_H_ #define array_malloc(size) calloc(1, (size)) #define array_free free #include #define _lang_array__Array_new(type, size) ((_lang_array__Array) { size, array_malloc((size) * sizeof(type)) }); #if defined(safe) #define _lang_array__Array_get(array, index, type) ( \ ((type*) array.data)[(index < 0 || index >= array.length) ? kean_exception_outOfBoundsException_throw(index, array.length), -1 : index]) #define _lang_array__Array_set(array, index, type, value) \ (((type*) array.data)[(index < 0 || index >= array.length) ? kean_exception_outOfBoundsException_throw(index, array.length), -1 : index] = value) #else #define _lang_array__Array_get(array, index, type) ( \ ((type*) array.data)[index]) #define _lang_array__Array_set(array, index, type, value) \ (((type*) array.data)[index] = value) #endif #define _lang_array__Array_free(array) { array_free(array.data); array.data = NULL; array.length = 0; } typedef struct { size_t length; void* data; } _lang_array__Array; #endif /* * $Id$ * * Define the tags in the shared memory in a reusable format. * Whoever includes this get to define what the SLTM macro does. * */ SLTM(CLI) SLTM(SessionOpen) SLTM(SessionClose) SLTM(ClientAddr) SLTM(Request) SLTM(URL) SLTM(Protocol) SLTM(Headers) //! Non overloaded function void simplefunc(); //! Function which takes two int arguments void f(int, int); //! Function which takes two double arguments void f(double, double); namespace test { //! Another function which takes two int arguments void g(int, int); //! Another function which takes two double arguments void g(double, double); } class MyType {}; class MyOtherType {}; //! Another function which takes a custom type void h(std::string, MyType); //! Another function which takes another custom type void h(std::string, MyOtherType o); //! Another function which takes a basic type void h(std::string, float myfloat); //! Another function which takes a const custom type void h(std::string, const MyType& mytype); //! Another function which takes a const basic type void h(std::string, const int myint); //! Another function which takes a const basic type template void h(std::string, const T myType); //! Another function which takes a const basic type template void h(std::string, const T m, const U n); #ifndef CLIENTMODEL_H #define CLIENTMODEL_H #include class OptionsModel; class AddressTableModel; class TransactionTableModel; class CWallet; QT_BEGIN_NAMESPACE class QDateTime; QT_END_NAMESPACE // Interface to Bitcoin network client class ClientModel : public QObject { Q_OBJECT public: // The only reason that this constructor takes a wallet is because // the global client settings are stored in the main wallet. explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0); OptionsModel *getOptionsModel(); int getNumConnections() const; int getNumBlocks() const; QDateTime getLastBlockDate() const; // Return true if client connected to testnet bool isTestNet() const; // Return true if core is doing initial block download bool inInitialBlockDownload() const; // Return conservative estimate of total number of blocks, or 0 if unknown int getTotalBlocksEstimate() const; QString formatFullVersion() const; private: OptionsModel *optionsModel; int cachedNumConnections; int cachedNumBlocks; signals: void numConnectionsChanged(int count); void numBlocksChanged(int count); // Asynchronous error notification void error(const QString &title, const QString &message); public slots: private slots: void update(); }; #endif // CLIENTMODEL_H #ifndef SRC_ONIG_RESULT_H_ #define SRC_ONIG_RESULT_H_ #include "oniguruma.h" class OnigResult { public: explicit OnigResult(OnigRegion* region, int indexInScanner); ~OnigResult(); int Count(); int LocationAt(int index); int LengthAt(int index); int Index() { return indexInScanner; } void SetIndex(int newIndex) { indexInScanner = newIndex; } private: OnigResult(const OnigResult&); // Disallow copying OnigResult &operator=(const OnigResult&); // Disallow copying OnigRegion *region_; int indexInScanner; }; #endif // SRC_ONIG_RESULT_H_ #ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class THit!+; #pragma link C++ class TObjHit+; #pragma link C++ class TSTLhit; #pragma link C++ class TSTLhitList; #pragma link C++ class TSTLhitDeque; #pragma link C++ class TSTLhitSet; #pragma link C++ class TSTLhitMultiset; #pragma link C++ class TSTLhitMap; #pragma link C++ class TSTLhitMultiMap; //#pragma link C++ class TSTLhitHashSet; //#pragma link C++ class TSTLhitHashMultiset; #pragma link C++ class pair; #pragma link C++ class TSTLhitStar; #pragma link C++ class TSTLhitStarList; #pragma link C++ class TSTLhitStarDeque; #pragma link C++ class TSTLhitStarSet; #pragma link C++ class TSTLhitStarMultiSet; #pragma link C++ class TSTLhitStarMap; #pragma link C++ class TSTLhitStarMultiMap; #pragma link C++ class pair; #pragma link C++ class TCloneshit+; #endif /* * $Id$ * * Storage method based on malloc(3) */ #include #include #include #include #include "cache.h" struct sma { struct storage s; }; static struct storage * sma_alloc(struct stevedore *st __unused, unsigned size) { struct sma *sma; sma = calloc(sizeof *sma, 1); assert(sma != NULL); sma->s.priv = sma; sma->s.ptr = malloc(size); assert(sma->s.ptr != NULL); sma->s.len = size; sma->s.space = size; return (&sma->s); } static void sma_free(struct storage *s) { struct sma *sma; sma = s->priv; free(sma->s.ptr); free(sma); } struct stevedore sma_stevedore = { "malloc", NULL, /* init */ NULL, /* open */ sma_alloc, NULL, /* trim */ sma_free }; #ifndef SRC_TAG_H_ #define SRC_TAG_H_ #include #include "readtags.h" class Tag { public: Tag(tagEntry entry) { name = entry.name; file = entry.file; kind = entry.kind != NULL ? entry.kind : ""; if (entry.address.pattern != NULL) pattern = entry.address.pattern; else pattern = ""; } std::string name; std::string file; std::string kind; std::string pattern; }; #endif // SRC_TAG_H_ #include inherit LIB_INITD; inherit UTILITY_COMPILE; static void create() { load_dir("obj", 1); load_dir("sys", 1); } // // NSView+CDAutoLayout.h // CDKitt // // Created by Aron Cedercrantz on 04-06-2013. // Copyright (c) 2013 Aron Cedercrantz. All rights reserved. // #import @interface NSView (CDAutoLayout) /** * Add the given view to this view as a subview and autoresizes it to fill the * receiving view. */ - (void)cd_addFillingAutoresizedSubview:(NSView *)subview; @end /** * \file os_uuid.c * \brief Create a new UUID. * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project */ #include "premake.h" #if PLATFORM_WINDOWS #include #endif int os_uuid(lua_State* L) { unsigned char bytes[16]; char uuid[38]; #if PLATFORM_WINDOWS CoCreateGuid((char*)bytes); #else int result; /* not sure how to get a UUID here, so I fake it */ FILE* rnd = fopen("/dev/urandom", "rb"); result = fread(bytes, 16, 1, rnd); fclose(rnd); if (!result) return 0; #endif sprintf(uuid, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], bytes[5], bytes[6], bytes[7], bytes[8], bytes[9], bytes[10], bytes[11], bytes[12], bytes[13], bytes[14], bytes[15]); lua_pushstring(L, uuid); return 1; } /* * Copyright 2008-2009 Katholieke Universiteit Leuven * * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, K.U.Leuven, Departement * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium */ #ifndef ISL_SAMPLE_H #define ISL_SAMPLE #include #include #if defined(__cplusplus) extern "C" { #endif __isl_give isl_vec *isl_basic_set_sample_vec(__isl_take isl_basic_set *bset); struct isl_vec *isl_basic_set_sample_bounded(struct isl_basic_set *bset); __isl_give isl_vec *isl_basic_set_sample_with_cone( __isl_take isl_basic_set *bset, __isl_take isl_basic_set *cone); __isl_give isl_basic_set *isl_basic_set_from_vec(__isl_take isl_vec *vec); int isl_tab_set_initial_basis_with_cone(struct isl_tab *tab, struct isl_tab *tab_cone); struct isl_vec *isl_tab_sample(struct isl_tab *tab); #if defined(__cplusplus) } #endif #endif #ifndef O1DROPBOX_H #define O1DROPBOX_H #include "o1.h" class O1Dropbox: public O1 { Q_OBJECT public: explicit O1Dropbox(QObject *parent = 0): O1(parent) { setRequestTokenUrl(QUrl("https://api.dropbox.com/1/oauth/request_token")); setAuthorizeUrl(QUrl("https://www.dropbox.com/1/oauth/authorize")); setAccessTokenUrl(QUrl("https://api.dropbox.com/1/oauth/access_token")); setLocalPort(1965); } }; #endif // O1DROPBOX_H #include "log.h" #include void debug(const char* format, ...) { #ifdef __DEBUG__ vprintf(format, args); #endif // __DEBUG__ } void initializeLogging() { } struct PureClangType { int x; int y; }; #ifndef SWIFT_CLASS_EXTRA # define SWIFT_CLASS_EXTRA #endif #ifndef SWIFT_CLASS(SWIFT_NAME) # define SWIFT_CLASS(SWIFT_NAME) SWIFT_CLASS_EXTRA #endif SWIFT_CLASS("SwiftClass") __attribute__((objc_root_class)) @interface SwiftClass @end @interface SwiftClass (Category) - (void)categoryMethod:(struct PureClangType)arg; @end SWIFT_CLASS("BOGUS") @interface BogusClass @end #pragma once #include "FilterStrategy.h" class CUsbDkRedirectorStrategy : public CUsbDkFilterStrategy { public: virtual NTSTATUS Create(CUsbDkFilterDevice *Owner) override { return CUsbDkFilterStrategy::Create(Owner); } virtual void Delete() override {} virtual NTSTATUS MakeAvailable() override; virtual NTSTATUS PNPPreProcess(PIRP Irp) override; private: static void PatchDeviceID(PIRP Irp); }; #ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 8 #define CLIENT_VERSION_REVISION 0 #define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #endif // CLIENTVERSION_H // @(#)root/base:$Name: $:$Id: TVersionCheck.h,v 1.2 2007/05/10 16:04:32 rdm Exp $ // Author: Fons Rademakers 9/5/2007 /************************************************************************* * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TVersionCheck #define ROOT_TVersionCheck ////////////////////////////////////////////////////////////////////////// // // // TVersionCheck // // // // Used to check if the shared library or plugin is compatible with // // the current version of ROOT. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_RVersion #include "RVersion.h" #endif class TVersionCheck { public: TVersionCheck(int versionCode); // implemented in TSystem.cxx }; static TVersionCheck gVersionCheck(ROOT_VERSION_CODE); #endif #pragma once #define DEFAULT_URL L"http://paulrouget.com/test/bbjs/basic/"; #ifndef RBX_CAPI_RUBY_DEFINES_H #define RBX_CAPI_RUBY_DEFINES_H /* Stub file provided for C extensions that expect it. All regular * defines and prototypes are in ruby.h */ #define RUBY 1 #define RUBINIUS 1 #define HAVE_STDARG_PROTOTYPES 1 /* These are defines directly related to MRI C-API symbols that the * mkmf.rb discovery code (e.g. have_func("rb_str_set_len")) would * attempt to find by linking against libruby. Rubinius does not * have an appropriate lib to link against, so we are adding these * explicit defines for now. */ #define HAVE_RB_STR_SET_LEN 1 #define HAVE_RB_STR_NEW5 1 #define HAVE_RB_STR_NEW_WITH_CLASS 1 #define HAVE_RB_DEFINE_ALLOC_FUNC 1 #define HAVE_RB_HASH_FOREACH 1 #define HAVE_RB_HASH_ASET 1 #define HAVE_RUBY_ENCODING_H 1 #define HAVE_RB_ENCDB_ALIAS 1 #endif /** * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #if defined(DEVICE_TRNG) #define MBEDTLS_ENTROPY_HARDWARE_ALT #endif #if defined(MBEDTLS_HW_SUPPORT) #include "mbedtls_device.h" #endif #include "power.h" #define SLEEP_MODE_ENABLE_BIT 4 void initializePower() { } void updatePower() { } void enterLowPowerMode() { // When WAIT instruction is executed, go into SLEEP mode OSCCONSET = (1 << SLEEP_MODE_ENABLE_BIT); asm("wait"); // TODO if we wake up, do we resume with the PC right here? there's an RCON // register with bits to indicate if we woke up from sleep. we'll need to // re-run setup, potentially. //C1CONSET / C1CONbits.x } /* This file is part of the KDE project Copyright (C) 2007 David Faure This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KTEXTEDITOR_EXPORT_H #define KTEXTEDITOR_EXPORT_H /* needed for KDE_EXPORT and KDE_IMPORT macros */ #include /* We use _WIN32/_WIN64 instead of Q_OS_WIN so that this header can be used from C files too */ #if defined _WIN32 || defined _WIN64 #ifndef KTEXTEDITOR_EXPORT # if defined(MAKE_KTEXTEDITOR_LIB) /* We are building this library */ # define KTEXTEDITOR_EXPORT KDE_EXPORT # else /* We are using this library */ # define KTEXTEDITOR_EXPORT KDE_IMPORT # endif #endif #else /* UNIX */ #define KTEXTEDITOR_EXPORT KDE_EXPORT #endif #endif // // Created by Vadim Shpakovski on 4/22/11. // Copyright 2011 Shpakovski. All rights reserved. // extern NSString *const kMASPreferencesWindowControllerDidChangeViewNotification; @interface MASPreferencesWindowController : NSWindowController { @private NSArray *_viewControllers; NSString *_title; id _lastSelectedController; } @property (nonatomic, readonly) NSArray *viewControllers; @property (nonatomic, readonly) NSUInteger indexOfSelectedController; @property (nonatomic, readonly) NSViewController *selectedViewController; @property (nonatomic, readonly) NSString *title; - (id)initWithViewControllers:(NSArray *)viewControllers; - (id)initWithViewControllers:(NSArray *)viewControllers title:(NSString *)title; - (void)selectControllerAtIndex:(NSUInteger)controllerIndex withAnimation:(BOOL)animate; - (IBAction)goNextTab:(id)sender; - (IBAction)goPreviousTab:(id)sender; - (void)resetFirstResponderInView:(NSView *)view; @end /* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) */ #ifndef __LIBSEL4_MACROS_H #define __LIBSEL4_MACROS_H /* * Some compilers attempt to pack enums into the smallest possible type. * For ABI compatability with the kernel, we need to ensure they remain * the same size as an 'int'. */ #define SEL4_FORCE_LONG_ENUM(type) \ _enum_pad_ ## type = (1U << ((sizeof(int)*8) - 1)) #ifndef CONST #define CONST __attribute__((__const__)) #endif #ifndef PURE #define PURE __attribute__((__pure__)) #endif #endif /**************************************************************************** * * Copyright (c) 2008 by Casey Duncan and contributors * All Rights Reserved. * * This software is subject to the provisions of the MIT License * A copy of the license should accompany this distribution. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * ****************************************************************************/ /* Renderer shared code * * $Id$ */ #ifndef _RENDERER_H_ #define _RENDERER_H_ typedef struct { PyObject_HEAD Py_ssize_t size; float *data; } FloatArrayObject; /* Return true if o is a bon-a-fide FloatArrayObject */ int FloatArrayObject_Check(FloatArrayObject *o); FloatArrayObject * FloatArray_new(Py_ssize_t size); FloatArrayObject * generate_default_2D_tex_coords(GroupObject *pgroup); /* Initialize the glew OpenGL extension manager If glew has already been initialized, do nothing */ int glew_initialize(void); #endif // // MBContactModel.h // MBContactPicker // // Created by Matt Bowman on 12/13/13. // Copyright (c) 2013 Citrrus, LLC. All rights reserved. // #import @protocol MBContactPickerModelProtocol @required @property (nonatomic, copy) NSString *contactTitle; @optional @property (nonatomic, copy) NSString *contactSubtitle; @property (nonatomic) UIImage *contactImage; @end @interface MBContactModel : NSObject @property (nonatomic, copy) NSString *contactTitle; @property (nonatomic, copy) NSString *contactSubtitle; @property (nonatomic) UIImage *contactImage; @end #include #include "extern.h" char * pgtypes_alloc(long size) { char *new = (char *) calloc(1L, size); if (!new) { errno = ENOMEM; return NULL; } memset(new, '\0', size); return (new); } char * pgtypes_strdup(char *str) { char *new = (char *) strdup(str); if (!new) errno = ENOMEM; return (new); } @import Base; @import ObjectiveC; BaseClass *getBaseClassObjC(); void useBaseClassObjC(BaseClass *); @interface UserClass : NSObject @end id getBaseProtoObjC(); void useBaseProtoObjC(id ); /* * 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 License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Random.h * A simple random number generator. * Copyright (C) 2012 Simon Newton */ #ifndef INCLUDE_OLA_MATH_RANDOM_H_ #define INCLUDE_OLA_MATH_RANDOM_H_ namespace ola { namespace math { /** * @brief Seed the random number generator */ void InitRandom(); /** * @brief Return a random number between lower and upper, inclusive. i.e. * [lower, upper] * @param lower the lower bound of the range the random number should be within * @return the random number */ int Random(int lower, int upper); } // namespace math } // namespace ola #endif // INCLUDE_OLA_MATH_RANDOM_H_ #include "hardware/packet.h" #include "serial.h" void btoa(int num, char *buf, int digits) { int shift = digits - 1; int current = pow(2, shift); char digit[2]; while (current > 0) { sprintf(digit, "%d", ((num & current) >> shift) & 1); strncat(buf, digit, 1); shift--; current /= 2; } strcat(buf, "\0"); } int main(int argc, char *argv[]) { // 0: device // 1: group // 2: plug // 3: status char device[] = "\\\\.\\\\COM5"; if (serial_connect(device) == SERIAL_ERROR) { printf("Failed to connect to serial device \"%s\"\n", device); return 1; } struct Packet packet = { 1, 0, 3 }; if (serial_transmit(packet) == SERIAL_ERROR) { printf("Failed to send data to serial device \"%s\"\n", device); return 1; } serial_close(); return 0; } #ifndef PROFILEDIALOG_H #define PROFILEDIALOG_H #include "ui_profiledialog.h" #include namespace trace { class Profile; } class ProfileDialog : public QDialog, public Ui_ProfileDialog { Q_OBJECT public: ProfileDialog(QWidget *parent = 0); ~ProfileDialog(); void setProfile(trace::Profile* profile); public slots: void setVerticalScrollMax(int max); void setHorizontalScrollMax(int max); void tableDoubleClicked(const QModelIndex& index); void selectionChanged(int64_t start, int64_t end); signals: void jumpToCall(int call); private: trace::Profile *m_profile; }; #endif #ifndef PS2AUTOTESTS_COMMON_H #define PS2AUTOTESTS_COMMON_H #include #include // Defines for MSVC highlighting. Not intended to actually compile with msc. #ifdef _MSC_VER void printf(const char *s, ...); #define __attribute__(x) #endif #endif /* ============================================================================ Name : thsh.c Authors : Collin Kruger, Denton Underwood, John Christensen, Jon Stacey Version : Copyright : Copyright 2009 Jon Stacey. All rights reserved. Description : Hello World in C, Ansi-style ============================================================================ */ #include #include int main(void) { puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */ return EXIT_SUCCESS; } #ifndef PHP_PHPIREDIS_H #define PHP_PHPIREDIS_H 1 #define PHP_PHPIREDIS_VERSION "1.0" #define PHP_PHPIREDIS_EXTNAME "phpiredis" PHP_MINIT_FUNCTION(phpiredis); PHP_FUNCTION(phpiredis_connect); PHP_FUNCTION(phpiredis_pconnect); PHP_FUNCTION(phpiredis_disconnect); PHP_FUNCTION(phpiredis_command_bs); PHP_FUNCTION(phpiredis_command); PHP_FUNCTION(phpiredis_multi_command); PHP_FUNCTION(phpiredis_multi_command_bs); PHP_FUNCTION(phpiredis_format_command); PHP_FUNCTION(phpiredis_reader_create); PHP_FUNCTION(phpiredis_reader_reset); PHP_FUNCTION(phpiredis_reader_feed); PHP_FUNCTION(phpiredis_reader_get_state); PHP_FUNCTION(phpiredis_reader_get_error); PHP_FUNCTION(phpiredis_reader_get_reply); PHP_FUNCTION(phpiredis_reader_destroy); PHP_FUNCTION(phpiredis_reader_set_error_handler); PHP_FUNCTION(phpiredis_reader_set_status_handler); extern zend_module_entry phpiredis_module_entry; #define phpext_phpiredis_ptr &phpiredis_module_entry #endif #ifndef LCDManager_h #define LCDManager_h #include "Arduino.h" #include class LCDManager{ public : LCDManager(int line, int cols, int pin); LiquidCrystalSPI screen(); void clearLine(int line); void backlight(bool status); void setBacklightPin(int pin); void message(String message); void refreshDisplay(); private : void displayMessage(); String messageBuffer; LiquidCrystalSPI theScreen; int lines; int cols; int currentTextScrollPosition; int currentTextChar; bool hasDisplayFirstLoop; int pinBacklight; long lastTimer; int timeBetweenRefresh; }; #endif#pragma once #include "ofMain.h" #include "ofxDatGui.h" class ofApp : public ofBaseApp{ public: void setup(); void draw(); void update(); ofxDatGui* gui; bool mFullscreen; void refreshWindow(); void toggleFullscreen(); void keyPressed(int key); void onButtonEvent(ofxDatGuiButtonEvent e); void onSliderEvent(ofxDatGuiSliderEvent e); void onTextInputEvent(ofxDatGuiTextInputEvent e); void on2dPadEvent(ofxDatGui2dPadEvent e); void onDropdownEvent(ofxDatGuiDropdownEvent e); void onColorPickerEvent(ofxDatGuiColorPickerEvent e); void onMatrixEvent(ofxDatGuiMatrixEvent e); uint tIndex; vector themes; }; #pragma once #ifndef YOU_DATASTORE_INTERNAL_OPERATIONS_ERASE_OPERATION_H_ #define YOU_DATASTORE_INTERNAL_OPERATIONS_ERASE_OPERATION_H_ #include "../operation.h" namespace You { namespace DataStore { namespace Internal { class EraseOperation : public IOperation { public: EraseOperation(TaskId); bool run(); }; } // namespace Internal } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_INTERNAL_OPERATIONS_ERASE_OPERATION_H_ /* * Copyright (c) 2021 Morwenn * SPDX-License-Identifier: MIT */ #ifndef CPPSORT_DETAIL_FUNCTIONAL_H_ #define CPPSORT_DETAIL_FUNCTIONAL_H_ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #include #include #include namespace cppsort { namespace detail { //////////////////////////////////////////////////////////// // indirect template class indirect_t { private: Projection projection; public: indirect_t() = delete; explicit indirect_t(Projection projection): projection(std::move(projection)) {} template auto operator()(T&& indirect_value) -> decltype(utility::as_function(projection)(*indirect_value)) { auto&& proj = utility::as_function(projection); return proj(*indirect_value); } template auto operator()(T&& indirect_value) const -> decltype(utility::as_function(projection)(*indirect_value)) { auto&& proj = utility::as_function(projection); return proj(*indirect_value); } }; template auto indirect(Projection&& proj) -> indirect_t> { return indirect_t>(std::forward(proj)); } }} #endif // CPPSORT_DETAIL_FUNCTIONAL_H_ #include #define LIB_VERB (USR_DIR + "/Game/lib/verb") #define LIB_SIGHANDLER (USR_DIR + "/Game/lib/sighandler") #define GAME_LIB_OBJECT (USR_DIR + "/Game/lib/object") #define ALIASD (USR_DIR + "/Game/sys/aliasd") #define ACCOUNTD (USR_DIR + "/Game/sys/accountd") #define ROOT (USR_DIR + "/Game/sys/root") #define SNOOPD (USR_DIR + "/Game/sys/snoopd") #define GAME_HELPD (USR_DIR + "/Game/sys/helpd") #define GAME_DRIVER (USR_DIR + "/Game/sys/driver") #define GAME_USERD (USR_DIR + "/Game/sys/userd") #import "Expecta.h" EXPMatcherInterface(_beIdenticalTo, (void *expected)); #if __has_feature(objc_arc) #define beIdenticalTo(expected) _beIdenticalTo((__bridge void*)expected) #else #define beIdenticalTo _beIdenticalTo #endif /* Copyright (c) 2004 Timo Sirainen */ #include "lib.h" #include "str.h" #include "str-sanitize.h" void str_sanitize_append(string_t *dest, const char *src, size_t max_len) { const char *p; for (p = src; *p != '\0'; p++) { if ((unsigned char)*p < 32) break; } str_append_n(dest, src, (size_t)(p - src)); for (; *p != '\0' && max_len > 0; p++, max_len--) { if ((unsigned char)*p < 32) str_append_c(dest, '?'); else str_append_c(dest, *p); } if (*p != '\0') { str_truncate(dest, str_len(dest)-3); str_append(dest, "..."); } } const char *str_sanitize(const char *src, size_t max_len) { string_t *str; str = t_str_new(I_MIN(max_len, 256)); str_sanitize_append(str, src, max_len); return str_c(str); } /* * Copyright (c) 2018-2019 ARM Limited. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the License); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __TFM_CLIENT_H__ #define __TFM_CLIENT_H__ #include "psa_defs.h" #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif /* __TFM_CLIENT_H__ */ /* * This file is part of the OpenMV project. * Copyright (c) 2013/2014 Ibrahim Abdelkader * This work is licensed under the MIT license, see the file LICENSE for details. * * Memory allocation functions. * */ #include #include "mdefs.h" #include "xalloc.h" void *xalloc_fail() { nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, "Out of Memory!!")); return NULL; } void *xalloc(uint32_t size) { void *mem = gc_alloc(size, false); if (mem == NULL) { return xalloc_fail(); } return mem; } void *xalloc0(uint32_t size) { void *mem = gc_alloc(size, false); if (mem == NULL) { return xalloc_fail(); } memset(mem, 0, size); return mem; } void xfree(void *ptr) { gc_free(ptr); } void *xrealloc(void *ptr, uint32_t size) { ptr = gc_realloc(ptr, size); if (ptr == NULL) { return xalloc_fail(); } return ptr; } //===- lib/ReaderWriter/ELF/ARM/ARMDynamicLibraryWriter.h -----------------===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef LLD_READER_WRITER_ELF_ARM_ARM_DYNAMIC_LIBRARY_WRITER_H #define LLD_READER_WRITER_ELF_ARM_ARM_DYNAMIC_LIBRARY_WRITER_H #include "DynamicLibraryWriter.h" #include "ARMLinkingContext.h" #include "ARMTargetHandler.h" namespace lld { namespace elf { class ARMDynamicLibraryWriter : public DynamicLibraryWriter { public: ARMDynamicLibraryWriter(ARMLinkingContext &ctx, ARMTargetLayout &layout); protected: // Add any runtime files and their atoms to the output void createImplicitFiles(std::vector> &) override; private: ARMLinkingContext &_ctx; ARMTargetLayout &_armLayout; }; ARMDynamicLibraryWriter::ARMDynamicLibraryWriter(ARMLinkingContext &ctx, ARMTargetLayout &layout) : DynamicLibraryWriter(ctx, layout), _ctx(ctx), _armLayout(layout) {} void ARMDynamicLibraryWriter::createImplicitFiles( std::vector> &result) { DynamicLibraryWriter::createImplicitFiles(result); } } // namespace elf } // namespace lld #endif // LLD_READER_WRITER_ELF_ARM_ARM_DYNAMIC_LIBRARY_WRITER_H // // BRMenuPlusMinusButton.h // Menu // // Created by Matt on 4/17/13. // Copyright (c) 2013 Pervasent Consulting, Inc. All rights reserved. // #import @class BRMenuUIStyle; IB_DESIGNABLE @interface BRMenuPlusMinusButton : UIControl @property (nonatomic, strong) BRMenuUIStyle *uiStyle; @property (nonatomic, getter = isPlus) IBInspectable BOOL plus; @end // // APLifecycleHooks.h // LoyaltyRtr // // Created by David Benko on 7/22/14. // Copyright (c) 2014 David Benko. All rights reserved. // #import @interface APLifecycleHooks : NSObject +(void)setSDKLogging:(BOOL)shouldLog; +(void)synchronousConnectionFinished:(void (^)(NSData *downloadedData, NSError *error))hook; +(void)asyncConnectionStarted:(void (^)(NSURLRequest * req, NSURLConnection *conn))hook; +(void)asyncConnectionFinished:(BOOL (^)(NSMutableData *downloadedData, NSError *error))hook; @end #if defined(__linux__) #include #else #include "../tlibc/stdio/stdio.h" #endif void abort(void) { // TODO: Add proper kernel panic. printf("Kernel Panic! abort()\n"); while ( 1 ) { } } #ifndef HL7PARSER_CONFIG_H #define HL7PARSER_CONFIG_H /** * \file config.h * * Generic configuration directives and macros used by the HL7 parser. * * \internal * Copyright (c) 2003-2011 \b Erlar (http://erlar.com) */ /* ------------------------------------------------------------------------ Headers ------------------------------------------------------------------------ */ #include #include /* ------------------------------------------------------------------------ Macros ------------------------------------------------------------------------ */ /* Macros used when the library is included in a C++ project. */ #ifdef __cplusplus # define BEGIN_C_DECL() extern "C" { # define END_C_DECL() } #else # define BEGIN_C_DECL() # define END_C_DECL() #endif /* __cplusplus */ /** * \def HL7_ASSERT( p ) * Asserts that the predicate \a p is true; if not it aborts the program * showing the predicate, file and line number where the assertion failed. */ #define HL7_ASSERT( p ) assert( p ) #endif /* HL7PARSER_CONFIG_H */ /* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 103 #endif /** * @file tasks.h * @brief Macros for configuring the run time tasks * * DAPLink Interface Firmware * Copyright (c) 2009-2020, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef TASK_H #define TASK_H // trouble here is that reset for different targets is implemented differently so all targets // have to use the largest stack or these have to be defined in multiple places... Not ideal // may want to move away from threads for some of these behaviours to optimize mempory usage (RAM) #define MAIN_TASK_STACK (800) #define MAIN_TASK_PRIORITY (osPriorityNormal) #endif #ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H #define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H #include "GameState.h" #include "StartState.h" #include "LevelSelectState.h" #include #define START_WITHOUT_MENU class GameStateHandler { private: std::vector m_stateStack; std::vector m_statesToRemove; public: GameStateHandler(); ~GameStateHandler(); int ShutDown(); int Initialize(ComponentHandler* cHandler, Camera* cameraRef, std::string levelPath = NULL); int Update(float dt, InputHandler* inputHandler); //Push a state to the stack int PushStateToStack(GameState* state); private: }; #endif#include "Python.h" /* Return a Python long instance containing the value of the DJB hash function * for the given string or array. */ static PyObject * djb_hash(PyObject *self, PyObject *args) { const unsigned char *s; unsigned int h = 5381; Py_ssize_t len; if(! PyArg_ParseTuple(args, "t#", &s, &len)) return NULL; while(len--) h = ((h << 5) + h) ^ *s++; return PyLong_FromUnsignedLong((unsigned long) h); } static /*const*/ PyMethodDef methods[] = { {"djb_hash", djb_hash, METH_VARARGS, "Return the value of DJB's hash function for the given 8-bit string."}, {NULL, NULL, 0, NULL} }; PyMODINIT_FUNC init_cdblib(void) { Py_InitModule("_cdblib", methods); } #ifndef _GL_COMMON_H #define _GL_COMMON_H #if defined(USING_GLES2) #ifdef IOS // I guess we can soon add ES 3.0 here too #include #include #else #include #include #ifndef MAEMO #include #endif // !MAEMO #endif // IOS #if defined(ANDROID) || defined(BLACKBERRY) // Support OpenGL ES 3.0 // This uses the "DYNAMIC" approach from the gles3jni NDK sample. // Should work on non-Android mobile platforms too. #include "../gfx_es2/gl3stub.h" #define MAY_HAVE_GLES3 1 #endif #else // OpenGL // Now that glew is upgraded beyond 4.3, we can define MAY_HAVE_GLES3 on GL platforms #define MAY_HAVE_GLES3 1 #include #if defined(__APPLE__) #include #else #include #endif #endif #if !defined(GLchar) && !defined(__APPLE__) typedef char GLchar; #endif #endif //_GL_COMMON_H #include "sim-hab.h" // // display usage // void usage(void) { fprintf(stderr, "\nsim-hab must be ran with two options. -p and -a both followed\n" "by a file location. To determine the file locations run the\n" "findPort program.\n" "\n" "usage: sim-hab [OPTIONS]\n" " -?, --help Show this information.\n" " -v, --version Show the version number.\n" " -i, --id Use ID as the HAB-ID (defaults to\n" " hostname if omitted).\n" " -p --proxr Give the ProXR file location to open.\n" " -a --arduino Give the Arduino file location to open.\n" ); } // RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.memset | count 3 void *memset(void*, int, long); void bzero(void*, int); void test(int* X, char *Y) { memset(X, 4, 1000); bzero(Y, 100); } /* * arch/arm/mach-orion5x/include/mach/system.h * * Tzachi Perelstein * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ #ifndef __ASM_ARCH_SYSTEM_H #define __ASM_ARCH_SYSTEM_H #include static inline void arch_idle(void) { cpu_do_idle(); } static inline void arch_reset(char mode, const char *cmd) { /* * Enable and issue soft reset */ orion5x_setbits(RSTOUTn_MASK, (1 << 2)); orion5x_setbits(CPU_SOFT_RESET, 1); } #endif /* * Copyright 2019 Arnaud Gelas * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Use the unit test allocators */ #define UNIT_TESTING 1 #include #include #include #include /* A test case that does check if float is equal. */ static void float_test_success(void **state) { assert_float_equal(0.5f, 1.f / 2.f, 0.000001f); assert_float_not_equal(0.5, 0.499f, 0.000001f); } int main(void) { const struct CMUnitTest tests[] = { cmocka_unit_test(float_test_success), }; return cmocka_run_group_tests(tests, NULL, NULL); } //PARAM: --enable ana.int.interval --enable ana.int.enums --exp.privatization "write" -v #include // Test case that shows how avoiding reading integral globals can reduce the number of solver evaluations. // Avoiding to evaluate integral globals when setting them reduced the number of necessary evaluations from 62 to 21 in this test case. pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; int glob = 10; void* t_fun(void* ptr) { pthread_mutex_lock(&mutex); glob = 3; glob = 4; glob = 1; pthread_mutex_unlock(&mutex); return NULL; } void bar() { glob = 2; } int main() { pthread_t t; pthread_create(&t, NULL, t_fun, NULL); pthread_mutex_lock(&mutex); bar(); pthread_mutex_unlock(&mutex); pthread_join(t, NULL); assert(glob >= 1); assert(glob <= 2); //UNKNOWN assert(glob <= 10); return 0; } #ifndef TYPES_H #define TYPES_H struct elf_header { }; #endif #pragma once #include #include #include #include namespace age { namespace entity { /// /// \struct TransformComponent /// /// \brief This component is given to entities that hold a position within the scene. /// /// \date June 11, 2017 /// /// \author Aaron Shelley /// struct AGE_ENTITY_EXPORT TransformComponent : public Component { TransformComponent(); age::math::Vector Position{}; double Rotation{}; }; } } // // StarFlightPushClient.h // // Created by Starcut Software on 4/30/13. // Copyright (c) Starcut. All rights reserved. // #import NS_ASSUME_NONNULL_BEGIN extern NSString *const SCStarFlightClientUUIDNotification; @interface SCStarFlightPushClient : NSObject - (instancetype)initWithAppID:(NSString *)appID clientSecret:(NSString *)clientSecret; - (void)registerWithToken:(NSString *)token; - (void)registerWithToken:(NSString *)token clientUUID:(NSString *)clientUUID tags:(NSArray *)tags timePreferences:(NSDictionary *)timePreferencesDict; - (void)registerWithToken:(NSString *)token tags:(NSArray *)tags; - (void)unregisterWithToken:(NSString *)token tags:(nullable NSArray *)tags; - (void)openedMessageWithUUID:(NSString *)messageUUID deviceToken:(NSString *)deviceToken; NS_ASSUME_NONNULL_END @end #include "num2words.h" // Language strings for Dutch const Language LANG_DUTCH = { .hours = { "een", "twee", "drie", "vier", "vijf", "zes", "zeven", "acht", "negen", "tien", "elf", "twaalf" }, .phrases = { "*$1 uur ", "vijf over *$1 ", "tien over *$1 ", "kwart over *$1 ", "tien voor half *$2 ", "vijf voor half *$2 ", "half *$2 ", "vijf over half *$2 ", "tien over half *$2 ", "kwart voor *$2 ", "tien voor *$2 ", "vijf voor *$2 " }, .greetings = { "Goede- morgen ", "Goede- dag ", "Goede- avond ", "Goede- nacht " }, .connection_lost = "Waar is je telefoon" }; /* * PBKDF2 * (C) 1999-2007 Jack Lloyd * * Distributed under the terms of the Botan license */ #ifndef BOTAN_PBKDF2_H__ #define BOTAN_PBKDF2_H__ #include #include namespace Botan { /** * PKCS #5 PBKDF2 */ class BOTAN_DLL PKCS5_PBKDF2 : public PBKDF { public: std::string name() const { return "PBKDF2(" + mac->name() + ")"; } PBKDF* clone() const { return new PKCS5_PBKDF2(mac->clone()); } OctetString derive_key(u32bit output_len, const std::string& passphrase, const byte salt[], u32bit salt_len, u32bit iterations) const; /** * Create a PKCS #5 instance using the specified message auth code * @param mac the MAC to use */ PKCS5_PBKDF2(MessageAuthenticationCode* m) : mac(m) {} /** * Destructor */ ~PKCS5_PBKDF2() { delete mac; } private: MessageAuthenticationCode* mac; }; } #endif #pragma once #include #include #include class NotifierTest : public ::testing::Test { public: NotifierTest() { }; ~NotifierTest() { } protected: virtual void SetUp() { }; virtual void TearDown() { FileIO::RemoveFileAsRoot(notifierIPCPath); FileIO::RemoveFileAsRoot(handshakeIPCPath); zctx_interrupted = false; }; private: const std::string notifierIPCPath = "/tmp/RestartServicesQueue.ipc"; const std::string handshakeIPCPath = "/tmp/RestartServicesHandshakeQueue.ipc"; };#ifndef FLATCC_PORTABLE_H #define FLATCC_PORTABLE_H #include "flatcc/portable/portable.h" #endif /* FLATCC_PORTABLE_H */ #if defined (__GNUC__) || defined (__INTEL_COMPILER) || defined (__clang__) #ifdef INFINITY #undef INFINITY #endif #ifdef NAN #undef NAN #endif #define NAN __builtin_nan("") #define NANf __builtin_nanf("") #define INFINITY __builtin_inf() #define INFINITYf __builtin_inff() #else #include #include #endif // // BRMenuOrderingGroupViewController.h // MenuKit // // Created by Matt on 29/07/15. // Copyright (c) 2015 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0. // #import #import "BRMenuOrderingDelegate.h" #import @class BRMenuOrderingFlowController; extern NSString * const BRMenuOrderingItemCellIdentifier; extern NSString * const BRMenuOrderingItemWithoutComponentsCellIdentifier; extern NSString * const BRMenuOrderingItemGroupHeaderCellIdentifier; /** Present a list of menu item groups as sections of menu items. */ @interface BRMenuOrderingGroupViewController : UITableViewController @property (nonatomic, assign, getter=isUsePrototypeCells) IBInspectable BOOL usePrototypeCells; @property (nonatomic, strong) BRMenuOrderingFlowController *flowController; @property (nonatomic, weak) id orderingDelegate; @end // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include #include #include class FNET_Transport; namespace vespalib { class TimerTask; /** * ScheduledExecutor is a class capable of running Tasks at a regular * interval. The timer can be reset to clear all tasks currently being * scheduled. */ class ScheduledExecutor { private: using TaskList = std::vector>; FNET_Transport & _transport; std::mutex _lock; TaskList _taskList; public: /** * Create a new timer, capable of scheduling tasks at fixed intervals. */ ScheduledExecutor(FNET_Transport & transport); /** * Destroys this timer, finishing the current task executing and then * finishing. */ ~ScheduledExecutor(); /** * Schedule new task to be executed at specified intervals. * * @param task The task to schedule. * @param delay The delay to wait before first execution. * @param interval The interval in seconds. */ void scheduleAtFixedRate(std::unique_ptr task, duration delay, duration interval); /** * Reset timer, clearing the list of task to execute. */ void reset(); }; } #include "canard.h" #include "canard_internals.h" void canardInitPoolAllocator(CanardPoolAllocator* allocator, CanardPoolAllocatorBlock* buf, unsigned int buf_len) { unsigned int current_index = 0; CanardPoolAllocatorBlock** current_block = &(allocator->free_list); while (current_index < buf_len) { *current_block = &buf[current_index]; current_block = &((*current_block)->next); current_index++; } *current_block = NULL; } void* canardAllocateBlock(CanardPoolAllocator* allocator) { /* Check if there are any blocks available in the free list. */ if (allocator->free_list == NULL) { return NULL; } /* Take first available block and prepares next block for use. */ void* result = allocator->free_list; allocator->free_list = allocator->free_list->next; return result; } void canardFreeBlock(CanardPoolAllocator* allocator, void* p) { CanardPoolAllocatorBlock* block = (CanardPoolAllocatorBlock*)p; block->next = allocator->free_list; allocator->free_list = block; } /* * buffer.c * * Created on: 06.02.2015. * Author: ichiro */ /* Includes ------------------------------------------------------------------*/ #include "buffer.h" /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/ /* Private functions ---------------------------------------------------------*/ void buff_init(__IO fifo_t *buffer) { buffer->counter = 0; // 0 bytes in buffer buffer->head = 0; // Index points to start buffer->tail = 0; // Index points to start } void buff_put(__IO fifo_t *buffer, uint8_t ch) { buffer->buff[BUFF_MASK & (buffer->head++)] = ch; buffer->counter++; } uint8_t buff_get(__IO fifo_t *buffer) { uint8_t ch; ch = buffer->buff[BUFF_MASK & (buffer->tail++)]; buffer->counter--; return ch; } bool buff_empty(__IO fifo_t buffer) { return (buffer.counter == 0) ? true : false; } bool buff_full(__IO fifo_t buffer) { return (buffer.counter == BUFF_SIZE) ? true : false; } start Go to Layout [ “budget” (budget) ] Set Window Title [ Current Window; New Title: "Budget Research" ] Set Zoom Level [ 100% ] # #Report version number to Memory Switch Table. Set Field [ MemorySwitch::versionBudget; Reference::version ] # #Show regular menus if Admin logs in only. Show/Hide Text Ruler [ Hide ] If [ Get ( AccountName ) = "Admin" ] Show/Hide Status Area [ Hide ] Install Menu Set [ “[Standard FileMaker Menus]” ] Else Show/Hide Status Area [ Lock; Hide ] Install Menu Set [ “Custom Menu Set 1” ] End If January 8, 平成26 18:44:18 Budget Research.fp7 - start -1- #pragma once #include #include #include "noise/module/NoiseSources.h" namespace spotify { namespace json { template<> struct default_codec_t { typedef noise::module::NoiseSources NoiseSources; static codec::object_t codec() { auto codec = codec::object(); auto single_module_codec = codec::string(); auto module_list_codec = codec::array>(single_module_codec); auto optional_single_module_codec = codec::optional(single_module_codec); auto optional_module_list_codec = codec::optional(module_list_codec); codec.optional("SourceModule", &NoiseSources::sourceModules, optional_module_list_codec); codec.optional("ControlModule", &NoiseSources::controlModule, optional_single_module_codec); codec.optional("DisplaceModule", &NoiseSources::displaceModules, optional_module_list_codec); return codec; } }; } } #include #include #include void runStep(struct stack_node node, struct stack_node *top) { switch( node.data.type ) { case 0: struct stack_node push; push.cdr = top; push.data = node.data; *top = push; break; } } #ifndef FIX_TYPES_H #define FIX_TYPES_H #include /* The system include file defines this in terms of bzero(), but ANSI says we should use memset(). */ #if defined(OSF1) #undef FD_ZERO #define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p))) #endif /* Various non-POSIX conforming files which depend on sys/types.h will need these extra definitions... */ typedef unsigned int u_int; #if defined(ULTRIX42) || defined(ULTRIX43) typedef char * caddr_t; #endif #endif #include #include int main() { double r1, x1, y1, r2, x2, y2; double distance; while (scanf("%lf %lf %lf %lf %lf %lf", &r1, &x1, &y1, &r2, &x2, &y2) != EOF) { distance = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); if (r1 >= distance + r2) { puts("RICO"); } else { puts("MORTO"); } } return 0; } #ifndef LPSLCD_VALIDATOR_H #define LPSLCD_VALIDATOR_H #include "generator.h" class Validator { public: static bool Validate (const Code & code) { // | N - k | // | ____ | // | \ a + a | < L // | /___ i i + k | // | i = 1 | // // k - 0 < k < N; // N - length of sequence. // L - limit of sidelobe level. const ssize_t sideLobeLimit = code.size () < 14 ? 1 : floor (code.size () / 14.0f); for (size_t shift = 1; shift < code.size (); ++shift) { ssize_t sideLobe = 0; for (size_t i = 0; i < code.size () - shift; ++i) { sideLobe += (code [i + shift] == '+' ? 1 : -1) * (code [i ] == '+' ? 1 : -1); } if (std::abs (sideLobe) > sideLobeLimit) { return false; } } return true; }; }; #endif//LPSLCD_VALIDATOR_H /* $Id$ $Revision$ */ /* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (c) 1994-2004 AT&T Corp. * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Corp. * * * * Information and Software Systems Research * * AT&T Research, Florham Park NJ * **********************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #define EXTERN #include "types.h" #include "globals.h" // RUN: %layout_check %s // RUN: %check %s struct A { }; // CHEKC: /warning: empty struct/ struct Containter { struct A a; }; struct Pre { int i; struct A a; int j; }; struct Pre p = { 1, /* warn */ 2 }; // CHECK: /warning: missing {} initialiser for empty struct/ struct Pre q = { 1, {}, 2 }; main() { struct A a = { 5 }; // CHECK: /warning: missing {} initialiser for empty struct/ struct A b = {}; struct Containter c = {{}}; c.a = (struct A){}; } #pragma once #include #include #include #include #include #include #include "../../src/base/pal_base_private.h" #include /* Max allowed diff against expected value */ #define EPSILON_MAX 0.001f #define EPSILON_RELMAX 0.00001f struct gold { float ai; float bi; float res; float gold; }; extern float *ai, *bi, *res, *ref; /* Functions that can be overridden by individual tests */ /* Compare two values */ bool compare(float x, float y); /* Allow individual tests to add more test cases, e.g. against a reference * function */ void add_more_tests(TCase *tcase); /* Needs to be implemented by tests that define REF_FUNCTION */ void generate_ref(float *out, size_t n); #include #include #include "error.h" #include "memory.h" #define READ_SIZE 0x4000 static void usage(void) { fprintf(stderr, "usage: tmpgb "); exit(EXIT_FAILURE); } static void load_rom(const char *rom) { FILE *fp; unsigned char *buffer[READ_SIZE]; size_t nread; int i = -1; fp = fopen(rom, "rb"); if (fp == NULL) { fprintf(stderr, "Could not open %s", rom); exit(EXIT_FAILURE); } while (!feof(fp)) { nread = fread(buffer, READ_SIZE, 1, fp); if (nread == 0) { if (ferror(fp)) { fprintf(stderr, "Error reading %s", rom); exit(EXIT_FAILURE); } } read_rom(buffer, i); } fclose(fp); } static void run(void) { int ret; if ((ret = init_memory()) != 0) { errnr = ret; exit_error(); } } int main(int argc, char **argv) { char *rom; if (argc != 2) usage(); rom = argv[1]; load_rom(rom); run(); return 0; } // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "compact/compact_tensor.h" #include "compact/compact_tensor_builder.h" namespace vespalib { namespace tensor { struct DefaultTensor { using type = CompactTensor; using builder = CompactTensorBuilder; }; } // namespace vespalib::tensor } // namespace vespalib #pragma once class IElfRelocator; enum class Endianness { Big, Little }; class CArchitecture { public: virtual void AssembleOpcode(const std::wstring& name, const std::wstring& args) = 0; virtual bool AssembleDirective(const std::wstring& name, const std::wstring& args) = 0; virtual void NextSection() = 0; virtual void Pass2() = 0; virtual void Revalidate() = 0; virtual int GetWordSize() = 0; virtual IElfRelocator* getElfRelocator() = 0; virtual Endianness getEndianness() = 0; }; class CInvalidArchitecture: public CArchitecture { public: virtual void AssembleOpcode(const std::wstring& name, const std::wstring& args); virtual bool AssembleDirective(const std::wstring& name, const std::wstring& args); virtual void NextSection(); virtual void Pass2(); virtual void Revalidate(); virtual int GetWordSize(); virtual IElfRelocator* getElfRelocator(); virtual Endianness getEndianness() { return Endianness::Little; }; }; extern CInvalidArchitecture InvalidArchitecture; // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_ #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_ #pragma once namespace gfx { class Point; } namespace views { class View; //////////////////////////////////////////////////////////////////////////////// // // MenuButtonDelegate // // An interface that allows a component to tell a View about a menu that it // has constructed that the view can show (e.g. for MenuButton views, or as a // context menu.) // //////////////////////////////////////////////////////////////////////////////// class MenuButtonDelegate { public: // Creates and shows a menu at the specified position. |source| is the view // the MenuButtonDelegate was set on. virtual void RunMenu(View* source, const gfx::Point& point) = 0; protected: virtual ~MenuButtonDelegate() {} }; } // namespace views #endif // UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_ // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s // XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64 // REQUIRES: linux typedef int a; // // OMValidation.h // OMValidation // // Copyright (C) 2015 Oliver Mader // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // #import "OMValidationFailure.h" #import "NSObject+OMValidation.h" #import "NSString+OMValidation.h" #import "NSNumber+OMValidation.h" #import "OMValidate.h" #ifdef OMVALIDATION_PROMISES_AVAILABLE #import "OMValidationTask.h" #endif//PARAM: --disable ana.int.def_exc --enable ana.int.interval int main() { int x; if(!x) { assert(x==0); } else { assert(x==1); //UNKNOWN! } } #include "gtk2hs_macros.h" #include #if GTK_MAJOR_VERSION < 3 #include #endif #include #include #include #include #include #include #include #include #include // // NSDate+RFC1123.h // MKNetworkKit // // Created by Marcus Rohrmoser // http://blog.mro.name/2009/08/nsdateformatter-http-header/ // http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 // No obvious license attached /** Convert RFC1123 format dates */ @interface NSDate (RFC1123) /** * @name Convert a string to NSDate */ /** * Convert a RFC1123 'Full-Date' string * (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1) * into NSDate. * * @param value_ NSString* the string to convert * @return NSDate* */ +(NSDate*)dateFromRFC1123:(NSString*)value_; /** * @name Retrieve NSString value of the current date */ /** * Convert NSDate into a RFC1123 'Full-Date' string * (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1). * * @return NSString* */ @property (nonatomic, readonly, copy) NSString *rfc1123String; @end /* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef INCLUDE_DATA_SOURCE_H_ #define INCLUDE_DATA_SOURCE_H_ #include #include class DataSource { public: // Returns the number of bytes read, or -1 on failure. It's not an error if // this returns zero; it just means the given offset is equal to, or // beyond, the end of the source. virtual ssize_t readAt(off64_t offset, void* const data, size_t size) = 0; }; #endif // INCLUDE_DATA_SOURCE_H_ #ifndef UTIL_H #define UTIL_H #include "fibrile.h" /** Atomics. */ #define fence() fibrile_fence() #define fadd(ptr, n) __sync_fetch_and_add(ptr, n) #define cas(...) __sync_val_compare_and_swap(__VA_ARGS__) /** Lock. */ #define lock(ptr) fibrile_lock(ptr) #define unlock(ptr) fibrile_unlock(ptr) #define trylock(ptr) (!__sync_lock_test_and_set(ptr, 1)) /** Barrier. */ static inline void barrier(int n) { static volatile int count = 0; static volatile int sense = 0; int local_sense = !fibrile_deq.sense; if (fadd(&count, 1) == n - 1) { count = 0; sense = local_sense; } while (sense != local_sense); } /** Others. */ typedef struct _frame_t { void * rsp; void * rip; } frame_t; #define this_frame() ((frame_t *) __builtin_frame_address(0)) #define unreachable() __builtin_unreachable() #define adjust(addr, offset) ((void *) addr - offset) #endif /* end of include guard: UTIL_H */ /* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" /* C version of WebRtcSpl_CrossCorrelation() for generic platforms. */ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation, const int16_t* seq1, const int16_t* seq2, int16_t dim_seq, int16_t dim_cross_correlation, int right_shifts, int step_seq2) { int i = 0, j = 0; for (i = 0; i < dim_cross_correlation; i++) { int32_t corr = 0; // Linux 64-bit performance is improved by the int16_t cast below. // Presumably this is some sort of compiler bug, as there's no obvious // reason why that should result in better code. for (j = 0; j < dim_seq; j++) corr += (seq1[j] * seq2[j]) >> (int16_t)right_shifts; seq2 += step_seq2; *cross_correlation++ = corr; } } // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_UI_H_ #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_UI_H_ class Browser; class ExtensionService; // Only enable the external install UI on Windows and Mac, because those // are the platforms where external installs are the biggest issue. #if defined(OS_WINDOWS) || defined(OS_MACOSX) #define ENABLE_EXTERNAL_INSTALL_UI 1 #else #define ENABLE_EXTERNAL_INSTALL_UI 0 #endif namespace extensions { class Extension; // Adds/Removes a global error informing the user that an external extension // was installed. bool AddExternalInstallError(ExtensionService* service, const Extension* extension); void RemoveExternalInstallError(ExtensionService* service); // Used for testing. bool HasExternalInstallError(ExtensionService* service); } // namespace extensions #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_UI_H_ // // ObjectiveRocks.h // ObjectiveRocks // // Created by Iska on 20/11/14. // Copyright (c) 2014 BrainCookie. All rights reserved. // #import "RocksDB.h" #import "RocksDBOptions.h" #import "RocksDBReadOptions.h" #import "RocksDBWriteOptions.h" #import "RocksDBWriteBatch.h" #import "RocksDBIterator.h" #import "RocksDBSnapshot.h" #import "RocksDBComparator.h" /* * Copyright 2011-2014 Blender Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ CCL_NAMESPACE_BEGIN ccl_device_inline void debug_data_init(DebugData *debug_data) { debug_data->num_bvh_traversal_steps = 0; } ccl_device_inline void kernel_write_debug_passes(KernelGlobals *kg, ccl_global float *buffer, PathState *state, DebugData *debug_data, int sample) { kernel_write_pass_float(buffer + kernel_data.film.pass_bvh_traversal_steps, sample, debug_data->num_bvh_traversal_steps); } CCL_NAMESPACE_END /* * CAST-128 in C * Written by Steve Reid * 100% Public Domain - no warranty * Released 1997.10.11 */ #ifndef _CAST_H_ #define _CAST_H_ typedef unsigned char u8; /* 8-bit unsigned */ typedef unsigned long u32; /* 32-bit unsigned */ typedef struct { u32 xkey[32]; /* Key, after expansion */ int rounds; /* Number of rounds to use, 12 or 16 */ } cast_key; void cast_setkey(cast_key* key, u8* rawkey, int keybytes); void cast_encrypt(cast_key* key, u8* inblock, u8* outblock); void cast_decrypt(cast_key* key, u8* inblock, u8* outblock); #endif /* ifndef _CAST_H_ */ // // main.c // d16-asm // // Created by Michael Nolan on 6/17/16. // Copyright © 2016 Michael Nolan. All rights reserved. // #include #include #include "parser.h" #include "assembler.h" #include #include "instruction.h" #include extern int yyparse (FILE* output_file); extern FILE* yyin; extern int yydebug; int main(int argc, char * const argv[]) { FILE *f,*o; opterr = 0; int c; while ((c=getopt(argc,argv,"o:")) != -1){ switch(c){ case 'o': o = fopen(optarg,"wb"); } } if(optindstatus to find out what happened when calling these. extern void lock_get_quick(struct lock *lock); extern void lock_get(struct lock *lock); extern int lock_test(const char *path); extern int lock_release(struct lock *lock); extern void lock_add_to_list(struct lock **locklist, struct lock *lock); extern void locks_release_and_free(struct lock **locklist); #endif #include #include #include #include int main (int argc, char **argv) { GMainLoop *main_loop; MissionControl *mc; McAccount *account; AnerleyTpFeed *feed; DBusGConnection *conn; if (argc < 2) { g_print ("Usage: ./test-tp-feed "); return 1; } g_type_init (); main_loop = g_main_loop_new (NULL, FALSE); conn = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); mc = mission_control_new (conn); account = mc_account_lookup (argv[1]); feed = anerley_tp_feed_new (mc, account); g_main_loop_run (main_loop); return 0; } #pragma once #include "rapidcheck/seq/Operations.h" namespace rc { namespace test { //! Forwards Seq a random amount and copies it to see if it is equal to the //! original. template void assertEqualCopies(Seq seq) { std::size_t len = seq::length(seq); std::size_t n = *gen::ranged(0, len * 2); while (n--) seq.next(); const auto copy = seq; RC_ASSERT(copy == seq); } } // namespace test } // namespace rc /******************************************************************************/ /** @file @author AUTHOR NAME HERE. @brief BRIEF HERE. @copyright Copyright 2016 The University of British Columbia, IonDB Project Contributors (see @ref AUTHORS.md) @par Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @par Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /******************************************************************************/ #if !defined(CHANGE_ME_H) #define CHANGE_ME_H #if defined(__cplusplus) extern “ C ” { #endif /* Actual header file contents go in here. */ #if defined(__cplusplus) } #endif #endif #pragma once #ifndef YOU_DATASTORE_DATASTORE_H_ #define YOU_DATASTORE_DATASTORE_H_ #include #include "task_typedefs.h" #include "transaction.h" namespace You { namespace DataStore { namespace UnitTests {} class DataStore { public: Transaction && begin(); static DataStore& get(); // Modifying methods void post(TaskId, SerializedTask&); void put(TaskId, SerializedTask&); void erase(TaskId); std::vector getAllTask(); private: bool isServing = false; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_DATASTORE_H_ /* Copyright 2020 The Matrix.org Foundation C.I.C Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #import "MXSecretStorage.h" @class MXSession; NS_ASSUME_NONNULL_BEGIN @interface MXSecretStorage () /** Constructor. @param mxSession the related 'MXSession' instance. */ - (instancetype)initWithMatrixSession:(MXSession *)mxSession processingQueue:(dispatch_queue_t)processingQueue; @end NS_ASSUME_NONNULL_END // This uses a headermap with this entry: // someheader.h -> Product/someheader.h // RUN: %clang_cc1 -v -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H // RUN: %clang_cc1 -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H 2> %t.out // RUN: FileCheck %s -input-file %t.out // CHECK: Product/someheader.h // CHECK: system/usr/include/someheader.h // CHECK: system/usr/include/someheader.h #include "someheader.h" #include #include /** * @file target.c * @brief Target information for the kl46z * * DAPLink Interface Firmware * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "target_config.h" // The file flash_blob.c must only be included in target.c #include "flash_blob.c" // target information target_cfg_t target_device = { .sector_size = 1024, .sector_cnt = (KB(96) / 1024), .flash_start = 0, .flash_end = KB(128), .ram_start = 0x1FFFA000, .ram_end = 0x2002000, .flash_algo = (program_target_t *) &flash, }; /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ #ifndef EXAMPLE_PROTOCOL_H #define EXAMPLE_PROTOCOL_H #include #include #ifdef __cplusplus extern "C" { #endif MEMCACHED_PUBLIC_API EXTENSION_ERROR_CODE memcached_extensions_initialize(const char *config, GET_SERVER_API get_server_api); #ifdef __cplusplus } MEMCACHED_PUBLIC_API EXTENSION_ERROR_CODE file_logger_initialize(const LoggerConfig& config, GET_SERVER_API get_server_api); #endif #endif #include #include #include #include #include #include #include #include int us_syslog_redirect( struct us_unitscript* unit, int priority ){ int fds[2]; if( pipe(fds) ){ perror("pipe failed"); return -1; } int ret = fork(); if( ret == -1 ){ perror("fork failed\n"); close(fds[0]); close(fds[1]); return -1; } if( ret ){ close(fds[0]); return fds[1]; } close(fds[1]); const char* file = strrchr(unit->file,'/'); if(!file){ file = unit->file; }else{ file++; } openlog(file,0,LOG_DAEMON); do { char msg[1024*4]; size_t i = 0; while( i /** @brief Polling interval in ms */ #define SERIAL_POLL_INTERVAL 4 /** @brief Heartbeat emission rate, in Hertz (times per second) */ #define MAVLINK_HEARTBEAT_DEFAULT_RATE 1 #define WITH_TEXT_TO_SPEECH 1 // If you need to make an incompatible changes to stored settings, bump this version number // up by 1. This will caused store settings to be cleared on next boot. #define QGC_SETTINGS_VERSION 4 #define QGC_APPLICATION_NAME "QGroundControl" #define QGC_ORG_NAME "QGroundControl.org" #define QGC_ORG_DOMAIN "org.qgroundcontrol" #define QGC_APPLICATION_VERSION_MAJOR 2 #define QGC_APPLICATION_VERSION_MINOR 3 // The following #definess can be overriden from the command line so that automated build systems can // add additional build identification. // Only comes from command line //#define QGC_APPLICATION_VERSION_COMMIT "..." #ifndef QGC_APPLICATION_VERSION_BUILDNUMBER #define QGC_APPLICATION_VERSION_BUILDNUMBER 0 #endif #ifndef QGC_APPLICATION_VERSION_BUILDTYPE #define QGC_APPLICATION_VERSION_BUILDTYPE "(Developer Build)" #endif #endif // QGC_CONFIGURATION_H #pragma once class UnicodeUtf16StringSearcher { private: const wchar_t* m_Pattern; uint32_t m_PatternLength; public: UnicodeUtf16StringSearcher() : m_Pattern(nullptr) { } void Initialize(const wchar_t* pattern, size_t patternLength) { if (patternLength > std::numeric_limits::max() / 2) __fastfail(1); m_Pattern = pattern; m_PatternLength = static_cast(patternLength); } template bool HasSubstring(TextIterator textBegin, TextIterator textEnd) { while (textEnd - textBegin >= m_PatternLength) { auto comparisonResult = CompareStringEx(LOCALE_NAME_SYSTEM_DEFAULT, NORM_IGNORECASE, textBegin, static_cast(textEnd - textBegin), m_Pattern, static_cast(m_PatternLength), nullptr, nullptr, 0); if (comparisonResult == CSTR_EQUAL) return true; textBegin++; } return false; } };// RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s // Avoid the crash when finding the expression for tracking the origins // of the null pointer for path notes. Apparently, not much actual tracking // needs to be done in this example. void pr34373() { int *a = 0; // expected-note{{'a' initialized to a null pointer value}} (a + 0)[0]; // expected-warning{{Array access results in a null pointer dereference}} // expected-note@-1{{Array access results in a null pointer dereference}} } #ifndef _LOG_SINGLETON_H_ #define _LOG_SINGLETON_H_ #include "log.h" #include "basedefs.h" namespace anp { class LogSingleton: public anp::Log { public: static LogSingleton &getInstance(); static void releaseInstance(); private: LogSingleton() { } ~LogSingleton() { } static uint32 m_refCount; static LogSingleton *m_instance; }; /** Makes sure that LogSingleton::releaseInstance() gets called. */ class LogSingletonHelper { public: LogSingletonHelper(): m_log(LogSingleton::getInstance()) { } ~LogSingletonHelper() { LogSingleton::releaseInstance(); } void addMessage(const anp::dstring &message) { m_log.addMessage(message); } private: LogSingleton &m_log; }; } #endif // _LOG_SINGLETON_H_ // Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #pragma once #include // for size_t namespace paddle { namespace framework { namespace details { struct ExecutionStrategy { enum ExecutorType { kDefault = 0, kExperimental = 1 }; size_t num_threads_{0}; bool use_cuda_{true}; bool allow_op_delay_{false}; size_t num_iteration_per_drop_scope_{100}; ExecutorType type_{kDefault}; bool dry_run_{false}; }; } // namespace details } // namespace framework } // namespace paddle #include #include "src/sea.h" int main(int argc, char* argv[]) { // parse arguments while((opt = getopt(argc, argv, "d:")) != -1) { switch(opt) { case 'd': { extern int yydebug; yydebug = 1; } default: { fprintf(stderr, "Usage: %s [-d] input_filename\n", argv[0]); exit(EXIT_FAILURE); } } } if (optind >= argc) { fprintf(stderr, "Expected argument after options\n"); exit(EXIT_FAILURE); } // use arguments char* filename = argv[optind]; FILE* input_file; int is_stdin = strcmp(filename, "-") == 0; input_file = is_stdin ? stdin : fopen(filename, "rb"); if (!input_file) { perror("An error occured whilst reading from the input file"); return -1; } // main part of program sea* s = create_sea(); int stat = execute_file(s, input_file); free_sea(s); // cleanup if (!is_stdin) { if (ferror(input_file)) { fprintf(stderr, "An error occured during reading from the file\n"); } fclose(input_file); } if (stat != 0) { fprintf(stderr, "An occured during parsing\n"); return stat; } else { return 0; } } #include "common.h" int main(int argc, char **argv) { return 0; } /** * This is used to setup the UART device on an AVR unit. */ #pragma once #include #ifndef BAUD # define BAUD 9600 # warning BAUD rate not set. Setting BAUD rate to 9600. #endif // BAUD #define BAUDRATE ((F_CPU)/(BAUD*16UL)-1) static inline void uart_enable(void) { UBRR0H = BAUDRATE >> 8; UBRR0L = BAUDRATE; UCSR0B |= _BV(TXEN0) | _BV(RXEN0); UCSR0C |= _BV(UMSEL00) | _BV(UCSZ01) | _BV(UCSZ00); } static inline void uart_transmit(unsigned char data) { while (!(UCSR0A & _BV(UDRE0))); UDR0 = data; } static inline unsigned char uart_receive(void) { while (!(UCSR0A & _BV(RXC0))); return UDR0; } #ifndef _PKG_ERROR_H #define _PKG_ERROR_H #ifdef DEBUG # define pkg_error_set(code, fmt, ...) \ _pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__) #else # define pkg_error_set _pkg_error_set #endif #define ERROR_BAD_ARG(name) \ pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FUNCTION__) #define ERROR_SQLITE(db) \ pkg_error_set(EPKG_FATAL, "%s (sqlite at %s:%d)", sqlite3_errmsg(db), __FILE__, __LINE__) pkg_error_t _pkg_error_set(pkg_error_t, const char *, ...); #endif #pragma once #include "ThreadState.h" #include #include #include // Lightweight wrapper for std::thread to provide extensibility namespace AscEmu { namespace Threading { class AEThread { typedef std::function ThreadFunc; static std::atomic ThreadIdCounter; const long long m_longSleepDelay = 64; // Meta std::string m_name; unsigned int m_id; ThreadFunc m_func; std::chrono::milliseconds m_interval; // State std::mutex m_mtx; std::thread m_thread; bool m_killed; bool m_done; bool m_longSleep; void threadRunner(); void killThread(); public: AEThread(std::string name, ThreadFunc func, std::chrono::milliseconds intervalMs, bool autostart = false); ~AEThread(); std::chrono::milliseconds getInterval() const; std::chrono::milliseconds setInterval(std::chrono::milliseconds val); std::chrono::milliseconds unsafeSetInterval(std::chrono::milliseconds val); std::string getName() const; unsigned int getId() const; bool isKilled() const; void requestKill(); void join(); void reboot(); void lock(); void unlock(); }; }} /* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h" /* C version of WebRtcSpl_CrossCorrelation() for generic platforms. */ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation, const int16_t* seq1, const int16_t* seq2, int16_t dim_seq, int16_t dim_cross_correlation, int right_shifts, int step_seq2) { int i = 0, j = 0; for (i = 0; i < dim_cross_correlation; i++) { int32_t corr = 0; /* Unrolling doesn't seem to improve performance. */ for (j = 0; j < dim_seq; j++) { // It's not clear why casting |right_shifts| here helps performance. corr += (seq1[j] * seq2[j]) >> (int16_t)right_shifts; } seq2 += step_seq2; *cross_correlation++ = corr; } } /* * File: rbffi.h * Author: wayne * * Created on August 27, 2008, 5:40 PM */ #ifndef _RBFFI_H #define _RBFFI_H #include #ifdef __cplusplus extern "C" { #endif #define MAX_PARAMETERS (32) extern void rb_FFI_AbstractMemory_Init(); extern void rb_FFI_MemoryPointer_Init(); extern void rb_FFI_Buffer_Init(); extern void rb_FFI_Callback_Init(); extern void rb_FFI_Invoker_Init(); extern VALUE rb_FFI_AbstractMemory_class; #ifdef __cplusplus } #endif #endif /* _RBFFI_H */ #include void term_update(term_t_i *term) { if( term->dirty.exists && term->update != NULL ) { term->update(TO_H(term), term->dirty.x, term->dirty.y, term->dirty.width, term->dirty.height); term->dirty.exists = false; } } void term_cursor_update(term_t_i *term) { if( term->dirty_cursor.exists && term->cursor_update != NULL ) { term->cursor_update(TO_H(term), term->dirty_cursor.old_ccol, term->dirty_cursor.old_crow - (term->grid.history - term->grid.height), term->ccol, term->crow - (term->grid.history - term->grid.height)); term->dirty_cursor.exists = false; term->dirty_cursor.old_ccol = term->ccol; term->dirty_cursor.old_crow = term->crow; } } #import "ARArtworkMasonryModule.h" #import "ARArtworkViewController.h" typedef NS_ENUM(NSInteger, ARRelatedArtworksSubviewOrder) { ARRelatedArtworksSameShow = 1, ARRelatedArtworksSameFair, ARRelatedArtworksSameAuction, ARRelatedArtworksArtistArtworks, ARRelatedArtworks, }; @class ARArtworkRelatedArtworksView; @protocol ARArtworkRelatedArtworksViewParentViewController @required - (void)relatedArtworksView:(ARArtworkRelatedArtworksView *)view shouldShowViewController:(UIViewController *)viewController; - (void)relatedArtworksView:(ARArtworkRelatedArtworksView *)view didAddSection:(UIView *)section; @optional - (Fair *)fair; @end @interface ARArtworkRelatedArtworksView : ORTagBasedAutoStackView @property (nonatomic, weak) ARArtworkViewController *parentViewController; - (void)cancelRequests; - (void)updateWithArtwork:(Artwork *)artwork; - (void)updateWithArtwork:(Artwork *)artwork withCompletion:(void(^)())completion; // TODO make all these private // Use this when showing an artwork in the context of a fair. - (void)addSectionsForFair:(Fair *)fair; // Use this when showing an artwork in the context of a show. - (void)addSectionsForShow:(PartnerShow *)show; // Use this when showing an artwork in the context of an auction. - (void)addSectionsForAuction:(Sale *)auction; // In all other cases, this should be used to simply show related artworks. - (void)addSectionWithRelatedArtworks; @end #ifndef HELLOW_IOCTL_H #define HELLOW_IOCTL_H #define HWM_LOG_OFF 0xff00 #define HWM_LOG_ON 0xff01 #endif // Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #import #import @interface VungleAdNetworkExtras : NSObject /*! * @brief NSString with user identifier that will be passed if the ad is incentivized. * @discussion Optional. The value passed as 'user' in the an incentivized server-to-server call. */ @property(nonatomic, copy) NSString *_Nullable userId; /*! * @brief Controls whether presented ads will start in a muted state or not. */ @property(nonatomic, assign) BOOL muted; @property(nonatomic, assign) NSUInteger ordinal; @property(nonatomic, assign) NSTimeInterval flexViewAutoDismissSeconds; @property(nonatomic, copy) NSArray *_Nullable allPlacements; @property(nonatomic, copy) NSString *_Nullable playingPlacement; @end #ifndef OS_COMMON_H_ #define OS_COMMON_H_ #include #include #include #include /* * MinGW lfind() and friends use `unsigned int *` where they should use a * `size_t *` according to the man page. */ typedef unsigned int lfind_size_t; // timeradd doesn't exist on MinGW #ifndef timeradd #define timeradd(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ (result)->tv_sec += (result)->tv_usec / 1000000; \ (result)->tv_usec %= 1000000; \ } while (0) \ // #endif struct param_state; char *os_find_self(const char *); FILE *os_fopen(const char *, const char *); int os_get_tsimrc_path(char buf[], size_t sz); long os_getpagesize(void); int os_preamble(void); int os_set_buffering(FILE *stream, int mode); #endif /* vi: set ts=4 sw=4 et: */ #ifndef _TSLIB_PRIVATE_H_ #define _TSLIB_PRIVATE_H_ /* * tslib/src/tslib-private.h * * Copyright (C) 2001 Russell King. * * This file is placed under the LGPL. * * * Internal touch screen library definitions. */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "tslib.h" #include "tslib-filter.h" struct tsdev { int fd; struct tslib_module_info *list; struct tslib_module_info *list_raw; /* points to position in 'list' where raw reads come from. default is the position of the ts_read_raw module. */ unsigned int res_x; unsigned int res_y; int rotation; }; int __ts_attach(struct tsdev *ts, struct tslib_module_info *info); int __ts_attach_raw(struct tsdev *ts, struct tslib_module_info *info); int ts_load_module(struct tsdev *dev, const char *module, const char *params); int ts_load_module_raw(struct tsdev *dev, const char *module, const char *params); int ts_error(const char *fmt, ...); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _TSLIB_PRIVATE_H_ */ #ifndef HALIDE__build___wrapper_fusion_o_h #define HALIDE__build___wrapper_fusion_o_h #include #ifdef __cplusplus extern "C" { #endif int fusion_coli(buffer_t *_b_input_buffer, buffer_t *_b_output_f_buffer, buffer_t *_b_output_g_buffer) HALIDE_FUNCTION_ATTRS; int fusion_coli_argv(void **args) HALIDE_FUNCTION_ATTRS; int fusion_ref(buffer_t *_b_input_buffer, buffer_t *_b_output_f_buffer, buffer_t *_b_output_g_buffer) HALIDE_FUNCTION_ATTRS; int fusion_ref_argv(void **args) HALIDE_FUNCTION_ATTRS; // Result is never null and points to constant static data const struct halide_filter_metadata_t *fusion_coli_metadata() HALIDE_FUNCTION_ATTRS; const struct halide_filter_metadata_t *fusion_ref_metadata() HALIDE_FUNCTION_ATTRS; #ifdef __cplusplus } // extern "C" #endif #endif #ifndef MALLOCCACHE_H #define MALLOCCACHE_H template class MallocCache { public: MallocCache() : m_blocksCached(0) { } ~MallocCache() { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); for (size_t i = 0; i < m_blocksCached; i++) { ::free(m_blocks[i]); } } void *allocate() { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); if (m_blocksCached) { return m_blocks[--m_blocksCached]; } else { return ::malloc(blockSize); } } void free(void *allocation) { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); if (m_blocksCached < blockCount) { m_blocks[m_blocksCached++] = allocation; } else { ::free(allocation); } } private: void *m_blocks[blockCount]; size_t m_blocksCached; }; #endif MALLOCCACHE_H // rdar://6533411 // RUN: %clang -MD -MF %t.d -S -x c -o %t.o %s // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d // RUN: %clang -S -M -x c %s -o %t.d // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d // PR8974 // XFAIL: win32 // RUN: rm -rf %t.dir // RUN: mkdir %t.dir // RUN: echo > %t.dir/x.h // RUN: %clang -include %t.dir/x.h -MD -MF %t.d -S -x c -o %t.o %s // RUN: grep ' %t.dir/x.h' %t.d /* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 97 #endif #include "bayesian.h" namespace baysian { class bayesianNetwork : public bayesian { private: long double ***cpt; double *classCount; // this array store the total number of each // decision's class in training data int *discrete; int *classNum; // this array store the number of classes of each attribute int **parent; public: bayesianNetwork(char *); ~bayesianNetwork(); // initialize all the information we need from training data void predict(char *); // calculate the probability of each choice and choose the greatest one as our // prediction void train(char *); }; template struct data { double key; Type value1; Type value2; }; } // namespace baysian #ifndef DICT_H_ #define DICT_H_ #include #include #include #include #include #include #include "wordid.h" class Dict { typedef std::tr1::unordered_map > Map; public: Dict() : b0_("") { words_.reserve(1000); } inline int max() const { return words_.size(); } inline WordID Convert(const std::string& word, bool frozen = false) { Map::iterator i = d_.find(word); if (i == d_.end()) { if (frozen) return 0; words_.push_back(word); d_[word] = words_.size(); return words_.size(); } else { return i->second; } } inline const std::string& Convert(const WordID& id) const { if (id == 0) return b0_; assert(id <= words_.size()); return words_[id-1]; } void clear() { words_.clear(); d_.clear(); } private: const std::string b0_; std::vector words_; Map d_; }; #endif //Declarations for master types typedef enum { Register = 0 } MODBUSDataType; //MODBUS data types enum (coil, register, input, etc.) typedef struct { uint8_t Address; //Device address uint8_t Code; //Exception code } MODBUSExceptionLog; //Parsed exception data typedef struct { uint8_t Address; //Device address MODBUSDataType DataType; //Data type uint16_t Register; //Register, coil, input ID uint16_t Value; //Value of data } MODBUSData; typedef struct { uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready uint8_t *Frame; //Request frame content } MODBUSRequestStatus; //Type containing information about frame that is set up at master side typedef struct { MODBUSData *Data; //Data read from slave MODBUSExceptionLog Exception; //Optional exception read MODBUSRequestStatus Request; //Formatted request for slave uint8_t DataLength; //Count of data type instances read from slave uint8_t Error; //Have any error occured? } MODBUSMasterStatus; //Type containing master device configuration data #pragma once class VolumeTransformation { public: /// /// Transforms a given volume level to a new ("virtual") level based on a /// formula or set of rules (e.g., a volume curve transformation). /// virtual float Apply(float vol) = 0; /// /// Given a transformed ("virtual") volume value, this function reverts it /// back to its original value (assuming the given value was produced /// by the ToVirtual() function). /// virtual float Revert(float vol) = 0; };// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s // XFAIL: -linux- // REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64 typedef int a; // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_ #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_ #pragma once #include "content/browser/renderer_host/render_view_host_observer.h" class Profile; struct ExtensionHostMsg_DomMessage_Params; // Filters and dispatches extension-related IPC messages that arrive from // renderer/extension processes. This object is created for renderers and also // ExtensionHost/BackgroundContents. Contrast this with ExtensionTabHelper, // which is only created for TabContents. class ExtensionMessageHandler : public RenderViewHostObserver { public: // |sender| is guaranteed to outlive this object. explicit ExtensionMessageHandler(RenderViewHost* render_view_host); virtual ~ExtensionMessageHandler(); // RenderViewHostObserver overrides. virtual bool OnMessageReceived(const IPC::Message& message); private: // Message handlers. void OnPostMessage(int port_id, const std::string& message); void OnRequest(const ExtensionHostMsg_DomMessage_Params& params); DISALLOW_COPY_AND_ASSIGN(ExtensionMessageHandler); }; #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_HANDLER_H_ #include #include #include #include typedef int32_t s32_t; typedef uint32_t u32_t; typedef int16_t s16_t; typedef uint16_t u16_t; typedef int8_t s8_t; typedef uint8_t u8_t; typedef long long ptrdiff_t; #define offsetof(type, member) __builtin_offsetof (type, member) /* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_LITE_CORE_SHIMS_CC_KERNELS_REGISTER_H_ #define TENSORFLOW_LITE_CORE_SHIMS_CC_KERNELS_REGISTER_H_ #include "tensorflow/lite/kernels/register.h" #endif // TENSORFLOW_LITE_CORE_SHIMS_CC_KERNELS_REGISTER_H_ #ifndef CONSTANTS_H #define CONSTANTS_H #if !defined(__STDC__) && !defined(__cplusplus) #define const #endif /* Set up a boolean variable type. Since this definition could conflict with other reasonable definition of BOOLEAN, i.e. using an enumeration, it is conditional. */ #ifndef BOOLEAN_TYPE_DEFINED typedef int BOOLEAN; #endif #if defined(TRUE) # undef TRUE # undef FALSE #endif static const int TRUE = 1; static const int FALSE = 0; /* Useful constants for turning seconds into larger units of time. Since these constants may have already been defined elsewhere, they are conditional. */ #ifndef TIME_CONSTANTS_DEFINED static const int MINUTE = 60; static const int HOUR = 60 * 60; static const int DAY = 24 * 60 * 60; #endif /* This is for use with strcmp() and related functions which will return 0 upon a match. */ #ifndef MATCH static const int MATCH = 0; #endif #endif #pragma once #include #define DHT22_PIN 6 #define DHT22_SAMPLE_RATE 3000 #define TEMPORATURE_TARGET (204) #define HEATER_PIN 10 #define HEATER_ACTION_DELAY (15*60) // minimal seconds to open/close heater, prevent switch heater too frequently. // pin connect to 315/433 transmitter #define TRANSMIT_PIN 8 // Log temperature and humidity every 5mins #define TEMPE_HUMI_LOG_INTERVAL ((uint32_t)5 * 60 * 1000) #define DISPLAY_PIN1 5 #define DISPLAY_PIN2 4 #define DISPLAY_PIN3 3 #define DISPLAY_PIN4 2 #define DISPLAY_PIN5 11 #define DISPLAY_PIN6 12 extern core::idType idTempe, idHumi; // Set digital value idHeaterReq to turn on/off, heater module // has a throttle inside to prevent turn on/off too frequently, // idHeaterAct digtial value is the heater actual state. extern core::idType idHeaterReq, idHeaterAct; #define KEY_MODE_PIN 7 #define KEY_UP_PIN 9 #define KEY_DOWN_PIN 10 #define KEY_SETUP_PIN 13 extern core::idType idKeyMode, idKeyUp, idKeyDown, idKeySetup; #ifndef __parse_type_h__ #define __parse_type_h__ typedef enum { PARSE_TYPE_NONE, PARSE_TYPE_LOGICAL, PARSE_TYPE_CHARACTER, PARSE_TYPE_INTEGER, PARSE_TYPE_REAL, PARSE_TYPE_COMPLEX, PARSE_TYPE_BYTE, } parse_type_e; typedef struct { parse_type_e type; unsigned kind; unsigned count; } parse_type_t; static const parse_type_t PARSE_TYPE_INTEGER_DEFAULT = { .type = PARSE_TYPE_INTEGER, .kind = 0, .count = 0, }; static const parse_type_t PARSE_TYPE_REAL_DEFAULT = { .type = PARSE_TYPE_REAL, .kind = 0, .count = 0, }; unsigned parse_type( const sparse_t* src, const char* ptr, parse_type_t* type); #endif #pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.45f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // increment that won't trigger the new-version checks, handy for minor // releases that I don't want to bother users about. //#define VERSION_SUFFIX 'b' // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_COMMON_GPU_SURFACE_HANDLE_TYPES_MAC_H_ #define CONTENT_COMMON_GPU_SURFACE_HANDLE_TYPES_MAC_H_ #include #include "base/basictypes.h" #include "ui/base/cocoa/remote_layer_api.h" namespace content { // The surface handle passed between the GPU and browser process may refer to // an IOSurface or a CAContext. These helper functions must be used to identify // and translate between the types. enum SurfaceHandleType { kSurfaceHandleTypeInvalid, kSurfaceHandleTypeIOSurface, kSurfaceHandleTypeCAContext, }; SurfaceHandleType GetSurfaceHandleType(uint64 surface_handle); CAContextID CAContextIDFromSurfaceHandle(uint64 surface_handle); IOSurfaceID IOSurfaceIDFromSurfaceHandle(uint64 surface_handle); uint64 SurfaceHandleFromIOSurfaceID(IOSurfaceID io_surface_id); uint64 SurfaceHandleFromCAContextID(CAContextID ca_context_id); } // namespace content #endif // CONTENT_COMMON_GPU_HANDLE_TYPES_MAC_H_ /* * Describes all ncp_lib kernel functions * * $FreeBSD$ */ #ifndef _NCP_MOD_H_ #define _NCP_MOD_H_ /* order of calls in syscall table relative to offset in system table */ #define NCP_SE(callno) (callno+sysentoffset) #define NCP_CONNSCAN NCP_SE(0) #define NCP_CONNECT NCP_SE(1) #define NCP_INTFN NCP_SE(2) #define SNCP_REQUEST NCP_SE(3) #endif /* !_NCP_MOD_H_ */// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef OZONE_PLATFORM_OZONE_PLATFORM_WAYLAND_H_ #define OZONE_PLATFORM_OZONE_PLATFORM_WAYLAND_H_ namespace ui { class OzonePlatform; // Constructor hook for use in ozone_platform_list.cc OzonePlatform* CreateOzonePlatformWayland(); } // namespace ui #endif // OZONE_PLATFORM_OZONE_PLATFORM_WAYLAND_H_ /* Return the copyright string. This is updated manually. */ #include "Python.h" static char cprt[] = "Copyright (c) 2000 BeOpen.com.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 1995-2000 Corporation for National Research Initiatives.\n\ All Rights Reserved.\n\ \n\ Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.\n\ All Rights Reserved."; const char * Py_GetCopyright(void) { return cprt; } #include static PyObject* websocket_mask(PyObject* self, PyObject* args) { const char* mask; int mask_len; const char* data; int data_len; int i; if (!PyArg_ParseTuple(args, "s#s#", &mask, &mask_len, &data, &data_len)) { return NULL; } PyObject* result = PyBytes_FromStringAndSize(NULL, data_len); if (!result) { return NULL; } char* buf = PyBytes_AsString(result); for (i = 0; i < data_len; i++) { buf[i] = data[i] ^ mask[i % 4]; } return result; } static PyMethodDef methods[] = { {"websocket_mask", websocket_mask, METH_VARARGS, ""}, {NULL, NULL, 0, NULL} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef speedupsmodule = { PyModuleDef_HEAD_INIT, "speedups", NULL, -1, methods }; PyMODINIT_FUNC PyInit_speedups() { return PyModule_Create(&speedupsmodule); } #else // Python 2.x PyMODINIT_FUNC initspeedups() { Py_InitModule("tornado.speedups", methods); } #endif /** * machina * * Copyright (c) 2011, drmats * All rights reserved. * * https://github.com/drmats/machina */ #ifndef __PLATFORM_H_ #define __PLATFORM_H_ 1 #if defined(linux) || defined(__linux) || defined(__linux__) #undef __LINUX__ #define __LINUX__ 1 #endif #if defined(WIN32) || defined(_WIN32) #undef __WIN32__ #define __WIN32__ 1 #endif #ifdef __WIN32__ #pragma warning( disable : 4290 ) #endif #endif /* r-svd-impute.h */ #ifndef _R_SVD_IMPUTE_H #define _R_SVD_IMPUTE_H SEXP R_svd_impute (SEXP xx, SEXP KK, SEXP tol, SEXP maxiter); #endif /* _R_SVD_IMPUTE_H */ // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ #define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ namespace webkit_glue { // Chromium sets the minimum interval timeout to 4ms, overriding the // default of 10ms. We'd like to go lower, however there are poorly // coded websites out there which do create CPU-spinning loops. Using // 4ms prevents the CPU from spinning too busily and provides a balance // between CPU spinning and the smallest possible interval timer. const double kForegroundTabTimerInterval = 0.004; // Provides control over the minimum timer interval for background tabs. const double kBackgroundTabTimerInterval = 1.0; } // namespace webkit_glue #endif // WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ #ifdef USE_INSTANT_OSX #include "hitimes_interval.h" #include #include /* All this OSX code is adapted from http://developer.apple.com/library/mac/#qa/qa1398/_index.html */ /* * returns the conversion factor, this value is used to convert * the value from hitimes_get_current_instant() into seconds */ long double hitimes_instant_conversion_factor() { static mach_timebase_info_data_t s_timebase_info; static long double conversion_factor; /** * If this is the first time we've run, get the timebase. * We can use denom == 0 to indicate that s_timebase_info is * uninitialised because it makes no sense to have a zero * denominator is a fraction. */ if ( s_timebase_info.denom == 0 ) { (void) mach_timebase_info(&s_timebase_info); uint64_t nano_conversion = s_timebase_info.numer / s_timebase_info.denom; conversion_factor = (long double) (nano_conversion) * (1e9l); } return conversion_factor; } /* * returns the mach absolute time, which has no meaning outside of a conversion * factor. */ hitimes_instant_t hitimes_get_current_instant() { return mach_absolute_time(); } #endif // ext/foo/foo_vector.h // Declarations for wrapped struct #ifndef FOO_VECTOR_H #define FOO_VECTOR_H #include #include // Ruby 1.8.7 compatibility patch #ifndef DBL2NUM #define DBL2NUM( dbl_val ) rb_float_new( dbl_val ) #endif void init_foo_vector( VALUE parent_module ); // This is the struct that the rest of the code wraps typedef struct _fv { double x; double y; double z; } FVStruct; #endif// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ #define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ namespace webkit_glue { // Chromium sets the minimum interval timeout to 4ms, overriding the // default of 10ms. We'd like to go lower, however there are poorly // coded websites out there which do create CPU-spinning loops. Using // 4ms prevents the CPU from spinning too busily and provides a balance // between CPU spinning and the smallest possible interval timer. const double kForegroundTabTimerInterval = 0.004; // Provides control over the minimum timer interval for background tabs. const double kBackgroundTabTimerInterval = 1.0; } // namespace webkit_glue #endif // WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ /** Author : Paul TREHIOU & Victor SENE * Date : November 2014 **/ #include #include /** * Declaration Point structure * x - real wich is the abscisse of the point * y - real wich is the ordinate of the point */ typedef struct { double x; double y; }Point; /** * Declaration of the Element structure * value - value of the point of the current element of the polygon * next - pointer on the next element * previous - pointer on the previous element */ typedef struct pointelem{ Point value; struct pointelem* next; struct pointelem* previous; }PointElement; /** * Declaration of the Polygon */ typedef struct { PointElement* head; int size; }Polygon; /** * Function wich create a point with a specified abscisse and ordinate * abscisse - real * ordinate - real * return a new point */ Point createPoint(double abscisse, double ordinate); /** * Function wich create a new empty Polygon * return the new empty polygon */ Polygon createPolygon(); /** * Function wich add a point at the end of an existing polygon * inpoly - Polygon * inpoint - Point * return a new polygon */ Polygon addPoint(Polygon inpoly, Point inpoint); #include "some_struct.h" void foo() { struct X x; x. // RUN: CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:4:5 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC1 %s // CHECK-CC1: FieldDecl:{ResultType int}{TypedText m} (35) (parent: StructDecl 'X') #include #include #include #include "../marquise.h" void test_hash_identifier() { const char *id = "hostname:fe1.example.com,metric:BytesUsed,service:memory,"; size_t id_len = strlen(id); uint64_t address = marquise_hash_identifier((const unsigned char*) id, id_len); g_assert_cmpint(address, ==, 7602883380529707052); } int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_add_func("/marquise_hash_identifier/hash", test_hash_identifier); return g_test_run(); } typedef NS_ENUM(NSInteger, StatsSection) { StatsSectionGraph, StatsSectionPeriodHeader, StatsSectionEvents, StatsSectionPosts, StatsSectionReferrers, StatsSectionClicks, StatsSectionCountry, StatsSectionVideos, StatsSectionComments, StatsSectionTagsCategories, StatsSectionFollowers, StatsSectionPublicize, StatsSectionWebVersion }; typedef NS_ENUM(NSInteger, StatsSubSection) { StatsSubSectionCommentsByAuthor = 100, StatsSubSectionCommentsByPosts, StatsSubSectionFollowersDotCom, StatsSubSectionFollowersEmail, StatsSubSectionNone }; #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 6 #define ACQUIRE_IMAGE_PIXELS(im, x, y, w, h, ex) ({ \ _Pragma("GCC diagnostic push") \ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ AcquireImagePixels(im, x, y, w, h, ex); \ _Pragma("GCC diagnostic pop") \ }) #else #define ACQUIRE_IMAGE_PIXELS(im, x, y, w, h, ex) AcquireImagePixels(im, x, y, w, h, ex) #endif /* Stub file provided for C extensions that expect it. All regular * defines and prototypes are in ruby.h */ #define RUBY /* These are defines directly related to MRI C-API symbols that the * mkmf.rb discovery code (e.g. have_func("rb_str_set_len")) would * attempt to find by linking against libruby. Rubinius does not * have an appropriate lib to link against, so we are adding these * explicit defines for now. */ #define HAVE_RB_STR_SET_LEN // // orbit_platforms.h // OrbitVM // // Created by Cesar Parent on 2016-11-14. // Copyright © 2016 cesarparent. All rights reserved. // #ifndef OrbitPlatforms_h #define OrbitPlatforms_h #if __STDC_VERSION__ >= 199901L #define ORBIT_FLEXIBLE_ARRAY_MEMB #else #define ORBIT_FLEXIBLE_ARRRAY_MEMB 0 #endif #endif /* OrbitPlatforms_h */ // RUN: %llvmgcc %s -S -fnested-functions -o - | grep {sret *%agg.result} struct X { int m, n, o, p; }; struct X p(int n) { struct X c(int m) { struct X x; x.m = m; x.n = n; return x; } return c(n); } #include "lily_impl.h" #include "lily_symtab.h" #include "lily_opcode.h" static void builtin_print(lily_symbol *s) { if (s->val_type == vt_str) lily_impl_send_html(((lily_strval *)s->sym_value)->str); } void lily_vm_execute(lily_symbol *sym) { lily_symbol **regs; int *code, ci; regs = lily_impl_malloc(8 * sizeof(lily_symbol *)); code = sym->code_data->code; ci = 0; while (1) { switch (code[ci]) { case o_load_reg: regs[code[ci+1]] = (lily_symbol *)code[ci+2]; ci += 3; break; case o_builtin_print: builtin_print(regs[code[ci+1]]); ci += 2; case o_assign: regs[code[ci]]->sym_value = (void *)code[ci+1]; regs[code[ci]]->val_type = (lily_val_type)code[ci+2]; ci += 3; case o_vm_return: free(regs); return; } } } #define DEFAULT_GETUID "/lib/udev/scsi_id --whitelisted --device=/dev/%n" #define DEFAULT_UDEVDIR "/dev" #define DEFAULT_MULTIPATHDIR "/" LIB_STRING "/multipath" #define DEFAULT_SELECTOR "round-robin 0" #define DEFAULT_ALIAS_PREFIX "mpath" #define DEFAULT_FEATURES "0" #define DEFAULT_HWHANDLER "0" #define DEFAULT_MINIO 1000 #define DEFAULT_MINIO_RQ 1 #define DEFAULT_PGPOLICY FAILOVER #define DEFAULT_FAILBACK -FAILBACK_MANUAL #define DEFAULT_RR_WEIGHT RR_WEIGHT_NONE #define DEFAULT_NO_PATH_RETRY NO_PATH_RETRY_UNDEF #define DEFAULT_PGTIMEOUT -PGTIMEOUT_NONE #define DEFAULT_USER_FRIENDLY_NAMES 0 #define DEFAULT_VERBOSITY 2 #define DEFAULT_CHECKINT 5 #define MAX_CHECKINT(a) (a << 2) #define DEFAULT_PIDFILE "/var/run/multipathd.pid" #define DEFAULT_SOCKET "/var/run/multipathd.sock" #define DEFAULT_CONFIGFILE "/etc/multipath.conf" #define DEFAULT_BINDINGS_FILE "/etc/multipath/bindings" char * set_default (char * str); /* * Copyright (c) 2002-2004, Index Data * See the file LICENSE for details. * * $Id: tstnmem.c,v 1.2 2004-09-29 20:15:48 adam Exp $ */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include int main (int argc, char **argv) { void *cp; NMEM n; int j; nmem_init(); n = nmem_create(); if (!n) exit (1); for (j = 1; j<500; j++) { cp = nmem_malloc(n, j); if (!cp) exit(2); } for (j = 2000; j<20000; j+= 2000) { cp = nmem_malloc(n, j); if (!cp) exit(3); } nmem_destroy(n); nmem_exit(); exit(0); } /*! \file * \\brief This file is for later use for power management functions as we see fit for them. * May not even use at all. */ //test test #include #include #include #include "check_check.h" int main (void) { int n; SRunner *sr; fork_setup(); setup_fixture(); sr = srunner_create (make_master_suite()); srunner_add_suite(sr, make_list_suite()); srunner_add_suite(sr, make_msg_suite()); srunner_add_suite(sr, make_log_suite()); srunner_add_suite(sr, make_limit_suite()); srunner_add_suite(sr, make_fork_suite()); srunner_add_suite(sr, make_fixture_suite()); srunner_add_suite(sr, make_pack_suite()); setup(); printf ("Ran %d tests in subordinate suite\n", sub_nfailed); srunner_run_all (sr, CK_NORMAL); cleanup(); fork_teardown(); teardown_fixture(); n = srunner_ntests_failed(sr); srunner_free(sr); return (n == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } //--------------------------------------------------------------------------------------- // This file is part of the Lomse library. // Do not alter layout. Will affect CMakeLists.txt data extraction code // // | All values aligned here #define LOMSE_VERSION_MAJOR 0 #define LOMSE_VERSION_MINOR 16 #define LOMSE_VERSION_TYPE ' ' #define LOMSE_VERSION_PATCH 2 #define LOMSE_VERSION_REVNO 134 #define LOMSE_VERSION_DATE "2016-01-25 12:41:25 +01:00" #ifndef SRC_UTILS_CUDA_HELPER_H_ #define SRC_UTILS_CUDA_HELPER_H_ #include #include #include #include static void HandleError(cudaError_t error, const char *file, int line) { if (error != cudaSuccess) { printf("%s in %s at line %d\n", cudaGetErrorString(error), file, line); throw std::runtime_error(cudaGetErrorString(error)); } } #define HANDLE_ERROR(error) (HandleError(error, __FILE__, __LINE__)) #define HANDLE_NULL(a) \ { \ if (a == NULL) \ { \ printf("Host memory failed in %s at line %d\n", __FILE__, __LINE__); \ exit(EXIT_FAILURE); \ } \ } #endif // SRC_UTILS_CUDA_HELPER_H_ #pragma once #include "sajson.h" #include namespace sajson { inline std::ostream& operator<<(std::ostream& os, type t) { switch (t) { case TYPE_INTEGER: return os << ""; case TYPE_DOUBLE: return os << ""; case TYPE_NULL: return os << ""; case TYPE_FALSE: return os << ""; case TYPE_TRUE: return os << ""; case TYPE_STRING: return os << ""; case TYPE_ARRAY: return os << ""; case TYPE_OBJECT: return os << ""; default: return os << " #else #include #endif namespace webdriverxx { namespace detail { TimePoint Now() { #ifdef _WIN32 FILETIME time; ::GetSystemTimeAsFileTime(&time); return (static_cast(time.dwHighDateTime) << 32) + time.dwLowDateTime; #else timeval time = {}; WEBDRIVERXX_CHECK(0 == gettimeofday(&time, nullptr), "gettimeofday failure"); return static_cast(time.tv_sec)*1000 + time.tv_usec/1000; #endif } void Sleep(Duration milliseconds) { #ifdef _WIN32 ::Sleep(static_cast(milliseconds)); #else timespec time = { static_cast(milliseconds/1000), static_cast(milliseconds%1000)*1000000 }; while (nanosleep(&time, &time)) {} #endif } } // namespace detail } // namespace webdriverxx #endif #ifndef SAUCE_MEMORY_H_ #define SAUCE_MEMORY_H_ #if SAUCE_STD_SMART_PTR #include #elif SAUCE_STD_TR1_SMART_PTR #include #elif SAUCE_BOOST_SMART_PTR #include #else #error Please define SAUCE_STD_SMART_PTR, SAUCE_STD_TR1_SMART_PTR or SAUCE_BOOST_SMART_PTR #endif #endif // SAUCE_MEMORY_H_ #ifndef _VJ_DEVICE_INTERFACE_H_ #define _VJ_DEVICE_INTERFACE_H_ //: Base class for simplified interfaces // // Interfaces provide an easier way to access proxy objects from // within user applications.

// // Users can simply declare a local interface variable and use it // as a smart_ptr for the proxy // //! NOTE: The init function should be called in the init function of the user //+ application #include class vjDeviceInterface { public: vjDeviceInterface() : mProxyIndex(-1) {;} //: Initialize the object //! ARGS: proxyName - String name of the proxy to connect to void init(string proxyName); //: Return the index of the proxy int getProxyIndex() { return mProxyIndex; } protected: int mProxyIndex; //: The index of the proxy }; #endif // -*- c++ -*- /* Copyright 2019 Alain Dargelas Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* * File: VpiListener.h * Author: alaindargelas * * Created on December 14, 2019, 10:03 PM */ #ifndef UHDM_VPILISTENER_CLASS_H #define UHDM_VPILISTENER_CLASS_H #include "headers/uhdm_forward_decl.h" namespace UHDM { class VpiListener { public: // Use implicit constructor to initialize all members // VpiListener() virtual ~VpiListener() {} protected: }; }; #endif #include #include #include "debug.h" #ifndef NDEBUG regex_t _comp; // Initialize the regular expression used for restricting debug output static void __attribute__ ((constructor)) premain() { if (regcomp(&_comp, DCOMPONENT, REG_EXTENDED|REG_ICASE|REG_NOSUB)) die("mayb not a valid regexp: %s", DCOMPONENT); } // Print a hexdump of the given block void hexdump(const void * const ptr, const unsigned len) { const char * const buf = (const char * const)ptr; for (unsigned i = 0; i < len; i += 16) { fprintf(stderr, "%06x: ", i); for (unsigned j = 0; j < 16; j++) if (i+j < len) fprintf(stderr, "%02hhx ", buf[i+j]); else fprintf(stderr, " "); fprintf(stderr, " "); for (unsigned j = 0; j < 16; j++) if (i+j < len) fprintf(stderr, "%c", isprint(buf[i+j]) ? buf[i+j] : '.'); fprintf(stderr, "\n"); } } #endif #include #include #include types.c #include /* We can: Set something equal to something Function calls Function definitions Returning things -- delimiter '<' Printing things Iffing */ struct call parseCall(char* statement); struct function parseFunction(char* statement); char* fixSpacing(char* code) { char* fixedCode = malloc(sizeof(char) * (strlen(code) + 1)); fixedCode = strcpy(fixedCode, code); char* doubleSpace = strstr(fixedCode, " "); char* movingIndex; for( ; doubleSpace; doubleSpace = strstr(fixedCode, " ")) { for(movingIndex = doubleSpace; movingIndex&; movingIndex++) { movingIndex[0] = movingIndex[1]; } } return fixedCode; } char** spcTokenize(char* regCode) { int n = 0; int i; for(i = 0; regCode[i]; i++) { if(regCode[i] == ' ') { n++; } } char** spcTokens = malloc(sizeof(char*) * (n+1)); int k; for(i = 0; i < n+1; i++) { k = strchr(regCode, ' ') - regCode; regCode[k] = NULL; spcTokens[i] = regCode + k + 1; } } /* * Copyright © 2015 Canonical Limited * * 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 License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . * * Author: Ryan Lortie */ #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION) #error "Only can be included directly." #endif G_DEFINE_AUTOPTR_CLEANUP_FUNC(GClosure, g_closure_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref) G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref) G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset) /****************************************************************************** * Copyright (c) 2004, 2008 IBM Corporation * All rights reserved. * This program and the accompanying materials * are made available under the terms of the BSD License * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/bsd-license.php * * Contributors: * IBM Corporation - initial implementation *****************************************************************************/ #ifndef _STDDEF_H #define _STDDEF_H #define NULL ((void *)0) typedef unsigned int size_t; #endif #ifndef RPLNN_TEXTURE_H #define RPLNN_TEXTURE_H struct texture; /* Should create a version of this which doesn't malloc (basically just give memory block as a parameter). */ struct texture *texture_create(const char *file_name); void texture_destroy(struct texture **texture); /* Just create a stryct vec2_int texture_get_size func */ void texture_get_info(struct texture *texture, uint32_t **buf, struct vec2_int **size); #endif /* RPLNN_TEXTURE_H */ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for // full license information. #include "stdio.h" #if ( _MSC_VER >= 800 ) #define try __try #define except __except #define finally __finally #define leave __leave #elif defined(__MINGW32__) || defined(__MINGW64__) #define try #define except #define finally #define leave #endif // RUN: touch %t // RUN: chmod 0 %t // %clang -E -dependency-file bla -MT %t -MP -o %t -x c /dev/null // rdar://9286457 #pragma once #include #include template struct local_search { local_search(Mut &mutator, Eval &evaluator, Init &initializer) : _mutator(mutator) , _evaluator(evaluator) , _initializer(initializer) { _initializer.apply(_solution_a); _score_a = _evaluator(_solution_a); } void run(const std::size_t iterations) { for (std::size_t i = 0; i != iterations; ++i) _step(); } void reevaluate() { return _score_a = _evaluator.apply(_solution_a); } private: Type _solution_a; Type _solution_b; double _score_a; double _score_b; Mut &_mutator; Eval &_evaluator; Init &_initializer; void _step() { _solution_b = _solution_a; _mutator.apply(_solution_b); _score_b = _evaluator.apply(_solution_b); if (_score_a <= _score_b) { using std::swap; swap(_solution_a, _solution_b); swap(_score_a, _score_b); } } }; @import Foundation; @import CoreData; FOUNDATION_EXPORT double SyncVersionNumber; FOUNDATION_EXPORT const unsigned char SyncVersionString[]; #import #import /* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* Persistence module for emulator */ #include #include #include #define BUF_SIZE 1024 static void get_storage_path(char *out) { char buf[BUF_SIZE]; readlink("/proc/self/exe", buf, BUF_SIZE); if (snprintf(out, BUF_SIZE, "%s_persist", buf) >= BUF_SIZE) out[BUF_SIZE - 1] = '\0'; } FILE *get_persistent_storage(const char *tag, const char *mode) { char buf[BUF_SIZE]; char path[BUF_SIZE]; /* * The persistent storage with tag 'foo' for test 'bar' would * be named 'bar_persist_foo' */ get_storage_path(buf); if (snprintf(path, BUF_SIZE, "%s_%s", buf, tag) >= BUF_SIZE) path[BUF_SIZE - 1] = '\0'; return fopen(path, mode); } void release_persistent_storage(FILE *ps) { fclose(ps); } /* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkStippleMaskFilter_DEFINED #define SkStippleMaskFilter_DEFINED #include "SkMaskFilter.h" /** * Simple MaskFilter that creates a screen door stipple pattern */ class SkStippleMaskFilter : public SkMaskFilter { public: SkStippleMaskFilter() : INHERITED() { } virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix& matrix, SkIPoint* margin) SK_OVERRIDE; // getFormat is from SkMaskFilter virtual SkMask::Format getFormat() SK_OVERRIDE { return SkMask::kA8_Format; } SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStippleMaskFilter); protected: SkStippleMaskFilter::SkStippleMaskFilter(SkFlattenableReadBuffer& buffer) : SkMaskFilter(buffer) { } private: typedef SkMaskFilter INHERITED; }; #endif // SkStippleMaskFilter_DEFINED#include "lily_impl.h" #include "lily_symtab.h" #include "lily_opcode.h" static void builtin_print(lily_symbol *s) { if (s->val_type == vt_str) lily_impl_send_html(((lily_strval *)s->sym_value)->str); } void lily_vm_execute(lily_symbol *sym) { lily_symbol **regs; int *code, ci; regs = lily_impl_malloc(8 * sizeof(lily_symbol *)); code = sym->code_data->code; ci = 0; while (1) { switch (code[ci]) { case o_load_reg: regs[code[ci+1]] = (lily_symbol *)code[ci+2]; ci += 3; break; case o_builtin_print: builtin_print(regs[code[ci+1]]); ci += 2; case o_assign: regs[code[ci]]->sym_value = (void *)code[ci+1]; regs[code[ci]]->val_type = (lily_val_type)code[ci+2]; ci += 3; case o_vm_return: free(regs); return; } } } /* * libaacs by Doom9 ppl 2009, 2010 */ #ifndef AACS_H_ #define AACS_H_ #include #include #include "mkb.h" #include "../file/configfile.h" #define LIBAACS_VERSION "1.0" typedef struct aacs AACS; struct aacs { uint8_t pk[16], mk[16], vuk[16], vid[16]; uint8_t *uks; // unit key array (size = 16 * num_uks, each key is at 16-byte offset) uint16_t num_uks; // number of unit keys uint8_t iv[16]; CONFIGFILE *kf; }; AACS *aacs_open(const char *path, const char *keyfile_path); void aacs_close(AACS *aacs); int aacs_decrypt_unit(AACS *aacs, uint8_t *buf, uint32_t len, uint64_t offset); uint8_t *aacs_get_vid(AACS *aacs); #endif /* AACS_H_ */ #pragma once #include #include "effects.h" //number of supported effects on a single effect_layer (must be <= 255) #define MAX_EFFECTS 4 // structure of effect layer typedef struct { Layer* layer; effect_cb* effects[MAX_EFFECTS]; void* params[MAX_EFFECTS]; uint8_t next_effect; } EffectLayer; //creates effect layer EffectLayer* effect_layer_create(GRect frame); //destroys effect layer void effect_layer_destroy(EffectLayer *effect_layer); //sets effect for the layer void effect_layer_add_effect(EffectLayer *effect_layer, effect_cb* effect, void* param); //gets layer Layer* effect_layer_get_layer(EffectLayer *effect_layer);#include "parser.h" #include "ast.h" #include "tests.h" void test_parse_number(); int main() { test_parse_number(); return 0; } struct token *make_token(enum token_type tk_type, char* str, double dbl, int number) { struct token *tk = malloc(sizeof(struct token)); tk->type = tk_type; if (tk_type == tok_dbl) { tk->value.dbl = dbl; } else if (tk_type == tok_number) { tk->value.number = number; } else { tk->value.string = string; } return tk; } void test_parse_number() { struct token_list *tkl = make_token_list(); tkl.append(make_token(tok_number, NULL, 0.0, 42); struct ast_node *result = parse_number(tkl); EXPECT_EQ(result->val, tkl->head); EXPECT_EQ(result->num_children, 0); destroy_token_list(tkl); } #pragma once #ifndef YOU_DATASTORE_DATASTORE_H_ #define YOU_DATASTORE_DATASTORE_H_ #include #include #include "boost/variant.hpp" #include "task_typedefs.h" #include "internal/operation.h" namespace You { namespace DataStore { namespace UnitTests {} class Transaction; class DataStore { friend class Transaction; public: static bool begin(); // Modifying methods static bool post(TaskId, SerializedTask&); static bool put(TaskId, SerializedTask&); static bool erase(TaskId); static boost::variant get(TaskId); static std::vector filter(const std::function&); private: static DataStore& getInstance(); bool isServing = false; std::deque operationsQueue; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_DATASTORE_H_ // // NSString+Input.h // LYCategory // // Created by Rick Luo on 11/25/13. // Copyright (c) 2013 Luo Yu. All rights reserved. // #import @interface NSString (Input) #pragma mark EMPTY - (BOOL)isEmpty; #pragma mark EMAIL - (BOOL)isEmail; #pragma mark SPACE - (NSString *)trimStartSpace; - (NSString *)trimSpace; #pragma mark PHONE NUMBER - (NSString *)phoneNumber; - (BOOL)isPhoneNumber; #pragma mark EMOJI - (NSString *)replaceEmojiTextWithUnicode; - (NSString *)replaceEmojiUnicodeWithText; @end #include static PyObject * simulate_install(PyObject *self, PyObject *args) { long cpu_units; long mem_bytes; if (!PyArg_ParseTuple(args, "LL", &cpu_units, &mem_bytes)) { return NULL; } char *p; p = (char *) malloc(mem_bytes); int j = 0; for (long i = 0; i < cpu_units; i++) { j++; } free(p); return Py_BuildValue("i", 0); } static PyObject * simulate_import(PyObject *self, PyObject *args) { long cpu_units; long mem_bytes; if (!PyArg_ParseTuple(args, "LL", &cpu_units, &mem_bytes)) { return NULL; } int j = 0; for (long i = 0; i < cpu_units; i++) { j++; } PyObject * p = (PyObject *) PyMem_Malloc(mem_bytes); return p; } static PyMethodDef LoadSimulatorMethods[] = { {"simulate_install", simulate_install, METH_VARARGS, "simulate install"}, {"simulate_import", simulate_import, METH_VARARGS, "simulate import"}, { NULL, NULL, 0, NULL } }; PyMODINIT_FUNC initload_simulator(void) { (void) Py_InitModule("load_simulator", LoadSimulatorMethods); } // Check that basic use of win32-macho targets works. // REQUIRES: x86-registered-target // RUN: %clang -fsyntax-only -target x86_64-pc-win32-macho %s -o /dev/null #ifndef PERIPH_CONF_H #define PERIPH_CONF_H #ifdef __cplusplus extern "C" { #endif /** * @brief Real Time Clock configuration */ #define RTC_NUMOF (1) #ifdef __cplusplus } #endif #endif /* PERIPH_CONF_H */#ifndef SQUARE_H_ #define SQUARE_H_ namespace flat2d { class Square { protected: int x, y, w, h; public: Square(int px, int py, int dim) : x(px), y(py), w(dim), h(dim) { } Square(int px, int py, int pw, int ph) : x(px), y(py), w(pw), h(ph) { } bool containsPoint(int, int) const; bool operator<(const Square&) const; bool operator==(const Square&) const; bool operator!=(const Square&) const; }; } // namespace flat2d #endif // SQUARE_H_ //===--- UIKitOverlayShims.h ---===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===--------------------===// #ifndef SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H #define SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H @import UIKit; #if __has_feature(nullability) #pragma clang assume_nonnull begin #endif #if TARGET_OS_TV || TARGET_OS_IOS static inline BOOL _swift_UIKit_UIFocusEnvironmentContainsEnvironment(id environment, id otherEnvironment) { return [UIFocusSystem environment:environment containsEnvironment:otherEnvironment]; } #endif // TARGET_OS_TV || TARGET_OS_IOS #if __has_feature(nullability) #pragma clang assume_nonnull end #endif #endif // SWIFT_STDLIB_SHIMS_UIKIT_OVERLAY_H #ifndef _CONFIG_H #define _CONFIG_H #define ENABLE_FUTILITY_DEPTH 1 // TODO: switch to at least 2 #define ENABLE_HISTORY 1 #define ENABLE_KILLERS 1 #define ENABLE_LMR 1 #define ENABLE_NNUE 0 #define ENABLE_NULL_MOVE_PRUNING 1 #define ENABLE_REVERSE_FUTILITY_DEPTH 1 // TODO: switch to at least 2 #define ENABLE_SEE_Q_PRUNE_LOSING_CAPTURES 0 #define ENABLE_SEE_SORTING 0 #define ENABLE_TIMER_STOP_DEEPENING 1 #define ENABLE_TT_CUTOFFS 1 #define ENABLE_TT_MOVES 1 #endif #include "system.h" FILE * efopen(char *env) { char *t, *p; int port, sock; unless (t = getenv(env)) return (0); if (IsFullPath(t)) return (fopen(t, "a")); if ((p = strchr(t, ':')) && ((port = atoi(p+1)) > 0)) { *p = 0; sock = tcp_connect(t, port); return (fdopen(sock, "w")); } return (fopen(DEV_TTY, "w")); } //================================================================== // MTextAddOn.h // Copyright 1996 Metrowerks Corporation, All Rights Reserved. //================================================================== // This is a proxy class used by Editor add_ons. It does not inherit from BView // but provides an abstract interface to a text engine. #ifndef _MTEXTADDON_H #define _MTEXTADDON_H #include class MIDETextView; class BWindow; struct entry_ref; class MTextAddOn { public: MTextAddOn( MIDETextView& inTextView); virtual ~MTextAddOn(); virtual const char* Text(); virtual int32 TextLength() const; virtual void GetSelection( int32 *start, int32 *end) const; virtual void Select( int32 newStart, int32 newEnd); virtual void Delete(); virtual void Insert( const char* inText); virtual void Insert( const char* text, int32 length); virtual BWindow* Window(); virtual status_t GetRef( entry_ref& outRef); virtual bool IsEditable(); private: MIDETextView& fText; }; #endif #ifndef TERRAIN_H #define TERRAIN_H #include #include #include #include "Constants.h" class Terrain { public: Terrain( const float stepLength = constants::TERRAIN_STEP_LENGTH, const float amplitude = constants::TERRAIN_HEIGHT_VARIATION_AMPLITUDE, const float worldInitLength = constants::WORLD_INIT_LENGTH); virtual ~Terrain(); void ensureHasTerrainTo(const float end); glm::vec2 vertexAtX(const float x) const; // Inlining these as performance examples float stepLength() const { return _stepLength; } float length() const { return float(_vertices.size()) * stepLength() - stepLength(); } const std::vector& Terrain::vertices() const { return _vertices; } bool isAboveGround(const glm::vec2& pos) const; bool isBelowGround(const glm::vec2& pos) const { return !isAboveGround(pos); } private: Random _randomizer; const float _stepLength; const float _amplitude; std::vector _vertices; }; #endif #ifndef KMEM_H #define KMEM_H #include #include #include #include #define KHEAP_PHYS_ROOT ((void*)0x100000) //#define KHEAP_PHYS_END ((void*)0xc1000000) #define KHEAP_END_SENTINEL (NULL) // 1 GB #define PHYS_MEMORY_SIZE (1*1024*1024*1024) #define KHEAP_BLOCK_SLOP 32 #define PAGE_ALIGN(x) ((uint32_t)x >> 12) struct kheap_metadata { size_t size; struct kheap_metadata *next; bool is_free; }; struct kheap_metadata *root; struct kheap_metadata *kheap_init(); int kheap_extend(); void kheap_install(struct kheap_metadata *root, size_t initial_heap_size); void *kmalloc(size_t bytes); void kfree(void *mem); void kheap_defragment(); #endif //======================================================================= // Copyright Baptiste Wicht 2011. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= #ifndef PARSE_NODE_H #define PARSE_NODE_H #include #include "ByteCodeFileWriter.h" #include "Variables.h" #include "CompilerException.h" class ParseNode; typedef std::list::const_iterator NodeIterator; class StringPool; class ParseNode { private: ParseNode* parent; std::list childs; public: ParseNode() : parent(NULL){}; virtual ~ParseNode(); virtual void write(ByteCodeFileWriter& writer); virtual void checkVariables(Variables& variables) throw (CompilerException); virtual void checkStrings(StringPool& pool); virtual void optimize(); void addFirst(ParseNode* node); void addLast(ParseNode* node); void replace(ParseNode* old, ParseNode* node); void remove(ParseNode* node); NodeIterator begin(); NodeIterator end(); }; #endif #ifndef SAFE_H #define SAFE_H #include "debug.h" #ifndef DISABLE_SAFE #define SAFE_STRINGIFY(x) #x #define SAFE_TOSTRING(x) SAFE_STRINGIFY(x) #define SAFE_AT __FILE__ ":" SAFE_TOSTRING(__LINE__) ": " #define SAFE_ASSERT(cond) do { \ if (!(cond)) { \ DEBUG_DUMP(0, "error: " SAFE_AT "%m"); \ DEBUG_BREAK(!(cond)); \ } \ } while (0) #else #define SAFE_ASSERT(...) #endif #include #define SAFE_NNCALL(call) do { \ intptr_t ret = (intptr_t) (call); \ SAFE_ASSERT(ret >= 0); \ } while (0) #define SAFE_NZCALL(call) do { \ intptr_t ret = (intptr_t) (call); \ SAFE_ASSERT(ret != 0); \ } while (0) #endif /* end of include guard: SAFE_H */ // RUN: clang -checker-simple -verify %s int* f1() { int x = 0; return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}} } int* f2(int y) { return &y; // expected-warning{{Address of stack memory associated with local variable 'y' returned.}} expected-warning{{address of stack memory associated with local variable 'y' returned}} } int* f3(int x, int *y) { int w = 0; if (x) y = &w; return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}} } void* compound_literal(int x) { if (x) return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} expected-warning{{braces around scalar initializer}} struct s { int z; double y; int w; }; return &((struct s){ 2, 0.4, 5 * 8 }); } // This file is part of MorphoDiTa . // // Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of // Mathematics and Physics, Charles University in Prague, Czech Republic. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #pragma once #include "common.h" #include "tokenizer.h" namespace ufal { namespace morphodita { class tokenized_sentence { u32string sentence; vector tokens; }; class gru_tokenizer_factory_trainer { public: static bool train(unsigned version, const vector& data, ostream& os, string& error); }; } // namespace morphodita } // namespace ufal /** * @file devfs_dvfs.c * @brief * @author Denis Deryugin * @version 0.1 * @date 2015-09-28 */ /* This is stub */ #ifndef SRC_FORCES_LABELLER_FRAME_DATA_H_ #define SRC_FORCES_LABELLER_FRAME_DATA_H_ #include #include namespace Forces { /** * \brief * * */ class LabellerFrameData { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW LabellerFrameData(double frameTime, Eigen::Matrix4f projection, Eigen::Matrix4f view) : frameTime(frameTime), projection(projection), view(view), viewProjection(projection * view) { } const double frameTime; const Eigen::Matrix4f projection; const Eigen::Matrix4f view; const Eigen::Matrix4f viewProjection; Eigen::Vector3f project(Eigen::Vector3f vector) const { Eigen::Vector4f projected = viewProjection * Eigen::Vector4f(vector.x(), vector.y(), vector.z(), 1); std::cout << "projected" << projected / projected.w() << std::endl; return projected.head<3>() / projected.w(); } }; } // namespace Forces #endif // SRC_FORCES_LABELLER_FRAME_DATA_H_ #pragma once #include "augs/math/declare_math.h" #include "augs/audio/distance_model.h" struct sound_effect_modifier { // GEN INTROSPECTOR struct sound_effect_modifier real32 gain = 1.f; real32 pitch = 1.f; real32 max_distance = -1.f; real32 reference_distance = -1.f; real32 doppler_factor = 1.f; augs::distance_model distance_model = augs::distance_model::NONE; int repetitions = 1; bool fade_on_exit = true; bool disable_velocity = false; bool always_direct_listener = false; pad_bytes<1> pad; // END GEN INTROSPECTOR }; //!compile = {cc} {ccflags} -c -o {ofile} {infile} && {cc} {ccflags} -o {outfile} {ofile} {driver} ../libdbrew.a -I../include #include #include #include #include #include "dbrew.h" int f1(int); // possible jump target int f2(int x) { return x; } int main() { // Decode the function. Rewriter* r = dbrew_new(); // to get rid of changing addresses, assume gen code to be 200 bytes max dbrew_config_function_setname(r, (uintptr_t) f1, "f1"); dbrew_config_function_setsize(r, (uintptr_t) f1, 200); dbrew_decode_print(r, (uintptr_t) f1, 1); return 0; } #ifndef NPY_IMPORT_H #define NPY_IMPORT_H #include #include /*! \brief Fetch and cache Python function. * * Import a Python function and cache it for use. The function checks if * cache is NULL, and if not NULL imports the Python function specified by * \a module and \a function, increments its reference count, and stores * the result in \a cache. Usually \a cache will be a static variable and * should be initialized to NULL. On error \a cache will contain NULL on * exit, * * @param module Absolute module name. * @param function Function name. * @param cache Storage location for imported function. */ NPY_INLINE void npy_cache_pyfunc(const char *module, const char *function, PyObject **cache) { if (*cache == NULL) { PyObject *mod = PyImport_ImportModule(module); if (mod != NULL) { *cache = PyObject_GetAttrString(mod, function); Py_DECREF(mod); } } } #endif #include #include typedef struct { int val; char* str; } Stuff; Stuff* mkThing() { static int num = 0; Stuff* x = malloc(sizeof(Stuff)); x->val = num++; x->str = malloc(20); strcpy(x->str,"Hello"); return x; } char* getStr(Stuff* x) { return x->str; } void freeThing(Stuff* x) { printf("Freeing %d %s\n", x->val, x->str); free(x->str); free(x); } @interface DEIgorParserException : NSObject + (NSException *)exceptionWithReason:(NSString *)reason scanner:(NSScanner *)scanner; @end #include LINK_BEGIN_DECLS void viterbi_parse(const char * sentence, Dictionary dict); LINK_END_DECLS /** * @file * * @brief Some common functions operating on plugins. * * If you include this file you have full access to elektra's internals * and your test might not be ABI compatible with the next release. * * @copyright BSD License (see LICENSE.md or https://www.libelektra.org) */ #include #define PLUGIN_OPEN(NAME) \ KeySet * modules = ksNew (0, KS_END); \ elektraModulesInit (modules, 0); \ Key * errorKey = keyNew ("", KEY_END); \ Plugin * plugin = elektraPluginOpen (NAME, modules, conf, errorKey); \ succeed_if (output_warnings (errorKey), "warnings in kdbOpen for plugin " NAME); \ succeed_if (output_error (errorKey), "error in kdbOpen for plugin " NAME); \ keyDel (errorKey); \ exit_if_fail (plugin != 0, "could not open " NAME " plugin"); #define PLUGIN_CLOSE() \ elektraPluginClose (plugin, 0); \ elektraModulesClose (modules, 0); \ ksDel (modules); #include #include #include #include #include #include "gh-datastore.h" #include "gh-main-window.h" char * data_dir_path () { uid_t uid = getuid (); struct passwd *pw = getpwuid (uid); char *home_dir = pw->pw_dir; char *data_dir = "/.ghighlighter-c"; int length = strlen (home_dir); length = length + strlen (data_dir); char *result = malloc (length + sizeof (char)); strcat (result, home_dir); strcat (result, data_dir); return result; } void setup_environment (char *data_dir) { mkdir (data_dir, 0755); } int main (int argc, char *argv[]) { char *data_dir = data_dir_path (); setup_environment (data_dir); sqlite3 *db = gh_datastore_open_db (data_dir); free (data_dir); GtkWidget *window; gtk_init (&argc, &argv); window = gh_main_window_create (); gtk_widget_show_all (window); gtk_main (); sqlite3_close (db); return 0; } #include #include #include #include "../marquise.h" void test_init() { marquise_ctx *ctx = marquise_init("test"); g_assert_nonnull(ctx); } int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); g_test_add_func("/marquise_init/init", test_init); return g_test_run(); } // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // Some helpers for quic #ifndef NET_QUIC_QUIC_UTILS_H_ #define NET_QUIC_QUIC_UTILS_H_ #include "net/base/int128.h" #include "net/base/net_export.h" #include "net/quic/quic_protocol.h" namespace gfe2 { class BalsaHeaders; } namespace net { class NET_EXPORT_PRIVATE QuicUtils { public: // The overhead the quic framing will add for a packet with num_frames // frames. static size_t StreamFramePacketOverhead(int num_frames); // returns the 128 bit FNV1a hash of the data. See // http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-param static uint128 FNV1a_128_Hash(const char* data, int len); // Returns the name of the quic error code as a char* static const char* ErrorToString(QuicErrorCode error); }; } // namespace net #endif // NET_QUIC_QUIC_UTILS_H_ /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2013 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include /* getenv, sytem, snprintf */ int main(void) { #ifndef WIN32 char *srcdir = getenv("srcdir"); char command[FILENAME_MAX]; int status; snprintf(command, FILENAME_MAX, "%s/tools/cbc version 2>&1", srcdir); status = system(command); if (status == -1 || WIFSIGNALED(status) || WEXITSTATUS(status) != 0) { return 1; } snprintf(command, FILENAME_MAX, "%s/tools/cbc help 2>&1", srcdir); if (status == -1 || WIFSIGNALED(status) || WEXITSTATUS(status) != 0) { return 1; } #endif return 0; } #include #ifndef BD_LIB #define BD_LIB #include "plugins.h" #include "plugin_apis/lvm.h" gboolean bd_init (BDPluginSpec *force_plugins); gboolean bd_reinit (BDPluginSpec *force_plugins, gboolean replace); gchar** bd_get_available_plugin_names (); gboolean bd_is_plugin_available (BDPlugin); #endif /* BD_LIB */ #ifndef HAMCREST_MATCHER_H #define HAMCREST_MATCHER_H #include "selfdescribing.h" namespace Hamcrest { class Description; /** * A matcher over acceptable values. * A matcher is able to describe itself to give feedback when it fails. * * @see BaseMatcher */ template class Matcher : public SelfDescribing { public: virtual ~Matcher() {} /** * Evaluates the matcher for argument item. * * @param item the object against which the matcher is evaluated. * @return true if item matches, otherwise false. * * @see BaseMatcher */ virtual bool matches(const T &item) const = 0; /** * Generate a description of why the matcher has not accepted the item. * The description will be part of a larger description of why a matching * failed, so it should be concise. * This method assumes that matches(item) is false, but * will not check this. * * @param item The item that the Matcher has rejected. * @param mismatchDescription * The description to be built or appended to. */ virtual void describeMismatch(const T &item, Description &mismatchDescription) const = 0; }; } // namespace Hamcrest #endif // HAMCREST_MATCHER_H #define ACPI_MACHINE_WIDTH 64 #define ACPI_SINGLE_THREADED #define ACPI_USE_LOCAL_CACHE #define ACPI_INLINE inline #define ACPI_USE_NATIVE_DIVIDE #define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED #ifdef ACPI_FULL_DEBUG #define ACPI_DEBUG_OUTPUT #define ACPI_DISASSEMBLER // Depends on threading support #define ACPI_DEBUGGER //#define ACPI_DBG_TRACK_ALLOCATIONS #define ACPI_GET_FUNCTION_NAME __FUNCTION__ #else #define ACPI_GET_FUNCTION_NAME "" #endif #define ACPI_PHYS_BASE 0x100000000 #include #include #define AcpiOsPrintf printf #define AcpiOsVprintf vprintf struct acpi_table_facs; uint32_t AcpiOsReleaseGlobalLock(struct acpi_table_facs* facs); uint32_t AcpiOsAcquireGlobalLock(struct acpi_table_facs* facs); #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acquired) Acquired = AcpiOsAcquireGlobalLock(GLptr) #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Pending) Pending = AcpiOsReleaseGlobalLock(GLptr) /* Copyright (C) 2003 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include int NdbSleep_MilliSleep(int milliseconds){ int result = 0; struct timespec sleeptime; sleeptime.tv_sec = milliseconds / 1000; sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000; result = nanosleep(&sleeptime, NULL); return result; } int NdbSleep_SecSleep(int seconds){ int result = 0; result = sleep(seconds); return result; } #ifndef PASSABILITYAGENT_H #define PASSABILITYAGENT_H #include #include #include "quickpather_global.h" class AbstractEntity; // Not pure abstract, because we want it to be usable in the Q_PROPERTY macro // and not force derived classes to multiply derive from it and QObject. class QUICKPATHERSHARED_EXPORT PassabilityAgent : public QObject { public: virtual bool isPassable(const QPointF &pos, AbstractEntity *entity); }; #endif // PASSABILITYAGENT_H // // AVSubscription.h // AVOS // // Created by Tang Tianyong on 15/05/2017. // Copyright © 2017 LeanCloud Inc. All rights reserved. // #import #import "AVQuery.h" #import "AVDynamicObject.h" NS_ASSUME_NONNULL_BEGIN @protocol AVSubscriptionDelegate @end @interface AVSubscriptionOptions : AVDynamicObject @end @interface AVSubscription : NSObject @property (nonatomic, weak, nullable) id delegate; @property (nonatomic, strong, readonly) AVQuery *query; @property (nonatomic, strong, readonly, nullable) AVSubscriptionOptions *options; - (instancetype)initWithQuery:(AVQuery *)query options:(nullable AVSubscriptionOptions *)options; @end NS_ASSUME_NONNULL_END /* $Id$ $Revision$ */ /* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * * * Copyright (c) 1994-2004 AT&T Corp. * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Corp. * * * * Information and Software Systems Research * * AT&T Research, Florham Park NJ * **********************************************************/ #ifdef __cplusplus extern "C" { #endif /* Lefteris Koutsofios - AT&T Bell Laboratories */ #ifndef _DISPLAY_H #define _DISPLAY_H void Dinit(void); void Dterm(void); void Dtrace(Tobj, int); #endif /* _DISPLAY_H */ #ifdef __cplusplus } #endif #include "LinearAllocator.h" #ifndef STACKALLOCATOR_H #define STACKALLOCATOR_H class StackAllocator : public LinearAllocator { public: /* Allocation of real memory */ StackAllocator(const long totalSize); /* Frees all memory */ virtual ~StackAllocator(); /* Allocate virtual memory */ virtual void* Allocate(const std::size_t size, const std::size_t alignment) override; /* Frees virtual memory */ virtual void Free(void* ptr) override; }; #endif /* STACKALLOCATOR_H *//*========================================================================= This file is part of the XIOT library. Copyright (C) 2008-2009 EDF R&D Author: Kristian Sons (xiot@actor3d.com) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The XIOT library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser Public License for more details. You should have received a copy of the GNU Lesser Public License along with XIOT; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================*/ #ifndef __XIOTConfigure_h #define __XIOTConfigure_h #include "xiot_export.h" #if defined(_MSC_VER) #pragma warning(disable : 4275) /* non-DLL-interface base class used */ #pragma warning(disable : 4251) /* needs to have dll-interface to be used by clients */ /* No warning for safe windows only functions */ #define _CRT_SECURE_NO_WARNINGS #endif #endif // __x3dexporterConfigure_h #include #include #include "rtpp_module.h" #define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)} struct moduleinfo rtpp_module = { .name = "csv_acct", .ver = MI_VER_INIT(struct moduleinfo) }; #include #include #include #include "test.h" #include unsigned char output[6]; void test_output() { if (output[0] != BERT_MAGIC) { test_fail("bert_encoder_push did not add the magic byte"); } if (output[1] != BERT_ATOM) { test_fail("bert_encoder_push did not add the SMALL_INT magic byte"); } size_t expected_length = 2; if (output[3] != expected_length) { test_fail("bert_encoder_push encoded %u as the atom length, expected %u",output[3],expected_length); } const char *expected = "id"; test_strings((const char *)(output+4),expected,expected_length); } int main() { bert_encoder_t *encoder = test_encoder(output,6); bert_data_t *data; if (!(data = bert_data_create_atom("id"))) { test_fail("malloc failed"); } test_encoder_push(encoder,data); bert_data_destroy(data); bert_encoder_destroy(encoder); test_output(); return 0; } #ifndef _TRACE_H_ #define _TRACE_H_ #include #include #ifdef DEBUG #define TRACE ERROR #else #define TRACE(fmt,arg...) ((void) 0) #endif #ifdef DEBUG #define ERROR(fmt,arg...) \ fprintf(stderr, "%s:%d: "fmt, __func__, __LINE__, ##arg) #else #define ERROR(fmt,arg...) \ fprintf(stderr, "%s: "fmt, program_invocation_short_name, ##arg) #endif #define FATAL(fmt,arg...) do { \ ERROR(fmt, ##arg); \ exit(1); \ } while (0) #endif // RUN: clang -emit-llvm -fwritable-string %s int main() { char *str = "abc"; str[0] = '1'; printf("%s", str); } // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_FLOAT_UTIL_H_ #define BASE_FLOAT_UTIL_H_ #pragma once #include "build/build_config.h" #include #include #if defined(OS_SOLARIS) #include #endif namespace base { inline bool IsFinite(const double& number) { #if defined(OS_POSIX) return finite(number) != 0; #elif defined(OS_WIN) return _finite(number) != 0; #endif } } // namespace base #endif // BASE_FLOAT_UTIL_H_ /* * USART.h * * Created: 2016/9/10 16:30:30 * Author: dusch */ #ifndef USART_H_ #define USART_H_ #define BAUD 9600 #define F_CPU 12000000UL #include void USART_Init(void); void USART_Transmit(unsigned char data); unsigned char USART_Receive(void); #endif /* USART_H_ */ #pragma once #include #include #include #include "augs/filesystem/file_time_type.h" namespace augs { struct date_time { // GEN INTROSPECTOR struct augs::timestamp std::time_t t; // END GEN INTROSPECTOR date_time(); date_time(const std::time_t& t) : t(t) {} date_time(const std::chrono::system_clock::time_point&); #if !PLATFORM_WINDOWS date_time(const file_time_type&); #endif operator std::time_t() const { return t; } std::string get_stamp() const; std::string get_readable() const; unsigned long long seconds_ago() const; std::string how_long_ago() const; std::string how_long_ago_tell_seconds() const; private: std::string how_long_ago(bool) const; }; }#import @class MPAttributionResult; @class FilteredMParticleUser; @protocol MPKitProtocol; @interface MPKitAPI : NSObject - (void)logError:(NSString *_Nullable)format, ...; - (void)logWarning:(NSString *_Nullable)format, ...; - (void)logDebug:(NSString *_Nullable)format, ...; - (void)logVerbose:(NSString *_Nullable)format, ...; - (NSDictionary *_Nullable)integrationAttributes; - (void)onAttributionCompleteWithResult:(MPAttributionResult *_Nonnull)result error:(NSError *_Nullable)error; - (FilteredMParticleUser *_Nonnull)getCurrentUserWithKit:(id _Nonnull)kit; - (nullable NSNumber *)incrementUserAttribute:(NSString *_Nonnull)key byValue:(NSNumber *_Nonnull)value forUser:(FilteredMParticleUser *_Nonnull)filteredUser; - (void)setUserAttribute:(NSString *_Nonnull)key value:(id _Nonnull)value forUser:(FilteredMParticleUser *_Nonnull)filteredUser; - (void)setUserAttributeList:(NSString *_Nonnull)key values:(NSArray * _Nonnull)values forUser:(FilteredMParticleUser *_Nonnull)filteredUser; - (void)setUserTag:(NSString *_Nonnull)tag forUser:(FilteredMParticleUser *_Nonnull)filteredUser; - (void)removeUserAttribute:(NSString *_Nonnull)key forUser:(FilteredMParticleUser *_Nonnull)filteredUser; @end /* $Id: t_gc.h,v 1.7 2011/09/04 13:00:54 mit-sato Exp $ */ #ifndef __T_GC__ #define __T_GC__ #ifdef PROF # define GC_INIT() 0 # define GC_MALLOC(s) malloc(s) # define GC_MALLOC_ATOMIC(s) malloc(s) #else # include #endif /* PROF */ #endif /* __T_GC__ */ #define _XOPEN_SOURCE 500 #include #include char *os_find_self(void) { // PATH_MAX (used by readlink(2)) is not necessarily available size_t size = 2048, used = 0; char *path = NULL; do { size *= 2; path = realloc(path, size); used = readlink("/proc/self/exe", path, size); } while (used > size && path != NULL); return path; } #include int main() { puts("Hello, people!"); return 0; } #include #include #include #include "options.h" static Options * _new() { Options *opts = (Options *)malloc(sizeof(Options)); if(opts) { memset(opts, 0, sizeof(Options)); } return opts; } static Options * make(int argc, char *argv[]) { Options *opts = _new(); int i = 1; for(;;) { if(i >= (argc - 1)) break; if(!strcmp(argv[i], "sdbfile")) { opts->sdbFilename = argv[i+1]; i = i + 2; } else if(!strcmp(argv[i], "romfile")) { opts->romFilename = argv[i+1]; i = i + 2; } else { fprintf(stderr, "Warning: unknown option %s\n", argv[i]); i++; } } if (!opts->romFilename) { opts->romFilename = "roms/forth"; } return opts; } const struct interface_Options module_Options = { .make = &make, }; // // OCTEntity.h // OctoKit // // Created by Josh Abernathy on 1/21/11. // Copyright 2011 GitHub. All rights reserved. // #import "OCTObject.h" @class OCTPlan; @class GHImageRequestOperation; // Represents any GitHub object which is capable of owning repositories. @interface OCTEntity : OCTObject // Returns `login` if no name is explicitly set. @property (nonatomic, copy) NSString *name; @property (nonatomic, copy) NSArray *repositories; @property (nonatomic, copy) NSString *email; @property (nonatomic, copy) NSURL *avatarURL; @property (nonatomic, copy) NSString *login; @property (nonatomic, copy) NSString *blog; @property (nonatomic, copy) NSString *company; @property (nonatomic, assign) NSUInteger collaborators; @property (nonatomic, assign) NSUInteger publicRepoCount; @property (nonatomic, assign) NSUInteger privateRepoCount; @property (nonatomic, assign) NSUInteger diskUsage; @property (nonatomic, readonly, strong) OCTPlan *plan; // TODO: Fix this to "RemoteCounterparts". - (void)mergeRepositoriesWithRemoteCountparts:(NSArray *)remoteRepositories; @end /** \file common.h * \brief Project-wide definitions and macros. * * * SCL; 2012-2015 */ #ifndef COMMON_H #define COMMON_H #define GR1C_VERSION "0.10.2" #define GR1C_COPYRIGHT "Copyright (c) 2012-2015 by Scott C. Livingston,\n" \ "California Institute of Technology\n\n" \ "This is free, open source software, released under a BSD license\n" \ "and without warranty." #define GR1C_INTERACTIVE_PROMPT ">>> " typedef int vartype; typedef char bool; #define True 1 #define False 0 typedef unsigned char byte; #include "util.h" #include "cudd.h" #endif #define CGLTF_IMPLEMENTATION #include "../cgltf.h" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { cgltf_options options = {0}; cgltf_data* data = NULL; cgltf_result res = cgltf_parse(&options, Data, Size, &data); if (res == cgltf_result_success) cgltf_free(data); return 0; } #import "MBProgressHUD.h" #import #import "JTSImageViewController.h" #import "JTSImageInfo.h" #import "UITabBarController+NBUAdditions.h" #import "KINWebBrowserViewController.h" #import #import "SVGKit/SVGKit.h" #ifndef UTIL_STRING_H #define UTIL_STRING_H #include "util/common.h" char* strndup(const char* start, size_t len); char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len); #endif #ifdef E_TYPEDEFS #define e_error_message_show(args...) \ { \ char __tmpbuf[PATH_MAX]; \ \ snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \ e_error_message_show_internal(__tmpbuf); \ } #else #ifndef E_ERROR_H #define E_ERROR_H EAPI void e_error_message_show_internal(char *txt); #endif #endif // RUN: clang %s -fsyntax-only -verify -pedantic-errors int a() {int p; *(1 ? &p : (void*)(0 && (a(),1))) = 10;} // expected-error {{null pointer expression is not an integer constant expression (but is allowed as an extension)}} // expected-note{{C does not permit evaluated commas in an integer constant expression}} #pragma once #include "cqrs/artifact.h" namespace cddd { namespace cqrs { template class basic_artifact_view; template class basic_artifact_view> { public: using id_type = typename basic_artifact::id_type; using size_type = typename basic_artifact::size_type; const id_type &id() const { return artifact_.id(); } size_type revision() const { return artifact_.revision(); } template inline void apply_change(Evt &&e) { using std::forward; artifact_.apply_change(forward(e)); } protected: explicit inline basic_artifact_view(basic_artifact &a) : artifact_{a} { } template void add_handler(Fun f) { using std::move; artifact_.add_handler(move(f)); } private: basic_artifact &artifact_; }; typedef basic_artifact_view artifact_view; } } /* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ static MP_INLINE U32 mpxs_APR__OS_current_thread_id(pTHX) { #if APR_HAS_THREADS return (U32)apr_os_thread_current(); #else return 0; #endif } #ifndef __FEATURES_H #define __FEATURES_H #ifdef __STDC__ #define __P(x) x #define __const const /* Almost ansi */ #if __STDC__ != 1 #define const #define volatile #endif #else /* K&R */ #define __P(x) () #define __const #define const #define volatile #endif /* No C++ */ #define __BEGIN_DECLS #define __END_DECLS /* GNUish things */ #define __CONSTVALUE #define __CONSTVALUE2 #define _POSIX_THREAD_SAFE_FUNCTIONS #include #endif startclose: moreInfo New Window [ Name: "More Info"; Left: Get ( WindowDesktopWidth ) - (Get ( WindowDesktopWidth ) / 2 ) ] Go to Layout [ “about” (tempSetup) ] Adjust Window [ Resize to Fit ] Pause/Resume Script [ Indefinitely ] January 23, 平成26 3:39:22 Imagination Quality Management.fp7 - about -1- #ifndef SC_ADB_PARSER_H #define SC_ADB_PARSER_H #include "common.h" #include "stddef.h" /** * Parse the ip from the output of `adb shell ip route` */ char * sc_adb_parse_device_ip_from_output(char *buf, size_t buf_len); #endif #ifndef MALLOCCACHE_H #define MALLOCCACHE_H template class MallocCache { public: MallocCache() : m_blocksCached(0) { } ~MallocCache() { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); for (size_t i = 0; i < m_blocksCached; i++) { ::free(m_blocks[i]); } } void *allocate() { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); if (m_blocksCached) { return m_blocks[--m_blocksCached]; } else { return ::malloc(blockSize); } } void free(void *allocation) { assert(m_blocksCached >= 0 && m_blocksCached <= blockCount); if (m_blocksCached < blockCount) { m_blocks[m_blocksCached++] = allocation; } else { ::free(allocation); } } private: void *m_blocks[blockCount]; size_t m_blocksCached; }; #endif // MALLOCCACHE_H #pragma once #include "Rendering/RendererDX11.h" namespace Mile { enum class ERenderResourceType { VertexBuffer, IndexBuffer, ConstantBuffer, StructuredBuffer, ByteAddressBuffer, IndirectArgumentsBuffer, Texture1D, Texture2D, Texture3D, RenderTarget, DepthStencilBuffer, Cubemap }; class RendererDX11; class MEAPI ResourceDX11 { public: ResourceDX11(RendererDX11* renderer) : m_bIsInitialized(false), m_renderer(renderer) { } virtual ~ResourceDX11() { } virtual ID3D11Resource* GetResource() const = 0; virtual ERenderResourceType GetResourceType() const = 0; FORCEINLINE bool IsInitialized() const { return m_bIsInitialized; } FORCEINLINE bool HasAvailableRenderer() const { return (m_renderer != nullptr); } FORCEINLINE RendererDX11* GetRenderer() const { return m_renderer; } protected: FORCEINLINE void ConfirmInitialize() { m_bIsInitialized = true; } private: RendererDX11* m_renderer; bool m_bIsInitialized; }; }// // RNCallKit.h // RNCallKit // // Created by Ian Yu-Hsun Lin on 12/22/16. // Copyright © 2016 Ian Yu-Hsun Lin. All rights reserved. // #import #import #import #import //#import #import "RCTEventEmitter.h" @interface RNCallKit : RCTEventEmitter @property (nonatomic, strong) CXCallController *callKitCallController; @property (nonatomic, strong) CXProvider *callKitProvider; + (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options NS_AVAILABLE_IOS(9_0); + (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler; @end /* * Copyright (C) 2012 Andrew Beekhof * * libqb 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 License, or * (at your option) any later version. * * libqb is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with libqb. If not, see . */ #include int main(int argc, char **argv) { int lpc = 0; for(lpc = 1; lpc < argc && argv[lpc] != NULL; lpc++) { printf("Dumping the contents of %s\n", argv[lpc]); qb_log_blackbox_print_from_file(argv[lpc]); } return 0; } #ifndef KERNEL_H #define KERNEL_H void free_write(); extern unsigned int endkernel; #endif/*ckwg +5 * Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. */ #ifndef VISTK_SCORING_SCORE_MASK_H #define VISTK_SCORING_SCORE_MASK_H #include "scoring-config.h" #include "scoring_result.h" #include /** * \file mask_scoring.h * * \brief A function for scoring a mask. */ namespace vistk { /// A typedef for a mask image. typedef vil_image_view mask_t; /** * \brief Scores a computed mask against a truth mask. * * \note The input images are expected to be the same size. * * \todo Add error handling to the function (invalid sizes, etc.). * * \param truth The truth mask. * \param computed The computed mask. * * \returns The results of the scoring. */ scoring_result_t VISTK_SCORING_EXPORT score_mask(mask_t const& truth_mask, mask_t const& computed_mask); } #endif // VISTK_SCORING_SCORE_MASK_H // LAF OS Library // Copyright (C) 2022 Igara Studio S.A. // Copyright (C) 2015-2016 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. #ifndef OS_GL_CONTEXT_INCLUDED #define OS_GL_CONTEXT_INCLUDED #pragma once namespace os { class GLContext { public: virtual ~GLContext() { } virtual bool isValid() = 0; virtual bool createGLContext() = 0; virtual void destroyGLContext() = 0; virtual void makeCurrent() = 0; virtual void swapBuffers() = 0; }; } // namespace os #endif #include /* print Fahrenheit to Celsius table * for Fahrenheit 0, 20, ..., 300 */ int main() { int fahr; int cel; int lower; int upper; int step; lower = 0; /* lower bound for the table */ upper = 300; /* upper bound for the table */ step = 20; /* amount to step by */ fahr = lower; while (fahr <= upper) { cel = 5 * (fahr - 32) / 9; printf("%3d\t%6d\n", fahr, cel); fahr += step; } } #ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 1 #define CLIENT_VERSION_MINOR 0 #define CLIENT_VERSION_REVISION 2 #define CLIENT_VERSION_BUILD 5 // Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true // Converts the parameter X to a string after macro replacement on X has been performed. // Don't merge these into one macro! #define STRINGIZE(X) DO_STRINGIZE(X) #define DO_STRINGIZE(X) #X #endif // CLIENTVERSION_H /* * nsswitch_internal.h * Prototypes for some internal glibc functions that we use. Shhh. */ #ifndef NSSWITCH_INTERNAL_H #define NSSWITCH_INTERNAL_H #include "config.h" /* glibc/config.h.in */ #if defined USE_REGPARMS && !defined PROF && !defined __BOUNDED_POINTERS__ # define internal_function __attribute__ ((regparm (3), stdcall)) #else # define internal_function #endif /* glibc/nss/nsswitch.h */ typedef struct service_user service_user; extern int __nss_next (service_user **ni, const char *fct_name, void **fctp, int status, int all_values); extern int __nss_database_lookup (const char *database, const char *alternative_name, const char *defconfig, service_user **ni); extern void *__nss_lookup_function (service_user *ni, const char *fct_name); /* glibc/nss/XXX-lookup.c */ extern int __nss_passwd_lookup (service_user **ni, const char *fct_name, void **fctp) internal_function; extern int __nss_group_lookup (service_user **ni, const char *fct_name, void **fctp) internal_function; #endif /* NSSWITCH_INTERNAL_H */ // RUN: clang -fexceptions -emit-llvm -o - %s | grep "@foo() {" | count 1 // RUN: clang -emit-llvm -o - %s | grep "@foo() nounwind {" | count 1 int foo(void) { } #include #include #include #include #include #include #include #include #include #include #include #include void kmain() { //Install descriptor tables install_gdt(); install_idt(); install_isrs(); install_irq(); install_keyboard(); asm volatile ("sti"); //Set up VGA text mode, and print a welcome message initialize_screen(); set_text_colors(VGA_COLOR_LIGHT_GRAY, VGA_COLOR_BLACK); clear_screen(); printf("NorbyOS v%s\n", NORBY_VERSION); char* buffer; while(1) { printf("==> "); gets_s(buffer, 100); if(strcmp(buffer, "colortest") == 0) { colortest(); } } //Enter an endless loop. If you disable this, another loop in boot.asm will //start, but interrupts will be disabled. while (1) {} } /* * Copyright (c) 2012 Israel Jacques * See LICENSE for details. * * Israel Jacques */ #include "cons.h" typedef struct { } cons_vdp1_t; static struct cons_vdp1_t *cons_vdp1_new(void); static void cons_vdp1_write(struct cons *, int, uint8_t, uint8_t); void cons_vdp1_init(struct cons *cons) { cons_vdp1_t *cons_vdp1; cons_vdp1 = cons_vdp1_new(); cons->driver = cons_vdp1; cons->write = cons_vdp1_write; cons_reset(cons); } static struct cons_vdp1_t * cons_vdp1_new(void) { static struct cons_vdp1_t cons_vdp1; return &cons_vdp1; } static void cons_vdp1_write(struct cons *cons, int c, uint8_t fg, uint8_t bg) { } /*===---- stddef.h - Basic type definitions --------------------------------=== * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ static inline int __get_cpuid (unsigned int level, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) { asm("cpuid" : "=a"(*eax), "=b" (*ebx), "=c"(*ecx), "=d"(*edx) : "0"(level)); return 1; } #include #include #define TEST_RESULT_PORT_NUMBER 0xf4 void test_shutdown_status(enum status status) { logf(Log_Debug, "Test shutting down with status %s (%d)\n", status_message(status), status); write_port(status, TEST_RESULT_PORT_NUMBER); //__asm__("movb $0x0, %al; outb %al, $0xf4"); __asm__("movb $0xf4, %al; outb %al, $0x0"); __asm__("movb $0x0, %al; outb %al, $0xf4"); halt(); //write_port(2, TEST_RESULT_PORT_NUMBER); assert(Not_Reached); } #include "../parse.h" unsigned parse_stmt_parameter( const sparse_t* src, const char* ptr, parse_debug_t* debug, parse_stmt_t* stmt) { unsigned dpos = parse_debug_position(debug); unsigned i = parse_keyword( src, ptr, debug, PARSE_KEYWORD_PARAMETER); if (i == 0) return 0; if (ptr[i++] != '(') { parse_debug_rewind(debug, dpos); return 0; } unsigned l; stmt->parameter.list = parse_assign_list( src, &ptr[i], debug, &l); if (!stmt->parameter.list) { parse_debug_rewind(debug, dpos); return 0; } i += l; if (ptr[i++] != ')') { parse_assign_list_delete( stmt->parameter.list); parse_debug_rewind(debug, dpos); return 0; } stmt->type = PARSE_STMT_PARAMETER; return i; } bool parse_stmt_parameter_print( int fd, const parse_stmt_t* stmt) { if (!stmt) return false; return (dprintf_bool(fd, "PARAMETER ") && parse_assign_list_print( fd, stmt->parameter.list)); } #pragma once #include "jcon.h" #include #include namespace jcon { class JCON_API JsonRpcResult { public: virtual ~JsonRpcResult() {} virtual bool isSuccess() const = 0; virtual QVariant result() const = 0; virtual QString toString() const = 0; }; } #include "rbuv.h" ID id_call; VALUE mRbuv; void Init_rbuv() { id_call = rb_intern("call"); mRbuv = rb_define_module("Rbuv"); Init_rbuv_error(); Init_rbuv_handle(); Init_rbuv_loop(); Init_rbuv_timer(); Init_rbuv_stream(); Init_rbuv_tcp(); Init_rbuv_signal(); } /* * Copyright (c) 1997-2004, Index Data * See the file LICENSE for details. * * $Id: atoin.c,v 1.4 2004-12-13 14:21:55 heikki Exp $ */ /** * \file atoin.c * \brief Implements atoi_n function. */ #if HAVE_CONFIG_H #include #endif #include #include /** * atoi_n: like atoi but reads at most len characters. */ int atoi_n (const char *buf, int len) { int val = 0; while (--len >= 0) { if (isdigit (*(const unsigned char *) buf)) val = val*10 + (*buf - '0'); buf++; } return val; } #ifndef QGC_CONFIGURATION_H #define QGC_CONFIGURATION_H #include /** @brief Polling interval in ms */ #define SERIAL_POLL_INTERVAL 9 /** @brief Heartbeat emission rate, in Hertz (times per second) */ #define MAVLINK_HEARTBEAT_DEFAULT_RATE 1 #define WITH_TEXT_TO_SPEECH 1 #define QGC_APPLICATION_NAME "APM Planner" #define QGC_APPLICATION_VERSION "v2.0.0 (beta)" namespace QGC { const QString APPNAME = "APMPLANNER2"; const QString COMPANYNAME = "DIYDRONES"; const int APPLICATIONVERSION = 200; // 1.0.9 } #endif // QGC_CONFIGURATION_H /* Copyright (C) 2016 Volker Krause This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTERM_P_H #define KSYNTAXHIGHLIGHTING_ABSTRACTHIGHLIGHTERM_P_H #include "definition.h" #include "theme.h" class QStringList; namespace KSyntaxHighlighting { class ContextSwitch; class StateData; class AbstractHighlighterPrivate { public: AbstractHighlighterPrivate(); virtual ~AbstractHighlighterPrivate(); void ensureDefinitionLoaded(); bool switchContext(StateData* data, const ContextSwitch &contextSwitch, const QStringList &captures); Definition m_definition; Theme m_theme; }; } #endif /** * Add a new map widget to the given parent Elementary (container) object. * * @param parent The parent object. * @return a new map widget handle or @c NULL, on errors. * * This function inserts a new map widget on the canvas. * * @ingroup Map */ EAPI Evas_Object *elm_map_add(Evas_Object *parent); #include "elm_map.eo.legacy.h"#include "f2c.h" #define log10e 0.43429448190325182765 #ifdef KR_headers double log(); double d_lg10(x) doublereal *x; #else #undef abs #include "math.h" double d_lg10(doublereal *x) #endif { return( log10e * log(*x) ); } #ifndef CLICKLABEL_H #define CLICKLABEL_H #include #include #include class ClickLabel:public QLabel { Q_OBJECT public: explicit ClickLabel(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags()); ~ClickLabel(); signals: void clicked(); protected: void mouseReleaseEvent(QMouseEvent *event); }; #endif // CLICKLABEL_H #ifndef SkEdgeBuilder_DEFINED #define SkEdgeBuilder_DEFINED #include "SkChunkAlloc.h" #include "SkRect.h" #include "SkTDArray.h" class SkEdge; class SkEdgeClipper; class SkPath; class SkEdgeBuilder { public: SkEdgeBuilder(); int build(const SkPath& path, const SkIRect* clip, int shiftUp); SkEdge** edgeList() { return fList.begin(); } private: SkChunkAlloc fAlloc; SkTDArray fList; int fShiftUp; void addLine(const SkPoint pts[]); void addQuad(const SkPoint pts[]); void addCubic(const SkPoint pts[]); void addClipper(SkEdgeClipper*); }; #endif //===-- LoopConvert/LoopConvert.h - C++11 for-loop migration ----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// /// /// \file /// \brief This file provides the definition of the LoopConvertTransform /// class which is the main interface to the loop-convert transform /// that tries to make use of range-based for loops where possible. /// //===----------------------------------------------------------------------===// #ifndef LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H #define LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H #include "Transform.h" #include "llvm/Support/Compiler.h" // For LLVM_OVERRIDE /// \brief Subclass of Transform that transforms for-loops into range-based /// for-loops where possible. class LoopConvertTransform : public Transform { public: /// \brief \see Transform::run(). virtual int apply(const FileContentsByPath &InputStates, RiskLevel MaxRiskLevel, const clang::tooling::CompilationDatabase &Database, const std::vector &SourcePaths, FileContentsByPath &ResultStates) LLVM_OVERRIDE; }; #endif // LLVM_TOOLS_CLANG_TOOLS_EXTRA_CPP11_MIGRATE_LOOP_CONVERT_H // // VPUSupport.h // QTMultiGPUTextureIssue // // Created by Tom Butterworth on 15/05/2012. // Copyright (c) 2012 Tom Butterworth. All rights reserved. // #ifndef QTMultiGPUTextureIssue_VPUSupport_h #define QTMultiGPUTextureIssue_VPUSupport_h #import #import #define kVPUSPixelFormatTypeRGB_DXT1 'DXt1' #define kVPUSPixelFormatTypeRGBA_DXT1 'DXT1' #define kVPUSPixelFormatTypeRGBA_DXT5 'DXT5' #define kVPUSPixelFormatTypeYCoCg_DXT5 'DYT5' BOOL VPUSMovieHasVPUTrack(QTMovie *movie); CFDictionaryRef VPUCreateCVPixelBufferOptionsDictionary(); #endif C $Header: /u/gcmpack/MITgcm/pkg/dic/DIC_ATMOS.h,v 1.4 2010/04/11 20:59:27 jmc Exp $ C $Name: $ COMMON /INTERACT_ATMOS_NEEDS/ & co2atmos, & total_atmos_carbon, total_ocean_carbon, & total_atmos_carbon_year, & total_ocean_carbon_year, & total_atmos_carbon_start, & total_ocean_carbon_start, & atpco2,total_atmos_moles _RL co2atmos(1000) _RL total_atmos_carbon _RL total_ocean_carbon _RL total_atmos_carbon_year _RL total_atmos_carbon_start _RL total_ocean_carbon_year _RL total_ocean_carbon_start _RL atpco2 _RL total_atmos_moles //===--- Algorithm.h - ------------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LICENSE.txt for license information // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// // // This file defines helper algorithms, some of which are ported from C++14, // which may not be available on all platforms yet. // //===----------------------------------------------------------------------===// #ifndef SWIFT_BASIC_ALGORITHM_H #define SWIFT_BASIC_ALGORITHM_H namespace swift { /// Returns the minimum of `a` and `b`, or `a` if they are equivalent. template constexpr const T& min(const T &a, const T &b) { return !(b < a) ? a : b; } } // end namespace swift #endif /* SWIFT_BASIC_ALGORITHM_H */ /* * Copyright (c) 2015 Wind River Systems, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file * @brief Initialize system clock driver * * Initializing the timer driver is done in this module to reduce code * duplication. Although both nanokernel and microkernel systems initialize * the timer driver at the same point, the two systems differ in when the system * can begin to process system clock ticks. A nanokernel system can process * system clock ticks once the driver has initialized. However, in a * microkernel system all system clock ticks are deferred (and stored on the * kernel server command stack) until the kernel server fiber starts and begins * processing any queued ticks. */ #include #include #include SYS_INIT(_sys_clock_driver_init, #ifdef CONFIG_MICROKERNEL MICROKERNEL, #else NANOKERNEL, #endif CONFIG_SYSTEM_CLOCK_INIT_PRIORITY); #ifndef _PROJECT_CONFIG_H_ #define _PROJECT_CONFIG_H_ #ifdef USART_DEBUG // this happens by 'make USART_DEBUG=1' #undef THERMAL_DATA_UART #else #define USART_DEBUG #define THERMAL_DATA_UART #endif #define TMP007_OVERLAY #define SPLASHSCREEN_OVERLAY #define ENABLE_LEPTON_AGC // #define Y16 #ifndef Y16 // Values from LEP_PCOLOR_LUT_E in Middlewares/lepton_sdk/Inc/LEPTON_VID.h #define PSUEDOCOLOR_LUT LEP_VID_FUSION_LUT #endif #ifndef USART_DEBUG_SPEED #define USART_DEBUG_SPEED (921600) #endif #define WHITE_LED_TOGGLE (HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_6)) #endif // // APIConstant.h // PHPHub // // Created by Aufree on 9/30/15. // Copyright (c) 2015 ESTGroup. All rights reserved. // #define APIAccessTokenURL [NSString stringWithFormat:@"%@%@", APIBaseURL, @"/oauth/access_token"] #define QiniuUploadTokenIdentifier @"QiniuUploadTokenIdentifier" #if DEBUG #define APIBaseURL @"https://staging_api.phphub.org" #else #define APIBaseURL @"https://api.phphub.org" #endif #define PHPHubHost @"phphub.org" #define PHPHubUrl @"https://phphub.org/" #define GitHubURL @"https://github.com/" #define TwitterURL @"https://twitter.com/" #define ProjectURL @"https://github.com/phphub/phphub-ios" #define AboutPageURL @"https://phphub.org/about" #define ESTGroupURL @"http://est-group.org" #define PHPHubGuide @"https://phphub.org/guide" #define SinaRedirectURL @"http://sns.whalecloud.com/sina2/callback"#include #include void delay(uint32_t count) { while(count--); } void init_GPIO() { GPIO_InitTypeDef GPIO_InitStruct = { .GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15, .GPIO_Mode = GPIO_Mode_OUT, .GPIO_Speed = GPIO_Speed_50MHz, .GPIO_OType =GPIO_OType_PP, .GPIO_PuPd = GPIO_PuPd_DOWN }; RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE); GPIO_Init(GPIOD, &GPIO_InitStruct); } int main() { init_GPIO(); GPIO_SetBits(GPIOD, GPIO_Pin_12); return 0; } #ifndef PROPOSER_H #define PROPOSER_H #include #include #include #include "proctor/detector.h" #include "proctor/database_entry.h" namespace pcl { namespace proctor { struct Candidate { std::string id; float votes; }; class Proposer { public: typedef boost::shared_ptr Ptr; typedef boost::shared_ptr ConstPtr; typedef boost::shared_ptr > DatabasePtr; typedef boost::shared_ptr > ConstDatabasePtr; Proposer() {} void setDatabase(const DatabasePtr database) { database_ = database; } virtual void getProposed(int max_num, Entry &query, std::vector &input, std::vector &output) = 0; virtual void selectBestCandidates(int max_num, vector &ballot, std::vector &output); protected: DatabasePtr database_; }; } } #endif /* # # ST_HW_HC_SR04.h # # (C)2016-2017 Flávio monteiro # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # */ #ifndef ST_HW_HC_SR04 #define ST_HW_HC_SR04 #include "Arduino.h" class ST_HW_HC_SR04 { public: ST_HW_HC_SR04(byte triggerPin, byte echoPin); ST_HW_HC_SR04(byte triggerPin, byte echoPin, unsigned long timeout); void setTimeout(unsigned long timeout); void setTimeoutToDefaultValue(); unsigned long getTimeout(); int getHitTime(); private: byte triggerPin; byte echoPin; unsigned long timeout; void triggerPulse(); }; #endif @import Foundation; NS_ASSUME_NONNULL_BEGIN /// Allows you to customize the style for the the view /// controllers for your libraries. @interface CPDStyle : NSObject /// HTML provided to the view controller, it's nothing too fancy /// just a string which has a collection of string replacements on it. /// /// This is the current default: /// {{STYLESHEET}} {{HEADER}}

{{BODY}}

@property (nonatomic, copy) NSString * _Nullable libraryHTML; /// CSS for styling your library /// /// This is the current default: /// @property (nonatomic, copy) NSString * _Nullable libraryCSS; /// HTML specifically for showing the header information about a library /// /// This is the current default ///

{{SUMMARY}}

{{VERSION}}

{{SHORT_LICENSE}}


@property (nonatomic, copy) NSString * _Nullable libraryHeaderHTML; @end NS_ASSUME_NONNULL_END#ifndef __LIBCT_ERRORS_H__ #define __LIBCT_ERRORS_H__ /* * This file contains errors, that can be returned from various * library calls */ /* Generic */ #define LCTERR_BADCTSTATE -2 /* Bad container state */ #define LCTERR_BADFSTYPE -3 /* Bad FS type */ #define LCTERR_BADNETTYPE -4 /* Bad Net type */ #define LCTERR_BADOPTION -5 /* Bad option requested */ /* RPC-specific ones */ #define LCTERR_BADCTRID -42 /* Bad container remote ID given */ #define LCTERR_BADCTRNAME -43 /* Bad name on open */ #define LCTERR_RPCUNKNOWN -44 /* Remote problem , but err is not given */ #define LCTERR_RPCCOMM -45 /* Error communicating via channel */ #endif /* __LIBCT_ERRORS_H__ */ #include #include #include #include "julina.h" int main(int argc, char **argv) { srand(time(NULL)); double aa[] = {2, 0, 1, -2, 3, 4, -5, 5, 6}; Matrix *a = new_matrix(aa, 3, 3); Matrix *ain = inverse(a); double bb[] = {1, -1, -2, 2, 4, 5, 6, 0, -3}; Matrix *b = new_matrix(bb, 3, 3); Matrix *bin = inverse(b); print_matrix(a); if (ain == ERR_SINGULAR_MATRIX_INVERSE) { printf("Inverse of singular matrix.\n"); } else { print_matrix(ain); } print_matrix(b); if (bin == ERR_SINGULAR_MATRIX_INVERSE) { printf("Inverse of singular matrix.\n"); } else { print_matrix(bin); } free_matrix(a); free_matrix(ain); free_matrix(b); free_matrix(bin); } /* * Copyright © 2009 CNRS, INRIA, Université Bordeaux 1 * Copyright © 2009 Cisco Systems, Inc. All rights reserved. * See COPYING in top-level directory. */ #include #include int main(int argc, char *argv[]) { mytest_hwloc_topology_t topology; unsigned depth; hwloc_cpuset_t cpu_set; /* Just call a bunch of functions to see if we can link and run */ cpu_set = mytest_hwloc_cpuset_alloc(); mytest_hwloc_topology_init(&topology); mytest_hwloc_topology_load(topology); depth = mytest_hwloc_topology_get_depth(topology); printf("Max depth: %u\n", depth); mytest_hwloc_topology_destroy(topology); mytest_hwloc_cpuset_free(cpu_set); return 0; } // Copyright (c) 2006- Facebook // Distributed under the Thrift Software License // // See accompanying file LICENSE or visit the Thrift site at: // http://developers.facebook.com/thrift/ #ifndef T_ENUM_H #define T_ENUM_H #include "t_enum_value.h" #include /** * An enumerated type. A list of constant objects with a name for the type. * * @author Mark Slee */ class t_enum : public t_type { public: t_enum(t_program* program) : t_type(program) {} void set_name(std::string name) { name_ = name; } void append(t_enum_value* constant) { constants_.push_back(constant); } const std::vector& get_constants() { return constants_; } bool is_enum() const { return true; } virtual std::string get_fingerprint_material() const { return "enum"; } private: std::vector constants_; }; #endif // // DZVideoPlayerViewControllerConfiguration.h // Pods // // Created by Denis Zamataev on 15/07/15. // // #import @interface DZVideoPlayerViewControllerConfiguration : NSObject @property (assign, nonatomic) BOOL isBackgroundPlaybackEnabled; // defaults to NO @property (strong, nonatomic) NSMutableArray *viewsToHideOnIdle; // has topToolbarView and bottomToolbarView by default @property (assign, nonatomic) NSTimeInterval delayBeforeHidingViewsOnIdle; // defaults to 3 seconds @property (assign, nonatomic) BOOL isShowFullscreenExpandAndShrinkButtonsEnabled; // defaults to YES @property (assign, nonatomic) BOOL isHideControlsOnIdleEnabled; // defaults to YES @end #pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.53f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // increment that won't trigger the new-version checks, handy for minor // releases that I don't want to bother users about. //#define VERSION_SUFFIX 'b' // // wren_debug.h // wren // // Created by Bob Nystrom on 11/29/13. // Copyright (c) 2013 Bob Nystrom. All rights reserved. // #ifndef wren_wren_debug_h #define wren_wren_debug_h #include "wren_value.h" #include "wren_vm.h" void wrenDebugPrintStackTrace(WrenVM* vm, ObjFiber* fiber); int wrenDebugPrintInstruction(WrenVM* vm, ObjFn* fn, int i); void wrenDebugPrintCode(WrenVM* vm, ObjFn* fn); void wrenDebugPrintStack(ObjFiber* fiber); #endif /* * Copyright 2018-present Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include #include namespace folly { namespace detail { struct DefaultTag {}; template struct DefaultMake { struct Heap { std::unique_ptr ptr{std::make_unique()}; /* implicit */ operator T&() { return *ptr; } }; using is_returnable = StrictDisjunction< bool_constant<__cplusplus >= 201703ULL>, std::is_copy_constructible, std::is_move_constructible>; using type = std::conditional_t; T make(std::true_type) const { return T(); } Heap make(std::false_type) const { return Heap(); } type operator()() const { return make(is_returnable{}); } }; template struct TypeTuple {}; } // namespace detail } // namespace folly /* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 73 #endif #include #define LIB_BULK (USR_DIR + "/Game/lib/bulk") #define LIB_TIME (USR_DIR + "/Game/lib/time") #define GAME_LIB_OBJECT (USR_DIR + "/Game/lib/object") #define BULKD (USR_DIR + "/Game/sys/bulkd") #define SNOOPD (USR_DIR + "/Game/sys/snoopd") #define TIMED (USR_DIR + "/Game/sys/timed") #define GAME_INITD (USR_DIR + "/Game/initd") #define GAME_HELPD (USR_DIR + "/Game/sys/helpd") #define GAME_DRIVER (USR_DIR + "/Game/sys/driver") #define GAME_ROOT (USR_DIR + "/Game/sys/root") #define GAME_SUBD (USR_DIR + "/Game/sys/subd") #define GAME_TESTD (USR_DIR + "/Game/sys/testd") /* $Id$ */ /* Please see the LICENSE file for copyright and distribution information */ #ifndef __RUBY_XML_NODE__ #define __RUBY_XML_NODE__ extern VALUE cXMLNode; extern VALUE eXMLNodeSetNamespace; extern VALUE eXMLNodeFailedModify; extern VALUE eXMLNodeUnknownType; VALUE ruby_xml_node2_wrap(VALUE class, xmlNodePtr xnode); void ruby_xml_node_free(xmlNodePtr xnode); void ruby_xml_node_mark_common(xmlNodePtr xnode); void ruby_init_xml_node(void); VALUE check_string_or_symbol(VALUE val); VALUE ruby_xml_node_child_set(VALUE self, VALUE obj); VALUE ruby_xml_node_name_get(VALUE self); VALUE ruby_xml_node_property_get(VALUE self, VALUE key); VALUE ruby_xml_node_property_set(VALUE self, VALUE key, VALUE val); #endif #ifndef SCANNER_H_ #define SCANNER_H_ // I want to remove this dependecy, equivalent to yy.tab.h ? #include "parse/GENERATED/parser.hxx" #undef yyFlexLexer // ugly hack, because is wonky #include #include // Tell flex how to define lexing fn #undef YY_DECL #define YY_DECL \ int GENERATED::Scanner::lex(GENERATED::Parser::semantic_type *yylval, \ GENERATED::Parser::location_type *yylloc) namespace GENERATED { class Scanner : public yyFlexLexer { public: explicit Scanner(std::istream *in = nullptr, std::ostream *out = nullptr); int lex(GENERATED::Parser::semantic_type *yylval, GENERATED::Parser::location_type *yylloc); }; } #endif // include-guard // // NSTimeZone+Offset.h // CocoaGit // // Created by Geoffrey Garside on 28/07/2008. // Copyright 2008 ManicPanda.com. All rights reserved. // #import @interface NSTimeZone (Offset) + (id)timeZoneWithStringOffset:(NSString*)offset; - (NSString*)offsetString; @end // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null // XFAIL: * // See PR2452 struct { int *name; } syms = { L"NUL" }; /* File: connection.h * * Description: See "md.h" * * Comments: See "notice.txt" for copyright and license information. * */ #ifndef __MD5_H__ #define __MD5_H__ #include "psqlodbc.h" #include #include #ifdef WIN32 #define MD5_ODBC #define FRONTEND #endif #define MD5_PASSWD_LEN 35 /* From c.h */ #ifndef __BEOS__ #ifndef __cplusplus #ifndef bool typedef char bool; #endif #ifndef true #define true ((bool) 1) #endif #ifndef false #define false ((bool) 0) #endif #endif /* not C++ */ #endif /* __BEOS__ */ /* #if SIZEOF_UINT8 == 0 Can't get this from configure */ typedef unsigned char uint8; /* == 8 bits */ typedef unsigned short uint16; /* == 16 bits */ typedef unsigned int uint32; /* == 32 bits */ /* #endif */ extern bool EncryptMD5(const char *passwd, const char *salt, size_t salt_len, char *buf); #endif #ifndef MOLCORE_GRAPH_H #define MOLCORE_GRAPH_H #include "molcore.h" #include namespace MolCore { class MOLCORE_EXPORT Graph { public: // construction and destruction Graph(); Graph(size_t size); ~Graph(); // properties void setSize(size_t size); size_t size() const; bool isEmpty() const; void clear(); // structure size_t addVertex(); void removeVertex(size_t index); size_t vertexCount() const; void addEdge(size_t a, size_t b); void removeEdge(size_t a, size_t b); void removeEdges(); void removeEdges(size_t index); size_t edgeCount() const; const std::vector& neighbors(size_t index) const; size_t degree(size_t index) const; bool containsEdge(size_t a, size_t b) const; private: std::vector > m_adjacencyList; }; } // end MolCore namespace #endif // MOLCORE_GRAPH_H //----------------------------------------------------------------------------- // Copyright (c) 2012 GarageGames, LLC // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- #ifndef T_GL_H #define T_GL_H #include "GL/glew.h" // Slower but reliably detects extensions #define gglHasExtension(EXTENSION) glewGetExtension("GL_" # EXTENSION) #endif //------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- #pragma once #define CHAKRA_CORE_MAJOR_VERSION 1 #define CHAKRA_CORE_MINOR_VERSION 3 #define CHAKRA_CORE_VERSION_RELEASE 0 #define CHAKRA_CORE_VERSION_PRERELEASE 0 #define CHAKRA_CORE_VERSION_RELEASE_QFE 0 #define CHAKRA_VERSION_RELEASE 0 // NOTE: need to update the GUID in ByteCodeCacheReleaseFileVersion.h as well #include #include "ruby.h" #include "rubyspec.h" #ifdef __cplusplus extern "C" { #endif #ifdef HAVE_RB_PROC_NEW VALUE concat_func(VALUE args) { int i; char buffer[500] = {0}; if (TYPE(args) != T_ARRAY) return Qnil; for(i = 0; i < RARRAY_LEN(args); ++i) { VALUE v = RARRAY_PTR(args)[i]; strcat(buffer, StringValuePtr(v)); strcat(buffer, "_"); } buffer[strlen(buffer) - 1] = 0; return rb_str_new2(buffer); } VALUE sp_underline_concat_proc(VALUE self) { return rb_proc_new(concat_func, Qnil); } #endif void Init_proc_spec() { VALUE cls; cls = rb_define_class("CApiProcSpecs", rb_cObject); #ifdef HAVE_RB_PROC_NEW rb_define_method(cls, "underline_concat_proc", sp_underline_concat_proc, 0); #endif } #ifdef __cplusplus } #endif #ifndef GNOME_PROPERTIES_H #define GNOME_PROPERTIES_H #include BEGIN_GNOME_DECLS typedef struct { GtkWidget *notebook; GList *props; } GnomePropertyConfigurator; /* This is the first parameter to the callback function */ typedef enum { GNOME_PROPERTY_READ, GNOME_PROPERTY_WRITE, GNOME_PROPERTY_APPLY, GNOME_PROPERTY_SETUP } GnomePropertyRequest; GnomePropertyConfigurator *gnome_property_configurator_new (void); void gnome_property_configurator_destroy (GnomePropertyConfigurator *); void gnome_property_configurator_register (GnomePropertyConfigurator *, int (*callback)(GnomePropertyRequest)); void gnome_property_configurator_setup (GnomePropertyConfigurator *); gint gnome_property_configurator_request (GnomePropertyConfigurator *, GnomePropertyRequest); void gnome_property_configurator_request_foreach (GnomePropertyConfigurator *th, GnomePropertyRequest r); END_GNOME_DECLS #endif //===-- llvm/Assembly/CWriter.h - C Printer for LLVM programs ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // This functionality is implemented by the lib/CWriter library. This library // is used to print C language files to an iostream. // //===----------------------------------------------------------------------===// #ifndef LLVM_ASSEMBLY_CWRITER_H #define LLVM_ASSEMBLY_CWRITER_H #include namespace llvm { class Pass; Pass *createWriteToCPass(std::ostream &o); } // End llvm namespace #endif #ifndef EXPR_TOK_H #define EXPR_TOK_H extern expr_n tok_cur_num; extern enum tok { tok_ident = -1, tok_num = -2, tok_eof = 0, tok_lparen = '(', tok_rparen = ')', /* operators returned as char-value, * except for double-char ops */ /* binary */ tok_multiply = '*', tok_divide = '/', tok_modulus = '%', tok_plus = '+', tok_minus = '-', tok_xor = '^', tok_or = '|', tok_and = '&', tok_orsc = -1, tok_andsc = -2, tok_shiftl = -3, tok_shiftr = -4, /* unary - TODO */ tok_not = '!', tok_bnot = '~', /* comparison */ tok_eq = -5, tok_ne = -6, tok_le = -7, tok_lt = '<', tok_ge = -8, tok_gt = '>', /* ternary */ tok_question = '?', tok_colon = ':', #define MIN_OP -8 } tok_cur; void tok_next(void); void tok_begin(char *); const char *tok_last(void); #endif #ifndef PyMPI_CONFIG_MPICH2_H #define PyMPI_CONFIG_MPICH2_H #ifdef MS_WINDOWS #define PyMPI_MISSING_MPI_TYPE_CREATE_F90_INTEGER 1 #define PyMPI_MISSING_MPI_TYPE_CREATE_F90_REAL 1 #define PyMPI_MISSING_MPI_TYPE_CREATE_F90_COMPLEX 1 #endif #ifndef ROMIO_VERSION #include "mpich2io.h" #endif /* !ROMIO_VERSION */ #endif /* !PyMPI_CONFIG_MPICH2_H */ /* * This file is a part of Hierarchical Allocator library. * Copyright (c) 2004-2011 Alex Pankratov. All rights reserved. * * http://swapped.cc/halloc */ /* * The program is distributed under terms of BSD license. * You can obtain the copy of the license by visiting: * * http://www.opensource.org/licenses/bsd-license.php */ #ifndef _LIBP_MACROS_H_ #define _LIBP_MACROS_H_ #include /* offsetof */ /* restore pointer to the structure by a pointer to its field */ #define structof(p,t,f) ((t*)(- offsetof(t,f) + (void*)(p))) #endif #ifndef SRC_EIGEN_QDEBUG_H_ #define SRC_EIGEN_QDEBUG_H_ #include #include #include QDebug operator<<(QDebug dbg, const Eigen::Vector2f &vector) { dbg << "[" << vector.x() << "|" << vector.y() << "]"; return dbg.maybeSpace(); } QDebug operator<<(QDebug dbg, const Eigen::Vector3f &vector) { dbg << "[" << vector.x() << "|" << vector.y() << "|" << vector.z() << "]"; return dbg.maybeSpace(); } QDebug operator<<(QDebug dbg, const Eigen::Matrix4f &vector) { const Eigen::IOFormat cleanFormat(4, 0, ", ", "\n", "[", "]"); std::stringstream stream; stream << vector.format(cleanFormat); dbg << stream.str().c_str(); return dbg.maybeSpace(); } #endif // SRC_EIGEN_QDEBUG_H_ /* * Copyright (c) 2019 Carlo Caione * * SPDX-License-Identifier: Apache-2.0 */ /** * @file * @brief Full C support initialization * * Initialization of full C support: zero the .bss and call z_cstart(). * * Stack is available in this module, but not the global data/bss until their * initialization is performed. */ #include extern FUNC_NORETURN void z_cstart(void); /** * * @brief Prepare to and run C code * * This routine prepares for the execution of and runs C code. * * @return N/A */ void z_arm64_prep_c(void) { z_bss_zero(); z_arm64_interrupt_init(); z_cstart(); CODE_UNREACHABLE; } #define _XOPEN_SOURCE 4 #define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */ #define _XOPEN_VERSION 4 #define _XPG4_2 #include #include "mycrypt.h" char *mycrypt(const char *key, const char *salt) { return crypt(key, salt); } /* * rmgrdesc.c * * pg_xlogdump resource managers definition * * contrib/pg_xlogdump/rmgrdesc.c */ #define FRONTEND 1 #include "postgres.h" #include "access/clog.h" #include "access/gin.h" #include "access/gist_private.h" #include "access/hash.h" #include "access/heapam_xlog.h" #include "access/multixact.h" #include "access/nbtree.h" #include "access/rmgr.h" #include "access/spgist.h" #include "access/xact.h" #include "access/xlog_internal.h" #include "catalog/storage_xlog.h" #include "commands/dbcommands.h" #include "commands/sequence.h" #include "commands/tablespace.h" #include "rmgrdesc.h" #include "storage/standby.h" #include "utils/relmapper.h" #define PG_RMGR(symname,name,redo,desc,startup,cleanup,restartpoint) \ { name, desc, }, const RmgrDescData RmgrDescTable[RM_MAX_ID + 1] = { #include "access/rmgrlist.h" }; /* * Copyright (c) 2016 Jan Hoffmann * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #pragma once #define COLOR_WINDOW_BACKGROUND GColorWhite #define COLOR_WINDOW_FOREGROUND GColorBlack #define COLOR_WINDOW_PROGRESS_BACKGROUND PBL_IF_COLOR_ELSE(GColorLightGray,GColorWhite) #define COLOR_LAYER_PROGRESS_BACKGROUND PBL_IF_COLOR_ELSE(GColorBlack,GColorWhite) #define COLOR_LAYER_PROGRESS_FOREGROUND PBL_IF_COLOR_ELSE(GColorWhite,GColorBlack) #define COLOR_WINDOW_ERROR_BACKGROUND PBL_IF_COLOR_ELSE(GColorCobaltBlue,GColorBlack) #define COLOR_WINDOW_ERROR_FOREGROUND GColorWhite #define COLOR_MENU_NORMAL_BACKGROUND GColorWhite #define COLOR_MENU_NORMAL_FOREGROUND GColorBlack #define COLOR_MENU_HIGHLIGHT_BACKGROUND PBL_IF_COLOR_ELSE(GColorDarkGray,GColorBlack) #define COLOR_MENU_HIGHLIGHT_FOREGROUND PBL_IF_COLOR_ELSE(GColorWhite,GColorWhite) #include "euler_util.h" #include #define MAX 7 int main(int argc, char *argv[]) { float start = timeit(); char product[MAX] = { '\0' }; int high = 0; for (int x=100; x < 1000; x++) { for (int y=x; y < 1000; y++) { int canidate = x * y; size_t int_len = snprintf(product, MAX, "%d", canidate); int head = 0, tail = int_len - 1; for (;head < tail && product[head] == product[tail]; head++, tail--) ; if (head > tail && canidate > high) high = canidate; } } float stop = timeit(); printf("Answer: %d\n", high); printf("Time: %.8f\n", stop - start); return 0; } @import Foundation; #import #import #import #import #import #import extern NSString *const VENErrorDomainCore; typedef NS_ENUM(NSInteger, VENCoreErrorCode) { VENCoreErrorCodeNoDefaultCore, VENCoreErrorCodeNoAccessToken }; @interface VENCore : NSObject @property (strong, nonatomic) VENHTTP *httpClient; @property (strong, nonatomic) NSString *accessToken; /** * Sets the shared core object. * @param core The core object to share. */ + (void)setDefaultCore:(VENCore *)core; /** * Returns the shared core object. * @return A VENCore object. */ + (instancetype)defaultCore; /** * Sets the core object's access token. */ - (void)setAccessToken:(NSString *)accessToken; @end // RUN: %llvmgcc -S %s -o - -O | grep ashr // RUN: %llvmgcc -S %s -o - -O | not grep sdiv int test(int *A, int *B) { return A-B; } // Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 #include "sw/device/lib/dif/dif_pinmux.h" #include "sw/device/lib/dif/dif_base.h" #include "pinmux_regs.h" // Generated. // This just exists to check that the header compiles for now. The actual // implementation is work in progress. // // LVTFolder.h // LayerVaultAPIClient // // Created by Matt Thomas on 12/4/13. // Copyright (c) 2013 codecaffeine. All rights reserved. // #import #import "LVTColor.h" @interface LVTFolder : MTLModel @property (readonly, nonatomic, copy) NSString *name; @property (nonatomic) LVTColorLabel colorLabel; @property (readonly, nonatomic, copy) NSString *path; @property (readonly, nonatomic, copy) NSURL *fileURL; @property (readonly, nonatomic) NSDate *dateUpdated; @property (readonly, nonatomic) NSDate *dateDeleted; @property (readonly, nonatomic, copy) NSString *md5; @property (readonly, nonatomic, copy) NSURL *url; @property (readonly, nonatomic, copy) NSURL *shortURL; @property (readonly, nonatomic, copy) NSString *organizationPermalink; @property (readonly, nonatomic, copy) NSArray *folders; @property (readonly, nonatomic, copy) NSArray *files; @end int foo(int a, int b, int c) { int arr[5] = { 1, 2, 3, 4, 5 }; int d = 4; int *p = &d; return a + b + c + arr[4] + arr[0] + *p; } int main() { int a, b, c; a = 2; b = 1; c = 3; int d = 4; int *p = &d; int i; for (i = 0; i < 1234567; i++) { *p = foo(a, b, c); } return *p; } /** * @file WidgetTimeInput.h * @author Volodymyr Shymanskyy * @license This project is released under the MIT License (MIT) * @copyright Copyright (c) 2015 Volodymyr Shymanskyy * @date Aug 2016 * @brief * */ #ifndef WidgetTimeInput_h #define WidgetTimeInput_h #include #include class TimeInputParam { public: TimeInputParam(const BlynkParam& param) : mStart (param[0].asLong()) , mStop (param[1].asLong()) { mTZ = param[2].asLong(); } BlynkDateTime& getStart() { return mStart; } BlynkDateTime& getStop() { return mStop; } long getTZ() const { return mTZ; } private: BlynkDateTime mStart; BlynkDateTime mStop; long mTZ; }; #endif #define _XOPEN_SOURCE 500 /* mkstemp */ #include #include #include "tmpfile.h" #include "alloc.h" int tmpfile_prefix_out(const char *prefix, char **const fname) { char *tmppath; int fd; char *tmpdir = getenv("TMPDIR"); #ifdef P_tmpdir if(!tmpdir) tmpdir = P_tmpdir; #endif if(!tmpdir) tmpdir = "/tmp"; tmppath = ustrprintf("%s/%sXXXXXX", tmpdir, prefix); fd = mkstemp(tmppath); if(fd < 0){ free(tmppath); tmppath = NULL; } if(fname) *fname = tmppath; else free(tmppath); return fd; } // The MIT License (MIT) // // Copyright (c) 2014-present James Ide // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. void objc_synchronized(id object, __attribute__((noescape)) void (^closure)()); // Filename: audio.h // Created by: frang (06Jul00) // //////////////////////////////////////////////////////////////////// // // PANDA 3D SOFTWARE // Copyright (c) Carnegie Mellon University. All rights reserved. // // All use of this software is subject to the terms of the revised BSD // license. You should have received a copy of this license along // with this source code in a file named "LICENSE." // //////////////////////////////////////////////////////////////////// #ifndef __AUDIO_H__ #define __AUDIO_H__ #include "filterProperties.h" #include "audioSound.h" #include "audioManager.h" #endif /* __AUDIO_H__ */ // // NSTimeZone+Offset.h // CocoaGit // // Created by Geoffrey Garside on 28/07/2008. // Copyright 2008 ManicPanda.com. All rights reserved. // #import @interface NSTimeZone (Offset) + (id)timeZoneWithStringOffset:(NSString*)offset; - (NSString*)offsetString; @end /* Copyright libCellML Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #pragma once #include #include "test_exportdefinitions.h" std::string TEST_EXPORT resourcePath(const std::string &resourceRelativePath = ""); std::string TEST_EXPORT fileContents(const std::string &fileName); void TEST_EXPORT printErrors(const libcellml::Validator &v); void TEST_EXPORT printErrors(const libcellml::Parser &p); void TEST_EXPORT expectEqualErrors(const std::vector &errors, const libcellml::Logger &logger); libcellml::ModelPtr TEST_EXPORT createModel(const std::string &name = ""); libcellml::ModelPtr TEST_EXPORT createModelWithComponent(const std::string &name = ""); #define EXPECT_EQ_ERRORS(errors, logger) SCOPED_TRACE("Error occured here");expectEqualErrors(errors, logger) #include #include #ifdef WIN32 #define DLLEXPORT __declspec(dllexport) #else #define DLLEXPORT extern #endif DLLEXPORT void * ReturnSomePointer() { char *x = "Got passed back the pointer I returned"; return x; } DLLEXPORT int CompareSomePointer(void *ptr) { int x = strcmp("Got passed back the pointer I returned", ptr) == 0; return x; } DLLEXPORT void * ReturnNullPointer() { return NULL; } DLLEXPORT void * TakeTwoPointersToInt(int *ptr1, int *ptr2) { return NULL; } DLLEXPORT void * TakeCArrayToInt8(int array[]) { return NULL; } #include #include "bincookie.h" int main(int argc, char *argv[]) { if (argc != 2) { printf("Usage: %s [Full path to Cookies.binarycookies file]\n", argv[0]); printf("Example: %s Cookies.binarycookies\n", argv[0]); return 1; } binarycookies_t *bc = binarycookies_init(argv[1]); unsigned int i, j; // Output in Netscape cookies.txt format for (i = 0; i < bc->num_pages; i++) { for (j = 0; j < bc->pages[i]->number_of_cookies; j++) { // domain, flag, path, secure, expiration, name, value printf("%s\t%s\t%s\t%s\t%.f\t%s\t%s\n", bc->pages[i]->cookies[j]->domain, bc->pages[i]->cookies[j]->domain[0] == '.' ? "TRUE" : "FALSE", bc->pages[i]->cookies[j]->path, binarycookies_is_secure(bc->pages[i]->cookies[j]) ? "TRUE" : "FALSE", bc->pages[i]->cookies[j]->expiration_date, bc->pages[i]->cookies[j]->name, bc->pages[i]->cookies[j]->value); } } binarycookies_free(bc); return 0; } // // The MIT License (MIT) // // Copyright (c) 2015 Stefano Falda (stefano.falda@gmail.com) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #import #import #import "RCTBridgeModule.h" #import "RCTLog.h" @interface ReactLocalization : NSObject @end // REQUIRES: nozlib // RUN: %clang -### -fintegrated-as -gz -c %s 2>&1 | FileCheck %s -check-prefix CHECK-WARN // RUN: %clang -### -fintegrated-as -gz=none -c %s 2>&1 | FileCheck -allow-empty -check-prefix CHECK-NOWARN %s // CHECK-WARN: warning: cannot compress debug sections (zlib not installed) // CHECK-NOWARN-NOT: warning: cannot compress debug sections (zlib not installed) // @(#)root/sqlite:$Id$ // Author: o.freyermuth , 01/06/2013 /************************************************************************* * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_TPgSQLRow #define ROOT_TPgSQLRow #ifndef ROOT_TSQLRow #include "TSQLRow.h" #endif #if !defined(__CINT__) #include #else struct sqlite3_stmt; #endif class TSQLiteRow : public TSQLRow { private: sqlite3_stmt *fResult; // current result set Bool_t IsValid(Int_t field); public: TSQLiteRow(void *result, ULong_t rowHandle); ~TSQLiteRow(); void Close(Option_t *opt=""); ULong_t GetFieldLength(Int_t field); const char *GetField(Int_t field); ClassDef(TSQLiteRow,0) // One row of SQLite query result }; #endif /* * Copyright 2010 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkTextFormatParams_DEFINES #define SkTextFormatParams_DEFINES #include "include/core/SkScalar.h" #include "include/core/SkTypes.h" // Fraction of the text size to lower a strike through line below the baseline. #define kStdStrikeThru_Offset (-SK_Scalar1 * 6 / 21) // Fraction of the text size to lower a underline below the baseline. #define kStdUnderline_Offset (SK_Scalar1 / 9) // Fraction of the text size to use for a strike through or under-line. #define kStdUnderline_Thickness (SK_Scalar1 / 18) // The fraction of text size to embolden fake bold text scales with text size. // At 9 points or below, the stroke width is increased by text size / 24. // At 36 points and above, it is increased by text size / 32. In between, // it is interpolated between those values. static const SkScalar kStdFakeBoldInterpKeys[] = { SK_Scalar1*9, SK_Scalar1*36, }; static const SkScalar kStdFakeBoldInterpValues[] = { SK_Scalar1/24, SK_Scalar1/32, }; static_assert(SK_ARRAY_COUNT(kStdFakeBoldInterpKeys) == SK_ARRAY_COUNT(kStdFakeBoldInterpValues), "mismatched_array_size"); static const int kStdFakeBoldInterpLength = SK_ARRAY_COUNT(kStdFakeBoldInterpKeys); #endif //SkTextFormatParams_DEFINES #include #include "aes.h" int main(int argc, char **argv) { aes_init(); return 0; } /* * Game.h * * Created on: 30.12.2016 * Author: Stefan */ #include "Deck.h" #include "Dealer.h" #include #include "GlobalDeclarations.h" #include "PlayerStrategy.h" #ifndef GAME_H_ #define GAME_H_ // Class game is the glue code which binds all other classes together. // It guides the game. class Game { using pPlayer = std::unique_ptr; public: Game () : _deck(), _dealer(_deck), _players() {} // Not allowed to copy or assign game Game(Game const &) = delete ; void operator=(Game const&) = delete; void AddDecks(); void PlayRound(); void GetStartCards(); void PlayCards(); void Evaluate(); void PutCardsBack(); void RemoveBrokePlayers(); void PrintNumPlayers () const; virtual void SetWagers() = 0; virtual bool PlayAnotherRound () const = 0; protected: virtual ~Game(){}; // Not allowed to polymorphic delete derivatives Deck _deck; Dealer _dealer; // Players are pointers to avoid issues with card pointers std::vector _players; }; #endif /* GAME_H_ */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include const std::string BotVersion ("3.0.0-devel"); const unsigned int BotVersionNum = 2800;// // os/winapi/alloc.h: Low-level WinAPI-based allocators. // // CEN64: Cycle-Accurate Nintendo 64 Simulator. // Copyright (C) 2014, Tyler J. Stachecki. // // This file is subject to the terms and conditions defined in // 'LICENSE', which is part of this source code package. // #include "common.h" #include "os/common/alloc.h" #include #include // Allocates a block of (R/W/X) memory. void *cen64_alloc(struct cen64_mem *m, size_t size, bool exec) { int access = exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE; if ((m->ptr = VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, access)) == NULL) return NULL; m->size = size; return m->ptr; } // Releases resources acquired by cen64_alloc_init. void cen64_alloc_cleanup(void) { } // Initializes CEN64's low-level allocator. int cen64_alloc_init(void) { return 0; } // Releases resources acquired by cen64_alloc. void cen64_free(struct cen64_mem *m) { VirtualFree(m->ptr, m->size, MEM_RELEASE); } // // UIView+Sizing.h // aaah // // Created by Stanislaw Pankevich on 5/10/13. // Copyright (c) 2013 IProjecting. All rights reserved. // #import @interface UIView (Sizing) @property CGPoint origin; @property CGSize size; @property CGFloat x; @property CGFloat y; @property CGFloat height; @property CGFloat width; @property CGFloat centerX; @property CGFloat centerY; @end /** @file @brief Header @date 2014 @author Ryan Pavlik */ // Copyright 2014 Sensics, Inc. // // All rights reserved. // // (Final version intended to be licensed under // the Apache License, Version 2.0) #ifndef INCLUDED_ServerPtr_h_GUID_ED06F093_FC19_49B1_8905_16E7CE12D207 #define INCLUDED_ServerPtr_h_GUID_ED06F093_FC19_49B1_8905_16E7CE12D207 // Internal Includes #include // Library/third-party includes // - none // Standard includes // - none namespace osvr { namespace server { class Server; /// @brief How one should hold a Server. typedef shared_ptr ServerPtr; } // namespace server } // namespace osvr #endif // INCLUDED_ServerPtr_h_GUID_ED06F093_FC19_49B1_8905_16E7CE12D207 // library.h // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // // ----------------------------------------------------------------------------- // From swift's include/swift/Runtime/Debug.h file. struct RuntimeErrorDetails { uintptr_t version; const char *errorType; const char *currentStackDescription; uintptr_t framesToSkip; void *memoryAddress; struct Thread { const char *description; uint64_t threadID; uintptr_t numFrames; void **frames; }; uintptr_t numExtraThreads; Thread *threads; struct FixIt { const char *filename; uintptr_t startLine; uintptr_t startColumn; uintptr_t endLine; uintptr_t endColumn; const char *replacementText; }; struct Note { const char *description; uintptr_t numFixIts; FixIt *fixIts; }; uintptr_t numFixIts; FixIt *fixIts; uintptr_t numNotes; Note *notes; }; enum: uintptr_t { RuntimeErrorFlagNone = 0, RuntimeErrorFlagFatal = 1 << 0 }; extern "C" void _swift_runtime_on_report(uintptr_t flags, const char *message, RuntimeErrorDetails *details); #pragma once #include #include "System.h" class Renderer : public System { protected: uint16_t width = 1280; uint16_t height = 720; Decimal fovPlus = glm::radians(10.0f); Decimal zNear = 0.05f; Decimal zFar = 48.0f; Decimal pixelDistanceFromScreen = 1000.0f; public: bool showFPS = false; uint32_t time = 0; static bool IsSupported() { return false; } Renderer(Polar *engine) : System(engine) {} virtual void MakePipeline(const boost::container::vector &) = 0; virtual void SetClearColor(const Point4 &) = 0; virtual Decimal GetUniformDecimal(const std::string &, const Decimal = 0) = 0; virtual Point3 GetUniformPoint3(const std::string &, const Point3 = Point3(0)) = 0; virtual void SetUniform(const std::string &, glm::uint32) = 0; virtual void SetUniform(const std::string &, Decimal) = 0; virtual void SetUniform(const std::string &, Point3) = 0; }; #include "../small1/testharness.h" // NUMERRORS 1 struct foo { int a[8]; int *b; } gfoo; struct bar { int a[8]; int *b; }; int main() { int * __INDEX p = & gfoo.a[2]; // Force gfoo.a to have a length // This should be Ok, but pbar->b is gfoo.a[7] struct bar *pbar = (struct bar*)&gfoo; gfoo.a[7] = 5; pbar->b = 0; printf("Pointer is %lx\n", (unsigned long)pbar->b); *(pbar->b) = 0; //ERROR(1): Null SUCCESS; } //Basic master parser extern uint8_t MODBUSParseResponseBasic( union MODBUSParser * ); // Test coverage flag. // // RUN: %clang_cl -### -coverage %s -o foo/bar.o 2>&1 | FileCheck -check-prefix=CLANG-CL-COVERAGE %s // CLANG-CL-COVERAGE-NOT: error: // CLANG-CL-COVERAGE-NOT: warning: // CLANG-CL-COVERAGE-NOT: argument unused // CLANG-CL-COVERAGE-NOT: unknown argument /** * @file arch/alpha/oprofile/op_impl.h * * @remark Copyright 2002 OProfile authors * @remark Read the file COPYING * * @author Richard Henderson */ #ifndef OP_IMPL_H #define OP_IMPL_H 1 struct pt_regs; extern int null_perf_irq(void); extern int (*perf_irq)(void); /* Per-counter configuration as set via oprofilefs. */ struct op_counter_config { unsigned long enabled; unsigned long event; unsigned long count; /* Dummies because I am too lazy to hack the userspace tools. */ unsigned long kernel; unsigned long user; unsigned long exl; unsigned long unit_mask; }; /* Per-architecture configury and hooks. */ struct op_mips_model { void (*reg_setup) (struct op_counter_config *); void (*cpu_setup) (void * dummy); int (*init)(void); void (*exit)(void); void (*cpu_start)(void *args); void (*cpu_stop)(void *args); char *cpu_type; unsigned char num_counters; }; #endif #ifndef ALI_DECAYER__H #define ALI_DECAYER__H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ #include "RVersion.h" #include "TVirtualMCDecayer.h" typedef TVirtualMCDecayer AliDecayer; #if ROOT_VERSION_CODE >= 197633 //Corresponds to Root v3-04-01 typedef enum { kSemiElectronic, kDiElectron, kSemiMuonic, kDiMuon, kBJpsiDiMuon, kBJpsiDiElectron, kBPsiPrimeDiMuon, kBPsiPrimeDiElectron, kPiToMu, kKaToMu, kNoDecay, kHadronicD, kOmega, kPhiKK, kAll, kNoDecayHeavy, kHardMuons, kBJpsi, kWToMuon,kWToCharm, kWToCharmToMuon } Decay_t; #endif #endif //ALI_DECAYER__H /** * \file inet_ntop * inet_ntop emulation based on inet_ntoa. * \author Matthias Andree * */ #include "config.h" #ifndef HAVE_INET_NTOP #include "leafnode.h" #include "mastring.h" #include #include #include #include #include #ifdef WITH_DMALLOC #include #endif #include const char * inet_ntop(int af, const void *s, char *dst, int x) { switch (af) { case AF_INET: mastrncpy(dst, inet_ntoa(*(const struct in_addr *)s), x); return dst; break; default: errno = EINVAL; return 0; break; } } #endif // // UIKitCategory.h // WWCategory // // Created by ww on 2016. 1. 10.. // Copyright © 2016년 Won Woo Choi. All rights reserved. // #import "UIApplication+Keyboard.h" #import "UIBezierPath+Drawing.h" #import "UIColor+CreateColor.h" #import "UIImage+CreateImage.h" #import "UIImage+ImageProcessing.h" #import "UIImageView+CreateImageView.h" #import "UIScreen+Size.h" #import "UIStoryboard+GetInstance.h" #import "UITextField+Color.h" #import "UIView+Capture.h" #import "UIView+Rounding.h" // Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef NINJA_UTIL_H_ #define NINJA_UTIL_H_ #pragma once #include // Dump a backtrace to stderr. // |skip_frames| is how many frames to skip; // DumpBacktrace implicitly skips itself already. void DumpBacktrace(int skip_frames); // Log a fatal message, dump a backtrace, and exit. void Fatal(const char* msg, ...); // Canonicalize a path like "foo/../bar.h" into just "bar.h". bool CanonicalizePath(std::string* path, std::string* err); #endif // NINJA_UTIL_H_ #include #include #include "vendor/simclist.h" #ifndef BUZZLOCK_H_ #define BUZZLOCK_H_ #define BZZ_BLACK 1 #define BZZ_GOLD 0 typedef int useconds_t; typedef struct { pid_t id; int color; double waiting_since; } bzz_thread_t; typedef struct { pthread_mutex_t mutex; pthread_cond_t cond; int max_active_threads; int active_threads; useconds_t timeout; list_t threads; list_t waiting_gold_threads; list_t waiting_black_threads; } bzz_t; #include "buzz.h" void* get_thread(int, bzz_t); int full_active_threads(bzz_t); int is_black(bzz_thread_t*); int is_gold(bzz_thread_t*); int is_old(bzz_thread_t*, bzz_t); void add_to_waiting_threads(bzz_thread_t*, bzz_t); void wait(bzz_t); double time_with_usec(); unsigned int num_black_waiting(bzz_t); unsigned int num_gold_waiting(bzz_t); unsigned int num_old_gold_waiting(bzz_t); void add_active(bzz_thread_t*, bzz_t); #endif #include #include #include #include #include "cbor.h" #ifndef ASSERTIONS_H_ #define ASSERTIONS_H_ void assert_uint8(cbor_item_t* item, uint8_t num); void assert_uint16(cbor_item_t* item, uint16_t num); void assert_uint32(cbor_item_t* item, uint32_t num); void assert_uint64(cbor_item_t* item, uint64_t num); void assert_decoder_result(size_t, enum cbor_decoder_status, struct cbor_decoder_result); // TODO: Docs void assert_decoder_result_nedata(size_t, struct cbor_decoder_result); /** * Check that the streaming decoder will returns a correct CBOR_DECODER_NEDATA * result for all inputs from data[0..1] through data[0..(expected-1)]. */ void assert_minimum_input_size(size_t expected, cbor_data data); #endif #include #include #include #include #include "wclock.h" #ifdef _WIN32 # include static unsigned int sleep(unsigned int x) { Sleep(x * 1000); return 0; } #else # include #endif int main(void) { double res, t1, t2; wclock clock; if (wclock_init(&clock)) { abort(); } res = wclock_get_res(&clock); printf("%.17g\n", res); assert(res > 0); assert(res < 2e-3); /* presumably the clock has at least ms precision! */ t1 = wclock_get(&clock); printf("%.17g\n", t1); sleep(1); t2 = wclock_get(&clock); printf("%.17g\n", t2); printf("%.17g\n", t2 - t1); assert(fabs(t2 - t1 - 1.) < 1e-1); return 0; } #ifndef __GTK_COMPAT_H__ #define __GTK_COMPAT_H__ #include /* Provide a compatibility layer for accessor functions introduced * in GTK+ 2.21.1 which we need to build with sealed GDK. * That way it is still possible to build with GTK+ 2.20. */ #if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 21) \ || (GTK_MINOR_VERSION == 21 && GTK_MICRO_VERSION < 1) #define gdk_drag_context_get_actions(context) (context)->actions #define gdk_drag_context_get_suggested_action(context) (context)->suggested_action #define gdk_drag_context_get_selected_action(context) (context)->action #endif #if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION == 21 && GTK_MICRO_VERSION == 1 #define gdk_drag_context_get_selected_action(context) gdk_drag_context_get_action(context) #endif #endif /* __GTK_COMPAT_H__ */ // This is a queue that can be accessed from multiple threads safely. // // It's not well optimized, and requires obtaining a lock every time you check for a new value. #pragma once #include #include #include #include template class SynchronizedQueue { std::condition_variable cv_; std::mutex lock_; std::queue q_; public: void push(T && t) { std::unique_lock l(lock_); q_.push(std::move(t)); cv_.notify_one(); } std::optional get() { std::unique_lock l(lock_); if(q_.empty()) { return std::nullopt; } T t = std::move(q_.front()); q_.pop(); return t; } T get_blocking() { std::unique_lock l(lock_); while(q_.empty()) { cv_.wait(l); } T t = std::move(q_.front()); q_.pop(); return std::move(t); } };// // Created by Borin Ouch on 2016-03-22. // #ifndef SFML_TEST_GAME_STATE_H #define SFML_TEST_GAME_STATE_H #include "game.h" class GameState { public: Game* game; virtual void draw(const float dt) = 0; virtual void update(const float dt) = 0; virtual void handleInput() = 0; }; #endif //SFML_TEST_GAME_STATE_H /* Copyright (c) 2012 Curtis Hard - GeekyGoodness */ /* Modified by Denis Zamataev. 2014 */ #import #import #import "DZReadability_constants.h" typedef void (^GGReadabilityParserCompletionHandler)( NSString * content ); typedef void (^GGReadabilityParserErrorHandler)( NSError * error ); @interface GGReadabilityParser : NSObject { float loadProgress; @private GGReadabilityParserErrorHandler errorHandler; GGReadabilityParserCompletionHandler completionHandler; GGReadabilityParserOptions options; NSURL * URL; NSURL * baseURL; long long dataLength; NSMutableData * responseData; NSURLConnection * URLConnection; NSURLResponse * URLResponse; } @property ( nonatomic, assign ) float loadProgress; - (id)initWithOptions:(GGReadabilityParserOptions)parserOptions; - (id)initWithURL:(NSURL *)aURL options:(GGReadabilityParserOptions)parserOptions completionHandler:(GGReadabilityParserCompletionHandler)cHandler errorHandler:(GGReadabilityParserErrorHandler)eHandler; - (void)cancel; - (void)render; - (void)renderWithString:(NSString *)string; - (HTMLElement *)processXMLDocument:(HTMLDocument *)XML baseURL:(NSURL *)theBaseURL error:(NSError **)error; @end#include #include #include "obc.h" #include "system.h" #include "terminal.h" void I2CTestCommandHandler(uint16_t argc, char* argv[]) { UNREFERENCED_PARAMETER(argc); I2CBus* bus; if (strcmp(argv[0], "system") == 0) { bus = Main.I2C.System; } else if (strcmp(argv[0], "payload") == 0) { bus = Main.I2C.Payload; } else { TerminalPuts("Unknown bus\n"); } const uint8_t device = (uint8_t)atoi(argv[1]); const uint8_t* data = (uint8_t*)argv[2]; const size_t dataLength = strlen(argv[2]); uint8_t output[20] = {0}; size_t outputLength = dataLength; const I2CResult result = bus->WriteRead(bus, device, data, dataLength, output, outputLength); if (result == I2CResultOK) { TerminalPuts((char*)output); } else { TerminalPrintf("Error %d\n", result); } } #ifndef DEBUGGER_H #define DEBUGGER_H enum DebuggerState { DEBUGGER_PAUSED, DEBUGGER_RUNNING, DEBUGGER_EXITING }; struct ARMDebugger { enum DebuggerState state; struct ARMCore* cpu; char* lastCommand; }; void ARMDebuggerInit(struct ARMDebugger*, struct ARMCore*); void ARMDebuggerRun(struct ARMDebugger*); void ARMDebuggerEnter(struct ARMDebugger*); #endif N��s�㟜���// |�������$*(*(y(�+5/�1�287:�>�BwH�J�J�J�M�M�P�S�S�V$W Z\g^Bb7e�i�i�j�l�n\phuhuPv�xmz | }[[@�@�<������e�e���������������y�M���4�4�����̿Y���?�������1�#�#�����R��z�z�z�����������_�_�����4��ee� U ��33���!C%�(�(�)�)�)�+�+P.�2y7�:|< ? ? ?�@B�FwH�K�N�RHS T�U�UEW+Y�[�[�]/`/`/`pdpdpdpdpd�gjj�kznpps�vd{�}��=���B�B�b��l������Q�Q�~�~���x�-�H����9�9���H���~�~���~�b�b�������W�W�������Z�������������������������������� � _ _ U YY�<<<XX�7��!##&�'�'')--W0�2�4�:�;�?�@�A�E�I�M�MQQ$R�T�T�U�X�['`c�c�hij�mfoss7v�x�{-}D�̀T�;�����ˎ�������L�V���נ���3��������(�6���������)�����i�f�����s��S�$�s�s�4�i�a��� � ���������f����* � � ^oo�����#f$x)x)H+,M/|3 507:Q:z<@?C�G�KAN[N�RGSVV�X�Ym\�]Q`�cVhVh�j`k�oJp�r�u�u�w�|x���d�������� �/�/�����T�������d�����������������ս��v�%�������������=�=�=�����������8��������1���������~�~��#include "safe-memory.h" #include #include #include void* safe_malloc_function(size_t size, const char* calling_function) { void* memory = malloc(size); if (!memory) { fprintf(stderr, "Error: not enough memory for malloc in function: %s", calling_function); exit(EXIT_FAILURE); } memset(memory, 0, size); return memory; } // // DAKeyboardControl.h // DAKeyboardControlExample // // Created by Daniel Amitay on 7/14/12. // Copyright (c) 2012 Daniel Amitay. All rights reserved. // #import typedef void (^DAKeyboardDidMoveBlock)(CGRect keyboardFrameInView); @interface UIView (DAKeyboardControl) @property (nonatomic) CGFloat keyboardTriggerOffset; @property (nonatomic, readonly) BOOL keyboardWillRecede; - (void)addKeyboardPanningWithActionHandler:(DAKeyboardDidMoveBlock)didMoveBlock; - (void)addKeyboardNonpanningWithActionHandler:(DAKeyboardDidMoveBlock)didMoveBlock; - (void)removeKeyboardControl; - (CGRect)keyboardFrameInView; - (void)hideKeyboard; @end /* Copyright 2015 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* Memory mapping */ #define CONFIG_FLASH_SIZE (64 * 1024) #define CONFIG_FLASH_BANK_SIZE 0x1000 #define CONFIG_FLASH_ERASE_SIZE 0x0800 /* erase bank size */ #define CONFIG_FLASH_WRITE_SIZE 0x0002 /* minimum write size */ /* No page mode on STM32F, so no benefit to larger write sizes */ #define CONFIG_FLASH_WRITE_IDEAL_SIZE 0x0002 #define CONFIG_RAM_BASE 0x20000000 #define CONFIG_RAM_SIZE 0x00002000 /* Number of IRQ vectors on the NVIC */ #define CONFIG_IRQ_COUNT 32 /* Reduced history because of limited RAM */ #undef CONFIG_CONSOLE_HISTORY #define CONFIG_CONSOLE_HISTORY 3 /* Copyright 2016 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_CORE_DISTRIBUTED_RUNTIME_RPC_GRPC_REMOTE_WORKER_H_ #define TENSORFLOW_CORE_DISTRIBUTED_RUNTIME_RPC_GRPC_REMOTE_WORKER_H_ #include #include "tensorflow/core/distributed_runtime/rpc/grpc_util.h" #include "tensorflow/core/lib/core/threadpool.h" namespace grpc { class CompletionQueue; } namespace tensorflow { class WorkerCacheLogger; class WorkerInterface; WorkerInterface* NewGrpcRemoteWorker(SharedGrpcChannelPtr channel, ::grpc::CompletionQueue* completion_queue, thread::ThreadPool* callback_threadpool, WorkerCacheLogger* logger); } // namespace tensorflow #endif // TENSORFLOW_CORE_DISTRIBUTED_RUNTIME_RPC_GRPC_REMOTE_WORKER_H_ /* * QLogic Fibre Channel HBA Driver * Copyright (c) 2003-2005 QLogic Corporation * * See LICENSE.qla2xxx for copyright and licensing details. */ /* * Driver version */ #define QLA2XXX_VERSION "8.01.07-k6" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 1 #define QLA_DRIVER_PATCH_VER 7 #define QLA_DRIVER_BETA_VER 0 #include /* * Include test files below */ typedef Suite* (*suite_creator_f)(void); int main(void) { int nfailed = 0; Suite* s; SRunner* sr; suite_creator_f iter; /* * Insert suite creator functions here */ suite_creator_f suite_funcs[] = { NULL; }; for (iter = suite_funcs[0]; *iter, iter++) { s = iter(); sr = srunner_create(s); srunner_run_all(sr, CK_NORMAL); nfailed += srunner_ntests_failed(sr); srunner_free(sr); } return (nfailed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } #include void qsort(void *ptr, size_t count, size_t size, int (*comp)(const void*, const void*)) { // call all possible compares first, before invalidating array elements for (size_t i = 0; i < count; i++) { for (size_t j = 0; j < count; j++) { comp(ptr + i * size, ptr + j * size); } } // randomly swap all possible, invalidates array elements for (size_t i = 0; i < count; i++) { for (size_t j = 0; j < count; j++) { int r; // rand if (r) { // swap elements byte-by-byte, no other way to do it, because we cannot allocate and copy/swap abstract elements for (size_t k = 0; k < size; k++) { char *a = ptr + i * size + k; char *b = ptr + j * size + k; char c = *a; *a = *b; *b = c; } } } } // array isn't actually sorted! just pretent calls for Goblint } #include "custom-type.h" #include "cmd.h" #include "common.h" #include #include #include void custom_type_reply(redisAsyncContext *c, void *r, void *privdata) { redisReply *reply = r; struct cmd *cmd = privdata; (void)c; if(reply == NULL) { evhttp_send_reply(cmd->rq, 404, "Not Found", NULL); return; } if(cmd->mime) { /* use the given content-type, but only for strings */ switch(reply->type) { case REDIS_REPLY_NIL: /* or nil values */ format_send_reply(cmd, "", 0, cmd->mime); return; case REDIS_REPLY_STRING: format_send_reply(cmd, reply->str, reply->len, cmd->mime); return; } } /* couldn't make sense of what the client wanted. */ evhttp_send_reply(cmd->rq, 400, "Bad request", NULL); cmd_free(cmd); } /* trace.h * Copyright: (When this is determined...it will go here) * CVS Info * $Id$ * Overview: * Tracing support for runops_cores.c. * Data Structure and Algorithms: * History: * Notes: * References: */ #ifndef PARROT_TRACE_H_GUARD #define PARROT_TRACE_H_GUARD #include "parrot/parrot.h" void trace_op_dump(struct Parrot_Interp *interpreter, opcode_t *code_start, opcode_t *pc); void trace_op(struct Parrot_Interp *interpreter, opcode_t *code_start, opcode_t *code_end, opcode_t *pc); void trace_op_b0(struct Parrot_Interp *interpreter, opcode_t *code_start, opcode_t *pc); void trace_op_b1(struct Parrot_Interp *interpreter, opcode_t *code_start, opcode_t *code_end, code_t *pc); #endif /* * Local variables: * c-indentation-style: bsd * c-basic-offset: 4 * indent-tabs-mode: nil * End: * * vim: expandtab shiftwidth=4: */ #include #include "utils/random.h" // A simple psuedorandom number generator static struct random_t rand_state = { 1 }; void random_seed(struct random_t *r, uint32_t seed) { r->seed = seed; } uint32_t random_get_seed(struct random_t *r) { return r->seed; } uint32_t random_int(struct random_t *r, uint32_t upperbound) { return random_intmax(r) % upperbound; } uint32_t random_intmax(struct random_t *r) { r->seed = r->seed * 1664525 + 1013904223; return r->seed; } float random_float(struct random_t *r) { return (float)random_intmax(r) / UINT_MAX; } void rand_seed(uint32_t seed) { random_seed(&rand_state, seed); } uint32_t rand_get_seed(void) { return random_get_seed(&rand_state); } uint32_t rand_int(uint32_t upperbound) { return random_int(&rand_state, upperbound); } uint32_t rand_intmax(void) { return random_intmax(&rand_state); } float rand_float(void) { return random_float(&rand_state); } #import typedef NS_ENUM (NSInteger, WMFWKScriptMessageType) { WMFWKScriptMessagePeek, WMFWKScriptMessageConsoleMessage, WMFWKScriptMessageClickLink, WMFWKScriptMessageClickImage, WMFWKScriptMessageClickReference, WMFWKScriptMessageClickEdit, WMFWKScriptMessageNonAnchorTouchEndedWithoutDragging, WMFWKScriptMessageLateJavascriptTransform, WMFWKScriptMessageArticleState, WMFWKScriptMessageUnknown }; @interface WKScriptMessage (WMFScriptMessage) + (WMFWKScriptMessageType)wmf_typeForMessageName:(NSString*)name; + (Class)wmf_expectedMessageBodyClassForType:(WMFWKScriptMessageType)type; @end /* $FreeBSD$ */ static int ___fake_library___; #pragma once #include #include struct Customer { int id; std::string name; }; inline std::ostream& operator<<(std::ostream& os, const Customer& obj) { os << "Customer (id: " << obj.id << ", name: " << obj.name << ")"; return os; }// RUN: %clangxx_asan -std=c++11 -O0 %s -o %t // RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=READ // RUN: not %run %t write 2>&1 | FileCheck %s --check-prefix=WRITE // REQUIRES: x86-target-arch #include static volatile int sink; __attribute__((noinline)) void Read(int *ptr) { sink = *ptr; } __attribute__((noinline)) void Write(int *ptr) { *ptr = 0; } int main(int argc, char **argv) { // Writes to shadow are detected as reads from shadow gap (because of how the // shadow mapping works). This is kinda hard to fix. Test a random address in // the application part of the address space. void *volatile p = mmap(nullptr, 4096, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); munmap(p, 4096); if (argc == 1) Read((int *)p); else Write((int *)p); } // READ: AddressSanitizer: SEGV on unknown address // READ: The signal is caused by a READ memory access. // WRITE: AddressSanitizer: SEGV on unknown address // WRITE: The signal is caused by a WRITE memory access. // // Use this file to import your target's public headers that you would like to expose to Swift. // #import "STKAudioPlayer.h" /** * Copyright (c) 2015, Chao Wang * * md5 hash function. */ /* * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc. * MD5 Message-Digest Algorithm (RFC 1321). * * Homepage: http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5 * * Author: Alexander Peslyak, better known as Solar Designer */ #ifndef _CW_MD5_H #define _CW_MD5_H 1 #if defined(__cplusplus) extern "C" { #endif void md5_signature(unsigned char *key, unsigned long length, unsigned char *result); uint32_t hash_md5(const char *key, size_t key_length); #if defined(__cplusplus) } #endif #endif #pragma once #include #include namespace dev { namespace eth { class JitVM: public VMFace { public: virtual bytesConstRef execImpl(u256& io_gas, ExtVMFace& _ext, OnOpFunc const& _onOp = {}, uint64_t _steps = (uint64_t)-1) override final; private: jit::RuntimeData m_data; jit::ExecutionEngine m_engine; std::unique_ptr m_fallbackVM; ///< VM used in case of input data rejected by JIT }; } } #ifndef __TYPES_H__ #define __TYPES_H__ typedef long off_t; typedef unsigned long size_t; typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef int mode_t; typedef unsigned long clockid_t; typedef int pid_t; #ifndef NULL #define NULL (0) #endif #define __u_char_defined #endif // Copyright 2014 Tanel Lebedev #ifndef SRC_EXPLICIT_SCOPED_LOCK_H_ #define SRC_EXPLICIT_SCOPED_LOCK_H_ #include #include #include "Poco/Logger.h" namespace kopsik { class ExplicitScopedLock : public Poco::Mutex::ScopedLock { public: ExplicitScopedLock( const std::string context, Poco::Mutex& mutex) : Poco::Mutex::ScopedLock(mutex), context_(context) { std::stringstream text; text << context_ << " locking"; logger().debug(text.str()); } ~ExplicitScopedLock() { std::stringstream text; text << context_ << " unlocking"; logger().debug(text.str()); } private: Poco::Logger &logger() { return Poco::Logger::get("lock"); } std::string context_; }; } // namespace kopsik #endif // SRC_EXPLICIT_SCOPED_LOCK_H_ #ifndef MICROPYTHON_WRAP_UTIL_H #define MICROPYTHON_WRAP_UTIL_H #include "detail/micropython.h" namespace upywrap { inline std::string ExceptionToString( mp_obj_t ex ) { std::string exMessage; const mp_print_t mp_my_print{ &exMessage, [] ( void* data, const char* str, mp_uint_t len ) { ( (std::string*) data )->append( str, len ); } }; mp_obj_print_exception( &mp_my_print, ex ); return exMessage; } } #endif //#ifndef MICROPYTHON_WRAP_UTIL_H // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef MINI_CHROMIUM_BASE_METRICS_HISTOGRAM_FUNCTIONS_H_ #define MINI_CHROMIUM_BASE_METRICS_HISTOGRAM_FUNCTIONS_H_ #include // These are no-op stub versions of a subset of the functions from Chromium's // base/metrics/histogram_functions.h. This allows us to instrument the Crashpad // code as necessary, while not affecting out-of-Chromium builds. namespace base { void UmaHistogramSparse(const std::string& name, int sample) {} } // namespace base #endif // MINI_CHROMIUM_BASE_METRICS_HISTOGRAM_FUNCTIONS_H_/* IN DEVELOPMENT. DO NOT SHIP. */ #ifndef __XGLINTELEXT_H__ #define __XGLINTELEXT_H__ #include #include #include "xgl.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus typedef enum _XGL_INTEL_STRUCTURE_TYPE { XGL_INTEL_STRUCTURE_TYPE_SHADER_CREATE_INFO = 1000, } XGL_INTEL_STRUCTURE_TYPE; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif // __XGLINTELEXT_H__ // // LJSStop.h // LJSYourNextBus // // Created by Luke Stringer on 29/01/2014. // Copyright (c) 2014 Luke Stringer. All rights reserved. // #import @interface LJSStop : NSObject @property (nonatomic, copy, readonly) NSString *NaPTANCode; @property (nonatomic, copy, readonly) NSString *title; @property (nonatomic, copy, readonly) NSDate *liveDate; @property (nonatomic, copy, readonly) NSArray *services; - (BOOL)isEqualToStop:(LJSStop *)stop; @end /* IN DEVELOPMENT. DO NOT SHIP. */ #ifndef __XGLINTELEXT_H__ #define __XGLINTELEXT_H__ #include #include #include "xgl.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus typedef enum _XGL_INTEL_STRUCTURE_TYPE { XGL_INTEL_STRUCTURE_TYPE_SHADER_CREATE_INFO = 1000, } XGL_INTEL_STRUCTURE_TYPE; #ifdef __cplusplus } // extern "C" #endif // __cplusplus #endif // __XGLINTELEXT_H__ #ifndef GENE_H #define GENE_H #include #include #include class Board; class Piece_Strength_Gene; class Gene { public: Gene(); virtual ~Gene() = default; void read_from(std::istream& is); void mutate(); double evaluate(const Board& board) const; virtual Gene* duplicate() const = 0; virtual std::string name() const = 0; void print(std::ostream& os) const; virtual void reset_piece_strength_gene(const Piece_Strength_Gene* psg); protected: mutable std::map properties; // used to simplify reading/writing from/to files virtual void reset_properties() const; virtual void load_properties(); void make_priority_non_negative(); private: virtual double score_board(const Board& board) const = 0; void throw_on_invalid_line(const std::string& line, const std::string& reason) const; virtual void gene_specific_mutation(); double priority; bool priority_non_negative; }; #endif // GENE_H #pragma once #include namespace util { // The interface is tuned for reuse and avoids boilerplate length calculations. // Looking at implementation examples helps understand the decisions behind it. // Serialization functions should not throw. // Upon success, serialize functions shall return end of serialized data. // Otherwise, nullptr shall be returned, indicating insufficinet destination capacity. using serializeFunc = void* (*)(void* dest, const void* destEnd, const void* obj); // Upon success, deserialize function shall return end of consumed src. Otherwise, nullptr shall be returned. using deserializeFunc = const void* (*)(void* sharedDest, const void* src, const void* srcEnd); } // namespace util // Copyright 2016 Intermodalics All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include namespace tango_helper { // The minimum Tango Core version required from this application. const int TANGO_CORE_MINIMUM_VERSION = 11926; // Yildun release. // Checks the installed version of the TangoCore. If it is too old, then // it will not support the most up to date features. // @return returns true if tango version if supported. bool IsTangoVersionOk(JNIEnv* env, jobject activity); // Binds to the tango service. // @return returns true if setting the binder ended successfully. bool SetBinder(JNIEnv* env, jobject binder); } // tango_helper #ifndef __DEBUG_H__ #define __DEBUG_H__ #undef ENABLE_DEBUG #ifdef ENABLE_DEBUG #include #define DBG(x...) \ do {\ std::cout<< "DBG " << x << std::endl;\ } while(0) #define DBGHEXTOSTRING(_b, _size) \ do { \ char *b = (char*)(_b);\ uint64_t size = (uint64_t) (_size);\ DBG(" size: "<< size); \ std::stringstream stream; \ for (uint64_t i = 0; i struct GraphicsComponent { int active = 0; int modelID = -1; DirectX::XMMATRIX worldMatrix; }; struct penis { int active = 0; int modelID = -1; int joints = 0; DirectX::XMMATRIX worldMatrix; DirectX::XMMATRIX finalTransforms[32]; }; struct UIComponent { int active = 0; int spriteID = -1; bool wasClicked = false; DirectX::XMFLOAT2 position = DirectX::XMFLOAT2(0.0f, 0.0f); DirectX::XMFLOAT2 size = DirectX::XMFLOAT2(10.0f, 10.0f); }; #endif#pragma once #include // size_t definition #include #include #include #include #include #include namespace tasm { /** Convert an Asm program into machine code. */ template using assemble = typename details::call< program, state::pass2state::first>>::second; /** Assembly function wrapper. */ template struct AsmProgram { using program = P; template R operator()(Args... args) { return ((R(*)(std::decay_t...))P::data)(args...); } }; /** Block of assembly code. */ template constexpr auto block(x, xs...) { return execute::seq{}; } /** Create a top level assembly function. */ template constexpr auto Asm(x, xs...) { return AsmProgram>>(); } } // tasm /* Copyright (c) 2017 Rolf Timmermans */ #pragma once #include #include #include #include #include #include "inline/arguments.h" #include "inline/error.h" #include "inline/util.h" #ifdef __MSVC__ #define force_inline inline __forceinline #else #define force_inline inline __attribute__((always_inline)) #endif #include ljit_value ljit_new_value(ljit_types type) { ljit_value val = NULL; if ((val = malloc(sizeof(ljit_value))) == NULL) return NULL; val->type = type; val->is_cst = 0; val->is_tmp = 0; val->index = 0; val->data = NULL; return val; } void ljit_free_value(ljit_value value) { if (!value) return; free(value->data); free(value); } ljit_value ljit_new_uchar_cst(ljit_uchar value) { ljit_value cst = ljit_new_value(LJIT_UCHAR); ljit_uchar *val = NULL; if (!cst) return NULL; if ((val = malloc(sizeof(ljit_uchar))) == NULL) { ljit_free_value(cst); return NULL; } *val = value; cst->data = val; cst->is_cst = 1; return cst; } // // Set.h // Set // // Created by Rob Rix on 2014-06-22. // Copyright (c) 2014 Rob Rix. All rights reserved. // #import //! Project version number for Set. FOUNDATION_EXPORT double SetVersionNumber; //! Project version string for Set. FOUNDATION_EXPORT const unsigned char SetVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import // // HLError.h // HLSpriteKit // // Created by Karl Voskuil on 6/6/14. // Copyright (c) 2014 Hilo Games. All rights reserved. // #import /** The error level for logging non-critical errors using `HLError()`. */ typedef NS_ENUM(NSInteger, HLErrorLevel) { /** Errors. */ HLLevelError, /** Warnings. */ HLLevelWarning, /** Information. */ HLLevelInfo, }; /** Logs a non-critical error. */ static void HLError(HLErrorLevel level, NSString *message) { // TODO: This is a placeholder for a better mechanism for non-critical error logging, // e.g. CocoaLumberjack. NSString *levelLabel; switch (level) { case HLLevelInfo: levelLabel = @"INFO"; break; case HLLevelWarning: levelLabel = @"WARNING"; break; case HLLevelError: levelLabel = @"ERROR"; break; } NSLog(@"%@: %@", levelLabel, message); } #ifndef BUGSNAG_PRIVATE_H #define BUGSNAG_PRIVATE_H #import "Bugsnag.h" #import "BugsnagBreadcrumb.h" @interface BugsnagBreadcrumbs () /** * Reads and return breadcrumb data currently stored on disk */ - (NSArray *_Nullable)cachedBreadcrumbs; @end @interface Bugsnag () /** Get the current Bugsnag configuration. * * This method returns nil if called before +startBugsnagWithApiKey: or * +startBugsnagWithConfiguration:, and otherwise returns the current * configuration for Bugsnag. * * @return The configuration, or nil. */ + (BugsnagConfiguration *_Nullable)configuration; @end #endif // BUGSNAG_PRIVATE_H /* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 100 #endif // cc dict_example.c dict.c #include #include #include #include "bool.h" #include "dict.h" int main(int argc, const char *argv[]) { /* allocate a new dict */ struct dict *dict = dict(); /* set key and values to dict */ char *key1 = "key1"; char *key2 = "key2"; char *val1 = "val1"; char *val2 = "val2"; assert(dict_set(dict, key1, strlen(key1), val1) == DICT_OK); assert(dict_set(dict, key2, strlen(key2), val2) == DICT_OK); /* get dict length */ assert(dict_len(dict) == 2); /* get data by key */ assert(dict_get(dict, key1, strlen(key1)) == val1); assert(dict_get(dict, key2, strlen(key2)) == val2); /* iterate dict */ struct dict_iter *iter = dict_iter(dict); struct dict_node *node = NULL; while ((node = dict_iter_next(iter)) != NULL) { printf("%.*s => %s\n", (int)node->len, node->key, node->val); } /* free dict iterator */ dict_iter_free(iter); /* free the dict */ dict_free(dict); return 0; } /* See LICENSE file for copyright and license details. */ #include #ifndef NDEBUG extern int debug; #define DBG(fmt, ...) dbg(fmt, __VA_ARGS__) #define DBGON() (debug = 1) #else #define DBG(...) #define DBGON() #endif #ifndef PREFIX #define PREFIX "/usr/local/" #endif #define TINT long long #define TUINT unsigned long long #define TFLOAT double struct items { char **s; unsigned n; }; extern void die(const char *fmt, ...); extern void dbg(const char *fmt, ...); extern void newitem(struct items *items, char *item); extern void *xmalloc(size_t size); extern void *xcalloc(size_t nmemb, size_t size); extern char *xstrdup(const char *s); extern void *xrealloc(void *buff, register size_t size); /* * Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef FRUIT_CLASS_CONSTRUCTION_TRACKER_H #define FRUIT_CLASS_CONSTRUCTION_TRACKER_H /** * This class is useful to keep track of how many instances of a given type are created during the entire program * execution. * * Example use: * class Foo : public ConstructionTracker { * ... * }; * * int main() { * ... * assert(Foo::num_objects_constructed == 3); * } */ template struct ConstructionTracker { static std::size_t num_objects_constructed; ConstructionTracker() { ++num_objects_constructed; } }; template std::size_t ConstructionTracker::num_objects_constructed = 0; #endif // FRUIT_CLASS_CONSTRUCTION_TRACKER_H // RUN: %clang_cc1 -O3 -ffp-contract=fast -triple=powerpc-apple-darwin10 -S -o - %s | FileCheck %s // REQUIRES: powerpc-registered-target float fma_test1(float a, float b, float c) { // CHECK: fmadds float x = a * b; float y = x + c; return y; } #ifndef RADIO_H_INCLUDED #define RADIO_H_INCLUDED #include #define RADIO_PACKET_MAX_LEN 64 #define RADIO_PACKET_BUFFER_SIZE 1 typedef enum { PACKET_RECEIVED, } radio_evt_type_t; typedef struct { uint8_t len; uint8_t data[RADIO_PACKET_MAX_LEN]; } radio_packet_t; typedef struct { radio_evt_type_t type; union { radio_packet_t packet; }; } radio_evt_t; typedef void (radio_evt_handler_t)(radio_evt_t * evt); uint32_t radio_init(radio_evt_handler_t * evt_handler); uint32_t radio_send(radio_packet_t * packet); uint32_t radio_receive_start(void); #endif // // AsyncTesting.h // ContentfulSDK // // Created by Boris Bügling on 05/03/14. // // // Set the flag for a block completion handler #define StartBlock() __block BOOL waitingForBlock = YES // Set the flag to stop the loop #define EndBlock() waitingForBlock = NO // Wait and loop until flag is set #define WaitUntilBlockCompletes() WaitWhile(waitingForBlock) // Macro - Wait for condition to be NO/false in blocks and asynchronous calls #define WaitWhile(condition) \ do { \ NSDate* __startTime = [NSDate date]; \ while(condition) { \ [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; \ if ([[NSDate date] timeIntervalSinceDate:__startTime] > 20.0) { \ XCTAssertFalse(true, @"Asynchronous test timed out."); \ break; \ } \ } \ } while(0) // RUN: clang -fsyntax-only -verify %s // RUN: clang -fsyntax-only -triple x86_64-apple-darwin9 -verify %s int a[10]; int f0() { return __builtin_object_size(&a); // expected-error {{too few arguments to function}} } int f1() { return (__builtin_object_size(&a, 0) + __builtin_object_size(&a, 1) + __builtin_object_size(&a, 2) + __builtin_object_size(&a, 3)); } int f2() { return __builtin_object_size(&a, -1); // expected-error {{argument should be a value from 0 to 3}} } int f3() { return __builtin_object_size(&a, 4); // expected-error {{argument should be a value from 0 to 3}} } // rdar://6252231 - cannot call vsnprintf with va_list on x86_64 void f4(const char *fmt, ...) { __builtin_va_list args; __builtin___vsnprintf_chk (0, 42, 0, 11, fmt, args); } // // STMRecordingOverlayViewController.h // Pods // // Created by Tyler Clemens on 9/14/15. // // #import #import "VoiceCmdView.h" @protocol STMRecordingOverlayDelegate; @interface STMRecordingOverlayViewController : UIViewController @property (atomic) id delegate; @property double MaxListeningSeconds; @property NSString *tags; @property NSString *topic; -(void)userRequestsStopListening; -(id)initWithTags:(NSString *)tags andTopic:(NSString *)topic; @end @protocol STMRecordingOverlayDelegate -(void)shoutCreated:(STMShout*)shout error:(NSError*)err; -(void)overlayClosed:(BOOL)bDismissed; @end #include #include #include #include #include static void pyobjc_internal_init() { static void *foundation = NULL; if ( foundation == NULL ) { foundation = dlopen( "/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation", RTLD_LAZY); if ( foundation == NULL ) { printf("Got dlopen error on Foundation\n"); return; } } } id allocAndInitAutoreleasePool() { Class NSAutoreleasePoolClass = (Class)objc_getClass("NSAutoreleasePool"); id pool = class_createInstance(NSAutoreleasePoolClass, 0); return objc_msgSend(pool, sel_registerName("init")); } void drainAutoreleasePool(id pool) { (void)objc_msgSend(pool, sel_registerName("drain")); } #ifndef SRC_GRAPHICS_BUFFER_LOCK_MANAGER_H_ #define SRC_GRAPHICS_BUFFER_LOCK_MANAGER_H_ #include #include "./gl.h" namespace Graphics { struct BufferRange { size_t startOffset; size_t length; size_t endOffset() const { return startOffset + length; } bool overlaps(const BufferRange &other) const { return startOffset < other.endOffset() && other.startOffset < endOffset(); } }; struct BufferLock { BufferRange range; GLsync syncObject; }; /** * \brief * * */ class BufferLockManager { public: explicit BufferLockManager(bool runUpdatesOnCPU); ~BufferLockManager(); void initialize(Gl *gl); void waitForLockedRange(size_t lockBeginBytes, size_t lockLength); void lockRange(size_t lockBeginBytes, size_t lockLength); private: void wait(GLsync *syncObject); void cleanup(BufferLock *bufferLock); std::vector bufferLocks; bool runUpdatesOnCPU; Gl *gl; }; } // namespace Graphics #endif // SRC_GRAPHICS_BUFFER_LOCK_MANAGER_H_ /** ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * ****************************************************************************** * Copyright 2015 Ben Vanik. All rights reserved. * * Released under the BSD license - see LICENSE in the root for more details. * ****************************************************************************** */ #ifndef XENIA_BASE_PLATFORM_X11_H_ #define XENIA_BASE_PLATFORM_X11_H_ // NOTE: if you're including this file it means you are explicitly depending // on Linux headers. Including this file outside of linux platform specific // source code will break portability #include "xenia/base/platform.h" // Xlib is used only for GLX interaction, the window management and input // events are done with gtk/gdk #include #include #include //Used for window management. Gtk is for GUI and wigets, gdk is for lower //level events like key presses, mouse events, etc #include #include #endif // XENIA_BASE_PLATFORM_X11_H_ #ifndef _ASM_X86_MMU_H #define _ASM_X86_MMU_H #include #include /* * The x86 doesn't have a mmu context, but * we put the segment information here. */ typedef struct { void *ldt; int size; struct mutex lock; void *vdso; #ifdef CONFIG_X86_64 /* True if mm supports a task running in 32 bit compatibility mode. */ unsigned short ia32_compat; #endif } mm_context_t; #ifdef CONFIG_SMP void leave_mm(int cpu); #else static inline void leave_mm(int cpu) { } #endif #endif /* _ASM_X86_MMU_H */ #pragma once #import "WRLDRoutingQuery.h" #import "WRLDRoutingQueryOptions.h" NS_ASSUME_NONNULL_BEGIN /*! A service which allows you to find routes between locations. Created by the createRoutingService method of the WRLDMapView object. This is an Objective-c interface to the WRLD Routing REST API (https://github.com/wrld3d/wrld-routing-api). */ @interface WRLDRoutingService : NSObject /*! Asynchronously query the routing service. The results of the query will be passed as a WRLDRoutingQueryResponse to the routingQueryDidComplete method in WRLDMapViewDelegate. @param options The parameters of the routing query. @returns A handle to the ongoing query, which can be used to cancel it. */ - (WRLDRoutingQuery*)findRoutes:(WRLDRoutingQueryOptions*)options; @end NS_ASSUME_NONNULL_END #ifndef DASHBOARD_H #define DASHBOARD_H #include #include "src/process/process.h" #include "src/system/sys_stats.h" typedef struct { int max_x; int max_y; int prev_x; int prev_y; char *fieldbar; sysaux *system; ps_node *process_list; Tree *process_tree; } Board; void print_usage(void); char set_sort_option(char *opt); void dashboard_mainloop(char attr_sort); void update_process_stats(Tree *ps_tree, ps_node *ps, sysaux *sys); static int calculate_ln_diff(Board *board, int ln, int prev_ln); Board *init_board(void); void free_board(Board *board); #endif #ifndef USB_H #define USB_H void setup_usb(); void usb_interrupt_handler(); #endif #include #include "core.h" #if PY_MAJOR_VERSION >= 3 /* * This is only needed for Python3 * IDS module initialization * Based on https://docs.python.org/3/extending/extending.html#the-module-s-method-table-and-initialization-function */ static struct PyModuleDef idsModule = { PyModuleDef_HEAD_INIT, "ids", /* name of module */ NULL, /* module documentation */ -1, /* size of perinterpreter state of the module, or -1 if the module keeps state in global variables. */ idsMethods }; #endif #if PY_MAJOR_VERSION >= 3 PyMODINIT_FUNC PyInit_ids(void) { return PyModule_Create(&idsModule); } #else PyMODINIT_FUNC initids(void) { (void) Py_InitModule("ids", idsMethods); } #endif int main(int argc, char *argv[]) { #if PY_MAJOR_VERSION >= 3 wchar_t name[128]; mbstowcs(name, argv[0], 128); #else char name[128]; strncpy(name, argv[0], 128); #endif /* Pass argv[0] to the Pythin interpreter */ Py_SetProgramName(name); /* Initialize the Python interpreter */ Py_Initialize(); /* Add a static module */ #if PY_MAJOR_VERSION >= 3 PyInit_ids(); #else initids(); #endif } #ifndef CJET_CONFIG_H #define CJET_CONFIG_H #define SERVER_PORT 7899 #define LISTEN_BACKLOG 40 #define MAX_MESSAGE_SIZE 128 /* Linux specific configs */ #define MAX_EPOLL_EVENTS 100 #endif #pragma once #include struct Version { public: Version(int major = 0, int minor = 0, int revision = 0) : _major(major), _minor(minor), _revision(revision) { } const int Major() { return _major; } const int Minor() { return _minor; } const int Revision() { return _revision; } } std::wstring ToString() { return std::to_wstring(_major) + L"." + std::to_wstring(_minor) + L"." + std::to_wstring(_revision); } private: int _major; int _minor; int _revision; };// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_ #define WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_ #include "webkit/fileapi/file_system_file_util.h" #include "webkit/fileapi/file_system_operation_context.h" #pragma once namespace fileapi { class QuotaFileUtil : public FileSystemFileUtil { public: static QuotaFileUtil* GetInstance(); ~QuotaFileUtil() {} static const int64 kNoLimit; base::PlatformFileError CopyOrMoveFile( FileSystemOperationContext* fs_context, const FilePath& src_file_path, const FilePath& dest_file_path, bool copy); // TODO(dmikurube): Charge some amount of quota for directories. base::PlatformFileError Truncate( FileSystemOperationContext* fs_context, const FilePath& path, int64 length); friend struct DefaultSingletonTraits; DISALLOW_COPY_AND_ASSIGN(QuotaFileUtil); protected: QuotaFileUtil() {} }; } // namespace fileapi #endif // WEBKIT_FILEAPI_QUOTA_FILE_UTIL_H_ // // HTCopyableLabel.h // HotelTonight // // Created by Jonathan Sibley on 2/6/13. // Copyright (c) 2013 Hotel Tonight. All rights reserved. // #import @class HTCopyableLabel; @protocol HTCopyableLabelDelegate @optional - (NSString *)stringToCopyForCopyableLabel:(HTCopyableLabel *)copyableLabel; - (CGRect)copyMenuTargetRectInCopyableLabelCoordinates:(HTCopyableLabel *)copyableLabel; @end @interface HTCopyableLabel : UILabel @property (nonatomic, assign) BOOL copyingEnabled; // Defaults to YES @property (nonatomic, weak) id copyableLabelDelegate; @property (nonatomic, assign) UIMenuControllerArrowDirection copyMenuArrowDirection; // Defaults to UIMenuControllerArrowDefault // You may want to add longPressGestureRecognizer to a container view @property (nonatomic, strong, readonly) UILongPressGestureRecognizer *longPressGestureRecognizer; @end /* Copyright (c) nasser-sh 2016 * * Distributed under BSD-style license. See accompanying LICENSE.txt in project * directory. */ #pragma once #include #include "resource.h" namespace graphics { class CGraphicsApp; class CSettingsDialog : public CDialog { public: enum { IDD = IDD_SETTINGS_DIALOG }; CSettingsDialog(CGraphicsApp *pApp, CWnd *pParent = nullptr); virtual ~CSettingsDialog() = default; BOOL OnInitDialog() override; void OnOK() override; private: CComboBox *m_pMsaaComboBox; CGraphicsApp *m_pApp; protected: DECLARE_MESSAGE_MAP() }; } #ifndef stdbool_h #define stdbool_h #include /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ typedef BOOL _Bool; #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #endif /* stdbool_h */ #pragma once #ifndef COPYFS_LIB_COPYDEVICE_H_ #define COPYFS_LIB_COPYDEVICE_H_ #include #include #include "messmer/cpp-utils/macros.h" namespace copyfs { namespace bf = boost::filesystem; class CopyDevice: public fspp::Device { public: CopyDevice(const bf::path &rootdir); virtual ~CopyDevice(); void statfs(const boost::filesystem::path &path, struct ::statvfs *fsstat) override; const bf::path &RootDir() const; private: std::unique_ptr Load(const bf::path &path) override; const bf::path _root_path; DISALLOW_COPY_AND_ASSIGN(CopyDevice); }; inline const bf::path &CopyDevice::RootDir() const { return _root_path; } } #endif #ifndef NINJA_WIN32PORT_H_ #define NINJA_WIN32PORT_H_ #pragma once /// A 64-bit integer type typedef unsigned long long int64_t; typedef unsigned long long uint64_t; #endif // NINJA_WIN32PORT_H_/* Ultrasonick.h - Library for HC-SR04 Ultrasonic Ranging Module in a minimalist way. Created by EricK Simoes (@AloErickSimoes), April 3, 2014. Released into the Creative Commons Attribution-ShareAlike 4.0 International. */ #ifndef Ultrasonick_h #define Ultrasonick_h #if (ARDUINO >= 100) #include "Arduino.h" #else #include "WProgram.h" #endif #define CM 1 #define INC 0 /** * TODO: Remove the underscore of the private variables name * and use static keyword */ class Ultrasonick { public: Ultrasonick(uint8_t trigPin, uint8_t echoPin); int distanceRead(uint8_t und); int distanceRead(); private: uint8_t _trigPin; uint8_t _echoPin; int timing(); }; #endif // Ultrasonic_h #include "stdio.h" #include "stdbool.h" bool checkPythagoreanTriplet (int a, int b, int c); bool checkPythagoreanTriplet (int a, int b, int c) { if((a*a) + (b*b) == (c*c)) { return true; } else { return false; } } int main(int argc, char const *argv[]) { int i; int j; int k; for(i=1; i < 1000; i++) { for(j=i; j < (1000 - i); j++) { for(k=j; k < (1000 - j); k++){ if(checkPythagoreanTriplet(i,j,k) && (i + j + k) == 1000) { printf("%d %d %d\n", i, j, k); printf("%d\n", (i*j*k)); break; } } } } return 0; } #ifndef GAMEASSET_H #define GAMEASSET_H #include class GameAsset { public: virtual void Draw(GLuint) = 0; }; #endif // xml_lexer.h see license.txt for copyright and terms of use #ifndef XML_LEXER_H #define XML_LEXER_H #include #include "fstream.h" // ifstream #include "str.h" // string #include "sm_flexlexer.h" // yyFlexLexer #include "baselexer.h" // FLEX_OUTPUT_METHOD_DECLS #include "xml_enum.h" // XTOK_* class XmlLexer : private yyFlexLexer { public: char const *inputFname; // just for error messages int linenumber; bool sawEof; XmlLexer() : inputFname(NULL) , linenumber(1) // file line counting traditionally starts at 1 , sawEof(false) {} // this is yylex() but does what I want it to with EOF int getToken(); // have we seen the EOF? bool haveSeenEof() { return sawEof; } // this is yytext char const *currentText() { return this->YYText(); } // this is yyrestart void restart(istream *in) { this->yyrestart(in); } int tok(XmlToken kind); int svalTok(XmlToken t); void err(char const *msg); string tokenKindDesc(int kind) const; FLEX_OUTPUT_METHOD_DECLS }; #endif // XML_LEXER_H int main() { return 0; } #import @interface NSFileManager (TDTAdditions) /** @return URL to the any directory which matches the given search path in the User's domain. */ - (NSURL *)userURLForDirectory:(NSSearchPathDirectory)directory; /** Creates a temporary file in a suitable temporary directory. The generated file has a name of the form "prefix-random.suffix", where "random" denotes a string of random integers to gurantee uniqueness. @return URL to the temporary file */ - (NSURL *)fileURLToTemporaryFileWithNamePrefix:(NSString *)prefix suffix:(NSString *)suffix; @end // RUN: clang-cc -Wnonnull -fsyntax-only -verify %s extern void func1 (void (^block1)(), void (^block2)(), int) __attribute__((nonnull)); extern void func3 (void (^block1)(), int, void (^block2)(), int) __attribute__((nonnull(1,3))); extern void func4 (void (^block1)(), void (^block2)()) __attribute__((nonnull(1))) __attribute__((nonnull(2))); void foo (int i1, int i2, int i3, void (^cp1)(), void (^cp2)(), void (^cp3)()) { func1(cp1, cp2, i1); func1(0, cp2, i1); // expected-warning {{argument is null where non-null is required}} func1(cp1, 0, i1); // expected-warning {{argument is null where non-null is required}} func1(cp1, cp2, 0); func3(0, i2, cp3, i3); // expected-warning {{argument is null where non-null is required}} func3(cp3, i2, 0, i3); // expected-warning {{argument is null where non-null is required}} func4(0, cp1); // expected-warning {{argument is null where non-null is required}} func4(cp1, 0); // expected-warning {{argument is null where non-null is required}} } /* Copyright (c) 2007-2014. The YARA Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #ifndef _SIZEDSTR_H #define _SIZEDSTR_H #include #include // // This struct is used to support strings containing null chars. The length of // the string is stored along the string data. However the string data is also // terminated with a null char. // #define SIZED_STRING_FLAGS_NO_CASE 1 #define SIZED_STRING_FLAGS_DOT_ALL 2 #pragma pack(push) #pragma pack(8) typedef struct _SIZED_STRING { uint64_t length; uint32_t flags; char c_string[1]; } SIZED_STRING; #pragma pack(pop) int sized_string_cmp( SIZED_STRING* s1, SIZED_STRING* s2); #endif #include "k2pktdef.h" #define TRACE2_STA_LEN 7 #define TRACE2_CHAN_LEN 9 /* 4 bytes plus padding for loc and version */ #define TRACE2_NET_LEN 9 #define TRACE2_LOC_LEN 3 #define K2INFO_TYPE_STRING "TYPE_K2INFO_PACKET" typedef struct { char net[TRACE2_NET_LEN]; /* Network name */ char sta[TRACE2_STA_LEN]; /* Site name */ qint16 data_type; /* see K2INFO_TYPE #defines below */ quint32 epoch_sent; /* local time sent */ quint16 reserved[5]; /* reserved for future use */ } K2INFO_HEADER; #define K2INFO_TYPE_HEADER 1 /* k2 header params */ #define K2INFO_TYPE_STATUS 2 /* k2 regular status packet */ #define K2INFO_TYPE_ESTATUS 3 /* k2 extended status packet (old) */ #define K2INFO_TYPE_E2STATUS 4 /* k2 extended status packet v2 */ #define K2INFO_TYPE_COMM 5 /* k2ew packet processing stats */ #define MAX_K2INFOBUF_SIZ 4096 typedef union { qint8 msg[MAX_K2INFOBUF_SIZ]; K2INFO_HEADER k2info; } K2infoPacket; #ifndef HALIDE_TOOLS_IMAGE_H #define HALIDE_TOOLS_IMAGE_H /* This allows code that relied on halide_image.h and Halide::Tools::Image to continue to work with newer versions of Halide where HalideBuffer.h and Halide::Buffer are the way to work with data. Besides mapping Halide::Tools::Image to Halide::Buffer, it defines USING_HALIDE_BUFFER to allow code to conditionally compile for one or the other. It is intended as a stop-gap measure until the code can be updated. */ #include "HalideBuffer.h" namespace Halide { namespace Tools { #define USING_HALIDE_BUFFER template< typename T > using Image = Buffer; } // namespace Tools } // mamespace Halide #endif // #ifndef HALIDE_TOOLS_IMAGE_H // RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s // FIXME: we need to fix the "BoolArgument<"IsMSDeclSpec">" // hack in Attr.td for attribute "Aligned". // CHECK: int x __attribute__((aligned(4, 0))); int x __attribute__((aligned(4))); // FIXME: Print this at a valid location for a __declspec attr. // CHECK: int y __declspec(align(4, 1)); __declspec(align(4)) int y; // CHECK: void foo() __attribute__((const)); void foo() __attribute__((const)); // CHECK: void bar() __attribute__((__const)); void bar() __attribute__((__const)); #include #ifndef __LIST_H__ #define __LIST_H__ #endif/* Copyright (c) 2004 Timo Sirainen */ #include "lib.h" #include "str.h" #include "str-sanitize.h" void str_sanitize_append(string_t *dest, const char *src, size_t max_len) { const char *p; for (p = src; *p != '\0'; p++) { if ((unsigned char)*p < 32) break; } str_append_n(dest, src, (size_t)(p - src)); for (; *p != '\0' && max_len > 0; p++, max_len--) { if ((unsigned char)*p < 32) str_append_c(dest, '?'); else str_append_c(dest, *p); } if (*p != '\0') { str_truncate(dest, str_len(dest)-3); str_append(dest, "..."); } } const char *str_sanitize(const char *src, size_t max_len) { string_t *str; str = t_str_new(I_MIN(max_len, 256)); str_sanitize_append(str, src, max_len); return str_c(str); } #include int main(int argc, char *argv[]) { PyObject *expr[3]; int i, s, e, r; char *res; if(argc<5) { fprintf(stderr,"Usage: \n\n\ Print string[start:end]*repeat"); exit(0); } s = atoi(argv[2]); e = atoi(argv[3]); r = atoi(argv[4]); expr[0] = PyString_FromString(argv[1]); expr[1] = PySequence_GetSlice(expr[0], s, e); expr[2] = PySequence_Repeat(expr[1], r); res=PyString_AsString(expr[2]); printf("'%s'\n",res); for(i=0; i<3; i++) Py_CLEAR(expr[i]); return 0; } #include "config.h" #include "core/pwm.h" #include "core/usart.h" #include #include void delayms(uint16_t millis) { while ( millis ) { _delay_ms(1); millis--; } } int main(void) { DDRB |= 1< namespace mclisp { class ConsCell { public: ConsCell(): car(nullptr), cdr(nullptr) {} ConsCell(ConsCell* car, ConsCell* cdr): car(car), cdr(cdr) {} ConsCell* car; ConsCell* cdr; }; bool operator==(const ConsCell& lhs, const ConsCell& rhs); bool operator!=(const ConsCell& lhs, const ConsCell& rhs); bool operator< (const ConsCell& lhs, const ConsCell& rhs); bool operator> (const ConsCell& lhs, const ConsCell& rhs); bool operator<=(const ConsCell& lhs, const ConsCell& rhs); bool operator>=(const ConsCell& lhs, const ConsCell& rhs); std::ostream& operator<<(std::ostream& os, const ConsCell& cons); extern const ConsCell* kNil; extern const ConsCell* kT; void HackToFixNil(); const ConsCell* MakeSymbol(const std::string& name); const ConsCell* MakeCons(const ConsCell* car, const ConsCell* cdr); inline bool Symbolp(const ConsCell* c); inline bool Consp(const ConsCell* c); const std::string SymbolName(const ConsCell* symbol); } // namespace mclisp #endif // MCLISP_CONS_H_ #ifndef _STDIO_H_ #define _STDIO_H_ /** * \file stdio.h * \brief This file handle the output to the terminal for the user. */ #ifdef __cplusplus extern "C" { #endif #ifndef EOF #define EOF -1 /*!< End of file value */ #endif /** * \brief Print a formatted string * * \param[in] format Format of the string * \param[in] ... Arguments for format specification * * \return Number of characters written */ int printf(const char* __restrict format, ...); /** * \brief Print a single char * * \param c Character to print * * \return The character written */ int putchar(int c); /** * \brief Print a string * * \param string The string to print * * \return The number of characters written */ int puts(const char* string); #ifdef __cplusplus } #endif #endif #ifndef CJET_CONFIG_H #define CJET_CONFIG_H #define SERVER_PORT \ 11122 #define LISTEN_BACKLOG \ 40 #define MAX_MESSAGE_SIZE \ 250 /* Linux specific configs */ #define MAX_EPOLL_EVENTS \ 100 #endif #include "base/base.h" class Graph { public: typedef int16_t Node; typedef int16_t Degree; Graph(Node order, Degree degree) : order_(order), degree_(degree), edges_(order * degree, -1) {} inline Node order() { return order_; } inline Degree degree() { return degree_; } // Returns the de Node GetEdge(Node order_index, Degree degree_index); private: const Node order_; const Degree degree_; vector edges_; }; #pragma once #include #include "halley/bytes/config_node_serializer.h" namespace Halley { class World; struct alignas(8) EntityId { int64_t value; EntityId() : value(-1) {} explicit EntityId(const String& str); bool isValid() const { return value != -1; } bool operator==(const EntityId& other) const { return value == other.value; } bool operator!=(const EntityId& other) const { return value != other.value; } bool operator<(const EntityId& other) const { return value < other.value; } bool operator>(const EntityId& other) const { return value > other.value; } bool operator<=(const EntityId& other) const { return value <= other.value; } bool operator>=(const EntityId& other) const { return value >= other.value; } String toString() const; void serialize(Serializer& s) const; void deserialize(Deserializer& s); }; template <> class ConfigNodeSerializer { public: ConfigNode serialize(EntityId id, const EntitySerializationContext& context); EntityId deserialize(const EntitySerializationContext& context, const ConfigNode& node); }; } namespace std { template<> struct hash { size_t operator()(const Halley::EntityId& v) const noexcept { return std::hash()(v.value); } }; } #ifndef SCC_SYMBOL_HEADER #define SCC_SYMBOL_HEADER #include "syntax.h" typedef struct Symbol { int level; char *name; // used in semantic analysis Syntax * declaration; // used in intermediate code generation char *var_name; } Symbol; Symbol * symbol_new(); void symbol_delete(Symbol * symbol); #endif#ifndef FILESYSTEM_H #define FILESYSTEM_H #include "Partition.h" #include #include class Directory; enum class FileType { File, Directory }; class File : public HDDBytes { std::string _name; public: std::string getName(){return _name;} //virtual void setName(const std::string& name) = 0; //virtual Directory * getParent() = 0; // null => root directory virtual FileType getType(); virtual Directory * dir() {return nullptr;}; }; class Directory : public virtual File { public : virtual std::vector getFilesName () = 0; FileType getType(); virtual File * operator[](const std::string& name) = 0; // nullptr means it does not exists virtual Directory * dir() {return this;}; }; class FileSystem { protected : Partition* _part; public: explicit FileSystem (Partition * part); virtual Directory* getRoot() = 0; //virtual File* operator [] (const std::string& path) = 0; //return null when path is not valid }; #endif /* * copyright 2015 wink saville * * licensed under the apache license, version 2.0 (the "license"); * you may not use this file except in compliance with the license. * you may obtain a copy of the license at * * http://www.apache.org/licenses/license-2.0 * * unless required by applicable law or agreed to in writing, software * distributed under the license is distributed on an "as is" basis, * without warranties or conditions of any kind, either express or implied. * see the license for the specific language governing permissions and * limitations under the license. */ #include "poweroff.h" #include "inttypes.h" void poweroff(void) { uint32_t* pUnlockResetReg = (uint32_t*)0x10000020; uint32_t* pResetReg = (uint32_t*)0x10000040; // If qemu is executed with -no-reboot option then // resetting the board will cause qemu to exit // and it won't be necessary to ctrl-a, x to exit. // See http://lists.nongnu.org/archive/html/qemu-discuss/2015-10/msg00057.html // For arm926ej-s you unlock the reset register // then reset the board, I'm resetting to level 6 *pUnlockResetReg = 0xA05F; *pResetReg = 0x106; } #pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.48f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // increment that won't trigger the new-version checks, handy for minor // releases that I don't want to bother users about. //#define VERSION_SUFFIX 'b' #ifndef DIVIDER_H #define DIVIDER_H class Divider { public: Divider(int interval = 1) { setInterval(interval); } void setInterval(int interval) { this->interval = interval; clockCounter = interval - 1; } void tick() { clockCounter++; if (clockCounter == interval) { clockCounter = 0; } } bool hasClocked() { return clockCounter == 0; } private: int interval; int clockCounter; }; #endif #ifndef H_XDICTLIB #define H_XDICTLIB #ifdef __cplusplus extern "C" { #endif #include /* The |xdict| interface. */ #define XDICT_MAXLENGTH 10 /* 0..9 characters */ struct xdict { struct word_entry *words[XDICT_MAXLENGTH]; size_t cap[XDICT_MAXLENGTH]; size_t len[XDICT_MAXLENGTH]; int sorted; }; struct word_entry { char *word; }; void xdict_init(struct xdict *d); int xdict_load(struct xdict *d, const char *fname); int xdict_addword(struct xdict *d, const char *word, int len); int xdict_remword(struct xdict *d, const char *word, int len); int xdict_remmatch(struct xdict *d, const char *pat, int len); void xdict_sort(struct xdict *d); int xdict_save(struct xdict *d, const char *fname); void xdict_free(struct xdict *d); int xdict_find(struct xdict *d, const char *pattern, int (*f)(const char *, void *), void *info); int xdict_match_simple(const char *w, const char *p); int xdict_match(const char *w, const char *p); #ifdef __cplusplus } #endif #endif // RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s // AS_LINK-LABEL: clang // AS_LINK: "-cc1as" // AS_LINK-LABEL: lld // AS_LINK: "-flavor" "gnu" "-target" "amdgcn--amdhsa" // REQUIRES: clang-driver /* This string is written to the output primary header as CAL_VER. */ # define STIS_CAL_VER "2.28 (09-March-2010) cfitsio test" #include "../small1/testharness.h" // NUMERRORS 1 union { struct { int *a, *b; } f1; int f2; } __TAGGED u; int i; int main() { u.f2 = 5; // now u.f1.a = 5 u.f1.b = &i; // now the tag says that u.f1 is active i = * u.f1.a; //ERROR(1): Null-pointer } #ifndef GLKUNIT_H #define GLKUNIT_H #include #define _BEGIN do { #define _END } while(0); /* msg must be a string literal */ #define _ASSERT(expr, msg, ...) _BEGIN \ if( !(expr) ) { \ fprintf(stderr, "Assertion failed: " msg "\n", __VA_ARGS__); \ return 0; \ } _END #define SUCCEED _BEGIN return 1; _END #define ASSERT(expr) _ASSERT(expr, "%s", #expr) #define ASSERT_EQUAL(expected, actual) _ASSERT((expected) == (actual), "%s == %s", #expected, #actual); struct TestDescription { char *name; int (*testfunc)(void); }; #endif /* GLKUNIT_H */ // // config.h // IRCCloud // // Created by Sam Steele on 7/13/13. // Copyright (c) 2013 IRCCloud, Ltd. All rights reserved. // #ifndef IRCCloud_config_h #define IRCCloud_config_h #define HOCKEYAPP_TOKEN nil #define CRASHLYTICS_TOKEN nil #define CRASHLYTICS_SECRET nil #endif // // msgpack.h // msgpack // // Created by Ricardo Pereira on 13/10/2017. // // #import //! Project version number for msgpack. FOUNDATION_EXPORT double msgpackVersionNumber; //! Project version string for msgpack. FOUNDATION_EXPORT const unsigned char msgpackVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import #import "MessagePack.h" /** * @file * @brief Tools to work with registers */ //@{ #ifndef AVARIX_REGISTER_H__ #define AVARIX_REGISTER_H__ #include /** @brief Set a register with I/O CCP disabled * * Interrupts are not disabled during the process. * * @note This can be achieved in less cycles for some I/O registers but this way * is generic. */ inline void ccp_io_write(volatile uint8_t* addr, uint8_t value) { asm volatile ( "out %0, %1\n\t" "st Z, %3\n\t" : : "i" (&CCP) , "r" (CCP_IOREG_gc) , "z" ((uint16_t)addr) , "r" (value) ); } #endif #ifndef MAGICMATCHER_P_H #define MAGICMATCHER_P_H #include "magicmatcher.h" #include "qmimetype.h" #include QT_BEGIN_NAMESPACE class FileMatchContext { Q_DISABLE_COPY(FileMatchContext) public: // Max data to be read from a file enum { MaxData = 2500 }; explicit FileMatchContext(const QFileInfo &fi); inline QString fileName() const { return m_fileName; } // Return (cached) first MaxData bytes of file QByteArray data(); private: const QFileInfo m_fileInfo; const QString m_fileName; enum State { // File cannot be read/does not exist NoDataAvailable, // Not read yet DataNotRead, // Available DataRead } m_state; QByteArray m_data; }; QT_END_NAMESPACE #endif // MAGICMATCHER_P_H /* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "hex-dec.h" void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size) { unsigned int i; for (i = 0; i < hexstr_size; i++) { unsigned int value = dec & 0x0f; if (value < 10) hexstr[hexstr_size-i-1] = value + '0'; else hexstr[hexstr_size-i-1] = value - 10 + 'A'; dec >>= 4; } } uintmax_t hex2dec(const unsigned char *data, unsigned int len) { unsigned int i; uintmax_t value = 0; for (i = 0; i < len; i++) { value = value*0x10; if (data[i] >= '0' && data[i] <= '9') value += data[i]-'0'; else if (data[i] >= 'A' && data[i] <= 'F') value += data[i]-'A' + 10; else return 0; } return value; } #pragma once #include "Export.h" #include #include using namespace std; class DLLEXPORT SetFunctions { public: static set set_union_two(set& s1, set& s2); static set set_intersect_two(set& s1, set& s2); static set set_intersect_three(set& s1, set& s2, set& s3); }; #import @interface WildcardPattern : NSObject { NSString* pattern_; } - (id) initWithString: (NSString*) s; - (BOOL) isMatch: (NSString*) s; @end // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s // Don't include mm_malloc.h, it's system specific. #define __MM_MALLOC_H #include int test_bit_scan_forward(int a) { return _bit_scan_forward(a); // CHECK: @test_bit_scan_forward // CHECK: %[[call:.*]] = call i32 @llvm.cttz.i32( // CHECK: ret i32 %[[call]] } int test_bit_scan_reverse(int a) { return _bit_scan_reverse(a); // CHECK: %[[call:.*]] = call i32 @llvm.ctlz.i32( // CHECK: %[[sub:.*]] = sub nsw i32 31, %2 // CHECK: ret i32 %[[sub]] } #pragma once #define DLLEXPORT #ifdef DLLEXPORT #define DLL_OPERATION __declspec(dllexport) #endif #include /* $NetBSD: psl.h,v 1.7 1994/10/26 02:06:31 cgd Exp $ */ #ifndef _MACHINE_PSL_H_ #define _MACHINE_PSL_H_ #include #endif #ifndef __STARTUP_H__ #define __STARTUP_H__ #include "types.h" #ifndef X #define X(x) ((x) + 0x81) #endif #ifndef Y #define Y(y) ((y) + 0x2c) #endif extern int frameCount; extern int lastFrameCount; extern struct List *VBlankEvent; typedef struct Effect { /* AmigaOS is active during this step. Loads resources from disk. */ void (*Load)(void); /* Frees all resources allocated by "Load" step. */ void (*UnLoad)(void); /* * Does all initialization steps required to launch the effect. * 1) Allocate required memory. * 2) Run all precalc routines. * 2) Generate copper lists. * 3) Set up interrupts and DMA channels. */ void (*Init)(void); /* Frees all resources allocated by "Init" step. */ void (*Kill)(void); /* Renders single frame of an effect. */ void (*Render)(void); /* Handles all events and returns false to break the loop. */ bool (*HandleEvent)(void); } EffectT; #endif #pragma once #ifdef NDEBUG #define XCHAINER_DEBUG false #else // NDEBUG #define XCHAINER_DEBUG true #endif // NDEBUG #ifndef XCHAINER_HOST_DEVICE #ifdef __CUDACC__ #define XCHAINER_HOST_DEVICE __host__ __device__ #else // __CUDA__ #define XCHAINER_HOST_DEVICE #endif // __CUDACC__ #endif // XCHAINER_HOST_DEVICE #ifndef XCHAINER_NEVER_REACH #ifdef NDEBUG #include #define XCHAINER_NEVER_REACH() (std::abort()) #else // NDEBUG #include #define XCHAINER_NEVER_REACH() \ do { \ assert(false); /* NOLINT(cert-dcl03-c) */ \ std::abort(); \ } while (false) #endif // NDEBUG #endif // XCHAINER_NEVER_REACH /* * Copyright (C) 2013-2014 Daniel Nicoletti * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef PLUGIN_H #define PLUGIN_H #define CUTELYST_MODIFIER1 0 #ifdef __cplusplus extern "C" { #endif struct uwsgi_cutelyst { char *app; int reload; }; extern struct uwsgi_cutelyst options; #ifdef __cplusplus } #endif #endif // PLUGIN_H #ifndef CONVERTER_H #define CONVERTER_H #include "alMain.h" #include "alu.h" #ifdef __cpluspluc extern "C" { #endif typedef struct SampleConverter { enum DevFmtType mSrcType; enum DevFmtType mDstType; ALsizei mNumChannels; ALsizei mSrcTypeSize; ALsizei mDstTypeSize; ALint mSrcPrepCount; ALsizei mFracOffset; ALsizei mIncrement; ResamplerFunc mResample; alignas(16) ALfloat mSrcSamples[BUFFERSIZE+MAX_PRE_SAMPLES+MAX_POST_SAMPLES]; alignas(16) ALfloat mDstSamples[BUFFERSIZE]; struct { alignas(16) ALfloat mPrevSamples[MAX_PRE_SAMPLES+MAX_POST_SAMPLES]; } Chan[]; } SampleConverter; SampleConverter *CreateSampleConverter(enum DevFmtType srcType, enum DevFmtType dstType, ALsizei numchans, ALsizei srcRate, ALsizei dstRate); void DestroySampleConverter(SampleConverter **converter); ALsizei SampleConverterInput(SampleConverter *converter, const ALvoid *src, ALsizei *srcframes, ALvoid *dst, ALsizei dstframes); ALsizei SampleConverterAvailableOut(SampleConverter *converter, ALsizei srcframes); #ifdef __cpluspluc } #endif #endif /* CONVERTER_H */ #pragma once #include #include #include "ewok.h" enum { N_DIVISIONS = 65536, LOG2_DIVISIONS = 16 }; struct indexed_ewah_map { struct ewah_bitmap *map; size_t bit_from_division[N_DIVISIONS], ptr_from_division[N_DIVISIONS]; }; /* Build an index on top of an existing libewok EWAH map. */ extern void ewah_build_index(struct indexed_ewah_map *); /* Test whether a given bit is set in an indexed EWAH map. */ extern bool indexed_ewah_get(struct indexed_ewah_map *, size_t); /* * Copyright (C) 2015 Luke San Antonio and Hazza Alkaabi * All rights reserved. */ #pragma once #include #include #include "../gen/terrain.h" #include "common.h" extern "C" { #include "lua.h" } namespace game { namespace luaint { struct Terrain_Gen_Config { void add_option(std::string const& name, double def) noexcept; private: enum class Option_Type { Double }; struct Option { std::string name; Option_Type type; union { double d_num; } value; }; std::vector