text
stringlengths
4
6.14k
/* linux/arch/arm/plat-s3c/include/plat/fb.h * * Platform header file for Samsung Display Controller (FIMD) driver * * Jinsung Yang, Copyright (c) 2009 Samsung Electronics * http://www.samsungsemi.com/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef _FB_H #define _FB_H #define FB_SWAP_WORD (1 << 24) #define FB_SWAP_HWORD (1 << 16) #define FB_SWAP_BYTE (1 << 8) #define FB_SWAP_BIT (1 << 0) struct platform_device; struct s3c_platform_fb { int hw_ver; const char clk_name[16]; int nr_wins; int nr_buffers[5]; int default_win; int swap; void (*cfg_gpio)(struct platform_device *dev); int (*backlight_on)(struct platform_device *dev); int (*reset_lcd)(struct platform_device *dev); }; extern void s3cfb_set_platdata(struct s3c_platform_fb *fimd); /* defined by architecture to configure gpio */ extern void s3cfb_cfg_gpio(struct platform_device *pdev); extern int s3cfb_backlight_on(struct platform_device *pdev); extern int s3cfb_reset_lcd(struct platform_device *pdev); #endif /* _FB_H */
/* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once /*** This file is part of systemd. Copyright 2010 Lennart Poettering systemd 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. systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>. ***/ #include "sd-bus.h" #include "unit.h" extern const sd_bus_vtable bus_socket_vtable[]; int bus_socket_set_property(Unit *u, const char *name, sd_bus_message *message, UnitWriteFlags flags, sd_bus_error *error); int bus_socket_commit_properties(Unit *u);
/* $Id$ */ /* * This file is part of OpenTTD. * OpenTTD 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, version 2. * OpenTTD 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 OpenTTD. If not, see <http://www.gnu.org/licenses/>. */ /** @file debug.h Functions related to debugging. */ #ifndef DEBUG_H #define DEBUG_H #include "cpu.h" /* Debugging messages policy: * These should be the severities used for direct DEBUG() calls * maximum debugging level should be 10 if really deep, deep * debugging is needed. * (there is room for exceptions, but you have to have a good cause): * 0 - errors or severe warnings * 1 - other non-fatal, non-severe warnings * 2 - crude progress indicator of functionality * 3 - important debugging messages (function entry) * 4 - debugging messages (crude loop status, etc.) * 5 - detailed debugging information * 6.. - extremely detailed spamming */ /** * Output a line of debugging information. * @param name Category * @param level Debugging level, higher levels means more detailed information. */ #define DEBUG(name, level, ...) if ((level) == 0 || _debug_ ## name ## _level >= (level)) debug(#name, __VA_ARGS__) extern int _debug_driver_level; extern int _debug_grf_level; extern int _debug_map_level; extern int _debug_misc_level; extern int _debug_net_level; extern int _debug_sprite_level; extern int _debug_oldloader_level; extern int _debug_npf_level; extern int _debug_yapf_level; extern int _debug_freetype_level; extern int _debug_script_level; extern int _debug_sl_level; extern int _debug_gamelog_level; extern int _debug_desync_level; extern int _debug_console_level; #ifdef RANDOM_DEBUG extern int _debug_random_level; #endif void CDECL debug(const char *dbg, const char *format, ...) WARN_FORMAT(2, 3); char *DumpDebugFacilityNames(char *buf, char *last); void SetDebugString(const char *s); const char *GetDebugString(); /* Shorter form for passing filename and linenumber */ #define FILE_LINE __FILE__, __LINE__ /* Used for profiling * * Usage: * TIC(); * --Do your code-- * TOC("A name", 1); * * When you run the TIC() / TOC() multiple times, you can increase the '1' * to only display average stats every N values. Some things to know: * * for (int i = 0; i < 5; i++) { * TIC(); * --Do your code-- * TOC("A name", 5); * } * * Is the correct usage for multiple TIC() / TOC() calls. * * TIC() / TOC() creates its own block, so make sure not the mangle * it with another block. **/ #define TIC() {\ uint64 _xxx_ = ottd_rdtsc();\ static uint64 __sum__ = 0;\ static uint32 __i__ = 0; #define TOC(str, count)\ __sum__ += ottd_rdtsc() - _xxx_;\ if (++__i__ == count) {\ DEBUG(misc, 0, "[%s] " OTTD_PRINTF64 " [avg: %.1f]", str, __sum__, __sum__/(double)__i__);\ __i__ = 0;\ __sum__ = 0;\ }\ } void ShowInfo(const char *str); void CDECL ShowInfoF(const char *str, ...) WARN_FORMAT(1, 2); const char *GetLogPrefix(); /** The real time in the game. */ extern uint32 _realtime_tick; #endif /* DEBUG_H */
/* $%BEGINLICENSE%$ Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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; version 2 of the License. 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 $%ENDLICENSE%$ */ #include <string.h> #include <glib.h> #include "network-backend.h" #include "chassis-plugin.h" #include "glib-ext.h" #define C(x) x, sizeof(x) - 1 #define S(x) x->str, x->len /** * @deprecated: will be removed in 1.0 * @see network_backend_new() */ network_backend_t *backend_init() { return network_backend_new(); } network_backend_t *network_backend_new() { network_backend_t *b; b = g_new0(network_backend_t, 1); b->pool = network_connection_pool_new(); b->uuid = g_string_new(NULL); b->addr = network_address_new(); return b; } /** * @deprecated: will be removed in 1.0 * @see network_backend_free() */ void backend_free(network_backend_t *b) { network_backend_free(b); } void network_backend_free(network_backend_t *b) { if (!b) return; network_connection_pool_free(b->pool); if (b->addr) network_address_free(b->addr); if (b->uuid) g_string_free(b->uuid, TRUE); g_free(b); } network_backends_t *network_backends_new() { network_backends_t *bs; bs = g_new0(network_backends_t, 1); bs->backends = g_ptr_array_new(); bs->backends_mutex = g_mutex_new(); return bs; } void network_backends_free(network_backends_t *bs) { gsize i; if (!bs) return; g_mutex_lock(bs->backends_mutex); for (i = 0; i < bs->backends->len; i++) { network_backend_t *backend = bs->backends->pdata[i]; network_backend_free(backend); } g_mutex_unlock(bs->backends_mutex); g_ptr_array_free(bs->backends, TRUE); g_mutex_free(bs->backends_mutex); g_free(bs); } /* * FIXME: 1) remove _set_address, make this function callable with result of same * 2) differentiate between reasons for "we didn't add" (now -1 in all cases) */ int network_backends_add(network_backends_t *bs, /* const */ gchar *address, backend_type_t type) { network_backend_t *new_backend; guint i; new_backend = network_backend_new(); new_backend->type = type; if (0 != network_address_set_address(new_backend->addr, address)) { network_backend_free(new_backend); return -1; } /* check if this backend is already known */ g_mutex_lock(bs->backends_mutex); for (i = 0; i < bs->backends->len; i++) { network_backend_t *old_backend = bs->backends->pdata[i]; if (strleq(S(old_backend->addr->name), S(new_backend->addr->name))) { network_backend_free(new_backend); g_mutex_unlock(bs->backends_mutex); g_critical("backend %s is already known!", address); return -1; } } g_ptr_array_add(bs->backends, new_backend); g_mutex_unlock(bs->backends_mutex); g_message("added %s backend: %s", (type == BACKEND_TYPE_RW) ? "read/write" : "read-only", address); return 0; } /** * updated the _DOWN state to _UNKNOWN if the backends were * down for at least 4 seconds * * we only check once a second to reduce the overhead on connection setup * * @returns number of updated backends */ int network_backends_check(network_backends_t *bs) { GTimeVal now; guint i; int backends_woken_up = 0; gint64 t_diff; g_get_current_time(&now); ge_gtimeval_diff(&bs->backend_last_check, &now, &t_diff); /* check max(once a second) */ /* this also covers the "time went backards" case */ if (t_diff < G_USEC_PER_SEC) { if (t_diff < 0) { g_critical("%s: time went backwards (%"G_GINT64_FORMAT" usec)!", G_STRLOC, t_diff); bs->backend_last_check.tv_usec = 0; bs->backend_last_check.tv_sec = 0; } return 0; } /* check once a second if we have to wakeup a connection */ g_mutex_lock(bs->backends_mutex); bs->backend_last_check = now; for (i = 0; i < bs->backends->len; i++) { network_backend_t *cur = bs->backends->pdata[i]; if (cur->state != BACKEND_STATE_DOWN) continue; /* check if a backend is marked as down for more than 4 sec */ if (now.tv_sec - cur->state_since.tv_sec > 4) { g_debug("%s.%d: backend %s was down for more than 4 sec, waking it up", __FILE__, __LINE__, cur->addr->name->str); cur->state = BACKEND_STATE_UNKNOWN; cur->state_since = now; backends_woken_up++; } } g_mutex_unlock(bs->backends_mutex); return backends_woken_up; } network_backend_t *network_backends_get(network_backends_t *bs, guint ndx) { if (ndx >= network_backends_count(bs)) return NULL; /* FIXME: shouldn't we copy the backend or add ref-counting ? */ return bs->backends->pdata[ndx]; } guint network_backends_count(network_backends_t *bs) { guint len; g_mutex_lock(bs->backends_mutex); len = bs->backends->len; g_mutex_unlock(bs->backends_mutex); return len; }
/* * tclLoadDld.c -- * * This procedure provides a version of the TclLoadFile that * works with the "dld_link" and "dld_get_func" library procedures * for dynamic loading. It has been tested on Linux 1.1.95 and * dld-3.2.7. This file probably isn't needed anymore, since it * makes more sense to use "dl_open" etc. * * Copyright (c) 1995-1997 Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id: tclLoadDld.c 144 2003-02-05 10:56:26Z mdejong $ */ #include "tclInt.h" #include "dld.h" /* * In some systems, like SunOS 4.1.3, the RTLD_NOW flag isn't defined * and this argument to dlopen must always be 1. */ #ifndef RTLD_NOW # define RTLD_NOW 1 #endif /* *---------------------------------------------------------------------- * * TclpLoadFile -- * * Dynamically loads a binary code file into memory and returns * the addresses of two procedures within that file, if they * are defined. * * Results: * A standard Tcl completion code. If an error occurs, an error * message is left in the interp's result. *proc1Ptr and *proc2Ptr * are filled in with the addresses of the symbols given by * *sym1 and *sym2, or NULL if those symbols can't be found. * * Side effects: * New code suddenly appears in memory. * *---------------------------------------------------------------------- */ int TclpLoadFile(interp, fileName, sym1, sym2, proc1Ptr, proc2Ptr, clientDataPtr) Tcl_Interp *interp; /* Used for error reporting. */ char *fileName; /* Name of the file containing the desired * code. */ char *sym1, *sym2; /* Names of two procedures to look up in * the file's symbol table. */ Tcl_PackageInitProc **proc1Ptr, **proc2Ptr; /* Where to return the addresses corresponding * to sym1 and sym2. */ ClientData *clientDataPtr; /* Filled with token for dynamically loaded * file which will be passed back to * TclpUnloadFile() to unload the file. */ { static int firstTime = 1; int returnCode; /* * The dld package needs to know the pathname to the tcl binary. * If that's not know, return an error. */ if (firstTime) { if (tclExecutableName == NULL) { Tcl_SetResult(interp, "don't know name of application binary file, so can't initialize dynamic loader", TCL_STATIC); return TCL_ERROR; } returnCode = dld_init(tclExecutableName); if (returnCode != 0) { Tcl_AppendResult(interp, "initialization failed for dynamic loader: ", dld_strerror(returnCode), (char *) NULL); return TCL_ERROR; } firstTime = 0; } if ((returnCode = dld_link(fileName)) != 0) { Tcl_AppendResult(interp, "couldn't load file \"", fileName, "\": ", dld_strerror(returnCode), (char *) NULL); return TCL_ERROR; } *proc1Ptr = (Tcl_PackageInitProc *) dld_get_func(sym1); *proc2Ptr = (Tcl_PackageInitProc *) dld_get_func(sym2); *clientDataPtr = strcpy( (char *) ckalloc((unsigned) (strlen(fileName) + 1)), fileName); return TCL_OK; } /* *---------------------------------------------------------------------- * * TclpUnloadFile -- * * Unloads a dynamically loaded binary code file from memory. * Code pointers in the formerly loaded file are no longer valid * after calling this function. * * Results: * None. * * Side effects: * Code removed from memory. * *---------------------------------------------------------------------- */ void TclpUnloadFile(clientData) ClientData clientData; /* ClientData returned by a previous call * to TclpLoadFile(). The clientData is * a token that represents the loaded * file. */ { char *fileName; handle = (char *) clientData; dld_unlink_by_file(handle, 0); ckfree(handle); } /* *---------------------------------------------------------------------- * * TclGuessPackageName -- * * If the "load" command is invoked without providing a package * name, this procedure is invoked to try to figure it out. * * Results: * Always returns 0 to indicate that we couldn't figure out a * package name; generic code will then try to guess the package * from the file name. A return value of 1 would have meant that * we figured out the package name and put it in bufPtr. * * Side effects: * None. * *---------------------------------------------------------------------- */ int TclGuessPackageName(fileName, bufPtr) char *fileName; /* Name of file containing package (already * translated to local form if needed). */ Tcl_DString *bufPtr; /* Initialized empty dstring. Append * package name to this if possible. */ { return 0; }
/* Authors: Jakub Hrozek <jhrozek@redhat.com> Copyright (C) 2011 Red Hat 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 3 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, see <http://www.gnu.org/licenses/>. */ #include "src/util/sss_python.h" #include "config.h" PyObject * sss_exception_with_doc(char *name, char *doc, PyObject *base, PyObject *dict) { #ifdef HAVE_PYERR_NEWEXCEPTIONWITHDOC return PyErr_NewExceptionWithDoc(name, doc, base, dict); #else int result; PyObject *ret = NULL; PyObject *mydict = NULL; /* points to the dict only if we create it */ PyObject *docobj; if (dict == NULL) { dict = mydict = PyDict_New(); if (dict == NULL) { return NULL; } } if (doc != NULL) { docobj = PyString_FromString(doc); if (docobj == NULL) goto failure; result = PyDict_SetItemString(dict, "__doc__", docobj); Py_DECREF(docobj); if (result < 0) goto failure; } ret = PyErr_NewException(name, base, dict); failure: Py_XDECREF(mydict); return ret; #endif }
// -*- c-basic-offset: 2 -*- /* * This file is part of the KDE libraries * Copyright (C) 1999-2001 Harri Porten (porten@kde.org) * Copyright (C) 2001 Peter Kelly (pmk@post.com) * Copyright (C) 2003 Apple Computer, Inc * * 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 _KJS_COMPLETION_H_ #define _KJS_COMPLETION_H_ #include "identifier.h" #include "value.h" namespace KJS { /** * Completion types. */ enum ComplType { Normal, Break, Continue, ReturnValue, Throw }; /** * Completion objects are used to convey the return status and value * from functions. * * See FunctionImp::execute() * * @see FunctionImp * * @short Handle for a Completion type. */ // delme class KJS_EXPORT Completion : public Value { // fixme /* class Completion : private Value { */ public: Completion(ComplType c = Normal, const Value& v = Value(), const Identifier &t = Identifier::null()) : comp(c), val(v), tar(t) { } ComplType complType() const { return comp; } Value value() const { return val; } Identifier target() const { return tar; } bool isValueCompletion() const { return val.isValid(); } private: ComplType comp; Value val; Identifier tar; }; } #endif
/* * Insets.h * * Copyright (C) 2012 Simon Lehmann * * This file is part of Actracktive. * * Actracktive 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 3 of the License, or * (at your option) any later version. * * Actracktive 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 Foobar. If not, see <http://www.gnu.org/licenses/>. */ #ifndef GLUITINSETS_H_ #define GLUITINSETS_H_ #include "gluit/Point.h" namespace gluit { class Insets { public: static const Insets ZERO; Insets(int uniformAmount = 0); Insets(int leftRight, int topBottom); Insets(int left, int top, int right, int bottom); Insets shrink(int uniformAmount) const; Insets shrink(const Insets& insets) const; Insets shrink(int left, int top, int right, int bottom) const; Insets grow(int uniformAmount) const; Insets grow(const Insets& insets) const; Insets grow(int left, int top, int right, int bottom) const; int horizontalSize() const; int verticalSize() const; Point getTopLeft() const; int left; int top; int right; int bottom; }; } #endif
/* * Copyright (C) 2019 Siara Logics (cc) * * 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. * * @author Arundale R. * */ // Pre-compute c_95[] and l_95[] #include <time.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <stdint.h> typedef unsigned char byte; enum {SHX_SET1 = 0, SHX_SET1A, SHX_SET1B, SHX_SET2, SHX_SET3, SHX_SET4, SHX_SET4A}; char us_vcodes[] = {0, 2, 3, 4, 10, 11, 12, 13, 14, 30, 31}; char us_vcode_lens[] = {2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5}; char us_sets[][11] = {{ 0, ' ', 'e', 0, 't', 'a', 'o', 'i', 'n', 's', 'r'}, { 0, 'l', 'c', 'd', 'h', 'u', 'p', 'm', 'b', 'g', 'w'}, {'f', 'y', 'v', 'k', 'q', 'j', 'x', 'z', 0, 0, 0}, { 0, '9', '0', '1', '2', '3', '4', '5', '6', '7', '8'}, {'.', ',', '-', '/', '?', '+', ' ', '(', ')', '$', '@'}, {';', '#', ':', '<', '^', '*', '"', '{', '}', '[', ']'}, {'=', '%', '\'', '>', '&', '_', '!', '\\', '|', '~', '`'}}; // {{ 0, ' ', 'e', 0, 't', 'a', 'o', 'i', 'n', 's', 'r'}, // { 0, 'l', 'c', 'd', 'h', 'u', 'p', 'm', 'b', 'g', 'w'}, // {'f', 'y', 'v', 'k', 'q', 'j', 'x', 'z', 0, 0, 0}, // { 0, '9', '0', '1', '2', '3', '4', '5', '6', '7', '8'}, // {'.', ',', '-', '/', '=', '+', ' ', '(', ')', '$', '%'}, // {'&', ';', ':', '<', '>', '*', '"', '{', '}', '[', ']'}, // {'@', '?', '\'', '^', '#', '_', '!', '\\', '|', '~', '`'}}; unsigned int c_95[95] ; unsigned char l_95[95] ; void init_coder() { for (int i = 0; i < 7; i++) { for (int j = 0; j < 11; j++) { char c = us_sets[i][j]; if (c != 0 && c != 32) { int ascii = c - 32; //int prev_code = c_95[ascii]; //int prev_code_len = l_95[ascii]; switch (i) { case SHX_SET1: // just us_vcode c_95[ascii] = (us_vcodes[j] << (16 - us_vcode_lens[j])); l_95[ascii] = us_vcode_lens[j]; //checkPreus_vcodes(c, prev_code, prev_code_len, c_95[ascii], l_95[ascii]); if (c >= 'a' && c <= 'z') { ascii -= ('a' - 'A'); //prev_code = c_95[ascii]; //prev_code_len = l_95[ascii]; c_95[ascii] = (2 << 12) + (us_vcodes[j] << (12 - us_vcode_lens[j])); l_95[ascii] = 4 + us_vcode_lens[j]; } break; case SHX_SET1A: // 000 + us_vcode c_95[ascii] = 0 + (us_vcodes[j] << (13 - us_vcode_lens[j])); l_95[ascii] = 3 + us_vcode_lens[j]; //checkPreus_vcodes(c, prev_code, prev_code_len, c_95[ascii], l_95[ascii]); if (c >= 'a' && c <= 'z') { ascii -= ('a' - 'A'); //prev_code = c_95[ascii]; //prev_code_len = l_95[ascii]; c_95[ascii] = (2 << 12) + 0 + (us_vcodes[j] << (9 - us_vcode_lens[j])); l_95[ascii] = 4 + 3 + us_vcode_lens[j]; } break; case SHX_SET1B: // 00110 + us_vcode c_95[ascii] = (6 << 11) + (us_vcodes[j] << (11 - us_vcode_lens[j])); l_95[ascii] = 5 + us_vcode_lens[j]; //checkPreus_vcodes(c, prev_code, prev_code_len, c_95[ascii], l_95[ascii]); if (c >= 'a' && c <= 'z') { ascii -= ('a' - 'A'); //prev_code = c_95[ascii]; //prev_code_len = l_95[ascii]; c_95[ascii] = (2 << 12) + (6 << 7) + (us_vcodes[j] << (7 - us_vcode_lens[j])); l_95[ascii] = 4 + 5 + us_vcode_lens[j]; } break; case SHX_SET2: // 0011100 + us_vcode c_95[ascii] = (28 << 9) + (us_vcodes[j] << (9 - us_vcode_lens[j])); l_95[ascii] = 7 + us_vcode_lens[j]; break; case SHX_SET3: // 0011101 + us_vcode c_95[ascii] = (29 << 9) + (us_vcodes[j] << (9 - us_vcode_lens[j])); l_95[ascii] = 7 + us_vcode_lens[j]; break; case SHX_SET4: // 0011110 + us_vcode c_95[ascii] = (30 << 9) + (us_vcodes[j] << (9 - us_vcode_lens[j])); l_95[ascii] = 7 + us_vcode_lens[j]; break; case SHX_SET4A: // 0011111 + us_vcode c_95[ascii] = (31 << 9) + (us_vcodes[j] << (9 - us_vcode_lens[j])); l_95[ascii] = 7 + us_vcode_lens[j]; } //checkPreus_vcodes(c, prev_code, prev_code_len, c_95[ascii], l_95[ascii]); } } } c_95[0] = 16384; l_95[0] = 3; } int main(int argv, char *args[]) { init_coder(); printf("uint16_t c_95[95] PROGMEM = {"); for (uint8_t i = 0; i<95; i++) { if (i) { printf(", "); } printf("0x%04X", c_95[i]); } printf(" };\n"); printf("uint8_t l_95[95] PROGMEM = {"); for (uint8_t i = 0; i<95; i++) { if (i) { printf(", "); } printf("%6d", l_95[i]); } printf(" };\n"); printf("\n\n"); printf("uint16_t c_95[95] PROGMEM = {"); for (uint8_t i = 0; i<95; i++) { if (i) { printf(", "); } printf("%5d", c_95[i]); } printf(" };\n"); printf("uint8_t l_95[95] PROGMEM = {"); for (uint8_t i = 0; i<95; i++) { if (i) { printf(", "); } printf("%5d", l_95[i]); } printf(" };\n"); printf("uint16_t cl_95[95] PROGMEM = {"); for (uint8_t i = 0; i<95; i++) { if (i) { printf(", "); } printf("0x%04X + %2d", c_95[i], l_95[i]); } printf(" };\n"); }
/* * This file is part of Cleanflight. * * Cleanflight is free software. You can redistribute * this software and/or modify this software under the terms of the * GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) * any later version. * * Cleanflight 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 software. * * If not, see <http://www.gnu.org/licenses/>. */ #pragma once #define SPEKTRUM_MAX_SUPPORTED_CHANNEL_COUNT 12 #define SPEKTRUM_2048_CHANNEL_COUNT 12 #define SPEKTRUM_1024_CHANNEL_COUNT 7 #define SPEKTRUM_SAT_BIND_DISABLED 0 #define SPEKTRUM_SAT_BIND_MAX 10 #define SPEK_FRAME_SIZE 16 #define SRXL_FRAME_OVERHEAD 5 #define SRXL_FRAME_SIZE_MAX (SPEK_FRAME_SIZE + SRXL_FRAME_OVERHEAD) #define SPEKTRUM_NEEDED_FRAME_INTERVAL 5000 #define SPEKTRUM_BAUDRATE 115200 // Spektrum system type values #define SPEKTRUM_DSM2_22 0x01 #define SPEKTRUM_DSM2_11 0x12 #define SPEKTRUM_DSMX_22 0xa2 #define SPEKTRUM_DSMX_11 0xb2 extern uint32_t spekChannelData[SPEKTRUM_MAX_SUPPORTED_CHANNEL_COUNT]; extern bool srxlEnabled; extern int32_t resolution; extern uint8_t rssi_channel; // Stores the RX RSSI channel. void spektrumBind(rxConfig_t *rxConfig); bool spektrumInit(const rxConfig_t *rxConfig, rxRuntimeState_t *rxRuntimeState); bool srxlTelemetryBufferEmpty(); void srxlRxWriteTelemetryData(const void *data, int len); bool srxlRxIsActive(void);
/* -*- c++ -*- */ /* * Copyright 2003,2004 Free Software Foundation, Inc. * * This file is part of GNU Radio * * GNU Radio 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 3, or (at your option) * any later version. * * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ /* * WARNING: This file is automatically generated by * generate_gr_fir_util.py. * * Any changes made to this file will be overwritten. */ #ifndef INCLUDED_GR_FIR_UTIL_H #define INCLUDED_GR_FIR_UTIL_H /*! * \brief routines to create gr_fir_XXX's * * This class handles selecting the fastest version of the finite * implulse response filter available for your platform. This * interface should be used by the rest of the system for creating * gr_fir_XXX's. * * The trailing suffix has the form _IOT where I codes the input type, * O codes the output type, and T codes the tap type. * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), * 'i' (short) */ #include <gr_core_api.h> #include <gr_types.h> class gr_fir_ccf; class gr_fir_fcc; class gr_fir_ccc; class gr_fir_fff; class gr_fir_scc; class gr_fir_fsf; // structures returned by get_gr_fir_XXX_info methods struct GR_CORE_API gr_fir_ccf_info { const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" gr_fir_ccf *(*create)(const std::vector<float> &taps); }; struct GR_CORE_API gr_fir_fcc_info { const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" gr_fir_fcc *(*create)(const std::vector<gr_complex> &taps); }; struct GR_CORE_API gr_fir_ccc_info { const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" gr_fir_ccc *(*create)(const std::vector<gr_complex> &taps); }; struct GR_CORE_API gr_fir_fff_info { const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" gr_fir_fff *(*create)(const std::vector<float> &taps); }; struct GR_CORE_API gr_fir_scc_info { const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" gr_fir_scc *(*create)(const std::vector<gr_complex> &taps); }; struct GR_CORE_API gr_fir_fsf_info { const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" gr_fir_fsf *(*create)(const std::vector<float> &taps); }; struct GR_CORE_API gr_fir_util { // create a fast version of gr_fir_XXX. static gr_fir_ccf *create_gr_fir_ccf (const std::vector<float> &taps); static gr_fir_fcc *create_gr_fir_fcc (const std::vector<gr_complex> &taps); static gr_fir_ccc *create_gr_fir_ccc (const std::vector<gr_complex> &taps); static gr_fir_fff *create_gr_fir_fff (const std::vector<float> &taps); static gr_fir_scc *create_gr_fir_scc (const std::vector<gr_complex> &taps); static gr_fir_fsf *create_gr_fir_fsf (const std::vector<float> &taps); // Get information about all gr_fir_XXX implementations. // This is useful for benchmarking, testing, etc without having to // know a priori what's linked into this image // // The caller must pass in a valid pointer to a vector. // The vector will be filled with structs describing the // available implementations. static void get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info); static void get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info); static void get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info); static void get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info); static void get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info); static void get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info); }; #endif /* INCLUDED_GR_FIR_UTIL_H */
@interface UIImage (ImageUtils) - (UIImage *) maskWithColor:(UIColor *)color; @end
#include <stdio.h> int main(int argc, char *argv[]) { printf("Hello World!\n"); return 0; }
// // File: NexusIOSequence.h // Created by: Julien Dutheil // Created on: Wed May 27 16:15 2009 // /* Copyright or © or Copr. Bio++ Development Team, (November 17, 2004) This software is a computer program whose purpose is to provide classes for sequences analysis. This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL license as circulated by CEA, CNRS and INRIA at the following URL "http://www.cecill.info". As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors have only limited liability. In this respect, the user's attention is drawn to the risks associated with loading, using, modifying and/or developing or reproducing the software by the user in light of its specific status of free software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions as regards security. The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms. */ #ifndef _NEXUSIOSEQUENCE_H_ #define _NEXUSIOSEQUENCE_H_ #include "AbstractIAlignment.h" #include "../Sequence.h" #include "../Container/SequenceContainer.h" #include "../Container/VectorSequenceContainer.h" #include "../Container/AlignedSequenceContainer.h" // From the STL: #include <iostream> namespace bpp { /** * @brief The Nexus format reader for sequences. * * An AlignedSequenceContainer is used instead of a VectorSequenceContainer. * * This reader is not supposed to be a full parser of the Nexus files, * but only extract the sequence data. Only a basic subset of the options * are and will be supported. * * This format is described in the following paper: * Maddison D, Swofford D, and Maddison W (1997), _Syst Biol_ 46(4):590-621 * * @author Julien Dutheil */ class NexusIOSequence: public AbstractIAlignment, public virtual ISequence { protected: /** * @brief The maximum number of chars to be written on a line. */ unsigned int charsByLine_; bool checkNames_; public: /** * @brief Build a new Phylip file reader. * * @param charsByLine The number of base to display in a row (ignored for now, no writing support). * @param checkSequenceNames Tell if the names in the file should be checked for unicity (slower, in o(n*n) where n is the number of sequences). */ NexusIOSequence(unsigned int charsByLine = 100, bool checkSequenceNames = true): charsByLine_(charsByLine), checkNames_(checkSequenceNames) {} virtual ~NexusIOSequence() {} public: /** * @name The AbstractIAlignment interface. * * @{ */ void appendAlignmentFromStream(std::istream& input, SiteContainer& sc) const throw (Exception); /** @} */ /** * @name The ISequence interface. * * As a SiteContainer is a subclass of SequenceContainer, we hereby implement the ISequence * interface by downcasting the interface. * * @{ */ virtual SequenceContainer* readSequences(std::istream& input, const Alphabet* alpha) const throw (Exception) { return readAlignment(input, alpha); } virtual SequenceContainer* readSequences(const std::string& path, const Alphabet* alpha) const throw (Exception) { return readAlignment(path, alpha); } /** @} */ /** * @name The IOSequence interface. * * @{ */ const std::string getFormatName() const; const std::string getFormatDescription() const; /** @} */ /** * @return true if the names are to be checked when reading sequences from files. */ bool checkNames() const { return checkNames_; } /** * @brief Tell whether the sequence names should be checked when reading from files. * * @param yn whether the sequence names should be checked when reading from files. */ void checkNames(bool yn) { checkNames_ = yn; } private: //Reading tools: const std::vector<std::string> splitNameAndSequence_(const std::string & s) const throw (Exception); }; } //end of namespace bpp. #endif //_NEXUSIOSEQUENCE_H_
#ifndef MAP_STR_H_INCLUDED #define MAP_STR_H_INCLUDED #define MAP_STR_MAX_LOAD_FACTOR 0.5 #define MAP_STR_RESERVED_EMPTY NULL #define MAP_STR_RESERVED_DELETED ((char *) 1) //#define map_str_insert_rvalue(m, k, v) do {__typeof__(v) __value[] = {(v)}; map_str_insert((m), (k), __value);} while (0) typedef struct map_str_key map_str_key_t; typedef struct map_str map_str; struct map_str { char **keys; void *values; size_t value_size; size_t size; size_t deleted; size_t capacity; size_t watermark; double max_load_factor; void (*release)(char *, void *); void (*clone)(void *, void *, size_t); }; /* allocators */ map_str *map_str_new(size_t); void map_str_init(map_str *, size_t); void map_str_release(map_str *, void (*)(char *, void *)); void map_str_clone(map_str *, void (*)(void*, void*, size_t)); void map_str_free(map_str *); /* capacity */ size_t map_str_size(map_str *); /* element access */ void *map_str_get(map_str *, size_t); void map_str_put(map_str *, size_t, char *, void *); void *map_str_at(map_str *, char *); /* element lookup */ size_t map_str_find(map_str *, char *); /* modifiers */ size_t map_str_insert(map_str *, char *, void *); void map_str_erase(map_str *, char *); void map_str_clear(map_str *); /* buckets */ size_t map_str_bucket_count(map_str *); /* hash policy */ void map_str_max_load_factor(map_str *, double); void map_str_rehash(map_str *, size_t); void map_str_reserve(map_str *, size_t); /* iterators */ size_t map_str_begin(map_str *); size_t map_str_next(map_str *, size_t); size_t map_str_end(map_str *); /* internals */ size_t map_str_find_free(map_str *, char *); size_t map_str_next_inclusive(map_str *, size_t); size_t map_str_roundup_size(size_t); void *map_str_data_offset(void *, size_t); void map_str_stabilize_key(map_str *, size_t, char *); #endif /* MAP_STR_H_INCLUDED */
//===- header.h -----------------------------------------------------------===// // // The MCLinker Project // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef MCLD_${CLASS_NAME}_H #define MCLD_${CLASS_NAME}_H namespace mcld { /** \class ${class_name} * \brief ${brief} */ class ${class_name} { }; } // namespace of mcld #endif
/********************************************************************* CombLayer : MNCPX Input builder * File: testInclude/testDBMaterial.h * * Copyright (c) 2004-2014 by Stuart Ansell * * 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 3 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, see <http://www.gnu.org/licenses/>. * ****************************************************************************/ #ifndef testDBMaterial_h #define testDBMaterial_h /*! \class testDBMaterial \brief Tests the DBMaterial class \author S. Ansell \date April 2014 \version 1.0 */ class testDBMaterial { private: //Tests int testCombine(); public: testDBMaterial(); ~testDBMaterial(); int applyTest(const int); }; #endif
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Authors: Jeffrey Stedfast <fejj@ximian.com> * * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * * This program 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 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef CAMEL_DISABLE_DEPRECATED #ifndef __CAMEL_DIGEST_STORE_H__ #define __CAMEL_DIGEST_STORE_H__ #include <glib.h> #include <camel/camel-store.h> #define CAMEL_DIGEST_STORE(obj) CAMEL_CHECK_CAST (obj, camel_digest_store_get_type (), CamelDigestStore) #define CAMEL_DIGEST_STORE_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_digest_store_get_type (), CamelDigestStoreClass) #define CAMEL_IS_DIGEST_STORE(obj) CAMEL_CHECK_TYPE (obj, camel_digest_store_get_type ()) G_BEGIN_DECLS typedef struct _CamelDigestStoreClass CamelDigestStoreClass; struct _CamelDigestStore { CamelStore parent; }; struct _CamelDigestStoreClass { CamelStoreClass parent_class; }; CamelType camel_digest_store_get_type (void); CamelStore *camel_digest_store_new (const gchar *url); G_END_DECLS #endif /* __CAMEL_DIGEST_STORE_H__ */ #endif /* CAMEL_DISABLE_DEPRECATED */
#ifndef QTKEYPADBRIDGE_H #define QTKEYPADBRIDGE_H #include <QKeyEvent> /* This class is used by every Widget which wants to interact with the * virtual keypad. Simply call QtKeypadBridge::keyPressEvent or keyReleaseEvent * to relay the key events into the virtual calc. */ class QtKeypadBridge : public QObject { public: static void keyPressEvent(QKeyEvent *event); static void keyReleaseEvent(QKeyEvent *event); virtual bool eventFilter(QObject *obj, QEvent *event); }; extern QtKeypadBridge qt_keypad_bridge; #endif // QTKEYPADBRIDGE_H
/** * \file * * \brief FPU support for SAM. * * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries. * * \asf_license_start * * \page License * * Subject to your compliance with these terms, you may use Microchip * software and any derivatives exclusively with Microchip products. * It is your responsibility to comply with third party license terms applicable * to your use of third party software (including open source software) that * may accompany Microchip software. * * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. * * \asf_license_stop * */ /* * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a> */ #ifndef _FPU_H_INCLUDED_ #define _FPU_H_INCLUDED_ #include <compiler.h> /** Address for ARM CPACR */ #define ADDR_CPACR 0xE000ED88 /** CPACR Register */ #define REG_CPACR (*((volatile uint32_t *)ADDR_CPACR)) /** * \brief Enable FPU */ __always_inline static void fpu_enable(void) { irqflags_t flags; flags = cpu_irq_save(); REG_CPACR |= (0xFu << 20); __DSB(); __ISB(); cpu_irq_restore(flags); } /** * \brief Disable FPU */ __always_inline static void fpu_disable(void) { irqflags_t flags; flags = cpu_irq_save(); REG_CPACR &= ~(0xFu << 20); __DSB(); __ISB(); cpu_irq_restore(flags); } /** * \brief Check if FPU is enabled * * \return Return ture if FPU is enabled, otherwise return false. */ __always_inline static bool fpu_is_enabled(void) { return (REG_CPACR & (0xFu << 20)); } #endif /* _FPU_H_INCLUDED_ */
#include <stdio.h> #include <sys/types.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include <curl/curl.h> #include "mem_ops.h" static void *xmalloc_fatal(size_t size) { if ( size == 0 ) return NULL; DEBUG("\n Memory FAILURE...\n"); exit(1); } void *xmalloc (size_t size) { void *ptr = malloc (size); if (ptr == NULL) return xmalloc_fatal(size); return ptr; } void *xcalloc (size_t mem, size_t size) { void *ptr = calloc (mem, size); if (ptr == NULL) return xmalloc_fatal(mem*size); return ptr; } void *xrealloc (void *ptr, size_t size) { void *p = realloc (ptr, size); if (p == NULL) return xmalloc_fatal(size); return p; } void xfree(void **ptr) { assert(ptr); if( ptr != NULL ) { free(*ptr); *ptr=NULL; } } size_t WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) { size_t realsize = size * nmemb; struct MemoryStruct *mem = (struct MemoryStruct *)data; mem->memory = xrealloc(mem->memory, mem->size + realsize + 1); if( mem->memory ) { memcpy(&(mem->memory[mem->size]), ptr, realsize); mem->size += realsize; mem->memory[mem->size] = 0; } return realsize; } int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms) { struct timeval tv; fd_set infd, outfd, errfd; int res; tv.tv_sec = timeout_ms / 1000; tv.tv_usec= (timeout_ms % 1000) * 1000; FD_ZERO(&infd); FD_ZERO(&outfd); FD_ZERO(&errfd); FD_SET(sockfd, &errfd); if(for_recv) FD_SET(sockfd, &infd); else FD_SET(sockfd, &outfd); res = select(sockfd + 1, &infd, &outfd, &errfd, &tv); return res; }
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // // File = stepresp.h // // #ifndef _STEPRESP_H_ #define _STEPRESP_H_ #include "filtfunc.h" #include "impresp.h" #include "poly.h" #include "typedefs.h" #include <fstream> class StepResponse { public: StepResponse(FilterTransFunc* trans_func, int num_resp_pts, double delta_t); void GenerateResponse(void); protected: ImpulseResponse* Imp_Resp; double Delta_Time; int Num_Resp_Pts; std::ofstream* Response_File; }; #endif
/* Copyright (C) 2014 Demokratiappen. * * This file is part of Demokratiappen. * * Demokratiappen 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 3 of the License, or * (at your option) any later version. * * Demokratiappen 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 Demokratiappen. If not, see <http://www.gnu.org/licenses/>. */ #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
/* * 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 SkSweepGradient_DEFINED #define SkSweepGradient_DEFINED #include "SkGradientShaderPriv.h" class SkSweepGradient : public SkGradientShaderBase { public: SkSweepGradient(SkScalar cx, SkScalar cy, const Descriptor&); class SweepGradientContext : public SkGradientShaderBase::GradientShaderBaseContext { public: SweepGradientContext(const SkSweepGradient& shader, const ContextRec&); void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; private: typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; }; GradientType asAGradient(GradientInfo* info) const override; #if SK_SUPPORT_GPU sk_sp<GrFragmentProcessor> asFragmentProcessor(const AsFPArgs&) const override; #endif SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSweepGradient) protected: void flatten(SkWriteBuffer& buffer) const override; size_t onContextSize(const ContextRec&) const override; Context* onCreateContext(const ContextRec&, void* storage) const override; private: const SkPoint fCenter; friend class SkGradientShader; typedef SkGradientShaderBase INHERITED; }; #endif
/* ========================================================================= malamute - command-line service Copyright (c) the Contributors as noted in the AUTHORS file. This file is part of the Malamute Project 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/. ========================================================================= */ /* @header The Malamute Protocol is a persistent pub-sub protocol along with other things. To be expanded. @discuss @end */ #include "mlm_classes.h" #define STRINGIFY(s) PRIMITIVE_STRINGIFY(s) #define PRIMITIVE_STRINGIFY(s) #s #define MLM_VERSION_MAJOR_STR STRINGIFY(MLM_VERSION_MAJOR) #define MLM_VERSION_MINOR_STR STRINGIFY(MLM_VERSION_MINOR) #define MLM_VERSION_PATCH_STR STRINGIFY(MLM_VERSION_PATCH) #define PRODUCT "Malamute service/" \ MLM_VERSION_MAJOR_STR"." \ MLM_VERSION_MINOR_STR"." \ MLM_VERSION_PATCH_STR #define COPYRIGHT "Copyright (c) 2014-16 the Contributors" #define NOWARRANTY \ "This Software is provided under the MPLv2 License on an \"as is\" basis,\n" \ "without warranty of any kind, either expressed, implied, or statutory.\n" int main (int argc, char *argv []) { puts (PRODUCT); puts (COPYRIGHT); puts (NOWARRANTY); int argn = 1; bool verbose = false; bool force_foreground = false; if (argc > argn && streq (argv [argn], "-v")) { verbose = true; argn++; } if (argc > argn && streq (argv [argn], "-f")) { force_foreground = true; argn++; } if (argc > argn && streq (argv [argn], "-h")) { puts ("Usage: malamute [ -v ] [ -f ] [ -h | config-file ]"); puts (" Default config-file is 'malamute.cfg'"); return 0; } // Collect configuration file name const char *config_file = "malamute.cfg"; if (argc > argn) { config_file = argv [argn]; argn++; } zsys_init (); // Keep old behavior unless specified otherwise. if (!getenv ("ZSYS_LOGSYSTEM")) { zsys_set_logsystem(true); } zsys_set_pipehwm (0); zsys_set_sndhwm (0); zsys_set_rcvhwm (0); // Load config file for our own use here zsys_info ("loading configuration from '%s'...", config_file); zconfig_t *config = zconfig_load (config_file); if (!config) { zsys_info ("'%s' is missing, creating with defaults:", config_file); config = zconfig_new ("root", NULL); zconfig_put (config, "server/timeout", "5000"); zconfig_put (config, "server/background", "0"); zconfig_put (config, "server/workdir", "."); zconfig_put (config, "server/verbose", "0"); zconfig_put (config, "mlm_server/security/mechanism", "null"); zconfig_put (config, "mlm_server/bind/endpoint", MLM_DEFAULT_ENDPOINT); zconfig_print (config); zconfig_save (config, config_file); } // Do we want to run broker in the background? int as_daemon = !force_foreground && atoi (zconfig_resolve (config, "server/background", "0")); const char *workdir = zconfig_resolve (config, "server/workdir", "."); if (as_daemon) { zsys_info ("switching Malamute to background..."); if (zsys_daemonize (workdir)) return -1; } // Switch to user/group to run process under, if any if (zsys_run_as ( zconfig_resolve (config, "server/lockfile", NULL), zconfig_resolve (config, "server/group", NULL), zconfig_resolve (config, "server/user", NULL))) return -1; // Install authenticator (NULL or PLAIN) zactor_t *auth = zactor_new (zauth, NULL); assert (auth); if (verbose || atoi (zconfig_resolve (config, "server/auth/verbose", "0"))) { zstr_sendx (auth, "VERBOSE", NULL); zsock_wait (auth); } // Do PLAIN password authentication if requested const char *passwords = zconfig_resolve (config, "server/auth/plain", NULL); if (passwords) { zstr_sendx (auth, "PLAIN", passwords, NULL); zsock_wait (auth); } // Start Malamute server instance zactor_t *server = zactor_new (mlm_server, "Malamute"); if (verbose) zstr_send (server, "VERBOSE"); zstr_sendx (server, "LOAD", config_file, NULL); // Accept and print any message back from server while (true) { char *message = zstr_recv (server); if (message) { puts (message); free (message); } else { puts ("interrupted"); break; } } // Shutdown all services zactor_destroy (&server); zactor_destroy (&auth); // Destroy config tree zconfig_destroy (&config); #if defined (__WINDOWS__) zsys_shutdown (); #endif return 0; }
/* 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. */ /** * @file mpm_winnt.h * @brief WinNT MPM specific * * @addtogroup APACHE_MPM_WINNT * @{ */ #ifndef APACHE_MPM_WINNT_H #define APACHE_MPM_WINNT_H #include "ap_listen.h" /* From service.c: */ #define SERVICE_APACHE_RESTART 128 #ifndef AP_DEFAULT_SERVICE_NAME #define AP_DEFAULT_SERVICE_NAME "Apache2.2" #endif #define SERVICECONFIG9X "Software\\Microsoft\\Windows\\CurrentVersion\\RunServices" #define SERVICECONFIG "System\\CurrentControlSet\\Services\\%s" #define SERVICEPARAMS "System\\CurrentControlSet\\Services\\%s\\Parameters" apr_status_t mpm_service_set_name(apr_pool_t *p, const char **display_name, const char *set_name); apr_status_t mpm_merge_service_args(apr_pool_t *p, apr_array_header_t *args, int fixed_args); apr_status_t mpm_service_to_start(const char **display_name, apr_pool_t *p); apr_status_t mpm_service_started(void); apr_status_t mpm_service_install(apr_pool_t *ptemp, int argc, char const* const* argv, int reconfig); apr_status_t mpm_service_uninstall(void); apr_status_t mpm_service_start(apr_pool_t *ptemp, int argc, char const* const* argv); void mpm_signal_service(apr_pool_t *ptemp, int signal); void mpm_service_stopping(void); void mpm_start_console_handler(void); void mpm_start_child_console_handler(void); /* From nt_eventlog.c: */ void mpm_nt_eventlog_stderr_open(const char *display_name, apr_pool_t *p); void mpm_nt_eventlog_stderr_flush(void); /* From winnt.c: */ extern int use_acceptex; extern int winnt_mpm_state; extern OSVERSIONINFO osver; extern void clean_child_exit(int); void setup_signal_names(char *prefix); typedef enum { SIGNAL_PARENT_SHUTDOWN, SIGNAL_PARENT_RESTART, SIGNAL_PARENT_RESTART_GRACEFUL } ap_signal_parent_e; AP_DECLARE(void) ap_signal_parent(ap_signal_parent_e type); /* * The Windoes MPM uses a queue of completion contexts that it passes * between the accept threads and the worker threads. Declare the * functions to access the queue and the structures passed on the * queue in the header file to enable modules to access them * if necessary. The queue resides in the MPM. */ #ifdef CONTAINING_RECORD #undef CONTAINING_RECORD #endif #define CONTAINING_RECORD(address, type, field) ((type *)( \ (PCHAR)(address) - \ (PCHAR)(&((type *)0)->field))) #if APR_HAVE_IPV6 #define PADDED_ADDR_SIZE (sizeof(SOCKADDR_IN6)+16) #else #define PADDED_ADDR_SIZE (sizeof(SOCKADDR_IN)+16) #endif typedef struct CompContext { struct CompContext *next; OVERLAPPED Overlapped; apr_socket_t *sock; SOCKET accept_socket; char buff[2*PADDED_ADDR_SIZE]; struct sockaddr *sa_server; int sa_server_len; struct sockaddr *sa_client; int sa_client_len; apr_pool_t *ptrans; apr_bucket_alloc_t *ba; short socket_family; } COMP_CONTEXT, *PCOMP_CONTEXT; typedef enum { IOCP_CONNECTION_ACCEPTED = 1, IOCP_WAIT_FOR_RECEIVE = 2, IOCP_WAIT_FOR_TRANSMITFILE = 3, IOCP_SHUTDOWN = 4 } io_state_e; PCOMP_CONTEXT mpm_get_completion_context(void); void mpm_recycle_completion_context(PCOMP_CONTEXT pCompContext); apr_status_t mpm_post_completion_context(PCOMP_CONTEXT pCompContext, io_state_e state); void hold_console_open_on_error(void); /* From child.c: */ void child_main(apr_pool_t *pconf); #endif /* APACHE_MPM_WINNT_H */ /** @} */
/* libquvi-scripts * Copyright (C) 2013 Mohamed El Morabity <melmorabity@fedoraproject.org> * Copyright (C) 2013 Toni Gundogdu <legatvs@gmail.com> * * This file is part of libquvi-scripts <http://quvi.sourceforge.net>. * * 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, either * version 3 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 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 * <http://www.gnu.org/licenses/>. */ #include "config.h" #include <string.h> #include <glib.h> #include <quvi.h> #include "tests.h" static const gchar *URLs[] = { "http://www.canalplus.fr/c-sport/c-football/c-football-coupe-du-monde-2014/pid3610-c-videos-cdm-2014.html?vid=973283", "http://www.d8.tv/c-divertissement/d8-palmashow/pid5036-vbb-saison-2.html?vid=776533", "http://www.d17.tv/docs-mags/pid6273-musique.html?vid=933914", NULL }; static const gchar *TITLEs[] = { "Coupe du Monde 2014", "Very Bad Blagues - Saison 2", "Pink Floyd : Behind «the wall»", NULL }; static const gchar *IDs[] = { "973283", "776533", "933914", NULL }; static void test_media_canalplus() { struct qm_test_exact_s e; struct qm_test_opts_s o; gint i; for (i=0; URLs[i] != NULL; ++i) { memset(&e, 0, sizeof(e)); memset(&o, 0, sizeof(o)); e.title = TITLEs[i]; e.id = IDs[i]; qm_test(__func__, URLs[i], &e, &o); } } gint main(gint argc, gchar **argv) { g_test_init(&argc, &argv, NULL); g_test_add_func("/media/canalplus", test_media_canalplus); return (g_test_run()); } /* vim: set ts=2 sw=2 tw=72 expandtab: */
#ifndef RC4RAND_H #define RC4RAND_H #include <stdint.h> void rc4srand(uint64_t seed); uint32_t rc4rand(void); uint64_t rc4rand64(void); #endif
/****************************************************************/ /* MOOSE - Multiphysics Object Oriented Simulation Environment */ /* */ /* All contents are licensed under LGPL V2.1 */ /* See LICENSE for full restrictions */ /****************************************************************/ #ifndef COMPUTEELASTICITYTENSORBASE_H #define COMPUTEELASTICITYTENSORBASE_H #include "Material.h" #include "ElasticityTensorR4.h" /** * ComputeElasticityTensorBase the base class for computing elasticity tensors */ class ComputeElasticityTensorBase : public DerivativeMaterialInterface<Material> { public: ComputeElasticityTensorBase(const std:: string & name, InputParameters parameters); protected: virtual void computeQpProperties(); virtual void computeQpElasticityTensor() = 0; std::string _base_name; MaterialProperty<ElasticityTensorR4> & _elasticity_tensor; /// prefactor function to multiply the elasticity tensor with Function * const _prefactor_function; }; #endif //COMPUTEELASTICITYTENSORBASE_H
/************************************************************************** ** ** This file is part of Qt Creator ** ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Nokia Corporation (info@qt.nokia.com) ** ** ** GNU Lesser General Public License Usage ** ** This file may be used 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. ** Please review the following information to ensure the GNU Lesser General ** Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** Other Usage ** ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** If you have questions regarding the use of this file, please contact ** Nokia at info@qt.nokia.com. ** **************************************************************************/ #ifndef ANNOTATIONHIGHLIGHTER_H #define ANNOTATIONHIGHLIGHTER_H #include <vcsbase/baseannotationhighlighter.h> namespace CVS { namespace Internal { // Annotation highlighter for cvs triggering on 'changenumber ' class CVSAnnotationHighlighter : public VCSBase::BaseAnnotationHighlighter { Q_OBJECT public: explicit CVSAnnotationHighlighter(const ChangeNumbers &changeNumbers, QTextDocument *document = 0); private: virtual QString changeNumber(const QString &block) const; const QChar m_blank; }; } // namespace Internal } // namespace CVS #endif // ANNOTATIONHIGHLIGHTER_H
/* This file is part of the WebKit open source project. This file has been generated by generate-bindings.pl. DO NOT MODIFY! 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 JSClipboard_h #define JSClipboard_h #include "JSDOMBinding.h" #include <runtime/JSGlobalObject.h> #include <runtime/ObjectPrototype.h> namespace WebCore { class Clipboard; class JSClipboard : public DOMObject { typedef DOMObject Base; public: JSClipboard(PassRefPtr<JSC::Structure>, PassRefPtr<Clipboard>); virtual ~JSClipboard(); static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValuePtr, JSC::PutPropertySlot&); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; static PassRefPtr<JSC::Structure> createStructure(JSC::JSValuePtr prototype) { return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } static JSC::JSValuePtr getConstructor(JSC::ExecState*); // Custom attributes JSC::JSValuePtr types(JSC::ExecState*) const; // Custom functions JSC::JSValuePtr clearData(JSC::ExecState*, const JSC::ArgList&); JSC::JSValuePtr getData(JSC::ExecState*, const JSC::ArgList&); JSC::JSValuePtr setData(JSC::ExecState*, const JSC::ArgList&); JSC::JSValuePtr setDragImage(JSC::ExecState*, const JSC::ArgList&); Clipboard* impl() const { return m_impl.get(); } private: RefPtr<Clipboard> m_impl; }; JSC::JSValuePtr toJS(JSC::ExecState*, Clipboard*); Clipboard* toClipboard(JSC::JSValuePtr); class JSClipboardPrototype : public JSC::JSObject { public: static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); virtual const JSC::ClassInfo* classInfo() const { return &s_info; } static const JSC::ClassInfo s_info; virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); static PassRefPtr<JSC::Structure> createStructure(JSC::JSValuePtr prototype) { return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType)); } JSClipboardPrototype(PassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { } }; // Functions JSC::JSValuePtr jsClipboardPrototypeFunctionClearData(JSC::ExecState*, JSC::JSObject*, JSC::JSValuePtr, const JSC::ArgList&); JSC::JSValuePtr jsClipboardPrototypeFunctionGetData(JSC::ExecState*, JSC::JSObject*, JSC::JSValuePtr, const JSC::ArgList&); JSC::JSValuePtr jsClipboardPrototypeFunctionSetData(JSC::ExecState*, JSC::JSObject*, JSC::JSValuePtr, const JSC::ArgList&); JSC::JSValuePtr jsClipboardPrototypeFunctionSetDragImage(JSC::ExecState*, JSC::JSObject*, JSC::JSValuePtr, const JSC::ArgList&); // Attributes JSC::JSValuePtr jsClipboardDropEffect(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSClipboardDropEffect(JSC::ExecState*, JSC::JSObject*, JSC::JSValuePtr); JSC::JSValuePtr jsClipboardEffectAllowed(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); void setJSClipboardEffectAllowed(JSC::ExecState*, JSC::JSObject*, JSC::JSValuePtr); JSC::JSValuePtr jsClipboardTypes(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); JSC::JSValuePtr jsClipboardConstructor(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&); } // namespace WebCore #endif
/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms and ** conditions see http://www.qt.io/terms-conditions. For further information ** use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 or version 3 as published by the Free ** Software Foundation and appearing in the file LICENSE.LGPLv21 and ** LICENSE.LGPLv3 included in the packaging of this file. Please review the ** following information to ensure the GNU Lesser General Public License ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, The Qt Company gives you certain additional ** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ****************************************************************************/ #ifndef SETTINGSPAGE_H #define SETTINGSPAGE_H #include "ui_settingspage.h" #include <vcsbase/vcsbaseoptionspage.h> #include <QWidget> #include <QPointer> #include <QString> QT_BEGIN_NAMESPACE class QSettings; QT_END_NAMESPACE namespace Subversion { namespace Internal { class SettingsPageWidget : public VcsBase::VcsClientOptionsPageWidget { Q_OBJECT public: explicit SettingsPageWidget(QWidget *parent = 0); VcsBase::VcsBaseClientSettings settings() const; void setSettings(const VcsBase::VcsBaseClientSettings &s); private: Ui::SettingsPage m_ui; }; class SettingsPage : public VcsBase::VcsClientOptionsPage { Q_OBJECT public: SettingsPage(Core::IVersionControl *control); }; } // namespace Subversion } // namespace Internal #endif // SETTINGSPAGE_H
// Spatial Index Library // // Copyright (C) 2002 Navel Ltd. // // 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 // // Email: // mhadji@gmail.com #pragma once namespace SpatialIndex { namespace StorageManager { class DiskStorageManager : public SpatialIndex::IStorageManager { public: DiskStorageManager(Tools::PropertySet&); virtual ~DiskStorageManager(); void flush(); virtual void loadByteArray(const id_type page, uint32_t& len, byte** data); virtual void storeByteArray(id_type& page, const uint32_t len, const byte* const data); virtual void deleteByteArray(const id_type page); private: class Entry { public: uint32_t m_length; std::vector<id_type> m_pages; }; std::fstream m_dataFile; std::fstream m_indexFile; uint32_t m_pageSize; id_type m_nextPage; std::priority_queue<id_type, std::vector<id_type>, std::greater<id_type> > m_emptyPages; std::map<id_type, Entry*> m_pageIndex; byte* m_buffer; }; // DiskStorageManager } }
/* * ion/ioncore/float-placement.c * * Copyright (c) Tuomo Valkonen 1999-2009. * * See the included file LICENSE for details. */ #include <string.h> #include "common.h" #include "group.h" #include "float-placement.h" WFloatPlacement ioncore_placement_method=PLACEMENT_LRUD; static void random_placement(WRectangle box, WRectangle *g) { box.w-=g->w; box.h-=g->h; g->x=box.x+(box.w<=0 ? 0 : rand()%box.w); g->y=box.y+(box.h<=0 ? 0 : rand()%box.h); } static void ggeom(WRegion *reg, WRectangle *geom) { *geom=REGION_GEOM(reg); } static bool st_filt(WStacking *st, void *lvl) { uint level=*(uint*)lvl; return (st->reg!=NULL && REGION_IS_MAPPED(st->reg) && st->level==level); } #define FOR_ALL_STACKING_NODES(VAR, WS, LVL, TMP) \ for(stacking_iter_init(&(TMP), group_get_stacking(ws), \ st_filt, &LVL), \ VAR=stacking_iter_nodes(&(TMP)); \ VAR!=NULL; \ VAR=stacking_iter_nodes(&(TMP))) #define IGNORE_ST(ST, WS) ((ST)->reg==NULL || (ST)==(WS)->bottom) static WRegion* is_occupied(WGroup *ws, uint level, const WRectangle *r) { WStackingIterTmp tmp; WStacking *st; WRectangle p; FOR_ALL_STACKING_NODES(st, ws, level, tmp){ ggeom(st->reg, &p); if(r->x>=p.x+p.w) continue; if(r->y>=p.y+p.h) continue; if(r->x+r->w<=p.x) continue; if(r->y+r->h<=p.y) continue; return st->reg; } return NULL; } static int next_least_x(WGroup *ws, uint level, int x) { WRectangle p; int retx=REGION_GEOM(ws).x+REGION_GEOM(ws).w; WStackingIterTmp tmp; WStacking *st; FOR_ALL_STACKING_NODES(st, ws, level, tmp){ ggeom(st->reg, &p); if(p.x+p.w>x && p.x+p.w<retx) retx=p.x+p.w; } return retx+1; } static int next_lowest_y(WGroup *ws, uint level, int y) { WRectangle p; int rety=REGION_GEOM(ws).y+REGION_GEOM(ws).h; WStackingIterTmp tmp; WStacking *st; FOR_ALL_STACKING_NODES(st, ws, level, tmp){ ggeom(st->reg, &p); if(p.y+p.h>y && p.y+p.h<rety) rety=p.y+p.h; } return rety+1; } static bool tiling_placement(WGroup *ws, uint level, WRectangle *g) { WRegion *p; WRectangle r, r2; int maxx, maxy; r=REGION_GEOM(ws); r.w=g->w; r.h=g->h; maxx=REGION_GEOM(ws).x+REGION_GEOM(ws).w; maxy=REGION_GEOM(ws).y+REGION_GEOM(ws).h; if(ioncore_placement_method==PLACEMENT_UDLR){ while(r.x<maxx){ p=is_occupied(ws, level, &r); while(p!=NULL && r.y+r.h<maxy){ ggeom(p, &r2); r.y=r2.y+r2.h+1; p=is_occupied(ws, level, &r); } if(r.y+r.h<maxy && r.x+r.w<maxx){ g->x=r.x; g->y=r.y; return TRUE; }else{ r.x=next_least_x(ws, level, r.x); r.y=0; } } }else{ while(r.y<maxy){ p=is_occupied(ws, level, &r); while(p!=NULL && r.x+r.w<maxx){ ggeom(p, &r2); r.x=r2.x+r2.w+1; p=is_occupied(ws, level, &r); } if(r.y+r.h<maxy && r.x+r.w<maxx){ g->x=r.x; g->y=r.y; return TRUE; }else{ r.y=next_lowest_y(ws, level, r.y); r.x=0; } } } return FALSE; } void group_calc_placement(WGroup *ws, uint level, WRectangle *geom) { if(ioncore_placement_method!=PLACEMENT_RANDOM){ if(tiling_placement(ws, level, geom)) return; } random_placement(REGION_GEOM(ws), geom); }
/************************************************************************** ** ** Copyright (C) 2013 by Philip Schuchardt ** www.cavewhere.com ** **************************************************************************/ #ifndef SMALLQT3D_GLOBAL_H #define SMALLQT3D_GLOBAL_H #include <QtCore/qglobal.h> #if defined(Q_MATH_3D) # define Q_MATH_3D_EXPORT Q_DECL_EXPORT #else # define Q_MATH_3D_EXPORT Q_DECL_IMPORT #endif #endif // SMALLQT3D_GLOBAL_H
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE 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) version 2.1 dated February 1999. * * $Revision$ ***********************************************************************EHEADER*/ #ifndef cfei_hypre_h_included #define cfei_hypre_h_included /* This file is part of Sandia National Laboratories copyrighted software. You are legally liable for any unauthorized use of this software. NOTICE: The United States Government has granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable worldwide license in this data to reproduce, prepare derivative works, and perform publicly and display publicly. Beginning five (5) years after June 5, 1997, the United States Government is granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable worldwide license in this data to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so. NEITHER THE UNITED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT OF ENERGY, NOR SANDIA CORPORATION, NOR ANY OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS. */ #include <stdlib.h> #include <string.h> //#include "basicTypes.h" //#include "cfei.h" #include "cfei_hypre.h" #endif /*cfei_hypre_h_included*/
/* XMMS2 - X Music Multiplexer System * Copyright (C) 2003-2009 XMMS2 Team * * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!! * * 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. */ #include <xmmsclient/xmmsclient.h> #include <xmmsclient/xmmsclient-glib.h> #include <ruby.h> #include <xmmsc/xmmsc_stdbool.h> #include "rb_xmmsclient.h" void Init_xmmsclient_glib (void); static VALUE c_add_to_glib_mainloop (VALUE self) { RbXmmsClient *xmms = NULL; Data_Get_Struct (self, RbXmmsClient, xmms); xmms->gmain_handle = xmmsc_mainloop_gmain_init (xmms->real); return self; } static VALUE c_remove_from_glib_mainloop (VALUE self) { RbXmmsClient *xmms = NULL; Data_Get_Struct (self, RbXmmsClient, xmms); xmmsc_mainloop_gmain_shutdown (xmms->real, xmms->gmain_handle); return self; } void Init_xmmsclient_glib (void) { VALUE m, c; rb_require ("xmmsclient"); rb_require ("glib2"); m = rb_const_get (rb_cModule, rb_intern ("Xmms")); c = rb_const_get (m, rb_intern ("Client")); rb_define_method (c, "add_to_glib_mainloop", c_add_to_glib_mainloop, 0); rb_define_method (c, "remove_from_glib_mainloop", c_remove_from_glib_mainloop, 0); }
// ============================================================== // RTL generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC // Version: 2013.4 // Copyright (C) 2013 Xilinx Inc. All rights reserved. // // =========================================================== #ifndef _nfa_get_finals_HH_ #define _nfa_get_finals_HH_ #include "systemc.h" #include "AESL_pkg.h" namespace ap_rtl { struct nfa_get_finals : public sc_module { // Port declarations 18 sc_in_clk ap_clk; sc_in< sc_logic > ap_rst; sc_in< sc_logic > ap_start; sc_out< sc_logic > ap_done; sc_out< sc_logic > ap_idle; sc_out< sc_logic > ap_ready; sc_out< sc_logic > nfa_finals_buckets_req_din; sc_in< sc_logic > nfa_finals_buckets_req_full_n; sc_out< sc_logic > nfa_finals_buckets_req_write; sc_in< sc_logic > nfa_finals_buckets_rsp_empty_n; sc_out< sc_logic > nfa_finals_buckets_rsp_read; sc_out< sc_lv<32> > nfa_finals_buckets_address; sc_in< sc_lv<32> > nfa_finals_buckets_datain; sc_out< sc_lv<32> > nfa_finals_buckets_dataout; sc_out< sc_lv<32> > nfa_finals_buckets_size; sc_in< sc_logic > ap_ce; sc_out< sc_lv<32> > ap_return_0; sc_out< sc_lv<32> > ap_return_1; // Module declarations nfa_get_finals(sc_module_name name); SC_HAS_PROCESS(nfa_get_finals); ~nfa_get_finals(); sc_trace_file* mVcdFile; sc_signal< sc_lv<1> > ap_CS_fsm; sc_signal< sc_logic > ap_reg_ppiten_pp0_it0; sc_signal< sc_logic > ap_reg_ppiten_pp0_it1; sc_signal< sc_lv<32> > nfa_finals_buckets_read_reg_55; sc_signal< sc_logic > ap_reg_ppiten_pp0_it0_preg; sc_signal< sc_lv<1> > ap_NS_fsm; sc_signal< sc_logic > ap_sig_pprstidle_pp0; sc_signal< bool > ap_sig_bdd_117; sc_signal< bool > ap_sig_bdd_119; sc_signal< bool > ap_sig_bdd_116; static const sc_logic ap_const_logic_1; static const sc_logic ap_const_logic_0; static const sc_lv<1> ap_ST_pp0_stg0_fsm_0; static const sc_lv<1> ap_ST_pp0_stg1_fsm_1; static const sc_lv<32> ap_const_lv32_1; static const sc_lv<32> ap_const_lv32_0; // Thread declarations void thread_ap_clk_no_reset_(); void thread_ap_done(); void thread_ap_idle(); void thread_ap_ready(); void thread_ap_reg_ppiten_pp0_it0(); void thread_ap_return_0(); void thread_ap_return_1(); void thread_ap_sig_bdd_116(); void thread_ap_sig_bdd_117(); void thread_ap_sig_bdd_119(); void thread_ap_sig_pprstidle_pp0(); void thread_nfa_finals_buckets_address(); void thread_nfa_finals_buckets_dataout(); void thread_nfa_finals_buckets_req_din(); void thread_nfa_finals_buckets_req_write(); void thread_nfa_finals_buckets_rsp_read(); void thread_nfa_finals_buckets_size(); void thread_ap_NS_fsm(); }; } using namespace ap_rtl; #endif
///////////////////////////////////////////////////////////////////////////// // Name: wx/statbmp.h // Purpose: wxStaticBitmap class interface // Author: Vadim Zeitlin // Modified by: // Created: 25.08.00 // Copyright: (c) 2000 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_STATBMP_H_BASE_ #define _WX_STATBMP_H_BASE_ #include "wx/defs.h" #if wxUSE_STATBMP #include "wx/control.h" #include "wx/bitmap.h" #include "wx/icon.h" extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBitmapNameStr[]; // a control showing an icon or a bitmap class WXDLLIMPEXP_CORE wxStaticBitmapBase : public wxControl { public: wxStaticBitmapBase() { } virtual ~wxStaticBitmapBase(); // our interface virtual void SetIcon(const wxIcon& icon) = 0; virtual void SetBitmap(const wxBitmap& bitmap) = 0; virtual wxBitmap GetBitmap() const = 0; virtual wxIcon GetIcon() const /* = 0 -- should be pure virtual */ { // stub it out here for now as not all ports implement it (but they // should) return wxIcon(); } // overridden base class virtuals virtual bool AcceptsFocus() const { return false; } virtual bool HasTransparentBackground() { return true; } protected: // choose the default border for this window virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } virtual wxSize DoGetBestSize() const; wxDECLARE_NO_COPY_CLASS(wxStaticBitmapBase); }; #if defined(__WXUNIVERSAL__) #include "wx/univ/statbmp.h" #elif defined(__WXMSW__) #include "wx/msw/statbmp.h" #elif defined(__WXMOTIF__) #include "wx/motif/statbmp.h" #elif defined(__WXGTK20__) #include "wx/gtk/statbmp.h" #elif defined(__WXGTK__) #include "wx/gtk1/statbmp.h" #elif defined(__WXMAC__) #include "wx/osx/statbmp.h" #elif defined(__WXCOCOA__) #include "wx/cocoa/statbmp.h" #elif defined(__WXPM__) #include "wx/os2/statbmp.h" #endif #endif // wxUSE_STATBMP #endif // _WX_STATBMP_H_BASE_
/****************************************************************************** * FileName: os_printf.c * Description: Alternate SDK (libmain.a) * (c) PV` 2015 *******************************************************************************/ #include "bios.h" #include <stdarg.h> #include "sdk/rom2ram.h" #include "sdk/os_printf.h" extern char * _sprintf_buf; // 0x3FFFE360 extern char print_mem_buf[1024]; // 0x3FFFE364..0x3FFFEA80 max 1820 bytes extern bool system_get_os_print(void); //============================================================================= // FLASH code (ICACHE_FLASH_ATTR) //============================================================================= //============================================================================= // int os_printf_plus(const char *format, ...) // Использует буфер в области RAM-BIOS //----------------------------------------------------------------------------- int ICACHE_FLASH_ATTR __wrap_os_printf_plus(const char *format, ...) //int ICACHE_FLASH_ATTR rom_printf(const char *format, ...) { int i = 0; if(system_get_os_print()) { va_list args; va_start(args, format); i = ets_vprintf(ets_write_char, ((uint32)format >> 30)? rom_strcpy(print_mem_buf, (void *)format, sizeof(print_mem_buf)-1) : format, args); va_end (args); } return i; } //============================================================================= // int os_sprintf_plus(char *str, const char *format, ...) // Использует буфер в области RAM-BIOS // Вывод может быть расположен в IRAM //----------------------------------------------------------------------------- void ICACHE_FLASH_ATTR _sprintf_out(char c) { if(_sprintf_buf != NULL) { write_align4_chr(_sprintf_buf++, c); // *_sprintf_buf++ = c; write_align4_chr(_sprintf_buf, 0); // *_sprintf_buf = 0; } } int ICACHE_FLASH_ATTR ets_sprintf(char *str, const char *format, ...) { _sprintf_buf = str; va_list args; va_start(args, format); int i = ets_vprintf(_sprintf_out, ((uint32)format >> 30)? rom_strcpy(print_mem_buf, (void *)format, sizeof(print_mem_buf)-1) : format, args); va_end (args); return i; }
/* * This file is part of the swblocks-baselib library. * * 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 __BL_UUIDITERATOR_H_ #define __BL_UUIDITERATOR_H_ #include <baselib/core/ObjModel.h> #include <baselib/core/ObjModelDefs.h> #include <baselib/core/Uuid.h> #include <baselib/core/BaseIncludes.h> BL_IID_DECLARE( UuidIterator, "8b1aade6-2360-4fff-9a36-5d41930ff728" ) namespace bl { /** * @brief interface UuidIterator */ class UuidIterator : public om::Object { BL_DECLARE_INTERFACE( UuidIterator ) public: virtual bool hasCurrent() const NOEXCEPT = 0; virtual void loadNext() = 0; virtual const uuid_t& current() const NOEXCEPT = 0; virtual void reset() = 0; }; } // bl #endif /* __BL_UUIDITERATOR_H_ */
/* * hdlc_pg.c: packet generator gre interface * * Copyright (c) 2012 Cisco and/or its affiliates. * 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 <vlib/vlib.h> #include <vnet/pg/pg.h> #include <vnet/gre/gre.h> typedef struct { pg_edit_t flags_and_version; pg_edit_t protocol; } pg_gre_header_t; static inline void pg_gre_header_init (pg_gre_header_t * e) { pg_edit_init (&e->flags_and_version, gre_header_t, flags_and_version); pg_edit_init (&e->protocol, gre_header_t, protocol); } uword unformat_pg_gre_header (unformat_input_t * input, va_list * args) { pg_stream_t *s = va_arg (*args, pg_stream_t *); pg_gre_header_t *h; u32 group_index, error; h = pg_create_edit_group (s, sizeof (h[0]), sizeof (gre_header_t), &group_index); pg_gre_header_init (h); pg_edit_set_fixed (&h->flags_and_version, 0); error = 1; if (!unformat (input, "%U", unformat_pg_edit, unformat_gre_protocol_net_byte_order, &h->protocol)) goto done; { gre_main_t *pm = &gre_main; gre_protocol_info_t *pi = 0; pg_node_t *pg_node = 0; if (h->protocol.type == PG_EDIT_FIXED) { u16 t = *(u16 *) h->protocol.values[PG_EDIT_LO]; pi = gre_get_protocol_info (pm, clib_net_to_host_u16 (t)); if (pi && pi->node_index != ~0) pg_node = pg_get_node (pi->node_index); } if (pg_node && pg_node->unformat_edit && unformat_user (input, pg_node->unformat_edit, s)) ; } error = 0; done: if (error) pg_free_edit_group (s); return error == 0; } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */
// // GADNativeAdDelegate.h // Google Mobile Ads SDK // // Copyright 2015 Google LLC. All rights reserved. // #import <Foundation/Foundation.h> #import <GoogleMobileAds/GoogleMobileAdsDefines.h> @class GADNativeAd; NS_ASSUME_NONNULL_BEGIN /// Identifies native ad assets. @protocol GADNativeAdDelegate <NSObject> @optional #pragma mark Ad Lifecycle Events /// Called when an impression is recorded for an ad. Only called for Google ads and is not supported /// for mediation ads. - (void)nativeAdDidRecordImpression:(GADNativeAd *)nativeAd; /// Called when a click is recorded for an ad. Only called for Google ads and is not supported for /// mediation ads. - (void)nativeAdDidRecordClick:(GADNativeAd *)nativeAd; #pragma mark Click-Time Lifecycle Notifications /// Called just before presenting the user a full screen view, such as a browser, in response to /// clicking on an ad. Use this opportunity to stop animations, time sensitive interactions, etc. /// /// Normally the user looks at the ad, dismisses it, and control returns to your application with /// the nativeAdDidDismissScreen: message. However, if the user hits the Home button or clicks on an /// App Store link, your application will end. The next method called will be the /// applicationWillResignActive: of your UIApplicationDelegate object.Immediately after that, /// nativeAdWillLeaveApplication: is called. - (void)nativeAdWillPresentScreen:(GADNativeAd *)nativeAd; /// Called just before dismissing a full screen view. - (void)nativeAdWillDismissScreen:(GADNativeAd *)nativeAd; /// Called just after dismissing a full screen view. Use this opportunity to restart anything you /// may have stopped as part of nativeAdWillPresentScreen:. - (void)nativeAdDidDismissScreen:(GADNativeAd *)nativeAd; /// Called just before the application will go to the background or terminate due to an ad action /// that will launch another application (such as the App Store). The normal UIApplicationDelegate /// methods, like applicationDidEnterBackground:, will be called immediately before this. - (void)nativeAdWillLeaveApplication:(GADNativeAd *)nativeAd; @end NS_ASSUME_NONNULL_END
/* * 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 _DECAF_INTERNAL_NET_NETWORK_H_ #define _DECAF_INTERNAL_NET_NETWORK_H_ #include <decaf/util/Config.h> #include <decaf/util/concurrent/Mutex.h> #include <decaf/internal/util/Resource.h> #include <decaf/internal/util/GenericResource.h> namespace decaf { namespace internal { namespace net { class NetworkData; /** * Internal class used to manage Networking related resources and hide platform * dependent calls from the higher level API. * * @since 1.0 */ class DECAF_API Network { private: NetworkData* data; static Network* networkRuntime; private: Network(const Network&); Network& operator=(const Network&); protected: Network(); public: virtual ~Network(); /** * Gets a pointer to the Network Runtime's Lock object, this can be used by * Network layer APIs to synchronize around certain actions such as adding * a resource to the Network layer, etc. * * The pointer returned is owned by the Network runtime and should not be * deleted or copied by the caller. * * @return a pointer to the Network Runtime's single Lock instance. */ decaf::util::concurrent::Mutex* getRuntimeLock(); /** * Adds a Resource to the Network Runtime, this resource will be held by the * runtime until the Library shutdown method is called at which time all the * Resources held by the Network Runtime are destroyed. * * @param value * The Resource to add to the Network Runtime. * * @throw NullPointerException if the Resource value passed is null. */ void addNetworkResource(decaf::internal::util::Resource* value); template<typename T> void addAsResource(T* value) { util::GenericResource<T>* resource = new util::GenericResource<T>(value); this->addNetworkResource(resource); } /** * Register a Runnable to be called when the Network Runtime is shutdown to provide * a chance to cleanup any data or references that could cause problems should the * Network Runtime be re-initialized. The Runnable pointer ownership is transfered * to the NetworkRuntime to guarantee the timing of resource cleanup. * * The cleanup tasks are run at a critical time in the Shutdown process and should * be as simple as possible and make every attempt to not throw any exceptions. If an * exception is thrown it is ignored and processing of the next task is started. * * The tasks should not assume that any Network resources are still available and * should execute as quickly as possible. * * @param task * Pointer to a Runnable object that will now be owned by the Network Runtime. */ void addShutdownTask(decaf::lang::Runnable* task); public: // Static methods /** * Gets the one and only instance of the Network class, if this is called before * the Network layer has been initialized or after it has been shutdown then an * IllegalStateException is thrown. * * @return pointer to the Network runtime for the Decaf library. */ static Network* getNetworkRuntime(); /** * Initialize the Networking layer. */ static void initializeNetworking(); /** * Shutdown the Network layer and free any associated resources, classes in the * Decaf library that use the networking layer will now fail if used after calling * the shutdown method. */ static void shutdownNetworking(); }; }}} #endif /* _DECAF_INTERNAL_NET_NETWORK_H_ */
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/athena/Athena_EXPORTS.h> #include <aws/athena/AthenaRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace Athena { namespace Model { /** */ class AWS_ATHENA_API GetDataCatalogRequest : public AthenaRequest { public: GetDataCatalogRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "GetDataCatalog"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The name of the data catalog to return.</p> */ inline const Aws::String& GetName() const{ return m_name; } /** * <p>The name of the data catalog to return.</p> */ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** * <p>The name of the data catalog to return.</p> */ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** * <p>The name of the data catalog to return.</p> */ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** * <p>The name of the data catalog to return.</p> */ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** * <p>The name of the data catalog to return.</p> */ inline GetDataCatalogRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** * <p>The name of the data catalog to return.</p> */ inline GetDataCatalogRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** * <p>The name of the data catalog to return.</p> */ inline GetDataCatalogRequest& WithName(const char* value) { SetName(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet; }; } // namespace Model } // namespace Athena } // namespace Aws
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/directconnect/DirectConnect_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/directconnect/model/Connection.h> #include <utility> namespace Aws { template<typename RESULT_TYPE> class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace DirectConnect { namespace Model { class AWS_DIRECTCONNECT_API DescribeHostedConnectionsResult { public: DescribeHostedConnectionsResult(); DescribeHostedConnectionsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); DescribeHostedConnectionsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); /** * <p>The connections.</p> */ inline const Aws::Vector<Connection>& GetConnections() const{ return m_connections; } /** * <p>The connections.</p> */ inline void SetConnections(const Aws::Vector<Connection>& value) { m_connections = value; } /** * <p>The connections.</p> */ inline void SetConnections(Aws::Vector<Connection>&& value) { m_connections = std::move(value); } /** * <p>The connections.</p> */ inline DescribeHostedConnectionsResult& WithConnections(const Aws::Vector<Connection>& value) { SetConnections(value); return *this;} /** * <p>The connections.</p> */ inline DescribeHostedConnectionsResult& WithConnections(Aws::Vector<Connection>&& value) { SetConnections(std::move(value)); return *this;} /** * <p>The connections.</p> */ inline DescribeHostedConnectionsResult& AddConnections(const Connection& value) { m_connections.push_back(value); return *this; } /** * <p>The connections.</p> */ inline DescribeHostedConnectionsResult& AddConnections(Connection&& value) { m_connections.push_back(std::move(value)); return *this; } private: Aws::Vector<Connection> m_connections; }; } // namespace Model } // namespace DirectConnect } // namespace Aws
/** ****************************************************************************** * @file SYSCFG/SYSCFG_PVD/stm32f0xx_it.h * @author MCD Application Team * @version V1.3.0 * @date 16-January-2014 * @brief This file contains the headers of the interrupt handlers. ****************************************************************************** * @attention * * <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2> * * Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2 * * 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. * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STM32F0XX_IT_H #define __STM32F0XX_IT_H #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "stm32f0xx.h" /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void NMI_Handler(void); void HardFault_Handler(void); void SVC_Handler(void); void PendSV_Handler(void); void SysTick_Handler(void); void PPP_Handler(void); #ifdef __cplusplus } #endif #endif /* __STM32F0XX_IT_H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % CCCC OOO N N V V EEEEE RRRR TTTTT % % C O O NN N V V E R R T % % C O O N N N V V EEE RRRR T % % C O O N NN V V E R R T % % CCCC OOO N N V EEEEE R R T % % % % % % Convert an image from one format to another. % % % % Software Design % % John Cristy % % April 1992 % % % % % % Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization % % dedicated to making software imaging solutions freely available. % % % % You may not use this file except in compliance with the License. You may % % obtain a copy of the License at % % % % http://www.imagemagick.org/script/license.php % % % % 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. % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Convert converts an input file using one image format to an output file % with a differing image format. By default, the image format is determined % by its magic number. To specify a particular image format, precede the % filename with an image format name and a colon (i.e. ps:image) or specify % the image type as the filename suffix (i.e. image.ps). Specify file as - % for standard input or output. If file has the extension .Z, the file is % decoded with uncompress. % % */ /* Include declarations. */ #include "wand/studio.h" #include "wand/MagickWand.h" /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % M a i n % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % */ static int ConvertMain(int argc,char **argv) { ExceptionInfo *exception; ImageInfo *image_info; MagickBooleanType status; MagickCoreGenesis(*argv,MagickTrue); exception=AcquireExceptionInfo(); image_info=AcquireImageInfo(); status=MagickCommandGenesis(image_info,ConvertImageCommand,argc,argv, (char **) NULL,exception); image_info=DestroyImageInfo(image_info); exception=DestroyExceptionInfo(exception); MagickCoreTerminus(); return(status); } #if !defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(__CYGWIN__) || defined(__MINGW32__) int main(int argc,char **argv) { return(ConvertMain(argc,argv)); } #else int wmain(int argc,wchar_t *argv[]) { char **utf8; int status; register int i; utf8=NTArgvToUTF8(argc,argv); status=ConvertMain(argc,utf8); for (i=0; i < argc; i++) utf8[i]=DestroyString(utf8[i]); utf8=(char **) RelinquishMagickMemory(utf8); return(status); } #endif
/* lsm6dsl_spi.c - SPI routines for LSM6DSL driver */ /* * Copyright (c) 2018 STMicroelectronics * * SPDX-License-Identifier: Apache-2.0 */ #include <string.h> #include <spi.h> #include "lsm6dsl.h" #define LSM6DSL_SPI_READ (1 << 7) #if defined(CONFIG_LSM6DSL_SPI_GPIO_CS) static struct spi_cs_control lsm6dsl_cs_ctrl; #endif #define SPI_CS NULL static struct spi_config lsm6dsl_spi_conf = { .frequency = CONFIG_LSM6DSL_SPI_BUS_FREQ, .operation = (SPI_OP_MODE_MASTER | SPI_MODE_CPOL | SPI_MODE_CPHA | SPI_WORD_SET(8) | SPI_LINES_SINGLE), .slave = CONFIG_LSM6DSL_SPI_SELECT_SLAVE, .cs = SPI_CS, }; static int lsm6dsl_raw_read(struct lsm6dsl_data *data, u8_t reg_addr, u8_t *value, u8_t len) { struct spi_config *spi_cfg = &lsm6dsl_spi_conf; u8_t buffer_tx[2] = { reg_addr | LSM6DSL_SPI_READ, 0 }; const struct spi_buf tx_buf = { .buf = buffer_tx, .len = 2, }; const struct spi_buf_set tx = { .buffers = &tx_buf, .count = 1 }; const struct spi_buf rx_buf[2] = { { .buf = NULL, .len = 1, }, { .buf = value, .len = len, } }; const struct spi_buf_set rx = { .buffers = rx_buf, .count = 2 }; if (len > 64) { return -EIO; } if (spi_transceive(data->comm_master, spi_cfg, &tx, &rx)) { return -EIO; } return 0; } static int lsm6dsl_raw_write(struct lsm6dsl_data *data, u8_t reg_addr, u8_t *value, u8_t len) { struct spi_config *spi_cfg = &lsm6dsl_spi_conf; u8_t buffer_tx[1] = { reg_addr & ~LSM6DSL_SPI_READ }; const struct spi_buf tx_buf[2] = { { .buf = buffer_tx, .len = 1, }, { .buf = value, .len = len, } }; const struct spi_buf_set tx = { .buffers = tx_buf, .count = 2 }; if (len > 64) { return -EIO; } if (spi_write(data->comm_master, spi_cfg, &tx)) { return -EIO; } return 0; } static int lsm6dsl_spi_read_data(struct lsm6dsl_data *data, u8_t reg_addr, u8_t *value, u8_t len) { return lsm6dsl_raw_read(data, reg_addr, value, len); } static int lsm6dsl_spi_write_data(struct lsm6dsl_data *data, u8_t reg_addr, u8_t *value, u8_t len) { return lsm6dsl_raw_write(data, reg_addr, value, len); } static int lsm6dsl_spi_read_reg(struct lsm6dsl_data *data, u8_t reg_addr, u8_t *value) { return lsm6dsl_raw_read(data, reg_addr, value, 1); } static int lsm6dsl_spi_update_reg(struct lsm6dsl_data *data, u8_t reg_addr, u8_t mask, u8_t value) { u8_t tmp_val; lsm6dsl_raw_read(data, reg_addr, &tmp_val, 1); tmp_val = (tmp_val & ~mask) | (value & mask); return lsm6dsl_raw_write(data, reg_addr, &tmp_val, 1); } static const struct lsm6dsl_transfer_function lsm6dsl_spi_transfer_fn = { .read_data = lsm6dsl_spi_read_data, .write_data = lsm6dsl_spi_write_data, .read_reg = lsm6dsl_spi_read_reg, .update_reg = lsm6dsl_spi_update_reg, }; int lsm6dsl_spi_init(struct device *dev) { struct lsm6dsl_data *data = dev->driver_data; data->hw_tf = &lsm6dsl_spi_transfer_fn; #if defined(CONFIG_LSM6DSL_SPI_GPIO_CS) /* handle SPI CS thru GPIO if it is the case */ if (IS_ENABLED(CONFIG_LSM6DSL_SPI_GPIO_CS)) { lsm6dsl_cs_ctrl.gpio_dev = device_get_binding( CONFIG_LSM6DSL_SPI_GPIO_CS_DRV_NAME); if (!lsm6dsl_cs_ctrl.gpio_dev) { SYS_LOG_ERR("Unable to get GPIO SPI CS device"); return -ENODEV; } lsm6dsl_cs_ctrl.gpio_pin = CONFIG_LSM6DSL_SPI_GPIO_CS_PIN; lsm6dsl_cs_ctrl.delay = 0; lsm6dsl_spi_conf.cs = &lsm6dsl_cs_ctrl; SYS_LOG_DBG("SPI GPIO CS configured on %s:%u", CONFIG_LSM6DSL_SPI_GPIO_CS_DRV_NAME, CONFIG_LSM6DSL_SPI_GPIO_CS_PIN); } #endif return 0; }
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/chime/Chime_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/chime/model/AppInstanceUserSummary.h> #include <utility> namespace Aws { template<typename RESULT_TYPE> class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace Chime { namespace Model { class AWS_CHIME_API ListAppInstanceUsersResult { public: ListAppInstanceUsersResult(); ListAppInstanceUsersResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); ListAppInstanceUsersResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); /** * <p>The ARN of the <code>AppInstance</code>.</p> */ inline const Aws::String& GetAppInstanceArn() const{ return m_appInstanceArn; } /** * <p>The ARN of the <code>AppInstance</code>.</p> */ inline void SetAppInstanceArn(const Aws::String& value) { m_appInstanceArn = value; } /** * <p>The ARN of the <code>AppInstance</code>.</p> */ inline void SetAppInstanceArn(Aws::String&& value) { m_appInstanceArn = std::move(value); } /** * <p>The ARN of the <code>AppInstance</code>.</p> */ inline void SetAppInstanceArn(const char* value) { m_appInstanceArn.assign(value); } /** * <p>The ARN of the <code>AppInstance</code>.</p> */ inline ListAppInstanceUsersResult& WithAppInstanceArn(const Aws::String& value) { SetAppInstanceArn(value); return *this;} /** * <p>The ARN of the <code>AppInstance</code>.</p> */ inline ListAppInstanceUsersResult& WithAppInstanceArn(Aws::String&& value) { SetAppInstanceArn(std::move(value)); return *this;} /** * <p>The ARN of the <code>AppInstance</code>.</p> */ inline ListAppInstanceUsersResult& WithAppInstanceArn(const char* value) { SetAppInstanceArn(value); return *this;} /** * <p>The information for each requested <code>AppInstanceUser</code>.</p> */ inline const Aws::Vector<AppInstanceUserSummary>& GetAppInstanceUsers() const{ return m_appInstanceUsers; } /** * <p>The information for each requested <code>AppInstanceUser</code>.</p> */ inline void SetAppInstanceUsers(const Aws::Vector<AppInstanceUserSummary>& value) { m_appInstanceUsers = value; } /** * <p>The information for each requested <code>AppInstanceUser</code>.</p> */ inline void SetAppInstanceUsers(Aws::Vector<AppInstanceUserSummary>&& value) { m_appInstanceUsers = std::move(value); } /** * <p>The information for each requested <code>AppInstanceUser</code>.</p> */ inline ListAppInstanceUsersResult& WithAppInstanceUsers(const Aws::Vector<AppInstanceUserSummary>& value) { SetAppInstanceUsers(value); return *this;} /** * <p>The information for each requested <code>AppInstanceUser</code>.</p> */ inline ListAppInstanceUsersResult& WithAppInstanceUsers(Aws::Vector<AppInstanceUserSummary>&& value) { SetAppInstanceUsers(std::move(value)); return *this;} /** * <p>The information for each requested <code>AppInstanceUser</code>.</p> */ inline ListAppInstanceUsersResult& AddAppInstanceUsers(const AppInstanceUserSummary& value) { m_appInstanceUsers.push_back(value); return *this; } /** * <p>The information for each requested <code>AppInstanceUser</code>.</p> */ inline ListAppInstanceUsersResult& AddAppInstanceUsers(AppInstanceUserSummary&& value) { m_appInstanceUsers.push_back(std::move(value)); return *this; } /** * <p>The token passed by previous API calls until all requested users are * returned.</p> */ inline const Aws::String& GetNextToken() const{ return m_nextToken; } /** * <p>The token passed by previous API calls until all requested users are * returned.</p> */ inline void SetNextToken(const Aws::String& value) { m_nextToken = value; } /** * <p>The token passed by previous API calls until all requested users are * returned.</p> */ inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); } /** * <p>The token passed by previous API calls until all requested users are * returned.</p> */ inline void SetNextToken(const char* value) { m_nextToken.assign(value); } /** * <p>The token passed by previous API calls until all requested users are * returned.</p> */ inline ListAppInstanceUsersResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;} /** * <p>The token passed by previous API calls until all requested users are * returned.</p> */ inline ListAppInstanceUsersResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;} /** * <p>The token passed by previous API calls until all requested users are * returned.</p> */ inline ListAppInstanceUsersResult& WithNextToken(const char* value) { SetNextToken(value); return *this;} private: Aws::String m_appInstanceArn; Aws::Vector<AppInstanceUserSummary> m_appInstanceUsers; Aws::String m_nextToken; }; } // namespace Model } // namespace Chime } // namespace Aws
/* * Copyright 2016 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. */ #import "WebRTC/RTCMetricsSampleInfo.h" // Adding 'nogncheck' to disable the gn include headers check. // We don't want to depend on 'system_wrappers:metrics_default' because // clients should be able to provide their own implementation. #include "webrtc/system_wrappers/include/metrics_default.h" // nogncheck NS_ASSUME_NONNULL_BEGIN @interface RTCMetricsSampleInfo () /** Initialize an RTCMetricsSampleInfo object from native SampleInfo. */ - (instancetype)initWithNativeSampleInfo: (const webrtc::metrics::SampleInfo &)info; @end NS_ASSUME_NONNULL_END
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/wellarchitected/WellArchitected_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> namespace Aws { namespace WellArchitected { namespace Model { enum class WorkloadImprovementStatus { NOT_SET, NOT_APPLICABLE, NOT_STARTED, IN_PROGRESS, COMPLETE, RISK_ACKNOWLEDGED }; namespace WorkloadImprovementStatusMapper { AWS_WELLARCHITECTED_API WorkloadImprovementStatus GetWorkloadImprovementStatusForName(const Aws::String& name); AWS_WELLARCHITECTED_API Aws::String GetNameForWorkloadImprovementStatus(WorkloadImprovementStatus value); } // namespace WorkloadImprovementStatusMapper } // namespace Model } // namespace WellArchitected } // namespace Aws
/* * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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 <aws/ec2/EC2_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> namespace Aws { namespace EC2 { namespace Model { enum class BatchState { NOT_SET, submitted, active, cancelled, failed, cancelled_running, cancelled_terminating }; namespace BatchStateMapper { AWS_EC2_API BatchState GetBatchStateForName(const Aws::String& name); AWS_EC2_API Aws::String GetNameForBatchState(BatchState value); } // namespace BatchStateMapper } // namespace Model } // namespace EC2 } // namespace Aws
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/iot/IoT_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoT { namespace Model { /** * <p>The ThingTypeProperties contains information about the thing type including: * a thing type description, and a list of searchable thing attribute * names.</p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/ThingTypeProperties">AWS * API Reference</a></p> */ class AWS_IOT_API ThingTypeProperties { public: ThingTypeProperties(); ThingTypeProperties(Aws::Utils::Json::JsonView jsonValue); ThingTypeProperties& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** * <p>The description of the thing type.</p> */ inline const Aws::String& GetThingTypeDescription() const{ return m_thingTypeDescription; } /** * <p>The description of the thing type.</p> */ inline bool ThingTypeDescriptionHasBeenSet() const { return m_thingTypeDescriptionHasBeenSet; } /** * <p>The description of the thing type.</p> */ inline void SetThingTypeDescription(const Aws::String& value) { m_thingTypeDescriptionHasBeenSet = true; m_thingTypeDescription = value; } /** * <p>The description of the thing type.</p> */ inline void SetThingTypeDescription(Aws::String&& value) { m_thingTypeDescriptionHasBeenSet = true; m_thingTypeDescription = std::move(value); } /** * <p>The description of the thing type.</p> */ inline void SetThingTypeDescription(const char* value) { m_thingTypeDescriptionHasBeenSet = true; m_thingTypeDescription.assign(value); } /** * <p>The description of the thing type.</p> */ inline ThingTypeProperties& WithThingTypeDescription(const Aws::String& value) { SetThingTypeDescription(value); return *this;} /** * <p>The description of the thing type.</p> */ inline ThingTypeProperties& WithThingTypeDescription(Aws::String&& value) { SetThingTypeDescription(std::move(value)); return *this;} /** * <p>The description of the thing type.</p> */ inline ThingTypeProperties& WithThingTypeDescription(const char* value) { SetThingTypeDescription(value); return *this;} /** * <p>A list of searchable thing attribute names.</p> */ inline const Aws::Vector<Aws::String>& GetSearchableAttributes() const{ return m_searchableAttributes; } /** * <p>A list of searchable thing attribute names.</p> */ inline bool SearchableAttributesHasBeenSet() const { return m_searchableAttributesHasBeenSet; } /** * <p>A list of searchable thing attribute names.</p> */ inline void SetSearchableAttributes(const Aws::Vector<Aws::String>& value) { m_searchableAttributesHasBeenSet = true; m_searchableAttributes = value; } /** * <p>A list of searchable thing attribute names.</p> */ inline void SetSearchableAttributes(Aws::Vector<Aws::String>&& value) { m_searchableAttributesHasBeenSet = true; m_searchableAttributes = std::move(value); } /** * <p>A list of searchable thing attribute names.</p> */ inline ThingTypeProperties& WithSearchableAttributes(const Aws::Vector<Aws::String>& value) { SetSearchableAttributes(value); return *this;} /** * <p>A list of searchable thing attribute names.</p> */ inline ThingTypeProperties& WithSearchableAttributes(Aws::Vector<Aws::String>&& value) { SetSearchableAttributes(std::move(value)); return *this;} /** * <p>A list of searchable thing attribute names.</p> */ inline ThingTypeProperties& AddSearchableAttributes(const Aws::String& value) { m_searchableAttributesHasBeenSet = true; m_searchableAttributes.push_back(value); return *this; } /** * <p>A list of searchable thing attribute names.</p> */ inline ThingTypeProperties& AddSearchableAttributes(Aws::String&& value) { m_searchableAttributesHasBeenSet = true; m_searchableAttributes.push_back(std::move(value)); return *this; } /** * <p>A list of searchable thing attribute names.</p> */ inline ThingTypeProperties& AddSearchableAttributes(const char* value) { m_searchableAttributesHasBeenSet = true; m_searchableAttributes.push_back(value); return *this; } private: Aws::String m_thingTypeDescription; bool m_thingTypeDescriptionHasBeenSet; Aws::Vector<Aws::String> m_searchableAttributes; bool m_searchableAttributesHasBeenSet; }; } // namespace Model } // namespace IoT } // namespace Aws
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/core/client/AWSError.h> #include <aws/core/client/CoreErrors.h> #include <aws/sso-oidc/SSOOIDC_EXPORTS.h> namespace Aws { namespace SSOOIDC { enum class SSOOIDCErrors { //From Core// ////////////////////////////////////////////////////////////////////////////////////////// INCOMPLETE_SIGNATURE = 0, INTERNAL_FAILURE = 1, INVALID_ACTION = 2, INVALID_CLIENT_TOKEN_ID = 3, INVALID_PARAMETER_COMBINATION = 4, INVALID_QUERY_PARAMETER = 5, INVALID_PARAMETER_VALUE = 6, MISSING_ACTION = 7, // SDK should never allow MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow MISSING_PARAMETER = 9, // SDK should never allow OPT_IN_REQUIRED = 10, REQUEST_EXPIRED = 11, SERVICE_UNAVAILABLE = 12, THROTTLING = 13, VALIDATION = 14, ACCESS_DENIED = 15, RESOURCE_NOT_FOUND = 16, UNRECOGNIZED_CLIENT = 17, MALFORMED_QUERY_STRING = 18, SLOW_DOWN = 19, REQUEST_TIME_TOO_SKEWED = 20, INVALID_SIGNATURE = 21, SIGNATURE_DOES_NOT_MATCH = 22, INVALID_ACCESS_KEY_ID = 23, REQUEST_TIMEOUT = 24, NETWORK_CONNECTION = 99, UNKNOWN = 100, /////////////////////////////////////////////////////////////////////////////////////////// AUTHORIZATION_PENDING= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1, EXPIRED_TOKEN, INTERNAL_SERVER, INVALID_CLIENT, INVALID_CLIENT_METADATA, INVALID_GRANT, INVALID_REQUEST, INVALID_SCOPE, UNAUTHORIZED_CLIENT, UNSUPPORTED_GRANT_TYPE }; class AWS_SSOOIDC_API SSOOIDCError : public Aws::Client::AWSError<SSOOIDCErrors> { public: SSOOIDCError() {} SSOOIDCError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<SSOOIDCErrors>(rhs) {} SSOOIDCError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<SSOOIDCErrors>(rhs) {} SSOOIDCError(const Aws::Client::AWSError<SSOOIDCErrors>& rhs) : Aws::Client::AWSError<SSOOIDCErrors>(rhs) {} SSOOIDCError(Aws::Client::AWSError<SSOOIDCErrors>&& rhs) : Aws::Client::AWSError<SSOOIDCErrors>(rhs) {} template <typename T> T GetModeledError(); }; namespace SSOOIDCErrorMapper { AWS_SSOOIDC_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName); } } // namespace SSOOIDC } // namespace Aws
/* crypto/rsa/rsa_prn.c */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. 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. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * licensing@OpenSSL.org. * * 5. Products derived from this software may not be called "OpenSSL" * nor may "OpenSSL" appear in their names without prior written * permission of the OpenSSL Project. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" * * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED 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 OpenSSL PROJECT OR * ITS 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. * ==================================================================== * * This product includes cryptographic software written by Eric Young * (eay@cryptsoft.com). This product includes software written by Tim * Hudson (tjh@cryptsoft.com). * */ #include <stdio.h> #include "cryptlib.h" #include <openssl/rsa.h> #include <openssl/evp.h> #ifndef OPENSSL_NO_FP_API int RSA_print_fp(FILE *fp, const RSA *x, int off) { BIO *b; int ret; if ((b=BIO_new(BIO_s_file())) == NULL) { RSAerr(RSA_F_RSA_PRINT_FP,ERR_R_BUF_LIB); return(0); } BIO_set_fp(b,fp,BIO_NOCLOSE); ret=RSA_print(b,x,off); BIO_free(b); return(ret); } #endif int RSA_print(BIO *bp, const RSA *x, int off) { EVP_PKEY *pk; int ret; pk = EVP_PKEY_new(); if (!pk || !EVP_PKEY_set1_RSA(pk, (RSA *)x)) return 0; ret = EVP_PKEY_print_private(bp, pk, off, NULL); EVP_PKEY_free(pk); return ret; }
/*- * Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info>. All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _IA5String_H_ #define _IA5String_H_ #include <OCTET_STRING.h> #ifdef __cplusplus extern "C" { #endif typedef OCTET_STRING_t IA5String_t; /* Implemented via OCTET STRING */ /* * IA5String ASN.1 type definition. */ extern asn_TYPE_descriptor_t asn_DEF_IA5String; extern asn_TYPE_operation_t asn_OP_IA5String; asn_constr_check_f IA5String_constraint; #define IA5String_free OCTET_STRING_free #define IA5String_print OCTET_STRING_print_utf8 #define IA5String_compare OCTET_STRING_compare #define IA5String_decode_ber OCTET_STRING_decode_ber #define IA5String_encode_der OCTET_STRING_encode_der #define IA5String_decode_xer OCTET_STRING_decode_xer_utf8 #define IA5String_encode_xer OCTET_STRING_encode_xer_utf8 #define IA5String_decode_uper OCTET_STRING_decode_uper #define IA5String_encode_uper OCTET_STRING_encode_uper #ifdef __cplusplus } #endif #endif /* _IA5String_H_ */
// // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2013 Project Chrono // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file at the top level of the distribution // and at http://projectchrono.org/license-chrono.txt. // // File authors: Andrea Favali, Alessandro Tasora #ifndef CHELEMENTHEXAHEDRON_H #define CHELEMENTHEXAHEDRON_H #include "ChElement3D.h" #include "ChElementCorotational.h" namespace chrono { namespace fea { /// /// Class for hexahedral elements. /// class ChApiFea ChElementHexahedron : public ChElement3D, public ChElementCorotational // __ __ __ __ // { // / /| // protected: // /_|__ __ __ / | // ChGaussIntegrationRule* ir; // | | | // std::vector<ChGaussPoint*> GpVector; // | | | | // // | __ __ | | // // | / | / // // |__ __ __ __|/ // public: int ID; virtual void Update() { // parent class update: ChElement3D::Update(); // always keep updated the rotation matrix A: this->UpdateRotation(); }; }; } //___end of namespace fea___ } //___end of namespace chrono___ #endif
/* * Copyright (c) 2014, Michael Lehn * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1) Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2) 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. * 3) Neither the name of the FLENS development group nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * 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 * OWNER 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. */ #ifndef FLENS_SCALAROPERATIONS_LOG_H #define FLENS_SCALAROPERATIONS_LOG_H 1 #include <cxxblas/auxiliary/complex.h> #include <flens/auxiliary/auxiliary.h> #include <flens/scalartypes/impl/scalarclosure.h> namespace flens { struct ScalarOpLog {}; template <typename S> const typename ScalarClosure<ScalarOpLog, S, S>::ElementType evalScalarClosure(const ScalarClosure<ScalarOpLog, S, S> &exp); //-- operator overloading template <typename S> const ScalarClosure<ScalarOpLog, typename S::Impl, typename S::Impl> Log(const Scalar<S> &s); } // namespace flens #endif // FLENS_SCALAROPERATIONS_LOG_H
// // Copyright (C) 2013 Greg Landrum // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #ifndef _RD_MOLFRAGMENTER_H__ #define _RD_MOLFRAGMENTER_H__ #include <istream> #include <GraphMol/ROMol.h> namespace RDKit { namespace MolFragmenter { struct FragmenterBondType { unsigned int atom1Label, atom2Label; unsigned int atom1Type, atom2Type; Bond::BondType bondType; ROMOL_SPTR query; }; //! \brief Fragments a molecule by breaking a set of bonds //! /*! \param mol - the molecule to be modified \param bondIndices - indices of the bonds to be broken optional: \param addDummies - toggles addition of dummy atoms to indicate where bonds were broken \param dummyLabels - used to provide the labels to be used for the dummies. the first element in each pair is the label for the dummy that replaces the bond's beginAtom, the second is for the dummy that replaces the bond's endAtom. If not provided, the dummies are labeled with atom indices. \param bondTypes - used to provide the bond type to use between the fragments and the dummy atoms. If not provided, defaults to single. \param nCutsPerAtom - used to return the number of bonds that were cut at each atom. Should be nAtoms long. \return a new ROMol with the modifications The client is responsible for deleting this molecule. */ ROMol *fragmentOnBonds( const ROMol &mol, const std::vector<unsigned int> &bondIndices, bool addDummies = true, const std::vector<std::pair<unsigned int, unsigned int> > *dummyLabels = 0, const std::vector<Bond::BondType> *bondTypes = 0, std::vector<unsigned int> *nCutsPerAtom = 0); //! \overload ROMol *fragmentOnBonds( const ROMol &mol, const std::vector<FragmenterBondType> &bondPatterns, const std::map<unsigned int, ROMOL_SPTR> *atomEnvirons = 0, std::vector<unsigned int> *nCutsPerAtom = 0); void fragmentOnSomeBonds( const ROMol &mol, const std::vector<unsigned int> &bondIndices, std::vector<ROMOL_SPTR> &resMols, unsigned int maxToCut = 1, bool addDummies = true, const std::vector<std::pair<unsigned int, unsigned int> > *dummyLabels = 0, const std::vector<Bond::BondType> *bondTypes = 0, std::vector<std::vector<unsigned int> > *nCutsPerAtom = 0); //! \brief Fragments a molecule by breaking all BRICS bonds /*! \return a new ROMol with the modifications The client is responsible for deleting this molecule. */ ROMol *fragmentOnBRICSBonds(const ROMol &mol); void constructFragmenterAtomTypes( std::istream *inStream, std::map<unsigned int, std::string> &defs, const std::string &comment = "//", bool validate = true, std::map<unsigned int, ROMOL_SPTR> *environs = 0); void constructFragmenterAtomTypes( const std::string &str, std::map<unsigned int, std::string> &defs, const std::string &comment = "//", bool validate = true, std::map<unsigned int, ROMOL_SPTR> *environs = 0); void constructBRICSAtomTypes(std::map<unsigned int, std::string> &defs, std::map<unsigned int, ROMOL_SPTR> *environs = 0); void constructFragmenterBondTypes( std::istream *inStream, const std::map<unsigned int, std::string> &atomTypes, std::vector<FragmenterBondType> &defs, const std::string &comment = "//", bool validate = true, bool labelByConnector = true); void constructFragmenterBondTypes( const std::string &str, const std::map<unsigned int, std::string> &atomTypes, std::vector<FragmenterBondType> &defs, const std::string &comment = "//", bool validate = true, bool labelByConnector = true); void constructBRICSBondTypes(std::vector<FragmenterBondType> &defs); } } #endif
/* * * Copyright (C) 2015-2016 Valve Corporation * Copyright (C) 2015-2016 LunarG, Inc. * * 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. * * Author: Cody Northrop <cody@lunarg.com> * */ #ifndef ICD_SPV_H #define ICD_SPV_H #include <stdint.h> #define ICD_SPV_MAGIC 0x07230203 #define ICD_SPV_VERSION 99 struct icd_spv_header { uint32_t magic; uint32_t version; uint32_t gen_magic; // Generator's magic number }; #endif /* ICD_SPV_H */
//##################################################################### // Function clamp //##################################################################### #pragma once #include <geode/math/min.h> #include <geode/math/max.h> namespace geode { template<class T> static inline T clamp(const T x, const T xmin, const T xmax) { if (x<=xmin) return xmin; else if (x>=xmax) return xmax; else return x; } template<class T> static inline T clamp_min(const T x, const T xmin) { return max(x,xmin); } template<class T> static inline T clamp_max(const T x, const T xmax) { return min(x,xmax); } template<class T> static inline bool in_bounds(const T x, const T xmin, const T xmax) { return xmin<=x && x<=xmax; } }
#ifndef SIMULATOR_CONTEXT_OUTPUT_LIST_H_ #define SIMULATOR_CONTEXT_OUTPUT_LIST_H_ #include "../../common/simulator/OutputList.h" #include <stdlib.h> #include <map> #include <iostream> #include <fstream> #include <string> #include "utils.h" using namespace std; class ContextOutputList { public: map<string,OutputList*> outputMap; int contextLength; int ParsePair(string &output, string &outStr, int &outCount){ string contextStr, outCountStr; int i; for (i = 0; i < output.size(); i++) { if (output[i] == '=') { int start = 0; while(start < i and (output[start] == ' ' or output[start] == '\t')) { start++;} outStr.assign(&output[start], i-start); outCountStr.assign(&output[i+1], output.size()-i-1); outCount = atoi(outCountStr.c_str()); return 1; } } return 0; } int SampleRandomContext(string refContext, string &readContext) { // // Chec to see if there is a distribution for this ref context, if // not, just return the ref context so that things may proceed, // but return a fail code. // if (outputMap.find(refContext) == outputMap.end()) { readContext = refContext; return 0; } else { outputMap[refContext]->SelectRandomContect(readContext); return 1; } } void Read(string &inName) { ifstream in; CrucialOpen(inName, in, std::ios::in); Read(in); } void Read(ifstream &in) { int nLines = 0; contextLength = 0; while(in) { string context; if (!(in >> context)) break; contextLength = context.size(); string outputsLine; getline(in,outputsLine); // parse ctx=num; pairs int i; int e; i = 0; if (outputMap.find(context) == outputMap.end()) { outputMap[context] = new OutputList; } while(i < outputsLine.size()) { e = i+1; while(e < outputsLine.size() and outputsLine[e] != ';') e++; string pairStr; pairStr.assign(&outputsLine[i], e-i); if (e > i + 1) { string outStr; int outCount; ParsePair(pairStr, outStr, outCount); outputMap[context]->AddOutput(outStr, outCount); } i = e + 1; } outputMap[context]->StoreCumulativeCounts(); } } void Free() { map<string,OutputList*>::iterator mapIt; for (mapIt = outputMap.begin(); mapIt != outputMap.end(); ++mapIt) { delete mapIt->second; } } }; #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 WEBKIT_FILEAPI_SYNCABLE_FILE_CHANGE_H_ #define WEBKIT_FILEAPI_SYNCABLE_FILE_CHANGE_H_ #include <deque> #include <string> #include "base/basictypes.h" #include "base/file_path.h" #include "webkit/fileapi/file_system_url.h" #include "webkit/fileapi/syncable/sync_file_type.h" #include "webkit/storage/webkit_storage_export.h" namespace fileapi { class WEBKIT_STORAGE_EXPORT FileChange { public: enum ChangeType { FILE_CHANGE_ADD_OR_UPDATE, FILE_CHANGE_DELETE, }; FileChange(ChangeType change, SyncFileType file_type); bool IsAddOrUpdate() const { return change_ == FILE_CHANGE_ADD_OR_UPDATE; } bool IsDelete() const { return change_ == FILE_CHANGE_DELETE; } bool IsFile() const { return file_type_ == SYNC_FILE_TYPE_FILE; } bool IsDirectory() const { return file_type_ == SYNC_FILE_TYPE_DIRECTORY; } bool IsTypeUnknown() const { return !IsFile() && !IsDirectory(); } ChangeType change() const { return change_; } SyncFileType file_type() const { return file_type_; } std::string DebugString() const; bool operator==(const FileChange& that) const { return change() == that.change() && file_type() == that.file_type(); } private: ChangeType change_; SyncFileType file_type_; }; class WEBKIT_STORAGE_EXPORT FileChangeList { public: typedef std::deque<FileChange> List; FileChangeList(); ~FileChangeList(); // Updates the list with the |new_change|. void Update(const FileChange& new_change); size_t size() const { return list_.size(); } bool empty() const { return list_.empty(); } void clear() { list_.clear(); } const List& list() const { return list_; } const FileChange& front() const { return list_.front(); } FileChangeList PopAndGetNewList() const; std::string DebugString() const; private: List list_; }; } // namespace fileapi #endif // WEBKIT_FILEAPI_SYNCABLE_FILE_CHANGE_H_
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <stdbool.h> #include <mcheck.h> #include "../htree.h" int main(int argc, char** argv) { HTree *t = ht_open("*", 0); printf("hash %d\n", ht_get_hash(t, "@", NULL)); printf("%s\n", ht_list(t,"")); ht_clear(t); //printf("hash %d\n", ht_get_hash(t, "@", NULL)); //printf("%s\n", ht_list(t,"")); int i=0; char buf[100]; for (int k=0;k<1;k++){ for (i=0;i<200000;i++){ sprintf(buf, "/photo/photo/%d.jpg", i); //printf(buf); ht_add(t, buf, 1, 3, 0); } printf("add complete\n"); for (i=0;i<1000;i++){ sprintf(buf, "/photo/photo/%d.jpg", i); /*sprintf(buf, "/photo/photo/xxxxxxxxxxxxxxxxxxxxxxfile%d", i);*/ //ht_remove(t, buf, 0); } printf("remove complete\n"); } //remove_from_htree(buf); printf("update complete\n"); // print_tree(&tree); printf("hash %d\n", ht_get_hash(t, "@", NULL)); printf("%s\n", ht_list(t,"")); ht_close(t); return 0; }
/* Copyright 2013-2017. The Regents of the University of California. * Copyright 2016-2019. Martin Uecker. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. */ #ifndef __ITER2_H #define __ITER2_H #include "misc/cppwrap.h" #include "misc/types.h" struct linop_s; struct operator_s; struct operator_p_s; #ifndef ITER_OP_DATA_S #define ITER_OP_DATA_S typedef struct iter_op_data_s { TYPEID* TYPEID; } iter_op_data; #endif struct iter_op_op { INTERFACE(iter_op_data); const struct operator_s* op; }; struct iter_op_p_op { INTERFACE(iter_op_data); const struct operator_p_s* op; }; extern void operator_iter(iter_op_data* data, float* dst, const float* src); extern void operator_p_iter(iter_op_data* data, float rho, float* dst, const float* src); // the temporay copy is needed if used in loops #define STRUCT_TMP_COPY(x) ({ __typeof(x) __foo = (x); __typeof(__foo)* __foo2 = alloca(sizeof(__foo)); *__foo2 = __foo; __foo2; }) #define OPERATOR2ITOP(op) (struct iter_op_s){ (NULL == op) ? NULL : operator_iter, CAST_UP(STRUCT_TMP_COPY(((struct iter_op_op){ { &TYPEID(iter_op_op) }, op }))) } #define OPERATOR_P2ITOP(op) (struct iter_op_p_s){ (NULL == op) ? NULL : operator_p_iter, CAST_UP(STRUCT_TMP_COPY(((struct iter_op_p_op){ { &TYPEID(iter_op_p_op) }, op }))) } #ifndef ITER_CONF_S #define ITER_CONF_S typedef struct iter_conf_s { TYPEID* TYPEID; float alpha; } iter_conf; #endif struct iter_monitor_s; typedef void (italgo_fun2_f)(const iter_conf* conf, const struct operator_s* normaleq_op, unsigned int D, const struct operator_p_s* prox_ops[__VLA2(D)], const struct linop_s* ops[__VLA2(D)], const float* biases[__VLA2(D)], const struct operator_p_s* xupdate_op, long size, float* image, const float* image_adj, struct iter_monitor_s* monitor); typedef italgo_fun2_f* italgo_fun2_t; italgo_fun2_f iter2_conjgrad; italgo_fun2_f iter2_ist; italgo_fun2_f iter2_fista; italgo_fun2_f iter2_chambolle_pock; italgo_fun2_f iter2_admm; italgo_fun2_f iter2_pocs; italgo_fun2_f iter2_niht; // use with iter_call_s from iter.h as _conf italgo_fun2_f iter2_call_iter; struct iter2_call_s { INTERFACE(iter_conf); italgo_fun2_t fun; iter_conf* _conf; }; #include "misc/cppwrap.h" #endif
//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // This code is licensed under the MIT License (MIT). // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. // //********************************************************* #pragma once #include "Scenario2.g.h" #include "MainPage.h" namespace winrt::SDKTemplate::implementation { /// <summary> /// Getting a file's parent folder. /// </summary> struct Scenario2 : Scenario2T<Scenario2> { Scenario2(); void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs const&); fire_and_forget GetParent_Click(Windows::Foundation::IInspectable const&, Windows::UI::Xaml::RoutedEventArgs const&); private: SDKTemplate::MainPage rootPage{ MainPage::Current() }; }; } namespace winrt::SDKTemplate::factory_implementation { struct Scenario2 : Scenario2T<Scenario2, implementation::Scenario2> { }; }
#include <stdlib.h> #include <ctype.h> #include <VP_Api/vp_api.h> #include <VP_Api/vp_api_thread_helper.h> #include <VP_Api/vp_api_error.h> #include <VP_Stages/vp_stages_configs.h> #include <VP_Stages/vp_stages_io_console.h> #include <VP_Stages/vp_stages_o_sdl.h> #include <VP_Stages/vp_stages_io_com.h> #include <VP_Stages/vp_stages_io_file.h> #include <VP_Os/vp_os_print.h> #include <VP_Os/vp_os_malloc.h> #define NB_STAGES 2 static PIPELINE_HANDLE pipeline_handle; PROTO_THREAD_ROUTINE(escaper,nomParams); PROTO_THREAD_ROUTINE(app,nomParams); BEGIN_THREAD_TABLE THREAD_TABLE_ENTRY(escaper,20) THREAD_TABLE_ENTRY(app,20) END_THREAD_TABLE int main(int argc, char **argv) { START_THREAD(escaper, NO_PARAM); START_THREAD(app, argv); JOIN_THREAD(escaper); JOIN_THREAD(app); return EXIT_SUCCESS; } PROTO_THREAD_ROUTINE(app,argv) { vp_api_io_pipeline_t pipeline; vp_api_io_data_t out; vp_api_io_stage_t stages[NB_STAGES]; vp_stages_input_com_config_t icc; vp_stages_output_sdl_config_t osc; vp_com_t com; vp_com_wifi_config_t config; vp_com_wifi_connection_t connection; vp_os_memset( &icc, 0, sizeof(vp_stages_input_com_config_t)); vp_os_memset( &connection, 0, sizeof(vp_com_wifi_connection_t) ); strcpy(connection.networkName,"linksys"); vp_stages_fill_default_config(WIFI_COM_CONFIG, &config, sizeof(config)); vp_os_memset(&com, 0, sizeof(vp_com_t)); vp_stages_fill_default_config(SDL_DECODING_QCIF_CONFIG, &osc, sizeof(osc)); com.type = VP_COM_WIFI; icc.com = &com; icc.config = (vp_com_config_t*)&config; icc.connection = (vp_com_connection_t*)&connection; icc.socket.type = VP_COM_CLIENT; icc.socket.protocol = VP_COM_TCP; icc.socket.port = 5555; icc.buffer_size = 6400; strcpy(icc.socket_client.serverHost,"192.168.1.23"); stages[0].type = VP_API_INPUT_SOCKET; stages[0].cfg = (void *)&icc; stages[0].funcs = vp_stages_input_com_funcs; stages[1].type = VP_API_OUTPUT_SDL; stages[1].cfg = (void *)&osc; stages[1].funcs = vp_stages_output_sdl_funcs; pipeline.nb_stages = NB_STAGES; pipeline.stages = &stages[0]; vp_api_open(&pipeline, &pipeline_handle); out.status = VP_API_STATUS_PROCESSING; while(SUCCEED(vp_api_run(&pipeline, &out)) && (out.status == VP_API_STATUS_PROCESSING || out.status == VP_API_STATUS_STILL_RUNNING)); vp_api_close(&pipeline, &pipeline_handle); return EXIT_SUCCESS; }
//****************************************************************************** // // Copyright (c) 2015 Microsoft Corporation. All rights reserved. // // This code is licensed under the MIT License (MIT). // // 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. // //****************************************************************************** // WindowsDevicesEnumerationPnp.h // Generated from winmd2objc #pragma once #include "interopBase.h" @class WDEPPnpObjectUpdate, WDEPPnpObjectCollection, WDEPPnpObjectWatcher, WDEPPnpObject; @protocol WDEPIPnpObjectUpdate , WDEPIPnpObjectWatcher, WDEPIPnpObjectStatics, WDEPIPnpObject; // Windows.Devices.Enumeration.Pnp.PnpObjectType enum _WDEPPnpObjectType { WDEPPnpObjectTypeUnknown = 0, WDEPPnpObjectTypeDeviceInterface = 1, WDEPPnpObjectTypeDeviceContainer = 2, WDEPPnpObjectTypeDevice = 3, WDEPPnpObjectTypeDeviceInterfaceClass = 4, WDEPPnpObjectTypeAssociationEndpoint = 5, WDEPPnpObjectTypeAssociationEndpointContainer = 6, WDEPPnpObjectTypeAssociationEndpointService = 7, }; typedef unsigned WDEPPnpObjectType; #include "WindowsDevicesEnumeration.h" #include "WindowsFoundationCollections.h" #include "WindowsFoundation.h" #import <Foundation/Foundation.h> // Windows.Devices.Enumeration.Pnp.PnpObjectUpdate #ifndef __WDEPPnpObjectUpdate_DEFINED__ #define __WDEPPnpObjectUpdate_DEFINED__ WINRT_EXPORT @interface WDEPPnpObjectUpdate : RTObject @property (readonly) NSString* id; @property (readonly) NSDictionary* properties; @property (readonly) WDEPPnpObjectType type; @end #endif // __WDEPPnpObjectUpdate_DEFINED__ // Windows.Devices.Enumeration.Pnp.PnpObjectCollection #ifndef __WDEPPnpObjectCollection_DEFINED__ #define __WDEPPnpObjectCollection_DEFINED__ WINRT_EXPORT @interface WDEPPnpObjectCollection : RTObject @property (readonly) unsigned int size; - (unsigned int)count; - (id)objectAtIndex:(unsigned)idx; - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState*)state objects:(id __unsafe_unretained[])buffer count:(NSUInteger)len; @end #endif // __WDEPPnpObjectCollection_DEFINED__ // Windows.Devices.Enumeration.Pnp.PnpObjectWatcher #ifndef __WDEPPnpObjectWatcher_DEFINED__ #define __WDEPPnpObjectWatcher_DEFINED__ WINRT_EXPORT @interface WDEPPnpObjectWatcher : RTObject @property (readonly) WDEDeviceWatcherStatus status; - (EventRegistrationToken)addAddedEvent:(void (^)(WDEPPnpObjectWatcher*, WDEPPnpObject*))del; - (void)removeAddedEvent:(EventRegistrationToken)tok; - (EventRegistrationToken)addEnumerationCompletedEvent:(void (^)(WDEPPnpObjectWatcher*, RTObject*))del; - (void)removeEnumerationCompletedEvent:(EventRegistrationToken)tok; - (EventRegistrationToken)addRemovedEvent:(void (^)(WDEPPnpObjectWatcher*, WDEPPnpObjectUpdate*))del; - (void)removeRemovedEvent:(EventRegistrationToken)tok; - (EventRegistrationToken)addStoppedEvent:(void (^)(WDEPPnpObjectWatcher*, RTObject*))del; - (void)removeStoppedEvent:(EventRegistrationToken)tok; - (EventRegistrationToken)addUpdatedEvent:(void (^)(WDEPPnpObjectWatcher*, WDEPPnpObjectUpdate*))del; - (void)removeUpdatedEvent:(EventRegistrationToken)tok; - (void)start; - (void)stop; @end #endif // __WDEPPnpObjectWatcher_DEFINED__ // Windows.Devices.Enumeration.Pnp.PnpObject #ifndef __WDEPPnpObject_DEFINED__ #define __WDEPPnpObject_DEFINED__ WINRT_EXPORT @interface WDEPPnpObject : RTObject + (void)createFromIdAsync:(WDEPPnpObjectType)type id:(NSString*)id requestedProperties:(id<NSFastEnumeration> /* NSString * */)requestedProperties success:(void (^)(WDEPPnpObject*))success failure:(void (^)(NSError*))failure; + (void)findAllAsync:(WDEPPnpObjectType)type requestedProperties:(id<NSFastEnumeration> /* NSString * */)requestedProperties success:(void (^)(WDEPPnpObjectCollection*))success failure:(void (^)(NSError*))failure; + (void)findAllAsyncAqsFilter:(WDEPPnpObjectType)type requestedProperties:(id<NSFastEnumeration> /* NSString * */)requestedProperties aqsFilter:(NSString*)aqsFilter success:(void (^)(WDEPPnpObjectCollection*))success failure:(void (^)(NSError*))failure; + (WDEPPnpObjectWatcher*)createWatcher:(WDEPPnpObjectType)type requestedProperties:(id<NSFastEnumeration> /* NSString * */)requestedProperties; + (WDEPPnpObjectWatcher*)createWatcherAqsFilter:(WDEPPnpObjectType)type requestedProperties:(id<NSFastEnumeration> /* NSString * */)requestedProperties aqsFilter:(NSString*)aqsFilter; @property (readonly) NSString* id; @property (readonly) NSDictionary* properties; @property (readonly) WDEPPnpObjectType type; - (void)update:(WDEPPnpObjectUpdate*)updateInfo; @end #endif // __WDEPPnpObject_DEFINED__
#ifndef _TILE_TOOLS_H_ #define _TILE_TOOLS_H_ #define TILE_MAX_NUM (1 << 11) #define TILE_INDEX_MASK (TILE_MAX_NUM - 1) #define TILE_HFLIP_SFT (11) #define TILE_VFLIP_SFT (12) #define TILE_PALETTE_SFT (13) #define TILE_PRIORITY_SFT (15) #define TILE_HFLIP_FLAG (1 << TILE_HFLIP_SFT) #define TILE_VFLIP_FLAG (1 << TILE_VFLIP_SFT) #define TILE_PALETTE_MASK (3 << TILE_PALETTE_SFT) #define TILE_PRIORITY_FLAG (1 << TILE_PRIORITY_SFT) #define TILE_ATTR_MASK (TILE_PRIORITY_MASK | TILE_PALETTE_MASK | TILE_ATTR_VFLIP_MASK | TILE_ATTR_HFLIP_MASK) #define TILE_ATTR(pal, prio, flipV, flipH) (((flipH) << TILE_HFLIP_SFT) + ((flipV) << TILE_VFLIP_SFT) + ((pal) << TILE_PALETTE_SFT) + ((prio) << TILE_PRIORITY_SFT)) #define TILE_ATTR_FULL(pal, prio, flipV, flipH, index) (((flipH) << TILE_HFLIP_SFT) + ((flipV) << TILE_VFLIP_SFT) + ((pal) << TILE_PALETTE_SFT) + ((prio) << TILE_PRIORITY_SFT) + (index)) typedef struct { int packed; int packedSize; int num; unsigned int* tiles; } tileset_; typedef struct { int packed; int packedSize; int w; int h; unsigned short* data; } tilemap_; typedef struct { tileset_* tileset; tilemap_* map; } tileimg_; // transform a 4bpp input tiled image to bitmap image // the input size is given in tiles unsigned char *tileToBmp(unsigned char *in, int inOffset, int w, int h); // transform a 4bpp input bitmap image to tiled image // the input size is given in tiles unsigned char *bmpToTile(unsigned char *in, int inOffset, int w, int h); tileset_* createTileSet(unsigned int* tileData, int numTiles); tilemap_* createMap(unsigned short* mapData, int w, int h); // return a TiledImage from 8bpp bitmap image tileimg_ *getTiledImage(unsigned char* image8bpp, int w, int h, int opt, unsigned short baseFlag); void freeTileset(tileset_* tileset); void freeMap(tilemap_* map); void freeTiledImage(tileimg_* image); int packTileSet(tileset_* tileset, int *method); int packMap(tilemap_* map, int *method); int getTile(unsigned char *image8bpp, unsigned int *tileout, int x, int y, int pitch); void flipTile(unsigned int *tilein, unsigned int *tileout, int hflip, int vflip); int isSameTile1(unsigned int *t1, unsigned int *t2, int hflip, int vflip); int isSameTile2(unsigned int *tile, tileset_ *tileset, int index, int hflip, int vflip); int getTileIndex(unsigned int *tile, tileset_ *tileset, int allowFlip); int tileExists(unsigned int *tile, tileset_ *tileset, int allowFlip); int addTile(unsigned int *tile, tileset_ *tileset, int opt, int tileLimit); int getTilesetIndex(tileset_ *tileset, tileset_ *dest); int tilesetExists(tileset_ *tileset, tileset_ *dest); int addTileset(tileset_ *tileset, tileset_ *dest, int opt, int tileLimit); #endif // _TILE_TOOLS_H_
/**************************************************************************************** Copyright (C) 2015 Autodesk, Inc. All rights reserved. Use of this software is subject to the terms of the Autodesk license agreement provided at the time of installation or download, or which otherwise accompanies this software in either electronic or hard copy form. ****************************************************************************************/ #ifndef INCLUDE_ANIMATION_UTILITY_H_ #define INCLUDE_ANIMATION_UTILITY_H_ #include <fbxsdk.h> /** Create a default animation stack and a default animation layer for the given scene. * /param pScene The scene in which the animation stack and layer are created. * /param pAnimStack The created animation stack. * /return The created animation layer. */ FbxAnimLayer * CreateDefaultAnimStackAndLayer(FbxScene * pScene, FbxAnimStack* &pAnimStack); #endif // INCLUDE_ANIMATION_UTILITY_H_
/**************************************************************************************** Copyright (C) 2014 Autodesk, Inc. All rights reserved. Use of this software is subject to the terms of the Autodesk license agreement provided at the time of installation or download, or which otherwise accompanies this software in either electronic or hard copy form. ****************************************************************************************/ //! \file fbxloadingstrategy.h #ifndef _FBXSDK_CORE_LOADING_STRATEGY_H_ #define _FBXSDK_CORE_LOADING_STRATEGY_H_ #include <fbxsdk/fbxsdk_def.h> #ifndef FBXSDK_ENV_WINSTORE #include <fbxsdk/core/fbxplugin.h> #include <fbxsdk/core/fbxplugincontainer.h> #include <fbxsdk/fbxsdk_nsbegin.h> /** * Abstract class used to implemented some plug-in loading strategy. * A loading strategy dictate how some plug-ins will be loaded for instance. * We could have a simple strategy that loads only a single dll on PC. * We could also implement a strategy that load multiple dlls from a directory. */ class FBXSDK_DLL FbxLoadingStrategy : public FbxPluginContainer { public: /** Result state of loading plug-in. */ enum EState { eAllLoaded, //!< All plug-in are loaded. eNoneLoaded, //!< No plug-in is loaded, i.e., there is not plug-in to load. eAllFailed, //!< All plug-in are failed to load. eSomeFailed //!< Some plug-ins are loaded but some are failed. }; /** *\name Public interface */ //@{ /** Execute the operation of loading the plug-in(s). The way it is executed is determined by the specific implementations. * \param pData Plug in data that can be access inside the plug-ins. * \return If the plugin loading is successful return \c true, otherwise return \c false. */ EState Load(FbxPluginData& pData); /** Execute the operation of unloading the plug-in(s). The way it is executed is determined by the specific implementations. */ void Unload(); //@} protected: /** *\name User implementation */ //@{ /** Called by the Load method, it contains the specific user implementation strategy to load the desired plug-in(s). * \param pData Plug in data that can be access inside the plug-ins. * \return If the plugin loading is successful return \c true, otherwise return \c false */ virtual bool SpecificLoad(FbxPluginData& pData) = 0; /** Called by the Unload method, it contains the specific user implementation strategy to unload the desired plug-in(s). */ virtual void SpecificUnload(FbxPluginData& pData) = 0; //@} //! Whether the plugin is loaded or not. EState mPluginsLoadedState; private: FbxPluginData mData; }; #include <fbxsdk/fbxsdk_nsend.h> #endif /* !FBXSDK_ENV_WINSTORE */ #endif /* _FBXSDK_CORE_LOADING_STRATEGY_H_ */
// // ExampleProjectTests.h // ExampleProjectTests // // Created by Luke Redpath on 28/01/2012. // Copyright (c) 2012 LJR Software Limited. All rights reserved. // #import <SenTestingKit/SenTestingKit.h> @interface ExampleProjectTests : SenTestCase @end
/* { dg-do run } */ /* { dg-options "-O2 -mavx512bw -DAVX512BW" } */ /* { dg-require-effective-target avx512bw } */ #include "avx512f-helper.h" #define SIZE (AVX512F_LEN / 16) #include "avx512f-mask-type.h" void CALC (MASK_TYPE *r, short *s1, short *s2) { int i; *r = 0; MASK_TYPE one = 1; for (i = 0; i < SIZE; i++) if (s1[i] <= s2[i]) *r = *r | (one << i); } void TEST (void) { int i; UNION_TYPE (AVX512F_LEN, i_w) src1, src2; MASK_TYPE res_ref, res1, res2; MASK_TYPE mask = MASK_VALUE; for (i = 0; i < SIZE / 2; i++) { src1.a[i * 2] = i; src1.a[i * 2 + 1] = i * i; src2.a[i * 2] = 2 * i; src2.a[i * 2 + 1] = i * i; } res1 = INTRINSIC (_cmple_epi16_mask) (src1.x, src2.x); res2 = INTRINSIC (_mask_cmple_epi16_mask) (mask, src1.x, src2.x); CALC (&res_ref, src1.a, src2.a); if (res_ref != res1) abort (); res_ref &= mask; if (res_ref != res2) abort (); }
/* * $Id: int80.h,v 1.1 2001/04/25 18:33:24 mvines Exp $ */ #define FILE_DEVICE_HOOKINT 0x00008300 #define DRIVER_DEVICE_NAME L"LinuxSyscallRedirector" #define HOOKINT_IOCTL_INDEX 0x830 #define ADDINT_IOCTL_INDEX 0x831 #define REMOVEINT_IOCTL_INDEX 0x832 #define CALLPORT_IOCTL_INDEX 0x833 #define IOCTL_HOOKINT_SYSTEM_SERVICE_USAGE CTL_CODE(FILE_DEVICE_HOOKINT, \ HOOKINT_IOCTL_INDEX, \ METHOD_BUFFERED, \ FILE_ANY_ACCESS) #define IOCTL_ADDINT_SYSTEM_SERVICE_USAGE CTL_CODE(FILE_DEVICE_HOOKINT, \ ADDINT_IOCTL_INDEX, \ METHOD_BUFFERED, \ FILE_ANY_ACCESS) #define IOCTL_REMOVEINT_SYSTEM_SERVICE_USAGE CTL_CODE(FILE_DEVICE_HOOKINT, \ REMOVEINT_IOCTL_INDEX, \ METHOD_BUFFERED, \ FILE_ANY_ACCESS) #define IOCTL_CALLPORT_SYSTEM_SERVICE_USAGE CTL_CODE(FILE_DEVICE_HOOKINT, \ CALLPORT_IOCTL_INDEX, \ METHOD_BUFFERED, \ FILE_ANY_ACCESS) #define SERVICECOUNTERS_BUFSIZE 0x1000
/* $Id$ */ /* * Copyright (C) 2014-2015 Cisco and/or its affiliates. All rights reserved. * Copyright (C) 2004-2013 Sourcefire, Inc. ** AUTHOR: Steven Sturges ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License Version 2 as ** published by the Free Software Foundation. You may not use, modify or ** distribute this program under any other version of the GNU General ** Public License. ** ** 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* session_expect.h * * Purpose: Handle hash table storage and lookups for ignoring * entire data streams. * * Arguments: * * Effect: * * Comments: Used by Stream4 & Stream -- don't delete too soon. * * Any comments? * */ #ifndef SESSION_EXPECT_H_ #define SESSION_EXPECT_H_ #include "ipv6_port.h" #include "session_api.h" #include "session_common.h" #include "stream_common.h" #include "sfxhash.h" struct _ExpectNode; int StreamExpectAddChannel(const Packet *ctrlPkt, sfaddr_t* cliIP, uint16_t cliPort, sfaddr_t* srvIP, uint16_t srvPort, char direction, uint8_t flags, uint8_t protocol, uint32_t timeout, int16_t appId, uint32_t preprocId, void *appData, void (*appDataFreeFn)(void*), struct _ExpectNode** packetExpectedNode); int StreamExpectAddChannelPreassignCallback(const Packet *ctrlPkt, sfaddr_t* cliIP, uint16_t cliPort, sfaddr_t* srvIP, uint16_t srvPort, char direction, uint8_t flags, uint8_t protocol, uint32_t timeout, int16_t appId, uint32_t preprocId, void *appData, void (*appDataFreeFn)(void*), unsigned cbId, Stream_Event se, struct _ExpectNode** packetExpectedNode); int StreamExpectIsExpected(Packet *p, SFXHASH_NODE **expected_hash_node); char StreamExpectProcessNode(Packet *p, SessionControlBlock* lws, SFXHASH_NODE *expected_hash_node); char StreamExpectCheck(Packet *, SessionControlBlock *); void StreamExpectInit(uint32_t maxExpectations); void StreamExpectCleanup(void); struct _ExpectNode* getNextExpectedNode(struct _ExpectNode* expectedNode); void* getApplicationDataFromExpectedNode(struct _ExpectNode* expectedNode, uint32_t preprocId); int addApplicationDataToExpectedNode(struct _ExpectNode* expectedNode, uint32_t preprocId, void *appData, void (*appDataFreeFn)(void*)); void registerMandatoryEarlySessionCreator(struct _SnortConfig *sc, MandatoryEarlySessionCreatorFn callback); void FreeMandatoryEarlySessionCreators(struct _MandatoryEarlySessionCreator*); #endif /* SESSION_EXPECT_H */
// // SideMenuTableViewController.h // linphone // // Created by Gautier Pelloux-Prayer on 28/07/15. // // #import <UIKit/UIKit.h> // the block to execute when an entry tapped typedef void (^SideMenuEntryBlock)(void); @interface SideMenuEntry : NSObject { @public NSString *title; SideMenuEntryBlock onTapBlock; }; @end @interface SideMenuTableView : UITableViewController @property(nonatomic, retain) NSMutableArray *sideMenuEntries; @end
#pragma once #define CUBEB_EXPORT
/* * kvm_irq.h: in kernel interrupt controller related definitions * Copyright (c) 2007, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope 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. * Authors: * Yaozu (Eddie) Dong <Eddie.dong@intel.com> * * Copyright 2011 Joyent, Inc. All Rights Reserved. */ #ifndef __IRQ_H #define __IRQ_H #include <sys/mutex.h> #include "kvm_host.h" #include "kvm_iodev.h" #include "kvm_ioapic.h" #include "kvm_lapic.h" #define PIC_NUM_PINS 16 #define SELECT_PIC(irq) \ ((irq) < 8 ? KVM_IRQCHIP_PIC_MASTER : KVM_IRQCHIP_PIC_SLAVE) struct kvm; struct kvm_vcpu; typedef void irq_request_func(void *opaque, int level); typedef struct kvm_kpic_state { uint8_t last_irr; /* edge detection */ uint8_t irr; /* interrupt request register */ uint8_t imr; /* interrupt mask register */ uint8_t isr; /* interrupt service register */ uint8_t isr_ack; /* interrupt ack detection */ uint8_t priority_add; /* highest irq priority */ uint8_t irq_base; uint8_t read_reg_select; uint8_t poll; uint8_t special_mask; uint8_t init_state; uint8_t auto_eoi; uint8_t rotate_on_auto_eoi; uint8_t special_fully_nested_mode; uint8_t init4; /* true if 4 byte init */ uint8_t elcr; /* PIIX edge/trigger selection */ uint8_t elcr_mask; struct kvm_pic *pics_state; } kvm_kpic_state_t; typedef struct kvm_pic { kmutex_t lock; unsigned pending_acks; struct kvm *kvm; struct kvm_kpic_state pics[2]; /* 0 is master pic, 1 is slave pic */ irq_request_func *irq_request; void *irq_request_opaque; int output; /* intr from master PIC */ struct kvm_io_device dev; void (*ack_notifier)(void *opaque, int irq); unsigned long irq_states[16]; } kvm_pic_t; extern struct kvm_pic *kvm_create_pic(struct kvm *kvm); extern void kvm_destroy_pic(struct kvm *kvm); extern int kvm_pic_read_irq(struct kvm *kvm); extern void kvm_pic_update_irq(struct kvm_pic *s); extern void kvm_pic_clear_isr_ack(struct kvm *kvm); extern struct kvm_pic *pic_irqchip(struct kvm *kvm); extern int irqchip_in_kernel(struct kvm *kvm); extern void kvm_pic_reset(struct kvm_kpic_state *s); extern void kvm_inject_pit_timer_irqs(struct kvm_vcpu *vcpu); extern void kvm_inject_pending_timer_irqs(struct kvm_vcpu *); extern void kvm_inject_apic_timer_irqs(struct kvm_vcpu *); extern void kvm_apic_nmi_wd_deliver(struct kvm_vcpu *); extern int pit_has_pending_timer(struct kvm_vcpu *); extern int apic_has_pending_timer(struct kvm_vcpu *); #endif
/* Copyright (C) 1995-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #include <errno.h> #include <stddef.h> #include <utime.h> #include <sys/time.h> #include <sysdep.h> /* Consider moving to syscalls.list. */ /* Change the access time of FILE to TVP[0] and the modification time of FILE to TVP[1]. */ int __utimes (const char *file, const struct timeval tvp[2]) { /* Avoid implicit array coercion in syscall macros. */ return INLINE_SYSCALL (utimes, 2, file, &tvp[0]); } weak_alias (__utimes, utimes)
/* This file is part of the KDE project Copyright (C) 2004-2007 Jarosław Staniek <staniek@kde.org> 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 Library General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef KEXICELLEDITORFACTORY_H #define KEXICELLEDITORFACTORY_H #include <QVariant> #include <QWidget> #include <kexi_global.h> #include <db/field.h> class KexiCellEditorFactoryItem; class KexiTableEdit; namespace KexiDB { class TableViewColumn; } //! A singleton class providing access to cell editor factories class KEXIDATATABLE_EXPORT KexiCellEditorFactory { public: KexiCellEditorFactory(); virtual ~KexiCellEditorFactory(); /*! Registers factory item for \a type and (optional) \a subType. \a subType is usually obtained (e.g. in KexiTableView) from KexiDB::Field::subType(). Passing KexiDB::Field::Invalid as type will set default item, i.e. the one that will be used when no other item is defined for given data type. You can register the same \a item many times for different types and subtypes. Once registered, \a item object will be owned by the factory, so you shouldn't care about deleting it. */ static void registerItem(KexiCellEditorFactoryItem& item, uint type, const QString& subType = QString()); /*! \return item for \a type and (optional) \a subType. If no item found, the one with empty subtype is tried. If still no item found, the default is tried. Eventually, may return NULL. */ static KexiCellEditorFactoryItem* item(uint type, const QString& subType = QString()); /*! Creates a new editor for \a column. If \a parent is of QScrollArea, the new editor will be created inside parent->viewport() instead. */ static KexiTableEdit* createEditor(KexiDB::TableViewColumn &column, QWidget* parent = 0); protected: static void init(); }; //! A base class for implementing cell editor factories class KEXIDATATABLE_EXPORT KexiCellEditorFactoryItem { public: KexiCellEditorFactoryItem(); virtual ~KexiCellEditorFactoryItem(); QString className() const { return m_className; } protected: virtual KexiTableEdit* createEditor(KexiDB::TableViewColumn &column, QWidget* parent = 0) = 0; QString m_className; friend class KexiCellEditorFactory; }; #endif
// AsmJit - Complete JIT Assembler for C++ Language. // Copyright (c) 2008-2010, Petr Kobalicek <kobalicek.petr@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. #if defined(_MSC_VER) // Pop disabled warnings by ApiBegin.h #pragma warning(pop) // Rename symbols back. #undef vsnprintf #undef snprintf #endif // _MSC_VER
/* * * This source code is part of * * G R O M A C S * * GROningen MAchine for Chemical Simulations * * VERSION 3.2.0 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, * check out http://www.gromacs.org for more information. * 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. * * If you want to redistribute modifications, please consider that * scientific software is very special. Version control is crucial - * bugs must be traceable. We will be happy to consider code for * inclusion in the official distribution, but derived work must not * be called official GROMACS. Details are found in the README & COPYING * files - if they are missing, get the official version at www.gromacs.org. * * To help us fund GROMACS development, we humbly ask that you cite * the papers on the package - you can find them in the top README file. * * For more info, check our website at http://www.gromacs.org * * And Hey: * Gyas ROwers Mature At Cryogenic Speed */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <ctype.h> #include <string.h> #include <smalloc.h> #include <macros.h> #include "buttons.h" #include "nleg.h" #include "writeps.h" typedef struct { const char *tp; unsigned long *col; t_rgb rgb; } t_atomcolor; static t_atomcolor ac[] = { { "O", &LIGHTRED, { 1, 0, 0 } }, { "N", &LIGHTCYAN, { 0, 0, 1 } }, { "NA", &LIGHTGREY, { 0.6,0.6,0.6 } }, { "S", &YELLOW, { 1, 1, 0 } }, { "C", &LIGHTGREEN, { 0, 1, 0 } }, { "CL", &VIOLET, { 1, 0, 1 } }, { "F", &LIGHTGREY, { 0.6,0.6,0.6 } }, { "Z", &LIGHTGREY, { 0.6,0.6,0.6 } }, { "P", &LIGHTBLUE, { 0.4,0.4,1.0 } }, { "H", &WHITE, { 0.8,0.8,0.8 } } }; #define NAC asize(ac) int search_ac(const char *type) { int i,nb,mij,best,besti; best=0; besti=0; if (type) { for(i=0; (i<NAC); i++) { mij=min((int)strlen(type),(int)strlen(ac[i].tp)); for(nb=0; (nb<mij); nb++) if (type[nb] != ac[i].tp[nb]) break; if (nb > best) { best=nb; besti=i; } } } return besti; } unsigned long Type2Color(const char *type) { int i; i=search_ac(type); return *(ac[i].col); } t_rgb *Type2RGB(const char *type) { int i; i=search_ac(type); return &(ac[i].rgb); } void DrawLegend(t_x11 *x11,t_windata *Win) { #define NLAB 6 #define COLS 3 static const char *lab[NLAB] = { "C", "O", "H", "S", "N", "P" }; int i,i0,dh,dw,w,y,x1,x0; unsigned long cind; real h_2; XClearWindow(x11->disp, Win->self); w=Win->width; h_2=Win->height/(2.0*NLAB/COLS); dh=h_2-2; dw=dh; for (i=0; (i<NLAB); i++) { i0=i % (NLAB/COLS); x0=(i / (NLAB/COLS))*(Win->width/COLS)+AIR; x1=x0+2*dw+AIR; cind=Type2Color(lab[i]); XSetForeground(x11->disp,x11->gc,cind); y=((2*i0+1)*h_2); XFillRectangle (x11->disp,Win->self,x11->gc,x0,y-dh,2*dw,2*dh); XSetForeground(x11->disp,x11->gc,WHITE); TextInRect(x11,Win->self,lab[i],x1,y-dh,w-x1,2*dh, eXLeft,eYCenter); } XSetForeground(x11->disp,x11->gc,x11->fg); } static gmx_bool LegWCallBack(t_x11 *x11,XEvent *event, Window w, void *data) { t_legendwin *lw; lw=(t_legendwin *)data; switch(event->type) { case Expose: DrawLegend(x11,&lw->wd); break; default: break; } return FALSE; } t_legendwin *init_legw(t_x11 *x11,Window Parent, int x,int y,int width,int height, unsigned long fg,unsigned long bg) { t_legendwin *lw; snew(lw,1); InitWin(&lw->wd,x,y,width,height,1,"Legend Window"); lw->wd.self=XCreateSimpleWindow(x11->disp,Parent,x,y,1,1,1,fg,bg); x11->RegisterCallback(x11,lw->wd.self,Parent,LegWCallBack,lw); x11->SetInputMask(x11,lw->wd.self,ExposureMask); return lw; } void map_legw(t_x11 *x11,t_legendwin *lw) { XMapWindow(x11->disp,lw->wd.self); } void done_legw(t_x11 *x11,t_legendwin *lw) { x11->UnRegisterCallback(x11,lw->wd.self); sfree(lw); }
/* Common definitions for Intel 386 and AMD x86-64 systems using GNU userspace. Copyright (C) 2012 Free Software Foundation, Inc. Contributed by Ilya Enkovich. This file is part of GCC. GCC 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 3, or (at your option) any later version. GCC 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 GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ /* The svr4 ABI for the i386 says that records and unions are returned in memory. In the 64bit compilation we will turn this flag off in ix86_option_override_internal, as we never do pcc_struct_return scheme on this target. */ #undef DEFAULT_PCC_STRUCT_RETURN #define DEFAULT_PCC_STRUCT_RETURN 1 /* We arrange for the whole %fs segment to map the tls area. */ #undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT #define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS #define TARGET_OS_CPP_BUILTINS() \ do \ { \ GNU_USER_TARGET_OS_CPP_BUILTINS(); \ } \ while (0) #undef CPP_SPEC #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" #undef GNU_USER_TARGET_CC1_SPEC #define GNU_USER_TARGET_CC1_SPEC "%(cc1_cpu) %{profile:-p}" #undef CC1_SPEC #define CC1_SPEC GNU_USER_TARGET_CC1_SPEC /* Similar to standard GNU userspace, but adding -ffast-math support. */ #define GNU_USER_TARGET_MATHFILE_SPEC \ "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ %{mpc32:crtprec32.o%s} \ %{mpc64:crtprec64.o%s} \ %{mpc80:crtprec80.o%s}" #undef ENDFILE_SPEC #define ENDFILE_SPEC \ GNU_USER_TARGET_MATHFILE_SPEC " " \ GNU_USER_TARGET_ENDFILE_SPEC /* Put all *tf routines in libgcc. */ #undef LIBGCC2_HAS_TF_MODE #define LIBGCC2_HAS_TF_MODE 1 #define LIBGCC2_TF_CEXT q #define TF_SIZE 113 #define TARGET_ASM_FILE_END file_end_indicate_exec_stack /* The stack pointer needs to be moved while checking the stack. */ #define STACK_CHECK_MOVING_SP 1 /* Static stack checking is supported by means of probes. */ #define STACK_CHECK_STATIC_BUILTIN 1
/* * cm_tree.h * * This file is part of NEST. * * Copyright (C) 2004 The NEST Initiative * * NEST 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. * * NEST 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 NEST. If not, see <http://www.gnu.org/licenses/>. * */ #ifndef CM_TREE_H #define CM_TREE_H #include <stdlib.h> #include "nest_time.h" #include "ring_buffer.h" // compartmental model #include "cm_compartmentcurrents.h" // Includes from libnestutil: #include "dict_util.h" #include "numerics.h" // Includes from nestkernel: #include "exceptions.h" #include "kernel_manager.h" #include "universal_data_logger_impl.h" // Includes from sli: #include "dict.h" #include "dictutils.h" namespace nest { class Compartment { private: // aggragators for numerical integration double xx_; double yy_; public: // compartment index long comp_index; // parent compartment index long p_index; // tree structure indices Compartment* parent; std::vector< Compartment > children; // vector for synapses CompartmentCurrents compartment_currents; // buffer for currents RingBuffer currents; // voltage variable double v_comp; // electrical parameters double ca; // compartment capacitance [uF] double gc; // coupling conductance with parent (meaningless if root) [uS] double gl; // leak conductance of compartment [uS] double el; // leak current reversal potential [mV] // auxiliary variables for efficienchy double gg0; double ca__div__dt; double gl__div__2; double gc__div__2; double gl__times__el; // for numerical integration double ff; double gg; double hh; // passage counter for recursion int n_passed; // constructor, destructor Compartment( const long compartment_index, const long parent_index ); Compartment( const long compartment_index, const long parent_index, const DictionaryDatum& compartment_params ); ~Compartment(){}; // initialization void calibrate(); std::map< Name, double* > get_recordables(); // matrix construction void construct_matrix_element( const long lag ); // maxtrix inversion inline void gather_input( const std::pair< double, double >& in ); inline std::pair< double, double > io(); inline double calc_v( const double v_in ); }; // Compartment /* Short helper functions for solving the matrix equation. Can hopefully be inlined */ inline void nest::Compartment::gather_input( const std::pair< double, double >& in ) { xx_ += in.first; yy_ += in.second; } inline std::pair< double, double > nest::Compartment::io() { // include inputs from child compartments gg -= xx_; ff -= yy_; // output values double g_val( hh * hh / gg ); double f_val( ff * hh / gg ); return std::make_pair( g_val, f_val ); } inline double nest::Compartment::calc_v( const double v_in ) { // reset recursion variables xx_ = 0.0; yy_ = 0.0; // compute voltage v_comp = ( ff - v_in * hh ) / gg; return v_comp; } class CompTree { private: /* structural data containers for the compartment model */ mutable Compartment root_; std::vector< long > compartment_indices_; std::vector< Compartment* > compartments_; std::vector< Compartment* > leafs_; long size_ = 0; // recursion functions for matrix inversion void solve_matrix_downsweep( Compartment* compartment_ptr, std::vector< Compartment* >::iterator leaf_it ); void solve_matrix_upsweep( Compartment* compartment, double vv ); // functions for pointer initialization void set_parents(); void set_compartments(); void set_leafs(); public: // constructor, destructor CompTree(); ~CompTree(){}; // initialization functions for tree structure void add_compartment( const long parent_index ); void add_compartment( const long parent_index, const DictionaryDatum& compartment_params ); void add_compartment( Compartment* compartment, const long parent_index ); void calibrate(); void init_pointers(); void set_syn_buffers( std::vector< RingBuffer >& syn_buffers ); std::map< Name, double* > get_recordables(); // get a compartment pointer from the tree Compartment* get_compartment( const long compartment_index ) const; Compartment* get_compartment( const long compartment_index, Compartment* compartment, const long raise_flag ) const; Compartment* get_compartment_opt( const long compartment_indx ) const; Compartment* get_root() const { return &root_; }; // get tree size (number of compartments) long get_size() const { return size_; }; // get voltage values std::vector< double > get_voltage() const; double get_compartment_voltage( const long compartment_index ); // construct the numerical integration matrix and vector void construct_matrix( const long lag ); // solve the matrix equation for next timestep voltage void solve_matrix(); // print function void print_tree() const; }; // CompTree } // namespace #endif /* #ifndef CM_TREE_H */
/* vim:set et ts=4 sts=4: * * ibus-libpinyin - Intelligent Pinyin engine based on libpinyin for IBus * * Copyright (c) 2011 Peng Wu <alexepico@gmail.com> * * 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, 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __PY_LIB_PINYIN_FULL_PINYIN_EDITOR_H #define __PY_LIB_PINYIN_FULL_PINYIN_EDITOR_H #include "PYPPinyinEditor.h" namespace PY { class FullPinyinEditor : public PinyinEditor { public: FullPinyinEditor (PinyinProperties & props, Config & config); ~FullPinyinEditor (void); public: gboolean insert (gint ch); /* virtual functions */ virtual gboolean processKeyEvent (guint keyval, guint keycode, guint modifiers); virtual void reset (void); virtual void updateAuxiliaryText (void); virtual void update (void); protected: virtual void updatePinyin (void); }; }; #endif
/************************************************************** * Copyright (c) 200X- 2012 Oppo Mobile communication Corp.ltd.£¬ * VENDOR_EDIT *File : lm3528.c * Description: Source file for backlight IC LM3528. * To control backlight brightness. * Version : 1.0 * Date : 2012-10-14 * Author : zhengzekai@oppo.com * ---------------------------------- Revision History: ---------------------------------- * <version> <date> < author > <desc> * Revision 1.0 2012-10-14 zhengzekai@oppo.com creat ****************************************************************/ #include <linux/module.h> #include <linux/delay.h> #include <linux/i2c.h> #include <linux/device.h> #include <mach/gpio.h> #include <linux/regulator/consumer.h> #include <mach/vreg.h> #include <linux/err.h> #include <linux/i2c/lm3528.h> #define LM3528_DRV_NAME "lm3528" #define SSL3252_CHIP_ID 0x41 #define LM3528_GP 0x10 #define LM3528_GP_MODE 0xc7 #define LM3528_BMAIN 0xa0 #define LM3528_BMAIN_MAX 127 #define LM3528_I2C_READ static struct i2c_client *lm3528_client; #ifdef LM3528_I2C_READ static int lm3528_i2c_rxdata(unsigned char saddr, unsigned char *rxdata, int length) { int rc; int retry_cnt = 0; struct i2c_msg msgs[] = { { .addr = saddr, .flags = 0, .len = 1, .buf = rxdata, }, { .addr = saddr, .flags = I2C_M_RD, .len = length, .buf = rxdata, }, }; do { rc = i2c_transfer(lm3528_client->adapter, msgs, 2); if (rc > 0) break; retry_cnt++; } while (retry_cnt < 3); if (rc < 0) { pr_err("%s: failed!:%d %d\n", __func__, rc, retry_cnt); return -EIO; } return 0; } #endif static int32_t lm3528_i2c_txdata(unsigned short saddr, unsigned char *txdata, int length) { int retry_cnt = 0; int rc; struct i2c_msg msg[] = { { .addr = saddr, .flags = 0, .len = length, .buf = txdata, }, }; do { rc = i2c_transfer(lm3528_client->adapter, msg, 1); if (rc > 0) break; retry_cnt++; } while (retry_cnt < 3); if (rc < 0) { pr_err("%s :failed: %d %d\n", __func__, rc, retry_cnt); return -EIO; } return 0; } #ifdef LM3528_I2C_READ static int32_t lm3528_i2c_read(unsigned char raddr, unsigned char *rdata) { int32_t rc = -EIO; unsigned char buf[1]; if (!rdata) return -EIO; memset(buf, 0, sizeof(buf)); buf[0] = raddr; rc = lm3528_i2c_rxdata(lm3528_client->addr, buf, 1); if (rc < 0) { pr_err("%s : read reg addr 0x%x failed!\n", __func__, raddr); return rc; } *rdata = buf[0]; return rc; } #endif static int lm3528_i2c_write(unsigned char raddr, unsigned char rdata) { int32_t rc = -EIO; unsigned char buf[2]; if (!rdata) return 0; memset(buf, 0, sizeof(buf)); buf[0] = raddr; buf[1] = rdata; rc = lm3528_i2c_txdata(lm3528_client->addr , buf, 2); if (rc < 0) pr_err("%s :failed, addr = 0x%x, val = 0x%x!\n", __func__, raddr, rdata); return rc; } int lm3528_bkl_control(unsigned char bkl_level) { int rc = 0; if (!lm3528_client) { pr_err("%s: lm3528_client == null!\n", __func__); return rc; } if(bkl_level == 0) { rc = lm3528_i2c_write(LM3528_GP, 0xc0); return rc; } rc = lm3528_i2c_write(LM3528_GP, LM3528_GP_MODE); rc = lm3528_i2c_write(LM3528_BMAIN, bkl_level); return rc; } int lm3528_bkl_readout(void) { int rc = 0; #ifdef LM3528_I2C_READ unsigned char bkl_level = 0; rc = lm3528_i2c_read(LM3528_BMAIN, &bkl_level); rc = bkl_level; #endif return rc; } #define LM3528_ENABLE_GPIO 86 static int lm3528_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { int rc = 0; if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { pr_err("%s: i2c_check_functionality failed\n", __func__); rc = -EACCES; return rc; } lm3528_client = client; if (!lm3528_client) { pr_err("%s: lm3528_client == null!\n", __func__); rc = -ENODEV; goto exit; } rc = gpio_request(LM3528_ENABLE_GPIO, "lm3528_enable"); if (rc) { pr_err("lm3528_enable gpio_request failed: %d\n", rc); goto exit; } rc = gpio_direction_output(LM3528_ENABLE_GPIO, 1); if (rc) { pr_err("%s: unable to enable LM3528_ENABLE_GPIO\n", __func__); goto exit; } //initialize bkl to max when system boot rc = lm3528_i2c_write(LM3528_GP, LM3528_GP_MODE); rc = lm3528_i2c_write(LM3528_BMAIN, LM3528_BMAIN_MAX); exit: if (rc) lm3528_client = 0; return rc; } static int lm3528_i2c_remove(struct i2c_client *client) { return 0; } static int lm3528_suspend(struct i2c_client *client, pm_message_t mesg) { int rc ; printk("%s:backlight suspend.\n", __func__); rc = gpio_direction_output(LM3528_ENABLE_GPIO, 0); if (rc) { pr_err("%s: unable to disable LM3528_ENABLE_GPIO\n", __func__); return rc; } return 0; } static int lm3528_resume(struct i2c_client *client) { int rc ; printk("%s: backlight resume.\n", __func__); rc = gpio_direction_output(LM3528_ENABLE_GPIO, 1); if (rc) { pr_err("%s: unable to enable LM3528_ENABLE_GPIO\n", __func__); return rc; } return 0; } static const struct i2c_device_id lm3528_i2c_id[] = { { LM3528_DRV_NAME, 0}, {} }; static struct i2c_driver lm3528_i2c_driver = { .id_table = lm3528_i2c_id, .probe = lm3528_i2c_probe, .remove = lm3528_i2c_remove, .suspend = lm3528_suspend, .resume = lm3528_resume, .driver = { .name = LM3528_DRV_NAME, }, }; static int __init lm3528_init(void) { return i2c_add_driver(&lm3528_i2c_driver); } static void __exit lm3528_eixt(void) { i2c_del_driver(&lm3528_i2c_driver); } module_init(lm3528_init); module_exit(lm3528_eixt); MODULE_DESCRIPTION("lm3528 I2C Driver"); MODULE_LICENSE("GPL");
/* Multiple versions of llround. Copyright (C) 2013-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #define lround __hidden_lround #define __lround __hidden___lround #include <math.h> #include <math_ldbl_opt.h> #include <shlib-compat.h> #include "init-arch.h" extern __typeof (__llround) __llround_ppc64 attribute_hidden; extern __typeof (__llround) __llround_power5plus attribute_hidden; extern __typeof (__llround) __llround_power6x attribute_hidden; extern __typeof (__llround) __llround_power8 attribute_hidden; libc_ifunc (__llround, (hwcap2 & PPC_FEATURE2_ARCH_2_07) ? __llround_power8 : (hwcap & PPC_FEATURE_POWER6_EXT) ? __llround_power6x : (hwcap & PPC_FEATURE_POWER5_PLUS) ? __llround_power5plus : __llround_ppc64); weak_alias (__llround, llround) #ifdef NO_LONG_DOUBLE weak_alias (__llround, llroundl) strong_alias (__llround, __llroundl) #endif #if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) compat_symbol (libm, __llround, llroundl, GLIBC_2_1); compat_symbol (libm, llround, lroundl, GLIBC_2_1); #endif /* long has the same width as long long on PPC64. */ #undef lround #undef __lround strong_alias (__llround, __lround) weak_alias (__llround, lround) #ifdef NO_LONG_DOUBLE strong_alias (__llround, __llroundl) weak_alias (__llround, llroundl) #endif #if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) compat_symbol (libm, __lround, lroundl, GLIBC_2_1); #endif
/* BFD support for the NEC V850 processor Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. 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 Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #include "bfd.h" #include "sysdep.h" #include "libbfd.h" #include "safe-ctype.h" #define N(number, print, default, next) \ { 32, 32, 8, bfd_arch_v850, number, "v850", print, 2, default, \ bfd_default_compatible, bfd_default_scan, next } #define NEXT NULL static const bfd_arch_info_type arch_info_struct[] = { N (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[1]), N (bfd_mach_v850e, "v850e", FALSE, NULL) }; #undef NEXT #define NEXT & arch_info_struct[0] const bfd_arch_info_type bfd_v850_arch = N (bfd_mach_v850, "v850", TRUE, NEXT);
/**************************************************************************** ** ** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the QtXMLPatterns module of the Qt Toolkit. ** ** Commercial Usage ** Licensees holding valid Qt Commercial licenses may use this file in ** accordance with the Qt Commercial License Agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Nokia. ** ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License versions 2.0 or 3.0 as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in ** the packaging of this file. Please review the following information ** to ensure GNU General Public Licensing requirements will be met: ** http://www.fsf.org/licensing/licenses/info/GPLv2.html and ** http://www.gnu.org/copyleft/gpl.html. In addition, as a special ** exception, Nokia gives you certain additional rights. These rights ** are described in the Nokia Qt GPL Exception version 1.3, included in ** the file GPL_EXCEPTION.txt in this package. ** ** Qt for Windows(R) Licensees ** As a special exception, Nokia, as the sole copyright holder for Qt ** Designer, grants users of the Qt/Eclipse Integration plug-in the ** right for the Qt/Eclipse Integration to link to functionality ** provided by Qt Designer and its related libraries. ** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at qt-sales@nokia.com. ** ****************************************************************************/ // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. #ifndef Patternist_EvaluationCache_H #define Patternist_EvaluationCache_H #include "qcachingiterator_p.h" #include "qcommonsequencetypes_p.h" #include "qnodebuilder_p.h" #include "qoperandsiterator_p.h" #include "qsinglecontainer_p.h" #include "qvariabledeclaration_p.h" QT_BEGIN_HEADER QT_BEGIN_NAMESPACE namespace QPatternist { /** * @short Evaluates to the same result as its operand, but ensures the * operand is evaluated once even if this Expression is evaluated several * times during a query run. * * EvaluationCache does this in a pipelined way, by delivering items from * its cache, which is stored in the DynamicContext. If the cache has less * items than what the caller requests, EvaluationCache continues to * deliver but this time from the source, which it also populates into the * cache. * * EvaluationCache is used as an optimization in order to avoid running expensive code * paths multiple times, but also is sometimes a necessity: for instance, * when objects must be unique, such as potentially in the case of node identity. * * EvaluationCache is in particular used for variables, whose sole purpose * is to store it once(at least conceptually) and then use it in multiple * places. * * In some cases an EvaluationCache isn't necessary. For instance, when a * variable is only referenced once. In those cases EvaluationCache removes * itself as an optimization; implemented in EvaluationCache::compress(). * @author Frans Englich <fenglich@trolltech.com> * @ingroup Patternist_expressions */ template<bool IsForGlobal> class EvaluationCache : public SingleContainer { public: EvaluationCache(const Expression::Ptr &operand, const VariableDeclaration::Ptr &varDecl, const VariableSlotID slot); virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const; virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const; virtual Expression::Ptr compress(const StaticContext::Ptr &context); virtual SequenceType::Ptr staticType() const; /** * The first operand must be exactly one @c xs:string. */ virtual SequenceType::List expectedOperandTypes() const; virtual ExpressionVisitorResult::Ptr accept(const ExpressionVisitor::Ptr &visitor) const; virtual Properties properties() const; virtual Expression::Ptr typeCheck(const StaticContext::Ptr &context, const SequenceType::Ptr &reqType); virtual const SourceLocationReflection *actualReflection() const; inline VariableSlotID slot() const { return m_varSlot; } private: const VariableDeclaration::Ptr m_declaration; /** * This variable must not be called m_slot. If it so, * a compiler bug on HP-UX-aCC-64 is triggered in the constructor * initializor. See the preprocessor output. */ const VariableSlotID m_varSlot; }; #include "qevaluationcache.cpp" } QT_END_NAMESPACE QT_END_HEADER #endif
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** This file is part of systemd. Copyright 2014 Tom Gundersen <teg@jklm.no> systemd 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. systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>. ***/ #include "conf-parser.h" #include "resolved-conf.h" int manager_parse_dns_server(Manager *m, DnsServerType type, const char *string) { const char *word, *state; size_t length; DnsServer *first; int r; assert(m); assert(string); first = type == DNS_SERVER_FALLBACK ? m->fallback_dns_servers : m->dns_servers; FOREACH_WORD_QUOTED(word, length, string, state) { char buffer[length+1]; int family; union in_addr_union addr; bool found = false; DnsServer *s; memcpy(buffer, word, length); buffer[length] = 0; r = in_addr_from_string_auto(buffer, &family, &addr); if (r < 0) { log_warning("Ignoring invalid DNS address '%s'", buffer); continue; } /* Filter out duplicates */ LIST_FOREACH(servers, s, first) if (s->family == family && in_addr_equal(family, &s->address, &addr)) { found = true; break; } if (found) continue; r = dns_server_new(m, NULL, type, NULL, family, &addr); if (r < 0) return r; } return 0; } int config_parse_dnsv( const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata) { Manager *m = userdata; int r; assert(filename); assert(lvalue); assert(rvalue); assert(m); if (isempty(rvalue)) /* Empty assignment means clear the list */ manager_flush_dns_servers(m, ltype); else { /* Otherwise add to the list */ r = manager_parse_dns_server(m, ltype, rvalue); if (r < 0) { log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse DNS server string '%s'. Ignoring.", rvalue); return 0; } } /* If we have a manual setting, then we stop reading * /etc/resolv.conf */ if (ltype == DNS_SERVER_SYSTEM) m->read_resolv_conf = false; return 0; } int config_parse_support( const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata) { Support support, *v = data; int r; assert(filename); assert(lvalue); assert(rvalue); support = support_from_string(rvalue); if (support < 0) { r = parse_boolean(rvalue); if (r < 0) { log_syntax(unit, LOG_ERR, filename, line, r, "Failed to parse support level '%s'. Ignoring.", rvalue); return 0; } support = r ? SUPPORT_YES : SUPPORT_NO; } *v = support; return 0; } int manager_parse_config_file(Manager *m) { assert(m); return config_parse_many("/etc/systemd/resolved.conf", CONF_DIRS_NULSTR("systemd/resolved.conf"), "Resolve\0", config_item_perf_lookup, resolved_gperf_lookup, false, m); }
/* * UAE - The Un*x Amiga Emulator * * Library of functions to make emulated filesystem as independent as * possible of the host filesystem's capabilities. * This is the Unix version. * * Copyright 1999 Bernd Schmidt */ #include "sysconfig.h" #include "sysdeps.h" #include "fsdb.h" #define TRACING_ENABLED 0 #if TRACING_ENABLED #define TRACE(x) do { write_log x; } while(0) #else #define TRACE(x) #endif int dos_errno (void) { int e = errno; switch (e) { case ENOMEM: return ERROR_NO_FREE_STORE; case EEXIST: return ERROR_OBJECT_EXISTS; case EACCES: return ERROR_WRITE_PROTECTED; case ENOENT: return ERROR_OBJECT_NOT_AROUND; case ENOTDIR: return ERROR_OBJECT_WRONG_TYPE; case ENOSPC: return ERROR_DISK_IS_FULL; case EBUSY: return ERROR_OBJECT_IN_USE; case EISDIR: return ERROR_OBJECT_WRONG_TYPE; #if defined(ETXTBSY) case ETXTBSY: return ERROR_OBJECT_IN_USE; #endif #if defined(EROFS) case EROFS: return ERROR_DISK_WRITE_PROTECTED; #endif #if defined(ENOTEMPTY) #if ENOTEMPTY != EEXIST case ENOTEMPTY: return ERROR_DIRECTORY_NOT_EMPTY; #endif #endif default: TRACE (("FSDB: Unimplemented error: %s\n", strerror (e))); return ERROR_NOT_IMPLEMENTED; } } /* Return nonzero for any name we can't create on the native filesystem. */ int fsdb_name_invalid (const char *n) { if (strcmp (n, FSDB_FILE) == 0) return 1; if (n[0] != '.') return 0; if (n[1] == '\0') return 1; return n[1] == '.' && n[2] == '\0'; } int fsdb_exists (char *nname) { struct stat statbuf; return (stat (nname, &statbuf) != -1); } /* For an a_inode we have newly created based on a filename we found on the * native fs, fill in information about this file/directory. */ int fsdb_fill_file_attrs (a_inode *base, a_inode *aino) { struct stat statbuf; /* This really shouldn't happen... */ if (stat (aino->nname, &statbuf) == -1) return 0; aino->dir = S_ISDIR (statbuf.st_mode) ? 1 : 0; aino->amigaos_mode = ((S_IXUSR & statbuf.st_mode ? 0 : A_FIBF_EXECUTE) | (S_IWUSR & statbuf.st_mode ? 0 : A_FIBF_WRITE) | (S_IRUSR & statbuf.st_mode ? 0 : A_FIBF_READ)); return 1; } int fsdb_set_file_attrs (a_inode *aino) { struct stat statbuf; int mask = aino->amigaos_mode; int mode; if (stat (aino->nname, &statbuf) == -1) return ERROR_OBJECT_NOT_AROUND; mode = statbuf.st_mode; /* Unix dirs behave differently than AmigaOS ones. */ if (! aino->dir) { if (mask & A_FIBF_READ) mode &= ~S_IRUSR; else mode |= S_IRUSR; if (mask & A_FIBF_WRITE) mode &= ~S_IWUSR; else mode |= S_IWUSR; if (mask & A_FIBF_EXECUTE) mode &= ~S_IXUSR; else mode |= S_IXUSR; chmod (aino->nname, mode); } aino->amigaos_mode = mask; aino->dirty = 1; return 0; } /* Return nonzero if we can represent the amigaos_mode of AINO within the * native FS. Return zero if that is not possible. */ int fsdb_mode_representable_p (const a_inode *aino) { if (aino->dir) return aino->amigaos_mode == 0; return (aino->amigaos_mode & (A_FIBF_DELETE | A_FIBF_SCRIPT | A_FIBF_PURE)) == 0; } char *fsdb_create_unique_nname (a_inode *base, const char *suggestion) { char tmp[256] = "__uae___"; strncat (tmp, suggestion, 240); for (;;) { int i; char *p = build_nname (base->nname, tmp); if (access (p, R_OK) < 0 && errno == ENOENT) { printf ("unique name: %s\n", p); return p; } free (p); /* tmpnam isn't reentrant and I don't really want to hack configure * right now to see whether tmpnam_r is available... */ for (i = 0; i < 8; i++) { tmp[i] = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[rand () % 63]; } } }
/* * Copyright (c) 2010 José Luis Vergara <pentalis@gmail.com> * * 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 Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIS_HATCHING_PREFERENCES_H #define KIS_HATCHING_PREFERENCES_H #include <kis_paintop_option.h> #include <krita_export.h> class KisHatchingPreferencesWidget; class KisHatchingPreferences : public KisPaintOpOption { public: KisHatchingPreferences(); ~KisHatchingPreferences(); void writeOptionSetting(KisPropertiesConfiguration* setting) const; void readOptionSetting(const KisPropertiesConfiguration* setting); private: KisHatchingPreferencesWidget * m_options; }; #endif
// pySample_PE_header.c // Generated by decompiling pySample.dll // using Reko decompiler version 0.10.2.0. #include "pySample.h" Eq_n g_t10000000 = // 10000000 { 23117, 0xF0, };
/* Rversion.h. Generated automatically. */ #ifndef R_VERSION_H #define R_VERSION_H #ifdef __cplusplus extern "C" { #endif #define R_VERSION 196866 #define R_NICK "Pumpkin Helmet" #define R_Version(v,p,s) (((v) * 65536) + ((p) * 256) + (s)) #define R_MAJOR "3" #define R_MINOR "1.2" #define R_STATUS "" #define R_YEAR "2014" #define R_MONTH "10" #define R_DAY "31" #define R_SVN_REVISION 66913 #define R_FILEVERSION 3,12,66913,0 #ifdef __cplusplus } #endif #endif /* not R_VERSION_H */
/* gettimeofday - get the time. Linux/x86 version. Copyright (C) 2015-2017 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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. The GNU C 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 the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #include <sys/time.h> #ifdef SHARED # include <dl-vdso.h> # include <errno.h> static int __gettimeofday_syscall (struct timeval *tv, struct timezone *tz) { return INLINE_SYSCALL (gettimeofday, 2, tv, tz); } # ifndef __gettimeofday_type /* The i386 gettimeofday.c includes this file with a defined __gettimeofday_type macro. For x86_64 we have to define it to __gettimeofday as the internal symbol is the ifunc'ed one. */ # define __gettimeofday_type __gettimeofday # endif # undef INIT_ARCH # define INIT_ARCH() PREPARE_VERSION_KNOWN (linux26, LINUX_2_6) /* If the vDSO is not available we fall back to syscall. */ libc_ifunc_hidden (__gettimeofday_type, __gettimeofday, (_dl_vdso_vsym ("__vdso_gettimeofday", &linux26) ?: &__gettimeofday_syscall)) libc_hidden_def (__gettimeofday) #else # include <sysdep.h> # include <errno.h> int __gettimeofday (struct timeval *tv, struct timezone *tz) { return INLINE_SYSCALL (gettimeofday, 2, tv, tz); } libc_hidden_def (__gettimeofday) #endif weak_alias (__gettimeofday, gettimeofday) libc_hidden_weak (gettimeofday)
class calculator { public: int multiply(int x, int y); int add(int x, int y); }; int calculator::multiply(int x, int y) { return x*y; } int calculator::add(int x, int y) { return x+y; }
// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #define _WIN32_WINNT 0x0502 #include "winsock2.h" #include "windows.h" #include "stdio.h" #include "Iphlpapi.h" #include <psapi.h> #include "Ntsecapi.h" #include "txdtc.h" #include "xolehlp.h" #include <iostream> #include <tchar.h> // TODO: reference additional headers your program requires here
/* * This file is part of VLE, a framework for multi-modeling, simulation * and analysis of complex dynamical systems * https://www.vle-project.org * * Copyright (c) 2015-2018 INRA http://www.inra.fr * * See the AUTHORS or Authors.txt file for copyright owners and contributors * * 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 3 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, see <http://www.gnu.org/licenses/>. */ #ifndef FilePluginGUItab_H #define FilePluginGUItab_H #include <QObject> #include <QtCore/qnamespace.h> #include <QtXml> #include "vlevpz.hpp" #include <vle/value/Map.hpp> namespace Ui { class FilePluginGvle; } class FilePluginGUItab : public QWidget { Q_OBJECT public: explicit FilePluginGUItab(QWidget* parent = 0); ~FilePluginGUItab() override; void init(vle::gvle::vleVpz* vpz, const QString& viewName); private slots: void flushByBagChanged(int val); void julianDayChanged(int val); void localeChanged(const QString& val); void destinationChanged(const QString& val); void fileTypeChanged(const QString& val); private: int getCheckState(const vle::value::Boolean& v); bool wellFormed(); void buildDefaultConfig(); Ui::FilePluginGvle* ui; vle::gvle::vleVpz* mvleVpz; QString mViewName; std::unique_ptr<vle::value::Map> outputNodeConfig; }; #endif
/* ChibiOS/RT - Copyright (C) 2006-2013 Giovanni Di Sirio 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 "ch.h" #include "hal.h" /** * @brief PAL setup. * @details Digital I/O ports static configuration as defined in @p board.h. * This variable is used by the HAL when initializing the PAL driver. */ #if HAL_USE_PAL || defined(__DOXYGEN__) const PALConfig pal_default_config = { {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} }; #endif /* * Early initialization code. * This initialization must be performed just after stack setup and before * any other initialization. */ void __early_init(void) { stm32_clock_init(); } /* * Board-specific initialization code. */ void boardInit(void) { } #if HAL_USE_SDC /** * @brief Insertion monitor function. * * @param[in] sdcp pointer to the @p SDCDriver object * * @notapi */ bool_t sdc_lld_is_card_inserted(SDCDriver *sdcp) { (void)sdcp; return !palReadPad(GPIOE, GPIOE_SDIO_DETECT); } /** * @brief Protection detection. * @note Not supported, always not protected. * * @param[in] sdcp pointer to the @p SDCDriver object * * @notapi */ bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { (void)sdcp; return FALSE; } #endif /* HAL_USE_SDC */