text
stringlengths
4
6.14k
// Copyright 2015 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. // Common IPC messages used for render processes. // Multiply-included message file, hence no include guard. #include <stdint.h> #include <string> #include "base/memory/shared_memory.h" #include "build/build_config.h" #include "ipc/ipc_message_macros.h" #include "ipc/ipc_message_utils.h" #include "url/gurl.h" #include "url/origin.h" #if defined(OS_MACOSX) #include "content/common/mac/font_descriptor.h" #endif #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT #define IPC_MESSAGE_START RenderProcessMsgStart #if defined(OS_MACOSX) IPC_STRUCT_TRAITS_BEGIN(FontDescriptor) IPC_STRUCT_TRAITS_MEMBER(font_name) IPC_STRUCT_TRAITS_MEMBER(font_point_size) IPC_STRUCT_TRAITS_END() #endif //////////////////////////////////////////////////////////////////////////////// // Messages sent from the browser to the render process. //////////////////////////////////////////////////////////////////////////////// // Messages sent from the render process to the browser. // Asks the browser process to generate a keypair for grabbing a client // certificate from a CA (<keygen> tag), and returns the signed public // key and challenge string. IPC_SYNC_MESSAGE_CONTROL4_1(RenderProcessHostMsg_Keygen, uint32_t /* key size index */, std::string /* challenge string */, GURL /* URL of requestor */, GURL /* Origin of top-level frame */, std::string /* signed public key and challenge */) // Message sent from the renderer to the browser to request that the browser // cache |data| associated with |url| and |expected_response_time|. IPC_MESSAGE_CONTROL3(RenderProcessHostMsg_DidGenerateCacheableMetadata, GURL /* url */, base::Time /* expected_response_time */, std::vector<char> /* data */) // Message sent from the renderer to the browser to request that the browser // cache |data| for the specified CacheStorage entry. IPC_MESSAGE_CONTROL5( RenderProcessHostMsg_DidGenerateCacheableMetadataInCacheStorage, GURL /* url */, base::Time /* expected_response_time */, std::vector<char> /* data */, url::Origin /* cache_storage_origin*/, std::string /* cache_storage_cache_name */) // Notify the browser that this render process can or can't be suddenly // terminated. IPC_MESSAGE_CONTROL1(RenderProcessHostMsg_SuddenTerminationChanged, bool /* enabled */) #if defined(OS_MACOSX) // Request that the browser load a font into shared memory for us. IPC_SYNC_MESSAGE_CONTROL1_3(RenderProcessHostMsg_LoadFont, FontDescriptor /* font to load */, uint32_t /* buffer size */, base::SharedMemoryHandle /* font data */, uint32_t /* font id */) #elif defined(OS_WIN) // Request that the given font characters be loaded by the browser so it's // cached by the OS. Please see RenderMessageFilter::OnPreCacheFontCharacters // for details. IPC_SYNC_MESSAGE_CONTROL2_0(RenderProcessHostMsg_PreCacheFontCharacters, LOGFONT /* font_data */, base::string16 /* characters */) #endif
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKTRANSFERFUNCTIONGENERATORWIDGET_H #define QMITKTRANSFERFUNCTIONGENERATORWIDGET_H #include "ui_QmitkTransferFunctionGeneratorWidget.h" #include "QmitkExtExports.h" #include <mitkCommon.h> #include <QWidget> #include <mitkDataNode.h> #include <mitkTransferFunctionProperty.h> class QmitkExt_EXPORT QmitkTransferFunctionGeneratorWidget : public QWidget, public Ui::QmitkTransferFunctionGeneratorWidget { Q_OBJECT public: QmitkTransferFunctionGeneratorWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); ~QmitkTransferFunctionGeneratorWidget () ; void SetDataNode(mitk::DataNode* node); int AddPreset(const QString& presetName); void SetPresetsTabEnabled(bool enable); void SetThresholdTabEnabled(bool enable); void SetBellTabEnabled(bool enable); public slots: void OnSavePreset( ); void OnLoadPreset( ); void OnDeltaLevelWindow( int dx, int dy ); void OnDeltaThreshold( int dx, int dy ); signals: void SignalTransferFunctionModeChanged( int ); void SignalUpdateCanvas(); protected slots: void OnPreset( int mode ); protected: mitk::TransferFunctionProperty::Pointer tfpToChange; double histoMinimum; double histoMaximum; double thPos; double thDelta; double deltaScale; double deltaMax; double deltaMin; const mitk::Image::HistogramType *histoGramm; QString presetFileName; std::string ReduceFileName(std::string fileNameLong ); double ScaleDelta(int d) const; }; #endif
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE590_Free_Memory_Not_on_Heap__free_int64_t_static_08.c Label Definition File: CWE590_Free_Memory_Not_on_Heap__free.label.xml Template File: sources-sink-08.tmpl.c */ /* * @description * CWE: 590 Free Memory Not on Heap * BadSource: static Data buffer is declared static on the stack * GoodSource: Allocate memory on the heap * Sink: * BadSink : Print then free data * Flow Variant: 08 Control flow: if(staticReturnsTrue()) and if(staticReturnsFalse()) * * */ #include "std_testcase.h" #include <wchar.h> /* The two function below always return the same value, so a tool * should be able to identify that calls to the functions will always * return a fixed value. */ static int staticReturnsTrue() { return 1; } static int staticReturnsFalse() { return 0; } #ifndef OMITBAD void CWE590_Free_Memory_Not_on_Heap__free_int64_t_static_08_bad() { int64_t * data; data = NULL; /* Initialize data */ if(staticReturnsTrue()) { { /* FLAW: data is allocated on the stack and deallocated in the BadSink */ static int64_t dataBuffer[100]; { size_t i; for (i = 0; i < 100; i++) { dataBuffer[i] = 5LL; } } data = dataBuffer; } } printLongLongLine(data[0]); /* POTENTIAL FLAW: Possibly deallocating memory allocated on the stack */ free(data); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B1() - use goodsource and badsink by changing the staticReturnsTrue() to staticReturnsFalse() */ static void goodG2B1() { int64_t * data; data = NULL; /* Initialize data */ if(staticReturnsFalse()) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { { /* FIX: data is allocated on the heap and deallocated in the BadSink */ int64_t * dataBuffer = (int64_t *)malloc(100*sizeof(int64_t)); if (dataBuffer == NULL) { printLine("malloc() failed"); exit(1); } { size_t i; for (i = 0; i < 100; i++) { dataBuffer[i] = 5LL; } } data = dataBuffer; } } printLongLongLine(data[0]); /* POTENTIAL FLAW: Possibly deallocating memory allocated on the stack */ free(data); } /* goodG2B2() - use goodsource and badsink by reversing the blocks in the if statement */ static void goodG2B2() { int64_t * data; data = NULL; /* Initialize data */ if(staticReturnsTrue()) { { /* FIX: data is allocated on the heap and deallocated in the BadSink */ int64_t * dataBuffer = (int64_t *)malloc(100*sizeof(int64_t)); if (dataBuffer == NULL) { printLine("malloc() failed"); exit(1); } { size_t i; for (i = 0; i < 100; i++) { dataBuffer[i] = 5LL; } } data = dataBuffer; } } printLongLongLine(data[0]); /* POTENTIAL FLAW: Possibly deallocating memory allocated on the stack */ free(data); } void CWE590_Free_Memory_Not_on_Heap__free_int64_t_static_08_good() { goodG2B1(); goodG2B2(); } #endif /* OMITGOOD */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); CWE590_Free_Memory_Not_on_Heap__free_int64_t_static_08_good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); CWE590_Free_Memory_Not_on_Heap__free_int64_t_static_08_bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
/* $NetBSD: ieeefp.h,v 1.1 1998/05/28 08:12:15 sakamoto Exp $ */ #include <powerpc/ieeefp.h>
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE126_Buffer_Overread__CWE129_fscanf_54b.c Label Definition File: CWE126_Buffer_Overread__CWE129.label.xml Template File: sources-sinks-54b.tmpl.c */ /* * @description * CWE: 126 Buffer Overread * BadSource: fscanf Read data from the console using fscanf() * GoodSource: Larger than zero but less than 10 * Sinks: * GoodSink: Ensure the array index is valid * BadSink : Improperly check the array index by not checking the upper bound * Flow Variant: 54 Data flow: data passed as an argument from one function through three others to a fifth; all five functions are in different source files * * */ #include "std_testcase.h" #ifndef OMITBAD /* bad function declaration */ void CWE126_Buffer_Overread__CWE129_fscanf_54c_badSink(int data); void CWE126_Buffer_Overread__CWE129_fscanf_54b_badSink(int data) { CWE126_Buffer_Overread__CWE129_fscanf_54c_badSink(data); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void CWE126_Buffer_Overread__CWE129_fscanf_54c_goodG2BSink(int data); void CWE126_Buffer_Overread__CWE129_fscanf_54b_goodG2BSink(int data) { CWE126_Buffer_Overread__CWE129_fscanf_54c_goodG2BSink(data); } /* goodB2G uses the BadSource with the GoodSink */ void CWE126_Buffer_Overread__CWE129_fscanf_54c_goodB2GSink(int data); void CWE126_Buffer_Overread__CWE129_fscanf_54b_goodB2GSink(int data) { CWE126_Buffer_Overread__CWE129_fscanf_54c_goodB2GSink(data); } #endif /* OMITGOOD */
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE667_Improper_Locking__basic_05.c Label Definition File: CWE667_Improper_Locking__basic.label.xml Template File: point-flaw-05.tmpl.c */ /* * @description * CWE: 667 Improper Locking * Sinks: * GoodSink: Acquire a lock before releasing it * BadSink : Release the lock before acquiring it * Flow Variant: 05 Control flow: if(staticTrue) and if(staticFalse) * * */ #include "std_testcase.h" #include "std_thread.h" /* The two variables below are not defined as "const", but are never assigned any other value, so a tool should be able to identify that reads of these will always return their initialized values. */ static int staticTrue = 1; /* true */ static int staticFalse = 0; /* false */ #ifndef OMITBAD void CWE667_Improper_Locking__basic_05_bad() { if(staticTrue) { { static stdThreadLock badLock = NULL; printLine("Creating lock..."); if (!stdThreadLockCreate(&badLock)) { printLine("Could not create lock"); exit(1); } printLine("Acquiring lock..."); stdThreadLockAcquire(badLock); /* FLAW: Do not release the lock */ } } } #endif /* OMITBAD */ #ifndef OMITGOOD /* good1() uses if(staticFalse) instead of if(staticTrue) */ static void good1() { if(staticFalse) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { { static stdThreadLock goodLock = NULL; printLine("Creating lock..."); if (!stdThreadLockCreate(&goodLock)) { printLine("Could not create lock"); exit(1); } printLine("Acquiring lock..."); stdThreadLockAcquire(goodLock); /* FIX: Release and destroy the lock */ printLine("Releasing lock..."); stdThreadLockRelease(goodLock); printLine("Destroying lock..."); stdThreadLockDestroy(goodLock); } } } /* good2() reverses the bodies in the if statement */ static void good2() { if(staticTrue) { { static stdThreadLock goodLock = NULL; printLine("Creating lock..."); if (!stdThreadLockCreate(&goodLock)) { printLine("Could not create lock"); exit(1); } printLine("Acquiring lock..."); stdThreadLockAcquire(goodLock); /* FIX: Release and destroy the lock */ printLine("Releasing lock..."); stdThreadLockRelease(goodLock); printLine("Destroying lock..."); stdThreadLockDestroy(goodLock); } } } void CWE667_Improper_Locking__basic_05_good() { good1(); good2(); } #endif /* OMITGOOD */ /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); CWE667_Improper_Locking__basic_05_good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); CWE667_Improper_Locking__basic_05_bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2014, Image Engine Design Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above // copyright notice, this list of conditions and the following // disclaimer. // // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following // disclaimer in the documentation and/or other materials provided with // the distribution. // // * Neither the name of John Haddon nor the names of // any other contributors to this software 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 GAFFERBINDINGS_MATCHPATTERNPATHFILTERBINDING_H #define GAFFERBINDINGS_MATCHPATTERNPATHFILTERBINDING_H namespace GafferBindings { void bindMatchPatternPathFilter(); } // namespace GafferBindings #endif // GAFFERBINDINGS_MATCHPATTERNPATHFILTERBINDING_H
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_UI_WEBUI_INSTANT_UI_H_ #define CHROME_BROWSER_UI_WEBUI_INSTANT_UI_H_ #include "content/public/browser/web_ui_controller.h" // Provides configuration options for instant web search. class InstantUI : public content::WebUIController { public: // Constructs an instance using |web_ui| for its data sources and message // handlers. explicit InstantUI(content::WebUI* web_ui); // Returns a scale factor to slow down instant animations. static int GetSlowAnimationScaleFactor(); private: DISALLOW_COPY_AND_ASSIGN(InstantUI); }; #endif // CHROME_BROWSER_UI_WEBUI_INSTANT_UI_H_
// // BIDViewController.h // TextShooter // // Copyright (c) 2013 Apress. All rights reserved. // #import <UIKit/UIKit.h> #import <SpriteKit/SpriteKit.h> @interface BIDViewController : UIViewController @end
#include <stdlib.h> #include <stdio.h> #include "iup.h" void SboxTest(void) { Ihandle *dlg, *bt, *box, *lbl, *ml, *vbox; bt = IupButton("Button", NULL); //IupSetAttribute(bt, "EXPAND", "VERTICAL"); /* This is the only necessary EXPAND */ IupSetAttribute(bt, "EXPAND", "YES"); box = IupSbox(bt); IupSetAttribute(box, "DIRECTION", "SOUTH"); /* place at the bottom of the button */ // IupSetAttribute(box, "COLOR", "0 255 0"); ml = IupMultiLine(NULL); IupSetAttribute(ml, "EXPAND", "YES"); IupSetAttribute(ml, "VISIBLELINES", "5"); vbox = IupVbox(box, ml, NULL); lbl = IupLabel("Label"); IupSetAttribute(lbl, "EXPAND", "VERTICAL"); dlg = IupDialog(IupHbox(vbox, lbl, NULL)); IupSetAttribute(dlg, "TITLE", "IupSbox Example"); IupSetAttribute(dlg, "MARGIN", "10x10"); IupSetAttribute(dlg, "GAP", "10"); IupShow(dlg); } #ifndef BIG_TEST int main(int argc, char* argv[]) { IupOpen(&argc, &argv); SboxTest(); IupMainLoop(); IupClose(); return EXIT_SUCCESS; } #endif
#ifndef __TextureArray_H__ #define __TextureArray_H__ #include "SdkSample.h" #include "OgreImage.h" using namespace Ogre; using namespace OgreBites; class _OgreSampleClassExport Sample_TextureArray : public SdkSample { public: Sample_TextureArray() { mInfo["Title"] = "Texture Array"; mInfo["Description"] = "Demonstrates texture array support."; mInfo["Thumbnail"] = "thumb_texarray.png"; mInfo["Category"] = "Unsorted"; mInfo["Help"] = "Top Left: Multi-frame\nTop Right: Scrolling\nBottom Left: Rotation\nBottom Right: Scaling"; } protected: void testCapabilities( const RenderSystemCapabilities* caps ) { if (!caps->hasCapability(RSC_VERTEX_PROGRAM) || !caps->hasCapability(RSC_FRAGMENT_PROGRAM)) { OGRE_EXCEPT(Exception::ERR_NOT_IMPLEMENTED, "Your graphics card does not support vertex and " "fragment programs, so you cannot run this sample. Sorry!", "TextureArray::testCapabilities"); } if (!GpuProgramManager::getSingleton().isSyntaxSupported("vs_4_0") && !GpuProgramManager::getSingleton().isSyntaxSupported("ps_2_0") && !GpuProgramManager::getSingleton().isSyntaxSupported("glsl") && #if OGRE_NO_GLES3_SUPPORT == 0 !GpuProgramManager::getSingleton().isSyntaxSupported("glsles") && #endif !GpuProgramManager::getSingleton().isSyntaxSupported("gp4fp")) { OGRE_EXCEPT(Exception::ERR_NOT_IMPLEMENTED, "Your card does not support the shader model needed for this sample, " "so you cannot run this sample. Sorry!", "TextureArray::testCapabilities"); } } void setupContent() { mSceneMgr->setSkyBox(true, "Examples/TrippySkyBox"); // set our camera to orbit around the origin and show cursor mCameraMan->setStyle(CS_ORBIT); mTrayMgr->showCursor(); // the names of the textures we will use (all need to be the same size: 512*512 in our case) vector<String>::type texNames; texNames.push_back("BeachStones.jpg"); texNames.push_back("BumpyMetal.jpg"); texNames.push_back("egyptrockyfull.jpg"); texNames.push_back("frost.png"); texNames.push_back("MtlPlat2.jpg"); texNames.push_back("nskingr.jpg"); texNames.push_back("Panels_Diffuse.png"); texNames.push_back("Panels_reflection.png"); texNames.push_back("RustedMetal.jpg"); texNames.push_back("spacesky.jpg"); texNames.push_back("terrain_texture.jpg"); texNames.push_back("texmap2.jpg"); texNames.push_back("Water01.jpg"); texNames.push_back("Water02.jpg"); texNames.push_back("body.jpg"); texNames.push_back("stone1.jpg"); texNames.push_back("wall3.jpg"); texNames.push_back("sinbad_body.tga"); texNames.push_back("sinbad_clothes.tga"); texNames.push_back("stevecube_BK.jpg"); // create the 2d texture array (the depth is the size of the array - number of textures) TexturePtr tex = TextureManager::getSingleton().createManual("TextureArrayTex", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, TEX_TYPE_2D_ARRAY, 512, 512, texNames.size(), 0, PF_X8R8G8B8 ); // add all the textures to a 2d texture array for (size_t i = 0; i < texNames.size(); i++) { Image terrainTex; terrainTex.load(texNames[i], ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); HardwarePixelBufferSharedPtr pixelBufferBuf = tex->getBuffer(0); const PixelBox& currImage = pixelBufferBuf->lock(Box(0,0,i,terrainTex.getHeight(), terrainTex.getHeight(), i+1), HardwareBuffer::HBL_DISCARD); PixelUtil::bulkPixelConversion(terrainTex.getPixelBox(), currImage); pixelBufferBuf->unlock(); } // create material and set the texture unit to our texture MaterialManager& matMgr = MaterialManager::getSingleton(); MaterialPtr texArrayMat = matMgr.createOrRetrieve("Examples/TextureArray", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME).first; texArrayMat->compile(); Pass * pass = texArrayMat->getBestTechnique()->getPass(0); pass->setLightingEnabled(false); TextureUnitState* pState = pass->createTextureUnitState(); pState->setTextureName(tex->getName(), TEX_TYPE_2D_ARRAY); // create a plane with float3 tex coord - the third value will be the texture index in our case ManualObject* textureArrayObject = mSceneMgr->createManualObject("TextureAtlasObject"); // create a quad that uses our material int quadSize = 100; textureArrayObject->begin(texArrayMat->getName(), RenderOperation::OT_TRIANGLE_LIST); // triangle 0 of the quad textureArrayObject->position(0, 0, 0); textureArrayObject->textureCoord(0, 0, 0); textureArrayObject->position(quadSize, 0, 0); textureArrayObject->textureCoord(1, 0, 0); textureArrayObject->position(quadSize, quadSize, 0); textureArrayObject->textureCoord(1, 1, texNames.size()); // triangle 1 of the quad textureArrayObject->position(0, 0, 0); textureArrayObject->textureCoord(0, 0, 0); textureArrayObject->position(quadSize, quadSize, 0); textureArrayObject->textureCoord(1, 1, texNames.size()); textureArrayObject->position(0, quadSize, 0); textureArrayObject->textureCoord(0, 1, texNames.size()); textureArrayObject->end(); // attach it to a node and position appropriately SceneNode* node = mSceneMgr->getRootSceneNode()->createChildSceneNode(); node->setPosition(-quadSize / 2, -quadSize / 2, 0); node->attachObject(textureArrayObject); } void cleanupContent() { TextureManager::getSingleton().remove("TextureArrayTex"); } }; #endif
#include <SDL2/SDL2_rotozoom.h>
/* * Copyright (C) 2006 Philippe Gerum <rpm@xenomai.org>. * * Xenomai 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. * * Xenomai 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 Xenomai; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _UITRON_SYSCALL_H #define _UITRON_SYSCALL_H #include <nucleus/compiler.h> #ifndef __XENO_SIM__ #include <asm/xenomai/syscall.h> #endif /* __XENO_SIM__ */ #define __uitron_cre_tsk 0 #define __uitron_del_tsk 1 #define __uitron_sta_tsk 2 #define __uitron_ext_tsk 3 #define __uitron_exd_tsk 4 #define __uitron_ter_tsk 5 #define __uitron_dis_dsp 6 #define __uitron_ena_dsp 7 #define __uitron_chg_pri 8 #define __uitron_rot_rdq 9 #define __uitron_rel_wai 10 #define __uitron_get_tid 11 #define __uitron_ref_tsk 12 #define __uitron_sus_tsk 13 #define __uitron_rsm_tsk 14 #define __uitron_frsm_tsk 15 #define __uitron_slp_tsk 16 #define __uitron_tslp_tsk 17 #define __uitron_wup_tsk 18 #define __uitron_can_wup 19 #define __uitron_cre_sem 20 #define __uitron_del_sem 21 #define __uitron_sig_sem 22 #define __uitron_wai_sem 23 #define __uitron_preq_sem 24 #define __uitron_twai_sem 25 #define __uitron_ref_sem 26 #define __uitron_cre_flg 27 #define __uitron_del_flg 28 #define __uitron_set_flg 29 #define __uitron_clr_flg 30 #define __uitron_wai_flg 31 #define __uitron_pol_flg 32 #define __uitron_twai_flg 33 #define __uitron_ref_flg 34 #define __uitron_cre_mbx 35 #define __uitron_del_mbx 36 #define __uitron_snd_msg 37 #define __uitron_rcv_msg 38 #define __uitron_prcv_msg 39 #define __uitron_trcv_msg 40 #define __uitron_ref_mbx 41 #ifdef __KERNEL__ #ifdef __cplusplus extern "C" { #endif int ui_syscall_init(void); void ui_syscall_cleanup(void); #ifdef __cplusplus } #endif #endif /* __KERNEL__ */ #endif /* _UITRON_SYSCALL_H */
// $Id: stack.h,v 1.6 2014-01-24 18:33:47-08 - - $ #ifndef __STACK_H__ #define __STACK_H__ #include <stdbool.h> #include "bigint.h" typedef struct stack stack; typedef bigint *stack_item; // // Create a new empty stack. // stack *new_stack (void); // // Free up the stack. // Precondition: stack must be empty. // void free_stack (stack*); // // Push a new stack_item onto the top of the stack. // void push_stack (stack *, stack_item); // // Pop the top stack_item from the stack and return it. // stack_item pop_stack (stack*); // // Peek into the stack and return a selected stack_item. // Item 0 is the element at the top. // Item size_stack - 1 is the element at the bottom. // Precondition: 0 <= index && index < size_stack. // stack_item peek_stack (stack *, size_t index); // // Indicate whether the stack is empty or not. // Same as size_stack == 0. // bool empty_stack (stack*); // // Return the current size of the stack (number of items on the stack). // size_t size_stack (stack*); // // Print part of the stack in debug format. // void show_stack (stack*); #endif
// Copyright (c) 2015 The Hivemind Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef HIVEMIND_QT_BALLOTOUTCOMEFILTERPROXYMODEL_H #define HIVEMIND_QT_BALLOTOUTCOMEFILTERPROXYMODEL_H #include <QModelIndex> #include <QObject> #include <QSortFilterProxyModel> #include <QString> class BallotOutcomeFilterProxyModel : public QSortFilterProxyModel { Q_OBJECT public: explicit BallotOutcomeFilterProxyModel(QObject *parent=0) : QSortFilterProxyModel(parent) { } protected: private: }; #endif // HIVEMIND_QT_BALLOTOUTCOMEFILTERPROXYMODEL_H
// // Created by lionell on 3/21/15. // #ifndef _LAB_2_CONTOUR_H_ #define _LAB_2_CONTOUR_H_ #include "share.h" #include "Point.h" #include "Segment.h" class IContour { public: virtual Position where(Point *point) = 0; virtual double distance_to(Point* point) = 0; }; class Contour: public IContour { private: Segment *segments[5]; protected: Contour(double a = 0.0); public: ~Contour(); Position where(Point *point); double distance_to(Point* point); }; #endif //_LAB_2_CONTOUR_H_
#pragma once #include <glbinding/nogl.h> #include <glbinding/gl31ext/types.h> #include <glbinding/gl31ext/values.h> #include <glbinding/gl31ext/boolean.h> #include <glbinding/gl31ext/bitfield.h> #include <glbinding/gl31ext/enum.h> #include <glbinding/gl31ext/functions.h> #include <glbinding/gl/extension.h>
/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2015 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Etienne Kneuss <colder@php.net> | +----------------------------------------------------------------------+ */ /* $Id$ */ #ifndef SPL_HEAP_H #define SPL_HEAP_H #include "php.h" #include "php_spl.h" extern PHPAPI zend_class_entry *spl_ce_SplHeap; extern PHPAPI zend_class_entry *spl_ce_SplMinHeap; extern PHPAPI zend_class_entry *spl_ce_SplMaxHeap; extern PHPAPI zend_class_entry *spl_ce_SplPriorityQueue; PHP_MINIT_FUNCTION(spl_heap); #endif /* SPL_HEAP_H */ /* * Local Variables: * c-basic-offset: 4 * tab-width: 4 * End: * vim600: fdm=marker * vim: noet sw=4 ts=4 */
/**************************************************************************** Copyright (c) 2015 Chris Hannon http://www.channon.us Copyright (c) 2013-2015 Chukong Technologies Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #ifndef __TestCpp__SocketIOTest__ #define __TestCpp__SocketIOTest__ #include "cocos2d.h" #include "extensions/cocos-ext.h" #include "network/SocketIO.h" #include "BaseTest.h" DEFINE_TEST_SUITE(SocketIOTests); class SocketIOTest: public TestCase , public cocos2d::network::SocketIO::SIODelegate { public: CREATE_FUNC(SocketIOTest); SocketIOTest(); virtual ~SocketIOTest(); /** * @brief Used for network level socket close (not for disconnect from the socket.io server) */ virtual void onClose(cocos2d::network::SIOClient* client)override; /** * @brief Used for network level socket error (not for disconnect from the socket.io server) **/ virtual void onError(cocos2d::network::SIOClient* client, const std::string& data)override; /** * @brief Common function to call on both socket.io disconnect and websocket close **/ void closedSocketAction(cocos2d::network::SIOClient* client); // test action handlers for main Test Client that connects to defaul namespace "" or "/" void onMenuSIOClientClicked(cocos2d::Ref *sender); void onMenuTestMessageClicked(cocos2d::Ref *sender); void onMenuTestEventClicked(cocos2d::Ref *sender); void onMenuTestClientDisconnectClicked(cocos2d::Ref *sender); // test action handlers for Test Endpoint that connects to /testpoint endpoint void onMenuSIOEndpointClicked(cocos2d::Ref *sender); void onMenuTestMessageEndpointClicked(cocos2d::Ref *sender); void onMenuTestEventEndpointClicked(cocos2d::Ref *sender); void onMenuTestEndpointDisconnectClicked(cocos2d::Ref *sender); // custom handlers for socket.io related events /** * @brief Socket.io event handler for custom event "testevent" **/ void testevent(cocos2d::network::SIOClient *client, const std::string& data); /** * @brief Socket.io event handler for custom event "echoevent" **/ void echotest(cocos2d::network::SIOClient *client, const std::string& data); /** * @brief Socket.io event handler for event "connect" **/ void connect(cocos2d::network::SIOClient* client, const std::string& data); /** * @brief Socket.io event handler for event "disconnect" **/ void disconnect(cocos2d::network::SIOClient* client, const std::string& data); /** * @brief Socket.io event handler for event "message" **/ void message(cocos2d::network::SIOClient* client, const std::string& data); /** * @brief Socket.io event handler for event "json" * This is only used in v 0.9.x, in 1.x this is handled as a "message" event **/ void json(cocos2d::network::SIOClient* client, const std::string& data); virtual std::string title() const override{ return "SocketIO Extension Test"; } protected: cocos2d::network::SIOClient *_sioClient, *_sioEndpoint; cocos2d::Label *_sioClientStatus; }; #endif /* defined(__TestCpp__SocketIOTest__) */
// This file was generated based on 'C:\ProgramData\Uno\Packages\UnoCore\0.19.6\Targets\CPlusPlus\Android\Source\Base\$.uno'. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <jni.h> #include <Uno.Object.h> namespace g{ namespace Android{ namespace Base{ namespace Primitives{ // public extern struct JNINativeMethod :2076 // { uStructType* JNINativeMethod_typeof(); struct JNINativeMethod { }; // } }}}} // ::g::Android::Base::Primitives
// This file was generated based on 'C:\ProgramData\Uno\Packages\Android\0.19.1\Android\android\content\res\$.uno'. // WARNING: Changes might be lost if you edit this file directly. #pragma once #include <Android.android.os.Parcelable.h> #include <Android.Base.Wrappers.IJWrapper.h> #include <Android.java.lang.Object.h> #include <jni.h> #include <Uno.IDisposable.h> namespace g{namespace Android{namespace android{namespace content{namespace res{struct ColorStateList;}}}}} namespace g{namespace Android{namespace android{namespace os{struct Parcel;}}}} namespace g{namespace Android{namespace java{namespace lang{struct String;}}}} namespace g{ namespace Android{ namespace android{ namespace content{ namespace res{ // public sealed extern class ColorStateList :688 // { struct ColorStateList_type : ::g::Android::java::lang::Object_type { ::g::Android::android::os::Parcelable interface2; }; ColorStateList_type* ColorStateList_typeof(); void ColorStateList___Init2_fn(); void ColorStateList__describeContents_fn(ColorStateList* __this, int* __retval); void ColorStateList__describeContents_IMPL_3527_fn(bool* arg0_, jobject* arg1_, int* __retval); void ColorStateList__getDefaultColor_fn(ColorStateList* __this, int* __retval); void ColorStateList__getDefaultColor_IMPL_3525_fn(bool* arg0_, jobject* arg1_, int* __retval); void ColorStateList__toString_fn(ColorStateList* __this, ::g::Android::java::lang::String** __retval); void ColorStateList__toString_IMPL_3526_fn(bool* arg0_, jobject* arg1_, uObject** __retval); void ColorStateList__writeToParcel_fn(ColorStateList* __this, ::g::Android::android::os::Parcel* arg0, int* arg1); void ColorStateList__writeToParcel_IMPL_3528_fn(bool* arg0_, jobject* arg1_, uObject* arg2_, int* arg3_); struct ColorStateList : ::g::Android::java::lang::Object { static jclass _javaClass2_; static jclass& _javaClass2() { return _javaClass2_; } static jmethodID describeContents_3527_ID_; static jmethodID& describeContents_3527_ID() { return describeContents_3527_ID_; } static jmethodID getDefaultColor_3525_ID_; static jmethodID& getDefaultColor_3525_ID() { return getDefaultColor_3525_ID_; } static jmethodID toString_3526_ID_; static jmethodID& toString_3526_ID() { return toString_3526_ID_; } static jmethodID writeToParcel_3528_ID_; static jmethodID& writeToParcel_3528_ID() { return writeToParcel_3528_ID_; } int describeContents(); int getDefaultColor(); void writeToParcel(::g::Android::android::os::Parcel* arg0, int arg1); static void _Init2(); static int describeContents_IMPL_3527(bool arg0_, jobject arg1_); static int getDefaultColor_IMPL_3525(bool arg0_, jobject arg1_); static uObject* toString_IMPL_3526(bool arg0_, jobject arg1_); static void writeToParcel_IMPL_3528(bool arg0_, jobject arg1_, uObject* arg2_, int arg3_); }; // } }}}}} // ::g::Android::android::content::res
// // Generated by the J2ObjC translator. DO NOT EDIT! // source: src-delomboked/com/sponberg/fluid/layout/CoordRelativeToParent.java // #ifndef _FFTCoordRelativeToParent_H_ #define _FFTCoordRelativeToParent_H_ @class JavaUtilArrayList; #import "JreEmulation.h" #include "com/sponberg/fluid/layout/Coord.h" @interface FFTCoordRelativeToParent : FFTCoord { @public NSString *edge_; } - (id)initWithNSString:(NSString *)edge withJavaUtilArrayList:(JavaUtilArrayList *)subtractors; - (BOOL)isRelativeToParent; - (NSString *)getRelativeEdge; - (NSString *)description; - (NSString *)getEdge; - (void)copyAllFieldsTo:(FFTCoordRelativeToParent *)other; @end __attribute__((always_inline)) inline void FFTCoordRelativeToParent_init() {} J2OBJC_FIELD_SETTER(FFTCoordRelativeToParent, edge_, NSString *) typedef FFTCoordRelativeToParent ComSponbergFluidLayoutCoordRelativeToParent; #endif // _FFTCoordRelativeToParent_H_
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ /* Copyright 2014 Endless Mobile, 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. */ #ifndef __GJS_PRIVATE_GTK_UTIL_H__ #define __GJS_PRIVATE_GTK_UTIL_H__ #include "config.h" #ifdef ENABLE_GTK #include <gtk/gtk.h> G_BEGIN_DECLS void gjs_gtk_container_child_set_property (GtkContainer *container, GtkWidget *child, const gchar *property, const GValue *value); G_END_DECLS #endif #endif /* __GJS_PRIVATE_GTK_UTIL_H__ */
/* j/6/cons.c ** */ #include "all.h" /* functions */ u3_noun u3qf_cons( u3_noun vur, u3_noun sed) { u3_noun p_vur, p_sed; if ( c3y == u3r_p(vur, 1, &p_vur) && c3y == u3r_p(sed, 1, &p_sed) ) { return u3nt(1, u3k(p_vur), u3k(p_sed)); } else if ( c3y == u3r_p(vur, 0, &p_vur) && c3y == u3r_p(sed, 0, &p_sed) && !(c3y == u3r_sing(1, p_vur)) && !(c3y == u3r_sing(p_vur, p_sed)) && (0 == u3r_nord(p_vur, p_sed)) ) { u3_atom fub = u3qa_div(p_vur, 2); u3_atom nof = u3qa_div(p_sed, 2); if ( c3y == u3r_sing(fub, nof) ) { u3z(nof); return u3nc(0, fub); } else { u3z(fub); u3z(nof); } } return u3nc(u3k(vur), u3k(sed)); } u3_noun u3wf_cons( u3_noun cor) { u3_noun vur, sed; if ( c3n == u3r_mean(cor, u3x_sam_2, &vur, u3x_sam_3, &sed, 0) ) { return u3m_bail(c3__fail); } else { return u3qf_cons(vur, sed); } }
// Copyright 2010, Camilo Aguilar. Cloudescape, LLC. #ifndef SRC_BINDINGS_H_ #define SRC_BINDINGS_H_ #include "node_inotify.h" namespace NodeInotify { class Inotify : public ObjectWrap { public: static void Initialize(Handle<Object> target); Inotify(); Inotify(bool nonpersistent); virtual ~Inotify(); protected: static Handle<Value> New(const Arguments& args); static Handle<Value> AddWatch(const Arguments& args); static Handle<Value> RemoveWatch(const Arguments& args); static Handle<Value> Close(const Arguments& args); static Handle<Value> GetPersistent(Local<String> property, const AccessorInfo& info); private: int fd; uv_poll_t* read_watcher; bool persistent; char poll_stopped; void StopPolling(); static void Callback(uv_poll_t* watcher, int status, int revents); static void on_handle_close(uv_handle_t* handle); }; } //namespace NodeInotify #endif // SRC_BINDINGS_H
// edit_svc_perms.h // // Edit Rivendell Service Permissions // // (C) Copyright 2002-2004 Fred Gleason <fredg@paravelsystems.com> // // $Id: edit_svc_perms.h,v 1.6 2010/07/29 19:32:34 cvs Exp $ // // 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. // // 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., 675 Mass Ave, Cambridge, MA 02139, USA. // #ifndef EDIT_SVC_PERMS_H #define EDIT_SVC_PERMS_H #include <qdialog.h> #include <qsqldatabase.h> #include <rdlistselector.h> #include <rdsvc.h> class EditSvcPerms : public QDialog { Q_OBJECT public: EditSvcPerms(RDSvc *svc,QWidget *parent=0,const char *name=0); ~EditSvcPerms(); QSize sizeHint() const; QSizePolicy sizePolicy() const; private slots: void okData(); void cancelData(); private: RDListSelector *svc_host_sel; RDSvc *svc_svc; }; #endif
/* Copyright 2007-2008 by Robert Knight <robertknight@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 APPLICATION_H #define APPLICATION_H // KDE #include <KUniqueApplication> // Konsole #include "Profile.h" class KCmdLineArgs; namespace Konsole { class MainWindow; class Session; /** * The Konsole Application. * * The application consists of one or more main windows and a set of * factories to create new sessions and views. * * To create a new main window with a default terminal session, call * the newInstance(). Empty main windows can be created using newMainWindow(). * * The factory used to create new terminal sessions can be retrieved using * the sessionManager() accessor. */ class Application : public KUniqueApplication { Q_OBJECT public: /** Constructs a new Konsole application. */ Application(); virtual ~Application(); /** Creates a new main window and opens a default terminal session */ virtual int newInstance(); /** * Creates a new, empty main window and connects to its newSessionRequest() * and newWindowRequest() signals to trigger creation of new sessions or * windows when then they are emitted. */ MainWindow* newMainWindow(); private slots: void createWindow(Profile::Ptr profile , const QString& directory); void detachView(Session* session); private: void init(); void listAvailableProfiles(); void listProfilePropertyInfo(); bool processHelpArgs(KCmdLineArgs* args); MainWindow* processWindowArgs(KCmdLineArgs* args); Profile::Ptr processProfileSelectArgs(KCmdLineArgs* args); Profile::Ptr processProfileChangeArgs(KCmdLineArgs* args, Profile::Ptr baseProfile); void processTabsFromFileArgs(KCmdLineArgs* args, MainWindow* window); void createTabFromArgs(KCmdLineArgs* args, MainWindow* window, const QHash<QString, QString>&); }; } #endif // APPLICATION_H
// help_audios.h // // Display help for audio ports (edit_audios.*) // // (C) Copyright 2006,2016 Fred Gleason <fredg@paravelsystems.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. // // 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., 675 Mass Ave, Cambridge, MA 02139, USA. // // #ifndef HELP_AUDIOS_H #define HELP_AUDIOS_H #include <qdialog.h> #include <qtextedit.h> class HelpAudioPorts : public QDialog { Q_OBJECT public: HelpAudioPorts(QWidget *parent=0); QSize sizeHint() const; QSizePolicy sizePolicy() const; private slots: void closeData(); private: QTextEdit *help_edit; }; #endif // HELP_AUDIOS_H
/* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once /*** This file is part of systemd. Copyright 2014 Zbigniew Jędrzejewski-Szmek 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 "hashmap.h" #include "macro.h" #include "set.h" #include "unit-name.h" int drop_in_file(const char *dir, const char *unit, unsigned level, const char *name, char **_p, char **_q); int write_drop_in(const char *dir, const char *unit, unsigned level, const char *name, const char *data); int write_drop_in_format(const char *dir, const char *unit, unsigned level, const char *name, const char *format, ...) _printf_(5, 6); int unit_file_find_dropin_paths( const char *original_root, char **lookup_path, Set *unit_path_cache, const char *dir_suffix, const char *file_suffix, Set *names, char ***paths); static inline int unit_file_find_dropin_conf_paths( const char *original_root, char **lookup_path, Set *unit_path_cache, Set *names, char ***paths) { return unit_file_find_dropin_paths(original_root, lookup_path, unit_path_cache, ".d", ".conf", names, paths); }
/***************************************************************************** * * Copyright (C) 2011 Thomas Volkert <thomas@homer-conferencing.com> * * This software is free software. * Your are allowed to redistribute it and/or modify it under the terms of * the GNU General Public License version 2 as published by the Free Software * Foundation. * * This source is published in the hope that it will be useful, but * WITHOUT ANY WARRANTY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License version 2 for more details. * * You should have received a copy of the GNU General Public License version 2 * along with this program. Otherwise, you can write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. * Alternatively, you find an online version of the license text under * http://www.gnu.org/licenses/gpl-2.0.html. * *****************************************************************************/ /* * Purpose: IEvents * Since: 2012-04-18 */ #ifndef _NAPI_IEVENT_ #define _NAPI_IEVENT_ #include <Logger.h> #include <Events.h> namespace Homer { namespace Base { /////////////////////////////////////////////////////////////////////////////// // transport attributes //#define REQUIREMENT_TRANSMIT_LOSSLESS 0x0101 //#define REQUIREMENT_TRANSMIT_CHUNKS 0x0102 //#define REQUIREMENT_TRANSMIT_STREAM 0x0103 //#define REQUIREMENT_TRANSMIT_BIT_ERRORS 0x0104 //#define REQUIREMENT_TRANSMIT_ORDERED 0x0105 /////////////////////////////////////////////////////////////////////////////// // forward declaration class Events; class IEvent { public: IEvent(int pType):mType(pType) { } virtual ~IEvent( ) { } virtual std::string getDescription() = 0; virtual int getType()const { return mType; } private: int mType; }; template <typename DerivedClass, int pType> class TEvent: public IEvent { public: TEvent():IEvent(pType) { } virtual ~TEvent() { } static int type() { return pType; } }; /////////////////////////////////////////////////////////////////////////////// }} // namespaces #endif
/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. * * This 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 software 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ #ifndef __RFB_TIMER_H__ #define __RFB_TIMER_H__ #include <list> #ifdef WIN32 //#include <winsock2.h> #else #include <sys/time.h> #endif namespace rfb { /* Timer Cross-platform timeout handling. The caller creates instances of Timer and passes a Callback implementation to each. The Callback will then be called with a pointer to the Timer instance that timed-out when the timeout occurs. The static methods of Timer are used by the main loop of the application both to dispatch elapsed Timer callbacks and to determine how long to wait in select() for the next timeout to occur. */ struct Timer { struct Callback { // handleTimeout // Passed a pointer to the Timer that has timed out. If the handler returns true // then the Timer is reset and left running, causing another timeout after the // appropriate interval. // If the handler returns false then the Timer is cancelled. virtual bool handleTimeout(Timer* t) = 0; }; // checkTimeouts() // Dispatches any elapsed Timers, and returns the number of milliseconds until the // next Timer will timeout. static int checkTimeouts(); // getNextTimeout() // Returns the number of milliseconds until the next timeout, without dispatching // any elapsed Timers. static int getNextTimeout(); // Create a Timer with the specified callback handler Timer(Callback* cb_) {cb = cb_;} ~Timer() {stop();} // startTimer // Starts the timer, causing a timeout after the specified number of milliseconds. // If the timer is already active then it will be implicitly cancelled and re-started. void start(int timeoutMs_); // stopTimer // Cancels the timer. void stop(); // isStarted // Determines whether the timer is started. bool isStarted(); // getTimeoutMs // Determines the previously used timeout value, if any. // Usually used with isStarted() to get the _current_ timeout. int getTimeoutMs(); // isBefore // Determine whether the Timer will timeout before the specified time. bool isBefore(timeval other); protected: timeval dueTime; int timeoutMs; Callback* cb; static void insertTimer(Timer* t); // The list of currently active Timers, ordered by time left until timeout. static std::list<Timer*> pending; }; }; #endif
/* $Id: isdn_x25iface.h,v 1.1 2011/07/05 16:54:19 ian Exp $ * * header for Linux ISDN subsystem, x.25 related functions * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. * */ #ifndef _LINUX_ISDN_X25IFACE_H #define _LINUX_ISDN_X25IFACE_H #define ISDN_X25IFACE_MAGIC 0x1e75a2b9 /* #define DEBUG_ISDN_X25 if you want isdn_x25 debugging messages */ #ifdef DEBUG_ISDN_X25 # define IX25DEBUG(fmt,args...) printk(KERN_DEBUG fmt , ## args) #else # define IX25DEBUG(fmt,args...) #endif #include <linux/skbuff.h> #include <linux/wanrouter.h> #include <linux/isdn.h> #include <linux/concap.h> extern struct concap_proto_ops * isdn_x25iface_concap_proto_ops_pt; extern struct concap_proto * isdn_x25iface_proto_new(void); #endif
/********************************************************************** Audacity: A Digital Audio Editor ImportFLAC.h Sami Liedes **********************************************************************/ #ifndef __AUDACITY_IMPORT_FLAC__ #define __AUDACITY_IMPORT_FLAC__ class ImportPluginList; class UnusableImportPluginList; void GetFLACImportPlugin(ImportPluginList *importPluginList, UnusableImportPluginList *unusableImportPluginList); #endif
/* $OpenBSD: ecb_enc.c,v 1.2 2002/10/27 13:24:26 miod Exp $ */ /* lib/des/ecb_enc.c */ /* Copyright (C) 1995 Eric Young (eay@mincom.oz.au) * All rights reserved. * * This file is part of an SSL implementation written * by Eric Young (eay@mincom.oz.au). * The implementation was written so as to conform with Netscapes SSL * specification. This library and applications are * FREE FOR COMMERCIAL AND NON-COMMERCIAL USE * as long as the following conditions are aheared to. * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. If this code is used in a product, * Eric Young should be given attribution as the author of the parts used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * 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 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 acknowledgement: * This product includes software developed by Eric Young (eay@mincom.oz.au) * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ #include "des_locl.h" #include "spr.h" const char *DES_version="libdes v 3.21 - 95/11/21 - eay"; void des_ecb_encrypt(input, output, ks, encrypt) des_cblock (*input); des_cblock (*output); des_key_schedule ks; int encrypt; { register u_int32_t l0,l1; register unsigned char *in,*out; u_int32_t ll[2]; in=(unsigned char *)input; out=(unsigned char *)output; c2l(in,l0); ll[0]=l0; c2l(in,l1); ll[1]=l1; des_encrypt(ll,ks,encrypt); l0=ll[0]; l2c(l0,out); l1=ll[1]; l2c(l1,out); l0=l1=ll[0]=ll[1]=0; } void des_encrypt(data, ks, encrypt) u_int32_t *data; des_key_schedule ks; int encrypt; { register u_int32_t l,r,t,u; #ifdef DES_USE_PTR register unsigned char *des_SP=(unsigned char *)des_SPtrans; #endif #ifdef MSDOS union fudge { u_int32_t l; unsigned short s[2]; unsigned char c[4]; } U,T; #endif register int i; register u_int32_t *s; u=data[0]; r=data[1]; IP(u,r); /* Things have been modified so that the initial rotate is * done outside the loop. This required the * des_SPtrans values in sp.h to be rotated 1 bit to the right. * One perl script later and things have a 5% speed up on a sparc2. * Thanks to Richard Outerbridge <71755.204@CompuServe.COM> * for pointing this out. */ l=(r<<1)|(r>>31); r=(u<<1)|(u>>31); /* clear the top bits on machines with 8byte longs */ l&=0xffffffffL; r&=0xffffffffL; s=(u_int32_t *)ks; /* I don't know if it is worth the effort of loop unrolling the * inner loop */ if (encrypt) { for (i=0; i<32; i+=4) { D_ENCRYPT(l,r,i+0); /* 1 */ D_ENCRYPT(r,l,i+2); /* 2 */ } } else { for (i=30; i>0; i-=4) { D_ENCRYPT(l,r,i-0); /* 16 */ D_ENCRYPT(r,l,i-2); /* 15 */ } } l=(l>>1)|(l<<31); r=(r>>1)|(r<<31); /* clear the top bits on machines with 8byte longs */ l&=0xffffffffL; r&=0xffffffffL; FP(r,l); data[0]=l; data[1]=r; l=r=t=u=0; } void des_encrypt2(data, ks, encrypt) u_int32_t *data; des_key_schedule ks; int encrypt; { register u_int32_t l,r,t,u; #ifdef DES_USE_PTR register unsigned char *des_SP=(unsigned char *)des_SPtrans; #endif #ifdef MSDOS union fudge { u_int32_t l; unsigned short s[2]; unsigned char c[4]; } U,T; #endif register int i; register u_int32_t *s; u=data[0]; r=data[1]; /* Things have been modified so that the initial rotate is * done outside the loop. This required the * des_SPtrans values in sp.h to be rotated 1 bit to the right. * One perl script later and things have a 5% speed up on a sparc2. * Thanks to Richard Outerbridge <71755.204@CompuServe.COM> * for pointing this out. */ l=(r<<1)|(r>>31); r=(u<<1)|(u>>31); /* clear the top bits on machines with 8byte longs */ l&=0xffffffffL; r&=0xffffffffL; s=(u_int32_t *)ks; /* I don't know if it is worth the effort of loop unrolling the * inner loop */ if (encrypt) { for (i=0; i<32; i+=4) { D_ENCRYPT(l,r,i+0); /* 1 */ D_ENCRYPT(r,l,i+2); /* 2 */ } } else { for (i=30; i>0; i-=4) { D_ENCRYPT(l,r,i-0); /* 16 */ D_ENCRYPT(r,l,i-2); /* 15 */ } } l=(l>>1)|(l<<31); r=(r>>1)|(r<<31); /* clear the top bits on machines with 8byte longs */ l&=0xffffffffL; r&=0xffffffffL; data[0]=l; data[1]=r; l=r=t=u=0; }
/* Streamer hooks. Support for adding streamer-specific callbacks to generic streaming routines. Copyright 2011 Free Software Foundation, Inc. Contributed by Diego Novillo <dnovillo@google.com> 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/>. */ #ifndef GCC_STREAMER_HOOKS_H #define GCC_STREAMER_HOOKS_H #include "tree.h" /* Forward declarations to avoid including unnecessary headers. */ struct output_block; struct lto_input_block; struct data_in; /* Streamer hooks. These functions do additional processing as needed by the module. There are two types of callbacks, those that replace the default behavior and those that supplement it. Hooks marked [REQ] are required to be set. Those marked [OPT] may be NULL, if the streamer does not need to implement them. */ struct streamer_hooks { /* [REQ] Called by every tree streaming routine that needs to write a tree node. The arguments are: output_block where to write the node, the tree node to write and a boolean flag that should be true if the caller wants to write a reference to the tree, instead of the tree itself. The second boolean parameter specifies this for the tree itself, the first for all siblings that are streamed. The referencing mechanism is up to each streamer to implement. */ void (*write_tree) (struct output_block *, tree, bool, bool); /* [REQ] Called by every tree streaming routine that needs to read a tree node. It takes two arguments: an lto_input_block pointing to the buffer where to read from and a data_in instance with tables and descriptors needed by the unpickling routines. It returns the tree instantiated from the stream. */ tree (*read_tree) (struct lto_input_block *, struct data_in *); /* [REQ] Called by every streaming routine that needs to read a location. */ location_t (*input_location) (struct bitpack_d *, struct data_in *); /* [REQ] Called by every streaming routine that needs to write a location. */ void (*output_location) (struct output_block *, struct bitpack_d *, location_t); }; #define stream_write_tree(OB, EXPR, REF_P) \ streamer_hooks.write_tree(OB, EXPR, REF_P, REF_P) #define stream_write_tree_shallow_non_ref(OB, EXPR, REF_P) \ streamer_hooks.write_tree(OB, EXPR, REF_P, false) #define stream_read_tree(IB, DATA_IN) \ streamer_hooks.read_tree(IB, DATA_IN) #define stream_input_location(BP, DATA_IN) \ streamer_hooks.input_location(BP, DATA_IN) #define stream_output_location(OB, BP, LOC) \ streamer_hooks.output_location(OB, BP, LOC) /* Streamer hooks. */ extern struct streamer_hooks streamer_hooks; /* In streamer-hooks.c. */ void streamer_hooks_init (void); #endif /* GCC_STREAMER_HOOKS_H */
/* * Copyright * (C) 2013 Sebastian Hesselbarth <sebastian.hesselbarth@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. * */ #include <common.h> #include <init.h> #include <io.h> #include <asm/memory.h> #include <mach/dove-regs.h> static inline void dove_remap_mc_regs(void) { void __iomem *mcboot = IOMEM(DOVE_BOOTUP_MC_REGS); uint32_t val; /* remap ahb slave base */ val = readl(DOVE_CPU_CTRL) & 0xffff0000; val |= (DOVE_REMAP_MC_REGS & 0xffff0000) >> 16; writel(val, DOVE_CPU_CTRL); /* remap axi bridge address */ val = readl(DOVE_AXI_CTRL) & 0x007fffff; val |= DOVE_REMAP_MC_REGS & 0xff800000; writel(val, DOVE_AXI_CTRL); /* remap memory controller base address */ val = readl(mcboot + SDRAM_REGS_BASE_DECODE) & 0x0000ffff; val |= DOVE_REMAP_MC_REGS & 0xffff0000; writel(val, mcboot + SDRAM_REGS_BASE_DECODE); } static inline void dove_memory_find(unsigned long *phys_base, unsigned long *phys_size) { int n; *phys_base = ~0; *phys_size = 0; for (n = 0; n < 2; n++) { uint32_t map = readl(DOVE_SDRAM_BASE + SDRAM_MAPn(n)); uint32_t base, size; /* skip disabled areas */ if ((map & SDRAM_MAP_VALID) != SDRAM_MAP_VALID) continue; base = map & SDRAM_START_MASK; if (base < *phys_base) *phys_base = base; /* real size is encoded as ld(2^(16+length)) */ size = (map & SDRAM_LENGTH_MASK) >> SDRAM_LENGTH_SHIFT; *phys_size += 1 << (16 + size); } } static int dove_init_soc(void) { unsigned long phys_base, phys_size; dove_remap_mc_regs(); dove_memory_find(&phys_base, &phys_size); arm_add_mem_device("ram0", phys_base, phys_size); return 0; } core_initcall(dove_init_soc); void __noreturn reset_cpu(unsigned long addr) { /* enable and assert RSTOUTn */ writel(SOFT_RESET_OUT_EN, DOVE_BRIDGE_BASE + BRIDGE_RSTOUT_MASK); writel(SOFT_RESET_EN, DOVE_BRIDGE_BASE + BRIDGE_SYS_SOFT_RESET); while (1) ; } EXPORT_SYMBOL(reset_cpu);
#ifndef QDSP5AUDPLAYCMDI_H #define QDSP5AUDPLAYCMDI_H /*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* Q D S P 5 A U D I O P L A Y T A S K C O M M A N D S GENERAL DESCRIPTION Command Interface for AUDPLAYTASK on QDSP5 REFERENCES None EXTERNALIZED FUNCTIONS audplay_cmd_dec_data_avail Send buffer to AUDPLAY task Copyright(c) 1992 - 2009 by QUALCOMM, Incorporated. This software is licensed under the terms of the GNU General Public License version 2, as published by the Free Software Foundation, and may be copied, distributed, and modified under those terms. 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. *====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ /*=========================================================================== EDIT HISTORY FOR FILE This section contains comments describing changes made to this file. Notice that changes are listed in reverse chronological order. $Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audplaycmdi.h#2 $ ===========================================================================*/ #define AUDPLAY_CMD_BITSTREAM_DATA_AVAIL 0x0000 #define AUDPLAY_CMD_BITSTREAM_DATA_AVAIL_LEN \ sizeof(audplay_cmd_bitstream_data_avail) #define AUDPLAY_CMD_AUDDEC_CMD_CHANNEL_INFO 0x0001 /* Type specification of dec_data_avail message sent to AUDPLAYTASK */ typedef struct { /*command ID*/ unsigned int cmd_id; /* Decoder ID for which message is being sent */ unsigned int decoder_id; /* Start address of data in ARM global memory */ unsigned int buf_ptr; /* Number of 16-bit words of bit-stream data contiguously available at the * above-mentioned address. */ unsigned int buf_size; /* Partition number used by audPlayTask to communicate with DSP's RTOS * kernel */ unsigned int partition_number; unsigned int dsp_write_phy_addr; } __attribute__((packed)) audplay_cmd_bitstream_data_avail; typedef struct { /* command id */ unsigned int cmd_id; unsigned int unused; unsigned int dual_mono_mode; } __attribute__((packed)) audplay_cmd_channel_info; #define AUDPLAY_CMD_HPCM_BUF_CFG 0x0003 #define AUDPLAY_CMD_HPCM_BUF_CFG_LEN \ sizeof(struct audplay_cmd_hpcm_buf_cfg) struct audplay_cmd_hpcm_buf_cfg { unsigned int cmd_id; unsigned int hostpcm_config; unsigned int feedback_frequency; unsigned int byte_swap; unsigned int max_buffers; unsigned int partition_number; } __attribute__((packed)); #define AUDPLAY_CMD_BUFFER_REFRESH 0x0004 #define AUDPLAY_CMD_BUFFER_REFRESH_LEN \ sizeof(struct audplay_cmd_buffer_update) struct audplay_cmd_buffer_refresh { unsigned int cmd_id; unsigned int num_buffers; unsigned int buf_read_count; unsigned int buf0_address; unsigned int buf0_length; unsigned int buf1_address; unsigned int buf1_length; } __attribute__((packed)); #endif /* QDSP5AUDPLAYCMD_H */
// ePDFView - Dumb Test Find View. // Copyright (C) 2006, 2007, 2009 Emma's Software. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #if !defined (__DUMB_FIND_VIEW_H__) #define __DUMB_FIND_VIEW_H__ namespace ePDFView { class DumbFindView: public IFindView { public: DumbFindView (void); ~DumbFindView (void); const gchar *getTextToFind (void); void hide (void); void sensitiveFindNext (gboolean sensitive); void sensitiveFindPrevious (gboolean sensitive); void setInformationText (const gchar *text); // Methods for test only purposes. const gchar *getInformationText (void); gboolean isFindNextSensitive (void); gboolean isFindPreviousSensitive (void); void setTextToFind (const gchar *text); protected: gboolean m_FindNextSensitive; gboolean m_FindPreviousSensitive; gchar *m_InformationText; gchar *m_TextToFind; }; } #endif // !__DUMB_FIND_VIEW_H__
/* * Copyright (C) 2002 ARM Ltd. * All Rights Reserved * Copyright (c) 2011-2013, The Linux Foundation. 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 version 2 as * published by the Free Software Foundation. */ #include <linux/kernel.h> #include <linux/errno.h> #include <linux/smp.h> #include <linux/cpu.h> #include <linux/ratelimit.h> #include <linux/notifier.h> #include <asm/smp_plat.h> #include <asm/vfp.h> #include <mach/jtag.h> #include <mach/msm_rtb.h> #include "pm.h" #include "spm.h" extern volatile int pen_release; static cpumask_t cpu_dying_mask; static DEFINE_PER_CPU(unsigned int, warm_boot_flag); static inline void cpu_enter_lowpower(void) { } static inline void cpu_leave_lowpower(void) { } static inline void platform_do_lowpower(unsigned int cpu, int *spurious) { /* Just enter wfi for now. TODO: Properly shut off the cpu. */ for (;;) { msm_pm_cpu_enter_lowpower(cpu); if (pen_release == cpu_logical_map(cpu)) { /* * OK, proper wakeup, we're done */ break; } /* * getting here, means that we have come out of WFI without * having been woken up - this shouldn't happen * * The trouble is, letting people know about this is not really * possible, since we are currently running incoherently, and * therefore cannot safely call printk() or anything else */ (*spurious)++; } } int platform_cpu_kill(unsigned int cpu) { int ret = 0; if (cpumask_test_and_clear_cpu(cpu, &cpu_dying_mask)) ret = msm_pm_wait_cpu_shutdown(cpu); return ret ? 0 : 1; } /* * platform-specific code to shutdown a CPU * * Called with IRQs disabled */ void platform_cpu_die(unsigned int cpu) { int spurious = 0; if (unlikely(cpu != smp_processor_id())) { pr_crit("%s: running on %u, should be %u\n", __func__, smp_processor_id(), cpu); BUG(); } /* * we're ready for shutdown now, so do it */ cpu_enter_lowpower(); platform_do_lowpower(cpu, &spurious); pr_debug("CPU%u: %s: normal wakeup\n", cpu, __func__); cpu_leave_lowpower(); if (spurious) pr_warn("CPU%u: %u spurious wakeup calls\n", cpu, spurious); } int platform_cpu_disable(unsigned int cpu) { /* * we don't allow CPU 0 to be shutdown (it is still too special * e.g. clock tick interrupts) */ return cpu == 0 ? -EPERM : 0; } #define CPU_SHIFT 0 #define CPU_MASK 0xF #define CPU_OF(n) (((n) & CPU_MASK) << CPU_SHIFT) #define CPUSET_SHIFT 4 #define CPUSET_MASK 0xFFFF #define CPUSET_OF(n) (((n) & CPUSET_MASK) << CPUSET_SHIFT) static int hotplug_rtb_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { /* * Bits [19:4] of the data are the online mask, lower 4 bits are the * cpu number that is being changed. Additionally, changes to the * online_mask that will be done by the current hotplug will be made * even though they aren't necessarily in the online mask yet. * * XXX: This design is limited to supporting at most 16 cpus */ int this_cpumask = CPUSET_OF(1 << (int)hcpu); int cpumask = CPUSET_OF(cpumask_bits(cpu_online_mask)[0]); int cpudata = CPU_OF((int)hcpu) | cpumask; switch (action & (~CPU_TASKS_FROZEN)) { case CPU_STARTING: uncached_logk(LOGK_HOTPLUG, (void *)(cpudata | this_cpumask)); break; case CPU_DYING: cpumask_set_cpu((unsigned long)hcpu, &cpu_dying_mask); uncached_logk(LOGK_HOTPLUG, (void *)(cpudata & ~this_cpumask)); break; default: break; } return NOTIFY_OK; } static struct notifier_block hotplug_rtb_notifier = { .notifier_call = hotplug_rtb_callback, }; int msm_platform_secondary_init(unsigned int cpu) { int ret; unsigned int *warm_boot = &__get_cpu_var(warm_boot_flag); if (!(*warm_boot)) { *warm_boot = 1; return 0; } msm_jtag_restore_state(); #if defined(CONFIG_VFP) && defined (CONFIG_CPU_PM) vfp_pm_resume(); #endif ret = msm_spm_set_low_power_mode(MSM_SPM_MODE_CLOCK_GATING, false); return ret; } static int __init init_hotplug(void) { return register_hotcpu_notifier(&hotplug_rtb_notifier); } early_initcall(init_hotplug);
/* Communication between registering jump thread requests and updating the SSA/CFG for jump threading. Copyright (C) 2013 Free Software Foundation, Inc. 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/>. */ #ifndef _TREE_SSA_THREADUPDATE_H #define _TREE_SSA_THREADUPDATE_H 1 /* In tree-ssa-threadupdate.c. */ extern bool thread_through_all_blocks (bool); enum jump_thread_edge_type { EDGE_START_JUMP_THREAD, EDGE_COPY_SRC_BLOCK, EDGE_COPY_SRC_JOINER_BLOCK, EDGE_NO_COPY_SRC_BLOCK }; class jump_thread_edge { public: jump_thread_edge (edge e, enum jump_thread_edge_type type) : e (e), type (type) {} edge e; enum jump_thread_edge_type type; }; extern void register_jump_thread (vec <class jump_thread_edge *> *); extern void delete_jump_thread_path (vec <class jump_thread_edge *> *); #endif
#ifndef __LINUX_TI_AM335X_TSCADC_MFD_H #define __LINUX_TI_AM335X_TSCADC_MFD_H /* * TI Touch Screen / ADC MFD driver * * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.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 version 2. * * This program is distributed "as is" WITHOUT ANY WARRANTY of any * kind, whether express or implied; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include <linux/mfd/core.h> #define REG_RAWIRQSTATUS 0x024 #define REG_IRQSTATUS 0x028 #define REG_IRQENABLE 0x02C #define REG_IRQCLR 0x030 #define REG_IRQWAKEUP 0x034 #define REG_CTRL 0x040 #define REG_ADCFSM 0x044 #define REG_CLKDIV 0x04C #define REG_SE 0x054 #define REG_IDLECONFIG 0x058 #define REG_CHARGECONFIG 0x05C #define REG_CHARGEDELAY 0x060 #define REG_STEPCONFIG(n) (0x64 + ((n - 1) * 8)) #define REG_STEPDELAY(n) (0x68 + ((n - 1) * 8)) #define REG_FIFO0CNT 0xE4 #define REG_FIFO0THR 0xE8 #define REG_FIFO1CNT 0xF0 #define REG_FIFO1THR 0xF4 #define REG_FIFO0 0x100 #define REG_FIFO1 0x200 /* Register Bitfields */ /* IRQ wakeup enable */ #define IRQWKUP_ENB BIT(0) /* Step Enable */ #define STEPENB_MASK (0x1FFFF << 0) #define STEPENB(val) ((val) << 0) #define STPENB_STEPENB STEPENB(0x1FFFF) /* IRQ enable */ #define IRQENB_HW_PEN BIT(0) #define IRQENB_FIFO0THRES BIT(2) #define IRQENB_FIFO1THRES BIT(5) #define IRQENB_PENUP BIT(9) /* Step Configuration */ #define STEPCONFIG_MODE_MASK (3 << 0) #define STEPCONFIG_MODE(val) ((val) << 0) #define STEPCONFIG_MODE_HWSYNC STEPCONFIG_MODE(2) #define STEPCONFIG_AVG_MASK (7 << 2) #define STEPCONFIG_AVG(val) ((val) << 2) #define STEPCONFIG_AVG_16 STEPCONFIG_AVG(4) #define STEPCONFIG_XPP BIT(5) #define STEPCONFIG_XNN BIT(6) #define STEPCONFIG_YPP BIT(7) #define STEPCONFIG_YNN BIT(8) #define STEPCONFIG_XNP BIT(9) #define STEPCONFIG_YPN BIT(10) #define STEPCONFIG_INM_MASK (0xF << 15) #define STEPCONFIG_INM(val) ((val) << 15) #define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8) #define STEPCONFIG_INP_MASK (0xF << 19) #define STEPCONFIG_INP(val) ((val) << 19) #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4) #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8) #define STEPCONFIG_FIFO1 BIT(26) /* Delay register */ #define STEPDELAY_OPEN_MASK (0x3FFFF << 0) #define STEPDELAY_OPEN(val) ((val) << 0) #define STEPCONFIG_OPENDLY STEPDELAY_OPEN(0x098) #define STEPDELAY_SAMPLE_MASK (0xFF << 24) #define STEPDELAY_SAMPLE(val) ((val) << 24) #define STEPCONFIG_SAMPLEDLY STEPDELAY_SAMPLE(0) /* Charge Config */ #define STEPCHARGE_RFP_MASK (7 << 12) #define STEPCHARGE_RFP(val) ((val) << 12) #define STEPCHARGE_RFP_XPUL STEPCHARGE_RFP(1) #define STEPCHARGE_INM_MASK (0xF << 15) #define STEPCHARGE_INM(val) ((val) << 15) #define STEPCHARGE_INM_AN1 STEPCHARGE_INM(1) #define STEPCHARGE_INP_MASK (0xF << 19) #define STEPCHARGE_INP(val) ((val) << 19) #define STEPCHARGE_RFM_MASK (3 << 23) #define STEPCHARGE_RFM(val) ((val) << 23) #define STEPCHARGE_RFM_XNUR STEPCHARGE_RFM(1) /* Charge delay */ #define CHARGEDLY_OPEN_MASK (0x3FFFF << 0) #define CHARGEDLY_OPEN(val) ((val) << 0) #define CHARGEDLY_OPENDLY CHARGEDLY_OPEN(1) /* Control register */ #define CNTRLREG_TSCSSENB BIT(0) #define CNTRLREG_STEPID BIT(1) #define CNTRLREG_STEPCONFIGWRT BIT(2) #define CNTRLREG_POWERDOWN BIT(4) #define CNTRLREG_AFE_CTRL_MASK (3 << 5) #define CNTRLREG_AFE_CTRL(val) ((val) << 5) #define CNTRLREG_4WIRE CNTRLREG_AFE_CTRL(1) #define CNTRLREG_5WIRE CNTRLREG_AFE_CTRL(2) #define CNTRLREG_8WIRE CNTRLREG_AFE_CTRL(3) #define CNTRLREG_TSCENB BIT(7) #define XPP STEPCONFIG_XPP #define XNP STEPCONFIG_XNP #define XNN STEPCONFIG_XNN #define YPP STEPCONFIG_YPP #define YPN STEPCONFIG_YPN #define YNN STEPCONFIG_YNN #define ADC_CLK 3000000 #define MAX_CLK_DIV 7 #define TOTAL_STEPS 16 #define TOTAL_CHANNELS 8 #define TSCADC_CELLS 2 struct mfd_tscadc_board { struct tsc_data *tsc_init; struct adc_data *adc_init; }; struct ti_tscadc_dev { struct device *dev; struct regmap *regmap_tscadc; void __iomem *tscadc_base; int irq; int used_cells; /* 0-2 */ int tsc_cell; /* -1 if not used */ int adc_cell; /* -1 if not used */ struct mfd_cell cells[TSCADC_CELLS]; /* tsc device */ struct titsc *tsc; /* adc device */ struct adc_device *adc; }; #endif
/* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://www.lammps.org/, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifdef FIX_CLASS // clang-format off FixStyle(rigid/npt/small,FixRigidNPTSmall); // clang-format on #else #ifndef LMP_FIX_RIGID_NPT_SMALL_H #define LMP_FIX_RIGID_NPT_SMALL_H #include "fix_rigid_nh_small.h" namespace LAMMPS_NS { class FixRigidNPTSmall : public FixRigidNHSmall { public: FixRigidNPTSmall(class LAMMPS *, int, char **); ~FixRigidNPTSmall() {} }; } // namespace LAMMPS_NS #endif #endif /* ERROR/WARNING messages: E: Did not set temp or press for fix rigid/npt/small Self-explanatory. E: Target temperature for fix rigid/npt/small cannot be 0.0 Self-explanatory. E: Target pressure for fix rigid/npt/small cannot be < 0.0 Self-explanatory. E: Fix rigid/npt/small period must be > 0.0 Self-explanatory. E: Fix rigid npt/small t_chain should not be less than 1 Self-explanatory. E: Fix rigid npt/small t_order must be 3 or 5 Self-explanatory. */
// Animation names #define SPHINX_ANIM_DEFAULT_ANIMATION 0 // Color names // Patch names // Names of collision boxes #define SPHINX_COLLISION_BOX_PART_NAME 0 // Attaching position names // Sound names
// importfields.h // // Parser Parameters for RDAdmin. // // (C) Copyright 2010 Fred Gleason <fredg@paravelsystems.com> // // $Id: importfields.h,v 1.2 2010/07/29 19:32:34 cvs Exp $ // // 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. // // 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., 675 Mass Ave, Cambridge, MA 02139, USA. // // #ifndef IMPORTFIELDS_H #define IMPORTFIELDS_H #include <qwidget.h> #include <qlabel.h> #include <qspinbox.h> #include <rdsvc.h> class ImportFields : public QWidget { Q_OBJECT public: ImportFields(QWidget *parent=0,const char *name=0); QSize sizeHint() const; QSizePolicy sizePolicy() const; bool changed() const; void readFields(RDSvc *svc,RDSvc::ImportSource type); void setFields(RDSvc *svc,RDSvc::ImportSource type); private slots: void valueChangedData(int); private: bool import_changed; QSpinBox *cart_offset_spin; QSpinBox *cart_length_spin; QSpinBox *title_offset_spin; QSpinBox *title_length_spin; QSpinBox *hours_offset_spin; QSpinBox *hours_length_spin; QSpinBox *minutes_offset_spin; QSpinBox *minutes_length_spin; QSpinBox *seconds_offset_spin; QSpinBox *seconds_length_spin; QSpinBox *len_hours_offset_spin; QSpinBox *len_hours_length_spin; QSpinBox *len_minutes_offset_spin; QSpinBox *len_minutes_length_spin; QSpinBox *len_seconds_offset_spin; QSpinBox *len_seconds_length_spin; QSpinBox *annctype_offset_spin; QSpinBox *annctype_length_spin; QSpinBox *data_offset_spin; QSpinBox *data_length_spin; QSpinBox *event_id_offset_spin; QSpinBox *event_id_length_spin; }; #endif // IMPORTFIELDS_H
/*++ Copyright (c) 2012 WonderMedia Technologies, Inc. All Rights Reserved. This PROPRIETARY SOFTWARE is the property of WonderMedia Technologies, Inc. and may contain trade secrets and/or other confidential information of WonderMedia Technologies, Inc. This file shall not be disclosed to any third party, in whole or in part, without prior written consent of WonderMedia. THIS PROPRIETARY SOFTWARE AND ANY RELATED DOCUMENTATION ARE PROVIDED AS IS, WITH ALL FAULTS, AND WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, AND WonderMedia TECHNOLOGIES, INC. DISCLAIMS ALL EXPRESS OR IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. --*/ #ifndef __GSENSOR_H__ #define __GSENSOR_H__ #define IOCTL_WMT 0x01 #define WMT_IOCTL_APP_SET_AFLAG _IOW(IOCTL_WMT, 0x01, int) #define WMT_IOCTL_APP_SET_DELAY _IOW(IOCTL_WMT, 0x02, int) #define WMT_IOCTL_APP_GET_AFLAG _IOW(IOCTL_WMT, 0x03, int) #define WMT_IOCTL_APP_GET_DELAY _IOW(IOCTL_WMT, 0x04, int) #define WMT_IOCTL_APP_GET_LSG _IOW(IOCTL_WMT, 0x05, int) struct gsensor_conf { int op; char name[10]; int xyz_axis[3][2]; }; struct gsensor_data { int i2c_addr; int (*enable) (int en); int (*setDelay) (int mdelay); int (*getLSG) (int *lsg); }; extern int gsensor_i2c_register_device (void); extern int get_gsensor_conf(struct gsensor_conf *gs_conf); extern int gsensor_register(struct gsensor_data *gs_data); #endif
/* SPDX-License-Identifier: GPL-2.0-only */ #include <southbridge/intel/common/gpio.h> static const struct pch_gpio_set1 pch_gpio_set1_mode = { .gpio1 = GPIO_MODE_GPIO, .gpio2 = GPIO_MODE_GPIO, .gpio3 = GPIO_MODE_GPIO, .gpio4 = GPIO_MODE_GPIO, .gpio5 = GPIO_MODE_GPIO, .gpio6 = GPIO_MODE_GPIO, .gpio7 = GPIO_MODE_GPIO, .gpio8 = GPIO_MODE_GPIO, .gpio9 = GPIO_MODE_GPIO, .gpio10 = GPIO_MODE_GPIO, .gpio11 = GPIO_MODE_GPIO, .gpio12 = GPIO_MODE_GPIO, .gpio13 = GPIO_MODE_GPIO, .gpio14 = GPIO_MODE_GPIO, .gpio15 = GPIO_MODE_GPIO, .gpio17 = GPIO_MODE_GPIO, .gpio18 = GPIO_MODE_GPIO, .gpio19 = GPIO_MODE_GPIO, .gpio20 = GPIO_MODE_GPIO, .gpio21 = GPIO_MODE_GPIO, .gpio22 = GPIO_MODE_GPIO, .gpio23 = GPIO_MODE_GPIO, .gpio27 = GPIO_MODE_GPIO, .gpio28 = GPIO_MODE_GPIO, }; static const struct pch_gpio_set1 pch_gpio_set1_direction = { .gpio1 = GPIO_DIR_OUTPUT, .gpio2 = GPIO_DIR_OUTPUT, .gpio3 = GPIO_DIR_OUTPUT, .gpio4 = GPIO_DIR_OUTPUT, .gpio5 = GPIO_DIR_OUTPUT, .gpio6 = GPIO_DIR_OUTPUT, .gpio7 = GPIO_DIR_INPUT, .gpio8 = GPIO_DIR_INPUT, .gpio9 = GPIO_DIR_OUTPUT, .gpio10 = GPIO_DIR_INPUT, .gpio11 = GPIO_DIR_OUTPUT, .gpio12 = GPIO_DIR_OUTPUT, .gpio13 = GPIO_DIR_INPUT, .gpio14 = GPIO_DIR_OUTPUT, .gpio15 = GPIO_DIR_INPUT, .gpio17 = GPIO_DIR_OUTPUT, .gpio18 = GPIO_DIR_OUTPUT, .gpio19 = GPIO_DIR_INPUT, .gpio20 = GPIO_DIR_OUTPUT, .gpio21 = GPIO_DIR_OUTPUT, .gpio22 = GPIO_DIR_OUTPUT, .gpio23 = GPIO_DIR_OUTPUT, .gpio27 = GPIO_DIR_OUTPUT, .gpio28 = GPIO_DIR_OUTPUT, }; static const struct pch_gpio_set1 pch_gpio_set1_level = { .gpio1 = GPIO_LEVEL_HIGH, .gpio2 = GPIO_LEVEL_HIGH, .gpio3 = GPIO_LEVEL_HIGH, .gpio4 = GPIO_LEVEL_HIGH, .gpio5 = GPIO_LEVEL_HIGH, .gpio6 = GPIO_LEVEL_HIGH, .gpio9 = GPIO_LEVEL_LOW, .gpio11 = GPIO_LEVEL_HIGH, .gpio12 = GPIO_LEVEL_LOW, .gpio14 = GPIO_LEVEL_HIGH, .gpio17 = GPIO_LEVEL_HIGH, .gpio18 = GPIO_LEVEL_HIGH, .gpio20 = GPIO_LEVEL_HIGH, .gpio21 = GPIO_LEVEL_HIGH, .gpio22 = GPIO_LEVEL_HIGH, .gpio23 = GPIO_LEVEL_HIGH, .gpio27 = GPIO_LEVEL_HIGH, .gpio28 = GPIO_LEVEL_LOW, }; static const struct pch_gpio_set1 pch_gpio_set1_invert = { .gpio7 = GPIO_INVERT, .gpio10 = GPIO_INVERT, .gpio13 = GPIO_INVERT, }; static const struct pch_gpio_set2 pch_gpio_set2_mode = { .gpio32 = GPIO_MODE_GPIO, .gpio33 = GPIO_MODE_GPIO, .gpio34 = GPIO_MODE_GPIO, .gpio35 = GPIO_MODE_GPIO, .gpio36 = GPIO_MODE_GPIO, .gpio37 = GPIO_MODE_GPIO, .gpio38 = GPIO_MODE_GPIO, .gpio39 = GPIO_MODE_GPIO, .gpio48 = GPIO_MODE_GPIO, .gpio49 = GPIO_MODE_GPIO, .gpio56 = GPIO_MODE_GPIO, .gpio57 = GPIO_MODE_GPIO, .gpio60 = GPIO_MODE_GPIO, }; static const struct pch_gpio_set2 pch_gpio_set2_direction = { .gpio32 = GPIO_DIR_OUTPUT, .gpio33 = GPIO_DIR_OUTPUT, .gpio34 = GPIO_DIR_OUTPUT, .gpio35 = GPIO_DIR_OUTPUT, .gpio36 = GPIO_DIR_OUTPUT, .gpio37 = GPIO_DIR_OUTPUT, .gpio38 = GPIO_DIR_OUTPUT, .gpio39 = GPIO_DIR_OUTPUT, .gpio48 = GPIO_DIR_OUTPUT, .gpio49 = GPIO_DIR_OUTPUT, .gpio56 = GPIO_DIR_OUTPUT, .gpio60 = GPIO_DIR_OUTPUT, }; static const struct pch_gpio_set2 pch_gpio_set2_level = { .gpio32 = GPIO_LEVEL_HIGH, .gpio33 = GPIO_LEVEL_HIGH, .gpio34 = GPIO_LEVEL_LOW, .gpio35 = GPIO_LEVEL_LOW, .gpio36 = GPIO_LEVEL_HIGH, .gpio37 = GPIO_LEVEL_HIGH, .gpio38 = GPIO_LEVEL_HIGH, .gpio39 = GPIO_LEVEL_HIGH, .gpio48 = GPIO_LEVEL_LOW, .gpio49 = GPIO_LEVEL_HIGH, .gpio56 = GPIO_LEVEL_HIGH, .gpio57 = GPIO_LEVEL_LOW, .gpio60 = GPIO_LEVEL_HIGH, }; const struct pch_gpio_map mainboard_gpio_map = { .set1 = { .mode = &pch_gpio_set1_mode, .direction = &pch_gpio_set1_direction, .level = &pch_gpio_set1_level, .invert = &pch_gpio_set1_invert, }, .set2 = { .mode = &pch_gpio_set2_mode, .direction = &pch_gpio_set2_direction, .level = &pch_gpio_set2_level, }, };
/* Copyright (C) 1996-1997 Id Software, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern float v_blend[4]; void V_AddLightBlend (float r, float g, float b, float a2, qbool suppress_polyblend); extern cvar_t v_gamma; extern cvar_t v_contrast; void V_Init (void); void V_UpdatePalette (void); void V_ParseDamage (void); void V_SetContentsColor (int contents); void V_CalcBlend (void); float V_CalcRoll (vec3_t angles, vec3_t velocity); void V_StartPitchDrift (void); void V_StopPitchDrift (void); void V_TF_ClearGrenadeEffects (void); // BorisU
#include <linux/kernel.h> #include <linux/device.h> #include <linux/module.h> #include "core/met_drv.h" #include "core/trace.h" #include "mt_typedefs.h" #include "mt_reg_base.h" #include "mt_emi_bm.h" #include "sync_write.h" #include "plf_trace.h" //#include "dramc.h" extern struct metdevice met_dramc; /* static struct kobject *kobj_dramc = NULL; static ssize_t evt_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf); static ssize_t evt_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t n); static struct kobj_attribute evt_attr = __ATTR(evt, 0644, evt_show, evt_store); static ssize_t evt_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { int i=0; int j; for (j=0; j<MCI_DESC_COUNT; j++) { i += snprintf(buf+i, PAGE_SIZE-i, "0x%x: %s\n", dramc_desc[j].event, dramc_desc[j].name); } i += snprintf(buf+i, PAGE_SIZE-i, "\nCurrent counter0=0x%x, counter1=0x%x\n\n", MCI_GetEvent(0), MCI_GetEvent(1)); return i; } static ssize_t evt_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t n) { unsigned int evt0, evt1; if (sscanf(buf, "%x %x", &evt0, &evt1) != 2) return -EINVAL; MCI_Event_Set(evt0, evt1); //MCI_Event_Read(); return n; } */ /* static void dramc_value_init(void) { } */ static void dramc_init(void) { } static void dramc_start(void) { } static void dramc_stop(void) { } static int do_dramc(void) { return met_dramc.mode; } static unsigned int dramc_polling(unsigned int *value) { int j = -1; value[++j] = DRAMC_GetPageHitCount(DRAMC_ALL); value[++j] = DRAMC_GetPageMissCount(DRAMC_ALL); value[++j] = DRAMC_GetInterbankCount(DRAMC_ALL); value[++j] = DRAMC_GetIdleCount(); return j+1; } static void dramc_uninit(void) { } /* static int met_dramc_create(struct kobject *parent) { int ret = 0; kobj_dramc = parent; ret = sysfs_create_file(kobj_dramc, &evt_attr.attr); if (ret != 0) { pr_err("Failed to create evt in sysfs\n"); return ret; } dramc_value_init(); return ret; } static void met_dramc_delete(void) { sysfs_remove_file(kobj_dramc, &evt_attr.attr); kobj_dramc = NULL; } */ static void met_dramc_start(void) { if (do_dramc()) { dramc_init(); dramc_stop(); dramc_start(); } } static void met_dramc_stop(void) { if (do_dramc()) { dramc_stop(); dramc_uninit(); } } static void met_dramc_polling(unsigned long long stamp, int cpu) { unsigned char count; unsigned int dramc_value[4]; if (do_dramc()) { count = dramc_polling(dramc_value); if (count) { ms_dramc(stamp, count, dramc_value); } } } static char header[] = "met-info [000] 0.0: ms_ud_sys_header: ms_dramc,PageHit,PageMiss,InterBank,Idle,x,x,x,x\n"; static char help[] = " --dramc monitor DRAMC\n"; static int dramc_print_help(char *buf, int len) { return snprintf(buf, PAGE_SIZE, help); } static int dramc_print_header(char *buf, int len) { return snprintf(buf, PAGE_SIZE, header); } struct metdevice met_dramc = { .name = "dramc", .owner = THIS_MODULE, .type = MET_TYPE_BUS, //.create_subfs = met_dramc_create, //.delete_subfs = met_dramc_delete, .cpu_related = 0, .start = met_dramc_start, .stop = met_dramc_stop, .polling_interval = 0,//ms .timed_polling = met_dramc_polling, .tagged_polling = met_dramc_polling, .print_help = dramc_print_help, .print_header = dramc_print_header, };
/* ScummC * Copyright (C) 2004-2006 Alban Bedel * * 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. * */ /** * @file scc_ns.h * @ingroup scc sld * @brief ScummC namespace */ typedef struct scc_ns_st { /// Targeted VM version scc_target_t* target; /// Global symbol tree scc_symbol_t *glob_sym; /// Current start point in the tree, NULL is global scc_symbol_t *cur; /// RID allocation uint16_t rids[SCC_RES_LAST]; /// The address spaces, one bit per address uint8_t as[SCC_RES_LAST][0x10000/8]; } scc_ns_t; scc_ns_t* scc_ns_new(scc_target_t* target); void scc_ns_free(scc_ns_t* ns); void scc_symbol_free(scc_symbol_t* s); void scc_symbol_list_free(scc_symbol_t* s); scc_symbol_t* scc_ns_get_sym(scc_ns_t* ns, char* room, char* sym); scc_symbol_t* scc_ns_get_sym_with_id(scc_ns_t* ns,int type, int id); scc_symbol_t* scc_ns_add_sym(scc_ns_t* ns, char* sym, int type, int subtype, int addr,char status); scc_symbol_t* scc_ns_decl(scc_ns_t* ns, char* room, char* sym, int type, int subtype, int addr); int scc_ns_get_rid(scc_ns_t* ns, scc_symbol_t* s); int scc_ns_push(scc_ns_t* ns, scc_symbol_t* s); void scc_ns_clear(scc_ns_t* ns,int type); int scc_ns_pop(scc_ns_t* ns); int scc_ns_set_sym_addr(scc_ns_t* ns, scc_symbol_t* s,int addr); int scc_ns_alloc_sym_addr(scc_ns_t* ns,scc_symbol_t* s,int* cur); int scc_ns_alloc_addr(scc_ns_t* ns); int scc_ns_get_addr_from(scc_ns_t* ns,scc_ns_t* from); int scc_ns_res_max(scc_ns_t* ns,int type); int scc_ns_is_addr_alloc(scc_ns_t* ns,int type,int addr); scc_symbol_t* scc_ns_get_sym_at(scc_ns_t* ns,int type,int addr); int scc_sym_is_global(int type); int scc_sym_is_var(int type);
/* Copyright (C) 2006 - 2010 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ #ifndef DEF_DRAKTHARON_KEEP_H #define DEF_DRAKTHARON_KEEP_H enum { MAX_ENCOUNTER = 4, TYPE_TROLLGORE = 0, TYPE_NOVOS = 1, TYPE_KING_DRED = 2, TYPE_THARONJA = 3, NPC_KING_DRED = 27483, TYPE_CRYSTAL_1 = 5, TYPE_CRYSTAL_2 = 6, TYPE_CRYSTAL_3 = 7, TYPE_CRYSTAL_4 = 8, TYPE_NOVOS_PHASE2_CHECK = 9, TYPE_NOVOS_EVENT = 10, NPC_CRYSTAL_CHANNEL_TARGET = 26710, NPC_CRYSTAL_CHANNEL = 26712, NPC_TRIGGER_TARGET = 26714, NPC_NOVOS = 26631, NPC_CRYSTAL_HANDLER = 26627, NPC_HULKING_CORPSE = 27597, NPC_FETID_TROLL_CORPSE = 27598, NPC_RISEN_SHADOWCASTER = 27600, // Adds of King Dred Encounter - deaths counted for achievement NPC_DRAKKARI_GUTRIPPER = 26641, NPC_DRAKKARI_SCYTHECLAW = 26628, // Achievement Criterias to be handled with SD2 ACHIEV_CRIT_BETTER_OFF_DREAD = 7318, ACHIEV_CRIT_CONSUME_JUNCTION = 7579, ACHIEV_CRIT_OH_NOVOS = 7361, }; class MANGOS_DLL_DECL instance_draktharon_keep : public ScriptedInstance { public: instance_draktharon_keep(Map* pMap); ~instance_draktharon_keep() {} void Initialize(); void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); void OnCreatureEnterCombat(Creature* pCreature); void OnCreatureEvade(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); const char* Save() { return strInstData.c_str(); } void Load(const char* chrIn); protected: uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; uint32 m_uiDreadAddsKilled; bool m_bNovosAddGrounded; bool m_bTrollgoreConsume; }; #endif
/* * File : i2c.h * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2006 - 2012, RT-Thread Development Team * * 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. * * Change Logs: * Date Author Notes * 2012-04-25 weety first version */ #ifndef __I2C_H__ #define __I2C_H__ #include <rtthread.h> #ifdef __cplusplus extern "C" { #endif #define RT_I2C_WR 0x0000 #define RT_I2C_RD (1u << 0) #define RT_I2C_ADDR_10BIT (1u << 2) /* this is a ten bit chip address */ #define RT_I2C_NO_START (1u << 4) #define RT_I2C_IGNORE_NACK (1u << 5) #define RT_I2C_NO_READ_ACK (1u << 6) /* when I2C reading, we do not ACK */ struct rt_i2c_msg { rt_uint16_t addr; rt_uint16_t flags; rt_uint16_t len; rt_uint8_t *buf; }; struct rt_i2c_bus_device; struct rt_i2c_bus_device_ops { rt_size_t (*master_xfer)(struct rt_i2c_bus_device *bus, struct rt_i2c_msg msgs[], rt_uint32_t num); rt_size_t (*slave_xfer)(struct rt_i2c_bus_device *bus, struct rt_i2c_msg msgs[], rt_uint32_t num); rt_err_t (*i2c_bus_control)(struct rt_i2c_bus_device *bus, rt_uint32_t, rt_uint32_t); }; /*for i2c bus driver*/ struct rt_i2c_bus_device { struct rt_device parent; const struct rt_i2c_bus_device_ops *ops; rt_uint16_t flags; rt_uint16_t addr; struct rt_mutex lock; rt_uint32_t timeout; rt_uint32_t retries; void *priv; }; #ifdef RT_I2C_DEBUG #define i2c_dbg(fmt, ...) rt_kprintf(fmt, ##__VA_ARGS__) #else #define i2c_dbg(fmt, ...) #endif rt_err_t rt_i2c_bus_device_register(struct rt_i2c_bus_device *bus, const char *bus_name); struct rt_i2c_bus_device *rt_i2c_bus_device_find(const char *bus_name); rt_size_t rt_i2c_transfer(struct rt_i2c_bus_device *bus, struct rt_i2c_msg msgs[], rt_uint32_t num); rt_size_t rt_i2c_master_send(struct rt_i2c_bus_device *bus, rt_uint16_t addr, rt_uint16_t flags, const rt_uint8_t *buf, rt_uint32_t count); rt_size_t rt_i2c_master_recv(struct rt_i2c_bus_device *bus, rt_uint16_t addr, rt_uint16_t flags, rt_uint8_t *buf, rt_uint32_t count); rt_err_t rt_i2c_core_init(void); #ifdef __cplusplus } #endif #endif
/* <!-- copyright */ /* * aria2 - The high speed download utility * * Copyright (C) 2006 Tatsuhiro Tsujikawa * * 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 * * In addition, as a special exception, the copyright holders give * permission to link the code of portions of this program with the * OpenSSL library under certain conditions as described in each * individual source file, and distribute linked combinations * including the two. * You must obey the GNU General Public License in all respects * for all of the code used other than OpenSSL. If you modify * file(s) with this exception, you may extend this exception to your * version of the file(s), but you are not obligated to do so. If you * do not wish to do so, delete this exception statement from your * version. If you delete this exception statement from all source * files in the program, then also delete it here. */ /* copyright --> */ #ifndef D_ITERATABLE_CHECKSUM_VALIDATOR_H #define D_ITERATABLE_CHECKSUM_VALIDATOR_H #include "IteratableValidator.h" #include <memory> namespace aria2 { class DownloadContext; class PieceStorage; class MessageDigest; class IteratableChecksumValidator : public IteratableValidator { private: std::shared_ptr<DownloadContext> dctx_; std::shared_ptr<PieceStorage> pieceStorage_; int64_t currentOffset_; std::unique_ptr<MessageDigest> ctx_; public: IteratableChecksumValidator( const std::shared_ptr<DownloadContext>& dctx, const std::shared_ptr<PieceStorage>& pieceStorage); virtual ~IteratableChecksumValidator(); virtual void init() CXX11_OVERRIDE; virtual void validateChunk() CXX11_OVERRIDE; virtual bool finished() const CXX11_OVERRIDE; virtual int64_t getCurrentOffset() const CXX11_OVERRIDE { return currentOffset_; } virtual int64_t getTotalLength() const CXX11_OVERRIDE; }; } // namespace aria2 #endif // D_ITERATABLE_CHECKSUM_VALIDATOR_H
/* Copyright (C) 2006, 2007 William McCune This file is part of the LADR Deduction Library. The LADR Deduction Library 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. The LADR Deduction 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 General Public License for more details. You should have received a copy of the GNU General Public License along with the LADR Deduction Library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef TP_COMPLEX_H #define TP_COMPLEX_H #include "topform.h" /* INTRODUCTION */ /* Public definitions */ /* End of public definitions */ /* Public function prototypes from complex.c */ double complex4(Term t); double term_complexity(Term t, int func, int adjustment); double clause_complexity(Literals lits, int func, int adjustment); #endif /* conditional compilation of whole file */
/* Simple ASN.1 parser * Copyright (C) 2000-2002 Andreas Steffen, Zuercher Hochschule Winterthur * * 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. See <http://www.fsf.org/copyleft/gpl.txt>. * * 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. * * RCSID $Id: asn1.h,v 0.1 2002/04/12 00:00:00 as Exp $ */ /* Defines some primitive ASN1 types */ typedef enum { ASN1_EOC = 0x00, ASN1_BOOLEAN = 0x01, ASN1_INTEGER = 0x02, ASN1_BIT_STRING = 0x03, ASN1_OCTET_STRING = 0x04, ASN1_NULL = 0x05, ASN1_OID = 0x06, ASN1_UTF8STRING = 0x0C, ASN1_NUMERICSTRING = 0x12, ASN1_PRINTABLESTRING = 0x13, ASN1_T61STRING = 0x14, ASN1_VIDEOTEXSTRING = 0x15, ASN1_IA5STRING = 0x16, ASN1_UTCTIME = 0x17, ASN1_GENERALIZEDTIME = 0x18, ASN1_GRAPHICSTRING = 0x19, ASN1_VISIBLESTRING = 0x1A, ASN1_GENERALSTRING = 0x1B, ASN1_UNIVERSALSTRING = 0x1C, ASN1_BMPSTRING = 0x1E, ASN1_CONSTRUCTED = 0x20, ASN1_SEQUENCE = 0x30, ASN1_SET = 0x31, ASN1_CONTEXT_S_0 = 0x80, ASN1_CONTEXT_S_1 = 0x81, ASN1_CONTEXT_S_2 = 0x82, ASN1_CONTEXT_S_3 = 0x83, ASN1_CONTEXT_S_4 = 0x84, ASN1_CONTEXT_S_5 = 0x85, ASN1_CONTEXT_S_6 = 0x86, ASN1_CONTEXT_S_7 = 0x87, ASN1_CONTEXT_S_8 = 0x88, ASN1_CONTEXT_C_0 = 0xA0, ASN1_CONTEXT_C_1 = 0xA1, ASN1_CONTEXT_C_2 = 0xA2, ASN1_CONTEXT_C_3 = 0xA3, ASN1_CONTEXT_C_4 = 0xA4, ASN1_CONTEXT_C_5 = 0xA5 } asn1_t; /* Definition of ASN1 flags */ #define ASN1_NONE 0x00 #define ASN1_DEF 0x01 #define ASN1_OPT 0x02 #define ASN1_LOOP 0x04 #define ASN1_END 0x08 #define ASN1_OBJ 0x10 #define ASN1_BODY 0x20 #define ASN1_INVALID_LENGTH 0xffffffff /* definition of an ASN.1 object */ typedef struct { u_int level; u_char *name; asn1_t type; u_char flags; } asn1Object_t; /* defines a node in a the hierarchical OID tree */ typedef struct { u_char digit; u_int next; u_int down; u_char *name; } oid_t; /* Some well known object identifiers (OIDs) */ extern const oid_t oid_names[]; #define OID_SUBJECT_ALT_NAME 19 #define OID_BASIC_CONSTRAINTS 21 #define OID_CRL_DISTRIBUTION_POINTS 23 #define OID_RSA_ENCRYPTION 35 #define OID_MD2_WITH_RSA 36 #define OID_MD5_WITH_RSA 37 #define OID_SHA1_WITH_RSA 38 #define OID_SHA256_WITH_RSA 39 #define OID_SHA384_WITH_RSA 40 #define OID_SHA512_WITH_RSA 41 #define OID_PKCS7_DATA 43 #define OID_PKCS7_SIGNED_DATA 44 #define OID_PKCS9_EMAIL 50 #define OID_MD2 53 #define OID_MD5 54 #define OID_SHA1 70 /* internal context of ASN.1 parser */ #define ASN1_MAX_LEVEL 20 typedef struct { bool implicit; u_int cond; u_int level0; u_int loopAddr[ASN1_MAX_LEVEL+1]; chunk_t blobs[ASN1_MAX_LEVEL+2]; } asn1_ctx_t; extern int known_oid(chunk_t object); extern u_int asn1_length(chunk_t *blob); extern bool is_printablestring(chunk_t str); extern time_t asn1totime(const chunk_t *utctime, asn1_t type); extern void asn1_init(asn1_ctx_t *ctx, chunk_t blob, u_int level0, bool implicit, u_int cond); extern bool extract_object(asn1Object_t const *objects, u_int *objectID, chunk_t *object, asn1_ctx_t *ctx); extern bool load_asn1_file(const char* filename, const char* passphrase, const char* type, chunk_t *blob);
#include <stdint.h> #include <stddef.h> typedef uint32_t irqflags_t; typedef int32_t arg_t; typedef uint32_t uarg_t; /* Holds arguments */ typedef uint32_t usize_t; /* Largest value passed by userspace */ typedef int32_t susize_t; typedef int32_t ssize_t; typedef uint32_t uaddr_t; typedef uint32_t uptr_t; /* User pointer equivalent */ typedef uint32_t clock_t; #define MAXUSIZE 0xFFFFFFFF
/* LUFA Library Copyright (C) Dean Camera, 2010. dean [at] fourwalledcubicle [dot] com www.lufa-lib.org */ /* Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software. */ /** \file * \brief Board specific LED driver header for the Atmel EVK527. * * Board specific LED driver header for the Atmel EVK527. * * \note This file should not be included directly. It is automatically included as needed by the LEDs driver * dispatch header located in LUFA/Drivers/Board/LEDs.h. */ /** \ingroup Group_LEDs * @defgroup Group_LEDs_EVK527 EVK527 * * Board specific LED driver header for the Atmel EVK527. * * \note This file should not be included directly. It is automatically included as needed by the LEDs driver * dispatch header located in LUFA/Drivers/Board/LEDs.h. * * @{ */ #ifndef __LEDS_EVK527_H__ #define __LEDS_EVK527_H__ /* Includes: */ #include <avr/io.h> #include "../../../Common/Common.h" /* Enable C linkage for C++ Compilers: */ #if defined(__cplusplus) extern "C" { #endif /* Preprocessor Checks: */ #if !defined(__INCLUDE_FROM_LEDS_H) #error Do not include this file directly. Include LUFA/Drivers/Board/LEDS.h instead. #endif /* Public Interface - May be used in end-application: */ /* Macros: */ /** LED mask for the first LED on the board. */ #define LEDS_LED1 (1 << 5) /** LED mask for the second LED on the board. */ #define LEDS_LED2 (1 << 6) /** LED mask for the third LED on the board. */ #define LEDS_LED3 (1 << 7) /** LED mask for all the LEDs on the board. */ #define LEDS_ALL_LEDS (LEDS_LED1 | LEDS_LED2 | LEDS_LED3) /** LED mask for none of the board LEDs. */ #define LEDS_NO_LEDS 0 /* Inline Functions: */ #if !defined(__DOXYGEN__) static inline void LEDs_Init(void) { DDRD |= LEDS_ALL_LEDS; PORTD &= ~LEDS_ALL_LEDS; } static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask) { PORTD |= LEDMask; } static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask) { PORTD &= ~LEDMask; } static inline void LEDs_SetAllLEDs(const uint8_t LEDMask) { PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask); } static inline void LEDs_ChangeLEDs(const uint8_t LEDMask, const uint8_t ActiveMask) { PORTD = ((PORTD & ~LEDMask) | ActiveMask); } static inline void LEDs_ToggleLEDs(const uint8_t LEDMask) { PORTD ^= LEDMask; } static inline uint8_t LEDs_GetLEDs(void) ATTR_WARN_UNUSED_RESULT; static inline uint8_t LEDs_GetLEDs(void) { return (PORTD & LEDS_ALL_LEDS); } #endif /* Disable C linkage for C++ Compilers: */ #if defined(__cplusplus) } #endif #endif /** @} */
/***************************************************************************** * Copyright (C) 2004-2015 The PyKEP development team, * * Advanced Concepts Team (ACT), European Space Agency (ESA) * * * * https://gitter.im/esa/pykep * * https://github.com/esa/pykep * * * * act@esa.int * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * *****************************************************************************/ #ifndef KEP_TOOLBOX_PLANET_MPCORB_H #define KEP_TOOLBOX_PLANET_MPCORB_H #include <string> #include "keplerian.h" #include "../serialization.h" #include "../config.h" namespace kep_toolbox { namespace planet { /// Minor Planet (keplerian) /** * This class allows to instantiate keplerian planets from the MPCORB database. * * @author Dario Izzo (dario.izzo _AT_ googlemail.com) */ class __KEP_TOOL_VISIBLE mpcorb : public keplerian { public: mpcorb(const std::string & = "00001 3.34 0.12 K107N 113.41048 72.58976 80.39321 10.58682 0.0791382 0.21432817 2.7653485 0 MPO110568 6063 94 1802-2006 0.61 M-v 30h MPCW 0000 (1) Ceres 20061025"); planet_ptr clone() const; static epoch packed_date2epoch(std::string); double get_H() const {return m_H;}; unsigned int get_n_observations() const {return m_n_observations;}; unsigned int get_n_oppositions() const {return m_n_oppositions;}; unsigned int get_year_of_discovery() const {return m_year_of_discovery;}; private: friend class boost::serialization::access; template <class Archive> void serialize(Archive &ar, const unsigned int) { ar & boost::serialization::base_object<keplerian>(*this); ar & m_H; ar & m_n_observations; ar & m_n_oppositions; ar & m_year_of_discovery; } static int packed_date2number(char c); // Absolute Magnitude double m_H; // Number of observations unsigned int m_n_observations; // Number of oppositions unsigned int m_n_oppositions; // Year the asteroid was first discovered unsigned int m_year_of_discovery; }; }} /// End of namespace kep_toolbox BOOST_CLASS_EXPORT_KEY(kep_toolbox::planet::mpcorb); #endif // KEP_TOOLBOX_PLANET_MPCORB_H
#ifndef CC_MODEL_CPPINHERITANCE_H #define CC_MODEL_CPPINHERITANCE_H #include <memory> #include "common.h" namespace cc { namespace model { #pragma db object struct CppInheritance { #pragma db id auto int id; std::uint64_t derived; std::uint64_t base; bool isVirtual = false; Visibility visibility; std::string toString() const { return std::string("CppInheritance") .append("\nid = ").append(std::to_string(id)) .append("\nderived = ").append(std::to_string(derived)) .append("\nbase = ").append(std::to_string(base)) .append("\nisVirtual = ").append(std::to_string(isVirtual)) .append("\nvisibility = ").append(visibilityToString(visibility)); } #pragma db index member(derived) #pragma db index member(base) }; typedef std::shared_ptr<CppInheritance> CppInheritancePtr; #pragma db view object(CppInheritance) struct CppInheritanceCount { #pragma db column("count(" + CppInheritance::id + ")") std::size_t count; }; } } #endif
#ifndef LCD_H #define LCD_H #ifdef __cplusplus extern "C" { #endif #include "port.h" #include "spi.h" #include <stdint.h> #include <stdbool.h> #include <stdio.h> #define LCD_WIDTH (320) #define LCD_HEIGHT (240) #define LCD_SIZE (LCD_WIDTH * LCD_HEIGHT) #define LCD_BYTE_SIZE (LCD_SIZE * 2) #define LCD_RAM_OFFSET (0x40000) enum lcd_comp { LCD_SYNC, LCD_BACK_PORCH, LCD_ACTIVE_VIDEO, LCD_FRONT_PORCH, LCD_LNBU }; typedef struct lcd_state { uint32_t timing[4]; uint32_t control; /* Control register */ uint32_t imsc; /* Interrupt mask set/clear register */ uint32_t ris; uint32_t upbase; /* Upper panel frame base address register */ uint32_t lpbase; /* Lower panel frame base address register */ uint32_t upcurr; /* Upper panel current frame address register */ uint32_t lpcurr; /* Lower panel current frame address register */ /* 256x16-bit color palette registers */ /* 256 palette entries organized as 128 locations of two entries per word */ uint16_t palette[0x100]; /* Cursor image RAM registers */ /* 256-word wide values defining images overlaid by the hw cursor mechanism */ uint32_t crsrImage[0x100]; uint32_t crsrControl; /* Cursor control register */ uint32_t crsrConfig; /* Cursor configuration register */ uint32_t crsrPalette0; /* Cursor palette registers */ uint32_t crsrPalette1; uint32_t crsrXY; /* Cursor XY position register */ uint32_t crsrClip; /* Cursor clip position register */ uint32_t crsrImsc; /* Cursor interrupt mask set/clear register */ uint32_t crsrIcr; /* Cursor interrupt clear register */ uint32_t crsrRis; /* Cursor raw interrupt status register - const */ /* Internal */ bool prefill; uint8_t pos, fifo[256]; uint32_t curCol, curRow; enum lcd_comp compare; uint32_t PPL, HSW, HFP, HBP, LPP, VSW, VFP, VBP, PCD, ACB, CPL, LED, LCDBPP, BPP, PPF; bool CLKSEL, IVS, IHS, IPC, IOE, LEE, BGR, BEBO, BEPO, WTRMRK; uint32_t *data; /* Pointer to start of data to start extracting from */ uint32_t *data_end; /* End pointer that is allowed access */ /* Everything after here persists through reset! */ int spi; void (*gui_callback)(void*); void *gui_callback_data; } lcd_state_t; extern lcd_state_t lcd; void lcd_reset(void); void lcd_free(void); eZ80portrange_t init_lcd(void); bool lcd_restore(FILE *image); bool lcd_save(FILE *image); void lcd_update(void); void lcd_disable(void); /* api functions */ void emu_lcd_drawframe(void *output); void emu_set_lcd_callback(void (*callback)(void*), void *data); void emu_set_lcd_spi(int enable); /* advanced api functions */ void emu_set_lcd_ptrs(uint32_t **dat, uint32_t **dat_end, int width, int height, uint32_t addr, uint32_t control, bool mask); void emu_lcd_drawmem(void *output, void *data, void *data_end, uint32_t control, int size, int spi); #ifdef __cplusplus } #endif #endif
/* This file is part of the Nepomuk KDE project. Copyright (C) 2007-2008 Sebastian Trueg <trueg@kde.org> 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 _NEPOMUK_RATING_PAINTER_H_ #define _NEPOMUK_RATING_PAINTER_H_ #include "nepomuk_export.h" #include <QtCore/Qt> class QIcon; class QPixmap; class QPainter; class QPoint; class QRect; /** * \brief Utility class that draws a row of stars for a rating value. * * The KRatingPainter also allows to determine a rating value from * a position in the draw area. it supports all different alignments * and custom icons. * * For showing a rating in a widget see KRatingWidget. * * \author Sebastian Trueg <trueg@kde.org> * * \since 4.1 */ class NEPOMUK_EXPORT KRatingPainter { public: /** * Create a new KRatingPainter. * For most cases the static methods paintRating and getRatingFromPosition * should be sufficient. */ KRatingPainter(); /** * Destructor */ ~KRatingPainter(); /** * The maximum rating, i.e. how many stars are drawn * in total. * * \sa setMaxRating */ int maxRating() const; /** * If half steps are enabled one star equals to 2 rating * points and uneven rating values result in half-stars being * drawn. * * \sa setHalfStepsEnabled */ bool halfStepsEnabled() const; /** * The alignment of the stars. * * \sa setAlignment */ Qt::Alignment alignment() const; /** * The layout direction. If RTL the stars * representing the rating value will be drawn from the * right. * * \sa setLayoutDirection */ Qt::LayoutDirection layoutDirection() const; /** * The icon used to draw a star. In case a custom pixmap has been set * this value is ignored. * * \sa setIcon, setCustomPixmap */ QIcon icon() const; /** * The rating can be painted in a disabled state where no color * is used and hover ratings are ignored. * * \sa setEnabled */ bool isEnabled() const; /** * The custom pixmap set to draw a star. If no custom * pixmap has been set, an invalid pixmap is returned. * * \sa setCustomPixmap */ QPixmap customPixmap() const; /** * The spacing between rating pixmaps. * * \sa setSpacing */ int spacing() const; /** * The maximum rating. Defaults to 10. */ void setMaxRating( int max ); /** * If half steps are enabled (the default) then * one rating step corresponds to half a star. */ void setHalfStepsEnabled( bool enabled ); /** * The alignment of the stars in the drawing rect. * All alignment flags are supported. */ void setAlignment( Qt::Alignment align ); /** * LTR or RTL */ void setLayoutDirection( Qt::LayoutDirection direction ); /** * Set a custom icon. Defaults to "rating". */ void setIcon( const QIcon& icon ); /** * Enable or disable the rating. Default is enabled. */ void setEnabled( bool enabled ); /** * Set a custom pixmap. */ void setCustomPixmap( const QPixmap& pixmap ); /** * Set the spacing between rating pixmaps. Be aware that * for justified horizontal alignment this values may be * ignored. */ void setSpacing( int spacing ); /** * Draw the rating. * * \param painter The painter to draw the rating to. * \param rect The geometry of the rating. The alignment of the rating is used relative * to this value. * \param rating The actual rating value to draw. * \param hoverRating The hover rating indicates the position the user hovers the mouse * pointer at. This will provide visual feedback about the new rating * if the user would actually click as well as the difference to the * current rating. */ void paint( QPainter* painter, const QRect& rect, int rating, int hoverRating = -1 ) const; /** * Calculate the rating value from mouse position pos. * * \return The rating corresponding to pos or -1 if pos is * outside of the configured rect. */ int ratingFromPosition( const QRect& rect, const QPoint& pos ) const; /** * Convenience method that paints a rating into the given rect. * * LayoutDirection is read from QPainter. * * \param align can be aligned vertically and horizontally. Using Qt::AlignJustify will insert spacing * between the stars. */ static void paintRating( QPainter* p, const QRect& rect, Qt::Alignment align, int rating, int hoverRating = -1 ); /** * Get the rating that would be selected if the user clicked position pos * within rect if the rating has been drawn with paintRating() using the same * rect and align values. * * \return The new rating or -1 if pos is outside of the rating area. */ static int getRatingFromPosition( const QRect& rect, Qt::Alignment align, Qt::LayoutDirection direction, const QPoint& pos ); private: class Private; Private* const d; }; #endif
// SimpleLed.h #ifndef _SIMPLE_LED_H #define _SIMPLE_LED_H #include <stdint.h> #include "EventListener.h" /** * \brief Listener of events and turning on/off a digital output. * \author @caligari */ class SimpleLed : public EventListener { public: SimpleLed(uint8_t pin); void init(); bool getStatus() { return _status; } void setStatus(bool value); void toggle(); void flashOne(uint16_t millis); ////////////////////////////////////////////////////////////////////// // StatusIndicator interface ////////////////////////////////////////////////////////////////////// // turn on between movement pauses virtual void moveExecuted(MOVE move) { setStatus(true); } virtual void moveExecuting(MOVE move) { setStatus(false); } virtual void programFinished() { setStatus(false); } // turn on when button is pressed (200 milliseconds) virtual void moveAdded(MOVE move) { flashOne(200); } virtual void programReset() { flashOne(200); } virtual void programStarted(uint8_t total_moves) { flashOne(200); } private: uint8_t _pin; bool _status; }; #endif // _SIMPLE_LED_H // EOF
/* * Generated by asn1c-0.9.24 (http://lionet.info/asn1c) * From ASN.1 module "InformationElements" * found in "../asn/InformationElements.asn" * `asn1c -fcompound-names -fnative-types` */ #ifndef _AvailableAP_SubchannelList_H_ #define _AvailableAP_SubchannelList_H_ #include <asn_application.h> /* Including external dependencies */ #include "AP-Subchannel.h" #include <asn_SEQUENCE_OF.h> #include <constr_SEQUENCE_OF.h> #ifdef __cplusplus extern "C" { #endif /* AvailableAP-SubchannelList */ typedef struct AvailableAP_SubchannelList { A_SEQUENCE_OF(AP_Subchannel_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } AvailableAP_SubchannelList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_AvailableAP_SubchannelList; #ifdef __cplusplus } #endif #endif /* _AvailableAP_SubchannelList_H_ */ #include <asn_internal.h>
#ifndef INODE_H_ #define INODE_H_ //---------------------------------------------------------------------- // Includes //---------------------------------------------------------------------- #include "MantidKernel/ISaveable.h" namespace Mantid { namespace Kernel { /** Helper class providing interface to ISAveable Copyright &copy; 2013 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge National Laboratory & European Spallation Source This file is part of Mantid. Mantid 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. Mantid 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/>. File change history is stored at: <https://github.com/mantidproject/mantid>. Code Documentation is available at: <http://doxygen.mantidproject.org> */ class DLLExport INode { public: virtual ~INode(){}; }; } } #endif
#ifndef __c12_hybridSysSim_h__ #define __c12_hybridSysSim_h__ /* Include files */ #include "sf_runtime/sfc_sf.h" #include "sf_runtime/sfc_mex.h" #include "rtwtypes.h" #include "multiword_types.h" /* Type Definitions */ #ifndef typedef_SFc12_hybridSysSimInstanceStruct #define typedef_SFc12_hybridSysSimInstanceStruct typedef struct { SimStruct *S; ChartInfoStruct chartInfo; uint32_T chartNumber; uint32_T instanceNumber; int32_T c12_sfEvent; boolean_T c12_isStable; boolean_T c12_doneDoubleBufferReInit; uint8_T c12_is_active_c12_hybridSysSim; real_T (*c12_irOtoL)[4]; real_T *c12_iCol; real_T (*c12_irOtoLDot)[2]; real_T (*c12_iFcComp)[2]; real_T (*c12_posG3)[2]; real_T *c12_R; real_T (*c12_iColPos)[2]; real_T (*c12_cRc)[2]; } SFc12_hybridSysSimInstanceStruct; #endif /*typedef_SFc12_hybridSysSimInstanceStruct*/ /* Named Constants */ /* Variable Declarations */ extern struct SfDebugInstanceStruct *sfGlobalDebugInstanceStruct; /* Variable Definitions */ /* Function Declarations */ extern const mxArray *sf_c12_hybridSysSim_get_eml_resolved_functions_info(void); /* Function Definitions */ extern void sf_c12_hybridSysSim_get_check_sum(mxArray *plhs[]); extern void c12_hybridSysSim_method_dispatcher(SimStruct *S, int_T method, void * data); #endif
/* * Walk an observation 'one more split' down the tree. If there are no * more splits, return 0, otherwise return the address of the new node. * A return of zero also comes about if surrogates aren't being used, and I * hit a missing value. * * tree : the current node * obs : the observation number. This will be negative iff the primary * split is missing. * * This is the one routine that accesses the tree by observation number, * without the mediation of the ct.sorts array. For missing value * information it thus has to look at X directly using a macro. */ #include "causalTree.h" #include "node.h" #include "causalTreeproto.h" pNode branch(pNode tree, int obs) { int j, dir; int category; /* for categorical variables */ pNode me; pSplit tsplit; double **xdata; if (!tree->leftson) return NULL; me = tree; xdata = ct.xdata; /* * choose left or right son * this may use lots of surrogates before we're done */ tsplit = me->primary; j = tsplit->var_num; if (R_FINITE(xdata[j][obs])) { if (ct.numcat[j] == 0) { /* continuous */ dir = (xdata[j][obs] < tsplit->spoint) ? tsplit->csplit[0] : -tsplit->csplit[0]; goto down; } else { /* categorical predictor */ category = (int) xdata[j][obs]; /* factor predictor -- which * level? */ dir = (tsplit->csplit)[category - 1]; if (dir) goto down; } } if (ct.usesurrogate == 0) return NULL; /* * use the surrogates */ for (tsplit = me->surrogate; tsplit; tsplit = tsplit->nextsplit) { j = tsplit->var_num; if (R_FINITE(xdata[j][obs])) { /* not missing */ if (ct.numcat[j] == 0) { dir = (ct.xdata[j][obs] < tsplit->spoint) ? tsplit->csplit[0] : -tsplit->csplit[0]; goto down; } else { category = (int) xdata[j][obs]; /* factor predictor -- which * level */ dir = (tsplit->csplit)[category - 1]; if (dir) goto down; } } } if (ct.usesurrogate < 2) return NULL; /* * split it by default */ dir = me->lastsurrogate; down: return (dir == LEFT) ? me->leftson : me->rightson; }
/* * This file is part of Cleanflight. * * Cleanflight 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. * * 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #ifdef OSD #include "common/time.h" #include "config/parameter_group.h" #define OSD_NUM_TIMER_TYPES 3 extern const char * const osdTimerSourceNames[OSD_NUM_TIMER_TYPES]; #define OSD_ELEMENT_BUFFER_LENGTH 32 #define VISIBLE_FLAG 0x0800 #define VISIBLE(x) (x & VISIBLE_FLAG) #define OSD_POS_MAX 0x3FF #define OSD_POSCFG_MAX (VISIBLE_FLAG|0x3FF) // For CLI values // Character coordinate #define OSD_POSITION_BITS 5 // 5 bits gives a range 0-31 #define OSD_POSITION_XY_MASK ((1 << OSD_POSITION_BITS) - 1) #define OSD_POS(x,y) ((x & OSD_POSITION_XY_MASK) | ((y & OSD_POSITION_XY_MASK) << OSD_POSITION_BITS)) #define OSD_X(x) (x & OSD_POSITION_XY_MASK) #define OSD_Y(x) ((x >> OSD_POSITION_BITS) & OSD_POSITION_XY_MASK) // Timer configuration // Stored as 15[alarm:8][precision:4][source:4]0 #define OSD_TIMER(src, prec, alarm) ((src & 0x0F) | ((prec & 0x0F) << 4) | ((alarm & 0xFF ) << 8)) #define OSD_TIMER_SRC(timer) (timer & 0x0F) #define OSD_TIMER_PRECISION(timer) ((timer >> 4) & 0x0F) #define OSD_TIMER_ALARM(timer) ((timer >> 8) & 0xFF) typedef enum { OSD_RSSI_VALUE, OSD_MAIN_BATT_VOLTAGE, OSD_CROSSHAIRS, OSD_ARTIFICIAL_HORIZON, OSD_HORIZON_SIDEBARS, OSD_ITEM_TIMER_1, OSD_ITEM_TIMER_2, OSD_FLYMODE, OSD_CRAFT_NAME, OSD_THROTTLE_POS, OSD_VTX_CHANNEL, OSD_CURRENT_DRAW, OSD_MAH_DRAWN, OSD_GPS_SPEED, OSD_GPS_SATS, OSD_ALTITUDE, OSD_ROLL_PIDS, OSD_PITCH_PIDS, OSD_YAW_PIDS, OSD_POWER, OSD_PIDRATE_PROFILE, OSD_WARNINGS, OSD_AVG_CELL_VOLTAGE, OSD_GPS_LON, OSD_GPS_LAT, OSD_DEBUG, OSD_PITCH_ANGLE, OSD_ROLL_ANGLE, OSD_MAIN_BATT_USAGE, OSD_DISARMED, OSD_HOME_DIR, OSD_HOME_DIST, OSD_NUMERICAL_HEADING, OSD_NUMERICAL_VARIO, OSD_COMPASS_BAR, OSD_ESC_TMP, OSD_ESC_RPM, OSD_ITEM_COUNT // MUST BE LAST } osd_items_e; typedef enum { OSD_STAT_MAX_SPEED, OSD_STAT_MIN_BATTERY, OSD_STAT_MIN_RSSI, OSD_STAT_MAX_CURRENT, OSD_STAT_USED_MAH, OSD_STAT_MAX_ALTITUDE, OSD_STAT_BLACKBOX, OSD_STAT_END_BATTERY, OSD_STAT_TIMER_1, OSD_STAT_TIMER_2, OSD_STAT_MAX_DISTANCE, OSD_STAT_BLACKBOX_NUMBER, OSD_STAT_COUNT // MUST BE LAST } osd_stats_e; typedef enum { OSD_UNIT_IMPERIAL, OSD_UNIT_METRIC } osd_unit_e; typedef enum { OSD_TIMER_1, OSD_TIMER_2, OSD_TIMER_COUNT } osd_timer_e; typedef enum { OSD_TIMER_SRC_ON, OSD_TIMER_SRC_TOTAL_ARMED, OSD_TIMER_SRC_LAST_ARMED, OSD_TIMER_SRC_COUNT } osd_timer_source_e; typedef enum { OSD_TIMER_PREC_SECOND, OSD_TIMER_PREC_HUNDREDTHS, OSD_TIMER_PREC_COUNT } osd_timer_precision_e; typedef struct osdConfig_s { uint16_t item_pos[OSD_ITEM_COUNT]; bool enabled_stats[OSD_STAT_COUNT]; // Alarms uint16_t cap_alarm; uint16_t alt_alarm; uint8_t rssi_alarm; osd_unit_e units; uint16_t timers[OSD_TIMER_COUNT]; uint8_t ahMaxPitch; uint8_t ahMaxRoll; } osdConfig_t; extern uint32_t resumeRefreshAt; PG_DECLARE(osdConfig_t, osdConfig); struct displayPort_s; void osdInit(struct displayPort_s *osdDisplayPort); void osdResetConfig(osdConfig_t *osdProfile); void osdResetAlarms(void); void osdUpdate(timeUs_t currentTimeUs); #endif
/* * Copyright (C) 2014 Panasonic Corporation * Copyright (C) 2015 Socionext Inc. * Author: Masahiro Yamada <yamada.masahiro@socionext.com> * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <linux/types.h> #include <asm/io.h> #include <asm/errno.h> #include <dm/device.h> #include <dm/root.h> #include <i2c.h> #include <fdtdec.h> DECLARE_GLOBAL_DATA_PTR; struct uniphier_i2c_regs { u32 dtrm; /* data transmission */ #define I2C_DTRM_STA (1 << 10) #define I2C_DTRM_STO (1 << 9) #define I2C_DTRM_NACK (1 << 8) #define I2C_DTRM_RD (1 << 0) u32 drec; /* data reception */ #define I2C_DREC_STS (1 << 12) #define I2C_DREC_LRB (1 << 11) #define I2C_DREC_LAB (1 << 9) u32 myad; /* slave address */ u32 clk; /* clock frequency control */ u32 brst; /* bus reset */ #define I2C_BRST_FOEN (1 << 1) #define I2C_BRST_BRST (1 << 0) u32 hold; /* hold time control */ u32 bsts; /* bus status monitor */ u32 noise; /* noise filter control */ u32 setup; /* setup time control */ }; #define IOBUS_FREQ 100000000 struct uniphier_i2c_dev { struct uniphier_i2c_regs __iomem *regs; /* register base */ unsigned long input_clk; /* master clock (Hz) */ unsigned long wait_us; /* wait for every byte transfer (us) */ }; static int uniphier_i2c_probe(struct udevice *dev) { fdt_addr_t addr; fdt_size_t size; struct uniphier_i2c_dev *priv = dev_get_priv(dev); addr = fdtdec_get_addr_size(gd->fdt_blob, dev->of_offset, "reg", &size); priv->regs = map_sysmem(addr, size); if (!priv->regs) return -ENOMEM; priv->input_clk = IOBUS_FREQ; /* deassert reset */ writel(0x3, &priv->regs->brst); return 0; } static int uniphier_i2c_remove(struct udevice *dev) { struct uniphier_i2c_dev *priv = dev_get_priv(dev); unmap_sysmem(priv->regs); return 0; } static int send_and_recv_byte(struct uniphier_i2c_dev *dev, u32 dtrm) { writel(dtrm, &dev->regs->dtrm); /* * This controller only provides interruption to inform the completion * of each byte transfer. (No status register to poll it.) * Unfortunately, U-Boot does not have a good support of interrupt. * Wait for a while. */ udelay(dev->wait_us); return readl(&dev->regs->drec); } static int send_byte(struct uniphier_i2c_dev *dev, u32 dtrm, bool *stop) { int ret = 0; u32 drec; drec = send_and_recv_byte(dev, dtrm); if (drec & I2C_DREC_LAB) { debug("uniphier_i2c: bus arbitration failed\n"); *stop = false; ret = -EREMOTEIO; } if (drec & I2C_DREC_LRB) { debug("uniphier_i2c: slave did not return ACK\n"); ret = -EREMOTEIO; } return ret; } static int uniphier_i2c_transmit(struct uniphier_i2c_dev *dev, uint addr, uint len, const u8 *buf, bool *stop) { int ret; debug("%s: addr = %x, len = %d\n", __func__, addr, len); ret = send_byte(dev, I2C_DTRM_STA | I2C_DTRM_NACK | addr << 1, stop); if (ret < 0) goto fail; while (len--) { ret = send_byte(dev, I2C_DTRM_NACK | *buf++, stop); if (ret < 0) goto fail; } fail: if (*stop) writel(I2C_DTRM_STO | I2C_DTRM_NACK, &dev->regs->dtrm); return ret; } static int uniphier_i2c_receive(struct uniphier_i2c_dev *dev, uint addr, uint len, u8 *buf, bool *stop) { int ret; debug("%s: addr = %x, len = %d\n", __func__, addr, len); ret = send_byte(dev, I2C_DTRM_STA | I2C_DTRM_NACK | I2C_DTRM_RD | addr << 1, stop); if (ret < 0) goto fail; while (len--) *buf++ = send_and_recv_byte(dev, len ? 0 : I2C_DTRM_NACK); fail: if (*stop) writel(I2C_DTRM_STO | I2C_DTRM_NACK, &dev->regs->dtrm); return ret; } static int uniphier_i2c_xfer(struct udevice *bus, struct i2c_msg *msg, int nmsgs) { int ret = 0; struct uniphier_i2c_dev *dev = dev_get_priv(bus); bool stop; for (; nmsgs > 0; nmsgs--, msg++) { /* If next message is read, skip the stop condition */ stop = nmsgs > 1 && msg[1].flags & I2C_M_RD ? false : true; if (msg->flags & I2C_M_RD) ret = uniphier_i2c_receive(dev, msg->addr, msg->len, msg->buf, &stop); else ret = uniphier_i2c_transmit(dev, msg->addr, msg->len, msg->buf, &stop); if (ret < 0) break; } return ret; } static int uniphier_i2c_set_bus_speed(struct udevice *bus, unsigned int speed) { struct uniphier_i2c_dev *priv = dev_get_priv(bus); /* max supported frequency is 400 kHz */ if (speed > 400000) return -EINVAL; /* bus reset: make sure the bus is idle when change the frequency */ writel(0x1, &priv->regs->brst); writel((priv->input_clk / speed / 2 << 16) | (priv->input_clk / speed), &priv->regs->clk); writel(0x3, &priv->regs->brst); /* * Theoretically, each byte can be transferred in * 1000000 * 9 / speed usec. For safety, wait more than double. */ priv->wait_us = 20000000 / speed; return 0; } static const struct dm_i2c_ops uniphier_i2c_ops = { .xfer = uniphier_i2c_xfer, .set_bus_speed = uniphier_i2c_set_bus_speed, }; static const struct udevice_id uniphier_i2c_of_match[] = { { .compatible = "socionext,uniphier-i2c" }, { /* sentinel */ } }; U_BOOT_DRIVER(uniphier_i2c) = { .name = "uniphier-i2c", .id = UCLASS_I2C, .of_match = uniphier_i2c_of_match, .probe = uniphier_i2c_probe, .remove = uniphier_i2c_remove, .priv_auto_alloc_size = sizeof(struct uniphier_i2c_dev), .ops = &uniphier_i2c_ops, };
// Copyright 2019-2020 CERN and copyright holders of ALICE O2. // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. // All rights not expressly granted are reserved. // // This software is distributed under the terms of the GNU General Public // License v3 (GPL Version 3), copied verbatim in the file "COPYING". // // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. // // Based on the FT0 file RawEventData.h (almost identical except additional printing) by // Alla.Maevskaya@cern.ch // with Artur.Furs // #ifndef ALICEO2_FV0_RAWEVENTDATA_H_ #define ALICEO2_FV0_RAWEVENTDATA_H_ #include "FV0Base/Constants.h" #include "Headers/RAWDataHeader.h" #include "DataFormatsFIT/RawEventData.h" #include <CommonDataFormat/InteractionRecord.h> #include <Framework/Logger.h> #include <cstring> #include <iomanip> #include "Rtypes.h" namespace o2 { namespace fv0 { using EventHeader = o2::fit::EventHeader; using EventData = o2::fit::EventData; using TCMdata = o2::fit::TCMdata; using TCMdataExtended = o2::fit::TCMdataExtended; class RawEventData { public: RawEventData() = default; EventHeader* getEventHeaderPtr() { return &mEventHeader; } EventData* getEventDataPtr() { return mEventData; } void print() const; void printHexEventHeader() const; void printHexEventData(uint64_t i) const; enum EEventDataBit { kNumberADC, kIsDoubleEvent, kIs1TimeLostEvent, kIs2TimeLostEvent, kIsADCinGate, kIsTimeInfoLate, kIsAmpHigh, kIsEventInTVDC, kIsTimeInfoLost }; const static int gStartDescriptor = 0x0000000f; static const size_t sPayloadSizeSecondWord = 11; static const size_t sPayloadSizeFirstWord = 5; static constexpr size_t sPayloadSize = 16; int size() const { return 1 + mEventHeader.nGBTWords; // EventHeader + EventData size } std::vector<char> to_vector(bool tcm) { constexpr int CRUWordSize = 16; std::vector<char> result(size() * CRUWordSize); char* out = result.data(); if (!tcm) { std::memcpy(out, &mEventHeader, sPayloadSize); out += sPayloadSize; LOG(debug) << " Write PM header: nWords: " << (int)mEventHeader.nGBTWords << " orbit: " << int(mEventHeader.orbit) << " BC: " << int(mEventHeader.bc) << " size: " << result.size(); printHexEventHeader(); out += CRUWordSize - sPayloadSize; // Padding enabled for (uint64_t i = 0; i < mEventHeader.nGBTWords; ++i) { std::memcpy(out, &mEventData[2 * i], sPayloadSizeFirstWord); out += sPayloadSizeFirstWord; LOG(debug) << " 1st word: Ch: " << std::setw(2) << mEventData[2 * i].channelID << " charge: " << std::setw(4) << mEventData[2 * i].charge << " time: " << std::setw(4) << mEventData[2 * i].time; std::memcpy(out, &mEventData[2 * i + 1], sPayloadSizeSecondWord); out += sPayloadSizeSecondWord; LOG(debug) << " 2nd word: Ch: " << std::setw(2) << mEventData[2 * i + 1].channelID << " charge: " << std::setw(4) << mEventData[2 * i + 1].charge << " time: " << std::setw(4) << mEventData[2 * i + 1].time; out += CRUWordSize - sPayloadSizeSecondWord - sPayloadSizeFirstWord; printHexEventData(i); } } else { // TCM data std::memcpy(out, &mEventHeader, sPayloadSize); out += sPayloadSize; LOG(debug) << " Write TCM header: nWords: " << (int)mEventHeader.nGBTWords << " orbit: " << int(mEventHeader.orbit) << " BC: " << int(mEventHeader.bc) << " size: " << result.size(); std::memcpy(out, &mTCMdata, sizeof(TCMdata)); out += sizeof(TCMdata); // TODO: No TCM payload printing until the meaning of trigger bits and other flags is clarified } return result; } public: EventHeader mEventHeader; //! EventData mEventData[Constants::nChannelsPerPm]; //! TCMdata mTCMdata; //! ClassDefNV(RawEventData, 1); }; } // namespace fv0 } // namespace o2 #endif
/**************************************************************** * * * Copyright 2001, 2011 Fidelity Information Services, Inc * * * * This source code contains the intellectual property * * of its copyright holder(s), and is made available * * under a license. If you do not know the terms of * * the license, please stop and do not read further. * * * ****************************************************************/ #include "mdef.h" #include <psldef.h> #include <descrip.h> #include "gtm_inet.h" #include "gdsroot.h" #include "gdsbt.h" #include "gtm_facility.h" #include "fileinfo.h" #include "gdsblk.h" #include "gdsfhead.h" #include "iotimer.h" #include "repl_msg.h" /* needed by gtmsource.h */ #include "gtmsource.h" /* needed for jnlpool_addrs and etc. */ #include "repl_shm.h" /* needed for DETACH_FROM_JNLPOOL macro */ #include "op.h" #include <rtnhdr.h> #include "lv_val.h" /* needed for "fgncal.h" */ #include "fgncal.h" #include "gv_rundown.h" #include "filestruct.h" #include "jnl.h" #include "dpgbldir.h" GBLREF gv_key *gv_currkey; GBLREF boolean_t pool_init; GBLREF jnlpool_addrs jnlpool; GBLREF jnlpool_ctl_ptr_t jnlpool_ctl; GBLREF uint4 dollar_tlevel; void fgncal_rundown(void) { sys$cantim(0,0); /* cancel all outstanding timers. prevents unwelcome surprises */ if (gv_currkey != NULL) { gv_currkey->end = 0; /* key no longer valid, since all databases are closed */ gv_currkey->base[0] = 0; } finish_active_jnl_qio(); DETACH_FROM_JNLPOOL(pool_init, jnlpool, jnlpool_ctl); if (dollar_tlevel) OP_TROLLBACK(0); op_lkinit(); op_unlock(); op_zdeallocate(NO_M_TIMEOUT); gv_rundown(); /* run down all databases */ gd_rundown(); }
// // CryptocatNetworkManager.h // Cryptocat // // Created by Frederic Jacobs on 23/8/13. // Copyright (c) 2013 Cryptocat. All rights reserved. // #import <Foundation/Foundation.h> @interface CryptocatNetworkManager : NSObject typedef void (^torCompletionBlock)(BOOL connectionDidSucceed); + (id)sharedManager; + (BOOL) torShouldBeUsed; - (void) toggleTor; - (BOOL) isTorRunning; - (void) startTor; - (void) stopTor; @end
/* Copyright (C) 2009 Red Hat, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #ifndef _H_SND_WORKER #define _H_SND_WORKER #include "spice.h" void snd_attach_playback(SpicePlaybackInstance *sin); void snd_detach_playback(SpicePlaybackInstance *sin); void snd_attach_record(SpiceRecordInstance *sin); void snd_detach_record(SpiceRecordInstance *sin); void snd_set_playback_compression(int on); int snd_get_playback_compression(void); #endif
/* * Copyright (C) 2015 Freie Universität Berlin * 2015 Kaspar Schleiser <kaspar@schleiser.de> * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @ingroup boards_samr21-xpro * @{ * * @file * @brief Board specific configuration of direct mapped GPIOs * * @author Hauke Petersen <hauke.petersen@fu-berlin.de> * @author Kaspar Schleiser <kaspar@schleiser.de> */ #ifndef GPIO_PARAMS_H #define GPIO_PARAMS_H #include "board.h" #include "saul/periph.h" #ifdef __cplusplus extern "C" { #endif /** * @brief GPIO pin configuration */ static const saul_gpio_params_t saul_gpio_params[] = { { .name = "LED(orange)", .pin = LED_GPIO, .dir = GPIO_DIR_OUT, .pull = GPIO_NOPULL, }, { .name = "Button(SW0)", .pin = BUTTON_GPIO, .dir = GPIO_DIR_IN, .pull = GPIO_PULLUP, }, }; #ifdef __cplusplus } #endif #endif /* GPIO_PARAMS_H */ /** @} */
/****************************************************************/ /* MOOSE - Multiphysics Object Oriented Simulation Environment */ /* */ /* All contents are licensed under LGPL V2.1 */ /* See LICENSE for full restrictions */ /****************************************************************/ #ifndef GAPHEATPOINTSOURCEMASTER_H #define GAPHEATPOINTSOURCEMASTER_H // Moose Includes #include "DiracKernel.h" #include "PenetrationLocator.h" //Forward Declarations class GapHeatPointSourceMaster; template<> InputParameters validParams<GapHeatPointSourceMaster>(); class GapHeatPointSourceMaster : public DiracKernel { public: GapHeatPointSourceMaster(const InputParameters & parameters); GapHeatPointSourceMaster(const std::string & deprecated_name, InputParameters parameters); // DEPRECATED CONSTRUCTOR virtual void addPoints(); virtual Real computeQpResidual(); virtual Real computeQpJacobian(); protected: PenetrationLocator & _penetration_locator; std::map<Point, PenetrationInfo *> point_to_info; NumericVector<Number> & _slave_flux; // std::vector<Real> _localized_slave_flux; }; #endif //GAPHEATPOINTSOURCEMASTER_H
/* * Copyright (C) 2012-2013 Citrix Inc * * 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; version 2.1 only. with the special * exception on linking described in file 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 Lesser General Public License for more details. */ #define _GNU_SOURCE /* needed for O_DIRECT */ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> #include <unistd.h> #include <caml/alloc.h> #include <caml/memory.h> #include <caml/signals.h> #include <caml/fail.h> #include <caml/callback.h> #include <caml/bigarray.h> /* ocaml/ocaml/unixsupport.c */ extern void uerror(char *cmdname, value cmdarg); #define Nothing ((value) 0) CAMLprim value stub_openfile_direct(value filename, value rw, value perm){ CAMLparam3(filename, rw, perm); CAMLlocal1(result); int fd; const char *filename_c = strdup(String_val(filename)); enter_blocking_section(); int flags = 0; #if defined(O_DIRECT) flags |= O_DIRECT; #endif if (Bool_val(rw)) { flags |= O_RDWR; } else { flags |= O_RDONLY; } fd = open(filename_c, flags, Int_val(perm)); leave_blocking_section(); free((void*)filename_c); if (fd == -1) uerror("open", filename); CAMLreturn(Val_int(fd)); } CAMLprim value stub_fsync (value fd) { CAMLparam1(fd); int c_fd = Int_val(fd); if (fsync(c_fd) != 0) uerror("fsync", Nothing); CAMLreturn(Val_unit); }
/**************************************************************************** ** ** 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 SUBDIRSPROJECTWIZARD_H #define SUBDIRSPROJECTWIZARD_H #include "qtwizard.h" namespace QmakeProjectManager { namespace Internal { class SubdirsProjectWizard : public QtWizard { Q_OBJECT public: SubdirsProjectWizard(); private: Core::BaseFileWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const override; Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const override; bool postGenerateFiles(const QWizard *, const Core::GeneratedFiles &l, QString *errorMessage) const override; }; } // namespace Internal } // namespace QmakeProjectManager #endif // SUBDIRSPROJECTWIZARD_H
/* * e-source-mdn.c * * 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. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see <http://www.gnu.org/licenses/>. * */ /** * SECTION: e-source-mdn * @include: libedataserver/libedataserver.h * @short_description: #ESource extension for MDN settings * * The #ESourceMDN extension tracks Message Disposition Notification * settings for a mail account. See RFC 2298 for more information about * Message Disposition Notification. * * Access the extension as follows: * * |[ * #include <libedataserver/libedataserver.h> * * ESourceMDN *extension; * * extension = e_source_get_extension (source, E_SOURCE_EXTENSION_MDN); * ]| **/ #include "e-source-mdn.h" #include <libedataserver/e-source-enumtypes.h> #define E_SOURCE_MDN_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_SOURCE_MDN, ESourceMDNPrivate)) struct _ESourceMDNPrivate { EMdnResponsePolicy response_policy; }; enum { PROP_0, PROP_RESPONSE_POLICY }; G_DEFINE_TYPE ( ESourceMDN, e_source_mdn, E_TYPE_SOURCE_EXTENSION) static void source_mdn_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { switch (property_id) { case PROP_RESPONSE_POLICY: e_source_mdn_set_response_policy ( E_SOURCE_MDN (object), g_value_get_enum (value)); return; } G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } static void source_mdn_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { switch (property_id) { case PROP_RESPONSE_POLICY: g_value_set_enum ( value, e_source_mdn_get_response_policy ( E_SOURCE_MDN (object))); return; } G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } static void e_source_mdn_class_init (ESourceMDNClass *class) { GObjectClass *object_class; ESourceExtensionClass *extension_class; g_type_class_add_private (class, sizeof (ESourceMDNPrivate)); object_class = G_OBJECT_CLASS (class); object_class->set_property = source_mdn_set_property; object_class->get_property = source_mdn_get_property; extension_class = E_SOURCE_EXTENSION_CLASS (class); extension_class->name = E_SOURCE_EXTENSION_MDN; g_object_class_install_property ( object_class, PROP_RESPONSE_POLICY, g_param_spec_enum ( "response-policy", "Response Policy", "Policy for responding to MDN requests", E_TYPE_MDN_RESPONSE_POLICY, E_MDN_RESPONSE_POLICY_ASK, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | E_SOURCE_PARAM_SETTING)); } static void e_source_mdn_init (ESourceMDN *extension) { extension->priv = E_SOURCE_MDN_GET_PRIVATE (extension); } /** * e_source_mdn_get_response_policy: * @extension: an #ESourceMDN * * Returns the policy for this mail account on responding to Message * Disposition Notification requests when receiving mail messages. * * Returns: the #EMdnResponsePolicy for this account * * Since: 3.6 **/ EMdnResponsePolicy e_source_mdn_get_response_policy (ESourceMDN *extension) { g_return_val_if_fail ( E_IS_SOURCE_MDN (extension), E_MDN_RESPONSE_POLICY_NEVER); return extension->priv->response_policy; } /** * e_source_mdn_set_response_policy: * @extension: an #ESourceMDN * @response_policy: the #EMdnResponsePolicy * * Sets the policy for this mail account on responding to Message * Disposition Notification requests when receiving mail messages. * * Since: 3.6 **/ void e_source_mdn_set_response_policy (ESourceMDN *extension, EMdnResponsePolicy response_policy) { g_return_if_fail (E_IS_SOURCE_MDN (extension)); if (extension->priv->response_policy == response_policy) return; extension->priv->response_policy = response_policy; g_object_notify (G_OBJECT (extension), "response-policy"); }
/* * attFile.h * openc2e * * Created by Alyssa Milburn on Fri 25 Feb 2005. * Copyright (c) 2005 Alyssa Milburn. All rights reserved. * * 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 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 <fstream> class attFile { public: unsigned int attachments[16][20]; unsigned int noattachments[16]; unsigned int nolines; friend std::istream &operator >> (std::istream &, attFile &); }; /* vim: set noet: */
/* * Copyright (C) 2014 Loci Controls Inc. * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @ingroup boards_cc2538dk * @{ * * @file * @brief Board specific implementations for the CC2538DK board * * @author Ian Martin <ian@locicontrols.com> */ #include <stdio.h> #include "board.h" #include "cpu.h" static void led_init_helper(int gpio_num) { gpio_software_control(gpio_num); gpio_dir_output(gpio_num); /* Enable output without any internal pull resistors: */ IOC_PXX_OVER[gpio_num] = IOC_OVERRIDE_OE; } /** * @brief Initialize the SmartRF06's on-board LEDs */ void led_init(void) { led_init_helper(LED_RED_GPIO); led_init_helper(LED_GREEN_GPIO); led_init_helper(LED_YELLOW_GPIO); led_init_helper(LED_ORANGE_GPIO); } /** * @brief Initialize the SmartRF06 board */ void board_init(void) { /* initialize the CPU */ cpu_init(); /* initialize the boards LEDs */ led_init(); } /** @} */
#ifndef ELM_WIDGET_INWIN_H #define ELM_WIDGET_INWIN_H #include "Elementary.h" /* DO NOT USE THIS HEADER UNLESS YOU ARE PREPARED FOR BREAKING OF YOUR * CODE. THIS IS ELEMENTARY'S INTERNAL WIDGET API (for now) AND IS NOT * FINAL. CALL elm_widget_api_check(ELM_INTERNAL_API_VERSION) TO CHECK * IT AT RUNTIME. */ /** * @addtogroup Widget * @{ * * @section elm-inwin-class The Elementary Inwin Class * * Elementary, besides having the @ref Inwin widget, exposes its * foundation -- the Elementary Inwin Class -- in order to create other * widgets which are a inwin with some more logic on top. */ /** * Base layout smart data extended with inwin instance data. */ typedef struct _Elm_Inwin_Smart_Data Elm_Inwin_Smart_Data; struct _Elm_Inwin_Smart_Data { }; /** * @} */ #define ELM_INWIN_DATA_GET(o, sd) \ Elm_Inwin_Smart_Data * sd = eo_data_scope_get(o, ELM_INWIN_CLASS) #define ELM_INWIN_DATA_GET_OR_RETURN(o, ptr) \ ELM_INWIN_DATA_GET(o, ptr); \ if (EINA_UNLIKELY(!ptr)) \ { \ CRI("No widget data for object %p (%s)", \ o, evas_object_type_get(o)); \ return; \ } #define ELM_INWIN_DATA_GET_OR_RETURN_VAL(o, ptr, val) \ ELM_INWIN_DATA_GET(o, ptr); \ if (EINA_UNLIKELY(!ptr)) \ { \ CRI("No widget data for object %p (%s)", \ o, evas_object_type_get(o)); \ return val; \ } #define ELM_INWIN_CHECK(obj) \ if (EINA_UNLIKELY(!eo_isa((obj), ELM_INWIN_CLASS))) \ return #endif
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qbs. ** ** $QT_BEGIN_LICENSE:LGPL$ ** 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 https://www.qt.io/terms-conditions. For further ** information use the contact form at https://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 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL3 included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or (at your option) the GNU General ** Public license version 3 or any later version approved by the KDE Free ** Qt Foundation. The licenses are as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-2.0.html and ** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef SCRIPTIMPORTER_H #define SCRIPTIMPORTER_H #include <QtCore/qhash.h> #include <QtScript/qscriptvalue.h> namespace qbs { namespace Internal { class ScriptEngine; class ScriptImporter { public: ScriptImporter(ScriptEngine *scriptEngine); QScriptValue importSourceCode(const QString &sourceCode, const QString &filePath, QScriptValue &targetObject); static void copyProperties(const QScriptValue &src, QScriptValue &dst); private: ScriptEngine *m_engine; QHash<QString, QString> m_sourceCodeCache; }; } // namespace Internal } // namespace qbs #endif // SCRIPTIMPORTER_H
/////////////////////////////////////////////////////////////////////////////// // Name: wx/dateevt.h // Purpose: declares wxDateEvent class // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-10 // RCS-ID: $Id$ // Copyright: (c) 2005 Vadim Zeitlin <vadim@wxwindows.org> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_DATEEVT_H_ #define _WX_DATEEVT_H_ #include "wx/event.h" #include "wx/datetime.h" #include "wx/window.h" // ---------------------------------------------------------------------------- // wxDateEvent: used by wxCalendarCtrl, wxDatePickerCtrl and wxTimePickerCtrl. // ---------------------------------------------------------------------------- class WXDLLIMPEXP_ADV wxDateEvent : public wxCommandEvent { public: wxDateEvent() { } wxDateEvent(wxWindow *win, const wxDateTime& dt, wxEventType type) : wxCommandEvent(type, win->GetId()), m_date(dt) { SetEventObject(win); } const wxDateTime& GetDate() const { return m_date; } void SetDate(const wxDateTime &date) { m_date = date; } // default copy ctor, assignment operator and dtor are ok virtual wxEvent *Clone() const { return new wxDateEvent(*this); } private: wxDateTime m_date; DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDateEvent) }; // ---------------------------------------------------------------------------- // event types and macros for handling them // ---------------------------------------------------------------------------- wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_DATE_CHANGED, wxDateEvent); wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_ADV, wxEVT_TIME_CHANGED, wxDateEvent); typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&); #define wxDateEventHandler(func) \ wxEVENT_HANDLER_CAST(wxDateEventFunction, func) #define EVT_DATE_CHANGED(id, fn) \ wx__DECLARE_EVT1(wxEVT_DATE_CHANGED, id, wxDateEventHandler(fn)) #define EVT_TIME_CHANGED(id, fn) \ wx__DECLARE_EVT1(wxEVT_TIME_CHANGED, id, wxDateEventHandler(fn)) #endif // _WX_DATEEVT_H_
/**************************************************************************** ** ** Copyright (C) 2019 Denis Shienkov <denis.shienkov@gmail.com> ** Contact: http://www.qt.io/licensing ** ** This file is part of Qbs. ** ** 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 QBS_KEILUVARMCOMMONPROPERTYGROUP_V5_H #define QBS_KEILUVARMCOMMONPROPERTYGROUP_V5_H #include <generators/xmlpropertygroup.h> namespace qbs { namespace keiluv { namespace arm { namespace v5 { class ArmCommonPropertyGroup final : public gen::xml::PropertyGroup { public: explicit ArmCommonPropertyGroup( const qbs::Project &qbsProject, const qbs::ProductData &qbsProduct); }; } // namespace v5 } // namespace arm } // namespace keiluv } // namespace qbs #endif // QBS_MCS51COMMONPROPERTYGROUP_V5_H
/* tsgn -- Test for the sign of a floating point number. Copyright 2003, 2006-2016 Free Software Foundation, Inc. Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. The GNU MPFR 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 3 of the License, or (at your option) any later version. The GNU MPFR 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 MPFR Library; see the file COPYING.LESSER. If not, see http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <stdio.h> #include <stdlib.h> #include "mpfr-test.h" static void check_special (void) { mpfr_t x; int ret = 0; mpfr_init (x); MPFR_SET_ZERO (x); if ((mpfr_sgn) (x) != 0 || mpfr_sgn (x) != 0) { printf("Sgn error for 0.\n"); ret = 1; } MPFR_SET_INF (x); MPFR_SET_POS (x); if ((mpfr_sgn) (x) != 1 || mpfr_sgn (x) != 1) { printf("Sgn error for +Inf.\n"); ret = 1; } MPFR_SET_INF (x); MPFR_SET_NEG (x); if ((mpfr_sgn) (x) != -1 || mpfr_sgn (x) != -1) { printf("Sgn error for -Inf.\n"); ret = 1; } MPFR_SET_NAN (x); mpfr_clear_flags (); if ((mpfr_sgn) (x) != 0 || !mpfr_erangeflag_p ()) { printf("Sgn error for NaN.\n"); ret = 1; } mpfr_clear_flags (); if (mpfr_sgn (x) != 0 || !mpfr_erangeflag_p ()) { printf("Sgn error for NaN.\n"); ret = 1; } mpfr_clear (x); if (ret) exit (ret); } static void check_sgn(void) { mpfr_t x; int i, s1, s2; mpfr_init(x); for(i = 0 ; i < 100 ; i++) { mpfr_urandomb (x, RANDS); if (i&1) { MPFR_SET_POS(x); s2 = 1; } else { MPFR_SET_NEG(x); s2 = -1; } s1 = mpfr_sgn(x); if (s1 < -1 || s1 > 1) { printf("Error for sgn: out of range.\n"); goto lexit; } else if (MPFR_IS_NAN(x) || MPFR_IS_ZERO(x)) { if (s1 != 0) { printf("Error for sgn: Nan or Zero should return 0.\n"); goto lexit; } } else if (s1 != s2) { printf("Error for sgn. Return %d instead of %d.\n", s1, s2); goto lexit; } } mpfr_clear(x); return; lexit: mpfr_clear(x); exit(1); } int main (int argc, char *argv[]) { tests_start_mpfr (); check_special (); check_sgn (); tests_end_mpfr (); return 0; }
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers // // This file is part of Bytecoin. // // Bytecoin 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 3 of the License, or // (at your option) any later version. // // Bytecoin 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 Bytecoin. If not, see <http://www.gnu.org/licenses/>. #include "crypto/random.c" #include "crypto-tests.h" void setup_random(void) { memset(&state, 42, sizeof(union hash_state)); }
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers // // This file is part of Bytecoin. // // Bytecoin 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 3 of the License, or // (at your option) any later version. // // Bytecoin 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 Bytecoin. If not, see <http://www.gnu.org/licenses/>. #pragma once #include <list> #include <vector> #include "CryptoNoteCore/CryptoNoteBasic.h" #include "IWalletLegacy.h" #include "ITransfersContainer.h" namespace CryptoNote { struct TxDustPolicy { uint64_t dustThreshold; bool addToFee; CryptoNote::AccountPublicAddress addrForDust; TxDustPolicy(uint64_t a_dust_threshold = 0, bool an_add_to_fee = true, CryptoNote::AccountPublicAddress an_addr_for_dust = CryptoNote::AccountPublicAddress()) : dustThreshold(a_dust_threshold), addToFee(an_add_to_fee), addrForDust(an_addr_for_dust) {} }; struct SendTransactionContext { TransactionId transactionId; std::vector<CryptoNote::COMMAND_RPC_GET_RANDOM_OUTPUTS_FOR_AMOUNTS::outs_for_amount> outs; uint64_t foundMoney; std::list<TransactionOutputInformation> selectedTransfers; TxDustPolicy dustPolicy; uint64_t mixIn; }; } //namespace CryptoNote
/**************************************************************************** ** ** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt3D module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** 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 https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** BSD License Usage ** Alternatively, you may use this file under the terms of the BSD license ** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of The Qt Company Ltd 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." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef SCENE_H #define SCENE_H #include <QtCore/QObject> #include <Qt3DCore/QEntity> #include <Qt3DCore/QTransform> #include <Qt3DRender/QPaintedTextureImage> class Scene : public QObject { Q_OBJECT public: explicit Scene(Qt3DCore::QEntity *rootEntity); ~Scene(); public Q_SLOTS: void redrawTexture(); void setSize(QSize size); private Q_SLOTS: void updateTimer(); private: Qt3DCore::QEntity *m_rootEntity; Qt3DCore::QEntity *m_cuboidEntity; Qt3DCore::QTransform *m_transform; Qt3DRender::QPaintedTextureImage *m_paintedTextureImage; float m_angle = 0; }; #endif // SCENE_H
/** * Copyright 2014-2016 CyberVision, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file kaa_error.h * @brief Kaa error codes * * Defines @c kaa_error_t enumeration type for standard error codes used across the C Endpoint SDK. */ #ifndef KAA_ERROR_H_ #define KAA_ERROR_H_ #ifdef __cplusplus extern "C" { #endif typedef enum { KAA_ERR_NONE = 0, /* General errors */ KAA_ERR_NOMEM = -1, KAA_ERR_BADDATA = -2, KAA_ERR_BADPARAM = -3, KAA_ERR_READ_FAILED = -4, KAA_ERR_WRITE_FAILED = -5, KAA_ERR_NOT_FOUND = -6, KAA_ERR_NOT_INITIALIZED = -7, KAA_ERR_BAD_STATE = -8, KAA_ERR_INVALID_PUB_KEY = -9, KAA_ERR_INVALID_BUFFER_SIZE = -10, KAA_ERR_UNSUPPORTED = -11, KAA_ERR_BAD_PROTOCOL_ID = -12, KAA_ERR_BAD_PROTOCOL_VERSION = -13, KAA_ERR_INSUFFICIENT_BUFFER = -14, KAA_ERR_ALREADY_EXISTS = -15, KAA_ERR_TIMEOUT = -16, KAA_ERR_PROFILE_IS_NOT_SET = -17, KAA_ERR_EVENT_NOT_ATTACHED = -41, KAA_ERR_EVENT_BAD_FQN = -42, KAA_ERR_EVENT_TRX_NOT_FOUND = -43, KAA_ERR_BUFFER_IS_NOT_ENOUGH = -51, KAA_ERR_BUFFER_INVALID_SIZE = -52, KAA_ERR_SOCKET_ERROR = -91, KAA_ERR_SOCKET_CONNECT_ERROR = -92, KAA_ERR_SOCKET_INVALID_FAMILY = -93, KAA_ERR_TCPCHANNEL_AP_RESOLVE_FAILED = -101, KAA_ERR_TCPCHANNEL_PARSER_INIT_FAILED = -102, KAA_ERR_TCPCHANNEL_PARSER_ERROR = -103, } kaa_error_t; #ifdef __cplusplus } /* extern "C" */ #endif #endif /* KAA_ERROR_H_ */
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/kinesisanalytics/KinesisAnalytics_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace KinesisAnalytics { namespace Model { /** * <p>For an application output, describes the AWS Lambda function configured as * its destination. </p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/LambdaOutputDescription">AWS * API Reference</a></p> */ class AWS_KINESISANALYTICS_API LambdaOutputDescription { public: LambdaOutputDescription(); LambdaOutputDescription(Aws::Utils::Json::JsonView jsonValue); LambdaOutputDescription& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** * <p>Amazon Resource Name (ARN) of the destination Lambda function.</p> */ inline const Aws::String& GetResourceARN() const{ return m_resourceARN; } /** * <p>Amazon Resource Name (ARN) of the destination Lambda function.</p> */ inline bool ResourceARNHasBeenSet() const { return m_resourceARNHasBeenSet; } /** * <p>Amazon Resource Name (ARN) of the destination Lambda function.</p> */ inline void SetResourceARN(const Aws::String& value) { m_resourceARNHasBeenSet = true; m_resourceARN = value; } /** * <p>Amazon Resource Name (ARN) of the destination Lambda function.</p> */ inline void SetResourceARN(Aws::String&& value) { m_resourceARNHasBeenSet = true; m_resourceARN = std::move(value); } /** * <p>Amazon Resource Name (ARN) of the destination Lambda function.</p> */ inline void SetResourceARN(const char* value) { m_resourceARNHasBeenSet = true; m_resourceARN.assign(value); } /** * <p>Amazon Resource Name (ARN) of the destination Lambda function.</p> */ inline LambdaOutputDescription& WithResourceARN(const Aws::String& value) { SetResourceARN(value); return *this;} /** * <p>Amazon Resource Name (ARN) of the destination Lambda function.</p> */ inline LambdaOutputDescription& WithResourceARN(Aws::String&& value) { SetResourceARN(std::move(value)); return *this;} /** * <p>Amazon Resource Name (ARN) of the destination Lambda function.</p> */ inline LambdaOutputDescription& WithResourceARN(const char* value) { SetResourceARN(value); return *this;} /** * <p>ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the * destination function.</p> */ inline const Aws::String& GetRoleARN() const{ return m_roleARN; } /** * <p>ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the * destination function.</p> */ inline bool RoleARNHasBeenSet() const { return m_roleARNHasBeenSet; } /** * <p>ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the * destination function.</p> */ inline void SetRoleARN(const Aws::String& value) { m_roleARNHasBeenSet = true; m_roleARN = value; } /** * <p>ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the * destination function.</p> */ inline void SetRoleARN(Aws::String&& value) { m_roleARNHasBeenSet = true; m_roleARN = std::move(value); } /** * <p>ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the * destination function.</p> */ inline void SetRoleARN(const char* value) { m_roleARNHasBeenSet = true; m_roleARN.assign(value); } /** * <p>ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the * destination function.</p> */ inline LambdaOutputDescription& WithRoleARN(const Aws::String& value) { SetRoleARN(value); return *this;} /** * <p>ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the * destination function.</p> */ inline LambdaOutputDescription& WithRoleARN(Aws::String&& value) { SetRoleARN(std::move(value)); return *this;} /** * <p>ARN of the IAM role that Amazon Kinesis Analytics can assume to write to the * destination function.</p> */ inline LambdaOutputDescription& WithRoleARN(const char* value) { SetRoleARN(value); return *this;} private: Aws::String m_resourceARN; bool m_resourceARNHasBeenSet; Aws::String m_roleARN; bool m_roleARNHasBeenSet; }; } // namespace Model } // namespace KinesisAnalytics } // namespace Aws
/*========================================================================= * * Copyright RTK Consortium * * 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.txt * * 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 __rtkMedianImageFilter_h #define __rtkMedianImageFilter_h #include <itkImageToImageFilter.h> #include "rtkThreeDCircularProjectionGeometry.h" #include "rtkConfiguration.h" namespace rtk { /** \class MedianImageFilter * \brief Performes a Median filtering on a 2D image of pixel type unsigned short (16bits). * * Performs a median filtering with different possible windows ( 3x3 or 3x2 ) * A median filter consists of replacing each entry pixel with the median of * neighboring pixels. The number of neighboring pixels depends on the windows * size. * * \test rtkmediantest.cxx * * \author S. Brousmiche (UCL-iMagX) and Marc Vila * * \ingroup ImageToImageFilter */ //FIXME: not templated yet //template <class TInputImage, class TOutputImage> typedef itk::Image<unsigned short, 2> TImage; class ITK_EXPORT MedianImageFilter: public itk::ImageToImageFilter< TImage, TImage > { public: /** Standard class typedefs. */ typedef MedianImageFilter Self; typedef itk::ImageToImageFilter<TImage,TImage> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; typedef TImage::PixelType *OutputImagePointer; typedef TImage::PixelType *InputImagePointer; typedef TImage::RegionType OutputImageRegionType; typedef itk::Vector<unsigned int, TImage::ImageDimension> VectorType; /** Method for creation through the object factory. */ itkNewMacro(Self); /** Run-time type information (and related methods). */ itkTypeMacro(MedianImageFilter, ImageToImageFilter); /** Get / Set the Median window that are going to be used during the operation */ itkGetMacro(MedianWindow, VectorType); itkSetMacro(MedianWindow, VectorType); protected: MedianImageFilter(); virtual ~MedianImageFilter() {}; //virtual void GenerateOutputInformation(); //virtual void GenerateInputRequestedRegion(); /** Performs median filtering on input image. * A call to this function will assume modification of the function.*/ virtual void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ); private: MedianImageFilter(const Self&); //purposely not implemented void operator=(const Self&); //purposely not implemented VectorType m_MedianWindow; }; } // end namespace rtk #ifndef ITK_MANUAL_INSTANTIATION #include "rtkMedianImageFilter.cxx" #endif #endif
// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // * Neither the name of NVIDIA CORPORATION 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 ``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. // // Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved. // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved. // Copyright (c) 2001-2004 NovodeX AG. All rights reserved. #ifndef PX_PHYSICS_EXTENSIONS_DEFAULT_ERROR_CALLBACK_H #define PX_PHYSICS_EXTENSIONS_DEFAULT_ERROR_CALLBACK_H #include "foundation/PxErrorCallback.h" #include "PxPhysXConfig.h" #if !PX_DOXYGEN namespace physx { #endif /** \brief default implementation of the error callback This class is provided in order to enable the SDK to be started with the minimum of user code. Typically an application will use its own error callback, and log the error to file or otherwise make it visible. Warnings and error messages from the SDK are usually indicative that changes are required in order for PhysX to function correctly, and should not be ignored. */ class PxDefaultErrorCallback : public PxErrorCallback { public: PxDefaultErrorCallback(); ~PxDefaultErrorCallback(); virtual void reportError(PxErrorCode::Enum code, const char* message, const char* file, int line); }; #if !PX_DOXYGEN } // namespace physx #endif #endif
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/ssm/SSM_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> namespace Aws { namespace SSM { namespace Model { enum class PatchComplianceLevel { NOT_SET, CRITICAL, HIGH, MEDIUM, LOW, INFORMATIONAL, UNSPECIFIED }; namespace PatchComplianceLevelMapper { AWS_SSM_API PatchComplianceLevel GetPatchComplianceLevelForName(const Aws::String& name); AWS_SSM_API Aws::String GetNameForPatchComplianceLevel(PatchComplianceLevel value); } // namespace PatchComplianceLevelMapper } // namespace Model } // namespace SSM } // namespace Aws
/* $Source: bitbucket.org:berkeleylab/gasnet.git/extended-ref/gasnet_extended_refvis.c $ * Description: Reference implementation of GASNet Vector, Indexed & Strided * Copyright 2002, Dan Bonachea <bonachea@cs.berkeley.edu> * Terms of use are as specified in license.txt */ #include <gasnet_vis_internal.h> #include <gasnet_extended_refvis.h> /*---------------------------------------------------------------------------------*/ /* *** VIS Init *** */ /*---------------------------------------------------------------------------------*/ static int gasnete_vis_isinit = 0; #if GASNETE_USE_AMPIPELINE static int gasnete_vis_use_ampipe; static size_t gasnete_vis_maxchunk; #endif #if GASNETE_USE_REMOTECONTIG_GATHER_SCATTER static int gasnete_vis_use_remotecontig; #endif extern void gasnete_vis_init(void) { gasneti_assert(!gasnete_vis_isinit); gasnete_vis_isinit = 1; GASNETI_TRACE_PRINTF(C,("gasnete_vis_init()")); #define GASNETE_VIS_ENV_YN(varname, envname, enabler) do { \ if (enabler) { \ varname = gasneti_getenv_yesno_withdefault(#envname, enabler##_DEFAULT); \ } else if (!gasnet_mynode() && gasneti_getenv(#envname) && gasneti_getenv_yesno_withdefault(#envname, 0)) { \ fprintf(stderr, "WARNING: %s is set in environment, but %s support is compiled out - setting ignored", \ #envname, #enabler); \ } \ } while (0) #if GASNETE_USE_AMPIPELINE GASNETE_VIS_ENV_YN(gasnete_vis_use_ampipe,GASNET_VIS_AMPIPE, GASNETE_USE_AMPIPELINE); gasnete_vis_maxchunk = gasneti_getenv_int_withdefault("GASNET_VIS_MAXCHUNK", gasnet_AMMaxMedium()-2*sizeof(void*),1); #endif #if GASNETE_USE_REMOTECONTIG_GATHER_SCATTER GASNETE_VIS_ENV_YN(gasnete_vis_use_remotecontig,GASNET_VIS_REMOTECONTIG, GASNETE_USE_REMOTECONTIG_GATHER_SCATTER); #endif } /*---------------------------------------------------------------------------------*/ #define GASNETI_GASNET_EXTENDED_REFVIS_C 1 #include "gasnet_vis_vector.c" #include "gasnet_vis_indexed.c" #include "gasnet_vis_strided.c" #undef GASNETI_GASNET_EXTENDED_REFVIS_C /*---------------------------------------------------------------------------------*/ /* *** Progress Function *** */ /*---------------------------------------------------------------------------------*/ /* signal a visop dummy eop/iop, unlink it and free it */ #define GASNETE_VISOP_SIGNAL_AND_FREE(visop, isget) do { \ GASNETE_VISOP_SIGNAL(visop, isget); \ GASNETI_PROGRESSFNS_DISABLE(gasneti_pf_vis,COUNTED); \ *lastp = visop->next; /* unlink */ \ gasneti_free(visop); \ goto visop_removed; \ } while (0) extern void gasneti_vis_progressfn(void) { GASNETE_THREAD_LOOKUP /* TODO: remove this lookup */ gasnete_vis_threaddata_t *td = GASNETE_VIS_MYTHREAD; gasneti_vis_op_t **lastp = &(td->active_ops); if (td->progressfn_active) return; /* prevent recursion */ td->progressfn_active = 1; for (lastp = &(td->active_ops); *lastp; ) { gasneti_vis_op_t * const visop = *lastp; #ifdef GASNETE_VIS_PROGRESSFN_EXTRA GASNETE_VIS_PROGRESSFN_EXTRA(visop, lastp) #endif switch (visop->type) { #ifdef GASNETE_PUTV_GATHER_SELECTOR case GASNETI_VIS_CAT_PUTV_GATHER: if (gasnete_try_syncnb(visop->handle) == GASNET_OK) { GASNETE_VISOP_SIGNAL_AND_FREE(visop, 0); } break; #endif #ifdef GASNETE_GETV_SCATTER_SELECTOR case GASNETI_VIS_CAT_GETV_SCATTER: if (gasnete_try_syncnb(visop->handle) == GASNET_OK) { gasnet_memvec_t const * const savedlst = (gasnet_memvec_t const *)(visop + 1); void const * const packedbuf = savedlst + visop->count; gasnete_memvec_unpack(visop->count, savedlst, packedbuf, 0, (size_t)-1); GASNETE_VISOP_SIGNAL_AND_FREE(visop, 1); } break; #endif #ifdef GASNETE_PUTI_GATHER_SELECTOR case GASNETI_VIS_CAT_PUTI_GATHER: if (gasnete_try_syncnb(visop->handle) == GASNET_OK) { GASNETE_VISOP_SIGNAL_AND_FREE(visop, 0); } break; #endif #ifdef GASNETE_GETI_SCATTER_SELECTOR case GASNETI_VIS_CAT_GETI_SCATTER: if (gasnete_try_syncnb(visop->handle) == GASNET_OK) { void * const * const savedlst = (void * const *)(visop + 1); void const * const packedbuf = savedlst + visop->count; gasnete_addrlist_unpack(visop->count, savedlst, visop->len, packedbuf, 0, (size_t)-1); GASNETE_VISOP_SIGNAL_AND_FREE(visop, 1); } break; #endif #ifdef GASNETE_PUTS_GATHER_SELECTOR case GASNETI_VIS_CAT_PUTS_GATHER: if (gasnete_try_syncnb(visop->handle) == GASNET_OK) { GASNETE_VISOP_SIGNAL_AND_FREE(visop, 0); } break; #endif #ifdef GASNETE_GETS_SCATTER_SELECTOR case GASNETI_VIS_CAT_GETS_SCATTER: if (gasnete_try_syncnb(visop->handle) == GASNET_OK) { size_t stridelevels = visop->len; size_t * const savedstrides = (size_t *)(visop + 1); size_t * const savedcount = savedstrides + stridelevels; void * const packedbuf = (void *)(savedcount + stridelevels + 1); gasnete_strided_unpack_all(visop->addr, savedstrides, savedcount, stridelevels, packedbuf); GASNETE_VISOP_SIGNAL_AND_FREE(visop, 1); } break; #endif default: gasneti_fatalerror("unrecognized visop category: %i", visop->type); } lastp = &(visop->next); /* advance */ visop_removed: ; } td->progressfn_active = 0; } /*---------------------------------------------------------------------------------*/
/* * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2018-11-06 SummerGift first version */ #ifndef __BOARD_H__ #define __BOARD_H__ #include <rtthread.h> #include <stm32f1xx.h> #include "drv_common.h" #include "drv_gpio.h" #ifdef __cplusplus extern "C" { #endif #define STM32_FLASH_START_ADRESS ((uint32_t)0x08000000) #define STM32_FLASH_SIZE (512 * 1024) #define STM32_FLASH_END_ADDRESS ((uint32_t)(STM32_FLASH_START_ADRESS + STM32_FLASH_SIZE)) /* Internal SRAM memory size[Kbytes] <8-64>, Default: 64*/ #define STM32_SRAM_SIZE 64 #define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024) #if defined(__ARMCC_VERSION) extern int Image$$RW_IRAM1$$ZI$$Limit; #define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit) #elif __ICCARM__ #pragma section="CSTACK" #define HEAP_BEGIN (__segment_end("CSTACK")) #else extern int __bss_end; #define HEAP_BEGIN ((void *)&__bss_end) #endif #define HEAP_END STM32_SRAM_END void SystemClock_Config(void); #ifdef __cplusplus } #endif #endif /* __BOARD_H__ */
/* * Copyright 2015 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once namespace folly { struct Unit { template <class T> struct Lift : public std::false_type { using type = T; }; }; template <> struct Unit::Lift<void> : public std::true_type { using type = Unit; }; template <class T> struct is_void_or_unit : public std::conditional< std::is_void<T>::value || std::is_same<Unit, T>::value, std::true_type, std::false_type>::type {}; }
/* * Copyright 2010-2017 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/workdocs/WorkDocs_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> namespace Aws { namespace WorkDocs { namespace Model { enum class UserFilterType { NOT_SET, ALL, ACTIVE_PENDING }; namespace UserFilterTypeMapper { AWS_WORKDOCS_API UserFilterType GetUserFilterTypeForName(const Aws::String& name); AWS_WORKDOCS_API Aws::String GetNameForUserFilterType(UserFilterType value); } // namespace UserFilterTypeMapper } // namespace Model } // namespace WorkDocs } // namespace Aws
/******************************************************************************* * Copyright 2010 Telecom Italia SpA * * 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 COMMON_HEADER_DEFINED #define COMMON_HEADER_DEFINED #include <xmltools/slre.h> #include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; typedef vector<string> strings; const int STRCMP_NORMAL = 0; const int STRCMP_REGEXP = 1; const int STRCMP_GLOBBING = 2; const int MAX_CAPTURES = 4; string glob2regexp (const string& glob); const bool compare_regexp(const string& target,const string& expression); const bool compare_globbing (const string& target,const string& expression); const bool equals(const string& s1, const string& s2, const int mode=STRCMP_NORMAL); inline const bool contains(const strings& ss, const string& s) { return (find(ss.begin(), ss.end(), s)!=ss.end()); } const bool contains(const strings& container, const strings& contained); const int string2strcmp_mode(const string& s); #endif /* COMMON_HEADER_DEFINED */
#if !defined(lint) && !defined(DOS) static char rcsid[] = "$Id: canaccess.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $"; #endif /* * ======================================================================== * Copyright 2006-2007 University of Washington * Copyright 2013 Eduardo Chappa * * 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 * * ======================================================================== */ #include <system.h> #include "bldpath.h" #include "fnexpand.h" #include "../charconv/utf8.h" #include "../charconv/filesys.h" #include "canaccess.h" /* * Useful definitions */ #ifdef _WINDOWS #define ACCESS_IN_CWD(F,M) (can_access((F), (M))) #define PATH_SEP ';' #define FILE_SEP '\\' #else /* UNIX */ #define ACCESS_IN_CWD(F,M) (-1) #define PATH_SEP ':' #define FILE_SEP '/' #endif /* UNIX */ /* * Check if we can access a file in a given way * * Args: file -- The file to check * mode -- The mode ala the access() system call, see ACCESS_EXISTS * and friends in alpine.h. * * Result: returns 0 if the user can access the file according to the mode, * -1 if he can't (and errno is set). * * */ int can_access(char *file, int mode) { #ifdef _WINDOWS struct stat buf; /* * NOTE: The WinNT access call returns that every directory is readable and * writable. We actually want to know if the write is going to fail, so we * try it. We don't read directories in Windows so we skip implementing that. */ if(mode & WRITE_ACCESS && file && !our_stat(file, &buf) && (buf.st_mode & S_IFMT) == S_IFDIR){ char *testname; int fd; size_t l = 0; /* * We'd like to just call temp_nam here, since it creates a file * and does what we want. However, temp_nam calls us! */ if((testname = malloc(MAXPATH * sizeof(char)))){ strncpy(testname, file, MAXPATH-1); testname[MAXPATH-1] = '\0'; if(testname[0] && testname[(l=strlen(testname))-1] != '\\' && l+1 < MAXPATH){ l++; strncat(testname, "\\", MAXPATH-strlen(testname)-1); testname[MAXPATH-1] = '\0'; } if(l+8 < MAXPATH && strncat(testname, "caXXXXXX", MAXPATH-strlen(testname)-1) && mktemp(testname)){ if((fd = our_open(testname, O_CREAT|O_EXCL|O_WRONLY|O_BINARY, 0600)) >= 0){ (void)close(fd); our_unlink(testname); free(testname); /* success, drop through to access call */ } else{ free(testname); /* can't write in the directory */ return(-1); } } else{ free(testname); return(-1); } } } if(mode & EXECUTE_ACCESS) /* Windows access has no execute mode */ mode &= ~EXECUTE_ACCESS; /* and crashes because of it */ #endif /* WINDOWS */ return(our_access(file, mode)); } /*---------------------------------------------------------------------- Check if we can access a file in a given way in the given path Args: path -- The path to look for "file" in file -- The file to check mode -- The mode ala the access() system call, see ACCESS_EXISTS and friends in alpine.h. Result: returns 0 if the user can access the file according to the mode, -1 if he can't (and errno is set). ----*/ int can_access_in_path(char *path, char *file, int mode) { char tmp[MAXPATH]; int rv = -1; if(!path || !*path || is_rooted_path(file)){ rv = can_access(file, mode); } else if(is_homedir_path(file)){ strncpy(tmp, file, sizeof(tmp)); tmp[sizeof(tmp)-1] = '\0'; rv = fnexpand(tmp, sizeof(tmp)) ? can_access(tmp, mode) : -1; } else if((rv = ACCESS_IN_CWD(file,mode)) < 0){ char path_copy[MAXPATH + 1], *p, *t; if(strlen(path) < MAXPATH){ strncpy(path_copy, path, sizeof(path_copy)); path_copy[sizeof(path_copy)-1] = '\0'; for(p = path_copy; p && *p; p = t){ if((t = strchr(p, PATH_SEP)) != NULL) *t++ = '\0'; snprintf(tmp, sizeof(tmp), "%s%c%s", p, FILE_SEP, file); if((rv = can_access(tmp, mode)) == 0) break; } } } return(rv); }
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/lambda/Lambda_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Lambda { namespace Model { /** * <p>The resource specified in the request does not exist.</p><p><h3>See * Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ResourceNotFoundException">AWS * API Reference</a></p> */ class AWS_LAMBDA_API ResourceNotFoundException { public: ResourceNotFoundException(); ResourceNotFoundException(Aws::Utils::Json::JsonView jsonValue); ResourceNotFoundException& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; inline const Aws::String& GetType() const{ return m_type; } inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } inline void SetType(const Aws::String& value) { m_typeHasBeenSet = true; m_type = value; } inline void SetType(Aws::String&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } inline void SetType(const char* value) { m_typeHasBeenSet = true; m_type.assign(value); } inline ResourceNotFoundException& WithType(const Aws::String& value) { SetType(value); return *this;} inline ResourceNotFoundException& WithType(Aws::String&& value) { SetType(std::move(value)); return *this;} inline ResourceNotFoundException& WithType(const char* value) { SetType(value); return *this;} inline const Aws::String& GetMessage() const{ return m_message; } inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } inline ResourceNotFoundException& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} inline ResourceNotFoundException& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} inline ResourceNotFoundException& WithMessage(const char* value) { SetMessage(value); return *this;} private: Aws::String m_type; bool m_typeHasBeenSet; Aws::String m_message; bool m_messageHasBeenSet; }; } // namespace Model } // namespace Lambda } // namespace Aws
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/mediaconvert/MediaConvert_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> namespace Aws { namespace MediaConvert { namespace Model { enum class Eac3StereoDownmix { NOT_SET, NOT_INDICATED, LO_RO, LT_RT, DPL2 }; namespace Eac3StereoDownmixMapper { AWS_MEDIACONVERT_API Eac3StereoDownmix GetEac3StereoDownmixForName(const Aws::String& name); AWS_MEDIACONVERT_API Aws::String GetNameForEac3StereoDownmix(Eac3StereoDownmix value); } // namespace Eac3StereoDownmixMapper } // namespace Model } // namespace MediaConvert } // namespace Aws
#import "MWMTableViewController.h" struct BookmarkAndCategory; @protocol MWMSelectSetDelegate <NSObject> - (void)didSelectCategory:(NSString *)category withCategoryIndex:(size_t)categoryIndex; @end @interface SelectSetVC : MWMTableViewController - (instancetype)initWithCategory:(NSString *)category categoryIndex:(size_t)categoryIndex delegate:(id<MWMSelectSetDelegate>)delegate; @end